clay fix : 进入三级后,点击二级是无法显示,(路径问题)

Reviewed-on: http://git.hchyun.com/feashow/sist_web/pulls/4
This commit is contained in:
clay
2022-10-03 14:34:58 +00:00
2 changed files with 45 additions and 17 deletions

View File

@@ -17,7 +17,6 @@
<div style="background-color:#F8F8F8 ; padding-bottom: 19rem">
<!--有三级菜单-->
<el-row v-show="showSecond">
<el-col v-if="$i18n.locale === 'cn'" :xs="2" :sm="2" :md="1.5" :lg="2" :xl="4">
<div class="grid-content"></div>
</el-col>
@@ -202,6 +201,7 @@ export default {
},
watch: {
$route(to, from) {
console.log("我被触发了")
let arcId = this.$route.params && this.$route.query.id
this.navId = this.$route.params && this.$route.params.navId;
let id = this.$route.params && this.$route.params.secondId
@@ -220,6 +220,12 @@ export default {
this.getContent(info.second)
}
return
}else {
console.log(this.navId,"this.navId")
if (undefined == this.navId ){
this.showIndex = 0
this.getNodes()
}
}
this.showSecond = true
if (arcId != undefined) {
@@ -324,6 +330,7 @@ export default {
if (arcId != undefined) {
this.getContext(arcId)
} else {
console.log("测试,我被触发了!")
if (this.navId == undefined) {
this.getContent(this.navList[0])
} else {
@@ -359,6 +366,12 @@ export default {
getNode(data).then(res => {
console.log(res, "res值")
console.log(this.type);
if (null == res.data){
this.contextData = null
console.log("将值设为null",this.contextData)
this.type = 0
return
}
if (this.type === 2 || this.type === 4) {
this.contextData = {
data: res.rows,
@@ -374,6 +387,7 @@ export default {
if (res.additional == ""){
this.organizationType = "1"
}else {
console.log(this.organizationType,"this.organizationType")
this.organizationType = res.additional
}
this.contextData = handleTree(res.data, "id", "pid", null, null)

View File

@@ -58,31 +58,42 @@
</div>
</router-link>
<span v-for="(menu,index) in menuData" :key="index"
v-if="menu.displayType == 1 ||($i18n.locale === 'cn'&& menu.displayType == 3)||($i18n.locale === 'cn'&& menu.displayType == 2)">
<a>
<div class="link_text">
<span v-for="(menu,index) in menuData" :key="index">
<!-- v-if="menu.displayType == 1 ||($i18n.locale === 'cn'&& menu.displayType == 3)||($i18n.locale === 'en'&& menu.displayType == 2)">-->
<div class="link_text" v-if="menu.displayType != 4">
<div class="link_text_title">
<span style="padding: 0 1.1rem;" v-show="$i18n.locale === 'cn'">{{ menu.title }}</span>
<span style="padding: 0 .9rem" v-show="$i18n.locale === 'en'">{{ menu.englishTitle }}</span>
<div class="secondary">
<ul style="text-align:left;">
<span style="padding: 0 1.1rem;" v-if="menu.displayType == 3 || menu.displayType == 1"
v-show="$i18n.locale === 'cn'">{{ menu.title }}</span>
<span style="padding: 0 .9rem" v-if="menu.displayType == 2 || menu.displayType == 1"
v-show="$i18n.locale === 'en'">{{ menu.englishTitle }}</span>
<div class="secondary">
<ul style="text-align:left;">
<span v-for="(item,i) in menu.children" :key="i" @click="menuCut(item)">
<li class="menu_list" v-if="item.displayType != 4">
<li class="menu_list"
v-if="item.displayType != 4 && (item.displayType == 3 || item.displayType == 1)"
v-show="$i18n.locale === 'cn'">
<div class="menu_suffix">
<div>
<span v-show="$i18n.locale === 'cn'">{{ item.title }}</span>
<span v-show="$i18n.locale === 'en'">{{ item.englishTitle }}</span>
<span>{{ item.title }}</span>
<!-- <span v-if="(item.displayType == 2 || item.displayType == 1)&&$i18n.locale === 'en'" >{{ item.englishTitle }}</span>-->
</div>
</div>
</li>
<li class="menu_list"
v-if="item.displayType != 4&&(item.displayType == 2 || item.displayType == 1)"
v-show="$i18n.locale === 'en'">
<div class="menu_suffix" v-if="">
<div>
<span>{{ item.englishTitle }}</span>
</div>
</div>
</li>
</span>
</ul>
</div>
</div>
</div>
<!--<div class="secondary" v-if="index == 5">-->
</div>
</a>
</span>
<div class="iconfont"><img src="@/assets/header/magnifier.png" alt=""></div>
<div class="switchLang"><span>EN</span></div>
@@ -163,7 +174,6 @@ export default {
background: #1956BC;
.link {
line-height: 2.2rem;
width: 80%;
@@ -179,7 +189,7 @@ export default {
.bottom {
height: 11rem;
background: linear-gradient(180deg, rgba(61,96,163,0.91) 0%, rgba(61,96,163,0.64) 35%, rgba(61,96,163,0.42) 65%, rgba(73,133,234,0.33) 77%, rgba(73,133,234,0.02) 100%);
background: linear-gradient(180deg, rgba(61, 96, 163, 0.91) 0%, rgba(61, 96, 163, 0.64) 35%, rgba(61, 96, 163, 0.42) 65%, rgba(73, 133, 234, 0.33) 77%, rgba(73, 133, 234, 0.02) 100%);
border-radius: 0rem 0rem 2rem 2rem;
.icon {
@@ -243,12 +253,14 @@ export default {
text-align: center;
margin-top: 3.4rem;
margin-left: 2.6rem;
img {
margin-top: 0.9rem;
width: 2.4rem;
height: 2.4rem;
}
}
.switchLang {
width: 4rem;
height: 4.2rem;
@@ -257,12 +269,14 @@ export default {
margin-left: .6rem;
cursor: pointer;
text-align: center;
span{
span {
font-size: 2rem;
line-height: 4rem;
color: #C5DCFE;
}
}
.secondary {
display: none;
width: 25rem;