2022.5.6
This commit is contained in:
@@ -28,18 +28,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//this.screenWeight = document.documentElement.clientWidth;
|
||||
//this.screenHeight = document.documentElement.clientHeight;
|
||||
//this.main = document.getElementById("main");
|
||||
//this.page2 = document.getElementById("page2");
|
||||
//this.obj = document.getElementsByTagName("div");
|
||||
//for (let i = 0; i < this.obj.length; i++) {
|
||||
// if (this.obj[i].className == 'page') {
|
||||
// this.obj[i].style.height = this.screenHeight + "px";
|
||||
// }
|
||||
//}
|
||||
//this.pageNum = document.querySelectorAll(".page").length;
|
||||
|
||||
// 浏览器兼容
|
||||
if ((navigator.userAgent.toLowerCase().indexOf("firefox") != -1)) {
|
||||
document.addEventListener("DOMMouseScroll", this.scrollFun, false);
|
||||
@@ -77,16 +65,12 @@ export default {
|
||||
// // 向下滚动
|
||||
// this.index = 2;
|
||||
// this.toPage(this.index);
|
||||
window.scrollTo({top: window.innerHeight+20, behavior: 'smooth',})
|
||||
console.log(window.innerHeight + 20);
|
||||
console.log(window.innerWidth/2)
|
||||
window.scrollTo({top: window.innerWidth/2, behavior: 'smooth',})
|
||||
} else if (delta < 0 && window.pageYOffset <= window.innerHeight+200) {
|
||||
// // 向上滚动
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
window.scrollTo({top: 0, behavior: 'smooth',})
|
||||
// this.index = 1;
|
||||
// this.toPage(this.index);
|
||||
}
|
||||
// // 本次翻页结束,记录结束时间,用于下次判断
|
||||
this.endTime = new Date().getTime();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
</el-row>
|
||||
|
||||
<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">
|
||||
@@ -76,21 +77,23 @@
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col v-if="$i18n.locale === 'cn'" :xs="20" :sm="20" :md="15" :lg="14" :xl="12">
|
||||
<!--<el-col v-if="$i18n.locale === 'cn'" :xs="20" :sm="20" :md="15" :lg="14" :xl="12">-->
|
||||
<el-col :xs="20" :sm="20" :md="15" :lg="14" :xl="12">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<div class="tab">
|
||||
<router-link to="/home">{{ $t('message.home') }}</router-link>
|
||||
<span> > </span>
|
||||
<router-link to="">
|
||||
<!--<span style="color: #1956BC;font-size: 1.4rem">-->
|
||||
<!--<router-link to="">-->
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.one.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.one.englishTitle }}</span>
|
||||
</router-link>
|
||||
<!--</router-link>-->
|
||||
<!--</span>-->
|
||||
<span> > </span>
|
||||
<span style="color: #1956BC;font-size: 1.4rem">
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.two.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.two.englishTitle }}</span>
|
||||
<!--{{ crumbs.two.title }}-->
|
||||
</span>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -105,45 +108,8 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col v-if="$i18n.locale === 'en'" :xs="20" :sm="20" :md="15" :lg="14" :xl="13">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<div class="tab">
|
||||
<router-link to="/home">{{ $t('message.home') }}</router-link>
|
||||
<span> > </span>
|
||||
<router-link to="">
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.one.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.one.englishTitle }}</span>
|
||||
</router-link>
|
||||
<span> > </span>
|
||||
<span style="color: #1956BC;font-size: 1.4rem">
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.two.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.two.englishTitle }}</span>
|
||||
<!--{{ 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"/>
|
||||
<FileList :value="contextData" v-if="type == 4"/>
|
||||
<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="1.5" :lg="2" :xl="4">-->
|
||||
<!-- <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>
|
||||
@@ -154,16 +120,16 @@
|
||||
<div class="tab">
|
||||
<router-link to="/">{{ $t('message.home') }}</router-link>
|
||||
<span> > </span>
|
||||
<router-link to="">
|
||||
<span style="color: #1956BC;font-size: 1.4rem">
|
||||
<!--<router-link to="">-->
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.one.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.one.englishTitle }}</span>
|
||||
</router-link>
|
||||
<span> > </span>
|
||||
<span style="color: #1956BC;font-size: 1.4rem">
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.two.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ crumbs.two.englishTitle }}</span>
|
||||
<!--{{ crumbs.two.title }}-->
|
||||
<!--</router-link>-->
|
||||
</span>
|
||||
<!--<span> > </span>-->
|
||||
<!-- <span v-if="$i18n.locale === 'cn'">{{ crumbs.two.title }}</span>-->
|
||||
<!-- <span v-if="$i18n.locale === 'en'">{{ crumbs.two.englishTitle }}</span>-->
|
||||
<!-- <!–{{ crumbs.two.title }}–>-->
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -215,7 +181,8 @@ export default {
|
||||
showSecond: true,
|
||||
contextData: {},
|
||||
type: 2,
|
||||
bgImage: null, crumbs: {
|
||||
bgImage: null,
|
||||
crumbs: {
|
||||
"two": {
|
||||
"title": "学院领导",
|
||||
},
|
||||
@@ -234,6 +201,7 @@ export default {
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
if (this.type == 3 || this.type == 1 || this.type == 2) {
|
||||
this.secondId = id
|
||||
this.getCrumbs();
|
||||
this.showSecond = false
|
||||
let info = getParentNode(this.secondId);
|
||||
console.log("获取到info", info)
|
||||
@@ -276,18 +244,32 @@ export default {
|
||||
this.getNav()
|
||||
}, 200);
|
||||
//this.getNav()
|
||||
crumbs(this.secondId).then(res => {
|
||||
this.crumbs = res.data
|
||||
})
|
||||
this.getCrumbs();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获得面包屑导航
|
||||
*/
|
||||
getCrumbs(){
|
||||
crumbs(this.secondId).then(res => {
|
||||
this.crumbs = res.data
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获得内容
|
||||
* @param arcId
|
||||
*/
|
||||
getContext(arcId) {
|
||||
article(arcId).then(res => {
|
||||
this.detailsData = res.data.data
|
||||
this.type = null
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获得菜单下的信息
|
||||
*/
|
||||
getNav() {
|
||||
this.getCrumbs();
|
||||
if (this.type == 3 || this.type == 1 || this.type == 2) {
|
||||
console.log("进入二级")
|
||||
this.showSecond = false
|
||||
@@ -312,6 +294,9 @@ export default {
|
||||
this.getNodes()
|
||||
},
|
||||
|
||||
/**
|
||||
* 获得节点信息
|
||||
*/
|
||||
getNodes() {
|
||||
this.navList = []
|
||||
getNode({id: this.secondId}).then(res => {
|
||||
@@ -340,6 +325,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取三级菜单
|
||||
* @param menu
|
||||
*/
|
||||
getContent(menu) {
|
||||
console.log("getContent内部,menu:", menu)
|
||||
this.type = menu.type
|
||||
@@ -375,6 +364,11 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 菜单点击,路由切换
|
||||
* @param nav
|
||||
* @param index
|
||||
*/
|
||||
navClick(nav, index) {
|
||||
//if (index != this.showIndex) {
|
||||
this.showIndex = index
|
||||
|
||||
Reference in New Issue
Block a user