This commit is contained in:
yanran200730
2022-07-20 18:04:06 +08:00
parent a29a934e95
commit 12bb196de3

View File

@@ -23,24 +23,24 @@
<el-form-item label="选择群主" v-if="form.sendScope !== '0'" prop="wxGroupsName" style="width: 100%;" :rules="[{ required: true, message: '请选择选择群主', trigger: 'change' }]">
<div class="AppAnnounceDetail-select">
<el-input size="small" class="AppAnnounceDetail-select__input" placeholder="请选择..." disabled v-model="form.wxGroupsName"></el-input>
<div class="select-left" v-if="form.groupIds.length">
<span v-for="(item, index) in form.groupIds" :key="index">
<div class="select-left" v-if="form.filterCriteria.length">
<span v-for="(item, index) in form.filterCriteria" :key="index">
<ai-open-data type="departmentName" :openid="item"></ai-open-data>
</span>
</div>
<i v-if="!form.groupIds.length">请选择</i>
<i v-if="!form.filterCriteria.length">请选择</i>
<ai-picker
:instance="instance"
multiple
:action="form.sendScope === '1' ? '/app/wxcp/wxdepartment/departList' : '/app/appgirdinfo/girdList'"
v-model="form.groupIds"
v-model="form.filterCriteria"
@change="onSelcetChange">
<div class="select-right">选择</div>
</ai-picker>
</div>
<div class="tips">
<p>消息预计送达居民群数</p>
<span>{{ form.groupIds.length }}</span>
<span>{{ form.filterCriteria.length }}</span>
<el-tooltip
placement="top"
content="任务开始后3天内15分钟更新1次3天后访问页面时触发更新1时间最多刷新1次">
@@ -143,7 +143,7 @@
<el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.examinesName"> </el-input>
<div class="select-left" v-if="form.examines.length">
<span v-for="(item, index) in form.examines" :key="index">
<ai-open-data type="userName" :openid="item.id"></ai-open-data>
<ai-open-data type="userName" :openid="item.wxOpenUserId"></ai-open-data>
</span>
</div>
<i v-if="!form.examines.length">请选择</i>
@@ -177,7 +177,7 @@
</div>
<div class="msg-item__right" :class="[['1', '2'].indexOf(item.msgType) !== -1 ? 'left-border' : '']">
<div class="msg-wrapper msg-img" v-if="item.msgType === '1'">
<img :src="item.url" />
<img :src="item.imgPicUrl" />
</div>
<div class="msg-wrapper msg-video" v-if="item.msgType === '2'">
<video controls :src="item.url"></video>
@@ -321,11 +321,11 @@
enableExamine: '0',
examines: [],
wxGroups: [],
groupIds: [],
wxGroupsName: '',
sendScope: '0',
sendType: 0,
name: '',
filterCriteria: [],
taskTitle: '',
examinesName: ''
},
@@ -361,14 +361,37 @@
...mapActions(['initOpenData', 'transCanvas']),
getInfo (id) {
this.instance.post(`/app/wxcp/wxuser/queryDetailById?id=${id}`).then(res => {
this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.form = {
...res.data,
departmentName: res.data.departmentNames,
tagIds: res.data.tags.map(v => v.id),
departmentIds: res.data.departmentIdsStr.split(',')
wxGroupsName: '1',
filterCriteria: res.data.filterCriteria.split(',')
}
if (res.data.examines && res.data.examines.length) {
this.form.examines = res.data.examines.map(v => {
return {
...v,
wxOpenUserId: v.examineUserId,
id: v.examineUserId
}
})
this.form.examinesName = '1'
}
const content = res.data.contents.filter(v => v.msgType === '0')
if (content.length) {
this.form.content = content[0].content
}
this.fileList = res.data.contents.filter(v => v.msgType !== '0').map(v => {
return {
...v,
...v.sysFile
}
})
}
})
},
@@ -385,7 +408,7 @@
if (e === '0') {
this.getWxGroups()
} else {
this.form.groupIds = []
this.form.filterCriteria = []
}
},
@@ -401,11 +424,11 @@
getWxGroups () {
this.instance.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.form.sendScope}`, null, {
data: {
groupIds: this.form.groupIds.join(',')
filterCriteria: this.form.filterCriteria.join(',')
},
headers: {'Content-Type': 'application/json;charset=utf-8'},
transformRequest: [function (data) {
return data.groupIds
return data.filterCriteria
}]
}).then(res => {
if (res.code === 0) {
@@ -508,6 +531,7 @@
...res.data.file,
media: res.data.media,
msgType: type,
sysFileId: res.data.file.id,
imgPicUrl: res.data.file.url,
mediaId: res.data.media.mediaId
})
@@ -517,16 +541,6 @@
})
},
onChange (e) {
if (e.length) {
this.form.departmentIds = e.map(v => v.id)
this.form.departmentName = e.map(v => v.name).join(',')
} else {
this.form.departmentIds = ''
this.form.departmentName = ''
}
},
confirm (sendType) {
this.$refs.form.validate((valid) => {
if (valid) {
@@ -547,6 +561,7 @@
id: this.params.id,
wxGroups: this.form.wxGroups,
contents,
filterCriteria: this.form.filterCriteria.join(','),
examines: this.form.examines.length ? this.form.examines.map(v => {
return {
...v,
@@ -931,6 +946,7 @@
color: #888888;
font-size: 14px;
font-style: normal;
border-right: 1px solid #D0D4DC;
background: #fff;
}