From 3a1701051f16b293ebbac792cdec536e060bf6a6 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Fri, 28 Oct 2022 10:45:11 +0800 Subject: [PATCH 01/42] =?UTF-8?q?fix:=20S2=E6=8A=A5=E9=94=99=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/store/index.js | 2 +- frontend/src/views/chart/chart/table/table-info.js | 14 -------------- .../views/chart/components/ChartComponentS2.vue | 9 --------- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 2540e3bff7..c7fded233e 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -263,7 +263,7 @@ const data = { } else { state.componentData.push(component) } - this.commit('setCurComponent', { component: component, index: index ? index : state.componentData.length - 1 }) + this.commit('setCurComponent', { component: component, index: index || state.componentData.length - 1 }) }, removeViewFilter(state, componentId) { state.componentData = state.componentData.map(item => { diff --git a/frontend/src/views/chart/chart/table/table-info.js b/frontend/src/views/chart/chart/table/table-info.js index 2324b6b0fd..1225886c54 100644 --- a/frontend/src/views/chart/chart/table/table-info.js +++ b/frontend/src/views/chart/chart/table/table-info.js @@ -3,7 +3,6 @@ import { getCustomTheme, getSize } from '@/views/chart/chart/common/common_table import { DEFAULT_COLOR_CASE, DEFAULT_TOTAL } from '@/views/chart/chart/chart' import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter' import { hexColorToRGBA } from '@/views/chart/chart/util' -import Vue from 'vue' export function baseTableInfo(s2, container, chart, action, tableData) { const containerDom = document.getElementById(container) @@ -12,7 +11,6 @@ export function baseTableInfo(s2, container, chart, action, tableData) { if (!fields || fields.length === 0) { if (s2) { s2.destroy() - destroyS2() } return } @@ -140,7 +138,6 @@ export function baseTableInfo(s2, container, chart, action, tableData) { // 开始渲染 if (s2) { s2.destroy() - destroyS2 } s2 = new TableSheet(containerDom, s2DataConfig, s2Options) @@ -163,7 +160,6 @@ export function baseTableNormal(s2, container, chart, action, tableData) { if (!fields || fields.length === 0) { if (s2) { s2.destroy() - destroyS2 } return } @@ -278,7 +274,6 @@ export function baseTableNormal(s2, container, chart, action, tableData) { // 开始渲染 if (s2) { s2.destroy() - destroyS2() } s2 = new TableSheet(containerDom, s2DataConfig, s2Options) @@ -315,7 +310,6 @@ export function baseTablePivot(s2, container, chart, action, tableData) { if (!fields || fields.length === 0) { if (s2) { s2.destroy() - destroyS2() } return } @@ -437,7 +431,6 @@ export function baseTablePivot(s2, container, chart, action, tableData) { // 开始渲染 if (s2) { s2.destroy() - destroyS2() } s2 = new PivotSheet(containerDom, s2DataConfig, s2Options) @@ -451,13 +444,6 @@ export function baseTablePivot(s2, container, chart, action, tableData) { return s2 } -function destroyS2(s2) { - for (const i in s2) { - Vue.$delete(s2, i) - } - s2 = null -} - function getCurrentField(valueFieldList, field) { let list = [] let res = null diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue index 8c55c3a9ce..9a37f67555 100644 --- a/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/frontend/src/views/chart/components/ChartComponentS2.vue @@ -225,7 +225,6 @@ export default { }, beforeDestroy() { clearInterval(this.scrollTimer) - this.destroyS2() }, methods: { initData() { @@ -268,13 +267,6 @@ export default { }) } }, - destroyS2() { - if (!this.myChart) return - for (const i in this.myChart) { - this.$delete(this.myChart, i) - } - this.myChart = null - }, drawView() { const chart = this.chart // type @@ -300,7 +292,6 @@ export default { if (this.myChart) { this.antVRenderStatus = false this.myChart.destroy() - this.destroyS2() } } From ce0243e33936b4d91f4662c60813d835869b3727 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 28 Oct 2022 11:38:13 +0800 Subject: [PATCH 02/42] =?UTF-8?q?fix(=E5=9C=B0=E5=9B=BE):=20=E6=B8=90?= =?UTF-8?q?=E5=8F=98=E8=89=B2=E8=AE=BE=E7=BD=AE=E4=B8=8D=E5=8F=AF=E6=B8=85?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/GradientColorSelector/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/GradientColorSelector/index.vue b/frontend/src/components/GradientColorSelector/index.vue index 8bffc71dab..1dcec6bf38 100644 --- a/frontend/src/components/GradientColorSelector/index.vue +++ b/frontend/src/components/GradientColorSelector/index.vue @@ -106,6 +106,7 @@ @@ -423,4 +424,7 @@ export default { width: 20px; height: 20px; } +.gradient-picker-dropdown .el-color-dropdown__link-btn { + display: none; +} From 88c5f6993fbc8d3fa92165b3c2d1a316ebdf02f9 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 28 Oct 2022 14:37:23 +0800 Subject: [PATCH 03/42] =?UTF-8?q?fix(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A)?= =?UTF-8?q?:=20echarts=E8=A7=86=E5=9B=BE=E6=88=AA=E5=9B=BE=E4=B8=8D?= =?UTF-8?q?=E5=AE=8C=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/ChartComponent.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index ef6702181f..b6d2577ca1 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -47,6 +47,9 @@ +
@@ -167,7 +170,8 @@ export default { borderRadius: '0px', mapCenter: null, linkageActiveParam: null, - buttonTextColor: null + buttonTextColor: null, + loading: true } }, @@ -222,6 +226,7 @@ export default { } }, preDraw() { + this.loading = true // 基于准备好的dom,初始化echarts实例 // 渲染echart等待dom加载完毕,渲染之前先尝试销毁具有相同id的echart 放置多次切换仪表板有重复id情况 const that = this @@ -253,6 +258,10 @@ export default { that.$refs.viewTrack.trackButtonClick() } }) + this.myChart.off('finished') + this.myChart.on('finished', () => { + this.loading = false + }) }) }, loadThemeStyle() { From 8fe512cdf38e48add3b7d1174c456b066c987ad3 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Fri, 28 Oct 2022 16:58:25 +0800 Subject: [PATCH 04/42] =?UTF-8?q?fix:=20=E8=A7=92=E8=89=B2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7=E5=A4=9A=E9=80=89=E6=89=93=E5=8B=BE?= =?UTF-8?q?=20=E6=95=B0=E6=8D=AE=E9=9B=86=E5=90=8D=E7=A7=B0=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=9B=BD=E9=99=85=E5=8C=96=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E5=8A=A0=E8=BD=BD=E6=95=B0=E6=8D=AEloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/styles/index.scss | 25 ++++++++++++++++++ frontend/src/views/dataset/add/AddApi.vue | 18 +------------ frontend/src/views/dataset/add/AddDB.vue | 19 +------------- frontend/src/views/dataset/form.vue | 2 +- .../system/datasource/DsConfiguration.vue | 26 ++++++++++++++++++- .../src/views/system/datasource/DsForm.vue | 3 +++ 6 files changed, 56 insertions(+), 37 deletions(-) diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 0c6f4b2b69..3b1b8cfb1d 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -1632,4 +1632,29 @@ div:focus { white-space: nowrap; height: 24px; } +} + +.db-multiple-select-pop { + .selected::after { + content: ''; + width: 6px; + height: 12px; + position: absolute; + right: 12px; + top: 9px; + border: 2px solid #3370ff; + border-top-color: rgba(0, 0, 0, 0); + border-left-color: rgba(0, 0, 0, 0); + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + } +} + +.role-add-name { + .el-select-dropdown__item.selected::after { + content: ''; + position: absolute; + right: 12px; + top: 9px; + } } \ No newline at end of file diff --git a/frontend/src/views/dataset/add/AddApi.vue b/frontend/src/views/dataset/add/AddApi.vue index a142f9a921..2e009ccca8 100644 --- a/frontend/src/views/dataset/add/AddApi.vue +++ b/frontend/src/views/dataset/add/AddApi.vue @@ -32,6 +32,7 @@ - diff --git a/frontend/src/views/dataset/add/AddDB.vue b/frontend/src/views/dataset/add/AddDB.vue index ba39fb8381..791f839d8c 100644 --- a/frontend/src/views/dataset/add/AddDB.vue +++ b/frontend/src/views/dataset/add/AddDB.vue @@ -33,7 +33,7 @@ v-model="dataSource" class="ds-list" filterable - popper-class="db-select-pop" + popper-class="db-multiple-select-pop" :placeholder="$t('dataset.pls_slc_data_source')" size="small" > @@ -640,20 +640,3 @@ export default { } } - diff --git a/frontend/src/views/dataset/form.vue b/frontend/src/views/dataset/form.vue index fa397647c1..6612092422 100644 --- a/frontend/src/views/dataset/form.vue +++ b/frontend/src/views/dataset/form.vue @@ -21,7 +21,7 @@ style="left: 55px" class="el-form-item__error" > - {{ $t('deDataset.already_Exists') }} + {{ $t('deDataset.already_exists') }} diff --git a/frontend/src/components/widget/DeWidget/CustomTabsSort.vue b/frontend/src/components/widget/DeWidget/CustomTabsSort.vue new file mode 100644 index 0000000000..479501d77f --- /dev/null +++ b/frontend/src/components/widget/DeWidget/CustomTabsSort.vue @@ -0,0 +1,121 @@ + + + + + From 47bb7d29cefb179c382079a8e4ead7d4d84babfe Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 31 Oct 2022 14:20:04 +0800 Subject: [PATCH 24/42] =?UTF-8?q?perf(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A?= =?UTF-8?q?):=20=E5=8F=91=E9=80=81=E5=AE=8C=E6=B6=88=E6=81=AF=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=B8=B4=E6=97=B6=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/commons/utils/ExcelUtils.java | 12 ++++++++++-- .../sechedule/strategy/impl/EmailTaskHandler.java | 12 +++++++++++- .../io/dataease/plugins/server/XEmailTaskServer.java | 2 +- .../io/dataease/service/chart/ViewExportExcel.java | 6 +++--- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java b/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java index 1602341ddb..78394de43e 100644 --- a/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java +++ b/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java @@ -18,8 +18,9 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class ExcelUtils { private static final String suffix = ".xlsx"; + private static final String BASE_ROOT = "/opt/dataease/data/"; - public static File exportExcel(List sheets, String fileName) throws Exception { + public static File exportExcel(List sheets, String fileName, String folderId) throws Exception { AtomicReference realFileName = new AtomicReference<>(fileName); Workbook wb = new XSSFWorkbook(); @@ -63,7 +64,14 @@ public class ExcelUtils { if (!StringUtils.endsWith(fileName, suffix)) { realFileName.set(realFileName.get() + suffix); } - File result = new File("/opt/dataease/data/" + realFileName.get()); + String folderPath = BASE_ROOT; + if (StringUtils.isNotBlank(folderId)) { + folderPath = BASE_ROOT + folderId + "/"; + } + if (!FileUtil.exist(folderPath)) { + FileUtil.mkdir(folderPath); + } + File result = new File(folderPath + realFileName.get()); BufferedOutputStream outputStream = FileUtil.getOutputStream(result); try { wb.write(outputStream); diff --git a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java index 965648465f..a6dc65e2e8 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java +++ b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java @@ -1,5 +1,6 @@ package io.dataease.job.sechedule.strategy.impl; +import cn.hutool.core.io.FileUtil; import io.dataease.auth.entity.SysUserEntity; import io.dataease.auth.entity.TokenInfo; import io.dataease.auth.service.AuthUserService; @@ -160,6 +161,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class); AuthUserServiceImpl userService = SpringContextUtil.getBean(AuthUserServiceImpl.class); SysUserService sysUserService = SpringContextUtil.getBean(SysUserService.class); + List files = null; try { XpackEmailTaskRequest taskForm = emailXpackService.taskForm(taskInstance.getTaskId()); if (ObjectUtils.isEmpty(taskForm) || CronUtils.taskExpire(taskForm.getEndTime())) { @@ -199,7 +201,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { contentStr = new String(content, "UTF-8"); } - List files = null; + String viewIds = emailTemplateDTO.getViewIds(); ChartViewService chartViewService = SpringContextUtil.getBean(ChartViewService.class); List viewOptions = chartViewService.viewOptions(panelId); @@ -343,6 +345,14 @@ public class EmailTaskHandler extends TaskHandler implements Job { } catch (Exception e) { error(taskInstance, e); LogUtil.error(e.getMessage(), e); + } finally { + if (CollectionUtils.isNotEmpty(files)) { + files.forEach(file -> { + if (file.exists()) { + FileUtil.del(file); + } + }); + } } } diff --git a/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java b/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java index 09666aefbb..2378f8854a 100644 --- a/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java @@ -233,7 +233,7 @@ public class XEmailTaskServer { ExcelSheetModel excelSheetModel = excelSheetModel(instanceDTOS); List sheetModels = new ArrayList<>(); sheetModels.add(excelSheetModel); - File file = ExcelUtils.exportExcel(sheetModels, null); + File file = ExcelUtils.exportExcel(sheetModels, null, null); InputStream inputStream = new FileInputStream(file); HttpServletResponse response = ServletUtils.response(); try { diff --git a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java index e910178fb8..60129c6f5a 100644 --- a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java +++ b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java @@ -51,7 +51,7 @@ public class ViewExportExcel { Map stringChartExtRequestMap = buildViewRequest(panelDto, justView); List results = new ArrayList<>(); List sheets = viewIds.stream().map(viewId -> viewFiles(viewId, stringChartExtRequestMap.get(viewId))).collect(Collectors.toList()); - File excelFile = ExcelUtils.exportExcel(sheets, panelDto.getName()); + File excelFile = ExcelUtils.exportExcel(sheets, panelDto.getName(), panelDto.getId()); results.add(excelFile); return results; } @@ -62,7 +62,7 @@ public class ViewExportExcel { List> components = gson.fromJson(componentsJson, tokenType); String panelStyle = panelDto.getPanelStyle(); Map map = gson.fromJson(panelStyle, Map.class); - Map panelMap = (LinkedTreeMap)map.get("panel"); + Map panelMap = (LinkedTreeMap) map.get("panel"); double resultCount = Double.parseDouble(panelMap.get("resultCount").toString()); String resultMode = panelMap.get("resultMode").toString(); @@ -73,7 +73,7 @@ public class ViewExportExcel { ChartExtRequest chartExtRequest = new ChartExtRequest(); chartExtRequest.setQueryFrom("panel"); chartExtRequest.setFilter(chartExtFilterRequests); - chartExtRequest.setResultCount((int)resultCount); + chartExtRequest.setResultCount((int) resultCount); chartExtRequest.setResultMode(resultMode); result.put(entry.getKey(), chartExtRequest); } From c6011186da8930840cb6d0e801feb66a243e3e31 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Mon, 31 Oct 2022 15:18:11 +0800 Subject: [PATCH 25/42] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF=20titl?= =?UTF-8?q?e=20=E4=BF=AE=E6=94=B9=E7=9B=B8=E5=85=B3bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/DeWidget/DeSelectGrid.vue | 21 +- .../chart/components/ChartComponentG2.vue | 296 +------------- .../chart/components/ChartComponentS2.vue | 293 +------------- .../chart/components/ChartTitleUpdate.vue | 382 ++++++++++++++++++ .../component-style/dialog/RemarkEditor.vue | 15 +- .../chart/components/normal/LabelNormal.vue | 15 +- .../components/normal/LabelNormalText.vue | 15 +- .../system/datasource/DsConfiguration.vue | 22 +- 8 files changed, 439 insertions(+), 620 deletions(-) create mode 100644 frontend/src/views/chart/components/ChartTitleUpdate.vue diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index 75e7758c6f..1cebdb8346 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -24,18 +24,19 @@ v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange" - > - {{ $t('commons.all') }} + />{{ $t('commons.all') }} - {{ item.id }} + @@ -407,13 +408,11 @@ export default { .checkbox-group-container { label.el-checkbox { - display: block !important; - margin: 10px !important; + margin: 10px 10px 0 10px !important; } .el-checkbox-group>label { - display: block !important; - margin: 10px !important; + margin: 10px 10px 0 10px !important; } } diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue index c55b9c80fe..1f9c1f6a5d 100644 --- a/frontend/src/views/chart/components/ChartComponentG2.vue +++ b/frontend/src/views/chart/components/ChartComponentG2.vue @@ -19,20 +19,7 @@ style="cursor: default;display: block;" >
- -

{{ chart.title }}

+ { - const chartView = JSON.parse(JSON.stringify(response.data)) - chartView.viewFields = chartView.viewFields ? JSON.parse(chartView.viewFields) : [] - chartView.xaxis = chartView.xaxis ? JSON.parse(chartView.xaxis) : [] - chartView.xaxisExt = chartView.xaxisExt ? JSON.parse(chartView.xaxisExt) : [] - chartView.yaxis = chartView.yaxis ? JSON.parse(chartView.yaxis) : [] - chartView.yaxisExt = chartView.yaxisExt ? JSON.parse(chartView.yaxisExt) : [] - chartView.extStack = chartView.extStack ? JSON.parse(chartView.extStack) : [] - chartView.drillFields = chartView.drillFields ? JSON.parse(chartView.drillFields) : [] - chartView.extBubble = chartView.extBubble ? JSON.parse(chartView.extBubble) : [] - chartView.customAttr = chartView.customAttr ? JSON.parse(chartView.customAttr) : {} - chartView.customStyle = chartView.customStyle ? JSON.parse(chartView.customStyle) : {} - chartView.customFilter = chartView.customFilter ? JSON.parse(chartView.customFilter) : {} - chartView.senior = chartView.senior ? JSON.parse(chartView.senior) : {} - const viewSave = this.buildParam(chartView, true, 'chart', false, false) - if (!viewSave) return - viewEditSave(this.panelInfo.id, viewSave).then(() => { - bus.$emit('aside-set-title', this.chart.title) - }) - this.$store.commit('recordViewEdit', { viewId: this.chart.id, hasEdit: true }) - }) - }, - handleTitleEditer() { - if (this.mainActiveName !== 'PanelEdit' || this.mobileLayoutStatus || this.previewVisible) return - this.chartTitleEditer = true - this.chartTitleUpdate = this.chart.title - this.$nextTick(() => { - this.$refs.chartTitle.focus() - }) - }, - buildParam(chartView, getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) { - if (!chartView.resultCount || - chartView.resultCount === '' || - isNaN(Number(chartView.resultCount)) || - String(chartView.resultCount).includes('.') || - parseInt(chartView.resultCount) < 1) { - chartView.resultCount = '1000' - } - const view = JSON.parse(JSON.stringify(chartView)) - view.id = chartView.id - view.sceneId = chartView.sceneId - view.name = this.chartTitleUpdate - view.title = this.chartTitleUpdate - view.tableId = chartView.tableId - if (view.type === 'map' && view.xaxis.length > 1) { - view.xaxis = [view.xaxis[0]] - } - view.xaxis.forEach(function(ele) { - if (!ele.dateStyle || ele.dateStyle === '') { - ele.dateStyle = 'y_M_d' - } - if (!ele.datePattern || ele.datePattern === '') { - ele.datePattern = 'date_sub' - } - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - }) - if (view.type === 'table-pivot' || view.type === 'bar-group') { - view.xaxisExt.forEach(function(ele) { - if (!ele.dateStyle || ele.dateStyle === '') { - ele.dateStyle = 'y_M_d' - } - if (!ele.datePattern || ele.datePattern === '') { - ele.datePattern = 'date_sub' - } - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - }) - } - if (view.type === 'map' && view.yaxis.length > 1) { - view.yaxis = [view.yaxis[0]] - } - view.yaxis.forEach(function(ele) { - if (!ele.chartType) { - ele.chartType = 'bar' - } - if (ele.chartId) { - ele.summary = '' - } else { - if (!ele.summary || ele.summary === '') { - if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) { - ele.summary = 'count' - } else { - ele.summary = 'sum' - } - } - } - - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - if (!ele.compareCalc) { - ele.compareCalc = compareItem - } - }) - if (view.type === 'chart-mix') { - view.yaxisExt.forEach(function(ele) { - if (!ele.chartType) { - ele.chartType = 'bar' - } - if (ele.chartId) { - ele.summary = '' - } else { - if (!ele.summary || ele.summary === '') { - if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) { - ele.summary = 'count' - } else { - ele.summary = 'sum' - } - } - } - - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - if (!ele.compareCalc) { - ele.compareCalc = compareItem - } - }) - } - view.extStack.forEach(function(ele) { - if (!ele.dateStyle || ele.dateStyle === '') { - ele.dateStyle = 'y_M_d' - } - if (!ele.datePattern || ele.datePattern === '') { - ele.datePattern = 'date_sub' - } - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - }) - view.extBubble.forEach(function(ele) { - if (!ele.summary || ele.summary === '') { - if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) { - ele.summary = 'count' - } else { - ele.summary = 'sum' - } - } - }) - if (view.type === 'label') { - if (view.xaxis.length > 1) { - view.xaxis.splice(1, view.xaxis.length) - } - } - if (view.type.startsWith('pie') || - view.type.startsWith('funnel') || - view.type.startsWith('text') || - view.type.startsWith('gauge') || - view.type === 'treemap' || - view.type === 'liquid' || - view.type === 'word-cloud' || - view.type === 'waterfall' || - view.type.includes('group')) { - if (view.yaxis.length > 1) { - view.yaxis.splice(1, view.yaxis.length) - } - } - if (view.type === 'line-stack' && trigger === 'chart') { - view.customAttr.size.lineArea = true - } - if (view.type === 'line' && trigger === 'chart') { - view.customAttr.size.lineArea = false - } - if (view.type === 'treemap' && trigger === 'chart') { - view.customAttr.label.show = true - } - if (view.type === 'liquid' || - (view.type.includes('table') && view.render === 'echarts') || - view.type.includes('text') || - view.type.includes('gauge') || - view.type === 'table-pivot') { - view.drillFields = [] - } - view.customFilter.forEach(function(ele) { - if (ele && !ele.filter) { - ele.filter = [] - } - }) - view.xaxis = JSON.stringify(view.xaxis) - view.viewFields = JSON.stringify(view.viewFields) - view.xaxisExt = JSON.stringify(view.xaxisExt) - view.yaxis = JSON.stringify(view.yaxis) - view.yaxisExt = JSON.stringify(view.yaxisExt) - view.customAttr = JSON.stringify(view.customAttr) - view.customStyle = JSON.stringify(view.customStyle) - view.customFilter = JSON.stringify(view.customFilter) - view.extStack = JSON.stringify(view.extStack) - view.drillFields = JSON.stringify(view.drillFields) - view.extBubble = JSON.stringify(view.extBubble) - view.senior = JSON.stringify(view.senior) - delete view.data - return view - }, - changeEditStatus() { - this.lostFocus() - if (this.chartTitleUpdate.length > 50) { - this.$error(this.$t('chart.title_limit')) - return - } - if (this.chartTitleUpdate === this.chart.title) return - this.chart.title = this.chartTitleUpdate - this.getChartDetail() - }, initRemark() { this.remarkCfg = getRemark(this.chart) } } } - - diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue index 9a37f67555..50cfcb3476 100644 --- a/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/frontend/src/views/chart/components/ChartComponentS2.vue @@ -19,20 +19,7 @@ style="cursor: default;display: block;" >
- -

