| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | } |
| | | 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, |
| | | }) |
| | |
| | | return |
| | | } |
| | | uni.showLoading({ |
| | | title:"任务更新中" |
| | | title: "任务更新中" |
| | | }) |
| | | const task = { |
| | | taskGroupID: this.form.taskGroupID, |
| | |
| | | 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 |
| | | } |
| | |
| | | }) |
| | | } catch (ex) { |
| | | showError(ex) |
| | | } |
| | | finally { |
| | | } finally { |
| | | uni.hideLoading() |
| | | } |
| | | }, |
| | |
| | | |
| | | |
| | | if (flag) { |
| | | showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?",true,"确定","取消").then((res) => { |
| | | showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?", true, "确定", "取消").then((res) => { |
| | | if (res) { |
| | | uni.navigateBack({ |
| | | delta: 1, //返回层数,2则上上页 |
| | |
| | | padding: 20rpx 10rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | |
| | | .right { |
| | | flex: 1; |
| | |
| | | padding-right: 5px; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | .right-input { |
| | | text-align: right; |
| | | flex: 1; |
| | |
| | | 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 { |