资产结构测试5
parent
518216279d
commit
774cc447d4
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<div>
|
||||
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<!-- insertDictOpen {{ this.insertDictOpen }}-->
|
||||
<!-- <p></p>-->
|
||||
<!-- assetDictFormInfo {{ this.assetDictFormInfo }}-->
|
||||
|
@ -16,25 +17,14 @@
|
|||
:label="tableInfo.tableName+'('+tableInfo.info.tableRemark+')'">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
|
||||
<span>基础字典</span>
|
||||
<!--新增字典表-->
|
||||
<el-button type="text" style="float: right" @click="insertDictOpen = true">新增字典</el-button>
|
||||
<el-dialog title="字典表基础信息" style="float:left; margin:20px" :visible.sync="insertDictOpen">
|
||||
<el-form :model="assetDictFormInfo">
|
||||
<el-form-item label="字典表名" label-width="120px">
|
||||
<el-input v-model="assetDictFormInfo.dictName" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="字典类型" label-width="120px">
|
||||
<el-input v-model="assetDictFormInfo.dictType" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="insertDictOpen = false">取 消</el-button>
|
||||
<el-button type="primary" @click="insertDict(tableInfo.info)">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-card v-for="dictInfo in dictList" style="width: 300px;">
|
||||
<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>
|
||||
<!--新增字典具体信息-->
|
||||
|
@ -60,23 +50,28 @@
|
|||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" v-if="!scope.row.isEdit" @click="updateDictInfo(scope.row)">操作</el-button>
|
||||
<el-button type="text" v-if="scope.row.isEdit" @click="insertDictInfo(scope.row)">确认</el-button>
|
||||
<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>
|
||||
|
||||
<!--资产模型基本信息-->
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>资产模型基本信息</span>
|
||||
</div>
|
||||
|
||||
<el-descriptions
|
||||
class="margin-top"
|
||||
:column="2"
|
||||
border>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>
|
||||
|
@ -84,6 +79,7 @@
|
|||
</template>
|
||||
{{tableInfo.info.tableName}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-mobile-phone"></i>
|
||||
|
@ -91,6 +87,7 @@
|
|||
</template>
|
||||
{{tableInfo.info.tableRemark}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-location-outline"></i>
|
||||
|
@ -98,24 +95,31 @@
|
|||
</template>
|
||||
{{tableInfo.info.dataNum}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-tickets"></i>
|
||||
备注
|
||||
</template>
|
||||
<el-tag size="small">学校</el-tag>
|
||||
<el-tag size="small">小黄</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
||||
|
||||
<!--数据模型-->
|
||||
<el-card>
|
||||
|
||||
<div slot="header" class="clearfix">
|
||||
<span>数据模型</span>
|
||||
</div>
|
||||
|
||||
|
||||
<el-table
|
||||
:data="tableInfo.info.structureList"
|
||||
style="width: 100%"
|
||||
>
|
||||
style="width: 100%">
|
||||
|
||||
<el-table-column fixed prop="columnName" label="字段名称" width="200px"/>
|
||||
<el-table-column fixed prop="columnRemark" label="字段注释" />
|
||||
<el-table-column fixed prop="isPrimary" label="是否主键" />
|
||||
|
@ -132,44 +136,45 @@
|
|||
操作
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<!--添加新字典表对话框-->
|
||||
<el-dialog title="字典表基础信息" style="float:left; margin:20px" :visible.sync="insertDictOpen">
|
||||
<el-form :model="assetDictFormInfo">
|
||||
|
||||
<el-form-item label="字典表名" label-width="120px">
|
||||
<el-input v-model="assetDictFormInfo.dictName" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="字典类型" label-width="120px">
|
||||
<el-input v-model="assetDictFormInfo.dictType" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="insertDictOpen = false">取消</el-button>
|
||||
<el-button type="primary" @click="insertDict(tableInfo.info)">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import CountTo from 'vue-count-to'
|
||||
import CountTo from "vue-count-to";
|
||||
import {insertDict,insertDictInfo} from "@/api/etl/etl";
|
||||
|
||||
export default {
|
||||
|
||||
props: {
|
||||
tableInfoList: Array,
|
||||
dictList: Array
|
||||
},
|
||||
|
||||
|
||||
watch:{
|
||||
dictList: {
|
||||
handler(newValue, oldValue) {
|
||||
console.log(newValue)
|
||||
console.log(oldValue)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
name: 'AssetsModel',
|
||||
components:{
|
||||
CountTo
|
||||
|
@ -192,11 +197,11 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
|
||||
//点击修改字典操作
|
||||
updateDictInfo(row) {
|
||||
row.isEdit = true
|
||||
},
|
||||
|
||||
//前台添加字典新内容
|
||||
insertDictList(data) {
|
||||
console.log(data)
|
||||
|
@ -207,37 +212,41 @@ export default {
|
|||
'isEdit': true,
|
||||
})
|
||||
},
|
||||
|
||||
//添加字典接入表
|
||||
insertDict(data) {
|
||||
console.log(data)
|
||||
|
||||
//关闭新增字典窗口
|
||||
this.insertDictOpen = false
|
||||
this.assetDictFormInfo.basicId = data.basicId
|
||||
console.log(this.assetDictFormInfo)
|
||||
insertDict(this.assetDictFormInfo)
|
||||
insertDict(this.insertDictOpen)
|
||||
this.reset()
|
||||
},
|
||||
|
||||
//字典具体信息表
|
||||
insertDictInfo(row) {
|
||||
insertDictInfo(id,row){
|
||||
console.log(row)
|
||||
console.log(id)
|
||||
row.dictId = id
|
||||
row.id = null
|
||||
if (row.infoValue === null || row.infoName === null) {
|
||||
this.$message.error("字典标签或者值不能为空")
|
||||
}else {
|
||||
insertDictInfo(row)
|
||||
this.$message.success("添加成功")
|
||||
this.reset()
|
||||
row.isEdit = false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
handleSetLineChartData(type) {
|
||||
this.$emit('handleSetLineChartData', type)
|
||||
},
|
||||
|
||||
handleClick(val, event) {
|
||||
console.log(val)
|
||||
console.log(event)
|
||||
},
|
||||
|
||||
//重置参数
|
||||
reset() {
|
||||
|
||||
|
@ -354,10 +363,17 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title-header {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-size: 46px;
|
||||
ia
|
||||
font-weight: 600;
|
||||
line-height: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,18 +2,21 @@
|
|||
<div>
|
||||
<el-container style="height: 1000px">
|
||||
<el-aside>
|
||||
|
||||
<el-tree :data="assetStructureList"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"></el-tree>
|
||||
@node-click="handleNodeClick">
|
||||
|
||||
</el-tree>
|
||||
</el-aside>
|
||||
|
||||
<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>
|
||||
|
||||
<AssetsBasic v-if="!infoOpen" :infoOpen="infoOpen" :fundDataNum="fundDataNum"></AssetsBasic>
|
||||
<AssetsModel v-if="this.tableInfoList.length!==0" :dictList="dictList" :tableInfoList="tableInfoList"></AssetsModel>
|
||||
<TableInfoModel v-if="this.tableInfoList.length===0" :table-info="tableInfoForm"></TableInfoModel>
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -27,7 +30,9 @@ import TableInfoModel from "@/views/etl/construction/TableInfoModel.vue";
|
|||
|
||||
export default {
|
||||
name:'construction',
|
||||
|
||||
components:{TableInfoModel, AssetsModel, AssetsBasic },
|
||||
|
||||
data() {
|
||||
return {
|
||||
//表详情页面
|
||||
|
@ -115,12 +120,12 @@ export default {
|
|||
if (data.children !== undefined) {
|
||||
this.tableInfoList = data.children
|
||||
this.tableInfoForm = data.children[0]
|
||||
}else {
|
||||
console.log(data.info.id)
|
||||
getDict(data.info.id).then(response => {
|
||||
console.log(response)
|
||||
this.dictList = response.data
|
||||
})
|
||||
}else {
|
||||
|
||||
// this.tableInfoList = this.assetStructureList.find(assent =>
|
||||
// assent.info.id === this.tableInfoForm.info.basicId
|
||||
|
|
Loading…
Reference in New Issue