新增群发朋友圈

This commit is contained in:
shijingjing
2023-02-28 17:54:49 +08:00
parent c8ee9ca6cf
commit 37b74db75d

View File

@@ -72,6 +72,15 @@
<u-icon name="arrow-right" color="#CCD0D3"/>
</div>
</div>
<div class="examineChange">
<div><span class="color_red">*</span>结束时间</div>
<div @click="showEndTime = true">
<span class="color_gray" v-if="!form.taskEndTime.length">请选择</span>
<span v-else>{{ form.taskEndTime }}</span>
<u-icon name="arrow-right" color="#CCD0D3"/>
</div>
</div>
<u-picker v-model="showEndTime" :params="endParams" mode="time" @confirm="choiceEndTime"></u-picker>
</div>
<u-picker v-model="showTaskTime" :params="params" mode="time" @confirm="choiceTime"></u-picker>
@@ -123,7 +132,6 @@
</div>
</u-popup>
<div class="btn">
<div class="submitBtn" @click="confirm">通知成员发送</div>
</div>
@@ -131,7 +139,7 @@
</div>
</template>
<script>
remove<script>
import { mapActions } from "vuex";
export default {
name: "addPropaganda",
@@ -178,7 +186,8 @@ export default {
// taskId: null,
// }
], // 送达居民群
filterCriteria: ''
filterCriteria: '',
taskEndTime: '', // 任务结束时间
},
forms: {
taskTitle: '',
@@ -197,6 +206,7 @@ export default {
excludeFilterTags: [], // 剔除标签集合
addFromTime: '',
addEndTime: '',
taskEndTime: '', // 任务结束时间
},
enableExamine: false,
isTimedTask: false,
@@ -207,6 +217,7 @@ export default {
showPopup: false,
showFodder: false,
showUpload: false,
showEndTime: false,
params: {
year: true,
month: true,
@@ -216,6 +227,15 @@ export default {
second: true,
timestamp: false,
},
endParams: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true,
timestamp: false,
},
flag: false,
uploadList: [
{
@@ -386,6 +406,9 @@ export default {
this.form.choiceTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
},
choiceEndTime(e) {
this.form.taskEndTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
},
confirm() {
if(this.flag) return
@@ -428,12 +451,17 @@ export default {
if(this.type=='Residents' || this.type=='CircleOfFriends') {
this.forms.contents = this.form.contents
}
if(!this.form.taskTitle) {
return this.$u.toast('请输入任务名称')
}
if(this.type=='Residents' || this.type=='CircleOfFriends') {
this.forms.taskTitle = this.form.taskTitle
}
if(!this.form.sendScope) {
return this.$u.toast('请选择发送范围')
}
@@ -473,11 +501,15 @@ export default {
this.form.choiceTime = ''
}
if(!this.form.taskEndTime) {
return this.$u.toast("请选择结束时间")
}
this.flag = true
let formData = {}
let url = ''
if(this.type=='Residents') {
if(this.type=='CircleOfFriends' || this.type=='Residents') { //群发朋友圈、居民
url = `/app/whchatmomentstask/addOrUpdate`
this.forms.filterCriteria = this.girdListIds.toString() || this.deptListIds.toString() || ''
this.forms.filterTags = this.ResidentTags.toString() || this.circleTags.toString() || ''
@@ -485,8 +517,9 @@ export default {
this.forms.gender = this.sex
this.forms.addFromTime = this.startTime
this.forms.addEndTime = this.endTime
this.forms.taskEndTime = this.form.taskEndTime
formData = this.forms
} else if(this.type=='ResidentsGroup') {
} else if(this.type=='ResidentsGroup') { // 群发居民群
url = `/app/appmasssendingtask/addOrUpdate`
this.form.filterCriteria = this.girdListIds.toString() || this.deptListIds.toString() || ''
formData = this.form
@@ -499,12 +532,26 @@ export default {
uni.navigateBack()
}, 600)
}
}).then(()=> {
this.removeStorage()
}).catch((err)=>{
this.flag = false
this.$u.toast(err)
})
},
removeStorage() {
uni.removeStorageSync('userSelect')
uni.removeStorageSync('wxGroupsUser')
uni.removeStorageSync('girdSelect')
uni.removeStorageSync('deptList')
uni.removeStorageSync('sendScope')
uni.removeStorageSync('ResidentTags')
uni.removeStorageSync('ResidentTagsRemove')
uni.removeStorageSync('circleTags')
uni.removeStorageSync('circleTagsRemove')
},
getDeptUser() {
this.selectEnterpriseContact({
fromDepartmentId: 0,