From 3ec8d3625e6fb7614e2ec4bb02ed99a3cdf4cdb7 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 12 Feb 2026 11:28:47 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/jagzwxm/ja_web
---
applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue | 152 ++++++++++++++++++++++++++++----------------------
1 files changed, 85 insertions(+), 67 deletions(-)
diff --git a/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue b/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue
index a9e3736..7ab4e00 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue
@@ -9,23 +9,11 @@
:close-on-click-modal="false"
>
<div class="content" style="display: flex">
- <div class="processBox" v-if="dialogMode !== 'add' && processList.length">
- <el-timeline class="gd-timeline">
- <el-timeline-item
- v-for="(activity, index) in processList"
- :key="index"
- :icon="Check"
- :type="index === processList.length - 1 ? 'success' : 'info'"
- :color="activity.color"
- :hollow="activity.hollow"
- :timestamp="activity.createTime"
- >
- <div class="item-content">
- <div>{{ activity.operator }}</div>
- <div class="flowName">{{ activity.flowName }}</div>
- </div>
- </el-timeline-item>
- </el-timeline>
+ <div class="processBox" v-if="dialogMode !== 'add'">
+ <div class="detail-title">工单记录</div>
+ <div class="process">
+ <OrderStepBar :processList="processList" />
+ </div>
</div>
<div class="leftBox">
<div v-if="dialogReadonly">
@@ -48,7 +36,7 @@
</el-col>
<el-col :span="12">
<div class="label">设备需求</div>
- <div class="val">{{ getDictLabel(formData.deviceLoadDemand, dictObj.deviceLoadDemand) }}</div>
+ <div class="val">{{ formData.deviceLoadDemand }}</div>
</el-col>
<el-col :span="24">
<div class="label">工单备注</div>
@@ -57,6 +45,7 @@
</el-row>
<div class="detail-title" :style="{ marginTop: pxToRem(20) }">已选设备</div>
<el-table class="setHeight gd-dialog-table" ref="deviceTableRef" :data="deviceList" row-key="id">
+ <el-table-column type="index" label="序号" />
<el-table-column prop="nickname" label="设备名称" />
<el-table-column prop="deviceName" label="设备型号" />
<el-table-column prop="devicePayload" label="设备负载" />
@@ -67,7 +56,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.patrolTaskType) }}
+ {{ getDictLabel(row.patrolTaskType, dictObj.workOrderType) }}
</template>
</el-table-column>
<el-table-column prop="taskStatus" show-overflow-tooltip label="任务状态">
@@ -90,6 +79,7 @@
:disabled="dialogReadonly"
label-width="90px"
>
+ <div class="detail-title">工单详情</div>
<el-row>
<el-col :span="12">
<el-form-item label="工单名称" prop="workOrderName">
@@ -118,7 +108,6 @@
<el-form-item label="执行时间" prop="executeStartTime">
<el-date-picker
class="gd-date-picker"
- popper-class="gd-date-picker-popper"
v-model="dateRange"
type="daterange"
range-separator="至"
@@ -139,10 +128,10 @@
@change="loadDemandChange"
>
<el-option
- v-for="item in dictObj.deviceLoadDemand"
- :key="item.dictKey"
- :label="item.dictValue"
- :value="item.dictKey"
+ v-for="item in payloadList"
+ :key="item.name"
+ :label="item.name"
+ :value="item.name"
/>
</el-select>
</el-form-item>
@@ -150,9 +139,9 @@
<el-col :span="24">
<el-form-item label="工单备注" prop="remark">
<el-input
- class="gd-input"
+ class="gd-input-text"
type="textarea"
- :rows="4"
+ :rows="3"
v-model="formData.remark"
placeholder="请输入"
clearable
@@ -161,7 +150,10 @@
</el-col>
</el-row>
</el-form>
- <div class="detail-title" :style="{ marginTop: pxToRem(20) }">工单执行范围</div>
+ <div class="detail-title" :style="{ marginTop: pxToRem(20) }">
+ <span class="required-star" v-if="!dialogReadonly">*</span>
+ 工单执行范围
+ </div>
<CommonCesiumMap
ref="mapRef"
class="gd-cesium"
@@ -175,11 +167,17 @@
/>
</div>
<div class="rightBox" v-if="!dialogReadonly">
- <div class="detail-title">推荐设备</div>
+ <div class="detail-title">
+ <span class="required-star" v-if="!dialogReadonly">*</span>
+ 推荐设备
+ </div>
<el-table
- :empty-text="(formData.deviceLoadDemand && pointList.length) ? '暂无数据' : '请先选择设备需求并在地图上绘制工单范围'"
+ class="separateTable"
+ :empty-text="
+ pointList.length ? '暂无数据' : '请先在地图上绘制工单范围'
+ "
ref="deviceTableRef"
- :data="(formData.deviceLoadDemand && pointList.length) ? deviceList : []"
+ :data="pointList.length ? deviceList : []"
row-key="id"
@selection-change="handleDeviceSelectionChange"
>
@@ -192,12 +190,8 @@
</div>
<template #footer>
- <el-button
- v-if="['11', '21', '23','31', '60'].includes(gdStatus)"
- @click="viewDescription"
- color="#F2F3F5"
- >
- {{ gdStatusObj[gdStatus].reason }}
+ <el-button v-if="['11', '21', '23', '31', '60'].includes(gdStatus)" @click="viewDescription" color="#F2F3F5">
+ {{ gdStatusObj[gdStatus]?.reason }}
</el-button>
<template v-if="!suddenlyEdit">
@@ -211,7 +205,7 @@
<el-button
color="#4C34FF"
@click="requestModification"
- v-if="['20'].includes(gdStatus) && permission.order_applyNegotiation"
+ v-if="['20'].includes(gdStatus) && permission.order_applyEdit"
>
申请修改
</el-button>
@@ -238,7 +232,7 @@
</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>
+ <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">
协商修改
@@ -271,10 +265,10 @@
gdWorkOrderHandleStatusApi,
gdWorkOrderSaveApi,
} from './orderManageApi'
-import { gdManageDeviceListApi } from './gdManageDeviceApi'
+import { gdDevicePayloadListApi, gdManageDeviceListApi } from './gdManageDeviceApi'
import { cartesian3Convert } from '@/utils/cesium/mapUtil'
import * as Cesium from 'cesium'
-import { DrawPolygon } from '@/utils/cesium/DrawPolygon'
+import { DrawPolygon } from '@ztzf/utils'
import { pxToRem } from '@/utils/rem'
import dayjs from 'dayjs'
import RefuseOrderDialog from '@/views/orderView/orderManage/orderManage/RefuseOrderDialog.vue'
@@ -284,6 +278,7 @@
import droneIcon from '@/assets/images/orderView/orderManage/drone.png'
import droneActiveIcon from '@/assets/images/orderView/orderManage/droneActive.png'
import { useStore } from 'vuex'
+import OrderStepBar from '@/views/orderView/orderManage/orderManage/OrderStepBar.vue'
const store = useStore()
const permission = computed(() => store.state.user.permission)
@@ -325,14 +320,15 @@
const hasPatrolTaskList = computed(() => ['30', '40', '50', '60'].includes(String(formData.value.workOrderStatus)))
const gdStatusObj = {
- '10': { reason: '驳回原因', operationType: '2' },
- '11': { reason: '驳回原因' },
- '20': { reason: '取消原因', operationType: '3' },
+ '10': { reason: '拒单原因', operationType: '2', title: '拒绝接单' },
+ '11': { reason: '拒单原因' },
+ '20': { reason: '原因', operationType: '3', title: '申请取消' },
+ '21': { reason: '取消原因' },
'23': { reason: '取消原因' },
- '30': { reason: '协商修改原因', operationType: '9' },
- '31': { reason: '协商修改原因' },
+ '30': { reason: '修改原因', operationType: '9', title: '协商修改' },
+ '31': { reason: '修改原因' },
'40': { reason: '' },
- '50': { reason: '情况说明', operationType: '11' },
+ '50': { reason: '情况说明', operationType: '11', title: '结算' },
'60': { reason: '情况说明' },
}
@@ -344,7 +340,6 @@
workOrderName: fieldRules(true, 50),
workOrderType: fieldRules(true),
executeStartTime: fieldRules(true),
- deviceLoadDemand: fieldRules(true),
}
// 操作类型:1接单,2拒接接单,3申请取消,4申请修改, 5同意取消
@@ -386,6 +381,7 @@
row: formData.value,
type: gdStatusObj[gdStatus.value].operationType,
formLabel: gdStatusObj[gdStatus.value].reason,
+ title: gdStatusObj[gdStatus.value]?.title || '新增',
})
})
}
@@ -516,11 +512,17 @@
viewPlane = viewer.entities?.add({
customType: 'control_group',
position: Cesium.Cartesian3.fromDegrees(result[0], result[1]),
+ polygon: {
+ hierarchy: Cesium.Cartesian3.fromDegreesArray(result),
+ material: Cesium.Color.fromBytes(45, 140, 240, 99),
+ outline: false,
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+ },
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray(result),
clampToGround: true,
- width: 3,
- material: Cesium.Color.RED,
+ width: 2,
+ material: Cesium.Color.fromBytes(45, 140, 240, 255),
},
})
flyVisual({
@@ -551,7 +553,8 @@
// 渲染
function renderingAllDevice(list) {
list.forEach(item => {
- const position = Cesium.Cartesian3.fromDegrees(item.longitude || 115.0, item.latitude || 27.11)
+ if (!item.longitude || !item.latitude) return
+ const position = Cesium.Cartesian3.fromDegrees(item.longitude, item.latitude)
viewer.entities.add({
position: position,
billboard: {
@@ -559,6 +562,7 @@
width: 30,
height: 30,
verticalOrigin: Cesium.VerticalOrigin.CENTER,
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
},
label: {
text: item.nickname,
@@ -567,6 +571,7 @@
outlineWidth: 2,
outlineColor: Cesium.Color.WHITE,
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
pixelOffset: new Cesium.Cartesian2(0, -20),
},
@@ -574,9 +579,17 @@
})
}
+const payloadList = ref([])
+function getPayloadList() {
+ gdDevicePayloadListApi().then(res => {
+ payloadList.value = res.data.data
+ })
+}
+
// 打开弹框
async function open({ mode = 'add', row } = {}) {
dialogMode.value = mode
+ getPayloadList()
initMap()
const allDeviceRes = await gdManageDeviceListApi()
formData.value = dialogMode.value === 'add' ? initForm() : row
@@ -635,14 +648,14 @@
</script>
<style lang="scss" scoped>
-.el-table{
+.separateTable {
height: 0;
flex: 1;
- :deep(){
- .el-scrollbar__view{
+ :deep() {
+ .el-scrollbar__view {
height: 100%;
}
- .el-table__empty-text{
+ .el-table__empty-text {
line-height: normal;
}
}
@@ -660,8 +673,10 @@
flex-direction: column;
.gd-cesium {
+ position: relative;
+ overflow: hidden;
width: 100%;
- min-height: 380px;
+ min-height: 360px;
flex: 1;
}
}
@@ -678,19 +693,17 @@
}
.processBox {
- padding: 24px 0;
- width: 312px;
- border: 1px solid #e4e4e4;
- overflow: auto;
+ display: flex;
+ flex-direction: column;
- .item-content {
- position: relative;
- .flowName {
- width: 80px;
- position: absolute;
- left: -120px;
- top: 0px;
- }
+ .process {
+ height: 100%;
+ padding: 12px 16px 24px 16px;
+ width: 312px;
+ border: 1px solid #e4e4e4;
+ border-radius: 8px;
+ background: #fff;
+ overflow: auto;
}
}
}
@@ -700,4 +713,9 @@
height: 200px;
line-height: 200px;
}
+
+.required-star {
+ color: #f56c6c;
+ margin-right: 4px;
+}
</style>
--
Gitblit v1.9.3