From a11bc1bed7953b88213330582c2085f60b5a73b1 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 12 六月 2024 15:01:56 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
---
h5/pages/staff/vehicle/applePeo.vue | 77 ++++++++++++++++++++++----------------
1 files changed, 44 insertions(+), 33 deletions(-)
diff --git a/h5/pages/staff/vehicle/applePeo.vue b/h5/pages/staff/vehicle/applePeo.vue
index 54e7a5d..52d13c5 100644
--- a/h5/pages/staff/vehicle/applePeo.vue
+++ b/h5/pages/staff/vehicle/applePeo.vue
@@ -113,43 +113,66 @@
param: {},
selList: [],
- isShowSelMem: false
+ isShowSelMem: false,
+ pagination: {
+ capacity: 20,
+ page: 1
+ },
}
},
onLoad() {
this.initData()
},
+ onReachBottom() {
+ // if(){}
+ },
mounted() {
- this.$eventBus.$on('applePeoDetail', (res)=>{
+ this.$eventBus.$on('applePeoDetail', (res) => {
res.forEach(item => {
- this.changeMem(item)
+ this.memberList.forEach(mem => {
+ if (item.id === mem.id) {
+ mem.checked = !mem.checked
+ }
+ })
})
- this.$nextnick(() => {
+ this.selList = this.memberList.filter(i => i.checked)
+ this.$nextTick(() => {
this.$forceUpdate()
})
})
},
methods: {
+ initData() {
+ const { param, pagination } = this
+ findTypeMemberInfo({
+ // model: {
+ name: param.name,
+ // },
+ type: '2',
+ ...pagination
+ }).then(res => {
+ this.memberList = res.data || []
+ this.memberList.forEach(i => {
+ i.checked = false
+ })
+ })
+ },
onSubmit() {
+ if (this.selList.length === 0) return uni.showToast({
+ title: '璇峰厛閫夋嫨浜哄憳',
+ icon: 'none'
+ })
this.$eventBus.$emit('applePeo', this.selList)
uni.navigateBack()
},
changeMem(item, index) {
+ // this.memberList.forEach(mem => {
+ // if(item.id === mem.id){
+ // item.checked = !item.checked
+ // }
+ // })
item.checked = !item.checked
this.selList = this.memberList.filter(i => i.checked)
- // const arr = e.detail.value
- // let arrTemp = arr.map(item => {
- // let obj = {}
- // this.memberList.forEach(ite => {
- // if (item == ite.id) {
- // obj.name = ite.name.split('-')[0]
- // obj.componey = ite.name.split('-')[1] || ''
- // obj.id = ite.id
- // }
- // })
- // return obj
- // })
- // this.selList = arrTemp
this.$forceUpdate()
},
handleRemove(item) {
@@ -161,18 +184,6 @@
// console.log(this.memberList);
this.$forceUpdate()
},
- initData() {
- const { param } = this
- findTypeMemberInfo({
- name: param.name,
- type: '2'
- }).then(res => {
- this.memberList = res.data || []
- this.memberList.forEach(i => {
- i.checked = false
- })
- })
- }
}
};
</script>
@@ -188,7 +199,7 @@
font-weight: 600;
}
.btn {
- color: #279baa;
+ color: $uni-color-primary;
}
}
.modal_mem_list {
@@ -245,7 +256,7 @@
align-items: center;
.members {
width: 500rpx;
- color: #4d98a7;
+ color: $uni-color-primary;
white-space: nowrap;
overflow: hidden; //鏂囨湰瓒呭嚭闅愯棌
text-overflow: ellipsis;
@@ -260,7 +271,7 @@
width: 690rpx;
height: 88rpx;
line-height: 88rpx;
- background: #279baa;
+ background: $uni-color-primary;
border-radius: 44rpx;
color: #fff;
text-align: center;
@@ -302,7 +313,7 @@
}
}
}
- .checked{
+ .checked {
width: 48rpx;
}
}
--
Gitblit v1.9.3