BigScreen.vue 7.2 KB

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