修复数据管理功能

This commit is contained in:
RenCheng 2025-03-09 15:53:07 +08:00
parent 3d6a157e1c
commit 8f35c472b9
4 changed files with 329 additions and 311 deletions

View File

@ -36,7 +36,7 @@
bordered
rowKey="id"
:pagination="false"
:scroll="{ y: tableScrollY }"
:scroll="{ x:false,y: tableScrollY }"
:columns="tagcolumns"
:dataSource="dataRefsSources">
</a-table>
@ -67,7 +67,7 @@
</a-row>
</a-form>
<!-- table区域-begin -->
<div ref="tableWrapper" style="height:calc(100vh - 324px);">
<div ref="tableContainer" style="height:calc(100vh - 324px);">
<a-table
ref="table"
size="middle"
@ -76,7 +76,7 @@
:loading="loading"
:rowKey="getRowKey"
:pagination="false"
:scroll="{ y:tableScrollY }"
:scroll="{ x:false,y:tableScrollY }"
:columns="columns"
:dataSource="dataSource">
</a-table>
@ -127,6 +127,7 @@
{
title: '表名',
align:"left",
width: 220,
dataIndex: 'tableName',
},
{
@ -140,7 +141,7 @@
title: '#',
dataIndex: '',
key:'id',
width:60,
width: 60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
@ -149,6 +150,7 @@
{
title: '表名',
align:"left",
width: 220,
dataIndex: 'tableName',
},
{
@ -166,13 +168,20 @@
tagselectedRowKeys: [],
selectedRowData: [],
tagselectedRowData: [],
tableScrollY:0,
tableScrollY: 0,
}
},
mounted() {
this.getdatatagSources()
this.getdatatagSources()
this.calculateScrollY();
},
computed: {
calculateScrollY() {
//
const container = this.$refs.tableContainer;
const paginationHeight = 64; //
this.tableScrollY = container.clientHeight - paginationHeight;
},
getRowKey(record) {
return `${record.schemaName}_${record.tableName}`
},
@ -209,12 +218,6 @@
},
methods: {
updateScrollY() {
const container = this.$refs.tableWrapper;
const paginationHeight = 64; //
const tableHeaderHeight = 55; //
this.tableScrollY = container.clientHeight - paginationHeight - tableHeaderHeight;
},
handleSelectChange(selectedRowKeys,row) {
this.selectedRowKeys = selectedRowKeys
this.selectedRowData = row
@ -261,6 +264,8 @@
}
});
})
this.selectedRowData = [];
this.selectedRowKeys = [];
},
detag(){
var that = this;
@ -273,6 +278,8 @@
}
});
});
this.tagselectedRowKeys = [];
this.tagselectedRowData = [];
},
getalltable(){
this.queryParam.tagId = this.queryRefsParam.tagId
@ -301,5 +308,7 @@
}
</script>
<style scoped>
@import '~@assets/less/common.less';
/deep/ .ant-table-bordered .ant-table-header > table {
border: none !important;
}
</style>

View File

