diff --git a/src/views/modules/workSys/addFormNotice.vue b/src/views/modules/workSys/addFormNotice.vue
index 0d684bf86..86d4f2db5 100644
--- a/src/views/modules/workSys/addFormNotice.vue
+++ b/src/views/modules/workSys/addFormNotice.vue
@@ -9,14 +9,14 @@
-
+
-
+
- {{ formData.publishRangeName }}
+
+ {{ formData.publishRangeName }}
+
- {{ formData.content }}
+
+ {{ formData.content }}
+
{{ formData.publishTime }}
@@ -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}`;
diff --git a/src/views/modules/workSys/noticeList.vue b/src/views/modules/workSys/noticeList.vue
index eb9dd7740..078fb831d 100644
--- a/src/views/modules/workSys/noticeList.vue
+++ b/src/views/modules/workSys/noticeList.vue
@@ -57,13 +57,13 @@
>
-
+
专属APP
-
+