cyy
2025-09-28 fb026e6052b4d843d327312db398cf791ac57ab9
pages/task/add.vue
@@ -65,13 +65,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>
                  <template v-slot:right>
                     <view class="btn-del" @click="clickDelPathWay(index)">删除</view>
@@ -220,6 +222,10 @@
                  showToast("未选择任务属性!")
                  return
               }
               if (!this.info.taskButton) {
                  showToast("未选择按钮号!")
                  return
               }
               uni.showLoading({
                  title:"任务新增中"
               })
@@ -234,8 +240,13 @@
               }
               const taskStartTimeStamp = `${new Date().getTime()}`
               this.pathwayList.forEach((item) => {
               for (let i in this.pathwayList) {
                  const item = this.pathwayList[i]
                  if (item.stationID) {
                     if (!item.actionType) {
                        showToast("目标点未选择操作类型!")
                        return
                     }
                     task.taskList.push({
                        stationID: item.stationID,
                        actionType: item.actionType || 0,
@@ -251,9 +262,11 @@
                     })
                  }
               })
               }
               if (taskList.length == 0) {
                  showToast("目标点未选择站台!")
                  showToast("必须添加至少一个目标点!")
                  return
               }
               await addTask(this.ip, task)
@@ -266,8 +279,7 @@
               })
            } catch (ex) {
               showError(ex)
            }
            finally {
            } finally {
               uni.hideLoading()
            }
         },
@@ -519,6 +531,7 @@
            padding: 20rpx 10rpx;
            display: flex;
            flex-direction: row;
            align-items: center;
            .right {
               flex: 1;
@@ -549,15 +562,12 @@
               margin-left: 20rpx;
            }
            .time {
               display: flex;
               flex-direction: row;
               margin-left: 20rpx;
               .input {
               margin-left: 20rpx;
               margin-right: 10rpx;
                  width: 75rpx;
               }
            }
         }
         .btn-del {