|
|
@ -8,8 +8,8 @@ |
|
|
|
您当前位置: |
|
|
|
<span class="title-name ml-4" @click="backFirst"> 首页 </span> |
|
|
|
<template v-if="title !== '关键词'"> |
|
|
|
<span class="title-name" @click="backTitle"> > {{ titleName }} </span> |
|
|
|
<span v-if="titleTwo" class="title-name" :class="titleThree ? '' : 'acitve'"> > {{ titleTwo }} </span> |
|
|
|
<span class="title-name" @click="backTitleOne"> > {{ titleName }} </span> |
|
|
|
<span v-if="titleTwo" class="title-name" @click="backTitle" :class="titleThree ? '' : 'acitve'"> > {{ titleTwo }} </span> |
|
|
|
<span v-if="titleThree" class="title-name acitve"> > {{ titleThree }} </span> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
@ -948,15 +948,18 @@ export default { |
|
|
|
titleName: '', |
|
|
|
titleTwo: '', |
|
|
|
titleThree: '', |
|
|
|
code: '', |
|
|
|
}; |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
'$route.query.code'() { |
|
|
|
this.code = this.$route.query.code; |
|
|
|
this.getLocal(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getLocal(); |
|
|
|
this.code = this.$route.query.code; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getLocal() { |
|
|
@ -995,27 +998,47 @@ export default { |
|
|
|
if (item.children && item.children.length) { |
|
|
|
for (let k = 0; k < item.children.length; k++) { |
|
|
|
const itemC = item.children[k]; |
|
|
|
|
|
|
|
if (itemC.children && itemC.children.length) { |
|
|
|
for (let m = 0; m < itemC.children.length; m++) { |
|
|
|
const itemD = itemC.children[m]; |
|
|
|
if (this.title === itemD.title && m !== 0) { |
|
|
|
const path = window.location.href.split('?'); |
|
|
|
window.location.href = path[0] + `?code=${itemC.children[0].code}`; |
|
|
|
return; |
|
|
|
if (itemD.code === this.code && m !== 0) { |
|
|
|
console.log('itemC: ', itemC); |
|
|
|
this.$router.push({ |
|
|
|
path: item.url, |
|
|
|
query: { code: itemC.children[0].code }, |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.title === itemC.title && k !== 0) { |
|
|
|
this.$router.push({ |
|
|
|
path: this.tabList[i].url, |
|
|
|
query: { code: item.children[0].code }, |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
backTitleOne() { |
|
|
|
const path = this.$route.path; |
|
|
|
let titleObj = {}; |
|
|
|
let lists = []; |
|
|
|
for (let i = 0; i < this.tabList.length; i++) { |
|
|
|
console.log('111111111'); |
|
|
|
if (this.tabList[i].url === path) { |
|
|
|
titleObj = { ...this.tabList[i] }; |
|
|
|
lists = [...this.tabList[i].children]; |
|
|
|
} |
|
|
|
} |
|
|
|
if (lists[0].children && lists[0].children.length) { |
|
|
|
console.log('2222222222'); |
|
|
|
this.$router.push({ |
|
|
|
path: titleObj.url, |
|
|
|
query: { code: lists[0].children[0].code }, |
|
|
|
}); |
|
|
|
// this.code = lists[0].children[0].code; |
|
|
|
} else { |
|
|
|
console.log('333333333333'); |
|
|
|
this.$router.push({ |
|
|
|
path: titleObj.url, |
|
|
|
query: { code: lists[0].code }, |
|
|
|
}); |
|
|
|
// this.code = lists[0].code; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|