From 740c606022e8370d4576452e73ffbae36c8b303d Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 24 八月 2025 13:49:47 +0800
Subject: [PATCH] 导出工控网不勾选禁用按钮
---
src/views/flowmgr/exceptiontask.vue | 85 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 79 insertions(+), 6 deletions(-)
diff --git a/src/views/flowmgr/exceptiontask.vue b/src/views/flowmgr/exceptiontask.vue
index cf335f8..a19618a 100644
--- a/src/views/flowmgr/exceptiontask.vue
+++ b/src/views/flowmgr/exceptiontask.vue
@@ -10,9 +10,9 @@
@search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
@size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @selection-change="selectionChange">
<template #menu-left>
- <!--
- <el-button type="primary" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button>
- -->
+
+ <el-button type="primary" :disabled="this.selection.length==0" plain @click="handleDelBatch">鎵归噺鍒犻櫎</el-button>
+
</template>
<template #menu="scope">
<el-button type="primary" text size="default"
@@ -99,6 +99,39 @@
label: '鍋忕鍗曞彿',
prop: 'deviation'
},
+ {
+ label: '寮傚父绫诲瀷',
+ prop: 'status',
+ width:85,
+ render: ({ row }) => {
+ let txt = '';
+ switch(row.status){
+ case 3:
+ txt = '閲嶅娲惧伐'
+ break;
+ case 4:
+ txt = '楠岃瘉澶辫触'
+ break;
+ case 5:
+ txt = '5锛氬惎鍔ㄥ紓甯�'
+ break;
+ default:
+ txt = '';
+ }
+
+ return txt;
+ /*
+ 3:閲嶅娲惧伐;4锛岄獙璇佸け璐�,5锛氬惎鍔ㄥ紓甯�
+ return h('p',
+ {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.title)
+ */
+ },
+ },
+
{
label: '鍒涘缓鏃堕棿',
prop: 'createTime',
@@ -111,13 +144,15 @@
hide: false,
}
],
- selectedList: [],
- }
+ selection: [],
+ },
+
+ selection: [],
}
},
methods: {
selectionChange (list) {
- this.selectedList = list;
+ this.selection = list;
},
handleStart(row,index) {
@@ -189,6 +224,44 @@
// this.$message.info('宸插彇娑堟搷浣�');
});
},
+ handleDelBatch() {
+ //console.log(this.selection);
+ var ids = this.selection.map(row => row.id).join();
+ //console.log("ids",ids)
+
+ this.$confirm('纭畾瑕佸垹闄ゅ悧锛�', '', {
+ confirmButtonText: this.$t('submitText'),
+ cancelButtonText: this.$t('cancelText'),
+ type: 'warning',
+ }).then(() => {
+ this.loading = true;
+ axios({
+ url: '/blade-mdm/flow/task/remove',
+ method: 'post',
+ params: {ids: ids},
+ }).then(
+ res => {
+ this.loading = false;
+ if(res.data.code == 200){
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!',
+ });
+ }else{
+ this.$message.error('鎿嶄綔澶辫触!');
+ }
+ this.onLoad(this.page,this.query);
+
+ },
+ error => {
+ this.loading = false;
+ }
+ );
+ }).catch(() => {
+ // this.$message.info('宸插彇娑堟搷浣�');
+ });
+
+ },
searchChange(params, done) {
let data = {}
this.query = params;
--
Gitblit v1.9.3