列表
This commit is contained in:
@@ -9,8 +9,9 @@
|
||||
<div><span class="color_red">*</span><span class="title">发送范围</span></div>
|
||||
<div @click="toSleectScoped">
|
||||
<span>
|
||||
<span class="color_gray" v-if="!form.sendScope">请选择</span>
|
||||
<span v-if="form.sendScope">预计送达{{ form.wxGroups.length }}名成员</span>
|
||||
<span class="color_gray" v-if="!form.sendScope || sum==0">请选择</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>
|
||||
</span>
|
||||
</div>
|
||||
@@ -183,9 +184,9 @@ export default {
|
||||
taskType: '',
|
||||
executorList: [], // 任务执行人集合(群发朋友圈的执行人)
|
||||
groupList: [], // 添加人集合
|
||||
contentList: [], // 发送内容
|
||||
contents: [], // 发送内容
|
||||
enableExamine: '0', // 是否需要审批 0否 1是
|
||||
examineList: [], // 审批人
|
||||
examines: [], // 审批人
|
||||
choiceTime: '', // 定时发送时间
|
||||
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
||||
sendType: '0', // 0:立即发送、1:定时发送
|
||||
@@ -233,6 +234,7 @@ export default {
|
||||
}
|
||||
],
|
||||
midiaIds: [],
|
||||
sum: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -386,7 +388,7 @@ export default {
|
||||
this.form.contents.push(...files)
|
||||
|
||||
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
||||
this.forms.contentList = this.form.contents
|
||||
this.forms.contents = this.form.contents
|
||||
}
|
||||
|
||||
if(!this.form.taskTitle) {
|
||||
@@ -434,16 +436,18 @@ export default {
|
||||
this.flag = true
|
||||
|
||||
let formData = {}
|
||||
let url = ''
|
||||
if(this.type=='Residents' || this.type=='CircleOfFriends') {
|
||||
url = `/app/whchatmomentstask/addOrUpdate`
|
||||
formData = this.forms
|
||||
} else if(this.type=='ResidentsGroup') {
|
||||
url = `/app/appmasssendingtask/addOrUpdate`
|
||||
formData = this.form
|
||||
}
|
||||
this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...formData }).then(res=>{
|
||||
if(res?.code ==0) {
|
||||
this.$http.post(url, { ...formData }).then(res=>{
|
||||
if(res?.code == 0) {
|
||||
this.flag = false
|
||||
this.$u.toast("新增成功")
|
||||
|
||||
}
|
||||
}).catch((err)=>{
|
||||
this.flag = false
|
||||
@@ -477,14 +481,18 @@ export default {
|
||||
}
|
||||
},
|
||||
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.sendScope = this.form.sendScope
|
||||
this.forms.groupList = this.form.wxGroups
|
||||
this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0)
|
||||
} else if(this.type=='CircleOfFriends') {
|
||||
this.forms.taskType = 0
|
||||
this.forms.sendScope = this.form.sendScope
|
||||
this.forms.executorList = this.form.wxGroups
|
||||
this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0)
|
||||
}
|
||||
this.forms.taskTitle = this.form.taskTitle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user