Merge branch 'feature/v5.0/5.0.5' into feature/v6.0/6.0.1
| | |
| | | # 算法仓库图片地址 |
| | | VITE_APP_PICTURE_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket |
| | | |
| | | # 行政区划存放地址 |
| | | VITE_APP_REGION_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_region |
| | | # 是否在打包时开启压缩,支持 gzip 和 brotli |
| | | VITE_BUILD_COMPRESS = gzip |
| | | |
| | |
| | | } |
| | | |
| | | // 注销 |
| | | export const deviceOffline = (dockSn) => { |
| | | export const deviceOffline = (dockSn, deleteFlag) => { |
| | | return request({ |
| | | url: `/drone-device-core/manage/api/v1/devices/deviceOffline?dockSn=${dockSn}`, |
| | | url: `/drone-device-core/manage/api/v1/devices/deviceOffline?dockSn=${dockSn}&deleteFlag=${deleteFlag}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | speed: 5 |
| | | }) |
| | | |
| | | let arrowLineMaterialPropertyOrange = new ArrowLineMaterialProperty({ |
| | | color: new Cesium.Color(255 / 255, 185 / 255, 58 / 255, 1), |
| | | directionColor: new Cesium.Color(1, 1, 1, 1), |
| | | outlineColor: new Cesium.Color(1, 1, 1, 1), |
| | | outlineWidth: 0, |
| | | speed: 5, |
| | | }) |
| | | |
| | | let arrowLineMaterialPropertyGreen = new ArrowLineMaterialProperty({ |
| | | color: new Cesium.Color(6 / 255, 217 / 255, 87 / 255, 1), |
| | | directionColor: new Cesium.Color(1, 1, 1, 1), |
| | | outlineColor: new Cesium.Color(1, 1, 1, 1), |
| | | outlineWidth: 0, |
| | | speed: 5, |
| | | }) |
| | | |
| | | // 记录index |
| | | let indexLog = 0 |
| | | // 颜色 |
| | | function getLineColor(lineNumber) { |
| | | // 颜色顺序: 蓝(0), 黄(1), 绿(2) |
| | | const colors = [arrowLineMaterialProperty, arrowLineMaterialPropertyOrange, arrowLineMaterialPropertyGreen] |
| | | // 计算颜色索引 (从0开始) |
| | | const colorIndex = (lineNumber - 1) % 3 |
| | | // 返回对应颜色 |
| | | return colors[colorIndex] |
| | | } |
| | | |
| | | let runningLineMaterial = new LineTrailMaterial({ |
| | | color: Cesium.Color.fromCssColorString('#1FFF69'), |
| | | opacity: 1, |
| | |
| | | * @param {*} viewer |
| | | */ |
| | | initCreateRoute (viewer) { |
| | | indexLog = 0 |
| | | this.viewer = viewer |
| | | } |
| | | |
| | |
| | | */ |
| | | async drawPointRoute (lineObj, missionConfig, dronePosition, data, startPoint, isShowDock, isShowPointBillboard, wayline_type) { |
| | | const { positionArray, filePositions } = this.disposeData(lineObj, missionConfig, dronePosition, data, startPoint, wayline_type) |
| | | |
| | | |
| | | const droneTransformPosition = Cesium.Cartesian3.fromDegrees( |
| | | Number(dronePosition.longitude), |
| | | Number(dronePosition.latitude), |
| | |
| | | |
| | | // 路径线 |
| | | let polyline |
| | | |
| | | |
| | | if (this.type === 'clusterScheduling') { |
| | | filePositions.forEach((item, index) => { |
| | |
| | | polyline: { |
| | | width: 4, |
| | | positions: positionArray, |
| | | material: arrowLineMaterialProperty, |
| | | material: getLineColor(indexLog), |
| | | clampToGround: false, |
| | | }, |
| | | |
| | |
| | | * @returns {} {positionArray: 带拼接点位置, filePositions:光航线点位置} |
| | | */ |
| | | disposeData (lineObj, missionConfig, dronePosition, data, startPoint, wayline_type) { |
| | | indexLog = indexLog + 1 |
| | | const { device_sn } = data |
| | | |
| | | const executeHeightMode = lineObj.executeHeightMode === "WGS84" |
| | |
| | | label: '设备类型', |
| | | editDisplay: false, |
| | | prop: 'type', |
| | | type: 'radio', |
| | | labelWidth: 130, |
| | | value: 0, |
| | | type: 'select', |
| | | dicData: [ |
| | | { |
| | | label: '机场', |
| | | label: '机巢', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '遥控器', |
| | | label: '控制器', |
| | | value: 1 |
| | | } |
| | | ], |
| | |
| | | { |
| | | label: '设备描述', // '工作空间描述', |
| | | prop: 'workspace_desc', |
| | | type: 'textarea', |
| | | labelWidth: 130, |
| | | searchSpan: 4, |
| | | overHidden: true, |
| | | minRows: 3, |
| | | maxRows: 5, |
| | | maxlength: 250, |
| | | span: 24, |
| | | showWordLimit: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入设备描述', |
| | | message: '请输入设备描述不能超过250个字', |
| | | trigger: 'blur', |
| | | }, |
| | | { |
| | | max: 30, |
| | | message: '设备描述不能超过30个字', |
| | | max: 250, |
| | | message: '设备描述不能超过250个字', |
| | | trigger: 'blur', |
| | | }, |
| | | // 如果需要更严格的校验(如中文字符计算),可以使用 validator |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (value && value.length > 30) { |
| | | callback(new Error('设备描述不能超过30个字')); |
| | | if (value && value.length > 250) { |
| | | callback(new Error('设备描述不能超过250个字')); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | </template> |
| | | <template #menu="scope"> |
| | | <el-dropdown> |
| | | <el-button type="primary" text icon="el-icon-folder-opened" v-if="permission.oss_set">更 多</el-button> |
| | | <el-button type="primary" text v-if="permission.oss_set"><el-icon><MoreFilled /></el-icon>更多</el-button> |
| | | <template #dropdown v-if="scope.row.domain == 3"> |
| | | <el-dropdown-menu teleported> |
| | | <el-dropdown-item command="a"> |
| | |
| | | <el-dropdown-item command="d"><el-button type="primary" text icon="el-icon-collection" v-if="permission.fly_device_offline" |
| | | @click.stop="rollFirmware(scope.row)">固件版本管理</el-button> |
| | | </el-dropdown-item> |
| | | <el-dropdown-item command="d"> |
| | | <el-button type="primary" text icon="el-icon-collection" v-if="!scope.row.status" @click.stop="dockNotLine(scope.row)"> |
| | | {{ scope.row.hidden_flag == 1 ? '设备上线' : '设备下线'}} |
| | | <el-dropdown-item command="d" v-if="!scope.row.status"> |
| | | <el-button type="primary" text icon="el-icon-collection" @click.stop="dockNotLine(scope.row)"> |
| | | {{ scope.row.hidden_flag === 1 ? '设备上线' : '设备下线'}} |
| | | </el-button> |
| | | </el-dropdown-item> |
| | | <el-dropdown-item command="e"><el-button type="primary" text icon="el-icon-document-delete" v-if="permission.fly_device_offline" |
| | |
| | | </template> |
| | | <template #dropdown v-else> |
| | | <el-dropdown-menu teleported> |
| | | <el-dropdown-item command="a"> |
| | | <!-- <el-dropdown-item command="a"> |
| | | <el-button type="primary" text icon="el-icon-circle-close" @click.stop="rowDel(scope.row, scope.index)">删除</el-button> |
| | | </el-dropdown-item> |
| | | <el-dropdown-item command="a"> |
| | | </el-dropdown-item> --> |
| | | <!-- <el-dropdown-item command="a"> |
| | | <el-button type="primary" text icon="el-icon-key" v-if="permission.operate_password_set" @click.stop="handleOperatePassword(scope.row, scope.index)">操控密码设置</el-button> |
| | | </el-dropdown-item> --> |
| | | <el-dropdown-item command="d"><el-button type="primary" text icon="el-icon-collection" @click.stop="rollFirmware(scope.row)">固件版本管理</el-button> |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </template> |
| | | |
| | | |
| | | <!-- 添加行政区划显示模板 --> |
| | | <template #area_code="{ row }"> |
| | | <span>{{ row.area_name }}</span> |
| | |
| | | |
| | | <el-dialog title="操控密码查看" append-to-body v-model="operatePasswordViewBox" width="455px"> |
| | | <el-input v-model="operate_password" disabled></el-input> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="注销" class="zx-cancel" append-to-body v-model="cancenOperate" width="460px"> |
| | | <div style="display: flex;justify-content: center;margin-bottom: 10px;">注销 |
| | | <span style="color:cornflowerblue;font-weight: bolder;margin: 0px 4px;"> |
| | | {{ cancelSNName }} |
| | | </span> 设备可能会影响相关数据,确认注销吗?</div> |
| | | <div style="display: flex;justify-content: center;color:red;font-size: 12px;">*删除相关图片、视频、事件</div> |
| | | <template #footer> |
| | | <span class="dialog-footer" style="display: flex;justify-content: center;"> |
| | | <el-button @click="cancenOperate = false">取 消</el-button> |
| | | <el-button type="primary" @click="cancenOperateDo">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="固件升级" append-to-body v-model="firmwareBox" width="455px"> |
| | |
| | | } |
| | | } |
| | | return { |
| | | treeResolveMap: new Map(), |
| | | rules: { |
| | | password: [{ required: true, validator: validatePass, trigger: 'blur' }], |
| | | password2: [{ required: true, validator: validatePass2, trigger: 'blur' }], |
| | | }, |
| | | cancelSNName: '', |
| | | cancenOperate: false, |
| | | cancenOperateRow: {}, |
| | | deleteFlag: false, |
| | | passwordForm: { |
| | | id: '', |
| | | password: '', |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | |
| | | // { |
| | | // label: '设备位置', |
| | | // prop: 'address', |
| | |
| | | endPlaceholder: '保险结束日期', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | required: false, |
| | | message: '请选择保险有效期', |
| | | trigger: 'blur', |
| | | }, |
| | |
| | | // }, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | label: '在线时间', |
| | |
| | | }, |
| | | }, |
| | | destroyed () { |
| | | this.treeResolveMap.clear() |
| | | this.websocketMap.forEach((k, v) => { |
| | | if (null != v) { |
| | | v.close() |
| | |
| | | this.operateTitle = row.nickname + ' - ' + row.device_sn |
| | | }, |
| | | |
| | | // 设备下线 |
| | | // 设备注销 |
| | | handleDeviceOffline (row) { |
| | | ElMessageBox.confirm('确定注销该设备吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | deviceOffline(row.device_sn) |
| | | .then(res => { |
| | | ElMessage.success('注销成功') |
| | | this.cancenOperate = true |
| | | this.cancelSNName = row.nickname |
| | | this.cancenOperateRow = row |
| | | |
| | | }, |
| | | |
| | | this.init() |
| | | }) |
| | | .catch(error => { |
| | | ElMessage.error('注销失败') |
| | | }) |
| | | }) |
| | | .catch(() => { }) |
| | | cancenOperateDo () { |
| | | this.cancenOperate = false |
| | | this.deleteFlag = false |
| | | deviceOffline(this.cancenOperateRow.device_sn, this.deleteFlag).then(res => { |
| | | ElMessage.success('注销成功') |
| | | |
| | | this.init() |
| | | }).catch(error => { |
| | | ElMessage.error('注销失败') |
| | | }) |
| | | }, |
| | | |
| | | // 打开存储对象配置页面 |
| | |
| | | }) |
| | | .then(() => { |
| | | let hidden_flag = row.hidden_flag === 1?0:1 |
| | | devicesUpdate({id:row.id, hidden_flag:hidden_flag}) |
| | | devicesUpdate({id:row.id, hiddenFlag:hidden_flag}) |
| | | .then(res => { |
| | | ElMessage.success('下线成功') |
| | | ElMessage.success(`${txt}成功`) |
| | | this.init() |
| | | }) |
| | | .catch(error => { |
| | |
| | | |
| | | update(submitData).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | if (row.domain === 0) { |
| | | // 获取保存的 resolve 函数 |
| | | const resolve = this.treeResolveMap.get(row.device_sn) |
| | | if (resolve) { |
| | | // 重新加载子节点数据 |
| | | var params = { |
| | | childSn: row.device_sn, |
| | | } |
| | | getList(1, 10, params).then(res => { |
| | | const data = res.data.data.records |
| | | data.forEach(e => { |
| | | e.duration_of_insurance = [e.insure_start_time || '', e.insure_expired_time || ''] |
| | | }) |
| | | resolve(data) |
| | | }) |
| | | } |
| | | } else { |
| | | this.onLoad(this.page) |
| | | } |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | |
| | | }) |
| | | }, |
| | | treeLoad (tree, treeNode, resolve) { |
| | | // 保存resolve |
| | | this.treeResolveMap.set(tree.child_sn, resolve) |
| | | var params = { |
| | | childSn: tree.child_sn, |
| | | } |
| | |
| | | right: 0; |
| | | } |
| | | |
| | | :deep(.avue-crud__pagination) { |
| | | position: fixed; |
| | | bottom: 10px; |
| | | right: 30px; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | const jobId = ref('') |
| | | const handleDetail = row => { |
| | | if (!row.device_sns.length) return ElMessage.warning('没有device_sns') |
| | | // if (row.device_sns.length !== 1) return ElMessage.success('即将跳转到集群调度') |
| | | rowData.value = row ? row : {} |
| | | if (row.device_sns.length > 1 && (row.status === 2 || row.status === 1)) { |
| | | const adminUrl = `${import.meta.env.VITE_APP_AREA_NAME}/command-center-dashboard/#/clusterScheduling` |
| | |
| | | </basic-container> |
| | | </template> |
| | | <script setup> |
| | | import {findAreaName} from '@/utils/areaUtils' |
| | | import { findAreaName } from '@/utils/areaUtils'; |
| | | import { |
| | | spotManagementTableApi, |
| | | searchManagementApi, |
| | |
| | | border: true, |
| | | index: true, |
| | | indexLabel: '序号', |
| | | indexWidth: 60, |
| | | indexWidth: 60, |
| | | selection: true, |
| | | grid: false, |
| | | menuWidth: 240, |
| | |
| | | data.value = d.records.map(i => ({ |
| | | ...i, |
| | | dataFrom: i.date_from === 0 ? '本地上传' : '国土调查云', |
| | | areaName: findAreaName(i.area_code, regionalData.value, true) |
| | | areaName: findAreaName(i.area_code, regionalData.value, true), |
| | | })); |
| | | loading.value = false; |
| | | selectionClear(); |
| | |
| | | }; |
| | | // 图斑上传 |
| | | const uploadFlightFile = (file, t) => { |
| | | loading.value = true |
| | | loading.value = true; |
| | | const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1); |
| | | if (!['kmz', 'kml', 'zip'].includes(fileSuffix)) { |
| | | return ElMessage.error('请上传zip/kmz/kml格式的文件'); |
| | | } |
| | | |
| | | if (file) { |
| | | box.value = false; |
| | | } |
| | | let data = new FormData(); |
| | | let type = t === '3' ? '' : t; |
| | | const params = { |
| | |
| | | |
| | | ElMessage.success('上传成功'); |
| | | |
| | | box.value = false; |
| | | |
| | | loading.value = false; |
| | | ruleForm.name = ''; |
| | | ruleForm.region = ''; |
| | | |
| | | if (ruleFormRef.value) { |
| | | ruleFormRef.value.resetFields(); |
| | | } |
| | | loading.value = true |
| | | |
| | | searchReset(); |
| | | }); |
| | | }; |