diff --git a/.github/ISSUE_TEMPLATE/bug---.md b/.github/ISSUE_TEMPLATE/bug---.md index 8d9b63d462..58994bde2f 100644 --- a/.github/ISSUE_TEMPLATE/bug---.md +++ b/.github/ISSUE_TEMPLATE/bug---.md @@ -3,7 +3,7 @@ name: Bug 提交 about: 提交产品缺陷帮助我们更好的改进 title: "[Bug]" labels: 状态:待处理 -assignees: BBchicken-9527, zrfit +assignees: BBchicken-9527, Shenguobin0102, zrfit --- diff --git a/core/core-backend/pom.xml b/core/core-backend/pom.xml index 633c8177bd..ad0152efa1 100644 --- a/core/core-backend/pom.xml +++ b/core/core-backend/pom.xml @@ -218,14 +218,14 @@ - + distributed distributed - + io.dataease distributed @@ -239,7 +239,7 @@ maven-compiler-plugin - + io/dataease/substitute/** @@ -269,9 +269,6 @@ org.springframework.boot spring-boot-maven-plugin - diff --git a/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java b/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java index 87f7a08b88..e16ac95ec1 100644 --- a/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java +++ b/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java @@ -96,6 +96,7 @@ public class MenuManage { || coreMenu.getId().equals(21L) || coreMenu.getPid().equals(21L) || coreMenu.getId().equals(25L) - || coreMenu.getId().equals(26L); + || coreMenu.getId().equals(26L) + || coreMenu.getId().equals(35L); } } diff --git a/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java b/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java index d4979bc207..26aae651f9 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java @@ -56,6 +56,7 @@ public class CoreVisualizationManage { } QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("delete_flag", false); + queryWrapper.ne("pid",-1); queryWrapper.eq(ObjectUtils.isNotEmpty(request.getLeaf()), "node_type", ObjectUtils.isNotEmpty(request.getLeaf()) && request.getLeaf() ? "leaf" : "folder"); queryWrapper.eq("type", request.getBusiFlag()); queryWrapper.orderByDesc("create_time"); @@ -108,6 +109,10 @@ public class CoreVisualizationManage { @XpackInteract(value = "visualizationResourceTree", before = false) public Long innerSave(DataVisualizationInfo visualizationInfo) { + return preInnerSave(visualizationInfo); + } + + public Long preInnerSave(DataVisualizationInfo visualizationInfo){ if (visualizationInfo.getId() == null) { Long id = IDUtils.snowID(); visualizationInfo.setId(id); diff --git a/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java b/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java index ba43f7c297..fefd404e02 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java @@ -122,18 +122,24 @@ public class DataVisualizationServer implements DataVisualizationApi { } DataVisualizationInfo visualizationInfo = new DataVisualizationInfo(); BeanUtils.copyBean(visualizationInfo, request); - - // 检查当前节点的pid是否一致如果不一致 需要调用move 接口(预存 可能会出现pid =-1的情况) - if (request.getPid() != -1) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("pid", request.getPid()); - queryWrapper.eq("id", dvId); - if (!visualizationInfoMapper.exists(queryWrapper)) { - request.setMoveFromUpdate(true); - coreVisualizationManage.move(request); + if(DataVisualizationConstants.RESOURCE_OPT_TYPE.COPY.equals(request.getOptType())){ + // 复制更新 新建权限插入 + visualizationInfoMapper.deleteById(dvId); + visualizationInfo.setNodeType(DataVisualizationConstants.NODE_TYPE.LEAF); + coreVisualizationManage.innerSave(visualizationInfo); + }else{ + // 检查当前节点的pid是否一致如果不一致 需要调用move 接口(预存 可能会出现pid =-1的情况) + if (request.getPid() != -1) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("pid", request.getPid()); + queryWrapper.eq("id", dvId); + if (!visualizationInfoMapper.exists(queryWrapper)) { + request.setMoveFromUpdate(true); + coreVisualizationManage.move(request); + } } + coreVisualizationManage.innerEdit(visualizationInfo); } - coreVisualizationManage.innerEdit(visualizationInfo); //保存视图信 chartDataManage.saveChartViewFromVisualization(request.getComponentData(), dvId, request.getCanvasViewInfo()); } @@ -214,8 +220,10 @@ public class DataVisualizationServer implements DataVisualizationApi { extDataVisualizationMapper.copyLinkJump(copyId); extDataVisualizationMapper.copyLinkJumpInfo(copyId); extDataVisualizationMapper.copyLinkJumpTargetInfo(copyId); - - coreVisualizationManage.innerSave(newDv); + DataVisualizationInfo visualizationInfoTarget = new DataVisualizationInfo(); + BeanUtils.copyBean(visualizationInfoTarget,newDv); + visualizationInfoTarget.setPid(-1L); + coreVisualizationManage.preInnerSave(visualizationInfoTarget); return String.valueOf(newDvId); } @@ -321,6 +329,7 @@ public class DataVisualizationServer implements DataVisualizationApi { } wrapper.eq("delete_flag", 0); wrapper.eq("pid", request.getPid()); + wrapper.ne("pid", -1); wrapper.eq("name", request.getName().trim()); wrapper.eq("node_type", request.getNodeType()); wrapper.eq("type", request.getType()); diff --git a/core/core-backend/src/main/resources/ehcache/ehcache.xml b/core/core-backend/src/main/resources/ehcache/ehcache.xml index 27b2096ef5..05361056d6 100644 --- a/core/core-backend/src/main/resources/ehcache/ehcache.xml +++ b/core/core-backend/src/main/resources/ehcache/ehcache.xml @@ -10,26 +10,6 @@ - - @@ -138,14 +118,6 @@ java.lang.String java.util.List - diff --git a/core/core-frontend/config/dev.ts b/core/core-frontend/config/dev.ts index d45a92d3ef..ca7bea35d7 100644 --- a/core/core-frontend/config/dev.ts +++ b/core/core-frontend/config/dev.ts @@ -2,18 +2,12 @@ export default { server: { proxy: { '/api/f': { - // target: 'http://192.168.31.38:8100', target: 'http://localhost:8100', changeOrigin: true, rewrite: path => path.replace(/^\/api\/f/, '') }, // 使用 proxy 实例 '/api': { - // target: 'http://qa-de2.fit2cloud.com', - // target: 'http://192.168.31.74:8100', - // target: 'https://de2.fit2cloud.com', - // target: 'http://localhost:8100', - // target: 'http://192.168.0.121:9080', target: 'http://localhost:8100', changeOrigin: true, rewrite: path => path.replace(/^\/api/, 'de2api') diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index 9449b6f512..616799591f 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -411,7 +411,6 @@ onMounted(() => { > - {
{ } const initSnapshotTimer = () => { - console.log('check1==') snapshotTimer.value = setInterval(() => { - console.log('check2==') snapshotStore.snapshotCatchToStore() }, 1000) } diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index 3a75b7d178..59655240de 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -214,6 +214,7 @@ const deepScale = computed(() => scale.value / 100) :search-count="searchCount" :scale="deepScale" :disabled="true" + :is-edit="false" />
diff --git a/core/core-frontend/src/components/visualization/UserViewEnlarge.vue b/core/core-frontend/src/components/visualization/UserViewEnlarge.vue index 33e12b8306..9daf75ed77 100644 --- a/core/core-frontend/src/components/visualization/UserViewEnlarge.vue +++ b/core/core-frontend/src/components/visualization/UserViewEnlarge.vue @@ -103,10 +103,6 @@ const downloadViewDetails = () => { const chart = { ...viewInfo.value, chartExtRequest, data: viewDataInfo } exportExcelDownload(chart) } -// -// const htmlToImage = () => { -// downloadCanvas('img', viewContainer.value, viewInfo.value.title) -// } const htmlToImage = () => { toPng(viewContainer.value) diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue index b277f58b20..b06848a8b3 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -8,7 +8,7 @@ {{ tabItem.title }} editMode.value === 'edit' && isEdit.value) + const calcTabLength = () => { setTimeout(() => { if (element.value.propValue.length > 1) { diff --git a/core/core-frontend/src/custom-component/group/Component.vue b/core/core-frontend/src/custom-component/group/Component.vue index aceef1095b..52429009e0 100644 --- a/core/core-frontend/src/custom-component/group/Component.vue +++ b/core/core-frontend/src/custom-component/group/Component.vue @@ -55,9 +55,6 @@ const customCanvasStyle = computed(() => { result.scale = canvasStyleData.value.scale result.width = (element.value.style.width * 100) / result.scale result.height = (element.value.style.height * 100) / result.scale - - // result.width = element.value.style.width - // result.height = element.value.style.height return result }) diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 1ac36ccf3c..36268cbac7 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -52,6 +52,7 @@ export const dvMainStore = defineStore('dataVisualization', { // 大屏基础信息 dvInfo: { dataState: null, + optType: null, id: null, name: null, pid: null, @@ -845,6 +846,7 @@ export const dvMainStore = defineStore('dataVisualization', { resetDvInfo() { this.dvInfo = { dataState: null, + optType: null, id: null, name: null, pid: null, @@ -871,6 +873,7 @@ export const dvMainStore = defineStore('dataVisualization', { updateDvInfoId(newId) { if (this.dvInfo) { this.dvInfo.dataState = 'ready' + this.dvInfo.optType = null this.dvInfo.id = newId } }, @@ -878,6 +881,7 @@ export const dvMainStore = defineStore('dataVisualization', { const optName = dvType === 'dashboard' ? '新建仪表板' : '新建数据大屏' this.dvInfo = { dataState: 'prepare', + optType: null, id: resourceId, name: optName, pid: pid, @@ -899,6 +903,7 @@ export const dvMainStore = defineStore('dataVisualization', { this.componentData = [] this.dvInfo = { dataState: null, + optType: null, id: null, name: null, pid: null, diff --git a/core/core-frontend/src/style/index.less b/core/core-frontend/src/style/index.less index ffd6ed46a1..9b51e36582 100644 --- a/core/core-frontend/src/style/index.less +++ b/core/core-frontend/src/style/index.less @@ -14,7 +14,6 @@ color-scheme: light dark; font-synthesis: none; - // text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; @@ -298,7 +297,7 @@ body { // padding: 0 0 64px 0 !important; // } -.ed-tree-node.is-current > .ed-tree-node__content:not(.is-menu):after { +.ed-tree-node.is-current>.ed-tree-node__content:not(.is-menu):after { display: none; } diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index bbacdce160..c5a2bb84f4 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -289,7 +289,7 @@ export function filterEmptyFolderTree(nodes) { export function findParentIdByChildIdRecursive(tree, targetChildId) { function findParentId(node, targetChildId) { - if (node.type === 'folder' && node.children) { + if (node.children) { for (const childNode of node.children) { if (childNode.id === targetChildId) { return node.id // 找到匹配的子节点,返回其父节点的 ID diff --git a/core/core-frontend/src/utils/style.ts b/core/core-frontend/src/utils/style.ts index 4cb8f1642b..e63c0355ac 100644 --- a/core/core-frontend/src/utils/style.ts +++ b/core/core-frontend/src/utils/style.ts @@ -198,14 +198,6 @@ export function getCanvasStyle(canvasStyleData) { return style } -// export function createGroupStyle(groupComponent) { -// const parentStyle = groupComponent.style -// groupComponent.propValue.forEach(component => { -// component.style.left = component.style.left - parentStyle.left -// component.style.top = component.style.top - parentStyle.top -// }) -// } - export function createGroupStyle(groupComponent) { const parentStyle = groupComponent.style groupComponent.propValue.forEach(component => { diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue index 4f54751823..58561510ab 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue @@ -264,22 +264,6 @@ onMounted(() => { 已设置 - - 0) { - // data = customSort(customSortData, data) - // } - for (let i = 0; i < data.length; i++) { const s = data[i] seriesColors.push({ diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index e8410ed6df..46094551b0 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -244,9 +244,9 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => { copyResource(params).then(data => { const baseUrl = curCanvasType.value === 'dataV' - ? '#/dvCanvas?opt=copy&dvId=' - : '#/dashboard?opt=copy&resourceId=' - window.open(baseUrl + data.data, '_blank') + ? `#/dvCanvas?opt=copy&pid=${params.pid}&dvId=${data.data}` + : `#/dashboard?opt=copy&pid=${params.pid}&resourceId=${data.data}` + window.open(baseUrl, '_blank') }) } } @@ -467,12 +467,6 @@ defineExpose({ @finish="resourceOptFinish" ref="resourceGroupOpt" /> - - - - - - { const dvMainStore = dvMainStoreWithOut() const snapshotStore = snapshotStoreWithOut() -const { componentData, curComponent, canvasStyleData, canvasViewInfo, editMode, batchOptStatus } = - storeToRefs(dvMainStore) +const { + componentData, + curComponent, + canvasStyleData, + canvasViewInfo, + editMode, + batchOptStatus, + dvInfo +} = storeToRefs(dvMainStore) const dataInitState = ref(false) const state = reactive({ @@ -62,6 +69,14 @@ onMounted(() => { dataInitState.value = false initCanvasData(resourceId, 'dashboard', function () { dataInitState.value = true + if (dvInfo.value && opt === 'copy') { + dvInfo.value.dataState = 'prepare' + dvInfo.value.optType = 'copy' + dvInfo.value.pid = pid + setTimeout(() => { + snapshotStore.recordSnapshotCache() + }, 1500) + } }) } else if (opt && opt === 'create') { dataInitState.value = false diff --git a/core/core-frontend/src/views/data-visualization/PreviewHead.vue b/core/core-frontend/src/views/data-visualization/PreviewHead.vue index 0569a0c4a5..f91edbb2ea 100644 --- a/core/core-frontend/src/views/data-visualization/PreviewHead.vue +++ b/core/core-frontend/src/views/data-visualization/PreviewHead.vue @@ -85,7 +85,6 @@ watch(
-