diff --git a/src/components/charts/chart-options.js b/src/components/charts/chart-options.js index 00d681ec..6367f311 100644 --- a/src/components/charts/chart-options.js +++ b/src/components/charts/chart-options.js @@ -245,39 +245,23 @@ const singleValueLine = { animation: false, grid: { left: 0, - bottom: 0, + bottom: 2, top: 5, right: 0 }, color: chartColor, legend: { - tooltip: { - show: true, - formatter: '{a}' - }, - show: false, - right: 23, - top: 8, - orient: 'horizontal', - icon: 'circle', - itemGap: 20, - itemWidth: 10, - textStyle: { - padding: [0, 0, 0, 5], - fontSize: 14 - }, - formatter: tooLongFormatter + show: false }, series: [ { - name: '访问用户量', type: 'line', - smooth: true, + legendHoverLink: false, itemStyle: { normal: { color: '#81C9FF', lineStyle: { - width:2 + width: 2 } } }, diff --git a/src/components/charts/panel.scss b/src/components/charts/panel.scss index 4b69728f..7b437f79 100644 --- a/src/components/charts/panel.scss +++ b/src/components/charts/panel.scss @@ -40,6 +40,11 @@ border-radius: 2px; height: 100%; width: 100%; + + .chart-drawing { + height: 100%; + width: 100%; + } } &>.cn-chart__echarts, &>.cn-chart__table, &>.cn-chart__map { display: flex; @@ -62,11 +67,6 @@ } .cn-chart__body { flex: auto; - - .chart-drawing { - height: 100%; - width: 100%; - } } } &>.cn-chart__single-value.cn-chart__single-value--icon-left { diff --git a/src/components/entities/entities.scss b/src/components/entities/entities.scss index ac588429..05ad330f 100644 --- a/src/components/entities/entities.scss +++ b/src/components/entities/entities.scss @@ -43,7 +43,7 @@ } .cn-entity { box-sizing: border-box; - margin-bottom: 30px; + margin: 0 10px 30px; width: 240px; height: 315px; background: #FFFFFF; diff --git a/src/components/layout/Header.vue b/src/components/layout/Header.vue index 00b9acf8..a1961899 100644 --- a/src/components/layout/Header.vue +++ b/src/components/layout/Header.vue @@ -125,12 +125,20 @@ export default { }, entityName () { return this.$store.getters.entityName + }, + storeFrom () { + return this.$store.getters.from } }, watch: { from (n) { this.$store.commit('entityTypeChange', n) }, + storeFrom (n) { + if (this.from !== n) { + this.from = n + } + }, entityName (n) { const breadcrumb = this.breadcrumbMap.find(b => b.path === '/entityExplorer') breadcrumb.childName = n diff --git a/src/utils/http.js b/src/utils/http.js index 67da8f64..4ce7d50f 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -41,8 +41,8 @@ axios.interceptors.request.use( axios.interceptors.response.use( response => { if (licenceErrorCode.indexOf(response.data.code) !== -1) { - window.location.href = '/' sessionStorage.removeItem(storageKey.token) + window.location.href = '/' } else if (response.status === 200) { if (accountErrorCode.indexOf(response.data.code) !== -1) { window.location.href = '/' diff --git a/src/views/charts/Chart.vue b/src/views/charts/Chart.vue index 3e334fb0..280c45ea 100644 --- a/src/views/charts/Chart.vue +++ b/src/views/charts/Chart.vue @@ -88,7 +88,7 @@ >