smodule31.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div class="module-main">
  3. <div class="module-box">
  4. <div class="header">
  5. <div class="rhombus" />
  6. <span class="title">日常工作网格化管理数据</span>
  7. </div>
  8. <dv-scroll-board :config="config" class="content" />
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. import Vue from 'vue';
  14. import Component from 'vue-class-component';
  15. import api from '../../api';
  16. @Component({
  17. props: {
  18. data: {
  19. type: Object,
  20. default: null,
  21. },
  22. },
  23. })
  24. export default class Smodule31 extends Vue {
  25. config ={
  26. }
  27. created() {
  28. this.getDailyRecordList();
  29. setInterval(() => {
  30. this.getDailyRecordList();
  31. }, 5000 * 60);
  32. }
  33. getDailyRecordList() {
  34. api.getDailyRecordList().then((res) => {
  35. this.config = {
  36. header: ['任务地点', '执行人员', '完成时间'],
  37. headerBGC: '#061D4E',
  38. headerHeight: 45,
  39. data: res.data,
  40. align: 'center',
  41. oddRowBGC: '#061D4E',
  42. evenRowBGC: '#223661',
  43. rowNum: 18,
  44. };
  45. }).catch(() => {}).finally(() => {
  46. });
  47. }
  48. }
  49. </script>
  50. <style scoped lang="scss">
  51. .module-box{
  52. width: 100%;
  53. height: 100%;
  54. }
  55. .module-box .header{
  56. width: 97%;
  57. height: 40px;
  58. line-height: 40px;
  59. padding-left: 3%;
  60. }
  61. .module-box .header .rhombus{
  62. width: 14px;
  63. height: 14px;
  64. background: #2D59BC;
  65. display: inline-block;
  66. clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  67. }
  68. .module-box .header .title{
  69. color: #FFFFFF;
  70. font-size: 15px;
  71. font-weight: 500;
  72. margin-left: 2%;
  73. }
  74. .module-box .content{
  75. width: 96%;
  76. margin-top: 10px;
  77. height: calc(100% - 50px - 2%);
  78. padding: 0 2%;
  79. margin-bottom: 2%;
  80. }
  81. </style>