From cb12d7d40c1f3d8e3c576fe1066d43cbf89503bd Mon Sep 17 00:00:00 2001 From: fit2cloudrd Date: Thu, 25 Aug 2022 14:49:35 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=B5=8F=E8=A7=88=E5=99=A8=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E5=90=8E=E4=BB=AA=E8=A1=A8=E6=9D=BF=E9=A2=84=E8=A7=88=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#2941)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wangjiahao <1522128093@qq.com> --- frontend/src/views/panel/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/views/panel/index.vue b/frontend/src/views/panel/index.vue index 0fb51f4bd8..61213ff6c1 100644 --- a/frontend/src/views/panel/index.vue +++ b/frontend/src/views/panel/index.vue @@ -34,6 +34,7 @@ export default { if (this.componentName === 'PanelEdit') { next(false) if (confirm(this.$t('panel.edit_leave_tips'))) { + bus.$emit('PanelSwitchComponent', { name: 'PanelMain' }) next() } } else { From 2a97a511646ba9ff6437de6cd17bcb38f249fbd6 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 25 Aug 2022 14:59:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF-=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8=E6=8C=89=E9=92=AE):=20=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=8F=AF=E4=BB=A5=E6=8B=96=E5=85=A5=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/Editor/SettingMenu.vue | 10 +++++ .../canvas/custom-component/UserView.vue | 2 +- frontend/src/utils/conditionUtil.js | 1 - frontend/src/views/panel/filter/index.vue | 39 ++++--------------- 4 files changed, 19 insertions(+), 33 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/SettingMenu.vue b/frontend/src/components/canvas/components/Editor/SettingMenu.vue index 03f610bc6f..8bf5c7dfec 100644 --- a/frontend/src/components/canvas/components/Editor/SettingMenu.vue +++ b/frontend/src/components/canvas/components/Editor/SettingMenu.vue @@ -135,6 +135,16 @@ export default { }, deleteComponent() { + if (this.curComponent.type === 'custom-button' && this.curComponent.serviceName === 'buttonSureWidget') { + let len = this.componentData.length + while (len--) { + const item = this.componentData[len] + + if (item.type === 'custom-button' && item.serviceName === 'buttonResetWidget') { + this.componentData.splice(len, 1) + } + } + } this.$emit('amRemoveItem') this.deleteCurCondition() this.$store.commit('deleteComponent') diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 10a4e25df5..6805b544de 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -368,7 +368,7 @@ export default { }, 'cfilters': { handler: function(val1, val2) { - if (isChange(val1, val2) && !this.isFirstLoad) { + if ((isChange(val1, val2) || isChange(val1, this.filters)) && !this.isFirstLoad) { this.getData(this.element.propValue.viewId) } }, diff --git a/frontend/src/utils/conditionUtil.js b/frontend/src/utils/conditionUtil.js index a9b8dc42ac..5cbd3ecbea 100644 --- a/frontend/src/utils/conditionUtil.js +++ b/frontend/src/utils/conditionUtil.js @@ -100,7 +100,6 @@ export const buildFilterMap = panelItems => { let result = buildViewKeyMap(panelItems) result = buildViewKeyFilters(panelItems, result) - fillElementsFilter(panelItems, result) return result } diff --git a/frontend/src/views/panel/filter/index.vue b/frontend/src/views/panel/filter/index.vue index a99b39cf2a..49e3f0bc5a 100644 --- a/frontend/src/views/panel/filter/index.vue +++ b/frontend/src/views/panel/filter/index.vue @@ -9,9 +9,9 @@ v-for="(widget, index) in item" :key="widget.widgetName+index" :data-id="widget.widgetName" - :draggable="(widget.widgetName !== 'buttonSureWidget' && widget.widgetName !== 'buttonResetWidget') || (widget.widgetName === 'buttonSureWidget' && !searchButtonExist) || (widget.widgetName === 'buttonResetWidget' && searchButtonExist)" + :draggable="(widget.widgetName !== 'buttonSureWidget' && widget.widgetName !== 'buttonResetWidget') || (widget.widgetName === 'buttonSureWidget' && !searchButtonExist) || (widget.widgetName === 'buttonResetWidget' && searchButtonExist && !resetButtonExist)" :data-index="index" - :class="'filter-widget '+ (widget.defaultClass || '')" + :class="('filter-widget '+ (widget.widgetName === 'buttonSureWidget' ? sureButtonClass : widget.widgetName === 'buttonResetWidget' ? resetButtonClass : widget.defaultClass))" >
@@ -74,38 +74,15 @@ export default { resetButtonExist() { return this.componentData && this.componentData.some(component => component.type === 'custom-button' && component.serviceName === 'buttonResetWidget') }, - resetButtonDisable() { - return !this.resetButtonExist && this.searchButtonExist - } - }, - watch: { - searchButtonExist(val, old) { - if (val === old) return - if (val) { - this.widgetSubjects['按钮'][0].defaultClass = 'button-disable-filter' - if (this.resetButtonExist) { - this.widgetSubjects['按钮'][1].defaultClass = 'button-disable-filter' - } else { - this.widgetSubjects['按钮'][1].defaultClass = 'time-filter' - } - } else { - this.widgetSubjects['按钮'][0].defaultClass = 'time-filter' - this.widgetSubjects['按钮'][1].defaultClass = 'button-disable-filter' - } + sureButtonClass() { + return this.searchButtonExist ? 'button-disable-filter' : 'time-filter' }, - resetButtonExist(val, old) { - if (val === old) return - if (val) { - this.widgetSubjects['按钮'][1].defaultClass = 'button-disable-filter' - } else { - if (this.searchButtonExist) { - this.widgetSubjects['按钮'][1].defaultClass = 'time-filter' - } else { - this.widgetSubjects['按钮'][1].defaultClass = 'button-disable-filter' - } - } + resetButtonClass() { + return (this.searchButtonExist && !this.resetButtonExist) ? 'time-filter' : 'button-disable-filter' } + }, + created() { this.init() }, From 6b436eb6e6ed66642c10d0b807f2fa8d068287d7 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 25 Aug 2022 15:21:16 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86=E4=B8=AD=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/dataset/DataSetTableService.java | 3 +++ frontend/src/views/system/task/TableSelector.vue | 4 ++-- 2 files changed, 5 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 5bc83c1d43..22210b6bab 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -616,6 +616,9 @@ public class DataSetTableService { // check doris table if (!checkEngineTableIsExists(dataSetTableRequest.getId())) { if (dataSetTableRequest.isPreviewForTask()) { + map.put("fields", fields); + map.put("data", new ArrayList<>()); + map.put("page", new DataSetPreviewPage()); return map; } else { throw new RuntimeException(Translator.get("i18n_data_not_sync")); diff --git a/frontend/src/views/system/task/TableSelector.vue b/frontend/src/views/system/task/TableSelector.vue index ae94be6a74..dc9810601d 100644 --- a/frontend/src/views/system/task/TableSelector.vue +++ b/frontend/src/views/system/task/TableSelector.vue @@ -138,7 +138,6 @@ export default { table: [], filterText: "", fields: [], - tableName: "", dataLoading: false, treeLoading: false, }; @@ -184,6 +183,7 @@ export default { initData(table) { this.dataLoading = true; table.row = 100; + table.previewForTask = true post("/dataset/table/getPreviewData/1/100", table, false, 30000) .then((response) => { this.fields = response.data.fields; @@ -263,4 +263,4 @@ export default { } } } - \ No newline at end of file + From 57855c5937881a27e3f0c8d093b888f4ed58c65e Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 25 Aug 2022 15:39:07 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86=E4=B8=AD=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/system/task/form.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/system/task/form.vue b/frontend/src/views/system/task/form.vue index 84494311cd..b71bdda796 100644 --- a/frontend/src/views/system/task/form.vue +++ b/frontend/src/views/system/task/form.vue @@ -341,7 +341,10 @@ export default { created() { const { datasetName, id } = this.$route.query; this.taskDetail = { datasetName, id }; - if (!id) return; + if (!id) { + this.taskForm.startTime = new Date() + return; + }; this.getTaskDetail(id); }, methods: { @@ -638,4 +641,4 @@ export default { text-align: right; } } - \ No newline at end of file + From fa709d53393fe601cafe3f903a664956ad10cd0d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 25 Aug 2022 15:53:57 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF-=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8C=89=E9=92=AE):=20=E6=9F=A5=E8=AF=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=AF=B9tab=E5=86=85=E9=83=A8=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/Editor/Preview.vue | 9 ++++++++- .../src/components/canvas/components/Editor/index.vue | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index cf2618a374..2e40f650d6 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -75,7 +75,7 @@ import { mapState } from 'vuex' import ComponentWrapper from './ComponentWrapper' import { changeStyleWithScale } from '@/components/canvas/utils/translate' import { uuid } from 'vue-uuid' -import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils' +import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils' import eventBus from '@/components/canvas/utils/eventBus' import elementResizeDetectorMaker from 'element-resize-detector' import UserViewDialog from '@/components/canvas/custom-component/UserViewDialog' @@ -330,6 +330,13 @@ export default { if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) { component.filters = this.buttonFilterMap[component.propValue.viewId] } + if (component.type === 'de-tabs') { + for (let idx = 0; idx < component.options.tabList.length; idx++) { + const ele = component.options.tabList[idx].content + if (!ele.type || ele.type !== 'view') continue + ele.filters = this.buttonFilterMap[ele.propValue.viewId] + } + } }) }, buildButtonFilterMap(panelItems, isClear = false) { diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 189782501b..df535a5241 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -189,7 +189,7 @@ import DeDrag from '@/components/DeDrag' // eslint-disable-next-line no-unused-vars import { getStyle, getComponentRotatedStyle } from '@/components/canvas/utils/style' -import {_$, imgUrlTrans} from '@/components/canvas/utils/utils' +import { _$, imgUrlTrans } from '@/components/canvas/utils/utils' import ContextMenu from './ContextMenu' import MarkLine from './MarkLine' import Area from './Area' @@ -1133,6 +1133,13 @@ export default { if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) { component.filters = this.buttonFilterMap[component.propValue.viewId] } + if (component.type === 'de-tabs') { + for (let idx = 0; idx < component.options.tabList.length; idx++) { + const ele = component.options.tabList[idx].content + if (!ele.type || ele.type !== 'view') continue + ele.filters = this.buttonFilterMap[ele.propValue.viewId] + } + } }) }, buildButtonFilterMap(panelItems, isClear = false) {