smodule30.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div class="module-main">
  3. <div class="module-box">
  4. <div class="module-public module-bottom-box">
  5. <div class="header">
  6. <div class="rhombus" />
  7. <span class="title">空间打扫总览</span>
  8. <!-- <div class="right">
  9. <span class="title">日常工作计划:{{list.title}}</span>
  10. </div> -->
  11. </div>
  12. <div class="bottom-content-box">
  13. <div v-for="(item,index) in list" :key="index" class="daily-box">
  14. <div class="content">
  15. <span class="title">{{item.title}}</span>
  16. <span class="nums">{{item.count}}</span>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import Vue from 'vue';
  26. import Component from 'vue-class-component';
  27. import api from '../../api';
  28. @Component({
  29. props: {
  30. data: {
  31. type: Object,
  32. default: null,
  33. },
  34. },
  35. })
  36. export default class Echarts extends Vue {
  37. list = []
  38. created() {
  39. this.getTaskRecordOne();
  40. setInterval(() => {
  41. this.getTaskRecordOne();
  42. }, 5000 * 60);
  43. }
  44. getTaskRecordOne() {
  45. api.getTaskRecordOne().then((res) => {
  46. this.list = res.data;
  47. }).catch(() => {}).finally(() => {
  48. });
  49. }
  50. }
  51. </script>
  52. <style scoped lang="scss">
  53. .module-box .header{
  54. width: 97%;
  55. height: 40px;
  56. line-height: 40px;
  57. font-size: 16px;
  58. // font-weight: bold;
  59. // color: #0BE2DF;
  60. padding-left: 3%;
  61. }
  62. .module-box .header .rhombus{
  63. width: 14px;
  64. height: 14px;
  65. background: #2D59BC;
  66. display: inline-block;
  67. clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  68. }
  69. .module-box .header .title{
  70. color: #FFFFFF;
  71. font-size: 15px;
  72. font-weight: 500;
  73. margin-left: 2%;
  74. }
  75. .module-box .header .right{
  76. width: 50%;
  77. display: inline-block;
  78. float: right;
  79. text-align: right;
  80. padding-right: 2%;
  81. }
  82. .module-box .header .right span{
  83. font-size: 18px;
  84. font-weight: 500;
  85. color: #FFFFFF;
  86. margin-right: 6%;;
  87. }
  88. .module-bottom-box{
  89. width: 100%;
  90. height: 100%;
  91. }
  92. .module-bottom-box .bottom-content-box{
  93. width: 97%;
  94. margin-top: 10px;
  95. height: calc(100% - 50px);
  96. overflow: hidden;
  97. padding: 0 1.5%;
  98. }
  99. .module-bottom-box .bottom-content-box .daily-box{
  100. width: 30.8%;
  101. height: 16.4%;
  102. padding: 0 1.2%;
  103. margin-bottom: 1.5%;
  104. display: inline-block;
  105. float: left;
  106. }
  107. .module-bottom-box .bottom-content-box .daily-box .content{
  108. width: 100%;
  109. height: 100%;
  110. background: rgba(45, 89, 188, 0.2);
  111. border: 1px solid #2D59BC;
  112. border-radius: 8px;
  113. display: inline-flex;
  114. align-items: center;
  115. }
  116. .module-bottom-box .bottom-content-box .daily-box .content .title{
  117. width: 75%;
  118. height: 45%;
  119. margin-left: 5%;
  120. font-size: 16px;
  121. overflow: hidden;
  122. }
  123. .module-bottom-box .bottom-content-box .daily-box .content .nums{
  124. width: 20%;
  125. margin-left: 5%;
  126. font-size: 16px;
  127. overflow: hidden;
  128. text-align: right;
  129. margin-right: 5%;
  130. }
  131. </style>