| | |
| | | :style="{ width: pxToRem(1216) }" |
| | | destroy-on-close |
| | | > |
| | | <div style="display: flex"> |
| | | <div class="content" style="display: flex"> |
| | | <div class="leftBox"> |
| | | <div class="detail-container" v-if="dialogReadonly"> |
| | | <el-row> |
| | |
| | | <div class="val">{{ formData.remark }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table ref="deviceTableRef" :data="deviceList" row-key="id"> |
| | | <el-table-column prop="nickname" label="设备名称" /> |
| | | <el-table-column prop="deviceName" label="设备型号" /> |
| | | <el-table-column prop="devicePayload" label="设备负载" /> |
| | | </el-table> |
| | | </div> |
| | | <el-form |
| | | class="gd-dialog-form" |
| | |
| | | </el-form> |
| | | <div id="mapContainer" class="gd-cesium"></div> |
| | | </div> |
| | | <div> |
| | | <h3>推荐设备</h3> |
| | | <el-table |
| | | class="command-data-cockpit-table" |
| | | ref="deviceTableRef" |
| | | :data="deviceList" |
| | | row-key="id" |
| | | @selection-change="handleDeviceSelectionChange" |
| | | > |
| | | <div class="rightBox" v-if="!dialogReadonly"> |
| | | <div class="title">推荐设备</div> |
| | | <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="设备型号" /> |
| | |
| | | </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 |
| | | class="save-btn" |
| | |
| | | :disabled="submitting" |
| | | @click="handleSubmit" |
| | | > |
| | | 保存 |
| | | 发布 |
| | | </el-button> |
| | | <template v-if="requester"> |
| | | <el-button color="#F2F3F5">拒单原因</el-button> |
| | | <el-button color="#F2F3F5">重新发布</el-button> |
| | | </template> |
| | | <template v-else> |
| | | <el-button color="#F2F3F5">拒绝接单</el-button> |
| | | <el-button class="save-btn" color="#4C34FF" @click="acceptOrders">接单</el-button> |
| | | </template> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | import { computed, ref, onMounted, nextTick } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { dateRangeFormat, fieldRules, geomAnalysis, getDictLabel } from '@ztzf/utils' |
| | | import { gdWorkOrderDetailApi, gdWorkOrderSaveApi } from './orderManageApi' |
| | | import { gdWorkOrderDetailApi, gdWorkOrderHandleStatusApi, gdWorkOrderSaveApi } from './orderManageApi' |
| | | import { gdManageDeviceListApi, gdManageDevicePageApi } from './gdManageDeviceApi' |
| | | import { cartesian3Convert } from '@/utils/cesium/mapUtil' |
| | | import * as turf from '@turf/turf' |
| | |
| | | const submitting = ref(false) // 提交中 |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' }) |
| | | const requester = ref(true) |
| | | |
| | | const deviceList = ref([]) // 设备列表 |
| | | const selectedDevices = ref([]) // 选中的设备 |
| | |
| | | workOrderType: fieldRules(true), |
| | | executeStartTime: fieldRules(true), |
| | | deviceLoadDemand: fieldRules(true), |
| | | } |
| | | |
| | | function acceptOrders() { |
| | | gdWorkOrderHandleStatusApi({ operationType: 1, workOrderId: formData.value.id }).then(res => { |
| | | ElMessage.success('接单成功') |
| | | visible.value = false |
| | | emit('success') |
| | | }) |
| | | } |
| | | |
| | | // 获取推荐设备列表 |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .leftBox { |
| | | width: 681px; |
| | | } |
| | | #mapContainer { |
| | | width: 681px; |
| | | height: 423px; |
| | | .content { |
| | | display: flex; |
| | | gap: 0 20px; |
| | | .leftBox { |
| | | width: 0; |
| | | flex: 1; |
| | | #mapContainer { |
| | | width: 100%; |
| | | height: 423px; |
| | | } |
| | | } |
| | | .rightBox { |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 14px; |
| | | color: #272e37; |
| | | } |
| | | } |
| | | } |
| | | </style> |