screen-tem11.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <div class="page">
  3. <div class="header">
  4. <div class="header-box">
  5. <div class="header-left">
  6. <span>{{day}}</span>
  7. <span>{{time}}</span>
  8. <span>{{week}}</span>
  9. </div>
  10. <div class="title">{{data.title}}</div>
  11. <div class="header-right">
  12. 系统已运行{{yxDay}}天
  13. </div>
  14. </div>
  15. </div>
  16. <div class="main">
  17. <div class="main-box main-box1">
  18. <div class="one">
  19. <screen-module :data="data" style="width: 100%;height: 100%;" :cid="1" />
  20. </div>
  21. <div class="two">
  22. <screen-module :data="data" :cid="2" />
  23. </div>
  24. </div>
  25. <div class="main-box main-box2">
  26. <div class="there">
  27. <screen-module :data="data" :cid="3" />
  28. </div>
  29. <div class="fore">
  30. <screen-module :data="data" :cid="4" />
  31. </div>
  32. </div>
  33. <div class="main-box main-box3">
  34. <div class="five">
  35. <screen-module :data="data" :cid="5" />
  36. </div>
  37. <div class="six">
  38. <screen-module :data="data" :cid="6" />
  39. </div>
  40. </div>
  41. <div class="main-box main-box4">
  42. <screen-module :data="data" :cid="7" />
  43. </div>
  44. <div class="main-box main-box5">
  45. <screen-module :data="data" :cid="8" />
  46. </div>
  47. <div class="main-box main-box6">
  48. <screen-module :data="data" :cid="9" />
  49. </div>
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import Vue from 'vue';
  55. import Component from 'vue-class-component';
  56. import ScreenModule from '@/apps/home/components/screen-module.vue';
  57. @Component({
  58. props: {
  59. data: {
  60. type: Object,
  61. default: null,
  62. },
  63. },
  64. components: {
  65. ScreenModule,
  66. },
  67. })
  68. export default class Echarts extends Vue {
  69. week = '';
  70. day = '';
  71. time = '';
  72. yxDay = '';
  73. created() {
  74. this.realSysTime();
  75. setInterval(() => {
  76. this.realSysTime();
  77. }, 1000);
  78. }
  79. realSysTime() {
  80. const now = new Date();
  81. const year = now.getFullYear(); // 获取年份
  82. let month = now.getMonth(); // 获取月份
  83. let date = now.getDate(); // 获取日期
  84. const day = now.getDay(); // 获取星期
  85. let hour = now.getHours(); // 获取小时
  86. let minute = now.getMinutes(); // 获取分钟
  87. let seconds = now.getSeconds(); // 获取秒
  88. month += 1;
  89. const arrWeek = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  90. this.week = arrWeek[day];
  91. if (month < 10) {
  92. month = `0${month}`;
  93. }
  94. if (date < 10) {
  95. date = `0${date}`;
  96. }
  97. if (hour < 10) {
  98. hour = `0${hour}`;
  99. }
  100. if (minute < 10) {
  101. minute = `0${minute}`;
  102. }
  103. if (seconds < 10) {
  104. seconds = `0${seconds}`;
  105. }
  106. this.day = `${year}年${month}月${date}日`;
  107. this.time = `${hour}:${minute}:${seconds}`;
  108. const dateTime = '2024-06-01'; // 系统运行开始日期
  109. const curDateTime = `${year}-${month}-${date}`;
  110. const curDay = (new Date(curDateTime).getTime() - new Date(dateTime).getTime()) / 86400 / 1000;
  111. this.yxDay = curDay.toFixed(0);
  112. }
  113. }
  114. </script>
  115. <style scoped lang="scss">
  116. .page{
  117. position: fixed;
  118. z-index: 10;
  119. top: 0;
  120. left: 0;
  121. bottom: 0;
  122. right: 0;
  123. background-color: #14111f;
  124. overflow: hidden;
  125. background-image: url(../images/screen-tem11/bg.png);
  126. background-repeat: no-repeat;
  127. background-size: 100% 100%;
  128. color: #ffffff;
  129. }
  130. .header{
  131. width: 100%;
  132. height: 7.2vh;
  133. position: relative;
  134. color: #ffffff;
  135. background-image: url(../images/screen-tem11/header.png);
  136. background-repeat: no-repeat;
  137. background-size: 100% 100%;
  138. }
  139. .header-box{
  140. height: 7.2vh;
  141. line-height: 7.2vh;
  142. font-size: 22px;
  143. }
  144. .header-box .header-left{
  145. width: 27.6vw;
  146. height: 7.2vh;
  147. line-height: 7.2vh;
  148. display: inline-block;
  149. text-align: right;
  150. }
  151. .header-box .header-left span{
  152. font-size: 20px;
  153. font-family: Source Han Sans CN;
  154. font-weight: 400;
  155. color: #FFFFFF;
  156. margin-left: 1vw;
  157. }
  158. .header-box .title{
  159. width: 44.8vw;
  160. height: 7.2vh;
  161. line-height: 7.2vh;
  162. display: inline-block;
  163. text-align: center;
  164. font-size: 32px;
  165. font-family: Source Han Sans CN;
  166. font-weight: 800;
  167. color: #FFFFFF;
  168. }
  169. .header-right{
  170. width: 27.6vw;
  171. height: 7.2vh;
  172. line-height: 7.2vh;
  173. display: inline-block;
  174. font-size: 20px;
  175. font-family: Source Han Sans CN;
  176. font-weight: 400;
  177. color: #FFFFFF;
  178. }
  179. .main{
  180. height: 90vh;
  181. margin-top: 1.8vh;
  182. }
  183. .main .main-box{
  184. display: inline-block;
  185. float: left;
  186. position: relative;
  187. }
  188. .main .main-box1{
  189. width: 29.7vw;
  190. height: 53vh;
  191. margin: 0 1vw;
  192. }
  193. .main .main-box1 .one{
  194. width: 100%;
  195. height: 49%;
  196. background-image: url(../images/screen-tem11/one.png);
  197. background-repeat: no-repeat;
  198. background-size: 100% 100%;
  199. margin-bottom: 2%;
  200. position: relative;
  201. }
  202. .main .main-box1 .two{
  203. width: 100%;
  204. height: 49%;
  205. background-image: url(../images/screen-tem11/one.png);
  206. background-repeat: no-repeat;
  207. background-size: 100% 100%;
  208. position: relative;
  209. }
  210. .main .main-box2{
  211. width: 36.4vw;
  212. height: 53vh;
  213. }
  214. .main .main-box2 .there{
  215. width: 100%;
  216. height: 22.5%;
  217. background-image: url(../images/screen-tem11/there.png);
  218. background-repeat: no-repeat;
  219. background-size: 100% 100%;
  220. margin-bottom: 2%;
  221. position: relative;
  222. }
  223. .main .main-box2 .fore{
  224. width: 100%;
  225. height: 75.5%;
  226. position: relative;
  227. /* background-image: url(../images/screen-tem11/one.png);
  228. background-repeat: no-repeat;
  229. background-size: 100% 100%; */
  230. }
  231. .main .main-box3{
  232. width: 29.7vw;
  233. height: 53vh;
  234. margin: 0 1vw;
  235. }
  236. .main .main-box3 .five{
  237. width: 100%;
  238. height: 49%;
  239. background-image: url(../images/screen-tem11/one.png);
  240. background-repeat: no-repeat;
  241. background-size: 100% 100%;
  242. margin-bottom: 2%;
  243. position: relative;
  244. }
  245. .main .main-box3 .six{
  246. width: 100%;
  247. height: 49%;
  248. background-image: url(../images/screen-tem11/one.png);
  249. background-repeat: no-repeat;
  250. background-size: 100% 100%;
  251. position: relative;
  252. }
  253. .main-box4{
  254. width: 23.7vw;
  255. height: 34.5vh;
  256. background-image: url(../images/screen-tem11/seven.png);
  257. background-repeat: no-repeat;
  258. background-size: 100% 100%;
  259. margin: 0 0.2vw 0 1vw;
  260. margin-top: 1.5vh;
  261. }
  262. .main-box5{
  263. width: 47.5vw;
  264. height: 34.5vh;
  265. background-image: url(../images/screen-tem11/eight.png);
  266. background-repeat: no-repeat;
  267. background-size: 100% 100%;
  268. margin-top: 1.5vh;
  269. }
  270. .main-box6{
  271. // width: 25.7vw;
  272. width: 26.3vw;
  273. height: 34.5vh;
  274. background-image: url(../images/screen-tem11/nine.png);
  275. background-repeat: no-repeat;
  276. background-size: 100% 100%;
  277. margin: 0 1vw 0 0.2vw;
  278. margin-top: 1.5vh;
  279. }
  280. </style>