smodule99.vue 4.1 KB

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