资产结构测试6
parent
774cc447d4
commit
0f8c27aeca
|
@ -2,14 +2,40 @@
|
|||
<div>
|
||||
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<!-- insertDictOpen {{ this.insertDictOpen }}-->
|
||||
<!-- <p></p>-->
|
||||
<!-- assetDictFormInfo {{ this.assetDictFormInfo }}-->
|
||||
<!-- <p></p>-->
|
||||
<!-- dictFormInfoOpen {{ this.dictFormInfoOpen }}-->
|
||||
<!-- <p></p>-->
|
||||
<!-- dictFormInfo {{ this.dictFormInfo }}-->
|
||||
<!-- <p></p>-->
|
||||
<div class="title-header">
|
||||
{{ this.name }}
|
||||
</div>
|
||||
<el-col :lg="12" :sm="12" :xs="12" class="card-panel-col">
|
||||
<div class="card-panel" @click="handleSetLineChartData('messages')">
|
||||
<div class="card-panel-icon-wrapper icon-message">
|
||||
<svg-icon class-name="card-panel-icon" icon-class="table"/>
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
资产模型
|
||||
</div>
|
||||
<count-to :duration="3000" :end-val="this.tableInfoList.length" :start-val="0" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :lg="12" :sm="12" :xs="12" class="card-panel-col">
|
||||
<div class="card-panel" @click="handleSetLineChartData('purchases')">
|
||||
<div class="card-panel-icon-wrapper icon-money">
|
||||
<svg-icon class-name="card-panel-icon" icon-class="field"/>
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
数据模型
|
||||
</div>
|
||||
<count-to :duration="3200" :end-val="this.structureNum" :start-val="0" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
|
||||
|
||||
|
||||
<el-card>
|
||||
<el-tabs type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane
|
||||
|
@ -22,42 +48,18 @@
|
|||
<!--新增字典表-->
|
||||
<el-button type="text" style="float: right" @click="insertDictOpen = true">新增字典</el-button>
|
||||
</div>
|
||||
<el-row gutter="20">
|
||||
<el-col v-for="dictInfo in dictList" :span="8">
|
||||
<el-card style="width: 300px;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ dictInfo.dictName }}({{ dictInfo.dictType }})</span>
|
||||
<!--新增字典具体信息-->
|
||||
<el-button style="float: right; padding: 3px 0" type="text" @click="insertDictList(dictInfo)">新增内容
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="dictInfo.dictInfoList">
|
||||
<el-table-column label="标签">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.infoName }}</span>
|
||||
<el-input :value="scope.row.infoName"
|
||||
v-model="scope.row.infoName"
|
||||
v-if="scope.row.isEdit"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="值">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.infoValue }}</span>
|
||||
<el-input :value="scope.row.infoValue"
|
||||
v-model="scope.row.infoValue"
|
||||
v-if="scope.row.isEdit"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" v-if="!scope.row.isEdit" @click="scope.row.isEdit = true">操作</el-button>
|
||||
<el-button type="text" v-if="scope.row.isEdit" @click="insertDictInfo(dictInfo.id,scope.row)">确认</el-button>
|
||||
{{ scope.row.isEdit }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-row>
|
||||
<el-card style="width: 3000px; float: left;margin: 10px" v-for="dictInfo in dictList">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>
|
||||
|
||||
{{dictInfo.dictName}}
|
||||
({{dictInfo.dictType}})
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
@ -171,10 +173,28 @@ import {insertDict,insertDictInfo} from "@/api/etl/etl";
|
|||
export default {
|
||||
|
||||
props: {
|
||||
name:null,
|
||||
tableInfoList: Array,
|
||||
dictList: Array
|
||||
},
|
||||
|
||||
watch:{
|
||||
tableInfoList: {
|
||||
handler(newValue,oldValue){
|
||||
this.structureNum = 0
|
||||
console.log('new')
|
||||
console.log(oldValue)
|
||||
console.log(newValue)
|
||||
newValue.forEach(asset =>{
|
||||
this.structureNum += asset.info.structureList.length
|
||||
})
|
||||
console.log(this.structureNum)
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
|
||||
name: 'AssetsModel',
|
||||
components:{
|
||||
CountTo
|
||||
|
@ -182,6 +202,7 @@ export default {
|
|||
|
||||
data(){
|
||||
return {
|
||||
structureNum: null,
|
||||
tableInfoList: this.tableInfoList,
|
||||
dictList: this.dictList,
|
||||
//新增字典表
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
|
||||
<el-main>
|
||||
<AssetsBasic v-if="!infoOpen" :info-open="infoOpen" :fund-data-num="fundDataNum"></AssetsBasic>
|
||||
<AssetsModel v-if="this.tableInfoList.length!==0" :dict-list="dictList" :table-info-list="tableInfoList">
|
||||
</AssetsModel>
|
||||
<AssetsModel v-if="this.tableInfoList.length!==0" :name="vueName" :dictList="dictList" :tableInfoList="tableInfoList"></AssetsModel>
|
||||
|
||||
<TableInfoModel v-if="this.tableInfoList.length===0" :table-info="tableInfoForm"></TableInfoModel>
|
||||
</el-main>
|
||||
|
@ -35,6 +34,7 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
vueName:null,
|
||||
//表详情页面
|
||||
tableInfoOpen: false,
|
||||
//结构标题
|
||||
|
@ -118,6 +118,7 @@ export default {
|
|||
//如果判断对象不存在,重新给form 和 list 赋值
|
||||
|
||||
if (data.children !== undefined) {
|
||||
this.vueName = data.tableName
|
||||
this.tableInfoList = data.children
|
||||
this.tableInfoForm = data.children[0]
|
||||
console.log(data.info.id)
|
||||
|
|
Loading…
Reference in New Issue