index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <div class="main" :style="{ 'background-image': 'url(' + roomInfo.bg + ')' }">
  3. <!-- <img :src="roomData[0].bg" class="video-image" /> -->
  4. <!-- <img class="video-image" src="roomInfo.bg"></div> -->
  5. <!-- <div class="video-image" :style="{ background: roomInfo.modeBg }"></div>
  6. -->
  7. <video
  8. class="video-image"
  9. :autoplay="true"
  10. :muted="true"
  11. :loop="true"
  12. :preload="true"
  13. :controls="false"
  14. :poster="roomInfo.bg"
  15. :src="roomInfo.video"
  16. ></video>
  17. <div class="video-model"></div>
  18. <div class="content">
  19. <div class="metting-info">
  20. <img class="logo" :src="roomInfo.logo" />
  21. <div class="name">{{ roomInfo.name }}</div>
  22. <div class="location">{{ roomInfo.location }}</div>
  23. </div>
  24. <div class="mode-box">
  25. <div class="item" :class="modeType == 1 ? 'active' : ''" @click="checkModel(1)">
  26. <img
  27. :src="
  28. parseImgUrl(
  29. 'taiguv1/envmonitor',
  30. modeType == 1 ? 'active/meeting.svg' : 'meeting.svg'
  31. )
  32. "
  33. alt=""
  34. />
  35. <span>讨论</span>
  36. </div>
  37. <div class="item" :class="modeType == 2 ? 'active' : ''" @click="checkModel(2)">
  38. <img
  39. :src="
  40. parseImgUrl(
  41. 'taiguv1/envmonitor',
  42. modeType == 2 ? 'active/projector.svg' : 'projector.svg'
  43. )
  44. "
  45. alt=""
  46. />
  47. <span>投影</span>
  48. </div>
  49. <div class="item" :class="modeType == 3 ? 'active' : ''" @click="checkModel(3)">
  50. <img
  51. :src="
  52. parseImgUrl(
  53. 'taiguv1/envmonitor',
  54. modeType == 3 ? 'active/stop.svg' : 'stop.svg'
  55. )
  56. "
  57. alt=""
  58. />
  59. <span>散会</span>
  60. </div>
  61. </div>
  62. <div class="env-box">
  63. <img class="box-line" :src="boxLine" />
  64. <div class="env-info">
  65. <div class="item">
  66. <div class="title">温度</div>
  67. <div class="num-box">
  68. <span>26</span>
  69. <span>℃</span>
  70. </div>
  71. </div>
  72. <div class="item">
  73. <div class="title">CO2</div>
  74. <div class="num-box">
  75. <span>410</span>
  76. <span>优</span>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="line"></div>
  81. <div class="env-info">
  82. <div class="item">
  83. <div class="title">湿度</div>
  84. <div class="num-box">
  85. <span>42</span>
  86. <span>%</span>
  87. </div>
  88. </div>
  89. <div class="item">
  90. <div class="title">TVOC</div>
  91. <div class="num-box">
  92. <span>0.5</span>
  93. <span>健康</span>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="line"></div>
  98. <div class="env-info">
  99. <div class="item">
  100. <div class="title">PM 2.5</div>
  101. <div class="num-box">
  102. <span>17</span>
  103. <span>优</span>
  104. </div>
  105. </div>
  106. <div class="item">
  107. <div class="title">甲醛</div>
  108. <div class="num-box">
  109. <span>0.04</span>
  110. <span>健康</span>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="fotter" :class="airStatus ? 'small' : 'fotter'">
  117. <div class="box">
  118. <Screen :modeType="modeType"></Screen>
  119. </div>
  120. <!--空调-->
  121. <div class="box">
  122. <Volumn></Volumn>
  123. </div>
  124. <div class="box">
  125. <Lamp @showMore="showMore"></Lamp>
  126. </div>
  127. <div class="box air-box">
  128. <Air @getStatus="getStatus"></Air>
  129. </div>
  130. <div class="box">
  131. <Curtain></Curtain>
  132. </div>
  133. </div>
  134. <van-popup
  135. v-model:show="isLightColorFlag"
  136. position="right"
  137. :close-on-click-overlay="true"
  138. class="taigu-popup"
  139. teleport="#app"
  140. >
  141. <div>
  142. <LightMore></LightMore>
  143. </div>
  144. </van-popup>
  145. </div>
  146. </template>
  147. <script>
  148. import { defineComponent, reactive, toRefs, onMounted, onBeforeUnmount } from "vue";
  149. import { useRoute } from "vue-router";
  150. import Air from "./components/Air/index.vue";
  151. import Screen from "./components/Screen/index.vue";
  152. import Volumn from "./components/Volumn/index.vue";
  153. import Lamp from "./components/Lamp/index.vue";
  154. import Curtain from "./components/Curtain/index.vue";
  155. import LightMore from "./components/Lamp/LightMore.vue";
  156. import { parseImgUrl } from "@/utils";
  157. // import "vue3-video-play/dist/style.css";
  158. import { videoPlay } from "vue-video-play";
  159. export default defineComponent({
  160. components: {
  161. Screen,
  162. Volumn,
  163. Lamp,
  164. Air,
  165. Curtain,
  166. LightMore,
  167. videoPlay,
  168. },
  169. setup() {
  170. const proxyData = reactive({
  171. parseImgUrl: parseImgUrl,
  172. boxLine: require("@/assets/taiguv1/svg/box_line.png"),
  173. roomData: [
  174. {
  175. id: "room1",
  176. name: "ROOM EOS",
  177. modeBg:
  178. "linear-gradient(113.73deg, rgba(47, 36, 28, 0.4) 17.26%, rgba(47, 36, 28, 0.8) 55.71%)",
  179. bg:
  180. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room1.png",
  181. video:
  182. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room_video1.mov",
  183. },
  184. {
  185. id: "room2",
  186. name: "ROOM METIS",
  187. modeBg:
  188. "linear-gradient(113.73deg, rgba(37, 21, 8, 0.4) 17.26%, rgba(37, 21, 8, 0.8) 55.71%)",
  189. bg:
  190. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room2.png",
  191. video:
  192. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room_video2.mp4",
  193. },
  194. {
  195. id: "room3",
  196. name: "ROOM NAIAD",
  197. modeBg:
  198. "linear-gradient(113.73deg, rgba(8, 14, 37, 0.4) 17.26%, rgba(10, 15, 33, 0.9) 55.71%)",
  199. bg:
  200. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room3.png",
  201. video:
  202. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room_video3.mov",
  203. },
  204. {
  205. id: "room4",
  206. name: "ROOM HELIOS",
  207. modeBg:
  208. "linear-gradient(113.73deg, rgba(32, 5, 5, 0.4) 17.26%, rgba(28, 7, 7, 0.8) 55.71%)",
  209. bg:
  210. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room4.png",
  211. video:
  212. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room_video4.mp4",
  213. },
  214. {
  215. id: "room5",
  216. name: "ROOM GAIA",
  217. modeBg:
  218. "linear-gradient(113.73deg, rgba(21, 32, 26, 0.5) 17.26%, rgba(14, 30, 21, 0.8) 55.71%)",
  219. bg:
  220. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room5.png",
  221. video:
  222. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room_video5.mp4",
  223. },
  224. {
  225. id: "room6",
  226. name: "ROOM AURA",
  227. modeBg:
  228. "linear-gradient(113.73deg, rgba(4, 18, 32, 0.5) 17.26%, rgba(6, 18, 32, 0.8) 55.71%)",
  229. bg:
  230. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room6.png",
  231. video:
  232. "https://reserv-h5.tenants.link/static/WeChat/page-taiguv1/page-pad/pad_room_video6.mov",
  233. },
  234. ],
  235. roomInfo: "",
  236. modeType: 1,
  237. checkModel(type) {
  238. proxyData.modeType = type;
  239. },
  240. airStatus: false,
  241. getStatus(flag) {
  242. proxyData.airStatus = flag;
  243. },
  244. isLightColorFlag: false,
  245. lightData: [],
  246. showMore(lightData) {
  247. proxyData.isLightColorFlag = true;
  248. },
  249. });
  250. onBeforeUnmount(() => {});
  251. onMounted(() => {
  252. let route = useRoute();
  253. let roomId = route.query.id;
  254. proxyData.roomInfo = proxyData.roomData[0];
  255. proxyData.roomData.map((item) => {
  256. if (item.id == roomId) {
  257. proxyData.roomInfo = item;
  258. }
  259. });
  260. proxyData.roomInfo.logo = require("@/assets/taiguv1/svg/meting_icon.svg");
  261. proxyData.roomInfo.location = "3F";
  262. });
  263. return {
  264. ...toRefs(proxyData),
  265. };
  266. },
  267. });
  268. </script>
  269. <style lang="scss">
  270. .main {
  271. position: relative;
  272. width: 100%;
  273. height: 100%;
  274. overflow: hidden;
  275. // width: 900px;
  276. // height: 600px;
  277. background-size: 100% 100%;
  278. // mask-image: linear-gradient(
  279. // 113.73deg,
  280. // rgba(47, 36, 28, 0.4) 17.26%,
  281. // rgba(47, 36, 28, 0.8) 55.71%
  282. // );
  283. .video-image {
  284. position: absolute;
  285. left: 50%;
  286. top: 50%;
  287. transform: translate(-50%, -50%);
  288. // width: 1020px;
  289. // height: auto;
  290. // height: 100%;
  291. width: 110%;
  292. height: auto;
  293. }
  294. .video-model {
  295. position: absolute;
  296. left: 0;
  297. top: 0;
  298. right: 0;
  299. bottom: 0;
  300. width: 100%;
  301. height: 100%;
  302. background: linear-gradient(
  303. 113.73deg,
  304. rgba(47, 36, 28, 0.4) 17.26%,
  305. rgba(47, 36, 28, 0.8) 55.71%
  306. );
  307. }
  308. .content {
  309. position: relative;
  310. }
  311. .metting-info {
  312. padding-left: 40px;
  313. padding-top: 6vh;
  314. display: flex;
  315. align-items: center;
  316. .logo {
  317. width: 40px;
  318. height: 40px;
  319. margin-right: 9px;
  320. }
  321. .name {
  322. font-family: Jost;
  323. font-size: 40px;
  324. font-weight: 300;
  325. line-height: 57.8px;
  326. letter-spacing: 0.02em;
  327. color: #fff;
  328. text-align: left;
  329. margin-right: 8px;
  330. }
  331. .location {
  332. //styleName: En/H3;
  333. font-family: Jost;
  334. font-size: 20px;
  335. font-weight: 300;
  336. line-height: 29px;
  337. color: #fff;
  338. margin-top: 15px;
  339. }
  340. }
  341. .env-box {
  342. position: absolute;
  343. box-sizing: border-box;
  344. width: 360px;
  345. // height: 268px;
  346. top: 6vh;
  347. // left: 550px;
  348. right: 50px;
  349. padding: 8px 56px;
  350. border-radius: 24px 160px 24px 24px;
  351. background: rgba(255, 255, 255, 0.2);
  352. backdrop-filter: blur(20px);
  353. box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.2);
  354. .box-line {
  355. position: absolute;
  356. top: -10px;
  357. left: -8px;
  358. width: 360px;
  359. height: 100%;
  360. // height: 268px;
  361. }
  362. .line {
  363. width: 244px;
  364. height: 1px;
  365. background: rgba(255, 255, 255, 0.2);
  366. }
  367. .env-info {
  368. display: flex;
  369. justify-content: space-between;
  370. align-items: center;
  371. padding: 14px 0;
  372. // border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  373. .item {
  374. width: 120px;
  375. .title {
  376. //styleName: Chi/Body XS;
  377. font-family: PingFang SC;
  378. font-size: 11px;
  379. font-weight: 400;
  380. line-height: 15px;
  381. letter-spacing: 0.02em;
  382. padding-bottom: 5px;
  383. color: rgba(228, 228, 228, 1);
  384. }
  385. .num-box {
  386. span {
  387. //styleName: En/H1;
  388. display: inline-block;
  389. padding-right: 4px;
  390. color: #fff;
  391. &:nth-child(1) {
  392. font-family: Jost;
  393. font-size: 36px;
  394. font-weight: 300;
  395. line-height: 36px;
  396. }
  397. &:nth-child(2) {
  398. font-family: Jost;
  399. font-size: 12px;
  400. font-weight: 400;
  401. // line-height: 17px;
  402. }
  403. }
  404. }
  405. }
  406. }
  407. }
  408. .mode-box {
  409. margin-left: 40px;
  410. margin-top: 32vh;
  411. display: flex;
  412. align-items: center;
  413. .item {
  414. display: flex;
  415. align-items: center;
  416. box-sizing: border-box;
  417. width: 77px;
  418. height: 40px;
  419. padding: 8px 12px 8px 12px;
  420. border-radius: 60px;
  421. background: rgba(255, 255, 255, 0.2);
  422. backdrop-filter: blur(20px);
  423. margin-right: 4px;
  424. img {
  425. widows: 24px;
  426. height: 24px;
  427. margin-right: 4px;
  428. }
  429. span {
  430. //styleName: Chi/Body Small;
  431. font-family: PingFang SC;
  432. font-size: 12px;
  433. font-weight: 400;
  434. line-height: 16px;
  435. letter-spacing: 0.02em;
  436. color: rgba(255, 255, 255, 0.6);
  437. }
  438. }
  439. .active {
  440. background: rgba(255, 255, 255, 0.8);
  441. span {
  442. color: rgba(0, 20, 40, 1);
  443. }
  444. }
  445. }
  446. .fotter {
  447. position: fixed;
  448. box-sizing: border-box;
  449. padding: 16px;
  450. // height: 264px;
  451. left: 0;
  452. bottom: 0;
  453. width: 100%;
  454. // overflow-x: scroll;
  455. border-radius: 24px;
  456. backdrop-filter: blur(20px);
  457. background: rgba(255, 255, 255, 0.1);
  458. box-shadow: 0px -10px 20px 0px rgba(0, 0, 0, 0.2);
  459. display: flex;
  460. justify-content: space-between;
  461. .box {
  462. display: inline-block;
  463. vertical-align: middle;
  464. // margin-right: 8px;
  465. width: 176px;
  466. // height: 232px;
  467. height: 38.7vh;
  468. max-height: 232px;
  469. // box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1);
  470. // backdrop-filter: blur(40px);
  471. }
  472. }
  473. .small {
  474. .box {
  475. width: 165px;
  476. }
  477. .air-box {
  478. width: 220px;
  479. }
  480. }
  481. }
  482. .taigu-popup {
  483. box-sizing: border-box;
  484. width: 480px;
  485. // height: 600px;
  486. height: 100%;
  487. border-radius: 24px 0px 0px 24px;
  488. backdrop-filter: blur(30px);
  489. background: rgba(255, 255, 255, 0.8);
  490. backdrop-filter: blur(30px);
  491. padding: 40px 90px;
  492. }
  493. </style>