筛选
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="AppCooperationPropaganda">
|
||||
<AiTopFixed>
|
||||
<div class="tab-select">
|
||||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{ item }}<span></span></div>
|
||||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(item,index)">{{ item.name }}<span></span></div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<div class="searchBox">
|
||||
@@ -98,7 +98,20 @@ export default {
|
||||
appName: '协同宣发',
|
||||
data() {
|
||||
return {
|
||||
tabs: ['群发居民群','群发居民','群发朋友圈'],
|
||||
tabs: [
|
||||
{
|
||||
name: '群发居民群',
|
||||
value: 'ResidentsGroup'
|
||||
},
|
||||
{
|
||||
name: '群发居民',
|
||||
value: 'Residents'
|
||||
},
|
||||
{
|
||||
name: '群发朋友圈',
|
||||
value: 'CircleOfFriends'
|
||||
},
|
||||
],
|
||||
tabIndex: 0,
|
||||
current: 1,
|
||||
name: '',
|
||||
@@ -114,12 +127,14 @@ export default {
|
||||
createUserId: '',
|
||||
userList: [],
|
||||
userIdList: [],
|
||||
status: ''
|
||||
status: '',
|
||||
sendType: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tabClick(index) {
|
||||
tabClick(item,index) {
|
||||
this.tabIndex = index;
|
||||
this.sendType = item.value
|
||||
},
|
||||
toDetail(item) {
|
||||
uni.navigateTo({url: `./cooperationDetail?id=${item.id}&time=${item.createTime}`})
|
||||
@@ -183,7 +198,7 @@ export default {
|
||||
this.endTime = val.year + '-' + val.month + '-' + val.day
|
||||
},
|
||||
toAdd() {
|
||||
uni.navigateTo({url: `./addPropaganda?index=${this.tabIndex}`})
|
||||
uni.navigateTo({url: `./addPropaganda?type=${this.sendType}`})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div @click="toSleectScoped">
|
||||
<span>
|
||||
<span class="color_gray" v-if="!form.sendScope">请选择</span>
|
||||
<span v-if="form.sendScope">已选择</span>
|
||||
<span v-if="form.sendScope">预计送达{{ 1 }}名成员</span>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</span>
|
||||
</div>
|
||||
@@ -146,7 +146,7 @@ export default {
|
||||
choiceTime: '', // 定时发送时间
|
||||
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
||||
sendType: '0', // 0:立即发送、1:定时发送
|
||||
wxGroups: [],
|
||||
wxGroups: [], // 送达居民群
|
||||
},
|
||||
enableExamine: false,
|
||||
isTimedTask: false,
|
||||
@@ -154,7 +154,6 @@ export default {
|
||||
files: [],
|
||||
showTaskTime: false,
|
||||
userList: [],
|
||||
// userListIds: [],
|
||||
showPopup: false,
|
||||
showFodder: false,
|
||||
showUpload: false,
|
||||
@@ -169,19 +168,6 @@ export default {
|
||||
},
|
||||
flag: false,
|
||||
uploadList: [
|
||||
// {
|
||||
// title: '从素材库上传',
|
||||
// list: [
|
||||
// {
|
||||
// icon: '',
|
||||
// name: ''
|
||||
// },
|
||||
// {
|
||||
// icon: '',
|
||||
// name: ''
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: '从本地上传',
|
||||
list: [
|
||||
@@ -207,6 +193,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['selectEnterpriseContact']),
|
||||
|
||||
// 发送范围
|
||||
toSleectScoped() {
|
||||
uni.navigateTo({url: `./sendScoped?type=${this.type}`})
|
||||
},
|
||||
@@ -387,8 +375,8 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
this.type = o.index;
|
||||
document.title = this.type==0? "群发居民群": this.type==1? "群发居民": "群发朋友圈"
|
||||
this.type = o.type;
|
||||
document.title = this.type=='ResidentsGroup'? "群发居民群": this.type=='Residents'? "群发居民": "群发朋友圈"
|
||||
uni.$on('checkedScope', res => {
|
||||
this.form.sendScope = res.sendScope
|
||||
})
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -67,18 +67,13 @@ export default {
|
||||
this.treeList = this.allData.filter(e => !e.parentGirdId)
|
||||
this.selectGridPath = [{girdName: "可选范围", id: ''}]
|
||||
},
|
||||
itemClick({id,girdName,isChecked}) {
|
||||
itemClick({id,girdName}) {
|
||||
this.selectGridPath.push({girdName,id})
|
||||
this.getGridsAndUsersByParent(id,isChecked)
|
||||
this.getGridsAndUsersByParent(id)
|
||||
},
|
||||
|
||||
getGridsAndUsersByParent(id,checkType) {
|
||||
if(checkType) {
|
||||
this.selected.push(this.treeList)
|
||||
}
|
||||
this.treeList = this.allData.filter(e => (e.parentGirdId == id)).map(v=>
|
||||
({...v,isChecked: this.selected.find(i=> i.id==v.id)}))
|
||||
|
||||
getGridsAndUsersByParent(id) {
|
||||
this.treeList = this.allData.filter(e => (e.parentGirdId == id))
|
||||
this.$forceUpdate()
|
||||
},
|
||||
girdNameClick(row, index) {
|
||||
|
||||
@@ -30,15 +30,19 @@ export default {
|
||||
return {
|
||||
value: '',
|
||||
checkList: [
|
||||
{ name: '全部居民群', checked: true, value: '0'},
|
||||
{ name: '全部居民群', checked: false, value: '0'},
|
||||
{ name: '按部门选择', checked: false, value: '1'},
|
||||
{ name: '按网格选择', checked: false, value: '2' }
|
||||
],
|
||||
showContent: false,
|
||||
type: '',
|
||||
sendType: '',
|
||||
deptSelect: [],
|
||||
girdSelect: [],
|
||||
sendScope: '0',
|
||||
girdListIds: [],
|
||||
deptListIds: [],
|
||||
wxGroups: [],
|
||||
groupNames: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -46,22 +50,61 @@ export default {
|
||||
this.checkList.forEach(v=> v.checked = false)
|
||||
e.checked = true
|
||||
if(e.value == '1' || e.value == '2') {
|
||||
uni.navigateTo({url: `./scopedSelect?type=${e.value}`})
|
||||
uni.navigateTo({url: `./scopedSelect?type=${e.value}&sendType=${this.sendType}`})
|
||||
}
|
||||
this.sendScope = e.value
|
||||
},
|
||||
submit() {
|
||||
this.getWxGroups()
|
||||
uni.setStorageSync('sendScope', this.sendScope)
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit("checkedScope",{ sendScope: this.sendScope });
|
||||
}
|
||||
})
|
||||
},
|
||||
getWxGroups() {
|
||||
this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`,
|
||||
// null,
|
||||
// {
|
||||
// data: {
|
||||
// filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
|
||||
// },
|
||||
// headers: {'Content-Type': 'application/json;charset=utf-8'},
|
||||
// transformRequest: [function(data) {
|
||||
// console.log(data);
|
||||
// return data.filterCriteria
|
||||
// }]
|
||||
// }).then(res => {
|
||||
// if (res.code === 0) {
|
||||
// this.wxGroups = res.data
|
||||
// }
|
||||
// })
|
||||
{
|
||||
filterCriteria: ''
|
||||
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.wxGroups = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(o) {
|
||||
this.type = o.type;
|
||||
this.sendType = o.type;
|
||||
document.title = "选择发送范围"
|
||||
this.sendScope = uni.getStorageSync('sendScope')
|
||||
// this.checkList.map(i=> i.value ==this.sendScope)
|
||||
|
||||
},
|
||||
onShow() {
|
||||
uni.$on("girdList",res => {
|
||||
this.girdListIds = res.map(e=>e.id)
|
||||
})
|
||||
uni.$on("deptList",res => {
|
||||
this.deptListIds = res.map(e=>e.id)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user