表数据查看排序,tab标签页优化

This commit is contained in:
暮光:城中城
2020-05-04 20:15:18 +08:00
parent 7712c52f1b
commit e923156735
6 changed files with 53 additions and 38 deletions

View File

@@ -27,7 +27,6 @@
<script>
import global from '../../common/config/global'
var app;
export default {
data() {
@@ -39,28 +38,26 @@
keyword: '',
};
},
beforeRouteUpdate(to, from, next) {
this.initQueryParam(to);
next();
},
mounted: function () {
app = this;
activated: function () {
this.initQueryParam(this.$route);
// 延迟设置展开的目录edit比app先初始化
setTimeout(function () {
global.vue.$app.initLoadDataList(app.vueQueryParam.sourceId, app.vueQueryParam.host, app.vueQueryParam.dbName);
setTimeout(() => {
global.vue.$app.initLoadDataList(this.vueQueryParam.sourceId, this.vueQueryParam.host, this.vueQueryParam.dbName);
}, 500);
},
methods: {
initQueryParam(to) {
this.vueQueryParam = to.query;
let newName = {key: this.$route.fullPath, val: '库-' + this.vueQueryParam.dbName};
this.$store.commit('global/addTableName', newName);
},
searchSubmit() {
let that = this;
this.columnListLoading = true;
this.vueQueryParam.searchText = this.keyword;
this.common.post(this.apilist1.tableAndColumnBySearch, this.vueQueryParam, function (json) {
app.columnList = json.data || [];
app.columnListLoading = false;
that.columnList = json.data || [];
that.columnListLoading = false;
});
},
}

View File

@@ -12,7 +12,7 @@
</el-row>
<el-row class="status-info-row">
<el-col :span="6"><span class="label">数据库</span>{{vueQueryParam.dbName}}</el-col>
<el-col :span="6"><span class="label">数据表</span>{{vueQueryParam.tableName}}</el-col>
<el-col :span="6"><span class="label">数据表</span>{{tableStatusInfo.name}}</el-col>
<el-col :span="6"><span class="label">引擎</span>{{tableStatusInfo.engine}}</el-col>
</el-row>
<el-row class="status-info-row">
@@ -88,14 +88,10 @@
vueQueryParam: {},
tableStatusInfo: {},
columnList: [],
tableInfo: [],
tableInfo: {},
};
},
beforeRouteUpdate(to, from, next) {
this.initQueryParam(to);
next();
},
mounted: function () {
activated: function () {
this.initQueryParam(this.$route);
// 延迟设置展开的目录edit比app先初始化
setTimeout(()=> {
@@ -104,6 +100,9 @@
},
methods: {
initQueryParam(to) {
if (this.columnListLoading) {
return;
}
let that = this;
this.columnListLoading = true;
this.vueQueryParam = to.query;
@@ -118,9 +117,9 @@
tableInfo.inEdit = 0;
tableInfo.newDesc = tableInfo.description;
that.tableInfo = tableInfo;
that.columnListLoading = false;
var newName = {key: that.$route.fullPath, val: tableInfo.tableName};
var newName = {key: that.$route.fullPath, val: '表-' + tableInfo.tableName};
that.$store.commit('global/addTableName', newName);
that.columnListLoading = false;
});
this.common.post(this.apilist1.tableStatus, this.vueQueryParam, function (json) {
that.tableStatusInfo = json.data || {};