From ff6b477586eabdd0d730f9c01c02778917b71c4a Mon Sep 17 00:00:00 2001
From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com>
Date: Mon, 30 Jan 2023 14:57:00 +0800
Subject: [PATCH 01/10] =?UTF-8?q?fix:=20APi=E6=95=B0=E6=8D=AE=E6=BA=90?=
=?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=AE=8C=E6=88=90=E5=90=8E=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=B7=E6=96=B0=20=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=8F=AA=E8=AF=BB=E6=9D=83?=
=?UTF-8?q?=E9=99=90=E6=9F=A5=E7=9C=8B=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E9=A1=B9=E6=98=BE=E7=A4=BA=E6=95=B0=E6=8D=AE=E5=BC=82=E5=B8=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/gridTable/index.vue | 1 +
frontend/src/views/dataset/add/AddSQL.vue | 2 +-
.../views/system/datasource/DsFormContent.vue | 22 +++++++++++++++++++
frontend/src/views/system/user/index.vue | 12 ++++++++++
4 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/frontend/src/components/gridTable/index.vue b/frontend/src/components/gridTable/index.vue
index 9754c48897..22c40b389e 100644
--- a/frontend/src/components/gridTable/index.vue
+++ b/frontend/src/components/gridTable/index.vue
@@ -108,6 +108,7 @@ export default {
handler() {
this.$nextTick(() => {
this.$refs.table.doLayout()
+ this.$emit('columnsChange')
})
},
deep: true
diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue
index ad99840b4f..d3cef63e5c 100644
--- a/frontend/src/views/dataset/add/AddSQL.vue
+++ b/frontend/src/views/dataset/add/AddSQL.vue
@@ -138,7 +138,7 @@
- {{ (showTable && fieldData.length) || tableData.length }}
+ {{ (showTable && fieldDataCopy.length) || tableDataCopy.length }}
diff --git a/frontend/src/views/system/datasource/DsFormContent.vue b/frontend/src/views/system/datasource/DsFormContent.vue
index 7af186cf52..bd2744b18f 100644
--- a/frontend/src/views/system/datasource/DsFormContent.vue
+++ b/frontend/src/views/system/datasource/DsFormContent.vue
@@ -1114,6 +1114,25 @@ export default {
}
})
},
+ reloadStatus(apiConfiguration = []) {
+ let arr = []
+ let arrError = []
+ let arrSuccess = []
+ if (!Array.isArray(apiConfiguration)) {
+ arr = JSON.parse(apiConfiguration)
+ if (!Array.isArray(arr)) return
+ }
+ arrError = arr.filter(ele => ele.status === 'Error').map(ele => ele.name)
+ arrSuccess = arr.filter(ele => ele.status === 'Success').map(ele => ele.name)
+ this.form.apiConfiguration.forEach(ele => {
+ if (arrError.includes(ele.name)) {
+ ele.status = 'Error'
+ }
+ if (arrSuccess.includes(ele.name)) {
+ ele.status = 'Success'
+ }
+ })
+ },
validaDatasource() {
if (!this.form.configuration.schema && this.form.type === 'oracle') {
this.openMessageSuccess('datasource.please_choose_schema', 'error')
@@ -1167,6 +1186,9 @@ export default {
if (res.success) {
this.openMessageSuccess('datasource.validate_success')
} else {
+ if (data.type === 'api') {
+ this.reloadStatus(res.data?.configuration)
+ }
if (res.message.length < 2500) {
this.openMessageSuccess(res.message, 'error')
} else {
diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue
index be0894105c..a45d78fb37 100644
--- a/frontend/src/views/system/user/index.vue
+++ b/frontend/src/views/system/user/index.vue
@@ -118,13 +118,16 @@
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
:table-data="data"
:columns="checkedColumnNames"
+ current-row-key="email"
:pagination="paginationConfig"
+ @columnsChange="columnsChange"
@sort-change="sortChange"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
-->
@@ -237,6 +241,7 @@
dom.offsetWidth
})
},
+ columnsChange() {
+ const arr = this.data
+ this.data = []
+ this.$nextTick(() => {
+ this.data = arr
+ })
+ },
search() {
const param = {
orders: formatOrders(this.orderConditions),
From 0e20267cbbcdc1a7f152793b7b4df2c7784a14d3 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Mon, 30 Jan 2023 15:33:33 +0800
Subject: [PATCH 02/10] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E4=BB=8E=E6=A8=A1=E6=9D=BF=E6=96=B0=E5=BB=BA=E7=9A=84=E8=BF=87?=
=?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E5=9C=A8=E6=B2=A1=E6=9C=89=E9=87=8D?=
=?UTF-8?q?=E6=96=B0=E5=85=B3=E8=81=94=E6=95=B0=E6=8D=AE=E9=9B=86=E5=89=8D?=
=?UTF-8?q?=E5=BF=BD=E7=95=A5=E6=9D=83=E9=99=90=E6=A3=80=E6=9F=A5,?=
=?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=8A=A5=E6=97=A0=E6=9D=83=E9=99=90=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/service/panel/PanelGroupService.java | 3 +++
frontend/src/api/dataset/dataset.js | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
index 665a9c0609..125abb63c0 100644
--- a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
+++ b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
@@ -509,6 +509,9 @@ public class PanelGroupService {
if (dynamicDataMap == null) {
DataEaseException.throwException("Please use the template after v1.9");
}
+ //custom组件替换.tableId 和 parentFieldId 追加识别标识
+ templateData = templateData.replaceAll("\"tableId\":\"", "\"tableId\":\"no_auth");
+ templateData = templateData.replaceAll("\"fieldsParent\":\\{\"id\":\"", "\"fieldsParent\":\\{\"id\":\"no_auth");
List panelViews = new ArrayList<>();
List viewsData = new ArrayList<>();
diff --git a/frontend/src/api/dataset/dataset.js b/frontend/src/api/dataset/dataset.js
index a194700c45..359eb9f340 100644
--- a/frontend/src/api/dataset/dataset.js
+++ b/frontend/src/api/dataset/dataset.js
@@ -138,6 +138,14 @@ export function fieldList(id, showLoading = true) {
}
export function fieldListWithPermission(id, showLoading = true) {
+ //初始模板中的过滤组件无需走后台
+ if (id.indexOf('no_auth') > -1) {
+ return new Promise(function(resolve) {
+ resolve({
+ data: []
+ })
+ })
+ }
return request({
url: '/dataset/field/listWithPermission/' + id,
loading: showLoading,
From 59f920260534b051ca653271849c15ab97e22f3d Mon Sep 17 00:00:00 2001
From: fit2cloud-chenyw
Date: Mon, 30 Jan 2023 15:46:59 +0800
Subject: [PATCH 03/10] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E6=95=B0=E5=AD=97=E5=8C=BA=E9=97=B4=E8=BF=87=E6=BB=A4=E5=99=A8?=
=?UTF-8?q?=E7=A9=BA=E9=BB=98=E8=AE=A4=E5=80=BC=E6=97=A0=E6=B3=95=E6=9B=BF?=
=?UTF-8?q?=E6=8D=A2=E7=BC=96=E8=BE=91=E6=97=B6=E5=A1=AB=E5=86=99=E7=9A=84?=
=?UTF-8?q?=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/widget/deWidget/DeNumberRange.vue | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/frontend/src/components/widget/deWidget/DeNumberRange.vue b/frontend/src/components/widget/deWidget/DeNumberRange.vue
index 604be92167..e59865ec2d 100644
--- a/frontend/src/components/widget/deWidget/DeNumberRange.vue
+++ b/frontend/src/components/widget/deWidget/DeNumberRange.vue
@@ -152,11 +152,17 @@ export default {
},
resetDefaultValue(id) {
if (this.inDraw && this.manualModify && this.element.id === id) {
- const values = this.element.options.value
- this.form.min = values[0]
- if (values.length > 1) {
- this.form.max = values[1]
+ if (!this.element.options.value) {
+ this.form.min = null
+ this.form.max = null
+ } else {
+ const values = this.element.options.value
+ this.form.min = values[0]
+ if (values.length > 1) {
+ this.form.max = values[1]
+ }
}
+
this.search()
}
},
From 90abec6193a4914556859dffff8850548ed1f3f9 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Tue, 31 Jan 2023 10:00:00 +0800
Subject: [PATCH 04/10] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=84=E4=BB=B6=E6=9C=80=E5=B0=8F=E9=95=BF?=
=?UTF-8?q?=E5=AE=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/canvas/components/editor/EditBar.vue | 4 ++--
frontend/src/components/deDrag/index.vue | 9 +++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/frontend/src/components/canvas/components/editor/EditBar.vue b/frontend/src/components/canvas/components/editor/EditBar.vue
index 86311555c3..19707fb2cc 100644
--- a/frontend/src/components/canvas/components/editor/EditBar.vue
+++ b/frontend/src/components/canvas/components/editor/EditBar.vue
@@ -346,10 +346,10 @@ export default {
return this.targetLinkageInfo[this.element.propValue.viewId]
},
miniHeight() {
- return this.mobileLayoutStatus ? 1 : 4
+ return this.mobileLayoutStatus ? 1 : 1
},
miniWidth() {
- return this.mobileLayoutStatus ? 1 : 4
+ return this.mobileLayoutStatus ? 1 : 1
},
curCanvasScaleSelf() {
return this.curCanvasScaleMap[this.canvasId]
diff --git a/frontend/src/components/deDrag/index.vue b/frontend/src/components/deDrag/index.vue
index 5d277f402e..47b96e2c9c 100644
--- a/frontend/src/components/deDrag/index.vue
+++ b/frontend/src/components/deDrag/index.vue
@@ -630,7 +630,8 @@ export default {
}
if (this.element.auxiliaryMatrix && this.curCanvasScaleSelf) {
const height = Math.round(this.height / this.curCanvasScaleSelf.matrixStyleHeight) * this.curCanvasScaleSelf.matrixStyleHeight
- return (height - this.curGap * 2) + 'px'
+ const hp = (height - this.curGap * 2)
+ return (hp > 3 ? hp : 3) + 'px'
} else {
return (this.height - this.curGap * 2) + 'px'
}
@@ -682,14 +683,14 @@ export default {
return (this.canvasStyleData.panel.gap === 'yes' && this.element.auxiliaryMatrix) ? this.componentGap : 0
},
miniWidth() {
- return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleWidth * (this.mobileLayoutStatus ? 1 : 4) : 0
+ return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleWidth * (this.mobileLayoutStatus ? 1 : 1) : 0
},
miniHeight() {
if (this.element.auxiliaryMatrix) {
if (this.element.component === 'de-number-range') {
- return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 4) : 0
+ return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 1) : 0
} else {
- return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 4) : 0
+ return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 1) : 0
}
} else {
return 0
From c26afede20483ba5096780aa6c2ada5cb6892296 Mon Sep 17 00:00:00 2001
From: fit2cloud-chenyw
Date: Tue, 31 Jan 2023 10:55:59 +0800
Subject: [PATCH 05/10] =?UTF-8?q?perf(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E9=9A=90=E8=97=8Fpdf=E5=AF=BC=E5=87=BA=E5=88=86=E9=A1=B5?=
=?UTF-8?q?=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/canvas/components/Toolbar.vue | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue
index b2138a1d57..c2e3132a1c 100644
--- a/frontend/src/components/canvas/components/Toolbar.vue
+++ b/frontend/src/components/canvas/components/Toolbar.vue
@@ -154,7 +154,7 @@
/>
-
+
Date: Tue, 31 Jan 2023 15:05:59 +0800
Subject: [PATCH 06/10] Create sync2gitee.yml
---
.github/workflows/sync2gitee.yml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 .github/workflows/sync2gitee.yml
diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml
new file mode 100644
index 0000000000..bd6df50f81
--- /dev/null
+++ b/.github/workflows/sync2gitee.yml
@@ -0,0 +1,17 @@
+name: sync2gitee
+on: [push]
+
+jobs:
+ repo-sync:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Mirror the Github organization repos to Gitee.
+ uses: Yikun/hub-mirror-action@master
+ with:
+ src: 'github/dataease'
+ dst: 'gitee/fit2cloud-feizhiyun'
+ dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
+ dst_token: ${{ secrets.GITEE_TOKEN }}
+ static_list: ${{ github.event.repository.name }}
+ force_update: true
+ debug: true
From bce2adbaf5906f5832ea0fe97092df1599230cc2 Mon Sep 17 00:00:00 2001
From: fit2cloudrd
Date: Tue, 31 Jan 2023 15:08:12 +0800
Subject: [PATCH 07/10] Update sync2gitee.yml
---
.github/workflows/sync2gitee.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml
index bd6df50f81..6fe33c8402 100644
--- a/.github/workflows/sync2gitee.yml
+++ b/.github/workflows/sync2gitee.yml
@@ -14,4 +14,3 @@ jobs:
dst_token: ${{ secrets.GITEE_TOKEN }}
static_list: ${{ github.event.repository.name }}
force_update: true
- debug: true
From 6cc159a7b0cb90632159b25450d7709c3abea4e7 Mon Sep 17 00:00:00 2001
From: fit2cloudrd
Date: Tue, 31 Jan 2023 15:11:40 +0800
Subject: [PATCH 08/10] Update sync2gitee.yml
---
.github/workflows/sync2gitee.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml
index 6fe33c8402..10dccce369 100644
--- a/.github/workflows/sync2gitee.yml
+++ b/.github/workflows/sync2gitee.yml
@@ -12,5 +12,5 @@ jobs:
dst: 'gitee/fit2cloud-feizhiyun'
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
dst_token: ${{ secrets.GITEE_TOKEN }}
- static_list: ${{ github.event.repository.name }}
+ static_list: "DataEase"
force_update: true
From be6f263afb1fc64c55fc6ef8d00bff3b65f718bb Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Tue, 31 Jan 2023 17:23:14 +0800
Subject: [PATCH 09/10] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2=E6=8C=89=E9=92=AE=E4=B8=8D?=
=?UTF-8?q?=E8=83=BD=E6=8E=A7=E5=88=B6Tab=E7=BB=84=E4=BB=B6=E5=86=85?=
=?UTF-8?q?=E9=83=A8=E8=A7=86=E5=9B=BE=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/canvas/DeCanvas.vue | 3 +
.../components/editor/ComponentWrapper.vue | 14 +++-
.../canvas/components/editor/DeEditor.vue | 67 +++++++++++++------
.../canvas/components/editor/Preview.vue | 61 +++++++++++++----
.../src/components/dataease/DeOutWidget.vue | 7 +-
.../src/components/widget/deWidget/DeTabs.vue | 18 +++++
6 files changed, 135 insertions(+), 35 deletions(-)
diff --git a/frontend/src/components/canvas/DeCanvas.vue b/frontend/src/components/canvas/DeCanvas.vue
index 959a1379aa..5b0ed2085a 100644
--- a/frontend/src/components/canvas/DeCanvas.vue
+++ b/frontend/src/components/canvas/DeCanvas.vue
@@ -252,6 +252,9 @@ export default {
bus.$off('button-dialog-edit', this.editButtonDialog)
},
methods: {
+ getWrapperChildRefs() {
+ return this.$refs[this.editorRefName].getWrapperChildRefs()
+ },
initEvents() {
bus.$on('component-dialog-edit', this.editDialog)
bus.$on('button-dialog-edit', this.editButtonDialog)
diff --git a/frontend/src/components/canvas/components/editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/editor/ComponentWrapper.vue
index feb5095084..005c2e2d74 100644
--- a/frontend/src/components/canvas/components/editor/ComponentWrapper.vue
+++ b/frontend/src/components/canvas/components/editor/ComponentWrapper.vue
@@ -223,10 +223,18 @@ export default {
runAnimation(this.$el, this.config.animations)
},
methods: {
- setChartData(chart) {
- this.chart = chart
+ getComponentId() {
+ return this.config.id
+ },
+ getCanvasId() {
+ return this.canvasId
+ },
+ getType() {
+ return this.config.type
+ },
+ getWrapperChildRefs() {
+ return this.$refs.wrapperChild.getWrapperChildRefs()
},
- getStyle,
getShapeStyleIntDeDrag(style, prop) {
if (prop === 'rotate') {
return style['rotate']
diff --git a/frontend/src/components/canvas/components/editor/DeEditor.vue b/frontend/src/components/canvas/components/editor/DeEditor.vue
index 8f2eeff20e..55935a47a6 100644
--- a/frontend/src/components/canvas/components/editor/DeEditor.vue
+++ b/frontend/src/components/canvas/components/editor/DeEditor.vue
@@ -1017,7 +1017,7 @@ export default {
]),
searchButtonInfo() {
- const result = this.buildButtonFilterMap(this.componentData)
+ const result = this.buildButtonFilterMap(this.$store.state.componentData)
return result
},
filterMap() {
@@ -1138,6 +1138,25 @@ export default {
created() {
},
methods: {
+ getWrapperChildRefs() {
+ return this.$refs['wrapperChild']
+ },
+ getAllWrapperChildRefs() {
+ let allChildRefs = []
+ const currentChildRefs = this.getWrapperChildRefs()
+ if (currentChildRefs && currentChildRefs.length > 0) {
+ allChildRefs.push.apply(allChildRefs, currentChildRefs)
+ }
+ currentChildRefs && currentChildRefs.forEach(subRef => {
+ if (subRef?.getType && subRef.getType() === 'de-tabs') {
+ const currentTabChildRefs = subRef.getWrapperChildRefs()
+ if (currentTabChildRefs && currentTabChildRefs.length > 0) {
+ allChildRefs.push.apply(allChildRefs, currentTabChildRefs)
+ }
+ }
+ })
+ return allChildRefs
+ },
setChartData(chart) {
this.componentData.forEach((item, index) => {
if (item.type === 'view' && item.component === 'user-view' && item.propValue.viewId === chart.id) {
@@ -1154,7 +1173,7 @@ export default {
})
},
refreshButtonInfo(isClear = false) {
- const result = this.buildButtonFilterMap(this.componentData, isClear)
+ const result = this.buildButtonFilterMap(this.$store.state.componentData, isClear)
this.searchButtonInfo.buttonExist = result.buttonExist
this.searchButtonInfo.relationFilterIds = result.relationFilterIds
this.searchButtonInfo.filterMap = result.filterMap
@@ -1162,10 +1181,12 @@ export default {
this.buttonFilterMap = this.searchButtonInfo.filterMap
},
triggerSearchButton(isClear = false) {
+ if (this.canvasId !== 'canvas-main') {
+ return
+ }
this.refreshButtonInfo(isClear)
this.buttonFilterMap = this.searchButtonInfo.filterMap
-
- this.componentData.forEach(component => {
+ this.$store.state.componentData.forEach(component => {
if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) {
component.filters = this.buttonFilterMap[component.propValue.viewId]
}
@@ -1212,20 +1233,16 @@ export default {
return result
},
buildViewKeyFilters(panelItems, result, isClear = false) {
- const refs = this.$refs
- if (!this.$refs['wrapperChild'] || !this.$refs['wrapperChild'].length) return result
- const len = this.$refs['wrapperChild'].length
+ const wrapperChildAll = this.getAllWrapperChildRefs()
+ if (!wrapperChildAll || !wrapperChildAll.length) return result
panelItems.forEach((element) => {
- if (element.type !== 'custom') {
- return true
- }
-
let param = null
- const index = this.getComponentIndex(element.id)
- if (index < 0 || index >= len) {
- return true
- }
- const wrapperChild = refs['wrapperChild'][index]
+ let wrapperChild
+ wrapperChildAll?.forEach(item => {
+ if (item?.['getComponentId'] && item.getComponentId() === element.id) {
+ wrapperChild = item
+ }
+ })
if (!wrapperChild || !wrapperChild.getCondition) return true
if (isClear) {
wrapperChild.clearHandler && wrapperChild.clearHandler()
@@ -1234,9 +1251,11 @@ export default {
const condition = formatCondition(param)
const vValid = valueValid(condition)
const filterComponentId = condition.componentId
+ const conditionCanvasId = wrapperChild.getCanvasId && wrapperChild.getCanvasId()
Object.keys(result).forEach(viewId => {
const vidMatch = viewIdMatch(condition.viewIds, viewId)
const viewFilters = result[viewId]
+ const canvasMatch = this.checkCanvasViewIdsMatch(conditionCanvasId, viewId)
let j = viewFilters.length
while (j--) {
const filter = viewFilters[j]
@@ -1244,14 +1263,24 @@ export default {
viewFilters.splice(j, 1)
}
}
- vidMatch && vValid && viewFilters.push(condition)
+ canvasMatch && vidMatch && vValid && viewFilters.push(condition)
})
})
return result
},
+ checkCanvasViewIdsMatch(conditionCanvasId, viewId) {
+ if (conditionCanvasId === 'canvas-main') {
+ return true
+ }
+ for (let index = 0; index < this.$store.state.componentData.length; index++) {
+ const item = this.$store.state.componentData[index]
+ if (item.type === 'view' && item.propValue.viewId === viewId && item.canvasId === conditionCanvasId) return true
+ }
+ return false
+ },
getComponentIndex(id) {
- for (let index = 0; index < this.componentData.length; index++) {
- const item = this.componentData[index]
+ for (let index = 0; index < this.$store.state.componentData.length; index++) {
+ const item = this.$store.state.componentData[index]
if (item.id === id) return index
}
return -1
diff --git a/frontend/src/components/canvas/components/editor/Preview.vue b/frontend/src/components/canvas/components/editor/Preview.vue
index 1ce56ac016..6e305c0772 100644
--- a/frontend/src/components/canvas/components/editor/Preview.vue
+++ b/frontend/src/components/canvas/components/editor/Preview.vue
@@ -366,7 +366,7 @@ export default {
]),
searchButtonInfo() {
- const result = this.buildButtonFilterMap(this.componentData)
+ const result = this.buildButtonFilterMap(this.$store.state.componentData)
return result
},
filterMap() {
@@ -448,6 +448,26 @@ export default {
bus.$off('trigger-reset-button', this.triggerResetButton)
},
methods: {
+ getWrapperChildRefs() {
+ return this.$refs['viewWrapperChild']
+ },
+ getAllWrapperChildRefs() {
+ let allChildRefs = []
+ const currentChildRefs = this.getWrapperChildRefs()
+ if (currentChildRefs && currentChildRefs.length > 0) {
+ allChildRefs.push.apply(allChildRefs, currentChildRefs)
+ }
+ currentChildRefs && currentChildRefs.forEach(subRef => {
+ if (subRef?.getType && subRef.getType() === 'de-tabs') {
+ const currentTabChildRefs = subRef.getWrapperChildRefs()
+ if (currentTabChildRefs && currentTabChildRefs.length > 0) {
+ allChildRefs.push.apply(allChildRefs, currentTabChildRefs)
+ }
+ }
+ })
+ return allChildRefs
+ },
+
getCanvasHeight() {
return this.mainHeightCount
},
@@ -484,12 +504,15 @@ export default {
})
},
triggerSearchButton(isClear = false) {
- const result = this.buildButtonFilterMap(this.componentData, isClear)
+ if (this.canvasId !== 'canvas-main') {
+ return
+ }
+ const result = this.buildButtonFilterMap(this.$store.state.componentData, isClear)
this.searchButtonInfo.autoTrigger = result.autoTrigger
this.searchButtonInfo.filterMap = result.filterMap
this.buttonFilterMap = this.searchButtonInfo.filterMap
- this.componentData.forEach(component => {
+ this.$store.state.componentData.forEach(component => {
if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) {
component.filters = this.buttonFilterMap[component.propValue.viewId]
}
@@ -534,19 +557,20 @@ export default {
return result
},
buildViewKeyFilters(panelItems, result, isClear = false) {
- const refs = this.$refs
- if (!this.$refs['viewWrapperChild'] || !this.$refs['viewWrapperChild'].length) return result
+ const wrapperChildAll = this.getAllWrapperChildRefs()
+ if (!wrapperChildAll || !wrapperChildAll.length) return result
panelItems.forEach((element) => {
if (element.type !== 'custom') {
return true
}
-
- const index = this.getComponentIndex(element.id)
- if (index < 0) {
- return true
- }
+ let wrapperChild
+ wrapperChildAll?.forEach(item => {
+ if (item?.['getComponentId'] && item.getComponentId() === element.id) {
+ wrapperChild = item
+ }
+ })
+ if (!wrapperChild || !wrapperChild.getCondition) return true
let param = null
- const wrapperChild = refs['viewWrapperChild'][index]
if (isClear) {
wrapperChild.clearHandler && wrapperChild.clearHandler()
}
@@ -554,9 +578,12 @@ export default {
const condition = formatCondition(param)
const vValid = valueValid(condition)
const filterComponentId = condition.componentId
+ const conditionCanvasId = wrapperChild.getCanvasId && wrapperChild.getCanvasId()
Object.keys(result).forEach(viewId => {
const vidMatch = viewIdMatch(condition.viewIds, viewId)
const viewFilters = result[viewId]
+ const canvasMatch = this.checkCanvasViewIdsMatch(conditionCanvasId, viewId)
+
let j = viewFilters.length
while (j--) {
const filter = viewFilters[j]
@@ -564,11 +591,21 @@ export default {
viewFilters.splice(j, 1)
}
}
- vidMatch && vValid && viewFilters.push(condition)
+ canvasMatch && vidMatch && vValid && viewFilters.push(condition)
})
})
return result
},
+ checkCanvasViewIdsMatch(conditionCanvasId, viewId) {
+ if (conditionCanvasId === 'canvas-main') {
+ return true
+ }
+ for (let index = 0; index < this.$store.state.componentData.length; index++) {
+ const item = this.$store.state.componentData[index]
+ if (item.type === 'view' && item.propValue.viewId === viewId && item.canvasId === conditionCanvasId) return true
+ }
+ return false
+ },
getComponentIndex(id) {
for (let index = 0; index < this.componentData.length; index++) {
const item = this.componentData[index]
diff --git a/frontend/src/components/dataease/DeOutWidget.vue b/frontend/src/components/dataease/DeOutWidget.vue
index 487b35df75..48a9bfb896 100644
--- a/frontend/src/components/dataease/DeOutWidget.vue
+++ b/frontend/src/components/dataease/DeOutWidget.vue
@@ -175,6 +175,12 @@ export default {
this.$set(this.element.style, 'innerBgColor', innerBgColor || '')
},
methods: {
+ getComponentId() {
+ return this.element.id
+ },
+ getCanvasId() {
+ return this.canvasId
+ },
handlerPositionChange(val) {
const { horizontal = 'left', vertical = 'center' } = val
this.titleStyle = {
@@ -185,7 +191,6 @@ export default {
flexDirection: 'column'
}
-
if (vertical !== 'top' && this.element.component !== 'de-select-grid') {
this.titleStyle = null
this.outsideStyle = {
diff --git a/frontend/src/components/widget/deWidget/DeTabs.vue b/frontend/src/components/widget/deWidget/DeTabs.vue
index 3703d146b2..3e9fe23856 100644
--- a/frontend/src/components/widget/deWidget/DeTabs.vue
+++ b/frontend/src/components/widget/deWidget/DeTabs.vue
@@ -76,6 +76,7 @@
>
{
+ const refsSub = _this.$refs['canvasTabRef-' + tabItem.name]
+ if (refsSub && refsSub.length) {
+ const refsSubArray = refsSub[0].getWrapperChildRefs()
+ if (refsSubArray && refsSubArray.length > 0) {
+ refsSubAll.push.apply(refsSubAll, refsSubArray)
+ }
+ }
+ })
+ return refsSubAll
+ },
titleStyle(itemName) {
if (this.activeTabName === itemName) {
return {
From 0aca4fdf79801cbf5d2c9ae096a828ba7a71e5e3 Mon Sep 17 00:00:00 2001
From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com>
Date: Tue, 31 Jan 2023 17:49:05 +0800
Subject: [PATCH 10/10] =?UTF-8?q?fix:=20=E5=BE=AE=E4=BF=A1=E6=B5=8F?=
=?UTF-8?q?=E8=A7=88=E5=99=A8=E6=89=93=E5=BC=80=E9=83=A8=E5=88=86=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/styles/index.scss | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss
index ba40852ec5..e07bc87886 100644
--- a/frontend/src/styles/index.scss
+++ b/frontend/src/styles/index.scss
@@ -1751,4 +1751,12 @@ div:focus {
.el-tree-node__label {
color: var(--deTextPrimary, #1F2329) !important;
}
+}
+
+.el-pagination__editor.el-input .el-input__inner {
+ line-height: 28px !important;
+}
+
+.el-table__fixed-right::before {
+ display: none;
}
\ No newline at end of file