175 lines
5.2 KiB
Vue
175 lines
5.2 KiB
Vue
<template>
|
|
<div>
|
|
<el-card>
|
|
<div slot="header" class="clearfix">
|
|
<span>资产模型基本信息</span>
|
|
</div>
|
|
<el-descriptions border :column="2">
|
|
<el-descriptions-item label="表名称">{{title.tableName}}</el-descriptions-item>
|
|
<el-descriptions-item label="表备注">{{title.tableComment}}</el-descriptions-item>
|
|
<el-descriptions-item label="数据量">{{title.tableCount}}</el-descriptions-item>
|
|
<el-descriptions-item label="是否核心">
|
|
<el-tag size="small">是</el-tag>
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</el-card>
|
|
<el-card style=" margin-top: 20px;">
|
|
<div slot="header" class="clearfix">
|
|
<span>资产模型详细信息</span>
|
|
</div>
|
|
<el-table
|
|
:data="tableData"
|
|
style="width: 100%;">
|
|
<el-table-column prop="name" label="名称" />
|
|
<el-table-column prop="comment" label="注释" />
|
|
<el-table-column prop="isPrimaryKey" label="是否主键" >
|
|
<template slot-scope="scope">
|
|
<el-tag size="small" :type="scope.row.isPrimaryKey === 'Y' ? 'success' : ''">
|
|
{{scope.row.isPrimaryKey}}
|
|
</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="type" label="类型" />
|
|
<el-table-column prop="mappingType" label="映射类型" />
|
|
<el-table-column prop="length" label="长度" />
|
|
<el-table-column prop="decimalPlaces" label="小数位" />
|
|
<el-table-column prop="isNull" label="是否为空" >
|
|
<template slot-scope="scope">
|
|
<el-tag size="small" :type="scope.row.isNull === 'Y' ? 'success' : 'danger'">
|
|
{{scope.row.isNull}}
|
|
</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="defaultValue" label="默认值" />
|
|
<el-table-column prop="isDict" label="是否字典" >
|
|
<template slot-scope="scope">
|
|
<el-tag v-if="scope.row.isDict === 'Y'" size="small" type="success">
|
|
{{scope.row.isDict}}
|
|
</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="dictKey" label="映射字典" >
|
|
<template slot-scope="scope">
|
|
<el-popover
|
|
v-if="scope.row.isDict === 'Y'"
|
|
placement="left"
|
|
width="200"
|
|
trigger="hover">
|
|
<el-table :data="[
|
|
{ label: '男', value: '1' },
|
|
{ label: '女', value: '2' },
|
|
{ label: '未知', value: '0' },
|
|
]">
|
|
<el-table-column property="label" label="字典标签"/>
|
|
<el-table-column property="value" label="字典值"/>
|
|
</el-table>
|
|
<el-tag slot="reference">{{scope.row.dictKey}}</el-tag>
|
|
</el-popover>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="id" label="操作" >
|
|
<template slot-scope="scope">
|
|
<el-button type="text">编辑</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-card>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import {assetModelList} from "@/api/etl/source";
|
|
|
|
export default {
|
|
name: 'OverallAssetStructure',
|
|
watch:{
|
|
'title': {
|
|
handler(val) {
|
|
console.log(val)
|
|
assetModelList(val).then(res => {
|
|
this.tableData = res.data
|
|
})
|
|
},
|
|
immediate: true
|
|
}
|
|
},
|
|
props: {
|
|
title: {
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
tableData: [
|
|
{
|
|
id: 1,
|
|
name: "id",
|
|
comment: "主键",
|
|
isPrimaryKey: "Y",
|
|
type: "bigint",
|
|
mappingType: "Long",
|
|
length: "-",
|
|
decimalPlaces: "-",
|
|
isNull: "N",
|
|
defaultValue: "-",
|
|
isDict: "N",
|
|
dictKey: "-",
|
|
}, {
|
|
id: 2,
|
|
name: "name",
|
|
comment: "姓名",
|
|
isPrimaryKey: "N",
|
|
type: "varchar",
|
|
mappingType: "String",
|
|
length: "64",
|
|
decimalPlaces: "-",
|
|
isNull: "N",
|
|
defaultValue: "-",
|
|
isDict: "N",
|
|
dictKey: "-",
|
|
}, {
|
|
id: 3,
|
|
name: "sex",
|
|
comment: "性别",
|
|
isPrimaryKey: "N",
|
|
type: "char",
|
|
mappingType: "String",
|
|
length: "1",
|
|
decimalPlaces: "-",
|
|
isNull: "N",
|
|
defaultValue: "-",
|
|
isDict: "Y",
|
|
dictKey: "system_sex",
|
|
}, {
|
|
id: 4,
|
|
name: "price",
|
|
comment: "金额",
|
|
isPrimaryKey: "N",
|
|
type: "double",
|
|
mappingType: "BigDecimal",
|
|
length: "10",
|
|
decimalPlaces: "2",
|
|
isNull: "N",
|
|
defaultValue: "0.00",
|
|
isDict: "N",
|
|
dictKey: "-",
|
|
}, {
|
|
id: 5,
|
|
name: "create_time",
|
|
comment: "创建时间",
|
|
isPrimaryKey: "N",
|
|
type: "datetime",
|
|
mappingType: "Date",
|
|
length: "-",
|
|
decimalPlaces: "-",
|
|
isNull: "Y",
|
|
defaultValue: "-",
|
|
isDict: "N",
|
|
dictKey: "-",
|
|
}, ]
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|