IDCDatasync-vue/src/views/data/thematicLibrary.vue

128 lines
3.3 KiB
Vue
Raw Normal View History

2025-03-07 15:44:35 +08:00
<template>
<a-row :gutter="30">
<a-col :md="24" :sm="1" >
2025-03-08 17:12:10 +08:00
<div class="table-page-search-wrapper">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaName" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypedataSources" :key="d.id">
{{ d.cnName }}
</a-select-option>
</a-select>
</div>
<!-- table区域-begin -->
<div style="height:900px;overflow-y:auto;">
<a-table
ref="table"
size="middle"
bordered
:pagination="false"
:scroll="{ y: 800 }"
rowKey="id"
:columns="columns"
:dataSource="dataSource">
<!-- :locale="myLocale"-->
2025-03-07 15:44:35 +08:00
2025-03-08 17:12:10 +08:00
<!-- 字符串超长截取省略号显示-->
</a-table>
2025-03-07 15:44:35 +08:00
</div>
</a-col>
</a-row>
</template>
<script>
export default {
name: "thematicLibrary",
components: {
},
data () {
return {
description: '专题库',
contentList:[],
2025-03-08 17:12:10 +08:00
datatypequeryParam: {
schemaName:"",
sourceType:3
},
2025-03-07 15:44:35 +08:00
queryParam: {
pageNum :1,
2025-03-08 17:12:10 +08:00
pageSize:9999999,
2025-03-07 15:44:35 +08:00
},
2025-03-08 17:12:10 +08:00
dataTypedataSources: [],
2025-03-07 15:44:35 +08:00
dataSource:[
],
columns: [
{
title: '#',
dataIndex: '',
key:'id',
width:60,
align:"id",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '表名',
align:"center",
dataIndex: 'tableName',
},
{
title: '报文名',
align:"center",
dataIndex: 'data1'
},
{
title: '开始时间',
align:"center",
dataIndex: 'data2'
},
{
title: '最后更新时间',
align:"center",
dataIndex: 'data3'
},
{
title: '数据量',
align:"center",
dataIndex: 'data4'
},
],
}
},
mounted() {
2025-03-08 17:12:10 +08:00
this.getselect()
2025-03-07 15:44:35 +08:00
},
computed: {
},
destroyed: function () {
},
created () {
},
methods: {
2025-03-08 17:12:10 +08:00
getselect(){
dataTypePageList(this.queryParam).then((res) => {
if (res.success) {
this.dataTypedataSources = res.result.rows||res.result;
this.queryParam.schemaName = res.result.rows[0].enName
this.getTables();
} else {
this.$message.warning(res.message);
}
});
},
2025-03-07 15:44:35 +08:00
getTables(){
2025-03-08 17:12:10 +08:00
getAction("/dataManager/getDataManagerInfo",datatypequeryParam).then((res) => {
if (res.result) {
this.dataSource = res.result;
} else {
this.$message.warning(res.message);
}
});
2025-03-07 15:44:35 +08:00
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>