From 270a0b320562d663baa742a35bbe2b1e488c8837 Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Fri, 12 Aug 2022 13:52:39 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/shequzhili/event/eventList.vue | 100 +++++++++++++++++-
1 file changed, 96 insertions(+), 4 deletions(-)
diff --git a/src/views/modules/shequzhili/event/eventList.vue b/src/views/modules/shequzhili/event/eventList.vue
index 1790d751b..1632a2d5c 100644
--- a/src/views/modules/shequzhili/event/eventList.vue
+++ b/src/views/modules/shequzhili/event/eventList.vue
@@ -46,7 +46,26 @@
placeholder="请输入">
-
+
+
+
+
-
+
+
item.level === 1)
+ let level2 = nodes.filter(item => item.level === 2)
+ console.log('level2----1', level2)
+ level1.forEach(item => {
+ console.log('level2----2', level2)
+ if (item.hasChildren) {
+ for (let i = level2.length - 1; i >= 0; i--) {
+ if (level2[i].parent.value === item.value) level2.splice(i, 1)
+ }
+ }
+ })
+ this.formData.firstIdList = level1.map(item => item.value)
+ this.formData.secondIdList = level2.map(item => item.value)
+ },
handleSelectionChange (val) {
this.multipleSelection = [];
val.forEach(element => {
@@ -692,6 +746,23 @@ export default {
this.$message.error(msg);
}
},
+ async getCateOptions() {
+ const url = "/gov/issue/issueprojectcategorydict/list";
+
+ const { data, code, msg } = await requestPost(url, {});
+
+ if (code === 0) {
+ // this.cateOptions = data.map((item) => {
+ // item.subCategory.forEach((subitem) => {
+ // delete subitem.subCategory;
+ // });
+ // return item;
+ // });
+ this.cateOptions = this.deepTree(data, 'subCategory')
+ } else {
+ this.$message.error(msg);
+ }
+ },
handleSizeChange (val) {
@@ -715,12 +786,27 @@ export default {
startTime: '',
endTime: '',
status: '',
+ firstIdList: [],
+ secondIdList: [],
}
+ this.eventTypeCheck = []
+
-
- // this.pageNo = 1
+ this.pageNo = 1
+ this.getTableData();
// this.loadTable()
},
+ deepTree(arr, child) {
+ if (Array.isArray(arr) && arr.length > 0) {
+ return arr.map(item => {
+ // if (child === 'subAgencyList') item.value = item.orgType + '-' + item.orgId
+ return {
+ ...item,
+ [child]: item[child] && item[child].length > 0 && this.deepTree(item[child], child) || null
+ }
+ })
+ }
+ }
},
};
@@ -729,4 +815,10 @@ export default {
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
+.div_search {
+ .item_width_2 {
+ width: 200px;
+ }
+}
+