add 增加 同步租户参数配置功能

This commit is contained in:
疯狂的狮子Li
2025-09-26 11:57:33 +08:00
parent fbe9254114
commit c9cfefdc3e
2 changed files with 20 additions and 1 deletions

View File

@@ -99,3 +99,11 @@ export function syncTenantDict() {
method: 'get' method: 'get'
}); });
} }
// 同步租户字典
export function syncTenantConfig() {
return request({
url: '/system/tenant/syncTenantConfig',
method: 'get'
});
}

View File

@@ -47,6 +47,9 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button v-if="userId === 1" type="success" plain icon="Refresh" @click="handleSyncTenantDict">同步租户字典</el-button> <el-button v-if="userId === 1" type="success" plain icon="Refresh" @click="handleSyncTenantDict">同步租户字典</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button v-if="userId === 1" type="success" plain icon="Refresh" @click="handleSyncTenantConfig">同步租户参数配置</el-button>
</el-col>
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar> <right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
</el-row> </el-row>
</template> </template>
@@ -152,7 +155,8 @@ import {
updateTenant, updateTenant,
changeTenantStatus, changeTenantStatus,
syncTenantPackage, syncTenantPackage,
syncTenantDict syncTenantDict,
syncTenantConfig
} from '@/api/system/tenant'; } from '@/api/system/tenant';
import { selectTenantPackage } from '@/api/system/tenantPackage'; import { selectTenantPackage } from '@/api/system/tenantPackage';
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
@@ -365,6 +369,13 @@ const handleSyncTenantDict = async () => {
proxy?.$modal.msgSuccess(res.msg); proxy?.$modal.msgSuccess(res.msg);
}; };
/**同步租户参数配置*/
const handleSyncTenantConfig = async () => {
await proxy?.$modal.confirm('确认要同步所有租户参数配置吗?');
const res = await syncTenantConfig();
proxy?.$modal.msgSuccess(res.msg);
};
onMounted(() => { onMounted(() => {
getList(); getList();
}); });