From ea87c908fb6cdfc3e227a584a53e6730efb8262a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 26 十月 2023 13:41:12 +0800
Subject: [PATCH] 小程序代码

---
 minipro_standard/pages/allocation/allocation.vue |   40 +++++++++++++++-------------------------
 1 files changed, 15 insertions(+), 25 deletions(-)

diff --git a/minipro_standard/pages/allocation/allocation.vue b/minipro_standard/pages/allocation/allocation.vue
index 86e5f83..43ad353 100644
--- a/minipro_standard/pages/allocation/allocation.vue
+++ b/minipro_standard/pages/allocation/allocation.vue
@@ -60,9 +60,7 @@
 			<button class="fp_footer_submit" @click="submit">纭</button>
 		</view>
 		<!-- 閫夋嫨鏃ユ湡 -->
-		<!-- <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar> -->
-		<l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5"
-			rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
+		<u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
 		<!-- 閫夋嫨璁惧 -->
 		<u-picker :show="show1" :columns="equipment" @confirm="confirm" @cancel="show1 = false" keyName="text"></u-picker>
 	</view>
@@ -107,12 +105,22 @@
 				this.form.equipmentId = val.value[0].id
 				this.form.equipmentName = val.value[0].text
 				this.personnelData = []
-				this.getUser()
+				getFindAll({
+					deviceId: this.form.equipmentId
+				}).then(res => {
+					if (res.code === 200 && res.data && res.data.length !== 0) {
+						this.form.personnelId = []
+						let arr = []
+						res.data.forEach((item) => {
+							arr.push({ text: item.dmodel.name + '-' + item.umodel.name, id: item.userId })
+						})
+						this.personnelData = arr
+					}
+					this.show1 = false
+				})	
 			},
 			timeConfirm(val) {
-				// this.form.startTime = val[0]
-				this.listData.startDate = val.startDate
-				this.listData.endDate = val.endDate
+				this.form.startTime = val[0]
 				this.timeShow = false
 			},
 			// 鎻愪氦鍒嗛厤
@@ -145,27 +153,9 @@
 							res.data.forEach((element) => {
 								arr.push({ text: element.code + '-' + element.name, id: element.id, checked: false })
 							})
-							this.form.equipmentId = arr[0].id
-							this.form.equipmentName = arr[0].text
-							this.getUser()
 							this.equipment.push(arr)
 						}
 					})
-			},
-			getUser() {
-				getFindAll({
-					deviceId: this.form.equipmentId
-				}).then(res => {
-					if (res.code === 200 && res.data && res.data.length !== 0) {
-						this.form.personnelId = []
-						let arr = []
-						res.data.forEach((item) => {
-							arr.push({ text: item.dmodel.name + '-' + item.umodel.name, id: item.userId })
-						})
-						this.personnelData = arr
-					}
-					this.show1 = false
-				})	
 			}
 		}
 	}

--
Gitblit v1.9.3