@ -4,18 +4,20 @@
<div class="linese"></div>
<!-- 查询区域 -->
<div class="table-page-search-wrapper" style="background: rgb(18, 44, 65);">
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypedataSources" :key="d.id">
<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.enName">
{{ d.cnName }}
</a-select-option>
</a-select>
</div>
<!-- table区域-begin -->
<div style="height:calc(100vh - 347px);background: rgb(18, 44, 65);padding:10px;">
<div ref="tableContainer" style="height:calc(100vh - 347px);background: rgb(18, 44, 65);padding:10px;">
<a-table
ref="table"
size="middle"
bordered
:pagination="false"
:scroll="{ y: tableScrollY }"
rowKey="id"
:columns="columns"
:dataSource="dataSource">
@ -94,54 +96,16 @@
contentList:[],
percent:0,
websock:{},
datatypequeryParam: {
schemaName:"",
sourceType:1
},
queryParam: {
pageNum :1,
pageSize:20
pageSize:9999999,
},
dataTypedataSources: [],
dataSource:[
{
tableName:"LA_DATA_TABLE_0001",
data1:"舰艇综合导航信息II",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"侦察预警、指挥控制",
},
{
tableName:"LA_DATA_TABLE_0002",
data1:"动力报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"指挥控制",
},
{
tableName:"LA_DATA_TABLE_0003",
data1:"电测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"支援保障",
},
{
tableName:"LA_DATA_TABLE_0004",
data1:"损管测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"支援保障",
},
{
tableName:"LA_DATA_TABLE_0005",
data1:"舰炮测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"装备运行状态",
},
{
tableName:"LA_DATA_TABLE_0006",
data1:"反潜测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"装备运行状态",
},
],
columns: [
{
@ -162,32 +126,35 @@
{
title: '报文名',
align:"center",
dataIndex: 'data1'
dataIndex: 'tableMessName'
},
{
title: '开始时间',
align:"center",
dataIndex: 'data2'
dataIndex: 'startTime'
},
{
title: '最后更新时间',
align:"center",
dataIndex: 'data3'
dataIndex: 'endTime'
},
{
title: '标签类型',
align:"center",
dataIndex: 'data4'
dataIndex: 'tagNames'
},
],
tableScrollY: 0,
}
},
mounted() {
//websocket
this.initWebSocket()
this.getselect()
this.initWebSocket()
this.getselect()
this.calculateScrollY();
},
computed: {
},
destroyed: function () { //
var userId = store.getters.userInfo.id;
@ -198,6 +165,12 @@
},
methods: {
calculateScrollY() {
//
const container = this.$refs.tableContainer;
const paginationHeight = 64; //
this.tableScrollY = container.clientHeight - paginationHeight;
},
initWebSocket: function () {
// WebSocketwshttpwsshttps
var userId = store.getters.userInfo.id;
@ -216,23 +189,18 @@
},
websocketonmessage: function (e) {
var data = eval("(" + e.data + ")");
console.log(data);
//
if(data.content.length >0){
var char = "当前同步百分比:";
let index = data.content.indexOf(char);
if (index >= 0) {
let result = data.content.substring(index + char.length,data.content.length - 1); // "V"
this.percent = parseInt(result) ;
}
this.contentList.unshift(data.content);
}
if(data.currProgress != null){
this.percent = data.currProgress;
}
},
websocketclose: function (e) {
console.log("connection closed (" + e + ")");
},
dataAdd(){
getAction("/rawToStandard/syncMultipleSchemas?dataTaskId=123").then((res) => {
getAction("/dataCleaning/cleaning?taskId=3806ce79-dc28-48a3-9250-c7729e6b3ad4").then((res) => {
if (res.success) {
this.$message.success(res.message);
}
@ -242,26 +210,29 @@
dataTypePageList(this.queryParam).then((res) => {
if (res.success) {
this.dataTypedataSources = res.result.rows||res.result;
this.datatypequeryParam.schemaName = res.result.rows[0].cnName
this.getTables();
} else {
this.$message.warning(res.message);
}
});
},
getTables(){
// datasyncgetTableInfo().then((res) => {
// if (res.result) {
// this.confirmLoading = false;
// this.dataSource = res.result;
// this.models = 2;
// } else {
// this.$message.warning(res.message);
// }
// });
getAction("/dataManager/getDataManagerInfo",this.datatypequeryParam).then((res) => {
if (res.result) {
this.dataSource = res.result;
} else {
this.$message.warning(res.message);
}
});
},
}
}
</script>
<style>
<style scoped>
/deep/ .ant-table-bordered .ant-table-header > table {
border: none !important;
}
.datacleanResult{
height:calc(100vh - 374px);
overflow-y:auto;
@ -276,7 +247,7 @@
}
.datacleanResult .title{
width: 12%;
width: 14%;
font-size: 16px;
float: left;
text-align: right;
@ -284,7 +255,7 @@
color:#fff;
}
.datacleanResult .progress{
width: 88%;
width: 86%;
float: left;
}
.datacleanResult .ant-progress-bg,
@ -302,4 +273,5 @@
border-bottom:1px dashed rgb(35,72,100);
color:#fff;
}
</style>

View File

@ -1,20 +1,23 @@
<template>
<a-row :gutter="30">
<a-col :md="12" :sm="1" >
<a-row :gutter="30" style="padding: 0 10px;">
<a-col :md="14" >
<div class="linese"></div>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypedataSources" :key="d.id">
<div class="table-page-search-wrapper" style="background: rgb(18, 44, 65);">
<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.enName">
{{ d.cnName }}
</a-select-option>
</a-select>
</div>
<!-- table区域-begin -->
<div style="height:900px;overflow-y:auto;">
<div ref="tableContainer" style="height:calc(100vh - 347px);background: rgb(18, 44, 65);padding:10px;">
<a-table
ref="table"
size="middle"
bordered
:pagination="false"
:scroll="{ y: tableScrollY }"
rowKey="id"
:columns="columns"
:dataSource="dataSource">
@ -23,35 +26,58 @@
<!-- 字符串超长截取省略号显示-->
</a-table>
</div>
<div class="linese"></div>
</a-col>
<a-col :md="12" :sm="2" >
<a-card :bordered="false">
<a-col :md="10">
<div class="linese"></div>
<a-card :bordered="false" style="background: rgb(18, 44, 65) !important;">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="12">
<a-form-item label="日志类型">
<a-select placeholder="选择日志类型" option-filter-prop="children" size="large" v-model="queryParam.syncState">
<a-select-option key="">
全部
</a-select-option>
<a-select-option key="0">
未同步
</a-select-option>
<a-select-option key="1">
进行中
</a-select-option>
<a-select-option key="2">
已结束
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="7">
</a-col>
<a-col :md="5">
<a-button @click="dataAdd" type="primary">发布到专题库</a-button>
</a-col>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="30">
<a-col :md="6" :sm="10" >
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button @click="dataAdd" type="primary" v-has="'cont:btn'" icon="plus">发布到专题库</a-button>
</span>
</a-col>
</a-row>
</a-form>
<a-progress :percent="percent" status="active" />
</div>
<!-- table区域-begin -->
<div style="height:900px;overflow-y:auto;">
<a-list bordered :data-source="contentList">
<a-list-item slot="renderItem" slot-scope="item, index">
{{ item }}
</a-list-item>
</a-list>
</div>
</a-row>
</a-form>
</div>
<!-- table区域-begin -->
<div class="datacleanResult">
<div class="progressbg">
<div class="title">发布进度</div>
<a-progress :percent="percent" status="active" class="progress" />
</div>
<a-list :data-source="contentList" style="padding:10px 20px;">
<a-list-item slot="renderItem" slot-scope="item">
{{ item }}
</a-list-item>
</a-list>
</div>
</a-card>
<div class="linese"></div>
</a-col>
</a-row>
</template>
<script>
@ -70,54 +96,16 @@
contentList:[],
percent:0,
websock:{},
datatypequeryParam: {
schemaName:"",
sourceType:2
},
queryParam: {
pageNum :1,
pageSize:20
pageSize:9999999,
},
dataTypedataSources: [],
dataSource:[
{
tableName:"LA_DATA_TABLE_0001",
data1:"舰艇综合导航信息II",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"侦察预警、指挥控制",
},
{
tableName:"LA_DATA_TABLE_0002",
data1:"动力报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"指挥控制",
},
{
tableName:"LA_DATA_TABLE_0003",
data1:"电测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"支援保障",
},
{
tableName:"LA_DATA_TABLE_0004",
data1:"损管测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"支援保障",
},
{
tableName:"LA_DATA_TABLE_0005",
data1:"舰炮测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"装备运行状态",
},
{
tableName:"LA_DATA_TABLE_0006",
data1:"反潜测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"装备运行状态",
},
],
columns: [
{
@ -138,30 +126,32 @@
{
title: '报文名',
align:"center",
dataIndex: 'data1'
dataIndex: 'tableMessName'
},
{
title: '开始时间',
align:"center",
dataIndex: 'data2'
dataIndex: 'startTime'
},
{
title: '最后更新时间',
align:"center",
dataIndex: 'data3'
dataIndex: 'endTime'
},
{
title: '标签类型',
align:"center",
dataIndex: 'data4'
dataIndex: 'tagNames'
},
],
tableScrollY:0
}
},
mounted() {
//websocket
this.initWebSocket()
this.getselect()
this.calculateScrollY();
},
computed: {
},
@ -174,6 +164,12 @@
},
methods: {
calculateScrollY() {
//
const container = this.$refs.tableContainer;
const paginationHeight = 64; //
this.tableScrollY = container.clientHeight - paginationHeight;
},
initWebSocket: function () {
// WebSocketwshttpwsshttps
var userId = store.getters.userInfo.id;
@ -215,25 +211,68 @@
dataTypePageList(this.queryParam).then((res) => {
if (res.success) {
this.dataTypedataSources = res.result.rows||res.result;
this.datatypequeryParam.schemaName = res.result.rows[0].cnName
this.getTables();
} else {
this.$message.warning(res.message);
}
});
},
getTables(){
// datasyncgetTableInfo().then((res) => {
// if (res.result) {
// this.confirmLoading = false;
// this.dataSource = res.result;
// this.models = 2;
// } else {
// this.$message.warning(res.message);
// }
// });
getAction("/dataManager/getDataManagerInfo",this.datatypequeryParam).then((res) => {
if (res.result) {
this.dataSource = res.result;
} else {
this.$message.warning(res.message);
}
});
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
/deep/ .ant-table-bordered .ant-table-header > table {
border: none !important;
}
.datacleanResult{
height:calc(100vh - 374px);
overflow-y:auto;
margin: 10px;
background: rgb(11,34,52);
}
.datacleanResult .progressbg{
margin: 10px;
height: 60px;
padding:20px 10px;
background: rgb(17,42,64);
}
.datacleanResult .title{
width: 14%;
font-size: 16px;
float: left;
text-align: right;
line-height: 20px;
color:#fff;
}
.datacleanResult .progress{
width: 86%;
float: left;
}
.datacleanResult .ant-progress-bg,
.datacleanResult .ant-progress-inner{
height: 16px !important;
}
.datacleanResult .ant-progress-bg{
background: linear-gradient(180deg, rgb(43,97,48),rgb(75,160,75),rgb(43,97,48));
}
.datacleanResult .ant-progress-text{
color:#fff;
}
.datacleanResult .ant-list-items{
border-bottom:1px dashed rgb(35,72,100);
color:#fff;
}
</style>

View File

@ -1,145 +1,143 @@
<template>
<a-row :gutter="30">
<a-col :md="24" :sm="1" >
<!-- table区域-begin -->
<div style="height:900px;overflow-y:auto;">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource">
<a-row :gutter="30">
<a-col :md="24" :sm="1" >
<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 ref="tableContainer" style="height:calc(100vh - 347px);background: rgb(18, 44, 65);padding:10px;">
<a-table
ref="table"
size="middle"
bordered
:pagination="false"
:scroll="{ y: tableScrollY }"
rowKey="id"
:columns="columns"
:dataSource="dataSource">
<!-- :locale="myLocale"-->
</a-table>
</div>
</a-col>
</a-row>
</template>
<!-- 字符串超长截取省略号显示-->
</a-table>
</div>
</a-col>
</a-row>
<script>
export default {
name: "thematicLibrary",
components: {
},
data () {
return {
description: '专题库',
contentList:[],
queryParam: {
pageNum :1,
pageSize:20
},
dataSource:[
{
tableName:"LA_DATA_TABLE_0001",
data1:"舰艇综合导航信息II",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"3646135477",
},
{
tableName:"LA_DATA_TABLE_0002",
data1:"动力报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"92547612",
},
{
tableName:"LA_DATA_TABLE_0003",
data1:"电测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"1658432215",
},
{
tableName:"LA_DATA_TABLE_0004",
data1:"损管测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"8535411",
},
{
tableName:"LA_DATA_TABLE_0005",
data1:"舰炮测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"1235744",
},
{
tableName:"LA_DATA_TABLE_0006",
data1:"反潜测试报文",
data2:"2024-03-06 10:30:26",
data3:"2024-03-06 15:30:26",
data4:"159748153",
},
],
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() {
this.getTables()
},
computed: {
},
destroyed: function () {
},
created () {
},
methods: {
getTables(){
// datasyncgetTableInfo().then((res) => {
// if (res.result) {
// this.confirmLoading = false;
// this.dataSource = res.result;
// this.models = 2;
// } else {
// this.$message.warning(res.message);
// }
// });
</template>
<script>
import store from '@/store/'
import {getAction} from '@/api/manage'
import {
dataTypePageList,
dataTypeDeleteById } from '@/api/dataType'
export default {
name: "thematicLibrary",
components: {
},
data () {
return {
description: '专题库',
contentList:[],
datatypequeryParam: {
schemaName:"",
sourceType:3
},
queryParam: {
pageNum :1,
pageSize:9999999,
},
dataTypedataSources: [],
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: 'tableMessName'
},
{
title: '开始时间',
align:"center",
dataIndex: 'startTime'
},
{
title: '最后更新时间',
align:"center",
dataIndex: 'endTime'
},
{
title: '标签类型',
align:"center",
dataIndex: 'tagNames'
},
],
tableScrollY: 0,
}
},
mounted() {
this.getselect()
this.calculateScrollY();
},
computed: {
},
destroyed: function () {
},
created () {
},
methods: {
calculateScrollY() {
//
const container = this.$refs.tableContainer;
const paginationHeight = 64; //
this.tableScrollY = container.clientHeight - paginationHeight;
},
getselect(){
dataTypePageList(this.queryParam).then((res) => {
if (res.success) {
this.dataTypedataSources = res.result.rows||res.result;
this.datatypequeryParam.schemaName = res.result.rows[0].cnName
this.getTables();
} else {
this.$message.warning(res.message);
}
});
},
getTables(){
getAction("/dataManager/getDataManagerInfo",this.datatypequeryParam).then((res) => {
if (res.result) {
this.dataSource = res.result;
} else {
this.$message.warning(res.message);
}
});
},
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
}
</script>
<style scoped>
/deep/ .ant-table-bordered .ant-table-header > table {
border: none !important;
}
</style>