| | |
| | | <el-table-column prop="deviceName" label="设备型号" /> |
| | | <el-table-column prop="devicePayload" label="设备负载" /> |
| | | </el-table> |
| | | <template v-if="hasPatrolTaskList"> |
| | | <div class="detail-title" :style="{ marginTop: pxToRem(20) }">巡查任务名称</div> |
| | | <el-table class="setHeight" :data="patrolTaskList" row-key="id"> |
| | | <el-table-column prop="patrolTaskName" show-overflow-tooltip label="巡查任务名称" /> |
| | | <el-table-column prop="patrolTaskType" show-overflow-tooltip label="巡查任务类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.patrolTaskType, dictObj.patrolTaskType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskStatus" show-overflow-tooltip label="任务状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.taskStatus, dictObj.taskStatus) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="executeTime" show-overflow-tooltip label="任务执行时间" /> |
| | | <el-table-column prop="feishou" show-overflow-tooltip label="选择飞手" /> |
| | | <el-table-column prop="deviceId" show-overflow-tooltip label="选择设备" /> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | | <template v-slot="{ row }"> |
| | | <el-link type="primary" @click="">查看</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | </div> |
| | | <el-form |
| | | class="gd-dialog-form" |
| | |
| | | import dayjs from 'dayjs' |
| | | import RefuseOrderDialog from '@/views/orderView/orderManage/orderManage/RefuseOrderDialog.vue' |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import { gdPatrolTaskPageApi } from '@/views/orderView/orderManage/inspectionRequest/inspectionRequestApi' |
| | | |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | |
| | | const rejectVisible = ref(false) |
| | | const dictObj = inject('dictObj') |
| | | const dateRange = ref([]) |
| | | const patrolTaskList = ref([]) |
| | | const emit = defineEmits(['success']) |
| | | const formRef = ref(null) // 表单实例 |
| | | const formData = ref(initForm()) // 表单数据 |
| | |
| | | }) |
| | | } |
| | | |
| | | const hasPatrolTaskList = computed(() => ['30','40','50','60'].includes(String(formData.value.workOrderStatus))) |
| | | |
| | | function gdPatrolTaskPage() { |
| | | gdPatrolTaskPageApi({ current: 1, size: 1000, workOrderId: formData.value.id }).then(res => { |
| | | patrolTaskList.value = res.data.data.records || [] |
| | | }) |
| | | } |
| | | |
| | | // 打开弹框 |
| | | async function open({ mode = 'add', row } = {}) { |
| | | dialogMode.value = mode |
| | | formData.value = dialogMode.value === 'add' ? initForm() : row |
| | | initMap() |
| | | if (dialogMode.value !== 'add') { |
| | | await loadDetail() |
| | | } |
| | | await getDeviceList() |
| | | if (dialogMode.value === 'add') { |
| | | addPolygon() |
| | | } else if (dialogMode.value === 'edit') { |
| | | editPolygon() |
| | | } else { |
| | | viewPolygon() |
| | | await loadDetail() |
| | | hasPatrolTaskList.value && gdPatrolTaskPage() |
| | | dialogMode.value === 'edit' ? editPolygon() : viewPolygon() |
| | | } |
| | | await getDeviceList() |
| | | await nextTick() |
| | | syncSelection() |
| | | } |
| | |
| | | } |
| | | |
| | | .setHeight { |
| | | max-height: 300px; |
| | | min-height: 200px; |
| | | //max-height: 300px; |
| | | //min-height: 200px; |
| | | } |
| | | </style> |