main.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <template>
  2. <div class="big-screen">
  3. <scale-box>
  4. <div class="main-wrapper">
  5. <div class="header-area">
  6. <div class="left">
  7. <div class="modelTime" >
  8. <div>{{timeString}}</div>
  9. <div>{{timeDay}}</div>
  10. </div>
  11. <div
  12. :class="['model', 0== curIndex ? 'cur' : '']"
  13. @click="chooseTab(0, 'service')"
  14. >
  15. 服务保障中心
  16. </div>
  17. <div
  18. :class="['model', 1== curIndex ? 'cur' : '']"
  19. @click="chooseTab(1, 'logistics')"
  20. >
  21. 后勤资源监控
  22. </div>
  23. </div>
  24. <div class="mid" @dblclick="fullScreen"></div>
  25. <div class="right">
  26. <div
  27. :class="['model', 2== curIndex ? 'cur' : '']"
  28. @click="chooseTab(2, 'building')"
  29. >
  30. 楼宇运行监控
  31. </div>
  32. <div
  33. :class="['model', 3 == curIndex ? 'cur' : '']"
  34. @click="chooseTab(3, 'engineering')"
  35. >
  36. 工程现场监控
  37. </div>
  38. <div
  39. :class="['model',4 == curIndex ? 'cur' : '']"
  40. @click="chooseTab(4, 'official')"
  41. >
  42. 公务用车监控
  43. </div>
  44. </div>
  45. </div>
  46. <!-- 服务保障 -->
  47. <main-main v-if="showTab === 'main'"></main-main>
  48. <!-- 服务保障 -->
  49. <service-main v-if="showTab === 'service'"></service-main>
  50. <!-- 楼宇 -->
  51. <building-main v-else-if="showTab === 'building'"></building-main>
  52. <!-- 公务用车 -->
  53. <official-main v-else-if="showTab === 'official'"></official-main>
  54. <!-- 后勤资产 -->
  55. <logistics-main
  56. v-else-if="showTab === 'logistics'"
  57. @showTabs="showTabs"
  58. ></logistics-main>
  59. <!-- 工程监控 -->
  60. <engineering-main
  61. v-else-if="showTab === 'engineering'"
  62. ></engineering-main>
  63. <!-- 视频背景 -->
  64. <div class="map-bg">
  65. <video autoplay muted loop class="background-video">
  66. <source :src="require('@/assets/images/main/live.mp4')" type="video/mp4" />
  67. Your browser does not support the video tag.
  68. </video>
  69. </div>
  70. <div class="map-mask"></div>
  71. </div>
  72. </scale-box>
  73. </div>
  74. </template>
  75. <script>
  76. import ScaleBox from "./scaleBox.vue";
  77. import MainMain from "./main/main.vue";
  78. import ServiceMain from "./service/main.vue";
  79. import BuildingMain from "./building/main.vue";
  80. import OfficialMain from "./official/main.vue";
  81. import LogisticsMain from "./logistics/main.vue";
  82. import EngineeringMain from "./engineering/main.vue";
  83. export default {
  84. name: "Screen",
  85. components: {
  86. ScaleBox,
  87. MainMain,
  88. ServiceMain,
  89. BuildingMain,
  90. OfficialMain,
  91. LogisticsMain,
  92. EngineeringMain,
  93. },
  94. data() {
  95. return {
  96. curIndex: 0,
  97. showTab: "service",
  98. currentTime: new Date(),
  99. tabs: [
  100. {
  101. name: "服务保障中心",
  102. tab: "service",
  103. },
  104. {
  105. name: "后勤资源监控",
  106. tab: "logistics",
  107. },
  108. {
  109. name: "楼宇运行监控",
  110. tab: "building",
  111. },
  112. {
  113. name: "工程现场监控",
  114. tab: "engineering",
  115. },
  116. {
  117. name: "公务用车监控",
  118. tab: "official",
  119. },
  120. ],
  121. };
  122. },
  123. computed: {
  124. timeString() {
  125. const year = this.currentTime.getFullYear();
  126. const month = String(this.currentTime.getMonth() + 1).padStart(2, '0');
  127. const day = String(this.currentTime.getDate()).padStart(2, '0');
  128. return `${year}-${month}-${day}`;
  129. },
  130. timeDay(){
  131. const weekdays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  132. const weekday = weekdays[this.currentTime.getDay()];
  133. const hours = String(this.currentTime.getHours()).padStart(2, '0');
  134. const minutes = String(this.currentTime.getMinutes()).padStart(2, '0');
  135. const seconds = String(this.currentTime.getSeconds()).padStart(2, '0');
  136. return `${weekday} ${hours}:${minutes}:${seconds}`;
  137. }
  138. },
  139. mounted() {
  140. this.updateTime();
  141. setInterval(this.updateTime, 1000);
  142. },
  143. created() {
  144. document.documentElement.requestFullscreen();
  145. },
  146. methods: {
  147. fullScreen(){
  148. document.documentElement.requestFullscreen();
  149. },
  150. updateTime() {
  151. this.currentTime = new Date();
  152. },
  153. //切换菜单
  154. chooseTab(index) {
  155. this.curIndex = index;
  156. this.showTab = this.tabs[index].tab;
  157. },
  158. //选择显示公务用车
  159. showTabs() {
  160. this.curIndex = 5;
  161. this.showTab = this.tabs[5].tab;
  162. },
  163. },
  164. };
  165. </script>
  166. <style rel="stylesheet/scss" lang="scss">
  167. @font-face {
  168. font-family: "electronicFont";
  169. src: url("../../assets/fonts/DS-DIGIT.ttf");
  170. }
  171. @font-face {
  172. font-family: "fashionZh";
  173. src: url("../../assets/fonts/PingFang.ttf");
  174. }
  175. @font-face {
  176. font-family: "PingFangSC";
  177. src: url("../../assets/fonts/PingFang.ttf");
  178. }
  179. .el-picker-panel{
  180. color: #00F6EC;
  181. }
  182. .el-date-table td.available:hover{
  183. color: #06131f;
  184. }
  185. /*面板上方按钮*/
  186. .el-picker-panel__icon-btn{
  187. color: #00F6EC;
  188. }
  189. .el-picker-panel__icon-btn:hover{
  190. color: #06131f;
  191. }
  192. /*面板上方显示日期*/
  193. .el-date-picker__header-label{
  194. color: #00F6EC;
  195. }
  196. .el-date-picker__header-label:hover {
  197. color: #06131f;
  198. }
  199. /*周一至周日文字及下划线*/
  200. .el-date-table th{
  201. color: #00F6EC;
  202. border-bottom: solid 1px #00F6EC;
  203. }
  204. /*面板背景色*/
  205. .el-picker-panel.el-date-picker {
  206. background-color: rgba(53, 141, 141, 0.59);
  207. }
  208. /*选中日期颜色*/
  209. .el-date-table td.current:not(.disabled) span{
  210. background-color: #00F6EC;
  211. }
  212. .popper__arrow{
  213. border-bottom-color: #00F6EC !important;
  214. }
  215. .popper__arrow::after {
  216. border-bottom-color: rgba(53, 141, 141, 0.59) !important;
  217. }
  218. .big-screen {
  219. width: 100%;
  220. height: 100vh;
  221. overflow: hidden;
  222. position: relative;
  223. background-image: url("../../assets/images/main/main_bg.jpg");
  224. background-size: cover;
  225. .main-wrapper {
  226. width: 1920px;
  227. height: 1080px;
  228. margin: 0 auto;
  229. position: relative;
  230. .header-area {
  231. position: fixed;
  232. width: 100%;
  233. height: 93px;
  234. padding: 6px 15px 0 15px;
  235. display: flex;
  236. flex-direction: row;
  237. align-items: flex-start;
  238. justify-content: space-between;
  239. color: #fff;
  240. z-index: 10;
  241. .left,
  242. .right {
  243. display: flex;
  244. align-items: center;
  245. .model {
  246. margin-right: 15px;
  247. width: 130px;
  248. height: 45px;
  249. line-height: 45px;
  250. text-align: center;
  251. font-family: "PingFangSc";
  252. font-size: 18px;
  253. font-weight: bold;
  254. background: url("../../assets/images/main/menu_bg.png") no-repeat;
  255. background-size: 100% 100%;
  256. color: #ffffff;
  257. cursor: pointer;
  258. }
  259. .modelTime {
  260. margin-right: 15px;
  261. width: 130px;
  262. height: 45px;
  263. text-align: center;
  264. font-family: "PingFangSc";
  265. font-size: 12px;
  266. padding-top: 5px;
  267. font-weight: bold;
  268. background: url("../../assets/images/main/menu_bg.png") no-repeat;
  269. background-size: 100% 100%;
  270. color: #ffffff;
  271. cursor: pointer;
  272. }
  273. .model:last-child {
  274. margin-right: 0;
  275. }
  276. .cur {
  277. background: url("../../assets/images/main/menu_chooe.png") no-repeat;
  278. }
  279. }
  280. .mid{
  281. display: flex;
  282. width: 700px;
  283. height: 80px;
  284. }
  285. .middle {
  286. flex: 1;
  287. padding: 0 50px;
  288. display: flex;
  289. flex-direction: row;
  290. align-items: center;
  291. justify-content: space-between;
  292. font-size: 22px;
  293. font-weight: 500;
  294. font-family: HarmonyOS Sans SC;
  295. }
  296. }
  297. }
  298. .el-popper {
  299. border: 1px solid #00ffff;
  300. .el-cascader-node:hover,
  301. .el-cascader-node:visited {
  302. background: #15696b !important;
  303. }
  304. .el-cascader-menu {
  305. background: #15696b !important;
  306. color: #fff !important;
  307. border-right: solid 1px #00ffff !important;
  308. }
  309. .el-cascader-node.in-active-path,
  310. .el-cascader-node.is-selectable.in-checked-path,
  311. .el-cascader-node.is-active {
  312. color: #00ffff;
  313. background: #15696b !important;
  314. }
  315. .el-cascader-node__label {
  316. font-size: 12px;
  317. }
  318. .el-cascader-node {
  319. padding: 0 20px 0 0 !important;
  320. }
  321. .el-cascader-node__prefix {
  322. display: none !important;
  323. }
  324. .el-popper .el-cascader-node {
  325. height: 28px !important;
  326. line-height: 28px !important;
  327. }
  328. .el-cascader-node {
  329. height: 28px !important;
  330. line-height: 28px !important;
  331. }
  332. .el-cascader-menu__wrap {
  333. height: 250px !important;
  334. }
  335. }
  336. ::-webkit-scrollbar {
  337. width: 3px;
  338. height: 3px;
  339. }
  340. ::-webkit-scrollbar-thumb {
  341. //滑块部分
  342. // border-radius: 5px;
  343. background-color: #58cbbb;
  344. }
  345. ::-webkit-scrollbar-track {
  346. //轨道部分
  347. // box-shadow: inset 0 0 5px #ddd;
  348. background: #ddd;
  349. // border-radius: 5px;
  350. }
  351. .building-dialog-area, .dialog-area, .unit-dialog-area, .assets-cate-dialog, .assets-change-dialog, .assets-stock-dialog, .code-bill-dialog, .dialog-project-schedule, .main-house-item-dialog, .main-official-car-dialog, .main-project-item-dialog, .car-warning-dialog-area, .terminal-dialog-area, .dialog-basic-area, .dialog-canteen-area, .employee-health-dialog-area, .employee-profile-dialog-area, .dialog-property-area, .share-station-dialog-area {
  352. background-color: rgba(2, 26, 26, 0.8) !important;
  353. }
  354. .data-main{
  355. position: relative;
  356. z-index:3;
  357. }
  358. .main-data{
  359. position: relative;
  360. z-index:3;
  361. }
  362. .map-bg{
  363. position: absolute;
  364. top: 93px;
  365. width: 100%;
  366. height: calc(100% - 93px);
  367. // background-image: url("../../assets/images/main/map_bg2.gif");
  368. // background-size: 100% 100%;
  369. z-index: 1;
  370. .background-video {
  371. position: absolute;
  372. top: 50%;
  373. left: 50%;
  374. width: 100%;
  375. height: 100%;
  376. object-fit: cover; /* 确保视频覆盖整个背景 */
  377. transform: translate(-50%, -50%);
  378. z-index: 1; /* 视频置于底层 */
  379. }
  380. }
  381. .map-mask{
  382. position: absolute;
  383. top: 93px;
  384. width: 100%;
  385. height: calc(100% - 93px);
  386. background-image: url("../../assets/images/main/map_mask2.png");
  387. background-size: cover;
  388. z-index: 2;
  389. }
  390. //共用样式
  391. .title-area {
  392. height: 52px;
  393. line-height: 52px;
  394. font-family: "PingFangSC" !important;
  395. font-size: 20px;
  396. font-weight: 900;
  397. padding-left: 30px;
  398. color: #62ffe5;
  399. text-shadow: 0px 2px 24px #00b7ff;
  400. }
  401. .dialog-title {
  402. font-family: "PingFangSC" !important;
  403. font-size: 20px;
  404. font-weight: 900;
  405. }
  406. /**公共flex方法**/
  407. .flex-row {
  408. display: flex !important;
  409. flex-direction: row !important;
  410. }
  411. .flex-column {
  412. display: flex !important;
  413. flex-direction: column !important;
  414. }
  415. .flex-start {
  416. justify-content: flex-start !important;
  417. }
  418. .flex-end {
  419. justify-content: flex-end !important;
  420. }
  421. .flex-center {
  422. justify-content: center !important;
  423. }
  424. .flex-wrap {
  425. flex-wrap: wrap !important;
  426. }
  427. .flex-nowrap {
  428. flex-wrap: nowrap !important;
  429. }
  430. .space-between {
  431. justify-content: space-between !important;
  432. }
  433. .space-around {
  434. justify-content: space-around !important;
  435. }
  436. .align-items-center {
  437. align-items: center !important;
  438. }
  439. .align-self-center {
  440. align-self: center !important;
  441. }
  442. .align-items-end {
  443. align-items: flex-end !important;
  444. }
  445. .align-items-start {
  446. align-items: flex-start !important;
  447. }
  448. .align-items-base {
  449. align-items: baseline !important;
  450. }
  451. }
  452. .content-area {
  453. padding-top: 20px !important;
  454. }
  455. .dialog-cont {
  456. padding-top: 20px !important;
  457. }
  458. .content-left,
  459. .content-right {
  460. width: calc(50% - 20px);
  461. }
  462. </style>