index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <el-col :span="24" class="conferenceRoomStatistics modular" style="padding:10px 20px 0;pointer-event: auto;cursor: pointer;" @click.native="hyClick()">
  3. <el-col :span="13" class="title" style="margin-left:0" >会议室统计</el-col>
  4. <el-col :span="12" class="conferenceRoomStatisticsLeft">
  5. <el-col class="rowN" style="margin-top: 45px;">
  6. <el-image :src="conferenceRoom" fit="scale-down" />
  7. <el-col class="name">会议室总数</el-col>
  8. <!-- <el-col class="num">21<span> 间</span></el-col> -->
  9. <el-col class="num">{{data.roomTotal}}<span> 间</span></el-col>
  10. </el-col>
  11. <el-col class="rowN" >
  12. <el-image :src="conferenceRoom" fit="scale-down" />
  13. <el-col class="name">在用会议室</el-col>
  14. <!-- <el-col class="num">0<span> 间</span></el-col> -->
  15. <el-col class="num">{{data.roomInUse}}<span> 间</span></el-col>
  16. </el-col>
  17. </el-col>
  18. <div :span="12" style="position: relative;;z-index:10;top:0px;">
  19. <p class="titleHy">会议室昨日使用情况</p>
  20. <pie :resData="data" style="margin-top:-10%"/>
  21. </div>
  22. </el-col>
  23. </template>
  24. <script>
  25. import axios from 'axios'
  26. import conferenceRoom from "@/assets/images2/会议室统计icon.png";
  27. import pie from "@/components2/conferenceRoomStatistics/pie.vue";
  28. export default {
  29. name: "conferenceRoomStatistics",
  30. components: {
  31. pie,
  32. },
  33. data() {
  34. return {
  35. conferenceRoom: conferenceRoom,
  36. data:{
  37. roomInUse: undefined,
  38. attendeeIsSign: undefined,
  39. attendeeTotal: undefined,
  40. roomTotal: undefined
  41. }
  42. };
  43. },
  44. mounted() {
  45. this.init()
  46. this.timing()
  47. },
  48. methods: {
  49. init(){
  50. axios({
  51. method: 'get',
  52. url: 'https://smartpark.caih.com/hyxt/api/thirdparty/meetingRoom/summary',
  53. }).then(res =>{
  54. if(res.data){
  55. this.data = res.data
  56. }
  57. }).catch(err =>{
  58. })
  59. },
  60. timing(){
  61. setInterval(() =>{
  62. this.init()
  63. },1000 * 60 * 5)
  64. },
  65. hyClick(){
  66. this.$emit("postMsg","会议室")
  67. }
  68. },
  69. };
  70. </script>
  71. <style lang="scss" scopet>
  72. @import '@/assets/styles/common.scss';
  73. .conferenceRoomStatisticsLeft {
  74. width: 50%;
  75. display: inline-block;
  76. .rowN {
  77. margin-top: 28px;
  78. vertical-align: middle;
  79. .el-image {
  80. width: 24px;
  81. vertical-align: middle;
  82. float: left;
  83. }
  84. .name {
  85. font-size: 16px;
  86. margin: 0 12px 0;
  87. width: auto;
  88. float: left;
  89. color:$white2;
  90. }
  91. .num {
  92. font-size: 24px;
  93. font-family: "DINAlternate-Bold";
  94. font-weight: 700;
  95. width: auto;
  96. float: left;
  97. margin-top:-5px;
  98. color:$white;
  99. span{
  100. font-size: 16px;
  101. }
  102. }
  103. }
  104. }
  105. .titleHy{
  106. font-size: 20px;
  107. margin-top:0px;
  108. }
  109. </style>