From 4392d2c1ba476252cf4abad185ad689cfce777ce Mon Sep 17 00:00:00 2001 From: x_ying <2438792676@qq.com> Date: Sat, 17 Sep 2022 14:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=88=B7=E6=96=B0=20=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E6=8E=A7=E4=BB=B67=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/font-some.css | 4 ++-- src/views/components/echarts/lendAcross.vue | 6 ++++-- src/views/components/echarts/typePie.vue | 5 +++-- src/views/environmentalScreen/index.vue | 15 ++++++++++++--- src/views/environmentalScreen/module/numFlip.vue | 13 +++++++------ 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/assets/styles/font-some.css b/src/assets/styles/font-some.css index 40cc963..dc185db 100644 --- a/src/assets/styles/font-some.css +++ b/src/assets/styles/font-some.css @@ -14,8 +14,8 @@ display: flex; justify-content: center; text-align: center; - width: 1.75rem; - height: 1.75rem; + width: 1.95rem; + height: 1.85rem; line-height: 1.8rem; margin-right: 0.2rem; border: 1px solid #0E3465; diff --git a/src/views/components/echarts/lendAcross.vue b/src/views/components/echarts/lendAcross.vue index cbdc751..db5ed5b 100644 --- a/src/views/components/echarts/lendAcross.vue +++ b/src/views/components/echarts/lendAcross.vue @@ -34,7 +34,8 @@ export default { data() { return { chart: null, - timer: null + timer: null, + elendData: this.lendData } }, watch: { @@ -59,6 +60,7 @@ export default { refreshEchart() { if (this.refreshtime) { this.timer = setInterval(() => { + // this.elendData = [] this.drawChart() }, this.refreshtime) } else { @@ -157,7 +159,7 @@ export default { } } }, - data: this.lendData // 从下到上的数据 + data: this.elendData // 从下到上的数据 } ] } diff --git a/src/views/components/echarts/typePie.vue b/src/views/components/echarts/typePie.vue index 483da53..b3c9aab 100644 --- a/src/views/components/echarts/typePie.vue +++ b/src/views/components/echarts/typePie.vue @@ -34,7 +34,8 @@ export default { data() { return { chart: null, - timer: null + timer: null, + etypeData: this.typeData } }, watch: { @@ -114,7 +115,7 @@ export default { show: false } }, - data: this.typeData + data: this.etypeData } ] } diff --git a/src/views/environmentalScreen/index.vue b/src/views/environmentalScreen/index.vue index b2e862b..e7dcdcb 100644 --- a/src/views/environmentalScreen/index.vue +++ b/src/views/environmentalScreen/index.vue @@ -279,7 +279,7 @@

档案借阅

- +
@@ -287,7 +287,7 @@

档案类型

- +
@@ -399,7 +399,9 @@ export default { storeNum: 12456, allDevNum: 15, lineDevNum: 6, - onlineDevNumL: 9 + onlineDevNumL: 9, + echartsTimer: null, + refreshtime: 60000 } }, async created() { @@ -432,6 +434,13 @@ export default { await _this.getRealTimeData() _this.handleAQI() }, 10000) + // 每隔一分钟刷新档案借阅和档案类型的数据 + this.echartsTimer = setInterval(() => { + _this.lendData = [] + _this.typeData = [] + _this.getBorrowerNumSta() + _this.getArchivesTypeStatistics() + }, this.refreshtime) }, beforeDestroy() { if (this.timer) { diff --git a/src/views/environmentalScreen/module/numFlip.vue b/src/views/environmentalScreen/module/numFlip.vue index 055b449..690e138 100644 --- a/src/views/environmentalScreen/module/numFlip.vue +++ b/src/views/environmentalScreen/module/numFlip.vue @@ -26,8 +26,8 @@ export default { data() { return { echartnum: this.chartnum, - flipNum: [0, 0, 0, 0, 0, 0, 0, 0], - ikey: [1, 2, 3, 4, 5, 6, 7, 8] + flipNum: [0, 0, 0, 0, 0, 0, 0], + ikey: [1, 2, 3, 4, 5, 6, 7] } }, mounted() { @@ -55,14 +55,15 @@ export default { }, toOrderNum(num) { num = num.toString() // 数字变成字符串 - if (num.length < 8) { // 如未满位数,添加"0"补位 + if (num.length < 7) { // 如未满位数,添加"0"补位 num = '0' + num this.toOrderNum(num) // 递归添加"0"补位 - } else if (num.length === 8) { // 数中加入逗号 + } else if (num.length === 7) { // 数中加入逗号 this.flipNum = num.split('') // 将其便变成数据 - } else { - alert('显示异常') } + // else { + // alert('显示异常') + // } }, setNumberTransform() { const numberItems = document.getElementsByClassName(this.tnum)