|
|
@ -73,7 +73,7 @@ |
|
|
|
<el-main style="padding-top: 0;padding-bottom: 0;"> |
|
|
|
<el-main style="padding-top: 0;padding-bottom: 0;"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<el-input style="width: 250px;margin-bottom: 15px;" placeholder="请输入表名称" v-model="keywordTable" suffix-icon="el-icon-search" clearable size="small"></el-input> |
|
|
|
<el-input style="width: 250px;margin-bottom: 15px;" placeholder="请输入表名称" v-model="keywordTable" suffix-icon="el-icon-search" clearable size="small"></el-input> |
|
|
|
<el-table :data="tables" class="cus-table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange"> |
|
|
|
<el-table v-loading="tableLoading" :data="tables" class="cus-table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column width="40" align="center"> |
|
|
|
<el-table-column width="40" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-radio class="check-table" v-model="curTable" :label="scope.row.id"></el-radio> |
|
|
|
<el-radio class="check-table" v-model="curTable" :label="scope.row.id"></el-radio> |
|
|
@ -159,6 +159,8 @@ export default { |
|
|
|
curExpand: '', |
|
|
|
curExpand: '', |
|
|
|
submited: false, |
|
|
|
submited: false, |
|
|
|
tables: [], |
|
|
|
tables: [], |
|
|
|
|
|
|
|
tableLoading: false, |
|
|
|
|
|
|
|
deepId: '', |
|
|
|
keywordTable: '', |
|
|
|
keywordTable: '', |
|
|
|
pageTable: 1, |
|
|
|
pageTable: 1, |
|
|
|
pageSizeTable: 10, |
|
|
|
pageSizeTable: 10, |
|
|
@ -300,7 +302,13 @@ export default { |
|
|
|
this.importTypeList = data |
|
|
|
this.importTypeList = data |
|
|
|
this.importLoading = false |
|
|
|
this.importLoading = false |
|
|
|
if (data.length) { |
|
|
|
if (data.length) { |
|
|
|
|
|
|
|
this.defaultTypeActive = [data[0].id] // 默认展开第一个分类 |
|
|
|
this.importVisible = true |
|
|
|
this.importVisible = true |
|
|
|
|
|
|
|
this.getDeepestId(data) |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
this.$refs.typeTree.setCurrentKey(this.deepId) // 默认选中第一个分类下的最深层级 |
|
|
|
|
|
|
|
this.getTable() |
|
|
|
|
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.buyVisible = true |
|
|
|
this.buyVisible = true |
|
|
|
// this.$message.error('当前院校暂未购买该数据库,请购买后再尝试') |
|
|
|
// this.$message.error('当前院校暂未购买该数据库,请购买后再尝试') |
|
|
@ -309,9 +317,21 @@ export default { |
|
|
|
this.importLoading = false |
|
|
|
this.importLoading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 查找第一个分类下最深层级的id |
|
|
|
|
|
|
|
getDeepestId(data) { |
|
|
|
|
|
|
|
for (const e of data) { |
|
|
|
|
|
|
|
if (e.children.length) { |
|
|
|
|
|
|
|
this.getDeepestId(e.children) |
|
|
|
|
|
|
|
} else if (!this.deepId) { |
|
|
|
|
|
|
|
this.deepId = e.id |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 分类点击回调 |
|
|
|
// 分类点击回调 |
|
|
|
typeClick() { |
|
|
|
typeClick() { |
|
|
|
this.keywordTable = '' |
|
|
|
this.keywordTable = '' |
|
|
|
|
|
|
|
this.tableLoading = true |
|
|
|
this.getTable() |
|
|
|
this.getTable() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查询分类下的表 |
|
|
|
// 查询分类下的表 |
|
|
@ -330,9 +350,12 @@ export default { |
|
|
|
e.timeRange = e.endTime |
|
|
|
e.timeRange = e.endTime |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.tableLoading = false |
|
|
|
this.tables = list |
|
|
|
this.tables = list |
|
|
|
this.totalTable = data.total |
|
|
|
this.totalTable = data.total |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
this.tableLoading = false |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 重置表分页 |
|
|
|
// 重置表分页 |
|
|
|
initTable() { |
|
|
|
initTable() { |
|
|
|