screen-tem14.vue 6.4 KB

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