From c9dd5a4701661404120bc741b90c2e822bb0e471 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Wed, 30 Mar 2022 14:27:19 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96=E8=A1=A8=E6=A0=BC?=
=?UTF-8?q?=E6=BB=9A=E5=8A=A8=E5=8F=8A=E6=9B=B4=E6=8D=A2=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E6=9C=80=E6=96=B0=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/index.js | 1 +
src/pages/screen/list/index.vue | 35 +++++++++++++++++++++++----------
src/styles/page/screen.scss | 2 +-
3 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/src/api/index.js b/src/api/index.js
index dc94241..db1eacb 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -68,6 +68,7 @@ export default {
getTableByCondition:`/data/data/table/getTableByCondition`,
downloadData:`${Setting.apiBaseURL}/data/data/download`,
previewData:`/data/data/preview`,
+ visualPreview:`/data/data/visualPreview`,
downloadRecord:`/data/data/myDownload/downloadRecord`,
getDownloadRecord:`/data/data/myDownload/getDownloadRecord`,
downloadAgain:`/data/data/downloadAgain`,
diff --git a/src/pages/screen/list/index.vue b/src/pages/screen/list/index.vue
index c1cac7d..55b924b 100644
--- a/src/pages/screen/list/index.vue
+++ b/src/pages/screen/list/index.vue
@@ -227,17 +227,21 @@
{{ goodsSell.length ? goodsSell[0].operation_time.substr(0, 4) : 2021 }}年商品零售价格指数
-
+
+
+
- {{ item.hct }} |
+ {{ item.hct }} |
{{ item.rcpi }} |
@@ -388,7 +392,7 @@ export default {
// 获取图标数据并渲染
renderChart() {
// 中国宏观杠杆率
- this.$get(`${this.api.previewData}?tableName=hg_zg_zhongguohongguanganggan&tableId=14`).then(res => {
+ this.$get(`${this.api.visualPreview}?tableName=hg_zg_zhongguohongguanganggan&tableId=14`).then(res => {
const { comment, data } = res
const series = []
comment.map(e => {
@@ -451,7 +455,7 @@ export default {
}).catch(res => {})
// 全国税收收入
- this.$get(`${this.api.previewData}?tableName=hg_zg_jr_quanguoshuishoushouru&tableId=33`).then(res => {
+ this.$get(`${this.api.visualPreview}?tableName=hg_zg_jr_quanguoshuishoushouru&tableId=33`).then(res => {
const { comment, data } = res
echarts.init(document.querySelector(`#chart3`)).setOption({
title: {
@@ -737,7 +741,7 @@ export default {
}).catch(res => {})
// 商品零售价格指数
- this.$get(`${this.api.previewData}?tableName=hg_zg_jr_shangpinlingshoujiagezhishu&tableId=60`).then(res => {
+ this.$get(`${this.api.visualPreview}?tableName=hg_zg_jr_shangpinlingshoujiagezhishu&tableId=60`).then(res => {
const { data } = res
const goodsSell = []
data.map(e => {
@@ -883,7 +887,7 @@ export default {
}).catch(res => {})
// 以美元计算进口年率
- this.$get(`${this.api.previewData}?tableName=hg_zg_my_yimeiyuanjisuanjinkounianlv&tableId=22`).then(res => {
+ this.$get(`${this.api.visualPreview}?tableName=hg_zg_my_yimeiyuanjisuanjinkounianlv&tableId=22`).then(res => {
const { comment, data } = res
echarts.init(document.querySelector(`#chart6`)).setOption({
tooltip: {
@@ -892,7 +896,7 @@ export default {
grid: {
left: '12%',
right: '5%',
- bottom: '12%'
+ bottom: '26%'
},
legend: {
icon: 'rect',
@@ -918,7 +922,8 @@ export default {
interval: 0,
textStyle: {
color: '#fff',
- }
+ },
+ rotate: 60
},
data: data.map(e => e.date_index)
}],
@@ -976,7 +981,7 @@ export default {
// 全社会用电分类情况
- this.$get(`${this.api.previewData}?tableName=hg_zg_jr_quanshehuiyongdianfenleiqingkuangbiao&tableId=50`).then(res => {
+ this.$get(`${this.api.visualPreview}?tableName=hg_zg_jr_quanshehuiyongdianfenleiqingkuangbiao&tableId=50`).then(res => {
const { comment, data } = res
const item = data[3]
echarts.init(document.querySelector(`#chart7`)).setOption({
@@ -1095,6 +1100,16 @@ export default {
}]
})
}).catch(res => {})
+
+ this.scrollTable()
+ },
+ // 表格滚动效果
+ scrollTable() {
+ const dom = this.$refs.tableWrap
+ setInterval(() => {
+ dom.scrollTop += 1
+ if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0
+ }, 30)
}
}
};
diff --git a/src/styles/page/screen.scss b/src/styles/page/screen.scss
index 069ab48..53cdc60 100644
--- a/src/styles/page/screen.scss
+++ b/src/styles/page/screen.scss
@@ -1,5 +1,5 @@
::-webkit-scrollbar-thumb {
- background: rgba(77, 97, 207, .45);
+ display: none;
}
.wrap {
width: 100%;