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/teaching/index.vue |   38 ++++++++++++++++----------------------
 1 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/pages/teaching/index.vue b/pages/teaching/index.vue
index 924f9a3..d412b91 100644
--- a/pages/teaching/index.vue
+++ b/pages/teaching/index.vue
@@ -150,7 +150,9 @@
 <script>
 	import {
 		showToast,
-		showModal
+		showModal,
+		showError,
+		showInfo
 	} from "@/comm/utils.js"
 	import {
 		Button
@@ -284,7 +286,7 @@
 
 				} catch (ex) {
 
-					this.showError(ex)
+					showError(ex)
 				}
 			},
 			async loadAgvState() {
@@ -292,7 +294,7 @@
 					const info = await getAgvState(this.ip)
 					return info
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 					return {}
 				}
 			},
@@ -301,7 +303,7 @@
 					const info = await stations(this.ip)
 					return info.station_list || []
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 					return []
 				}
 			},
@@ -367,7 +369,7 @@
 					}
 
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 
 			},
@@ -386,7 +388,7 @@
 						this.askTeachingBiDirection(this.teachingModeCur)
 					}
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 
 			},
@@ -405,7 +407,7 @@
 					}
 
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 			},
 			async clickTeachingStart() {
@@ -433,7 +435,7 @@
 										stationTeaching.splice(curIndex, 1)
 										_this.teachingStart("Stations")
 									} catch (ex) {
-										this.showError(ex)
+										showError(ex)
 									}
 
 								} else {
@@ -452,7 +454,7 @@
 					}
 
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 			},
 			clickTeachingEnd() {
@@ -473,7 +475,7 @@
 							_this.teachingMode = await getTeachingMode(_this.ip)
 
 						} catch (ex) {
-							this.showError(ex)
+							showError(ex)
 						}
 					} else {
 						_this.teachingStatus = "save"
@@ -485,7 +487,7 @@
 
 				this.teachingStatus = "save"
 				try {} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 
 			},
@@ -637,7 +639,7 @@
 
 					}
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 			},
 			async clickNoCalibration() {
@@ -662,7 +664,7 @@
 
 					}
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 			},
 			askTeachingBiDirection(teachingMode) {
@@ -683,21 +685,13 @@
 					this.teachingMode = await getTeachingMode(this.ip)
 					this.teachingStatus = "end"
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex)
 				}
 			},
 			clickBackTeaching() {
 				this.$refs.refPopupCalibration.close()
 				this.teachingStatus = ""
 			},
-			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