diff --git a/core/core-backend/pom.xml b/core/core-backend/pom.xml index ad0152efa1..31513ebd35 100644 --- a/core/core-backend/pom.xml +++ b/core/core-backend/pom.xml @@ -124,10 +124,15 @@ generate-resources - + + + + + + diff --git a/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java b/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java index 57d23ee7fd..3bbd366ce4 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java +++ b/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java @@ -87,6 +87,8 @@ public class SQLConstants { public static final String WHERE_BETWEEN = "'%s' AND '%s'"; + public static final String WHERE_CALUE_BETWEEN = "%s AND %s"; + public static final String BRACKETS = "(%s)"; public static final String ROUND = "ROUND(%s,%s)"; diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java index a05deff48d..7d658635f5 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java @@ -64,9 +64,7 @@ public class ExtWhere2Str { whereName = String.format(SQLConstants.DE_CAST_DATE_FORMAT, originName, StringUtils.isEmpty(field.getDateFormat()) ? SQLConstants.DEFAULT_DATE_FORMAT : field.getDateFormat(), date_format); } if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { - String cast = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_INT_FORMAT); - // 此处获取标准格式的日期 - whereName = String.format(SQLConstants.FROM_UNIXTIME, cast, date_format); + whereName = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_INT_FORMAT); } if (field.getDeExtractType() == 1) { // 此处获取标准格式的日期 @@ -109,7 +107,7 @@ public class ExtWhere2Str { if (request.getDatasetTableField().getDeExtractType() == 2 || request.getDatasetTableField().getDeExtractType() == 3 || request.getDatasetTableField().getDeExtractType() == 4) { - whereValue = String.format(SQLConstants.WHERE_BETWEEN, value.get(0), value.get(1)); + whereValue = String.format(SQLConstants.WHERE_CALUE_BETWEEN, value.get(0), value.get(1)); } else { whereName = String.format(SQLConstants.UNIX_TIMESTAMP, whereName); whereValue = String.format(SQLConstants.WHERE_BETWEEN, Long.parseLong(value.get(0)), Long.parseLong(value.get(1))); diff --git a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties index af0608789c..d178774eb9 100644 --- a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties +++ b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties @@ -8,7 +8,7 @@ i18n_menu.template=\u6A21\u7248 i18n_menu.application=\u5E94\u7528 i18n_menu.system=\u7CFB\u7EDF\u7BA1\u7406 i18n_menu.template-market=\u6A21\u7248\u5E02\u573A -i18n_menu.template-setting=\u6A21\u7248\u7BA1\u7406 +i18n_menu.template-setting=\u6a21\u677f\u7ba1\u7406 i18n_menu.view=\u6570\u636E\u5C55\u793A i18n_menu.data=\u6570\u636E\u51C6\u5907 i18n_menu.panel=\u4EEA\u8868\u677F diff --git a/core/core-frontend/config/common.ts b/core/core-frontend/config/common.ts index 58479abfdc..4ecb03664d 100644 --- a/core/core-frontend/config/common.ts +++ b/core/core-frontend/config/common.ts @@ -21,6 +21,7 @@ export function pathResolve(dir: string) { return resolve(root, '.', dir) } export default { + base: '/dev2-front', plugins: [ Vue(), VueJsx(), diff --git a/core/core-frontend/src/assets/svg/dv-nothing.svg b/core/core-frontend/src/assets/svg/dv-nothing.svg new file mode 100644 index 0000000000..45830feb86 --- /dev/null +++ b/core/core-frontend/src/assets/svg/dv-nothing.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index 7e5cb6c784..4af2b06de1 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -205,6 +205,10 @@ const curScale = computed(() => { return canvasStyleData.value.scale / 100 }) +const curBaseScale = computed(() => { + return dvMainStore.canvasStyleData.scale / 100 +}) + const pointShadowShow = computed(() => { return ( canvasId.value === 'canvas-main' && @@ -1314,7 +1318,7 @@ defineExpose({ :id="'component' + item.id" :active="item.id === curComponentId" :dv-type="dvInfo.type" - :scale="curScale" + :scale="curBaseScale" :style="getComponentStyle(item.style)" :prop-value="item.propValue" :is-edit="true" diff --git a/core/core-frontend/src/store/modules/data-visualization/lock.ts b/core/core-frontend/src/store/modules/data-visualization/lock.ts index 59aa854f7d..4ab0b44014 100644 --- a/core/core-frontend/src/store/modules/data-visualization/lock.ts +++ b/core/core-frontend/src/store/modules/data-visualization/lock.ts @@ -9,10 +9,20 @@ export const lockStore = defineStore('lock', { actions: { lock() { curComponent.value.isLock = true + if (curComponent.value.component === 'Group') { + curComponent.value.propValue.forEach(component => { + component.isLock = true + }) + } }, unlock() { curComponent.value.isLock = false + if (curComponent.value.component === 'Group') { + curComponent.value.propValue.forEach(component => { + component.isLock = false + }) + } } } }) diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index 46094551b0..5a097f6885 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -232,7 +232,7 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => { }) } else if (cmd === 'edit') { resourceEdit(data.id) - } else { + } else if (cmd === 'copy') { const targetPid = findParentIdByChildIdRecursive(state.resourceTree, data.id) const params: ResourceOrFolder = { nodeType: nodeType as 'folder' | 'leaf', @@ -248,6 +248,8 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => { : `#/dashboard?opt=copy&pid=${params.pid}&resourceId=${data.data}` window.open(baseUrl, '_blank') }) + } else { + resourceGroupOpt.value.optInit(nodeType, data, cmd, ['copy'].includes(cmd)) } } diff --git a/core/core-frontend/src/views/data-visualization/index.vue b/core/core-frontend/src/views/data-visualization/index.vue index 545893cd68..69cc98bd5e 100644 --- a/core/core-frontend/src/views/data-visualization/index.vue +++ b/core/core-frontend/src/views/data-visualization/index.vue @@ -109,7 +109,7 @@ const handleDrop = e => { component.style.left = e.clientX - rectInfo.x component.id = guid() changeComponentSizeWithScale(component) - dvMainStore.addComponent({ component: component, index: 0 }) + dvMainStore.addComponent({ component: component, index: undefined }) adaptCurThemeCommonStyle(component) snapshotStore.recordSnapshotCache('renderChart', component.id) } diff --git a/core/core-frontend/src/views/template/component/DeTemplateImport.vue b/core/core-frontend/src/views/template/component/DeTemplateImport.vue index ed4eab0f8b..e5360331a5 100644 --- a/core/core-frontend/src/views/template/component/DeTemplateImport.vue +++ b/core/core-frontend/src/views/template/component/DeTemplateImport.vue @@ -172,7 +172,7 @@ const editTemplate = () => { nameCheck(nameCheckRequest).then(response => { save(state.templateInfo).then(response => { ElMessage.success(t('编辑成功')) - emits('refresh') + emits('refresh', { optType: 'refresh' }) emits('closeEditTemplateDialog') }) }) @@ -196,7 +196,7 @@ const importTemplate = () => { }).then(() => { save(state.templateInfo).then(response => { ElMessage.success(t('覆盖成功')) - emits('refresh') + emits('refresh', { optType: 'refresh' }) emits('closeEditTemplateDialog') }) }) @@ -205,7 +205,7 @@ const importTemplate = () => { nameCheck(nameCheckRequest).then(response => { save(state.templateInfo).then(response => { ElMessage.success(t('导入成功')) - emits('refresh') + emits('refresh', { optType: 'refresh' }) emits('closeEditTemplateDialog') }) }) @@ -235,7 +235,7 @@ const goFile = () => { } const doAddCategory = () => { - emits('addCategoryInfo') + emits('refresh', { optType: 'addCategory' }) } onMounted(() => { diff --git a/core/core-frontend/src/views/template/index.vue b/core/core-frontend/src/views/template/index.vue index ee0a2c6989..01b286d32f 100644 --- a/core/core-frontend/src/views/template/index.vue +++ b/core/core-frontend/src/views/template/index.vue @@ -24,7 +24,7 @@
-
+
@@ -52,11 +52,24 @@ 的搜索结果 {{ currentTemplateShowListComputed.length }} 个
- + + + 暂无模版 + + + + + 没有找到相关模版 + +
- - - - - - - - - - - - - - - - - - - - - -
+
+ + + + + {{ t('visualization.import') }} + + + 添加分类 + + + +
+ + + + + + + + + + + + + + + + + + + + + +
@@ -188,6 +221,7 @@ import DeTemplateList from '@/views/template/component/DeTemplateList.vue' const { t } = useI18n() const templateEditFormRef = ref(null) const templateListRef = ref(null) +import NoneTemplate from '@/assets/svg/dv-empty.svg' import NoneImage from '@/assets/none.png' import DeTemplateImport from '@/views/template/component/DeTemplateImport.vue' import DeTemplateItem from '@/views/template/component/DeTemplateItem.vue' @@ -351,6 +385,14 @@ const handleClick = (tab, event) => { getTree() } +const importRefresh = params => { + if (params.optType === 'refresh') { + showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel) + } else { + showTemplateEditDialog('new', null) + } +} + const showCurrentTemplate = (pid, label) => { state.currentTemplateId = pid state.currentTemplateLabel = label @@ -612,4 +654,23 @@ onMounted(() => { float: right; width: 320px; } + +.custom-position { + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + flex-flow: row nowrap; + color: #9ea6b2; + flex-direction: column; + span { + line-height: 22px; + color: #646a73; + } +} + +.ed-empty__image img { + width: 126px; +} diff --git a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java index 41ac7d5aba..c6b86a7ca3 100644 --- a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java +++ b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java @@ -27,7 +27,7 @@ public class WhitelistUtils { requestURI = requestURI.replaceFirst(AuthConstant.DE_API_PREFIX, ""); } return WHITE_PATH.contains(requestURI) - || StringUtils.endsWithAny(requestURI, ".ico", "js", ".css", "svg", "png", "jpg", "js.map") + || StringUtils.endsWithAny(requestURI, ".ico", "js", ".css", "svg", "png", "jpg", "js.map", ".otf") || StringUtils.startsWithAny(requestURI, "data:image") || StringUtils.startsWithAny(requestURI, "/login/platformLogin/") || StringUtils.startsWithAny(requestURI, "/static-resource/")