列表
This commit is contained in:
@@ -159,21 +159,30 @@ export default {
|
|||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
let url = ''
|
let url = ''
|
||||||
|
let data = {}
|
||||||
if(this.tabIndex==0) {
|
if(this.tabIndex==0) {
|
||||||
url = `/app/appmasssendingtask/list`
|
url = `/app/appmasssendingtask/list`
|
||||||
} else if(this.tabIndex==1 || this.tabIndex==2) {
|
data = {
|
||||||
url = `/app/whchatmomentstask/list`
|
|
||||||
}
|
|
||||||
this.$http.post(url, null, {
|
|
||||||
params: {
|
|
||||||
current: this.current,
|
current: this.current,
|
||||||
taskTitle: this.taskTitle,
|
taskTitle: this.taskTitle,
|
||||||
startTime: this.start,
|
startTime: this.start,
|
||||||
endTime: this.end,
|
endTime: this.end,
|
||||||
createUserId: this.createUserId,
|
createUserId: this.createUserId,
|
||||||
status: this.status
|
status: this.status,
|
||||||
}
|
}
|
||||||
}).then(res=> {
|
} else if(this.tabIndex==1 || this.tabIndex==2) {
|
||||||
|
url = `/app/whchatmomentstask/list`
|
||||||
|
data = {
|
||||||
|
current: this.current,
|
||||||
|
taskTitle: this.taskTitle,
|
||||||
|
startTime: this.start,
|
||||||
|
endTime: this.end,
|
||||||
|
createUserId: this.createUserId,
|
||||||
|
status: this.status,
|
||||||
|
taskType: this.tabIndex == 0? '': this.tabIndex==1? 1:0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$http.post(url,null, {params:{...data}}).then(res=> {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
this.list = this.current == 1? res.data.records : [...this.list,...res.data.records]
|
this.list = this.current == 1? res.data.records : [...this.list,...res.data.records]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,9 @@
|
|||||||
<div><span class="color_red">*</span><span class="title">发送范围</span></div>
|
<div><span class="color_red">*</span><span class="title">发送范围</span></div>
|
||||||
<div @click="toSleectScoped">
|
<div @click="toSleectScoped">
|
||||||
<span>
|
<span>
|
||||||
<span class="color_gray" v-if="!form.sendScope">请选择</span>
|
<span class="color_gray" v-if="!form.sendScope || sum==0">请选择</span>
|
||||||
<span v-if="form.sendScope">预计送达{{ form.wxGroups.length }}名成员</span>
|
<span v-if="type=='ResidentsGroup' && form.wxGroups.length">预计送达{{ form.wxGroups.length }}名成员</span>
|
||||||
|
<span v-if="type!='ResidentsGroup' && sum != 0">预计送达{{ sum }}名成员</span>
|
||||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -183,9 +184,9 @@ export default {
|
|||||||
taskType: '',
|
taskType: '',
|
||||||
executorList: [], // 任务执行人集合(群发朋友圈的执行人)
|
executorList: [], // 任务执行人集合(群发朋友圈的执行人)
|
||||||
groupList: [], // 添加人集合
|
groupList: [], // 添加人集合
|
||||||
contentList: [], // 发送内容
|
contents: [], // 发送内容
|
||||||
enableExamine: '0', // 是否需要审批 0否 1是
|
enableExamine: '0', // 是否需要审批 0否 1是
|
||||||
examineList: [], // 审批人
|
examines: [], // 审批人
|
||||||
choiceTime: '', // 定时发送时间
|
choiceTime: '', // 定时发送时间
|
||||||
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
||||||
sendType: '0', // 0:立即发送、1:定时发送
|
sendType: '0', // 0:立即发送、1:定时发送
|
||||||
@@ -233,6 +234,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
midiaIds: [],
|
midiaIds: [],
|
||||||
|
sum: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -386,7 +388,7 @@ export default {
|
|||||||
this.form.contents.push(...files)
|
this.form.contents.push(...files)
|
||||||
|
|
||||||
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
||||||
this.forms.contentList = this.form.contents
|
this.forms.contents = this.form.contents
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.form.taskTitle) {
|
if(!this.form.taskTitle) {
|
||||||
@@ -434,16 +436,18 @@ export default {
|
|||||||
this.flag = true
|
this.flag = true
|
||||||
|
|
||||||
let formData = {}
|
let formData = {}
|
||||||
|
let url = ''
|
||||||
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
||||||
|
url = `/app/whchatmomentstask/addOrUpdate`
|
||||||
formData = this.forms
|
formData = this.forms
|
||||||
} else if(this.type=='ResidentsGroup') {
|
} else if(this.type=='ResidentsGroup') {
|
||||||
|
url = `/app/appmasssendingtask/addOrUpdate`
|
||||||
formData = this.form
|
formData = this.form
|
||||||
}
|
}
|
||||||
this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...formData }).then(res=>{
|
this.$http.post(url, { ...formData }).then(res=>{
|
||||||
if(res?.code ==0) {
|
if(res?.code == 0) {
|
||||||
this.flag = false
|
this.flag = false
|
||||||
this.$u.toast("新增成功")
|
this.$u.toast("新增成功")
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch((err)=>{
|
}).catch((err)=>{
|
||||||
this.flag = false
|
this.flag = false
|
||||||
@@ -477,14 +481,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.form.wxGroups = uni.getStorageSync('wxGroupsUser') || []
|
this.form.wxGroups = uni.getStorageSync('wxGroupsUser') || []
|
||||||
this.form.sendScope = uni.getStorageSync('sendScope')
|
this.form.sendScope = uni.getStorageSync('sendScope')
|
||||||
if(this.type=='Residents') {
|
if(this.type=='Residents') {
|
||||||
this.forms.taskType = 1
|
this.forms.taskType = 1
|
||||||
|
this.forms.sendScope = this.form.sendScope
|
||||||
this.forms.groupList = this.form.wxGroups
|
this.forms.groupList = this.form.wxGroups
|
||||||
|
this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0)
|
||||||
} else if(this.type=='CircleOfFriends') {
|
} else if(this.type=='CircleOfFriends') {
|
||||||
this.forms.taskType = 0
|
this.forms.taskType = 0
|
||||||
|
this.forms.sendScope = this.form.sendScope
|
||||||
this.forms.executorList = this.form.wxGroups
|
this.forms.executorList = this.form.wxGroups
|
||||||
|
this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0)
|
||||||
}
|
}
|
||||||
this.forms.taskTitle = this.form.taskTitle
|
this.forms.taskTitle = this.form.taskTitle
|
||||||
|
|
||||||
|
|||||||
@@ -65,27 +65,25 @@ export default {
|
|||||||
submit() {
|
submit() {
|
||||||
if(this.sendType == 'ResidentsGroup') {
|
if(this.sendType == 'ResidentsGroup') {
|
||||||
this.getWxGroups()
|
this.getWxGroups()
|
||||||
} else if(this.sendType == 'Residents') {
|
} else if(this.sendType == 'Residents' || this.sendType == 'CircleOfFriends') {
|
||||||
this.getResidents()
|
this.getSendScope()
|
||||||
} else if(this.sendType == 'CircleOfFriends') {
|
|
||||||
this.getCircleOfFriends()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.setStorageSync('sendScope', this.sendScope)
|
uni.setStorageSync('sendScope', this.sendScope)
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
success: () => {
|
// success: () => {
|
||||||
uni.$emit('predictUser', this.wxGroups)
|
// uni.$emit('predictUser', this.wxGroups)
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
}, 1000)
|
// }, 1000)
|
||||||
|
|
||||||
},
|
},
|
||||||
// 群发居民群
|
// 群发居民群
|
||||||
getWxGroups() {
|
getWxGroups() {
|
||||||
this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`,
|
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 => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.wxGroups = res.data
|
this.wxGroups = res.data
|
||||||
@@ -93,37 +91,33 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 群发居民
|
// 群发朋友圈、居民
|
||||||
getResidents() {
|
getSendScope() {
|
||||||
const tags = this.ResidentTags.join(',')
|
let formData = {}
|
||||||
const removeTags = this.ResidentTagsRemove.join(',')
|
if(this.sendScope == 0) {
|
||||||
this.$http.post(`/app/whchatmomentstask/getCustomerGroups?sendScope=${this.sendScope}&addFromTime=${this.startTime}&addEndTime=${this.endTime}&gender=${this.sex}&filteTags=${tags}&excludeFilterTags=${removeTags}`,
|
formData = {
|
||||||
{
|
sendScope: this.sendScope,
|
||||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(','),
|
taskType: this.sendType == 'Residents'? 1:0,
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
// this.groupList = res.data
|
|
||||||
// uni.setStorageSync('groupList', this.groupList)
|
|
||||||
this.wxGroups = res.data
|
|
||||||
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
|
||||||
}
|
}
|
||||||
})
|
} else if(this.sendScope == 1 || this.sendScope == 2) {
|
||||||
},
|
formData = {
|
||||||
|
filterCriteria: this.girdListIds.toString() || this.deptListIds.toString() || '',
|
||||||
// const array1 = [{name:'zs',num: 1},{name:'zls',num: 5},{name:'azs',num: 4}]
|
sendScope: this.sendScope,
|
||||||
// const sum = array1.reduce((pre, cur) => pre + cur.num, 0)
|
tags: this.ResidentTags.toString() || this.circleTags.toString() || '',
|
||||||
// console.log(sum)
|
excludeTags: this.ResidentTagsRemove.toString() || this.circleTagsRemove.toString() || '',
|
||||||
|
addFromTime: this.startTime,
|
||||||
// 群发朋友圈
|
addEndTime: this.endTime,
|
||||||
getCircleOfFriends() {
|
gender: this.sex,
|
||||||
this.$http.post(`/app/whchatmomentstask/getExecutors?sendScope=${this.sendScope}`,
|
taskType: this.sendType == 'Residents'? 1:0,
|
||||||
{
|
}
|
||||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
|
}
|
||||||
}).then(res => {
|
this.$http.post(`/app/whchatmomentstask/getSendScope`,{...formData}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
// this.executorList = res.data
|
if(this.sendType == 'Residents') {
|
||||||
// uni.setStorageSync('executorList', this.executorList)
|
this.wxGroups = res.data
|
||||||
this.wxGroups = res.data
|
} else if(this.sendType == 'CircleOfFriends') {
|
||||||
|
this.wxGroups = res.data
|
||||||
|
}
|
||||||
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -148,14 +142,14 @@ export default {
|
|||||||
if(this.sendType == 'Residents') {
|
if(this.sendType == 'Residents') {
|
||||||
this.ResidentTags = uni.getStorageSync('ResidentTags') // 居民包含
|
this.ResidentTags = uni.getStorageSync('ResidentTags') // 居民包含
|
||||||
this.ResidentTagsRemove = uni.getStorageSync('ResidentTagsRemove') // 居民剔除
|
this.ResidentTagsRemove = uni.getStorageSync('ResidentTagsRemove') // 居民剔除
|
||||||
|
} else if(this.sendType == 'CircleOfFriends') {
|
||||||
|
this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
|
||||||
|
this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
|
||||||
}
|
}
|
||||||
// 时间
|
// 时间
|
||||||
this.startTime = uni.getStorageSync('startTime')
|
this.startTime = uni.getStorageSync('startTime')
|
||||||
this.endTime = uni.getStorageSync('endTime')
|
this.endTime = uni.getStorageSync('endTime')
|
||||||
// else if(this.sendType == 'CircleOfFriends') {
|
|
||||||
// this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
|
|
||||||
// this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (!this.checked.length) {
|
// if (!this.checked.length) {
|
||||||
return this.$u.toast('请选择标签')
|
// return this.$u.toast('请选择标签')
|
||||||
}
|
// }
|
||||||
|
|
||||||
// const list = this.subTags.filter(v => {
|
// const list = this.subTags.filter(v => {
|
||||||
// return this.checked.includes(v.id)
|
// return this.checked.includes(v.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user