From f1f66ae87e5cdca83da0e06a0f518f6961370331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=BB=B6=E7=A6=8F?= <> Date: Fri, 9 Jun 2023 17:29:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=8C=E6=88=90=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E5=9B=BA=E6=9C=89=E9=A3=8E=E9=99=A9=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.ts | 13 ++++- src/views/blank.component.vue | 9 +++- src/views/common.component.scss | 5 +- .../areaAnal/areaAnal.component.html | 52 ++++++++++++------- .../areaAnal/areaAnal.component.vue | 16 +++--- 5 files changed, 66 insertions(+), 29 deletions(-) diff --git a/src/store/index.ts b/src/store/index.ts index 1c41a99..c4fe200 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -10,6 +10,7 @@ export default new Vuex.Store({ userList:[], common_yes_no:[], prevention_dangrous_level:[], + prevention_risk_level:[], }, getters: { common_yes_no_map:(state)=>{ @@ -21,7 +22,14 @@ export default new Vuex.Store({ }, prevention_dangrous_level_map:(state)=>{ const map = {}; - state.common_yes_no.forEach((item:any)=>{ + state.prevention_dangrous_level.forEach((item:any)=>{ + map[item.value] = item.name + }) + return map + }, + prevention_risk_level_map:(state)=>{ + const map = {}; + state.prevention_risk_level.forEach((item:any)=>{ map[item.value] = item.name }) return map @@ -43,6 +51,9 @@ export default new Vuex.Store({ }, set_prevention_dangrous_level(state,data){ state.prevention_dangrous_level = data; + }, + set_prevention_risk_level(state,data){ + state.prevention_risk_level = data; } }, actions: { diff --git a/src/views/blank.component.vue b/src/views/blank.component.vue index 7492686..97c8423 100644 --- a/src/views/blank.component.vue +++ b/src/views/blank.component.vue @@ -14,7 +14,8 @@ export default class BlankComponent extends Vue { this.systemService.getDeptList(), this.systemService.getUserList({pageSize:0}), this.systemService.getDictData("common_yes_no"), - this.systemService.getDictData("prevention_dangrous_level") + this.systemService.getDictData("prevention_dangrous_level"), + this.systemService.getDictData("prevention_risk_level") ]).then(((results:any)=>{ this.$store.commit("setDeptTreeList",results[0].data); @@ -43,6 +44,12 @@ export default class BlankComponent extends Vue { value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue } })) + this.$store.commit("set_prevention_risk_level",results[5].data.map(item=>{ + return { + name:item.dictLabel, + value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue + } + })) })) } } diff --git a/src/views/common.component.scss b/src/views/common.component.scss index dbdd477..8a46f8e 100644 --- a/src/views/common.component.scss +++ b/src/views/common.component.scss @@ -51,7 +51,10 @@ &.active { &::before { position: absolute; - inset: 0; + left: 0; + top: 0; + right: 0; + bottom: 0; content: ""; background: #68C23A; z-index: 1; diff --git a/src/views/risk/assessment/areaAnal/areaAnal.component.html b/src/views/risk/assessment/areaAnal/areaAnal.component.html index 7badb41..1cd165f 100644 --- a/src/views/risk/assessment/areaAnal/areaAnal.component.html +++ b/src/views/risk/assessment/areaAnal/areaAnal.component.html @@ -1,4 +1,4 @@ -