From c1bcfc1aa6c526e78de533d50cbe0c2f87bc8158 Mon Sep 17 00:00:00 2001
From: hmpc <hmpc>
Date: 星期一, 24 二月 2025 18:36:08 +0800
Subject: [PATCH] *

---
 src/main/webapp/views/index.html |   52 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 43 insertions(+), 9 deletions(-)

diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 78ab26d..3fe1abe 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'
@@ -465,15 +499,15 @@
                             headers: {'token': localStorage.getItem('token')},
                             method: 'POST',
                             data: {
-                                rgvId: row.rgvNo,
+                                rgvNo: row.rgvNo,
                                 status: targetStatus
                             },
                             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