cuiqian2004
2025-09-12 d87c256a957a6a5c3b40eaf9c52ec68f2fc22c97
pages/teaching/index.vue
@@ -379,18 +379,11 @@
                     this.calibratioStationType = "end"
                     this.$refs.refPopupCalibration.open()
                  } else {
                     this.teachingModeCur.teaching_flag = 0
                     await teachingModeFlag(this.ip, this.teachingModeCur)
                     this.teachingMode = await getTeachingMode(this.ip)
                     this.teachingStatus = "end"
                     this.askTeachingBiDirection(this.teachingModeCur)
                  }
               } else {
                  this.teachingModeCur.teaching_flag = 0
                  await teachingModeFlag(this.ip, this.teachingModeCur)
                  this.teachingMode = await getTeachingMode(this.ip)
                  this.teachingStatus = "end"
                  this.askTeachingBiDirection(this.teachingModeCur)
               }
            } catch (ex) {
               this.showError(ex)
@@ -639,10 +632,8 @@
                     list[curIndex].y = infoAgv.y
                  }
                  this.teachingStatus = "end"
                  this.teachingModeCur.teaching_flag = 0
                  await teachingModeFlag(this.ip, this.teachingModeCur)
                  this.teachingMode = await getTeachingMode(this.ip)
                  this.askTeachingBiDirection(this.teachingModeCur)
               }
            } catch (ex) {
@@ -667,11 +658,30 @@
               } else if (this.calibratioStationType == "end") {
                  this.teachingModeCur.teaching_flag = 0
                  await teachingModeFlag(this.ip, this.teachingModeCur)
                  this.teachingMode = await getTeachingMode(this.ip)
                  this.askTeachingBiDirection(this.teachingModeCur)
               }
            } catch (ex) {
               this.showError(ex)
            }
         },
         askTeachingBiDirection(teachingMode) {
            showModal("是否将当前示教路线设置为双向?", "示教结束").then((res) => {
               if (res) {
                  teachingMode.bidirection = "1"
               } else {
                  teachingMode.bidirection = "0"
               }
               teachingMode.teaching_flag = 0
               this.finishTeaching(teachingMode)
            })
         },
         async finishTeaching(teachingMode) {
            try {
               await teachingModeFlag(this.ip, teachingMode)
               this.teachingMode = await getTeachingMode(this.ip)
               this.teachingStatus = "end"
            } catch (ex) {
               this.showError(ex)
            }
@@ -685,7 +695,7 @@
            if (exStr == "{}")
               exStr = ex
            let tip = typeof ex.msg == "string" ? ex.msg : exStr
            showModal(tip, "错误", false)
            showModal(tip, "错误", false, "确定")
         },