From f2e092ab2336060347d41d2bc748a5875f8ba5c6 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 03 十二月 2024 17:35:45 +0800
Subject: [PATCH] 开发更新
---
admin/src/views/Inspection/task.vue | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/admin/src/views/Inspection/task.vue b/admin/src/views/Inspection/task.vue
index e3a57eb..b11267c 100644
--- a/admin/src/views/Inspection/task.vue
+++ b/admin/src/views/Inspection/task.vue
@@ -56,7 +56,7 @@
>
<template slot-scope="{row}">
<el-button type="text" @click="handleDetail(row)">鏌ョ湅璇︽儏</el-button>
- <el-button type="text" @click="cancelById(row)" v-permissions="['business:ywpatroltask:delete']">鍙栨秷</el-button>
+ <el-button v-if="row.status == 0" type="text" class="red" @click="cancelById(row)" v-permissions="['business:ywpatroltask:delete']">鍙栨秷</el-button>
</template>
</el-table-column>
</el-table>
@@ -77,6 +77,8 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import TaskDetail from './components/taskDetail'
+import { cancelById } from '@/api/Inspection/ywPatrolTask'
+import { Message } from 'element-ui'
export default {
name: 'YwPatrolTask',
extends: BaseTable,
@@ -105,8 +107,18 @@
this.$refs.TaskDetailRef.id = row.id
this.$refs.TaskDetailRef.getDetail()
},
- cancelById() {
-
+ cancelById(row) {
+ this.$confirm('纭畾鍙栨秷褰撳墠浠诲姟, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ cancelById(row.id).then(res => {
+ Message.success('鍙栨秷鎴愬姛')
+ this.search()
+ })
+ })
+ //
},
}
}
--
Gitblit v1.9.3