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
//api: 'http://127.0.0.1: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',
arithmeticPath: 'http://127.0.0.1:18090/ktkx/UavPlanning/SAR',
tokenKey: 'accessToken',

View File

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

View File

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

View File

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