Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<u-search v-model="keyword" :clearabled="true" placeholder="请输入素材名称" :show-action="false" bg-color="#F5F5F5" search-icon-color="#ccc" color="#666" height="58" @search="getList" @clear="handerClear"></u-search>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
<div class="list">
|
||||
<div class="playList">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" >
|
||||
<div class="left">
|
||||
<p>{{ item.sourceName }}</p>
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.list{
|
||||
.playList{
|
||||
padding-left: 32px;
|
||||
background-color: #fff;
|
||||
.item{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="list">
|
||||
<div class="buildingList">
|
||||
<AiTopFixed>
|
||||
<u-search placeholder="小区名称" :show-action="false" v-model="title" @search="current=1,getList()"/>
|
||||
</AiTopFixed>
|
||||
@@ -27,7 +27,7 @@
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
|
||||
name: "buildingList",
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
@@ -97,8 +97,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
.buildingList {
|
||||
padding-bottom: 20px;
|
||||
|
||||
.list-content {
|
||||
padding: 32px 32px 0;
|
||||
background-color: #F5F5F5;
|
||||
|
||||
@@ -135,6 +135,19 @@ export default {
|
||||
tabClick(item,index) {
|
||||
this.tabIndex = index;
|
||||
this.sendType = item.value
|
||||
uni.clearStorageSync('userSelect')
|
||||
uni.clearStorageSync('wxGroupsUser')
|
||||
uni.clearStorageSync('girdSelect')
|
||||
uni.clearStorageSync('deptList')
|
||||
uni.clearStorageSync('sendScope')
|
||||
uni.clearStorageSync('ResidentTags')
|
||||
uni.clearStorageSync('ResidentTagsRemove')
|
||||
uni.clearStorageSync('circleTags')
|
||||
uni.clearStorageSync('circleTagsRemove')
|
||||
this.$dict.load('mstStatus').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
|
||||
},
|
||||
toDetail(item) {
|
||||
uni.navigateTo({url: `./cooperationDetail?id=${item.id}&time=${item.createTime}`})
|
||||
@@ -145,13 +158,20 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$http.post(`/app/appmasssendingtask/list`, null, {
|
||||
let url = ''
|
||||
if(this.tabIndex==0) {
|
||||
url = `/app/appmasssendingtask/list`
|
||||
} else if(this.tabIndex==1 || this.tabIndex==2) {
|
||||
url = `/app/whchatmomentstask/list`
|
||||
}
|
||||
this.$http.post(url, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
taskTitle: this.taskTitle,
|
||||
startTime: this.start,
|
||||
endTime: this.end,
|
||||
createUserId: this.createUserId,
|
||||
status: this.status
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
@@ -203,7 +223,7 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
document.title = '协同宣发'
|
||||
this.$dict.load(['mstStatus']).then(() => {
|
||||
this.$dict.load('mstStatus').then(() => {
|
||||
this.list = []
|
||||
this.current = 1
|
||||
this.getList()
|
||||
|
||||
@@ -139,14 +139,13 @@ export default {
|
||||
type: '',
|
||||
form: {
|
||||
taskTitle: '',
|
||||
wxGroups: [], // 发送范围
|
||||
contents: [], // 发送内容
|
||||
enableExamine: '0', // 是否需要审批 0否 1是
|
||||
examines: [], // 审批人
|
||||
choiceTime: '', // 定时发送时间
|
||||
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
||||
sendType: '0', // 0:立即发送、1:定时发送
|
||||
wxGroups: [
|
||||
wxGroups: [ // 发送范围
|
||||
{
|
||||
corpId: "ww596787bb70f08288",
|
||||
errorCode: null,
|
||||
@@ -179,6 +178,19 @@ export default {
|
||||
}
|
||||
], // 送达居民群
|
||||
},
|
||||
forms: {
|
||||
taskTitle: '',
|
||||
taskType: '',
|
||||
executorList: [], // 任务执行人集合(群发朋友圈的执行人)
|
||||
groupList: [], // 添加人集合
|
||||
contentList: [], // 发送内容
|
||||
enableExamine: '0', // 是否需要审批 0否 1是
|
||||
examineList: [], // 审批人
|
||||
choiceTime: '', // 定时发送时间
|
||||
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
||||
sendType: '0', // 0:立即发送、1:定时发送
|
||||
gender: '', // 性别:0-女、1-男、2-全部
|
||||
},
|
||||
enableExamine: false,
|
||||
isTimedTask: false,
|
||||
content: '',
|
||||
@@ -334,6 +346,7 @@ export default {
|
||||
this.form.choiceTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
|
||||
},
|
||||
|
||||
|
||||
confirm() {
|
||||
if(this.flag) return
|
||||
// 文本
|
||||
@@ -371,6 +384,10 @@ export default {
|
||||
}
|
||||
})
|
||||
this.form.contents.push(...files)
|
||||
|
||||
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
||||
this.forms.contentList = this.form.contents
|
||||
}
|
||||
|
||||
if(!this.form.taskTitle) {
|
||||
return this.$u.toast('请输入任务名称')
|
||||
@@ -384,23 +401,45 @@ export default {
|
||||
return this.$u.toast("请输入发送内容")
|
||||
}
|
||||
|
||||
if(this.enableExamine) {
|
||||
if(this.enableExamine) { // 是否需要审批,0:否、1:是
|
||||
if(!this.form.examines.length) {
|
||||
return this.$u.toast("请选择审批人")
|
||||
} else {
|
||||
this.form.enableExamine = '1'
|
||||
this.form.examineList = this.form.examineList
|
||||
}
|
||||
this.form.enableExamine = 1
|
||||
this.forms.enableExamine = 1
|
||||
} else {
|
||||
this.form.enableExamine = 0
|
||||
this.forms.enableExamine = 0
|
||||
this.form.examineList = []
|
||||
this.form.examineList = []
|
||||
}
|
||||
|
||||
if(this.isTimedTask) {
|
||||
if(this.isTimedTask) { // 发送类型,0:立即发送、1:定时发送
|
||||
this.form.sendType = 1
|
||||
this.forms.sendType = 1
|
||||
if(!this.form.choiceTime.length) {
|
||||
return this.$u.toast("请选择发送时间")
|
||||
} else if (new Date(this.form.choiceTime).getTime() < Date.now()) {
|
||||
return this.$u.toast('定时发送时间不得早于当前时间')
|
||||
}
|
||||
this.forms.choiceTime = this.form.choiceTime
|
||||
} else {
|
||||
this.form.sendType = 0
|
||||
this.forms.sendType = 0
|
||||
this.forms.choiceTime = ''
|
||||
this.form.choiceTime = ''
|
||||
}
|
||||
this.flag = true
|
||||
this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...this.form }).then(res=>{
|
||||
|
||||
let formData = {}
|
||||
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
||||
formData = this.forms
|
||||
} else if(this.type=='ResidentsGroup') {
|
||||
formData = this.form
|
||||
}
|
||||
this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...formData }).then(res=>{
|
||||
if(res?.code ==0) {
|
||||
this.flag = false
|
||||
this.$u.toast("新增成功")
|
||||
@@ -409,8 +448,7 @@ export default {
|
||||
}).catch((err)=>{
|
||||
this.flag = false
|
||||
this.$u.toast(err)
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
getDeptUser() {
|
||||
@@ -418,10 +456,10 @@ export default {
|
||||
fromDepartmentId: 0,
|
||||
mode: "multi",
|
||||
type: ["user"],
|
||||
selectedUserIds: this.userList?.map(e => e.id)
|
||||
selectedUserIds: this.form.examineList?.map(e => e.id)
|
||||
}).then((res)=>{
|
||||
if(res?.userList) {
|
||||
this.userList = res.userList
|
||||
this.form.examineList = res.userList
|
||||
}
|
||||
}
|
||||
).catch((err) => {
|
||||
@@ -432,10 +470,24 @@ export default {
|
||||
onLoad(o) {
|
||||
this.type = o.type;
|
||||
document.title = this.type=='ResidentsGroup'? "群发居民群": this.type=='Residents'? "群发居民": "群发朋友圈"
|
||||
if(this.type=='Residents') {
|
||||
this.forms.taskType = 1
|
||||
} else if(this.type=='CircleOfFriends') {
|
||||
this.forms.taskType = 0
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.form.wxGroups = uni.getStorageSync('wxGroupsUser') || []
|
||||
// this.form.wxGroups = uni.getStorageSync('wxGroupsUser') || []
|
||||
this.form.sendScope = uni.getStorageSync('sendScope')
|
||||
if(this.type=='Residents') {
|
||||
this.forms.taskType = 1
|
||||
this.forms.groupList = this.form.wxGroups
|
||||
} else if(this.type=='CircleOfFriends') {
|
||||
this.forms.taskType = 0
|
||||
this.forms.executorList = this.form.wxGroups
|
||||
}
|
||||
this.forms.taskTitle = this.form.taskTitle
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,27 +3,39 @@
|
||||
<div class="item">
|
||||
<div>添加人</div>
|
||||
<div @click="selectUser">
|
||||
<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 v-if="selectedUser.length || deptListArr.length">已选择{{ selectedUser.length || deptListArr.length }}
|
||||
<span v-if="selectedUser.length">个网格</span><span v-if="deptListArr.length">个部门</span></span> -->
|
||||
<div v-if="type == 1" style="display: inline-block;">
|
||||
<span v-if="deptListArr.length">已选择{{ deptListArr.length }}个部门</span>
|
||||
<span class="color_gray" v-else>请选择</span>
|
||||
</div>
|
||||
<div v-if="type == 2" style="display: inline-block;">
|
||||
<span v-if="selectedUser.length">已选择{{ selectedUser.length }}个网格</span>
|
||||
<span class="color_gray" v-else>请选择</span>
|
||||
</div>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
<div>包含标签</div>
|
||||
<div @click="toTagsList(0)">
|
||||
<span v-if="circleTags.length || ResidentTags.length">已选择{{ circleTags.length || ResidentTags.length }}个标签</span>
|
||||
<span class="color_gray" v-else>请选择</span>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<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" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
<div>剔除标签</div>
|
||||
<div @click="toTagsList(1)">
|
||||
<span class="color_gray">请选择</span>
|
||||
<span v-if="circleTagsRemove.length || ResidentTagsRemove.length">已剔除{{ circleTagsRemove.length || ResidentTagsRemove.length }}个标签</span>
|
||||
<span class="color_gray" v-else>请选择</span>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
|
||||
<div class="item" v-if="['Residents'].includes(sendType)">
|
||||
<div>添加时间</div>
|
||||
<div @click="showCalendar = true">
|
||||
<span v-if="!startTime.length && !endTime.length" class="color_gray">请选择</span>
|
||||
@@ -31,7 +43,8 @@
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items" v-if="['Residents', 'CircleOfFriends'].includes(sendType)">
|
||||
|
||||
<div class="items" v-if="['Residents'].includes(sendType)">
|
||||
<div>性别</div>
|
||||
<div class="sex">
|
||||
<span :class="sex == 0? 'active':''" @click="sex = 0">全部</span>
|
||||
@@ -59,10 +72,14 @@ export default {
|
||||
showCalendar: false,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
sex: "0",
|
||||
sex: 0, // 性别:0-女、1-男、2-全部
|
||||
userList: [],
|
||||
deptListArr: [],
|
||||
selectedUser: []
|
||||
selectedUser: [],
|
||||
circleTags: [], // 朋友圈包含标签
|
||||
circleTagsRemove: [], // 朋友圈剔除标签
|
||||
ResidentTags: [], // 居民包含标签
|
||||
ResidentTagsRemove: [], // 居民剔除标签
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -92,22 +109,20 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// 选择包含、剔除的标签 0包含 1剔除
|
||||
toTagsList(e) {
|
||||
uni.navigateTo({url: `./tagsList?type=${e}`})
|
||||
uni.navigateTo({url: `./tagsList?type=${e}&sendType=${this.sendType}`})
|
||||
},
|
||||
|
||||
// 选包含标签
|
||||
// selectTags() {},
|
||||
|
||||
// 选剔除标签
|
||||
// deleteTags() {},
|
||||
|
||||
// 选时间范围
|
||||
selectDate(e) {
|
||||
this.startTime = e.startDate
|
||||
this.endTime = e.endDate
|
||||
},
|
||||
submit() {
|
||||
uni.setStorageSync('gender',this.sex)
|
||||
uni.setStorageSync('startTime', this.startTime)
|
||||
uni.setStorageSync('endTime', this.endTime)
|
||||
uni.setStorageSync('deptList',this.deptListArr)
|
||||
uni.navigateBack()
|
||||
}
|
||||
@@ -118,8 +133,22 @@ export default {
|
||||
document.title = this.type == 1? '按部门选择':'按网格选择'
|
||||
},
|
||||
onShow() {
|
||||
// 网格或者部门
|
||||
this.selectedUser = uni.getStorageSync('girdSelect')
|
||||
this.deptListArr = uni.getStorageSync('deptList')
|
||||
// 添加时间
|
||||
this.startTime = uni.getStorageSync('startTime')
|
||||
this.endTime = uni.getStorageSync('endTime')
|
||||
// 标签
|
||||
if(this.sendType == 'Residents') {
|
||||
this.ResidentTags = uni.getStorageSync('ResidentTags') // 居民包含
|
||||
this.ResidentTagsRemove = uni.getStorageSync('ResidentTagsRemove') // 居民剔除
|
||||
} else if(this.sendType == 'CircleOfFriends') {
|
||||
this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
|
||||
this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
|
||||
}
|
||||
// 性别
|
||||
this.sex = uni.getStorageSync('gender')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ export default {
|
||||
if(!this.selected.userId) {
|
||||
return this.$u.toast('请选择创建人')
|
||||
}
|
||||
uni.$emit("pagePicker:custom", [this.selected])
|
||||
uni.setStorageSync('userSelect', this.selected)
|
||||
uni.navigateBack()
|
||||
},
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<div class="checkedBox">
|
||||
<div class="item" v-for="(item,index) in checkList" :key="index" @click="checkBtn(item)">
|
||||
<div class="left">
|
||||
<icon type="success" size="18" v-if="item.checked"/>
|
||||
<icon type="circle" size="18" v-else />
|
||||
<icon type="success" size="18" v-if="item.value == sendScope"/>
|
||||
<icon type="circle" size="18" v-if="item.value != sendScope" />
|
||||
<div class="title">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="right" v-if="item.vlaue != '0'">
|
||||
<div class="right" v-if="item.value != 0">
|
||||
<div v-if="item.value == '1' && deptSelect.length">已选择{{ deptSelect.length }}个部门</div>
|
||||
<div v-if="item.value == '2' && girdSelect.length">已选择{{ girdSelect.length }}个网格</div>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
<u-icon name="arrow-right" color="#CCD0D3" ></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,24 +36,41 @@ export default {
|
||||
sendType: '',
|
||||
deptSelect: [],
|
||||
girdSelect: [],
|
||||
sendScope: '0',
|
||||
sendScope: 0,
|
||||
girdListIds: [],
|
||||
deptListIds: [],
|
||||
wxGroups: [],
|
||||
groupNames: [],
|
||||
wxGroups: [], // 居民群,居民,朋友圈
|
||||
sex: '',
|
||||
ResidentTags: [],
|
||||
ResidentTagsRemove: [],
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkBtn(e) {
|
||||
this.checkList.forEach(v=> v.checked = false)
|
||||
e.checked = true
|
||||
// this.checkList.forEach(v=> v.checked = false)
|
||||
// e.checked = true
|
||||
|
||||
if(e.value == '1' || e.value == '2') {
|
||||
uni.navigateTo({url: `./scopedSelect?type=${e.value}&sendType=${this.sendType}`})
|
||||
}
|
||||
this.sendScope = e.value
|
||||
this.sendScope = e.value;
|
||||
uni.setStorageSync('sendScope', this.sendScope)
|
||||
// uni.clearStorageSync('ResidentTags')
|
||||
// uni.clearStorageSync('ResidentTagsRemove')
|
||||
// uni.clearStorageSync('circleTags')
|
||||
// uni.clearStorageSync('circleTagsRemove')
|
||||
},
|
||||
submit() {
|
||||
this.getWxGroups()
|
||||
if(this.sendType == 'ResidentsGroup') {
|
||||
this.getWxGroups()
|
||||
} else if(this.sendType == 'Residents') {
|
||||
this.getResidents()
|
||||
} else if(this.sendType == 'CircleOfFriends') {
|
||||
this.getCircleOfFriends()
|
||||
}
|
||||
|
||||
uni.setStorageSync('sendScope', this.sendScope)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
@@ -61,37 +78,84 @@ export default {
|
||||
uni.$emit('predictUser', this.wxGroups)
|
||||
}
|
||||
})
|
||||
}, 4000)
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
// 群发居民群
|
||||
getWxGroups() {
|
||||
this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`,
|
||||
{
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.wxGroups = res.data
|
||||
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
||||
console.log(this.wxGroups,res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 群发居民
|
||||
getResidents() {
|
||||
const tags = this.ResidentTags.join(',')
|
||||
const removeTags = this.ResidentTagsRemove.join(',')
|
||||
this.$http.post(`/app/whchatmomentstask/getCustomerGroups?sendScope=${this.sendScope}&addFromTime=${this.startTime}&addEndTime=${this.endTime}&gender=${this.sex}&filteTags=${tags}&excludeFilterTags=${removeTags}`,
|
||||
{
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(','),
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
// this.groupList = res.data
|
||||
// uni.setStorageSync('groupList', this.groupList)
|
||||
this.wxGroups = res.data
|
||||
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// const array1 = [{name:'zs',num: 1},{name:'zls',num: 5},{name:'azs',num: 4}]
|
||||
// const sum = array1.reduce((pre, cur) => pre + cur.num, 0)
|
||||
// console.log(sum)
|
||||
|
||||
// 群发朋友圈
|
||||
getCircleOfFriends() {
|
||||
this.$http.post(`/app/whchatmomentstask/getExecutors?sendScope=${this.sendScope}`,
|
||||
{
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
// this.executorList = res.data
|
||||
// uni.setStorageSync('executorList', this.executorList)
|
||||
this.wxGroups = res.data
|
||||
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
this.sendType = o.type;
|
||||
document.title = "选择发送范围"
|
||||
// this.checkList.forEach(i=> {
|
||||
// return {
|
||||
// name: i.name,
|
||||
// value: i.value,
|
||||
// checked: this.sendScope.find(v=>(i.value==v))
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onShow() {
|
||||
this.sendScope = uni.getStorageSync('sendScope') || ''
|
||||
this.girdListIds = uni.getStorageSync('girdSelect').map(e=>e.id) || []
|
||||
this.deptListIds = uni.getStorageSync('deptList').map(v=>v.id) || []
|
||||
const girdArr = uni.getStorageSync('girdSelect')
|
||||
if(girdArr.length) {
|
||||
this.girdListIds = girdArr.map(e=>e.id)
|
||||
}
|
||||
const deptArr = uni.getStorageSync('deptList')
|
||||
if(deptArr.length) {
|
||||
this.deptListIds = deptArr.map(v=>v.id)
|
||||
}
|
||||
this.sex = uni.getStorageSync('gender')
|
||||
// 标签
|
||||
if(this.sendType == 'Residents') {
|
||||
this.ResidentTags = uni.getStorageSync('ResidentTags') // 居民包含
|
||||
this.ResidentTagsRemove = uni.getStorageSync('ResidentTagsRemove') // 居民剔除
|
||||
}
|
||||
// 时间
|
||||
this.startTime = uni.getStorageSync('startTime')
|
||||
this.endTime = uni.getStorageSync('endTime')
|
||||
// else if(this.sendType == 'CircleOfFriends') {
|
||||
// this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
|
||||
// this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -23,67 +23,17 @@ export default {
|
||||
name: "tagsList",
|
||||
data() {
|
||||
return {
|
||||
subTags: [
|
||||
{
|
||||
id: "1",
|
||||
name: "第一组",
|
||||
tagList: [
|
||||
{
|
||||
id: "1.1",
|
||||
name: "介绍的",
|
||||
},
|
||||
{
|
||||
id: "1.2",
|
||||
name: "介绍的啊塑胶地板",
|
||||
},
|
||||
{
|
||||
id: "1.3",
|
||||
name: "介绍的",
|
||||
},
|
||||
{
|
||||
id: "1.4",
|
||||
name: "介绍的啊啊啊啊啊啊啊啊",
|
||||
},
|
||||
{
|
||||
id: "1.5",
|
||||
name: "介绍的啊啊啊",
|
||||
},
|
||||
{
|
||||
id: "1.6",
|
||||
name: "介绍的红红火火恍恍惚惚或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或",
|
||||
},
|
||||
{
|
||||
id: "1.7",
|
||||
name: "介绍的红红火火恍恍惚惚或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "第二组",
|
||||
tagList: [
|
||||
{
|
||||
id: "2.2",
|
||||
name: "的范德萨发",
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
sendType: '',
|
||||
subTags: [],
|
||||
checked: [],
|
||||
list: []
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTags() {
|
||||
this.$http.post(`/app/wxcp/wxcorptag/listAll`).then(res => {
|
||||
this.$http.post(`/app/wxcp/wxcorptag/listAll?current=1&size=3000`).then(res => {
|
||||
if (res?.data) {
|
||||
console.log(res);
|
||||
// this.subTags = res.data.map(item => {
|
||||
// return {
|
||||
// dictName: item.name,
|
||||
// dictValue: item.id
|
||||
// }
|
||||
// })
|
||||
this.subTags = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -101,20 +51,47 @@ export default {
|
||||
return this.$u.toast('请选择标签')
|
||||
}
|
||||
|
||||
const list = this.list.filter(v => {
|
||||
return this.checked.includes(v.id)
|
||||
})
|
||||
|
||||
uni.$emit('onChecked', list)
|
||||
// const list = this.subTags.filter(v => {
|
||||
// return this.checked.includes(v.id)
|
||||
// })
|
||||
|
||||
if(this.sendType == 'Residents') {
|
||||
if(this.type == '0') { // 居民包含
|
||||
uni.setStorageSync('ResidentTags', this.checked)
|
||||
} else if(this.type == '1') { // 居民剔除
|
||||
uni.setStorageSync('ResidentTagsRemove', this.checked)
|
||||
}
|
||||
} else if(this.sendType == 'CircleOfFriends') {
|
||||
if(this.type == '0') { // 朋友圈包含
|
||||
uni.setStorageSync('circleTags', this.checked)
|
||||
} else if(this.type == '1') { // 朋友圈剔除
|
||||
uni.setStorageSync('circleTagsRemove', this.checked)
|
||||
}
|
||||
}
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getTags()
|
||||
this.checked = []
|
||||
if(this.sendType == 'Residents') {
|
||||
if(this.type == 0) { // 居民包含
|
||||
this.checked = uni.getStorageSync('ResidentTags') || []
|
||||
} else { // 居民剔除
|
||||
this.checked = uni.getStorageSync('ResidentTagsRemove') || []
|
||||
}
|
||||
} else if(this.sendType == 'CircleOfFriends') {
|
||||
if(this.type == 0) { // 朋友圈包含
|
||||
this.checked = uni.getStorageSync('circleTags') || []
|
||||
} else { // 朋友圈剔除
|
||||
this.checked = uni.getStorageSync('circleTagsRemove') || []
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
document.title = o.type ==0? '包含标签': '剔除标签'
|
||||
this.sendType = o.sendType
|
||||
this.type = o.type
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -68,7 +68,6 @@ export default {
|
||||
if(!this.selected.userId) {
|
||||
return this.$u.toast('请选择创建人')
|
||||
}
|
||||
uni.$emit("pagePicker:custom", [this.selected])
|
||||
uni.setStorageSync('userSelect', this.selected)
|
||||
uni.navigateBack()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user