From a42e37aa4767f14f302d172ddafc77e7e98c38ce Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 16 Jul 2021 17:55:00 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=E4=BB=AA=E8=A1=A8=E6=9D=BFMac=20M1?= =?UTF-8?q?=E7=89=88=E7=94=B5=E8=84=91=E4=BF=9D=E5=AD=98=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=97=B6=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- frontend/src/views/chart/view/ChartEdit.vue | 2 +- frontend/src/views/panel/list/PanelViewShow.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 863cd78bf1..292b815bfc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -25,7 +25,7 @@ "file-save": "^0.2.0", "file-saver": "^2.0.5", "fit2cloud-ui": "1.2.0", - "html2canvas": "^1.0.0-rc.7", + "html2canvasde": "^v1.1.4-de", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "lodash": "4.17.21", diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index a121bde912..6f3f41462a 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -420,7 +420,7 @@ import QuotaFilterEditor from '../components/filter/QuotaFilterEditor' import DimensionFilterEditor from '../components/filter/DimensionFilterEditor' import TableNormal from '../components/table/TableNormal' import LabelNormal from '../components/normal/LabelNormal' -import html2canvas from 'html2canvas' +import html2canvas from 'html2canvasde' import TableSelector from './TableSelector' import FieldEdit from '../../dataset/data/FieldEdit' diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index 531b63df6a..0d912b2b10 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -76,7 +76,7 @@ import Preview from '@/components/canvas/components/Editor/Preview' import SaveToTemplate from '@/views/panel/list/SaveToTemplate' import { mapState } from 'vuex' -import html2canvas from 'html2canvas' +import html2canvas from 'html2canvasde' import FileSaver from 'file-saver' import { enshrineList, saveEnshrine, deleteEnshrine } from '@/api/panel/enshrine' import bus from '@/utils/bus' From aca2a9b19f277a5a9686f1705d3adc417ba3d629 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 19 Jul 2021 11:08:00 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0token=E5=85=8D=E7=BB=AD=E5=91=BD=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/settings.js | 6 +++++- frontend/src/utils/request.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/settings.js b/frontend/src/settings.js index 8042bf60fd..cb801dc20c 100644 --- a/frontend/src/settings.js +++ b/frontend/src/settings.js @@ -15,5 +15,9 @@ module.exports = { * @description Whether show the logo in sidebar */ sidebarLogo: false, - showSettings: true + showSettings: true, + interruptTokenContineUrls: [ + '/api/sys_msg/list/', + '/dataset/taskLog/list/' + ] } diff --git a/frontend/src/utils/request.js b/frontend/src/utils/request.js index ca7598913a..347704a250 100644 --- a/frontend/src/utils/request.js +++ b/frontend/src/utils/request.js @@ -8,7 +8,7 @@ import i18n from '@/lang' import { tryShowLoading, tryHideLoading } from './loading' import { getLinkToken, setLinkToken } from '@/utils/auth' // import router from '@/router' - +const interruptTokenContineUrls = Config.interruptTokenContineUrls const TokenKey = Config.TokenKey const RefreshTokenKey = Config.RefreshTokenKey const LinkTokenKey = Config.LinkTokenKey @@ -74,7 +74,7 @@ const checkAuth = response => { }) } // token到期后自动续命 刷新token - if (response.headers[RefreshTokenKey]) { + if (response.headers[RefreshTokenKey] && !interruptTokenContineUrls.some(item => response.config.url.indexOf(item) >= 0)) { const refreshToken = response.headers[RefreshTokenKey] store.dispatch('user/refreshToken', refreshToken) } From 0589488167a9bddf1e694c60e504a5f470f8dc9a Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 19 Jul 2021 11:24:18 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B410s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/request.js b/frontend/src/utils/request.js index 347704a250..ffdf7d2390 100644 --- a/frontend/src/utils/request.js +++ b/frontend/src/utils/request.js @@ -16,7 +16,7 @@ const LinkTokenKey = Config.LinkTokenKey const service = axios.create({ baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url // withCredentials: true, // send cookies when cross-domain requests - timeout: 0 // request timeout + timeout: 10000 // request timeout }) // request interceptor From f1e25099a7d36a958c1d1504b49235a38511e8ee Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 19 Jul 2021 11:54:33 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=E5=A2=9E=E5=8A=A0=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E8=A7=86=E5=9B=BE=E7=AD=89=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/chart/chart.js | 1 + frontend/src/api/panel/panel.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/api/chart/chart.js b/frontend/src/api/chart/chart.js index 77945e5f17..de77b0b87e 100644 --- a/frontend/src/api/chart/chart.js +++ b/frontend/src/api/chart/chart.js @@ -15,6 +15,7 @@ export function ajaxGetData(id, data) { method: 'post', loading: true, hideMsg: true, + timeout: 30000, data }) } diff --git a/frontend/src/api/panel/panel.js b/frontend/src/api/panel/panel.js index a4b0d4744d..ac246adbda 100644 --- a/frontend/src/api/panel/panel.js +++ b/frontend/src/api/panel/panel.js @@ -22,6 +22,7 @@ export function querySubject(data) { url: '/panel/subject/query', method: 'post', loading: true, + timeout: 30000, data }) } @@ -30,6 +31,7 @@ export function querySubjectWithGroup(data) { return request({ url: '/panel/subject/querySubjectWithGroup', method: 'post', + timeout: 30000, data }) } @@ -56,6 +58,7 @@ export function viewData(id, data) { return request({ url: '/chart/view/getData/' + id, method: 'post', + timeout: 30000, hideMsg: true, data }) @@ -64,6 +67,7 @@ export function panelSave(data) { return request({ url: 'panel/group/save', method: 'post', + timeout: 30000, loading: true, data }) @@ -72,7 +76,8 @@ export function findOne(id) { return request({ url: 'panel/group/findOne/' + id, method: 'get', - loading: true + loading: true, + timeout: 30000 }) } @@ -87,6 +92,7 @@ export function getPreviewData(data) { return request({ url: '/panel/table/getPreviewData', method: 'post', + timeout: 30000, data }) } @@ -125,6 +131,7 @@ export function get(url) { export function delGroup(groupId) { return request({ url: '/panel/group/deleteCircle/' + groupId, - method: 'post' + method: 'post', + timeout: 30000 }) } From 5c4bb9f7c588b7c07a0257384c2ec0807916cab3 Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 19 Jul 2021 12:36:25 +0800 Subject: [PATCH 5/5] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BEUI=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=88=9D=E6=AD=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 4 +- frontend/src/lang/tw.js | 4 +- frontend/src/lang/zh.js | 4 +- .../components/drag-item/DimensionItem.vue | 16 +- .../chart/components/drag-item/QuotaItem.vue | 17 +- frontend/src/views/chart/view/ChartEdit.vue | 547 +++++++++--------- 6 files changed, 324 insertions(+), 268 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 20ee467184..145e3dc5e2 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -804,7 +804,9 @@ export default { color_energy: 'Energy', color_red: 'Red', color_fast: 'Fast', - color_spiritual: 'Spiritual' + color_spiritual: 'Spiritual', + chart_data: 'Data', + chart_style: 'Style' }, dataset: { sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 7bdb3db881..61e56996ca 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -804,7 +804,9 @@ export default { color_fast: '輕快', color_spiritual: '靈動', chart_details: '视图明细', - export_details: '导出明细' + export_details: '导出明细', + chart_data: '數據', + chart_style: '樣式' }, dataset: { sheet_warn: '有多個sheet頁面,默認抽取第一個', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index dba1f7cf6c..ac6646de9a 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -804,7 +804,9 @@ export default { color_fast: '轻快', color_spiritual: '灵动', chart_details: '视图明细', - export_details: '导出明细' + export_details: '导出明细', + chart_data: '数据', + chart_style: '样式' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', diff --git a/frontend/src/views/chart/components/drag-item/DimensionItem.vue b/frontend/src/views/chart/components/drag-item/DimensionItem.vue index b160a32e56..b8e6d5e124 100644 --- a/frontend/src/views/chart/components/drag-item/DimensionItem.vue +++ b/frontend/src/views/chart/components/drag-item/DimensionItem.vue @@ -7,7 +7,7 @@ - {{ item.name }} + {{ item.name }} @@ -18,7 +18,8 @@ - {{ item.name }} + {{ item.name }} + @@ -192,10 +193,11 @@ export default { text-align: left; height: 24px; line-height: 22px; - display: inline-block; + display: flex; border-radius: 4px; box-sizing: border-box; white-space: nowrap; + width: 159px; } .item-axis:hover { @@ -218,4 +220,12 @@ export default { align-items: center; width: 100% } + + .item-span-style{ + display: inline-block; + width: 100px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } diff --git a/frontend/src/views/chart/components/drag-item/QuotaItem.vue b/frontend/src/views/chart/components/drag-item/QuotaItem.vue index d268ff94a6..f9a72f6483 100644 --- a/frontend/src/views/chart/components/drag-item/QuotaItem.vue +++ b/frontend/src/views/chart/components/drag-item/QuotaItem.vue @@ -7,7 +7,7 @@ - {{ item.name }} + {{ item.name }} {{ $t('chart.'+item.summary) }} @@ -19,9 +19,9 @@ - {{ item.name }} + {{ item.name }} {{ $t('chart.'+item.summary) }} - + @@ -196,10 +196,11 @@ export default { text-align: left; height: 24px; line-height: 22px; - display: inline-block; + display: flex; border-radius: 4px; box-sizing: border-box; white-space: nowrap; + width: 159px; } .item-axis:hover { @@ -222,4 +223,12 @@ export default { align-items: center; width: 100% } + + .item-span-style{ + display: inline-block; + width: 80px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 6f3f41462a..9902748916 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -13,9 +13,9 @@ {{ view.name }} - - {{ $t('chart.change_ds') }} - + + + {{ $t('commons.save') }} @@ -26,259 +26,274 @@ - -
- - -
-
- {{ $t('chart.dimension') }} - - - - - - - - {{ item.name }} - - - -
-
- {{ $t('chart.quota') }} - - - - - - - - {{ item.name }} - - - -
-
+ + + + +
+ + + +
+
+ {{ $t('chart.dimension') }} + + + + + + + + {{ item.name }} + + + +
+
+ {{ $t('chart.quota') }} + + + + + + + + {{ item.name }} + + + +
+
- - - - - - - - - - - - - - - - - - -
- {{ $t('chart.chart_type') }} - -
- - -
- - - + + + + + + + + + + + + + + + + + + +
+ {{ $t('chart.chart_type') }} + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+
+
+ + + + Tips: {{ $t('chart.only_one_quota') }} - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - -
- -
+ + + + + + + + +
+
+ + + {{ $t('chart.dimension') }} + + + + + + + + {{ $t('chart.quota') }} + + + + + + +
+ {{ $t('chart.result_filter') }} + + {{ $t('chart.filter_condition') }} + +
+
+
+
- - - - Tips: {{ $t('chart.only_one_quota') }} - - - - - - - - - -
-
- - {{ $t('chart.style_priority') }} - - - {{ $t('chart.chart') }} - {{ $t('chart.dashboard') }} - + + +
+ + {{ $t('chart.style_priority') }} + + + {{ $t('chart.chart') }} + {{ $t('chart.dashboard') }} + + - - - - - - - - - - - - - - - - - -
-
- {{ $t('chart.result_filter') }} - - {{ $t('chart.filter_condition') }} - -
- + + {{ $t('chart.shape_attr') }} + + + + + + + + + {{ $t('chart.module_style') }} + + + + + + + + + +
+
+
- - - {{ $t('chart.dimension') }} - - - - - - - - {{ $t('chart.quota') }} - - - - - - -
@@ -506,7 +521,7 @@ export default { watch: { 'param': function() { if (this.param.optType === 'new') { - + // } else { this.getData(this.param.id) } @@ -762,8 +777,8 @@ export default { // 左边往右边拖动时的事件 start1(e) { // console.log(e) - e.clone.className = 'item-on-move' - e.item.className = 'item-on-move' + e.clone.className = 'item' + e.item.className = 'item' }, end1(e) { // console.log(e) @@ -1046,7 +1061,8 @@ export default { }, changeDs() { - this.changeDsTitle = this.$t('chart.change_ds') + '[' + this.table.name + ']' + const dialogTitle = (this.table && this.table.name) ? ('[' + this.table.name + ']') : '' + this.changeDsTitle = this.$t('chart.change_ds') + dialogTitle this.selectTableFlag = true }, @@ -1179,9 +1195,15 @@ export default { .tab-header>>>.el-tabs__nav-scroll{ padding-left: 0!important; } + .tab-header>>>.el-tabs__header{ + margin: 0!important; + } + .tab-header>>>.el-tabs__content{ + height: 100%; + } .draggable-group { - display: inline-block; + display: block; width: 100%; height: calc(100% - 6px); } @@ -1203,7 +1225,7 @@ export default { } .el-radio{ - margin:6px; + margin:5px; } .el-radio>>>.el-radio__label{ @@ -1211,7 +1233,7 @@ export default { } .attr-style{ - height: calc(100vh - 56px - 25vh - 40px - 62px - 60px - 20px); + height: calc(100vh - 56px - 25vh - 40px - 60px); } .attr-selector{ @@ -1238,11 +1260,11 @@ export default { } .chart-class{ - height: calc(100% - 84px); + height: 100%; padding: 10px; } .table-class{ - height: calc(100% - 104px); + height: calc(100% - 20px); margin: 10px; } @@ -1275,4 +1297,13 @@ export default { .field-height{ height: calc(50% - 20px); } + .padding-tab{ + padding: 0; + height: 100%; + } + .collapse-style>>>.el-collapse-item__header{ + height: 40px; + line-height: 40px; + padding: 0 0 0 10px; + }