Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
		| @@ -159,21 +159,24 @@ export default { | ||||
|     }, | ||||
|     getList() { | ||||
|       let url = '' | ||||
|       let data = { | ||||
|         current: this.current, | ||||
|         taskTitle: this.taskTitle, | ||||
|         startTime: this.start, | ||||
|         endTime: this.end, | ||||
|         createUserId: this.createUserId, | ||||
|         status: this.status, | ||||
|       } | ||||
|       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 | ||||
|         data = { | ||||
|           ...data, | ||||
|           taskType: this.tabIndex == 0? '': this.tabIndex==1? 1:0 | ||||
|         } | ||||
|       }).then(res=> { | ||||
|       } | ||||
|       this.$http.post(url,null, {params:{...data}}).then(res=> { | ||||
|         if(res?.data) { | ||||
|           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 @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 | ||||
|      | ||||
|   | ||||
| @@ -65,27 +65,25 @@ export default { | ||||
|     submit() { | ||||
|       if(this.sendType == 'ResidentsGroup') { | ||||
|         this.getWxGroups() | ||||
|       } else if(this.sendType == 'Residents') { | ||||
|         this.getResidents() | ||||
|       } else if(this.sendType == 'CircleOfFriends') { | ||||
|         this.getCircleOfFriends() | ||||
|       } else if(this.sendType == 'Residents' || this.sendType == 'CircleOfFriends') { | ||||
|         this.getSendScope() | ||||
|       } | ||||
|        | ||||
|       uni.setStorageSync('sendScope', this.sendScope) | ||||
|       setTimeout(() => { | ||||
|       // setTimeout(() => { | ||||
|         uni.navigateBack({ | ||||
|           success: () => { | ||||
|             uni.$emit('predictUser', this.wxGroups) | ||||
|           } | ||||
|           // success: () => { | ||||
|           //   uni.$emit('predictUser', this.wxGroups) | ||||
|           // } | ||||
|         }) | ||||
|       }, 1000) | ||||
|       // }, 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 | ||||
| @@ -93,37 +91,33 @@ export default { | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     // 群发居民 | ||||
|     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) | ||||
|     // 群发朋友圈、居民 | ||||
|     getSendScope() { | ||||
|       let formData = {} | ||||
|       if(this.sendScope == 0) { | ||||
|         formData = { | ||||
|           sendScope: this.sendScope, | ||||
|           taskType: this.sendType == 'Residents'? 1:0, | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     // 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 => { | ||||
|       } else if(this.sendScope == 1 || this.sendScope == 2) { | ||||
|         formData = { | ||||
|           filterCriteria: this.girdListIds.toString() || this.deptListIds.toString() || '', | ||||
|           sendScope: this.sendScope, | ||||
|           tags: this.ResidentTags.toString() || this.circleTags.toString() || '', | ||||
|           excludeTags: this.ResidentTagsRemove.toString() || this.circleTagsRemove.toString() || '', | ||||
|           addFromTime: this.startTime, | ||||
|           addEndTime: this.endTime, | ||||
|           gender: this.sex, | ||||
|           taskType: this.sendType == 'Residents'? 1:0, | ||||
|         } | ||||
|       } | ||||
|       this.$http.post(`/app/whchatmomentstask/getSendScope`,{...formData}).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           // this.executorList = res.data | ||||
|           // uni.setStorageSync('executorList', this.executorList) | ||||
|           this.wxGroups = res.data | ||||
|           if(this.sendType == 'Residents') { | ||||
|             this.wxGroups = res.data | ||||
|           } else if(this.sendType == 'CircleOfFriends') { | ||||
|             this.wxGroups = res.data | ||||
|           } | ||||
|           uni.setStorageSync('wxGroupsUser', this.wxGroups) | ||||
|         } | ||||
|       }) | ||||
| @@ -148,14 +142,14 @@ export default { | ||||
|     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.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> | ||||
|   | ||||
| @@ -47,9 +47,9 @@ export default { | ||||
|       } | ||||
|     }, | ||||
|     submit() { | ||||
|       if (!this.checked.length) { | ||||
|         return this.$u.toast('请选择标签') | ||||
|       } | ||||
|       // if (!this.checked.length) { | ||||
|       //   return this.$u.toast('请选择标签') | ||||
|       // } | ||||
|  | ||||
|       // const list = this.subTags.filter(v => { | ||||
|       //   return this.checked.includes(v.id) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user