-
{{ $t('commons.organization')}}
-
-
{{ ele.label }}
-
+
+
{{ $t("commons.organization") }}
+
+ {{ ele.label }}
-
+
+
+
+
+
+
+ + {{ $t("panel.more") }}
+
+
+
+
+
{{ $t("panel.role") }}
+
+ {{ ele.name }}
+
-
+
+ + {{ $t("panel.more") }}
- + {{ $t('panel.more')}}
-
-
-
-
-
{{ $t('panel.role')}}
-
- {{ ele.name }}
-
-
-
-
- + {{ $t('panel.more')}}
-
+
@@ -131,13 +135,16 @@ export default {
deptCahe: [],
roles: [],
filterTextMap: [],
- status: [{
- id: 1,
- label: 'commons.enable'
- },{
- id: 0,
- label: 'commons.disable'
- }],
+ status: [
+ {
+ id: 1,
+ label: "commons.enable",
+ },
+ {
+ id: 0,
+ label: "commons.disable",
+ },
+ ],
activeStatus: [],
rolesValue: [],
activeRole: [],
@@ -150,56 +157,72 @@ export default {
label: "label",
isLeaf: "leaf",
},
- userDrawer: false
+ userDrawer: false,
};
},
computed: {
rolesComputed() {
- return this.roles.filter(ele => !this.activeRole.includes(ele.id))
+ return this.roles.filter((ele) => !this.activeRole.includes(ele.id));
},
rolesValueCopy() {
- return this.roleCahe.filter(ele => this.activeRole.includes(ele.id))
+ return this.roleCahe.filter((ele) => this.activeRole.includes(ele.id));
},
deptsComputed() {
- return this.depts.filter(ele => !this.activeDept.includes(ele.id))
- }
+ return this.depts.filter((ele) => !this.activeDept.includes(ele.id));
+ },
},
mounted() {
this.initRoles();
},
methods: {
clearFilter() {
- Array(3).fill(1).forEach((_, index) => {
- this.clearOneFilter(index)
- })
- this.$emit('search', [], [])
+ Array(3)
+ .fill(1)
+ .forEach((_, index) => {
+ this.clearOneFilter(index);
+ });
+ this.$emit("search", [], []);
},
clearOneFilter(index) {
- (this.filterTextMap[index] || []).forEach(ele => {
- this[ele] = []
- })
+ (this.filterTextMap[index] || []).forEach((ele) => {
+ this[ele] = [];
+ });
},
// 获取弹窗内部门数据
treeByDeptId() {
treeByDeptId(0).then((res) => {
- this.depts = (res.data || []).map(ele => {
- return {
+ this.depts = (res.data || []).map((ele) => {
+ return {
...ele,
leaf: !ele.hasChildren,
- }
- })
+ };
+ });
});
},
changeRole() {
- if (this.roleCahe.length > this.rolesValue.length + this.activeRole.length) {
- this.roleCahe = this.roleCahe.filter(ele => this.rolesValue.map(ele => ele.id).concat(this.activeRole).includes(ele.id));
+ if (
+ this.roleCahe.length >
+ this.rolesValue.length + this.activeRole.length
+ ) {
+ this.roleCahe = this.roleCahe.filter((ele) =>
+ this.rolesValue
+ .map((ele) => ele.id)
+ .concat(this.activeRole)
+ .includes(ele.id)
+ );
return;
}
- const roleIdx = this.rolesValue.findIndex(ele => !this.roleCahe.map(ele => ele.id).concat(this.activeRole).includes(ele.id));
- if (roleIdx === -1) return
- this.activeRole.push(this.rolesValue[roleIdx].id)
+ const roleIdx = this.rolesValue.findIndex(
+ (ele) =>
+ !this.roleCahe
+ .map((ele) => ele.id)
+ .concat(this.activeRole)
+ .includes(ele.id)
+ );
+ if (roleIdx === -1) return;
+ this.activeRole.push(this.rolesValue[roleIdx].id);
this.roleCahe.push(this.rolesValue[roleIdx]);
- this.rolesValue.splice(roleIdx, 1)
+ this.rolesValue.splice(roleIdx, 1);
},
activeRoleChange(id) {
const roleIndex = this.activeRole.findIndex((ele) => ele === id);
@@ -216,22 +239,26 @@ export default {
const deptIdx = this.selectDepts.findIndex((ele) => ele.id === id);
if (deptIdx !== -1) {
this.selectDepts.splice(deptIdx, 1);
- this.selectDeptsCahe = this.selectDeptsCahe.filter(ele => ele.id !== id)
- this.deptCahe = this.deptCahe.filter(ele => ele.id !== id)
+ this.selectDeptsCahe = this.selectDeptsCahe.filter(
+ (ele) => ele.id !== id
+ );
+ this.deptCahe = this.deptCahe.filter((ele) => ele.id !== id);
return;
}
- this.activeDept.push(id)
+ this.activeDept.push(id);
this.selectDeptsCahe.push({ id, label });
this.deptCahe.push({ id, label });
},
activeDeptChange(id) {
- const dept = this.deptCahe.find((ele) => ele.id === id)
+ const dept = this.deptCahe.find((ele) => ele.id === id);
this.selectDepts.push(dept);
- this.activeDept = this.activeDept.filter(ele => ele !== id)
- this.selectDeptsCahe = this.selectDeptsCahe.filter(ele => ele.id !== id)
+ this.activeDept = this.activeDept.filter((ele) => ele !== id);
+ this.selectDeptsCahe = this.selectDeptsCahe.filter(
+ (ele) => ele.id !== id
+ );
},
statusChange(id) {
- const statusIndex = this.activeStatus.findIndex((ele) => ele === id);
+ const statusIndex = this.activeStatus.findIndex((ele) => ele === id);
if (statusIndex === -1) {
this.activeStatus.push(id);
} else {
@@ -239,8 +266,8 @@ export default {
}
},
changeDepts() {
- const depts = this.selectDepts.map((item) => item.id);
- this.activeDept = this.activeDept.filter((ele) => depts.includes(ele));
+ const depts = this.selectDepts.map((item) => item.id);
+ this.activeDept = this.activeDept.filter((ele) => depts.includes(ele));
},
loadNode(node, resolve) {
if (!this.depts.length) {
@@ -248,7 +275,9 @@ export default {
return;
}
getDeptTree(node.data.id).then((res) => {
- const filterDept = (res.data || []).filter(ele => !this.activeDept.includes(ele.deptId))
+ const filterDept = (res.data || []).filter(
+ (ele) => !this.activeDept.includes(ele.deptId)
+ );
resolve(
filterDept.map((dept) => {
return this.normalizer(dept);
@@ -270,38 +299,61 @@ export default {
},
search() {
this.userDrawer = false;
- this.$emit('search', this.formatCondition(), this.formatText())
+ this.$emit("search", this.formatCondition(), this.formatText());
},
formatText() {
this.filterTextMap = [];
const params = [];
if (this.activeStatus.length) {
- let str = `${this.$t('kettle.status')}:${this.activeStatus.reduce((pre,next) => (this.status.find(ele => ele.id === next) || {}).label + '、' + pre, '')}`;
- params.push(str.slice(0, str.length - 1 ))
- this.filterTextMap.push(['activeStatus'])
+ let str = `${this.$t("kettle.status")}:${this.activeStatus.reduce(
+ (pre, next) =>
+ (this.status.find((ele) => ele.id === next) || {}).label +
+ "、" +
+ pre,
+ ""
+ )}`;
+ params.push(str.slice(0, str.length - 1));
+ this.filterTextMap.push(["activeStatus"]);
}
if (this.activeDept.length) {
- params.push(`${this.$t('panel.org')}:${this.selectDeptsCahe.map(ele => ele.label).join('、')}`)
- this.filterTextMap.push(['activeDept', 'selectDepts', 'selectDeptsCahe', 'deptCahe'])
+ params.push(
+ `${this.$t("panel.org")}:${this.selectDeptsCahe
+ .map((ele) => ele.label)
+ .join("、")}`
+ );
+ this.filterTextMap.push([
+ "activeDept",
+ "selectDepts",
+ "selectDeptsCahe",
+ "deptCahe",
+ ]);
}
if (this.activeRole.length) {
- params.push(`${this.$t('panel.role')}:${this.rolesValueCopy.map(ele => ele.name).join('、')}`)
- this.filterTextMap.push(['rolesValue', 'activeRole', 'roleCahe'])
+ params.push(
+ `${this.$t("panel.role")}:${this.rolesValueCopy
+ .map((ele) => ele.name)
+ .join("、")}`
+ );
+ this.filterTextMap.push(["rolesValue", "activeRole", "roleCahe"]);
}
return params;
},
formatCondition() {
- const fildMap = {'r.role_id': this.activeRole, 'd.dept_id': this.activeDept, 'u.enabled': this.activeStatus}
- const conditions = []
- Object.keys(fildMap).forEach(ele => {
+ const fildMap = {
+ "r.role_id": this.activeRole,
+ "d.dept_id": this.activeDept,
+ "u.enabled": this.activeStatus,
+ };
+ const conditions = [];
+ Object.keys(fildMap).forEach((ele) => {
if (fildMap[ele].length) {
conditions.push({
field: ele,
- operator: 'in',
- value: fildMap[ele]
- })
+ operator: "in",
+ value: fildMap[ele],
+ });
}
- })
+ });
return conditions;
},
init() {
@@ -309,134 +361,8 @@ export default {
},
reset() {
this.userDrawer = false;
- this.clearFilter()
+ this.clearFilter();
},
},
};
-
-
-
\ No newline at end of file
+
\ No newline at end of file
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 27/36] =?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 28/36] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20api?=
=?UTF-8?q?=20=E6=95=B0=E6=8D=AE=E9=9B=86=E6=8D=A2=E8=A1=8C=E9=97=AE?=
=?UTF-8?q?=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 29/36] =?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 30/36] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20sql?=
=?UTF-8?q?=20=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 31/36] =?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 32/36] =?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