租户管理调整
This commit is contained in:
@@ -1813,7 +1813,8 @@ export default {
|
|||||||
emailTip:'Please input the correct email address',
|
emailTip:'Please input the correct email address',
|
||||||
phoneTip:'Please enter the correct phone number',
|
phoneTip:'Please enter the correct phone number',
|
||||||
node:'Root Node',
|
node:'Root Node',
|
||||||
delSure:'Are you sure to delete the data item with number [{tenantId}]?',
|
delSure:'Are you sure to delete the data item with TenantName: 【{title}】?',
|
||||||
|
delTypeSure:'Are you sure to delete the data item with Tenancy Asset: 【{tenancyAsset}】,Asset Key:【{tenancyKey}】?',
|
||||||
open:'Exhibition',
|
open:'Exhibition',
|
||||||
close:'Fold',
|
close:'Fold',
|
||||||
addClass:'Add Tenant',
|
addClass:'Add Tenant',
|
||||||
|
|||||||
@@ -1813,7 +1813,8 @@ export default {
|
|||||||
emailTip:'请输入正确的邮箱地址',
|
emailTip:'请输入正确的邮箱地址',
|
||||||
phoneTip:'请输入正确的手机号码',
|
phoneTip:'请输入正确的手机号码',
|
||||||
node:'根节点',
|
node:'根节点',
|
||||||
delSure:'确认删除部门编号为 【{tenantId}】 的数据项?',
|
delSure:'确认删除租户名为 【{title}】 的数据项?',
|
||||||
|
delTypeSure:'确认删除租赁类型为 【{tenancyAsset}】,租赁标识为【{tenancyKey}】 的数据项?',
|
||||||
open:'展',
|
open:'展',
|
||||||
close:'折',
|
close:'折',
|
||||||
addClass:'新增租户',
|
addClass:'新增租户',
|
||||||
|
|||||||
@@ -415,10 +415,10 @@ function fnModalOk() {
|
|||||||
* 租户删除
|
* 租户删除
|
||||||
* @param tenantId 租户编号id
|
* @param tenantId 租户编号id
|
||||||
*/
|
*/
|
||||||
function fnRecordDelete(tenantId: string | number) {
|
function fnRecordDelete(tenantId: string | number, title: any) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: t('views.system.tenant.delSure', { tenantId }),
|
content: t('views.system.tenant.delSure', { title }),
|
||||||
onOk() {
|
onOk() {
|
||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
delTenant(tenantId).then(res => {
|
delTenant(tenantId).then(res => {
|
||||||
@@ -459,6 +459,7 @@ function fnModalVisibleByType(
|
|||||||
}
|
}
|
||||||
modalState.typeTitle = t('common.addText') + t('views.system.tenant.type');
|
modalState.typeTitle = t('common.addText') + t('views.system.tenant.type');
|
||||||
modalState.visibleByType = true;
|
modalState.visibleByType = true;
|
||||||
|
keyTip.value = '';
|
||||||
} else {
|
} else {
|
||||||
//修改
|
//修改
|
||||||
if (modalState.confirmLoading) return;
|
if (modalState.confirmLoading) return;
|
||||||
@@ -553,23 +554,23 @@ function fnModalTypeOk() {
|
|||||||
* 租户类型删除
|
* 租户类型删除
|
||||||
* @param tenantId 租户编号id
|
* @param tenantId 租户编号id
|
||||||
*/
|
*/
|
||||||
function fnTypeRecordDelete(
|
function fnTypeRecordDelete(record: any) {
|
||||||
tenantId: string | number,
|
|
||||||
parentId: string | number
|
|
||||||
) {
|
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: t('views.system.tenant.delSure', { tenantId }),
|
content: t('views.system.tenant.delTypeSure', {
|
||||||
|
tenancyAsset: record.tenancyType,
|
||||||
|
tenancyKey: record.tenancyKey,
|
||||||
|
}),
|
||||||
onOk() {
|
onOk() {
|
||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
delTenant(tenantId).then(res => {
|
delTenant(record.tenantId).then(res => {
|
||||||
hide();
|
hide();
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
|
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
|
||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
fnGetList(parentId, 'table'); //渲染表格
|
fnGetList(record.parentId, 'table'); //渲染表格
|
||||||
} else {
|
} else {
|
||||||
message.error({
|
message.error({
|
||||||
content: `${res.msg}`,
|
content: `${res.msg}`,
|
||||||
@@ -755,7 +756,7 @@ onMounted(() => {
|
|||||||
status == 1 ? { color: 'green' } : { color: 'red' }
|
status == 1 ? { color: 'green' } : { color: 'red' }
|
||||||
"
|
"
|
||||||
class="iconMyStyle"
|
class="iconMyStyle"
|
||||||
@click.stop="fnRecordDelete(treeKey)"
|
@click.stop="fnRecordDelete(treeKey, title)"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -868,9 +869,7 @@ onMounted(() => {
|
|||||||
<template #title>{{ t('common.deleteText') }}</template>
|
<template #title>{{ t('common.deleteText') }}</template>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="
|
@click.prevent="fnTypeRecordDelete(record)"
|
||||||
fnTypeRecordDelete(record.tenantId, record.parentId)
|
|
||||||
"
|
|
||||||
v-perms:has="['system:dept:remove']"
|
v-perms:has="['system:dept:remove']"
|
||||||
>
|
>
|
||||||
<template #icon><DeleteOutlined /></template>
|
<template #icon><DeleteOutlined /></template>
|
||||||
|
|||||||
Reference in New Issue
Block a user