diff --git a/backend/src/main/java/io/dataease/controller/dataset/DatasetFunctionController.java b/backend/src/main/java/io/dataease/controller/dataset/DatasetFunctionController.java index 88dc66177f..d9cd8c5183 100644 --- a/backend/src/main/java/io/dataease/controller/dataset/DatasetFunctionController.java +++ b/backend/src/main/java/io/dataease/controller/dataset/DatasetFunctionController.java @@ -3,7 +3,6 @@ package io.dataease.controller.dataset; import com.github.xiaoymin.knife4j.annotations.ApiSupport; import io.dataease.auth.annotation.DePermission; import io.dataease.commons.constants.DePermissionType; -import io.dataease.commons.constants.ResourceAuthLevel; import io.dataease.plugins.common.base.domain.DatasetTableFunction; import io.dataease.service.dataset.DatasetFunctionService; import io.swagger.annotations.Api; @@ -28,7 +27,7 @@ public class DatasetFunctionController { @Resource private DatasetFunctionService datasetFunctionService; - @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) + @DePermission(type = DePermissionType.DATASET) @ApiOperation("查询") @PostMapping("listByTableId/{tableId}") public List listByTableId(@PathVariable String tableId) { diff --git a/backend/src/main/java/io/dataease/service/sys/PluginService.java b/backend/src/main/java/io/dataease/service/sys/PluginService.java index 2fa937a64e..6f8b118046 100644 --- a/backend/src/main/java/io/dataease/service/sys/PluginService.java +++ b/backend/src/main/java/io/dataease/service/sys/PluginService.java @@ -11,14 +11,12 @@ import io.dataease.commons.exception.DEException; import io.dataease.commons.utils.CodingUtil; import io.dataease.commons.utils.DeFileUtils; import io.dataease.commons.utils.LogUtil; -import io.dataease.commons.utils.ZipUtils; import io.dataease.controller.sys.base.BaseGridRequest; import io.dataease.i18n.Translator; import io.dataease.listener.util.CacheUtils; import io.dataease.plugins.common.base.domain.MyPlugin; import io.dataease.plugins.common.base.mapper.MyPluginMapper; import io.dataease.plugins.config.LoadjarUtil; -import io.dataease.plugins.config.SpringContextUtil; import io.dataease.service.datasource.DatasourceService; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ArrayUtils; @@ -31,7 +29,6 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import java.io.File; -import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; @@ -98,14 +95,14 @@ public class PluginService { DeFileUtils.deleteFile(folder); String msg = "缺少插件描述文件【plugin.json】"; LogUtil.error(msg); - DEException.throwException(new RuntimeException(msg)); + DEException.throwException(msg); } MyPluginDTO myPlugin = formatJsonFile(jsonFiles[0]); if (!versionMatch(myPlugin.getRequire())) { String msg = "当前插件要求系统版本最低为:" + myPlugin.getRequire(); LogUtil.error(msg); - DEException.throwException(new RuntimeException(msg)); + DEException.throwException(msg); } //4.加载jar包 失败则 直接返回错误 删除文件 File[] jarFiles = folderFile.listFiles(this::isPluginJar); @@ -114,13 +111,13 @@ public class PluginService { DeFileUtils.deleteFile(folder); String msg = "缺少插件jar文件"; LogUtil.error(msg); - DEException.throwException(new RuntimeException(msg)); + DEException.throwException(msg); } if (pluginExist(myPlugin)) { String msg = "插件【"+myPlugin.getName()+"】已存在,请先卸载"; LogUtil.error(msg); - DEException.throwException(new RuntimeException(msg)); + DEException.throwException(msg); } String targetDir = null; try { @@ -188,7 +185,7 @@ public class PluginService { if (ObjectUtils.isEmpty(myPlugin)) { String msg = "当前插件不存在"; LogUtil.error(msg); - DEException.throwException(new RuntimeException(msg)); + DEException.throwException(msg); } deleteJarFile(myPlugin); CacheUtils.removeAll(AuthConstants.USER_CACHE_NAME); @@ -197,7 +194,7 @@ public class PluginService { if(myPlugin.getCategory().equalsIgnoreCase("datasource")){ if(CollectionUtils.isNotEmpty(datasourceService.selectByType(myPlugin.getDsType()))){ - throw new RuntimeException(Translator.get("i18n_plugin_not_allow_delete")); + DEException.throwException(Translator.get("i18n_plugin_not_allow_delete")); } loadjarUtil.deleteModule(myPlugin.getModuleName() + "-" + myPlugin.getVersion()); } diff --git a/frontend/src/components/ElTreeSelect/index.vue b/frontend/src/components/ElTreeSelect/index.vue index df60a28571..c135597b03 100644 --- a/frontend/src/components/ElTreeSelect/index.vue +++ b/frontend/src/components/ElTreeSelect/index.vue @@ -470,15 +470,26 @@ export default { _treeCheckFun(data, node, vm) { this.ids = [] const { propsValue } = this - node.checkedNodes.forEach(item => { + const checkKeys = this.$refs.tree.getCheckedKeys() + checkKeys.forEach((i, n) => { + const node = this.$refs.tree.getNode(i) + if (!node.visible && node.checked) { + this.$refs.tree.setChecked(i, false) + } + }) + + const checkedNodes = this.$refs.tree.getCheckedNodes() + + checkedNodes.forEach(item => { this.ids.push(item[propsValue]) }) /* - 点击复选框,对外抛出 `data, node, vm`
- `data:` 当前点击的节点数据
- `node:` 当前点击的node
- `vm:` 当前组件的vm - */ + 点击复选框,对外抛出 `data, node, vm`
+ `data:` 当前点击的节点数据
+ `node:` 当前点击的node
+ `vm:` 当前组件的vm + */ + node.checkedKeys = checkedNodes.map(node => node.id) this.$emit('check', data, node, vm) this._emitFun() }, diff --git a/frontend/src/views/chart/chart/gauge/gauge_antv.js b/frontend/src/views/chart/chart/gauge/gauge_antv.js index b554959fdc..7349aee01a 100644 --- a/frontend/src/views/chart/chart/gauge/gauge_antv.js +++ b/frontend/src/views/chart/chart/gauge/gauge_antv.js @@ -25,6 +25,7 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) { endAngel = parseInt(size.gaugeEndAngle) * Math.PI / 180 } } + const per = (parseFloat(data) - parseFloat(min)) / (parseFloat(max) - parseFloat(min)) // label if (customAttr.label) { const label = JSON.parse(JSON.stringify(customAttr.label)) @@ -49,7 +50,6 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) { } labelFormatter = label.gaugeLabelFormatter ? label.gaugeLabelFormatter : DEFAULT_LABEL.gaugeLabelFormatter } - const per = (parseFloat(data) - parseFloat(min)) / (parseFloat(max) - parseFloat(min)) const range = [0] let index = 0 diff --git a/frontend/src/views/chart/view/CalcChartFieldEdit.vue b/frontend/src/views/chart/view/CalcChartFieldEdit.vue index 757a6598f9..13582385d8 100644 --- a/frontend/src/views/chart/view/CalcChartFieldEdit.vue +++ b/frontend/src/views/chart/view/CalcChartFieldEdit.vue @@ -298,6 +298,7 @@ export default { watch: { 'param': function() { this.initFunctions() + this.initDsFields() }, 'field': { handler: function() { @@ -333,7 +334,7 @@ export default { this.$refs.myCm.codemirror.showHint() }) this.initFunctions() - // this.initField() + this.initDsFields() }, methods: { onCmReady(cm) { @@ -364,8 +365,6 @@ export default { post('/dataset/function/listByTableId/' + this.param.tableId, null).then(response => { this.functions = response.data this.functionData = JSON.parse(JSON.stringify(this.functions)) - - this.initDsFields() }) }, diff --git a/frontend/src/views/chart/view/ChartFieldEdit.vue b/frontend/src/views/chart/view/ChartFieldEdit.vue index 35f6efe6bf..4030b5ce80 100644 --- a/frontend/src/views/chart/view/ChartFieldEdit.vue +++ b/frontend/src/views/chart/view/ChartFieldEdit.vue @@ -28,7 +28,6 @@ @@ -40,7 +39,6 @@ v-model="scope.row.deType" size="mini" style="display: inline-block;width: 26px;" - :disabled="!hasDataPermission('manage',param.privileges)" @change="saveEdit(scope.row)" > @@ -158,7 +155,6 @@ @@ -306,7 +298,6 @@