diff --git a/core/core-backend/src/main/java/io/dataease/share/interceptor/LinkInterceptor.java b/core/core-backend/src/main/java/io/dataease/share/interceptor/LinkInterceptor.java index 8e72a8c014..299342e5a2 100644 --- a/core/core-backend/src/main/java/io/dataease/share/interceptor/LinkInterceptor.java +++ b/core/core-backend/src/main/java/io/dataease/share/interceptor/LinkInterceptor.java @@ -42,7 +42,7 @@ public class LinkInterceptor implements HandlerInterceptor { String requestURI = ServletUtils.request().getRequestURI(); if (StringUtils.startsWith(requestURI, WhitelistUtils.getContextPath())) { - requestURI = requestURI.replaceFirst(WhitelistUtils.getContextPath(), ""); + requestURI = StringUtils.replaceOnce(requestURI, WhitelistUtils.getContextPath(), ""); } if (StringUtils.startsWith(requestURI, AuthConstant.DE_API_PREFIX)) { requestURI = requestURI.replaceFirst(AuthConstant.DE_API_PREFIX, ""); diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/CodeEdit.vue b/core/core-frontend/src/components/CodeEdit/CodeEdit.vue similarity index 96% rename from core/core-frontend/src/views/visualized/data/datasource/form/CodeEdit.vue rename to core/core-frontend/src/components/CodeEdit/CodeEdit.vue index 555f2744db..9503c14280 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/CodeEdit.vue +++ b/core/core-frontend/src/components/CodeEdit/CodeEdit.vue @@ -27,6 +27,12 @@ watch(formatData, () => { watch([props.theme], () => { format() }) +watch( + () => props.data, + () => { + format() + } +) onMounted(() => { format() }) diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ace-config.ts b/core/core-frontend/src/components/CodeEdit/ace-config.ts similarity index 100% rename from core/core-frontend/src/views/visualized/data/datasource/form/ace-config.ts rename to core/core-frontend/src/components/CodeEdit/ace-config.ts diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/format-utils.js b/core/core-frontend/src/components/CodeEdit/format-utils.js similarity index 100% rename from core/core-frontend/src/views/visualized/data/datasource/form/format-utils.js rename to core/core-frontend/src/components/CodeEdit/format-utils.js diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 40d144f766..2754b47563 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -3017,6 +3017,7 @@ export default { to_top: 'Pin to Top', publish_recover: 'Revert Publish', publish_tips1: 'Visible after publication', + no_permission_tips: 'No permission', publish_tips2: 'Available after publication {0}', cancel_publish_tips: 'Successfully unpublished', resource_not_published: 'Resource not published', @@ -4894,6 +4895,8 @@ export default { add: 'Add Webhook', search_placeholder: 'Search by name', content_type: 'Content Type', + msg_template: 'Message Template', + msg_template_tips: 'Available placeholders: {t0}, {t1}, {t2}', del_confirm: 'Are you sure you want to delete this Webhook?', batch_del_confirm: 'Are you sure you want to delete {0} Webhooks?' }, diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index d5085e8dcf..e0adb5050e 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -2934,6 +2934,7 @@ export default { to_top: '置頂', publish_recover: '恢復到發佈版本', publish_tips1: '發佈後可查看', + no_permission_tips: '當前資源無權限', publish_tips2: '發佈後可{0}', cancel_publish_tips: '取消發佈成功', resource_not_published: '该資源未發佈', @@ -4744,6 +4745,8 @@ export default { add: '添加 Webhook', search_placeholder: '通過名稱搜索', content_type: '內容類型', + msg_template: '消息模板', + msg_template_tips: '可用占位符:{t0}、{t1}、{t2}', del_confirm: '確定刪除該 Webhook嗎?', batch_del_confirm: '確定刪除 {0} 個 Webhook嗎' } diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 987a4a53a4..5bf70d6e99 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -2940,6 +2940,7 @@ export default { to_top: '置顶', publish_recover: '恢复到发布版本', publish_tips1: '发布后可查看', + no_permission_tips: '当前资源无权限', publish_tips2: '发布后可{0}', cancel_publish_tips: '取消发布成功', resource_not_published: '该资源未发布', @@ -4754,6 +4755,8 @@ export default { add: '添加 Webhook', search_placeholder: '通过名称搜索', content_type: '内容类型', + msg_template: '消息模板', + msg_template_tips: '可用占位符:{t0}、{t1}、{t2}', del_confirm: '确定删除该 Webhook吗?', batch_del_confirm: '确定删除 {0} 个 Webhook吗' }, diff --git a/core/core-frontend/src/views/chart/components/js/formatter.ts b/core/core-frontend/src/views/chart/components/js/formatter.ts index 03e67b00a4..46bd3b7510 100644 --- a/core/core-frontend/src/views/chart/components/js/formatter.ts +++ b/core/core-frontend/src/views/chart/components/js/formatter.ts @@ -111,6 +111,10 @@ function retain(value, n) { const tran = Math.round(value * Math.pow(10, n)) / Math.pow(10, n) let tranV = tran.toString() const newVal = tranV.indexOf('.') + // 遇到科学计数法时用 toFixed(n) 转成普通小数字符串 + if (/e/i.test(tranV)) { + tranV = tran.toFixed(n) + } if (newVal < 0) { tranV += '.' } diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index a88b89be7a..3c60952952 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -81,7 +81,7 @@ const props = defineProps({ const defaultProps = { children: 'children', label: 'name', - disabled: (data: any) => data.extraFlag1 === 0 + disabled: (data: any) => data.extraFlag1 === 0 || data.weight === 0 } const mounted = ref(false) const rootManage = ref(false) @@ -785,7 +785,10 @@ defineExpose({ draggable >