index.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <div class="container-box" ref="editor">
  3. <div class="top">
  4. <div class="logo AICenter">
  5. <div class="title ml-36px ">
  6. 沽源县电子商务平台电子可视化平台
  7. </div>
  8. </div>
  9. <div class="tabsBox AICenter">
  10. <div class="tabs">
  11. <div
  12. :class="[`tab-item`, { cur: index === tabs.index }]"
  13. :key="item"
  14. @click="tabs.index = index"
  15. v-for="(item, index) in tabs.list"
  16. >
  17. {{ item }}
  18. </div>
  19. </div>
  20. </div>
  21. <div class="tipsBox">
  22. <div class="dateBox center AICenter">
  23. <div class="date font-size-22px">{{ dateBox.date }}</div>
  24. <div class="date font-size-22px">{{ dateBox.time }}</div>
  25. <div class="date font-size-22px">{{ dateBox.weekday }}</div>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="box">
  30. <slot>&nbsp;</slot>
  31. </div>
  32. <div :class="[`bg`, bgType]"></div>
  33. </div>
  34. </template>
  35. <script>
  36. import {screenSize} from '@/assets/js/utils'
  37. import dayjs from 'dayjs'
  38. export default {
  39. components: {},
  40. data() {
  41. return {
  42. tabs: {
  43. index: this.$props.tabIndex,
  44. list: [`商务平台交易统计`, `全县交易统计`, '电商平台分析'],
  45. },
  46. dateBox: {
  47. time: ``,
  48. date: ``,
  49. },
  50. }
  51. },
  52. props: {
  53. tabChange: {
  54. type: Function,
  55. default: undefined,
  56. },
  57. tabIndex: {
  58. type: Number,
  59. default: 0,
  60. },
  61. bgType: {
  62. type: String,
  63. default: `g-bg1`,
  64. },
  65. },
  66. watch: {
  67. 'tabs.index'(val) {
  68. this.tabChange && this.tabChange(val)
  69. },
  70. },
  71. computed: {},
  72. created() {
  73. this.$util.autoVueFn(
  74. [
  75. {
  76. time: 1000,
  77. fn: this.currentTime,
  78. },
  79. // {
  80. // time: 1000 * 900,
  81. // fn: this.currentWeather,
  82. // },
  83. ],
  84. this
  85. )
  86. },
  87. mounted() {
  88. screenSize(this.$refs.editor)
  89. },
  90. methods: {
  91. async currentTime() {
  92. const now = dayjs(Date.now());
  93. const weekArray = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  94. this.dateBox = {
  95. date: now.format('YYYY/MM/DD'),
  96. time: now.format('HH:mm:ss'),
  97. weekday: weekArray[now.day()]
  98. }
  99. },
  100. },
  101. }
  102. </script>
  103. <style lang="less" scoped>
  104. .container-box {
  105. width: 1920px;
  106. height: 1080px;
  107. transform-origin: 0 0 0;
  108. position: relative;
  109. color: #fff;
  110. .top {
  111. position: absolute;
  112. display: flex;
  113. width: 100%;
  114. height: 80px;
  115. z-index: 10;
  116. background-image: url("~@/assets/img/titile@2x.png");
  117. background-size: cover;
  118. .title {
  119. width: 550px;
  120. height: 48px;
  121. font-family: YouSheBiaoTiHei, sans-serif;
  122. font-size: 34px;
  123. background: linear-gradient(0deg, rgba(27, 146, 255, 1) 0%, rgba(255, 255, 255, 1) 50%);
  124. background-clip: text;
  125. -webkit-background-clip: text;
  126. -webkit-text-fill-color: transparent;
  127. line-height: 48px;
  128. text-align: left;
  129. font-style: normal;
  130. }
  131. .line {
  132. width: 0px;
  133. height: 41px;
  134. margin: 0 20px;
  135. border: 1px solid rgba(255, 255, 255, 0.3);
  136. }
  137. .tabs {
  138. font-size: 25px;
  139. text-align: center;
  140. display: flex;
  141. background-image: url('~@/assets/img2/综合总览/编组 9.png');
  142. background-repeat: no-repeat;
  143. background-position: center bottom;
  144. width: 766px;
  145. .tab-item {
  146. line-height: 56px;
  147. //margin-right: 32px;
  148. padding: 0 30px;
  149. font-family: YouSheBiaoTiHei;
  150. font-size: 28px;
  151. color: #FFFFFF;
  152. text-shadow: 0px 2px 4px #004F4D;
  153. text-align: left;
  154. font-style: normal;
  155. position: relative;
  156. cursor: pointer;
  157. &.cur {
  158. color: rgba(255, 220, 81, 1);
  159. background-image: url("~@/assets/img/highlight.png");
  160. background-size: contain;
  161. background-repeat: no-repeat;
  162. background-position: center;
  163. }
  164. }
  165. }
  166. .tipsBox {
  167. display: flex;
  168. align-items: center;
  169. justify-content: flex-end;
  170. width: 100%;
  171. padding-right: 77px;
  172. .dateBox {
  173. .date {
  174. font-family: YouSheBiaoTiHei;
  175. font-size: 20px;
  176. color: #FFFFFF;
  177. line-height: 22px;
  178. text-align: right;
  179. font-style: normal;
  180. margin-right: 20px;
  181. }
  182. }
  183. .temperature {
  184. // img {
  185. // padding: 0 20px;
  186. // }
  187. }
  188. .headPortrait {
  189. width: 44px;
  190. height: 44px;
  191. border-radius: 50%;
  192. overflow: hidden;
  193. cursor: pointer;
  194. }
  195. }
  196. }
  197. .bg {
  198. pointer-events: none;
  199. }
  200. & > .box {
  201. transform-origin: 0 0 0;
  202. position: absolute;
  203. top: 90px;
  204. width: 100%;
  205. box-sizing: border-box;
  206. padding: 40px;
  207. left: 0;
  208. top: 0;
  209. padding: 0;
  210. z-index: 9;
  211. }
  212. }
  213. .AICenter {
  214. display: flex;
  215. align-items: center
  216. }
  217. </style>