feat: 资产列表数据统计
parent
dd6f35dea0
commit
029b5aaaa8
|
@ -110,3 +110,9 @@ export function findDataBaseByInformationId(id){
|
|||
params:id,
|
||||
})
|
||||
}
|
||||
export function dataBaseTableInformation(){
|
||||
return request({
|
||||
url:'dataSource/source/dataBaseTableInformation',
|
||||
method:'get',
|
||||
})
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ export default {
|
|||
props:{
|
||||
table:{
|
||||
value:Object,
|
||||
default:{}
|
||||
default:{},
|
||||
},
|
||||
databaseTable:{
|
||||
value:Array,
|
||||
|
@ -218,14 +218,17 @@ export default {
|
|||
watch:{
|
||||
table:{
|
||||
handler(val){
|
||||
findDataBaseByInformationId(val.id).then(
|
||||
console.log("res",val)
|
||||
if (val!=null){
|
||||
findDataBaseByInformationId(val.id).then(
|
||||
res=>{
|
||||
this.databaseTableInformation=this.table;
|
||||
console.log(this.databaseTable)
|
||||
this.databaseTable=res.data;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
res=>{
|
||||
this.databaseTableInformation=this.table;
|
||||
console.log(this.databaseTable)
|
||||
this.databaseTable=res.data;
|
||||
}
|
||||
)
|
||||
},
|
||||
immediate:true
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="card-panel-text">
|
||||
数据接入
|
||||
</div>
|
||||
<count-to :duration="2600" :end-val="4" :start-val="0" class="card-panel-num"/>
|
||||
<count-to :duration="2600" :end-val="sum" :start-val="0" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<div class="card-panel-text">
|
||||
资产模型
|
||||
</div>
|
||||
<count-to :duration="3000" :end-val="96" :start-val="0" class="card-panel-num"/>
|
||||
<count-to :duration="3000" :end-val="informationNum" :start-val="0" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<div class="card-panel-text">
|
||||
数据模型
|
||||
</div>
|
||||
<count-to :duration="3200" :end-val="560" :start-val="0" class="card-panel-num"/>
|
||||
<count-to :duration="3200" :end-val="dataTotal" :start-val="0" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
@ -47,13 +47,40 @@
|
|||
|
||||
<script>
|
||||
import CountTo from 'vue-count-to'
|
||||
import {dataBaseTableInformation} from "@/api/dataSource/source";
|
||||
|
||||
export default {
|
||||
|
||||
components: {
|
||||
CountTo
|
||||
},
|
||||
props:{
|
||||
sum:{
|
||||
type:Object,
|
||||
default:0,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
informationNum:0,
|
||||
dataTotal:0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dataBaseTableInformation();
|
||||
},
|
||||
methods: {
|
||||
|
||||
dataBaseTableInformation(){
|
||||
dataBaseTableInformation().then(res=>{
|
||||
this.informationNum=res.data.length;
|
||||
// this.dataTotal+=res.data.dataTotal
|
||||
res.data.forEach(item=>{
|
||||
this.dataTotal+=item.dataTotal
|
||||
})
|
||||
// console.log(res.data)
|
||||
})
|
||||
},
|
||||
handleSetLineChartData(type) {
|
||||
this.$emit('handleSetLineChartData', type)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="card-panel-text">
|
||||
资产模型
|
||||
</div>
|
||||
<count-to :duration="3000" :end-val="15" :start-val="0" class="card-panel-num"/>
|
||||
<count-to :duration="3000" :end-val="num" :start-val="0" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<div class="card-panel-text">
|
||||
数据模型
|
||||
</div>
|
||||
<count-to :duration="3200" :end-val="230" :start-val="0" class="card-panel-num"/>
|
||||
<count-to :duration="3200" :end-val="dataTotal" :start-val="0" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
@ -125,7 +125,14 @@ export default {
|
|||
type: String,
|
||||
default: "-"
|
||||
},
|
||||
|
||||
num:{
|
||||
type:Object,
|
||||
default:0
|
||||
},
|
||||
dataTotal:{
|
||||
type:Object,
|
||||
default:0
|
||||
},
|
||||
databaseTableInformationList:[],
|
||||
childrenList:{
|
||||
|
||||
|
@ -161,10 +168,10 @@ export default {
|
|||
table() {
|
||||
return table
|
||||
},
|
||||
checkTableName(checkTab){
|
||||
this.databaseTable = this.databaseTableInformationList.findLast(item => item.tableName === checkTab.name)
|
||||
console.log(this.databaseTable);
|
||||
},
|
||||
// checkTableName(checkTab){
|
||||
// this.databaseTable = this.databaseTableInformationList.findLast(item => item.tableName === checkTab.name)
|
||||
// console.log(this.databaseTable);
|
||||
// },
|
||||
init(){
|
||||
let rows = [
|
||||
{
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
</el-aside>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<OverallAssets v-if="showAssets == null"/>
|
||||
<overall-specific-assets v-if="showAssets === 0" :databaseTableInformationList="databaseTableInformationList" :title="title"/>
|
||||
<overall-assets v-if="showAssets==null" :sum="sum"/>
|
||||
<overall-specific-assets v-if="showAssets === 0" :num="num" :dataTotal="dataTotal" :databaseTableInformationList="databaseTableInformationList" :title="title"/>
|
||||
<overall-asset-structure v-if="showAssets === 1" :databaseTable="databaseTable" :databaseTableInformation="databaseTableInformation" :childrenList="childrenList" :title="title"/>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -52,6 +52,9 @@ export default {
|
|||
databaseTableInformation:{},
|
||||
databaseTableInformationList:[],
|
||||
databaseTable:[],
|
||||
sum:0,
|
||||
num:0,
|
||||
dataTotal:0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -65,9 +68,11 @@ export default {
|
|||
|
||||
findDataBaseByAssetId(data.id).then(
|
||||
res=>{
|
||||
|
||||
this.databaseTableInformationList=res.data;
|
||||
|
||||
this.num=this.databaseTableInformationList.length;
|
||||
res.data.forEach(item=>{
|
||||
this.dataTotal+=item.dataTotal
|
||||
})
|
||||
}
|
||||
)
|
||||
findDataBaseTable(data.id).then(
|
||||
|
@ -101,7 +106,8 @@ export default {
|
|||
findAssetStructure(){
|
||||
findAssetStructure().then(
|
||||
res=>{
|
||||
this.assetStructureList=res.data
|
||||
this.assetStructureList=res.data;
|
||||
this.sum=this.assetStructureList.length;
|
||||
}
|
||||
)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue