增加刷新按钮

This commit is contained in:
lai
2024-06-25 18:02:59 +08:00
parent 0157ec50d3
commit 83aefc5dde

View File

@@ -538,6 +538,7 @@ function showButtons(key: any) {
function hideButtons() { function hideButtons() {
showButtonsKey.value = null; showButtonsKey.value = null;
} }
onMounted(() => { onMounted(() => {
Promise.allSettled([ Promise.allSettled([
getDict('sys_normal_disable'), getDict('sys_normal_disable'),
@@ -575,7 +576,7 @@ onMounted(() => {
> >
<a-form layout="vertical" autocomplete="off"> <a-form layout="vertical" autocomplete="off">
<a-form-item name="mmlTree"> <a-form-item name="tenantTree">
<a-tree :tree-data="state.tenantTreeData" @select="fnSelectNode"> <a-tree :tree-data="state.tenantTreeData" @select="fnSelectNode">
<!-- treeKey is tenantId --> <!-- treeKey is tenantId -->
@@ -631,16 +632,36 @@ onMounted(() => {
<template #extra> <template #extra>
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-tooltip> <a-tooltip>
<template #title>{{
modalState.typeButton ? 'Add Tenancy Type' : 'Please Select Tenant'
}}</template>
<a-button <a-button
size="small" size="small"
@click.prevent="fnModalVisibleByType()" @click.prevent="fnModalVisibleByType()"
:disabled="!modalState.typeButton" :disabled="!modalState.typeButton"
:title="modalState.typeButton ? '' : 'Please Select Tenant'"
> >
<template #icon> <PlusOutlined /> </template> <template #icon> <PlusOutlined /> </template>
{{ t('common.addText') }} {{ t('common.addText') }}
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip>
<template #title>{{
modalState.typeButton
? t('common.reloadText')
: 'Please Select Tenant'
}}</template>
<a-button
type="default"
size="small"
:disabled="!modalState.typeButton"
:title="modalState.typeButton ? '' : 'Please Select Tenant'"
@click.prevent="fnGetList(state.selectedNode, 'table')"
>
<template #icon>
<ReloadOutlined />
</template>
</a-button>
</a-tooltip>
</a-space> </a-space>
</template> </template>