Browse Source

1

jly/task002
tianq 3 years ago
parent
commit
5d5a7c289c
  1. 50
      src/views/modules/workSys/addFormNotice.vue
  2. 4
      src/views/modules/workSys/noticeList.vue

50
src/views/modules/workSys/addFormNotice.vue

@ -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}`;

4
src/views/modules/workSys/noticeList.vue

@ -57,13 +57,13 @@
>
<el-table-column label="序号" header-align="center" align="center" type="index" width="50"></el-table-column>
<el-table-column prop="content" header-align="center" align="center" label="发布内容" show-overflow-tooltip="true" ></el-table-column>
<el-table-column prop="content" header-align="center" align="center" label="发布内容" :show-overflow-tooltip="true" ></el-table-column>
<el-table-column prop="publishDitch" header-align="center" align="center" label="发布渠道" width="110">
<template slot-scope="scope">
<span v-if="scope.row.publishDitch == 0">专属APP</span>
</template>
</el-table-column>
<el-table-column prop="publishRangeName" header-align="center" align="center" label="发布范围" show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="publishRangeName" header-align="center" align="center" label="发布范围" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="publishTime" header-align="center" align="center" label="发布时间" width="160"></el-table-column>
<el-table-column prop="count" align="center" width="110" label="操作" :show-overflow-tooltip="true">
<template slot-scope="scope">

Loading…
Cancel
Save