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 | 43 +++++++++++++++++++------------------------
1 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/pages/task/update.vue b/pages/task/update.vue
index 72c2f7f..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>
@@ -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, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
@@ -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 {
--
Gitblit v1.9.1