From dd3e73b101fec95d7277c93d0ab75c266a22e0e4 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期一, 24 二月 2025 16:01:24 +0800
Subject: [PATCH] *
---
src/main/webapp/views/index.html | 50 ++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 78ab26d..765a86c 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -294,11 +294,18 @@
prop="rgvSts"
label="RGV鐘舵��">
</el-table-column>
-<!-- <el-table-column-->
-<!-- prop=""-->
-<!-- label="鎿嶄綔">-->
-<!-- <el-button type="primary" icon="el-icon-edit" circle></el-button>-->
-<!-- </el-table-column>-->
+ <el-table-column
+ label="鎿嶄綔"
+ type="template">
+ <template slot-scope="scope">
+ <el-button
+ type="danger"
+ size="small"
+ @click="taskDelete(scope.row)">
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
</el-table>
</div>
</div>
@@ -451,11 +458,38 @@
}
}
},
+ taskDelete(row) {
+ let that = this;
+ that.$confirm('纭瑕佸垹闄よ璁惧鍚�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ $.ajax({
+ url: baseUrl + "/rgv/disable/task/delete",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ data: {
+ wrkNo: row.wrkNo
+ },
+ success: function (res) {
+ if (res.code === 200) {
+ that.$message.success('鍒犻櫎鎴愬姛');
+ // 鍒犻櫎褰撳墠琛�
+ that.tableDataRight.splice(that.tableDataRight.indexOf(row), 1);
+ } else {
+ that.$message.error('鍒犻櫎澶辫触');
+ }
+ }
+ });
+ });
+ },
toggleStatus(index, row) {
+ let that = this;
const currentStatus = row.status;
const targetStatus = currentStatus === 0 ? 1 : 0;
- this.$confirm(`纭瑕�${currentStatus === 0 ? '绂佺敤' : '鍚敤'}璇ヨ澶囧悧?`, '鎻愮ず', {
+ that.$confirm(`纭瑕�${currentStatus === 0 ? '绂佺敤' : '鍚敤'}璇ヨ澶囧悧?`, '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
@@ -470,10 +504,10 @@
},
success: function (res) {
if (res.code === 200) {
- this.$message.success(`鐘舵�佹洿鏂版垚鍔焋);
+ that.$message.success(`鐘舵�佹洿鏂版垚鍔焋);
row.status$ = targetStatus; // 鏇存柊鍓嶇鐘舵��
} else {
- this.$message.error('鐘舵�佹洿鏂板け璐�');
+ that.$message.error('鐘舵�佹洿鏂板け璐�');
}
}
});
--
Gitblit v1.9.1