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