feat: 字典模型初版

master
baize 2024-05-01 11:27:42 +08:00
parent 86545423b5
commit 8b58d6775d
3 changed files with 19 additions and 5 deletions

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询字典列表
export function findDictionaryByStructureId(id) {
return request({
url: '/dataSource/dict/findDictionaryByStructureId?id='+id,
method: 'get',
params:id
})
}

View File

@ -74,11 +74,9 @@ export default {
dataBaseTableInformation(){ dataBaseTableInformation(){
dataBaseTableInformation().then(res=>{ dataBaseTableInformation().then(res=>{
this.informationNum=res.data.length; this.informationNum=res.data.length;
// this.dataTotal+=res.data.dataTotal
res.data.forEach(item=>{ res.data.forEach(item=>{
this.dataTotal+=item.dataTotal this.dataTotal+=item.dataTotal
}) })
// console.log(res.data)
}) })
}, },
handleSetLineChartData(type) { handleSetLineChartData(type) {

View File

@ -1,6 +1,4 @@
<template> <template>
<el-container :style="{height: mainHeight + 'px'}"> <el-container :style="{height: mainHeight + 'px'}">
<el-aside> <el-aside>
<el-tree :data="assetStructureList" <el-tree :data="assetStructureList"
@ -17,7 +15,7 @@
<el-container> <el-container>
<el-main> <el-main>
<overall-assets v-if="showAssets==null" :sum="sum"/> <overall-assets v-if="showAssets==null" :sum="sum"/>
<overall-specific-assets v-if="showAssets === 0" :num="num" :dataTotal="dataTotal" :databaseTableInformationList="databaseTableInformationList" :title="title"/> <overall-specific-assets v-if="showAssets === 0" :dictionaryTypeList="dictionaryTypeList" :num="num" :dataTotal="dataTotal" :databaseTableInformationList="databaseTableInformationList" :title="title"/>
<overall-asset-structure v-if="showAssets === 1" :databaseTable="databaseTable" :databaseTableInformation="databaseTableInformation" :childrenList="childrenList" :title="title"/> <overall-asset-structure v-if="showAssets === 1" :databaseTable="databaseTable" :databaseTableInformation="databaseTableInformation" :childrenList="childrenList" :title="title"/>
</el-main> </el-main>
</el-container> </el-container>
@ -33,6 +31,7 @@ import {
findInformationById findInformationById
} from "@/api/dataSource/source"; } from "@/api/dataSource/source";
import OverallAssetStructure from "@/views/dataSource/assets/OverallAssetStructure.vue"; import OverallAssetStructure from "@/views/dataSource/assets/OverallAssetStructure.vue";
import {findDictionaryByStructureId} from "@/api/dataSource/dictionary";
export default { export default {
name: 'assets', name: 'assets',
@ -55,6 +54,7 @@ export default {
sum:0, sum:0,
num:0, num:0,
dataTotal:0, dataTotal:0,
dictionaryTypeList:[],
} }
}, },
created() { created() {
@ -75,6 +75,12 @@ export default {
}) })
} }
) )
findDictionaryByStructureId(data.id).then(
res=>{
console.log(data.id)
this.dictionaryTypeList=res.data;
}
)
findDataBaseTable(data.id).then( findDataBaseTable(data.id).then(
res=>{ res=>{
this.databaseTableInformation=res.data this.databaseTableInformation=res.data