提交代码
This commit is contained in:
parent
753ee55ca4
commit
db2e18aa67
|
@ -40,18 +40,25 @@ export default {
|
|||
submitForm: {
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
fieldValues: null
|
||||
fieldValues: null,
|
||||
sourceType: null,
|
||||
mdl: null,
|
||||
hn: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
initForm(schemaMass, tableName, columns, record) {
|
||||
initForm(schemaMass, tableName, columns, record, sourceType, mdl, hn) {
|
||||
console.log('接收', sourceType)
|
||||
this.visible = true;
|
||||
this.nodes = columns
|
||||
this.submitForm.schemaMass = schemaMass
|
||||
this.submitForm.tableName = tableName
|
||||
this.submitForm.sourceType = sourceType
|
||||
this.submitForm.mdl = mdl
|
||||
this.submitForm.hn = hn
|
||||
this.form = record
|
||||
},
|
||||
close() {
|
||||
|
@ -64,6 +71,7 @@ export default {
|
|||
if (valid) {
|
||||
that.confirmLoading = true;
|
||||
that.submitForm.fieldValues = that.form
|
||||
|
||||
updateDmTableBySeqNo(that.submitForm).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
|
|
|
@ -50,7 +50,10 @@ import {getAction} from '@/api/manage'
|
|||
title:"导出日志",
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
sourceType: null,
|
||||
schemaMass:null,
|
||||
mdl: null,
|
||||
hn: null,
|
||||
dataSource:[],
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
|
@ -115,13 +118,16 @@ import {getAction} from '@/api/manage'
|
|||
|
||||
},
|
||||
methods: {
|
||||
add (schemaMass) {
|
||||
add (sourceType, schemaMass, mdl, hn) {
|
||||
this.visible =true;
|
||||
this.sourceType = sourceType;
|
||||
this.schemaMass = schemaMass;
|
||||
this.mdl = mdl;
|
||||
this.hn = hn;
|
||||
this.getTableInfo();
|
||||
},
|
||||
getTableInfo(){
|
||||
getAction("/dataManager/DmExportLog?schemaMass="+this.schemaMass,{}).then(res => {
|
||||
getAction("/dataManager/DmExportLog?schemaMass="+this.schemaMass + '&mdl='+ this.mdl + '&hn=' + this.hn + '&sourceType='+this.sourceType,{}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.dataSource = res.result
|
||||
console.log(this.dataSource)
|
||||
|
|
|
@ -46,9 +46,11 @@ import { metaDataTypeTree } from '@/api/metaData'
|
|||
visible: false,
|
||||
confirmLoading: false,
|
||||
queryParam: {
|
||||
sourceType: 2,
|
||||
sourceType: null,
|
||||
schemaMass: null,
|
||||
massKey: null
|
||||
massKey: null,
|
||||
mdl: null,
|
||||
hn: null
|
||||
},
|
||||
dataSource:[],
|
||||
selectedRowKeys: [],
|
||||
|
@ -80,9 +82,12 @@ import { metaDataTypeTree } from '@/api/metaData'
|
|||
|
||||
},
|
||||
methods: {
|
||||
add (schemaMass) {
|
||||
add (sourceType, schemaMass, mdl, hn) {
|
||||
this.visible =true;
|
||||
this.queryParam.sourceType = sourceType;
|
||||
this.queryParam.schemaMass = schemaMass;
|
||||
this.queryParam.mdl = mdl;
|
||||
this.queryParam.hn = hn;
|
||||
this.getTableInfo();
|
||||
},
|
||||
getTableInfo(){
|
||||
|
|
|
@ -47,9 +47,9 @@
|
|||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24" style="text-align: right;">
|
||||
<a-button @click="getTableDataList" type="primary">查询</a-button>
|
||||
<a-button @click="exportTool" type="primary">导出dmp</a-button>
|
||||
<!-- <a-button @click="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-button @click="openexptable" type="primary">导出日志</a-button> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -192,9 +192,9 @@ export default {
|
|||
getselect() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD
|
||||
if (res.result.result.DATA_CONN_STANDARD.length > 0) {
|
||||
this.queryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName
|
||||
this.dataTypedataSources = res.result.result.special
|
||||
if (res.result.result.special.length > 0) {
|
||||
this.queryParam.schemaMass = res.result.result.special[0].cnName
|
||||
}
|
||||
this.getMetaDataTypeTree();
|
||||
} else {
|
||||
|
|
|
@ -10,12 +10,32 @@
|
|||
</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="d in dataTypedataSources" :key="d.cnName">
|
||||
{{ d.cnName }}
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
@ -34,8 +54,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-range-picker :show-time="{ format: 'HH:mm:ss' }" v-model="defaultTime"
|
||||
format="YYYY-MM-DD HH:mm:ss" @change="onChangeTime" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="5">
|
||||
|
@ -59,7 +79,8 @@
|
|||
<a-col :md="6">
|
||||
<div class="linese"></div>
|
||||
<!-- 分类区域 -->
|
||||
<div style="height:calc(100vh - 366px);overflow: auto;background: #e6e9f1;padding:10px;" ref="treeContainer">
|
||||
<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>
|
||||
|
@ -108,12 +129,6 @@ export default {
|
|||
loading: false,
|
||||
allTask: [],
|
||||
activeTaskId: null,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 2,
|
||||
schemaMass: null,
|
||||
massKey: null
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
|
@ -123,7 +138,12 @@ export default {
|
|||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
tableParams: {
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 2,
|
||||
massKey: null,
|
||||
mdl: null, // 型号
|
||||
hn: null, // 舷号
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
startTime: null,
|
||||
|
@ -134,7 +154,10 @@ export default {
|
|||
treeDate: [],
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
dataTypedataSources: [],
|
||||
dataTypeList: [],
|
||||
shipModel: [],
|
||||
shipNumber: [],
|
||||
existingDataTypes: {},
|
||||
treeHeight: 0
|
||||
}
|
||||
},
|
||||
|
@ -158,7 +181,6 @@ export default {
|
|||
methods: {
|
||||
queryAllTask() {
|
||||
getAllTask().then(res => {
|
||||
console.log('res', res)
|
||||
if (res.success) {
|
||||
this.allTask = res.result
|
||||
if (res.result.length > 0) {
|
||||
|
@ -166,8 +188,8 @@ export default {
|
|||
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)
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
|
@ -179,9 +201,9 @@ export default {
|
|||
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)
|
||||
this.defaultTime = [start, end]
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
},
|
||||
calculateScrollY() {
|
||||
|
@ -189,32 +211,80 @@ export default {
|
|||
const container = this.$refs.treeContainer;
|
||||
this.treeHeight = container.clientHeight;
|
||||
},
|
||||
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = value
|
||||
var number = Object.keys(this.existingDataTypes[value])
|
||||
this.shipNumber = []
|
||||
number.forEach((element, index) => {
|
||||
this.shipNumber.push(element);
|
||||
});
|
||||
this.dataTypeList = this.existingDataTypes[value][this.shipNumber[0]]
|
||||
this.queryParam.mdl = this.shipNumber[0]
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.mdl = value
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
},
|
||||
getselect() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD
|
||||
if (res.result.result.DATA_CONN_STANDARD.length > 0) {
|
||||
this.queryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName
|
||||
}
|
||||
this.getMetaDataTypeTree();
|
||||
this.existingDataTypes = res.result.result.standard
|
||||
var ship = Object.keys(this.existingDataTypes)
|
||||
ship.forEach((element, index) => {
|
||||
this.shipModel.push(element);
|
||||
});
|
||||
var number = Object.keys(this.existingDataTypes[this.shipModel[0]])
|
||||
number.forEach((element, index) => {
|
||||
this.shipNumber.push(element);
|
||||
});
|
||||
this.dataTypeList = this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]]
|
||||
this.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.schemaMass);
|
||||
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.schemaMass);
|
||||
this.$refs.exptable.add(this.queryParam.sourceType, this.queryParam.schemaMass, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
|
@ -247,40 +317,42 @@ export default {
|
|||
},
|
||||
onSelect(selectedKeys, info) {
|
||||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||
this.tableParams.schemaMass = info.node.$parent.dataRef.title
|
||||
this.tableParams.tableName = info.node.dataRef.key
|
||||
this.queryParam.schemaMass = info.node.$parent.dataRef.title
|
||||
this.queryParam.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.queryParam.pageNum = pagination.current
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getTableDataList()
|
||||
},
|
||||
onChangeTime(date, dateString) {
|
||||
if (date.length == 0) {
|
||||
this.tableParams.startTime = null
|
||||
this.tableParams.endTime = null
|
||||
this.tableParams.pageNum = 1
|
||||
this.queryParam.startTime = null
|
||||
this.queryParam.endTime = null
|
||||
this.queryParam.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
|
||||
this.queryParam.startTime = moment(date[0]).format(this.dateFormat);
|
||||
this.queryParam.endTime = moment(date[1]).format(this.dateFormat);
|
||||
this.queryParam.pageNum = 1
|
||||
}
|
||||
},
|
||||
handelEdit(record) {
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID');
|
||||
console.log('sdfsdf', record)
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID' && item.dataIndex != '数据');
|
||||
delete record['ROW_ID'];
|
||||
this.$refs.editdataseachForm.initForm(this.tableParams.schemaMass, this.tableParams.tableName, filteredColumn, record);
|
||||
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.tableParams)
|
||||
if (this.tableParams.schemaMass == null || this.tableParams.tableName == null) {
|
||||
console.log(this.queryParam)
|
||||
if (this.queryParam.schemaMass == null || this.queryParam.tableName == null) {
|
||||
this.$message.warning('必须选择查询的表')
|
||||
return
|
||||
}
|
||||
tableDataList(this.tableParams).then(res => {
|
||||
tableDataList(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.columns = []
|
||||
if (res.result.columnNames.length > 0) {
|
||||
|
|
|
@ -10,12 +10,32 @@
|
|||
</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="d in dataTypedataSources" :key="d.cnName">
|
||||
{{ d.cnName }}
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
@ -34,8 +54,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-range-picker :show-time="{ format: 'HH:mm:ss' }" v-model="defaultTime"
|
||||
format="YYYY-MM-DD HH:mm:ss" @change="onChangeTime" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="5">
|
||||
|
@ -59,7 +79,8 @@
|
|||
<a-col :md="6">
|
||||
<div class="linese"></div>
|
||||
<!-- 分类区域 -->
|
||||
<div style="height:calc(100vh - 366px);overflow: auto;background: #e6e9f1;padding:10px;" ref="treeContainer">
|
||||
<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>
|
||||
|
@ -108,12 +129,6 @@ export default {
|
|||
loading: false,
|
||||
allTask: [],
|
||||
activeTaskId: null,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 2,
|
||||
schemaMass: null,
|
||||
massKey: null
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
|
@ -123,7 +138,12 @@ export default {
|
|||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
tableParams: {
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
sourceType: 1,
|
||||
massKey: null,
|
||||
mdl: null, // 型号
|
||||
hn: null, // 舷号
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
startTime: null,
|
||||
|
@ -134,7 +154,10 @@ export default {
|
|||
treeDate: [],
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
dataTypedataSources: [],
|
||||
dataTypeList: [],
|
||||
shipModel: [],
|
||||
shipNumber: [],
|
||||
existingDataTypes: {},
|
||||
treeHeight: 0
|
||||
}
|
||||
},
|
||||
|
@ -158,7 +181,6 @@ export default {
|
|||
methods: {
|
||||
queryAllTask() {
|
||||
getAllTask().then(res => {
|
||||
console.log('res', res)
|
||||
if (res.success) {
|
||||
this.allTask = res.result
|
||||
if (res.result.length > 0) {
|
||||
|
@ -166,8 +188,8 @@ export default {
|
|||
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)
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
|
@ -179,9 +201,9 @@ export default {
|
|||
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)
|
||||
this.defaultTime = [start, end]
|
||||
this.queryParam.startTime = start.format(this.dateFormat);
|
||||
this.queryParam.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
},
|
||||
calculateScrollY() {
|
||||
|
@ -189,33 +211,80 @@ export default {
|
|||
const container = this.$refs.treeContainer;
|
||||
this.treeHeight = container.clientHeight;
|
||||
},
|
||||
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
},
|
||||
changeshipModel(value) {
|
||||
this.queryParam.shipModel = value
|
||||
var number = Object.keys(this.existingDataTypes[value])
|
||||
this.shipNumber = []
|
||||
number.forEach((element, index) => {
|
||||
this.shipNumber.push(element);
|
||||
});
|
||||
this.dataTypeList = this.existingDataTypes[value][this.shipNumber[0]]
|
||||
this.queryParam.mdl = this.shipNumber[0]
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
},
|
||||
changeshipNumber(value) {
|
||||
this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value]
|
||||
this.queryParam.mdl = value
|
||||
this.queryParam.schemaMass = this.dataTypeList[0].cnName
|
||||
},
|
||||
getselect() {
|
||||
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
|
||||
console.log('类型结果', res)
|
||||
if (res.success) {
|
||||
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD
|
||||
if (res.result.result.DATA_CONN_STANDARD.length > 0) {
|
||||
this.queryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName
|
||||
}
|
||||
this.getMetaDataTypeTree();
|
||||
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.schemaMass);
|
||||
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.schemaMass);
|
||||
this.$refs.exptable.add(this.queryParam.sourceType, this.queryParam.schemaMass, this.queryParam.mdl, this.queryParam.hn);
|
||||
},
|
||||
getMetaDataTypeTree() {
|
||||
metaDataTypeTree(this.queryParam).then(res => {
|
||||
|
@ -248,40 +317,42 @@ export default {
|
|||
},
|
||||
onSelect(selectedKeys, info) {
|
||||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||
this.tableParams.schemaMass = info.node.$parent.dataRef.title
|
||||
this.tableParams.tableName = info.node.dataRef.key
|
||||
this.queryParam.schemaMass = info.node.$parent.dataRef.title
|
||||
this.queryParam.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.queryParam.pageNum = pagination.current
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getTableDataList()
|
||||
},
|
||||
onChangeTime(date, dateString) {
|
||||
if (date.length == 0) {
|
||||
this.tableParams.startTime = null
|
||||
this.tableParams.endTime = null
|
||||
this.tableParams.pageNum = 1
|
||||
this.queryParam.startTime = null
|
||||
this.queryParam.endTime = null
|
||||
this.queryParam.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
|
||||
this.queryParam.startTime = moment(date[0]).format(this.dateFormat);
|
||||
this.queryParam.endTime = moment(date[1]).format(this.dateFormat);
|
||||
this.queryParam.pageNum = 1
|
||||
}
|
||||
},
|
||||
handelEdit(record) {
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID');
|
||||
console.log('sdfsdf', record)
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID' && item.dataIndex != '数据');
|
||||
delete record['ROW_ID'];
|
||||
this.$refs.editdataseachForm.initForm(this.tableParams.schemaMass, this.tableParams.tableName, filteredColumn, record);
|
||||
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.tableParams)
|
||||
if (this.tableParams.schemaMass == null || this.tableParams.tableName == null) {
|
||||
console.log(this.queryParam)
|
||||
if (this.queryParam.schemaMass == null || this.queryParam.tableName == null) {
|
||||
this.$message.warning('必须选择查询的表')
|
||||
return
|
||||
}
|
||||
tableDataList(this.tableParams).then(res => {
|
||||
tableDataList(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.columns = []
|
||||
if (res.result.columnNames.length > 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user