Merge branch 'feature/v6.0/6.0.1' into prod
| | |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | export const devicesUpAndDown = (param) => { |
| | | return request({ |
| | | url: `/drone-device-core/manage/api/v1/devices/upAndDown`, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export const getDeviceRegion = params => { |
| | | return request({ |
| | | url: '/drone-device-core/manage/api/v1/devices/getDeviceRegion', |
| | | method: 'get', |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | export const getDeviceRegionByPost = data => { |
| | | export const getDeviceRegion = data => { |
| | | return request({ |
| | | url: '/drone-device-core/manage/api/v1/devices/getDeviceRegion', |
| | | method: 'post', |
| | | data, |
| | | data:{ hidden_flag:0, ...data }, |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | export const getDeviceRegion = params => { |
| | | export const getDeviceRegion = data => { |
| | | return request({ |
| | | url: '/drone-device-core/manage/api/v1/devices/getDeviceRegion', |
| | | method: 'get', |
| | | params, |
| | | method: 'post', |
| | | data:{ hidden_flag:0, ...data }, |
| | | }) |
| | | } |
| | | |
| | |
| | | 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 |
| | | } |
| | | |
| | |
| | | // 路径线 |
| | | let polyline |
| | | |
| | | |
| | | if (this.type === 'clusterScheduling') { |
| | | filePositions.forEach((item, index) => { |
| | | let position = Cesium.Cartesian3.fromDegrees(item.lng, item.lat, item.alt) |
| | |
| | | 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" |
| | |
| | | </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-input v-model="operate_password" disabled></el-input> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="注销" append-to-body v-model="cancenOperate" width="460px"> |
| | | <div style="display: flex;justify-content: end;">注销 <span style="color:cornflowerblue;">{{ cancelSNName }}</span> 设备可能会影响相关数据,确认注销吗?</div> |
| | | <div style="display: flex;justify-content: end;"> |
| | | <div><el-checkbox v-model="deleteFlag"></el-checkbox>删除相关图片、视频、事件</div> |
| | | </div> |
| | | <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> |
| | |
| | | getDeviceFirmwareList, |
| | | getDevices, |
| | | deviceOffline, |
| | | devicesUpdate |
| | | devicesUpdate, |
| | | devicesUpAndDown |
| | | } from '@/api/device/device' |
| | | import { deleteByOssId, addOrUpdate as addOrUpdateOssBind } from '@/api/device/ossBind' |
| | | import { getListPage as getOssList } from '@/api/resource/oss' |
| | |
| | | } |
| | | } |
| | | return { |
| | | treeResolveMap: new Map(), |
| | | rules: { |
| | | password: [{ required: true, validator: validatePass, trigger: 'blur' }], |
| | | password2: [{ required: true, validator: validatePass2, trigger: 'blur' }], |
| | |
| | | endPlaceholder: '保险结束日期', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | required: false, |
| | | message: '请选择保险有效期', |
| | | trigger: 'blur', |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | destroyed () { |
| | | this.treeResolveMap.clear() |
| | | this.websocketMap.forEach((k, v) => { |
| | | if (null != v) { |
| | | v.close() |
| | |
| | | }, |
| | | |
| | | cancenOperateDo () { |
| | | console.log('333') |
| | | this.cancenOperate = false |
| | | this.deleteFlag = false |
| | | deviceOffline(this.cancenOperateRow.device_sn, this.deleteFlag).then(res => { |
| | | deviceOffline(this.cancenOperateRow.device_sn, true).then(res => { |
| | | ElMessage.success('注销成功') |
| | | |
| | | this.init() |
| | |
| | | }) |
| | | .then(() => { |
| | | let hidden_flag = row.hidden_flag === 1?0:1 |
| | | devicesUpdate({id:row.id, hiddenFlag:hidden_flag}) |
| | | devicesUpAndDown({id:row.id, hiddenFlag:hidden_flag}) |
| | | .then(res => { |
| | | ElMessage.success(`${txt}成功`) |
| | | this.init() |
| | |
| | | const submitData = { |
| | | ...row, |
| | | area_code: row.area_code.split(',').pop(), |
| | | insure_start_time: row.duration_of_insurance[0], |
| | | insure_expired_time: row.duration_of_insurance[1], |
| | | insure_start_time: row.duration_of_insurance[0] || null, |
| | | insure_expired_time: row.duration_of_insurance[1] || null, |
| | | deptId: row.dept_id, |
| | | areaCode: row.area_code.split(',').pop(), |
| | | } |
| | |
| | | |
| | | update(submitData).then( |
| | | () => { |
| | | 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> |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: '授权功能', |
| | | prop: 'devicePerMenuId', |
| | | labelWidth: 130, |
| | | type: 'tree', |
| | | dicUrl: '/blade-system/manage/api/v1/devicePerMenu/selectDeviceList', |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | multiple: true, |
| | | dataType: 'string', |
| | | span: 24, |
| | | row: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入授权功能', |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: '授权功能', |
| | | // prop: 'devicePerMenuId', |
| | | // labelWidth: 130, |
| | | // type: 'tree', |
| | | // dicUrl: '/blade-system/manage/api/v1/devicePerMenu/selectDeviceList', |
| | | // props: { |
| | | // label: 'name', |
| | | // value: 'id', |
| | | // }, |
| | | // multiple: true, |
| | | // dataType: 'string', |
| | | // span: 24, |
| | | // row: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请输入授权功能', |
| | | // trigger: 'blur', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: '授权时间', |
| | | prop: 'createTime', |
| | |
| | | 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` |
| | | const targetPath = `taskNo=${encodeURIComponent(rowData.value.job_info_num)}` |
| | | window.open(`${adminUrl}?${targetPath}`, '_blank') |
| | | return |
| | | } |
| | | jobId.value = rowData.value?.job_id |
| | | if (row.status === 2 || row.status === 1) { |
| | | // isShowCurrentTaskDetails.value = true |
| | |
| | | <!-- 任务算法统计 --> |
| | | <template> |
| | | <div class="task-industry"> |
| | | <div class="title">机巢事件前五数量占比</div> |
| | | <div class="title">机巢事件数量占比</div> |
| | | <div class="chart" ref="chartRef"></div> |
| | | </div> |
| | | </template> |