From e7d10cccce07d30130f64bbeda5c4eb614c9a1ee Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Wed, 08 Mar 2023 08:56:25 +0800
Subject: [PATCH] 优化火灾管理数据字典回显
---
src/views/fire/fireManage.vue | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/views/fire/fireManage.vue b/src/views/fire/fireManage.vue
index cab9fa1..2f7ad6e 100644
--- a/src/views/fire/fireManage.vue
+++ b/src/views/fire/fireManage.vue
@@ -53,6 +53,7 @@
import {getDetail as getSupplementDetail} from "@/api/fireSupplement/fireSupplement"
import {mapGetters} from "vuex";
import FireSupplieMent from "@/views/fire/fireSupplement";
+import {getLazyTree} from "@/api/base/region";
export default {
components: {FireSupplieMent},
@@ -129,7 +130,6 @@
search: true,
searchSpan: 3,
},
-
{
label: "行政区域",
prop: "location",
@@ -139,15 +139,11 @@
label: 'title',
value: 'key'
},
- dicUrl: 'api/blade-system/region/lazy-tree',
+ dicData:[],
slot: true,
search:true,
hide:true,
searchSpan:3,
- dicFormatter(res){
- res.data.shift()
- return res.data
- }
},
{
label: "火灾等级",
@@ -289,6 +285,17 @@
return ids.join(",");
},
},
+ created() {
+ //手动加载区域的数据字典,使用dicUrl会使其他数据字典回显更慢
+ getLazyTree().then(res=>{
+ if (res.data.code == 200){
+ let data = res.data.data
+ data.shift()
+ const column = this.findObject(this.option.column, "location");
+ column.dicData = data
+ }
+ })
+ },
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
--
Gitblit v1.9.3