mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-08-29 00:44:19 +00:00
修复issue反馈问题
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,5 +25,4 @@ target/
|
||||
/.nb-gradle/
|
||||
node_modules/
|
||||
dist/
|
||||
./logs/error_server.log
|
||||
./logs/dbswitch_server.log
|
||||
logs/
|
@@ -32,13 +32,13 @@ npm -v
|
||||
|
||||
### 2. Windows下安装Nodejs
|
||||
|
||||
可参考[博文教程](https://zhuanlan.zhihu.com/p/572795586)
|
||||
可参考[博文教程](https://blog.csdn.net/inrgihc/article/details/138013024)
|
||||
|
||||
## 二、构建
|
||||
|
||||
``` bash
|
||||
# install dependencies
|
||||
npm install
|
||||
npm install --force
|
||||
|
||||
# serve with hot reload at localhost:8080
|
||||
npm run dev
|
||||
|
966
dbswitch-admin-ui/package-lock.json
generated
966
dbswitch-admin-ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,8 @@
|
||||
unique-opened
|
||||
@open="handleOpen"
|
||||
@close="handleClose"
|
||||
background-color="#f7f7f7"
|
||||
text-color="#000000"
|
||||
background-color="#001529"
|
||||
text-color="rgb(191, 203, 217)"
|
||||
active-text-color="#ffffff"
|
||||
:collapse="collapsed"
|
||||
:default-active="initActivePath"
|
||||
|
@@ -9,153 +9,152 @@ Vue.use(Router);
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
const constantRouter = new Router({
|
||||
routes: [
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: '首页',
|
||||
component: () => import('@/views/layout'),
|
||||
redirect: '/dashboard',
|
||||
children: [
|
||||
{
|
||||
path: '/',
|
||||
name: '首页',
|
||||
component: () => import('@/views/layout'),
|
||||
redirect: '/dashboard',
|
||||
children: [
|
||||
{
|
||||
path: '/dashboard',
|
||||
name: '概览',
|
||||
icon: "el-icon-menu",
|
||||
component: () => import('@/views/dashboard/index')
|
||||
},
|
||||
{
|
||||
path: '/connection',
|
||||
name: '数据源管理',
|
||||
icon: "el-icon-s-order",
|
||||
component: () => import('@/views/connection/index'),
|
||||
children: [
|
||||
{
|
||||
path: '/connection/list',
|
||||
name: '数据源',
|
||||
icon: "el-icon-bank-card",
|
||||
component: () => import('@/views/connection/list')
|
||||
},
|
||||
{
|
||||
path: '/connection/driver',
|
||||
name: '驱动配置',
|
||||
icon: "el-icon-help",
|
||||
component: () => import('@/views/connection/driver'),
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/metadata',
|
||||
name: '数据库管理',
|
||||
icon: "el-icon-coin",
|
||||
component: () => import('@/views/metadata/index')
|
||||
},
|
||||
{
|
||||
path: '/task',
|
||||
name: '数据集成 MDI',
|
||||
icon: "el-icon-s-tools",
|
||||
component: () => import('@/views/task/index'),
|
||||
children: [
|
||||
{
|
||||
path: '/task/assignment',
|
||||
name: '任务管理',
|
||||
icon: "el-icon-eleme",
|
||||
component: () => import('@/views/task/assignment'),
|
||||
},
|
||||
{
|
||||
path: '/task/schedule',
|
||||
name: '监控调度',
|
||||
icon: "el-icon-pie-chart",
|
||||
component: () => import('@/views/task/schedule')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/log',
|
||||
name: '审计日志',
|
||||
icon: "el-icon-platform-eleme",
|
||||
//redirect: '/log/access',
|
||||
component: () => import('@/views/log/index'),
|
||||
children: [
|
||||
{
|
||||
path: '/log/access',
|
||||
name: '登录日志',
|
||||
icon: "el-icon-place",
|
||||
component: () => import('@/views/log/access')
|
||||
},
|
||||
{
|
||||
path: '/log/action',
|
||||
name: '操作日志',
|
||||
icon: "el-icon-s-check",
|
||||
component: () => import('@/views/log/action')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: '关于系统',
|
||||
icon: "el-icon-s-custom",
|
||||
component: () => import('@/views/about/me')
|
||||
},
|
||||
{
|
||||
path: '/user/personal',
|
||||
name: '个人中心',
|
||||
hidden: true,
|
||||
component: () => import('@/views/personal/index')
|
||||
},
|
||||
{
|
||||
path: '/task/create',
|
||||
name: '创建任务',
|
||||
hidden: true,
|
||||
component: () => import('@/views/task/create')
|
||||
},
|
||||
{
|
||||
path: '/task/update',
|
||||
name: '修改任务',
|
||||
hidden: true,
|
||||
component: () => import('@/views/task/update')
|
||||
},
|
||||
{
|
||||
path: '/task/detail',
|
||||
name: '查看任务',
|
||||
hidden: true,
|
||||
component: () => import('@/views/task/detail')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/addDataSource1',
|
||||
name: '接入数据源',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/addDataSource1.vue')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/addDataSource2',
|
||||
name: '接入数据源',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/addDataSource2.vue')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/dataSourceInfo',
|
||||
name: '数据源详情',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/dataSourceInfo.vue')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/updateDataSource',
|
||||
name: '编辑数据源',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/updateDataSource.vue')
|
||||
},
|
||||
],
|
||||
path: '/dashboard',
|
||||
name: '系统概览',
|
||||
icon: "el-icon-menu",
|
||||
component: () => import('@/views/dashboard/index')
|
||||
},
|
||||
|
||||
{
|
||||
path: '/login',
|
||||
name: '登录',
|
||||
component: () => import('@/views/login')
|
||||
}
|
||||
]
|
||||
path: '/connection',
|
||||
name: '连接管理',
|
||||
icon: "el-icon-s-order",
|
||||
component: () => import('@/views/connection/index'),
|
||||
children: [
|
||||
{
|
||||
path: '/connection/list',
|
||||
name: '数据源',
|
||||
icon: "el-icon-bank-card",
|
||||
component: () => import('@/views/connection/list')
|
||||
},
|
||||
{
|
||||
path: '/connection/driver',
|
||||
name: '驱动配置',
|
||||
icon: "el-icon-help",
|
||||
component: () => import('@/views/connection/driver'),
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/metadata',
|
||||
name: '数据导航',
|
||||
icon: "el-icon-coin",
|
||||
component: () => import('@/views/metadata/index')
|
||||
},
|
||||
{
|
||||
path: '/task',
|
||||
name: '数据接入',
|
||||
icon: "el-icon-s-tools",
|
||||
component: () => import('@/views/task/index'),
|
||||
children: [
|
||||
{
|
||||
path: '/task/assignment',
|
||||
name: '任务管理',
|
||||
icon: "el-icon-eleme",
|
||||
component: () => import('@/views/task/assignment'),
|
||||
},
|
||||
{
|
||||
path: '/task/schedule',
|
||||
name: '监控调度',
|
||||
icon: "el-icon-pie-chart",
|
||||
component: () => import('@/views/task/schedule')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/log',
|
||||
name: '审计日志',
|
||||
icon: "el-icon-platform-eleme",
|
||||
//redirect: '/log/access',
|
||||
component: () => import('@/views/log/index'),
|
||||
children: [
|
||||
{
|
||||
path: '/log/access',
|
||||
name: '登录日志',
|
||||
icon: "el-icon-place",
|
||||
component: () => import('@/views/log/access')
|
||||
},
|
||||
{
|
||||
path: '/log/action',
|
||||
name: '操作日志',
|
||||
icon: "el-icon-s-check",
|
||||
component: () => import('@/views/log/action')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: '关于系统',
|
||||
icon: "el-icon-s-custom",
|
||||
component: () => import('@/views/about/me')
|
||||
},
|
||||
{
|
||||
path: '/user/personal',
|
||||
name: '个人中心',
|
||||
hidden: true,
|
||||
component: () => import('@/views/personal/index')
|
||||
},
|
||||
{
|
||||
path: '/task/create',
|
||||
name: '创建任务',
|
||||
hidden: true,
|
||||
component: () => import('@/views/task/create')
|
||||
},
|
||||
{
|
||||
path: '/task/update',
|
||||
name: '修改任务',
|
||||
hidden: true,
|
||||
component: () => import('@/views/task/update')
|
||||
},
|
||||
{
|
||||
path: '/task/detail',
|
||||
name: '查看任务',
|
||||
hidden: true,
|
||||
component: () => import('@/views/task/detail')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/addDataSource1',
|
||||
name: '接入数据源',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/addDataSource1.vue')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/addDataSource2',
|
||||
name: '接入数据源',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/addDataSource2.vue')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/dataSourceInfo',
|
||||
name: '数据源详情',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/dataSourceInfo.vue')
|
||||
},
|
||||
{
|
||||
path: '/connection/list/updateDataSource',
|
||||
name: '编辑数据源',
|
||||
icon: "el-icon-menu",
|
||||
hidden: true,
|
||||
component: () => import('@/views/connection/updateDataSource.vue')
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: '登录',
|
||||
component: () => import('@/views/login')
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
export default constantRouter;
|
||||
|
@@ -1,56 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="134px"></el-aside>
|
||||
|
||||
<el-container>
|
||||
<el-header>
|
||||
<h3 style="font-family: 楷体" class=".h-title">请选择数据源类型</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item name="1">
|
||||
<template slot="title">
|
||||
<span class="sub-title">数据库</span>
|
||||
</template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="4" v-for="(o, index) of databaseType" :key="index" :offset="1">
|
||||
<div style="margin-top:20px;cursor: pointer">
|
||||
<el-card :body-style="{ padding: '0px'}" shadow="hover"
|
||||
@click.native="selectDbDriver(o)"
|
||||
:class="selectedIndex === index ? 'active':''">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title="" :src="require('@/assets/icons/' + o.name +'.png')" class="image">
|
||||
</div>
|
||||
<div style="display: inline-block;float: left;padding: 10px 0px 0px 10px">
|
||||
<span>{{ o.name }}</span><br>
|
||||
<span class="tag-mdi">MDI</span>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-header>
|
||||
<h3 class=".h-title">请选择数据源类型</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item name="1">
|
||||
<template slot="title">
|
||||
<span class="sub-title">数据库</span>
|
||||
</template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="4"
|
||||
v-for="(o, index) of databaseType"
|
||||
:key="index"
|
||||
:offset="1">
|
||||
<div style="margin-top:20px;cursor: pointer">
|
||||
<el-card class="card-item"
|
||||
:body-style="{ padding: '0px'}"
|
||||
shadow="hover"
|
||||
@click.native="selectDbDriver(o)"
|
||||
:class="selectedIndex === index ? 'active':''">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title=""
|
||||
:src="require('@/assets/icons/' + o.name +'.png')"
|
||||
class="image">
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row>
|
||||
<el-button type="primary" class="next" @click="next">下一步</el-button>
|
||||
<el-button class="cancel" @click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
<div style="display: inline-block;float: left;padding: 10px 0px 0px 10px">
|
||||
<span>{{ o.name }}</span><br>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row>
|
||||
<el-button type="primary"
|
||||
class="next"
|
||||
@click="next">下一步</el-button>
|
||||
<el-button class="cancel"
|
||||
@click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
activeNames: ['1'],
|
||||
currentDate: new Date(),
|
||||
@@ -67,29 +68,29 @@ export default {
|
||||
method: "GET",
|
||||
url: "/dbswitch/admin/api/v1/connection/types"
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
this.databaseType = res.data.data;
|
||||
} else {
|
||||
alert("加载任务列表失败:" + res.data.message);
|
||||
}
|
||||
},
|
||||
function () {
|
||||
console.log("failed");
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
this.databaseType = res.data.data;
|
||||
} else {
|
||||
alert("加载任务列表失败:" + res.data.message);
|
||||
}
|
||||
},
|
||||
function () {
|
||||
console.log("failed");
|
||||
}
|
||||
);
|
||||
},
|
||||
selectChangedDriverVersion: function (value) {
|
||||
this.connectionDriver = [];
|
||||
this.$http.get(
|
||||
"/dbswitch/admin/api/v1/connection/" + value + "/drivers"
|
||||
"/dbswitch/admin/api/v1/connection/" + value + "/drivers"
|
||||
).then(res => {
|
||||
if (0 === res.data.code) {
|
||||
this.connectionDriver = res.data.data;
|
||||
let varDatabaseType = this.databaseType.find(
|
||||
(item) => {
|
||||
return item.type === value;
|
||||
});
|
||||
(item) => {
|
||||
return item.type === value;
|
||||
});
|
||||
if (varDatabaseType) {
|
||||
this.createform.sample = varDatabaseType.sample;
|
||||
}
|
||||
@@ -109,7 +110,7 @@ export default {
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: "/connection/list/addDataSource2", query:
|
||||
this.selectedDataSource
|
||||
this.selectedDataSource
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -117,14 +118,26 @@ export default {
|
||||
this.$router.push("/connection/list");
|
||||
},
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.loadDatabaseTypes();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-header, .el-main, .el-footer {
|
||||
.el-card {
|
||||
border-radius: 4px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.el-header,
|
||||
.el-main,
|
||||
.el-footer {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@@ -136,7 +149,6 @@ export default {
|
||||
.sub-title {
|
||||
flex: 1 0 90%;
|
||||
order: 1;
|
||||
font-family: 楷体;
|
||||
font-weight: bolder;
|
||||
font-size: 18px;
|
||||
}
|
||||
@@ -174,7 +186,6 @@ export default {
|
||||
}
|
||||
|
||||
.image {
|
||||
//width: 100%;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
@@ -188,12 +199,12 @@ export default {
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #ffffff !important;
|
||||
border: 1px solid #409EFF;
|
||||
border: 1px solid #409eff;
|
||||
}
|
||||
|
||||
.tag-mdi {
|
||||
@@ -218,8 +229,7 @@ export default {
|
||||
padding: 6px 14px;
|
||||
border: none;
|
||||
color: white;
|
||||
background-color: #409EFF;
|
||||
background-color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
@@ -1,132 +1,163 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="134px"></el-aside>
|
||||
<el-card>
|
||||
<el-header style="height: 80px">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title="DB"
|
||||
:src="require('@/assets/icons/' + this.selectedDataSource.name +'.png')"
|
||||
class="image">
|
||||
</div>
|
||||
<h3 style="font-family: 楷体;margin-left: 60px"
|
||||
class=".h-title">{{ this.selectedDataSource.name }}</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
|
||||
<el-container>
|
||||
<el-header style="height: 80px">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title="DB" :src="require('@/assets/icons/' + this.selectedDataSource.name +'.png')" class="image">
|
||||
</div>
|
||||
<h3 style="font-family: 楷体;margin-left: 60px" class=".h-title">{{ this.selectedDataSource.name }}</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-form ref="createform"
|
||||
:rules="rules"
|
||||
:model="createform"
|
||||
label-width="120px"
|
||||
label-position="right"
|
||||
size="medium"
|
||||
status-icon>
|
||||
<div class="f1">
|
||||
|
||||
<el-form ref="createform" :rules="rules" :model="createform" label-width="120px" label-position="right"
|
||||
size="medium" status-icon>
|
||||
<div class="f1">
|
||||
<el-form-item label="支持版本">
|
||||
<span v-for="(o, index) of connectionDriver"
|
||||
:key="index"
|
||||
:offset="1">
|
||||
{{ o.driverVersion }}
|
||||
<span v-if="index !== connectionDriver.length-1">
|
||||
、
|
||||
</span>
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="支持版本">
|
||||
<span v-for="(o, index) of connectionDriver" :key="index" :offset="1">
|
||||
{{ o.driverVersion }}
|
||||
<span v-if="index !== connectionDriver.length-1">
|
||||
、
|
||||
</span>
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name"
|
||||
label="数据源名称"
|
||||
style="width:40%">
|
||||
<el-input v-model="createform.name"
|
||||
placeholder="请输入数据源名称"
|
||||
auto-complete="off"></el-input>
|
||||
<label class="tips-style">数据源名称不能包含 &、<、>、"、'、(、) ,长度为1~200字符</label>
|
||||
</el-form-item>
|
||||
<el-form-item :required=true
|
||||
label="数据库类型">
|
||||
<label>{{ this.selectedDataSource.name }}</label>
|
||||
</el-form-item>
|
||||
<el-form-item prop="version"
|
||||
label="驱动版本">
|
||||
<el-select v-model="createform.version"
|
||||
placeholder="请选择驱动版本">
|
||||
<el-option v-for="(item,index) in this.connectionDriver"
|
||||
:key="index"
|
||||
:label="item.driverVersion"
|
||||
:value="item.driverVersion"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码格式">-->
|
||||
<!-- <label>utf8、utf8mb4</label>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item prop="name" label="数据源名称" style="width:40%">
|
||||
<el-input v-model="createform.name" placeholder="请输入数据源名称" auto-complete="off"></el-input>
|
||||
<label class="tips-style">数据源名称不能包含 &、<、>、"、'、(、) ,长度为1~200字符</label>
|
||||
</el-form-item>
|
||||
<el-form-item :required=true label="数据库类型">
|
||||
<label v-model="createform.type">{{ this.selectedDataSource.name }}</label>
|
||||
</el-form-item>
|
||||
<el-form-item prop="version" label="驱动版本">
|
||||
<el-select v-model="createform.version" placeholder="请选择驱动版本">
|
||||
<el-option v-for="(item,index) in this.connectionDriver"
|
||||
:key="index"
|
||||
:label="item.driverVersion"
|
||||
:value="item.driverVersion"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码格式">-->
|
||||
<!-- <label>utf8、utf8mb4</label>-->
|
||||
<!-- </el-form-item>-->
|
||||
</div>
|
||||
<div class="f1">
|
||||
<el-form-item label="连接模式">
|
||||
<el-radio-group v-model="createform.mode">
|
||||
<el-radio :label=0>默认</el-radio>
|
||||
<el-radio :disabled="true"
|
||||
:label=1>专业</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
<div class="f1">
|
||||
<el-form-item label="连接模式">
|
||||
<el-radio-group v-model="createform.mode">
|
||||
<el-radio :label=0>默认</el-radio>
|
||||
<el-radio :disabled="true" :label=1>专业</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isShowUrlAndPort()"
|
||||
prop="address"
|
||||
label="连接地址">
|
||||
<el-input v-model="createform.address"
|
||||
auto-complete="off"
|
||||
@blur="changeUrl()"
|
||||
style="width:30%"
|
||||
placeholder="请输入地址"></el-input>
|
||||
:
|
||||
<el-input v-model="createform.port"
|
||||
auto-complete="off"
|
||||
@blur="changeUrl()"
|
||||
style="width:10%"
|
||||
placeholder="端口"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="isShowUrlAndPort()" prop="address" label="连接地址">
|
||||
<el-input v-model="createform.address" auto-complete="off" @blur="changeUrl()" style="width:20%"
|
||||
placeholder="请输入数据源连接地址"></el-input>
|
||||
/
|
||||
<el-input v-model="createform.port" auto-complete="off" @blur="changeUrl()" style="width:6%"
|
||||
placeholder="Port"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isShowDatabaseName()"
|
||||
prop="databaseName"
|
||||
label="数据库名"
|
||||
style="width:24%">
|
||||
<el-input v-model="createform.databaseName"
|
||||
auto-complete="off"
|
||||
@blur="changeUrl()"
|
||||
placeholder="请输入数据库名"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="isShowDatabaseName()" prop="databaseName" label="数据库名" style="width:24%">
|
||||
<el-input v-model="createform.databaseName" auto-complete="off" @blur="changeUrl()"
|
||||
placeholder="请输入数据库名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码格式"
|
||||
style="width:24%">
|
||||
<el-select v-model="createform.characterEncoding"
|
||||
placeholder="请选择编码格式">
|
||||
<el-option label="utf8"
|
||||
value="utf8"></el-option>
|
||||
<!-- <el-option label="utf8mb4" value="utf8mb4"></el-option>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="编码格式" style="width:24%">
|
||||
<el-select v-model="createform.characterEncoding" placeholder="请选择编码格式">
|
||||
<el-option label="utf8" value="utf8"></el-option>
|
||||
<!-- <el-option label="utf8mb4" value="utf8mb4"></el-option>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名"
|
||||
prop="username"
|
||||
style="width:24%">
|
||||
<el-input v-model="createform.username"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码"
|
||||
prop="password"
|
||||
style="width:24%">
|
||||
<el-input type="password"
|
||||
v-model="createform.password"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="用户名"
|
||||
prop="username"
|
||||
style="width:24%">
|
||||
<el-input v-model="createform.username"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码"
|
||||
prop="password"
|
||||
style="width:24%">
|
||||
<el-input type="password"
|
||||
v-model="createform.password"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="JDBC连接串"
|
||||
label-width="120px"
|
||||
prop="url"
|
||||
style="width:85%">
|
||||
<el-tooltip placement="top">
|
||||
<i class="el-icon-question">样例:</i>
|
||||
<div slot="content">
|
||||
{{ this.selectedDataSource.sample }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-input type="textarea"
|
||||
:rows="6"
|
||||
:spellcheck="false"
|
||||
placeholder="请输入"
|
||||
v-model="createform.url"
|
||||
auto-complete="off">
|
||||
</el-input>
|
||||
<label class="tips-style">JDBC连接串(因数据库连接方式,连接参数差异较大所以需要手动拼接好),以便测试连接。</label>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="JDBC连接串"
|
||||
label-width="120px"
|
||||
prop="url"
|
||||
style="width:85%">
|
||||
<el-tooltip placement="top">
|
||||
<i class="el-icon-question">样例:</i>
|
||||
<div slot="content">
|
||||
{{ this.selectedDataSource.sample }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-input type="textarea"
|
||||
:rows="6"
|
||||
:spellcheck="false"
|
||||
placeholder="请输入"
|
||||
v-model="createform.url"
|
||||
auto-complete="off">
|
||||
</el-input>
|
||||
<label
|
||||
class="tips-style">JDBC连接串(因数据库连接方式,连接参数差异较大所以需要手动拼接好),以便测试连接。</label>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</div>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row style="text-align: center">
|
||||
<el-button type="success" class="startTest" @click="startTest">开始检测</el-button>
|
||||
<el-button type="primary" class="createDataSource" @click="createDataSource">创建</el-button>
|
||||
<el-button class="cancel" @click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row style="text-align: center">
|
||||
<el-button type="success"
|
||||
class="startTest"
|
||||
@click="startTest">开始检测</el-button>
|
||||
<el-button type="primary"
|
||||
class="createDataSource"
|
||||
@click="createDataSource">创建</el-button>
|
||||
<el-button class="cancel"
|
||||
@click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
selectedDataSource: {},
|
||||
connectionDriver: [],
|
||||
@@ -219,14 +250,14 @@ export default {
|
||||
selectChangedDriverVersion: function (value) {
|
||||
this.connectionDriver = [];
|
||||
this.$http.get(
|
||||
"/dbswitch/admin/api/v1/connection/" + value + "/drivers"
|
||||
"/dbswitch/admin/api/v1/connection/" + value + "/drivers"
|
||||
).then(res => {
|
||||
if (0 === res.data.code) {
|
||||
this.connectionDriver = res.data.data;
|
||||
let varDatabaseType = this.databaseType.find(
|
||||
(item) => {
|
||||
return item.type === value;
|
||||
});
|
||||
(item) => {
|
||||
return item.type === value;
|
||||
});
|
||||
if (varDatabaseType) {
|
||||
this.createform.sample = varDatabaseType.sample;
|
||||
}
|
||||
@@ -240,35 +271,35 @@ export default {
|
||||
var params = this.createform.url.split("?");
|
||||
var turl = this.createform.templateUrl
|
||||
var flag = false
|
||||
if (Object.keys(this.createform.address).length > 0){
|
||||
if (Object.keys(this.createform.address).length > 0) {
|
||||
// address
|
||||
var address = this.createform.address
|
||||
turl = turl.replaceAll("{host}",address)
|
||||
turl = turl.replaceAll("{host}", address)
|
||||
flag = true
|
||||
}
|
||||
if (Object.keys(this.createform.port).length > 0){
|
||||
if (Object.keys(this.createform.port).length > 0) {
|
||||
// port
|
||||
var port = this.createform.port
|
||||
turl = turl.replaceAll("{port}",port)
|
||||
turl = turl.replaceAll("{port}", port)
|
||||
flag = true
|
||||
}
|
||||
if (Object.keys(this.createform.databaseName).length > 0){
|
||||
if (Object.keys(this.createform.databaseName).length > 0) {
|
||||
// databaseName or filePath
|
||||
var databaseName = this.createform.databaseName
|
||||
turl = turl.replaceAll("{database}",databaseName)
|
||||
turl = turl.replaceAll("{file}",databaseName)
|
||||
turl = turl.replaceAll("{database}", databaseName)
|
||||
turl = turl.replaceAll("{file}", databaseName)
|
||||
flag = true
|
||||
}
|
||||
if (flag){
|
||||
if (Object.keys(params).length > 1){
|
||||
if (flag) {
|
||||
if (Object.keys(params).length > 1) {
|
||||
this.createform.url = turl + "?" + params[1]
|
||||
}else{
|
||||
} else {
|
||||
this.createform.url = turl
|
||||
}
|
||||
} else{
|
||||
if (Object.keys(params).length > 1){
|
||||
} else {
|
||||
if (Object.keys(params).length > 1) {
|
||||
this.createform.url = this.selectedDataSource.sample.split("?")[0] + "?" + params[1]
|
||||
}else{
|
||||
} else {
|
||||
this.createform.url = this.selectedDataSource.sample
|
||||
}
|
||||
}
|
||||
@@ -276,7 +307,7 @@ export default {
|
||||
isShowDatabaseName: function () {
|
||||
var type = this.selectedDataSource.type
|
||||
var flag = true;
|
||||
if (type === "ELASTICSEARCH"){
|
||||
if (type === "ELASTICSEARCH") {
|
||||
flag = false
|
||||
}
|
||||
return flag;
|
||||
@@ -284,7 +315,7 @@ export default {
|
||||
isShowUrlAndPort: function () {
|
||||
var type = this.selectedDataSource.type
|
||||
var flag = true;
|
||||
if (type === "SQLITE3"){
|
||||
if (type === "SQLITE3") {
|
||||
flag = false
|
||||
}
|
||||
return flag;
|
||||
@@ -349,11 +380,11 @@ export default {
|
||||
type: this.selectedDataSource.type,
|
||||
version: this.createform.version,
|
||||
driver: driverClass,
|
||||
mode:0,
|
||||
address:this.createform.address,
|
||||
port:this.createform.port,
|
||||
databaseName:this.createform.databaseName,
|
||||
characterEncoding:this.createform.characterEncoding,
|
||||
mode: 0,
|
||||
address: this.createform.address,
|
||||
port: this.createform.port,
|
||||
databaseName: this.createform.databaseName,
|
||||
characterEncoding: this.createform.characterEncoding,
|
||||
url: this.createform.url,
|
||||
username: this.createform.username,
|
||||
password: this.createform.password
|
||||
@@ -378,17 +409,24 @@ export default {
|
||||
this.$router.push("/connection/list")
|
||||
},
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.selectedDataSource = this.$route.query;
|
||||
this.createform.url = this.selectedDataSource.sample;
|
||||
this.createform.templateUrl = this.selectedDataSource.url.replace("[\\?{params}]","");
|
||||
this.createform.templateUrl = this.selectedDataSource.url.replace("[\\?{params}]", "");
|
||||
this.selectChangedDriverVersion(this.selectedDataSource.type);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-header, .el-main, .el-footer {
|
||||
.el-card {
|
||||
border-radius: 4px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.el-header,
|
||||
.el-main,
|
||||
.el-footer {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@@ -398,7 +436,6 @@ export default {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.button {
|
||||
padding: 0;
|
||||
float: right;
|
||||
@@ -427,7 +464,7 @@ export default {
|
||||
padding: 6px 14px;
|
||||
border: none;
|
||||
color: white;
|
||||
background-color: #409EFF;
|
||||
background-color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -441,7 +478,7 @@ export default {
|
||||
//border: 1px solid red;
|
||||
margin: 14px 0px;
|
||||
background-color: #eef0f4;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
@@ -449,5 +486,4 @@ export default {
|
||||
font-size: 10px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
</style>
|
@@ -1,115 +1,142 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="134px"></el-aside>
|
||||
<el-card>
|
||||
<el-header style="height: 80px">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title="DB"
|
||||
:src="require('@/assets/icons/' + this.dataSourceInfo.typeName +'.png')"
|
||||
class="image">
|
||||
</div>
|
||||
<h3 class=".h-title">{{ this.dataSourceInfo.typeName }}</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
|
||||
<el-form :model="dataSourceInfo"
|
||||
label-width="120px"
|
||||
label-position="right"
|
||||
size="medium"
|
||||
status-icon>
|
||||
<div class="f1">
|
||||
|
||||
<el-form-item label="支持版本">
|
||||
<span>
|
||||
{{ this.dataSourceInfo.version }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="name"
|
||||
label="数据源名称"
|
||||
style="width:40%">
|
||||
<el-input :readonly=true
|
||||
v-model="dataSourceInfo.name"
|
||||
placeholder="请输入数据源名称"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :required=true
|
||||
label="数据库类型">
|
||||
<label>{{ this.dataSourceInfo.typeName }}</label>
|
||||
</el-form-item>
|
||||
<el-form-item prop="version"
|
||||
label="驱动版本"
|
||||
style="width:40%">
|
||||
<el-input v-model="dataSourceInfo.version"
|
||||
placeholder="请选择驱动版本"
|
||||
auto-complete="off"
|
||||
:readonly=true></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="编码格式">
|
||||
<label>{{dataSourceInfo.characterEncoding}}</label>
|
||||
</el-form-item>
|
||||
|
||||
<el-container>
|
||||
<el-header style="height: 80px">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title="DB" :src="require('@/assets/icons/' + this.dataSourceInfo.typeName +'.png')" class="image">
|
||||
</div>
|
||||
<h3 style="font-family: 楷体;margin-left: 60px" class=".h-title">{{ this.dataSourceInfo.typeName }}</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<div class="f1">
|
||||
<el-form-item label="连接模式">
|
||||
<el-radio-group v-model="dataSourceInfo.mode">
|
||||
<el-radio :label=0>默认</el-radio>
|
||||
<el-radio :disabled="true"
|
||||
:label=1>专业</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form :model="dataSourceInfo" label-width="120px" label-position="right"
|
||||
size="medium" status-icon>
|
||||
<div class="f1">
|
||||
<el-form-item prop="address"
|
||||
label="连接地址">
|
||||
<el-input :readonly=true
|
||||
v-model="dataSourceInfo.address"
|
||||
auto-complete="off"
|
||||
style="width:30%"
|
||||
placeholder="请输入数据源连接地址"></el-input>
|
||||
:
|
||||
<el-input :readonly=true
|
||||
v-model="dataSourceInfo.port"
|
||||
auto-complete="off"
|
||||
style="width:10%"
|
||||
placeholder="请输入端口"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="支持版本">
|
||||
<span>
|
||||
{{ this.dataSourceInfo.version }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="databaseName"
|
||||
label="数据库名"
|
||||
style="width:24%">
|
||||
<el-input :readonly=true
|
||||
v-model="dataSourceInfo.databaseName"
|
||||
auto-complete="off"
|
||||
placeholder="请输入数据库名"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="name" label="数据源名称" style="width:40%">
|
||||
<el-input :readonly=true v-model="dataSourceInfo.name" placeholder="请输入数据源名称" auto-complete="off"></el-input>
|
||||
<label class="tips-style">数据源名称不能包含 &、<、>、"、'、(、) ,长度为1~200字符</label>
|
||||
</el-form-item>
|
||||
<el-form-item :required=true label="数据库类型">
|
||||
<label v-model="dataSourceInfo.typeName">{{ this.dataSourceInfo.typeName }}</label>
|
||||
</el-form-item>
|
||||
<el-form-item prop="version" label="驱动版本" style="width:40%">
|
||||
<el-input v-model="dataSourceInfo.version" placeholder="请选择驱动版本" auto-complete="off" :readonly=true></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码格式"
|
||||
style="width:24%">
|
||||
<el-input :readonly=true
|
||||
v-model="dataSourceInfo.characterEncoding"
|
||||
auto-complete="off"
|
||||
placeholder="请选择编码格式"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="编码格式">
|
||||
<label>{{dataSourceInfo.characterEncoding}}</label>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名"
|
||||
prop="username"
|
||||
style="width:24%">
|
||||
<el-input :readonly=true
|
||||
v-model="dataSourceInfo.username"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码"
|
||||
prop="password"
|
||||
style="width:24%">
|
||||
<el-input :readonly=true
|
||||
type="password"
|
||||
v-model="dataSourceInfo.password"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
<div class="f1">
|
||||
<el-form-item label="连接模式">
|
||||
<el-radio-group v-model="dataSourceInfo.mode">
|
||||
<el-radio :label=0>默认</el-radio>
|
||||
<el-radio :disabled="true" :label=1>专业</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="JDBC连接串"
|
||||
label-width="120px"
|
||||
prop="url"
|
||||
style="width:85%">
|
||||
<el-input :readonly=true
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
:spellcheck="false"
|
||||
placeholder="请输入"
|
||||
v-model="dataSourceInfo.url"
|
||||
auto-complete="off">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="address" label="连接地址">
|
||||
<el-input :readonly=true v-model="dataSourceInfo.address" auto-complete="off" style="width:20%"
|
||||
placeholder="请输入数据源连接地址"></el-input>
|
||||
/
|
||||
<el-input :readonly=true v-model="dataSourceInfo.port" auto-complete="off" style="width:6%"
|
||||
placeholder="Port"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="databaseName" label="数据库名" style="width:24%">
|
||||
<el-input :readonly=true v-model="dataSourceInfo.databaseName" auto-complete="off"
|
||||
placeholder="请输入数据库名"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="编码格式" style="width:24%">
|
||||
<el-input :readonly=true v-model="dataSourceInfo.characterEncoding" auto-complete="off"
|
||||
placeholder="请选择编码格式"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="用户名"
|
||||
prop="username"
|
||||
style="width:24%">
|
||||
<el-input :readonly=true v-model="dataSourceInfo.username"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码"
|
||||
prop="password"
|
||||
style="width:24%">
|
||||
<el-input :readonly=true type="password"
|
||||
v-model="dataSourceInfo.password"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="JDBC连接串"
|
||||
label-width="120px"
|
||||
prop="url"
|
||||
style="width:85%">
|
||||
<el-input :readonly=true type="textarea"
|
||||
:rows="6"
|
||||
:spellcheck="false"
|
||||
placeholder="请输入"
|
||||
v-model="dataSourceInfo.url"
|
||||
auto-complete="off">
|
||||
</el-input>
|
||||
<label
|
||||
class="tips-style">JDBC连接串(因数据库连接方式,连接参数差异较大所以需要手动拼接好),以便测试连接。</label>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</div>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row style="text-align: center">
|
||||
<el-button class="cancel" @click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row style="text-align: center">
|
||||
<el-button class="cancel"
|
||||
@click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
activeNames: ['1'],
|
||||
currentDate: new Date(),
|
||||
@@ -121,11 +148,11 @@ export default {
|
||||
typeName: "",
|
||||
version: "",
|
||||
driver: "",
|
||||
mode:0,
|
||||
address:"",
|
||||
port:"",
|
||||
databaseName:"",
|
||||
characterEncoding:"",
|
||||
mode: 0,
|
||||
address: "",
|
||||
port: "",
|
||||
databaseName: "",
|
||||
characterEncoding: "",
|
||||
url: "",
|
||||
username: "",
|
||||
password: ""
|
||||
@@ -138,7 +165,7 @@ export default {
|
||||
this.$router.push("/connection/list");
|
||||
},
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.dataSourceInfo = this.$route.query;
|
||||
this.dataSourceInfo.mode = parseInt(this.dataSourceInfo.mode)
|
||||
}
|
||||
@@ -146,7 +173,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-header, .el-main, .el-footer {
|
||||
.el-card {
|
||||
border-radius: 4px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.el-header,
|
||||
.el-main,
|
||||
.el-footer {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@@ -156,14 +190,12 @@ export default {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.button {
|
||||
padding: 0;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.image {
|
||||
//width: 100%;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
@@ -171,8 +203,6 @@ export default {
|
||||
}
|
||||
|
||||
.cancel {
|
||||
//float: right;
|
||||
//margin-left: 20px;
|
||||
padding: 6px 14px;
|
||||
border: 1px solid #dcdcdd;
|
||||
cursor: pointer;
|
||||
@@ -185,7 +215,7 @@ export default {
|
||||
padding: 6px 14px;
|
||||
border: none;
|
||||
color: white;
|
||||
background-color: #409EFF;
|
||||
background-color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -196,10 +226,9 @@ export default {
|
||||
}
|
||||
|
||||
.f1 {
|
||||
//border: 1px solid red;
|
||||
margin: 14px 0px;
|
||||
background-color: #eef0f4;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
@@ -207,5 +236,4 @@ export default {
|
||||
font-size: 10px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
</style>
|
@@ -1,132 +1,164 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="134px"></el-aside>
|
||||
<el-card>
|
||||
<el-header style="height: 80px">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title="DB"
|
||||
:src="require('@/assets/icons/' + this.updateform.typeName +'.png')"
|
||||
class="image">
|
||||
</div>
|
||||
<h3 class=".h-title">{{ this.updateform.typeName }}</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
|
||||
<el-form ref="updateform"
|
||||
:rules="rules"
|
||||
:model="updateform"
|
||||
label-width="120px"
|
||||
label-position="right"
|
||||
size="medium"
|
||||
status-icon>
|
||||
<div class="f1">
|
||||
|
||||
<el-form-item label="支持版本">
|
||||
<span v-for="(o, index) of connectionDriver"
|
||||
:key="index"
|
||||
:offset="1">
|
||||
{{ o.driverVersion }}
|
||||
<span v-if="index !== connectionDriver.length-1">
|
||||
、
|
||||
</span>
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="name"
|
||||
label="数据源名称"
|
||||
style="width:40%">
|
||||
<el-input v-model="updateform.name"
|
||||
placeholder="请输入数据源名称"
|
||||
auto-complete="off"></el-input>
|
||||
<label class="tips-style">数据源名称不能包含 &、<、>、"、'、(、) ,长度为1~200字符</label>
|
||||
</el-form-item>
|
||||
<el-form-item :required=true
|
||||
label="数据库类型">
|
||||
<label>{{ this.selectedDataSource.name }}</label>
|
||||
</el-form-item>
|
||||
<el-form-item prop="version"
|
||||
label="驱动版本">
|
||||
<el-select v-model="updateform.version"
|
||||
placeholder="请选择驱动版本">
|
||||
<el-option v-for="(item,index) in this.connectionDriver"
|
||||
:key="index"
|
||||
:label="item.driverVersion"
|
||||
:value="item.driverVersion"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码格式">-->
|
||||
<!-- <label>utf8、utf8mb4</label>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-container>
|
||||
<el-header style="height: 80px">
|
||||
<div style="display: inline-block;float: left">
|
||||
<img title="DB" :src="require('@/assets/icons/' + this.updateform.typeName +'.png')" class="image">
|
||||
</div>
|
||||
<h3 style="font-family: 楷体;margin-left: 60px" class=".h-title">{{ this.updateform.typeName }}</h3>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<div class="f1">
|
||||
<el-form-item label="连接模式">
|
||||
<el-radio-group v-model="updateform.mode">
|
||||
<el-radio :label=0>默认</el-radio>
|
||||
<el-radio :disabled="true"
|
||||
:label=1>专业</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form ref="updateform" :rules="rules" :model="updateform" label-width="120px" label-position="right"
|
||||
size="medium" status-icon>
|
||||
<div class="f1">
|
||||
<el-form-item v-if="isShowUrlAndPort()"
|
||||
prop="address"
|
||||
label="连接地址">
|
||||
<el-input v-model="updateform.address"
|
||||
auto-complete="off"
|
||||
@blur="changeUrl()"
|
||||
style="width:30%"
|
||||
placeholder="请输入数据源连接地址"></el-input>
|
||||
:
|
||||
<el-input v-model="updateform.port"
|
||||
auto-complete="off"
|
||||
@blur="changeUrl()"
|
||||
style="width:10%"
|
||||
placeholder="请输入端口"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="支持版本">
|
||||
<span v-for="(o, index) of connectionDriver" :key="index" :offset="1">
|
||||
{{ o.driverVersion }}
|
||||
<span v-if="index !== connectionDriver.length-1">
|
||||
、
|
||||
</span>
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isShowDatabaseName()"
|
||||
prop="databaseName"
|
||||
label="数据库名"
|
||||
style="width:24%">
|
||||
<el-input v-model="updateform.databaseName"
|
||||
auto-complete="off"
|
||||
@blur="changeUrl()"
|
||||
placeholder="请输入数据库名"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="name" label="数据源名称" style="width:40%">
|
||||
<el-input v-model="updateform.name" placeholder="请输入数据源名称" auto-complete="off"></el-input>
|
||||
<label class="tips-style">数据源名称不能包含 &、<、>、"、'、(、) ,长度为1~200字符</label>
|
||||
</el-form-item>
|
||||
<el-form-item :required=true label="数据库类型">
|
||||
<label v-model="updateform.type">{{ this.selectedDataSource.name }}</label>
|
||||
</el-form-item>
|
||||
<el-form-item prop="version" label="驱动版本">
|
||||
<el-select v-model="updateform.version" placeholder="请选择驱动版本">
|
||||
<el-option v-for="(item,index) in this.connectionDriver"
|
||||
:key="index"
|
||||
:label="item.driverVersion"
|
||||
:value="item.driverVersion"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码格式">-->
|
||||
<!-- <label>utf8、utf8mb4</label>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="编码格式"
|
||||
style="width:24%">
|
||||
<el-select v-model="updateform.characterEncoding"
|
||||
placeholder="请选择编码格式">
|
||||
<el-option label="utf8"
|
||||
value="utf8"></el-option>
|
||||
<!-- <el-option label="utf8mb4" value="utf8mb4"></el-option>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
<div class="f1">
|
||||
<el-form-item label="连接模式">
|
||||
<el-radio-group v-model="updateform.mode">
|
||||
<el-radio :label=0>默认</el-radio>
|
||||
<el-radio :disabled="true" :label=1>专业</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名"
|
||||
prop="username"
|
||||
style="width:24%">
|
||||
<el-input v-model="updateform.username"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码"
|
||||
prop="password"
|
||||
style="width:24%">
|
||||
<el-input type="password"
|
||||
v-model="updateform.password"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="isShowUrlAndPort()" prop="address" label="连接地址">
|
||||
<el-input v-model="updateform.address" auto-complete="off" @blur="changeUrl()" style="width:20%"
|
||||
placeholder="请输入数据源连接地址"></el-input>
|
||||
/
|
||||
<el-input v-model="updateform.port" auto-complete="off" @blur="changeUrl()" style="width:6%"
|
||||
placeholder="Port"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="JDBC连接串"
|
||||
label-width="120px"
|
||||
prop="url"
|
||||
style="width:85%">
|
||||
<el-tooltip placement="top">
|
||||
<i class="el-icon-question">样例:</i>
|
||||
<div slot="content">
|
||||
{{ this.selectedDataSource.sample }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-input type="textarea"
|
||||
:rows="6"
|
||||
:spellcheck="false"
|
||||
placeholder="请输入"
|
||||
v-model="updateform.url"
|
||||
auto-complete="off">
|
||||
</el-input>
|
||||
<label class="tips-style">JDBC连接串(因数据库连接方式,连接参数差异较大所以需要手动拼接好),以便测试连接。</label>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="isShowDatabaseName()" prop="databaseName" label="数据库名" style="width:24%">
|
||||
<el-input v-model="updateform.databaseName" auto-complete="off" @blur="changeUrl()"
|
||||
placeholder="请输入数据库名"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="编码格式" style="width:24%">
|
||||
<el-select v-model="updateform.characterEncoding" placeholder="请选择编码格式">
|
||||
<el-option label="utf8" value="utf8"></el-option>
|
||||
<!-- <el-option label="utf8mb4" value="utf8mb4"></el-option>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="用户名"
|
||||
prop="username"
|
||||
style="width:24%">
|
||||
<el-input v-model="updateform.username"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码"
|
||||
prop="password"
|
||||
style="width:24%">
|
||||
<el-input type="password"
|
||||
v-model="updateform.password"
|
||||
auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="JDBC连接串"
|
||||
label-width="120px"
|
||||
prop="url"
|
||||
style="width:85%">
|
||||
<el-tooltip placement="top">
|
||||
<i class="el-icon-question">样例:</i>
|
||||
<div slot="content">
|
||||
{{ this.selectedDataSource.sample }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-input type="textarea"
|
||||
:rows="6"
|
||||
:spellcheck="false"
|
||||
placeholder="请输入"
|
||||
v-model="updateform.url"
|
||||
auto-complete="off">
|
||||
</el-input>
|
||||
<label
|
||||
class="tips-style">JDBC连接串(因数据库连接方式,连接参数差异较大所以需要手动拼接好),以便测试连接。</label>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</div>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row style="text-align: center">
|
||||
<el-button type="success" class="startTest" @click="startTest">开始检测</el-button>
|
||||
<el-button type="primary" class="createDataSource" @click="updateDataSource">修改</el-button>
|
||||
<el-button class="cancel" @click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-row style="text-align: center">
|
||||
<el-button type="success"
|
||||
class="startTest"
|
||||
@click="startTest">开始检测</el-button>
|
||||
<el-button type="primary"
|
||||
class="createDataSource"
|
||||
@click="updateDataSource">修改</el-button>
|
||||
<el-button class="cancel"
|
||||
@click="cancel">取消</el-button>
|
||||
</el-row>
|
||||
</el-footer>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
selectedDataSource: {},
|
||||
connectionDriver: [],
|
||||
@@ -224,29 +256,29 @@ export default {
|
||||
method: "GET",
|
||||
url: "/dbswitch/admin/api/v1/connection/types"
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
this.databaseType = res.data.data;
|
||||
} else {
|
||||
alert("加载任务列表失败:" + res.data.message);
|
||||
}
|
||||
},
|
||||
function () {
|
||||
console.log("failed");
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
this.databaseType = res.data.data;
|
||||
} else {
|
||||
alert("加载任务列表失败:" + res.data.message);
|
||||
}
|
||||
},
|
||||
function () {
|
||||
console.log("failed");
|
||||
}
|
||||
);
|
||||
},
|
||||
selectChangedDriverVersion: function (value) {
|
||||
this.connectionDriver = [];
|
||||
this.$http.get(
|
||||
"/dbswitch/admin/api/v1/connection/" + value + "/drivers"
|
||||
"/dbswitch/admin/api/v1/connection/" + value + "/drivers"
|
||||
).then(res => {
|
||||
if (0 === res.data.code) {
|
||||
this.connectionDriver = res.data.data;
|
||||
let varDatabaseType = this.databaseType.find(
|
||||
(item) => {
|
||||
return item.type === value;
|
||||
});
|
||||
(item) => {
|
||||
return item.type === value;
|
||||
});
|
||||
if (varDatabaseType) {
|
||||
this.updateform.sample = varDatabaseType.sample;
|
||||
}
|
||||
@@ -260,36 +292,36 @@ export default {
|
||||
var params = this.updateform.url.split("?");
|
||||
var turl = this.updateform.templateUrl
|
||||
var flag = false
|
||||
if (Object.keys(this.updateform.address).length > 0){
|
||||
if (Object.keys(this.updateform.address).length > 0) {
|
||||
// address
|
||||
var address = this.updateform.address
|
||||
turl = turl.replaceAll("{host}",address)
|
||||
turl = turl.replaceAll("{host}", address)
|
||||
flag = true
|
||||
}
|
||||
if (Object.keys(this.updateform.port).length > 0){
|
||||
if (Object.keys(this.updateform.port).length > 0) {
|
||||
// port
|
||||
var port = this.updateform.port
|
||||
turl = turl.replaceAll("{port}",port)
|
||||
turl = turl.replaceAll("{port}", port)
|
||||
flag = true
|
||||
}
|
||||
if (Object.keys(this.updateform.databaseName).length > 0){
|
||||
if (Object.keys(this.updateform.databaseName).length > 0) {
|
||||
// databaseName or filePath
|
||||
var databaseName = this.updateform.databaseName
|
||||
turl = turl.replaceAll("{database}",databaseName)
|
||||
turl = turl.replaceAll("{file}",databaseName)
|
||||
turl = turl.replaceAll("{database}", databaseName)
|
||||
turl = turl.replaceAll("{file}", databaseName)
|
||||
flag = true
|
||||
}
|
||||
if (flag){
|
||||
if (Object.keys(params).length > 1){
|
||||
if (flag) {
|
||||
if (Object.keys(params).length > 1) {
|
||||
this.updateform.url = turl + "?" + params[1]
|
||||
}else{
|
||||
} else {
|
||||
this.updateform.url = turl
|
||||
}
|
||||
} else{
|
||||
} else {
|
||||
debugger
|
||||
if (Object.keys(params).length > 1){
|
||||
if (Object.keys(params).length > 1) {
|
||||
this.updateform.url = this.updateform.sample.split("?")[0] + "?" + params[1]
|
||||
}else{
|
||||
} else {
|
||||
this.updateform.url = this.updateform.sample
|
||||
}
|
||||
}
|
||||
@@ -297,7 +329,7 @@ export default {
|
||||
isShowDatabaseName: function () {
|
||||
var type = this.updateform.type
|
||||
var flag = true;
|
||||
if (type === "ELASTICSEARCH"){
|
||||
if (type === "ELASTICSEARCH") {
|
||||
flag = false
|
||||
}
|
||||
return flag;
|
||||
@@ -305,7 +337,7 @@ export default {
|
||||
isShowUrlAndPort: function () {
|
||||
var type = this.updateform.type
|
||||
var flag = true;
|
||||
if (type === "SQLITE3"){
|
||||
if (type === "SQLITE3") {
|
||||
flag = false
|
||||
}
|
||||
return flag;
|
||||
@@ -402,7 +434,7 @@ export default {
|
||||
this.$router.push("/connection/list")
|
||||
},
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.updateform = this.$route.query;
|
||||
this.updateform.mode = parseInt(this.updateform.mode)
|
||||
this.loadDatabaseTypes();
|
||||
@@ -412,7 +444,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-header, .el-main, .el-footer {
|
||||
.el-card {
|
||||
border-radius: 4px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.el-header,
|
||||
.el-main,
|
||||
.el-footer {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@@ -422,14 +461,12 @@ export default {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.button {
|
||||
padding: 0;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.image {
|
||||
//width: 100%;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
@@ -437,8 +474,6 @@ export default {
|
||||
}
|
||||
|
||||
.cancel {
|
||||
//float: right;
|
||||
//margin-left: 20px;
|
||||
padding: 6px 14px;
|
||||
border: 1px solid #dcdcdd;
|
||||
cursor: pointer;
|
||||
@@ -446,26 +481,22 @@ export default {
|
||||
}
|
||||
|
||||
.createDataSource {
|
||||
//float: right;
|
||||
//margin-left: 20px;
|
||||
padding: 6px 14px;
|
||||
border: none;
|
||||
color: white;
|
||||
background-color: #409EFF;
|
||||
background-color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.startTest {
|
||||
//float: right;
|
||||
padding: 6px 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.f1 {
|
||||
//border: 1px solid red;
|
||||
margin: 14px 0px;
|
||||
background-color: #eef0f4;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
@@ -473,5 +504,4 @@ export default {
|
||||
font-size: 10px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
</style>
|
@@ -74,16 +74,16 @@ export default {
|
||||
|
||||
.el-aside {
|
||||
float: left;
|
||||
background: #fdfdfd;
|
||||
background: #002140;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.el-aside .title {
|
||||
height: 60px;
|
||||
background: #454c5a;
|
||||
background: #001529;
|
||||
line-height: 64px;
|
||||
background: #454c5a;
|
||||
background: #002140;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
@@ -4,13 +4,23 @@
|
||||
<div class="flex-between">
|
||||
<div class="tree-container">
|
||||
<el-scrollbar style="height:100%">
|
||||
<el-tree class="scroller"
|
||||
<el-select placeholder="请选择数据源"
|
||||
v-model="dataSourceId"
|
||||
@change="loadTreeData">
|
||||
<el-option v-for="(item,index) in connectionList"
|
||||
:key="index"
|
||||
:label="`[${item.id}]${item.name}`"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-tree ref="metadataTree"
|
||||
empty-text="请选择数据源后查看"
|
||||
:indent=6
|
||||
:data="treeData"
|
||||
:props="props"
|
||||
:load="loadNode"
|
||||
:load="loadTreeNode"
|
||||
:expand-on-click-node="true"
|
||||
:highlight-current="true"
|
||||
:render-content="renderContent"
|
||||
@check-change="handleCheckChange"
|
||||
@node-click="handleNodeClick"
|
||||
lazy>
|
||||
</el-tree>
|
||||
@@ -163,6 +173,9 @@ export default {
|
||||
disabled: false,
|
||||
isLeaf: false
|
||||
},
|
||||
dataSourceId: null,
|
||||
connectionList: [],
|
||||
treeData: [],
|
||||
currentNode: {
|
||||
tableName: '-',
|
||||
schemaName: '-'
|
||||
@@ -182,6 +195,159 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
loadConnections: function () {
|
||||
this.connectionList = [];
|
||||
this.$http({
|
||||
method: "GET",
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
url: "/dbswitch/admin/api/v1/connection/list/name",
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
this.connectionList = res.data.data;
|
||||
} else {
|
||||
if (res.data.message) {
|
||||
alert("加载数据失败:" + res.data.message);
|
||||
this.connectionList = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
loadTreeData: function () {
|
||||
if (this.dataSourceId && this.dataSourceId > 0) {
|
||||
this.treeData = []
|
||||
setTimeout(() => {
|
||||
this.$http({
|
||||
method: "GET",
|
||||
url: "/dbswitch/admin/api/v1/connection/schemas/get/" + this.dataSourceId
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
for (let element of res.data.data) {
|
||||
let obj = new Object();
|
||||
obj['dataSourceId'] = this.dataSourceId;
|
||||
obj['label'] = element;
|
||||
obj['parent'] = this.dataSourceId;
|
||||
obj['value'] = element;
|
||||
obj['hasChild'] = true;
|
||||
obj['type'] = 'DATABASE';
|
||||
this.treeData.push(obj);
|
||||
}
|
||||
} else {
|
||||
alert("加载失败,原因:" + res.data.message);
|
||||
}
|
||||
}
|
||||
);
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
loadTreeNode: function (node, resolve) {
|
||||
setTimeout(() => {
|
||||
if (node.level === 1) {
|
||||
let tableView = [
|
||||
{
|
||||
'dataSourceId': this.dataSourceId,
|
||||
'label': '表',
|
||||
'parent': this.dataSourceId,
|
||||
'value': node.label,
|
||||
'hasChild': true,
|
||||
'type': 'TABLE',
|
||||
},
|
||||
{
|
||||
'dataSourceId': this.dataSourceId,
|
||||
'label': '视图',
|
||||
'parent': this.dataSourceId,
|
||||
'value': node.label,
|
||||
'hasChild': true,
|
||||
'type': 'VIEW',
|
||||
}
|
||||
]
|
||||
resolve(tableView);
|
||||
} else if (node.level === 2) {
|
||||
this.loadTablesList(resolve, this.dataSourceId, node.data.value, node.data.type)
|
||||
} else {
|
||||
resolve([]);
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
loadTablesList: function (resolve, dataSourceId, schema, type) {
|
||||
var tableType = 'VIEW' === type ? 'views' : 'tables'
|
||||
this.$http({
|
||||
method: "GET",
|
||||
url: "/dbswitch/admin/api/v1/connection/" + tableType + "/get/" + dataSourceId + "?schema=" + urlencode(schema)
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
let tableList = []
|
||||
for (let element of res.data.data) {
|
||||
let obj = new Object();
|
||||
obj['dataSourceId'] = dataSourceId;
|
||||
obj['label'] = element;
|
||||
obj['parent'] = dataSourceId;
|
||||
obj['value'] = schema;
|
||||
obj['hasChild'] = false;
|
||||
obj['type'] = type;
|
||||
tableList.push(obj);
|
||||
}
|
||||
return resolve(tableList);
|
||||
} else {
|
||||
this.$alert("加载失败,原因:" + res.data.message, '数据加载失败');
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
renderContent (h, { node, data, store }) {
|
||||
// https://www.cnblogs.com/zhoushuang0426/p/11059989.html
|
||||
if (node.level === 1) {
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class="iconfont icon-shujuku1"></i>
|
||||
<el-tooltip class="item" effect="light" placement="left">
|
||||
<div slot="content">{node.label}</div>
|
||||
<span>{data.label}</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
);
|
||||
} else if (node.level === 2) {
|
||||
var icon_pic = "iconfont icon-shitu_biaoge";
|
||||
if (data.type === 'VIEW') {
|
||||
icon_pic = "iconfont icon-viewList"
|
||||
}
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class={icon_pic}></i>
|
||||
<span>{data.label}</span>
|
||||
</div>
|
||||
);
|
||||
} else if (node.level === 3) {
|
||||
var icon_pic = "iconfont icon-shitu_biaoge";
|
||||
if (data.type === 'VIEW') {
|
||||
icon_pic = "iconfont icon-viewList"
|
||||
}
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class={icon_pic}></i>
|
||||
<el-tooltip class="item" effect="light" placement="left">
|
||||
<div slot="content">{node.label}</div>
|
||||
<span>{data.label}</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class="el-icon-set-up"></i>
|
||||
<el-tooltip class="item" effect="light" placement="left">
|
||||
<div slot="content">{data.type}</div>
|
||||
<span>{data.label}({data.type})</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
formatIndexFields (row, column) {
|
||||
let list = row.indexFields;
|
||||
let fields = list.map(
|
||||
@@ -196,40 +362,18 @@ export default {
|
||||
})
|
||||
return fields.join(";");
|
||||
},
|
||||
handleCheckChange (data, checked, indeterminate) {
|
||||
//console.log(data, checked, indeterminate);
|
||||
},
|
||||
handleNodeClick (data) {
|
||||
//console.log(data);
|
||||
var id = data.id;
|
||||
var schema = data.schemaName;
|
||||
var table = data.tableName;
|
||||
if (!data.hasChild && id && schema && table) {
|
||||
this.activeName = 'first';
|
||||
this.getTableMeta(id, schema, table);
|
||||
this.getTableData(id, schema, table);
|
||||
}
|
||||
},
|
||||
loadNode (node, resolve) {
|
||||
if (node.level === 0) {
|
||||
const rootNode = [{ label: '数据源导航树', value: 0, hasChild: true, children: 'child' }]
|
||||
return resolve(rootNode);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
if (node.level === 1) {
|
||||
this.loadConnectionList(resolve);
|
||||
} else if (node.level === 2) {
|
||||
this.loadSchemasList(resolve, node.data.value)
|
||||
} else if (node.level === 3) {
|
||||
this.loadTablesList(resolve, node.data.parent, node.data.label)
|
||||
} else if (node.level == 4) {
|
||||
resolve([]);
|
||||
//this.loadColumnList(resolve, node.data.id, node.data.parent, node.data.label)
|
||||
} else {
|
||||
resolve([]);
|
||||
var type = data.type;
|
||||
if (type === 'VIEW' || type === 'TABLE') {
|
||||
var datasourceId = data.dataSourceId;
|
||||
var schema = data.value;
|
||||
var table = data.label;
|
||||
if (!data.hasChild && datasourceId && schema && table) {
|
||||
this.activeName = 'first';
|
||||
this.getTableMeta(datasourceId, schema, table);
|
||||
this.getTableData(datasourceId, schema, table);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
clearDataSet () {
|
||||
this.tableData = [];
|
||||
@@ -278,80 +422,6 @@ export default {
|
||||
}
|
||||
);
|
||||
},
|
||||
loadConnectionList (resolve) {
|
||||
this.$http({
|
||||
method: "GET",
|
||||
url: "/dbswitch/admin/api/v1/connection/list/name"
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
//console.log("list1:" + JSON.stringify(res.data.data))
|
||||
res.data.data.forEach(function (element) {
|
||||
element['label'] = element.name;
|
||||
element['parent'] = 0;
|
||||
element['value'] = element.id;
|
||||
element['hasChild'] = true;
|
||||
element['children'] = 'child';
|
||||
});
|
||||
return resolve(res.data.data);
|
||||
} else {
|
||||
this.$alert("加载失败,原因:" + res.data.message, '数据加载失败');
|
||||
this.clearDataSet();
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
loadSchemasList (resolve, id) {
|
||||
//console.log("id=" + id);
|
||||
this.$http({
|
||||
method: "GET",
|
||||
url: "/dbswitch/admin/api/v1/metadata/schemas/" + id + "/1/0"
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
//console.log("list2:" + JSON.stringify(res.data.data))
|
||||
res.data.data.forEach(function (element) {
|
||||
element['label'] = element.schema;
|
||||
element['parent'] = id;
|
||||
element['value'] = element.connection;
|
||||
element['hasChild'] = true;
|
||||
element['children'] = 'child';
|
||||
});
|
||||
//this.tableData = res.data.data;
|
||||
return resolve(res.data.data);
|
||||
} else {
|
||||
this.$alert("加载失败,原因:" + res.data.message, '数据加载失败');
|
||||
this.clearDataSet();
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
loadTablesList (resolve, id, schema) {
|
||||
//console.log("id=" + id + ",schema=" + schema);
|
||||
this.$http({
|
||||
method: "GET",
|
||||
url: "/dbswitch/admin/api/v1/metadata/tables/" + id + "/1/0?schema=" + urlencode(schema)
|
||||
}).then(
|
||||
res => {
|
||||
if (0 === res.data.code) {
|
||||
//console.log("list3:" + JSON.stringify(res.data.data))
|
||||
res.data.data.forEach(function (element) {
|
||||
element['label'] = element.tableName;
|
||||
element['parent'] = schema;
|
||||
element['id'] = id;
|
||||
element['value'] = element.type;
|
||||
element['hasChild'] = false;
|
||||
element['children'] = 'child';
|
||||
});
|
||||
//this.tableData = res.data.data;
|
||||
return resolve(res.data.data);
|
||||
} else {
|
||||
this.$alert("加载失败,原因:" + res.data.message, '数据加载失败');
|
||||
this.clearDataSet();
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
loadColumnList (resolve, id, schema, table) {
|
||||
//console.log("id=" + id);
|
||||
this.$http({
|
||||
@@ -377,48 +447,11 @@ export default {
|
||||
}
|
||||
);
|
||||
},
|
||||
// https://www.cnblogs.com/zhoushuang0426/p/11059989.html
|
||||
renderContent (h, { node, data, store }) {
|
||||
if (node.level === 1) {
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class="el-icon-takeaway-box"></i>
|
||||
<span>{data.label}</span>
|
||||
</div>
|
||||
);
|
||||
} else if (node.level === 2) {
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class="el-icon-folder-opened"></i>
|
||||
<span>{data.label}</span>
|
||||
</div>
|
||||
);
|
||||
} else if (node.level === 3) {
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class="iconfont icon-shujuku1"></i>
|
||||
<span>{data.label}</span>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
var icon_pic = "iconfont icon-shitu_biaoge";
|
||||
if (data.value === 'VIEW') {
|
||||
icon_pic = "iconfont icon-viewList"
|
||||
}
|
||||
|
||||
return (
|
||||
<div class="custom-tree-node">
|
||||
<i class={icon_pic}></i>
|
||||
<el-tooltip class="item" effect="light" placement="left">
|
||||
<div slot="content">{node.label}</div>
|
||||
<span>{data.label}</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.loadConnections();
|
||||
this.loadTreeData();
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@@ -2,33 +2,47 @@
|
||||
<div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-button size="mini" icon="el-icon-switch-button" :disabled=isSelected plain @click="batchStart()">启动
|
||||
<el-button size="mini"
|
||||
icon="el-icon-switch-button"
|
||||
:disabled=isSelected
|
||||
plain
|
||||
@click="batchStart()">启动
|
||||
</el-button>
|
||||
<el-button size="mini" icon="el-icon-video-pause" :disabled=isSelected plain @click="batchStop()">停止</el-button>
|
||||
<el-button size="mini"
|
||||
icon="el-icon-video-pause"
|
||||
:disabled=isSelected
|
||||
plain
|
||||
@click="batchStop()">停用</el-button>
|
||||
<span style="color:#e9e9f3;"> | </span>
|
||||
<el-button size="mini" plain @click="batchImport()">导入任务</el-button>
|
||||
<el-button size="mini" :disabled=isSelected plain @click="batchExport()">导出任务</el-button>
|
||||
<!-- <div class="right-add-button-group">-->
|
||||
<el-button class="right-add-button-group" type="primary"
|
||||
<el-button size="mini"
|
||||
plain
|
||||
@click="batchImport()">导入</el-button>
|
||||
<el-button size="mini"
|
||||
:disabled=isSelected
|
||||
plain
|
||||
@click="batchExport()">导出</el-button>
|
||||
<el-button class="right-add-button-group"
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-document-add"
|
||||
@click="handleCreate">创建任务
|
||||
@click="handleCreate">创建
|
||||
</el-button>
|
||||
<!-- </div>-->
|
||||
</el-row>
|
||||
<div class="assignment-list-top">
|
||||
<div class="left-search-input-group">
|
||||
<div class="left-search-input">
|
||||
<el-input size="mini" placeholder="请输入任务名称关键字搜索"
|
||||
<el-input size="mini"
|
||||
placeholder="请输入任务名称关键字搜索"
|
||||
v-model="keyword"
|
||||
:clearable=true
|
||||
@change="searchByKeyword"
|
||||
style="width:100%">
|
||||
<el-button @click="searchByKeyword" slot="append" icon="el-icon-search"></el-button>
|
||||
<el-button @click="searchByKeyword"
|
||||
slot="append"
|
||||
icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<el-table :header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
||||
@@ -40,56 +54,63 @@
|
||||
label="编号"
|
||||
type="selection"
|
||||
min-width="6%"></el-table-column>
|
||||
<el-table-column
|
||||
label="任务名称"
|
||||
min-width="10%">
|
||||
<el-table-column label="任务名称"
|
||||
:show-overflow-tooltip="true"
|
||||
min-width="15%">
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleDetail(scope.$index, scope.row)" class="task-name">{{scope.row.name}}</span>
|
||||
<span @click="handleDetail(scope.$index, scope.row)"
|
||||
class="task-name">{{scope.row.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="scheduleMode"
|
||||
label="集成模式"
|
||||
label="模式"
|
||||
sortable
|
||||
:formatter="stringFormatSchedule"
|
||||
min-width="8%"></el-table-column>
|
||||
<el-table-column
|
||||
label="源端数据源"
|
||||
min-width="10%">
|
||||
<el-table-column label="源端"
|
||||
min-width="10%">
|
||||
<template slot-scope="scope">
|
||||
<el-popover trigger="hover" placement="top">
|
||||
<p>源端数据源:{{ scope.row.sourceSchema }}</p>
|
||||
<el-popover trigger="hover"
|
||||
placement="top">
|
||||
<p>源端数据源类型:{{ scope.row.sourceType }}</p>
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<p>源端模式名:{{ scope.row.sourceSchema }}</p>
|
||||
<div slot="reference"
|
||||
class="name-wrapper">
|
||||
<el-tag size="medium">{{ scope.row.sourceSchema }}</el-tag>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="目标端数据源"
|
||||
min-width="10%">
|
||||
<el-table-column label="目标端"
|
||||
min-width="10%">
|
||||
<template slot-scope="scope">
|
||||
<el-popover trigger="hover" placement="top">
|
||||
<p>目标端数据源:{{ scope.row.targetSchema }}</p>
|
||||
<el-popover trigger="hover"
|
||||
placement="top">
|
||||
<p>目标端数据源类型:{{ scope.row.targetType }}</p>
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<p>目标端模式名:{{ scope.row.targetSchema }}</p>
|
||||
<div slot="reference"
|
||||
class="name-wrapper">
|
||||
<el-tag size="medium">{{ scope.row.targetSchema }}</el-tag>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="运行状态"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
min-width="10%">
|
||||
<el-table-column label="运行状态"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
min-width="10%">
|
||||
<template slot-scope="scope">
|
||||
<el-icon class="el-icon-success color-success" v-if="scope.row.runStatus == '执行成功'"></el-icon>
|
||||
<el-icon class="el-icon-error color-error" v-if="scope.row.runStatus == '执行异常'"></el-icon>
|
||||
<el-icon class="el-icon-remove color-cancel" v-if="scope.row.runStatus == '任务取消'"></el-icon>
|
||||
<el-icon class="el-icon-video-play color-running" v-if="scope.row.runStatus == '执行中'"></el-icon>
|
||||
<el-icon class="el-icon-loading color-await" v-if="scope.row.runStatus == '待执行'"></el-icon>
|
||||
<el-icon class="el-icon-success color-success"
|
||||
v-if="scope.row.runStatus == '执行成功'"></el-icon>
|
||||
<el-icon class="el-icon-error color-error"
|
||||
v-if="scope.row.runStatus == '执行异常'"></el-icon>
|
||||
<el-icon class="el-icon-remove color-cancel"
|
||||
v-if="scope.row.runStatus == '任务取消'"></el-icon>
|
||||
<el-icon class="el-icon-video-play color-running"
|
||||
v-if="scope.row.runStatus == '执行中'"></el-icon>
|
||||
<el-icon class="el-icon-loading color-await"
|
||||
v-if="scope.row.runStatus == '待执行'"></el-icon>
|
||||
<span>{{ scope.row.runStatus }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -99,20 +120,24 @@
|
||||
sortable
|
||||
:formatter="boolFormatPublish"
|
||||
:show-overflow-tooltip="true"
|
||||
min-width="8%"></el-table-column>
|
||||
<el-table-column prop="createTime"
|
||||
label="开始调度时间"
|
||||
min-width="12%"></el-table-column>
|
||||
min-width="10%"></el-table-column>
|
||||
<el-table-column prop="scheduleTime"
|
||||
label="调度时间"
|
||||
min-width="15%"></el-table-column>
|
||||
<el-table-column label="操作"
|
||||
min-width="40%">
|
||||
min-width="35%">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button size="small"
|
||||
type="primary"
|
||||
icon="el-icon-timer"
|
||||
@click="schedulingLog(scope.$index, scope.row)"
|
||||
round>调度日志
|
||||
</el-button>
|
||||
<el-tooltip content="跳转到调度监控"
|
||||
placement="top">
|
||||
<el-button size="small"
|
||||
type="primary"
|
||||
icon="el-icon-timer"
|
||||
v-if="scope.row.isPublished===true"
|
||||
@click="schedulingLog(scope.$index, scope.row)"
|
||||
round>日志
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-button size="small"
|
||||
type="primary"
|
||||
icon="el-icon-timer"
|
||||
@@ -125,23 +150,29 @@
|
||||
icon="el-icon-delete-location"
|
||||
v-if="scope.row.isPublished===true"
|
||||
@click="handleRetireTask(scope.$index, scope.row)"
|
||||
round>停止
|
||||
</el-button>
|
||||
<el-button size="small"
|
||||
type="danger"
|
||||
icon="el-icon-video-play"
|
||||
@click="handleRunTask(scope.$index, scope.row)"
|
||||
round>手工调度
|
||||
round>停用
|
||||
</el-button>
|
||||
<el-tooltip content="人工触发调度执行"
|
||||
placement="top">
|
||||
<el-button size="small"
|
||||
type="danger"
|
||||
icon="el-icon-video-play"
|
||||
v-if="scope.row.isPublished===true"
|
||||
@click="handleRunTask(scope.$index, scope.row)"
|
||||
round>执行
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-button size="small"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.isPublished===false"
|
||||
@click="handleUpdate(scope.$index, scope.row)"
|
||||
round>修改
|
||||
</el-button>
|
||||
<el-button size="small"
|
||||
type="success"
|
||||
icon="el-icon-document"
|
||||
v-if="scope.row.isPublished===true"
|
||||
@click="handleDetail(scope.$index, scope.row)"
|
||||
round>详情
|
||||
</el-button>
|
||||
@@ -173,7 +204,7 @@
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: true,
|
||||
currentPage: 1,
|
||||
@@ -182,7 +213,7 @@ export default {
|
||||
keyword: null,
|
||||
tableData: [],
|
||||
isSelected: true,
|
||||
idsSelected:[]
|
||||
idsSelected: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -199,48 +230,48 @@ export default {
|
||||
size: this.pageSize
|
||||
})
|
||||
}).then(res => {
|
||||
if (0 === res.data.code) {
|
||||
this.currentPage = res.data.pagination.page;
|
||||
this.pageSize = res.data.pagination.size;
|
||||
this.totalCount = res.data.pagination.total;
|
||||
this.tableData = res.data.data;
|
||||
} else {
|
||||
alert("加载任务列表失败:" + res.data.message);
|
||||
}
|
||||
},
|
||||
function () {
|
||||
console.log("load assignments list failed");
|
||||
}
|
||||
if (0 === res.data.code) {
|
||||
this.currentPage = res.data.pagination.page;
|
||||
this.pageSize = res.data.pagination.size;
|
||||
this.totalCount = res.data.pagination.total;
|
||||
this.tableData = res.data.data;
|
||||
} else {
|
||||
alert("加载任务列表失败:" + res.data.message);
|
||||
}
|
||||
},
|
||||
function () {
|
||||
console.log("load assignments list failed");
|
||||
}
|
||||
);
|
||||
},
|
||||
searchByKeyword: function () {
|
||||
this.currentPage = 1;
|
||||
this.loadData();
|
||||
},
|
||||
boolFormatPublish(row, column) {
|
||||
boolFormatPublish (row, column) {
|
||||
if (row.isPublished === true) {
|
||||
return "启动";
|
||||
return "已启动";
|
||||
} else {
|
||||
return "停止";
|
||||
return "已停止";
|
||||
}
|
||||
},
|
||||
stringFormatSchedule(row, column) {
|
||||
stringFormatSchedule (row, column) {
|
||||
if (row.scheduleMode == "MANUAL") {
|
||||
return "手动";
|
||||
} else {
|
||||
return "定时";
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
handleSelectionChange (val) {
|
||||
if (val.length > 0) {
|
||||
this.isSelected = false;
|
||||
this.idsSelected.push(val.map(item => item.id));
|
||||
}else {
|
||||
} else {
|
||||
this.isSelected = true;
|
||||
this.idsSelected = []
|
||||
}
|
||||
},
|
||||
batchStart(){
|
||||
batchStart () {
|
||||
console.log(this.idsSelected)
|
||||
this.$http({
|
||||
method: "POST",
|
||||
@@ -262,7 +293,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
batchStop(){
|
||||
batchStop () {
|
||||
this.$http({
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -283,7 +314,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
batchExport(){
|
||||
batchExport () {
|
||||
this.$http({
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -306,17 +337,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
batchImport(){
|
||||
batchImport () {
|
||||
this.$message({
|
||||
message: '功能暂未开放,敬请期待!',
|
||||
center: true
|
||||
});
|
||||
},
|
||||
schedulingLog(){
|
||||
this.$router.push({
|
||||
path: "/task/schedule"
|
||||
});
|
||||
},
|
||||
downloadFile: function (resp) {
|
||||
const headers = resp.headers;
|
||||
const contentType = headers['content-type'];
|
||||
@@ -359,23 +385,23 @@ export default {
|
||||
this.$router.push('/task/create')
|
||||
},
|
||||
handleDetail: function (index, row) {
|
||||
this.$router.push({path: '/task/detail', query: {id: row.id}})
|
||||
this.$router.push({ path: '/task/detail', query: { id: row.id } })
|
||||
},
|
||||
handleUpdate: function (index, row) {
|
||||
this.$router.push({path: '/task/update', query: {id: row.id}})
|
||||
this.$router.push({ path: '/task/update', query: { id: row.id } })
|
||||
},
|
||||
handleDelete: function (index, row) {
|
||||
this.$confirm(
|
||||
"是否确定删除任务【"+row.name+"】?",
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
"是否确定删除任务【" + row.name + "】?",
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
).then(() => {
|
||||
this.$http.delete(
|
||||
"/dbswitch/admin/api/v1/assignment/delete/" + row.id
|
||||
"/dbswitch/admin/api/v1/assignment/delete/" + row.id
|
||||
).then(res => {
|
||||
if (0 === res.data.code) {
|
||||
this.loadData();
|
||||
@@ -387,6 +413,11 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
schedulingLog: function (index, row) {
|
||||
this.$router.push({
|
||||
path: "/task/schedule?id=" + row.id
|
||||
});
|
||||
},
|
||||
handlePublish: function (index, row) {
|
||||
this.$http({
|
||||
method: "POST",
|
||||
@@ -463,7 +494,7 @@ export default {
|
||||
this.loadData();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.loadData();
|
||||
},
|
||||
};
|
||||
|
@@ -331,6 +331,10 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.loadPageTaskAssignments();
|
||||
if (this.$route.query.id) {
|
||||
this.taskId = this.$route.query.id
|
||||
this.loadJobsData();
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.timer) {
|
||||
|
@@ -9,15 +9,41 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
package com.gitee.dbswitch.admin.controller.converter;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.gitee.dbswitch.admin.dao.AssignmentConfigDAO;
|
||||
import com.gitee.dbswitch.admin.dao.AssignmentJobDAO;
|
||||
import com.gitee.dbswitch.admin.dao.DatabaseConnectionDAO;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentConfigEntity;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentJobEntity;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentTaskEntity;
|
||||
import com.gitee.dbswitch.admin.entity.DatabaseConnectionEntity;
|
||||
import com.gitee.dbswitch.admin.model.response.AssignmentInfoResponse;
|
||||
import com.gitee.dbswitch.admin.type.JobStatusEnum;
|
||||
import com.gitee.dbswitch.common.converter.AbstractConverter;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AssignmentInfoConverter extends
|
||||
AbstractConverter<AssignmentTaskEntity, AssignmentInfoResponse> {
|
||||
|
||||
private final static String UNKNOWN_CONNECTION_TYPE = "Unknown";
|
||||
private AssignmentConfigDAO assignmentConfigDAO = SpringUtil.getBean(AssignmentConfigDAO.class);
|
||||
private DatabaseConnectionDAO databaseConnectionDAO = SpringUtil.getBean(DatabaseConnectionDAO.class);
|
||||
private AssignmentJobDAO assignmentJobDAO = SpringUtil.getBean(AssignmentJobDAO.class);
|
||||
|
||||
@Override
|
||||
public AssignmentInfoResponse convert(AssignmentTaskEntity assignmentTaskEntity) {
|
||||
Long taskId = assignmentTaskEntity.getId();
|
||||
AssignmentConfigEntity assignmentConfigEntity = assignmentConfigDAO.getByAssignmentTaskId(taskId);
|
||||
Long sourceConnectionId = assignmentConfigEntity.getSourceConnectionId();
|
||||
Long targetConnectionId = assignmentConfigEntity.getTargetConnectionId();
|
||||
List<Long> connectionIds = Lists.newArrayList(sourceConnectionId, targetConnectionId);
|
||||
Map<Long, DatabaseConnectionEntity> databaseConnectionMap = databaseConnectionDAO.getByIds(connectionIds)
|
||||
.stream().collect(Collectors.toMap(DatabaseConnectionEntity::getId, Function.identity()));
|
||||
|
||||
AssignmentInfoResponse response = new AssignmentInfoResponse();
|
||||
response.setId(assignmentTaskEntity.getId());
|
||||
response.setName(assignmentTaskEntity.getName());
|
||||
@@ -27,6 +53,27 @@ public class AssignmentInfoConverter extends
|
||||
response.setIsPublished(assignmentTaskEntity.getPublished());
|
||||
response.setCreateTime(assignmentTaskEntity.getCreateTime());
|
||||
response.setUpdateTime(assignmentTaskEntity.getUpdateTime());
|
||||
response.setSourceSchema(assignmentConfigEntity.getSourceSchema());
|
||||
response.setTargetSchema(assignmentConfigEntity.getTargetSchema());
|
||||
|
||||
// 注意:这里有可能用户已经在数据源列表中将数据源删除了
|
||||
if (databaseConnectionMap.containsKey(sourceConnectionId)) {
|
||||
response.setSourceType(databaseConnectionMap.get(sourceConnectionId).getType().getName());
|
||||
} else {
|
||||
response.setSourceType(UNKNOWN_CONNECTION_TYPE);
|
||||
}
|
||||
if (databaseConnectionMap.containsKey(targetConnectionId)) {
|
||||
response.setTargetType(databaseConnectionMap.get(targetConnectionId).getType().getName());
|
||||
} else {
|
||||
response.setTargetType(UNKNOWN_CONNECTION_TYPE);
|
||||
}
|
||||
|
||||
AssignmentJobEntity assignmentJobEntity = assignmentJobDAO.getLatestJobEntity(taskId);
|
||||
Integer status = (assignmentJobEntity == null || assignmentJobEntity.getStatus() == null) ?
|
||||
JobStatusEnum.INIT.getValue() :
|
||||
assignmentJobEntity.getStatus();
|
||||
response.setRunStatus(JobStatusEnum.of(status).getName());
|
||||
response.setScheduleTime(assignmentJobEntity == null ? null : assignmentJobEntity.getStartTime());
|
||||
|
||||
return response;
|
||||
}
|
||||
|
@@ -45,10 +45,18 @@ public class AssignmentJobDAO {
|
||||
public List<AssignmentJobEntity> getByAssignmentId(Long assignmentId) {
|
||||
QueryWrapper<AssignmentJobEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(AssignmentJobEntity::getAssignmentId, assignmentId)
|
||||
.orderByDesc(AssignmentJobEntity::getCreateTime);
|
||||
.orderByDesc(AssignmentJobEntity::getId);
|
||||
return assignmentJobMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
public AssignmentJobEntity getLatestJobEntity(Long assignmentId) {
|
||||
QueryWrapper<AssignmentJobEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(AssignmentJobEntity::getAssignmentId, assignmentId)
|
||||
.orderByDesc(AssignmentJobEntity::getId)
|
||||
.last(" limit 1 ");
|
||||
return assignmentJobMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
public void updateSelective(AssignmentJobEntity assignmentJobEntity) {
|
||||
assignmentJobMapper.updateById(assignmentJobEntity);
|
||||
}
|
||||
|
@@ -13,8 +13,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.gitee.dbswitch.admin.entity.DatabaseConnectionEntity;
|
||||
import com.gitee.dbswitch.admin.mapper.DatabaseConnectionMapper;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -32,6 +34,13 @@ public class DatabaseConnectionDAO {
|
||||
return databaseConnectionMapper.selectById(id);
|
||||
}
|
||||
|
||||
public List<DatabaseConnectionEntity> getByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return databaseConnectionMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
public DatabaseConnectionEntity getByName(String name) {
|
||||
QueryWrapper<DatabaseConnectionEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(DatabaseConnectionEntity::getName, name);
|
||||
|
@@ -10,7 +10,6 @@
|
||||
package com.gitee.dbswitch.admin.model.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gitee.dbswitch.admin.entity.DatabaseConnectionEntity;
|
||||
import com.gitee.dbswitch.admin.type.ScheduleModeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -63,4 +62,8 @@ public class AssignmentInfoResponse {
|
||||
|
||||
@ApiModelProperty("运行状态")
|
||||
private String runStatus;
|
||||
|
||||
@ApiModelProperty("最近一次调度开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Timestamp scheduleTime;
|
||||
}
|
||||
|
@@ -9,23 +9,6 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
package com.gitee.dbswitch.admin.service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gitee.dbswitch.admin.common.exception.DbswitchException;
|
||||
import com.gitee.dbswitch.admin.common.response.PageResult;
|
||||
@@ -59,6 +42,18 @@ import com.gitee.dbswitch.data.entity.GlobalParamConfigProperties;
|
||||
import com.gitee.dbswitch.data.entity.SourceDataSourceProperties;
|
||||
import com.gitee.dbswitch.data.entity.TargetDataSourceProperties;
|
||||
import com.gitee.dbswitch.data.util.JsonUtils;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
public class AssignmentService {
|
||||
@@ -146,39 +141,9 @@ public class AssignmentService {
|
||||
}
|
||||
|
||||
public PageResult<AssignmentInfoResponse> listAll(AssignmentSearchRequest request) {
|
||||
Supplier<List<AssignmentInfoResponse>> method = () -> {
|
||||
List<AssignmentInfoResponse> assignmentInfoResponseList = ConverterFactory.getConverter(
|
||||
AssignmentInfoConverter.class)
|
||||
.convert(assignmentTaskDAO.listAll(request.getSearchText()));
|
||||
assignmentInfoResponseList.forEach((e) -> {
|
||||
AssignmentConfigEntity assignmentConfigEntity = this.assignmentConfigDAO.getByAssignmentTaskId(e.getId());
|
||||
|
||||
Long sourceConnectionId = assignmentConfigEntity.getSourceConnectionId();
|
||||
DatabaseConnectionEntity databaseConnectionEntity = this.databaseConnectionDAO.getById(sourceConnectionId);
|
||||
String sourceSchema = assignmentConfigEntity.getSourceSchema();
|
||||
e.setSourceSchema(sourceSchema);
|
||||
String sourceType = databaseConnectionEntity.getType().getName();
|
||||
e.setSourceType(sourceType);
|
||||
|
||||
Long targetConnectionId = assignmentConfigEntity.getTargetConnectionId();
|
||||
DatabaseConnectionEntity databaseConnectionEntity1 = this.databaseConnectionDAO.getById(targetConnectionId);
|
||||
String targetSchema = assignmentConfigEntity.getTargetSchema();
|
||||
e.setTargetSchema(targetSchema);
|
||||
String targetType = databaseConnectionEntity1.getType().getName();
|
||||
e.setTargetType(targetType);
|
||||
|
||||
AssignmentJobEntity assignmentJobEntity = this.assignmentJobMapper.selectOne(
|
||||
new LambdaQueryWrapper<AssignmentJobEntity>()
|
||||
.eq(AssignmentJobEntity::getAssignmentId, e.getId()).orderByDesc(AssignmentJobEntity::getCreateTime)
|
||||
.last(" limit 1 "));
|
||||
Integer status = (assignmentJobEntity == null || assignmentJobEntity.getStatus() == null) ?
|
||||
JobStatusEnum.INIT.getValue() :
|
||||
assignmentJobEntity.getStatus();
|
||||
e.setRunStatus(JobStatusEnum.of(status).getName());
|
||||
|
||||
});
|
||||
return assignmentInfoResponseList;
|
||||
};
|
||||
Supplier<List<AssignmentInfoResponse>> method = () ->
|
||||
ConverterFactory.getConverter(AssignmentInfoConverter.class)
|
||||
.convert(assignmentTaskDAO.listAll(request.getSearchText()));
|
||||
return PageUtils.getPage(method, request.getPage(), request.getSize());
|
||||
}
|
||||
|
||||
@@ -263,9 +228,19 @@ public class AssignmentService {
|
||||
|
||||
private void checkAssignmentAllExist(List<Long> ids) {
|
||||
for (Long id : ids) {
|
||||
if (Objects.isNull(assignmentTaskDAO.getById(id))) {
|
||||
AssignmentTaskEntity assignmentTaskEntity = assignmentTaskDAO.getById(id);
|
||||
if (Objects.isNull(assignmentTaskEntity)) {
|
||||
throw new DbswitchException(ResultCode.ERROR_RESOURCE_NOT_EXISTS, "ID=" + id);
|
||||
}
|
||||
AssignmentConfigEntity assignmentConfigEntity = assignmentConfigDAO.getByAssignmentTaskId(id);
|
||||
Long sourceConnectionId = assignmentConfigEntity.getSourceConnectionId();
|
||||
Long targetConnectionId = assignmentConfigEntity.getTargetConnectionId();
|
||||
// 检查任务对应的源端和目标端连接是否还存在
|
||||
List<Long> connectionIds = Lists.newArrayList(sourceConnectionId, targetConnectionId);
|
||||
if (databaseConnectionDAO.getByIds(connectionIds).size() != connectionIds.size()) {
|
||||
throw new DbswitchException(ResultCode.ERROR_RESOURCE_NOT_EXISTS,
|
||||
"ConnectionID=" + connectionIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,9 +12,9 @@ spring:
|
||||
static-path-pattern: /statics/**
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/dbswitch?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&useSSL=false&allowMultiQueries=true&failOverReadOnly=false&connectTimeout=30000
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://192.168.31.57:3306/dbswitch?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&useSSL=false&allowMultiQueries=true&failOverReadOnly=false&connectTimeout=30000
|
||||
username: tangyibo
|
||||
password: 123456
|
||||
validation-query: SELECT 1
|
||||
test-on-borrow: true
|
||||
flyway:
|
||||
@@ -32,4 +32,4 @@ mybatis:
|
||||
|
||||
dbswitch:
|
||||
configuration:
|
||||
drivers-base-path: ${APP_DRIVERS_PATH:D:\Code\Gitee\IdeaProjects\dbswitch\drivers}
|
||||
drivers-base-path: ${APP_DRIVERS_PATH}
|
||||
|
@@ -61,6 +61,11 @@ CREATE TABLE IF NOT EXISTS DBSWITCH_DATABASE_CONNECTION (
|
||||
"type" varchar(200) not null default '',
|
||||
"version" varchar(255) not null default '',
|
||||
"driver" varchar(200) not null default '',
|
||||
"mode" varchar(20) not null default '0',
|
||||
"address" varchar(200) not null default '',
|
||||
"port" varchar(20) not null default '0',
|
||||
"database_name" varchar(200) not null default '',
|
||||
"character_encoding" varchar(200) not null default '',
|
||||
"url" text ,
|
||||
"username" varchar(200) not null default '',
|
||||
"password" varchar(200) not null default '',
|
||||
@@ -75,6 +80,11 @@ COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."name" IS '连接名称';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."type" IS '数据库类型';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."version" IS '驱动版本';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."driver" IS '驱动类名称';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."mode" IS '连接模式:0默认 1专业';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."address" IS '连接地址';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."port" IS '连接端口号';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."database_name" IS '数据库名';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."character_encoding" IS '编码格式';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."url" IS 'jdbc-url连接串';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."username" IS '连接账号';
|
||||
COMMENT ON COLUMN DBSWITCH_DATABASE_CONNECTION."password" IS '账号密码';
|
||||
|
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.49b31a00ffa32c23046832218e34faf7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.71ee3e7e0b35cf65bded.js></script><script type=text/javascript src=/static/js/vendor.b9bd12276a8d544208ad.js></script><script type=text/javascript src=/static/js/app.72c28b25511b5e5151dd.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.3d890810ce3c3f17fdc205b537abc619.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2fb37960f7959eb139b0.js></script><script type=text/javascript src=/static/js/vendor.b9bd12276a8d544208ad.js></script><script type=text/javascript src=/static/js/app.2d06c37438cd4d03dc6f.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 27 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
webpackJsonp([0],{mvHQ:function(n,t,i){n.exports={default:i("qkKv"),__esModule:!0}},qkKv:function(n,t,i){var e=i("FeBl"),r=e.JSON||(e.JSON={stringify:JSON.stringify});n.exports=function(n){return r.stringify.apply(r,arguments)}}});
|
||||
//# sourceMappingURL=0.ca67e87d8c000a42e592.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
webpackJsonp([10],{CDFU:function(n,e){},GKuy:function(n,e){},"Hoc+":function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=t("CDFU"),a=t.n(r);for(var i in r)"default"!==i&&function(n){t.d(e,n,function(){return r[n]})}(i);var u=t("nxZV");var c=function(n){t("GKuy")},o=t("VU/8")(a.a,u.a,!1,c,"data-v-356a9999",null);e.default=o.exports},nxZV:function(n,e,t){"use strict";var r={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"log-index-viewer"},[e("router-view")],1)},staticRenderFns:[]};e.a=r}});
|
||||
//# sourceMappingURL=10.80e7801109b57f1a3d72.js.map
|
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["webpack:///./src/views/connection/index.vue","webpack:///./src/views/connection/index.vue?f1db"],"names":["Object","defineProperty","__webpack_exports__","value","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__","__webpack_require__","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue___default","n","__WEBPACK_IMPORT_KEY__","key","d","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_356a9999_hasScoped_true_transformToRequire_video_src_poster_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_index_vue__","__vue_styles__","ssrContext","Component","normalizeComponent","a","esExports","render","_h","this","$createElement","_c","_self","staticClass","staticRenderFns"],"mappings":"iGAAAA,OAAAC,eAAAC,EAAA,cAAAC,OAAA,QAAAC,EAAAC,EAAA,QAAAC,EAAAD,EAAAE,EAAAH,GAAA,QAAAI,KAAAJ,EAAA,YAAAI,GAAA,SAAAC,GAAAJ,EAAAK,EAAAR,EAAAO,EAAA,kBAAAL,EAAAK,KAAA,CAAAD,GAAA,IAAAG,EAAAN,EAAA,QAGA,IASAO,EAZA,SAAAC,GACER,EAAQ,SAgBVS,EAdyBT,EAAQ,OAcjCU,CACET,EAAAU,EACAL,EAAA,GATF,EAWAC,EAPA,kBAEA,MAUeV,EAAA,QAAAY,EAAiB,2CC1BhC,IAEAG,GAAiBC,OAFjB,WAA0B,IAAaC,EAAbC,KAAaC,eAA0BC,EAAvCF,KAAuCG,MAAAD,IAAAH,EAAwB,OAAAG,EAAA,OAAiBE,YAAA,qBAA+BF,EAAA,oBAExHG,oBACFvB,EAAA","file":"static/js/10.80e7801109b57f1a3d72.js","sourcesContent":["function injectStyle (ssrContext) {\n require(\"!!../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true,\\\"publicPath\\\":\\\"../../\\\"}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true,\\\"minimize\\\":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-356a9999\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./index.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./index.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./index.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-356a9999\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./index.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-356a9999\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/views/connection/index.vue\n// module id = Hoc+\n// module chunks = 10","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"log-index-viewer\"},[_c('router-view')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-356a9999\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/connection/index.vue\n// module id = nxZV\n// module chunks = 10"],"sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
||||
webpackJsonp([14],{"0eSS":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var e=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/2/"+this.currentPage+"/"+this.pageSize).then(function(t){e.loading=!1,0===t.data.code?(e.currentPage=t.data.pagination.page,e.pageSize=t.data.pagination.size,e.totalCount=t.data.pagination.total,e.lists=t.data.data):alert("加载数据失败:"+t.data.message)},function(t){e.$message({showClose:!0,message:"数据加载错误",type:"error"})})},boolFormat:function(e,t){return!0===e.failed?"是":"否"},handleSizeChange:function(e){this.loading=!0,this.pageSize=e,this.loadData()},handleCurrentChange:function(e){this.loading=!0,this.currentPage=e,this.loadData()},handleDetail:function(e,t){this.$message({showClose:!0,message:"查看日志详情"+e+" "+t,type:"info"})}},created:function(){this.loadData()}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:e.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"日志编号:"}},[a("span",[e._v(e._s(t.row.id))])]),e._v(" "),a("el-form-item",{attrs:{label:"日志时间:"}},[a("span",[e._v(e._s(t.row.createTime))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作用户:"}},[a("span",[e._v(e._s(t.row.username))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求IP地址:"}},[a("span",[e._v(e._s(t.row.ipAddress))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作模块:"}},[a("span",[e._v(e._s(t.row.moduleName))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作描述:"}},[a("span",[e._v(e._s(t.row.content))])]),e._v(" "),a("el-form-item",{attrs:{label:"处理耗时(ms):"}},[a("span",[e._v(e._s(t.row.elapseSeconds))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求路径:"}},[a("span",[e._v(e._s(t.row.urlPath))])]),e._v(" "),a("el-form-item",{attrs:{label:"异常状态:"}},[a("span",[e._v(e._s(t.row.failed))])]),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("span")]),e._v(" "),a("el-form-item",{attrs:{label:"异常日志:"}},[a("el-input",{staticStyle:{"font-size":"12px",width:"700px"},attrs:{type:"textarea",autosize:{minRows:2,maxRows:5}},model:{value:t.row.exception,callback:function(a){e.$set(t.row,"exception",a)},expression:"props.row.exception"}})],1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"username",label:"操作用户","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"moduleName",label:"操作类型","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"elapseSeconds",label:"耗时(ms)","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"urlPath",label:"请求路径","min-width":"20%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"failed",label:"异常",formatter:e.boolFormat,"min-width":"10%","show-overflow-tooltip":!0}})],1),e._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":e.currentPage,"page-sizes":[5,10,20,40],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var n=a("VU/8")(l,o,!1,function(e){a("6FHX")},"data-v-aee4e92e",null);t.default=n.exports},"6FHX":function(e,t){}});
|
||||
//# sourceMappingURL=14.2ee83d5f12f903758c8e.js.map
|
||||
webpackJsonp([10],{"0eSS":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var e=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/2/"+this.currentPage+"/"+this.pageSize).then(function(t){e.loading=!1,0===t.data.code?(e.currentPage=t.data.pagination.page,e.pageSize=t.data.pagination.size,e.totalCount=t.data.pagination.total,e.lists=t.data.data):alert("加载数据失败:"+t.data.message)},function(t){e.$message({showClose:!0,message:"数据加载错误",type:"error"})})},boolFormat:function(e,t){return!0===e.failed?"是":"否"},handleSizeChange:function(e){this.loading=!0,this.pageSize=e,this.loadData()},handleCurrentChange:function(e){this.loading=!0,this.currentPage=e,this.loadData()},handleDetail:function(e,t){this.$message({showClose:!0,message:"查看日志详情"+e+" "+t,type:"info"})}},created:function(){this.loadData()}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:e.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"日志编号:"}},[a("span",[e._v(e._s(t.row.id))])]),e._v(" "),a("el-form-item",{attrs:{label:"日志时间:"}},[a("span",[e._v(e._s(t.row.createTime))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作用户:"}},[a("span",[e._v(e._s(t.row.username))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求IP地址:"}},[a("span",[e._v(e._s(t.row.ipAddress))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作模块:"}},[a("span",[e._v(e._s(t.row.moduleName))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作描述:"}},[a("span",[e._v(e._s(t.row.content))])]),e._v(" "),a("el-form-item",{attrs:{label:"处理耗时(ms):"}},[a("span",[e._v(e._s(t.row.elapseSeconds))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求路径:"}},[a("span",[e._v(e._s(t.row.urlPath))])]),e._v(" "),a("el-form-item",{attrs:{label:"异常状态:"}},[a("span",[e._v(e._s(t.row.failed))])]),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("span")]),e._v(" "),a("el-form-item",{attrs:{label:"异常日志:"}},[a("el-input",{staticStyle:{"font-size":"12px",width:"700px"},attrs:{type:"textarea",autosize:{minRows:2,maxRows:5}},model:{value:t.row.exception,callback:function(a){e.$set(t.row,"exception",a)},expression:"props.row.exception"}})],1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"username",label:"操作用户","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"moduleName",label:"操作类型","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"elapseSeconds",label:"耗时(ms)","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"urlPath",label:"请求路径","min-width":"20%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"failed",label:"异常",formatter:e.boolFormat,"min-width":"10%","show-overflow-tooltip":!0}})],1),e._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":e.currentPage,"page-sizes":[5,10,20,40],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var n=a("VU/8")(l,o,!1,function(e){a("6FHX")},"data-v-aee4e92e",null);t.default=n.exports},"6FHX":function(e,t){}});
|
||||
//# sourceMappingURL=10.cbb9f8f0701ddf5b03fa.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
webpackJsonp([15],{WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header",align:"center"},slot:"header"},[i("span",[i("b",[t._v("数据库产品类型列表")])])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"] "+t._s(e.type))])}),0)])]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加数据库驱动JAR说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下,在数据库类型为名称的目录下,以驱动版本号为名称创建目录并放置对应的驱动jar文件,然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明:驱动版本目录下的所有JAR必须无任何外部依赖,否则,也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("ru48")},"data-v-8a3240f4",null);e.default=s.exports},ru48:function(t,e){}});
|
||||
//# sourceMappingURL=15.1c3953fc38a6d985b6a6.js.map
|
||||
webpackJsonp([11],{WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header",align:"center"},slot:"header"},[i("span",[i("b",[t._v("数据库产品类型列表")])])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"] "+t._s(e.type))])}),0)])]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加数据库驱动JAR说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下,在数据库类型为名称的目录下,以驱动版本号为名称创建目录并放置对应的驱动jar文件,然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明:驱动版本目录下的所有JAR必须无任何外部依赖,否则,也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("ru48")},"data-v-8a3240f4",null);e.default=s.exports},ru48:function(t,e){}});
|
||||
//# sourceMappingURL=11.6ced88118ea38e1f3c61.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
webpackJsonp([16],{"2PhG":function(t,e){},oQRv:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var t=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/1/"+this.currentPage+"/"+this.pageSize).then(function(e){t.loading=!1,0===e.data.code?(t.currentPage=e.data.pagination.page,t.pageSize=e.data.pagination.size,t.totalCount=e.data.pagination.total,t.lists=e.data.data):alert("加载数据失败:"+e.data.message)},function(e){t.$message({showClose:!0,message:"数据加载错误",type:"error"})})},handleSizeChange:function(t){this.loading=!0,this.pageSize=t,this.loadData()},handleCurrentChange:function(t){this.loading=!0,this.currentPage=t,this.loadData()}},created:function(){this.loadData()}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:t.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"content",label:"操作内容","min-width":"20%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"userAgent",label:"请求代理","min-width":"50%","show-overflow-tooltip":!0}})],1),t._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":[5,10,20,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var o=a("VU/8")(n,i,!1,function(t){a("2PhG")},"data-v-86686ab2",null);e.default=o.exports}});
|
||||
//# sourceMappingURL=16.be1a505095d0cd14ab67.js.map
|
||||
webpackJsonp([12],{"2PhG":function(t,e){},oQRv:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var t=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/1/"+this.currentPage+"/"+this.pageSize).then(function(e){t.loading=!1,0===e.data.code?(t.currentPage=e.data.pagination.page,t.pageSize=e.data.pagination.size,t.totalCount=e.data.pagination.total,t.lists=e.data.data):alert("加载数据失败:"+e.data.message)},function(e){t.$message({showClose:!0,message:"数据加载错误",type:"error"})})},handleSizeChange:function(t){this.loading=!0,this.pageSize=t,this.loadData()},handleCurrentChange:function(t){this.loading=!0,this.currentPage=t,this.loadData()}},created:function(){this.loadData()}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:t.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"content",label:"操作内容","min-width":"20%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"userAgent",label:"请求代理","min-width":"50%","show-overflow-tooltip":!0}})],1),t._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":[5,10,20,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var o=a("VU/8")(n,i,!1,function(t){a("2PhG")},"data-v-86686ab2",null);e.default=o.exports}});
|
||||
//# sourceMappingURL=12.269df902c9e09c7f1624.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
webpackJsonp([12],{"0eSS":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var e=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/2/"+this.currentPage+"/"+this.pageSize).then(function(t){e.loading=!1,0===t.data.code?(e.currentPage=t.data.pagination.page,e.pageSize=t.data.pagination.size,e.totalCount=t.data.pagination.total,e.lists=t.data.data):alert("加载数据失败:"+t.data.message)},function(t){e.$message({showClose:!0,message:"数据加载错误",type:"error"})})},boolFormat:function(e,t){return!0===e.failed?"是":"否"},handleSizeChange:function(e){this.loading=!0,this.pageSize=e,this.loadData()},handleCurrentChange:function(e){this.loading=!0,this.currentPage=e,this.loadData()},handleDetail:function(e,t){this.$message({showClose:!0,message:"查看日志详情"+e+" "+t,type:"info"})}},created:function(){this.loadData()}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:e.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"日志编号:"}},[a("span",[e._v(e._s(t.row.id))])]),e._v(" "),a("el-form-item",{attrs:{label:"日志时间:"}},[a("span",[e._v(e._s(t.row.createTime))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作用户:"}},[a("span",[e._v(e._s(t.row.username))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求IP地址:"}},[a("span",[e._v(e._s(t.row.ipAddress))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作模块:"}},[a("span",[e._v(e._s(t.row.moduleName))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作描述:"}},[a("span",[e._v(e._s(t.row.content))])]),e._v(" "),a("el-form-item",{attrs:{label:"处理耗时(ms):"}},[a("span",[e._v(e._s(t.row.elapseSeconds))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求路径:"}},[a("span",[e._v(e._s(t.row.urlPath))])]),e._v(" "),a("el-form-item",{attrs:{label:"异常状态:"}},[a("span",[e._v(e._s(t.row.failed))])]),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("span")]),e._v(" "),a("el-form-item",{attrs:{label:"异常日志:"}},[a("el-input",{staticStyle:{"font-size":"12px",width:"700px"},attrs:{type:"textarea",autosize:{minRows:2,maxRows:5}},model:{value:t.row.exception,callback:function(a){e.$set(t.row,"exception",a)},expression:"props.row.exception"}})],1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"username",label:"操作用户","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"moduleName",label:"操作类型","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"elapseSeconds",label:"耗时(ms)","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"urlPath",label:"请求路径","min-width":"20%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"failed",label:"异常",formatter:e.boolFormat,"min-width":"10%","show-overflow-tooltip":!0}})],1),e._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":e.currentPage,"page-sizes":[5,10,20,40],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var n=a("VU/8")(l,o,!1,function(e){a("3GnV")},"data-v-aee4e92e",null);t.default=n.exports},"3GnV":function(e,t){}});
|
||||
//# sourceMappingURL=12.e325228628d3c50a96e7.js.map
|
@@ -1,2 +0,0 @@
|
||||
webpackJsonp([13],{oQRv:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var t=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/1/"+this.currentPage+"/"+this.pageSize).then(function(e){t.loading=!1,0===e.data.code?(t.currentPage=e.data.pagination.page,t.pageSize=e.data.pagination.size,t.totalCount=e.data.pagination.total,t.lists=e.data.data):alert("加载数据失败:"+e.data.message)},function(e){t.$message({showClose:!0,message:"数据加载错误",type:"error"})})},handleSizeChange:function(t){this.loading=!0,this.pageSize=t,this.loadData()},handleCurrentChange:function(t){this.loading=!0,this.currentPage=t,this.loadData()}},created:function(){this.loadData()}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:t.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"content",label:"操作内容","min-width":"20%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"userAgent",label:"请求代理","min-width":"50%","show-overflow-tooltip":!0}})],1),t._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":[5,10,20,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var o=a("VU/8")(n,i,!1,function(t){a("rPsM")},"data-v-86686ab2",null);e.default=o.exports},rPsM:function(t,e){}});
|
||||
//# sourceMappingURL=13.5185a08dcc35a41dc56c.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
webpackJsonp([17],{Modp:function(t,e){},WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header",align:"center"},slot:"header"},[i("span",[i("b",[t._v("数据库产品类型列表")])])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"]"+t._s(e.type))])}),0)])]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加数据库驱动JAR说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下,在数据库类型为名称的目录下,以驱动版本号为名称创建目录并放置对应的驱动jar文件,然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明:驱动版本目录下的所有JAR必须无任何外部依赖,否则,也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("Modp")},"data-v-25cae184",null);e.default=s.exports}});
|
||||
//# sourceMappingURL=17.17565790c33e3537001f.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
webpackJsonp([22],{P78X:function(e,t){},"Vr+S":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("fZjL"),s=a.n(n),i={data:function(){return{activeNames:["1"],currentDate:new Date,databaseType:[],selectedIndex:-1,selectedDataSource:{}}},methods:{loadDatabaseTypes:function(){var e=this;this.databaseType=[],this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(t){0===t.data.code?e.databaseType=t.data.data:alert("加载任务列表失败:"+t.data.message)},function(){console.log("failed")})},selectChangedDriverVersion:function(e){var t=this;this.connectionDriver=[],this.$http.get("/dbswitch/admin/api/v1/connection/"+e+"/drivers").then(function(a){if(0===a.data.code){t.connectionDriver=a.data.data;var n=t.databaseType.find(function(t){return t.type===e});n&&(t.createform.sample=n.sample)}else t.$message.error("查询数据库可用的驱动版本失败,"+a.data.message),t.connectionDriver=[]})},selectDbDriver:function(e){this.selectedIndex=e.id-1,this.selectedDataSource=e},next:function(){0===s()(this.selectedDataSource).length?this.$message.error("请选择数据库!"):this.$router.push({path:"/connection/list/addDataSource2",query:this.selectedDataSource})},cancel:function(){this.$router.push("/connection/list")}},created:function(){this.loadDatabaseTypes()}},c={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-card",[n("el-header",[n("h3",{staticClass:".h-title"},[e._v("请选择数据源类型")])]),e._v(" "),n("el-main",[n("el-collapse",{model:{value:e.activeNames,callback:function(t){e.activeNames=t},expression:"activeNames"}},[n("el-collapse-item",{attrs:{name:"1"}},[n("template",{slot:"title"},[n("span",{staticClass:"sub-title"},[e._v("数据库")])]),e._v(" "),n("div",[n("el-row",e._l(e.databaseType,function(t,s){return n("el-col",{key:s,attrs:{span:4,offset:1}},[n("div",{staticStyle:{"margin-top":"20px",cursor:"pointer"}},[n("el-card",{staticClass:"card-item",class:e.selectedIndex===s?"active":"",attrs:{"body-style":{padding:"0px"},shadow:"hover"},nativeOn:{click:function(a){return e.selectDbDriver(t)}}},[n("div",{staticStyle:{display:"inline-block",float:"left"}},[n("img",{staticClass:"image",attrs:{title:"",src:a("V5bU")("./"+t.name+".png")}})]),e._v(" "),n("div",{staticStyle:{display:"inline-block",float:"left",padding:"10px 0px 0px 10px"}},[n("span",[e._v(e._s(t.name))]),n("br")])])],1)])}),1)],1)],2)],1)],1),e._v(" "),n("el-footer",[n("el-row",[n("el-button",{staticClass:"next",attrs:{type:"primary"},on:{click:e.next}},[e._v("下一步")]),e._v(" "),n("el-button",{staticClass:"cancel",on:{click:e.cancel}},[e._v("取消")])],1)],1)],1)},staticRenderFns:[]};var l=a("VU/8")(i,c,!1,function(e){a("P78X")},"data-v-028fc529",null);t.default=l.exports}});
|
||||
//# sourceMappingURL=22.b623f8b56b9a9aa1c02b.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
webpackJsonp([6],{Cdx3:function(e,t,a){var n=a("sB3e"),s=a("lktj");a("uqUo")("keys",function(){return function(e){return s(n(e))}})},McMb:function(e,t){},"Vr+S":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("fZjL"),s=a.n(n),i={data:function(){return{activeNames:["1"],currentDate:new Date,databaseType:[],selectedIndex:-1,selectedDataSource:{}}},methods:{loadDatabaseTypes:function(){var e=this;this.databaseType=[],this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(t){0===t.data.code?e.databaseType=t.data.data:alert("加载任务列表失败:"+t.data.message)},function(){console.log("failed")})},selectChangedDriverVersion:function(e){var t=this;this.connectionDriver=[],this.$http.get("/dbswitch/admin/api/v1/connection/"+e+"/drivers").then(function(a){if(0===a.data.code){t.connectionDriver=a.data.data;var n=t.databaseType.find(function(t){return t.type===e});n&&(t.createform.sample=n.sample)}else t.$message.error("查询数据库可用的驱动版本失败,"+a.data.message),t.connectionDriver=[]})},selectDbDriver:function(e){this.selectedIndex=e.id-1,this.selectedDataSource=e},next:function(){0===s()(this.selectedDataSource).length?this.$message.error("请选择数据库!"):this.$router.push({path:"/connection/list/addDataSource2",query:this.selectedDataSource})},cancel:function(){this.$router.push("/connection/list")}},created:function(){this.loadDatabaseTypes()}},c={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-container",[n("el-aside",{attrs:{width:"134px"}}),e._v(" "),n("el-container",[n("el-header",[n("h3",{staticClass:".h-title",staticStyle:{"font-family":"楷体"}},[e._v("请选择数据源类型")])]),e._v(" "),n("el-main",[n("el-collapse",{model:{value:e.activeNames,callback:function(t){e.activeNames=t},expression:"activeNames"}},[n("el-collapse-item",{attrs:{name:"1"}},[n("template",{slot:"title"},[n("span",{staticClass:"sub-title"},[e._v("数据库")])]),e._v(" "),n("div",[n("el-row",e._l(e.databaseType,function(t,s){return n("el-col",{key:s,attrs:{span:4,offset:1}},[n("div",{staticStyle:{"margin-top":"20px",cursor:"pointer"}},[n("el-card",{class:e.selectedIndex===s?"active":"",attrs:{"body-style":{padding:"0px"},shadow:"hover"},nativeOn:{click:function(a){return e.selectDbDriver(t)}}},[n("div",{staticStyle:{display:"inline-block",float:"left"}},[n("img",{staticClass:"image",attrs:{title:"",src:a("V5bU")("./"+t.name+".png")}})]),e._v(" "),n("div",{staticStyle:{display:"inline-block",float:"left",padding:"10px 0px 0px 10px"}},[n("span",[e._v(e._s(t.name))]),n("br"),e._v(" "),n("span",{staticClass:"tag-mdi"},[e._v("MDI")])])])],1)])}),1)],1)],2)],1)],1),e._v(" "),n("el-footer",[n("el-row",[n("el-button",{staticClass:"next",attrs:{type:"primary"},on:{click:e.next}},[e._v("下一步")]),e._v(" "),n("el-button",{staticClass:"cancel",on:{click:e.cancel}},[e._v("取消")])],1)],1)],1)],1)],1)},staticRenderFns:[]};var o=a("VU/8")(i,c,!1,function(e){a("McMb")},"data-v-7b23b71e",null);t.default=o.exports},fZjL:function(e,t,a){e.exports={default:a("jFbC"),__esModule:!0}},jFbC:function(e,t,a){a("Cdx3"),e.exports=a("FeBl").Object.keys},uqUo:function(e,t,a){var n=a("kM2E"),s=a("FeBl"),i=a("S82l");e.exports=function(e,t){var a=(s.Object||{})[e]||Object[e],c={};c[e]=t(a),n(n.S+n.F*i(function(){a(1)}),"Object",c)}}});
|
||||
//# sourceMappingURL=6.5e119850f0283d6ff0c5.js.map
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user