From 930a0288d01349d575287c2cbc6082b076203220 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 11:23:25 +0800 Subject: [PATCH 01/29] =?UTF-8?q?fix:=20=E5=85=AC=E5=85=B1=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E8=A7=86=E5=9B=BEapi=E7=BC=BA=E5=B0=91=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/controller/panel/api/LinkApi.java | 10 ++++------ .../dataease/controller/panel/server/LinkServer.java | 11 +++-------- frontend/src/api/link/index.js | 4 ++-- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java b/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java index 0a8094aa22..48fd91e51d 100644 --- a/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java +++ b/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java @@ -1,6 +1,5 @@ package io.dataease.controller.panel.api; - import com.github.xiaoymin.knife4j.annotations.ApiSupport; import io.dataease.auth.annotation.DePermission; import io.dataease.commons.constants.DePermissionType; @@ -19,7 +18,6 @@ import java.util.Map; @RequestMapping("/api/link") public interface LinkApi { - @DePermission(type = DePermissionType.PANEL, value = "resourceId") @ApiOperation("重置密码") @PostMapping("/resetPwd") @@ -45,7 +43,6 @@ public interface LinkApi { @PostMapping("/currentGenerate/{resourceId}") GenerateDto currentGenerate(String resourceId); - @ApiOperation("验证访问") @PostMapping("/validate") ValidateDto validate(LinkValidateRequest request) throws Exception; @@ -59,10 +56,11 @@ public interface LinkApi { Object resourceDetail(@PathVariable String resourceId); @ApiOperation("视图详息") - @PostMapping("/viewDetail/{viewId}") - Object viewDetail(@PathVariable String viewId, @RequestBody ChartExtRequest requestList) throws Exception; + @PostMapping("/viewDetail/{viewId}/{panelId}") + Object viewDetail(@PathVariable("viewId") String viewId, @PathVariable("panelId") String panelId, + @RequestBody ChartExtRequest requestList) throws Exception; @ApiOperation("压缩链接") @PostMapping("/shortUrl") - String shortUrl(@RequestBody Map param); + String shortUrl(@RequestBody Map param); } diff --git a/backend/src/main/java/io/dataease/controller/panel/server/LinkServer.java b/backend/src/main/java/io/dataease/controller/panel/server/LinkServer.java index 43ab59b9a0..56f0e7fa0e 100644 --- a/backend/src/main/java/io/dataease/controller/panel/server/LinkServer.java +++ b/backend/src/main/java/io/dataease/controller/panel/server/LinkServer.java @@ -1,6 +1,5 @@ package io.dataease.controller.panel.server; - import com.auth0.jwt.JWT; import com.auth0.jwt.interfaces.DecodedJWT; import io.dataease.auth.filter.F2CLinkFilter; @@ -25,18 +24,15 @@ import javax.servlet.http.HttpServletRequest; import java.net.URLDecoder; import java.util.Map; - @RestController public class LinkServer implements LinkApi { - @Autowired private PanelLinkService panelLinkService; @Resource private ChartViewService chartViewService; - @Override public void replacePwd(@RequestBody PasswordRequest request) { panelLinkService.password(request); @@ -47,7 +43,6 @@ public class LinkServer implements LinkApi { panelLinkService.changeEnablePwd(request); } - @Override public void resetOverTime(@RequestBody OverTimeRequest request) { panelLinkService.overTime(request); @@ -96,8 +91,9 @@ public class LinkServer implements LinkApi { } @Override - public Object viewDetail(String viewId, ChartExtRequest requestList) throws Exception { - HttpServletRequest request =((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + public Object viewDetail(String viewId, String panelId, ChartExtRequest requestList) throws Exception { + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()) + .getRequest(); String linkToken = request.getHeader(F2CLinkFilter.LINK_TOKEN_KEY); DecodedJWT jwt = JWT.decode(linkToken); Long userId = jwt.getClaim("userId").asLong(); @@ -105,7 +101,6 @@ public class LinkServer implements LinkApi { return chartViewService.getData(viewId, requestList); } - @Override public String shortUrl(Map param) { String resourceId = param.get("resourceId"); diff --git a/frontend/src/api/link/index.js b/frontend/src/api/link/index.js index 7cf27c9bff..eaa5133cfa 100644 --- a/frontend/src/api/link/index.js +++ b/frontend/src/api/link/index.js @@ -64,9 +64,9 @@ export function loadResource(resourceId) { }) } -export function viewInfo(id, data) { +export function viewInfo(id, panelId, data) { return request({ - url: 'api/link/viewDetail/' + id, + url: 'api/link/viewDetail/' + id + '/' + panelId, method: 'post', hideMsg: true, data From ba00ce3250af96a6f94053e911d8f95f234f1f9f Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 12:36:09 +0800 Subject: [PATCH 02/29] =?UTF-8?q?refactor:=20=E5=88=86=E4=BA=AB=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/controller/panel/PanelGroupController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java index 3c84fffad6..1c39bf4a55 100644 --- a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java +++ b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java @@ -80,7 +80,7 @@ public class PanelGroupController { @DePermissionProxy(paramIndex = 1) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW) @PostMapping("/proxy/findOne/{id}") - public PanelGroupWithBLOBs proxyFindOne(@PathVariable String id, @RequestBody PermissionProxy proxy) + public PanelGroupDTO proxyFindOne(@PathVariable String id, @RequestBody PermissionProxy proxy) throws Exception { return panelGroupService.findOne(id); } From dfd22d3d7c107acd415a930048754e3fee5583ac Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 12:53:11 +0800 Subject: [PATCH 03/29] =?UTF-8?q?fix:=20=E7=BB=84=E7=BB=87=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=BA=A7=E8=81=94=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/plugins/server/XAuthServer.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java b/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java index b6e71bdf5f..7538a59e38 100644 --- a/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java @@ -1,6 +1,5 @@ package io.dataease.plugins.server; - import io.dataease.auth.api.dto.CurrentUserDto; import io.dataease.commons.constants.AuthConstants; import io.dataease.commons.utils.AuthUtils; @@ -20,6 +19,8 @@ import io.dataease.plugins.xpack.auth.service.AuthXpackService; import springfox.documentation.annotations.ApiIgnore; import java.util.*; +import java.util.stream.Collectors; + @ApiIgnore @RequestMapping("/plugin/auth") @RestController @@ -74,11 +75,31 @@ public class XAuthServer { } String authCacheKey = getAuthCacheKey(request); if (StringUtils.isNotBlank(authCacheKey)) { - CacheUtils.remove(authCacheKey, request.getAuthTargetType() + request.getAuthTarget()); + if (StringUtils.equals("dept", request.getAuthTargetType())) { + List authTargets = getAuthModels(request.getAuthTarget(), request.getAuthTargetType(), + user.getUserId(), user.getIsAdmin()); + if (CollectionUtils.isNotEmpty(authTargets)) { + authTargets.forEach(deptId -> { + CacheUtils.remove(authCacheKey, request.getAuthTargetType() + deptId); + }); + } + } else { + CacheUtils.remove(authCacheKey, request.getAuthTargetType() + request.getAuthTarget()); + } + } }); } + private List getAuthModels(String id, String type, Long userId, Boolean isAdmin) { + AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class); + List vAuthModelDTOS = sysAuthService + .searchAuthModelTree(new XpackBaseTreeRequest(id, type, "children"), userId, isAdmin); + List authSources = Optional.ofNullable(vAuthModelDTOS).orElse(new ArrayList<>()).stream() + .map(XpackVAuthModelDTO::getId) + .collect(Collectors.toList()); + return authSources; + } private String getAuthCacheKey(XpackSysAuthRequest request) { if (CollectionUtils.isEmpty(cacheTypes)) { From cdc5021e712ac6e981235bcdcc82be838a03670c Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 12:36:09 +0800 Subject: [PATCH 04/29] =?UTF-8?q?refactor:=20=E5=88=86=E4=BA=AB=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/controller/panel/PanelGroupController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java index 3c84fffad6..1c39bf4a55 100644 --- a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java +++ b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java @@ -80,7 +80,7 @@ public class PanelGroupController { @DePermissionProxy(paramIndex = 1) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW) @PostMapping("/proxy/findOne/{id}") - public PanelGroupWithBLOBs proxyFindOne(@PathVariable String id, @RequestBody PermissionProxy proxy) + public PanelGroupDTO proxyFindOne(@PathVariable String id, @RequestBody PermissionProxy proxy) throws Exception { return panelGroupService.findOne(id); } From 3f187634e9d6446fcee3d848dea2a83403a80693 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 12:53:11 +0800 Subject: [PATCH 05/29] =?UTF-8?q?fix:=20=E7=BB=84=E7=BB=87=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=BA=A7=E8=81=94=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/plugins/server/XAuthServer.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java b/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java index b6e71bdf5f..7538a59e38 100644 --- a/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/XAuthServer.java @@ -1,6 +1,5 @@ package io.dataease.plugins.server; - import io.dataease.auth.api.dto.CurrentUserDto; import io.dataease.commons.constants.AuthConstants; import io.dataease.commons.utils.AuthUtils; @@ -20,6 +19,8 @@ import io.dataease.plugins.xpack.auth.service.AuthXpackService; import springfox.documentation.annotations.ApiIgnore; import java.util.*; +import java.util.stream.Collectors; + @ApiIgnore @RequestMapping("/plugin/auth") @RestController @@ -74,11 +75,31 @@ public class XAuthServer { } String authCacheKey = getAuthCacheKey(request); if (StringUtils.isNotBlank(authCacheKey)) { - CacheUtils.remove(authCacheKey, request.getAuthTargetType() + request.getAuthTarget()); + if (StringUtils.equals("dept", request.getAuthTargetType())) { + List authTargets = getAuthModels(request.getAuthTarget(), request.getAuthTargetType(), + user.getUserId(), user.getIsAdmin()); + if (CollectionUtils.isNotEmpty(authTargets)) { + authTargets.forEach(deptId -> { + CacheUtils.remove(authCacheKey, request.getAuthTargetType() + deptId); + }); + } + } else { + CacheUtils.remove(authCacheKey, request.getAuthTargetType() + request.getAuthTarget()); + } + } }); } + private List getAuthModels(String id, String type, Long userId, Boolean isAdmin) { + AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class); + List vAuthModelDTOS = sysAuthService + .searchAuthModelTree(new XpackBaseTreeRequest(id, type, "children"), userId, isAdmin); + List authSources = Optional.ofNullable(vAuthModelDTOS).orElse(new ArrayList<>()).stream() + .map(XpackVAuthModelDTO::getId) + .collect(Collectors.toList()); + return authSources; + } private String getAuthCacheKey(XpackSysAuthRequest request) { if (CollectionUtils.isEmpty(cacheTypes)) { From 539b4a93c665bed247e4a2e4d1381b5c2e164a78 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 2 Mar 2022 14:11:17 +0800 Subject: [PATCH 06/29] =?UTF-8?q?style:=20=E7=BC=96=E8=BE=91=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=B3=E8=BD=AC=E6=BB=9A=E5=8A=A8=E6=9D=A1=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layout/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue index 6b74d3ca00..2d609a192b 100644 --- a/frontend/src/layout/index.vue +++ b/frontend/src/layout/index.vue @@ -170,8 +170,8 @@ export default { .full-height { height: 100vh !important; ::-webkit-scrollbar { - width: 0px; - height: 0px; + width: 5px; + height: 5px; } } From 9ceb19d70ed91e23ab677023be8ecc74fef60118 Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 14:58:19 +0800 Subject: [PATCH 07/29] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 5b59684eff..84f8c778c6 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -13,6 +13,9 @@ + + {{ $t('chart.close') }} + {{ $t('chart.recover') }} @@ -1246,7 +1249,8 @@ export default { this.table = response.data this.initTableField(id) }).catch(err => { - this.resetView() + this.table = null + this.resetDatasetField() this.httpRequest.status = err.response.data.success this.httpRequest.msg = err.response.data.message return true @@ -1525,6 +1529,14 @@ export default { this.$success(this.$t('commons.save_success')) }) }, + close() { + this.closeChangeChart() + // 从仪表板入口关闭 + if (this.$route.path.indexOf('panel') > -1) { + this.$store.commit('recordSnapshot') + bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) + } + }, getData(id) { this.hasEdit = false if (id) { From 75b2b77a40a4d4fb03bf1af8ea3da2594d3aa21d Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 14:58:19 +0800 Subject: [PATCH 08/29] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 5b59684eff..84f8c778c6 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -13,6 +13,9 @@ + + {{ $t('chart.close') }} + {{ $t('chart.recover') }} @@ -1246,7 +1249,8 @@ export default { this.table = response.data this.initTableField(id) }).catch(err => { - this.resetView() + this.table = null + this.resetDatasetField() this.httpRequest.status = err.response.data.success this.httpRequest.msg = err.response.data.message return true @@ -1525,6 +1529,14 @@ export default { this.$success(this.$t('commons.save_success')) }) }, + close() { + this.closeChangeChart() + // 从仪表板入口关闭 + if (this.$route.path.indexOf('panel') > -1) { + this.$store.commit('recordSnapshot') + bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) + } + }, getData(id) { this.hasEdit = false if (id) { From 62cb866a3503e9d4169b129da5f7b90cb07fdaf9 Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 15:40:57 +0800 Subject: [PATCH 09/29] =?UTF-8?q?refactor:=20=E6=8A=98=E7=BA=BF=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/common/common_antv.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js index 4175a70bf1..331a3e45dc 100644 --- a/frontend/src/views/chart/chart/common/common_antv.js +++ b/frontend/src/views/chart/chart/common/common_antv.js @@ -112,7 +112,13 @@ export function getLabel(chart) { if (l.show) { if (chart.type === 'pie') { label = { - type: l.position + type: l.position, + autoRotate: false + } + } else if (chart.type.includes('line')) { + label = { + position: l.position, + offsetY: -8 } } else { label = { From 7d69d3da92c7c189c0044e816318f733c5b48d3c Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 15:40:57 +0800 Subject: [PATCH 10/29] =?UTF-8?q?refactor:=20=E6=8A=98=E7=BA=BF=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/common/common_antv.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js index 4175a70bf1..331a3e45dc 100644 --- a/frontend/src/views/chart/chart/common/common_antv.js +++ b/frontend/src/views/chart/chart/common/common_antv.js @@ -112,7 +112,13 @@ export function getLabel(chart) { if (l.show) { if (chart.type === 'pie') { label = { - type: l.position + type: l.position, + autoRotate: false + } + } else if (chart.type.includes('line')) { + label = { + position: l.position, + offsetY: -8 } } else { label = { From 2239a2031ce8cbd87a38886d30fd7d6f759155e2 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 2 Mar 2022 16:04:31 +0800 Subject: [PATCH 11/29] =?UTF-8?q?refactor:=20=E6=B8=85=E7=90=86=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V32__1.8.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/main/resources/db/migration/V32__1.8.sql b/backend/src/main/resources/db/migration/V32__1.8.sql index 47226bade3..16f86ca68b 100644 --- a/backend/src/main/resources/db/migration/V32__1.8.sql +++ b/backend/src/main/resources/db/migration/V32__1.8.sql @@ -448,3 +448,9 @@ RETURN oTemp; END ;; delimiter ; + +delete from chart_view where id in ( +'ce33ad2c-3915-41cc-8d86-55405456ed05', +'d73eda10-68c9-40e2-b03a-a7cbe3e5b365', +'de923e69-df6b-4f61-9391-da2987f77b51' +); From a40cd1e08a9ec8ff500ba59e750aac8fcf3fc273 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 2 Mar 2022 16:09:09 +0800 Subject: [PATCH 12/29] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BA=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=AF=E9=80=89=E6=8B=A9?= =?UTF-8?q?[API]=E6=95=B0=E6=8D=AE=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/auth/api/demo.java | 28 ------------------- .../auth/service/impl/ShiroServiceImpl.java | 1 - frontend/src/views/dataset/add/AddUnion.vue | 2 +- 3 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 backend/src/main/java/io/dataease/auth/api/demo.java diff --git a/backend/src/main/java/io/dataease/auth/api/demo.java b/backend/src/main/java/io/dataease/auth/api/demo.java deleted file mode 100644 index 04d7ce9c57..0000000000 --- a/backend/src/main/java/io/dataease/auth/api/demo.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.dataease.auth.api; - - -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; - -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.*; - - - -@RestController -@RequestMapping("api/data") -public class demo { - @ApiOperation("查询") - @GetMapping("demo") - public Object listByTableId() { - JSONArray jsonArray = new JSONArray(); - for(int i=0;i<10;i++){ - JSONObject jsonObject = new JSONObject(); - for(int j=0;j<1;j++){ - jsonObject.set("column" +i + j, "value"+i+j); - } - jsonArray.put(jsonObject); - } - return jsonArray; - } -} diff --git a/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java b/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java index be7213cde8..26c74635c7 100644 --- a/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java +++ b/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java @@ -20,7 +20,6 @@ public class ShiroServiceImpl implements ShiroService { // ---------------------------------------------------------- // 放行Swagger2页面,需要放行这些 - filterChainDefinitionMap.put("/api/data/demo", ANON); filterChainDefinitionMap.put("/doc.html**", "doc"); filterChainDefinitionMap.put("/deApi**", ANON); filterChainDefinitionMap.put("/swagger-ui.html", ANON); diff --git a/frontend/src/views/dataset/add/AddUnion.vue b/frontend/src/views/dataset/add/AddUnion.vue index 4620258a46..83212808f6 100644 --- a/frontend/src/views/dataset/add/AddUnion.vue +++ b/frontend/src/views/dataset/add/AddUnion.vue @@ -139,7 +139,7 @@ export default { allChildCount: 0 }, name: '关联数据集', - customType: ['db', 'sql', 'excel'], + customType: ['db', 'sql', 'excel', 'api'], selectDsDialog: false, // 弹框临时选中的数据集 tempDs: {}, From 0df2cbf432f3e183adf7be1781defcca34b78eab Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 2 Mar 2022 17:07:16 +0800 Subject: [PATCH 13/29] =?UTF-8?q?refactor:=20=E6=B8=85=E7=90=86=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V32__1.8.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/src/main/resources/db/migration/V32__1.8.sql b/backend/src/main/resources/db/migration/V32__1.8.sql index 16f86ca68b..01201ca456 100644 --- a/backend/src/main/resources/db/migration/V32__1.8.sql +++ b/backend/src/main/resources/db/migration/V32__1.8.sql @@ -244,7 +244,15 @@ delete from panel_view where id in ( '805b0bdb-8e0a-11ec-8e4b-0242ac130002', '805b0cc1-8e0a-11ec-8e4b-0242ac130002', '805b0cf8-8e0a-11ec-8e4b-0242ac130002', -'805b0d31-8e0a-11ec-8e4b-0242ac130002' +'805b0d31-8e0a-11ec-8e4b-0242ac130002', +'7583dc0d-058d-11ec-a2b0-0242ac130003', +'7583deb5-058d-11ec-a2b0-0242ac130003', +'7583df2c-058d-11ec-a2b0-0242ac130003', +'7583df74-058d-11ec-a2b0-0242ac130003', +'7583dfbe-058d-11ec-a2b0-0242ac130003', +'7583e00f-058d-11ec-a2b0-0242ac130003', +'7583e053-058d-11ec-a2b0-0242ac130003', +'7583e091-058d-11ec-a2b0-0242ac130003' ); INSERT INTO `panel_view` VALUES ('5dafcf9b-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', '84b444e1-0088-44f9-acdc-cc39018413bc', NULL, NULL, NULL, NULL, NULL), ('5dafd1d1-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'c68db172-2df2-4aa2-aad6-077cf1684e14', NULL, NULL, NULL, NULL, NULL), ('5dafd224-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'f8d62b2b-b99a-4b6c-8378-d7c2ec4ea766', NULL, NULL, NULL, NULL, NULL), ('5dafd26e-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'c4943403-4960-4ad8-a9c5-12c46c538c34', NULL, NULL, NULL, NULL, NULL), ('5dafd2ac-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'f257452d-6fc1-4499-bdce-bd10b3e1c520', NULL, NULL, NULL, NULL, NULL), ('5dafd2f1-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', '8271c4e4-43ab-48c6-b7b4-67ccaba3f80b', NULL, NULL, NULL, NULL, NULL), ('5dafd32e-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'a0058881-b29f-4b5c-911f-7f1480b07eb0', NULL, NULL, NULL, NULL, NULL), ('5dafd363-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'c36cd358-0501-4f83-a323-f754485d00b1', NULL, NULL, NULL, NULL, NULL), ('6c200051-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '95f8e3a2-62a5-48a7-a719-fcf53746da8d', NULL, NULL, NULL, NULL, NULL), ('6c2002c2-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '8a26a936-89bf-45a8-b1ce-d5ef1719465d', NULL, NULL, NULL, NULL, NULL), ('6c20030f-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '8d1c3f30-0639-452e-9883-164f37353324', NULL, NULL, NULL, NULL, NULL), ('6c2003ca-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '175b25df-1939-4582-a9c5-d9e8ed3ea2b1', NULL, NULL, NULL, NULL, NULL), ('6c20040d-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'c3da496f-073c-413a-bebd-e7f1a4a00ba7', NULL, NULL, NULL, NULL, NULL), ('6c200442-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'da18eecd-feff-4140-a291-cce4abf1afaa', NULL, NULL, NULL, NULL, NULL), ('6c200478-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '3f201733-bbb3-485e-a1d6-0fe4f00b5304', NULL, NULL, NULL, NULL, NULL), ('6c2004a9-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '692d5bdc-aa70-4fce-b830-b8d6620539c6', NULL, NULL, NULL, NULL, NULL), ('6c2004e4-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'aff5be0c-f195-4fce-bd2b-b8d0e63764de', NULL, NULL, NULL, NULL, NULL), ('6c200530-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'cb66836d-a34c-40c6-87e7-0db0375ec19e', NULL, NULL, NULL, NULL, NULL), ('6c200568-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '1d06e2a0-d936-4192-b523-2eb1e8cebd51', NULL, NULL, NULL, NULL, NULL), ('6c200598-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '0de1d446-8300-4ab3-a4ef-4e8f8579cb2e', NULL, NULL, NULL, NULL, NULL), ('7611e439-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'ebac2821-d1a0-4f26-b5d9-cd5c60ac75ab', NULL, NULL, NULL, NULL, NULL), ('7611e678-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '5ad64afc-132c-40ea-8f69-2f8bfe6b31d4', NULL, NULL, NULL, NULL, NULL), ('7611e6c4-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '4242cbb0-fca4-4b27-b2a7-ca576a18815e', NULL, NULL, NULL, NULL, NULL), ('7611e700-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'c52b6d95-b404-4130-8635-5903cb8d0e84', NULL, NULL, NULL, NULL, NULL), ('7611e7d0-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '2e6f8b45-116d-46c4-a287-f3054e798556', NULL, NULL, NULL, NULL, NULL), ('7611e80a-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '504c0abd-7d31-4771-8ef9-a3494c7bb33c', NULL, NULL, NULL, NULL, NULL), ('7611e844-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '02136575-effb-4a0c-b5be-9886d20259b3', NULL, NULL, NULL, NULL, NULL), ('7611e87d-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '8412d80d-1830-4128-bc6a-019cf32afc7f', NULL, NULL, NULL, NULL, NULL), ('7611e8b5-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '0f9cd623-f319-4bb5-9751-7478abee3bd2', NULL, NULL, NULL, NULL, NULL), ('7611e8ed-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'a1d7bfef-f20c-4739-bfe4-cc55ed0b3fc8', NULL, NULL, NULL, NULL, NULL), ('7611e923-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '68fc74f2-1790-427a-ac22-49fb20edbe9a', NULL, NULL, NULL, NULL, NULL), ('7611e957-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '97400660-27a5-4502-a7cd-274190953a6c', NULL, NULL, NULL, NULL, NULL), ('7611e98f-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '07ece816-f983-493e-b25d-7bfb467d787d', NULL, NULL, NULL, NULL, NULL), ('7611e9c9-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'c124c0f3-3f1f-4635-bac7-f3e1f5503099', NULL, NULL, NULL, NULL, NULL), ('7611ea05-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '984059ca-3f9d-4ee4-9616-e409dd11991e', NULL, NULL, NULL, NULL, NULL), ('7611ea46-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '2de7c3d3-e642-4509-aff1-b2520ebfe85e', NULL, NULL, NULL, NULL, NULL), ('805b082d-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '3a5e4081-4cd5-427f-bd3a-ff7815efaf25', NULL, NULL, NULL, NULL, NULL), ('805b0a85-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '57760693-15db-4de9-9170-55ee7d1eb0eb', NULL, NULL, NULL, NULL, NULL), ('805b0abb-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '0d8bc9d7-b76b-4ec5-96e7-0df1c3426205', NULL, NULL, NULL, NULL, NULL), ('805b0ae0-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '03410ec1-1bd0-4afd-ac37-9306e00e328c', NULL, NULL, NULL, NULL, NULL), ('805b0b0f-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', 'eaa8947b-d9e7-4ca4-ba65-08965dfa620c', NULL, NULL, NULL, NULL, NULL), ('805b0b2d-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '93a58625-3730-4a07-99bd-75f174ff428d', NULL, NULL, NULL, NULL, NULL), ('805b0bdb-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '2f9bf4d5-b1d3-4cac-9df2-2c8827d65bbf', NULL, NULL, NULL, NULL, NULL), ('805b0cc1-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '1aad98e5-3f99-4c0a-aa75-ca9236de0f09', NULL, NULL, NULL, NULL, NULL), ('805b0cf8-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '5f694f25-b0fd-45f6-acbd-9dd338e196ce', NULL, NULL, NULL, NULL, NULL), ('805b0d31-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '9ecb6827-f47f-4b19-b788-81a6b55940af', NULL, NULL, NULL, NULL, NULL); From 0aea242d957765f257b98eb01b8856eaff3e159d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 17:15:17 +0800 Subject: [PATCH 14/29] =?UTF-8?q?style:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=87=AA=E9=80=82=E5=BA=94=E5=B1=8F?= =?UTF-8?q?=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/src/pages/tabBar/home/detail.nvue | 145 ++++++++++------------- 1 file changed, 64 insertions(+), 81 deletions(-) diff --git a/mobile/src/pages/tabBar/home/detail.nvue b/mobile/src/pages/tabBar/home/detail.nvue index 0f15cac181..63dcb2813e 100644 --- a/mobile/src/pages/tabBar/home/detail.nvue +++ b/mobile/src/pages/tabBar/home/detail.nvue @@ -21,13 +21,21 @@ - - - - + + + + + + + + @@ -73,16 +81,15 @@ title: '', banner: {}, htmlNodes: [], - webViewStyles: { - - progress: { - color: '#FF3333' - }, - height: '700px' - }, + url: '', hasStar: false, - refreshCount: 0 + refreshCount: 0, + scrollTop: 0, + old: { + scrollTop: 0 + }, + viewHeight: null } }, onLoad(event) { @@ -101,12 +108,12 @@ uni.setNavigationBarTitle({ title: this.banner.title }); - // this.getDetail(); this.addRecent() uni.$emit('loadHomeIndex', { index: 1 }) this.loadStarStatus() + this.caclViewHeight() }, @@ -118,68 +125,10 @@ uni.navigateBack() }, - onShareAppMessage() { - return { - title: this.banner.title, - path: DETAIL_PAGE_PATH + '?detailDate=' + JSON.stringify(this.banner) - } - }, - onNavigationBarButtonTap(event) { - const buttonIndex = event.index; - if (buttonIndex === 0) { - // 分享 H5 的页面 - const shareProviders = []; - uni.getProvider({ - service: 'share', - success: (result) => { - // 目前仅考虑分享到微信 - if (result.provider && result.provider.length && ~result.provider.indexOf('weixin')) { - const channels = _handleShareChannels(result.provider); - uni.showActionSheet({ - itemList: channels.map(channel => { - return channel.text; - }), - success: (result) => { - const tapIndex = result.tapIndex; - uni.share({ - provider: 'weixin', - type: 0, - title: this.banner.title, - scene: tapIndex === 0 ? 'WXSceneSession' : 'WXSenceTimeline', - href: 'https://uniapp.dcloud.io/h5' + DETAIL_PAGE_PATH + '?detailDate=' + JSON.stringify(this.banner), - imageUrl: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b6304f00-5168-11eb-bd01-97bc1429a9ff.png' - }); - } - }); - } else { - uni.showToast({ - title: '未检测到可用的微信分享服务' - }); - } - }, - fail: (error) => { - uni.showToast({ - title: '获取分享服务失败' - }); - } - }); - } - }, + + methods: { - getDetail() { - uni.request({ - url: 'https://unidemo.dcloud.net.cn/api/news/36kr/' + this.banner.post_id, - success: (data) => { - if (data.statusCode == 200) { - var htmlString = data.data.content.replace(/\\/g, "").replace(/ { - console.log('fail'); - } - }); - }, + addRecent() { const item = {id: this.banner.id, title: this.banner.title, index: this.banner.index} addRecent(item) @@ -215,18 +164,32 @@ }) }, loadLinkUrl() { + + this.url = process.env.VUE_APP_BASE_API + 'tempMobileLink/' + this.banner.id + "/" + getToken() const url = this.url + /* uni.hideLoading() */ setTimeout(() => { const iframe = document.getElementsByTagName("iframe")[0] - + // iframe.style.height = (ktxScreentHeight - ktxStatusHeight) + 'px' iframe.src = url - iframe.onload = e => { - uni.hideLoading() + iframe.onload = e => { + uni.hideLoading() } }, 1000); }, + caclViewHeight() { + let systemInfo = uni.getSystemInfoSync() + let pxToRpxScale = 750 / systemInfo.windowWidth; + // 屏幕的高度 + let ktxScreentHeight = systemInfo.screenHeight * pxToRpxScale + // 状态栏的高度 + let ktxStatusHeight = systemInfo.statusBarHeight * pxToRpxScale + // 导航栏的高度 + let navigationHeight = 44 * pxToRpxScale + this.viewHeight = (ktxScreentHeight - ktxStatusHeight) + 'px' + }, back() { // #ifdef H5 let canBack = true @@ -245,7 +208,27 @@ return // #endif uni.navigateBack(1) - } + }, + upper: function(e) { + console.log(e) + }, + lower: function(e) { + console.log(e) + }, + scroll: function(e) { + console.log(e) + this.old.scrollTop = e.detail.scrollTop + }, + goTop: function(e) { + this.scrollTop = this.old.scrollTop + this.$nextTick(() => { + this.scrollTop = 0 + }); + uni.showToast({ + icon:"none", + title:"纵向滚动 scrollTop 值已被修改为 0" + }) + } } } From a260ffd0d12c7567615ceaed450adfb1ae282b35 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 17:15:17 +0800 Subject: [PATCH 15/29] =?UTF-8?q?style:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=87=AA=E9=80=82=E5=BA=94=E5=B1=8F?= =?UTF-8?q?=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/src/pages/tabBar/home/detail.nvue | 145 ++++++++++------------- 1 file changed, 64 insertions(+), 81 deletions(-) diff --git a/mobile/src/pages/tabBar/home/detail.nvue b/mobile/src/pages/tabBar/home/detail.nvue index 0f15cac181..63dcb2813e 100644 --- a/mobile/src/pages/tabBar/home/detail.nvue +++ b/mobile/src/pages/tabBar/home/detail.nvue @@ -21,13 +21,21 @@ - - - - + + + + + + + + @@ -73,16 +81,15 @@ title: '', banner: {}, htmlNodes: [], - webViewStyles: { - - progress: { - color: '#FF3333' - }, - height: '700px' - }, + url: '', hasStar: false, - refreshCount: 0 + refreshCount: 0, + scrollTop: 0, + old: { + scrollTop: 0 + }, + viewHeight: null } }, onLoad(event) { @@ -101,12 +108,12 @@ uni.setNavigationBarTitle({ title: this.banner.title }); - // this.getDetail(); this.addRecent() uni.$emit('loadHomeIndex', { index: 1 }) this.loadStarStatus() + this.caclViewHeight() }, @@ -118,68 +125,10 @@ uni.navigateBack() }, - onShareAppMessage() { - return { - title: this.banner.title, - path: DETAIL_PAGE_PATH + '?detailDate=' + JSON.stringify(this.banner) - } - }, - onNavigationBarButtonTap(event) { - const buttonIndex = event.index; - if (buttonIndex === 0) { - // 分享 H5 的页面 - const shareProviders = []; - uni.getProvider({ - service: 'share', - success: (result) => { - // 目前仅考虑分享到微信 - if (result.provider && result.provider.length && ~result.provider.indexOf('weixin')) { - const channels = _handleShareChannels(result.provider); - uni.showActionSheet({ - itemList: channels.map(channel => { - return channel.text; - }), - success: (result) => { - const tapIndex = result.tapIndex; - uni.share({ - provider: 'weixin', - type: 0, - title: this.banner.title, - scene: tapIndex === 0 ? 'WXSceneSession' : 'WXSenceTimeline', - href: 'https://uniapp.dcloud.io/h5' + DETAIL_PAGE_PATH + '?detailDate=' + JSON.stringify(this.banner), - imageUrl: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b6304f00-5168-11eb-bd01-97bc1429a9ff.png' - }); - } - }); - } else { - uni.showToast({ - title: '未检测到可用的微信分享服务' - }); - } - }, - fail: (error) => { - uni.showToast({ - title: '获取分享服务失败' - }); - } - }); - } - }, + + methods: { - getDetail() { - uni.request({ - url: 'https://unidemo.dcloud.net.cn/api/news/36kr/' + this.banner.post_id, - success: (data) => { - if (data.statusCode == 200) { - var htmlString = data.data.content.replace(/\\/g, "").replace(/ { - console.log('fail'); - } - }); - }, + addRecent() { const item = {id: this.banner.id, title: this.banner.title, index: this.banner.index} addRecent(item) @@ -215,18 +164,32 @@ }) }, loadLinkUrl() { + + this.url = process.env.VUE_APP_BASE_API + 'tempMobileLink/' + this.banner.id + "/" + getToken() const url = this.url + /* uni.hideLoading() */ setTimeout(() => { const iframe = document.getElementsByTagName("iframe")[0] - + // iframe.style.height = (ktxScreentHeight - ktxStatusHeight) + 'px' iframe.src = url - iframe.onload = e => { - uni.hideLoading() + iframe.onload = e => { + uni.hideLoading() } }, 1000); }, + caclViewHeight() { + let systemInfo = uni.getSystemInfoSync() + let pxToRpxScale = 750 / systemInfo.windowWidth; + // 屏幕的高度 + let ktxScreentHeight = systemInfo.screenHeight * pxToRpxScale + // 状态栏的高度 + let ktxStatusHeight = systemInfo.statusBarHeight * pxToRpxScale + // 导航栏的高度 + let navigationHeight = 44 * pxToRpxScale + this.viewHeight = (ktxScreentHeight - ktxStatusHeight) + 'px' + }, back() { // #ifdef H5 let canBack = true @@ -245,7 +208,27 @@ return // #endif uni.navigateBack(1) - } + }, + upper: function(e) { + console.log(e) + }, + lower: function(e) { + console.log(e) + }, + scroll: function(e) { + console.log(e) + this.old.scrollTop = e.detail.scrollTop + }, + goTop: function(e) { + this.scrollTop = this.old.scrollTop + this.$nextTick(() => { + this.scrollTop = 0 + }); + uni.showToast({ + icon:"none", + title:"纵向滚动 scrollTop 值已被修改为 0" + }) + } } } From 3851f2d4caf6ed140cea36dc25a87319a342291b Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 2 Mar 2022 17:21:40 +0800 Subject: [PATCH 16/29] =?UTF-8?q?fix:=20=E8=A1=8C=E5=88=97=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=9A=84API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/server/ColumnPermissionsController.java | 8 ++++---- .../dataease/plugins/server/RowPermissionsController.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/io/dataease/plugins/server/ColumnPermissionsController.java b/backend/src/main/java/io/dataease/plugins/server/ColumnPermissionsController.java index 714e6b8d36..621750a2ae 100644 --- a/backend/src/main/java/io/dataease/plugins/server/ColumnPermissionsController.java +++ b/backend/src/main/java/io/dataease/plugins/server/ColumnPermissionsController.java @@ -64,12 +64,12 @@ public class ColumnPermissionsController { return columnPermissionService.searchPermissions(request); } - @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) + @DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @ApiOperation("删除") - @PostMapping("/delete/{id}") - public void delete(@PathVariable String id) { + @PostMapping("/delete") + public void delete(@RequestBody DatasetColumnPermissions datasetColumnPermissions) { ColumnPermissionService columnPermissionService = SpringContextUtil.getBean(ColumnPermissionService.class); - columnPermissionService.delete(id); + columnPermissionService.delete(datasetColumnPermissions.getId()); } @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) diff --git a/backend/src/main/java/io/dataease/plugins/server/RowPermissionsController.java b/backend/src/main/java/io/dataease/plugins/server/RowPermissionsController.java index 25b3276e0f..b9d4ef1ea6 100644 --- a/backend/src/main/java/io/dataease/plugins/server/RowPermissionsController.java +++ b/backend/src/main/java/io/dataease/plugins/server/RowPermissionsController.java @@ -62,12 +62,12 @@ public class RowPermissionsController { return rowPermissionService.searchRowPermissions(request); } - @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) + @DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @ApiOperation("删除") - @PostMapping("/delete/{id}") - public void dataSetRowPermissionInfo(@PathVariable String id) { + @PostMapping("/delete") + public void dataSetRowPermissionInfo(@RequestBody DatasetRowPermissions datasetRowPermissions) { RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class); - rowPermissionService.delete(id); + rowPermissionService.delete(datasetRowPermissions.getId()); } @DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) From 3d4e33c8cae194cb4918f4efe062ab08022607c3 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 2 Mar 2022 17:49:14 +0800 Subject: [PATCH 17/29] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BA=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=95=B0=E6=8D=AE=E9=9B=86=E6=97=B6=EF=BC=8C=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E7=A9=BA=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/authModel/VAuthModelService.java | 21 +++++-------------- frontend/src/views/dataset/add/AddUnion.vue | 4 ++-- .../src/views/dataset/add/union/NodeItem.vue | 6 +++--- .../src/views/system/task/DatasetTaskList.vue | 2 +- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/authModel/VAuthModelService.java b/backend/src/main/java/io/dataease/service/authModel/VAuthModelService.java index 7bb93527ac..6aeffd908a 100644 --- a/backend/src/main/java/io/dataease/service/authModel/VAuthModelService.java +++ b/backend/src/main/java/io/dataease/service/authModel/VAuthModelService.java @@ -26,14 +26,12 @@ public class VAuthModelService { public List queryAuthModel(VAuthModelRequest request) { request.setUserId(String.valueOf(AuthUtils.getUser().getUserId())); - // 定时任务选数据集时,列表需去除空目录 - if (request.isClearEmptyDir()) { - request.setMode(null); - } List result = extVAuthModelMapper.queryAuthModel(request); - // 定时任务选数据集时,列表需去除空目录 + + if (request.getPrivileges() != null) { + result = filterPrivileges(request, result); + } if (request.isClearEmptyDir()) { - result = filterData(request, result); List vAuthModelDTOS = TreeUtils.mergeTree(result); setAllLeafs(vAuthModelDTOS); removeEmptyDir(vAuthModelDTOS); @@ -42,16 +40,7 @@ public class VAuthModelService { return TreeUtils.mergeTree(result); } - private List filterData(VAuthModelRequest request, List result) { - if (request.getDatasetMode() != null && request.getDatasetMode() == 1) { - result = result.stream().filter(vAuthModelDTO -> { - if (vAuthModelDTO.getNodeType().equalsIgnoreCase("spine") || (vAuthModelDTO.getNodeType().equalsIgnoreCase("leaf") && vAuthModelDTO.getMode().equals(1L)) && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("excel") && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("custom") && !vAuthModelDTO.getModelInnerType().equalsIgnoreCase("union")) { - return true; - } else { - return false; - } - }).collect(Collectors.toList()); - } + private List filterPrivileges(VAuthModelRequest request, List result) { if (request.getPrivileges() != null) { result = result.stream().filter(vAuthModelDTO -> { if (vAuthModelDTO.getNodeType().equalsIgnoreCase("spine") || (vAuthModelDTO.getNodeType().equalsIgnoreCase("leaf") && vAuthModelDTO.getPrivileges() != null && vAuthModelDTO.getPrivileges().contains(request.getPrivileges()))) { diff --git a/frontend/src/views/dataset/add/AddUnion.vue b/frontend/src/views/dataset/add/AddUnion.vue index 83212808f6..5d73a9ae08 100644 --- a/frontend/src/views/dataset/add/AddUnion.vue +++ b/frontend/src/views/dataset/add/AddUnion.vue @@ -60,7 +60,7 @@ - +