index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!--
  2. * @Descripttion:
  3. * @version:
  4. * @Author: wt
  5. * @Date: 2023-06-14 15:27:50
  6. * @LastEditors: wt
  7. * @LastEditTime: 2023-06-14 15:29:39
  8. -->
  9. <template>
  10. <el-row
  11. class="top"
  12. v-loading="loading"
  13. element-loading-background="rgba(28,33,41,1)"
  14. >
  15. <el-col :span="6">
  16. <el-col :span="24" class="time"><a href="http://10.21.39.1:8187">{{ date }}</a></el-col>
  17. </el-col>
  18. <el-col :span="12">
  19. <el-col :span="24" class="title">中国东信智慧楼宇</el-col>
  20. </el-col>
  21. <div :span="6" class="logo">
  22. <a href="http://10.21.39.1:8186"><img :src="logo" alt=""></a>
  23. </div>
  24. </el-row>
  25. </template>
  26. <script>
  27. import logo from "@/assets/logo/logo-b.png";
  28. export default {
  29. data() {
  30. return {
  31. loading: true,
  32. date: new Date(),
  33. logo: logo,
  34. };
  35. },
  36. mounted() {
  37. let that= this;
  38. that.loading = false;
  39. this.timer = setInterval(function() {
  40. let myDate = new Date()
  41. let year = myDate.getFullYear() + '年'
  42. let month = myDate.getMonth() + 1 > 9 ? (myDate.getMonth() + 1) + '月' : '0' + (myDate.getMonth() + 1) + '月'
  43. let day = myDate.getDate() > 9 ? myDate.getDate() + '日' : '0' + myDate.getDate() + '日 '
  44. let s = myDate.getHours() > 9 ? myDate.getHours() : '0' + myDate.getHours()
  45. let f = myDate.getMinutes() > 9 ? myDate.getMinutes() : '0' + myDate.getMinutes()
  46. let m = myDate.getSeconds() > 9 ? myDate.getSeconds() : '0' + myDate.getSeconds()
  47. that.date = year + month + day + ' ' + s + ":" + f + ":" + m
  48. });
  49. },
  50. };
  51. </script>
  52. <style lang="scss" scoped>
  53. @import "@/assets/styles/common.scss";
  54. #main {
  55. .top {
  56. width: 100%;
  57. height: 100px;
  58. line-height: 100px;
  59. vertical-align: middle;
  60. position: fixed;
  61. z-index: 10;
  62. .time {
  63. font-size: 24px;
  64. color: $white;
  65. margin-left:6px;
  66. }
  67. .title {
  68. font-size: 40px;
  69. color: $white;
  70. letter-spacing: 2.22px;
  71. font-family: "MicrosoftYaHei-Bold";
  72. vertical-align: middle;
  73. text-align: center;
  74. font-weight: 700;
  75. }
  76. .logo {
  77. position: fixed;
  78. right:16px;
  79. img {
  80. height: 65px;
  81. vertical-align: middle;
  82. }
  83. }
  84. }
  85. }
  86. </style>