From ca73a173f008c8d7a9d700bad897ca24fe2d2203 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 16 十月 2023 09:29:57 +0800
Subject: [PATCH] 111
---
minipro_standard/pages/allocation/allocation.vue | 85 +++++++++++++++++++++++++-----------------
1 files changed, 51 insertions(+), 34 deletions(-)
diff --git a/minipro_standard/pages/allocation/allocation.vue b/minipro_standard/pages/allocation/allocation.vue
index cda34f5..86e5f83 100644
--- a/minipro_standard/pages/allocation/allocation.vue
+++ b/minipro_standard/pages/allocation/allocation.vue
@@ -60,7 +60,9 @@
<button class="fp_footer_submit" @click="submit">纭</button>
</view>
<!-- 閫夋嫨鏃ユ湡 -->
- <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
+ <!-- <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-picker :show="show1" :columns="equipment" @confirm="confirm" @cancel="show1 = false" keyName="text"></u-picker>
</view>
@@ -105,22 +107,12 @@
this.form.equipmentId = val.value[0].id
this.form.equipmentName = val.value[0].text
this.personnelData = []
- 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
- })
+ this.getUser()
},
timeConfirm(val) {
- this.form.startTime = val[0]
+ // this.form.startTime = val[0]
+ this.listData.startDate = val.startDate
+ this.listData.endDate = val.endDate
this.timeShow = false
},
// 鎻愪氦鍒嗛厤
@@ -137,6 +129,7 @@
if (res.code === 200) {
uni.showToast({ title: '鍒嗛厤鎴愬姛', icon: 'success', duration: 2000, mask: true });
setTimeout(() => {
+ uni.$emit('update', { msg:'鍒锋柊鍒楄〃' })
uni.navigateBack({ delta: 1 });
}, 2000)
}
@@ -152,9 +145,27 @@
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
+ })
}
}
}
@@ -195,6 +206,9 @@
display: flex;
flex-direction: column;
}
+ .u-icon__icon {
+ margin-right: 0 !important;
+ }
.fp_list_item_right_dis {
display: flex;
align-items: center;
@@ -217,15 +231,15 @@
.black {
color: black !important;
}
- input {
- width: 180rpx;
- height: 60rpx;
- border-radius: 8rpx;
- border: 2rpx solid #E5E5E5;
- padding: 0 30rpx;
- text-align: right;
- font-size: 25rpx;
- }
+ // input {
+ // width: 180rpx;
+ // height: 60rpx;
+ // border-radius: 8rpx;
+ // border: 2rpx solid #E5E5E5;
+ // padding: 0 30rpx;
+ // text-align: right;
+ // font-size: 25rpx;
+ // }
text {
font-size: 28rpx;
font-weight: 400;
@@ -256,9 +270,12 @@
font-weight: 400;
}
}
- .fp_list_item_right {
+ .fp_list_item_right::v-deep {
display: flex;
align-items: center;
+ .u-icon__icon {
+ margin-right: 0 !important;
+ }
.wu {
text-align: center;
text {
@@ -269,15 +286,15 @@
.black {
color: black !important;
}
- input {
- width: 180rpx;
- height: 60rpx;
- border-radius: 8rpx;
- border: 1rpx solid #E5E5E5;
- padding: 0 30rpx;
- text-align: right;
- font-size: 25rpx;
- }
+ // input {
+ // width: 180rpx;
+ // height: 60rpx;
+ // border-radius: 8rpx;
+ // border: 1rpx solid #E5E5E5;
+ // padding: 0 30rpx;
+ // text-align: right;
+ // font-size: 25rpx;
+ // }
text {
font-size: 28rpx;
font-weight: 400;
--
Gitblit v1.9.3