- 日志时间:{{item.time}}
- 执行结果:{{item.result=='success'?'成功':'失败'}}
- 查看日志详情
+ 日志时间:{{item.time}}
+ 导入模式:{{item.importType=='overrideMode'?'覆盖模式':'租户模式'}}
+ 执行结果:
+ {{item.result=='success'?'成功':'失败'}}
+
+ 租户编码:{{item.tenantCode}}
+
+ 查看日志详情
+
@@ -133,9 +139,17 @@
padding:30px 30px;
.log{
padding:5px 0px;
- .log-time{
- color:rgba(22, 119, 224, 1);
- margin-right:30px;
+ .col-item{
+ margin-right:10px;
+ .content{
+ color:rgba(22, 119, 224, 1);
+ }
+ .view-log-detail{
+ &:hover{
+ text-decoration:underline;
+ cursor:pointer;
+ }
+ }
}
.success{
color:green;
@@ -143,16 +157,8 @@
.fail{
color:red;
}
- .view-log-detail{
- margin-left:30px;
- color:rgba(22, 119, 224, 1);
- &:hover{
- text-decoration:underline;
- cursor:pointer;
- }
- }
+
}
-
}
.log-details{
From 202022a3a56645427cbd1547f8e8fa74f3caab01 Mon Sep 17 00:00:00 2001
From: suguangxu <274928232@qq.com>
Date: Fri, 13 Jun 2025 15:12:51 +0800
Subject: [PATCH 13/13] =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=81=E6=94=B9?=
=?UTF-8?q?=E9=80=A0=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=EF=BC=9A=201.?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=B6=E6=98=AF=E5=90=A6=E8=BE=93=E5=85=A5?=
=?UTF-8?q?=E7=A7=9F=E6=88=B7=E7=A0=81=E9=BB=98=E8=AE=A4=E6=98=AF=E9=9C=80?=
=?UTF-8?q?=E8=A6=81=E8=BE=93=E5=85=A5=E3=80=82=202.=E5=88=87=E6=8D=A2?=
=?UTF-8?q?=E7=A7=9F=E6=88=B7=E7=9A=84=E9=83=A8=E5=88=86=E9=80=BB=E8=BE=91?=
=?UTF-8?q?=E6=8A=BD=E5=8F=96=E6=88=90=E7=8B=AC=E7=AB=8B=E5=B7=A5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transfer-Encoding: 8bit
---
.env.development | 2 +-
.env.development.example | 6 +
.env.production | 2 +-
.env.production.example | 6 +
.../Application/src/UserTenantChange.vue | 35 +-
.../CreateCodeStep/src/EntireConfigStep.vue | 43 +-
src/utils/tenantManager.ts | 50 ++
.../design/components/BasicConfigStep.vue | 1 -
.../components/components/CodeFirstModal.vue | 3 +-
.../components/components/DataFirstModal.vue | 3 +-
.../components/SimpleTemplateModal.vue | 3 +-
src/views/form/design/index.vue | 518 ++----------------
.../design/tabpanes/GeneratorTypeTabPane.vue | 255 +++++++++
.../design/tabpanes/ZeroCodeTypeTabPane.vue | 356 ++++++++++++
src/views/secondDev/LoginForm.vue | 2 +-
.../dataMigration/components/export/index.vue | 36 +-
.../dataMigration/components/import/index.vue | 3 +-
.../components/processTasks/ToDoTasksV2.vue | 34 +-
18 files changed, 742 insertions(+), 616 deletions(-)
create mode 100644 src/utils/tenantManager.ts
create mode 100644 src/views/form/design/tabpanes/GeneratorTypeTabPane.vue
create mode 100644 src/views/form/design/tabpanes/ZeroCodeTypeTabPane.vue
diff --git a/.env.development b/.env.development
index 1f34454..e118379 100644
--- a/.env.development
+++ b/.env.development
@@ -41,7 +41,7 @@ VITE_GLOB_API_URL_PREFIX =
#租户开关
# VITE_GLOB_TENANT_ENABLED = true
-#是否需要输入租户
+#登录时是否需要输入租户码
# VITE_GLOB_TENANT_INPUT_REQUIRED = true
# 屏蔽通知消息的轮询
diff --git a/.env.development.example b/.env.development.example
index 40cc05c..5f1c007 100644
--- a/.env.development.example
+++ b/.env.development.example
@@ -36,3 +36,9 @@ VITE_GLOB_API_URL_PREFIX =
# 屏蔽通知消息的轮询
VITE_GLOB_DISABLE_NEWS = true
+
+#租户开关
+# VITE_GLOB_TENANT_ENABLED = true
+#登录时是否需要输入租户码
+# VITE_GLOB_TENANT_INPUT_REQUIRED = true
+
diff --git a/.env.production b/.env.production
index f2a7f1f..5b4625c 100644
--- a/.env.production
+++ b/.env.production
@@ -38,7 +38,7 @@ VITE_GLOB_API_URL_PREFIX =
VITE_USE_PWA = false
#租户开关
VITE_GLOB_TENANT_ENABLED = true
-#是否需要输入租户
+#登录时是否需要输入租户码
# VITE_GLOB_TENANT_INPUT_REQUIRED = true
# 屏蔽通知消息的轮询
diff --git a/.env.production.example b/.env.production.example
index 9f5ddda..3a6f021 100644
--- a/.env.production.example
+++ b/.env.production.example
@@ -36,3 +36,9 @@ VITE_GLOB_API_URL_PREFIX =
# 打包是否开启pwa功能
VITE_USE_PWA = false
+
+#租户开关
+# VITE_GLOB_TENANT_ENABLED = true
+#登录时是否需要输入租户码
+# VITE_GLOB_TENANT_INPUT_REQUIRED = true
+
diff --git a/src/components/Application/src/UserTenantChange.vue b/src/components/Application/src/UserTenantChange.vue
index d61a481..c6f9748 100644
--- a/src/components/Application/src/UserTenantChange.vue
+++ b/src/components/Application/src/UserTenantChange.vue
@@ -27,31 +27,20 @@
import { storeToRefs } from 'pinia';
import { Tooltip } from 'ant-design-vue';
import { useUserStore } from '/@/store/modules/user';
- import { changeTenant } from '/@/api/system/tenant';
import { useI18n } from '/@/hooks/web/useI18n';
import {useMessage} from "/@/hooks/web/useMessage";
- import {useTabs} from "/@/hooks/web/useTabs";
- import {router} from "/@/router";
- import {setupRouterGuard} from "/@/router/guard";
- import {usePermissionStore} from "/@/store/modules/permission";
- import {useMenuSetting} from "/@/hooks/setting/useMenuSetting";
- import {useAppInject} from "/@/hooks/web/useAppInject";
- import {useAppStore} from "/@/store/modules/app";
+ import {useTenantManager} from "/@/utils/tenantManager";
const userStore = useUserStore();
const { t } = useI18n();
const { userInfo } = storeToRefs(userStore);
- const { closeAll } = useTabs(router);
- const permissionStore = usePermissionStore();
- const { getShowTopMenu } = useMenuSetting();
- const { getIsMobile } = useAppInject();
- const appStore = useAppStore();
const formInfo: any = ref({
tenants: [],
tenantId: '',
tenantCode: '',
tenantName: '',
});
+ const {toggleLocal}=useTenantManager();
getDropMenuList();
watch(
() => userInfo.value,
@@ -73,21 +62,9 @@
});
}
}
- async function toggleLocale(lang: string) {
- appStore.setPageLoadingAction(true);
- let res = await changeTenant(lang);
- permissionStore.setDynamicAddedRoute(false);
- await userStore.afterLoginAction(true);
- closeAll();
- await setupRouterGuard(router);
- await permissionStore.changeSubsystem(getShowTopMenu.value, getIsMobile.value);
- if(permissionStore.getSubSysList.length>0){
- permissionStore.setSubSystem(permissionStore.getSubSysList[0].id);
- }else{
- permissionStore.setSubSystem("");
- }
- //appStore.setPageLoadingAction(false);
- //location.reload();
+
+ async function switchTenant(tenantCode: string) {
+ await toggleLocal({tenantCode:tenantCode, goHome:true,tabCloseAction:"closeAll"});
}
function handleMenuEvent(menu: DropMenu) {
@@ -100,7 +77,7 @@
title: () => h('span', t('温馨提醒')),
content: () => h('span', t('是否确认切换租户?未保存的数据可能会丢失!')),
onOk: async () => {
- toggleLocale(menu.event as string);
+ switchTenant(menu.event as string);
},
okText: () => t('确认'),
cancelText: () => t('取消'),
diff --git a/src/components/CreateCodeStep/src/EntireConfigStep.vue b/src/components/CreateCodeStep/src/EntireConfigStep.vue
index c7febf7..08a001c 100644
--- a/src/components/CreateCodeStep/src/EntireConfigStep.vue
+++ b/src/components/CreateCodeStep/src/EntireConfigStep.vue
@@ -20,6 +20,7 @@
import { debounce} from 'lodash-es';
import {CustomFormConfig, GeneratorConfig} from '/@/model/generator/generatorConfig';
import { CodeEditor,MODE } from '/@/components/CodeEditor';
+ import {ListConfig} from "/@/model/generator/listConfig";
const { t } = useI18n();
const { notification } = useMessage();
@@ -35,7 +36,6 @@
});
-
const handleListConfigChange=debounce((v)=>{
try{
let jsonObject = JSON.parse(v);
@@ -43,6 +43,7 @@
generatorConfig.listConfig.columnConfigs= jsonObject.columnConfigs;
generatorConfig.listConfig.buttonConfigs= jsonObject.buttonConfigs;
}catch(e){
+ console.log(e);
notification.error({
message: t('提示'),
description: t('列表配置json格式有误'),
@@ -54,6 +55,7 @@
try{
generatorConfig.formJson= JSON.parse(v);
}catch(e){
+ console.error(e);
notification.error({
message: t('提示'),
description: t('表单配置json格式有误'),
@@ -62,33 +64,18 @@
},1000);
const handleRenderConfigChange=debounce((v)=>{
- /* try{
- let jsonObject = JSON.parse(v);
- generatorConfig.renderConfig.formProps= jsonObject.formProps;
- }catch(e){
- notification.error({
- message: t('提示'),
- description: t('渲染覆盖配置json格式有误'),
- });
- }*/
customFormConfig.renderConfig=v;
},1000);
const initStep =()=> {
listConfigObject.value=JSON.stringify({
- queryConfigs:generatorConfig.listConfig.queryConfigs,
- columnConfigs:generatorConfig.listConfig.columnConfigs,
- buttonConfigs:generatorConfig.listConfig.buttonConfigs
+ queryConfigs:generatorConfig.listConfig.queryConfigs||[],
+ columnConfigs:generatorConfig.listConfig.columnConfigs||[],
+ buttonConfigs:generatorConfig.listConfig.buttonConfigs||[]
}, null, 2);
formConfigObject.value=JSON.stringify(generatorConfig.formJson, null, 2);
-
- /* renderConfigObject.value=JSON.stringify({
- searchFormSchema:generatorConfig.renderConfig.searchFormSchema||{},
- columns:generatorConfig.renderConfig.columns||{},
- formProps:generatorConfig.renderConfig.formProps||{}
- }, null, 2);*/
- renderConfigObject.value= customFormConfig.renderConfig||'';
+ renderConfigObject.value= customFormConfig.renderConfig||'';
}
const validateStep = async (): Promise