cuiqian2004
2025-09-19 d8743368ffda9bc0fb2c6818f695a9a6b1079e57
pages/task/update.vue
@@ -38,7 +38,7 @@
               </a>
            </view>
            <view class="item" v-if="form.tasktype == 1">
               <view>循环次数:</view>
               <view>重复次数:</view>
               <input class="right-input" type="number" :value="form.cycleTime" :maxlength="4"
                  @input="onInputCycleTime" />
            </view>
@@ -95,7 +95,9 @@
<script>
   import {
      showToast,
      showModal
      showModal,
      showError,
      showInfo
   } from "@/comm/utils.js"
   import {
      Button
@@ -229,7 +231,7 @@
               const info = await stations(this.ip)
               this.stationList = info.station_list || []
            } catch (ex) {
               this.showError(ex)
               showError(ex)
            }
         },
         async clickSave() {
@@ -243,6 +245,9 @@
                  showToast("未选择任务属性!")
                  return
               }
               uni.showLoading({
                  title:"任务更新中"
               })
               const task = {
                  taskGroupID: this.form.taskGroupID,
                  taskGroupName: name,
@@ -298,7 +303,10 @@
                  delta: 1, //返回层数,2则上上页
               })
            } catch (ex) {
               this.showError(ex)
               showError(ex)
            }
            finally {
               uni.hideLoading()
            }
         },
         clickCancel() {
@@ -334,7 +342,7 @@
            if (flag) {
               showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?").then((res) => {
               showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?",true,"确定","取消").then((res) => {
                  if (res) {
                     uni.navigateBack({
                        delta: 1, //返回层数,2则上上页
@@ -519,7 +527,7 @@
               })
            } catch (ex) {
               this.showError(ex)
               showError(ex)
            }
         },
@@ -550,13 +558,7 @@
         closeMenu() {
            this.$refs.refPopupMenu.close()
         },
         showError(ex) {
            let exStr = JSON.stringify(ex)
            if (exStr == "{}")
               exStr = ex
            let tip = typeof ex.msg == "string" ? ex.msg : exStr
            showModal(tip, "错误", false)
         },
      }
   }