From 742fdf422af64524de971f8618d11eff54f1a75a Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 31 Aug 2022 16:23:21 +0800
Subject: [PATCH 1/8] =?UTF-8?q?style(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E8=BE=85=E5=8A=A9=E7=BD=91=E6=A0=BC=E6=8C=89=E9=92=AE=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/canvas/components/Toolbar.vue | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue
index ba47aeebba..44096977d0 100644
--- a/frontend/src/components/canvas/components/Toolbar.vue
+++ b/frontend/src/components/canvas/components/Toolbar.vue
@@ -74,7 +74,7 @@
{{ $t('panel.aided_grid') }}
-
+
@@ -600,10 +600,14 @@ export default {
::v-deep .el-switch__core::after {
width: 14px;
height: 14px;
- margin-top: -1px;
+ margin-top: -1.3px;
margin-bottom: 2px;
}
+.grid-active ::v-deep .el-switch__core::after {
+ margin-left: -14.5px;
+}
+
.iconfont-tb {
font-family: "iconfont" !important;
font-size: 12px;
From ee9a8d69067395d01b2a079f6e0df6149a24ca86 Mon Sep 17 00:00:00 2001
From: taojinlong
Date: Wed, 31 Aug 2022 16:36:04 +0800
Subject: [PATCH 2/8] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20api=20?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=8D=A2=E8=A1=8C=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/io/dataease/provider/datasource/ApiProvider.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/main/java/io/dataease/provider/datasource/ApiProvider.java b/backend/src/main/java/io/dataease/provider/datasource/ApiProvider.java
index 401e79df28..da6d25f20c 100644
--- a/backend/src/main/java/io/dataease/provider/datasource/ApiProvider.java
+++ b/backend/src/main/java/io/dataease/provider/datasource/ApiProvider.java
@@ -374,7 +374,7 @@ public class ApiProvider extends Provider {
for (int i = 0; i < jsonPaths.size(); i++) {
List datas = new ArrayList<>();
Object object = JsonPath.read(result, jsonPaths.get(i));
- if (object instanceof List) {
+ if (object instanceof List && jsonPaths.get(i).contains("[*]")) {
datas = (List) object;
} else {
if (object != null) {
@@ -390,7 +390,7 @@ public class ApiProvider extends Provider {
}
for (int i = 0; i < columnDataList.size(); i++) {
for (int j = 0; j < columnDataList.get(i).size(); j++) {
- dataList.get(j)[i] = String.valueOf(columnDataList.get(i).get(j));
+ dataList.get(j)[i] = Optional.ofNullable(columnDataList.get(i).get(j)).orElse("").replaceAll("\n", " ").replaceAll("\r", " ");
}
}
}
From 549ee2a4ad49c6563d0f52e3c2c6159fcbb2c5dc Mon Sep 17 00:00:00 2001
From: taojinlong
Date: Wed, 31 Aug 2022 16:39:46 +0800
Subject: [PATCH 3/8] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?=
=?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/lang/en.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js
index 6a4868a6b4..381baaf87b 100644
--- a/frontend/src/lang/en.js
+++ b/frontend/src/lang/en.js
@@ -2219,7 +2219,7 @@ export default {
i18n_msg_type_all: 'All type',
i18n_msg_type_ds_invalid: 'Datasource invalid',
channel_inner_msg: 'On site news',
- channel_email_msg: 'Email reminder'
+ channel_email_msg: 'Mail notification'
},
denumberrange: {
label: 'Number range',
From 05e96c94e21551e0692cec1cabadaff7c8c071cf Mon Sep 17 00:00:00 2001
From: taojinlong
Date: Wed, 31 Aug 2022 16:53:16 +0800
Subject: [PATCH 4/8] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20sql=20?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=98=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../io/dataease/service/dataset/DataSetTableService.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
index 7b954e10f2..3322035bde 100644
--- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
+++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
@@ -1032,7 +1032,7 @@ public class DataSetTableService {
}
Expression expr = plainSelect.getWhere();
if (expr == null) {
- return plainSelect.toString();
+ return handleWith(plainSelect, select);
}
StringBuilder stringBuilder = new StringBuilder();
BinaryExpression binaryExpression = null;
@@ -1046,7 +1046,10 @@ public class DataSetTableService {
expr.accept(getExpressionDeParser(stringBuilder));
}
plainSelect.setWhere(CCJSqlParserUtil.parseCondExpression(stringBuilder.toString()));
+ return handleWith(plainSelect, select);
+ }
+ private String handleWith(PlainSelect plainSelect, Select select)throws Exception{
StringBuilder builder = new StringBuilder();
if (CollectionUtils.isNotEmpty(select.getWithItemsList())) {
builder.append("WITH");
@@ -1063,7 +1066,6 @@ public class DataSetTableService {
builder.append(" " + plainSelect);
return builder.toString();
}
-
public Map getSQLPreview(DataSetTableRequest dataSetTableRequest) throws Exception {
Datasource ds = datasourceMapper.selectByPrimaryKey(dataSetTableRequest.getDataSourceId());
if (ds == null) {
From 193423bb9874815bf4b614776f4bf4d983007b88 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 31 Aug 2022 16:56:34 +0800
Subject: [PATCH 5/8] =?UTF-8?q?refactor:=20=E6=A0=B7=E5=BC=8F=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=E7=BC=A9=E7=95=A5=E5=9B=BE=E5=A2=9E=E5=8A=A0=E5=88=86?=
=?UTF-8?q?=E7=B1=BB=E9=83=A8=E7=BD=B2=E8=AF=BB=E5=8F=96=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/background/index.vue | 4 ++--
.../panel/SubjectSetting/PanelStyle/BackgroundSelector.vue | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/frontend/src/views/background/index.vue b/frontend/src/views/background/index.vue
index fb078f4449..5b1ff9de34 100644
--- a/frontend/src/views/background/index.vue
+++ b/frontend/src/views/background/index.vue
@@ -132,7 +132,7 @@
import { queryBackground } from '@/api/background/background'
import BackgroundItem from '@/views/background/BackgroundItem'
import { mapState } from 'vuex'
-import { deepCopy } from '@/components/canvas/utils/utils'
+import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils'
import { COLOR_PANEL } from '@/views/chart/chart/chart'
import { uploadFileResult } from '@/api/staticResource/staticResource'
import { COMMON_BACKGROUND_NONE } from '@/components/canvas/custom-component/component-list'
@@ -171,7 +171,7 @@ export default {
methods: {
init() {
if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
- this.fileList.push({ url: this.curComponent.commonBackground.outerImage })
+ this.fileList.push({ url: imgUrlTrans(this.curComponent.commonBackground.outerImage) })
}
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE)
this.queryBackground()
diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue
index 9d091f55e4..687d98a346 100644
--- a/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue
+++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue
@@ -52,6 +52,8 @@ import { mapState } from 'vuex'
import { deepCopy } from '@/components/canvas/utils/utils'
import { COLOR_PANEL } from '@/views/chart/chart/chart'
import { uploadFileResult } from '@/api/staticResource/staticResource'
+import {imgUrlTrans} from "@/components/canvas/utils/utils";
+
export default {
name: 'BackgroundSelector',
@@ -77,7 +79,7 @@ export default {
// 初始化赋值
this.panel = this.canvasStyleData.panel
if (this.panel.imageUrl && typeof (this.panel.imageUrl) === 'string') {
- this.fileList.push({ url: this.panel.imageUrl })
+ this.fileList.push({ url: imgUrlTrans(this.panel.imageUrl) })
}
},
methods: {
@@ -111,7 +113,7 @@ export default {
uploadFileResult(file.file, (fileUrl) => {
_this.$store.commit('canvasChange')
_this.panel.imageUrl = fileUrl
- _this.fileList = [{ url: this.panel.imageUrl }]
+ _this.fileList = [{ url: imgUrlTrans(this.panel.imageUrl) }]
_this.commitStyle()
})
},
From 630087dc91dfeba5eb1db34fcf74e52d5042ead2 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 31 Aug 2022 17:23:39 +0800
Subject: [PATCH 6/8] =?UTF-8?q?style:=20Tab=E7=BB=84=E4=BB=B6=E4=B8=AD?=
=?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E8=A7=86=E5=9B=BE=E4=B8=8D=E9=9C=80?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=98=8E=E6=98=BE=E6=94=BE=E5=A4=A7=E6=8C=89?=
=?UTF-8?q?=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../canvas/components/Editor/EditBarView.vue | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/frontend/src/components/canvas/components/Editor/EditBarView.vue b/frontend/src/components/canvas/components/Editor/EditBarView.vue
index 929181b3ea..8a9259c9f8 100644
--- a/frontend/src/components/canvas/components/Editor/EditBarView.vue
+++ b/frontend/src/components/canvas/components/Editor/EditBarView.vue
@@ -4,10 +4,10 @@
-
+
-
+
@@ -63,6 +63,12 @@ export default {
}
},
computed: {
+ detailsShow(){
+ return this.element.propValue.innerType !== 'richTextView'
+ },
+ enlargeShow(){
+ return this.element.propValue.innerType !== 'richTextView'
+ },
// gapStyle() {
// return {
// 'right': this.curGap + 'px!important'
From 41169bf62e9ce3f79ff3de76a083293cb96dd37f Mon Sep 17 00:00:00 2001
From: fit2cloud-chenyw
Date: Wed, 31 Aug 2022 18:07:40 +0800
Subject: [PATCH 7/8] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86):=20=E5=AF=BC=E5=85=A5?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../commons/constants/AuthConstants.java | 4 ++++
.../dataease/plugins/server/XUserServer.java | 19 ++++++++++---------
frontend/src/lang/en.js | 4 +++-
frontend/src/lang/tw.js | 4 +++-
frontend/src/lang/zh.js | 4 +++-
frontend/src/settings.js | 1 +
frontend/src/styles/index.scss | 7 +++++++
frontend/src/utils/request.js | 13 ++++++++++++-
8 files changed, 43 insertions(+), 13 deletions(-)
diff --git a/backend/src/main/java/io/dataease/commons/constants/AuthConstants.java b/backend/src/main/java/io/dataease/commons/constants/AuthConstants.java
index 2e33f7581c..6bd0f2f3d6 100644
--- a/backend/src/main/java/io/dataease/commons/constants/AuthConstants.java
+++ b/backend/src/main/java/io/dataease/commons/constants/AuthConstants.java
@@ -21,4 +21,8 @@ public class AuthConstants {
public final static String DEPT_DATASET_NAME = "dept_dataset";
public final static String DEPT_PANEL_NAME = "dept_panel";
+
+
+ public static final String DE_DOWN_ERROR_KEY = "de-down-error-msg";
+
}
diff --git a/backend/src/main/java/io/dataease/plugins/server/XUserServer.java b/backend/src/main/java/io/dataease/plugins/server/XUserServer.java
index 1a66947faf..d4ce11e3ed 100644
--- a/backend/src/main/java/io/dataease/plugins/server/XUserServer.java
+++ b/backend/src/main/java/io/dataease/plugins/server/XUserServer.java
@@ -1,7 +1,7 @@
package io.dataease.plugins.server;
-import io.dataease.commons.exception.DEException;
-import io.dataease.i18n.Translator;
+import io.dataease.commons.constants.AuthConstants;
+import io.dataease.commons.utils.LogUtil;
import io.dataease.plugins.config.SpringContextUtil;
import io.dataease.plugins.xpack.user.service.UserXpackService;
import io.swagger.annotations.Api;
@@ -31,23 +31,24 @@ public class XUserServer {
@ApiOperation("导入")
@PostMapping("/upload")
- public void upload(@RequestPart(value = "file", required = true) MultipartFile file, HttpServletResponse response) throws Exception{
+ public void upload(@RequestPart(value = "file", required = true) MultipartFile file, HttpServletResponse response) {
if (file.getSize() > MAXSIZE) {
String msgKey = "i18n_max_user_import_size";
- String msg = Translator.get(msgKey);
- DEException.throwException(msg);
+ response.addHeader("Access-Control-Expose-Headers", AuthConstants.DE_DOWN_ERROR_KEY);
+ response.setHeader(AuthConstants.DE_DOWN_ERROR_KEY, msgKey);
+ return;
}
UserXpackService userXpackService = SpringContextUtil.getBean(UserXpackService.class);
try{
userXpackService.upload(file, response);
}catch (Exception e) {
+ response.addHeader("Access-Control-Expose-Headers", AuthConstants.DE_DOWN_ERROR_KEY);
if (StringUtils.contains(e.getMessage(), "template file error")) {
-
- DEException.throwException(Translator.get("I18N_USER_TEMPLATE_ERROR"));
+ response.setHeader(AuthConstants.DE_DOWN_ERROR_KEY, "I18N_USER_TEMPLATE_ERROR");
}else {
- DEException.throwException(e.getMessage());
+ response.setHeader(AuthConstants.DE_DOWN_ERROR_KEY, e.getMessage());
}
-
+ LogUtil.error(e.getMessage());
}
}
}
diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js
index ca4c7eb98e..dcd4cc7d8c 100644
--- a/frontend/src/lang/en.js
+++ b/frontend/src/lang/en.js
@@ -2438,6 +2438,8 @@ export default {
attr: 'Attribute',
empty: 'Empty',
please_select_map: 'Please select a range of map'
- }
+ },
+ 'I18N_USER_TEMPLATE_ERROR': 'Template file error',
+ 'i18n_max_user_import_size': 'File size exceeds 10M'
}
diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js
index 8361c1c3b3..12065f458b 100644
--- a/frontend/src/lang/tw.js
+++ b/frontend/src/lang/tw.js
@@ -2460,5 +2460,7 @@ export default {
attr: '屬性',
empty: '無數據',
please_select_map: '請先選擇地圖範圍'
- }
+ },
+ 'I18N_USER_TEMPLATE_ERROR': '模版錯誤',
+ 'i18n_max_user_import_size': '文件最大不能超過10M'
}
diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js
index 8ee7a1d4dd..0a09f968bf 100644
--- a/frontend/src/lang/zh.js
+++ b/frontend/src/lang/zh.js
@@ -2460,5 +2460,7 @@ export default {
attr: '属性',
empty: '无数据',
please_select_map: '请先选择地图范围'
- }
+ },
+ 'I18N_USER_TEMPLATE_ERROR': '模版错误',
+ 'i18n_max_user_import_size': '文件最大不能超过10M'
}
diff --git a/frontend/src/settings.js b/frontend/src/settings.js
index 2a4f98b21d..24e96017fc 100644
--- a/frontend/src/settings.js
+++ b/frontend/src/settings.js
@@ -7,6 +7,7 @@ module.exports = {
IdTokenKey: 'IdToken',
AccessTokenKey: 'AccessToken',
CASSESSION: 'JSESSIONID',
+ DownErrorKey: 'de-down-error-msg',
/**
* @type {boolean} true | false
diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss
index e601d6a8e1..159a11cf2b 100644
--- a/frontend/src/styles/index.scss
+++ b/frontend/src/styles/index.scss
@@ -1202,4 +1202,11 @@ div:focus {
}
}
}
+}
+
+.upload-user{
+ margin-bottom: 5px;
+ .el-upload{
+ width: 100%;
+ }
}
\ No newline at end of file
diff --git a/frontend/src/utils/request.js b/frontend/src/utils/request.js
index be504d62b5..313bf12fcb 100644
--- a/frontend/src/utils/request.js
+++ b/frontend/src/utils/request.js
@@ -11,6 +11,7 @@ import Vue from 'vue'
const TokenKey = Config.TokenKey
const RefreshTokenKey = Config.RefreshTokenKey
const LinkTokenKey = Config.LinkTokenKey
+const DownErrorKey = Config.DownErrorKey
import Cookies from 'js-cookie'
const getTimeOut = () => {
@@ -98,6 +99,9 @@ service.interceptors.response.use(response => {
response.config.loading && tryHideLoading(store.getters.currentPath)
checkAuth(response)
Vue.prototype.$currentHttpRequestList.delete(response.config.url)
+ if (checkDownError(response)) {
+ return response
+ }
return response.data
}, error => {
const config = error.response && error.response.config || error.config
@@ -114,7 +118,14 @@ service.interceptors.response.use(response => {
!config.hideMsg && (!headers['authentication-status']) && $error(msg)
return Promise.reject(error)
})
-
+const checkDownError = response => {
+ if (response.request && response.request.responseType && response.request.responseType === 'blob' && response.headers && response.headers['de-down-error-msg']) {
+ const msg = i18n.t(response.headers[DownErrorKey])
+ $error(msg)
+ return true
+ }
+ return false
+}
const checkAuth = response => {
if (response.headers['authentication-status'] === 'login_expire') {
const message = i18n.t('login.expires')
From 1bd7d171c2c1ab91fdadaea1629a4a3579f0f083 Mon Sep 17 00:00:00 2001
From: fit2cloud-chenyw
Date: Wed, 31 Aug 2022 18:28:16 +0800
Subject: [PATCH 8/8] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?=
=?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86):=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/src/main/resources/db/migration/V39__1.14.sql | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/backend/src/main/resources/db/migration/V39__1.14.sql b/backend/src/main/resources/db/migration/V39__1.14.sql
index 195bd11f49..f9a0c115ff 100644
--- a/backend/src/main/resources/db/migration/V39__1.14.sql
+++ b/backend/src/main/resources/db/migration/V39__1.14.sql
@@ -83,4 +83,10 @@ WHERE
BEGIN;
DELETE from `sys_menu` where `menu_id` = 55;
DELETE from `sys_menu` where `menu_id` = 56;
+COMMIT;
+
+BEGIN;
+UPDATE `my_plugin` set cost = '60000', `creator` = 'DATAEASE' WHERE `module_name` = 'deplugin-xpack-backend';
+UPDATE `my_plugin` set cost = '0', `creator` = 'DATAEASE' WHERE `module_name` = 'view-bubblemap-backend';
+UPDATE `my_plugin` set cost = '0', `creator` = 'DATAEASE' WHERE `module_name` = 'view-symbolmap-backend';
COMMIT;
\ No newline at end of file