|
|
@ -113,8 +113,19 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template #main v-if="currentDB">
|
|
|
|
<template #main v-if="currentDB">
|
|
|
|
<ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data">
|
|
|
|
<ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data">
|
|
|
|
<el-table-column :label="$t('commons.table.name')" prop="name" sortable />
|
|
|
|
<el-table-column :label="$t('commons.table.name')" prop="name" sortable min-width="90">
|
|
|
|
<el-table-column :label="$t('commons.login.username')" prop="username">
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
|
|
|
<Tooltip v-if="!row.isDelete" :islink="false" :text="row.name" />
|
|
|
|
|
|
|
|
<div v-else>
|
|
|
|
|
|
|
|
<span v-if="row.name.length < 15">{{ row.name }}</span>
|
|
|
|
|
|
|
|
<el-tooltip v-else :content="row.name">{{ row.name.substring(0, 10) }}...</el-tooltip>
|
|
|
|
|
|
|
|
<el-tag round type="info" class="ml-1" size="small">
|
|
|
|
|
|
|
|
{{ $t('database.isDelete') }}
|
|
|
|
|
|
|
|
</el-tag>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column :label="$t('commons.login.username')" show-overflow-tooltip prop="username">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<div class="flex items-center" v-if="row.username">
|
|
|
|
<div class="flex items-center" v-if="row.username">
|
|
|
|
<span>
|
|
|
|
<span>
|
|
|
@ -122,7 +133,13 @@
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
<div v-else>
|
|
|
|
<el-button style="margin-left: -3px" type="primary" link @click="onBind(row)">
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
:disabled="row.isDelete"
|
|
|
|
|
|
|
|
style="margin-left: -3px"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
link
|
|
|
|
|
|
|
|
@click="onBind(row)"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ $t('database.userBind') }}
|
|
|
|
{{ $t('database.userBind') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -159,7 +176,13 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="row.password === '' && row.username">
|
|
|
|
<div v-if="row.password === '' && row.username">
|
|
|
|
<el-button style="margin-left: -3px" link type="primary" @click="onChangePassword(row)">
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
:disabled="row.isDelete"
|
|
|
|
|
|
|
|
style="margin-left: -3px"
|
|
|
|
|
|
|
|
link
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="onChangePassword(row)"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ $t('database.passwordHelper') }}
|
|
|
|
{{ $t('database.passwordHelper') }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -542,7 +565,7 @@ const buttons = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
label: i18n.global.t('database.changePassword'),
|
|
|
|
label: i18n.global.t('database.changePassword'),
|
|
|
|
disabled: (row: Database.MysqlDBInfo) => {
|
|
|
|
disabled: (row: Database.MysqlDBInfo) => {
|
|
|
|
return !row.username;
|
|
|
|
return !row.username || row.isDelete;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
onChangePassword(row);
|
|
|
|
onChangePassword(row);
|
|
|
@ -551,7 +574,7 @@ const buttons = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
label: i18n.global.t('database.permission'),
|
|
|
|
label: i18n.global.t('database.permission'),
|
|
|
|
disabled: (row: Database.MysqlDBInfo) => {
|
|
|
|
disabled: (row: Database.MysqlDBInfo) => {
|
|
|
|
return !row.password;
|
|
|
|
return !row.password || row.isDelete;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
let param = {
|
|
|
|
let param = {
|
|
|
@ -576,6 +599,9 @@ const buttons = [
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
label: i18n.global.t('database.backupList'),
|
|
|
|
label: i18n.global.t('database.backupList'),
|
|
|
|
|
|
|
|
disabled: (row: Database.MysqlDBInfo) => {
|
|
|
|
|
|
|
|
return row.isDelete;
|
|
|
|
|
|
|
|
},
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
let params = {
|
|
|
|
let params = {
|
|
|
|
type: currentDB.value.type,
|
|
|
|
type: currentDB.value.type,
|
|
|
@ -587,6 +613,9 @@ const buttons = [
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
label: i18n.global.t('database.loadBackup'),
|
|
|
|
label: i18n.global.t('database.loadBackup'),
|
|
|
|
|
|
|
|
disabled: (row: Database.MysqlDBInfo) => {
|
|
|
|
|
|
|
|
return row.isDelete;
|
|
|
|
|
|
|
|
},
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
click: (row: Database.MysqlDBInfo) => {
|
|
|
|
let params = {
|
|
|
|
let params = {
|
|
|
|
type: currentDB.value.type,
|
|
|
|
type: currentDB.value.type,
|
|
|
|