|
@@ -3,7 +3,7 @@
|
|
<title-page-img-components :propsData="propsData"></title-page-img-components>
|
|
<title-page-img-components :propsData="propsData"></title-page-img-components>
|
|
<div class="eCharts-max-big-box">
|
|
<div class="eCharts-max-big-box">
|
|
<div class="resourceReservationComponentECharts-box">
|
|
<div class="resourceReservationComponentECharts-box">
|
|
- <div class="equipmentDangerComponentECharts-left">
|
|
|
|
|
|
+ <div class="equipmentDangerComponentECharts-left" v-show="leftData">
|
|
<p class="title-p">温室</p>
|
|
<p class="title-p">温室</p>
|
|
<div id="leftEquipmentDangerComponentECharts"></div>
|
|
<div id="leftEquipmentDangerComponentECharts"></div>
|
|
<div class="bottom-num-box">
|
|
<div class="bottom-num-box">
|
|
@@ -12,18 +12,18 @@
|
|
<p></p>
|
|
<p></p>
|
|
<p>总数</p>
|
|
<p>总数</p>
|
|
</div>
|
|
</div>
|
|
- <p class="left-num">200</p>
|
|
|
|
|
|
+ <p class="left-num">{{leftData.resourceNum}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="right-bottom-num-box">
|
|
<div class="right-bottom-num-box">
|
|
<div>
|
|
<div>
|
|
<p></p>
|
|
<p></p>
|
|
<p>预约数</p>
|
|
<p>预约数</p>
|
|
</div>
|
|
</div>
|
|
- <p class="right-num">50</p>
|
|
|
|
|
|
+ <p class="right-num">{{leftData.appointNum}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="equipmentDangerComponentECharts-center">
|
|
|
|
|
|
+ <div class="equipmentDangerComponentECharts-center" v-show="centerData">
|
|
<p class="title-p">自然室</p>
|
|
<p class="title-p">自然室</p>
|
|
<div id="centerEquipmentDangerComponentECharts"></div>
|
|
<div id="centerEquipmentDangerComponentECharts"></div>
|
|
<div class="bottom-num-box">
|
|
<div class="bottom-num-box">
|
|
@@ -32,18 +32,18 @@
|
|
<p></p>
|
|
<p></p>
|
|
<p>总数</p>
|
|
<p>总数</p>
|
|
</div>
|
|
</div>
|
|
- <p class="left-num">100</p>
|
|
|
|
|
|
+ <p class="left-num">{{centerData.resourceNum}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="right-bottom-num-box">
|
|
<div class="right-bottom-num-box">
|
|
<div>
|
|
<div>
|
|
<p></p>
|
|
<p></p>
|
|
<p>预约数</p>
|
|
<p>预约数</p>
|
|
</div>
|
|
</div>
|
|
- <p class="right-num">60</p>
|
|
|
|
|
|
+ <p class="right-num">{{centerData.appointNum}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="equipmentDangerComponentECharts-right">
|
|
|
|
|
|
+ <div class="equipmentDangerComponentECharts-right" v-show="rightData">
|
|
<p class="title-p">冷库</p>
|
|
<p class="title-p">冷库</p>
|
|
<div id="rightEquipmentDangerComponentECharts"></div>
|
|
<div id="rightEquipmentDangerComponentECharts"></div>
|
|
<div class="bottom-num-box">
|
|
<div class="bottom-num-box">
|
|
@@ -52,14 +52,14 @@
|
|
<p></p>
|
|
<p></p>
|
|
<p>总数</p>
|
|
<p>总数</p>
|
|
</div>
|
|
</div>
|
|
- <p class="left-num">300</p>
|
|
|
|
|
|
+ <p class="left-num">{{rightData.resourceNum}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="right-bottom-num-box">
|
|
<div class="right-bottom-num-box">
|
|
<div>
|
|
<div>
|
|
<p></p>
|
|
<p></p>
|
|
<p>预约数</p>
|
|
<p>预约数</p>
|
|
</div>
|
|
</div>
|
|
- <p class="right-num">100</p>
|
|
|
|
|
|
+ <p class="right-num">{{rightData.resourceNum}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -68,6 +68,9 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
|
|
+import {
|
|
|
|
+ reportReportBsResourceRateList,
|
|
|
|
+} from "@/api/index";
|
|
import "echarts-liquidfill/src/liquidFill.js"
|
|
import "echarts-liquidfill/src/liquidFill.js"
|
|
import titlePageImgComponents from '@/components/titlePageImgComponents.vue'
|
|
import titlePageImgComponents from '@/components/titlePageImgComponents.vue'
|
|
export default {
|
|
export default {
|
|
@@ -80,6 +83,10 @@
|
|
propsData: {
|
|
propsData: {
|
|
title: '资源预约情况概览'
|
|
title: '资源预约情况概览'
|
|
},
|
|
},
|
|
|
|
+ leftData:false,
|
|
|
|
+ centerData:false,
|
|
|
|
+ rightData:false,
|
|
|
|
+ eChartsTimer:null,
|
|
//eCharts定时器
|
|
//eCharts定时器
|
|
eChartsTimerLeft: null,
|
|
eChartsTimerLeft: null,
|
|
eChartsTimerCenter: null,
|
|
eChartsTimerCenter: null,
|
|
@@ -90,15 +97,48 @@
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.initialize();
|
|
|
|
|
|
+ this.timedRefresh();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- initialize(){
|
|
|
|
- this.eChartsMethodLeft();
|
|
|
|
- this.eChartsMethodCenter();
|
|
|
|
- this.eChartsMethodRight();
|
|
|
|
|
|
+ timedRefresh(){
|
|
|
|
+ let self = this;
|
|
|
|
+ self.getData();
|
|
|
|
+ //定时动画
|
|
|
|
+ window.clearInterval(self.eChartsTimer);
|
|
|
|
+ self.eChartsTimer = setInterval(function(){
|
|
|
|
+ self.getData();
|
|
|
|
+ },1000*30);
|
|
},
|
|
},
|
|
- eChartsMethodLeft() {
|
|
|
|
|
|
+ getData(){
|
|
|
|
+ reportReportBsResourceRateList().then(response => {
|
|
|
|
+ if(response.data[0]){
|
|
|
|
+ this.$set(this,'leftData',response.data[0]);
|
|
|
|
+ let num = response.data[0].appointRatio/100;
|
|
|
|
+ let text = response.data[0].appointRatio+'%'
|
|
|
|
+ this.eChartsMethodLeft(num,text);
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(this,'leftData',false);
|
|
|
|
+ }
|
|
|
|
+ if(response.data[1]){
|
|
|
|
+ this.$set(this,'centerData',response.data[1]);
|
|
|
|
+ let num = response.data[1].appointRatio/100;
|
|
|
|
+ let text = response.data[1].appointRatio+'%'
|
|
|
|
+ this.eChartsMethodCenter(num,text);
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(this,'centerData',false);
|
|
|
|
+ }
|
|
|
|
+ if(response.data[2]){
|
|
|
|
+ this.$set(this,'rightData',response.data[2]);
|
|
|
|
+ let num = response.data[2].appointRatio/100;
|
|
|
|
+ let text = response.data[2].appointRatio+'%'
|
|
|
|
+ this.eChartsMethodRight(num,text);
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(this,'rightData',false);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ eChartsMethodLeft(num,text) {
|
|
//水球中心
|
|
//水球中心
|
|
let color1 = 'rgba(255,161,0,0)'
|
|
let color1 = 'rgba(255,161,0,0)'
|
|
let color2 = 'rgba(255,161,0,0)'
|
|
let color2 = 'rgba(255,161,0,0)'
|
|
@@ -113,9 +153,8 @@
|
|
let color8 = "rgba(255,161,0, 1)"
|
|
let color8 = "rgba(255,161,0, 1)"
|
|
let color9 = "rgba(255,161,0, 0)"
|
|
let color9 = "rgba(255,161,0, 0)"
|
|
// 水球内部数据--蓝色
|
|
// 水球内部数据--蓝色
|
|
- let value = 0.25
|
|
|
|
|
|
+ let value = num
|
|
// 水球颞部数据--灰色
|
|
// 水球颞部数据--灰色
|
|
- let value1 = '25%'
|
|
|
|
let option = {
|
|
let option = {
|
|
// 圆环内部文字
|
|
// 圆环内部文字
|
|
title: [
|
|
title: [
|
|
@@ -132,7 +171,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- text: value1,
|
|
|
|
|
|
+ text: text,
|
|
left: '50%',
|
|
left: '50%',
|
|
top: '44%',
|
|
top: '44%',
|
|
textAlign: 'center',
|
|
textAlign: 'center',
|
|
@@ -290,16 +329,10 @@
|
|
]
|
|
]
|
|
}
|
|
}
|
|
let echartsBox = this.$echarts.init(document.getElementById('leftEquipmentDangerComponentECharts'))
|
|
let echartsBox = this.$echarts.init(document.getElementById('leftEquipmentDangerComponentECharts'))
|
|
|
|
+ echartsBox.clear()
|
|
echartsBox.setOption(option)
|
|
echartsBox.setOption(option)
|
|
- //定时动画
|
|
|
|
- clearInterval(this.eChartsTimer)
|
|
|
|
- this.eChartsTimerLeft = setInterval(function() {
|
|
|
|
- echartsBox.clear()
|
|
|
|
- echartsBox.setOption(option)
|
|
|
|
- }, 1000 * 6)
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
- eChartsMethodCenter() {
|
|
|
|
|
|
+ eChartsMethodCenter(num,text) {
|
|
//水球中心
|
|
//水球中心
|
|
let color1 = 'rgba(0,161,53,0)'
|
|
let color1 = 'rgba(0,161,53,0)'
|
|
let color2 = 'rgba(0,161,53,0)'
|
|
let color2 = 'rgba(0,161,53,0)'
|
|
@@ -314,9 +347,7 @@
|
|
let color8 = "rgba(0,161,53, 1)"
|
|
let color8 = "rgba(0,161,53, 1)"
|
|
let color9 = "rgba(0,161,53, 0)"
|
|
let color9 = "rgba(0,161,53, 0)"
|
|
// 水球内部数据--蓝色
|
|
// 水球内部数据--蓝色
|
|
- let value = 0.60
|
|
|
|
- // 水球颞部数据--灰色
|
|
|
|
- let value1 = '60%'
|
|
|
|
|
|
+ let value = num
|
|
let option = {
|
|
let option = {
|
|
// 圆环内部文字
|
|
// 圆环内部文字
|
|
title: [
|
|
title: [
|
|
@@ -333,7 +364,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- text: value1,
|
|
|
|
|
|
+ text: text,
|
|
left: '50%',
|
|
left: '50%',
|
|
top: '44%',
|
|
top: '44%',
|
|
textAlign: 'center',
|
|
textAlign: 'center',
|
|
@@ -491,16 +522,10 @@
|
|
]
|
|
]
|
|
}
|
|
}
|
|
let echartsBox = this.$echarts.init(document.getElementById('centerEquipmentDangerComponentECharts'))
|
|
let echartsBox = this.$echarts.init(document.getElementById('centerEquipmentDangerComponentECharts'))
|
|
|
|
+ echartsBox.clear()
|
|
echartsBox.setOption(option)
|
|
echartsBox.setOption(option)
|
|
- //定时动画
|
|
|
|
- clearInterval(this.eChartsTimer)
|
|
|
|
- this.eChartsTimerCenter = setInterval(function() {
|
|
|
|
- echartsBox.clear()
|
|
|
|
- echartsBox.setOption(option)
|
|
|
|
- }, 1000 * 6)
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
- eChartsMethodRight() {
|
|
|
|
|
|
+ eChartsMethodRight(num,text) {
|
|
//水球中心
|
|
//水球中心
|
|
let color1 = 'rgba(1,131,250,0)'
|
|
let color1 = 'rgba(1,131,250,0)'
|
|
let color2 = 'rgba(1,131,250,0)'
|
|
let color2 = 'rgba(1,131,250,0)'
|
|
@@ -515,9 +540,7 @@
|
|
let color8 = "rgba(1,131,250, 1)"
|
|
let color8 = "rgba(1,131,250, 1)"
|
|
let color9 = "rgba(1,131,250, 0)"
|
|
let color9 = "rgba(1,131,250, 0)"
|
|
// 水球内部数据--蓝色
|
|
// 水球内部数据--蓝色
|
|
- let value = 0.33
|
|
|
|
- // 水球颞部数据--灰色
|
|
|
|
- let value1 = '33%'
|
|
|
|
|
|
+ let value = num
|
|
let option = {
|
|
let option = {
|
|
// 圆环内部文字
|
|
// 圆环内部文字
|
|
title: [
|
|
title: [
|
|
@@ -534,7 +557,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- text: value1,
|
|
|
|
|
|
+ text: text,
|
|
left: '50%',
|
|
left: '50%',
|
|
top: '44%',
|
|
top: '44%',
|
|
textAlign: 'center',
|
|
textAlign: 'center',
|
|
@@ -692,27 +715,17 @@
|
|
]
|
|
]
|
|
}
|
|
}
|
|
let echartsBox = this.$echarts.init(document.getElementById('rightEquipmentDangerComponentECharts'))
|
|
let echartsBox = this.$echarts.init(document.getElementById('rightEquipmentDangerComponentECharts'))
|
|
|
|
+ echartsBox.clear()
|
|
echartsBox.setOption(option)
|
|
echartsBox.setOption(option)
|
|
- //定时动画
|
|
|
|
- clearInterval(this.eChartsTimer)
|
|
|
|
- this.eChartsTimerRight = setInterval(function() {
|
|
|
|
- echartsBox.clear()
|
|
|
|
- echartsBox.setOption(option)
|
|
|
|
- }, 1000 * 6)
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
//清除定时器
|
|
//清除定时器
|
|
- clearInterval(this.eChartsTimerLeft)
|
|
|
|
- clearInterval(this.eChartsTimerCenter)
|
|
|
|
- clearInterval(this.eChartsTimerRight)
|
|
|
|
|
|
+ window.clearInterval(this.eChartsTimer)
|
|
},
|
|
},
|
|
destroyed() {
|
|
destroyed() {
|
|
//清除定时器
|
|
//清除定时器
|
|
- clearInterval(this.eChartsTimerLeft)
|
|
|
|
- clearInterval(this.eChartsTimerCenter)
|
|
|
|
- clearInterval(this.eChartsTimerRight)
|
|
|
|
|
|
+ window.clearInterval(this.eChartsTimer)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|