Compare commits

..

No commits in common. "80852d66a826d047abbc5075794e31fbb8142c8b" and "b354f155ca98ed8e2b2d97fb0b748b9401c3cd1b" have entirely different histories.

2 changed files with 41 additions and 100 deletions

View File

@ -1,9 +0,0 @@
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
const metaDataTypeTree = (params)=>getAction("/dataManager/getAllTable",params);
const metaDatalist = (params)=>getAction("/dataManager/getTableColumns",params);
export {
metaDataTypeTree,
metaDatalist
}

View File

@ -13,36 +13,33 @@
<a-col :md="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择同步状态" option-filter-prop="children" size="large"
v-model="queryParam.schemaMass" @change="handleTypeChange">
<a-select-option key="平台">
平台
v-model="queryParam.syncState">
<a-select-option key="">
全部
</a-select-option>
<a-select-option key="编队">
编队
<a-select-option key="0">
未同步
</a-select-option>
<a-select-option key="航空兵">
航空兵
<a-select-option key="1">
进行中
</a-select-option>
<a-select-option key="陆战队">
陆战队
</a-select-option>
<a-select-option key="作战">
作战
</a-select-option>
<a-select-option key="反潜">
反潜
</a-select-option>
<a-select-option key="舰炮">
舰炮
<a-select-option key="2">
已结束
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="关键词">
<a-input placeholder="请输入搜索关键词" v-model="queryParam.massKey"></a-input>
<a-input placeholder="请输入搜索关键词" v-model="queryParam.databaseName"></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" icon="search">查询</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
@ -52,7 +49,7 @@
<div class="linese"></div>
<!-- 分类区域 -->
<div style="height:calc(100vh - 300px);background: #e6e9f1;padding:10px;">
<a-tree :tree-data="treeDate" @select="onSelect" />
</div>
<div class="linese"></div>
</a-col>
@ -60,8 +57,8 @@
<div class="linese"></div>
<!-- 表格区域 -->
<div style="height:calc(100vh - 300px);background: #e6e9f1;overflow:hidden;padding: 15px;">
<a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
:pagination="false" :loading="loading" :scroll="{y: 'calc(100vh - 380px)' }">
<a-table ref="table" size="middle" style="height:calc(100vh - 344px);" bordered rowKey="id"
:columns="columns" :dataSource="dataSource" :loading="loading">
<!-- 字符串超长截取省略号显示-->
<!-- <span slot="name" slot-scope="text">
@ -78,7 +75,6 @@
</a-card>
</template>
<script>
import { metaDataTypeTree, metaDatalist } from '@/api/metaData'
export default {
name: "metadata",
components: {
@ -88,57 +84,55 @@ export default {
loading: false,
//
queryParam: {
sourceType: 1,
schemaMass: null,
massKey: null
databaseName: null,
syncState: null,
pageNum: 1,
pageSize: 9999999,
},
tableParams: {
schemaMass: null,
tableName: null
},
treeDate: [],
dataSource: [],
columns: [
{
title: '序号',
dataIndex: 'columnId',
dataIndex: '',
key: 'id',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '字段名称',
width: 200,
align: "center",
dataIndex: 'columnName',
dataIndex: 'name',
},
{
title: '数据类型',
title: '索引类型',
width: 130,
align: "center",
dataIndex: 'dataType',
dataIndex: 'name',
},
{
title: '数据长度',
width: 100,
align: "center",
dataIndex: 'dataLength',
dataIndex: 'name',
},
{
title: '是否为空',
title: '数据精度',
width: 100,
align: "center",
dataIndex: 'nullable',
dataIndex: 'name',
},
{
title: '默认值',
title: '描述',
align: "center",
dataIndex: 'dataDefault',
dataIndex: 'issuingTime',
}
]
}
},
watch: {
'queryParam.massKey'(value) {
this.queryParam.massKey = value
this.getMetaDataTypeTree()
}
},
mounted() {
},
@ -146,54 +140,10 @@ export default {
},
created() {
this.getMetaDataTypeTree()
},
methods: {
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: 'children_' + chil,
type: 'childern',
title: childrenNode
})
});
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.tableParams.schemaMass = info.node.$parent.dataRef.title
this.tableParams.tableName = info.node.dataRef.title
this.getMetaDatalist()
}
},
getMetaDatalist() {
metaDatalist(this.tableParams).then(res => {
if (res.code == 200) {
this.dataSource = []
this.dataSource = res.result
}
})
}
}
}
</script>