From 049b8349103e2cb7f4e8d3be7774bfc4245d9de4 Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Tue, 06 May 2025 17:10:43 +0800
Subject: [PATCH] 取消已完结状态,增加复核相关信息
---
src/views/tickets/ticket.vue | 46 +++++++++++++++++++++++++++++++++-------------
1 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 76f4ded..3d7a8a7 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -23,6 +23,9 @@
<el-option v-for="item in algorithms" :key="item.dict_key" :label="item.dict_value"
:value="item.dict_key" />
</el-select>
+ <el-select v-model="filters.isReview" placeholder="请选择复核状态" class="filter-item" clearable>
+ <el-option v-for="item in reviewStatuses" :key="item.value" :label="item.label" :value="item.value" />
+ </el-select>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
<el-button icon="el-icon-refresh" @click="handleReset">清空</el-button>
</div>
@@ -269,10 +272,10 @@
</div>
<!-- 上传图片 -->
- <div v-if="[3, 4].includes(currentDetail.status)" class="form-section" style="margin-bottom: 32px;">
+ <div v-if="[3].includes(currentDetail.status)" class="form-section" style="margin-bottom: 32px;">
<div class="section-title" v-if="hasProcessedAndOverBtnPermission()">
<!-- 已完成状态显示必填星号 -->
- <template v-if="currentDetail.status === 4 || currentDetail.status === 3">
+ <template v-if="currentDetail.status === 3">
<span class="required-label">
<span class="required-star">*</span>上传图片
</span>
@@ -381,8 +384,8 @@
</template>
<template v-else-if="currentDetail.status === 4">
<!-- 已完成 -->
- <el-button v-if="hasProcessedAndOverBtnPermission()" type="primary" :loading="finalizeLoading"
- @click="finalizeTicket">完结工单</el-button>
+ <!-- <el-button v-if="hasProcessedAndOverBtnPermission()" type="primary" :loading="finalizeLoading"
+ @click="finalizeTicket">完结工单</el-button> -->
<el-button @click="detailVisible = false">取消</el-button>
</template>
<template v-else-if="currentDetail.status === 5">
@@ -490,7 +493,7 @@
{ label: "待处理", name: "processing", value: 0, count: 0 },
{ label: "处理中", name: "inProgress", value: 3, count: 0 },
{ label: "已完成", name: "completed", value: 4, count: 0 },
- { label: "已完结", name: "closed", value: 5, count: 0 },
+ // { label: "已完结", name: "closed", value: 5, count: 0 },
{ label: "我发起的工单", name: "myTickets", value: null, count: 0 },
],
filters: {
@@ -500,6 +503,7 @@
dateRange: [],
status: "",
algorithm: "", // 新增算法筛选字段
+ isReview: "", // 添加复核状态筛选字段
},
departments: [],
types: [],
@@ -515,6 +519,10 @@
{ label: "处理中", value: "3" },
{ label: "已完成", value: "4" },
{ label: "已完结", value: "5" },
+ ],
+ reviewStatuses: [
+ { label: "未复核", value: 0 },
+ { label: "已复核", value: 1 }
],
tableData: [],
option: {
@@ -534,22 +542,31 @@
page: true,
column: [
// { label: "序号", prop: "id", width: 70 },
- { label: "工单编号", prop: "orderNumber", width: 150, overHidden: true, tooltip: true },
- { label: "工单名称", prop: "orderName", width: 170, overHidden: true, tooltip: true },
+ { label: "工单编号", prop: "orderNumber", width: 120, overHidden: true, tooltip: true },
+ { label: "工单名称", prop: "orderName", width: 150, overHidden: true, tooltip: true },
{ label: "所属单位", prop: "department", width: 100, overHidden: true, tooltip: true },
{ label: "发起时间", prop: "startTime", width: 160 },
- { label: "关联算法", prop: "aiType", width: 160, overHidden: true, tooltip: true },
- { label: "工单类型", prop: "type", width: 120, overHidden: true, tooltip: true },
+ { label: "关联算法", prop: "aiType", width: 150, overHidden: true, tooltip: true },
+ { label: "工单类型", prop: "type", width: 130, overHidden: true, tooltip: true },
{
label: "工单内容",
prop: "content",
slot: true,
- width: 190,
+ width: 152,
overHidden: true
},
{ label: "创建人", prop: "creator", width: 100 },
{ label: "处理人", prop: "handler", width: 100 },
- { label: "工单状态", prop: "status", slot: true, width: 90 }
+ {
+ label: "复核状态",
+ prop: "isReview",
+ width: 90,
+ formatter: (row) => {
+ return row.isReview === 1 ? '已复核' : '未复核'
+ }
+ },
+ { label: "工单状态", prop: "status", slot: true, width: 90 },
+
],
},
page: {
@@ -942,7 +959,7 @@
try {
const currentTab = this.tabs.find(tab => tab.name === this.activeTab)
const params = {
- work_order_type_dict_key: this.filters.type || undefined,
+ word_order_type: this.filters.type || undefined,
status: currentTab?.name === 'myTickets' ? undefined :
this.filters.status !== "" ? Number(this.filters.status) :
currentTab?.value,
@@ -957,6 +974,7 @@
is_draft: currentTab?.name === 'myTickets' ? 1 : undefined,
user_id: currentTab?.name === 'myTickets' ? this.userInfo.user_id : undefined,
+ is_review: this.filters.isReview === '' ? undefined : this.filters.isReview, // 添加复核状态查询参数
}
const response = await getList(params)
@@ -1002,6 +1020,7 @@
work_type: item.work_type !== undefined ? Number(item.work_type) : 0, // 保留work_type字段并转为数字
job_name: item.job_name || '',
job_create_time: item.job_create_time || '',
+ isReview: item.is_review, // 添加复核状态字段映射
}
})
@@ -1252,6 +1271,7 @@
dateRange: [],
status: "",
algorithm: "", // 重置时清空算法筛选
+ isReview: "", // 重置时清空复核状态
}
this.page.currentPage = 1
this.fetchTableData()
@@ -1328,7 +1348,7 @@
const steps = Array.isArray(stepResponse.data.data)
? stepResponse.data.data
: stepResponse.data.data?.steps || []
- const finishedStep = steps.find(s => String(s.status) === '5')
+ const finishedStep = steps.find(s => String(s.status) === '4')
this.totalTime = finishedStep && finishedStep.total_time ? finishedStep.total_time : ''
if (this.activeTab !== 'myTickets') {
this.stepInfos = steps.map(step => ({
--
Gitblit v1.9.3