|
|
|
@ -9,14 +9,14 @@ |
|
|
|
<div class="dialog-h-content2 "> |
|
|
|
<el-form :inline="true" :model="formData" ref="form" :rules="dataRule" v-if="pageType != 'view'"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="发布渠道" prop="publishDitch"> |
|
|
|
<el-select v-model="formData.publishDitch" placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="发布范围" prop="orgId"> |
|
|
|
<el-cascader |
|
|
|
class="customer_cascader" |
|
|
|
@ -54,11 +54,15 @@ |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="发布范围" prop="publishRangeName">{{ formData.publishRangeName }}</el-form-item> |
|
|
|
<el-form-item label="发布范围" prop="publishRangeName"> |
|
|
|
<div style="max-height: 100px; overflow-y: auto;">{{ formData.publishRangeName }}</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="发布内容" prop="content">{{ formData.content }}</el-form-item> |
|
|
|
<el-form-item label="发布内容" prop="content"> |
|
|
|
<div style="max-height: 150px; overflow-y: auto;">{{ formData.content }}</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="发布时间" prop="content">{{ formData.publishTime }}</el-form-item> |
|
|
|
@ -159,7 +163,8 @@ export default { |
|
|
|
loading: false, |
|
|
|
|
|
|
|
searchValue: '', |
|
|
|
searchOptions: [] |
|
|
|
searchOptions: [], |
|
|
|
ids: [] |
|
|
|
}; |
|
|
|
}, |
|
|
|
watch: {}, |
|
|
|
@ -169,11 +174,11 @@ export default { |
|
|
|
this.user = this.$store.state.user; |
|
|
|
this.agencyId = this.user.agencyId; |
|
|
|
this.startLoading(); |
|
|
|
this.getOrgTreeList(); |
|
|
|
|
|
|
|
if (this.pageType != 'add') { |
|
|
|
this.getDetail(); |
|
|
|
} else { |
|
|
|
this.getOrgTreeList(); |
|
|
|
} |
|
|
|
await this.endLoading(); |
|
|
|
this.endLoading(); |
|
|
|
@ -201,19 +206,30 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleChangeAgency(val) { |
|
|
|
console.log('val', val); |
|
|
|
let obj = this.$refs['myCascader'].getCheckedNodes().map(item => { |
|
|
|
return { orgType: item.data.level === 'grid' ? 'grid' : 'agency', orgId: item.data.agencyId }; |
|
|
|
return item.data; |
|
|
|
}); |
|
|
|
this.ids = []; |
|
|
|
this.digui(obj); |
|
|
|
this.ids = new Set(this.ids); |
|
|
|
let arr = [...this.ids]; |
|
|
|
this.formData.rangeList = obj |
|
|
|
.map(item => { |
|
|
|
if (arr.indexOf(item.agencyId) == -1) { |
|
|
|
return { orgType: item.level === 'grid' ? 'grid' : 'agency', orgId: item.agencyId }; |
|
|
|
} |
|
|
|
}) |
|
|
|
.filter(ite => typeof ite !== 'undefined'); |
|
|
|
console.log(this.formData.rangeList); |
|
|
|
}, |
|
|
|
digui(node) { |
|
|
|
node.forEach(item => { |
|
|
|
if (item.subAgencyList) { |
|
|
|
item.subAgencyList.forEach(item2 => { |
|
|
|
this.ids.push(item2.agencyId); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
console.log('obj', obj); |
|
|
|
this.formData.rangeList = [...obj]; |
|
|
|
// let obj = this.$refs['myCascader'].getCheckedNodes()[0].data; |
|
|
|
// this.formData.orgType= obj.level |
|
|
|
// if (obj) { |
|
|
|
// this.orgType = obj.level === 'grid' ? 'grid' : 'agency'; |
|
|
|
// } else { |
|
|
|
// this.orgType = ''; |
|
|
|
// } |
|
|
|
}, |
|
|
|
async getDetail() { |
|
|
|
const url = `/message/organization/message/detail/${this.detailId}`; |
|
|
|
|