From d8743368ffda9bc0fb2c6818f695a9a6b1079e57 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 19 九月 2025 18:22:15 +0800
Subject: [PATCH] laster

---
 pages/task/add.vue |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/pages/task/add.vue b/pages/task/add.vue
index a4e2980..e0dacb4 100644
--- a/pages/task/add.vue
+++ b/pages/task/add.vue
@@ -103,7 +103,9 @@
 <script>
 	import {
 		showToast,
-		showModal
+		showModal,
+		showError,
+		showInfo
 	} from "@/comm/utils.js"
 	import {
 		Button
@@ -131,6 +133,7 @@
 					taskGroupName: "",
 					cycleTime: 1,
 					taskButton: 0,
+					tasktype:1
 				},
 				pathwayList: [{}],
 				pickerView: {
@@ -203,7 +206,7 @@
 					const info = await stations(this.ip)
 					this.stationList = info.station_list || []
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 			},
 			async clickSave() {
@@ -217,6 +220,9 @@
 						showToast("鏈�鎷╀换鍔″睘鎬э紒")
 						return
 					}
+					uni.showLoading({
+						title:"浠诲姟鏂板涓�
+					})
 					const taskList = []
 					const task = {
 						taskGroupID: uuidv4(),
@@ -251,6 +257,7 @@
 						return
 					}
 					await addTask(this.ip, task)
+				
 					task.taskList = taskList
 					const eventChannel = this.getOpenerEventChannel();
 					eventChannel.emit('add_task', task);
@@ -258,7 +265,10 @@
 						delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
 					})
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
+				}
+				finally {
+					uni.hideLoading()
 				}
 			},
 			clickCancel() {
@@ -468,13 +478,7 @@
 			closeMenu() {
 				this.$refs.refPopupMenu.close()
 			},
-			showError(ex) {
-				let exStr = JSON.stringify(ex)
-				if (exStr == "{}")
-					exStr = ex
-				let tip = typeof ex.msg == "string" ? ex.msg : exStr
-				showModal(tip, "閿欒", false,"纭畾")
-			},
+
 
 		}
 	}

--
Gitblit v1.9.1