Browse Source

表刷新 数字控件7位

master
x_ying 2 years ago
parent
commit
4392d2c1ba
  1. 4
      src/assets/styles/font-some.css
  2. 6
      src/views/components/echarts/lendAcross.vue
  3. 5
      src/views/components/echarts/typePie.vue
  4. 15
      src/views/environmentalScreen/index.vue
  5. 13
      src/views/environmentalScreen/module/numFlip.vue

4
src/assets/styles/font-some.css

@ -14,8 +14,8 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
width: 1.75rem;
height: 1.75rem;
width: 1.95rem;
height: 1.85rem;
line-height: 1.8rem; line-height: 1.8rem;
margin-right: 0.2rem; margin-right: 0.2rem;
border: 1px solid #0E3465; border: 1px solid #0E3465;

6
src/views/components/echarts/lendAcross.vue

@ -34,7 +34,8 @@ export default {
data() { data() {
return { return {
chart: null, chart: null,
timer: null
timer: null,
elendData: this.lendData
} }
}, },
watch: { watch: {
@ -59,6 +60,7 @@ export default {
refreshEchart() { refreshEchart() {
if (this.refreshtime) { if (this.refreshtime) {
this.timer = setInterval(() => { this.timer = setInterval(() => {
// this.elendData = []
this.drawChart() this.drawChart()
}, this.refreshtime) }, this.refreshtime)
} else { } else {
@ -157,7 +159,7 @@ export default {
} }
} }
}, },
data: this.lendData //
data: this.elendData //
} }
] ]
} }

5
src/views/components/echarts/typePie.vue

@ -34,7 +34,8 @@ export default {
data() { data() {
return { return {
chart: null, chart: null,
timer: null
timer: null,
etypeData: this.typeData
} }
}, },
watch: { watch: {
@ -114,7 +115,7 @@ export default {
show: false show: false
} }
}, },
data: this.typeData
data: this.etypeData
} }
] ]
} }

15
src/views/environmentalScreen/index.vue

@ -279,7 +279,7 @@
<span class="left-bottom-line" /> <span class="left-bottom-line" />
<h3> <svg-icon icon-class="danganjieyue" style="margin-right:10px" />档案借阅</h3> <h3> <svg-icon icon-class="danganjieyue" style="margin-right:10px" />档案借阅</h3>
<div class="chart-wrapper" style="height: calc(100% - 40px);"> <div class="chart-wrapper" style="height: calc(100% - 40px);">
<lend-across :lend-data="lendData" :refreshtime="60000" />
<lend-across :lend-data="lendData" :refreshtime="refreshtime" />
</div> </div>
</div> </div>
<div class="env-item container-wrap"> <div class="env-item container-wrap">
@ -287,7 +287,7 @@
<span class="left-bottom-line" /> <span class="left-bottom-line" />
<h3><svg-icon icon-class="danganleibie" style="margin-right:10px" />档案类型</h3> <h3><svg-icon icon-class="danganleibie" style="margin-right:10px" />档案类型</h3>
<div v-if="typeData.length !== 0" class="chart-wrapper" style="height: calc(100% - 40px);"> <div v-if="typeData.length !== 0" class="chart-wrapper" style="height: calc(100% - 40px);">
<type-pie :type-data="typeData" :refreshtime="60000" />
<type-pie :type-data="typeData" :refreshtime="refreshtime" />
</div> </div>
<div v-else class="empty-main"> <div v-else class="empty-main">
<svg-icon icon-class="empty" class-name="empty-img" /> <svg-icon icon-class="empty" class-name="empty-img" />
@ -399,7 +399,9 @@ export default {
storeNum: 12456, storeNum: 12456,
allDevNum: 15, allDevNum: 15,
lineDevNum: 6, lineDevNum: 6,
onlineDevNumL: 9
onlineDevNumL: 9,
echartsTimer: null,
refreshtime: 60000
} }
}, },
async created() { async created() {
@ -432,6 +434,13 @@ export default {
await _this.getRealTimeData() await _this.getRealTimeData()
_this.handleAQI() _this.handleAQI()
}, 10000) }, 10000)
//
this.echartsTimer = setInterval(() => {
_this.lendData = []
_this.typeData = []
_this.getBorrowerNumSta()
_this.getArchivesTypeStatistics()
}, this.refreshtime)
}, },
beforeDestroy() { beforeDestroy() {
if (this.timer) { if (this.timer) {

13
src/views/environmentalScreen/module/numFlip.vue

@ -26,8 +26,8 @@ export default {
data() { data() {
return { return {
echartnum: this.chartnum, 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() { mounted() {
@ -55,14 +55,15 @@ export default {
}, },
toOrderNum(num) { toOrderNum(num) {
num = num.toString() // num = num.toString() //
if (num.length < 8) { // "0"
if (num.length < 7) { // "0"
num = '0' + num num = '0' + num
this.toOrderNum(num) // "0" this.toOrderNum(num) // "0"
} else if (num.length === 8) { //
} else if (num.length === 7) { //
this.flipNum = num.split('') // 便 this.flipNum = num.split('') // 便
} else {
alert('显示异常')
} }
// else {
// alert('')
// }
}, },
setNumberTransform() { setNumberTransform() {
const numberItems = document.getElementsByClassName(this.tnum) const numberItems = document.getElementsByClassName(this.tnum)

Loading…
Cancel
Save