From aeaab62a09ebce480a70b6e4839c1c8176d99920 Mon Sep 17 00:00:00 2001 From: wangxueshen Date: Wed, 28 Jan 2026 13:56:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=EF=BC=8C=E8=AE=BE=E5=A4=87=E4=BF=9D=E5=AD=98=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E4=BB=BB=E5=8A=A1=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/Skyeye-sys-ui/public/config.js | 6 +- frontend/Skyeye-sys-ui/src/api/task.js | 5 +- frontend/Skyeye-sys-ui/src/permission.js | 46 ++-- .../home/components/device1-manage/index.js | 17 +- .../home/components/task-manage/index.js | 254 +++++++++++++++++- .../home/components/task-manage/index.scss | 2 +- .../home/components/task-manage/index.vue | 49 +++- .../home/components/twin-situation/index.js | 41 +-- .../home/components/twin-situation/index.scss | 4 +- .../home/components/twin-situation/index.vue | 25 +- .../components/twin-situation/uavTarget.js | 67 ++--- .../views/home/components/user-list/index.js | 20 +- .../views/home/components/user-list/index.vue | 2 +- .../Skyeye-sys-ui/src/views/home/index.js | 2 +- 14 files changed, 424 insertions(+), 116 deletions(-) diff --git a/frontend/Skyeye-sys-ui/public/config.js b/frontend/Skyeye-sys-ui/public/config.js index 8e7a55d..27b7977 100644 --- a/frontend/Skyeye-sys-ui/public/config.js +++ b/frontend/Skyeye-sys-ui/public/config.js @@ -1,8 +1,8 @@ window.config = { env: 'offline', //online //api: 'http://127.0.0.1:9116/', // 外网服务器, - api: 'http://localhost:9116', - socket: 'http://localhost:9116', //外网服务器, + api: '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', @@ -12,6 +12,6 @@ window.config = { arcgisUrl: 'http://61.48.133.44:14001/map/arcgisMap', minMapLevel: 1, maxMapLevel: 16, - defaultLocation: [115.915465, 40.35857694], + defaultLocation: [116.40531500114789, 39.86340233391189], tdtToken: '316ac2812387c2cbff7a6f2f4e7f5bdc' } diff --git a/frontend/Skyeye-sys-ui/src/api/task.js b/frontend/Skyeye-sys-ui/src/api/task.js index a05fa23..f9b0cc1 100644 --- a/frontend/Skyeye-sys-ui/src/api/task.js +++ b/frontend/Skyeye-sys-ui/src/api/task.js @@ -17,9 +17,6 @@ export const getUavCurrentHeight = params => // 获取任务列表 export const getTaskListData = params => req('post', '/sar/job/list', params) -// 获取执行中的任务列表 -export const getExecJobs = params => - req('post', '/sar/job/execJobs', params) // 新增任务 export const addTaskFast = params => req('post', '/sar/job/save', params) @@ -29,6 +26,8 @@ export const previewTaskFast = params => // 编辑任务 export const editTaskFast = params => req('post', '/sar/job/save', params) +export const getExecJobs = params => + req('post', '/sar/job/execJobs', params) // 新增任务 export const addTaskAirline = params => req('post', '/sar/job/save2', params) diff --git a/frontend/Skyeye-sys-ui/src/permission.js b/frontend/Skyeye-sys-ui/src/permission.js index c7cf00a..c0e09e6 100644 --- a/frontend/Skyeye-sys-ui/src/permission.js +++ b/frontend/Skyeye-sys-ui/src/permission.js @@ -9,30 +9,30 @@ const whiteList = ['/login'] // 本地测试保留login router.beforeEach(async (to, from, next) => { // 启动进度条 - // NProgress.start() + NProgress.start() // 确定用户是否已登录 - // const hasToken = getToken() - // if (hasToken) { - // if (to.path === '/login') { - // // 如果已登录,则重定向到主页 - // next({ path: '/' }) - // NProgress.done() - // } else { - // NProgress.done() - // next() - // } - // } else { - // /* 没有 token */ - // if (whiteList.indexOf(to.path) !== -1) { - // // 在免费登录白名单,直接去 - // next() - // } else { - // // 没有访问权限的其他页面被重定向到登录页面。 - // next(`/login?redirect=${to.path}`) - // NProgress.done() - // } - // } - next() + const hasToken = getToken() + if (hasToken) { + if (to.path === '/login') { + // 如果已登录,则重定向到主页 + next({ path: '/' }) + NProgress.done() + } else { + NProgress.done() + next() + } + } else { + /* 没有 token */ + if (whiteList.indexOf(to.path) !== -1) { + // 在免费登录白名单,直接去 + next() + } else { + // 没有访问权限的其他页面被重定向到登录页面。 + next(`/login?redirect=${to.path}`) + NProgress.done() + } + } + // next() // 跳转页面时,取消上一个页面的请求 if (window.__axiosCancelTokenArr) { diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/device1-manage/index.js b/frontend/Skyeye-sys-ui/src/views/home/components/device1-manage/index.js index dfa1ecd..d21c7f0 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/device1-manage/index.js +++ b/frontend/Skyeye-sys-ui/src/views/home/components/device1-manage/index.js @@ -148,6 +148,21 @@ export default { addDevice() { this.device.visible = true this.device.title = `新增${this.deviceMap[this.queryForm.type]}` + if (this.queryForm.type === 'uav') { + this.device.form = { + id: '', + name1: '', + code: '', + ip1: '' + } + } else { + this.device.form = { + id: '', + name2: '', + type: '', + ip2: '' + } + } }, editDevice(row) { this.device.visible = true @@ -173,7 +188,7 @@ export default { this.device.visible = false }, async submitDevice() { - const valid = await this.$refs.form.validate(valid) + const valid = await this.$refs.form.validate() if (!valid) return const form = {} if (this.queryForm.type === 'uav') { diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js index 2eb548f..39d74ba 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js +++ b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.js @@ -15,12 +15,10 @@ import { addTaskFast, deleteTaskItem, editTaskName, getLoaderEnabledList, getTaskEditItemDetail, getTaskListData, getUavCurrentHeight, getUavEnabledListData, previewTaskFast, - reRunTask + reRunTask, flyTaskUavCommand, stopTaskFly } from '@/api/task' -import LinePlot from './line-plot' import LineTarget from './lineTarget' -import axios from 'axios' - +import UavTarget from '../twin-situation/uavTarget' let theViewerTools = null let pickHandler = null let startPoint = null @@ -29,6 +27,9 @@ let linePlot = null let airlineCollection = {} let previewEntities = [] let taskListResource = [] +let taskUavCollection = {} +let taskPlanAreaCollection = {} +let sceneEntity = {} export default { name: 'TaskManage', props: { @@ -59,6 +60,8 @@ export default { // executeName: '无人机1', // typeIcon: 'el-icon-camera', // name: '拍照任务', + // check: false, + // status: 0, // uavCompletion: 30, // isFinish: false, // taskProgressName: '30%', @@ -492,7 +495,7 @@ export default { value: 1 } ], - emptyImg: require('@/assets/img/common/empty.svg') + emptyImg: require('@/assets/img/common/empty.svg'), } }, computed: { @@ -618,14 +621,249 @@ export default { // lodLayer.removeAll() // viewer.entities.removeAll() } + viewer.entities.removeAll() startPoint = null endPoint = null if (linePlot) { linePlot.destroy() linePlot = null } + for (let key in taskPlanAreaCollection) { + if (taskPlanAreaCollection[key]) { + taskPlanAreaCollection[key].forEach(item => { + viewer.entities.remove(item) + }) + } + } + for (let key in taskUavCollection) { + if (taskUavCollection[key]) { + taskUavCollection[key].forEach(item => { + item.destroy() + }) + } + } + for (let key in sceneEntity) { + if (sceneEntity[key]) { + viewer.entities.remove(sceneEntity[key]) + } + } + sceneEntity = {} + taskPlanAreaCollection = {} + taskUavCollection = {} }, methods: { + // #region 任务启动部分代码迁移 + reRunTask(info) { + if (info.status !== 2) return + this.$confirm('确定重新执行吗', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(res => { + reRunTask({ id: info.id }).then(res => { + if (res.data.code === 200) { + console.log('重新运行结果', res) + this.$message.success('任务重新执行成功') + 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) + } + }) + }) + }, + stopTask(info, index) { + this.$confirm('确定结束任务吗', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(res => { + stopTaskFly({ id: info.id }).then(res => { + if (res.data.code === 200) { + info.status = 2 + info.statusName = this.jobStatus[info.status + ''] + this.$message.success('任务已结束!') + } else { + this.$message.error(res.data.message) + } + }) + }) + + }, + makeTaskUavFly(info, index) { + this.$confirm('确定执行吗', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).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) + } + }) + this.$message.success('起飞成功') + } else { + this.$message.error(res.data.message) + } + }) + }) + }, + toggleTaskSceneShow(info, index) { + if (info.check) { + info.check = false; + taskListResource[index].check = false + this.removeTaskTarget(info.id); + } else { + this.addUavToScene(taskListResource[index]) + this.addTaskPlanArea(taskListResource[index].pointList, info.id, info.name) + info.check = true + } + }, + addTaskPlanArea(data, taskId, taskName) { + taskPlanAreaCollection[taskId] = [] + let allPositions = [] + let centerLon = 0 + let centerLat = 0 + data.forEach((item, index) => { + if (item.length > 1) { + let positions = [] + item.forEach(child => { + positions.push(DT.Cesium.Cartesian3.fromDegrees(child.longitude, child.latitude)) + }) + positions.push(DT.Cesium.Cartesian3.fromDegrees(item[0].longitude, item[0].latitude)) + allPositions = allPositions.concat(positions) + let entity = viewer.entities.add({ + position: positions[0], + label: { + text: `${taskName}任务-规划区域${index + 1}`, + disableDepthTestDistance: 10000, + font: '14px sans-serif', + fillColor: DT.Cesium.Color.RED, + horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT, + verticalOrigin: DT.Cesium.VerticalOrigin.BOTTOM, + pixelOffset: new DT.Cesium.Cartesian2(0, -10), + scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8), + distanceDisplayCondition: new DT.Cesium.DistanceDisplayCondition(0, 10000), + showBackground: true, + backgroundColor: DT.Cesium.Color.fromCssColorString('rgba(255,255,255,0.6)') + }, + polyline: { + positions: positions, + width: 2, + arcType: DT.Cesium.ArcType.NONE, + material: DT.Cesium.Color.RED, + depthFailMaterial: DT.Cesium.Color.RED, + disableDepthTestDistance: 10000, + zIndex: -1 + } + }) + taskPlanAreaCollection[taskId].push(entity) + } else if (item.length === 1) { + let position = DT.Cesium.Cartesian3.fromDegrees(item[0].longitude, item[0].latitude) + allPositions.push(position) + let entity = viewer.entities.add({ + position, + label: { + text: `${taskName}任务-规划区域${index + 1}`, + disableDepthTestDistance: 10000, + font: '14px sans-serif', + fillColor: DT.Cesium.Color.RED, + horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT, + pixelOffset: new DT.Cesium.Cartesian2(10, 0), + showBackground: true, + backgroundColor: DT.Cesium.Color.fromCssColorString('rgba(255,255,255,0.6)') + }, + point: { + pixelSize: 4, + color: DT.Cesium.Color.RED, + disableDepthTestDistance: 10000 + } + }) + taskPlanAreaCollection[taskId].push(entity) + + } + }) + if (allPositions.length > 0) { + let cat = DT.Cesium.Cartographic.fromCartesian(allPositions[0]) + allPositions.push(DT.Cesium.Cartesian3.fromRadians(cat.longitude, cat.latitude, 2000)) + viewer.cesiumViewer.camera.flyToBoundingSphere(DT.Cesium.BoundingSphere.fromPoints(allPositions), { + duration: 0.1, + offset: new DT.Cesium.HeadingPitchRange(0, -Math.PI / 2, 0), + }) + } + }, + addUavToScene(info) { + let arr = [] + info.uavList.forEach(item => { + console.log(viewer, item, 8888); + let uav = new UavTarget(viewer, item) + arr.push(uav) + }) + taskUavCollection[info.id] = arr + }, + removeTaskTarget(taskId) { + if (taskPlanAreaCollection[taskId]) { + taskPlanAreaCollection[taskId].forEach(item => { + viewer.entities.remove(item) + }) + taskPlanAreaCollection[taskId] = null + } + if (taskUavCollection[taskId]) { + taskUavCollection[taskId].forEach(item => { + item.destroy() + }) + taskUavCollection[taskId] = null + } + }, + toggleHistoryPicture(data) { + if (taskUavCollection[data.jobId]) { + let find = taskUavCollection[data.jobId].find(item => item.uavId + '' === data.uavId + '') + if (find) { + find.toggleLoaderPictureVisible(data.payloadId, data.fileId) + } + } + }, + // #endregion + handleCommand(command, item) { + switch (command) { + case 'edit': + this.editTaskName(item) + break; + case 'copy': + this.copyTask(item) + break; + case 'remove': + this.deleteTask(item) + break; + + } + }, dealStatusColor(name) { if (name === '执行中') { return '#6ae965' @@ -701,7 +939,6 @@ export default { getList() { getTaskListData({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => { if (res.data.code === 200) { - console.log('任务列表', res.data.data) let data = res.data.data let list = [] data.forEach(item => { @@ -983,7 +1220,6 @@ export default { pointList.push(item.boundaryLonLat) } }) - let info = { info1: JSON.stringify(this.form), id: params.id, @@ -1042,7 +1278,7 @@ export default { addTaskFast(info).then(res => { if (res.data.code === 200) { this.$message.success('新增任务任务成功') - // this.taskForm.visible = false + this.taskForm.visible = false this.resetForm() this.getList() } else { @@ -1487,7 +1723,7 @@ export default { } this.calculateLimit() }, - getRatioDisabled(value, index) { + getRatioDisabled(value) { if (this.form.imageMode !== '4') { return value.value === '10' } else { diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss index ecbb5f9..4820183 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss +++ b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.scss @@ -125,7 +125,7 @@ .task-execute { color: $--color-text-1; font-size: 14px; - width: 90px; + width: 85px; margin-left: 5px; display: inline-block; overflow: hidden; diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue index 0cba2d8..0405bfa 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue +++ b/frontend/Skyeye-sys-ui/src/views/home/components/task-manage/index.vue @@ -10,7 +10,7 @@ title="任务列表" :visible.sync="taskList.visible" :scroll="false" - :showClose="true" + :showClose="false" :showDivider="false" >
-
+
@@ -59,7 +63,42 @@ - + + + + + + + + + + + + 修改名称 + 复制 + 删除 + + +
@@ -330,7 +369,7 @@ > { - getExecJobs({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => { + getExecJobs({ type: 2, orders: [{ column: 'begin_time', asc: false }] }).then(res => { if (res.data.code === 200) { console.log('任务列表', res.data.data) let data = res.data.data @@ -3045,6 +3044,8 @@ export default { //#region 航线详情 openTaskLineDetail(info) { this.taskLineDetail.visible = false + console.log(taskListResource, 555); + let find = taskListResource.find(item => item.id === info.id) console.log('信息', find) diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.scss b/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.scss index 8f3a6cb..f5a53d1 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.scss +++ b/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.scss @@ -196,8 +196,8 @@ width: 40px; height: 100%; display: flex; - flex-direction: column; - justify-content: center; + justify-content: space-between; + padding: 0 8px; align-items: center; >i { diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.vue b/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.vue index 9a942a0..45c93ba 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.vue +++ b/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/index.vue @@ -84,37 +84,40 @@ > {{ item.name }}
-
+
{{ item.statusName }}
{{ item.beginTime }}
-
+
- - + --> - -
diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/uavTarget.js b/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/uavTarget.js index 6c042c9..d658089 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/uavTarget.js +++ b/frontend/Skyeye-sys-ui/src/views/home/components/twin-situation/uavTarget.js @@ -16,7 +16,7 @@ export default class UavTarget { this.startAltitude = options.startAltitude this.addPlanLine(options.airlineList) - this.addUav(options) + // this.addUav(options.airlineList) this.addUavLoader(options.payloadList) } addUav(info) { @@ -32,37 +32,38 @@ export default class UavTarget { } let currentPosition = this.positions[this.positions.length - 1].clone() let id = `${this.jobId}~${this.uavId}-uav` + this.uavEntity = this.viewer.entities.add({ id, position: currentPosition, - // label: { - // text: info.uavName, - // font: '14px sans-serif', - // fillColor: DT.Cesium.Color.WHITE, - // horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT, - // verticalOrigin: DT.Cesium.VerticalOrigin.CENTER, - // disableDepthTestDistance: 10000, - // pixelOffset: new DT.Cesium.Cartesian2(10, 0), - // showBackground: true, - // scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8), - // distanceDisplayCondition: new DT.Cesium.DistanceDisplayCondition(0, 20000), - // backgroundColor: DT.Cesium.Color.fromCssColorString('rgba(0,0,0,0.7)'), - // style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE, - // }, - // model: { - // uri: process.env.BASE_URL + 'model/uav.gltf', - // // scale: 1, - // minimumPixelSize: 32, - // maximumScale: 128, - // }, + label: { + text: info.uavName, + font: '14px sans-serif', + fillColor: DT.Cesium.Color.WHITE, + horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT, + verticalOrigin: DT.Cesium.VerticalOrigin.CENTER, + disableDepthTestDistance: 10000, + pixelOffset: new DT.Cesium.Cartesian2(10, 0), + showBackground: true, + scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8), + distanceDisplayCondition: new DT.Cesium.DistanceDisplayCondition(0, 20000), + backgroundColor: DT.Cesium.Color.fromCssColorString('rgba(0,0,0,0.7)'), + style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE, + }, + model: { + uri: process.env.BASE_URL + 'model/uav.gltf', + // scale: 1, + minimumPixelSize: 32, + maximumScale: 128, + }, polyline: { positions: new DT.Cesium.CallbackProperty(function () { return that.positions }, false), - width: 2, - zIndex: 6, - material: DT.Cesium.Color.CYAN, - depthFailMaterial: DT.Cesium.Color.CYAN, + width: 8, + zIndex: 600, + material: DT.Cesium.Color.BLACK, + depthFailMaterial: DT.Cesium.Color.CYAN, arcType: DT.Cesium.ArcType.NONE } }) @@ -75,8 +76,8 @@ export default class UavTarget { let loaderPicture = {} data.forEach(loader => { loaderPicture[loader.payloadId] = [] - let key = 'imageList' - if (loader.imageHighList && loader.imageHighList.length > 0) { + let key = 'imageList' + if (loader.imageHighList && loader.imageHighList.length > 0) { key = 'imageHighList' } if (loader[key] && loader[key].length > 0) { @@ -120,12 +121,12 @@ export default class UavTarget { url: window.config.imagePath + image.relativePath, rectangle }) - let addLayer = this.viewer.cesiumViewer.imageryLayers.addImageryProvider(layer) + let addLayer = this.viewer.cesiumViewer.imageryLayers.addImageryProvider(layer) // 设置分屏显示 addLayer.splitDirection = DT.Cesium.ImagerySplitDirection.LEFT obj.picture = addLayer if (image.itemList) { - image.itemList.forEach( (mark, markIndex) => { + image.itemList.forEach((mark, markIndex) => { let markId = `${this.jobId}~${this.uavId}~${loader.payloadId}~${image.fileId}~${mark.id}-mark${imageIndex}${markIndex}` let markPosition = DT.Cesium.Cartesian3.fromDegrees(mark.left1Lon, mark.left1Lat, 1) let markArr = [ @@ -216,7 +217,7 @@ export default class UavTarget { // console.log('添加的图片', obj.picture) if (image.itemList) { - image.itemList.forEach( (mark, markIndex) => { + image.itemList.forEach((mark, markIndex) => { let markId = `${this.jobId}~${this.uavId}~${image.payloadId}~${image.fileId}~${mark.id}-mark${length}${markIndex}` let markPosition = DT.Cesium.Cartesian3.fromDegrees(mark.left1Lon, mark.left1Lat, 1) let markArr = [ @@ -258,7 +259,7 @@ export default class UavTarget { console.log('删除旧的') layer.readyPromise.then(res => { console.log('回调执行') - let addLayer = this.viewer.cesiumViewer.imageryLayers.addImageryProvider(layer) + let addLayer = this.viewer.cesiumViewer.imageryLayers.addImageryProvider(layer) // 设置分屏显示 addLayer.splitDirection = DT.Cesium.ImagerySplitDirection.LEFT obj.picture = addLayer @@ -285,7 +286,7 @@ export default class UavTarget { } } - toggleLoaderPictureVisible(payloadId,fileId) { + toggleLoaderPictureVisible(payloadId, fileId) { console.log('切换显隐', payloadId, fileId) if (this.loaderPicture[payloadId]) { let find = this.loaderPicture[payloadId].find(item => item.fileId + '' === fileId + '') @@ -300,7 +301,7 @@ export default class UavTarget { } } } - toggleLoaderPictureActive(payloadId,fileId, active, visible = true) { + toggleLoaderPictureActive(payloadId, fileId, active, visible = true) { if (this.loaderPicture[payloadId]) { let find = this.loaderPicture[payloadId].find(item => item.fileId + '' === fileId + '') if (find) { diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.js b/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.js index 4a45159..e053e70 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.js +++ b/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.js @@ -41,7 +41,10 @@ export default { user: { visible: false, form: { - account: '' + id: '', + account: '', + password: '', + confirmPassword: '' }, rules: { account: [ @@ -90,18 +93,31 @@ export default { }) }, addUser() { + this.user.form = { + id: '', + account: '', + password: '', + confirmPassword: '' + } this.user.visible = true }, editUser(form) { this.user.visible = true this.user.form.account = form.account + this.user.form.id = form.id }, close() { this.$refs.form.resetFields() this.user.visible = false + this.user.form = { + id: '', + account: '', + password: '', + confirmPassword: '' + } }, async submitUser() { - const valid = await this.$refs.form.validate(valid) + const valid = await this.$refs.form.validate() if (!valid) return delete this.user.form.confirmPassword const form = { ...this.user.form } diff --git a/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.vue b/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.vue index 7e6e603..f16a1d7 100644 --- a/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.vue +++ b/frontend/Skyeye-sys-ui/src/views/home/components/user-list/index.vue @@ -58,7 +58,7 @@