| | |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div class="content" style="display: flex"> |
| | | <div class="processBox" v-if="dialogMode !== 'add' && processList.length"> |
| | | <div class="timeline-wrapper"> |
| | | <div v-for="(stage, stageIndex) in processList" :key="stageIndex" class="stage-group"> |
| | | <!-- 大节点 Stage Node --> |
| | | <div class="stage-node"> |
| | | <div class="stage-icon" :class="{ reached: stage.reached }"> |
| | | <el-icon v-if="stage.reached"><Check /></el-icon> |
| | | <span v-else class="stage-index">{{ stageIndex + 1 }}</span> |
| | | </div> |
| | | <span class="stage-name">{{ stage.stageName }}</span> |
| | | </div> |
| | | |
| | | <!-- 小节点 Child Nodes --> |
| | | <div class="child-list" v-if="stage.child && stage.child.length"> |
| | | <template v-for="(child, childIndex) in stage.child.filter(c => c.reached)"> |
| | | <div v-if="child.reached" :key="childIndex" class="child-node"> |
| | | <div class="child-left"> |
| | | <span class="child-status">{{ child.statusName }}</span> |
| | | </div> |
| | | <div class="child-dot"></div> |
| | | <div class="child-right"> |
| | | <span class="child-operator">{{ child.operator || '-' }}</span> |
| | | <span class="child-time">{{ child.createTime || '-' }}</span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | </div> |
| | | |
| | | <!-- 连接线 --> |
| | | <div |
| | | class="connector-line" |
| | | v-if="stageIndex < processList.length - 1" |
| | | :class="{ reached: stage.reached }" |
| | | ></div> |
| | | </div> |
| | | <div class="processBox" v-if="dialogMode !== 'add'"> |
| | | <div class="detail-title">工单记录</div> |
| | | <div class="process"> |
| | | <OrderStepBar :processList="processList" /> |
| | | </div> |
| | | </div> |
| | | <div class="leftBox"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">设备需求</div> |
| | | <div class="val">{{ getDictLabel(formData.deviceLoadDemand, dictObj.deviceLoadDemand) }}</div> |
| | | <div class="val">{{ formData.deviceLoadDemand }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div class="label">工单备注</div> |
| | |
| | | <el-form-item label="执行时间" prop="executeStartTime"> |
| | | <el-date-picker |
| | | class="gd-date-picker" |
| | | popper-class="gd-date-picker-popper" |
| | | v-model="dateRange" |
| | | type="daterange" |
| | | range-separator="至" |
| | |
| | | @change="loadDemandChange" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.deviceLoadDemand" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | v-for="item in payloadList" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="工单备注" prop="remark"> |
| | | <el-input |
| | | class="gd-input" |
| | | class="gd-input-text" |
| | | type="textarea" |
| | | :rows="4" |
| | | :rows="3" |
| | | v-model="formData.remark" |
| | | placeholder="请输入" |
| | | clearable |
| | |
| | | <el-table |
| | | class="separateTable" |
| | | :empty-text=" |
| | | formData.deviceLoadDemand && pointList.length ? '暂无数据' : '请先选择设备需求并在地图上绘制工单范围' |
| | | pointList.length ? '暂无数据' : '请先在地图上绘制工单范围' |
| | | " |
| | | ref="deviceTableRef" |
| | | :data="formData.deviceLoadDemand && pointList.length ? deviceList : []" |
| | | :data="pointList.length ? deviceList : []" |
| | | row-key="id" |
| | | @selection-change="handleDeviceSelectionChange" |
| | | > |
| | |
| | | gdWorkOrderHandleStatusApi, |
| | | gdWorkOrderSaveApi, |
| | | } from './orderManageApi' |
| | | import { gdManageDeviceListApi } from './gdManageDeviceApi' |
| | | import { gdDevicePayloadListApi, gdManageDeviceListApi } from './gdManageDeviceApi' |
| | | import { cartesian3Convert } from '@/utils/cesium/mapUtil' |
| | | import * as Cesium from 'cesium' |
| | | import { DrawPolygon } from '@/utils/cesium/DrawPolygon' |
| | | import { DrawPolygon } from '@ztzf/utils' |
| | | import { pxToRem } from '@/utils/rem' |
| | | import dayjs from 'dayjs' |
| | | import RefuseOrderDialog from '@/views/orderView/orderManage/orderManage/RefuseOrderDialog.vue' |
| | |
| | | import droneIcon from '@/assets/images/orderView/orderManage/drone.png' |
| | | import droneActiveIcon from '@/assets/images/orderView/orderManage/droneActive.png' |
| | | import { useStore } from 'vuex' |
| | | import OrderStepBar from '@/views/orderView/orderManage/orderManage/OrderStepBar.vue' |
| | | const store = useStore() |
| | | const permission = computed(() => store.state.user.permission) |
| | | |
| | |
| | | const suddenlyEdit = ref(false) |
| | | const processList = ref([]) |
| | | let viewPlane |
| | | let allDeviceList = [] |
| | | const hasPatrolTaskList = computed(() => ['30', '40', '50', '60'].includes(String(formData.value.workOrderStatus))) |
| | | |
| | | const gdStatusObj = { |
| | |
| | | workOrderName: fieldRules(true, 50), |
| | | workOrderType: fieldRules(true), |
| | | executeStartTime: fieldRules(true), |
| | | deviceLoadDemand: fieldRules(true), |
| | | } |
| | | |
| | | // 操作类型:1接单,2拒接接单,3申请取消,4申请修改, 5同意取消 |
| | |
| | | |
| | | // 新增模式绘制 |
| | | function addPolygon() { |
| | | drawPolygonExample = new DrawPolygon(viewer) |
| | | drawPolygonExample = new DrawPolygon({ deviceList: allDeviceList }) |
| | | drawPolygonExample.initHandler(viewer) |
| | | drawPolygonExample.subscribe('getPolygonPositions', drawFinished) |
| | | } |
| | |
| | | if (!formData.value?.geom) return |
| | | pointList.value = geomAnalysis(formData.value.geom) |
| | | drawPolygonExample?.destroy() |
| | | drawPolygonExample = new DrawPolygon(viewer) |
| | | drawPolygonExample = new DrawPolygon({ deviceList: allDeviceList }) |
| | | let noClosedList = _.cloneDeep(pointList.value) |
| | | noClosedList.pop() |
| | | drawPolygonExample.initPolygon( |
| | |
| | | viewPlane = viewer.entities?.add({ |
| | | customType: 'control_group', |
| | | position: Cesium.Cartesian3.fromDegrees(result[0], result[1]), |
| | | polygon: { |
| | | hierarchy: Cesium.Cartesian3.fromDegreesArray(result), |
| | | material: Cesium.Color.fromBytes(45, 140, 240, 99), |
| | | outline: false, |
| | | heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, |
| | | }, |
| | | polyline: { |
| | | positions: Cesium.Cartesian3.fromDegreesArray(result), |
| | | clampToGround: true, |
| | | width: 3, |
| | | material: Cesium.Color.RED, |
| | | width: 2, |
| | | material: Cesium.Color.fromBytes(45, 140, 240, 255), |
| | | }, |
| | | }) |
| | | flyVisual({ |
| | |
| | | }) |
| | | } |
| | | |
| | | // 生成圆形坐标点 |
| | | function buildCirclePositions(center, radius, segments = 120) { |
| | | const cartographic = Cesium.Cartographic.fromCartesian(center) |
| | | const positions = [] |
| | | for (let i = 0; i < segments; i++) { |
| | | const angle = (i / segments) * 2 * Math.PI |
| | | const lat = cartographic.latitude + (radius / 6378137) * Math.cos(angle) |
| | | const lon = cartographic.longitude + (radius / (6378137 * Math.cos(cartographic.latitude))) * Math.sin(angle) |
| | | positions.push(Cesium.Cartesian3.fromRadians(lon, lat)) |
| | | } |
| | | return positions |
| | | } |
| | | |
| | | // 渲染 |
| | | function renderingAllDevice(list) { |
| | | list.forEach(item => { |
| | | const position = Cesium.Cartesian3.fromDegrees(item.longitude || 115.0, item.latitude || 27.11) |
| | | if (!item.longitude || !item.latitude) return |
| | | const position = Cesium.Cartesian3.fromDegrees(item.longitude, item.latitude) |
| | | viewer.entities.add({ |
| | | position: position, |
| | | billboard: { |
| | |
| | | width: 30, |
| | | height: 30, |
| | | verticalOrigin: Cesium.VerticalOrigin.CENTER, |
| | | heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, |
| | | }, |
| | | label: { |
| | | text: item.nickname, |
| | |
| | | outlineWidth: 2, |
| | | outlineColor: Cesium.Color.WHITE, |
| | | horizontalOrigin: Cesium.HorizontalOrigin.CENTER, |
| | | heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, |
| | | verticalOrigin: Cesium.VerticalOrigin.BOTTOM, |
| | | pixelOffset: new Cesium.Cartesian2(0, -20), |
| | | }, |
| | | }) |
| | | // 覆盖范围 - 5km圆形区域 |
| | | viewer.entities.add({ |
| | | position: position, |
| | | ellipse: { |
| | | semiMajorAxis: 5000, |
| | | semiMinorAxis: 5000, |
| | | material: Cesium.Color.fromBytes(45, 140, 240, 80), |
| | | outline: false, |
| | | heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, |
| | | }, |
| | | }) |
| | | // 覆盖范围描边线 - 贴地 |
| | | const circlePositions = buildCirclePositions(position, 5000) |
| | | viewer.entities.add({ |
| | | polyline: { |
| | | positions: [...circlePositions, circlePositions[0]], |
| | | clampToGround: true, |
| | | width: 2, |
| | | material: Cesium.Color.fromBytes(45, 140, 240, 255), |
| | | }, |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | const payloadList = ref([]) |
| | | function getPayloadList() { |
| | | gdDevicePayloadListApi().then(res => { |
| | | payloadList.value = res.data.data |
| | | }) |
| | | } |
| | | |
| | | // 打开弹框 |
| | | async function open({ mode = 'add', row } = {}) { |
| | | dialogMode.value = mode |
| | | getPayloadList() |
| | | initMap() |
| | | const allDeviceRes = await gdManageDeviceListApi() |
| | | formData.value = dialogMode.value === 'add' ? initForm() : row |
| | | renderingAllDevice(allDeviceRes?.data?.data || []) |
| | | allDeviceList = allDeviceRes?.data?.data || [] |
| | | renderingAllDevice(allDeviceList) |
| | | if (dialogMode.value === 'add') { |
| | | addPolygon() |
| | | } else { |
| | |
| | | flex-direction: column; |
| | | |
| | | .gd-cesium { |
| | | position: relative; |
| | | overflow: hidden; |
| | | width: 100%; |
| | | min-height: 380px; |
| | | min-height: 360px; |
| | | flex: 1; |
| | | } |
| | | } |
| | |
| | | width: 350px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 14px; |
| | | color: #272e37; |
| | | } |
| | | |
| | | ::v-deep(.el-table) { |
| | | tr th { |
| | | font-weight: normal; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .processBox { |
| | | padding: 24px 16px; |
| | | width: 312px; |
| | | border: 1px solid #e4e4e4; |
| | | border-radius: 8px; |
| | | overflow: auto; |
| | | background: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .timeline-wrapper { |
| | | padding-left: 100px; |
| | | position: relative; |
| | | } |
| | | |
| | | .stage-group { |
| | | position: relative; |
| | | } |
| | | |
| | | // 大节点 - Stage Node |
| | | .stage-node { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | margin-bottom: 8px; |
| | | |
| | | .stage-icon { |
| | | width: 28px; |
| | | height: 28px; |
| | | border-radius: 50%; |
| | | background: #e0e0e0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #fff; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | flex-shrink: 0; |
| | | position: relative; |
| | | z-index: 2; |
| | | |
| | | &.reached { |
| | | background: #1a1a2e; |
| | | } |
| | | |
| | | .el-icon { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .stage-index { |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | |
| | | .stage-name { |
| | | width: 70px; |
| | | text-align: right; |
| | | position: absolute; |
| | | left: -80px; |
| | | font-family: Roboto, Roboto; |
| | | font-weight: bold; |
| | | font-size: 16px; |
| | | color: rgba(0,0,0,0.85); |
| | | } |
| | | } |
| | | |
| | | // 小节点 - Child Nodes |
| | | .child-list { |
| | | position: relative; |
| | | left: -52px; |
| | | } |
| | | |
| | | .child-node { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | position: relative; |
| | | |
| | | |
| | | &:last-child::before { |
| | | bottom: 50%; |
| | | } |
| | | |
| | | .child-left { |
| | | width: 100px; |
| | | flex-shrink: 0; |
| | | text-align: right; |
| | | padding-right: 20px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: rgba(0,0,0,0.85); |
| | | |
| | | .child-status { |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | |
| | | .child-dot { |
| | | width: 12px; |
| | | height: 12px; |
| | | border-radius: 50%; |
| | | background: #1a1a2e; |
| | | flex-shrink: 0; |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-top: 4px; |
| | | } |
| | | |
| | | .child-right { |
| | | flex: 1; |
| | | padding-left: 12px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 2px; |
| | | |
| | | .child-operator { |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: rgba(0,0,0,0.85); |
| | | |
| | | } |
| | | |
| | | .child-time { |
| | | white-space: nowrap; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: rgba(0,0,0,0.45); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 连接线 |
| | | .connector-line { |
| | | position: absolute; |
| | | left: 13px; |
| | | width: 2px; |
| | | .process { |
| | | height: 100%; |
| | | background: #e0e0e0; |
| | | top: 28px; |
| | | z-index: 1; |
| | | |
| | | &.reached { |
| | | background: #1a1a2e; |
| | | } |
| | | padding: 12px 16px 24px 16px; |
| | | width: 312px; |
| | | border: 1px solid #e4e4e4; |
| | | border-radius: 8px; |
| | | background: #fff; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |