diff --git a/src/api/data/source.js b/src/api/data/source.js
index f78a924..383d9ff 100644
--- a/src/api/data/source.js
+++ b/src/api/data/source.js
@@ -108,3 +108,11 @@ export function getTableDataCount(id) {
method: 'get'
})
}
+
+// 根据数据源id查询字典类型数据
+export function getDictDataList(id) {
+ return request({
+ url: '/source/dictType/getDictDataList/' + id,
+ method: 'get'
+ })
+}
diff --git a/src/views/data/assetStructure/dashboard/OverallSpecificAssets.vue b/src/views/data/assetStructure/dashboard/OverallSpecificAssets.vue
index d980f2a..05d774a 100644
--- a/src/views/data/assetStructure/dashboard/OverallSpecificAssets.vue
+++ b/src/views/data/assetStructure/dashboard/OverallSpecificAssets.vue
@@ -25,7 +25,8 @@
数据模型
-
+
@@ -57,27 +58,27 @@
-
+
- {{ key }}
+ {{dict.dictName+'('+dict.dictType+')'}}
新增
-
-
+
+
- {{ scope.row.label }}
-
+ {{ scope.row.dictLabel }}
+
-
+
- {{ scope.row.val }}
-
+ {{ scope.row.dictValue }}
+
@@ -130,27 +131,25 @@ export default {
assetStructureTableCount: null,
assetStructureTableDataCount: null
},
- childrenList: [],
+ childrenList: {
+ type: Array,
+ default: []
+ },
title: {
type: String,
default: "-"
+ },
+ dictDataList: {
+ type: Array,
+ default: []
}
+
},
data() {
return {
activeName: null,
dictAddName: null,
- dictMap: {
- "性别(system_sex)": [
- {label: '男', val: '1', isEdit: false},
- {label: '女', val: '2', isEdit: false},
- {label: '未知', val: '0', isEdit: false},
- ],
- "开关(system_y_n)": [
- {label: '是', val: '1', isEdit: false},
- {label: '否', val: '0', isEdit: false}
- ],
- },
+ // dictMap: [],
childrenParams: null
}
},
diff --git a/src/views/data/assetStructure/index.vue b/src/views/data/assetStructure/index.vue
index 65ecdcb..fd8449b 100644
--- a/src/views/data/assetStructure/index.vue
+++ b/src/views/data/assetStructure/index.vue
@@ -22,8 +22,8 @@
-
+
@@ -37,7 +37,7 @@ import OverallAssetStructure from './dashboard/OverallAssetStructure.vue'
import {
addTableData,
getAssetList,
- getChildrenList, getTableDataCount,
+ getChildrenList,
selectTableData,
selectTableDataCount
} from "@/api/data/source";
@@ -52,6 +52,7 @@ export default {
children: 'childrenList',
label: 'name'
},
+ dictDataList: [],
assetStructureList: [],
childrenList: [],
tableDataList: [],
@@ -80,17 +81,9 @@ export default {
getTableDataCount(data.id).then(res => {
this.count = res.data
})
- getChildrenList(data).then(res => {
- console.log(res)
- this.childrenList = res.data
- resolve(this.childrenList)
- this.childrenList.forEach(children => {
- this.showTable.assetStructure = data
- this.showTable.tableName = children.name
- addTableData(this.showTable).then(res => {
- // console.log(res)
- })
- })
+ getDictDataList(data.id).then(res => {
+ this.dictDataList = res.data
+ console.log(this.dictDataList)
})
}
// this.showAssets = data.type;