From dea22f4759b5c8a4f79a3e93e5af1741f5e00ae4 Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期四, 26 三月 2026 19:51:02 +0800
Subject: [PATCH] 接口更新

---
 项目代码/WIDESEAWCS_Client/src/extension/taskinfo/task.js |   83 +++++++++++++++++++++++++++++++++--------
 1 files changed, 67 insertions(+), 16 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Client/src/extension/taskinfo/task.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Client/src/extension/taskinfo/task.js"
index 310b615..fb1784b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Client/src/extension/taskinfo/task.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Client/src/extension/taskinfo/task.js"
@@ -25,23 +25,74 @@
             if (nextButton) nextButton.hidden = true;
             var recoveryButton = this.buttons.find((x) => x.value == "TaskRecovery");
             if (recoveryButton) recoveryButton.hidden = true;
-
-            //鎵╁睍椤甸潰鍒濆鍖栨搷浣�
-            this.columns.push({
-                field: '鎿嶄綔',
-                title: '鎿嶄綔',
-                width: 70,
-                fixed: 'right',
-                align: 'center',
-                formatter: (row) => {
-                    return (
-                        '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅</i>'
-                    );
-                },
-                click: (row) => {
-                    this.$refs.gridBody.open(row);
+            let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel');
+            if (TaskHandCancelBtn) {
+                TaskHandCancelBtn.onClick = function () {
+                    this.$confirm("鏄惁纭鍙栨秷浠诲姟", "鎵嬪姩鍙栨秷浠诲姟璀﹀憡", {
+                        confirmButtonText: "纭畾",
+                        cancelButtonText: "鍙栨秷",
+                        type: "warning",
+                        center: true,
+                    }).then(() => {
+                        let rows = this.$refs.table.getSelected();
+                        if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+                        if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                        var param = rows[0].taskNum;
+                        this.http
+                            .post("api/Task/TaskCancel?taskNum=" + param, "鏁版嵁澶勭悊涓�...")
+                            .then((x) => {
+                                if (x.status) {
+                                    this.$Message.success('浠诲姟鍙栨秷鎴愬姛.');
+                                    this.refresh();
+                                } else {
+                                    return this.$error(x.message);
+                                }
+                            });
+                    });
                 }
-            });
+            }
+            let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted');
+            if (TaskHandCompletedBtn) {
+                TaskHandCompletedBtn.onClick = function () {
+                    this.$confirm("鏄惁纭瀹屾垚浠诲姟","鎵嬪姩浠诲姟瀹屾垚璀﹀憡",{
+                        confirmButtonText: "纭畾",
+                        cancelButtonText: "鍙栨秷",
+                        type: "warning",
+                        center: true,
+                    }).then(() => {
+                        let rows = this.$refs.table.getSelected();
+                        if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+                        if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                        var param = rows[0].taskNum;
+                        this.http
+                            .post("api/Task/TaskHandCompleted?taskNum="+param, "")
+                            .then((x) => {
+                                if (x.status) {
+                                    this.$Message.success('浠诲姟鎵嬪姩瀹屾垚');
+                                    this.refresh();
+                                } else {
+                                    return this.$error(x.message);
+                                }
+                            });
+                    });
+                }
+            }
+            //鎵╁睍椤甸潰鍒濆鍖栨搷浣�
+            // this.columns.push({
+            //     field: '鎿嶄綔',
+            //     title: '鎿嶄綔',
+            //     width: 70,
+            //     fixed: 'right',
+            //     align: 'center',
+            //     formatter: (row) => {
+            //         return (
+            //             '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅</i>'
+            //         );
+            //     },
+            //     click: (row) => {
+            //         this.$refs.gridBody.open(row);
+            //     }
+            // });
         },
         onInited() {
             //妗嗘灦鍒濆鍖栭厤缃悗

--
Gitblit v1.9.3