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/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 }) } 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/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..ffdf7d2390 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 @@ -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 @@ -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) } 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 a121bde912..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') }} - - - - - - -
@@ -420,7 +435,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' @@ -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; + } 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'