cuiqian2004
4 天以前 2af5f043b60c1f7ac38ecccc8f5bf44743134325
pages/teaching/list.vue
@@ -10,7 +10,8 @@
                  <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"
@@ -20,7 +21,8 @@
                  <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>
@@ -131,7 +133,7 @@
            } catch (ex) {
               showError(ex)
               showError(ex, this.translate('error'))
            }
         },
@@ -143,7 +145,7 @@
               this.teachingPublic = data?.Public || []
               this.teachingStation = data?.Stations || []
            } catch (ex) {
               showError(ex)
               showError(ex, this.translate('error'))
            }
         },
         clickAddTeaching() {
@@ -219,7 +221,8 @@
            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)})`
@@ -227,7 +230,12 @@
            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)
               }
@@ -261,11 +269,14 @@
               }
            } catch (ex) {
               showError(ex)
               showError(ex, this.translate('error'))
            }
         },
         translate(t) {
            if (typeof this.$t == "function") return this.$t(`page.${t}`)
            else return t;
         },
      }
@@ -363,7 +374,7 @@
               .item-title {
                  font-size: 32rpx;
                  padding:  10rpx 20rpx;
                  padding: 10rpx 20rpx;
               }