|
@@ -13,54 +13,82 @@
|
|
|
<div class="zongtu"></div>
|
|
<div class="zongtu"></div>
|
|
|
<div class="zongtxt">房间总数</div>
|
|
<div class="zongtxt">房间总数</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="zongshu">241</div>
|
|
|
|
|
|
|
+ <div class="zongshu">{{ total }}</div>
|
|
|
|
|
|
|
|
<div class="zongkuang" style="margin-top:143px;
|
|
<div class="zongkuang" style="margin-top:143px;
|
|
|
background: linear-gradient(90deg, rgba(103, 255, 255, 0.2), rgba(163, 248, 255, 0) 100%);">
|
|
background: linear-gradient(90deg, rgba(103, 255, 255, 0.2), rgba(163, 248, 255, 0) 100%);">
|
|
|
<div class="zongtu2"></div>
|
|
<div class="zongtu2"></div>
|
|
|
<div class="zongtxt">使用中</div>
|
|
<div class="zongtxt">使用中</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="zongshu" style="margin-top:174px;">121</div>
|
|
|
|
|
|
|
+ <div class="zongshu" style="margin-top:174px;">{{ totalusing }}</div>
|
|
|
<div class="zongline"></div>
|
|
<div class="zongline"></div>
|
|
|
- <div class="zongbai">55%</div>
|
|
|
|
|
|
|
+ <div class="zongbai">{{ usingPrecent }}</div>
|
|
|
|
|
|
|
|
<div class="zongkuang" style="margin-top:204px;
|
|
<div class="zongkuang" style="margin-top:204px;
|
|
|
background: linear-gradient(90deg, rgba(249, 219, 80, 0.2) , rgba(163, 248, 255, 0) 100%);">
|
|
background: linear-gradient(90deg, rgba(249, 219, 80, 0.2) , rgba(163, 248, 255, 0) 100%);">
|
|
|
<div class="zongtu3"></div>
|
|
<div class="zongtu3"></div>
|
|
|
<div class="zongtxt">空闲</div>
|
|
<div class="zongtxt">空闲</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="zongshu" style="margin-top:236px;">100</div>
|
|
|
|
|
|
|
+ <div class="zongshu" style="margin-top:236px;">{{ totalunnsing }}</div>
|
|
|
<div class="zongline" style="margin-top:249px;"></div>
|
|
<div class="zongline" style="margin-top:249px;"></div>
|
|
|
- <div class="zongbai" style="margin-top:238px;">45%</div>
|
|
|
|
|
|
|
+ <div class="zongbai" style="margin-top:238px;">{{ unusingPrecent }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import axios from 'axios'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'righttop',
|
|
name: 'righttop',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
-
|
|
|
|
|
|
|
+ total: '',//房间总数
|
|
|
|
|
+ totalusing: '',//使用中
|
|
|
|
|
+ usingPrecent: '',//使用中的比例
|
|
|
|
|
+ totalunnsing: '',//空闲
|
|
|
|
|
+ unusingPrecent: '',//空闲的比例
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
msg: String
|
|
msg: String
|
|
|
},
|
|
},
|
|
|
- created(){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
- mounted(){
|
|
|
|
|
- this.getEchartData()
|
|
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.getJiaoshi()
|
|
|
},
|
|
},
|
|
|
- methods:{
|
|
|
|
|
- getEchartData(){
|
|
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ //教室使用情况
|
|
|
|
|
+ getJiaoshi() {
|
|
|
|
|
+ this.$axios.post('/jiao/api/theClassrooms',
|
|
|
|
|
+ {
|
|
|
|
|
+ "building":"博学楼",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ "token": sessionStorage.getItem('token'),//登录获取的token
|
|
|
|
|
+ },
|
|
|
|
|
+ }
|
|
|
|
|
+ ).then(res => {
|
|
|
|
|
+ if (res.data.code==200) {
|
|
|
|
|
+ this.total=parseInt(res.data.data.total)
|
|
|
|
|
+ this.totalusing=parseInt(res.data.data.totalUsing)
|
|
|
|
|
+ this.usingPrecent=parseFloat(res.data.data.totalUsingPercent)+'%'
|
|
|
|
|
+ this.totalunnsing=parseInt(res.data.data.totalUnusing)
|
|
|
|
|
+ this.unusingPrecent=parseFloat(res.data.data.totalUnusingPercent)+'%'
|
|
|
|
|
+
|
|
|
|
|
+ this.getEchartData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getEchartData() {
|
|
|
let _this = this;
|
|
let _this = this;
|
|
|
const chart = this.$refs.chart;
|
|
const chart = this.$refs.chart;
|
|
|
var option = null;
|
|
var option = null;
|
|
|
const myChart = this.$echarts.init(chart);
|
|
const myChart = this.$echarts.init(chart);
|
|
|
|
|
|
|
|
option = {
|
|
option = {
|
|
|
- color: ['#66FFFF','#F9DB50'],
|
|
|
|
|
|
|
+ color: ['#66FFFF', '#F9DB50'],
|
|
|
tooltip: {
|
|
tooltip: {
|
|
|
trigger: 'item'
|
|
trigger: 'item'
|
|
|
},
|
|
},
|
|
@@ -85,8 +113,8 @@ export default {
|
|
|
show: false
|
|
show: false
|
|
|
},
|
|
},
|
|
|
data: [
|
|
data: [
|
|
|
- { value: 48, name: '使用中' },
|
|
|
|
|
- { value: 135, name: '空闲' }
|
|
|
|
|
|
|
+ { value: this.totalusing, name: '使用中' },
|
|
|
|
|
+ { value: this.totalunnsing, name: '空闲' }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
@@ -116,22 +144,24 @@ export default {
|
|
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
-.cointan{
|
|
|
|
|
|
|
+.cointan {
|
|
|
width: 450px;
|
|
width: 450px;
|
|
|
height: 302px;
|
|
height: 302px;
|
|
|
background-image: url('../assets/index/litterbackground.png');
|
|
background-image: url('../assets/index/litterbackground.png');
|
|
|
background-size: 100%;
|
|
background-size: 100%;
|
|
|
}
|
|
}
|
|
|
-.title1{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.title1 {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 9px 0 0 10px;
|
|
margin: 9px 0 0 10px;
|
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
|
- font-family : '优设标题黑';
|
|
|
|
|
|
|
+ font-family: '优设标题黑';
|
|
|
color: rgba(255, 255, 255, 1);
|
|
color: rgba(255, 255, 255, 1);
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 左侧环形图
|
|
// 左侧环形图
|
|
|
-.huankuang{
|
|
|
|
|
|
|
+.huankuang {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 87px 0 0 41px;
|
|
margin: 87px 0 0 41px;
|
|
|
width: 151px;
|
|
width: 151px;
|
|
@@ -139,14 +169,16 @@ export default {
|
|
|
background-image: url('../assets/rightTop/huanxing.png');
|
|
background-image: url('../assets/rightTop/huanxing.png');
|
|
|
background-size: 100%;
|
|
background-size: 100%;
|
|
|
}
|
|
}
|
|
|
-.chart{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.chart {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 5px 0 0 5px;
|
|
margin: 5px 0 0 5px;
|
|
|
width: 141px;
|
|
width: 141px;
|
|
|
height: 141px;
|
|
height: 141px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 右侧信息
|
|
// 右侧信息
|
|
|
-.zongkuang{
|
|
|
|
|
|
|
+.zongkuang {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 83px 0 0 227px;
|
|
margin: 83px 0 0 227px;
|
|
|
width: 171px;
|
|
width: 171px;
|
|
@@ -158,7 +190,8 @@ export default {
|
|
|
line-height: 28px;
|
|
line-height: 28px;
|
|
|
color: rgba(255, 255, 255, 1);
|
|
color: rgba(255, 255, 255, 1);
|
|
|
}
|
|
}
|
|
|
-.zongtu{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.zongtu {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 0px 0 0 -15px;
|
|
margin: 0px 0 0 -15px;
|
|
|
width: 28px;
|
|
width: 28px;
|
|
@@ -166,7 +199,8 @@ export default {
|
|
|
background-image: url('../assets/rightTop/lin1.png');
|
|
background-image: url('../assets/rightTop/lin1.png');
|
|
|
background-size: 100%;
|
|
background-size: 100%;
|
|
|
}
|
|
}
|
|
|
-.zongtu2{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.zongtu2 {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 0px 0 0 -15px;
|
|
margin: 0px 0 0 -15px;
|
|
|
width: 28px;
|
|
width: 28px;
|
|
@@ -174,7 +208,8 @@ export default {
|
|
|
background-image: url('../assets/rightTop/lin2.png');
|
|
background-image: url('../assets/rightTop/lin2.png');
|
|
|
background-size: 100%;
|
|
background-size: 100%;
|
|
|
}
|
|
}
|
|
|
-.zongtu3{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.zongtu3 {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 0px 0 0 -15px;
|
|
margin: 0px 0 0 -15px;
|
|
|
width: 28px;
|
|
width: 28px;
|
|
@@ -182,20 +217,23 @@ export default {
|
|
|
background-image: url('../assets/rightTop/lin3.png');
|
|
background-image: url('../assets/rightTop/lin3.png');
|
|
|
background-size: 100%;
|
|
background-size: 100%;
|
|
|
}
|
|
}
|
|
|
-.zongtxt{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.zongtxt {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 0px 0 0 31px;
|
|
margin: 0px 0 0 31px;
|
|
|
}
|
|
}
|
|
|
-.zongshu{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.zongshu {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 115px 0 0 258px;
|
|
margin: 115px 0 0 258px;
|
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
line-height: 26px;
|
|
line-height: 26px;
|
|
|
color: rgba(255, 255, 255, 1);
|
|
color: rgba(255, 255, 255, 1);
|
|
|
- font-family : '优设标题黑';
|
|
|
|
|
|
|
+ font-family: '优设标题黑';
|
|
|
}
|
|
}
|
|
|
-.zongline{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.zongline {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 188px 0 0 306px;
|
|
margin: 188px 0 0 306px;
|
|
|
width: 42px;
|
|
width: 42px;
|
|
@@ -203,12 +241,12 @@ export default {
|
|
|
opacity: 0.5;
|
|
opacity: 0.5;
|
|
|
border: 1px dashed rgba(255, 255, 255, 1);
|
|
border: 1px dashed rgba(255, 255, 255, 1);
|
|
|
}
|
|
}
|
|
|
-.zongbai{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.zongbai {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
margin: 177px 0 0 357px;
|
|
margin: 177px 0 0 357px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
|
line-height: 20.27px;
|
|
line-height: 20.27px;
|
|
|
color: rgba(255, 255, 255, 1);
|
|
color: rgba(255, 255, 255, 1);
|
|
|
-}
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+}</style>
|