| | |
| | | </a> |
| | | </view> |
| | | <view class="item" v-if="info.tasktype == 1"> |
| | | <view>循环次数:</view> |
| | | <view>重复次数:</view> |
| | | <input class="right-input" type="number" :value="info.cycleTime" :maxlength="4" |
| | | @input="onInputCycleTime" /> |
| | | </view> |
| | |
| | | <script> |
| | | import { |
| | | showToast, |
| | | showModal |
| | | showModal, |
| | | showError, |
| | | showInfo |
| | | } from "@/comm/utils.js" |
| | | import { |
| | | Button |
| | |
| | | taskGroupName: "", |
| | | cycleTime: 1, |
| | | taskButton: 0, |
| | | tasktype:1 |
| | | }, |
| | | pathwayList: [{}], |
| | | pickerView: { |
| | |
| | | const info = await stations(this.ip) |
| | | this.stationList = info.station_list || [] |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | async clickSave() { |
| | |
| | | showToast("未选择任务属性!") |
| | | return |
| | | } |
| | | uni.showLoading({ |
| | | title:"任务新增中" |
| | | }) |
| | | const taskList = [] |
| | | const task = { |
| | | taskGroupID: uuidv4(), |
| | |
| | | return |
| | | } |
| | | await addTask(this.ip, task) |
| | | |
| | | task.taskList = taskList |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit('add_task', task); |
| | |
| | | delta: 1, //返回层数,2则上上页 |
| | | }) |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | finally { |
| | | uni.hideLoading() |
| | | } |
| | | }, |
| | | clickCancel() { |
| | |
| | | } |
| | | if (flag) { |
| | | |
| | | showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?").then((res) => { |
| | | showModal(`当前编辑的内容将不会被保存`, "确定要退出编辑吗?",true,"确定","取消").then((res) => { |
| | | if (res) { |
| | | uni.navigateBack({ |
| | | delta: 1, //返回层数,2则上上页 |
| | |
| | | const item = this.pathwayList[index] |
| | | if (type == "stationID") { |
| | | |
| | | const list = this.stationLst(item.stationID) |
| | | const list = this.stationList |
| | | let index2 = 0 |
| | | if (list.length > 0) { |
| | | if (item.stationID) { |
| | |
| | | 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) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |