|
|
@@ -2,24 +2,25 @@
|
|
|
<template>
|
|
|
<div class="usageRateComponent">
|
|
|
<p class="title-p">设施使用率排行</p>
|
|
|
- <!--<dv-scroll-board :config="config" style="width:470px;height:435px" v-if="config.data[0]"/>-->
|
|
|
- <div class="for-max-big-box">
|
|
|
- <div class="for-title-box">
|
|
|
- <p>设施房间</p>
|
|
|
- <p>使用人次</p>
|
|
|
- <p>使用率</p>
|
|
|
- </div>
|
|
|
- <div class="for-big-sl-box" id="scrollListBox">
|
|
|
- <div class="for-big-box" v-for="(item,index) in maxList" :key="index">
|
|
|
- <p :class="item.id=='0'?'one-p':(item.id=='1'?'tow-p':'none-p')"><span>{{item.id != '0' && item.id != '1'?item.id+1:''}}</span></p>
|
|
|
- <p>{{item.name}}</p>
|
|
|
- <p>{{item.num}}</p>
|
|
|
- <p>{{item.value}}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!--<p class="position-null-p" v-if="!config.data[0]">暂无数据</p>-->
|
|
|
- <p class="position-null-p" v-if="!maxList[0]">暂无数据</p>
|
|
|
+ <p class="back-null-p"></p>
|
|
|
+ <dv-scroll-board :config="config" style="width:470px;height:435px" v-if="config.data[0]"/>
|
|
|
+ <!--<div class="for-max-big-box">-->
|
|
|
+ <!--<div class="for-title-box">-->
|
|
|
+ <!--<p>设施房间</p>-->
|
|
|
+ <!--<p>使用人次</p>-->
|
|
|
+ <!--<p>使用率</p>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<div class="for-big-sl-box" id="scrollListBox">-->
|
|
|
+ <!--<div class="for-big-box" v-for="(item,index) in maxList" :key="index">-->
|
|
|
+ <!--<p :class="item.id=='0'?'one-p':(item.id=='1'?'tow-p':'none-p')"><span>{{item.id != '0' && item.id != '1'?item.id+1:''}}</span></p>-->
|
|
|
+ <!--<p>{{item.name}}</p>-->
|
|
|
+ <!--<p>{{item.num}}</p>-->
|
|
|
+ <!--<p>{{item.value}}</p>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <p class="position-null-p" v-if="!config.data[0]">暂无数据</p>
|
|
|
+ <!--<p class="position-null-p" v-if="!maxList[0]">暂无数据</p>-->
|
|
|
<img class="position-left-top" src="@/assets/ZDimages/img_min_icon.png">
|
|
|
<img class="position-right-top" src="@/assets/ZDimages/img_min_icon.png">
|
|
|
<img class="position-left-bottom" src="@/assets/ZDimages/img_min_icon.png">
|
|
|
@@ -34,12 +35,14 @@
|
|
|
data() {
|
|
|
return {
|
|
|
config: {
|
|
|
- rowNum: 7,
|
|
|
- headerBGC: 'rgba(0,66,138,0.5)',
|
|
|
+ rowNum: 8,
|
|
|
+ // headerBGC: 'rgba(0,66,138,0.5)',
|
|
|
+ headerBGC: '#032D6A',
|
|
|
oddRowBGC: 'rgba(0,66,138,0.0)',
|
|
|
evenRowBGC: 'rgba(0,66,138,0.0)',
|
|
|
header: ['', '设施房间', '使用人次', '使用率'],
|
|
|
- carousel:'page',
|
|
|
+ hoverPause:false,
|
|
|
+ // carousel:'page',
|
|
|
data: [
|
|
|
// ['<span class="span_1"><span></span></span>','行1列1', '行1列2', '行1列3'],
|
|
|
// ['<span class="span_2"><span></span></span>','行2列1', '行2列2', '行2列3'],
|
|
|
@@ -96,25 +99,10 @@
|
|
|
this.$set(this.config,'data',[]);
|
|
|
clearInterval(this.scrollInterval);
|
|
|
dashboardsResearchUsage(this.roomNames).then(res => {
|
|
|
- let list = [];
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
- let obj = {
|
|
|
- id:i,
|
|
|
- name: res.data[i].roomNumValue,
|
|
|
- num: res.data[i].usageCount,
|
|
|
- value: this.accMul(res.data[i].usageRate,100).toFixed(0)+'%'
|
|
|
- // value: res.data[i].usageRate
|
|
|
- }
|
|
|
- list.push(obj)
|
|
|
- }
|
|
|
- this.$set(this,'maxList',JSON.parse(JSON.stringify(list)));
|
|
|
- setTimeout(function() {
|
|
|
- self.startScrolling()
|
|
|
- },500)
|
|
|
- // this.startTimer();
|
|
|
- // let list = []
|
|
|
+ // let list = [];
|
|
|
// for (let i = 0; i < res.data.length; i++) {
|
|
|
// let obj = {
|
|
|
+ // id:i,
|
|
|
// name: res.data[i].roomNumValue,
|
|
|
// num: res.data[i].usageCount,
|
|
|
// value: this.accMul(res.data[i].usageRate,100).toFixed(0)+'%'
|
|
|
@@ -122,20 +110,36 @@
|
|
|
// }
|
|
|
// list.push(obj)
|
|
|
// }
|
|
|
- // // list = this.sortByPercentageDesc(list)
|
|
|
- // let newList = [];
|
|
|
- // for(let i=0;i<list.length;i++){
|
|
|
- // if(i==0){
|
|
|
- // newList.push(['<span class="span_1"><span></span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
- // }else if(i==1){
|
|
|
- // newList.push(['<span class="span_2"><span></span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
- // }else if(i==1){
|
|
|
- // newList.push(['<span class="span_3"><span></span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
- // }else{
|
|
|
- // newList.push(['<span class="span_num"><span>'+(i+1)+'</span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.$set(this.config,'data',newList)
|
|
|
+ // this.$set(this,'maxList',JSON.parse(JSON.stringify(list)));
|
|
|
+ // setTimeout(function() {
|
|
|
+ // self.startScrolling()
|
|
|
+ // },500)
|
|
|
+
|
|
|
+ this.startTimer();
|
|
|
+ let list = []
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ let obj = {
|
|
|
+ name: res.data[i].roomNumValue,
|
|
|
+ num: res.data[i].usageCount,
|
|
|
+ value: this.accMul(res.data[i].usageRate,100).toFixed(0)+'%'
|
|
|
+ // value: res.data[i].usageRate
|
|
|
+ }
|
|
|
+ list.push(obj)
|
|
|
+ }
|
|
|
+ // list = this.sortByPercentageDesc(list)
|
|
|
+ let newList = [];
|
|
|
+ for(let i=0;i<list.length;i++){
|
|
|
+ if(i==0){
|
|
|
+ newList.push(['<span class="span_1"><span></span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
+ }else if(i==1){
|
|
|
+ newList.push(['<span class="span_2"><span></span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
+ }else if(i==1){
|
|
|
+ newList.push(['<span class="span_3"><span></span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
+ }else{
|
|
|
+ newList.push(['<span class="span_num"><span>'+(i+1)+'</span></span>',list[i].name, list[i].num+'', list[i].value])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this.config,'data',newList)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -306,6 +310,15 @@
|
|
|
z-index: 1;
|
|
|
transform: rotate(180deg);
|
|
|
}
|
|
|
+ .back-null-p{
|
|
|
+ z-index: 1;
|
|
|
+ position: absolute;
|
|
|
+ top: 89px;
|
|
|
+ left: 30px;
|
|
|
+ height: 2px;
|
|
|
+ width: 470px;
|
|
|
+ background-color: #032D6A;
|
|
|
+ }
|
|
|
::v-deep .dv-scroll-board {
|
|
|
margin: 54px 0 0 30px;
|
|
|
.header {
|
|
|
@@ -323,9 +336,9 @@
|
|
|
}
|
|
|
}
|
|
|
.row-item {
|
|
|
- height: 50px !important;
|
|
|
- line-height: 50px !important;
|
|
|
- border-bottom: 1px dashed rgba(216, 216, 216, 0.1);
|
|
|
+ /*height: 50px !important;*/
|
|
|
+ /*line-height: 50px !important;*/
|
|
|
+ border-top: 1px dashed rgba(216, 216, 216, 0.1);
|
|
|
.ceil {
|
|
|
width: 137px !important;
|
|
|
}
|