smodule12.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div class="module-main">
  3. <div class="module-box">
  4. <div class="header">
  5. 数据总览
  6. </div>
  7. <dv-scroll-board :config="config" style="width:100%;height:87%;overflow: hidden;" />
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import Vue from 'vue';
  13. import Component from 'vue-class-component';
  14. import api from '../../api';
  15. @Component({
  16. props: {
  17. data: {
  18. type: Object,
  19. default: null,
  20. },
  21. },
  22. })
  23. export default class Echarts extends Vue {
  24. config = {
  25. }
  26. created() {
  27. this.getPatrolRealTime();
  28. setInterval(() => {
  29. this.getPatrolRealTime();
  30. }, 5000 * 60);
  31. }
  32. getPatrolRealTime() {
  33. api.getPatrolRealTime({ mode: 1 }).then((res) => {
  34. this.config = {
  35. data: res.data,
  36. align: 'left',
  37. oddRowBGC: '#1D519C',
  38. evenRowBGC: '#2E73D1',
  39. rowNum: 6,
  40. };
  41. }).catch(() => {}).finally(() => {
  42. });
  43. }
  44. }
  45. </script>
  46. <style scoped lang="scss">
  47. .module-box .header{
  48. width: 100%;
  49. height: 13.4%;
  50. font-size: 18px;
  51. font-family: Source Han Sans CN;
  52. // font-weight: bold;
  53. // color: #0BE2DF;
  54. display: flex;
  55. align-items: center;
  56. padding-left: 15px;
  57. }
  58. </style>