Index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <template>
  2. <div
  3. class="bottomIndex"
  4. data-aria-viewport-area
  5. tabindex="0"
  6. aria-label
  7. aria-description="You've reached the content area of the Site Index, please use the tab key to navigate through the content."
  8. >
  9. <img
  10. src="/data/Index/1.jpg"
  11. alt=""
  12. tabindex="0"
  13. aria-label=""
  14. aria-description="Site Index"
  15. />
  16. <div class="home" title="Home" tabindex="-1">
  17. <img
  18. src="/data/Index/home.jpg"
  19. alt=""
  20. @click="skip('/')"
  21. @keydown.enter.passive="skip('/')"
  22. tabindex="0"
  23. aria-label=""
  24. aria-description="Home"
  25. />
  26. </div>
  27. <div class="main" tabindex="-1">
  28. <img src="/data/Index/main.jpg" alt="" />
  29. <!-- 定位的盒子 -->
  30. <div class="loc">
  31. <div class="one">
  32. <div
  33. :class="{ active: item.path !== '' }"
  34. @click="skip(item.path, item.sroll)"
  35. @keydown.enter.passive="skip(item.path, item.sroll)"
  36. :title="item.title"
  37. v-for="(item, index) in data1"
  38. :key="index"
  39. :style="`width:${item.width};top:${item.top * 45}px;left:${
  40. item.left
  41. }`"
  42. tabindex="0"
  43. aria-label="Link"
  44. :aria-description="item.title"
  45. ></div>
  46. </div>
  47. <div class="tow">
  48. <div
  49. :class="{ active: item.path !== '' }"
  50. @click="skip(item.path, item.sroll)"
  51. @keydown.enter.passive="skip(item.path, item.sroll)"
  52. :title="item.title"
  53. v-for="(item, index) in data2"
  54. :key="index"
  55. :style="`width:${item.width};top:${item.top * 45}px;left:${
  56. item.left
  57. }`"
  58. tabindex="0"
  59. aria-label="Link"
  60. :aria-description="item.title"
  61. ></div>
  62. </div>
  63. <div class="three">
  64. <div
  65. :class="{ active: item.path !== '' }"
  66. @click="skip(item.path, item.sroll)"
  67. @keydown.enter.passive="skip(item.path, item.sroll)"
  68. :title="item.title"
  69. v-for="(item, index) in data3"
  70. :key="index"
  71. :style="`width:${item.width};top:${item.top * 45}px;left:${
  72. item.left
  73. }`"
  74. tabindex="0"
  75. aria-label="Link"
  76. :aria-description="item.title"
  77. ></div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </template>
  83. <script>
  84. export default {
  85. name: "bottomIndex",
  86. components: {},
  87. data() {
  88. //这里存放数据
  89. return {
  90. data1: [
  91. {
  92. title: "Visit",
  93. width: "110px",
  94. top: 0,
  95. left: "0px",
  96. path: "/Layout/Visit/1",
  97. },
  98. {
  99. title: "Hours,Direction & Admission",
  100. width: "250px",
  101. top: 1,
  102. left: "0px",
  103. path: "/Layout/Visit/1",
  104. },
  105. {
  106. title: "Reservation",
  107. width: "110px",
  108. top: 2,
  109. left: "0px",
  110. path: "/Layout/Visit/2",
  111. },
  112. // {
  113. // title: "Reservation System",
  114. // width: "180px",
  115. // top: 3,
  116. // left: "0px",
  117. // path: "",
  118. // },
  119. {
  120. title: "Floor Plans",
  121. width: "110px",
  122. top: 3,
  123. left: "0px",
  124. path: "/Layout/Visit/3",
  125. },
  126. {
  127. title: "Audio Guide & Tour",
  128. width: "175px",
  129. top: 4,
  130. left: "0px",
  131. path: "/Layout/Visit/4",
  132. },
  133. {
  134. title: "Accessibility",
  135. width: "120px",
  136. top: 5,
  137. left: "0px",
  138. path: "/Layout/Visit/5",
  139. },
  140. {
  141. title: "Café & Shop",
  142. width: "120px",
  143. top: 6,
  144. left: "0px",
  145. path: "/Layout/Visit/6",
  146. },
  147. {
  148. title: "Visitor Guidelines",
  149. width: "160px",
  150. top: 7,
  151. left: "0px",
  152. path: "/Layout/Visit/7",
  153. },
  154. //
  155. {
  156. title: "Exhibitions",
  157. width: "200px",
  158. top: 0,
  159. left: "290px",
  160. path: "/Layout/Exhibitions/1",
  161. },
  162. {
  163. title: "Current Exhibitions",
  164. width: "170px",
  165. top: 1,
  166. left: "290px",
  167. path: "/Layout/Exhibitions/1",
  168. },
  169. {
  170. title: "Permanent Exhibitions",
  171. width: "200px",
  172. top: 2,
  173. left: "290px",
  174. path: "/Layout/Exhibitions/2",
  175. },
  176. {
  177. title: "Past Exhibitions",
  178. width: "155px",
  179. top: 3,
  180. left: "290px",
  181. path: "/Layout/Exhibitions/3",
  182. },
  183. {
  184. title: "Overseas Exhibitions",
  185. width: "200px",
  186. top: 4,
  187. left: "290px",
  188. path: "/Layout/Exhibitions/4",
  189. },
  190. //
  191. {
  192. title: "Collections",
  193. width: "200px",
  194. top: 0,
  195. left: "588px",
  196. path: "/Layout/Collections/Bronzes",
  197. },
  198. {
  199. title: "Bronzes",
  200. width: "95px",
  201. top: 1,
  202. left: "588px",
  203. path: "/Layout/Collections/Bronzes",
  204. },
  205. {
  206. title: "Ceramics",
  207. width: "95px",
  208. top: 2,
  209. left: "588px",
  210. path: "/Layout/Collections/Ceramics",
  211. },
  212. {
  213. title: "Buddhist Statues",
  214. width: "155px",
  215. top: 3,
  216. left: "588px",
  217. path: "/Layout/Collections/Buddhist",
  218. },
  219. {
  220. title: "Jadewares",
  221. width: "115px",
  222. top: 4,
  223. left: "588px",
  224. path: "/Layout/Collections/Jadewares",
  225. },
  226. {
  227. title: "Calligraphies",
  228. width: "120px",
  229. top: 5,
  230. left: "588px",
  231. path: "/Layout/Collections/Calligraphies",
  232. },
  233. {
  234. title: "Paintings",
  235. width: "95px",
  236. top: 6,
  237. left: "588px",
  238. path: "/Layout/Collections/Paintings",
  239. },
  240. {
  241. title: "Gold & Silverwares",
  242. width: "170px",
  243. top: 7,
  244. left: "588px",
  245. path: "/Layout/Collections/Gold",
  246. },
  247. {
  248. title: "Coins & Banknotes",
  249. width: "170px",
  250. top: 8,
  251. left: "588px",
  252. path: "/Layout/Collections/Coins",
  253. },
  254. {
  255. title: "Brocades & Embroideries",
  256. width: "210px",
  257. top: 8.9,
  258. left: "588px",
  259. path: "/Layout/Collections/Brocades",
  260. },
  261. {
  262. title: "Cultural Supplies",
  263. width: "150px",
  264. top: 9.8,
  265. left: "588px",
  266. path: "/Layout/Collections/Cultural",
  267. },
  268. {
  269. title: "Miscellaneous",
  270. width: "140px",
  271. top: 10.8,
  272. left: "588px",
  273. path: "/Layout/Collections/Miscellaneous",
  274. },
  275. //
  276. {
  277. title: "Learn & Engage",
  278. width: "265px",
  279. top: 0,
  280. left: "880px",
  281. path: "/Layout/LearnEngage/Students",
  282. },
  283. {
  284. title: "For Students",
  285. width: "130px",
  286. top: 1,
  287. left: "880px",
  288. path: "/Layout/LearnEngage/Students",
  289. },
  290. {
  291. title: "For Adults",
  292. width: "120px",
  293. top: 2,
  294. left: "880px",
  295. path: "/Layout/LearnEngage/Adults",
  296. },
  297. {
  298. title: "For Families & Children",
  299. width: "210px",
  300. top: 3,
  301. left: "880px",
  302. path: "/Layout/LearnEngage/Families",
  303. },
  304. ],
  305. data2: [
  306. {
  307. title: "Preservation & Publications",
  308. width: "430px",
  309. top: 0,
  310. left: "0px",
  311. path: "/Layout/Publications/2",
  312. },
  313. {
  314. title: "Preservation",
  315. width: "118px",
  316. top: 1,
  317. left: "0px",
  318. path: "/Layout/Publications/3",
  319. },
  320. {
  321. title: "Publications",
  322. width: "118px",
  323. top: 2,
  324. left: "0px",
  325. path: "/Layout/Publications/1",
  326. },
  327. //
  328. {
  329. title: "Join & Support",
  330. width: "250px",
  331. top: 0,
  332. left: "588px",
  333. path: "/Layout/JoinSupport/Volunteer",
  334. },
  335. {
  336. title: "Ways to Volunteer",
  337. width: "160px",
  338. top: 1,
  339. left: "588px",
  340. path: "/Layout/JoinSupport/Volunteer",
  341. },
  342. {
  343. title: "Volunteer Team Introduction",
  344. width: "270px",
  345. top: 2,
  346. left: "588px",
  347. path: "/Layout/JoinSupport/VolunteerInfo?id=1",
  348. },
  349. {
  350. title: "Volunteer Apply",
  351. width: "160px",
  352. top: 3,
  353. left: "588px",
  354. path: "/Layout/JoinSupport/VolunteerInfo?id=2",
  355. },
  356. {
  357. title: "Volunteer Program",
  358. width: "205px",
  359. top: 4,
  360. left: "588px",
  361. path: "/Layout/JoinSupport/VolunteerInfo?id=3",
  362. },
  363. {
  364. title: "Feedbacks",
  365. width: "120px",
  366. top: 5,
  367. left: "588px",
  368. path: "/Layout/JoinSupport/VolunteerInfo?id=4",
  369. },
  370. {
  371. title: "Ways to Give",
  372. width: "120px",
  373. top: 6,
  374. left: "588px",
  375. path: "/Layout/JoinSupport/Give",
  376. },
  377. {
  378. title: "Individuals",
  379. width: "120px",
  380. top: 7,
  381. left: "588px",
  382. path: "/Layout/JoinSupport/GiveInfo?id=4",
  383. },
  384. {
  385. title: "Corporations & Institutions",
  386. width: "250px",
  387. top: 8,
  388. left: "588px",
  389. path: "/Layout/JoinSupport/GiveInfo?id=5",
  390. },
  391. //
  392. {
  393. title: "About",
  394. width: "130px",
  395. top: 0,
  396. left: "880px",
  397. path: "/Layout/About",
  398. },
  399. {
  400. title: "From the Director",
  401. width: "175px",
  402. top: 1,
  403. left: "880px",
  404. path: "/Layout/About",
  405. sroll: 338,
  406. },
  407. {
  408. title: "History",
  409. width: "75px",
  410. top: 2,
  411. left: "880px",
  412. path: "/Layout/About",
  413. sroll: 805,
  414. },
  415. {
  416. title: "Partners & Connections",
  417. width: "210px",
  418. top: 3,
  419. left: "880px",
  420. path: "/Layout/About",
  421. sroll: 1307,
  422. },
  423. {
  424. title: "Contact",
  425. width: "75px",
  426. top: 4,
  427. left: "880px",
  428. path: "/Layout/About",
  429. sroll: 1515,
  430. },
  431. ],
  432. data3: [
  433. {
  434. title: "Auxiliary Functions",
  435. width: "310px",
  436. top: 0,
  437. left: "0px",
  438. path: "",
  439. },
  440. {
  441. title: "Moblie Site",
  442. width: "105px",
  443. top: 1,
  444. left: "0px",
  445. path: "https://zzbbh.4dage.com/shouBoM/index.html#/Layout/Home",
  446. },
  447. {
  448. title: "Terms of Use",
  449. width: "120px",
  450. top: 2,
  451. left: "0px",
  452. path: "/Layout/Use",
  453. },
  454. // { title: "News", width: "55px", top: 3, left: "0px", path: "" },
  455. // {
  456. // title: "Upcoming Events",
  457. // width: "155px",
  458. // top: 4,
  459. // left: "0px",
  460. // path: "/Layout/Events",
  461. // },
  462. {
  463. title: "Employment",
  464. width: "110px",
  465. top: 3,
  466. left: "0px",
  467. path: "/Layout/Employment",
  468. },
  469. ],
  470. };
  471. },
  472. //监听属性 类似于data概念
  473. computed: {},
  474. //监控data中的数据变化
  475. watch: {},
  476. //方法集合
  477. methods: {
  478. skip(url, sroll) {
  479. if(url==='https://zzbbh.4dage.com/shouBoM/index.html#/Layout/Home') {
  480. window.open(url)
  481. return
  482. }
  483. this.$router.replace(url).catch(() => {});
  484. if (sroll) {
  485. setTimeout(() => {
  486. window.scrollTo({ top: sroll, behavior: "smooth" });
  487. }, 100);
  488. }
  489. },
  490. },
  491. //生命周期 - 创建完成(可以访问当前this实例)
  492. created() {},
  493. //生命周期 - 挂载完成(可以访问DOM元素)
  494. mounted() {
  495. this.$eventBus.$emit(
  496. "request-read",
  497. ` You've reached the Site Index page. This page contains one navigation section, three window sections, and one interactive section. To choose an area, please hit the shortcut key.`
  498. );
  499. },
  500. beforeCreate() {}, //生命周期 - 创建之前
  501. beforeMount() {}, //生命周期 - 挂载之前
  502. beforeUpdate() {}, //生命周期 - 更新之前
  503. updated() {}, //生命周期 - 更新之后
  504. beforeDestroy() {}, //生命周期 - 销毁之前
  505. destroyed() {}, //生命周期 - 销毁完成
  506. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  507. };
  508. </script>
  509. <style lang='less' scoped>
  510. .bottomIndex {
  511. clear: both;
  512. width: 1186px;
  513. margin: 0 auto 55px;
  514. font-size: 18px;
  515. color: #333;
  516. line-height: 30px;
  517. padding-top: 75px;
  518. .home {
  519. padding: 30px 0;
  520. border-bottom: solid 1px #000;
  521. & > img {
  522. cursor: pointer;
  523. }
  524. }
  525. .main {
  526. position: relative;
  527. padding-top: 30px;
  528. .loc {
  529. position: absolute;
  530. width: 100%;
  531. height: 100%;
  532. top: 30px;
  533. left: 0;
  534. & > div {
  535. width: 100%;
  536. position: absolute;
  537. opacity: 0.3;
  538. top: 0;
  539. left: 0;
  540. & > div {
  541. width: 110px;
  542. height: 35px;
  543. position: absolute;
  544. }
  545. }
  546. .active {
  547. cursor: pointer;
  548. }
  549. .one {
  550. height: 520px;
  551. }
  552. .tow {
  553. height: 400px;
  554. top: 570px;
  555. }
  556. .three {
  557. height: 260px;
  558. top: 1025px;
  559. }
  560. }
  561. }
  562. }
  563. </style>