调整互动以及租户未激活时标红
This commit is contained in:
@@ -1768,14 +1768,14 @@ export default {
|
||||
classId:'Number',
|
||||
classSort:'Sorting',
|
||||
status:'Status',
|
||||
type:' Tenancy Type',
|
||||
type:' Tenancy Asset',
|
||||
createTime:'Creation Time',
|
||||
highClass:'Root Level',
|
||||
key:'Tenancy Key',
|
||||
key:'Asset Key',
|
||||
emailTip:'Please input the correct email address',
|
||||
phoneTip:'Please enter the correct phone number',
|
||||
node:'Root Node',
|
||||
delSure:'Are you sure to delete the data item with department number [{deptId}]?',
|
||||
delSure:'Are you sure to delete the data item with number [{deptId}]?',
|
||||
open:'Exhibition',
|
||||
close:'Fold',
|
||||
addClass:'Add Tenant',
|
||||
|
||||
@@ -224,13 +224,13 @@ const modalStateTypeFrom = Form.useForm(
|
||||
/**表格字段列 */
|
||||
let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: 'Tenancy Type',
|
||||
title: 'Tenancy Asset',
|
||||
dataIndex: 'tenancyType',
|
||||
key: 'tenancyType',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: 'Tenancy Key',
|
||||
title: 'Asset Key',
|
||||
dataIndex: 'tenancyKey',
|
||||
align: 'left',
|
||||
},
|
||||
@@ -363,11 +363,11 @@ function fnModalOk() {
|
||||
content: t('common.msgSuccess', { msg: modalState.title }),
|
||||
duration: 2,
|
||||
});
|
||||
console.log(res.data);
|
||||
modalState.visibleByEdit = false;
|
||||
|
||||
modalStateFrom.resetFields();
|
||||
fnGetList(undefined, 'tree'); //渲染树状
|
||||
tableState.data = []; //清空表格数据
|
||||
resetModal();
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
@@ -402,7 +402,7 @@ function fnRecordDelete(tenantId: string | number) {
|
||||
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
|
||||
duration: 2,
|
||||
});
|
||||
fnGetList(undefined, 'tree'); //渲染树状
|
||||
resetModal();
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
@@ -424,6 +424,7 @@ function fnModalVisibleByType(
|
||||
parentId?: string | number
|
||||
) {
|
||||
if (!tenantId) {
|
||||
//新增租赁类型时
|
||||
modalStateTypeFrom.resetFields();
|
||||
modalState.typeFrom.parentId = state.selectedNode;
|
||||
|
||||
@@ -539,6 +540,14 @@ function hideButtons() {
|
||||
showButtonsKey.value = null;
|
||||
}
|
||||
|
||||
function resetModal() {
|
||||
fnGetList(undefined, 'tree'); //渲染树状
|
||||
tableState.data = [];
|
||||
state.selectedName = '';
|
||||
modalState.typeButton = false;
|
||||
state.selectedNode = '';
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
Promise.allSettled([
|
||||
getDict('sys_normal_disable'),
|
||||
@@ -580,13 +589,18 @@ onMounted(() => {
|
||||
<a-tree :tree-data="state.tenantTreeData" @select="fnSelectNode">
|
||||
<!-- treeKey is tenantId -->
|
||||
|
||||
<template #title="{ key: treeKey, title }">
|
||||
<template #title="{ key: treeKey, title, status }">
|
||||
<div
|
||||
@mouseover="showButtons(treeKey)"
|
||||
@mouseleave="hideButtons"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<span>{{ title }}</span>
|
||||
<span
|
||||
:style="
|
||||
status == 1 ? { color: 'green' } : { color: 'red' }
|
||||
"
|
||||
>{{ title }}</span
|
||||
>
|
||||
<div style="flex: 1"></div>
|
||||
<!-- 占位符,推动后面的按钮到最右边 -->
|
||||
<EditOutlined
|
||||
@@ -633,7 +647,9 @@ onMounted(() => {
|
||||
<a-space :size="8" align="center">
|
||||
<a-tooltip>
|
||||
<template #title>{{
|
||||
modalState.typeButton ? 'Add Tenancy Type' : 'Please Select Tenant'
|
||||
modalState.typeButton
|
||||
? 'Add Tenancy Asset'
|
||||
: 'Please Select Tenant'
|
||||
}}</template>
|
||||
<a-button
|
||||
size="small"
|
||||
|
||||
Reference in New Issue
Block a user