diff --git a/core/core-frontend/src/config/axios/service.ts b/core/core-frontend/src/config/axios/service.ts index 944bdc38e1..97a2bbf65e 100644 --- a/core/core-frontend/src/config/axios/service.ts +++ b/core/core-frontend/src/config/axios/service.ts @@ -143,6 +143,14 @@ service.interceptors.response.use( message: response.data.msg, showClose: true }) + if (response.data.code === 80001) { + localStorage.clear() + let queryRedirectPath = '/workbranch/index' + if (router.currentRoute.value.fullPath) { + queryRedirectPath = router.currentRoute.value.fullPath as string + } + router.push(`/login?redirect=${queryRedirectPath}`) + } } return Promise.reject(response.data.msg) diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index d27f1fd1c7..e22264505a 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -119,5 +119,9 @@ export default { minute_limit: 'Minutes cannot be less than 1 and greater than 59', hour_limit: 'Hours cannot be less than 1 and greater than 23', day_limit: 'Days cannot be less than 1 and greater than 31' + }, + template_manage: { + name_already_exists_type: 'Classification name already exists', + the_same_category: 'The template name already exists under the same category' } } diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index 863796e0a5..68e07d703e 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -148,5 +148,9 @@ export default { minute_limit: '分鍾不能小於1,大於59', hour_limit: '小時不能小於1,大於23', day_limit: '天不能小於1,大於31' + }, + template_manage: { + name_already_exists_type: '分类名称已存在', + the_same_category: '同一分类下,该模板名称已存在' } } diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index e97fe4a9e6..272ff5915d 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -2127,5 +2127,9 @@ export default { autoCreateUser: '第三方自动创建用户', dsIntervalTime: '数据源检测时间间隔', dsExecuteTime: '数据源检测频率' + }, + template_manage: { + name_already_exists_type: '分类名称已存在', + the_same_category: '同一分类下,该模板名称已存在' } } diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 2c3721957d..192685cb88 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -1082,7 +1082,7 @@ const calcEle = () => { const setCacheId = () => { nextTick(() => { - if (!cacheId || !!view.value.tableId) return + if (!cacheId || !!view.value.tableId || templateStatusShow.value) return view.value.tableId = cacheId as unknown as number }) } diff --git a/core/core-frontend/src/views/login/index.vue b/core/core-frontend/src/views/login/index.vue index e9d176490d..0f46e3f235 100644 --- a/core/core-frontend/src/views/login/index.vue +++ b/core/core-frontend/src/views/login/index.vue @@ -82,7 +82,7 @@ const formRef = ref() const duringLogin = ref(false) const handleLogin = () => { if (!formRef.value) return - formRef.value.validate((valid: boolean) => { + formRef.value.validate(async (valid: boolean) => { if (valid) { if (!checkUsername(state.loginForm.username) || !validatePwd(state.loginForm.password)) { ElMessage.error('用户名或密码错误') @@ -90,6 +90,10 @@ const handleLogin = () => { } const name = state.loginForm.username.trim() const pwd = state.loginForm.password + if (!wsCache.get(appStore.getDekey)) { + const res = await queryDekey() + wsCache.set(appStore.getDekey, res.data) + } const param = { name: rsaEncryp(name), pwd: rsaEncryp(pwd) } duringLogin.value = true cleanPlatformFlag() diff --git a/core/core-frontend/src/views/template-market/component/CategoryTemplateV2.vue b/core/core-frontend/src/views/template-market/component/CategoryTemplateV2.vue index 30797a68eb..f32c06b02a 100644 --- a/core/core-frontend/src/views/template-market/component/CategoryTemplateV2.vue +++ b/core/core-frontend/src/views/template-market/component/CategoryTemplateV2.vue @@ -42,9 +42,6 @@ const searchResult = computed( ) const showFlagCheck = template => { - if (!template.categoryNames) { - console.log('===templateTest' + JSON.stringify(template)) - } return template.showFlag && template.categoryNames?.includes(props.label) } diff --git a/core/core-frontend/src/views/template-market/index.vue b/core/core-frontend/src/views/template-market/index.vue index 87f9e14cfb..6655b71054 100644 --- a/core/core-frontend/src/views/template-market/index.vue +++ b/core/core-frontend/src/views/template-market/index.vue @@ -174,7 +174,7 @@ const close = () => { emits('close') } -const title = computed(() => (state.curPosition === 'branch' ? '模板中心' : '使用模版新建')) +const title = computed(() => (state.curPosition === 'branch' ? '模板中心' : '使用模板新建')) const state = reactive({ initReady: true, @@ -273,7 +273,6 @@ const categoriesComputed = computed(() => { category => category.source === 'public' || category.source === state.templateSourceType ) } - console.log('categoriesComputed=' + JSON.stringify(result)) return result }) @@ -456,7 +455,7 @@ const templateShow = templateItem => { const templatePreview = previewId => { if (state.curPosition === 'branch') { - // 模版中心模式 + // 模板中心模式 state.templatePreviewId = previewId previewModel.value = 'marketPreview' } else { diff --git a/core/core-frontend/src/views/workbranch/ShortcutTable.vue b/core/core-frontend/src/views/workbranch/ShortcutTable.vue index 9b06f13573..09e1b66b25 100644 --- a/core/core-frontend/src/views/workbranch/ShortcutTable.vue +++ b/core/core-frontend/src/views/workbranch/ShortcutTable.vue @@ -308,6 +308,7 @@ const getEmptyDesc = (): string => { jsname="c2hhcmUtaGFuZGxlcg==" :weight="scope.row.weight" :resource-id="activeName === 'recent' ? scope.row.id : scope.row.resourceId" + :resource-type="scope.row.type" /> diff --git a/core/core-frontend/src/views/workbranch/index.vue b/core/core-frontend/src/views/workbranch/index.vue index cb447cb1cf..29e4d22a45 100644 --- a/core/core-frontend/src/views/workbranch/index.vue +++ b/core/core-frontend/src/views/workbranch/index.vue @@ -70,10 +70,6 @@ const tabBtnList = [ { name: t('auth.screen'), value: 'SCREEN' - }, - { - name: '应用模板', - value: 'APP' } ] const activeTabBtn = ref('PANEL') @@ -297,7 +293,7 @@ initMarketTemplate() - 使用模版新建 + 使用模板新建 diff --git a/de-xpack b/de-xpack index 438f36fc4b..0f7b7fcafa 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 438f36fc4b459721ae0d88e365e4982f35fa1600 +Subproject commit 0f7b7fcafa204cab4744cdbcc2667b72af9a78f9 diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/template/vo/MarketMetaDataVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/template/vo/MarketMetaDataVO.java index 2f3471c5f6..33aebc8343 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/template/vo/MarketMetaDataVO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/template/vo/MarketMetaDataVO.java @@ -16,7 +16,7 @@ public class MarketMetaDataVO { private String value; private String label; - // market 模板中心 manage 模版管理 public 公共 + // market 模板中心 manage 模板管理 public 公共 private String source = CommonConstants.TEMPLATE_SOURCE.MARKET; public MarketMetaDataVO(String value, String label) { diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/auth/api/InteractiveAuthApi.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/auth/api/InteractiveAuthApi.java index 34dc18ca2d..72b3367cba 100644 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/auth/api/InteractiveAuthApi.java +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/auth/api/InteractiveAuthApi.java @@ -3,8 +3,10 @@ package io.dataease.api.permissions.auth.api; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiSupport; -import io.dataease.api.permissions.auth.dto.*; -import io.dataease.auth.vo.TokenVO; +import io.dataease.api.permissions.auth.dto.BusiPerCheckDTO; +import io.dataease.api.permissions.auth.dto.BusiResourceCreator; +import io.dataease.api.permissions.auth.dto.BusiResourceEditor; +import io.dataease.api.permissions.auth.dto.BusiResourceMover; import io.dataease.model.BusiNodeRequest; import io.dataease.model.BusiNodeVO; import io.swagger.v3.oas.annotations.Operation; @@ -58,9 +60,6 @@ public interface InteractiveAuthApi { @GetMapping("/resource/checkDel/{id}") boolean checkDel(@PathVariable("id") Long id); - @Operation(hidden = true) - TokenVO outAuthPlatformLogin(@RequestBody OutAuthPlatformLoginRequest request); - @Operation(summary = "移动资源") @ApiOperationSupport(order = 7) @PostMapping("/moveResource") diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/auth/dto/OutAuthPlatformLoginRequest.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/auth/dto/OutAuthPlatformLoginRequest.java deleted file mode 100644 index ce8c30a65b..0000000000 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/auth/dto/OutAuthPlatformLoginRequest.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.dataease.api.permissions.auth.dto; - -import lombok.Data; - -import java.io.Serializable; - -@Data -public class OutAuthPlatformLoginRequest implements Serializable { - - private String account; - - private Integer origin; - - private String email; -} diff --git a/sdk/common/src/main/java/io/dataease/result/ResultCode.java b/sdk/common/src/main/java/io/dataease/result/ResultCode.java index 1926dd732a..86ad357993 100644 --- a/sdk/common/src/main/java/io/dataease/result/ResultCode.java +++ b/sdk/common/src/main/java/io/dataease/result/ResultCode.java @@ -37,7 +37,9 @@ public enum ResultCode { INTERFACE_EXCEED_LOAD(60006, "接口负载过高"), /* 权限错误:70001-79999 */ - PERMISSION_NO_ACCESS(70001, "无访问权限"); + PERMISSION_NO_ACCESS(70001, "无访问权限"), + + USER_NO_QUOTA(80001, "没有用户配额"); private Integer code;