cuiqian2004
2025-09-19 d8743368ffda9bc0fb2c6818f695a9a6b1079e57
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, "确定")
         },
      }
   }