BigScreen.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. },
  60. beforeDestroy () {
  61. clearInterval(this.timing)
  62. },
  63. methods: {
  64. showSetting () {
  65. this.$refs.setting.init()
  66. },
  67. timeFn () {
  68. this.timing = setInterval(() => {
  69. this.dateDay = formatTime(new Date(), 'HH: mm: ss')
  70. this.dateYear = formatTime(new Date(), 'yyyy-MM-dd')
  71. this.dateWeek = this.weekday[new Date().getDay()]
  72. }, 1000)
  73. },
  74. cancelLoading () {
  75. const timer = setTimeout(() => {
  76. this.loading = false
  77. clearTimeout(timer)
  78. }, 500)
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="less">
  84. .screen-page{
  85. width: 100vw;
  86. height: 100vh;
  87. background-color: #03050C;
  88. }
  89. .scale-wrap {
  90. color: #d3d6dd;
  91. width: 1920px;
  92. height: 1080px;
  93. overflow: hidden;
  94. // &.pageisScale {
  95. // position: absolute;
  96. // top: 50%;
  97. // left: 50%;
  98. // transform: translate(-50%, -50%);
  99. // transform-origin: left top;
  100. // }
  101. .bg {
  102. width: 100%;
  103. height: 100%;
  104. padding: 16px 16px 10px 16px;
  105. box-sizing: border-box;
  106. background-image: url("../assets/img/pageBg.png");
  107. background-size: cover;
  108. background-position: center center;
  109. }
  110. .host-body {
  111. height: 100%;
  112. .title_wrap {
  113. height: 60px;
  114. background-image: url("../assets/img/top.png");
  115. background-size: cover;
  116. background-position: center center;
  117. position: relative;
  118. margin-bottom: 4px;
  119. .guang {
  120. position: absolute;
  121. bottom: -26px;
  122. background-image: url("../assets/img/guang.png");
  123. background-position: 80px center;
  124. width: 100%;
  125. height: 56px;
  126. }
  127. .zuojuxing,
  128. .youjuxing {
  129. position: absolute;
  130. top: -2px;
  131. width: 140px;
  132. height: 6px;
  133. background-image: url("../assets/img/headers/juxing1.png");
  134. }
  135. .zuojuxing {
  136. left: 11%;
  137. }
  138. .youjuxing {
  139. right: 11%;
  140. transform: rotate(180deg);
  141. }
  142. .timers {
  143. position: absolute;
  144. right: 0;
  145. top: 30px;
  146. font-size: 18px;
  147. display: flex;
  148. align-items: center;
  149. .blq-icon-shezhi02 {
  150. cursor: pointer;
  151. }
  152. }
  153. }
  154. .title {
  155. position: relative;
  156. // width: 500px;
  157. text-align: center;
  158. background-size: cover;
  159. color: transparent;
  160. height: 60px;
  161. line-height: 46px;
  162. .title-text {
  163. font-size: 38px;
  164. font-weight: 900;
  165. letter-spacing: 6px;
  166. width: 100%;
  167. background: linear-gradient(92deg, #0072FF 0%, #00EAFF 48.8525390625%, #01AAFF 100%);
  168. -webkit-background-clip: text;
  169. -webkit-text-fill-color: transparent;
  170. }
  171. }
  172. }
  173. }
  174. .scale-wrap {
  175. .pagetab {
  176. position: absolute;
  177. top: -35px;
  178. display: flex;
  179. z-index: 1000;
  180. .item {
  181. width: 180px;
  182. height: 36px;
  183. border-radius: 18px;
  184. color: #ffffff;
  185. text-indent: 20px;
  186. line-height: 36px;
  187. font-size: 16px;
  188. margin-right: 20px;
  189. background: linear-gradient(to right, rgba(39, 180, 255, 0.5), rgba(76, 245, 255, 0.1));
  190. cursor: pointer;
  191. &:hover,&:active{
  192. color: #f1f1f1;
  193. background: linear-gradient(to right, rgba(39, 180, 255, 0.7), rgba(76, 245, 255, 0.3));
  194. }
  195. select{
  196. border:0;
  197. background:none;
  198. font-size: 16px;
  199. option{
  200. color: #333
  201. }
  202. }
  203. }
  204. .focus{
  205. transform: scale(1.1);
  206. border: 1px solid #00EAFF;
  207. box-shadow: 0 0 10px #00EAFF;
  208. color: #f1f1f1;
  209. background: linear-gradient(to right, rgba(39, 180, 255, 0.7), rgba(76, 245, 255, 0.3));
  210. }
  211. }
  212. }
  213. .setting {
  214. position: fixed;
  215. width: 100%;
  216. height: 100%;
  217. z-index: 999;
  218. top: 0;
  219. left: 0;
  220. .left_shu {
  221. color: #000;
  222. font-weight: 900;
  223. position: relative;
  224. text-indent: 10px;
  225. padding:16px 0 10px 0 ;
  226. &::before {
  227. display: block;
  228. content: " ";
  229. height: 16px;
  230. width: 4px;
  231. border-radius: 2px;
  232. background: #0072FF;
  233. position: absolute;
  234. left: 0px;
  235. }
  236. }
  237. }
  238. .settingShow {
  239. .setting_inner {
  240. animation: rtl-drawer-in .3s 1ms;
  241. }
  242. }
  243. .yh-setting-fade-enter-active {
  244. animation: yh-setting-fade-in .3s;
  245. }
  246. .yh-setting-fade-leave-active {
  247. animation: yh-setting-fade-out .3s;
  248. }
  249. @keyframes yh-setting-fade-in {
  250. 0% {
  251. opacity: 0;
  252. }
  253. 100% {
  254. opacity: 1;
  255. }
  256. }
  257. @keyframes yh-setting-fade-out {
  258. 0% {
  259. opacity: 1;
  260. }
  261. 100% {
  262. opacity: 0;
  263. }
  264. }
  265. @keyframes rtl-drawer-in {
  266. 0% {
  267. transform: translate(100%, 0)
  268. }
  269. 100% {
  270. -webkit-transform: translate(0, 0);
  271. transform: translate(0, 0)
  272. }
  273. }
  274. @keyframes rtl-drawer-out {
  275. 0% {
  276. transform: translate(0, 0)
  277. }
  278. 100% {
  279. transform: translate(100%, 0)
  280. }
  281. }
  282. </style>