00
This commit is contained in:
@@ -4,7 +4,12 @@
|
||||
<el-col :span="24">
|
||||
<!--首页图片-->
|
||||
<div class="top">
|
||||
<span v-if="bgImage != ''">
|
||||
<img :src="bgImage" alt="">
|
||||
</span>
|
||||
<span v-else>
|
||||
<img src="@/assets/school_profile/bj123.png" alt="">
|
||||
</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -25,7 +30,7 @@
|
||||
{{ nav.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="index !== showIndex" class="lab_list" @click="navClick(nav,index)">
|
||||
<div v-if="index !== showIndex" class="lab_list" @click="navClick(nav,index)">
|
||||
<div class="lab_img">
|
||||
<img src="@/assets/school_profile/eji_icon_xz.png" alt="">
|
||||
</div>
|
||||
@@ -34,37 +39,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="lab_list">-->
|
||||
<!-- <div class="lab_img">-->
|
||||
<!-- <img src="@/assets/school_profile/eji_icon_xz.png" alt="">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="lab_title">-->
|
||||
<!-- 学院领导-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="lab_list">-->
|
||||
<!-- <div class="lab_img">-->
|
||||
<!-- <img src="@/assets/school_profile/eji_icon_xz.png" alt="">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="lab_title">-->
|
||||
<!-- 机构设置-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="lab_list">-->
|
||||
<!-- <div class="lab_img">-->
|
||||
<!-- <img src="@/assets/school_profile/eji_icon_xz.png" alt="">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="lab_title">-->
|
||||
<!-- 院长致辞-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="20" :sm="20" :md="15" :lg="14" :xl="12">
|
||||
<Introduction :value="contextData" v-if="type == 1"/>
|
||||
|
||||
|
||||
<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"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-col>
|
||||
@@ -76,13 +72,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getNode} from "@/api";
|
||||
import Introduction from './components/Introduction.vue'
|
||||
import {getNode,crumbs} from "@/api";
|
||||
import Introduction from './components/Introduction.vue'
|
||||
import List from './components/list.vue'
|
||||
import DireData from './components/dire_data.vue'
|
||||
import {handleTree} from "@/utils/ebts";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
components:{
|
||||
components: {
|
||||
Introduction,
|
||||
List,
|
||||
DireData,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -90,37 +91,57 @@ export default {
|
||||
navId: null,
|
||||
navList: [],
|
||||
showIndex: 0,
|
||||
contextData:{},
|
||||
type:1,
|
||||
contextData: {},
|
||||
type: 2,
|
||||
bgImage:"",
|
||||
crumbs:{},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route(to, from) {
|
||||
console.log(to.path);
|
||||
this.getNav()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
this.navList = []
|
||||
getNode({id: this.navId}).then(res => {
|
||||
console.log(res)
|
||||
this.navList = res.data
|
||||
this.$refs.lab.style.height = this.navList.length*8 + 8 +'rem'
|
||||
this.getContent(this.navList[0])
|
||||
this.getNav()
|
||||
crumbs(this.navId).then(res=>{
|
||||
this.crumbs = res.data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getContent(menu) {
|
||||
getNode({id: menu.encodeId}).then(res => {
|
||||
console.log(res)
|
||||
this.contextData = res.data
|
||||
getNav() {
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
this.navList = []
|
||||
getNode({id: this.navId}).then(res => {
|
||||
this.navList = res.data
|
||||
try {
|
||||
this.$refs.lab.style.height = this.navList.length * 8 + 10 + 'rem'
|
||||
}catch (e) {
|
||||
}
|
||||
this.getContent(this.navList[0])
|
||||
})
|
||||
},
|
||||
navClick(nav,index){
|
||||
console.log(index,index != this.showIndex,this.showIndex)
|
||||
if (index != this.showIndex){
|
||||
getContent(menu) {
|
||||
this.type = menu.type
|
||||
this.contextData = null
|
||||
this.bgImage = menu.link
|
||||
|
||||
getNode({id: menu.encodeId}).then(res => {
|
||||
if (this.type == 2){
|
||||
this.contextData = {
|
||||
data:res.rows,
|
||||
total:res.total
|
||||
}
|
||||
}else if (this.type == 1){
|
||||
this.contextData = res.data
|
||||
}else if (this.type == 3){
|
||||
this.contextData = handleTree(res.data, "id", "pid",null,null)
|
||||
}
|
||||
})
|
||||
},
|
||||
navClick(nav, index) {
|
||||
if (index != this.showIndex) {
|
||||
this.showIndex = index
|
||||
console.log(nav)
|
||||
this.type = nav.type
|
||||
this.getContent(nav)
|
||||
}
|
||||
@@ -153,11 +174,13 @@ export default {
|
||||
.lab_list:last-child {
|
||||
border: none;
|
||||
}
|
||||
.lab_div{
|
||||
|
||||
.lab_div {
|
||||
border-bottom: 0.1rem solid #94BCFF !important;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.lab_div:last-child{
|
||||
|
||||
.lab_div:last-child {
|
||||
border-bottom: none !important;
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
@@ -205,6 +228,17 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
margin-left: 1.9rem;
|
||||
margin-top: 1.5rem;
|
||||
font-weight: 400;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-size: 1.4rem !important;
|
||||
color: #3C3C3C;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 980px) {
|
||||
.left_lab {
|
||||
|
||||
Reference in New Issue
Block a user