index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <div id="index" ref="appRef">
  3. <div class="bg">
  4. <dv-loading v-if="loading">Loading...</dv-loading>
  5. <div v-else class="host-body">
  6. <div class="d-flex jc-center">
  7. <dv-decoration-10 class="dv-dec-10" />
  8. <div class="d-flex jc-center">
  9. <dv-decoration-8 class="dv-dec-8" :color="decorationColor" />
  10. <div class="title">
  11. <span class="title-text">UAS-MES可视化平台</span>
  12. <dv-decoration-6
  13. class="dv-dec-6"
  14. :reverse="true"
  15. :color="['#50e3c2', '#67a1e5']"
  16. />
  17. </div>
  18. <dv-decoration-8
  19. class="dv-dec-8"
  20. :reverse="true"
  21. :color="decorationColor"
  22. />
  23. </div>
  24. <dv-decoration-10 class="dv-dec-10-s" />
  25. </div>
  26. <!-- 第二行 -->
  27. <div class="d-flex jc-between px-2">
  28. <div class="d-flex aside-width">
  29. <div class="react-left ml-4 react-l-s bg-color-blue">
  30. <span class="react-left"></span>
  31. <span class="text fw-b" style="font-size:24px;">江西联淦电子科技有限公司</span>
  32. </div>
  33. <div class="react-left ml-3">
  34. <span class="text">生产实况分析</span>
  35. </div>
  36. </div>
  37. <div class="d-flex aside-width">
  38. <div class="react-right bg-color-r mr-3">
  39. <span class="text ">品质趋势分析</span>
  40. </div>
  41. <div class="react-right mr-4 react-l-s">
  42. <span class="react-after"></span>
  43. <span class="text"
  44. >{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span
  45. >
  46. </div>
  47. </div>
  48. </div>
  49. <div class="body-box">
  50. <!-- 上面 -->
  51. <div class="content-box">
  52. <div>
  53. <dv-border-box-12>
  54. <up1 />
  55. </dv-border-box-12>
  56. </div>
  57. <div>
  58. <dv-border-box-12>
  59. <up2 />
  60. </dv-border-box-12>
  61. </div>
  62. </div>
  63. <!-- 下面 -->
  64. <div class="bottom-box">
  65. <dv-border-box-13>
  66. <bottom1 />
  67. </dv-border-box-13>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </template>
  74. <script>
  75. import drawMixin from "../../utils/drawMixin";
  76. import { formatTime } from '../../utils/index.js'
  77. import up1 from './up1'
  78. import up2 from './up2'
  79. import bottom1 from './bottom1'
  80. export default {
  81. mixins: [ drawMixin ],
  82. data() {
  83. return {
  84. timing: null,
  85. loading: true,
  86. dateDay: null,
  87. dateYear: null,
  88. dateWeek: null,
  89. weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
  90. decorationColor: ['#568aea', '#000000']
  91. }
  92. },
  93. components: {
  94. up1,
  95. up2,
  96. bottom1
  97. },
  98. mounted() {
  99. this.timeFn()
  100. this.cancelLoading()
  101. },
  102. beforeDestroy () {
  103. clearInterval(this.timing)
  104. clearInterval(this.intervalId)
  105. },
  106. methods: {
  107. timeFn() {
  108. this.timing = setInterval(() => {
  109. this.dateDay = formatTime(new Date(), 'HH: mm: ss')
  110. this.dateYear = formatTime(new Date(), 'yyyy-MM-dd')
  111. this.dateWeek = this.weekday[new Date().getDay()]
  112. }, 1000)
  113. },
  114. cancelLoading() {
  115. setTimeout(() => {
  116. this.loading = false
  117. }, 5000)
  118. }
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. @import '../../assets/scss/indexsmt.scss';
  124. </style>