Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
876299cb9f | ||
![]() |
343a00d27e | ||
![]() |
741f5f306e | ||
![]() |
8858f4f8a5 | ||
![]() |
714f22247b | ||
![]() |
4de879b236 | ||
![]() |
a917023e50 | ||
![]() |
db2e18aa67 | ||
![]() |
80e7359359 | ||
![]() |
896a3f0756 | ||
![]() |
753ee55ca4 | ||
![]() |
687c1eebbd | ||
![]() |
c4f6ae6dd1 | ||
![]() |
ee03e5a5c5 | ||
![]() |
445d8c40b3 |
3
public/config.js
vendored
3
public/config.js
vendored
|
@ -1,3 +1,4 @@
|
|||
window.AppConfig = {
|
||||
systemTitle: '末端数据接入处理系统'
|
||||
systemTitle: '末端数据接入处理系统',
|
||||
apiUrl: 'http://pbl.natapp1.cc/jeecg-boot'
|
||||
}
|
|
@ -120,6 +120,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.sysTitle = window.AppConfig.systemTitle
|
||||
this.apiUrl = window.AppConfig.apiUrl
|
||||
},
|
||||
methods: {
|
||||
handleScroll() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Vue from 'vue'
|
||||
//设置全局API_BASE_URL
|
||||
Vue.prototype.API_BASE_URL = process.env.VUE_APP_API_BASE_URL
|
||||
window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL
|
||||
window._CONFIG['domianURL'] = window.AppConfig.apiUrl
|
||||
//单点登录地址
|
||||
window._CONFIG['casPrefixUrl'] = process.env.VUE_APP_CAS_BASE_URL
|
||||
window._CONFIG['onlinePreviewDomainURL'] = process.env.VUE_APP_ONLINE_BASE_URL
|
||||
|
|
|
@ -43,6 +43,35 @@
|
|||
<a-col :md="11" style="padding:0 20px;">
|
||||
<div class="linese"></div>
|
||||
<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-col :md="20" :sm="1">
|
||||
<a-form-item label="关键词">
|
||||
|
@ -95,10 +124,14 @@ export default {
|
|||
},
|
||||
queryParam: {
|
||||
tableName: "",
|
||||
mdl:"",
|
||||
hn:"",
|
||||
schemaMass:"",
|
||||
tagId: "",
|
||||
pageNum: 1,
|
||||
pageSize: 9999999,
|
||||
},
|
||||
dataTypeList:[],
|
||||
datatagSources: [],
|
||||
dataRefsSources: [],
|
||||
dataSource: [
|
||||
|
@ -151,6 +184,9 @@ export default {
|
|||
selectedRowData: [],
|
||||
tagselectedRowData: [],
|
||||
tableScrollY: 0,
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -191,7 +227,6 @@ export default {
|
|||
destroyed: function () {
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
calculateScrollY() {
|
||||
|
@ -200,6 +235,27 @@ export default {
|
|||
const paginationHeight = 64; // 根据实际分页栏高度调整
|
||||
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) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRowData = row
|
||||
|
@ -209,7 +265,7 @@ export default {
|
|||
this.tagselectedRowData = row
|
||||
},
|
||||
gattable() {
|
||||
this.getalltable();
|
||||
this.getselect();
|
||||
this.gettagTables();
|
||||
},
|
||||
getdatatagSources() {
|
||||
|
@ -286,6 +342,29 @@ export default {
|
|||
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>
|
||||
|
|
|
@ -3,13 +3,43 @@
|
|||
<a-col :md="14">
|
||||
<div class="linese"></div>
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
|
||||
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||
{{ d.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
||||
<div class="table-page-search-wrapper" style="padding:10px;">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="24">
|
||||
<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>
|
||||
</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>
|
||||
<!-- table区域-begin -->
|
||||
<div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;">
|
||||
|
@ -29,29 +59,37 @@
|
|||
<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-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="cleaningData.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7">
|
||||
<a-col :md="12">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="cleaningData.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5">
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select mode="multiple" placeholder="选择数据类型" option-filter-prop="children" v-model="cleaningData.dataType">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12">
|
||||
<a-button @click="dataAdd" type="primary">数据清洗整编</a-button>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
@ -91,9 +129,17 @@ export default {
|
|||
percent: 0,
|
||||
websock: {},
|
||||
datatypequeryParam: {
|
||||
mdl: "",
|
||||
hn: "",
|
||||
schemaMass: "",
|
||||
sourceType: 1
|
||||
},
|
||||
dataTypeList:[],
|
||||
cleaningData:{
|
||||
shipModel:'',
|
||||
shipNumber:'',
|
||||
dataType:''
|
||||
},
|
||||
queryParam: {
|
||||
pageNum: 1,
|
||||
pageSize: 9999999,
|
||||
|
@ -134,6 +180,9 @@ export default {
|
|||
},
|
||||
],
|
||||
tableScrollY: 0,
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -157,6 +206,45 @@ export default {
|
|||
openlink(url) {
|
||||
window.location.href = url;
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.cleaningData.shipModel = 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.cleaningData.shipNumber = this.shipNumber[0]
|
||||
this.cleaningData.dataType = this.dataTypeList[0].enName
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.cleaningData.shipModel][value]
|
||||
this.cleaningData.shipNumber = value
|
||||
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.getTables()
|
||||
},
|
||||
calculateScrollY() {
|
||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||
const container = this.$refs.tableContainer;
|
||||
|
@ -192,7 +280,7 @@ export default {
|
|||
console.log("connection closed (" + e + ")");
|
||||
},
|
||||
dataAdd() {
|
||||
getAction("/dataCleaning/cleaning?taskId=3806ce79-dc28-48a3-9250-c7729e6b3ad4").then((res) => {
|
||||
getAction("/dataCleaning/cleaning?taskId=123456&shipModel="+this.cleaningData.shipModel+"&shipNumber="+this.cleaningData.shipNumber+"&dataTypes="+this.cleaningData.dataType).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
}
|
||||
|
@ -200,16 +288,29 @@ export default {
|
|||
},
|
||||
getselect() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_ORIGINAL[0].cnName
|
||||
}
|
||||
this.getTables();
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
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.cleaningData.shipModel = this.shipModel[0]
|
||||
this.cleaningData.shipNumber = this.shipNumber[0]
|
||||
this.cleaningData.dataType = this.dataTypeList[0].enName
|
||||
|
||||
this.datatypequeryParam.mdl = this.shipModel[0]
|
||||
this.datatypequeryParam.hn = this.shipNumber[0]
|
||||
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
this.getTables()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
getTables() {
|
||||
getAction("/dataManager/getDataManagerInfo", this.datatypequeryParam).then((res) => {
|
||||
|
|
|
@ -3,12 +3,43 @@
|
|||
<a-col :md="14" >
|
||||
<div class="linese"></div>
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
|
||||
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||
{{ d.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<div class="table-page-search-wrapper" style="padding:10px;">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="24">
|
||||
<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>
|
||||
</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>
|
||||
<!-- table区域-begin -->
|
||||
<div ref="tableContainer" style="height:calc(100vh - 347px);background:rgb(230, 233, 241);padding:10px;">
|
||||
|
@ -97,9 +128,12 @@
|
|||
percent:0,
|
||||
websock:{},
|
||||
datatypequeryParam: {
|
||||
mdl:"",
|
||||
hn:"",
|
||||
schemaMass:"",
|
||||
sourceType:2
|
||||
},
|
||||
dataTypeList:[],
|
||||
queryParam: {
|
||||
pageNum :1,
|
||||
pageSize:9999999,
|
||||
|
@ -134,7 +168,10 @@
|
|||
dataIndex: 'tagNames'
|
||||
},
|
||||
],
|
||||
tableScrollY:0
|
||||
tableScrollY:0,
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -154,12 +191,35 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
calculateScrollY() {
|
||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||
const container = this.$refs.tableContainer;
|
||||
const paginationHeight = 64; // 根据实际分页栏高度调整
|
||||
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 () {
|
||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||
var userId = store.getters.userInfo.id;
|
||||
|
@ -199,14 +259,24 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
getselect(){
|
||||
getselect() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD
|
||||
if(res.result.result.DATA_CONN_STANDARD.length > 0){
|
||||
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName
|
||||
}
|
||||
this.getTables();
|
||||
this.existingDataTypes = res.result.result.standard
|
||||
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.datatypequeryParam.mdl = this.shipModel[0]
|
||||
this.datatypequeryParam.hn = this.shipNumber[0]
|
||||
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
this.getTables()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
|
|
|
@ -2,30 +2,44 @@
|
|||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass" @change="handleTypeChange">
|
||||
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||
{{ d.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="关键词">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12">
|
||||
<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="12">
|
||||
<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-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getMetaDataTypeTree" 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-col :md="12">
|
||||
<a-form-item label="关键词">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
|
@ -69,15 +83,18 @@ export default {
|
|||
return {
|
||||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 1,
|
||||
schemaMass: null,
|
||||
massKey: null
|
||||
},
|
||||
tableParams: {
|
||||
schemaMass: null,
|
||||
tableName: null
|
||||
},
|
||||
queryParam: {
|
||||
mdl:"",
|
||||
hn:"",
|
||||
schemaMass:"",
|
||||
sourceType:1,
|
||||
massKey: null
|
||||
},
|
||||
dataTypeList:[],
|
||||
treeDate: [],
|
||||
dataSource: [],
|
||||
columns: [
|
||||
|
@ -114,6 +131,9 @@ export default {
|
|||
}
|
||||
],
|
||||
dataTypedataSources:[],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -131,18 +151,51 @@ export default {
|
|||
this.getselect()
|
||||
},
|
||||
methods: {
|
||||
getselect(){
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.schemaMass = res.result.result.DATA_CONN_ORIGINAL[0].cnName
|
||||
}
|
||||
this.getMetaDataTypeTree();
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
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
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
changehn(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.mdl][value]
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
this.queryParam.hn = value
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
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.getMetaDataTypeTree()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaViewDataTypeTree(this.queryParam).then(res => {
|
||||
|
@ -177,6 +230,9 @@ export default {
|
|||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||
this.tableParams.schemaMass = info.node.$parent.dataRef.title
|
||||
this.tableParams.tableName = info.node.dataRef.key
|
||||
this.tableParams.tableName = info.node.dataRef.key
|
||||
this.tableParams.mdl = this.queryParam.mdl
|
||||
this.tableParams.hn = this.queryParam.hn
|
||||
this.getMetaDatalist()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -40,18 +40,25 @@ export default {
|
|||
submitForm: {
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
fieldValues: null
|
||||
fieldValues: null,
|
||||
sourceType: null,
|
||||
mdl: null,
|
||||
hn: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
initForm(schemaMass, tableName, columns, record) {
|
||||
initForm(schemaMass, tableName, columns, record, sourceType, mdl, hn) {
|
||||
console.log('接收', sourceType)
|
||||
this.visible = true;
|
||||
this.nodes = columns
|
||||
this.submitForm.schemaMass = schemaMass
|
||||
this.submitForm.tableName = tableName
|
||||
this.submitForm.sourceType = sourceType
|
||||
this.submitForm.mdl = mdl
|
||||
this.submitForm.hn = hn
|
||||
this.form = record
|
||||
},
|
||||
close() {
|
||||
|
@ -64,6 +71,7 @@ export default {
|
|||
if (valid) {
|
||||
that.confirmLoading = true;
|
||||
that.submitForm.fieldValues = that.form
|
||||
|
||||
updateDmTableBySeqNo(that.submitForm).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
|
|
|
@ -50,7 +50,10 @@ import {getAction} from '@/api/manage'
|
|||
title:"导出日志",
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
sourceType: null,
|
||||
schemaMass:null,
|
||||
mdl: null,
|
||||
hn: null,
|
||||
dataSource:[],
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
|
@ -115,13 +118,16 @@ import {getAction} from '@/api/manage'
|
|||
|
||||
},
|
||||
methods: {
|
||||
add (schemaMass) {
|
||||
add (sourceType, schemaMass, mdl, hn) {
|
||||
this.visible =true;
|
||||
this.sourceType = sourceType;
|
||||
this.schemaMass = schemaMass;
|
||||
this.mdl = mdl;
|
||||
this.hn = hn;
|
||||
this.getTableInfo();
|
||||
},
|
||||
getTableInfo(){
|
||||
getAction("/dataManager/DmExportLog?schemaMass="+this.schemaMass,{}).then(res => {
|
||||
getAction("/dataManager/DmExportLog?schemaMass="+this.schemaMass + '&mdl='+ this.mdl + '&hn=' + this.hn + '&sourceType='+this.sourceType,{}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.dataSource = res.result
|
||||
console.log(this.dataSource)
|
||||
|
|
|
@ -46,9 +46,11 @@ import { metaDataTypeTree } from '@/api/metaData'
|
|||
visible: false,
|
||||
confirmLoading: false,
|
||||
queryParam: {
|
||||
sourceType: 2,
|
||||
sourceType: null,
|
||||
schemaMass: null,
|
||||
massKey: null
|
||||
massKey: null,
|
||||
mdl: null,
|
||||
hn: null
|
||||
},
|
||||
dataSource:[],
|
||||
selectedRowKeys: [],
|
||||
|
@ -80,9 +82,12 @@ import { metaDataTypeTree } from '@/api/metaData'
|
|||
|
||||
},
|
||||
methods: {
|
||||
add (schemaMass) {
|
||||
add (sourceType, schemaMass, mdl, hn) {
|
||||
this.visible =true;
|
||||
this.queryParam.sourceType = sourceType;
|
||||
this.queryParam.schemaMass = schemaMass;
|
||||
this.queryParam.mdl = mdl;
|
||||
this.queryParam.hn = hn;
|
||||
this.getTableInfo();
|
||||
},
|
||||
getTableInfo(){
|
||||
|
@ -136,8 +141,9 @@ import { metaDataTypeTree } from '@/api/metaData'
|
|||
},(error) => {
|
||||
return Promise.reject(error)
|
||||
})
|
||||
console.log(this.queryParam.sourceType)
|
||||
service({
|
||||
url: "/dataManager/DmExportTable?schemaMass="+this.queryParam.schemaMass+"&tableNames="+this.selectedRowKeys+"&exportType="+exportType,
|
||||
url: "/dataManager/DmExportTable?sourceType="+this.queryParam.sourceType+"&mdl="+this.queryParam.mdl+"&hn="+this.queryParam.hn+"&schemaMass="+this.queryParam.schemaMass+"&tableNames="+this.selectedRowKeys+"&exportType="+exportType,
|
||||
params: {},
|
||||
method:'post' ,
|
||||
responseType: 'blob'
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
{
|
||||
title: '数据类型',
|
||||
align: "center",
|
||||
dataIndex: 'tableMessName',
|
||||
dataIndex: 'schemaDesc',
|
||||
customRender: () => {
|
||||
return this.datatypequeryParam.schemaDesc;
|
||||
}
|
||||
|
@ -109,10 +109,10 @@
|
|||
getselect(){
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.DATA_CONN_SPECIAL
|
||||
if(res.result.result.DATA_CONN_SPECIAL.length > 0){
|
||||
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_SPECIAL[0].enName
|
||||
this.datatypequeryParam.schemaDesc = res.result.result.DATA_CONN_SPECIAL[0].cnName
|
||||
this.dataTypedataSources = res.result.result.special
|
||||
if(res.result.result.special.length > 0){
|
||||
this.datatypequeryParam.schemaMass = res.result.result.special[0].enName
|
||||
this.datatypequeryParam.schemaDesc = res.result.result.special[0].cnName
|
||||
}
|
||||
this.getTables();
|
||||
} else {
|
||||
|
|
335
src/views/dataSearch/applicationlibrary/index.vue
Normal file
335
src/views/dataSearch/applicationlibrary/index.vue
Normal file
|
@ -0,0 +1,335 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass"
|
||||
@change="handleTypeChange">
|
||||
<a-select-option v-for="d in dataTypedataSources" :key="d.enName">
|
||||
{{ d.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="任务">
|
||||
<a-select placeholder="选择任务" option-filter-prop="children" v-model="activeTaskId"
|
||||
@change="handleTaskChange">
|
||||
<a-select-option v-for="d in allTask" :key="d.id">
|
||||
{{ d.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="8">
|
||||
<a-form-item label="时间范围">
|
||||
<!-- <a-range-picker :default-value="defaultTime" show-time :show-time="{ format: 'HH:mm:ss' }"
|
||||
:format="dateFormat" @change="onChangeTime" /> -->
|
||||
<a-range-picker :show-time="{ format: 'HH:mm:ss' }" v-model="defaultTime" format="YYYY-MM-DD HH:mm:ss"
|
||||
@change="onChangeTime" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="5">
|
||||
<a-form-item label="关键词">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24" style="text-align: right;">
|
||||
<a-button @click="getTableDataList" type="primary">查询</a-button>
|
||||
<!-- <a-button @click="exportTool" type="primary">导出dmp</a-button>
|
||||
<a-button @click="handleAdd" type="primary">导出csv、txt</a-button>
|
||||
<a-button @click="openexptable" type="primary">导出日志</a-button> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
<a-col :md="6">
|
||||
<div class="linese"></div>
|
||||
<!-- 分类区域 -->
|
||||
<div style="height:calc(100vh - 366px);overflow: auto;background: #e6e9f1;padding:10px;" ref="treeContainer">
|
||||
<a-tree :tree-data="treeDate" @select="onSelect" />
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
<a-col :md="18">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 420px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ x: 1200, y: 'calc(100vh - 450px)' }" rowKey="序号"
|
||||
@change="handleTableChange">
|
||||
<template slot="operation" slot-scope="text, record">
|
||||
<a-button type="primary" @click="handelEdit(record)">编辑</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<tablelist ref="modalForm"></tablelist>
|
||||
<exptable ref="exptable"></exptable>
|
||||
<editdataseach ref="editdataseachForm" @ok="getTableDataList" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import { metaDataTypeTree, tableDataList, DmExportTool } from '@/api/metaData'
|
||||
import { getAction, deleteAction, putAction, postAction, downFile } from '@/api/manage'
|
||||
import { getAllTask } from '@/api/task'
|
||||
import moment from 'moment';
|
||||
import tablelist from '../../data/modules/tablelist.vue'
|
||||
import exptable from '../../data/modules/exptable.vue'
|
||||
import editdataseach from '../../data/modules/editdataseach.vue'
|
||||
|
||||
export default {
|
||||
name: "metadata",
|
||||
components: {
|
||||
tablelist,
|
||||
exptable,
|
||||
editdataseach
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
defaultTime: [],
|
||||
loading: false,
|
||||
allTask: [],
|
||||
activeTaskId: null,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 3,
|
||||
schemaMass: null,
|
||||
schemaDesc: null,
|
||||
massKey: null
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: false,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
tableParams: {
|
||||
sourceType: 3,
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
},
|
||||
treeDate: [],
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
dataTypedataSources: [],
|
||||
treeHeight: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'queryParam.massKey'(value) {
|
||||
this.queryParam.massKey = value
|
||||
this.getMetaDataTypeTree()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.calculateScrollY();
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getselect()
|
||||
this.queryAllTask()
|
||||
// this.initDate()
|
||||
},
|
||||
methods: {
|
||||
queryAllTask() {
|
||||
getAllTask().then(res => {
|
||||
console.log('res', res)
|
||||
if (res.success) {
|
||||
this.allTask = res.result
|
||||
if (res.result.length > 0) {
|
||||
this.activeTaskId = res.result[0].id
|
||||
const start = moment(res.result[0].startTime)
|
||||
const end = moment(res.result[0].endTime)
|
||||
this.defaultTime.push(start, end)
|
||||
this.tableParams.startTime = start.format(this.dateFormat);
|
||||
this.tableParams.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTaskChange(value) {
|
||||
var curTask = this.allTask.filter(item => item.id == value)[0]
|
||||
if (curTask) {
|
||||
const start = moment(curTask.startTime)
|
||||
const end = moment(curTask.endTime)
|
||||
this.defaultTime=[start, end]
|
||||
this.tableParams.startTime = start.format(this.dateFormat);
|
||||
this.tableParams.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
},
|
||||
calculateScrollY() {
|
||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||
const container = this.$refs.treeContainer;
|
||||
this.treeHeight = container.clientHeight;
|
||||
},
|
||||
getselect() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.special
|
||||
if (res.result.result.special.length > 0) {
|
||||
this.queryParam.schemaMass = res.result.result.special[0].enName
|
||||
this.queryParam.schemaDesc = res.result.result.special[0].cnName
|
||||
}
|
||||
this.getMetaDataTypeTree();
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.modalForm.add(this.queryParam.schemaMass);
|
||||
},
|
||||
openexptable() {
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择查询的导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.exptable.add(this.queryParam.schemaMass);
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeDate = []
|
||||
var keys = Object.keys(res.result)
|
||||
keys.forEach((element, index) => {
|
||||
const _children = res.result[element]
|
||||
var childrenList = []
|
||||
_children.forEach((childrenNode, chil) => {
|
||||
childrenList.push({
|
||||
key: childrenNode.tableName,
|
||||
type: 'childern',
|
||||
title: childrenNode.massName
|
||||
})
|
||||
});
|
||||
this.treeDate.push({
|
||||
key: 'type_' + index,
|
||||
type: 'parentType',
|
||||
title: this.queryParam.schemaDesc,
|
||||
children: childrenList
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
const selectedOption = this.dataTypedataSources.find(
|
||||
(d) => d.enName === this.queryParam.schemaMass
|
||||
)
|
||||
this.queryParam.schemaDesc = selectedOption?selectedOption.cnName:""
|
||||
|
||||
this.queryParam.schemaMass = value
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
onSelect(selectedKeys, info) {
|
||||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||
this.tableParams.schemaMass = this.queryParam.schemaMass
|
||||
this.tableParams.tableName = info.node.dataRef.key
|
||||
this.getTableDataList()
|
||||
}
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.pagination = pagination
|
||||
this.tableParams.pageNum = pagination.current
|
||||
this.tableParams.pageSize = pagination.pageSize
|
||||
this.getTableDataList()
|
||||
},
|
||||
onChangeTime(date, dateString) {
|
||||
if (date.length == 0) {
|
||||
this.tableParams.startTime = null
|
||||
this.tableParams.endTime = null
|
||||
this.tableParams.pageNum = 1
|
||||
} else {
|
||||
this.tableParams.startTime = moment(date[0]).format(this.dateFormat);
|
||||
this.tableParams.endTime = moment(date[1]).format(this.dateFormat);
|
||||
this.tableParams.pageNum = 1
|
||||
}
|
||||
},
|
||||
handelEdit(record) {
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID');
|
||||
delete record['ROW_ID'];
|
||||
this.$refs.editdataseachForm.initForm(this.tableParams.schemaMass, this.tableParams.tableName, filteredColumn, record);
|
||||
},
|
||||
getTableDataList() {
|
||||
if (this.tableParams.schemaMass == null || this.tableParams.tableName == null) {
|
||||
this.$message.warning('必须选择查询的表')
|
||||
return
|
||||
}
|
||||
tableDataList(this.tableParams).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.columns = []
|
||||
if (res.result.columnNames.length > 0) {
|
||||
res.result.columnNames.forEach(columns => {
|
||||
this.columns.push({
|
||||
title: columns,
|
||||
dataIndex: columns,
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
})
|
||||
})
|
||||
this.columns.push({
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
scopedSlots: { customRender: 'operation' },
|
||||
})
|
||||
}
|
||||
|
||||
const pagination = { ...this.pagination }
|
||||
pagination.total = res.result.total
|
||||
this.dataSource = res.result.rows
|
||||
this.pagination = pagination
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
exportTool() {
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
postAction("/dataManager/DmExportTool?schemaMass=" + this.queryParam.schemaMass + "&tableNames=" + "" + "&exportType=0", {}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
405
src/views/dataSearch/integrationlibrary/index.vue
Normal file
405
src/views/dataSearch/integrationlibrary/index.vue
Normal file
|
@ -0,0 +1,405 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search
|
||||
:filter-option="filterOption" v-model="queryParam.mdl" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search
|
||||
:filter-option="filterOption" v-model="queryParam.hn" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass"
|
||||
@change="handleTypeChange">
|
||||
<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="4" :sm="4">
|
||||
<a-form-item label="任务">
|
||||
<a-select placeholder="选择任务" option-filter-prop="children" v-model="activeTaskId"
|
||||
@change="handleTaskChange">
|
||||
<a-select-option v-for="d in allTask" :key="d.id">
|
||||
{{ d.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="8">
|
||||
<a-form-item label="时间范围">
|
||||
<!-- <a-range-picker :default-value="defaultTime" show-time :show-time="{ format: 'HH:mm:ss' }"
|
||||
:format="dateFormat" @change="onChangeTime" /> -->
|
||||
<a-range-picker :show-time="{ format: 'HH:mm:ss' }" v-model="defaultTime"
|
||||
format="YYYY-MM-DD HH:mm:ss" @change="onChangeTime" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="5">
|
||||
<a-form-item label="关键词">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24" style="text-align: right;">
|
||||
<a-button @click="getTableDataList" type="primary">查询</a-button>
|
||||
<a-button @click="exportTool" type="primary">导出dmp</a-button>
|
||||
<a-button @click="handleAdd" type="primary">导出csv、txt</a-button>
|
||||
<a-button @click="openexptable" type="primary">导出日志</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
<a-col :md="6">
|
||||
<div class="linese"></div>
|
||||
<!-- 分类区域 -->
|
||||
<div style="height:calc(100vh - 420px);overflow: auto;background: #e6e9f1;padding:10px;"
|
||||
ref="treeContainer">
|
||||
<a-tree :tree-data="treeDate" @select="onSelect" />
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
<a-col :md="18">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 420px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ x: 1200, y: 'calc(100vh - 450px)' }" rowKey="序号"
|
||||
@change="handleTableChange">
|
||||
<template slot="operation" slot-scope="text, record">
|
||||
<a-button type="primary" @click="handelEdit(record)">编辑</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<tablelist ref="modalForm"></tablelist>
|
||||
<exptable ref="exptable"></exptable>
|
||||
<editdataseach ref="editdataseachForm" @ok="getTableDataList" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import { metaDataTypeTree, tableDataList, DmExportTool } from '@/api/metaData'
|
||||
import { getAction, deleteAction, putAction, postAction, downFile } from '@/api/manage'
|
||||
import { getAllTask } from '@/api/task'
|
||||
import moment from 'moment';
|
||||
import tablelist from '../../data/modules/tablelist.vue'
|
||||
import exptable from '../../data/modules/exptable.vue'
|
||||
import editdataseach from '../../data/modules/editdataseach.vue'
|
||||
|
||||
export default {
|
||||
name: "metadata",
|
||||
components: {
|
||||
tablelist,
|
||||
exptable,
|
||||
editdataseach
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
defaultTime: [],
|
||||
loading: false,
|
||||
allTask: [],
|
||||
activeTaskId: null,
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: false,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 2,
|
||||
massKey: null,
|
||||
mdl: null, // 型号
|
||||
hn: null, // 舷号
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
},
|
||||
treeDate: [],
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
dataTypeList: [],
|
||||
shipModel: [],
|
||||
shipNumber: [],
|
||||
existingDataTypes: {},
|
||||
treeHeight: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'queryParam.massKey'(value) {
|
||||
this.queryParam.massKey = value
|
||||
this.getMetaDataTypeTree()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.calculateScrollY();
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getselect()
|
||||
this.queryAllTask()
|
||||
// this.initDate()
|
||||
},
|
||||
methods: {
|
||||
queryAllTask() {
|
||||
getAllTask().then(res => {
|
||||
if (res.success) {
|
||||
this.allTask = res.result
|
||||
if (res.result.length > 0) {
|
||||
this.activeTaskId = res.result[0].id
|
||||
const start = moment(res.result[0].startTime)
|
||||
const end = moment(res.result[0].endTime)
|
||||
this.defaultTime.push(start, end)
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTaskChange(value) {
|
||||
var curTask = this.allTask.filter(item => item.id == value)[0]
|
||||
if (curTask) {
|
||||
const start = moment(curTask.startTime)
|
||||
const end = moment(curTask.endTime)
|
||||
this.defaultTime = [start, end]
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
},
|
||||
calculateScrollY() {
|
||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||
const container = this.$refs.treeContainer;
|
||||
this.treeHeight = container.clientHeight;
|
||||
},
|
||||
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.hn = value
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
getselect() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.existingDataTypes = res.result.result.standard
|
||||
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]]
|
||||
console.log(this.existingDataTypes)
|
||||
console.log(this.dataTypeList)
|
||||
this.queryParam.mdl = this.shipModel[0]
|
||||
this.queryParam.hn = this.shipNumber[0]
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
this.getMetaDataTypeTree()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.queryParam.mdl == "") {
|
||||
this.$message.warning("请选择型号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.hn == "") {
|
||||
this.$message.warning("请选择舷号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.modalForm.add(this.queryParam.sourceType, this.queryParam.schemaMass, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
openexptable() {
|
||||
|
||||
if (this.queryParam.mdl == "") {
|
||||
this.$message.warning("请选择型号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.hn == "") {
|
||||
this.$message.warning("请选择舷号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择查询的导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.exptable.add(this.queryParam.sourceType, this.queryParam.schemaMass, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeDate = []
|
||||
var keys = Object.keys(res.result)
|
||||
keys.forEach((element, index) => {
|
||||
const _children = res.result[element]
|
||||
var childrenList = []
|
||||
_children.forEach((childrenNode, chil) => {
|
||||
childrenList.push({
|
||||
key: childrenNode.tableName,
|
||||
type: 'childern',
|
||||
title: childrenNode.massName
|
||||
})
|
||||
});
|
||||
this.treeDate.push({
|
||||
key: 'type_' + index,
|
||||
type: 'parentType',
|
||||
title: element,
|
||||
children: childrenList
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.schemaMass = value
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
onSelect(selectedKeys, info) {
|
||||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||
this.queryParam.schemaMass = info.node.$parent.dataRef.title
|
||||
this.queryParam.tableName = info.node.dataRef.key
|
||||
this.getTableDataList()
|
||||
}
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.pagination = pagination
|
||||
this.queryParam.pageNum = pagination.current
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getTableDataList()
|
||||
},
|
||||
onChangeTime(date, dateString) {
|
||||
if (date.length == 0) {
|
||||
this.queryParam.startTime = null
|
||||
this.queryParam.endTime = null
|
||||
this.queryParam.pageNum = 1
|
||||
} else {
|
||||
this.queryParam.startTime = moment(date[0]).format(this.dateFormat);
|
||||
this.queryParam.endTime = moment(date[1]).format(this.dateFormat);
|
||||
this.queryParam.pageNum = 1
|
||||
}
|
||||
},
|
||||
handelEdit(record) {
|
||||
console.log('sdfsdf', record)
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID' && item.dataIndex != '数据');
|
||||
delete record['ROW_ID'];
|
||||
delete record['数据'];
|
||||
this.$refs.editdataseachForm.initForm(this.queryParam.schemaMass, this.queryParam.tableName, filteredColumn, record, this.queryParam.sourceType, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
getTableDataList() {
|
||||
console.log(this.queryParam)
|
||||
if (this.queryParam.schemaMass == null || this.queryParam.tableName == null) {
|
||||
this.$message.warning('必须选择查询的表')
|
||||
return
|
||||
}
|
||||
tableDataList(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.columns = []
|
||||
if (res.result.columnNames.length > 0) {
|
||||
res.result.columnNames.forEach(columns => {
|
||||
this.columns.push({
|
||||
title: columns,
|
||||
dataIndex: columns,
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
})
|
||||
})
|
||||
this.columns.push({
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
scopedSlots: { customRender: 'operation' },
|
||||
})
|
||||
}
|
||||
|
||||
const pagination = { ...this.pagination }
|
||||
pagination.total = res.result.total
|
||||
this.dataSource = res.result.rows
|
||||
this.pagination = pagination
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
exportTool() {
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
postAction("/dataManager/DmExportTool?sourceType="+this.queryParam.sourceType+"&mdl="+this.queryParam.mdl+"&hn="+this.queryParam.hn+"&schemaMass=" + this.queryParam.schemaMass + "&tableNames=" + "" + "&exportType=0", {}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
403
src/views/dataSearch/sourceDatabase/index.vue
Normal file
403
src/views/dataSearch/sourceDatabase/index.vue
Normal file
|
@ -0,0 +1,403 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search
|
||||
:filter-option="filterOption" v-model="queryParam.mdl" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search
|
||||
:filter-option="filterOption" v-model="queryParam.hn" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="4">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass"
|
||||
@change="handleTypeChange">
|
||||
<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="4" :sm="4">
|
||||
<a-form-item label="任务">
|
||||
<a-select placeholder="选择任务" option-filter-prop="children" v-model="activeTaskId"
|
||||
@change="handleTaskChange">
|
||||
<a-select-option v-for="d in allTask" :key="d.id">
|
||||
{{ d.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="8">
|
||||
<a-form-item label="时间范围">
|
||||
<!-- <a-range-picker :default-value="defaultTime" show-time :show-time="{ format: 'HH:mm:ss' }"
|
||||
:format="dateFormat" @change="onChangeTime" /> -->
|
||||
<a-range-picker :show-time="{ format: 'HH:mm:ss' }" v-model="defaultTime"
|
||||
format="YYYY-MM-DD HH:mm:ss" @change="onChangeTime" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="5">
|
||||
<a-form-item label="关键词">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24" style="text-align: right;">
|
||||
<a-button @click="getTableDataList" type="primary">查询</a-button>
|
||||
<a-button @click="exportTool" type="primary">导出dmp</a-button>
|
||||
<a-button @click="handleAdd" type="primary">导出csv、txt</a-button>
|
||||
<a-button @click="openexptable" type="primary">导出日志</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
<a-col :md="6">
|
||||
<div class="linese"></div>
|
||||
<!-- 分类区域 -->
|
||||
<div style="height:calc(100vh - 420px);overflow: auto;background: #e6e9f1;padding:10px;"
|
||||
ref="treeContainer">
|
||||
<a-tree :tree-data="treeDate" @select="onSelect" />
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
<a-col :md="18">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 420px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ x: 1200, y: 'calc(100vh - 450px)' }" rowKey="序号"
|
||||
@change="handleTableChange">
|
||||
<template slot="operation" slot-scope="text, record">
|
||||
<a-button type="primary" @click="handelEdit(record)">编辑</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<tablelist ref="modalForm"></tablelist>
|
||||
<exptable ref="exptable"></exptable>
|
||||
<editdataseach ref="editdataseachForm" @ok="getTableDataList" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import { metaDataTypeTree, tableDataList, DmExportTool } from '@/api/metaData'
|
||||
import { getAction, deleteAction, putAction, postAction, downFile } from '@/api/manage'
|
||||
import { getAllTask } from '@/api/task'
|
||||
import moment from 'moment';
|
||||
import tablelist from '../../data/modules/tablelist.vue'
|
||||
import exptable from '../../data/modules/exptable.vue'
|
||||
import editdataseach from '../../data/modules/editdataseach.vue'
|
||||
|
||||
export default {
|
||||
name: "metadata",
|
||||
components: {
|
||||
tablelist,
|
||||
exptable,
|
||||
editdataseach
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
defaultTime: [],
|
||||
loading: false,
|
||||
allTask: [],
|
||||
activeTaskId: null,
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: false,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 1,
|
||||
massKey: null,
|
||||
mdl: null, // 型号
|
||||
hn: null, // 舷号
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
},
|
||||
treeDate: [],
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
dataTypeList: [],
|
||||
shipModel: [],
|
||||
shipNumber: [],
|
||||
existingDataTypes: {},
|
||||
treeHeight: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'queryParam.massKey'(value) {
|
||||
this.queryParam.massKey = value
|
||||
this.getMetaDataTypeTree()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.calculateScrollY();
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getselect()
|
||||
this.queryAllTask()
|
||||
// this.initDate()
|
||||
},
|
||||
methods: {
|
||||
queryAllTask() {
|
||||
getAllTask().then(res => {
|
||||
if (res.success) {
|
||||
this.allTask = res.result
|
||||
if (res.result.length > 0) {
|
||||
this.activeTaskId = res.result[0].id
|
||||
const start = moment(res.result[0].startTime)
|
||||
const end = moment(res.result[0].endTime)
|
||||
this.defaultTime.push(start, end)
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTaskChange(value) {
|
||||
var curTask = this.allTask.filter(item => item.id == value)[0]
|
||||
if (curTask) {
|
||||
const start = moment(curTask.startTime)
|
||||
const end = moment(curTask.endTime)
|
||||
this.defaultTime = [start, end]
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
},
|
||||
calculateScrollY() {
|
||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||
const container = this.$refs.treeContainer;
|
||||
this.treeHeight = container.clientHeight;
|
||||
},
|
||||
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.hn = value
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
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.getMetaDataTypeTree()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.queryParam.mdl == "") {
|
||||
this.$message.warning("请选择型号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.hn == "") {
|
||||
this.$message.warning("请选择舷号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.modalForm.add(this.queryParam.sourceType, this.queryParam.schemaMass, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
openexptable() {
|
||||
|
||||
if (this.queryParam.mdl == "") {
|
||||
this.$message.warning("请选择型号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.hn == "") {
|
||||
this.$message.warning("请选择舷号");
|
||||
return;
|
||||
}
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择查询的导出的数据类型");
|
||||
return;
|
||||
}
|
||||
this.$refs.exptable.add(this.queryParam.sourceType, this.queryParam.schemaMass, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeDate = []
|
||||
var keys = Object.keys(res.result)
|
||||
keys.forEach((element, index) => {
|
||||
const _children = res.result[element]
|
||||
var childrenList = []
|
||||
_children.forEach((childrenNode, chil) => {
|
||||
childrenList.push({
|
||||
key: childrenNode.tableName,
|
||||
type: 'childern',
|
||||
title: childrenNode.massName
|
||||
})
|
||||
});
|
||||
this.treeDate.push({
|
||||
key: 'type_' + index,
|
||||
type: 'parentType',
|
||||
title: element,
|
||||
children: childrenList
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.schemaMass = value
|
||||
this.getMetaDataTypeTree()
|
||||
},
|
||||
onSelect(selectedKeys, info) {
|
||||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||
this.queryParam.schemaMass = info.node.$parent.dataRef.title
|
||||
this.queryParam.tableName = info.node.dataRef.key
|
||||
this.getTableDataList()
|
||||
}
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.pagination = pagination
|
||||
this.queryParam.pageNum = pagination.current
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getTableDataList()
|
||||
},
|
||||
onChangeTime(date, dateString) {
|
||||
if (date.length == 0) {
|
||||
this.queryParam.startTime = null
|
||||
this.queryParam.endTime = null
|
||||
this.queryParam.pageNum = 1
|
||||
} else {
|
||||
this.queryParam.startTime = moment(date[0]).format(this.dateFormat);
|
||||
this.queryParam.endTime = moment(date[1]).format(this.dateFormat);
|
||||
this.queryParam.pageNum = 1
|
||||
}
|
||||
},
|
||||
handelEdit(record) {
|
||||
console.log('sdfsdf', record)
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID' && item.dataIndex != '数据');
|
||||
delete record['ROW_ID'];
|
||||
delete record['数据'];
|
||||
this.$refs.editdataseachForm.initForm(this.queryParam.schemaMass, this.queryParam.tableName, filteredColumn, record, this.queryParam.sourceType, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
getTableDataList() {
|
||||
console.log(this.queryParam)
|
||||
if (this.queryParam.schemaMass == null || this.queryParam.tableName == null) {
|
||||
this.$message.warning('必须选择查询的表')
|
||||
return
|
||||
}
|
||||
tableDataList(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.columns = []
|
||||
if (res.result.columnNames.length > 0) {
|
||||
res.result.columnNames.forEach(columns => {
|
||||
this.columns.push({
|
||||
title: columns,
|
||||
dataIndex: columns,
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
})
|
||||
})
|
||||
this.columns.push({
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
scopedSlots: { customRender: 'operation' },
|
||||
})
|
||||
}
|
||||
|
||||
const pagination = { ...this.pagination }
|
||||
pagination.total = res.result.total
|
||||
this.dataSource = res.result.rows
|
||||
this.pagination = pagination
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
exportTool() {
|
||||
if (this.queryParam.schemaMass == "") {
|
||||
this.$message.warning("请选择导出的数据类型");
|
||||
return;
|
||||
}
|
||||
postAction("/dataManager/DmExportTool?sourceType="+this.queryParam.sourceType+"&mdl="+this.queryParam.mdl+"&hn="+this.queryParam.hn+"&schemaMass=" + this.queryParam.schemaMass + "&tableNames=" + "" + "&exportType=0", {}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -214,7 +214,7 @@
|
|||
});
|
||||
},
|
||||
allprocess:function(){
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType=3",{}).then((res) => {
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
} else {
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
});
|
||||
},
|
||||
allprocess:function(){
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType=2",{}).then((res) => {
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
} else {
|
||||
|
|
253
src/views/datalink/shoreGuide.vue
Normal file
253
src/views/datalink/shoreGuide.vue
Normal file
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="模式名称">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.schemaName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="表名">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.tableName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24" >
|
||||
<a-button type="primary" style="left: 10px" @click="loadData" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
|
||||
<a-button type="primary" @click="handleAdd" icon="upload" style="margin-left: 8px;left: 10px">上传</a-button>
|
||||
<a-button type="primary" @click="allprocess" icon="upload" style="margin-left: 8px;left: 10px">全部解析</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- table区域-begin -->
|
||||
<div style="height:900px;overflow-y:auto;background: #e6e9f1;">
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<!-- :locale="myLocale"-->
|
||||
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
<template slot="parseStatus" slot-scope="text">
|
||||
<span style="color:black;" v-if="text === 0" >未解析</span>
|
||||
<span style="color:darkorange;" v-if="text === 1">解析中</span>
|
||||
<span style="color:#87d068;" v-if="text === 2">解析完成</span>
|
||||
<span style="color:red;" v-if="text === 3">解析失败</span>
|
||||
<span style="color:royalblue;" v-if="text === 4">等待中</span>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="processFile(record)" >解析</a>
|
||||
<a-divider type="vertical"/>
|
||||
<a @click="clearTableData(record.id)">卸载</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- table区域-end -->
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<uploadModal ref="modalForm" @ok="loadData"></uploadModal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadModal from './modules/uploadModal'
|
||||
import { getFileLinkInfo,processFile,fileDataLinkDelete,isDataLinkFileParsed } from '@/api/fileDataLink'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from "@/components/jeecg/JEllipsis";
|
||||
import {deleteAction, postAction,getAction} from '@/api/manage'
|
||||
export default {
|
||||
name: "waterDocuments",
|
||||
mixins:[JeecgListMixin],
|
||||
components: {
|
||||
uploadModal,
|
||||
JEllipsis,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: '文件接引',
|
||||
dataSources: [],
|
||||
queryParam: {
|
||||
pageNum :1,
|
||||
pageSize:20,
|
||||
schemaName:'',
|
||||
tableName:'',
|
||||
dataLinkType:'5'
|
||||
},
|
||||
schemaName:"",
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'id',
|
||||
width:60,
|
||||
align:"id",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '文件名称',
|
||||
align:"fileName",
|
||||
dataIndex: 'fileName',
|
||||
},
|
||||
{
|
||||
title: '模式名称',
|
||||
align:"schemaName",
|
||||
dataIndex: 'schemaName'
|
||||
},
|
||||
{
|
||||
title: '表名',
|
||||
align:"tableName",
|
||||
dataIndex: 'tableName',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align:"createTime",
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align:"center",
|
||||
dataIndex: 'parseStatus',
|
||||
scopedSlots: { customRender: 'parseStatus' },
|
||||
},
|
||||
{
|
||||
title: '解析进度',
|
||||
align:"center",
|
||||
dataIndex: 'percent',
|
||||
},
|
||||
{
|
||||
title: '解析时间开始',
|
||||
align:"analyzeStartTime",
|
||||
dataIndex: 'analyzeStartTime',
|
||||
},
|
||||
{
|
||||
title: '解析时间完成',
|
||||
align:"analyzeEndTime",
|
||||
dataIndex: 'analyzeEndTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
width:180,
|
||||
scopedSlots: { customRender: 'action' },
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created () {
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
//筛选需要重写handleTableChange
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
//分页、排序、筛选变化时触发
|
||||
//TODO 筛选
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter.column = sorter.field;
|
||||
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
|
||||
}
|
||||
this.ipagination = pagination;
|
||||
this.loadData();
|
||||
},
|
||||
loadData() {
|
||||
getFileLinkInfo(this.queryParam).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records;
|
||||
setTimeout(()=>{
|
||||
this.loadData();
|
||||
},5000)
|
||||
if(res.result.total)
|
||||
{
|
||||
this.ipagination.total = res.result.total;
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
allprocess:function(){
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
clearTableData:function (id){
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/clearTableData?id="+id,{}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
that.loadData();
|
||||
});
|
||||
},
|
||||
handleDelete: function (id) {
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/delete?id="+id,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
that.loadData();
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
processFile: function (record) {
|
||||
var that = this;
|
||||
isDataLinkFileParsed({fileId:record.fileId}).then((res) => {
|
||||
if (res) {
|
||||
postAction("/fileDataLink/processFile?dataLinkId="+record.id,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
that.loadData();
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("解析中请勿重复点击");
|
||||
}
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "文件上传";
|
||||
this.$refs.modalForm.dataLinkType=this.queryParam.dataLinkType;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
253
src/views/datalink/submarine.vue
Normal file
253
src/views/datalink/submarine.vue
Normal file
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="模式名称">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.schemaName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="表名">
|
||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.tableName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24" >
|
||||
<a-button type="primary" style="left: 10px" @click="loadData" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
|
||||
<a-button type="primary" @click="handleAdd" icon="upload" style="margin-left: 8px;left: 10px">上传</a-button>
|
||||
<a-button type="primary" @click="allprocess" icon="upload" style="margin-left: 8px;left: 10px">全部解析</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- table区域-begin -->
|
||||
<div style="height:900px;overflow-y:auto;background: #e6e9f1;">
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<!-- :locale="myLocale"-->
|
||||
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
<template slot="parseStatus" slot-scope="text">
|
||||
<span style="color:black;" v-if="text === 0" >未解析</span>
|
||||
<span style="color:darkorange;" v-if="text === 1">解析中</span>
|
||||
<span style="color:#87d068;" v-if="text === 2">解析完成</span>
|
||||
<span style="color:red;" v-if="text === 3">解析失败</span>
|
||||
<span style="color:royalblue;" v-if="text === 4">等待中</span>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="processFile(record)" >解析</a>
|
||||
<a-divider type="vertical"/>
|
||||
<a @click="clearTableData(record.id)">卸载</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- table区域-end -->
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<uploadModal ref="modalForm" @ok="loadData"></uploadModal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadModal from './modules/uploadModal'
|
||||
import { getFileLinkInfo,processFile,fileDataLinkDelete,isDataLinkFileParsed } from '@/api/fileDataLink'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from "@/components/jeecg/JEllipsis";
|
||||
import {deleteAction, postAction,getAction} from '@/api/manage'
|
||||
export default {
|
||||
name: "waterDocuments",
|
||||
mixins:[JeecgListMixin],
|
||||
components: {
|
||||
uploadModal,
|
||||
JEllipsis,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: '文件接引',
|
||||
dataSources: [],
|
||||
queryParam: {
|
||||
pageNum :1,
|
||||
pageSize:20,
|
||||
schemaName:'',
|
||||
tableName:'',
|
||||
dataLinkType:'4'
|
||||
},
|
||||
schemaName:"",
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'id',
|
||||
width:60,
|
||||
align:"id",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '文件名称',
|
||||
align:"fileName",
|
||||
dataIndex: 'fileName',
|
||||
},
|
||||
{
|
||||
title: '模式名称',
|
||||
align:"schemaName",
|
||||
dataIndex: 'schemaName'
|
||||
},
|
||||
{
|
||||
title: '表名',
|
||||
align:"tableName",
|
||||
dataIndex: 'tableName',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align:"createTime",
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align:"center",
|
||||
dataIndex: 'parseStatus',
|
||||
scopedSlots: { customRender: 'parseStatus' },
|
||||
},
|
||||
{
|
||||
title: '解析进度',
|
||||
align:"center",
|
||||
dataIndex: 'percent',
|
||||
},
|
||||
{
|
||||
title: '解析时间开始',
|
||||
align:"analyzeStartTime",
|
||||
dataIndex: 'analyzeStartTime',
|
||||
},
|
||||
{
|
||||
title: '解析时间完成',
|
||||
align:"analyzeEndTime",
|
||||
dataIndex: 'analyzeEndTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
width:180,
|
||||
scopedSlots: { customRender: 'action' },
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created () {
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
//筛选需要重写handleTableChange
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
//分页、排序、筛选变化时触发
|
||||
//TODO 筛选
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter.column = sorter.field;
|
||||
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
|
||||
}
|
||||
this.ipagination = pagination;
|
||||
this.loadData();
|
||||
},
|
||||
loadData() {
|
||||
getFileLinkInfo(this.queryParam).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records;
|
||||
setTimeout(()=>{
|
||||
this.loadData();
|
||||
},5000)
|
||||
if(res.result.total)
|
||||
{
|
||||
this.ipagination.total = res.result.total;
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
allprocess:function(){
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
clearTableData:function (id){
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/clearTableData?id="+id,{}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.result);
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
that.loadData();
|
||||
});
|
||||
},
|
||||
handleDelete: function (id) {
|
||||
var that = this;
|
||||
deleteAction("/fileDataLink/delete?id="+id,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
that.loadData();
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
processFile: function (record) {
|
||||
var that = this;
|
||||
isDataLinkFileParsed({fileId:record.fileId}).then((res) => {
|
||||
if (res) {
|
||||
postAction("/fileDataLink/processFile?dataLinkId="+record.id,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
that.loadData();
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("解析中请勿重复点击");
|
||||
}
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "文件上传";
|
||||
this.$refs.modalForm.dataLinkType=this.queryParam.dataLinkType;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
|
@ -193,7 +193,7 @@
|
|||
});
|
||||
},
|
||||
allprocess:function(){
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType=1",{}).then((res) => {
|
||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message);
|
||||
} else {
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
|
@ -19,7 +37,7 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
|
@ -75,10 +93,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -114,7 +134,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -131,16 +154,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
@ -168,11 +223,10 @@ export default {
|
|||
},
|
||||
|
||||
handleEdit(record) {
|
||||
console.log('编辑', this.queryParam.dataType)
|
||||
// this.$refs.modalForm.eidt(record, this.queryParam.dataType);
|
||||
// this.$refs.modalForm.title = "配置";
|
||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
||||
this.$refs.subPage.shipModel = this.queryParam.shipModel
|
||||
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
|
||||
this.$refs.subPage.datetypeF = this.queryParam.dataType
|
||||
this.$refs.subPage.title = "配置";
|
||||
this.$refs.subPage.pagevisible = true
|
||||
|
|
|
@ -70,8 +70,8 @@ export default {
|
|||
// this.loadData();
|
||||
},
|
||||
methods: {
|
||||
getQuerytableColumns(dataType, tableName) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeData = []
|
||||
res.result.forEach(element => {
|
||||
|
@ -91,8 +91,8 @@ export default {
|
|||
|
||||
}
|
||||
},
|
||||
add(schemaName,tableName, dataType) {
|
||||
this.getQuerytableColumns(dataType, tableName)
|
||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
||||
this.form = {
|
||||
tableName: tableName,
|
||||
transfFileds: null,
|
||||
|
@ -102,7 +102,7 @@ export default {
|
|||
this.checkedList = []
|
||||
this.visible = true;
|
||||
},
|
||||
eidt(record, dataType1) {
|
||||
eidt(record, dataType,shipModel,shipNumber) {
|
||||
if (record.id) {
|
||||
queryById({ id: record.id }).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -119,7 +119,7 @@ export default {
|
|||
schemaName:record.schemaName
|
||||
}
|
||||
}
|
||||
this.getQuerytableColumns(dataType1, record.tableName)
|
||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
||||
this.visible = true;
|
||||
},
|
||||
close() {
|
||||
|
|
|
@ -59,8 +59,11 @@ export default {
|
|||
title: '',
|
||||
datetypeF: '',
|
||||
pagevisible: false,
|
||||
shipModel:'',
|
||||
shipNumber:'',
|
||||
queryParam: {
|
||||
tableName: null
|
||||
tableName: null,
|
||||
schemaName:null
|
||||
},
|
||||
dataSource: [],
|
||||
columns: [
|
||||
|
@ -117,11 +120,11 @@ export default {
|
|||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(record) {
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
|
|
|
@ -10,16 +10,34 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
|
@ -75,10 +93,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -114,7 +134,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -131,16 +154,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
@ -173,6 +228,8 @@ export default {
|
|||
// this.$refs.modalForm.title = "配置";
|
||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
||||
this.$refs.subPage.shipModel = this.queryParam.shipModel
|
||||
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
|
||||
this.$refs.subPage.datetypeF = this.queryParam.dataType
|
||||
this.$refs.subPage.title = "配置";
|
||||
this.$refs.subPage.pagevisible = true
|
||||
|
|
|
@ -77,8 +77,8 @@ export default {
|
|||
// this.loadData();
|
||||
},
|
||||
methods: {
|
||||
getQuerytableColumns(dataType, tableName) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeData = []
|
||||
res.result.forEach(element => {
|
||||
|
@ -98,8 +98,8 @@ export default {
|
|||
|
||||
}
|
||||
},
|
||||
add(schemaName,tableName, dataType) {
|
||||
this.getQuerytableColumns(dataType, tableName)
|
||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
||||
this.form = {
|
||||
tableName: tableName,
|
||||
columnName: null,
|
||||
|
@ -109,7 +109,7 @@ export default {
|
|||
}
|
||||
this.visible = true;
|
||||
},
|
||||
eidt(record, dataType1) {
|
||||
eidt(record, dataType,shipModel,shipNumber) {
|
||||
console.log('sfdsafa',record, dataType1)
|
||||
if (record.id) {
|
||||
queryById({ id: record.id }).then(res => {
|
||||
|
@ -125,7 +125,7 @@ export default {
|
|||
schemaName:record.schemaName
|
||||
}
|
||||
}
|
||||
this.getQuerytableColumns(dataType1, record.tableName)
|
||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
||||
this.visible = true;
|
||||
},
|
||||
close() {
|
||||
|
|
|
@ -62,8 +62,11 @@ export default {
|
|||
title: '',
|
||||
datetypeF: '',
|
||||
pagevisible: false,
|
||||
shipModel:'',
|
||||
shipNumber:'',
|
||||
queryParam: {
|
||||
tableName: null
|
||||
tableName: null,
|
||||
schemaName:null
|
||||
},
|
||||
dataSource: [],
|
||||
columns: [
|
||||
|
@ -126,11 +129,11 @@ export default {
|
|||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(record) {
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
|
@ -19,7 +37,7 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
|
@ -80,10 +98,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -136,7 +156,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -153,16 +176,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
@ -189,11 +244,11 @@ export default {
|
|||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.dataType);
|
||||
this.$refs.modalForm.add(this.queryParam);
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(record) {
|
||||
this.$refs.modalForm.eidt(record, this.queryParam.dataType);
|
||||
this.$refs.modalForm.eidt(record, this.queryParam);
|
||||
this.$refs.modalForm.title = "配置";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
|
|
|
@ -83,7 +83,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getQuerytableColumns(dataType, tableName) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||
querytableColumns({ dataType: dataType.dataType, tableName: tableName,shipModel:dataType.shipModel,shipNumber:dataType.shipNumber }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeData = []
|
||||
res.result.forEach(element => {
|
||||
|
|
|
@ -10,24 +10,36 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名" v-decorator="['msgName',{
|
||||
rules: [
|
||||
{ required: true, message: '报文名不能为空' },
|
||||
{ min: 1, max: 60, message: '长度1-60位' },
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
}]" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
|
@ -82,10 +94,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -160,7 +174,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -177,16 +194,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
|
@ -19,17 +37,17 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-col :md="4" :sm="24">
|
||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24" style="text-align: right;">
|
||||
<!-- <a-col :md="4" :sm="24" style="text-align: right;">
|
||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
@ -80,10 +98,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -130,7 +150,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -147,16 +170,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(key) {
|
||||
this.queryParam.dataType = key
|
||||
this.getQueryPage()
|
||||
|
@ -183,11 +238,11 @@ export default {
|
|||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.dataType);
|
||||
this.$refs.modalForm.add(this.queryParam);
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(record) {
|
||||
this.$refs.modalForm.eidt(record, this.queryParam.dataType);
|
||||
this.$refs.modalForm.eidt(record, this.queryParam);
|
||||
this.$refs.modalForm.title = "配置";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
|
|
|
@ -69,7 +69,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getQuerytableColumns(dataType) {
|
||||
getTables({dataType: dataType}).then(res => {
|
||||
getTables({dataType: dataType.dataType,shipModel:dataType.shipModel,shipNumber:dataType.shipNumber}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeData = []
|
||||
res.result.forEach(element => {
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
|
@ -19,9 +37,9 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
|
@ -75,10 +93,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -114,7 +134,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -131,16 +154,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
@ -173,6 +228,8 @@ export default {
|
|||
// this.$refs.modalForm.title = "配置";
|
||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
||||
this.$refs.subPage.shipModel = this.queryParam.shipModel
|
||||
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
|
||||
this.$refs.subPage.datetypeF = this.queryParam.dataType
|
||||
this.$refs.subPage.title = "配置";
|
||||
this.$refs.subPage.pagevisible = true
|
||||
|
|
|
@ -79,8 +79,8 @@ export default {
|
|||
created() {
|
||||
},
|
||||
methods: {
|
||||
getQuerytableColumns(dataType, tableName) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeData = []
|
||||
res.result.forEach(element => {
|
||||
|
@ -93,7 +93,7 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
add(schemaName,tableName, dataType) {
|
||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
||||
this.form = {
|
||||
tableName: tableName,
|
||||
strategy: null,
|
||||
|
@ -104,9 +104,9 @@ export default {
|
|||
},
|
||||
this.visible = true;
|
||||
this.dataType = dataType
|
||||
this.getQuerytableColumns(dataType, tableName)
|
||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
||||
},
|
||||
eidt(record, dataType) {
|
||||
eidt(record, dataType,shipModel,shipNumber) {
|
||||
if (record.id) {
|
||||
queryById({ id: record.id }).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -124,7 +124,7 @@ export default {
|
|||
schemaName:record.schemaName
|
||||
}
|
||||
}
|
||||
this.getQuerytableColumns(dataType, record.tableName)
|
||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
||||
this.visible = true;
|
||||
|
||||
},
|
||||
|
|
|
@ -61,8 +61,11 @@ export default {
|
|||
title: '',
|
||||
datetypeF: '',
|
||||
pagevisible: false,
|
||||
shipModel:'',
|
||||
shipNumber:'',
|
||||
queryParam: {
|
||||
tableName: null
|
||||
tableName: null,
|
||||
schemaName:null
|
||||
},
|
||||
dataSource: [],
|
||||
columns: [
|
||||
|
@ -129,11 +132,11 @@ export default {
|
|||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(record) {
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
|
@ -19,7 +37,7 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
|
@ -75,10 +93,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -114,7 +134,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -131,16 +154,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
@ -173,6 +228,8 @@ export default {
|
|||
// this.$refs.modalForm.title = "配置";
|
||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
||||
this.$refs.subPage.shipModel = this.queryParam.shipModel
|
||||
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
|
||||
this.$refs.subPage.datetypeF = this.queryParam.dataType
|
||||
this.$refs.subPage.title = "配置";
|
||||
this.$refs.subPage.pagevisible = true
|
||||
|
|
|
@ -78,8 +78,8 @@ export default {
|
|||
// this.loadData();
|
||||
},
|
||||
methods: {
|
||||
getQuerytableColumns(dataType, tableName) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeData = []
|
||||
res.result.forEach(element => {
|
||||
|
@ -99,8 +99,8 @@ export default {
|
|||
|
||||
}
|
||||
},
|
||||
add(schemaName,tableName, dataType) {
|
||||
this.getQuerytableColumns(dataType, tableName)
|
||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
||||
this.form = {
|
||||
tableName: tableName,
|
||||
field: null,
|
||||
|
@ -111,7 +111,7 @@ export default {
|
|||
this.checkedList = []
|
||||
this.visible = true;
|
||||
},
|
||||
eidt(record, dataType1) {
|
||||
eidt(record, dataType,shipModel,shipNumber) {
|
||||
if (record.id) {
|
||||
queryById({ id: record.id }).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -128,7 +128,7 @@ export default {
|
|||
schemaName:record.schemaName
|
||||
}
|
||||
}
|
||||
this.getQuerytableColumns(dataType1, record.tableName)
|
||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
||||
this.visible = true;
|
||||
},
|
||||
close() {
|
||||
|
|
|
@ -63,8 +63,11 @@ export default {
|
|||
title: '',
|
||||
datetypeF: '',
|
||||
pagevisible: false,
|
||||
shipModel:'',
|
||||
shipNumber:'',
|
||||
queryParam: {
|
||||
tableName: null
|
||||
tableName: null,
|
||||
schemaName:null
|
||||
},
|
||||
dataSource: [],
|
||||
columns: [
|
||||
|
@ -126,12 +129,12 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(record) {
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
|
@ -19,9 +37,9 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
|
@ -75,10 +93,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -114,7 +134,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -131,16 +154,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
@ -173,6 +228,8 @@ export default {
|
|||
// this.$refs.modalForm.title = "配置";
|
||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
||||
this.$refs.subPage.shipModel = this.queryParam.shipModel
|
||||
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
|
||||
this.$refs.subPage.datetypeF = this.queryParam.dataType
|
||||
this.$refs.subPage.title = "配置";
|
||||
this.$refs.subPage.pagevisible = true
|
||||
|
|
|
@ -80,8 +80,8 @@ export default {
|
|||
created() {
|
||||
},
|
||||
methods: {
|
||||
getQuerytableColumns(dataType, tableName) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.treeData = []
|
||||
res.result.forEach(element => {
|
||||
|
@ -97,7 +97,7 @@ export default {
|
|||
handleChange(value) {
|
||||
this.getQuerytableColumns(this.dataType, this.form.tableName)
|
||||
},
|
||||
add(schemaName,tableName, dataType) {
|
||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
||||
this.form = {
|
||||
id: null,
|
||||
tableName: tableName,
|
||||
|
@ -108,9 +108,9 @@ export default {
|
|||
this.dataType = dataType
|
||||
this.checkedList =[]
|
||||
this.visible = true;
|
||||
this.getQuerytableColumns(dataType, tableName)
|
||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
||||
},
|
||||
eidt(record, dataType) {
|
||||
eidt(record, dataType,shipModel,shipNumber) {
|
||||
this.form = {
|
||||
id: null,
|
||||
tableName: record.tableName,
|
||||
|
@ -127,7 +127,7 @@ export default {
|
|||
})
|
||||
}
|
||||
this.dataType = dataType
|
||||
this.getQuerytableColumns(dataType, record.tableName)
|
||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
||||
this.visible = true;
|
||||
},
|
||||
close() {
|
||||
|
|
|
@ -117,11 +117,11 @@ export default {
|
|||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(record) {
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
|
|
|
@ -10,24 +10,36 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="型号">
|
||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @change="changeshipModel">
|
||||
<a-select-option v-for="item in shipModel" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="舷号">
|
||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @change="changeshipNumber">
|
||||
<a-select-option v-for="item in shipNumber" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :md="4" :sm="8">
|
||||
<a-form-item label="报文名">
|
||||
<a-input placeholder="请输入报文名" v-decorator="['msgName',{
|
||||
rules: [
|
||||
{ required: true, message: '报文名不能为空' },
|
||||
{ min: 1, max: 60, message: '长度1-60位' },
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
}]" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
|
@ -82,10 +94,12 @@ export default {
|
|||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
dataType: '',
|
||||
msgName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
shipModel:'',
|
||||
shipNumber:''
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
|
@ -160,7 +174,10 @@ export default {
|
|||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
],
|
||||
shipModel:[],
|
||||
shipNumber:[],
|
||||
existingDataTypes:{}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -177,16 +194,48 @@ export default {
|
|||
getDataType() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||
}
|
||||
this.getQueryPage()
|
||||
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.shipModel = this.shipModel[0]
|
||||
this.queryParam.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = 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.shipNumber = this.shipNumber[0]
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.shipNumber = value
|
||||
this.queryParam.dataType = this.dataTypeList[0].enName
|
||||
this.getQueryPage()
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
this.getQueryPage()
|
||||
|
|
Loading…
Reference in New Issue
Block a user