1
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="content-view">
|
||||
<Alert type="warning" show-icon style="margin-bottom: 12px">
|
||||
仅<strong>平台租户</strong>(is_platform=1)可维护租户列表;普通租户登录后本页仅能看到自身租户信息。
|
||||
新增租户时<strong>租户编码由服务端自动生成</strong>,列表中可查看;需在数据库执行迁移脚本创建 <code>sys_tenant</code> 表及默认数据。
|
||||
新增时<strong>租户编码可留空</strong>,留空则由服务端自动生成;填写则使用自定义编码(须唯一)。需在数据库执行迁移脚本创建 <code>sys_tenant</code> 表及默认数据。
|
||||
</Alert>
|
||||
<div class="table-head-tool">
|
||||
<Button type="primary" @click="showAddWarp">新增租户</Button>
|
||||
@@ -26,12 +26,18 @@ export default {
|
||||
editRow: {},
|
||||
columns: [
|
||||
{ title: 'id', key: 'id' },
|
||||
{ title: '名称', key: 'name' },
|
||||
{ title: '编码', key: 'code', name: 'code', display: true },
|
||||
{ title: '备注', key: 'remark' },
|
||||
{ title: '名称', key: 'name', name: 'name', required: true },
|
||||
{
|
||||
title: '租户编码',
|
||||
key: 'code',
|
||||
name: 'code',
|
||||
placeholder: '留空则保存时自动生成;填写则使用自定义编码(须唯一)'
|
||||
},
|
||||
{ title: '备注', key: 'remark', name: 'remark' },
|
||||
{
|
||||
title: '状态',
|
||||
key: 'status',
|
||||
name: 'status',
|
||||
com: 'Radio',
|
||||
source: [
|
||||
{ key: 1, value: '启用' },
|
||||
@@ -44,6 +50,7 @@ export default {
|
||||
{
|
||||
title: '平台租户',
|
||||
key: 'is_platform',
|
||||
name: 'is_platform',
|
||||
com: 'Switch',
|
||||
render(h, p) {
|
||||
return h('span', Number(p.row.is_platform) === 1 ? '是' : '否')
|
||||
@@ -82,6 +89,9 @@ export default {
|
||||
normalizeTenantRow(row) {
|
||||
const r = { ...row }
|
||||
r.is_platform = r.is_platform === true || r.is_platform === 1 || r.is_platform === '1' ? 1 : 0
|
||||
if (r.code != null && typeof r.code === 'string' && !r.code.trim()) {
|
||||
delete r.code
|
||||
}
|
||||
return r
|
||||
},
|
||||
async init() {
|
||||
|
||||
Reference in New Issue
Block a user