| | |
| | | <view class="item-title">{{item.name}}</view> |
| | | <view class="item-text">{{getTeachingSrcDst(item)}}</view> |
| | | <template v-slot:right> |
| | | <view class="btn-del" @click="clickDelTeachingMode('Public',item)">删除</view> |
| | | <view class="btn-del" @click="clickDelTeachingMode('Public',item)">{{translate("delete")}} |
| | | </view> |
| | | </template> |
| | | </uni-swipe-action-item> |
| | | <uni-swipe-action-item class="list-item" |
| | |
| | | <view class="item-title">{{item.name}}</view> |
| | | <view class="item-text">{{getTeachingSrcDst(item)}}</view> |
| | | <template v-slot:right> |
| | | <view class="btn-del" @click="clickDelTeachingMode('Stations',item)">删除</view> |
| | | <view class="btn-del" @click="clickDelTeachingMode('Stations',item)">{{translate("delete")}} |
| | | </view> |
| | | </template> |
| | | </uni-swipe-action-item> |
| | | </uni-swipe-action> |
| | |
| | | |
| | | } catch (ex) { |
| | | |
| | | showError(ex) |
| | | showError(ex, this.translate('error')) |
| | | } |
| | | }, |
| | | |
| | |
| | | this.teachingPublic = data?.Public || [] |
| | | this.teachingStation = data?.Stations || [] |
| | | } catch (ex) { |
| | | showError(ex) |
| | | showError(ex, this.translate('error')) |
| | | } |
| | | }, |
| | | clickAddTeaching() { |
| | |
| | | const list = item.pos_list || [] |
| | | let tip = "" |
| | | if (list.length > 1) { |
| | | tip = `(${Number(list[0].x).toFixed(2)},${Number(list[0].y).toFixed(2)}) (${Number(list[1].x).toFixed(2)},${Number(list[1].y).toFixed(2)})` |
| | | tip = |
| | | `(${Number(list[0].x).toFixed(2)},${Number(list[0].y).toFixed(2)}) (${Number(list[1].x).toFixed(2)},${Number(list[1].y).toFixed(2)})` |
| | | } |
| | | if (list.length == 1) { |
| | | tip = `(${Number(list[0].x).toFixed(2)},${Number(list[0].y).toFixed(2)})` |
| | |
| | | return tip |
| | | }, |
| | | clickDelTeachingMode(mode, item) { |
| | | showModal("确认删除示教", "警告",true,"确定","取消").then((res) => { |
| | | showModal({ |
| | | title: "", |
| | | content: `${this.translate('ask_deleting_teaching')}`, |
| | | confirmText: this.translate('ok'), |
| | | cancelText: this.translate('cancel'), |
| | | }).then((res) => { |
| | | if (res) { |
| | | this.deleteTeachingMode(mode, item) |
| | | } |
| | |
| | | } |
| | | |
| | | } catch (ex) { |
| | | showError(ex) |
| | | showError(ex, this.translate('error')) |
| | | } |
| | | |
| | | }, |
| | | |
| | | translate(t) { |
| | | if (typeof this.$t == "function") return this.$t(`page.${t}`) |
| | | else return t; |
| | | }, |
| | | |
| | | |
| | | } |