Преглед на файлове

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

疯狂的狮子Li преди 6 месеца
родител
ревизия
c9cfefdc3e
променени са 2 файла, в които са добавени 20 реда и са изтрити 1 реда
  1. 8 0
      src/api/system/tenant/index.ts
  2. 12 1
      src/views/system/tenant/index.vue

+ 8 - 0
src/api/system/tenant/index.ts

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

+ 12 - 1
src/views/system/tenant/index.vue

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