cyy
2025-09-28 fb026e6052b4d843d327312db398cf791ac57ab9
pages/task/update.vue
@@ -6,8 +6,8 @@
            <text class="uni-nav-bar-text">{{navigationBarTitle }}</text>
         </view>
         <template v-slot:right>
            <view class="uni-navbar-btn-text">
               <a @click="clickSave" class="uni-nav-bar-right-text">
            <view class="uni-navbar-btn-text" @click="clickSave">
               <a class="uni-nav-bar-right-text">
                  保存
               </a>
            </view>
@@ -64,13 +64,15 @@
                     <a @click.stop="(e)=>{ clickPathwayPoint(e,index,'actionType')}">
                        {{actionTypeText(item.actionType)}}
                     </a>
                     <view v-if="item.actionType === 3">
                     <template class="time" v-if="item.actionType === 3">
                        <a @click.stop="()=>{item.wait = 0}" v-if="item.wait===undefined">
                           等待时间
                        </a>
                        <view v-else class="time"> <input class="input" type="number" v-model="item.wait"
                              :maxlength="4" />秒</view>
                     </view>
                        <input v-else class="input" type="number" v-model="item.wait" :maxlength="4" />
                     </template>
                     <span v-if="item.actionType === 3 && item.wait!==undefined">
                        秒
                     </span>
                  </view>
               </view>
            </view>
@@ -179,13 +181,12 @@
            }
            this.info = info
            let list = info.taskList || []
            for (let i = 0; i < list.length; i++) {
               const item = list[i]
               this.pathwayList.push({
                  actionType: item.actionType,
                  dest: item.dest || {},
                  wait: parseInt(item.wait) || 0,
                  wait:  parseInt(item.wait) || 0,
                  taskID: item.taskID,
                  taskStartTimeStamp: item.taskStartTimeStamp,
               })
@@ -246,7 +247,7 @@
                  return
               }
               uni.showLoading({
                  title:"任务更新中"
                  title: "任务更新中"
               })
               const task = {
                  taskGroupID: this.form.taskGroupID,
@@ -262,12 +263,13 @@
                  const item2 = this.info.taskList[i]
                  const item = this.pathwayList[i]
                  let flag = false
                  if (item?.actionType != item2.actionType) {
                     flag = true
                  } else if (item?.dest?.stationID != item2.dest?.stationID) {
                     flag = true
                  } else {
                     if (item?.actionType == 1) {
                     if (item?.actionType == 3) {
                        if (item?.wait != item2.wait) {
                           flag = true
                        }
@@ -304,8 +306,7 @@
               })
            } catch (ex) {
               showError(ex)
            }
            finally {
            } finally {
               uni.hideLoading()
            }
         },
@@ -342,7 +343,7 @@
            if (flag) {
               showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?",true,"确定","取消").then((res) => {
               showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?", true, "确定", "取消").then((res) => {
                  if (res) {
                     uni.navigateBack({
                        delta: 1, //返回层数,2则上上页
@@ -599,6 +600,7 @@
            padding: 20rpx 10rpx;
            display: flex;
            flex-direction: row;
            align-items: center;
            .right {
               flex: 1;
@@ -607,9 +609,6 @@
               padding-right: 5px;
            }
            .right-input {
               text-align: right;
               flex: 1;
@@ -629,15 +628,11 @@
               margin-left: 20rpx;
            }
            .time {
               display: flex;
               flex-direction: row;
               margin-left: 20rpx;
               .input {
                  width: 75rpx;
               }
            }
                           margin-left: 20rpx;
                           width: 75rpx;
                           margin-right: 10rpx;
                        }
         }
         .btn-del {