smodule70.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. <span>【超时】</span> 运送任务实时调度总览(新订单{{num}}个/进行中{{num1}}个)
  7. </div>
  8. <dv-scroll-board v-if="loading" :config="config" class="bottom-content-box" />
  9. </div>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. import Vue from 'vue';
  15. import Component from 'vue-class-component';
  16. import api from '../../api';
  17. @Component({
  18. props: {
  19. data: {
  20. type: Object,
  21. default: null,
  22. },
  23. },
  24. })
  25. export default class Echarts extends Vue {
  26. config = {
  27. }
  28. num = 0
  29. num1 = 0
  30. loading = true
  31. created() {
  32. this.getYsTypeTask();
  33. setInterval(() => {
  34. this.getYsTypeTask();
  35. }, 3000 * 60);
  36. }
  37. getYsTypeTask() {
  38. this.loading = false;
  39. api.getYsTypeTask({ type: 1 }).then((res) => {
  40. this.config = {
  41. header: [
  42. '<span style="font-size:13px">状态</span>',
  43. '<span style="font-size:13px">类型</span>',
  44. '<span style="font-size:13px">始发地</span>',
  45. '<span style="font-size:13px">目的地</span>',
  46. '<span style="font-size:13px">需求时间</span>',
  47. '<span style="font-size:13px">运送员</span>',
  48. '<span style="font-size:13px">派工时间</span>',
  49. '<span style="font-size:13px">接收时间</span>',
  50. ],
  51. headerBGC: '#163f85',
  52. headerHeight: 45,
  53. data: res.data.list,
  54. align: 'left',
  55. oddRowBGC: '#163f85',
  56. evenRowBGC: '#13397d',
  57. rowNum: 7,
  58. columnWidth: [65, 100, 120, 120],
  59. };
  60. this.num = res.data.num;
  61. this.num1 = res.data.num1;
  62. this.loading = true;
  63. }).catch(() => {
  64. this.loading = true;
  65. }).finally(() => {
  66. this.loading = true;
  67. });
  68. }
  69. }
  70. </script>
  71. <style scoped lang="scss">
  72. .module-box .header{
  73. width: 97%;
  74. height: 40px;
  75. font-size: 16px;
  76. // font-weight: bold;
  77. // color: #0BE2DF;
  78. // padding-left: 1%;
  79. display: flex;
  80. align-items: center;
  81. span{
  82. color: #FFE400;
  83. }
  84. }
  85. .module-bottom-box{
  86. width: 100%;
  87. height: 100%;
  88. // margin-top: 2.38%;
  89. position: relative;
  90. }
  91. .module-bottom-box .bottom-content-box{
  92. width: 100%;
  93. height: auto;
  94. position: absolute;
  95. top:40px;
  96. left: 0;
  97. right: 0;
  98. bottom: 0;
  99. overflow: hidden;
  100. }
  101. </style>