BigScreen.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <div class="screen-page">
  3. <ScaleScreen
  4. :width="1920"
  5. :height="1080"
  6. class="scale-wrap"
  7. :selfAdaption="$store.state.setting.isScale"
  8. >
  9. <div class="bg">
  10. <dv-loading v-if="loading">Loading...</dv-loading>
  11. <div v-else class="host-body">
  12. <!-- 头部 s -->
  13. <div class="d-flex jc-center title_wrap">
  14. <div class="zuojuxing"></div>
  15. <div class="youjuxing"></div>
  16. <div class="guang"></div>
  17. <div class="d-flex jc-center">
  18. <div class="title">
  19. <span class="title-text">{{ $route.meta.title }}</span>
  20. </div>
  21. </div>
  22. <div class="timers">
  23. {{ dateYear }} {{ dateWeek }} {{ dateDay }}
  24. </div>
  25. </div>
  26. <!-- 内容 s-->
  27. <router-view :key="$route.name"></router-view>
  28. <!-- 内容 e -->
  29. </div>
  30. </div>
  31. </ScaleScreen>
  32. </div>
  33. </template>
  34. <script>
  35. import { formatTime } from '../utils/util.js'
  36. import ScaleScreen from '@/bigScreenComponents/scale-screen/scale-screen.vue'
  37. export default {
  38. components: { ScaleScreen },
  39. data () {
  40. return {
  41. timing: null,
  42. loading: true,
  43. dateDay: null,
  44. dateYear: null,
  45. dateWeek: null,
  46. weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
  47. }
  48. },
  49. filters: {
  50. numsFilter (msg) {
  51. return msg || 0
  52. }
  53. },
  54. computed: {},
  55. created () {},
  56. mounted () {
  57. this.timeFn()
  58. this.cancelLoading()
  59. console.log(this.$route.meta.title)
  60. },
  61. beforeDestroy () {
  62. clearInterval(this.timing)
  63. },
  64. methods: {
  65. showSetting () {
  66. this.$refs.setting.init()
  67. },
  68. timeFn () {
  69. this.timing = setInterval(() => {
  70. this.dateDay = formatTime(new Date(), 'HH: mm: ss')
  71. this.dateYear = formatTime(new Date(), 'yyyy-MM-dd')
  72. this.dateWeek = this.weekday[new Date().getDay()]
  73. }, 1000)
  74. },
  75. cancelLoading () {
  76. const timer = setTimeout(() => {
  77. this.loading = false
  78. clearTimeout(timer)
  79. }, 500)
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="less">
  85. .screen-page{
  86. width: 100vw;
  87. height: 100vh;
  88. background-color: #03050C;
  89. }
  90. .scale-wrap {
  91. color: #d3d6dd;
  92. width: 1920px;
  93. height: 1080px;
  94. overflow: hidden;
  95. // &.pageisScale {
  96. // position: absolute;
  97. // top: 50%;
  98. // left: 50%;
  99. // transform: translate(-50%, -50%);
  100. // transform-origin: left top;
  101. // }
  102. .bg {
  103. width: 100%;
  104. height: 100%;
  105. padding: 16px 16px 10px 16px;
  106. box-sizing: border-box;
  107. background-image: url("../assets/img/pageBg.png");
  108. background-size: cover;
  109. background-position: center center;
  110. }
  111. .host-body {
  112. height: 100%;
  113. .title_wrap {
  114. height: 60px;
  115. background-image: url("../assets/img/top.png");
  116. background-size: cover;
  117. background-position: center center;
  118. position: relative;
  119. margin-bottom: 4px;
  120. .guang {
  121. position: absolute;
  122. bottom: -26px;
  123. background-image: url("../assets/img/guang.png");
  124. background-position: 80px center;
  125. width: 100%;
  126. height: 56px;
  127. }
  128. .zuojuxing,
  129. .youjuxing {
  130. position: absolute;
  131. top: -2px;
  132. width: 140px;
  133. height: 6px;
  134. background-image: url("../assets/img/headers/juxing1.png");
  135. }
  136. .zuojuxing {
  137. left: 11%;
  138. }
  139. .youjuxing {
  140. right: 11%;
  141. transform: rotate(180deg);
  142. }
  143. .timers {
  144. position: absolute;
  145. right: 0;
  146. top: 30px;
  147. font-size: 18px;
  148. display: flex;
  149. align-items: center;
  150. .blq-icon-shezhi02 {
  151. cursor: pointer;
  152. }
  153. }
  154. }
  155. .title {
  156. position: relative;
  157. // width: 500px;
  158. text-align: center;
  159. background-size: cover;
  160. color: transparent;
  161. height: 60px;
  162. line-height: 46px;
  163. .title-text {
  164. font-size: 38px;
  165. font-weight: 900;
  166. letter-spacing: 6px;
  167. width: 100%;
  168. background: linear-gradient(92deg, #0072FF 0%, #00EAFF 48.8525390625%, #01AAFF 100%);
  169. -webkit-background-clip: text;
  170. -webkit-text-fill-color: transparent;
  171. }
  172. }
  173. }
  174. }
  175. .scale-wrap {
  176. .pagetab {
  177. position: absolute;
  178. top: -35px;
  179. display: flex;
  180. z-index: 1000;
  181. .item {
  182. width: 180px;
  183. height: 36px;
  184. border-radius: 18px;
  185. color: #ffffff;
  186. text-indent: 20px;
  187. line-height: 36px;
  188. font-size: 16px;
  189. margin-right: 20px;
  190. background: linear-gradient(to right, rgba(39, 180, 255, 0.5), rgba(76, 245, 255, 0.1));
  191. cursor: pointer;
  192. &:hover,&:active{
  193. color: #f1f1f1;
  194. background: linear-gradient(to right, rgba(39, 180, 255, 0.7), rgba(76, 245, 255, 0.3));
  195. }
  196. }
  197. .focus{
  198. transform: scale(1.1);
  199. border: 1px solid #00EAFF;
  200. box-shadow: 0 0 10px #00EAFF;
  201. color: #f1f1f1;
  202. background: linear-gradient(to right, rgba(39, 180, 255, 0.7), rgba(76, 245, 255, 0.3));
  203. }
  204. }
  205. }
  206. .setting {
  207. position: fixed;
  208. width: 100%;
  209. height: 100%;
  210. z-index: 999;
  211. top: 0;
  212. left: 0;
  213. .left_shu {
  214. color: #000;
  215. font-weight: 900;
  216. position: relative;
  217. text-indent: 10px;
  218. padding:16px 0 10px 0 ;
  219. &::before {
  220. display: block;
  221. content: " ";
  222. height: 16px;
  223. width: 4px;
  224. border-radius: 2px;
  225. background: #0072FF;
  226. position: absolute;
  227. left: 0px;
  228. }
  229. }
  230. }
  231. .settingShow {
  232. .setting_inner {
  233. animation: rtl-drawer-in .3s 1ms;
  234. }
  235. }
  236. .yh-setting-fade-enter-active {
  237. animation: yh-setting-fade-in .3s;
  238. }
  239. .yh-setting-fade-leave-active {
  240. animation: yh-setting-fade-out .3s;
  241. }
  242. @keyframes yh-setting-fade-in {
  243. 0% {
  244. opacity: 0;
  245. }
  246. 100% {
  247. opacity: 1;
  248. }
  249. }
  250. @keyframes yh-setting-fade-out {
  251. 0% {
  252. opacity: 1;
  253. }
  254. 100% {
  255. opacity: 0;
  256. }
  257. }
  258. @keyframes rtl-drawer-in {
  259. 0% {
  260. transform: translate(100%, 0)
  261. }
  262. 100% {
  263. -webkit-transform: translate(0, 0);
  264. transform: translate(0, 0)
  265. }
  266. }
  267. @keyframes rtl-drawer-out {
  268. 0% {
  269. transform: translate(0, 0)
  270. }
  271. 100% {
  272. transform: translate(100%, 0)
  273. }
  274. }
  275. </style>