展示细节优化
This commit is contained in:
@@ -7,11 +7,11 @@
|
||||
<el-aside style="background: #fafafa;">
|
||||
<div style="padding: 10px;height: 100%;box-sizing: border-box;">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<el-select v-model="choiceDatasourceGroup" @change="sourceGroupChangeEvents" filterable placeholder="请先选择分组" style="width: 100%;">
|
||||
<el-select v-model="choiceDatasourceGroup" @change="sourceGroupChangeEvents" size="small" filterable placeholder="请先选择分组" style="width: 100%;">
|
||||
<el-option value="" label="全部分组"></el-option>
|
||||
<el-option v-for="item in datasourceGroupList" :key="item" :value="item"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="choiceDatasourceId" @change="datasourceChangeEvents" filterable placeholder="请先选择数据源" style="width: 100%;margin-top: 10px;">
|
||||
<el-select v-model="choiceDatasourceId" @change="datasourceChangeEvents" size="small" filterable placeholder="请先选择数据源" style="width: 100%;margin-top: 10px;">
|
||||
<el-option v-for="item in datasourceOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -138,7 +138,7 @@
|
||||
} else if (command == 'console') {
|
||||
window.location = process.env.VUE_APP_BASE_API;
|
||||
} else {
|
||||
this.$message.warn("功能暂未开放");
|
||||
this.$message.warning("功能暂未开放");
|
||||
}
|
||||
},
|
||||
userSignOut() {
|
||||
@@ -283,6 +283,9 @@
|
||||
#app, .el-container, .el-menu {
|
||||
height: 100%;
|
||||
}
|
||||
.el-header {
|
||||
background-color: #1D4E89 !important;
|
||||
}
|
||||
.database-list-tree{background-color: #fafafa;}
|
||||
.database-list-tree .el-tree-node>.el-tree-node__children {
|
||||
overflow: unset;
|
||||
|
||||
@@ -40,6 +40,7 @@ let routes = [
|
||||
{path: '/data/executor', name: 'SQL执行器',component: DataExecutor},
|
||||
{path: '/data/transferData', name: '数据互导工具',component: DataTransferData},
|
||||
{path: '/data/dataPreview', name: '表数据预览',component: DataPreview},
|
||||
{path: '/user/myInfo', name: '我的信息',component: UserMyInfo},
|
||||
]
|
||||
}, {
|
||||
path: '/user',
|
||||
@@ -47,7 +48,6 @@ let routes = [
|
||||
component: UserRouterView,
|
||||
children: [
|
||||
{path: 'login', name: '系统登录',component: UserLogin, meta: {fullscreen: true}},
|
||||
{path: 'myInfo', name: '我的信息',component: UserMyInfo},
|
||||
]
|
||||
}, {
|
||||
path: '/common',
|
||||
|
||||
@@ -7,12 +7,11 @@
|
||||
<el-button style="float: right;" v-on:click="addDatasource" type="primary" icon="el-icon-circle-plus-outline" size="small">新增</el-button>
|
||||
</div>
|
||||
<el-table :data="datasourceList" stripe border style="width: 100%; margin-bottom: 5px;">
|
||||
<el-table-column prop="name" label="名字" width="100"></el-table-column>
|
||||
<el-table-column prop="name" label="名字" width="200"></el-table-column>
|
||||
<el-table-column prop="groupName" label="分组" width="100"></el-table-column>
|
||||
<el-table-column prop="driverClassName" label="驱动类" width="200"></el-table-column>
|
||||
<el-table-column prop="sourceUrl" label="数据源URL"></el-table-column>
|
||||
<el-table-column prop="sourceName" label="账号"></el-table-column>
|
||||
<el-table-column prop="sourcePassword" label="密码"></el-table-column>
|
||||
<el-table-column prop="sourceName" label="账号" width="200"></el-table-column>
|
||||
<el-table-column label="操作" width="220">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-on:click="editDatasource(scope.row)" type="primary" size="mini">修改</el-button>
|
||||
@@ -26,7 +25,7 @@
|
||||
<el-dialog :inline="true" :title="newDatasource.id>0?'编辑数据源':'新增数据源'" :visible.sync="datasourceDialogVisible" width="760px">
|
||||
<el-form label-width="120px">
|
||||
<el-form-item label="分组:">
|
||||
<el-select v-model="newDatasource.groupName" placeholder="分组名字" style="width: 100%" filterable allow-create>
|
||||
<el-select v-model="newDatasource.groupName" placeholder="请选择或输入新的分组名字" style="width: 100%" filterable allow-create>
|
||||
<el-option value="">未分组</el-option>
|
||||
<el-option :value="item" v-for="item in datasourceGroupList"></el-option>
|
||||
</el-select>
|
||||
@@ -63,17 +62,17 @@
|
||||
<el-dialog :visible.sync="dbSourceAuthDialogVisible" width="900px" :close-on-click-modal="false">
|
||||
<span slot="title">
|
||||
<span>权限编辑</span>
|
||||
<span style="margin-left: 10px;color: #999;font-size: 12px;"><i class="el-icon-info"></i> 添加删除或编辑之后记得点击保存哦~</span>
|
||||
<span style="margin-left: 10px;color: #999;font-size: 12px;"><i class="el-icon-info"></i> 添加、删除或编辑之后记得点击保存哦~</span>
|
||||
</span>
|
||||
<el-row>
|
||||
<el-select v-model="dbSourceAuthNewUser" filterable remote reserve-keyword
|
||||
placeholder="请输入名字、邮箱、账号搜索用户" :remote-method="getSearchUserList"
|
||||
:loading="dbSourceAuthUserLoading" style="width: 750px;">
|
||||
:loading="dbSourceAuthUserLoading" style="width: 750px;margin-right: 10px;">
|
||||
<el-option v-for="item in searchUserList" :key="item.id" :label="item.userName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-button v-on:click="addDbSourceAuthUser">添加</el-button>
|
||||
</el-row>
|
||||
<el-table :data="dbSourceAuthUserList" border style="width: 100%; margin: 10px 0;">
|
||||
<el-table :data="dbSourceAuthUserList" border style="width: 100%; margin: 10px 0;" size="mini">
|
||||
<el-table-column prop="userName" label="用户" width="150"></el-table-column>
|
||||
<el-table-column label="权限">
|
||||
<template slot-scope="scope">
|
||||
@@ -163,7 +162,7 @@
|
||||
},
|
||||
addDbSourceAuthUser() {
|
||||
if (this.dbSourceAuthNewUser.length <= 0) {
|
||||
this.$message.warn("请先选择用户");
|
||||
this.$message.warning("请先选择用户");
|
||||
return;
|
||||
}
|
||||
var userName = "";
|
||||
|
||||
@@ -11,10 +11,13 @@
|
||||
<el-button icon="el-icon-brush" size="small" @click="formatterSql">SQL美化</el-button>
|
||||
<el-button v-on:click="addFavorite('')" plain size="small" icon="el-icon-star-off">收藏</el-button>
|
||||
<el-button v-on:click="loadHistoryAndFavoriteList" plain size="small" icon="el-icon-tickets">收藏及历史</el-button>
|
||||
<div style="float: right;margin-top: -5px;">
|
||||
数据源:
|
||||
<el-select v-model="choiceDatasourceId" @change="datasourceChangeEvents" filterable placeholder="请选择数据源" style="width: 400px;">
|
||||
<el-option v-for="item in datasourceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<div style="float: right;">
|
||||
<el-select v-model="choiceDatasourceGroup" @change="sourceGroupChangeEvents" size="small" filterable placeholder="请先选择分组" style="width: 200px;">
|
||||
<el-option value="" label="全部分组"></el-option>
|
||||
<el-option v-for="item in datasourceGroupList" :key="item" :value="item"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="choiceDatasourceId" @change="datasourceChangeEvents" size="small" filterable placeholder="请选择数据源" style="width: 300px;margin-left: 10px;">
|
||||
<el-option v-for="item in datasourceOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,6 +101,10 @@
|
||||
return {
|
||||
datasourceList: [],
|
||||
choiceDatasourceId: "",
|
||||
datasourceOptions: [],
|
||||
datasourceGroupList: [],
|
||||
choiceDatasourceGroup: "",
|
||||
|
||||
databaseList: [],
|
||||
choiceDatabase: "",
|
||||
editorDbInfo: [],
|
||||
@@ -250,6 +257,10 @@
|
||||
loadDatasourceList() {
|
||||
datasourceApi.datasourceList({}).then(json => {
|
||||
this.datasourceList = json.data || [];
|
||||
this.datasourceOptions = this.datasourceList;
|
||||
let datasourceGroupList = [];
|
||||
this.datasourceList.filter(item => !!item.groupName).forEach(item => datasourceGroupList.push(item.groupName || ''));
|
||||
this.datasourceGroupList = Array.from(new Set(datasourceGroupList));
|
||||
if (this.datasourceList.length > 0) {
|
||||
this.choiceDatasourceId = this.datasourceList[0].id;
|
||||
this.loadEditorData();
|
||||
@@ -264,6 +275,16 @@
|
||||
this.editorColumnInfo = data.column || {};
|
||||
});
|
||||
},
|
||||
sourceGroupChangeEvents() {
|
||||
let datasourceOptions = [];
|
||||
for (let i = 0; i < this.datasourceList.length; i++) {
|
||||
let item = this.datasourceList[i];
|
||||
if (!this.choiceDatasourceGroup || this.choiceDatasourceGroup == item.groupName) {
|
||||
datasourceOptions.push(item);
|
||||
}
|
||||
}
|
||||
this.datasourceOptions = datasourceOptions;
|
||||
},
|
||||
datasourceChangeEvents() {
|
||||
this.loadEditorData();
|
||||
},
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<div class="my-info-vue">
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right" style="padding: 20px 10px;">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>我的信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div style="margin: 0 auto;max-width: 1000px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">我的信息</div>
|
||||
|
||||
Reference in New Issue
Block a user