feat()资产展示
parent
c3af4a6d0c
commit
5d4c9a6ace
|
@ -38,6 +38,13 @@ export function selJDBCStream(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
export function selJDBCStream2(data) {
|
||||
return request({
|
||||
url: '/system/accredit/selJDBCStream2',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function listListstructure(data) {
|
||||
return request({
|
||||
|
@ -124,4 +131,11 @@ export function updateUserMiddle(mid,statusId) {
|
|||
})
|
||||
}
|
||||
|
||||
export function selectShow(tableName) {
|
||||
return request({
|
||||
url: '/system/accredit/selectShow?tableName=' + tableName,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
:load="expandTable"
|
||||
@click="ttbb(scope.row)"
|
||||
@click="synchronizations2(scope.row)"
|
||||
v-hasPermi="['system:access:remove']"
|
||||
>同协</el-button>
|
||||
</template>
|
||||
|
@ -299,7 +299,7 @@
|
|||
|
||||
<script>
|
||||
import { listAccess, getAccess, delAccess, addAccess, updateAccess, synchronization } from "@/api/system/access";
|
||||
import { selJDBCStream } from "@/api/system/accredit";
|
||||
import { selJDBCStream, selJDBCStream2 } from "@/api/system/accredit";
|
||||
|
||||
import Table from '@/views/assets/table/index.vue'
|
||||
import Authorization from '@/views/assets/authorization/index.vue'
|
||||
|
@ -420,16 +420,16 @@ export default {
|
|||
resolve(this.childrenList)
|
||||
}, 500);
|
||||
},
|
||||
ttbb(row){
|
||||
this.accessId = row.id
|
||||
|
||||
console.log(row)
|
||||
},
|
||||
// 同步
|
||||
synchronizations(row){
|
||||
synchronization(row).then(res => {
|
||||
this.$message.success(res.data)
|
||||
})
|
||||
},
|
||||
synchronizations2(row){
|
||||
selJDBCStream2(row).then(res => {
|
||||
this.$message.success(res.data)
|
||||
})
|
||||
},
|
||||
// 添加参数
|
||||
addParam(){
|
||||
|
|
|
@ -0,0 +1,130 @@
|
|||
<template>
|
||||
<el-container :style="{height: mainHeight + 'px'}">
|
||||
<el-aside>
|
||||
<el-tree :data="assetStructureList"
|
||||
:load="expandTable"
|
||||
:expand-on-click-node="false"
|
||||
lazy
|
||||
@node-click="showName"
|
||||
:props="defaultProps">
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
<div v-if="data.type === 'dataSource'">{{ data.name + '('+data.databaseName + '-' + data.systemName+')' }}</div>
|
||||
<div v-if="data.type === 'dataTable'">{{ data.tableName + '-'+data.asas + '(' + data.dataTotal+'条)' }}</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>资产模型基本信息</span>
|
||||
</div>
|
||||
<el-descriptions v-model="table" border :column="2">
|
||||
<el-descriptions-item label="表名称">{{table.tableName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="表备注">{{table.asas}}</el-descriptions-item>
|
||||
<el-descriptions-item label="数据量">{{ table.dataTotal }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否核心">
|
||||
<el-tag size="small">是</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card" style="margin-top: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>模型数据</span>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" v-for="asset in assetShowList" style="margin-top: 20px">
|
||||
<el-descriptions :title="asset.keysed" direction="vertical" border :column="1">
|
||||
<el-descriptions-item label="Type">
|
||||
<el-tag size="small">{{asset.type}}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="Value">{{asset.val}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { selectFrimary, selectShow } from "@/api/system/accredit";
|
||||
|
||||
export default {
|
||||
name: "AssetShow",
|
||||
data() {
|
||||
return {
|
||||
mainHeight: window.innerHeight - 85,
|
||||
defaultProps: {
|
||||
children: 'childrenList',
|
||||
label: 'name'
|
||||
},
|
||||
table: null,
|
||||
showAuth: null,
|
||||
assetStructureList: [],
|
||||
childrenList: [],
|
||||
assetShowList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
expandTable( node, resolve){
|
||||
if (node.level === 0) return resolve(this.assetStructureList);
|
||||
const {data} = node;
|
||||
if (data.type === 'dataTable') {
|
||||
return resolve([])
|
||||
}
|
||||
setTimeout(() => {
|
||||
resolve(data.tableLists)
|
||||
}, 500);
|
||||
},
|
||||
showName(data) {
|
||||
console.log(data)
|
||||
this.showAuth = data.type
|
||||
if (data.type === 'dataTable'){
|
||||
this.table = data
|
||||
console.log(data.tableName)
|
||||
selectShow(data.tableName).then(res => {
|
||||
console.log(res)
|
||||
this.assetShowList = res.data
|
||||
console.log(res.data)
|
||||
})
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.table = {
|
||||
tableName: 'null',
|
||||
asas: '表',
|
||||
dataTotal: '0',
|
||||
}
|
||||
selectFrimary().then(res => {
|
||||
this.assetStructureList = res.data
|
||||
console.log(res.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-aside {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 400px;
|
||||
background-color: white;
|
||||
}
|
||||
.el-main {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.custom-tree-node{
|
||||
height: 30px;
|
||||
}
|
||||
.el-descriptions-row>th{
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue