BUG 30340

This commit is contained in:
aixianling
2022-06-27 10:45:29 +08:00
parent aa846b62a7
commit 6e5a1c3921
2 changed files with 3 additions and 38 deletions

View File

@@ -15,20 +15,16 @@
<template #content> <template #content>
<el-form size="small" class="ai-form" :rules="rules" ref="form" :model="form" label-width="100px" label-position="right"> <el-form size="small" class="ai-form" :rules="rules" ref="form" :model="form" label-width="100px" label-position="right">
<el-form-item label="发送方式" prop="messageSource" style="width: 50%"> <el-form-item label="发送方式" prop="messageSource" style="width: 50%">
<el-radio v-model="form.messageSource" label="2">居民群</el-radio> <el-radio v-model="form.messageSource" label="2">居民群</el-radio>
<el-radio v-model="form.messageSource" label="1">居民</el-radio> <el-radio v-model="form.messageSource" label="1">居民</el-radio>
</el-form-item> </el-form-item>
<el-form-item label="地区选择" style="width: 100%"> <el-form-item label="地区选择" style="width: 100%">
<ai-area-get v-model="areaId" :root="areaRootId" :instance="instance" @select="handleAreaSelect" multiple size="small" placeholder="全部地区"/> <ai-area-get v-model="areaId" :root="areaRootId" :instance="instance" @select="handleAreaSelect" multiple size="small" placeholder="全部地区"/>
</el-form-item> </el-form-item>
<el-form-item label="发送范围" style="width: 100%"> <el-form-item label="发送范围" style="width: 100%">
<select-dept-user v-model="form.deptList" v-bind="$props" :source="form.messageSource"/> <select-dept-user v-model="form.deptList" v-bind="$props" :source="form.messageSource"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
</ai-card> </ai-card>
@@ -131,11 +127,7 @@ export default {
contentType: 'text', contentType: 'text',
fileList: [], fileList: [],
organization: '', organization: '',
deptList: [{ deptList: [],
corpId: "",
objList: [],
tagId: [],
}],
}, },
tags: [], tags: [],
subTags: {}, subTags: {},
@@ -151,10 +143,6 @@ export default {
imgs: [], imgs: [],
videos: [], videos: [],
files: [], files: [],
// orgIdList: '',
// orgNameList: [],
// orgSelect: '',
// orgAllList: [],
rules: { rules: {
content: [{required: true, message: '请输入群发内容'}], content: [{required: true, message: '请输入群发内容'}],
messageSource: [{required: true, message: '请选择群发方式'}], messageSource: [{required: true, message: '请选择群发方式'}],
@@ -162,7 +150,6 @@ export default {
}, },
} }
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
tagsChange() { tagsChange() {
@@ -174,37 +161,16 @@ export default {
return this.form.areaId = this.areaId.toString(); return this.form.areaId = this.areaId.toString();
}, },
}, },
// watch: {
// orgNameList: {
// handler: function (v) {
// this.orgSelect = `已选择${v.length}个组织`
// }
// }
// },
created() { created() {
if (this.$route.query.id) { if (this.$route.query.id) {
this.getInfo() this.getInfo()
} }
this.areaRootId = [this.user.info.areaId.substr(0, 6), '000000'].join("") this.areaRootId = [this.user.info.areaId.substr(0, 6), '000000'].join("")
}, },
methods: { methods: {
handleAreaSelect(v) { handleAreaSelect(v) {
this.areaName = v?.[0]?.label this.areaName = v?.[0]?.label
}, },
// 标签
// getSubTags() {
// this.instance.post(`/app/wxcp/wxgroupchattag/listAllByCorp?dvcpId=${this.orgIdList}`).then(res => {
// if (res?.data) {
// console.log(res);
// this.subTags = res.data.records
// }
// })
// },
getInfo() { getInfo() {
this.instance.post(`/app/pushmessage/detail?id=${this.$route.query.id}`).then(res => { this.instance.post(`/app/pushmessage/detail?id=${this.$route.query.id}`).then(res => {
if (res?.data) { if (res?.data) {
@@ -270,7 +236,7 @@ export default {
cancel(isRefresh) { cancel(isRefresh) {
this.$emit('change', { this.$emit('change', {
type: 'List', type: 'List',
isRefresh: isRefresh ? true : false isRefresh: !!isRefresh
}) })
} }
} }

View File

@@ -108,7 +108,7 @@ export default {
params: {departmentId, status: 1, cid} params: {departmentId, status: 1, cid}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
res.data = res.data.map(e => ({...e, kind: "user"})) res.data = res.data.map(e => ({...e, kind: "user", checked: false}))
this.options = [this.options, res.data].flat() this.options = [this.options, res.data].flat()
} }
}) })
@@ -160,7 +160,6 @@ export default {
return !!this.selected.find(e => e.uid == uid) return !!this.selected.find(e => e.uid == uid)
}, },
handleCheck(row, i) { handleCheck(row, i) {
row.checked = !row.checked
if (row.checked) { if (row.checked) {
this.selected.push(row) this.selected.push(row)
} else { } else {