| | |
| | | <script> |
| | | import { |
| | | showToast, |
| | | showModal |
| | | showModal, |
| | | showError, |
| | | showInfo |
| | | } from "@/comm/utils.js" |
| | | import { |
| | | Button |
| | |
| | | |
| | | } catch (ex) { |
| | | |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | async loadAgvState() { |
| | |
| | | const info = await getAgvState(this.ip) |
| | | return info |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | return {} |
| | | } |
| | | }, |
| | |
| | | const info = await stations(this.ip) |
| | | return info.station_list || [] |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | return [] |
| | | } |
| | | }, |
| | |
| | | } |
| | | |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | |
| | | }, |
| | |
| | | this.askTeachingBiDirection(this.teachingModeCur) |
| | | } |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | |
| | | }, |
| | |
| | | } |
| | | |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | async clickTeachingStart() { |
| | |
| | | stationTeaching.splice(curIndex, 1) |
| | | _this.teachingStart("Stations") |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | |
| | | } else { |
| | |
| | | } |
| | | |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | clickTeachingEnd() { |
| | |
| | | _this.teachingMode = await getTeachingMode(_this.ip) |
| | | |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | } else { |
| | | _this.teachingStatus = "save" |
| | |
| | | |
| | | this.teachingStatus = "save" |
| | | try {} catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | |
| | | }, |
| | |
| | | |
| | | } |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | async clickNoCalibration() { |
| | |
| | | |
| | | } |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | askTeachingBiDirection(teachingMode) { |
| | |
| | | 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, "确定") |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |