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