修改页面初始化规则

This commit is contained in:
RenCheng 2025-03-08 12:43:26 +08:00
parent 0d4d05c40f
commit a65954bcd4
3 changed files with 47 additions and 16 deletions

View File

@ -125,12 +125,12 @@ import get from 'lodash.get'
columns: [
{
title: '表名',
align:"center",
align:"left",
dataIndex: 'tableName',
},
{
title: '报文名',
align:"center",
align:"left",
dataIndex: 'tableMessName'
},
],
@ -147,12 +147,12 @@ import get from 'lodash.get'
},
{
title: '表名',
align:"center",
align:"left",
dataIndex: 'tableName',
},
{
title: '报文名',
align:"center",
align:"left",
dataIndex: 'tableMessName'
},
],
@ -163,6 +163,8 @@ import get from 'lodash.get'
},
selectedRowKeys: [],
tagselectedRowKeys: [],
selectedRowData: [],
tagselectedRowData: [],
}
},
mounted() {
@ -207,10 +209,11 @@ import get from 'lodash.get'
methods: {
handleSelectChange(selectedRowKeys,row) {
this.selectedRowKeys = selectedRowKeys
console.log(row);
this.selectedRowData = row
},
taghandleSelectChange(selectedRowKeys) {
taghandleSelectChange(selectedRowKeys,row) {
this.tagselectedRowKeys = selectedRowKeys
this.tagselectedRowData = row
},
getdatatagSources(){
idcTableTaglist(this.tagqueryParam).then((res) => {
@ -232,10 +235,34 @@ import get from 'lodash.get'
});
},
addtag(){
var that = this;
this.selectedRowData.forEach(item => {
idcTableTagRef({
"tagId": that.queryParam.tagId,
"tableName": item.tableName,
"schemaName": item.schemaName
}).then((res) => {
if (res.success) {
that.getalltable();
that.gettagTables();
} else {
that.$message.warning(res.message);
}
});
})
},
detag(){
var that = this;
this.tagselectedRowKeys.forEach(item => {
idcTableTagRefdelete({id: item}).then((res) => {
if (res.success) {
that.getalltable();
that.gettagTables();
} else {
that.$message.warning(res.message);
}
});
});
},
getalltable(){
this.queryParam.tagId = this.queryRefsParam.tagId

View File

@ -3,7 +3,7 @@
<a-col :md="12" :sm="1" >
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" style="width: 40%;">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.datatype" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypedataSources" :key="d.id">
{{ d.cnName }}
</a-select-option>
@ -15,6 +15,8 @@
ref="table"
size="middle"
bordered
:pagination="false"
:scroll="{ y: 800 }"
rowKey="id"
:columns="columns"
:dataSource="dataSource">
@ -65,8 +67,7 @@
percent:0,
websock:{},
queryParam: {
pageNum :1,
pageSize:20
datatype:""
},
dataTypedataSources: [],
dataSource:[
@ -154,8 +155,8 @@
},
mounted() {
//websocket
this.initWebSocket()
this.getselect()
this.initWebSocket()
this.getselect()
},
computed: {
},
@ -212,6 +213,7 @@
dataTypePageList(this.queryParam).then((res) => {
if (res.success) {
this.dataTypedataSources = res.result.rows||res.result;
this.queryParam.datatype = res.result.rows[0].cnName
} else {
this.$message.warning(res.message);
}

View File

@ -3,7 +3,7 @@
<a-col :md="12" :sm="1" >
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" style="width: 40%;">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.datatype" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypedataSources" :key="d.id">
{{ d.cnName }}
</a-select-option>
@ -15,6 +15,8 @@
ref="table"
size="middle"
bordered
:pagination="false"
:scroll="{ y: 800 }"
rowKey="id"
:columns="columns"
:dataSource="dataSource">
@ -71,8 +73,7 @@
percent:0,
websock:{},
queryParam: {
pageNum :1,
pageSize:20
datatype:""
},
dataTypedataSources: [],
dataSource:[
@ -215,6 +216,7 @@
dataTypePageList(this.queryParam).then((res) => {
if (res.success) {
this.dataTypedataSources = res.result.rows||res.result;
this.queryParam.datatype = res.result.rows[0].cnName
} else {
this.$message.warning(res.message);
}