smodule34.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <div class="module-main">
  3. <div class="module-box">
  4. <div class="module-public module-top-box">
  5. <div class="header">
  6. 员工状态总览
  7. </div>
  8. <div class="center-box">
  9. <div class="center-left-box">
  10. <div class="nums">{{count1}}</div>
  11. <div class="title">任务中的员工</div>
  12. </div>
  13. <div class="center-right-box">
  14. <div class="nums">{{count2}}</div>
  15. <div class="title">待命中的员工</div>
  16. </div>
  17. </div>
  18. <div class="bottom-box">
  19. <dv-scroll-board :config="config" class="bottom-left-box" />
  20. <dv-scroll-board :config="config2" class="bottom-right-box" />
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. import Vue from 'vue';
  28. import Component from 'vue-class-component';
  29. import api from '../../api';
  30. @Component({
  31. props: {
  32. data: {
  33. type: Object,
  34. default: null,
  35. },
  36. },
  37. })
  38. export default class Echarts extends Vue {
  39. config = {
  40. }
  41. config2 = {
  42. }
  43. config3 = {
  44. }
  45. count1 = 0;
  46. count2 = 0;
  47. created() {
  48. this.getWxUserStatus();
  49. setInterval(() => {
  50. this.getWxUserStatus();
  51. }, 5000 * 60);
  52. }
  53. getWxUserStatus() {
  54. api.getWxUserStatus().then((res) => {
  55. this.count1 = res.data.list2.count;
  56. this.count2 = res.data.list.count;
  57. this.config = {
  58. header: ['姓名', '维修次数', '最新位置'],
  59. headerBGC: '#163f85',
  60. headerHeight: 45,
  61. data: res.data.list2.list,
  62. align: 'center',
  63. oddRowBGC: '#163f85',
  64. evenRowBGC: '#13397d',
  65. rowNum: 4,
  66. };
  67. this.config2 = {
  68. header: ['姓名', '维修次数', '最新位置'],
  69. headerBGC: '#163f85',
  70. headerHeight: 45,
  71. data: res.data.list.list,
  72. align: 'center',
  73. oddRowBGC: '#163f85',
  74. evenRowBGC: '#13397d',
  75. rowNum: 4,
  76. };
  77. }).catch(() => {}).finally(() => {
  78. });
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .module-box .header{
  84. width: 97%;
  85. height: 40px;
  86. line-height: 40px;
  87. font-size: 16px;
  88. // font-weight: bold;
  89. // color: #0BE2DF;
  90. padding-left: 3%;
  91. }
  92. .module-top-box{
  93. width: 100%;
  94. height: 100%;
  95. position: relative;
  96. }
  97. .module-top-box .center-box{
  98. width: 100%;
  99. height: 80px;
  100. }
  101. .module-top-box .center-box .center-left-box{
  102. width: 50%;
  103. height: 100%;
  104. display: inline-block;
  105. overflow: hidden;
  106. }
  107. .module-top-box .center-box .center-left-box .nums{
  108. width: 100%;
  109. font-size: 30px;
  110. font-weight: bold;
  111. color: #11E799;
  112. text-align: center;
  113. }
  114. .module-top-box .center-box .center-left-box .title{
  115. width: 100%;
  116. font-size: 18px;
  117. color: #11E799;
  118. text-align: center;
  119. }
  120. .module-top-box .center-box .center-right-box{
  121. width: 50%;
  122. height: 100%;
  123. display: inline-block;
  124. overflow: hidden;
  125. }
  126. .module-top-box .center-box .center-right-box .nums{
  127. width: 100%;
  128. font-size: 30px;
  129. font-weight: bold;
  130. color: #FFE400;
  131. text-align: center;
  132. }
  133. .module-top-box .center-box .center-right-box .title{
  134. width: 100%;
  135. font-size: 18px;
  136. color: #FFE400;
  137. text-align: center;
  138. }
  139. .module-top-box .bottom-box{
  140. width: 100%;
  141. height: auto;
  142. position: absolute;
  143. top: 120px;
  144. left: 0;
  145. right: 0;
  146. bottom: 0;
  147. }
  148. .module-top-box .bottom-box .bottom-left-box{
  149. width: 49%;
  150. height: 100%;
  151. display: inline-block;
  152. float: left;
  153. overflow: hidden;
  154. }
  155. .module-top-box .bottom-box .bottom-right-box{
  156. width: 49%;
  157. height: 100%;
  158. display: inline-block;
  159. float: right;
  160. overflow: hidden;
  161. }
  162. </style>