From fb026e6052b4d843d327312db398cf791ac57ab9 Mon Sep 17 00:00:00 2001
From: cyy <cuiqian2004@163.com>
Date: 星期日, 28 九月 2025 22:43:29 +0800
Subject: [PATCH] test
---
pages/task/update.vue | 61 ++++++++++++++----------------
1 files changed, 29 insertions(+), 32 deletions(-)
diff --git a/pages/task/update.vue b/pages/task/update.vue
index 421d5a9..d40a729 100644
--- a/pages/task/update.vue
+++ b/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>
@@ -95,7 +97,9 @@
<script>
import {
showToast,
- showModal
+ showModal,
+ showError,
+ showInfo
} from "@/comm/utils.js"
import {
Button
@@ -177,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,
})
@@ -229,7 +232,7 @@
const info = await stations(this.ip)
this.stationList = info.station_list || []
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
async clickSave() {
@@ -243,6 +246,9 @@
showToast("鏈�鎷╀换鍔″睘鎬э紒")
return
}
+ uni.showLoading({
+ title: "浠诲姟鏇存柊涓�
+ })
const task = {
taskGroupID: this.form.taskGroupID,
taskGroupName: name,
@@ -257,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
}
@@ -298,7 +305,9 @@
delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
})
} catch (ex) {
- this.showError(ex)
+ showError(ex)
+ } finally {
+ uni.hideLoading()
}
},
clickCancel() {
@@ -334,7 +343,7 @@
if (flag) {
- showModal(`褰撳墠缂栬緫鐨勫唴瀹瑰皢涓嶄細琚繚瀛榒, "纭畾瑕侀�鍑虹紪杈戝悧?",true,"纭畾","鍙栨秷").then((res) => {
+ showModal(`褰撳墠缂栬緫鐨勫唴瀹瑰皢涓嶄細琚繚瀛榒, "纭畾瑕侀�鍑虹紪杈戝悧?", true, "纭畾", "鍙栨秷").then((res) => {
if (res) {
uni.navigateBack({
delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
@@ -519,7 +528,7 @@
})
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -550,13 +559,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,"纭畾")
- },
+
}
}
@@ -597,6 +600,7 @@
padding: 20rpx 10rpx;
display: flex;
flex-direction: row;
+ align-items: center;
.right {
flex: 1;
@@ -605,9 +609,6 @@
padding-right: 5px;
}
-
-
-
.right-input {
text-align: right;
flex: 1;
@@ -627,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 {
--
Gitblit v1.9.1