筛选
This commit is contained in:
@@ -3,26 +3,27 @@
|
||||
<div class="item">
|
||||
<div>添加人</div>
|
||||
<div @click="selectUser">
|
||||
<span v-if="selectedUser.length || userListIds.length">已选择{{ selectedUser.length || userListIds.length }}名成员</span>
|
||||
<span v-if="selectedUser.length || deptListArr.length">已选择{{ selectedUser.length || deptListArr.length }}
|
||||
<span v-if="selectedUser.length">个网格</span><span v-if="deptListArr.length">个部门</span></span>
|
||||
<span class="color_gray" v-else>请选择</span>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
<div>包含标签</div>
|
||||
<div @click="toTagsList(0)">
|
||||
<span class="color_gray">请选择</span>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
<div>剔除标签</div>
|
||||
<div @click="toTagsList(1)">
|
||||
<span class="color_gray">请选择</span>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
<div>添加时间</div>
|
||||
<div @click="showCalendar = true">
|
||||
<span v-if="!startTime.length && !endTime.length" class="color_gray">请选择</span>
|
||||
@@ -30,7 +31,7 @@
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="items" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
<div>性别</div>
|
||||
<div class="sex">
|
||||
<span :class="sex == 0? 'active':''" @click="sex = 0">全部</span>
|
||||
@@ -54,12 +55,13 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
type: "",
|
||||
sendType: '',
|
||||
showCalendar: false,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
sex: "0",
|
||||
userList: [],
|
||||
userListIds: [],
|
||||
deptListArr: [],
|
||||
selectedUser: []
|
||||
}
|
||||
},
|
||||
@@ -78,12 +80,11 @@ export default {
|
||||
this.selectEnterpriseContact({
|
||||
fromDepartmentId: 0,
|
||||
mode: "multi",
|
||||
type: ["user"],
|
||||
selectedUserIds: this.userListIds?.map(e => e.id)
|
||||
type: ["department"],
|
||||
selectedUserIds: this.deptListArr?.map(e => e.id)
|
||||
}).then((res)=>{
|
||||
if(res?.userList) {
|
||||
this.userListIds = res.userList
|
||||
console.log(this.userListIds,'userListIds');
|
||||
this.deptListArr = res.userList
|
||||
}
|
||||
}
|
||||
).catch((err) => {
|
||||
@@ -103,19 +104,28 @@ export default {
|
||||
|
||||
// 选时间范围
|
||||
selectDate(e) {
|
||||
console.log(e);
|
||||
this.startTime = e.startDate
|
||||
this.endTime = e.endDate
|
||||
},
|
||||
submit() {}
|
||||
submit() {
|
||||
uni.setStorageSync('girdList',this.selectedUser)
|
||||
uni.setStorageSync('deptList',this.deptListArr)
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit("girdList", this.selectedUser)
|
||||
uni.$emit("deptList", this.deptListArr)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
this.type = o.type;
|
||||
this.sendType = o.sendType;
|
||||
document.title = this.type == 1? '按部门选择':'按网格选择'
|
||||
uni.$on("pagePicker:custom", res => {
|
||||
this.selectedUser = res
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user