协同宣发

This commit is contained in:
yanran200730
2023-03-01 10:04:58 +08:00
parent 04c47c0387
commit e709e1e74f
7 changed files with 260 additions and 165 deletions

View File

@@ -41,6 +41,17 @@
<div class="select-right">{{ form.filterCriteria.length ? '重新选择' : '选择' }}</div>
</div>
</ai-picker>
<div class="filter-item">
<label>标签</label>
<div class="AppAnnounceDetail-select" @click="isShowTags = true">
<el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.filterTagsName"></el-input>
<div class="select-left" v-if="form.filterTags.length">
<span v-for="(item, index) in form.filterTags" :key="index">{{ item.name }}</span>
</div>
<i v-if="!form.filterTags.length">请选择</i>
<div class="select-right">{{ form.filterTags.length ? '重新选择' : '选择' }}</div>
</div>
</div>
<div class="tips">
<p>消息预计送达居民群数</p>
<span>{{ groupLen }}</span>
@@ -51,16 +62,6 @@
</el-tooltip>
</div>
</el-form-item>
<el-form-item label="居民标签" style="width: 100%" v-if="form.sendScope !== '0'" prop="wxGroupsName">
<div class="AppAnnounceDetail-select" @click="isShowTags = true">
<el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.filterTagsName"></el-input>
<div class="select-left" v-if="form.filterTags.length">
<span v-for="(item, index) in form.filterTags" :key="index">{{ item.name }}</span>
</div>
<i v-if="!form.filterTags.length">请选择</i>
<div class="select-right">{{ form.filterTags.length ? '重新选择' : '选择' }}</div>
</div>
</el-form-item>
<el-form-item label="发送内容" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请输入发送内容', trigger: 'blur' }]">
<el-input size="small" type="textarea" :rows="6" maxlength="1300" show-word-limit placeholder="请输入文本内容..." v-model="form.content"></el-input>
<div class="add">
@@ -126,6 +127,17 @@
<em>从本地上传图片最大支持10MB支持JPG,PNG格式视频最大支持10MB支持MP4格式文件最大支持20MB</em>
</div>
</el-form-item>
<el-form-item label="任务结束时间" style="width: 100%;" prop="taskEndTime" :rules="[{ required: true, message: '请选择任务结束时间', trigger: 'change' }]">
<el-date-picker
style="width: 100%;"
v-model="form.taskEndTime"
type="datetime"
size="small"
:picker-options="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择任务结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="宣发审批" prop="enableExamine" style="width: 100%;" :rules="[{ required: true, message: '请输入任务名称', trigger: 'blur' }]">
<el-switch
v-model="form.enableExamine"
@@ -298,6 +310,7 @@ export default {
wxGroupsName: '',
sendScope: '0',
sendType: 0,
taskEndTime: '',
name: '',
filterTags: [],
filterTagsName: '',
@@ -360,17 +373,18 @@ export default {
onTagsConfirm () {
this.form.filterTagsName = this.chooseTags.map(v => v.name).join(',')
this.form.filterTags = [...this.chooseTags]
this.getWxGroups()
this.isShowTags = false
},
getInfo(id) {
this.instance.post(`/app/whchatmomentstask/customerTasKDetail?id=${id}`).then(res => {
this.instance.post(`/app/whchatmomentstask/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.form = {
...this.form,
...res.data,
wxGroupsName: '1',
filterTags: res.data.filterTags ? res.data.filterTags.split(',') : [],
filterCriteria: res.data.filterCriteria.split(',')
}
@@ -451,7 +465,7 @@ export default {
getWxGroups() {
this.instance.post(`/app/whchatmomentstask/getSendScope`, {
sendScope: this.form.sendScope,
filterTags: this.form.filterTags.map(v => v.id).join(','),
tags: this.form.filterTags.map(v => v.id).join(','),
filterCriteria: this.form.filterCriteria.join(','),
taskType: 0
}).then(res => {
@@ -589,7 +603,7 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
if (!this.form.executorList.length) {
return this.$message.error('居民数量不能为0')
return this.$message.error('居民数量不能为0')
}
if (sendType === 1 && !this.dateForm.choiceTime) {
@@ -736,6 +750,21 @@ export default {
overflow: hidden;
}
}
.filter-item {
display: flex;
align-items: center;
margin-top: 20px;
.AppAnnounceDetail-select {
flex: 1;
}
label {
width: 60px;
margin-right: 20px;
color: #666;
}
}
.ai-form {
textarea {

View File

@@ -157,6 +157,7 @@
this.instance.post(`/app/whchatmomentstask/list`, null, {
params: {
...this.search,
taskType: 0
}
}).then(res => {
if (res.code == 0) {