Compare commits
No commits in common. "20250621" and "main" have entirely different histories.
3
public/config.js
vendored
3
public/config.js
vendored
|
@ -1,4 +1,3 @@
|
||||||
window.AppConfig = {
|
window.AppConfig = {
|
||||||
systemTitle: '末端数据接入处理系统',
|
systemTitle: '末端数据接入处理系统'
|
||||||
apiUrl: 'http://pbl.natapp1.cc/jeecg-boot'
|
|
||||||
}
|
}
|
|
@ -120,7 +120,6 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.sysTitle = window.AppConfig.systemTitle
|
this.sysTitle = window.AppConfig.systemTitle
|
||||||
this.apiUrl = window.AppConfig.apiUrl
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleScroll() {
|
handleScroll() {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
//设置全局API_BASE_URL
|
//设置全局API_BASE_URL
|
||||||
Vue.prototype.API_BASE_URL = process.env.VUE_APP_API_BASE_URL
|
Vue.prototype.API_BASE_URL = process.env.VUE_APP_API_BASE_URL
|
||||||
window._CONFIG['domianURL'] = window.AppConfig.apiUrl
|
window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL
|
||||||
//单点登录地址
|
//单点登录地址
|
||||||
window._CONFIG['casPrefixUrl'] = process.env.VUE_APP_CAS_BASE_URL
|
window._CONFIG['casPrefixUrl'] = process.env.VUE_APP_CAS_BASE_URL
|
||||||
window._CONFIG['onlinePreviewDomainURL'] = process.env.VUE_APP_ONLINE_BASE_URL
|
window._CONFIG['onlinePreviewDomainURL'] = process.env.VUE_APP_ONLINE_BASE_URL
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<a-form layout="inline" @keyup.enter.native="gettagTables" style="margin-top: 10px;padding:10px; background: #e6e9f1;">
|
<a-form layout="inline" @keyup.enter.native="gettagTables" style="margin-top: 10px;padding:10px; background: #e6e9f1;">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="10">
|
<a-col :span="10">
|
||||||
<a-form-item label="标签类型" >
|
<a-form-item label="标签类型" :label-col="{ span: 10 }" :wrapper-col="{ span: 14 }">
|
||||||
<a-select style="width: 200px;" placeholder="选择标签类型" show-search option-filter-prop="children" v-model="queryRefsParam.tagId">
|
<a-select placeholder="选择标签类型" option-filter-prop="children" v-model="queryRefsParam.tagId">
|
||||||
<a-select-option v-for="d in datatagSources" :key="d.id">
|
<a-select-option v-for="d in datatagSources" :key="d.id">
|
||||||
{{ d.tagName }}
|
{{ d.tagName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="10">
|
<a-col :span="10">
|
||||||
<a-form-item label="关键词">
|
<a-form-item label="关键词" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
|
||||||
<a-input placeholder="请输入搜索关键词" v-model="queryRefsParam.tableName"></a-input>
|
<a-input placeholder="请输入搜索关键词" v-model="queryRefsParam.tableName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -43,39 +43,10 @@
|
||||||
<a-col :md="11" style="padding:0 20px;">
|
<a-col :md="11" style="padding:0 20px;">
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<a-form layout="inline" @keyup.enter.native="getalltable" style="margin-top: 10px;padding:10px; background: #e6e9f1;">
|
<a-form layout="inline" @keyup.enter.native="getalltable" style="margin-top: 10px;padding:10px; background: #e6e9f1;">
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :md="8">
|
|
||||||
<a-form-item label="型号">
|
|
||||||
<a-select style="width: 160px;" 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 style="width: 160px;" 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 style="width: 120px;" placeholder="选择数据类型" show-search option-filter-prop="children" v-model="queryParam.schemaMass">
|
|
||||||
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
|
||||||
{{ item.cnName }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="20" :sm="1">
|
<a-col :md="20" :sm="1">
|
||||||
<a-form-item label="关键词">
|
<a-form-item label="关键词">
|
||||||
<a-input style="width: 400px;" placeholder="请输入搜索关键词" v-model="queryParam.tableName"></a-input>
|
<a-input placeholder="请输入搜索关键词" v-model="queryParam.tableName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
|
@ -86,7 +57,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div ref="tableContainer" style="height:calc(100vh - 380px);background: #e6e9f1;">
|
<div ref="tableContainer" style="height:calc(100vh - 360px);background: #e6e9f1;">
|
||||||
<a-table ref="table" size="middle" :row-selection="rowSelection" bordered :loading="loading" :rowKey="getRowKey" :pagination="false" :scroll="{ x: false, y: tableScrollY }" :columns="columns" :dataSource="dataSource">
|
<a-table ref="table" size="middle" :row-selection="rowSelection" bordered :loading="loading" :rowKey="getRowKey" :pagination="false" :scroll="{ x: false, y: tableScrollY }" :columns="columns" :dataSource="dataSource">
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -124,14 +95,10 @@ export default {
|
||||||
},
|
},
|
||||||
queryParam: {
|
queryParam: {
|
||||||
tableName: "",
|
tableName: "",
|
||||||
mdl:"",
|
|
||||||
hn:"",
|
|
||||||
schemaMass:"",
|
|
||||||
tagId: "",
|
tagId: "",
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 9999999,
|
pageSize: 9999999,
|
||||||
},
|
},
|
||||||
dataTypeList:[],
|
|
||||||
datatagSources: [],
|
datatagSources: [],
|
||||||
dataRefsSources: [],
|
dataRefsSources: [],
|
||||||
dataSource: [
|
dataSource: [
|
||||||
|
@ -184,9 +151,6 @@ export default {
|
||||||
selectedRowData: [],
|
selectedRowData: [],
|
||||||
tagselectedRowData: [],
|
tagselectedRowData: [],
|
||||||
tableScrollY: 0,
|
tableScrollY: 0,
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -227,6 +191,7 @@ export default {
|
||||||
destroyed: function () {
|
destroyed: function () {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
calculateScrollY() {
|
calculateScrollY() {
|
||||||
|
@ -235,27 +200,6 @@ export default {
|
||||||
const paginationHeight = 64; // 根据实际分页栏高度调整
|
const paginationHeight = 64; // 根据实际分页栏高度调整
|
||||||
this.tableScrollY = container.clientHeight - paginationHeight;
|
this.tableScrollY = container.clientHeight - paginationHeight;
|
||||||
},
|
},
|
||||||
filterOption(input, option) {
|
|
||||||
return (
|
|
||||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
||||||
);
|
|
||||||
},
|
|
||||||
changemdl(value) {
|
|
||||||
var number = Object.keys(this.existingDataTypes[value])
|
|
||||||
this.shipNumber = []
|
|
||||||
number.forEach((element, index) => {
|
|
||||||
this.shipNumber.push(element);
|
|
||||||
});
|
|
||||||
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
|
|
||||||
this.queryParam.mdl = value
|
|
||||||
this.queryParam.hn = this.shipNumber[0]
|
|
||||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
|
||||||
},
|
|
||||||
changehn(value) {
|
|
||||||
this.dataTypeList =this.existingDataTypes[this.queryParam.mdl][value]
|
|
||||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
|
||||||
this.queryParam.hn = value
|
|
||||||
},
|
|
||||||
handleSelectChange(selectedRowKeys, row) {
|
handleSelectChange(selectedRowKeys, row) {
|
||||||
this.selectedRowKeys = selectedRowKeys
|
this.selectedRowKeys = selectedRowKeys
|
||||||
this.selectedRowData = row
|
this.selectedRowData = row
|
||||||
|
@ -265,7 +209,7 @@ export default {
|
||||||
this.tagselectedRowData = row
|
this.tagselectedRowData = row
|
||||||
},
|
},
|
||||||
gattable() {
|
gattable() {
|
||||||
this.getselect();
|
this.getalltable();
|
||||||
this.gettagTables();
|
this.gettagTables();
|
||||||
},
|
},
|
||||||
getdatatagSources() {
|
getdatatagSources() {
|
||||||
|
@ -333,7 +277,6 @@ export default {
|
||||||
},
|
},
|
||||||
gettagTables() {
|
gettagTables() {
|
||||||
this.tagloading = true;
|
this.tagloading = true;
|
||||||
this.queryParam.tagId = this.queryRefsParam.tagId
|
|
||||||
getTableTagRefs(this.queryRefsParam).then((res) => {
|
getTableTagRefs(this.queryRefsParam).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataRefsSources = res.result;
|
this.dataRefsSources = res.result;
|
||||||
|
@ -343,29 +286,6 @@ export default {
|
||||||
this.tagloading = false;
|
this.tagloading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getselect() {
|
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.existingDataTypes = res.result.result.original
|
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
|
||||||
ship.forEach((element, index) => {
|
|
||||||
this.shipModel.push(element);
|
|
||||||
});
|
|
||||||
var number = Object.keys(this.existingDataTypes[this.shipModel[0]])
|
|
||||||
number.forEach((element, index) => {
|
|
||||||
this.shipNumber.push(element);
|
|
||||||
});
|
|
||||||
this.dataTypeList =this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]]
|
|
||||||
|
|
||||||
this.queryParam.mdl = this.shipModel[0]
|
|
||||||
this.queryParam.hn = this.shipNumber[0]
|
|
||||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
|
||||||
this.getalltable()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -3,46 +3,16 @@
|
||||||
<a-col :md="14">
|
<a-col :md="14">
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper" style="padding:10px;">
|
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
|
||||||
<a-form layout="inline">
|
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
|
||||||
<a-row :gutter="24">
|
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||||
<a-col :md="12">
|
{{ d.cnName }}
|
||||||
<a-form-item label="型号">
|
|
||||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.mdl" @change="changemdl">
|
|
||||||
<a-select-option v-for="item in shipModel" :value="item">
|
|
||||||
{{ item }}
|
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="12">
|
|
||||||
<a-form-item label="舷号">
|
|
||||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.hn" @change="changehn">
|
|
||||||
<a-select-option v-for="item in shipNumber" :value="item">
|
|
||||||
{{ item }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :md="12">
|
|
||||||
<a-form-item label="数据类型">
|
|
||||||
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" v-model="datatypequeryParam.schemaMass">
|
|
||||||
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
|
||||||
{{ item.cnName }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="12">
|
|
||||||
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div ref="tableContainer" style="height:calc(100vh - 360px);background: #e6e9f1;padding:10px;">
|
<div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;">
|
||||||
<a-table ref="table" size="middle" bordered :pagination="false" :scroll="{ y: tableScrollY }" rowKey="id" :columns="columns" :dataSource="dataSource">
|
<a-table ref="table" size="middle" bordered :pagination="false" :scroll="{ y: tableScrollY }" rowKey="id" :columns="columns" :dataSource="dataSource">
|
||||||
<!-- :locale="myLocale"-->
|
<!-- :locale="myLocale"-->
|
||||||
|
|
||||||
|
@ -59,37 +29,29 @@
|
||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="12">
|
<a-col :md="12">
|
||||||
<a-form-item label="型号">
|
<!-- <a-form-item label="日志类型">
|
||||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="cleaningData.shipModel" @change="changeshipModel">
|
<a-select placeholder="选择日志类型" option-filter-prop="children" size="large" v-model="queryParam.syncState">
|
||||||
<a-select-option v-for="item in shipModel" :value="item">
|
<a-select-option key="">
|
||||||
{{ item }}
|
全部
|
||||||
|
</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-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item> -->
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="12">
|
<a-col :md="7">
|
||||||
<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>
|
||||||
</a-row>
|
<a-col :md="5">
|
||||||
<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-button @click="dataAdd" type="primary">数据清洗整编</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -129,17 +91,9 @@ export default {
|
||||||
percent: 0,
|
percent: 0,
|
||||||
websock: {},
|
websock: {},
|
||||||
datatypequeryParam: {
|
datatypequeryParam: {
|
||||||
mdl: "",
|
|
||||||
hn: "",
|
|
||||||
schemaMass: "",
|
schemaMass: "",
|
||||||
sourceType: 1
|
sourceType: 1
|
||||||
},
|
},
|
||||||
dataTypeList:[],
|
|
||||||
cleaningData:{
|
|
||||||
shipModel:'',
|
|
||||||
shipNumber:'',
|
|
||||||
dataType:''
|
|
||||||
},
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 9999999,
|
pageSize: 9999999,
|
||||||
|
@ -180,9 +134,6 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableScrollY: 0,
|
tableScrollY: 0,
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -206,45 +157,6 @@ export default {
|
||||||
openlink(url) {
|
openlink(url) {
|
||||||
window.location.href = 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() {
|
calculateScrollY() {
|
||||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||||
const container = this.$refs.tableContainer;
|
const container = this.$refs.tableContainer;
|
||||||
|
@ -280,7 +192,7 @@ export default {
|
||||||
console.log("connection closed (" + e + ")");
|
console.log("connection closed (" + e + ")");
|
||||||
},
|
},
|
||||||
dataAdd() {
|
dataAdd() {
|
||||||
getAction("/dataCleaning/cleaning?taskId=123456&shipModel="+this.cleaningData.shipModel+"&shipNumber="+this.cleaningData.shipNumber+"&dataTypes="+this.cleaningData.dataType).then((res) => {
|
getAction("/dataCleaning/cleaning?taskId=3806ce79-dc28-48a3-9250-c7729e6b3ad4").then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message);
|
this.$message.success(res.message);
|
||||||
}
|
}
|
||||||
|
@ -289,24 +201,11 @@ export default {
|
||||||
getselect() {
|
getselect() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypedataSources = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_ORIGINAL[0].cnName
|
||||||
this.shipModel.push(element);
|
}
|
||||||
});
|
this.getTables();
|
||||||
var number = Object.keys(this.existingDataTypes[this.shipModel[0]])
|
|
||||||
number.forEach((element, index) => {
|
|
||||||
this.shipNumber.push(element);
|
|
||||||
});
|
|
||||||
this.dataTypeList =this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]]
|
|
||||||
this.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 {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,32 +10,11 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="4" :sm="4">
|
<a-col :md="6" :sm="8">
|
||||||
<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-form-item label="数据类型">
|
||||||
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass"
|
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass" @change="handleTypeChange">
|
||||||
@change="handleTypeChange">
|
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||||
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
{{ d.cnName }}
|
||||||
{{ item.cnName }}
|
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -59,7 +38,7 @@
|
||||||
<a-col :md="6">
|
<a-col :md="6">
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<!-- 分类区域 -->
|
<!-- 分类区域 -->
|
||||||
<div style="height:calc(100vh - 360px);overflow: auto;background: #e6e9f1;padding:10px;">
|
<div style="height:calc(100vh - 316px);overflow: auto;background: #e6e9f1;padding:10px;">
|
||||||
<a-tree :tree-data="treeDate" @select="onSelect" />
|
<a-tree :tree-data="treeDate" @select="onSelect" />
|
||||||
</div>
|
</div>
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
|
@ -67,7 +46,7 @@
|
||||||
<a-col :md="18">
|
<a-col :md="18">
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<!-- 表格区域 -->
|
<!-- 表格区域 -->
|
||||||
<div style="height:calc(100vh - 360px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||||
:pagination="false" :scroll="{ y: 'calc(100vh - 380px)' }" rowKey="id">
|
:pagination="false" :scroll="{ y: 'calc(100vh - 380px)' }" rowKey="id">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
|
@ -99,8 +78,6 @@ export default {
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
sourceType: 2,
|
sourceType: 2,
|
||||||
mdl: null, // 型号
|
|
||||||
hn: null, // 舷号
|
|
||||||
schemaMass: null,
|
schemaMass: null,
|
||||||
massKey: null
|
massKey: null
|
||||||
},
|
},
|
||||||
|
@ -150,10 +127,6 @@ export default {
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
dataTypedataSources:[],
|
dataTypedataSources:[],
|
||||||
dataTypeList: [],
|
|
||||||
shipModel: [],
|
|
||||||
shipNumber: [],
|
|
||||||
existingDataTypes: {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -171,44 +144,14 @@ export default {
|
||||||
this.getselect();
|
this.getselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeshipModel(value) {
|
getselect(){
|
||||||
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) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.standard
|
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_STANDARD.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName
|
||||||
this.shipModel.push(element);
|
}
|
||||||
});
|
this.getMetaDataTypeTree();
|
||||||
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 {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
@ -278,8 +221,6 @@ export default {
|
||||||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||||
this.tableParams.schemaMass = info.node.$parent.dataRef.title
|
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.getTableIndexList()
|
this.getTableIndexList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,46 +3,15 @@
|
||||||
<a-col :md="14" >
|
<a-col :md="14" >
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper" style="padding:10px;">
|
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
|
||||||
<a-form layout="inline">
|
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
|
||||||
<a-row :gutter="24">
|
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||||
<a-col :md="12">
|
{{ d.cnName }}
|
||||||
<a-form-item label="型号">
|
|
||||||
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.mdl" @change="changemdl">
|
|
||||||
<a-select-option v-for="item in shipModel" :value="item">
|
|
||||||
{{ item }}
|
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="12">
|
|
||||||
<a-form-item label="舷号">
|
|
||||||
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.hn" @change="changehn">
|
|
||||||
<a-select-option v-for="item in shipNumber" :value="item">
|
|
||||||
{{ item }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :md="12">
|
|
||||||
<a-form-item label="数据类型">
|
|
||||||
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" v-model="datatypequeryParam.schemaMass">
|
|
||||||
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
|
||||||
{{ item.cnName }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="12">
|
|
||||||
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div ref="tableContainer" style="height:calc(100vh - 360px);background:rgb(230, 233, 241);padding:10px;">
|
<div ref="tableContainer" style="height:calc(100vh - 347px);background:rgb(230, 233, 241);padding:10px;">
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
size="middle"
|
size="middle"
|
||||||
|
@ -128,12 +97,9 @@
|
||||||
percent:0,
|
percent:0,
|
||||||
websock:{},
|
websock:{},
|
||||||
datatypequeryParam: {
|
datatypequeryParam: {
|
||||||
mdl:"",
|
|
||||||
hn:"",
|
|
||||||
schemaMass:"",
|
schemaMass:"",
|
||||||
sourceType:2
|
sourceType:2
|
||||||
},
|
},
|
||||||
dataTypeList:[],
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
pageNum :1,
|
pageNum :1,
|
||||||
pageSize:9999999,
|
pageSize:9999999,
|
||||||
|
@ -168,10 +134,7 @@
|
||||||
dataIndex: 'tagNames'
|
dataIndex: 'tagNames'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableScrollY:0,
|
tableScrollY:0
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -191,35 +154,12 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
filterOption(input, option) {
|
|
||||||
return (
|
|
||||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
||||||
);
|
|
||||||
},
|
|
||||||
calculateScrollY() {
|
calculateScrollY() {
|
||||||
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
// 获取父容器高度(需减去表格内其他元素的高度,如分页栏)
|
||||||
const container = this.$refs.tableContainer;
|
const container = this.$refs.tableContainer;
|
||||||
const paginationHeight = 64; // 根据实际分页栏高度调整
|
const paginationHeight = 64; // 根据实际分页栏高度调整
|
||||||
this.tableScrollY = container.clientHeight - paginationHeight;
|
this.tableScrollY = container.clientHeight - paginationHeight;
|
||||||
},
|
},
|
||||||
changemdl(value) {
|
|
||||||
var number = Object.keys(this.existingDataTypes[value])
|
|
||||||
this.shipNumber = []
|
|
||||||
number.forEach((element, index) => {
|
|
||||||
this.shipNumber.push(element);
|
|
||||||
});
|
|
||||||
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
|
|
||||||
this.datatypequeryParam.mdl = value
|
|
||||||
this.datatypequeryParam.hn = this.shipNumber[0]
|
|
||||||
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
|
||||||
this.getTables()
|
|
||||||
},
|
|
||||||
changehn(value) {
|
|
||||||
this.dataTypeList =this.existingDataTypes[this.datatypequeryParam.mdl][value]
|
|
||||||
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
|
||||||
this.datatypequeryParam.hn = value
|
|
||||||
this.getTables()
|
|
||||||
},
|
|
||||||
initWebSocket: function () {
|
initWebSocket: function () {
|
||||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||||
var userId = store.getters.userInfo.id;
|
var userId = store.getters.userInfo.id;
|
||||||
|
@ -259,24 +199,14 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getselect() {
|
getselect(){
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.standard
|
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_STANDARD.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName
|
||||||
this.shipModel.push(element);
|
}
|
||||||
});
|
this.getTables();
|
||||||
var number = Object.keys(this.existingDataTypes[this.shipModel[0]])
|
|
||||||
number.forEach((element, index) => {
|
|
||||||
this.shipNumber.push(element);
|
|
||||||
});
|
|
||||||
this.dataTypeList =this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]]
|
|
||||||
|
|
||||||
this.datatypequeryParam.mdl = this.shipModel[0]
|
|
||||||
this.datatypequeryParam.hn = this.shipNumber[0]
|
|
||||||
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
|
|
||||||
this.getTables()
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
@ -300,7 +230,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.datacleanResult {
|
.datacleanResult {
|
||||||
height: calc(100vh - 344px);
|
height: calc(100vh - 374px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
background: #F1F4FA;
|
background: #F1F4FA;
|
||||||
|
|
|
@ -3,35 +3,23 @@
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline">
|
<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-row :gutter="24">
|
||||||
<a-col :md="6">
|
<a-col :md="6" :sm="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="6">
|
|
||||||
<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="6">
|
|
||||||
<a-form-item label="数据类型">
|
<a-form-item label="数据类型">
|
||||||
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getMetaDataTypeTree" v-model="queryParam.schemaMass">
|
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass" @change="handleTypeChange">
|
||||||
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
|
||||||
{{ item.cnName }}
|
{{ d.cnName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="关键词">
|
<a-form-item label="关键词">
|
||||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -81,18 +69,15 @@ export default {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
|
queryParam: {
|
||||||
|
sourceType: 1,
|
||||||
|
schemaMass: null,
|
||||||
|
massKey: null
|
||||||
|
},
|
||||||
tableParams: {
|
tableParams: {
|
||||||
schemaMass: null,
|
schemaMass: null,
|
||||||
tableName: null
|
tableName: null
|
||||||
},
|
},
|
||||||
queryParam: {
|
|
||||||
mdl:"",
|
|
||||||
hn:"",
|
|
||||||
schemaMass:"",
|
|
||||||
sourceType:1,
|
|
||||||
massKey: null
|
|
||||||
},
|
|
||||||
dataTypeList:[],
|
|
||||||
treeDate: [],
|
treeDate: [],
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -129,9 +114,6 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataTypedataSources:[],
|
dataTypedataSources:[],
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -149,47 +131,14 @@ export default {
|
||||||
this.getselect()
|
this.getselect()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
filterOption(input, option) {
|
getselect(){
|
||||||
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) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypedataSources = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.schemaMass = res.result.result.DATA_CONN_ORIGINAL[0].cnName
|
||||||
this.shipModel.push(element);
|
}
|
||||||
});
|
this.getMetaDataTypeTree();
|
||||||
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 {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
@ -228,9 +177,6 @@ export default {
|
||||||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||||
this.tableParams.schemaMass = info.node.$parent.dataRef.title
|
this.tableParams.schemaMass = info.node.$parent.dataRef.title
|
||||||
this.tableParams.tableName = info.node.dataRef.key
|
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()
|
this.getMetaDatalist()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -40,25 +40,18 @@ export default {
|
||||||
submitForm: {
|
submitForm: {
|
||||||
schemaMass: null,
|
schemaMass: null,
|
||||||
tableName: null,
|
tableName: null,
|
||||||
fieldValues: null,
|
fieldValues: null
|
||||||
sourceType: null,
|
|
||||||
mdl: null,
|
|
||||||
hn: null
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initForm(schemaMass, tableName, columns, record, sourceType, mdl, hn) {
|
initForm(schemaMass, tableName, columns, record) {
|
||||||
console.log('接收', sourceType)
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.nodes = columns
|
this.nodes = columns
|
||||||
this.submitForm.schemaMass = schemaMass
|
this.submitForm.schemaMass = schemaMass
|
||||||
this.submitForm.tableName = tableName
|
this.submitForm.tableName = tableName
|
||||||
this.submitForm.sourceType = sourceType
|
|
||||||
this.submitForm.mdl = mdl
|
|
||||||
this.submitForm.hn = hn
|
|
||||||
this.form = record
|
this.form = record
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
@ -71,7 +64,6 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.confirmLoading = true;
|
that.confirmLoading = true;
|
||||||
that.submitForm.fieldValues = that.form
|
that.submitForm.fieldValues = that.form
|
||||||
|
|
||||||
updateDmTableBySeqNo(that.submitForm).then((res) => {
|
updateDmTableBySeqNo(that.submitForm).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message);
|
||||||
|
|
|
@ -50,10 +50,7 @@ import {getAction} from '@/api/manage'
|
||||||
title:"导出日志",
|
title:"导出日志",
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
sourceType: null,
|
|
||||||
schemaMass:null,
|
schemaMass:null,
|
||||||
mdl: null,
|
|
||||||
hn: null,
|
|
||||||
dataSource:[],
|
dataSource:[],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -118,16 +115,13 @@ import {getAction} from '@/api/manage'
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add (sourceType, schemaMass, mdl, hn) {
|
add (schemaMass) {
|
||||||
this.visible =true;
|
this.visible =true;
|
||||||
this.sourceType = sourceType;
|
|
||||||
this.schemaMass = schemaMass;
|
this.schemaMass = schemaMass;
|
||||||
this.mdl = mdl;
|
|
||||||
this.hn = hn;
|
|
||||||
this.getTableInfo();
|
this.getTableInfo();
|
||||||
},
|
},
|
||||||
getTableInfo(){
|
getTableInfo(){
|
||||||
getAction("/dataManager/DmExportLog?schemaMass="+this.schemaMass + '&mdl='+ this.mdl + '&hn=' + this.hn + '&sourceType='+this.sourceType,{}).then(res => {
|
getAction("/dataManager/DmExportLog?schemaMass="+this.schemaMass,{}).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.dataSource = res.result
|
this.dataSource = res.result
|
||||||
console.log(this.dataSource)
|
console.log(this.dataSource)
|
||||||
|
|
|
@ -46,11 +46,9 @@ import { metaDataTypeTree } from '@/api/metaData'
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
queryParam: {
|
queryParam: {
|
||||||
sourceType: null,
|
sourceType: 2,
|
||||||
schemaMass: null,
|
schemaMass: null,
|
||||||
massKey: null,
|
massKey: null
|
||||||
mdl: null,
|
|
||||||
hn: null
|
|
||||||
},
|
},
|
||||||
dataSource:[],
|
dataSource:[],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
|
@ -82,12 +80,9 @@ import { metaDataTypeTree } from '@/api/metaData'
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add (sourceType, schemaMass, mdl, hn) {
|
add (schemaMass) {
|
||||||
this.visible =true;
|
this.visible =true;
|
||||||
this.queryParam.sourceType = sourceType;
|
|
||||||
this.queryParam.schemaMass = schemaMass;
|
this.queryParam.schemaMass = schemaMass;
|
||||||
this.queryParam.mdl = mdl;
|
|
||||||
this.queryParam.hn = hn;
|
|
||||||
this.getTableInfo();
|
this.getTableInfo();
|
||||||
},
|
},
|
||||||
getTableInfo(){
|
getTableInfo(){
|
||||||
|
@ -141,9 +136,8 @@ import { metaDataTypeTree } from '@/api/metaData'
|
||||||
},(error) => {
|
},(error) => {
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
})
|
})
|
||||||
console.log(this.queryParam.sourceType)
|
|
||||||
service({
|
service({
|
||||||
url: "/dataManager/DmExportTable?sourceType="+this.queryParam.sourceType+"&mdl="+this.queryParam.mdl+"&hn="+this.queryParam.hn+"&schemaMass="+this.queryParam.schemaMass+"&tableNames="+this.selectedRowKeys+"&exportType="+exportType,
|
url: "/dataManager/DmExportTable?schemaMass="+this.queryParam.schemaMass+"&tableNames="+this.selectedRowKeys+"&exportType="+exportType,
|
||||||
params: {},
|
params: {},
|
||||||
method:'post' ,
|
method:'post' ,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
|
|
@ -4,13 +4,7 @@
|
||||||
<a-col :md="12" :sm="1" style="height:calc(50vh - 125px);">
|
<a-col :md="12" :sm="1" style="height:calc(50vh - 125px);">
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
<div class="echartsTitle">
|
<div class="echartsTitle">
|
||||||
<div class="ecicon"></div>
|
<div class="ecicon"></div>数据清洗差异统计
|
||||||
数据清洗差异统计
|
|
||||||
<a-select style="width: 200px;margin-left: 500px;" placeholder="选择型号" v-model="selectshipModel" @change="getTables">
|
|
||||||
<a-select-option v-for="item in shipModel" :value="item">
|
|
||||||
{{ item }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="cleaningVariance" class="cleaningVariance" ref="cleaningVariance"
|
<div id="cleaningVariance" class="cleaningVariance" ref="cleaningVariance"
|
||||||
style="width: 100%;background:#e6e9f1; height: calc(100% - 70px);"></div>
|
style="width: 100%;background:#e6e9f1; height: calc(100% - 70px);"></div>
|
||||||
|
@ -50,7 +44,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import JEllipsis from "@/components/jeecg/JEllipsis";
|
import JEllipsis from "@/components/jeecg/JEllipsis";
|
||||||
import { Select } from 'ant-design-vue';
|
|
||||||
export default {
|
export default {
|
||||||
name: "statistics",
|
name: "statistics",
|
||||||
components: {
|
components: {
|
||||||
|
@ -62,9 +55,7 @@ export default {
|
||||||
cleaningVarianceData: [],
|
cleaningVarianceData: [],
|
||||||
totalNumberCataloguesData: [],
|
totalNumberCataloguesData: [],
|
||||||
catalogingStorageData: [],
|
catalogingStorageData: [],
|
||||||
typeStorage: [],
|
typeStorage: []
|
||||||
shipModel:["052D","055","054A","002","071"],
|
|
||||||
selectshipModel:"052D"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -85,7 +76,7 @@ export default {
|
||||||
},
|
},
|
||||||
getTables() {
|
getTables() {
|
||||||
this.cleaningVarianceData = [['product', '贴源库', '集成库']];
|
this.cleaningVarianceData = [['product', '贴源库', '集成库']];
|
||||||
getAction("/dataAnalysis/getClnDiffStats?shipModel="+this.selectshipModel, {}).then((res) => {
|
getAction("/dataAnalysis/getClnDiffStats", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
res.result.schemaNames.forEach(row => {
|
res.result.schemaNames.forEach(row => {
|
||||||
this.cleaningVarianceData.push([row, parseInt(res.result.numRowOriMap[row]), parseInt(res.result.numRowStaMap[row])])
|
this.cleaningVarianceData.push([row, parseInt(res.result.numRowOriMap[row]), parseInt(res.result.numRowStaMap[row])])
|
||||||
|
@ -306,7 +297,4 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
/deep/.ant-select-selection-selected-value{
|
|
||||||
color: #ffffff !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -79,7 +79,7 @@
|
||||||
{
|
{
|
||||||
title: '数据类型',
|
title: '数据类型',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'schemaDesc',
|
dataIndex: 'tableMessName',
|
||||||
customRender: () => {
|
customRender: () => {
|
||||||
return this.datatypequeryParam.schemaDesc;
|
return this.datatypequeryParam.schemaDesc;
|
||||||
}
|
}
|
||||||
|
@ -109,10 +109,10 @@
|
||||||
getselect(){
|
getselect(){
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataTypedataSources = res.result.result.special
|
this.dataTypedataSources = res.result.result.DATA_CONN_SPECIAL
|
||||||
if(res.result.result.special.length > 0){
|
if(res.result.result.DATA_CONN_SPECIAL.length > 0){
|
||||||
this.datatypequeryParam.schemaMass = res.result.result.special[0].enName
|
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_SPECIAL[0].enName
|
||||||
this.datatypequeryParam.schemaDesc = res.result.result.special[0].cnName
|
this.datatypequeryParam.schemaDesc = res.result.result.DATA_CONN_SPECIAL[0].cnName
|
||||||
}
|
}
|
||||||
this.getTables();
|
this.getTables();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,312 +0,0 @@
|
||||||
<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="5" :sm="5">
|
|
||||||
<a-form-item label="关键词">
|
|
||||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="3" :sm="3" style="text-align: right;">
|
|
||||||
<a-button @click="getTableDataList" 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>
|
|
|
@ -1,435 +0,0 @@
|
||||||
<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-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :md="4" :sm="4">
|
|
||||||
<a-form-item label="编目" :label-col="{ span: 10 }" :wrapper-col="{ span: 14 }">
|
|
||||||
<a-select placeholder="选择编目" option-filter-prop="children" @change="getMetaDataTypeTree" v-model="queryParam.tagId">
|
|
||||||
<a-select-option v-for="d in datatagSources" :key="d.id">
|
|
||||||
{{ d.tagName }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="12" :sm="5">
|
|
||||||
<a-form-item label="关键词">
|
|
||||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="8" :sm="24" >
|
|
||||||
<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'
|
|
||||||
import {idcTableTaglist} from "@api/tag";
|
|
||||||
|
|
||||||
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,
|
|
||||||
tagId: null,
|
|
||||||
massKey: null,
|
|
||||||
mdl: null, // 型号
|
|
||||||
hn: null, // 舷号
|
|
||||||
schemaMass: null,
|
|
||||||
tableName: null,
|
|
||||||
startTime: null,
|
|
||||||
endTime: null,
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1
|
|
||||||
},
|
|
||||||
tagqueryParam: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
tagName: ""
|
|
||||||
},
|
|
||||||
treeDate: [],
|
|
||||||
dataSource: [],
|
|
||||||
columns: [],
|
|
||||||
dataTypeList: [],
|
|
||||||
shipModel: [],
|
|
||||||
shipNumber: [],
|
|
||||||
datatagSources: [],
|
|
||||||
existingDataTypes: {},
|
|
||||||
treeHeight: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'queryParam.massKey'(value) {
|
|
||||||
this.queryParam.massKey = value
|
|
||||||
this.getMetaDataTypeTree()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.calculateScrollY();
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getselect()
|
|
||||||
this.queryAllTask()
|
|
||||||
this.getdatatagSources()
|
|
||||||
// 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
|
|
||||||
);
|
|
||||||
},
|
|
||||||
getdatatagSources() {
|
|
||||||
idcTableTaglist(this.tagqueryParam).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.datatagSources = res.result.records;
|
|
||||||
this.datatagSources.unshift({tagName:'全部',id:null})
|
|
||||||
this.queryParam.tagId = res.result.records[0].id;
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
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>
|
|
|
@ -1,421 +0,0 @@
|
||||||
<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-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :md="4" :sm="4">
|
|
||||||
<a-form-item label="编目" :label-col="{ span: 10 }" :wrapper-col="{ span: 14 }">
|
|
||||||
<a-select placeholder="选择编目" option-filter-prop="children" @change="getMetaDataTypeTree" v-model="queryParam.tagId">
|
|
||||||
<a-select-option v-for="d in datatagSources" :key="d.id">
|
|
||||||
{{ d.tagName }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="12" :sm="5">
|
|
||||||
<a-form-item label="关键词">
|
|
||||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="8" :sm="24">
|
|
||||||
<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">
|
|
||||||
</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'
|
|
||||||
import {idcTableTaglist} from "@api/tag";
|
|
||||||
|
|
||||||
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,
|
|
||||||
tagId: null,
|
|
||||||
massKey: null,
|
|
||||||
mdl: null, // 型号
|
|
||||||
hn: null, // 舷号
|
|
||||||
schemaMass: null,
|
|
||||||
tableName: null,
|
|
||||||
startTime: null,
|
|
||||||
endTime: null,
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1
|
|
||||||
},
|
|
||||||
tagqueryParam: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
tagName: ""
|
|
||||||
},
|
|
||||||
treeDate: [],
|
|
||||||
dataSource: [],
|
|
||||||
columns: [],
|
|
||||||
dataTypeList: [],
|
|
||||||
shipModel: [],
|
|
||||||
shipNumber: [],
|
|
||||||
datatagSources: [],
|
|
||||||
existingDataTypes: {},
|
|
||||||
treeHeight: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'queryParam.massKey'(value) {
|
|
||||||
this.queryParam.massKey = value
|
|
||||||
this.getMetaDataTypeTree()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.calculateScrollY();
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getselect()
|
|
||||||
this.queryAllTask()
|
|
||||||
this.getdatatagSources()
|
|
||||||
// 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
|
|
||||||
);
|
|
||||||
},
|
|
||||||
getdatatagSources() {
|
|
||||||
idcTableTaglist(this.tagqueryParam).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.datatagSources = res.result.records;
|
|
||||||
this.datatagSources.unshift({tagName:'全部',id:null})
|
|
||||||
this.queryParam.tagId = res.result.records[0].id;
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
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
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
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(){
|
allprocess:function(){
|
||||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
postAction("/fileDataLink/processAllFile?dataLinkType=3",{}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message);
|
this.$message.success(res.message);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -198,7 +198,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
allprocess:function(){
|
allprocess:function(){
|
||||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
postAction("/fileDataLink/processAllFile?dataLinkType=2",{}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message);
|
this.$message.success(res.message);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
if (currentRow) {
|
if (currentRow) {
|
||||||
// 当前上传进度归0
|
// 当前上传进度归0
|
||||||
currentRow.percentage = 0
|
currentRow.percentage = 0
|
||||||
const _20M = 60 * 1024 * 1024 //设置超大文件判断关闭分片
|
const _20M = 20 * 1024 * 1024 //设置超大文件判断关闭分片
|
||||||
let that =this;
|
let that =this;
|
||||||
this.getMd5(file,file.size)
|
this.getMd5(file,file.size)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
@ -1,253 +0,0 @@
|
||||||
<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>
|
|
|
@ -1,253 +0,0 @@
|
||||||
<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(){
|
allprocess:function(){
|
||||||
postAction("/fileDataLink/processAllFile?dataLinkType="+this.queryParam.dataLinkType,{}).then((res) => {
|
postAction("/fileDataLink/processAllFile?dataLinkType=1",{}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message);
|
this.$message.success(res.message);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,7 +19,7 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<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-form-item>
|
||||||
|
@ -93,12 +75,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -134,10 +114,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -154,48 +131,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
@ -223,10 +168,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(record) {
|
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.tableName = record.tableName
|
||||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
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.datetypeF = this.queryParam.dataType
|
||||||
this.$refs.subPage.title = "配置";
|
this.$refs.subPage.title = "配置";
|
||||||
this.$refs.subPage.pagevisible = true
|
this.$refs.subPage.pagevisible = true
|
||||||
|
|
|
@ -70,8 +70,8 @@ export default {
|
||||||
// this.loadData();
|
// this.loadData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
getQuerytableColumns(dataType, tableName) {
|
||||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.treeData = []
|
this.treeData = []
|
||||||
res.result.forEach(element => {
|
res.result.forEach(element => {
|
||||||
|
@ -91,8 +91,8 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
add(schemaName,tableName, dataType) {
|
||||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType, tableName)
|
||||||
this.form = {
|
this.form = {
|
||||||
tableName: tableName,
|
tableName: tableName,
|
||||||
transfFileds: null,
|
transfFileds: null,
|
||||||
|
@ -102,7 +102,7 @@ export default {
|
||||||
this.checkedList = []
|
this.checkedList = []
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
eidt(record, dataType,shipModel,shipNumber) {
|
eidt(record, dataType1) {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
queryById({ id: record.id }).then(res => {
|
queryById({ id: record.id }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
@ -119,7 +119,7 @@ export default {
|
||||||
schemaName:record.schemaName
|
schemaName:record.schemaName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType1, record.tableName)
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|
|
@ -59,11 +59,8 @@ export default {
|
||||||
title: '',
|
title: '',
|
||||||
datetypeF: '',
|
datetypeF: '',
|
||||||
pagevisible: false,
|
pagevisible: false,
|
||||||
shipModel:'',
|
|
||||||
shipNumber:'',
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
tableName: null,
|
tableName: null
|
||||||
schemaName:null
|
|
||||||
},
|
},
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -120,11 +117,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "编辑";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,7 +19,7 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<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-form-item>
|
||||||
|
@ -93,12 +75,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -134,10 +114,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -154,48 +131,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
@ -228,8 +173,6 @@ export default {
|
||||||
// this.$refs.modalForm.title = "配置";
|
// this.$refs.modalForm.title = "配置";
|
||||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
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.datetypeF = this.queryParam.dataType
|
||||||
this.$refs.subPage.title = "配置";
|
this.$refs.subPage.title = "配置";
|
||||||
this.$refs.subPage.pagevisible = true
|
this.$refs.subPage.pagevisible = true
|
||||||
|
|
|
@ -77,8 +77,8 @@ export default {
|
||||||
// this.loadData();
|
// this.loadData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
getQuerytableColumns(dataType, tableName) {
|
||||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.treeData = []
|
this.treeData = []
|
||||||
res.result.forEach(element => {
|
res.result.forEach(element => {
|
||||||
|
@ -98,8 +98,8 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
add(schemaName,tableName, dataType) {
|
||||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType, tableName)
|
||||||
this.form = {
|
this.form = {
|
||||||
tableName: tableName,
|
tableName: tableName,
|
||||||
columnName: null,
|
columnName: null,
|
||||||
|
@ -109,7 +109,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
eidt(record, dataType,shipModel,shipNumber) {
|
eidt(record, dataType1) {
|
||||||
console.log('sfdsafa',record, dataType1)
|
console.log('sfdsafa',record, dataType1)
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
queryById({ id: record.id }).then(res => {
|
queryById({ id: record.id }).then(res => {
|
||||||
|
@ -125,7 +125,7 @@ export default {
|
||||||
schemaName:record.schemaName
|
schemaName:record.schemaName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType1, record.tableName)
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|
|
@ -62,11 +62,8 @@ export default {
|
||||||
title: '',
|
title: '',
|
||||||
datetypeF: '',
|
datetypeF: '',
|
||||||
pagevisible: false,
|
pagevisible: false,
|
||||||
shipModel:'',
|
|
||||||
shipNumber:'',
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
tableName: null,
|
tableName: null
|
||||||
schemaName:null
|
|
||||||
},
|
},
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -129,11 +126,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "编辑";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,7 +19,7 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<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-form-item>
|
||||||
|
@ -98,12 +80,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -156,10 +136,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -176,48 +153,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
@ -244,11 +189,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.queryParam);
|
this.$refs.modalForm.add(this.queryParam.dataType);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(record, this.queryParam);
|
this.$refs.modalForm.eidt(record, this.queryParam.dataType);
|
||||||
this.$refs.modalForm.title = "配置";
|
this.$refs.modalForm.title = "配置";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQuerytableColumns(dataType, tableName) {
|
getQuerytableColumns(dataType, tableName) {
|
||||||
querytableColumns({ dataType: dataType.dataType, tableName: tableName,shipModel:dataType.shipModel,shipNumber:dataType.shipNumber }).then(res => {
|
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.treeData = []
|
this.treeData = []
|
||||||
res.result.forEach(element => {
|
res.result.forEach(element => {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,9 +19,15 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<a-form-item label="报文名">
|
||||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
<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-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
|
@ -94,12 +82,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -174,10 +160,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -194,48 +177,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,17 +19,17 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :md="4" :sm="24" style="text-align: right;">
|
<a-col :md="6" :sm="24" style="text-align: right;">
|
||||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||||
</a-col> -->
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -98,12 +80,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -150,10 +130,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -170,48 +147,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(key) {
|
||||||
this.queryParam.dataType = key
|
this.queryParam.dataType = key
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
@ -238,11 +183,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.queryParam);
|
this.$refs.modalForm.add(this.queryParam.dataType);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(record, this.queryParam);
|
this.$refs.modalForm.eidt(record, this.queryParam.dataType);
|
||||||
this.$refs.modalForm.title = "配置";
|
this.$refs.modalForm.title = "配置";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQuerytableColumns(dataType) {
|
getQuerytableColumns(dataType) {
|
||||||
getTables({dataType: dataType.dataType,shipModel:dataType.shipModel,shipNumber:dataType.shipNumber}).then(res => {
|
getTables({dataType: dataType}).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.treeData = []
|
this.treeData = []
|
||||||
res.result.forEach(element => {
|
res.result.forEach(element => {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,9 +19,9 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
|
@ -93,12 +75,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -134,10 +114,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -154,48 +131,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
@ -228,8 +173,6 @@ export default {
|
||||||
// this.$refs.modalForm.title = "配置";
|
// this.$refs.modalForm.title = "配置";
|
||||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
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.datetypeF = this.queryParam.dataType
|
||||||
this.$refs.subPage.title = "配置";
|
this.$refs.subPage.title = "配置";
|
||||||
this.$refs.subPage.pagevisible = true
|
this.$refs.subPage.pagevisible = true
|
||||||
|
|
|
@ -79,8 +79,8 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
getQuerytableColumns(dataType, tableName) {
|
||||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.treeData = []
|
this.treeData = []
|
||||||
res.result.forEach(element => {
|
res.result.forEach(element => {
|
||||||
|
@ -93,7 +93,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
add(schemaName,tableName, dataType) {
|
||||||
this.form = {
|
this.form = {
|
||||||
tableName: tableName,
|
tableName: tableName,
|
||||||
strategy: null,
|
strategy: null,
|
||||||
|
@ -104,9 +104,9 @@ export default {
|
||||||
},
|
},
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.dataType = dataType
|
this.dataType = dataType
|
||||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType, tableName)
|
||||||
},
|
},
|
||||||
eidt(record, dataType,shipModel,shipNumber) {
|
eidt(record, dataType) {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
queryById({ id: record.id }).then(res => {
|
queryById({ id: record.id }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
@ -124,7 +124,7 @@ export default {
|
||||||
schemaName:record.schemaName
|
schemaName:record.schemaName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType, record.tableName)
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -61,11 +61,8 @@ export default {
|
||||||
title: '',
|
title: '',
|
||||||
datetypeF: '',
|
datetypeF: '',
|
||||||
pagevisible: false,
|
pagevisible: false,
|
||||||
shipModel:'',
|
|
||||||
shipNumber:'',
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
tableName: null,
|
tableName: null
|
||||||
schemaName:null
|
|
||||||
},
|
},
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -132,11 +129,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "编辑";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,7 +19,7 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<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-form-item>
|
||||||
|
@ -93,12 +75,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -134,10 +114,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -154,48 +131,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
@ -228,8 +173,6 @@ export default {
|
||||||
// this.$refs.modalForm.title = "配置";
|
// this.$refs.modalForm.title = "配置";
|
||||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
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.datetypeF = this.queryParam.dataType
|
||||||
this.$refs.subPage.title = "配置";
|
this.$refs.subPage.title = "配置";
|
||||||
this.$refs.subPage.pagevisible = true
|
this.$refs.subPage.pagevisible = true
|
||||||
|
|
|
@ -78,8 +78,8 @@ export default {
|
||||||
// this.loadData();
|
// this.loadData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
getQuerytableColumns(dataType, tableName) {
|
||||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.treeData = []
|
this.treeData = []
|
||||||
res.result.forEach(element => {
|
res.result.forEach(element => {
|
||||||
|
@ -99,8 +99,8 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
add(schemaName,tableName, dataType) {
|
||||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType, tableName)
|
||||||
this.form = {
|
this.form = {
|
||||||
tableName: tableName,
|
tableName: tableName,
|
||||||
field: null,
|
field: null,
|
||||||
|
@ -111,7 +111,7 @@ export default {
|
||||||
this.checkedList = []
|
this.checkedList = []
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
eidt(record, dataType,shipModel,shipNumber) {
|
eidt(record, dataType1) {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
queryById({ id: record.id }).then(res => {
|
queryById({ id: record.id }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
@ -128,7 +128,7 @@ export default {
|
||||||
schemaName:record.schemaName
|
schemaName:record.schemaName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType1, record.tableName)
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|
|
@ -63,11 +63,8 @@ export default {
|
||||||
title: '',
|
title: '',
|
||||||
datetypeF: '',
|
datetypeF: '',
|
||||||
pagevisible: false,
|
pagevisible: false,
|
||||||
shipModel:'',
|
|
||||||
shipNumber:'',
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
tableName: null,
|
tableName: null
|
||||||
schemaName:null
|
|
||||||
},
|
},
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -130,11 +127,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "编辑";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,9 +19,9 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
|
@ -93,12 +75,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -134,10 +114,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -154,48 +131,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
@ -228,8 +173,6 @@ export default {
|
||||||
// this.$refs.modalForm.title = "配置";
|
// this.$refs.modalForm.title = "配置";
|
||||||
this.$refs.subPage.queryParam.tableName = record.tableName
|
this.$refs.subPage.queryParam.tableName = record.tableName
|
||||||
this.$refs.subPage.queryParam.schemaName = record.schemaName
|
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.datetypeF = this.queryParam.dataType
|
||||||
this.$refs.subPage.title = "配置";
|
this.$refs.subPage.title = "配置";
|
||||||
this.$refs.subPage.pagevisible = true
|
this.$refs.subPage.pagevisible = true
|
||||||
|
|
|
@ -80,8 +80,8 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
|
getQuerytableColumns(dataType, tableName) {
|
||||||
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
|
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.treeData = []
|
this.treeData = []
|
||||||
res.result.forEach(element => {
|
res.result.forEach(element => {
|
||||||
|
@ -97,7 +97,7 @@ export default {
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
this.getQuerytableColumns(this.dataType, this.form.tableName)
|
this.getQuerytableColumns(this.dataType, this.form.tableName)
|
||||||
},
|
},
|
||||||
add(schemaName,tableName, dataType,shipModel,shipNumber) {
|
add(schemaName,tableName, dataType) {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
tableName: tableName,
|
tableName: tableName,
|
||||||
|
@ -108,9 +108,9 @@ export default {
|
||||||
this.dataType = dataType
|
this.dataType = dataType
|
||||||
this.checkedList =[]
|
this.checkedList =[]
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType, tableName)
|
||||||
},
|
},
|
||||||
eidt(record, dataType,shipModel,shipNumber) {
|
eidt(record, dataType) {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
tableName: record.tableName,
|
tableName: record.tableName,
|
||||||
|
@ -127,7 +127,7 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.dataType = dataType
|
this.dataType = dataType
|
||||||
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
|
this.getQuerytableColumns(dataType, record.tableName)
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|
|
@ -117,11 +117,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(record) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
|
this.$refs.modalForm.eidt(record, this.datetypeF);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "编辑";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<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-col :md="6" :sm="8">
|
||||||
<a-form-item label="数据类型">
|
<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">
|
||||||
|
@ -37,9 +19,15 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="报文名">
|
<a-form-item label="报文名">
|
||||||
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
|
<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-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
|
@ -94,12 +82,10 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
dataType: '',
|
dataType: 'biandui',
|
||||||
msgName: null,
|
msgName: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
shipModel:'',
|
|
||||||
shipNumber:''
|
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
defaultCurrent: 1, // 默认当前页数
|
defaultCurrent: 1, // 默认当前页数
|
||||||
|
@ -174,10 +160,7 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
shipModel:[],
|
|
||||||
shipNumber:[],
|
|
||||||
existingDataTypes:{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -194,48 +177,16 @@ export default {
|
||||||
getDataType() {
|
getDataType() {
|
||||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.existingDataTypes = res.result.result.original
|
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
|
||||||
var ship = Object.keys(this.existingDataTypes)
|
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
|
||||||
ship.forEach((element, index) => {
|
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
|
||||||
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()
|
this.getQueryPage()
|
||||||
} else {
|
} 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) {
|
handleTypeChange(value) {
|
||||||
this.queryParam.dataType = value
|
this.queryParam.dataType = value
|
||||||
this.getQueryPage()
|
this.getQueryPage()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user