| | |
| | | </div> |
| | | <div class="rightBox" v-if="!dialogReadonly"> |
| | | <div class="detail-title">推荐设备</div> |
| | | <template v-if="formData.deviceLoadDemand && pointList.length"> |
| | | <el-table |
| | | ref="deviceTableRef" |
| | | :data="deviceList" |
| | | row-key="id" |
| | | @selection-change="handleDeviceSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" :reserve-selection="true" /> |
| | | <el-table-column prop="nickname" label="设备名称" /> |
| | | <el-table-column prop="deviceName" label="设备型号" /> |
| | | <el-table-column prop="devicePayload" label="设备负载" /> |
| | | </el-table> |
| | | </template> |
| | | <div v-else class="tipSelect">请先选择设备需求并在地图上绘制工单范围</div> |
| | | <el-table |
| | | :empty-text="(formData.deviceLoadDemand && pointList.length) ? '暂无数据' : '请先选择设备需求并在地图上绘制工单范围'" |
| | | ref="deviceTableRef" |
| | | :data="(formData.deviceLoadDemand && pointList.length) ? deviceList : []" |
| | | row-key="id" |
| | | @selection-change="handleDeviceSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" :reserve-selection="true" /> |
| | | <el-table-column prop="nickname" label="设备名称" /> |
| | | <el-table-column prop="deviceName" label="设备型号" /> |
| | | <el-table-column prop="devicePayload" label="设备负载" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <template v-if="requester"> |
| | | <template v-if="!suddenlyEdit"> |
| | | <el-button |
| | | v-if="['11', '21', '23', '24', '25', '31', '60'].includes(gdStatus)" |
| | | @click="viewDescription" |
| | | color="#F2F3F5" |
| | | > |
| | | {{ gdStatusObj[gdStatus].reason }} |
| | | </el-button> |
| | | <el-button @click="addDescription" v-if="['20', '24', '25'].includes(gdStatus)" color="#F2F3F5"> |
| | | 申请取消 |
| | | </el-button> |
| | | <el-button color="#4C34FF" @click="requestModification" v-if="['20', '25'].includes(gdStatus)"> |
| | | 申请修改 |
| | | </el-button> |
| | | </template> |
| | | <el-button |
| | | v-if="['11', '21', '23','31', '60'].includes(gdStatus)" |
| | | @click="viewDescription" |
| | | color="#F2F3F5" |
| | | > |
| | | {{ gdStatusObj[gdStatus].reason }} |
| | | </el-button> |
| | | |
| | | <template v-if="!suddenlyEdit"> |
| | | <el-button |
| | | v-if="['11'].includes(gdStatus) || suddenlyEdit || (!dialogReadonly && !formData.id)" |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | color="#4C34FF" |
| | | @click="handleSubmit" |
| | | @click="addDescription" |
| | | v-if="['20'].includes(gdStatus) && permission.order_applyCancel" |
| | | color="#F2F3F5" |
| | | > |
| | | {{ gdStatus === '11' || !gdStatus ? '发布' : '提交修改' }} |
| | | 申请取消 |
| | | </el-button> |
| | | <el-button |
| | | color="#4C34FF" |
| | | @click="requestModification" |
| | | v-if="['20'].includes(gdStatus) && permission.order_applyNegotiation" |
| | | > |
| | | 申请修改 |
| | | </el-button> |
| | | </template> |
| | | <template v-else> |
| | | <el-button v-if="['21', '23'].includes(gdStatus)" @click="viewDescription" color="#F2F3F5"> |
| | | {{ gdStatusObj[gdStatus].reason }} |
| | | </el-button> |
| | | <el-button v-if="gdStatus === '50'" @click="addDescription" color="#F2F3F5">结算</el-button> |
| | | <el-button |
| | | v-if="(['11'].includes(gdStatus) || suddenlyEdit || !formData.id) && permission.order_release" |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | color="#4C34FF" |
| | | @click="handleSubmit" |
| | | > |
| | | {{ gdStatus === '11' || !gdStatus ? '发布' : '提交修改' }} |
| | | </el-button> |
| | | <el-button v-if="gdStatus === '50' && permission.order_settlement" @click="addDescription" color="#F2F3F5"> |
| | | 结算 |
| | | </el-button> |
| | | <template v-if="permission.order_controlOrder"> |
| | | <el-button v-if="gdStatus === '10'" @click="addDescription" color="#F2F3F5">拒绝接单</el-button> |
| | | <el-button v-if="gdStatus === '10'" @click="statusChange(1)" color="#4C34FF">接单</el-button> |
| | | <el-button v-if="gdStatus === '22'" @click="addDescription" color="#F2F3F5">不同意修改</el-button> |
| | | <el-button v-if="gdStatus === '22'" @click="statusChange(7)" color="#4C34FF">同意修改</el-button> |
| | | <el-button v-if="gdStatus === '21'" @click="addDescription" color="#F2F3F5">不同意取消</el-button> |
| | | <el-button v-if="gdStatus === '21'" @click="statusChange(5)" color="#4C34FF">同意取消</el-button> |
| | | <el-button v-if="gdStatus === '30'" @click="addDescription" color="#4C34FF">协商修改</el-button> |
| | | <el-button v-if="gdStatus === '31'" @click="statusChange(10)" color="#4C34FF">同意</el-button> |
| | | </template> |
| | | <template v-if="permission.order_controlEdit"> |
| | | <el-button v-if="gdStatus === '22'" @click="statusChange(8)" color="#F2F3F5">驳回</el-button> |
| | | <el-button v-if="gdStatus === '22'" @click="statusChange(7)" color="#4C34FF">同意</el-button> |
| | | </template> |
| | | <template v-if="permission.order_controlCancel"> |
| | | <el-button v-if="gdStatus === '21'" @click="statusChange(6)" color="#F2F3F5">驳回</el-button> |
| | | <el-button v-if="gdStatus === '21'" @click="statusChange(5)" color="#4C34FF">同意</el-button> |
| | | </template> |
| | | <el-button v-if="gdStatus === '30' && permission.order_applyNegotiation" @click="addDescription" color="#4C34FF"> |
| | | 协商修改 |
| | | </el-button> |
| | | <el-button |
| | | v-if="gdStatus === '31' && permission.order_controlNegotiation" |
| | | @click="statusChange(10)" |
| | | color="#4C34FF" |
| | | > |
| | | 同意 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <RefuseOrderDialog |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, ref, onMounted, nextTick } from 'vue' |
| | | import { computed, ref, nextTick } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { dateRangeFormat, fieldRules, flyVisual, geomAnalysis, getDictLabel } from '@ztzf/utils' |
| | | import { |
| | |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import { gdPatrolTaskPageApi } from '@/views/orderView/orderManage/inspectionRequest/inspectionRequestApi' |
| | | import { Check } from '@element-plus/icons-vue' |
| | | import droneIcon from '@/assets/images/orderView/orderManage/drone.png' |
| | | import droneActiveIcon from '@/assets/images/orderView/orderManage/droneActive.png' |
| | | import { useStore } from 'vuex' |
| | | const store = useStore() |
| | | const permission = computed(() => store.state.user.permission) |
| | | |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | | workOrderName: '', |
| | |
| | | let viewer |
| | | let drawPolygonExample |
| | | let pointList = ref([]) |
| | | const requester = inject('requester') |
| | | const suddenlyEdit = ref(false) |
| | | const processList = ref([]) |
| | | let viewPlane |
| | | const hasPatrolTaskList = computed(() => ['30', '40', '50', '60'].includes(String(formData.value.workOrderStatus))) |
| | | import droneIcon from '@/assets/images/orderView/orderManage/drone.png' |
| | | import droneActiveIcon from '@/assets/images/orderView/orderManage/droneActive.png' |
| | | |
| | | const gdStatusObj = { |
| | | '10': { reason: '拒绝原因', operationType: '2' }, |
| | | '11': { reason: '拒绝原因' }, |
| | | '10': { reason: '驳回原因', operationType: '2' }, |
| | | '11': { reason: '驳回原因' }, |
| | | '20': { reason: '取消原因', operationType: '3' }, |
| | | '21': { reason: '原因', operationType: '6' }, |
| | | '22': { reason: '驳回原因', operationType: '8' }, |
| | | '23': { reason: '取消原因' }, |
| | | '24': { reason: '驳回原因', operationType: '3' }, |
| | | '25': { reason: '驳回原因', operationType: '3' }, |
| | | '30': { reason: '修改原因', operationType: '9' }, |
| | | '31': { reason: '修改原因' }, |
| | | '30': { reason: '协商修改原因', operationType: '9' }, |
| | | '31': { reason: '协商修改原因' }, |
| | | '40': { reason: '' }, |
| | | '50': { reason: '情况说明', operationType: '11' }, |
| | | '60': { reason: '情况说明' }, |
| | | } |
| | | |
| | | // 工单状态:0草稿、10发布中_接单中、11发布中_拒绝接单、20响应中_待拆分、21响应中_申请取消、22响应中_申请修改、23响应中_已取消、 |
| | | // 24响应中_拒绝取消、25响应中_拒绝修改 30执行中_待全部完成、31执行中_协商修改、40完成待验_待全部验收、50验收通过_待结算、60结算完成_已结算 |
| | | // 30执行中_待全部完成、31执行中_协商修改、40完成待验_待全部验收、50验收通过_待结算、60结算完成_已结算 |
| | | const gdStatus = computed(() => formData.value?.workOrderStatus) |
| | | |
| | | const rules = { |
| | |
| | | const image = entity.billboard?.image?._value |
| | | if ((image === droneIcon || image === droneActiveIcon) && entity.label) { |
| | | const device = deviceList.value.find(d => d.nickname === entity.label.text._value) |
| | | entity.billboard.image = device && selectedIds.includes(String(device.id)) |
| | | ? droneActiveIcon |
| | | : droneIcon |
| | | entity.billboard.image = device && selectedIds.includes(String(device.id)) ? droneActiveIcon : droneIcon |
| | | } |
| | | }) |
| | | } |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .el-table{ |
| | | height: 0; |
| | | flex: 1; |
| | | :deep(){ |
| | | .el-scrollbar__view{ |
| | | height: 100%; |
| | | } |
| | | .el-table__empty-text{ |
| | | line-height: normal; |
| | | } |
| | | } |
| | | } |
| | | .content { |
| | | display: flex; |
| | | gap: 0 20px; |
| | |
| | | |
| | | .rightBox { |
| | | width: 350px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 14px; |