screen-tem6.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <div class="page">
  3. <div class="header">
  4. <div class="header-box">
  5. <img class="header-img" src="../images/screen-tem2/logo.png" alt="">
  6. <img class="header-line" src="../images/screen-tem2/line.png" alt="">
  7. <div class="header-right">
  8. <img class="header-line" src="../images/screen-tem2/line.png" alt="">
  9. <span>{{time}}</span>
  10. <img class="header-line" src="../images/screen-tem2/line.png" alt="">
  11. <span>{{day}}</span>
  12. <img class="header-line" src="../images/screen-tem2/line.png" alt="">
  13. <span>{{week}}</span>
  14. </div>
  15. <span class="headr-title">{{data.orgName}}{{data.title}}</span>
  16. <img class="header-blue-line" src="../images/screen-tem2/blue-line.png" alt="">
  17. </div>
  18. </div>
  19. <div class="main">
  20. <div class="main-box main-box1">
  21. <div class="box-nums one">
  22. <screen-module :data="data" style="width: 100%;height: 100%;" :cid="1" />
  23. </div>
  24. <div class="box-nums two">
  25. <screen-module :data="data" :cid="2" />
  26. </div>
  27. </div>
  28. <div class="main-box main-box2">
  29. <div class="box-nums there">
  30. <screen-module :data="data" :cid="3" />
  31. </div>
  32. <div class="box-nums fore">
  33. <screen-module :data="data" :cid="4" />
  34. </div>
  35. </div>
  36. <div class="main-box main-box3">
  37. <div class="box-nums five">
  38. <screen-module :data="data" :cid="5" />
  39. </div>
  40. <div class="box-nums six">
  41. <screen-module :data="data" :cid="6" />
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import Vue from 'vue';
  49. import Component from 'vue-class-component';
  50. import ScreenModule from '@/apps/home/components/screen-module.vue';
  51. @Component({
  52. props: {
  53. data: {
  54. type: Object,
  55. default: null,
  56. },
  57. },
  58. components: {
  59. ScreenModule,
  60. },
  61. })
  62. export default class Echarts extends Vue {
  63. week = '';
  64. day = '';
  65. time = '';
  66. created() {
  67. this.realSysTime();
  68. setInterval(() => {
  69. this.realSysTime();
  70. }, 1000);
  71. }
  72. realSysTime() {
  73. const now = new Date();
  74. const year = now.getFullYear(); // 获取年份
  75. let month = now.getMonth(); // 获取月份
  76. let date = now.getDate(); // 获取日期
  77. const day = now.getDay(); // 获取星期
  78. let hour = now.getHours(); // 获取小时
  79. let minute = now.getMinutes(); // 获取分钟
  80. let seconds = now.getSeconds(); // 获取秒
  81. month += 1;
  82. const arrWeek = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  83. this.week = arrWeek[day];
  84. if (month < 10) {
  85. month = `0${month}`;
  86. }
  87. if (date < 10) {
  88. date = `0${date}`;
  89. }
  90. if (hour < 10) {
  91. hour = `0${hour}`;
  92. }
  93. if (minute < 10) {
  94. minute = `0${minute}`;
  95. }
  96. if (seconds < 10) {
  97. seconds = `0${seconds}`;
  98. }
  99. this.day = `${year}.${month}.${date}`;
  100. this.time = `${hour}:${minute}:${seconds}`;
  101. }
  102. }
  103. </script>
  104. <style scoped lang="scss">
  105. .page{
  106. position: fixed;
  107. z-index: 10;
  108. top: 0;
  109. left: 0;
  110. bottom: 0;
  111. right: 0;
  112. background-color: #14111f;
  113. overflow: hidden;
  114. background-image: url(../images/screen-tem2/bg.png);
  115. background-repeat: no-repeat;
  116. background-size: 100% 100%;
  117. color: #ffffff;
  118. }
  119. .header{
  120. width: 100%;
  121. height: 10vh;
  122. position: relative;
  123. color: #ffffff;
  124. }
  125. .header-box{
  126. height: 6.8vh;
  127. line-height: 6.8vh;
  128. padding: 0 1.5vw;
  129. font-size: 22px;
  130. }
  131. .header-box .header-img{
  132. display: inline-block;
  133. /* width: 12.5vw; */
  134. width: 7.7vw;
  135. height: 2.8vh;
  136. vertical-align: middle;
  137. margin-top: -4px;
  138. }
  139. .header-line{
  140. display: inline-block;
  141. width: 0.6vw;
  142. height: 3.7vh;
  143. vertical-align: middle;
  144. margin: 0 10px;
  145. }
  146. .header-right{
  147. width: 28vw;
  148. text-align: right;
  149. height: 100%;
  150. float: right;
  151. }
  152. .header-blue-line{
  153. width: 100%;
  154. float: left;
  155. }
  156. .headr-title{
  157. width: 43vw;
  158. text-align: center;
  159. height: 100%;
  160. float: right;
  161. display: inline-block;
  162. font-weight: 600;
  163. }
  164. .main{
  165. height: 90vh;
  166. }
  167. .main .main-box{
  168. display: inline-block;
  169. float: left;
  170. position: relative;
  171. }
  172. .main .main-box1{
  173. width: 24vw;
  174. height: 88.3vh;
  175. margin: 0 1.5vw;
  176. }
  177. .main .main-box2{
  178. width: 46vw;
  179. height: 88.3vh;
  180. }
  181. .main .main-box3{
  182. width: 24vw;
  183. height: 88.3vh;
  184. margin: 0 1.5vw;
  185. }
  186. .main-box .box-nums{
  187. background-repeat: no-repeat;
  188. background-size: 100% 100%;
  189. background-color: rgba(29, 81, 156, 0.2);
  190. }
  191. .main .main-box1 .one{
  192. width: 100%;
  193. height: 65.2%;
  194. position: relative;
  195. margin-bottom: 4%;
  196. }
  197. .main .main-box1 .two{
  198. width: 100%;
  199. height: 30.8% ;
  200. position: relative;
  201. }
  202. .main .main-box2 .there{
  203. width: 100% ;
  204. height: 48%;
  205. position: relative;
  206. margin-bottom: 2%;
  207. }
  208. .main .main-box2 .fore{
  209. width: 100% ;
  210. height: 48%;
  211. position: relative;
  212. }
  213. .main .main-box3 .five{
  214. width: 100%;
  215. height: 65.2%;
  216. position: relative;
  217. margin-bottom: 4%;
  218. }
  219. .main .main-box3 .six{
  220. width: 100%;
  221. height: 30.8% ;
  222. position: relative;
  223. }
  224. </style>