数据编目等级联
This commit is contained in:
parent
741f5f306e
commit
343a00d27e
|
@ -43,6 +43,35 @@
|
||||||
<a-col :md="11" style="padding:0 20px;">
|
<a-col :md="11" style="padding:0 20px;">
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<a-form layout="inline" @keyup.enter.native="getalltable" style="margin-top: 10px;padding:10px; background: #e6e9f1;">
|
<a-form layout="inline" @keyup.enter.native="getalltable" style="margin-top: 10px;padding:10px; background: #e6e9f1;">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="8" >
|
||||||
|
<a-form-item label="型号">
|
||||||
|
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.mdl" @change="changemdl">
|
||||||
|
<a-select-option v-for="item in shipModel" :value="item">
|
||||||
|
{{ item }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8">
|
||||||
|
<a-form-item label="舷号">
|
||||||
|
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.hn" @change="changehn">
|
||||||
|
<a-select-option v-for="item in shipNumber" :value="item">
|
||||||
|
{{ item }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8">
|
||||||
|
<a-form-item label="数据类型">
|
||||||
|
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass">
|
||||||
|
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
||||||
|
{{ item.cnName }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="20" :sm="1">
|
<a-col :md="20" :sm="1">
|
||||||
<a-form-item label="关键词">
|
<a-form-item label="关键词">
|
||||||
|
@ -95,10 +124,14 @@ export default {
|
||||||
},
|
},
|
||||||
queryParam: {
|
queryParam: {
|
||||||
tableName: "",
|
tableName: "",
|
||||||
|
mdl:"",
|
||||||
|
hn:"",
|
||||||
|
schemaMass:"",
|
||||||
tagId: "",
|
tagId: "",
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 9999999,
|
pageSize: 9999999,
|
||||||
},
|
},
|
||||||
|
dataTypeList:[],
|
||||||
datatagSources: [],
|
datatagSources: [],
|
||||||
dataRefsSources: [],
|
dataRefsSources: [],
|
||||||
dataSource: [
|
dataSource: [
|
||||||
|
@ -151,6 +184,9 @@ export default {
|
||||||
selectedRowData: [],
|
selectedRowData: [],
|
||||||
tagselectedRowData: [],
|
tagselectedRowData: [],
|
||||||
tableScrollY: 0,
|
tableScrollY: 0,
|
||||||
|
shipModel:[],
|
||||||
|
shipNumber:[],
|
||||||
|
existingDataTypes:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -191,7 +227,6 @@ export default {
|
||||||
destroyed: function () {
|
destroyed: function () {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
calculateScrollY() {
|
calculateScrollY() {
|
||||||
|
@ -200,6 +235,27 @@ export default {
|
||||||
const paginationHeight = 64; // 根据实际分页栏高度调整
|
const paginationHeight = 64; // 根据实际分页栏高度调整
|
||||||
this.tableScrollY = container.clientHeight - paginationHeight;
|
this.tableScrollY = container.clientHeight - paginationHeight;
|
||||||
},
|
},
|
||||||
|
filterOption(input, option) {
|
||||||
|
return (
|
||||||
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
);
|
||||||
|
},
|
||||||
|
changemdl(value) {
|
||||||
|
var number = Object.keys(this.existingDataTypes[value])
|
||||||
|
this.shipNumber = []
|
||||||
|
number.forEach((element, index) => {
|
||||||
|
this.shipNumber.push(element);
|
||||||
|
});
|
||||||
|
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
|
||||||
|
this.queryParam.mdl = value
|
||||||
|
this.queryParam.hn = this.shipNumber[0]
|
||||||
|
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
},
|
||||||
|
changehn(value) {
|
||||||
|
this.dataTypeList =this.existingDataTypes[this.queryParam.mdl][value]
|
||||||
|
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
this.queryParam.hn = value
|
||||||
|
},
|
||||||
handleSelectChange(selectedRowKeys, row) {
|
handleSelectChange(selectedRowKeys, row) {
|
||||||
this.selectedRowKeys = selectedRowKeys
|
this.selectedRowKeys = selectedRowKeys
|
||||||
this.selectedRowData = row
|
this.selectedRowData = row
|
||||||
|
@ -209,7 +265,7 @@ export default {
|
||||||
this.tagselectedRowData = row
|
this.tagselectedRowData = row
|
||||||
},
|
},
|
||||||
gattable() {
|
gattable() {
|
||||||
this.getalltable();
|
this.getselect();
|
||||||
this.gettagTables();
|
this.gettagTables();
|
||||||
},
|
},
|
||||||
getdatatagSources() {
|
getdatatagSources() {
|
||||||
|
@ -286,6 +342,29 @@ export default {
|
||||||
this.tagloading = false;
|
this.tagloading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getselect() {
|
||||||
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.existingDataTypes = res.result.result.original
|
||||||
|
var ship = Object.keys(this.existingDataTypes)
|
||||||
|
ship.forEach((element, index) => {
|
||||||
|
this.shipModel.push(element);
|
||||||
|
});
|
||||||
|
var number = Object.keys(this.existingDataTypes[this.shipModel[0]])
|
||||||
|
number.forEach((element, index) => {
|
||||||
|
this.shipNumber.push(element);
|
||||||
|
});
|
||||||
|
this.dataTypeList =this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]]
|
||||||
|
|
||||||
|
this.queryParam.mdl = this.shipModel[0]
|
||||||
|
this.queryParam.hn = this.shipNumber[0]
|
||||||
|
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
this.getalltable()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -3,13 +3,43 @@
|
||||||
<a-col :md="14">
|
<a-col :md="14">
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
|
<div class="table-page-search-wrapper" style="padding:10px;">
|
||||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
|
<a-form layout="inline">
|
||||||
<a-select-option v-for="d in dataTypeList" :key="d.cnName">
|
<a-row :gutter="24">
|
||||||
{{ d.cnName }}
|
<a-col :md="12">
|
||||||
|
<a-form-item label="型号">
|
||||||
|
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.mdl" @change="changemdl">
|
||||||
|
<a-select-option v-for="item in shipModel" :value="item">
|
||||||
|
{{ item }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="12">
|
||||||
|
<a-form-item label="舷号">
|
||||||
|
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.hn" @change="changehn">
|
||||||
|
<a-select-option v-for="item in shipNumber" :value="item">
|
||||||
|
{{ item }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="12">
|
||||||
|
<a-form-item label="数据类型">
|
||||||
|
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" v-model="datatypequeryParam.schemaMass">
|
||||||
|
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
||||||
|
{{ item.cnName }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="12">
|
||||||
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;">
|
<div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;">
|
||||||
|
@ -99,9 +129,9 @@ export default {
|
||||||
percent: 0,
|
percent: 0,
|
||||||
websock: {},
|
websock: {},
|
||||||
datatypequeryParam: {
|
datatypequeryParam: {
|
||||||
schemaMass: "",
|
|
||||||
mdl: "",
|
mdl: "",
|
||||||
hn: "",
|
hn: "",
|
||||||
|
schemaMass: "",
|
||||||
sourceType: 1
|
sourceType: 1
|
||||||
},
|
},
|
||||||
dataTypeList:[],
|
dataTypeList:[],
|
||||||
|
@ -191,16 +221,29 @@ export default {
|
||||||
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
|
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
|
||||||
this.cleaningData.shipNumber = this.shipNumber[0]
|
this.cleaningData.shipNumber = this.shipNumber[0]
|
||||||
this.cleaningData.dataType = this.dataTypeList[0].enName
|
this.cleaningData.dataType = this.dataTypeList[0].enName
|
||||||
|
|
||||||
this.datatypequeryParam.mdl = value
|
|
||||||
this.datatypequeryParam.hn = this.shipNumber[0]
|
|
||||||
},
|
},
|
||||||
changeshipNumber(value) {
|
changeshipNumber(value) {
|
||||||
this.dataTypeList =this.existingDataTypes[this.cleaningData.shipModel][value]
|
this.dataTypeList =this.existingDataTypes[this.cleaningData.shipModel][value]
|
||||||
this.cleaningData.shipNumber = value
|
this.cleaningData.shipNumber = value
|
||||||
this.cleaningData.dataType = this.dataTypeList[0].enName
|
this.cleaningData.dataType = this.dataTypeList[0].enName
|
||||||
|
},
|
||||||
|
changemdl(value) {
|
||||||
|
var number = Object.keys(this.existingDataTypes[value])
|
||||||
|
this.shipNumber = []
|
||||||
|
number.forEach((element, index) => {
|
||||||
|
this.shipNumber.push(element);
|
||||||
|
});
|
||||||
|
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
|
||||||
|
this.datatypequeryParam.mdl = value
|
||||||
|
this.datatypequeryParam.hn = this.shipNumber[0]
|
||||||
|
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
this.getTables()
|
||||||
|
},
|
||||||
|
changehn(value) {
|
||||||
|
this.dataTypeList =this.existingDataTypes[this.datatypequeryParam.mdl][value]
|
||||||
|
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
this.datatypequeryParam.hn = value
|
this.datatypequeryParam.hn = value
|
||||||
|
this.getTables()
|
||||||
},
|
},
|
||||||
calculateScrollY() {
|
calculateScrollY() {
|
||||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||||
|
@ -262,6 +305,8 @@ export default {
|
||||||
|
|
||||||
this.datatypequeryParam.mdl = this.shipModel[0]
|
this.datatypequeryParam.mdl = this.shipModel[0]
|
||||||
this.datatypequeryParam.hn = this.shipNumber[0]
|
this.datatypequeryParam.hn = this.shipNumber[0]
|
||||||
|
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
this.getTables()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,43 @@
|
||||||
<a-col :md="14" >
|
<a-col :md="14" >
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
|
<div class="table-page-search-wrapper" style="padding:10px;">
|
||||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
|
<a-form layout="inline">
|
||||||
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
<a-row :gutter="24">
|
||||||
{{ d.cnName }}
|
<a-col :md="12">
|
||||||
|
<a-form-item label="型号">
|
||||||
|
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.mdl" @change="changemdl">
|
||||||
|
<a-select-option v-for="item in shipModel" :value="item">
|
||||||
|
{{ item }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="12">
|
||||||
|
<a-form-item label="舷号">
|
||||||
|
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.hn" @change="changehn">
|
||||||
|
<a-select-option v-for="item in shipNumber" :value="item">
|
||||||
|
{{ item }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="12">
|
||||||
|
<a-form-item label="数据类型">
|
||||||
|
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" v-model="datatypequeryParam.schemaMass">
|
||||||
|
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
||||||
|
{{ item.cnName }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="12">
|
||||||
|
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div ref="tableContainer" style="height:calc(100vh - 347px);background:rgb(230, 233, 241);padding:10px;">
|
<div ref="tableContainer" style="height:calc(100vh - 347px);background:rgb(230, 233, 241);padding:10px;">
|
||||||
|
@ -97,9 +128,12 @@
|
||||||
percent:0,
|
percent:0,
|
||||||
websock:{},
|
websock:{},
|
||||||
datatypequeryParam: {
|
datatypequeryParam: {
|
||||||
|
mdl:"",
|
||||||
|
hn:"",
|
||||||
schemaMass:"",
|
schemaMass:"",
|
||||||
sourceType:2
|
sourceType:2
|
||||||
},
|
},
|
||||||
|
dataTypeList:[],
|
||||||
queryParam: {
|
queryParam: {
|
||||||
pageNum :1,
|
pageNum :1,
|
||||||
pageSize:9999999,
|
pageSize:9999999,
|
||||||
|
@ -134,7 +168,10 @@
|
||||||
dataIndex: 'tagNames'
|
dataIndex: 'tagNames'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableScrollY:0
|
tableScrollY:0,
|
||||||
|
shipModel:[],
|
||||||
|
shipNumber:[],
|
||||||
|
existingDataTypes:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -154,12 +191,35 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
filterOption(input, option) {
|
||||||
|
return (
|
||||||
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
);
|
||||||
|
},
|
||||||
calculateScrollY() {
|
calculateScrollY() {
|
||||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||||
const container = this.$refs.tableContainer;
|
const container = this.$refs.tableContainer;
|
||||||
const paginationHeight = 64; // 根据实际分页栏高度调整
|
const paginationHeight = 64; // 根据实际分页栏高度调整
|
||||||
this.tableScrollY = container.clientHeight - paginationHeight;
|
this.tableScrollY = container.clientHeight - paginationHeight;
|
||||||
},
|
},
|
||||||
|
changemdl(value) {
|
||||||
|
var number = Object.keys(this.existingDataTypes[value])
|
||||||
|
this.shipNumber = []
|
||||||
|
number.forEach((element, index) => {
|
||||||
|
this.shipNumber.push(element);
|
||||||
|
});
|
||||||
|
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
|
||||||
|
this.datatypequeryParam.mdl = value
|
||||||
|
this.datatypequeryParam.hn = this.shipNumber[0]
|
||||||
|
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
this.getTables()
|
||||||
|
},
|
||||||
|
changehn(value) {
|
||||||
|
this.dataTypeList =this.existingDataTypes[this.datatypequeryParam.mdl][value]
|
||||||
|
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
this.datatypequeryParam.hn = value
|
||||||
|
this.getTables()
|
||||||
|
},
|
||||||
initWebSocket: function () {
|
initWebSocket: function () {
|
||||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||||
var userId = store.getters.userInfo.id;
|
var userId = store.getters.userInfo.id;
|
||||||
|
@ -202,12 +262,21 @@
|
||||||
getselect() {
|
getselect() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
console.log(res)
|
this.existingDataTypes = res.result.result.standard
|
||||||
this.dataTypedataSources = res.result.result.standard
|
var ship = Object.keys(this.existingDataTypes)
|
||||||
if(res.result.result.standard.length > 0){
|
ship.forEach((element, index) => {
|
||||||
this.datatypequeryParam.schemaMass = res.result.result.standard[0].cnName
|
this.shipModel.push(element);
|
||||||
}
|
});
|
||||||
this.getTables();
|
var number = Object.keys(this.existingDataTypes[this.shipModel[0]])
|
||||||
|
number.forEach((element, index) => {
|
||||||
|
this.shipNumber.push(element);
|
||||||
|
});
|
||||||
|
this.dataTypeList =this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]]
|
||||||
|
|
||||||
|
this.datatypequeryParam.mdl = this.shipModel[0]
|
||||||
|
this.datatypequeryParam.hn = this.shipNumber[0]
|
||||||
|
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||||
|
this.getTables()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user