租户管理调整
This commit is contained in:
@@ -415,10 +415,10 @@ function fnModalOk() {
|
||||
* 租户删除
|
||||
* @param tenantId 租户编号id
|
||||
*/
|
||||
function fnRecordDelete(tenantId: string | number) {
|
||||
function fnRecordDelete(tenantId: string | number, title: any) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.system.tenant.delSure', { tenantId }),
|
||||
content: t('views.system.tenant.delSure', { title }),
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
delTenant(tenantId).then(res => {
|
||||
@@ -459,6 +459,7 @@ function fnModalVisibleByType(
|
||||
}
|
||||
modalState.typeTitle = t('common.addText') + t('views.system.tenant.type');
|
||||
modalState.visibleByType = true;
|
||||
keyTip.value = '';
|
||||
} else {
|
||||
//修改
|
||||
if (modalState.confirmLoading) return;
|
||||
@@ -553,23 +554,23 @@ function fnModalTypeOk() {
|
||||
* 租户类型删除
|
||||
* @param tenantId 租户编号id
|
||||
*/
|
||||
function fnTypeRecordDelete(
|
||||
tenantId: string | number,
|
||||
parentId: string | number
|
||||
) {
|
||||
function fnTypeRecordDelete(record: any) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.system.tenant.delSure', { tenantId }),
|
||||
content: t('views.system.tenant.delTypeSure', {
|
||||
tenancyAsset: record.tenancyType,
|
||||
tenancyKey: record.tenancyKey,
|
||||
}),
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
delTenant(tenantId).then(res => {
|
||||
delTenant(record.tenantId).then(res => {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
|
||||
duration: 2,
|
||||
});
|
||||
fnGetList(parentId, 'table'); //渲染表格
|
||||
fnGetList(record.parentId, 'table'); //渲染表格
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
@@ -755,7 +756,7 @@ onMounted(() => {
|
||||
status == 1 ? { color: 'green' } : { color: 'red' }
|
||||
"
|
||||
class="iconMyStyle"
|
||||
@click.stop="fnRecordDelete(treeKey)"
|
||||
@click.stop="fnRecordDelete(treeKey, title)"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@@ -868,9 +869,7 @@ onMounted(() => {
|
||||
<template #title>{{ t('common.deleteText') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="
|
||||
fnTypeRecordDelete(record.tenantId, record.parentId)
|
||||
"
|
||||
@click.prevent="fnTypeRecordDelete(record)"
|
||||
v-perms:has="['system:dept:remove']"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
|
||||
Reference in New Issue
Block a user