From 08262ca5ba1dfaadd6183ab0cd86811b245e3f30 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Wed, 21 Jan 2026 10:20:24 +0800
Subject: [PATCH] feat: 生成线索

---
 applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/index.vue |   38 ++++++++++++--------------------------
 1 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/index.vue b/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/index.vue
index bb34317..3f138d5 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/index.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/index.vue
@@ -38,7 +38,12 @@
 					clearable
 					@change="handleSearch"
 				>
-					<el-option v-for="item in taskStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
+					<el-option
+						v-for="item in dictObj.taskStatus"
+						:key="item.dictKey"
+						:label="item.dictValue"
+						:value="item.dictKey"
+					/>
 				</el-select>
 			</el-form-item>
 
@@ -66,13 +71,13 @@
 			<el-button color="#F2F3F5" @click="requester = !requester">我是{{ requester ? '需求方' : '服务方' }}</el-button>
 
 			<el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增</el-button>
-<!--			<el-button :icon="Delete" color="#4C34FF" :disabled="!selectedIds.length" @click="handleDelete()">删除</el-button>-->
+			<!--			<el-button :icon="Delete" color="#4C34FF" :disabled="!selectedIds.length" @click="handleDelete()">删除</el-button>-->
 		</div>
 
 		<div class="gd-table-container" v-loading="loading">
 			<div class="gd-table-content gd-table-content-bg">
 				<el-table class="gd-table" :data="list" @selection-change="handleSelectionChange">
-<!--					<el-table-column type="selection" width="46" />-->
+					<!--					<el-table-column type="selection" width="46" />-->
 					<el-table-column type="index" width="64" label="序号" />
 					<el-table-column prop="patrolTaskName" show-overflow-tooltip label="巡查任务名称" />
 					<el-table-column prop="taskNo" show-overflow-tooltip label="巡查任务编号" />
@@ -83,7 +88,7 @@
 					</el-table-column>
 					<el-table-column prop="taskStatus" show-overflow-tooltip label="巡查任务状态">
 						<template v-slot="{ row }">
-							{{ getTaskStatusLabel(row.taskStatus) }}
+							{{ getDictLabel(row.taskStatus, dictObj.taskStatus) }}
 						</template>
 					</el-table-column>
 					<el-table-column prop="executeTime" show-overflow-tooltip label="任务执行时间" />
@@ -151,30 +156,11 @@
 	patrolTaskType: [], // 巡查任务类型
 	workOrderType: [], // 工单类型
 	deviceLoadDemand: [], // 设备负载需求
+	taskStatus: [], // 巡查任务状态
 })
 
-// 任务状态选项
-const taskStatusOptions = [
-	{ label: '待签收', value: '0' },
-	{ label: '拒绝签收', value: '1' },
-	{ label: '已撤回', value: '2' },
-	{ label: '待审核', value: '3' },
-	{ label: '审核驳回', value: '4' },
-	{ label: '审核通过', value: '5' },
-	{ label: '待验收', value: '6' },
-	{ label: '拒绝验收', value: '7' },
-	{ label: '验收通过', value: '8' },
-]
-
 provide('dictObj', dictObj)
-provide('taskStatusOptions', taskStatusOptions)
 provide('requester', requester)
-
-// 获取任务状态标签
-function getTaskStatusLabel(value) {
-	const item = taskStatusOptions.find(item => item.value === value)
-	return item ? item.label : value
-}
 
 // 获取列表
 async function getList() {
@@ -216,7 +202,7 @@
 function viewDiaLogView(row) {
 	viewDiaLogVisible.value = true
 	nextTick(() => {
-		let mode = ['1','4',].includes(row.taskStatus) && requester.value  ? 'edit' : 'view'
+		let mode = ['1', '4'].includes(row.taskStatus) && requester.value ? 'edit' : 'view'
 		viewDiaLogRef.value?.open({ mode, row })
 	})
 }
@@ -244,7 +230,7 @@
 
 // 获取字典
 function getDictList() {
-	getDictionaryByCode('patrolTaskType,workOrderType,deviceLoadDemand').then(res => {
+	getDictionaryByCode('patrolTaskType,workOrderType,deviceLoadDemand,taskStatus').then(res => {
 		dictObj.value = res.data.data
 	})
 }

--
Gitblit v1.9.3