001
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-row v-show="showSecond">
|
||||
<el-col :xs="2" :sm="2" :md="1.5" :lg="2" :xl="4">
|
||||
<div class="grid-content"></div>
|
||||
</el-col>
|
||||
@@ -67,6 +67,35 @@
|
||||
<div class="grid-content"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="!showSecond">
|
||||
<el-col :xs="2" :sm="2" :md="2" :lg="4" :xl="5">
|
||||
<div class="grid-content"></div>
|
||||
</el-col>
|
||||
<el-col :xs="20" :sm="20" :md="20" :lg="16" :xl="14">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<div class="tab">
|
||||
<router-link to="/">首页</router-link>
|
||||
<span> > </span>
|
||||
<router-link to="">{{ crumbs.one.title }}</router-link>
|
||||
<span> > </span>
|
||||
<span style="color: #1956BC;font-size: 1.4rem">{{ crumbs.two.title }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<Introduction :value="contextData" v-if="type == 1"/>
|
||||
<List :value="contextData" v-if="type == 2"/>
|
||||
<DireData :value="contextData" v-if="type == 3"/>
|
||||
<Details :value="detailsData" v-if="type == null"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :xs="2" :sm="2" :md="2" :lg="4" :xl="5">
|
||||
<div class="grid-content"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -79,6 +108,7 @@ import List from './components/list.vue'
|
||||
import DireData from './components/dire_data.vue'
|
||||
import Details from './components/details.vue'
|
||||
import {handleTree} from "@/utils/ebts";
|
||||
import {getParentNode} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
@@ -95,6 +125,7 @@ export default {
|
||||
navId: null,
|
||||
navList: [],
|
||||
showIndex: 0,
|
||||
showSecond: true,
|
||||
contextData: {},
|
||||
type: 2,
|
||||
bgImage: null, crumbs: {
|
||||
@@ -112,12 +143,22 @@ export default {
|
||||
$route(to, from) {
|
||||
console.log("触发了 $route")
|
||||
let arcId = this.$route.params && this.$route.query.id
|
||||
console.log(arcId)
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
this.secondId = this.$route.params && this.$route.params.secondId;
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
if (this.type != null&&this.type!=0){
|
||||
let info = getParentNode(this.secondId);
|
||||
if (arcId != undefined) {
|
||||
this.getContext(arcId)
|
||||
} else {
|
||||
this.getContent(info.second)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (arcId != undefined) {
|
||||
this.getContext(arcId)
|
||||
}
|
||||
let id = this.$route.params && this.$route.params.secondId
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
try {
|
||||
this.$refs.lab.style.height = this.navList.length * 8 + 10 + 'rem'
|
||||
} catch (e) {
|
||||
@@ -149,9 +190,22 @@ export default {
|
||||
})
|
||||
},
|
||||
getNav() {
|
||||
console.log("触发了 getNav")
|
||||
this.secondId = this.$route.params && this.$route.params.secondId;
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
if (this.type != null&&this.type!=0){
|
||||
this.showSecond = false
|
||||
let info = getParentNode(this.secondId);
|
||||
let arcId = this.$route.query && this.$route.query.id
|
||||
if (arcId != undefined) {
|
||||
this.getContext(arcId)
|
||||
} else {
|
||||
this.getContent(info.second)
|
||||
}
|
||||
return
|
||||
}else {
|
||||
this.showSecond = true
|
||||
}
|
||||
this.navList = []
|
||||
getNode({id: this.secondId}).then(res => {
|
||||
this.navList = res.data
|
||||
@@ -167,7 +221,7 @@ export default {
|
||||
this.showIndex = i
|
||||
}
|
||||
}
|
||||
let arcId = this.$route.params && this.$route.query.id
|
||||
let arcId = this.$route.query && this.$route.query.id
|
||||
if (arcId != undefined) {
|
||||
this.getContext(arcId)
|
||||
} else {
|
||||
@@ -352,7 +406,6 @@ export default {
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user