diff --git a/src/layout/newyjLayout.vue b/src/layout/newyjLayout.vue index f25d4de..392fef9 100644 --- a/src/layout/newyjLayout.vue +++ b/src/layout/newyjLayout.vue @@ -79,12 +79,12 @@ export default { icon1: require("../assets/images/zhifa.png"), icon2: require("../assets/images/zhifa-change.png"), }, - // { - // path: "/enterprise", - // name: "企业名录", - // icon1: require("../assets/images/qiye.png"), - // icon2: require("../assets/images/qiye-change.png"), - // }, + { + path: "/enterprise", + name: "企业名录", + icon1: require("../assets/images/qiye.png"), + icon2: require("../assets/images/qiye-change.png"), + }, { path: "/focusEnter", name: "省重点企业", diff --git a/src/permission.js b/src/permission.js index bed22d8..7d0b351 100644 --- a/src/permission.js +++ b/src/permission.js @@ -13,7 +13,8 @@ const whiteList = [ '/focusEnter', '/enforcing', "/planManage", - "/home" + "/home", + '/enterprise' ]; diff --git a/src/router/index.js b/src/router/index.js index c21d18c..b6f5a35 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -96,17 +96,17 @@ export const constantRoutes = [ name: "enforcing", meta:{index:2} }, - // { - // path: "/enterprise", - // component: () => import("@/views/yingji/enterprise.vue"), - // name: "enterprise", - // meta:{index:3} - // }, + { + path: "/enterprise", + component: () => import("@/views/yingji/enterprise.vue"), + name: "enterprise", + meta:{index:3} + }, { path: "/focusEnter", component: () => import("@/views/yingji/focusEnter.vue"), name: "focusEnter", - meta:{index:3} + meta:{index:4} }, ], diff --git a/src/views/components/dialog/index.vue b/src/views/components/dialog/index.vue index 338196d..df9f076 100644 --- a/src/views/components/dialog/index.vue +++ b/src/views/components/dialog/index.vue @@ -29,7 +29,7 @@
-
+ + + + +
+
是否重点:
+ + + +
-
重大危险源等级:
- +
企业分色:
+
-
企业分色:
- +
重大危险源等级:
+
-
+ +
+
统一社会信用代码:
-
搜索
-
导入
+
+
搜索
+
重置
+
导入
+
- + - - + --> - + - - - @@ -169,7 +180,7 @@
@@ -177,21 +188,32 @@
计划年份:
- - - - + + +
+
+
行政区划:
+
计划标题:
@@ -201,7 +223,7 @@
计划内容:
{ this.compartment = res.data; - }); - //获取其余字典信息 - listDist({ - list: "major_hazard_level,entpr_color,economic_categories,economic_subcategory", - }).then((res) => { - this.otherDict = res.data; - res.data.economic_categories.forEach((value, index) => { - this.zhEconomicType[0].children.push({ - value: value.dictValue, - label: value.dictLabel, + this.filterComparment(this.compartment); + console.log(this.compartment); + }), + //获取其余字典信息 + listDist({ + list: "major_hazard_level,entpr_color,economic_categories,economic_subcategory", + }).then((res) => { + this.otherDict = res.data; + res.data.economic_categories.forEach((value, index) => { + this.zhEconomicType[0].children.push({ + value: value.dictValue, + label: value.dictLabel, + }); }); - }); - res.data.economic_subcategory.forEach((value, index) => { - this.zhEconomicType[1].children.push({ - value: value.dictValue, - label: value.dictLabel, + res.data.economic_subcategory.forEach((value, index) => { + this.zhEconomicType[1].children.push({ + value: value.dictValue, + label: value.dictLabel, + }); }); }); + this.epMsg(); + }, + filterComparment(e) { + e.forEach((value, index) => { + if (value.children.length >= 1) { + this.filterComparment(value.children); + } else { + delete value.children; + } }); - //获取企业基本信息列表 + }, + //获取企业基本信息列表 + epMsg() { + this.tableLoad = true; listMsgEnterprise(this.searchBefore).then((res) => { + this.tableData = res.data.list; console.log(res); - this.tableData = res.data + this.total = res.data.total; + this.tableLoad = false; + this.tableData.forEach((row) => { + this.multipleSelection.forEach((rows) => { + if (row.uscCode == rows) { + this.$nextTick(() => { + this.$refs.multipleTable.toggleRowSelection(row, true); + }); + } + }); + }); }); }, - checkBox(e) {}, + //搜索企业信息列表 + searchListInqy() { + this.searchBefore = Object.assign(this.searchBefore, this.form); + this.epMsg(); + }, + //重置 + reset() { + this.form = { + //企业分色 + entprColor: "", + //是否重点 + isPoint: "", + //重大危险源等级 + majorHazardLevel: "", + //统一社会信用代码 + uscCode: "", + }; + this.searchListInqy(); + }, + //导入 + exportData() {}, open() { this.dialogVisible = true; + this.epMsg(); }, Close() { this.dialogVisible = false; @@ -350,11 +439,21 @@ export default { }, // 页码,当前页切换事件 pagesChange(pages) { - console.log(pages); + this.searchBefore.pageSize = pages.size; + this.searchBefore.pageNum = pages.current; + this.epMsg(); }, // 选中的数据 - handleSelectionChange(val) { - this.multipleSelection = val; + handleSelectionChange(val, row) { + console.log(row); + if (this.multipleSelection.indexOf(row.uscCode) == -1) { + this.multipleSelection.push(row.uscCode); + } else { + this.multipleSelection.splice( + this.multipleSelection.indexOf(row.uscCode), + 1 + ); + } this.selected = this.multipleSelection.length; }, // 下一步 @@ -363,8 +462,11 @@ export default { this.nextStep = true; this.nextText = "发布计划"; } else { - console.log(form2); - // console.log('该发布计划了') + this.form2.enterpriseId = this.multipleSelection.join(',') + this.form2.district = this.form2.district[this.form2.district.length-1] + addPlanGL(this.form2).then((res) => { + console.log(res); + }); } }, tableRowClassName({ row, rowIndex }) { @@ -377,28 +479,6 @@ export default { }; \ No newline at end of file diff --git a/src/views/yingji/planManage.vue b/src/views/yingji/planManage.vue index cc19fa1..2d73902 100644 --- a/src/views/yingji/planManage.vue +++ b/src/views/yingji/planManage.vue @@ -7,210 +7,169 @@ * @LastEditTime: 2023-09-06 15:59:41 --> +
+
+ + + + + + + + + + + + + + + +
+ +
+ +
+ + }, + created() { + this.checkListTwo = this.checkList; + // this.$nextTick(()=>{ + // let dom = document.getElementsByClassName('tables'); + // let height = dom[0].getBoundingClientRect(); + // let windowHeight = window.innerHeight; + // let relativeHeight = windowHeight - height.top + // this.main.height = relativeHeight - 80 + // console.log(this.main.height) + // }) + }, +}; + +} + \ No newline at end of file