Compare commits

..

No commits in common. "bb705ee956d718ffaec197cec22fa4b8750bdf19" and "0e08773471d920dc1e1c5e3a41c24c0d0cdbccb7" have entirely different histories.

4 changed files with 41 additions and 59 deletions

View File

@ -2,7 +2,7 @@ window.config = {
env: 'offline', //online env: 'offline', //online
//api: 'http://127.0.0.1:9116/', // 外网服务器, //api: 'http://127.0.0.1:9116/', // 外网服务器,
api: 'http://192.168.43.127:9116', api: 'http://192.168.43.127:9116',
socket: 'http://192.168.43.127:9116', //外网服务器, // socket: 'http://127.0.0.1:9116', 外网服务器,
imagePath: 'http://192.168.112.181:9000/files', imagePath: 'http://192.168.112.181:9000/files',
arithmeticPath: 'http://127.0.0.1:18090/ktkx/UavPlanning/SAR', arithmeticPath: 'http://127.0.0.1:18090/ktkx/UavPlanning/SAR',
tokenKey: 'accessToken', tokenKey: 'accessToken',

View File

@ -5,7 +5,7 @@ import { lodLayer, viewer } from '@/components/dt-scene/index.vue'
import SceneInfo from '@/mixin/scene-info' import SceneInfo from '@/mixin/scene-info'
import LeftSlide from '@/components/LeftSlide.vue' import LeftSlide from '@/components/LeftSlide.vue'
import { mapGetters, mapMutations } from 'vuex' import { mapGetters } from 'vuex'
import * as DT from 'dt-sdk' import * as DT from 'dt-sdk'
import { ICON_MODE } from '@/enum' import { ICON_MODE } from '@/enum'
@ -652,7 +652,6 @@ export default {
taskUavCollection = {} taskUavCollection = {}
}, },
methods: { methods: {
...mapMutations('app', ['SET_MENUS_CHOSE']),
// #region 任务启动部分代码迁移 // #region 任务启动部分代码迁移
reRunTask(info) { reRunTask(info) {
if (info.status !== 2) return if (info.status !== 2) return
@ -665,29 +664,27 @@ export default {
if (res.data.code === 200) { if (res.data.code === 200) {
console.log('重新运行结果', res) console.log('重新运行结果', res)
this.$message.success('任务重新执行成功') this.$message.success('任务重新执行成功')
this.getList() let data = res.data.data
this.SET_MENUS_CHOSE('1') data.check = data.status === 1
// let data = res.data.data data.statusName = this.jobStatus[data.status + '']
// data.check = data.status === 1 data.uavList.forEach(child => {
// data.statusName = this.jobStatus[data.status + ''] if (!child.trailList) {
// data.uavList.forEach(child => { child.trailList = []
// if (!child.trailList) { }
// child.trailList = [] child.jobName = data.name
// } })
// child.jobName = data.name this.taskList.data.unshift({
// }) id: data.id,
// this.taskList.data.unshift({ beginTime: data.beginTime,
// id: data.id, check: data.check,
// beginTime: data.beginTime, endTime: data.endTime,
// check: data.check, mode: data.mode,
// endTime: data.endTime, name: data.name,
// mode: data.mode, status: data.status,
// name: data.name, statusName: data.statusName,
// status: data.status, })
// statusName: data.statusName, taskListResource.unshift(data)
// }) this.addUavToScene(data)
// taskListResource.unshift(data)
// this.addUavToScene(data)
// this.addTaskPlanArea(data.pointList, data.id, data.name) // this.addTaskPlanArea(data.pointList, data.id, data.name)
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
@ -703,9 +700,8 @@ export default {
}).then(res => { }).then(res => {
stopTaskFly({ id: info.id }).then(res => { stopTaskFly({ id: info.id }).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
// info.status = 2 info.status = 2
this.getList() info.statusName = this.jobStatus[info.status + '']
// info.statusName = this.jobStatus[info.status + '']
this.$message.success('任务已结束!') this.$message.success('任务已结束!')
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
@ -722,17 +718,16 @@ export default {
}).then(res => { }).then(res => {
flyTaskUavCommand({ id: info.id }).then(res => { flyTaskUavCommand({ id: info.id }).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
// info.status = 1 info.status = 1
// info.check = false info.check = false
// info.statusName = this.jobStatus[info.status + ''] info.statusName = this.jobStatus[info.status + '']
// this.toggleTaskSceneShow(info, index) this.toggleTaskSceneShow(info, index)
// this.taskList.data.forEach((child, childIndex) => { this.taskList.data.forEach((child, childIndex) => {
// if (child.check && child.status === 2) { if (child.check && child.status === 2) {
// this.toggleTaskSceneShow(child, childIndex) this.toggleTaskSceneShow(child, childIndex)
// } }
// }) })
this.$message.success('起飞成功') this.$message.success('起飞成功')
this.SET_MENUS_CHOSE('1')
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
@ -740,8 +735,6 @@ export default {
}) })
}, },
toggleTaskSceneShow(info, index) { toggleTaskSceneShow(info, index) {
console.log(5555555555);
if (info.check) { if (info.check) {
info.check = false; info.check = false;
taskListResource[index].check = false taskListResource[index].check = false
@ -960,7 +953,6 @@ export default {
status: item.status, status: item.status,
statusName: item.statusName, statusName: item.statusName,
}) })
this.removeTaskTarget(item.id)
}) })
taskListResource = data taskListResource = data
this.taskList.data = list this.taskList.data = list

View File

@ -425,7 +425,6 @@ export default {
'taskFlightMode', 'taskFlightMode',
'detectType', 'detectType',
'jobStatus', 'jobStatus',
'menusChose'
]), ]),
isIconModeLarge() { isIconModeLarge() {
return this.iconMode === ICON_MODE.LARGE return this.iconMode === ICON_MODE.LARGE
@ -443,8 +442,6 @@ export default {
visibleLocale(nv) { visibleLocale(nv) {
if (!nv) { if (!nv) {
this.$emit('update:visible', false) this.$emit('update:visible', false)
alert(7777777)
} }
}, },
sceneComplete: { sceneComplete: {
@ -531,7 +528,11 @@ export default {
if (handler) { if (handler) {
handler.removeInputAction(DT.Cesium.ScreenSpaceEventType.LEFT_CLICK) handler.removeInputAction(DT.Cesium.ScreenSpaceEventType.LEFT_CLICK)
} }
if (stompClientInstance) {
disconnectWebSocket(stompClientInstance)
socketInstance = null
stompClientInstance = null
}
viewer.entities.removeAll() viewer.entities.removeAll()
// if (broadcastChannel) { // if (broadcastChannel) {
// this.closeBroadcastChannel() // this.closeBroadcastChannel()
@ -545,11 +546,6 @@ export default {
radarSceneEntity = {} radarSceneEntity = {}
sceneEntity = {} sceneEntity = {}
taskListResource = [] taskListResource = []
if (stompClientInstance) {
disconnectWebSocket(stompClientInstance)
socketInstance = null
stompClientInstance = null
}
}, },
methods: { methods: {
...mapMutations('scene-control', [ ...mapMutations('scene-control', [
@ -1059,7 +1055,7 @@ export default {
}) })
// this.startWebSocket() // this.startWebSocket()
this.createWebsocket() // this.createWebsocket()
}, },
toggleRightShow() { toggleRightShow() {
@ -1114,11 +1110,6 @@ export default {
}) })
taskListResource = data taskListResource = data
this.taskList.data = list this.taskList.data = list
this.taskList.data[0].check = true
if (this.menusChose === '1') {
this.addUavToScene(data[0])
this.addTaskPlanArea(data[0].pointList, data[0].id, data[0].name)
}
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
@ -1556,7 +1547,7 @@ export default {
stopTaskFly({ id: info.id }).then(res => { stopTaskFly({ id: info.id }).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
info.status = 2 info.status = 2
this.getTaskList() info.statusName = this.jobStatus[info.status + '']
this.$message.success('任务已结束!') this.$message.success('任务已结束!')
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)

View File

@ -604,7 +604,6 @@ export default {
linePicture = {} linePicture = {}
currentPicture = null currentPicture = null
aisCollection = [] aisCollection = []
}, },
methods: { methods: {
...mapMutations('scene-control', [ ...mapMutations('scene-control', [