|
@@ -2,16 +2,27 @@
|
|
|
<div class="Publications">
|
|
|
<div
|
|
|
class="banWrapper"
|
|
|
- data-aria-viewport-area tabindex="0"
|
|
|
+ data-aria-viewport-area
|
|
|
+ tabindex="0"
|
|
|
aria-label
|
|
|
:aria-description="`You've reached the banner area of the ${$route.meta.nameAll} page; this area has one image; please use the tab key to go through the content.`"
|
|
|
>
|
|
|
- <div class="ban aria-theme-independent" :class="banImg" tabindex="0" aria-label="Image" aria-description="Publications"></div>
|
|
|
+ <div
|
|
|
+ class="ban aria-theme-independent"
|
|
|
+ :class="banImg"
|
|
|
+ tabindex="0"
|
|
|
+ aria-label="Image"
|
|
|
+ aria-description="Publications"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
- <div class="nav_2" data-aria-viewport-area tabindex="0"
|
|
|
- aria-label aria-description="You've reached the secondary menu of the Publications section; this menu has two options; please use the tab key to go through the menu."
|
|
|
+ <div
|
|
|
+ class="nav_2"
|
|
|
+ data-aria-viewport-area
|
|
|
+ tabindex="0"
|
|
|
+ aria-label
|
|
|
+ aria-description="You've reached the secondary menu of the Publications section; this menu has two options; please use the tab key to go through the menu."
|
|
|
>
|
|
|
- <ul >
|
|
|
+ <ul>
|
|
|
<li
|
|
|
:class="{
|
|
|
cur: $route.meta.nameAll === item.name,
|
|
@@ -37,12 +48,28 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
<!-- 面包屑 -->
|
|
|
- <div class="pos" data-aria-viewport-area tabindex="0"
|
|
|
- aria-label aria-description="You've reached the path area, this area has three URLs; please use the tab key to navigate through the content."
|
|
|
+ <div
|
|
|
+ class="pos"
|
|
|
+ data-aria-viewport-area
|
|
|
+ tabindex="0"
|
|
|
+ aria-label
|
|
|
+ aria-description="You've reached the path area, this area has three URLs; please use the tab key to navigate through the content."
|
|
|
>
|
|
|
<span class="pos1" tabindex="0">Your Position: </span>
|
|
|
- <Router-link replace to="/Layout/Home" tabindex="0" aria-description="Home">Home></Router-link>
|
|
|
- <Router-link replace to="/Layout/Publications/1" tabindex="0" aria-description="Publications">Publications></Router-link>
|
|
|
+ <Router-link
|
|
|
+ replace
|
|
|
+ to="/Layout/Home"
|
|
|
+ tabindex="0"
|
|
|
+ aria-description="Home"
|
|
|
+ >Home></Router-link
|
|
|
+ >
|
|
|
+ <Router-link
|
|
|
+ replace
|
|
|
+ to="/Layout/Publications/1"
|
|
|
+ tabindex="0"
|
|
|
+ aria-description="Publications"
|
|
|
+ >Publications></Router-link
|
|
|
+ >
|
|
|
<Router-link
|
|
|
replace
|
|
|
to=""
|
|
@@ -50,7 +77,7 @@
|
|
|
:aria-description="$route.meta.nameAll"
|
|
|
@click.native.prevent="backUrl"
|
|
|
>
|
|
|
- {{$route.meta.nameAll}}
|
|
|
+ {{ $route.meta.nameAll }}
|
|
|
</Router-link>
|
|
|
</div>
|
|
|
<!-- 二级嵌套路由 -->
|
|
@@ -72,6 +99,7 @@ export default {
|
|
|
{ name: "Exhibition Catalogues", path: "/Layout/Publications/2" },
|
|
|
// { name: "Research", path: "/Layout/Publications/3" },
|
|
|
],
|
|
|
+ backId: "",
|
|
|
};
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
@@ -80,26 +108,34 @@ export default {
|
|
|
watch: {
|
|
|
$route(val) {
|
|
|
let id = val.query.id;
|
|
|
- id = Number(id);
|
|
|
- if (id >= 8) this.banImg = "ban2";
|
|
|
- else this.banImg = "";
|
|
|
+ if (id) {
|
|
|
+ id = Number(id);
|
|
|
+ this.backId = id;
|
|
|
+ if (id >= 8) this.banImg = "ban2";
|
|
|
+ else this.banImg = "";
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ backUrlRes() {
|
|
|
+ let temp;
|
|
|
+ let id = this.backId;
|
|
|
+ id = Number(id);
|
|
|
+ if (id >= 1 && id <= 5) temp = 2021;
|
|
|
+ else if (id <= 11) temp = 2020;
|
|
|
+ else if (id <= 17) temp = 2019;
|
|
|
+ else if (id <= 23) temp = 2018;
|
|
|
+ else temp = 2017;
|
|
|
+ return temp;
|
|
|
+ },
|
|
|
+
|
|
|
skip(url) {
|
|
|
if (
|
|
|
this.$route.path === "/Layout/PublicationsInfo" &&
|
|
|
url === "/Layout/Publications/1"
|
|
|
) {
|
|
|
- let temp;
|
|
|
- let id = this.$route.query.id;
|
|
|
- id = Number(id);
|
|
|
- if (id >= 1 && id <= 5) temp = 2021;
|
|
|
- else if (id <= 11) temp = 2020;
|
|
|
- else if (id <= 17) temp = 2019;
|
|
|
- else if (id <= 23) temp = 2018;
|
|
|
- else temp = 2017;
|
|
|
+ let temp = this.backUrlRes();
|
|
|
this.$router.push({
|
|
|
name: "Publications1",
|
|
|
query: { k: temp },
|
|
@@ -108,14 +144,7 @@ export default {
|
|
|
},
|
|
|
backUrl() {
|
|
|
if (this.$route.path === "/Layout/PublicationsInfo") {
|
|
|
- let temp;
|
|
|
- let id = this.$route.query.id;
|
|
|
- id = Number(id);
|
|
|
- if (id >= 1 && id <= 5) temp = 2021;
|
|
|
- else if (id <= 11) temp = 2020;
|
|
|
- else if (id <= 17) temp = 2019;
|
|
|
- else if (id <= 23) temp = 2018;
|
|
|
- else temp = 2017;
|
|
|
+ let temp = this.backUrlRes();
|
|
|
this.$router.push({
|
|
|
name: "Publications1",
|
|
|
query: { k: temp },
|
|
@@ -126,9 +155,12 @@ export default {
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
let id = this.$route.query.id;
|
|
|
- id = Number(id);
|
|
|
- if (id >= 8) this.banImg = "ban2";
|
|
|
- else this.banImg = "";
|
|
|
+ if (id) {
|
|
|
+ id = Number(id);
|
|
|
+ this.backId = id;
|
|
|
+ if (id >= 8) this.banImg = "ban2";
|
|
|
+ else this.banImg = "";
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {},
|