吉安感知网项目-前端
chenyao
2026-06-03 b4f08a561973b998036f6ffa9e843cfd5ee877be
applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue
@@ -1,6 +1,6 @@
<template>
   <el-dialog
      class="gd-dialog"
      class="gd-dialog orderManageFormDlg"
      v-model="visible"
      :title="titleEnum[dialogMode]"
      @closed="visible = false"
@@ -31,7 +31,7 @@
                  </el-col>
                  <el-col :span="12">
                     <div class="label">工单类型</div>
                     <div class="val">{{ getDictLabel(formData.workOrderType, dictObj.workOrderType) }}</div>
                     <div class="val">{{ getDictLabelXT(formData.workOrderType, workOrderTypeXT) }}</div>
                  </el-col>
                  <el-col :span="12">
                     <div class="label">执行时间范围</div>
@@ -62,7 +62,7 @@
                     <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.workOrderType) }}
                           {{ getDictLabelXT(row.patrolTaskType, workOrderTypeXT) }}
                        </template>
                     </el-table-column>
                     <el-table-column prop="taskStatus" show-overflow-tooltip label="任务状态">
@@ -102,10 +102,10 @@
                           clearable
                        >
                           <el-option
                              v-for="item in dictObj.workOrderType"
                              :key="item.dictKey"
                              :label="item.dictValue"
                              :value="item.dictKey"
                              v-for="item in workOrderTypeXT"
                              :key="item.dictValue"
                              :label="item.dictLabel"
                              :value="item.dictValue"
                           />
                        </el-select>
                     </el-form-item>
@@ -156,7 +156,7 @@
                  </el-col>
               </el-row>
            </el-form>
            <div class="detail-title" :style="{ marginTop: pxToRem(20) }">
            <div class="detail-title" :style="{ marginTop: pxToRem(10) }">
               <span class="required-star" v-if="!dialogReadonly">*</span>
               工单执行范围
            </div>
@@ -195,7 +195,7 @@
         </div>
      </div>
      <template #footer v-if="activeName === 'basic'">
      <template #footer v-if="activeName === 'basic' && detailLoaded">
         <el-button v-if="['11', '21', '23', '31', '60'].includes(gdStatus)" @click="viewDescription" color="#F2F3F5">
            {{ gdStatusObj[gdStatus]?.reason }}
         </el-button>
@@ -262,9 +262,9 @@
</template>
<script setup>
import { computed, ref, nextTick } from 'vue'
import { computed, ref, nextTick, inject } from 'vue'
import { ElMessage } from 'element-plus'
import { dateRangeFormat, fieldRules, flyVisual, geomAnalysis, getDictLabel } from '@ztzf/utils'
import { dateRangeFormat, fieldRules, flyVisual, geomAnalysis, getDictLabel, getDictLabelXT } from '@ztzf/utils'
import {
   gdWorkOrderDetailApi,
   gdWorkOrderFlowListApi,
@@ -286,6 +286,7 @@
import { useStore } from 'vuex'
import OrderStepBar from '@/views/orderView/orderManage/orderManage/OrderStepBar.vue'
import OutcomeData from './outcomeData.vue'
import { getDictListApi } from '@/api/zkxt'
const store = useStore()
const permission = computed(() => store.state.user.permission)
const activeName = ref('basic')
@@ -305,6 +306,7 @@
const mapRef = ref(null)
const rejectVisible = ref(false)
const dictObj = inject('dictObj')
const workOrderTypeXT = inject('workOrderTypeXT', ref([]))
const dateRange = ref([])
const patrolTaskList = ref([])
const emit = defineEmits(['success'])
@@ -313,6 +315,7 @@
const visible = defineModel() // 弹框显隐
const dialogMode = ref('add') // 弹框模式
const submitting = ref(false) // 提交中
const detailLoaded = ref(false) // 详情加载完成
const dialogReadonly = computed(() => dialogMode.value === 'view')
const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' })
const deviceList = ref([]) // 设备列表
@@ -631,6 +634,7 @@
// 打开弹框
async function open({ mode = 'add', row } = {}) {
   detailLoaded.value = false
   dialogMode.value = mode
   getPayloadList()
   initMap()
@@ -645,6 +649,7 @@
      hasPatrolTaskList.value && gdPatrolTaskPage()
      dialogMode.value === 'edit' ? editPolygon() : viewPolygon()
   }
   detailLoaded.value = true
   await nextTick()
   await getDeviceList()
@@ -691,7 +696,20 @@
defineExpose({ open })
</script>
<style lang="scss" scoped>
<style lang="scss">
.orderManageFormDlg{
      .el-dialog__body{
         display: flex;
         flex-direction: column;
         .content{
            height: 0;
            flex: 1;
         }
      }
}
</style>
<style scoped lang="scss">
.separateTable {
   height: 0;
   flex: 1;
@@ -704,10 +722,12 @@
      }
   }
}
.content {
   display: flex;
   gap: 0 20px;
   height: 630px;
   //height: 630px;
   .leftBox {
      width: 0;
@@ -718,10 +738,9 @@
      .gd-cesium {
         position: relative;
         overflow: hidden;
         //overflow: hidden;
         width: 100%;
         min-height: 360px;
         flex: 1;
         height: 390px;
      }
   }