{{ chart.title }}

+ { - const chartView = JSON.parse(JSON.stringify(response.data)) - chartView.viewFields = chartView.viewFields ? JSON.parse(chartView.viewFields) : [] - chartView.xaxis = chartView.xaxis ? JSON.parse(chartView.xaxis) : [] - chartView.xaxisExt = chartView.xaxisExt ? JSON.parse(chartView.xaxisExt) : [] - chartView.yaxis = chartView.yaxis ? JSON.parse(chartView.yaxis) : [] - chartView.yaxisExt = chartView.yaxisExt ? JSON.parse(chartView.yaxisExt) : [] - chartView.extStack = chartView.extStack ? JSON.parse(chartView.extStack) : [] - chartView.drillFields = chartView.drillFields ? JSON.parse(chartView.drillFields) : [] - chartView.extBubble = chartView.extBubble ? JSON.parse(chartView.extBubble) : [] - chartView.customAttr = chartView.customAttr ? JSON.parse(chartView.customAttr) : {} - chartView.customStyle = chartView.customStyle ? JSON.parse(chartView.customStyle) : {} - chartView.customFilter = chartView.customFilter ? JSON.parse(chartView.customFilter) : {} - chartView.senior = chartView.senior ? JSON.parse(chartView.senior) : {} - const viewSave = this.buildParam(chartView, true, 'chart', false, false) - if (!viewSave) return - viewEditSave(this.panelInfo.id, viewSave).then(() => { - bus.$emit('aside-set-title', this.chart.title) - }) - this.$store.commit('recordViewEdit', { viewId: this.chart.id, hasEdit: true }) - }) - }, - handleTitleEditer() { - if (this.mainActiveName !== 'PanelEdit' || this.mobileLayoutStatus || this.previewVisible) return - this.chartTitleEditer = true - this.chartTitleUpdate = this.chart.title - this.$nextTick(() => { - this.$refs.chartTitle.focus() - }) - }, - buildParam(chartView, getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) { - if (!chartView.resultCount || - chartView.resultCount === '' || - isNaN(Number(chartView.resultCount)) || - String(chartView.resultCount).includes('.') || - parseInt(chartView.resultCount) < 1) { - chartView.resultCount = '1000' - } - const view = JSON.parse(JSON.stringify(chartView)) - view.id = chartView.id - view.sceneId = chartView.sceneId - view.name = this.chartTitleUpdate - view.title = this.chartTitleUpdate - view.tableId = chartView.tableId - if (view.type === 'map' && view.xaxis.length > 1) { - view.xaxis = [view.xaxis[0]] - } - view.xaxis.forEach(function(ele) { - if (!ele.dateStyle || ele.dateStyle === '') { - ele.dateStyle = 'y_M_d' - } - if (!ele.datePattern || ele.datePattern === '') { - ele.datePattern = 'date_sub' - } - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - }) - if (view.type === 'table-pivot' || view.type === 'bar-group') { - view.xaxisExt.forEach(function(ele) { - if (!ele.dateStyle || ele.dateStyle === '') { - ele.dateStyle = 'y_M_d' - } - if (!ele.datePattern || ele.datePattern === '') { - ele.datePattern = 'date_sub' - } - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - }) - } - if (view.type === 'map' && view.yaxis.length > 1) { - view.yaxis = [view.yaxis[0]] - } - view.yaxis.forEach(function(ele) { - if (!ele.chartType) { - ele.chartType = 'bar' - } - if (ele.chartId) { - ele.summary = '' - } else { - if (!ele.summary || ele.summary === '') { - if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) { - ele.summary = 'count' - } else { - ele.summary = 'sum' - } - } - } - - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - if (!ele.compareCalc) { - ele.compareCalc = compareItem - } - }) - if (view.type === 'chart-mix') { - view.yaxisExt.forEach(function(ele) { - if (!ele.chartType) { - ele.chartType = 'bar' - } - if (ele.chartId) { - ele.summary = '' - } else { - if (!ele.summary || ele.summary === '') { - if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) { - ele.summary = 'count' - } else { - ele.summary = 'sum' - } - } - } - - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - if (!ele.filter) { - ele.filter = [] - } - if (!ele.compareCalc) { - ele.compareCalc = compareItem - } - }) - } - view.extStack.forEach(function(ele) { - if (!ele.dateStyle || ele.dateStyle === '') { - ele.dateStyle = 'y_M_d' - } - if (!ele.datePattern || ele.datePattern === '') { - ele.datePattern = 'date_sub' - } - if (!ele.sort || ele.sort === '') { - ele.sort = 'none' - } - }) - view.extBubble.forEach(function(ele) { - if (!ele.summary || ele.summary === '') { - if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) { - ele.summary = 'count' - } else { - ele.summary = 'sum' - } - } - }) - if (view.type === 'label') { - if (view.xaxis.length > 1) { - view.xaxis.splice(1, view.xaxis.length) - } - } - if (view.type.startsWith('pie') || - view.type.startsWith('funnel') || - view.type.startsWith('text') || - view.type.startsWith('gauge') || - view.type === 'treemap' || - view.type === 'liquid' || - view.type === 'word-cloud' || - view.type === 'waterfall' || - view.type.includes('group')) { - if (view.yaxis.length > 1) { - view.yaxis.splice(1, view.yaxis.length) - } - } - if (view.type === 'line-stack' && trigger === 'chart') { - view.customAttr.size.lineArea = true - } - if (view.type === 'line' && trigger === 'chart') { - view.customAttr.size.lineArea = false - } - if (view.type === 'treemap' && trigger === 'chart') { - view.customAttr.label.show = true - } - if (view.type === 'liquid' || - (view.type.includes('table') && view.render === 'echarts') || - view.type.includes('text') || - view.type.includes('gauge') || - view.type === 'table-pivot') { - view.drillFields = [] - } - view.customFilter.forEach(function(ele) { - if (ele && !ele.filter) { - ele.filter = [] - } - }) - view.xaxis = JSON.stringify(view.xaxis) - view.viewFields = JSON.stringify(view.viewFields) - view.xaxisExt = JSON.stringify(view.xaxisExt) - view.yaxis = JSON.stringify(view.yaxis) - view.yaxisExt = JSON.stringify(view.yaxisExt) - view.customAttr = JSON.stringify(view.customAttr) - view.customStyle = JSON.stringify(view.customStyle) - view.customFilter = JSON.stringify(view.customFilter) - view.extStack = JSON.stringify(view.extStack) - view.drillFields = JSON.stringify(view.drillFields) - view.extBubble = JSON.stringify(view.extBubble) - view.senior = JSON.stringify(view.senior) - delete view.data - return view - }, - changeEditStatus() { - this.lostFocus() - if (this.chartTitleUpdate.length > 50) { - this.$error(this.$t('chart.title_limit')) - return - } - if (this.chartTitleUpdate === this.chart.title) return - this.chart.title = this.chartTitleUpdate - this.getChartDetail() - }, pageChange(val) { this.currentPage.pageSize = val this.initData() @@ -769,28 +514,4 @@ export default { .page-style ::v-deep li{ background: transparent!important; } - -.chart-input-title{ - word-break: break-word; - font: 12px / 1.231 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", sans-serif, "Segoe UI Symbol"; - overflow: visible; - margin: 0; - padding: 0; - font-weight: 400; - font-family: inherit; - border-radius: 2px; - color: #182b50; - font-size: 12px; - line-height: 26px; - padding-left: 10px; - padding-right: 10px; - background: transparent; - outline: none; - border-width: 0px 0px 1px; - border-image: initial; - border-bottom: 1px solid rgb(200, 203, 204); - z-index: 2; - height: 21px; - min-width: 100px; -} diff --git a/frontend/src/views/chart/components/ChartTitleUpdate.vue b/frontend/src/views/chart/components/ChartTitleUpdate.vue new file mode 100644 index 0000000000..334c4d53bf --- /dev/null +++ b/frontend/src/views/chart/components/ChartTitleUpdate.vue @@ -0,0 +1,382 @@ + + + + + diff --git a/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue b/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue index a358884bb1..96776d5955 100644 --- a/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue +++ b/frontend/src/views/chart/components/component-style/dialog/RemarkEditor.vue @@ -70,14 +70,6 @@ export default { } } }, - watch: { - content: { - handler(newValue) { - this.$emit('onRemarkChange', newValue) - } - } - }, - computed: { customStyle() { let style = {} @@ -115,6 +107,13 @@ export default { 'canvasStyleData' ]) }, + watch: { + content: { + handler(newValue) { + this.$emit('onRemarkChange', newValue) + } + } + }, created() { if (!this.showTable) { this.init.plugins = this.init.plugins.replace(' table', '') diff --git a/frontend/src/views/chart/components/normal/LabelNormal.vue b/frontend/src/views/chart/components/normal/LabelNormal.vue index 30aee75973..a2bce9adfd 100644 --- a/frontend/src/views/chart/components/normal/LabelNormal.vue +++ b/frontend/src/views/chart/components/normal/LabelNormal.vue @@ -11,7 +11,7 @@ style="cursor: default;display: block;" >
-

{{ chart.title }}

+
-

{{ chart.title }}

+ @@ -30,6 +28,10 @@ export default { type: String, required: true }, + background: { + type: String, + required: false + }, showTable: { type: Boolean, default: true @@ -100,14 +102,9 @@ export default { return style }, commonStyle() { - const style = { - width: '100%', - height: '100%' + return { + background: this.background } - if (this.curComponent.commonBackground && this.curComponent.commonBackground.backgroundColorSelect) { - style['background-color'] = hexColorToRGBA(this.curComponent.commonBackground.color, this.curComponent.commonBackground.alpha) - } - return style }, ... mapState([ diff --git a/frontend/src/views/chart/view/TitleRemark.vue b/frontend/src/views/chart/view/TitleRemark.vue index 433d4d4763..151bb41d36 100644 --- a/frontend/src/views/chart/view/TitleRemark.vue +++ b/frontend/src/views/chart/view/TitleRemark.vue @@ -39,6 +39,7 @@ export default { max-height: 200px; overflow-y: auto; padding: 10px; + color: #000000; border-radius: 4px; } ::-webkit-scrollbar { From fc8b215ea68a16696815cad867a1543df0834320 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 31 Oct 2022 15:28:13 +0800 Subject: [PATCH 27/42] =?UTF-8?q?fix(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A)?= =?UTF-8?q?:=20resultMode=E5=A2=9E=E5=8A=A0=E9=9D=9E=E7=A9=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/service/chart/ViewExportExcel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java index 60129c6f5a..baa47a3053 100644 --- a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java +++ b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java @@ -64,7 +64,10 @@ public class ViewExportExcel { Map map = gson.fromJson(panelStyle, Map.class); Map panelMap = (LinkedTreeMap) map.get("panel"); double resultCount = Double.parseDouble(panelMap.get("resultCount").toString()); - String resultMode = panelMap.get("resultMode").toString(); + String resultMode = null; + if (ObjectUtils.isNotEmpty(panelMap.get("resultMode"))) { + resultMode = panelMap.get("resultMode").toString(); + } Map result = new HashMap<>(); Map> panelFilters = justView ? FilterBuildTemplate.buildFilters(components) : FilterBuildTemplate.buildEmpty(components); From d7fd0471eef62301386ee817c79ea817134fe216 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 31 Oct 2022 15:37:03 +0800 Subject: [PATCH 28/42] =?UTF-8?q?fix(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A)?= =?UTF-8?q?:=20=E4=B8=A4=E4=B8=AA=E4=BB=BB=E5=8A=A1=E9=80=89=E5=90=8C?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E4=BB=AA=E8=A1=A8=E6=9D=BF=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=95=B0=E6=8D=AE=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/commons/utils/ExcelUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java b/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java index 78394de43e..e03382babe 100644 --- a/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java +++ b/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java @@ -68,6 +68,9 @@ public class ExcelUtils { if (StringUtils.isNotBlank(folderId)) { folderPath = BASE_ROOT + folderId + "/"; } + + folderPath += Thread.currentThread().getId() + "/"; + if (!FileUtil.exist(folderPath)) { FileUtil.mkdir(folderPath); } From 6e1b76bba51486e91dc61d36fd311a2fc88768cd Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 31 Oct 2022 16:06:22 +0800 Subject: [PATCH 29/42] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=A8=AA=E7=BA=B5=E8=BD=B4=E7=BD=91=E6=A0=BC=E7=BA=BF?= =?UTF-8?q?=E6=B7=B1=E8=89=B2=E8=83=8C=E6=99=AF=E4=B8=8B=E7=9A=84=E9=A2=9C?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index bc34e44c0c..98a1cfbfcf 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -8,7 +8,7 @@ export const LIGHT_THEME_PANEL_BACKGROUND = '#F1F3F5' export const LIGHT_THEME_COMPONENT_BACKGROUND = '#FFFFFF' export const DARK_THEME_COLOR_MAIN = '#FFFFFF' -export const DARK_THEME_COLOR_SLAVE1 = '#CCCCCC' +export const DARK_THEME_COLOR_SLAVE1 = '#858383' export const DARK_THEME_PANEL_BACKGROUND = '#030B2E' export const DARK_THEME_COMPONENT_BACKGROUND = '#131E42' export const DARK_THEME_COMPONENT_BACKGROUND_BACK = '#5a5c62' From 0a2b75ea2c6a6f4249f210599119a826bf6a26c1 Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 31 Oct 2022 16:26:38 +0800 Subject: [PATCH 30/42] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE):=20=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=A4=87=E6=B3=A8=E4=B8=8E=E6=A0=87=E9=A2=98=E5=AF=B9?= =?UTF-8?q?=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/components/ChartComponentG2.vue | 2 +- frontend/src/views/chart/components/ChartComponentS2.vue | 2 +- frontend/src/views/chart/components/normal/LabelNormal.vue | 2 +- frontend/src/views/chart/components/normal/LabelNormalText.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue index 1f9c1f6a5d..fe9cca5dfa 100644 --- a/frontend/src/views/chart/components/ChartComponentG2.vue +++ b/frontend/src/views/chart/components/ChartComponentG2.vue @@ -18,7 +18,7 @@ :style="title_class" style="cursor: default;display: block;" > -
+
-
+
-
+
-
+
Date: Mon, 31 Oct 2022 16:40:30 +0800 Subject: [PATCH 31/42] =?UTF-8?q?fix(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A)?= =?UTF-8?q?:=20=E6=95=B0=E5=AD=97=E5=8C=BA=E9=97=B4=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=99=A8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sechedule/strategy/impl/EmailTaskHandler.java | 2 +- .../io/dataease/service/chart/ViewExportExcel.java | 4 ++-- .../service/chart/build/NumberRangeBuild.java | 14 ++++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java index a6dc65e2e8..d96be6a985 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java +++ b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java @@ -212,7 +212,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { List viewIdList = Arrays.asList(viewIds.split(",")).stream().map(s -> s.trim()).filter(viewId -> StringUtils.isNotBlank(viewId) && viewOptionIdList.contains(viewId)).collect(Collectors.toList()); PermissionProxy proxy = new PermissionProxy(); proxy.setUserId(user.getUserId()); - files = viewExportExcel.export(panelId, viewIdList, proxy, justExportView); + files = viewExportExcel.export(panelId, viewIdList, proxy, justExportView, taskInstance.getTaskId().toString()); } List channels = null; diff --git a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java index baa47a3053..d442916cf0 100644 --- a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java +++ b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java @@ -40,7 +40,7 @@ public class ViewExportExcel { }.getType(); @DePermissionProxy(paramIndex = 2) - public List export(String panelId, List viewIds, PermissionProxy proxy, Boolean justView) throws Exception { + public List export(String panelId, List viewIds, PermissionProxy proxy, Boolean justView, String taskId) throws Exception { if (CollectionUtils.isEmpty(viewIds)) { return null; } @@ -51,7 +51,7 @@ public class ViewExportExcel { Map stringChartExtRequestMap = buildViewRequest(panelDto, justView); List results = new ArrayList<>(); List sheets = viewIds.stream().map(viewId -> viewFiles(viewId, stringChartExtRequestMap.get(viewId))).collect(Collectors.toList()); - File excelFile = ExcelUtils.exportExcel(sheets, panelDto.getName(), panelDto.getId()); + File excelFile = ExcelUtils.exportExcel(sheets, panelDto.getName(), panelDto.getId() + "_" + taskId); results.add(excelFile); return results; } diff --git a/backend/src/main/java/io/dataease/service/chart/build/NumberRangeBuild.java b/backend/src/main/java/io/dataease/service/chart/build/NumberRangeBuild.java index 42ea023770..abcec34ca9 100644 --- a/backend/src/main/java/io/dataease/service/chart/build/NumberRangeBuild.java +++ b/backend/src/main/java/io/dataease/service/chart/build/NumberRangeBuild.java @@ -7,8 +7,10 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Service("numberRangeWidget") public class NumberRangeBuild extends FilterBuildTemplate { @@ -24,18 +26,22 @@ public class NumberRangeBuild extends FilterBuildTemplate { Map options = null; List values = null; - if((optionObj = component.get("options")) != null && (valueObj = (options = (Map) optionObj).get("value")) != null && CollectionUtil.isNotEmpty((values = (List) valueObj))) { + if ((optionObj = component.get("options")) != null && (valueObj = (options = (Map) optionObj).get("value")) != null) { + if (valueObj instanceof List) { + values = (List) valueObj; + } else { + return result; + } String min = values.get(0); String max = null; - if(values.size() > 1) { + if (values.size() > 1) { max = values.get(1); } result.setOperator("between"); - result.getValue().set(0, min); - result.getValue().set(1, max); if (StringUtils.isNotBlank(min) && StringUtils.isNotBlank(max)) { + result.setValue(values); return result; } From c082f515cc068f68adc36741adc5192e5a24ca22 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Mon, 31 Oct 2022 16:41:22 +0800 Subject: [PATCH 32/42] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E7=BB=84=E4=BB=B6title=E6=9B=B4=E6=94=B9=20checkbox=E6=94=B9?= =?UTF-8?q?=E6=88=90=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/component-style/TitleSelectorAntV.vue | 4 ++-- .../src/views/panel/SubjectSetting/PanelStyle/ViewTitle.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue b/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue index 738bbae4b4..f5a001e7af 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue @@ -12,10 +12,10 @@ :label="$t('chart.show')" class="form-item" > - {{ $t('chart.show') }} + />
- {{ $t('chart.show') }} + />
Date: Mon, 31 Oct 2022 16:53:34 +0800 Subject: [PATCH 33/42] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E4=B8=BB=E9=A2=98=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E3=80=81=E6=96=87=E6=A1=88=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V42__1.16.sql | 4 ++++ frontend/src/lang/en.js | 1 + frontend/src/lang/tw.js | 1 + frontend/src/lang/zh.js | 1 + frontend/src/views/chart/chart/chart.js | 4 ++-- .../panel/SubjectSetting/PanelStyle/ComponentStyle.vue | 6 +++--- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/backend/src/main/resources/db/migration/V42__1.16.sql b/backend/src/main/resources/db/migration/V42__1.16.sql index 715e8f55b4..06804d06f3 100644 --- a/backend/src/main/resources/db/migration/V42__1.16.sql +++ b/backend/src/main/resources/db/migration/V42__1.16.sql @@ -281,3 +281,7 @@ RETURN 'success'; END ;; delimiter ; + +UPDATE `panel_subject` +SET `details` = '{\"width\":1600,\"height\":900,\"scale\":100,\"scaleWidth\":100,\"scaleHeight\":100,\"selfAdaption\":true,\"auxiliaryMatrix\":true,\"openCommonStyle\":true,\"panel\":{\"themeColor\":\"dark\",\"color\":\"#030B2E\",\"imageUrl\":{},\"backgroundType\":\"color\",\"gap\":\"yes\",\"resultMode\":\"all\",\"resultCount\":1000},\"aidedDesign\":{\"showGrid\":false,\"matrixBase\":4},\"refreshViewLoading\":true,\"refreshUnit\":\"minute\",\"refreshTime\":5,\"themeId\":\"f9f46a50-58f5-11ed-889b-91ab7371e877\",\"chartInfo\":{\"chartTitle\":{\"show\":true,\"fontSize\":\"18\",\"color\":\"#FFFFFF\",\"hPosition\":\"left\",\"vPosition\":\"top\",\"isItalic\":false,\"isBolder\":true,\"remarkShow\":false,\"remark\":\"\",\"remarkBackgroundColor\":\"#5A5C62\",\"fontFamily\":\"Microsoft YaHei\",\"letterSpace\":\"0\",\"fontShadow\":false},\"chartColor\":{\"value\":\"default\",\"colors\":[\"#5470c6\",\"#91cc75\",\"#fac858\",\"#ee6666\",\"#73c0de\",\"#3ba272\",\"#fc8452\",\"#9a60b4\",\"#ea7ccc\"],\"alpha\":100,\"tableHeaderBgColor\":\"#5470C6\",\"tableItemBgColor\":\"#131E42\",\"tableFontColor\":\"#ffffff\",\"tableStripe\":true,\"dimensionColor\":\"#ffffff\",\"quotaColor\":\"#5470C6\",\"tableBorderColor\":\"#CCCCCC\",\"seriesColors\":[],\"areaBorderColor\":\"#EBEEF5\",\"tableHeaderFontColor\":\"#ffffff\",\"modifyName\":\"colors\"},\"chartCommonStyle\":{\"backgroundColorSelect\":true,\"color\":\"#131E42\",\"alpha\":100,\"borderRadius\":5,\"innerPadding\":0},\"filterStyle\":{\"horizontal\":\"left\",\"vertical\":\"top\",\"color\":\"#FFFFFF\",\"brColor\":\"#4E4B4B\",\"wordColor\":\"#FFFFFF\",\"innerBgColor\":\"#131E42\"},\"tabStyle\":{\"headFontColor\":\"#FFFFFF\",\"headFontActiveColor\":\"#FFFFFF\",\"headBorderColor\":\"#FFFFFF\",\"headBorderActiveColor\":\"#FFFFFF\",\"headPosition\":\"left\"}}}' +WHERE `id` = 'system_2'; diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 29d3cb0bc2..996fec93ea 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -913,6 +913,7 @@ export default { password_input_error: 'Original password input error' }, chart: { + chart_background: 'Component background', solid_color: 'Solid color', split_gradient: 'Split gradient', continuous_gradient: 'Continuous gradient', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 2d7e10c045..dd773ea421 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -913,6 +913,7 @@ export default { password_input_error: '原始密碼輸入錯誤' }, chart: { + chart_background: '組件背景', solid_color: '純色', split_gradient: '分離漸變', continuous_gradient: '連續漸變', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index c0f7053b22..40b0369420 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -912,6 +912,7 @@ export default { password_input_error: '原始密码输入错误' }, chart: { + chart_background: '组件背景', solid_color: '纯色', split_gradient: '分离渐变', continuous_gradient: '连续渐变', diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index e7056cccce..256ba7924e 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -1,8 +1,8 @@ export const DEFAULT_TAB_COLOR_CASE_DARK = { headFontColor: '#FFFFFF', headFontActiveColor: '#FFFFFF', - headBorderColor: '#FFFFFF', - headBorderActiveColor: '#FFFFFF', + headBorderColor: '#131E42', + headBorderActiveColor: '#131E42', headPosition: 'left' } diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentStyle.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentStyle.vue index 6e7de0d7be..f69f7d9746 100644 --- a/frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentStyle.vue +++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentStyle.vue @@ -7,7 +7,7 @@ style="margin-right: 10px;float: right" @change="themeChange('backgroundColorSelect')" > - {{ $t('panel.color') }} + {{ $t('chart.chart_background') }} @@ -100,10 +100,10 @@ export default { font-size: 12px; } .custom-item{ - width: 70px; + width: 90px; } .custom-item-value{ - width: calc(100% - 70px);; + width: calc(100% - 90px);; } From f91ad37e764f838cd6aaaf8567d82a5bdf83a84b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 31 Oct 2022 17:13:40 +0800 Subject: [PATCH 34/42] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BB=E9=A2=98=E9=80=89=E9=A1=B9=E5=8D=A1=E9=85=8D?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/chart.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index 256ba7924e..6442254fae 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -24,7 +24,7 @@ export const DEFAULT_COLOR_CASE = { tableFontColor: '#000000', tableStripe: true, dimensionColor: '#000000', - quotaColor: '#4E81BB', + quotaColor: '#5470c6', tableBorderColor: '#E6E7E4', seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false} areaBorderColor: '#303133' @@ -34,12 +34,12 @@ export const DEFAULT_COLOR_CASE_DARK = { value: 'default', colors: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'], alpha: 100, - tableHeaderBgColor: '#4E81BB', + tableHeaderBgColor: '#5470c6', tableItemBgColor: '#131E42', tableFontColor: '#ffffff', tableStripe: true, dimensionColor: '#ffffff', - quotaColor: '#4E81BB', + quotaColor: '#5470c6', tableBorderColor: '#CCCCCC', seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false} areaBorderColor: '#EBEEF5' From 03c25ec2488d339437b83e3fcf60cc9c82b4736f Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Mon, 31 Oct 2022 17:19:30 +0800 Subject: [PATCH 35/42] =?UTF-8?q?fix:=20=E5=BA=94=E7=94=A8=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=20=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/tw.js | 6 +++--- frontend/src/lang/zh.js | 6 +++--- frontend/src/views/panel/list/PanelViewShow.vue | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 2d7e10c045..1511c60824 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -2646,11 +2646,11 @@ export default { log_delete_tips: '確定刪除該條應用記錄嗎?', log_resource_delete_tips: '刪除相關資源(刪除後不可恢復)', file_error_tips: '未找到相關數據文件,當前文件可能不是DataEase應用文件,或者文件已經損壞', - app_export: '应用导出', - app_version: '应用版本', + app_export: '應用導出', + app_version: '應用版本', program_version: 'DataEase最低版本', creator: '作者', - export: '导出' + export: '導出' }, logout: { diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index c0f7053b22..412370f7e9 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -2646,11 +2646,11 @@ export default { log_delete_tips: '确定删除该条应用记录吗?', log_resource_delete_tips: '删除相关资源(删除后不可恢复)', file_error_tips: '未找到相关数据文件,当前文件可能不是DataEase应用文件,或者文件已经损坏', - app_export: '應用導出', - app_version: '應用版本', + app_export: '应用导出', + app_version: '应用版本', program_version: 'DataEase最低版本', creator: '作者', - export: '導出' + export: '导出' }, logout: { diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index fe6ff3bac8..93dc150180 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -281,7 +281,7 @@ Date: Mon, 31 Oct 2022 17:26:27 +0800 Subject: [PATCH 36/42] =?UTF-8?q?refactor:=20=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 1 + frontend/src/lang/tw.js | 1 + frontend/src/lang/zh.js | 1 + 3 files changed, 3 insertions(+) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 996fec93ea..87bb0255f0 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -530,6 +530,7 @@ export default { the_running_results: 'You can view the running results' }, detabs: { + custom_sort: 'Custom Sort', eidttitle: 'Edit Title', selectview: 'Select View', selectOthers: 'Select Others', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index dd773ea421..469aa82313 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -530,6 +530,7 @@ export default { the_running_results: '即可查看運行結果' }, detabs: { + custom_sort: '自定義排序', eidttitle: '編輯標題', selectview: '選擇視圖', selectOthers: '選擇組件', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 40b0369420..ae8ed56e52 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -529,6 +529,7 @@ export default { the_running_results: '即可查看运行结果' }, detabs: { + custom_sort: '自定义排序', eidttitle: '编辑标题', selectview: '选择视图', selectOthers: '选择组件', From 008d79adb27f2f7480b839e93b11c2b2bfb131f0 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 31 Oct 2022 17:44:01 +0800 Subject: [PATCH 37/42] =?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=E7=BC=96=E8=BE=91=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E9=80=89=E6=8B=A9=E7=AB=8B=E5=8D=B3?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=8C=E5=88=9B=E5=BB=BA=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=85=A8=E9=87=8F=E6=9B=B4=E6=96=B0=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/dataset/DataSetTableService.java | 1 + .../io/dataease/service/dataset/DataSetTableTaskService.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 434d8c4410..82953e556d 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -350,6 +350,7 @@ public class DataSetTableService { || StringUtils.equalsIgnoreCase(datasetTable.getType(), DatasetType.UNION.name())) { saveTableField(datasetTable); } + extractData(datasetTable); DeLogUtils.save(SysLogConstants.OPERATE_TYPE.MODIFY, SysLogConstants.SOURCE_TYPE.DATASET, datasetTable.getId(), datasetTable.getSceneId(), null, null); } } diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java index 758f7582c6..a0b34fe714 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java @@ -84,7 +84,7 @@ public class DataSetTableTaskService { } datasetTableTaskMapper.insert(datasetTableTask); } else { - datasetTableTask.setStatus(null); + datasetTableTask.setStatus(TaskStatus.Underway.name()); datasetTableTask.setLastExecTime(null); datasetTableTask.setLastExecStatus(null); datasetTableTaskMapper.updateByPrimaryKeySelective(datasetTableTask); From 4d43af735b9ba460a2fe139dc7f20608cae2aaca Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 31 Oct 2022 18:10:00 +0800 Subject: [PATCH 38/42] =?UTF-8?q?refactor(=E7=BB=84=E4=BB=B6):=20Tab?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/components/TextAttr.vue | 62 ++++++++++--------- .../canvas/custom-component/component-list.js | 3 +- frontend/src/components/canvas/utils/utils.js | 3 + .../src/components/widget/DeWidget/DeTabs.vue | 9 ++- 4 files changed, 44 insertions(+), 33 deletions(-) diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index 981cff69f9..c9412d7710 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -518,6 +518,7 @@ export default { ], // tab组件显示的属性 'de-tabs': [ + 'fontSize', 'borderStyle', 'borderWidth', 'borderColor', @@ -718,39 +719,42 @@ export default { diff --git a/frontend/src/components/canvas/custom-component/component-list.js b/frontend/src/components/canvas/custom-component/component-list.js index 844f31a2a7..0c79e78f02 100644 --- a/frontend/src/components/canvas/custom-component/component-list.js +++ b/frontend/src/components/canvas/custom-component/component-list.js @@ -388,7 +388,8 @@ const list = [ height: 200, borderStyle: 'solid', borderWidth: 0, - borderColor: '#000000' + borderColor: '#000000', + fontSize: 16 }, options: { tabList: [{ diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index d3ab9c2e14..3edae4b655 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -99,6 +99,9 @@ export function panelDataPrepare(componentData, componentStyle, callback) { item.options.attrs.accuracy = 'HH:mm' } } + if (item.type === 'de-tabs') { + item.style.fontSize = item.style.fontSize || 16 + } if (item.type === 'custom') { item.options.manualModify = false } diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 68ae346e8c..d9526cad50 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -25,8 +25,7 @@ :name="item.name" > - {{ item.title }} - + {{ item.title }} - Date: Mon, 31 Oct 2022 18:16:57 +0800 Subject: [PATCH 39/42] =?UTF-8?q?fix(=E6=B6=88=E6=81=AF=E7=AE=A1=E7=90=86)?= =?UTF-8?q?:=20=E5=8D=95=E4=B8=80=E6=B8=A0=E9=81=93=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=98=BB=E5=A1=9E=E5=85=A8=E9=83=A8=E6=B6=88=E6=81=AF=E6=B8=A0?= =?UTF-8?q?=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/message/SysMsgService.java | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/message/SysMsgService.java b/backend/src/main/java/io/dataease/service/message/SysMsgService.java index 3621bf8d66..721a466c5b 100644 --- a/backend/src/main/java/io/dataease/service/message/SysMsgService.java +++ b/backend/src/main/java/io/dataease/service/message/SysMsgService.java @@ -1,5 +1,6 @@ package io.dataease.service.message; +import io.dataease.commons.utils.LogUtil; import io.dataease.ext.ExtSysMsgMapper; import io.dataease.commons.constants.SysMsgConstants; import io.dataease.commons.utils.AuthUtils; @@ -25,6 +26,7 @@ import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; + import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; @@ -65,7 +67,7 @@ public class SysMsgService { orderClause = String.join(", ", orders); } - if (CollectionUtils.isNotEmpty(typeIds)){ + if (CollectionUtils.isNotEmpty(typeIds)) { criteria.andTypeIdIn(typeIds); } @@ -120,7 +122,7 @@ public class SysMsgService { return sysMsgTypeMapper.selectByExample(example); } - private List buildTree(List lists){ + private List buildTree(List lists) { List rootNodes = new ArrayList<>(); lists.forEach(node -> { SettingTreeNode settingTreeNode = convert(node); @@ -183,6 +185,7 @@ public class SysMsgService { /** * 修改了订阅信息 需要清除缓存 + * * @param request * @param userId */ @@ -241,22 +244,29 @@ public class SysMsgService { List subscribes = subscribes(userId); if (CollectionUtils.isNotEmpty(subscribes)) { - subscribes.stream().filter(item -> item.getTypeId().equals(typeId)).forEach(sub -> { - SendService sendService = serviceByChannel(sub.getChannelId()); - sendService.sendMsg(userId, typeId, content, param); - }); - + for (int i = 0; i < subscribes.size(); i++) { + SubscribeNode item = subscribes.get(i); + if (item.getTypeId().equals(typeId)) { + try { + SendService sendService = serviceByChannel(item.getChannelId()); + sendService.sendMsg(userId, typeId, content, param); + } catch (Exception e) { + LogUtil.error(e.getMessage(), e); + } + } + } } } - private SendService serviceByChannel(Long channelId){ + private SendService serviceByChannel(Long channelId) { String beanName = sysMsgChannelMapper.selectByPrimaryKey(channelId).getServiceName(); - return (SendService)CommonBeanFactory.getBean(beanName); + return (SendService) CommonBeanFactory.getBean(beanName); } /** * 查询用户订阅的消息 并缓存 + * * @param userId * @return */ @@ -280,7 +290,7 @@ public class SysMsgService { List defaultSettings = defaultSettings(); defaultSettings.forEach(setting -> { - if (!sourceLists.stream().anyMatch(item -> item.match(setting))){ + if (!sourceLists.stream().anyMatch(item -> item.match(setting))) { sourceLists.add(setting); } }); @@ -297,7 +307,7 @@ public class SysMsgService { public Long overTime() { String msgTimeOut = systemParameterService.basicInfo().getMsgTimeOut(); - if(StringUtils.isNotBlank(msgTimeOut)) { + if (StringUtils.isNotBlank(msgTimeOut)) { overDays = Integer.parseInt(msgTimeOut); } Long currentTime = System.currentTimeMillis(); @@ -307,9 +317,8 @@ public class SysMsgService { long temp = overDays * oneDayTime; return currentTime - (currentTime + 8 * 60 * 60 * 1000) % oneDayTime - temp; - + } - } From a10ef0df750c65a023804f7e63c98876c5a23b82 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 31 Oct 2022 18:29:29 +0800 Subject: [PATCH 40/42] =?UTF-8?q?fix(=E5=BA=94=E7=94=A8=E7=AE=A1=E7=90=86)?= =?UTF-8?q?:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=88=A0=E9=99=A4=E5=88=86=E7=B1=BB=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=9B=BD=E9=99=85=E5=8C=96=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/tw.js | 6 +++--- frontend/src/lang/zh.js | 6 +++--- .../src/views/panel/appTemplate/component/TemplateList.vue | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 469aa82313..7bb465cc07 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -2648,11 +2648,11 @@ export default { log_delete_tips: '確定刪除該條應用記錄嗎?', log_resource_delete_tips: '刪除相關資源(刪除後不可恢復)', file_error_tips: '未找到相關數據文件,當前文件可能不是DataEase應用文件,或者文件已經損壞', - app_export: '应用导出', - app_version: '应用版本', + app_export: '應用導出', + app_version: '應用版本', program_version: 'DataEase最低版本', creator: '作者', - export: '导出' + export: '導出' }, logout: { diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index ae8ed56e52..4945e767e3 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -2648,11 +2648,11 @@ export default { log_delete_tips: '确定删除该条应用记录吗?', log_resource_delete_tips: '删除相关资源(删除后不可恢复)', file_error_tips: '未找到相关数据文件,当前文件可能不是DataEase应用文件,或者文件已经损坏', - app_export: '應用導出', - app_version: '應用版本', + app_export: '应用导出', + app_version: '应用版本', program_version: 'DataEase最低版本', creator: '作者', - export: '導出' + export: '导出' }, logout: { diff --git a/frontend/src/views/panel/appTemplate/component/TemplateList.vue b/frontend/src/views/panel/appTemplate/component/TemplateList.vue index d14b3259b3..16b8414afe 100644 --- a/frontend/src/views/panel/appTemplate/component/TemplateList.vue +++ b/frontend/src/views/panel/appTemplate/component/TemplateList.vue @@ -158,8 +158,8 @@ export default { }, templateDelete(template) { const options = { - title: this.$('app_template.app_group_delete_tips'), - content: this.$('app_template.app_group_delete_content'), + title: this.$t('app_template.app_group_delete_tips'), + content: this.$t('app_template.app_group_delete_content'), type: 'primary', cb: () => this.$emit('templateDelete', template.id) } From d422223aef8794aa72e19f8c5195e64cfb7f4044 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 31 Oct 2022 18:39:55 +0800 Subject: [PATCH 41/42] =?UTF-8?q?perf(=E6=B0=94=E6=B3=A1=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?):=20=E6=B7=B1=E8=89=B2=E4=B8=BB=E9=A2=98=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=BA=95=E5=9B=BE=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/chart.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index 6442254fae..116da2af59 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -27,7 +27,8 @@ export const DEFAULT_COLOR_CASE = { quotaColor: '#5470c6', tableBorderColor: '#E6E7E4', seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false} - areaBorderColor: '#303133' + areaBorderColor: '#303133', + areaBaseColor: '#FFFFFF' } export const DEFAULT_COLOR_CASE_DARK = { @@ -42,7 +43,8 @@ export const DEFAULT_COLOR_CASE_DARK = { quotaColor: '#5470c6', tableBorderColor: '#CCCCCC', seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false} - areaBorderColor: '#EBEEF5' + areaBorderColor: '#EBEEF5', + areaBaseColor: '5470C6' } export const DEFAULT_SIZE = { barDefault: true, From fecc805f93cc1a86e701d9b3dc822cb4f5a24294 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 31 Oct 2022 18:47:57 +0800 Subject: [PATCH 42/42] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=AF=BC=E5=87=BA=E5=90=8E=E7=AB=AF=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/panel/PanelGroupController.java | 1 + .../io/dataease/service/panel/PanelGroupService.java | 12 ++++++------ .../main/resources/i18n/messages_en_US.properties | 7 +++++++ .../main/resources/i18n/messages_zh_CN.properties | 10 ++++++++-- .../main/resources/i18n/messages_zh_TW.properties | 10 ++++++++-- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java index b361b5d725..217ab70c06 100644 --- a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java +++ b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java @@ -190,6 +190,7 @@ public class PanelGroupController { return panelGroupService.findPanelElementInfo(viewId); } @GetMapping("/export2AppCheck/{panelId}") + @I18n public PanelExport2App export2AppCheck(@PathVariable String panelId){ return panelGroupService.panelExport2AppCheck(panelId); } 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 651b71c757..4e44e60753 100644 --- a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java +++ b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java @@ -806,23 +806,23 @@ public class PanelGroupService { //校验标准 1.存在视图且所有视图的数据来源必须是dataset 2.存在数据集且没有excel数据集 3.存在数据源且是单数据源 //1.view check if (CollectionUtils.isEmpty(chartViewsInfo)) { - return new PanelExport2App("this panel don't have views"); + return new PanelExport2App(Translator.get("I18N_APP_NO_VIEW_ERROR")); } else if (chartViewsInfo.stream().filter(chartView -> chartView.getDataFrom().equals("template")).collect(Collectors.toList()).size() > 0) { - return new PanelExport2App("this panel have view from template"); + return new PanelExport2App(Translator.get("I18N_APP_TEMPLATE_VIEW_ERROR")); } // dataset check if (CollectionUtils.isEmpty(datasetTablesInfo)) { - return new PanelExport2App("this panel don't have dataset"); + return new PanelExport2App(Translator.get("I18N_APP_NO_DATASET_ERROR")); } else if (datasetTablesInfo.stream().filter(datasetTable -> datasetTable.getType().equals("excel") || datasetTable.getType().equals("api")).collect(Collectors.toList()).size() > 0) { - return new PanelExport2App("this panel have dataset witch type is excel or api"); + return new PanelExport2App(Translator.get("I18N_APP_ERROR_DATASET")); } //datasource check if (CollectionUtils.isEmpty(datasourceDTOS)) { - return new PanelExport2App("this panel don't have datasource"); + return new PanelExport2App(Translator.get("I18N_APP_NO_DATASOURCE")); } else if (datasourceDTOS.size() > 1) { - return new PanelExport2App("this panel should have only one dataset"); + return new PanelExport2App(Translator.get("I18N_APP_ONE_DATASOURCE_TIPS")); } return new PanelExport2App(chartViewsInfo, chartViewFieldsInfo, datasetTablesInfo, datasetTableFieldsInfo, dataSetTasksInfo, datasourceDTOS,panelViews); } diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index df1effdcd3..dfe388f61f 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -240,3 +240,10 @@ I18N_PANEL_EXIST=The current panel name already exists under this directory I18N_DATASET_GROUP_EXIST=The current dataset grouping name already exists under this directory I18N_NOT_JAR=File is not jar! +I18N_APP_NO_VIEW_ERROR=This panel don't have views +I18N_APP_TEMPLATE_VIEW_ERROR=This panel have view from template +I18N_APP_NO_DATASET_ERROR=This panel don't have dataset +I18N_APP_ERROR_DATASET=This panel have dataset witch type is excel or api +I18N_APP_NO_DATASOURCE=This panel don't have datasource +I18N_APP_ONE_DATASOURCE_TIPS=This panel should have only one datasource + diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index a0972f0da7..c3724a160f 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -194,7 +194,7 @@ I18N_DATASOURCE_LEVEL_GRANT=\u6388\u6743 I18N_NO_PERMISSION=\u5F53\u524D\u7528\u6237\u6CA1\u6709\u6743\u9650 I18N_PLEASE_CONCAT_ADMIN=\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5F00\u901A I18N_SQL_variable_limit=SQL \u53D8\u91CF\u53EA\u80FD\u5728 WHERE \u6761\u4EF6\u4E2D\u4F7F\u7528 -I18N_SQL_variable_direct_limit=SQL变量只能用于直连 +I18N_SQL_variable_direct_limit=SQL\u53D8\u91CF\u53EA\u80FD\u7528\u4E8E\u76F4\u8FDE I18N_EMAIL_CONFIG_ERROR=\u90AE\u4EF6\u914D\u7F6E\u9519\u8BEF I18N_EMAIL_HOST_ERROR=\u90AE\u4EF6\u4E3B\u673A\u4E0D\u80FD\u4E3A\u7A7A I18N_EMAIL_PORT_ERROR=\u90AE\u4EF6\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A @@ -238,5 +238,11 @@ I18N_ACCOUNT_LOCKED=\u8D26\u53F7\u3010%s\u3011\u5DF2\u9501\u5B9A(\u8BF7\u8054\u7 I18N_PANEL_EXIST=\u5F53\u524D\u4EEA\u8868\u677F\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u5F53\u524D\u6570\u636E\u96C6\u5206\u7EC4\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 -I18N_NOT_JAR=文件不是 jar 包! +I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305! +I18N_APP_NO_VIEW_ERROR=\u8BE5\u4EEA\u8868\u677F\u6CA1\u6709\u89C6\u56FE +I18N_APP_TEMPLATE_VIEW_ERROR=\u8BE5\u4EEA\u8868\u677F\u5B58\u5728\u6A21\u677F\u4E2D\u7684\u89C6\u56FE +I18N_APP_NO_DATASET_ERROR=\u8BE5\u4EEA\u8868\u7248\u6CA1\u6709\u6570\u636E\u96C6 +I18N_APP_ERROR_DATASET=\u4EEA\u8868\u677F\u4E2D\u4E0D\u80FD\u5B58\u5728API\u6570\u636E\u6E90\u6216\u8005Excel\u6570\u636E\u96C6 +I18N_APP_NO_DATASOURCE=\u6CA1\u6709\u627E\u5230\u6570\u636E\u6E90 +I18N_APP_ONE_DATASOURCE_TIPS=\u8BE5\u4EEA\u8868\u677F\u53EA\u80FD\u5B58\u5728\u4E00\u4E2A\u6570\u636E\u6E90 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index fb269a8bda..93400397eb 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -190,7 +190,7 @@ I18N_DATASOURCE_LEVEL_GRANT=\u6388\u6B0A I18N_NO_PERMISSION=\u7576\u524D\u7528\u6236\u6C92\u6709\u6B0A\u9650 I18N_PLEASE_CONCAT_ADMIN=\u8ACB\u806F\u7CFB\u7BA1\u7406\u54E1\u958B\u901A I18N_SQL_variable_limit=SQL\u8B8A\u6578\u53EA\u80FD\u5728WHERE\u689D\u4EF6\u4E2D\u4F7F\u7528 -I18N_SQL_variable_direct_limit=SQL變數只能用於直連 +I18N_SQL_variable_direct_limit=SQL\u8B8A\u6578\u53EA\u80FD\u7528\u65BC\u76F4\u9023 I18N_EMAIL_CONFIG_ERROR=\u90F5\u4EF6\u914D\u7F6E\u932F\u8AA4 I18N_EMAIL_HOST_ERROR=\u90F5\u4EF6\u4E3B\u6A5F\u4E0D\u80FD\u70BA\u7A7A I18N_EMAIL_PORT_ERROR=\u90F5\u4EF6\u7AEF\u53E3\u4E0D\u80FD\u70BA\u7A7A @@ -234,4 +234,10 @@ I18N_ACCOUNT_LOCKED=\u8CEC\u865F\u3010%s\u3011\u5DF2\u9396\u5B9A(\u8ACB\u806F\u7 I18N_PANEL_EXIST=\u7576\u524D\u5100\u9336\u95C6\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u7576\u524D\u6578\u64DA\u96C6\u5206\u7D44\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 -I18N_NOT_JAR=文件不是 jar 包! +I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305! +I18N_APP_NO_VIEW_ERROR=\u8A72\u5100\u8868\u677F\u6C92\u6709\u8996\u5716 +I18N_APP_TEMPLATE_VIEW_ERROR=\u8A72\u5100\u8868\u677F\u5B58\u5728\u6A21\u677F\u4E2D\u7684\u8996\u5716 +I18N_APP_NO_DATASET_ERROR=\u8A72\u5100\u8868\u7248\u6C92\u6709\u6578\u64DA\u96C6 +I18N_APP_ERROR_DATASET=\u5100\u8868\u677F\u4E2D\u4E0D\u80FD\u5B58\u5728API\u6578\u64DA\u6E90\u6216\u8005Excel\u6578\u64DA\u96C6 +I18N_APP_NO_DATASOURCE=\u6C92\u6709\u627E\u5230\u6578\u64DA\u6E90 +I18N_APP_ONE_DATASOURCE_TIPS=\u8A72\u5100\u8868\u677F\u53EA\u80FD\u5B58\u5728\u4E00\u500B\u6578\u64DA\u6E90