| | |
| | | destroy-on-close |
| | | > |
| | | <div class="content" style="display: flex"> |
| | | <div class="processBox"> |
| | | <div v-for="(item, index) in processList">{{ index }}-{{ item.flowName }}{{ item.flowDesc }}</div> |
| | | </div> |
| | | <div class="leftBox"> |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div id="mapContainer" class="gd-cesium"></div> |
| | | |
| | | <CommonCesiumMap |
| | | ref="mapRef" |
| | | class="leftMap gd-cesium" |
| | | :active="visible" |
| | | :flat-mode="false" |
| | | :terrain="true" |
| | | :layer-mode="4" |
| | | :boundary="false" |
| | | :zoomToBoundary="false" |
| | | /> |
| | | </div> |
| | | <div class="rightBox" v-if="!dialogReadonly"> |
| | | <div class="title">推荐设备</div> |
| | |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <el-button color="#F2F3F5" @click="requester = !requester">我是{{ requester ? '需求方' : '服务方' }}</el-button> |
| | | <el-button color="#F2F3F5" @click="visible = false">{{ dialogReadonly ? '关闭' : '取消' }}</el-button> |
| | | <!-- <el-button color="#F2F3F5" @click="visible = false">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>--> |
| | | <el-button |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | | v-if="!dialogReadonly && !formData.id" |
| | | v-if="(!dialogReadonly && !formData.id) || suddenlyEdit" |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | @click="handleSubmit" |
| | | > |
| | | 发布 |
| | | </el-button> |
| | | <template v-if="requester"> |
| | | <template v-if="editStatus.includes(gdStatus)"> |
| | | <template v-else> |
| | | <template v-if="requester"> |
| | | <el-button |
| | | color="#4C34FF" |
| | | class="save-btn" |
| | | color="#4C34FF" |
| | | v-if="editStatus.includes(gdStatus)" |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | @click="handleSubmit" |
| | | > |
| | | 重新发布 |
| | | 发布 |
| | | </el-button> |
| | | <el-button color="#F2F3F5" v-if="gdStatus === '11'">拒单原因</el-button> |
| | | <el-button color="#F2F3F5" @click="statusChange(3)" v-if="gdStatus === '20'">申请取消</el-button> |
| | | <el-button color="#4C34FF" @click="requestModification" v-if="gdStatus === '20'" class="save-btn"> |
| | | 申请修改 |
| | | </el-button> |
| | | </template> |
| | | <template v-if="gdStatus === '11'"> |
| | | <el-button color="#F2F3F5">拒单原因</el-button> |
| | | </template> |
| | | <template v-else-if="gdStatus === '20'"> |
| | | <el-button color="#F2F3F5" @click="statusChange(3)">申请取消</el-button> |
| | | <el-button color="#4C34FF" @click="statusChange(4)" class="save-btn">申请修改</el-button> |
| | | <template v-else> |
| | | <el-button color="#F2F3F5" v-if="gdStatus === '10'" @click="rejectOrders">拒绝接单</el-button> |
| | | <el-button color="#4C34FF" v-if="gdStatus === '10'" @click="statusChange(1)" class="save-btn">接单</el-button> |
| | | <el-button color="#F2F3F5" v-if="gdStatus === '22'" @click="statusChange(7)">同意修改</el-button> |
| | | <el-button color="#4C34FF" v-if="gdStatus === '22'" @click="statusChange(8)" class="save-btn"> |
| | | 不同意修改 |
| | | </el-button> |
| | | <el-button color="#F2F3F5" v-if="gdStatus === '21'" @click="statusChange(5)">同意取消</el-button> |
| | | <el-button color="#4C34FF" v-if="gdStatus === '21'" @click="statusChange(6)" class="save-btn"> |
| | | 不同意取消 |
| | | </el-button> |
| | | </template> |
| | | </template> |
| | | <template v-else> |
| | | <template v-if="gdStatus === '10'"> |
| | | <el-button color="#F2F3F5" @click="rejectOrders">拒绝接单</el-button> |
| | | <el-button color="#4C34FF" @click="statusChange(1)" class="save-btn">接单</el-button> |
| | | </template> |
| | | <template v-else-if="gdStatus === '22'"> |
| | | <el-button color="#F2F3F5" @click="statusChange(7)">同意修改</el-button> |
| | | <el-button color="#4C34FF" @click="statusChange(8)" class="save-btn">不同意修改</el-button> |
| | | </template> |
| | | <template v-else-if="gdStatus === '21'"> |
| | | <el-button color="#F2F3F5" @click="statusChange(5)">同意取消</el-button> |
| | | <el-button color="#4C34FF" @click="statusChange(6)" class="save-btn">不同意取消</el-button> |
| | | </template> |
| | | </template> |
| | | |
| | | </template> |
| | | |
| | | <RefuseOrderDialog |
| | |
| | | import { computed, ref, onMounted, nextTick } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { dateRangeFormat, fieldRules, geomAnalysis, getDictLabel } from '@ztzf/utils' |
| | | import { gdWorkOrderDetailApi, gdWorkOrderHandleStatusApi, gdWorkOrderSaveApi } from './orderManageApi' |
| | | import { |
| | | gdWorkOrderDetailApi, |
| | | gdWorkOrderFlowListApi, |
| | | gdWorkOrderHandleStatusApi, |
| | | gdWorkOrderSaveApi, |
| | | } from './orderManageApi' |
| | | import { gdManageDeviceListApi } from './gdManageDeviceApi' |
| | | import { cartesian3Convert } from '@/utils/cesium/mapUtil' |
| | | import * as Cesium from 'cesium' |
| | | import { DrawPolygon } from '@/utils/cesium/DrawPolygon' |
| | | import { PublicCesium } from '@/utils/cesium/publicCesium' |
| | | import { pxToRem } from '@/utils/rem' |
| | | import dayjs from 'dayjs' |
| | | import RefuseOrderDialog from '@/views/orderView/orderManage/orderManage/RefuseOrderDialog.vue' |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | |
| | | recommendDeviceIds: '', |
| | | }) |
| | | |
| | | const mapRef = ref(null) |
| | | const rejectVisible = ref(false) |
| | | const dictObj = inject('dictObj') |
| | | const dateRange = ref([]) |
| | |
| | | gdWorkOrderHandleStatusApi({ operationType: operationType, workOrderId: formData.value.id }).then(res => { |
| | | visible.value = false |
| | | emit('success') |
| | | }) |
| | | } |
| | | |
| | | const suddenlyEdit = ref(false) |
| | | function requestModification() { |
| | | suddenlyEdit.value = true |
| | | dialogMode.value = 'edit' |
| | | nextTick(() => { |
| | | syncSelection() |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | ) |
| | | |
| | | const processList = ref([]) |
| | | function loadList() { |
| | | gdWorkOrderFlowListApi({ workOrderId: formData.value.id }).then(res => { |
| | | processList.value = res.data.data |
| | | }) |
| | | } |
| | | |
| | | // 加载详情 |
| | | async function loadDetail() { |
| | | if (!formData.value.id) return |
| | | loadList() |
| | | const res = await gdWorkOrderDetailApi({ id: formData.value.id }) |
| | | formData.value = res?.data?.data ?? {} |
| | | dateRange.value = [formData.value.executeStartTime, formData.value.executeEndTime] |
| | |
| | | |
| | | // 初始化地图实例 |
| | | function initMap() { |
| | | const publicCesiumInstance = new PublicCesium({ |
| | | dom: 'mapContainer', |
| | | flatMode: false, |
| | | terrain: true, |
| | | layerMode: 4, |
| | | boundary: false, |
| | | }) |
| | | viewer = publicCesiumInstance.getViewer() |
| | | if (viewer) return |
| | | const map = mapRef.value?.getMap() |
| | | viewer = map?.viewer || null |
| | | } |
| | | |
| | | defineExpose({ open }) |
| | |
| | | .leftBox { |
| | | width: 0; |
| | | flex: 1; |
| | | #mapContainer { |
| | | .gd-cesium { |
| | | width: 100%; |
| | | height: 423px; |
| | | } |