|
|
|
|
@ -1,25 +1,11 @@ |
|
|
|
|
<template> |
|
|
|
|
<basic-container> |
|
|
|
|
<avue-crud :option="option" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="data" |
|
|
|
|
ref="crud" |
|
|
|
|
v-model="form" |
|
|
|
|
:page.sync="page" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@row-save="rowSave" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad"> |
|
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" |
|
|
|
|
:permission="permissionList" :before-open="beforeOpen" @row-del="rowDel" @row-update="rowUpdate" |
|
|
|
|
@row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
|
<template slot="menuLeft"> |
|
|
|
|
<el-button |
|
|
|
|
<!-- <el-button |
|
|
|
|
v-if="permission.tenant_add && !recycleMode" |
|
|
|
|
type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@ -69,8 +55,8 @@ |
|
|
|
|
v-if="userInfo.role_name.includes('administrator') && recycleMode" |
|
|
|
|
@click="handleRecycleBack" |
|
|
|
|
>返 回 |
|
|
|
|
</el-button> |
|
|
|
|
<el-tooltip class="item" effect="dark" content="给租户配置账号额度、过期时间等授权信息" placement="top"> |
|
|
|
|
</el-button> --> |
|
|
|
|
<!-- <el-tooltip class="item" effect="dark" content="给租户配置账号额度、过期时间等授权信息" placement="top"> |
|
|
|
|
<el-button size="small" |
|
|
|
|
plain |
|
|
|
|
type="info" |
|
|
|
|
@ -78,10 +64,10 @@ |
|
|
|
|
icon="el-icon-setting" |
|
|
|
|
@click="handleSetting">批量授权配置 |
|
|
|
|
</el-button> |
|
|
|
|
</el-tooltip> |
|
|
|
|
</el-tooltip> --> |
|
|
|
|
</template> |
|
|
|
|
<template slot="menuRight"> |
|
|
|
|
<el-tooltip class="item" effect="dark" content="将自定义的数据源定制为租户绑定的独立数据源" placement="top"> |
|
|
|
|
<!-- <el-tooltip class="item" effect="dark" content="将自定义的数据源定制为租户绑定的独立数据源" placement="top"> |
|
|
|
|
<el-button size="small" |
|
|
|
|
plain |
|
|
|
|
v-if="userInfo.role_name.includes('administrator') && !recycleMode" |
|
|
|
|
@ -96,10 +82,10 @@ |
|
|
|
|
icon="el-icon-set-up" |
|
|
|
|
@click="handlePackageSetting">产品包管理 |
|
|
|
|
</el-button> |
|
|
|
|
</el-tooltip> |
|
|
|
|
</el-tooltip> --> |
|
|
|
|
</template> |
|
|
|
|
<template #menu="scope"> |
|
|
|
|
<el-button |
|
|
|
|
<!-- <el-button |
|
|
|
|
v-if="userInfo.role_name.includes('administrator') && !recycleMode" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-coin" |
|
|
|
|
@ -114,45 +100,29 @@ |
|
|
|
|
size="small" |
|
|
|
|
@click.stop="handleRowPackage(scope.row)" |
|
|
|
|
>产品包 |
|
|
|
|
</el-button> |
|
|
|
|
</el-button> --> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
slot="accountNumber"> |
|
|
|
|
<template slot-scope="{row}" slot="accountNumber"> |
|
|
|
|
<el-tag>{{ row.accountNumber > 0 ? row.accountNumber : '不限制' }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
slot="expireTime"> |
|
|
|
|
<template slot-scope="{row}" slot="expireTime"> |
|
|
|
|
<el-tag>{{ row.expireTime ? row.expireTime : '不限制' }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-dialog title="租户授权配置" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="box" |
|
|
|
|
width="450px" :close-on-click-modal="false"> |
|
|
|
|
<avue-form :option="settingOption" v-model="settingForm" @submit="handleSubmit"/> |
|
|
|
|
<el-dialog title="租户授权配置" append-to-body :visible.sync="box" width="450px" :close-on-click-modal="false"> |
|
|
|
|
<avue-form :option="settingOption" v-model="settingForm" @submit="handleSubmit" /> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog title="租户数据源配置" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="datasourceBox" |
|
|
|
|
width="450px" :close-on-click-modal="false"> |
|
|
|
|
<avue-form :option="datasourceOption" v-model="datasourceForm" @submit="handleDatasourceSubmit"/> |
|
|
|
|
<el-dialog title="租户数据源配置" append-to-body :visible.sync="datasourceBox" width="450px" :close-on-click-modal="false"> |
|
|
|
|
<avue-form :option="datasourceOption" v-model="datasourceForm" @submit="handleDatasourceSubmit" /> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog title="租户产品包配置" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="packageBox" |
|
|
|
|
width="450px"> |
|
|
|
|
<avue-form ref="formPackage" :option="packageOption" v-model="packageForm" @submit="handlePackageSubmit"/> |
|
|
|
|
<el-dialog title="租户产品包配置" append-to-body :visible.sync="packageBox" width="450px"> |
|
|
|
|
<avue-form ref="formPackage" :option="packageOption" v-model="packageForm" @submit="handlePackageSubmit" /> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-drawer title="租户数据源管理" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="datasourceSettingBox" |
|
|
|
|
size="1000px" :close-on-click-modal="false"> |
|
|
|
|
<el-drawer title="租户数据源管理" append-to-body :visible.sync="datasourceSettingBox" size="1000px" |
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
<tenant-datasource></tenant-datasource> |
|
|
|
|
</el-drawer> |
|
|
|
|
<el-drawer title="租户产品包管理" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="packageSettingBox" |
|
|
|
|
size="1000px"> |
|
|
|
|
<el-drawer title="租户产品包管理" append-to-body :visible.sync="packageSettingBox" size="1000px"> |
|
|
|
|
<tenant-package></tenant-package> |
|
|
|
|
</el-drawer> |
|
|
|
|
</basic-container> |
|
|
|
|
@ -171,10 +141,10 @@ import { |
|
|
|
|
packageSetting, |
|
|
|
|
recycle, pass |
|
|
|
|
} from "@/api/system/tenant"; |
|
|
|
|
import {getDetail as packageDetail} from "@/api/system/tenantpackage"; |
|
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
import {getMenuTree} from "@/api/system/menu"; |
|
|
|
|
import {validatenull} from "@/util/validate"; |
|
|
|
|
import { getDetail as packageDetail } from "@/api/system/tenantpackage"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import { getMenuTree } from "@/api/system/menu"; |
|
|
|
|
import { validatenull } from "@/util/validate"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
@ -198,17 +168,20 @@ export default { |
|
|
|
|
height: 'auto', |
|
|
|
|
calcHeight: 30, |
|
|
|
|
tip: false, |
|
|
|
|
searchShow: true, |
|
|
|
|
searchShow: false, |
|
|
|
|
searchMenuSpan: 6, |
|
|
|
|
border: true, |
|
|
|
|
index: true, |
|
|
|
|
selection: true, |
|
|
|
|
editBtn: false, |
|
|
|
|
addBtn: false, |
|
|
|
|
delBtn: false, |
|
|
|
|
viewBtn: true, |
|
|
|
|
menuWidth: 380, |
|
|
|
|
dialogWidth: 900, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter:true, |
|
|
|
|
searchEnter: true, |
|
|
|
|
columnBtn: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "租户ID", |
|
|
|
|
@ -720,5 +693,4 @@ export default { |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
</style> |
|
|
|
|
<style></style> |
|
|
|
|
|