From 8838358b22c4e7a442ed4286e3ee78b5e603c20c Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 09 May 2025 10:00:33 +0800
Subject: [PATCH] 还原
---
src/views/tickets/ticket.vue | 80 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 77 insertions(+), 3 deletions(-)
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index c15b2c1..8517048 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -48,9 +48,13 @@
<el-button type="text" icon="el-icon-delete" class="danger-button"
@click="handleDelete(row)">删除</el-button>
</template>
+
<template v-else>
<el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">详情</el-button>
</template>
+
+ <el-button v-if="row.status === 4 && row.isReview !== 1" type="text" icon="el-icon-check"
+ @click="reCheck(row)">复核</el-button>
</template>
<template #status="{ row }">
<span :style="getStatusTagType(row.status) ? 'color:' + getStatusTagType(row.status) : ''">
@@ -466,13 +470,33 @@
</div>
</template>
</el-dialog>
+
+ <!-- 复核弹出层 -->
+
+ <el-dialog v-model="reCheckDialog" title="工单复核" width="30%" append-to-body custom-class="re-check-dialog"
+ @close="reCheckDialog = false">
+ <div class="dialog-footer">
+ <el-button type="primary" @click="reCheckConfirm(1)">人工复核</el-button>
+ <el-button type="primary" @click="reCheckConfirm(2)">机器复核</el-button>
+ </div>
+ </el-dialog>
</basic-container>
</template>
<script>
+import { ElMessageBox, ElLoading } from 'element-plus'
import { calculateDefaultRange } from '@/utils/util'
import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation'
-import { getList, createTicket, getTicketInfo, flowEvent, getstatusCount, getStepInfo } from '@/api/tickets/ticket'
+import {
+ getList,
+ createTicket,
+ getTicketInfo,
+ flowEvent,
+ getstatusCount,
+ getStepInfo,
+ getReviewById,
+ getCreateEventJob
+} from '@/api/tickets/ticket'
import { export_json_to_excel } from '@/utils/exportExcel'
import geoJson from '@/assets/geoJson.json'
@@ -653,6 +677,9 @@
// 配置时间选择器默认配置
datePickerDefaultVal: calculateDefaultRange(),
+
+ // 复核弹窗
+ reCheckDialog: false,
}
},
created () {
@@ -828,8 +855,6 @@
showIsReviewText () {
return (row) => {
- console.log(row, 111111)
-
if (['4', '5'].includes(String(row.status))) return row.isReview === 1 ? '是' : '否'
return '/'
@@ -2271,6 +2296,48 @@
}
return [String(lng), String(lat)]
+ },
+
+ // 复核按钮
+ reCheck (row) {
+ this.reCheckData = row
+ this.reCheckDialog = true
+ },
+
+ // 复核确认框按钮事件
+ reCheckConfirm (key) {
+ const that = this
+ if (key == 1) {
+ getReviewById(this.reCheckData.id).then(res => {
+ this.reCheckDialog = false
+ this.page.currentPage = 1
+ this.fetchTableData()
+ this.fetchTabCounts()
+ })
+ } else {
+
+ const loading = ElLoading.service({
+ lock: true,
+ text: '复核任务创建中……',
+ background: 'rgba(0, 0, 0, 0.7)',
+ })
+
+ // 获取时间的接口
+ getCreateEventJob(that.reCheckData.id).then(res => {
+ loading.close()
+
+ ElMessageBox.confirm(`预计复核执行时间为${res.data.data}`, '提示', {
+ confirmButtonText: '确定',
+ showCancelButton: false, // 关键配置
+ type: 'warning'
+ }).then(() => {
+ this.reCheckDialog = false
+ this.page.currentPage = 1
+ this.fetchTableData()
+ this.fetchTabCounts()
+ })
+ })
+ }
}
},
}
@@ -2799,6 +2866,13 @@
}
}
+.re-check-dialog {
+ :deep(.el-dialog__body) {
+ padding: 0;
+ background-color: #f5f7fa;
+ }
+}
+
.review-container {
position: relative;
--
Gitblit v1.9.3