This commit is contained in:
clay
2022-01-21 17:44:37 +08:00
parent d6374440d2
commit 2c4b597942
26 changed files with 777 additions and 138 deletions

View File

@@ -4,7 +4,6 @@
<i class="el-icon-top" style="color: #409eff"></i>
</div>
<div class="headers">
<el-row></el-row>
<headers v-show="width" />
<MobileHerder v-show="!width"/>
</div>
@@ -13,7 +12,7 @@
<router-view/>
</el-col>
</el-row>
<footers/>
<!--<footers/>-->
</div>
</template>
<script>
@@ -65,7 +64,7 @@ export default {
* {
margin: 0;
padding: 0;
font-family: PingFangSC-Medium, PingFang SC !important;
font-family: "微软雅黑" !important;
}
.grid-content {

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

View File

@@ -34,6 +34,16 @@ const routes = [
name: 'TeachingStaff',
component: () => import(/* webpackChunkName: "about" */ '../views/teaching_staff/index')
},
{
path: '/test',
name: 'TeachingStaff',
component: () => import(/* webpackChunkName: "about" */ '../views/Test')
},
{
path: '/anchor',
name: 'TeachingStaff',
component: () => import(/* webpackChunkName: "about" */ '../views/anchor')
},
{
path: '/et',
name: 'EduTeach',

139
src/views/Test.vue Normal file
View File

@@ -0,0 +1,139 @@
<template>
<div id="wrap" :style="{ height: screenHeight + 'px' }">
<div id="main" :style="{ top: nowTop + 'px' }">
<div style="background-color: #1b6d85" id="page1" class="page"></div>
<div style="overflow:auto;" id="page2" class="page">
<Index id="index" v-model="change"/>
</div>
</div>
</div>
</template>
<script>
import Index from '@/views/index/index'
export default {
name: 'Home',
components: {
Index
},
data() {
return {
screenWeight: 0, // 屏幕宽度
screenHeight: 0, // 屏幕高度
index: 1, // 用于判断翻页
curIndex: 1, // 当前页的index
startTime: 0, // 翻屏起始时间
endTime: 0, // 上一次翻屏结束时间
nowTop: 0, // 翻屏后top的位置
pageNum: 2, // 一共有多少页
change:false,
main: Object,
obj: Object,
indexs:Object,
}
},
mounted() {
this.screenWeight = document.documentElement.clientWidth;
this.screenHeight = document.documentElement.clientHeight;
this.main = document.getElementById("main");
this.obj = document.getElementsByTagName("div");
this.indexs = document.getElementById("index");
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);
} else if (document.addEventListener) {
document.addEventListener("mousewheel", this.scrollFun, false);
} else if (document.attachEvent) {
document.attachEvent("onmousewheel", this.scrollFun);
} else {
document.onmousewheel = this.scrollFun;
}
},
methods: {
hchang(e){
console.log(e)
},
scrollFun(event) {
this.startTime = new Date().getTime();
// mousewheel事件中的 “event.wheelDelta” 属性值:返回的如果是正值说明滚轮是向上滚动
// DOMMouseScroll事件中的 “event.detail” 属性值:返回的如果是负值说明滚轮是向上滚动
let delta = event.detail || (-event.wheelDelta);
console.log(this.indexs.offsetTop,"vvvv")
// 如果当前滚动开始时间和上次滚动结束时间的差值小于1.5s,则不执行翻页动作,这样做是为了实现类似节流的效果
if ((this.startTime - this.endTime) > 1000) {
if (delta > 0 && parseInt(this.main.offsetTop) >= -(this.screenHeight * (this.pageNum - 2))) {
// 向下滚动
this.index = 2;
this.toPage(this.index);
} else if (delta < 0 && parseInt(this.main.offsetTop) < 0) {
// 向上滚动
this.index = 1;
this.toPage(this.index);
}
// 本次翻页结束,记录结束时间,用于下次判断
this.endTime = new Date().getTime();
}
},
// 翻页
toPage(index) {
if (index<=0){
return
}
if (index != this.curIndex) {
let delta = index - this.curIndex;
this.nowTop = this.nowTop - delta * this.screenHeight;
this.curIndex = index;
}
}
}
}
</script>
<style>
html, body {
/*height: 100%;*/
}
body, ul, li, a, p, div {
/*慎删*/
padding: 0px;
margin: 0px;
}
#wrap {
overflow: hidden;
width: 100%;
}
#main {
position: relative;
transition: top 1.5s;
}
.page {
/*谨删*/
width: 100%;
margin: 0;
}
#pageUl {
position: fixed;
right: 10px;
bottom: 50%;
}
.active {
color: red;
}
</style>

99
src/views/anchor.vue Normal file
View File

@@ -0,0 +1,99 @@
<template>
<div>
<Index v-model="change"></Index>
</div>
</template>
<script>
import Index from '@/views/index/index'
export default {
name: "anchor",
components:{
Index
},
data() {
return {
screenWeight: 0, // 屏幕宽度
screenHeight: 0, // 屏幕高度
index: 1, // 用于判断翻页
curIndex: 1, // 当前页的index
startTime: 0, // 翻屏起始时间
endTime: 0, // 上一次翻屏结束时间
nowTop: 0, // 翻屏后top的位置
pageNum: 2, // 一共有多少页
main: Object,
obj: Object,
page2:Object,
change:0,
}
},
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);
} else if (document.addEventListener) {
document.addEventListener("mousewheel", this.scrollFun, false);
} else if (document.attachEvent) {
document.attachEvent("onmousewheel", this.scrollFun);
} else {
document.onmousewheel = this.scrollFun;
}
},
methods: {
scrollFun(event) {
//console.log(this.main,this.page2.offsetTop,this.screenHeight)
this.startTime = new Date().getTime();
// mousewheel事件中的 “event.wheelDelta” 属性值:返回的如果是正值说明滚轮是向上滚动
// DOMMouseScroll事件中的 “event.detail” 属性值:返回的如果是负值说明滚轮是向上滚动
let delta = event.detail || (-event.wheelDelta);
console.log(delta)
// 如果当前滚动开始时间和上次滚动结束时间的差值小于1.5s,则不执行翻页动作,这样做是为了实现类似节流的效果
if ((this.startTime - this.endTime) > 1000) {
if (delta > 0 && window.pageYOffset < 937) {
// // 向下滚动
// this.index = 2;
// this.toPage(this.index);
window.scrollTo({top: 937, behavior: 'smooth',})
} else if (delta < 0 && parseInt(this.main.offsetTop) == 0) {
// // 向上滚动
//
//
//
//
// this.index = 1;
// this.toPage(this.index);
}
// // 本次翻页结束,记录结束时间,用于下次判断
this.endTime = new Date().getTime();
}
},
// 翻页
toPage(index) {
if (index<=0){
return
}
if (index != this.curIndex) {
let delta = index - this.curIndex;
this.nowTop = this.nowTop - delta * this.screenHeight;
this.curIndex = index;
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div class="Introduction">
<div class="Introduction" style="background-color:#fff; margin-top: 3rem;">
<el-row>
<el-col>
<div class="context">

View File

@@ -1,5 +1,5 @@
<template>
<div class="details">
<div class="details" style="background-color:#fff;">
<el-row>
<el-col>
<div class="context">
@@ -38,7 +38,7 @@ export default {
.details_title{
font-size: 1.2rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #B4B4B4;
line-height: 1.7rem;
@@ -54,7 +54,7 @@ export default {
}
.context {
margin: 3rem 4rem;
padding: 3rem 4rem;
.title {
font-size: 2.4rem;

View File

@@ -1,5 +1,5 @@
<template>
<div class="dire_data">
<div class="dire_data" style="background-color:#fff; margin-top: 3rem;">
<el-row v-for="(dire,index) in value" :key="index">
<!--正文内容-->

View File

@@ -0,0 +1,241 @@
<template>
<div class="file_list" style="background-color:#fff; margin-top: 3rem;">
<div class="query">
<el-row>
<el-col :xs="14" :sm="14" :md="14" :lg="20" :xl="20">
<!--<div style="width: 95%;">-->
<div>
<!--<input class="query_input" v-model="query"/>-->
<el-input class="query_input" v-model="query" size="small" placeholder="请输入内容"></el-input>
</div>
</el-col>
<el-col :xs="10" :sm="10" :md="10" :lg="4" :xl="4" style="float: right">
<el-button class="query_button" type="primary" size="small" icon="el-icon-search"
@click="handleCurrentChange(-1)">搜索
</el-button>
</el-col>
</el-row>
</div>
<div class="list">
<!--<el-row>-->
<div class="file" v-for="(file ,index) in value.data" :key="index">
<div class="file_name">
<span class="span">
<img class="def_img" src="@/assets/file_list/xz_icon_xz.png">
<img class="hover_img" src="@/assets/file_list/xz_icon_xzls.png">
</span>
<a :href="file.fileAddr">{{ file.fileName }}</a>
</div>
<div class="file_time">
{{ getDateTime(file.createTime) }}
</div>
<!--<el-col :span="16" :offset="2">-->
<!-- -->
<!--</el-col>-->
<!--<el-col :span="6">-->
<!--</el-col>-->
</div>
<!--</el-row>-->
</div>
<el-row>
<el-col class="pagination_p">
<el-pagination class="pagination"
:small="small"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="value.pageNum"
:page-size="4"
layout="prev, pager, next, jumper"
:total="value.total">
</el-pagination>
</el-col>
</el-row>
</div>
</template>
<script>
import {getNode} from "@/api";
export default {
name: "file_list",
props: {
value: {
type: Object,
default: {
data: [{}],
pageNum: 1,
},
},
},
data() {
return {
width: document.documentElement.clientWidth,
small: document.documentElement.clientWidth <= 992,
query: '',
}
},
methods: {
getDateTime(date) {
let time = new Date(date);
return time.getFullYear() + "-" + (time.getMonth()+1) + "-" + time.getDate();
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
},
downloadFile(file) {
var filename = prompt(file.fileName);
var a = document.createElement('a');
a.href = file.fileAddr;
a.download = filename;
a.click()
},
handleCurrentChange(val) {
if (val == -1) {
this.value.pageNum = 1
} else {
this.value.pageNum = val
}
let data = {
title: this.query,
id: this.value.navId,
pageNum: this.value.pageNum,
pageSize: 4
}
this.type = this.$route.query && this.$route.query.type
if (this.type != null && this.type != 0) {
data.id = this.value.secondId
}
getNode(data).then(res => {
this.value.data = res.rows
this.value.total = res.total
})
},
getDay(time) {
let day = new Date(time).getDate();
return day
},
getTime(time) {
let date = new Date(time);
return date.getFullYear() + "-" + date.getMonth() + 1
}
}
}
</script>
<style scoped lang="scss">
.list {
padding-top: 5rem;
font-size: 1.6rem;
.file {
color: #757575;
clear: both;
padding: 2rem 3rem;
.file_name {
float: left;
.span {
padding-right: 1rem;
.def_img, .hover_img {
width: 1.5rem;
}
.def_img {
display: inline-block;
}
.hover_img {
display: none;
}
}
}
.file_time {
float: right;
}
a {
color: #757575 !important;
}
}
.file:hover {
//background-color: gray;
color: #1956BC;
a {
color: #1956BC !important;
font-weight: bold;
}
.file_name {
.def_img {
display: none;
}
.hover_img {
display: inline-block;
}
}
}
a {
text-decoration: none;
}
}
.pagination_p {
text-align: center;
margin-bottom: 2rem;
margin-top: 5rem;
.pagination {
display: inline-block;
float: none;
}
}
.query {
//margin: 1rem 0;
z-index: 999;
width: 30%;
position: absolute;
right: 3rem;
top: -2.4rem;
//float: right;
.query_input {
border-color: #1956BC !important;
border-radius: 0 !important;
}
.query_button {
//height: 3.5rem;
border-radius: 0rem 1rem 1rem 0rem;
background-color: #1956BC;
border-color: #1956BC !important;
}
}
@media screen and (min-width: 1100px) and (max-width: 1400px) {
.query {
width: 40% !important;
}
}
@media screen and (max-width: 1100px) {
.query {
width: 80% !important;
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div class="list">
<div class="list" style="background-color:#fff; margin-top: 3rem;">
<!--{{value}}-->
<div class="query">
<el-row>
@@ -49,17 +49,17 @@
</div>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col class="pagination_p">
<el-pagination class="pagination"
:small="small"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="value.pageNum"
:page-size="4"
layout="prev, pager, next, jumper"
:total="value.total">
:small="small"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="value.pageNum"
:page-size="4"
layout="prev, pager, next, jumper"
:total="value.total">
</el-pagination>
</el-col>
</el-row>
@@ -187,7 +187,7 @@ export default {
}
.tw_time {
border-right: .1rem solid #D5D5D5;
border-right: .3rem solid #D5D5D5;
height: 10rem;
width: 10rem;
color: #1956BC;
@@ -266,7 +266,8 @@ export default {
z-index: 999;
width: 30%;
position: absolute;
right: 0;
right: 3rem;
top: -2.4rem;
//float: right;
}
@media screen and (min-width: 1100px) and (max-width: 1400px) {

View File

@@ -14,89 +14,92 @@
</el-col>
</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>
<el-col v-show="width" :md="6" :lg="6" :xl="4">
<div class="left_lab" ref="lab">
<div class="lab">
<div v-for="(nav,index) in navList" class="lab_div">
<div v-if="index === showIndex" class="lab_list lab_select" @click="navClick(nav,index)">
<div class="lab_img">
<img src="@/assets/school_profile/eji_icon_xz.png" alt="">
<div style="background-color:#F8F8F8 ; padding-bottom: 19rem">
<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>
<el-col v-show="width" :md="6" :lg="6" :xl="4">
<div class="left_lab" ref="lab">
<div class="lab">
<div v-for="(nav,index) in navList" class="lab_div">
<div v-if="index === showIndex" class="lab_list lab_select" @click="navClick(nav,index)">
<div class="lab_img">
<img src="@/assets/school_profile/eji_icon_xz.png" alt="">
</div>
<div class="lab_title">
{{ nav.title }}
</div>
</div>
<div class="lab_title">
{{ nav.title }}
</div>
</div>
<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>
<div class="lab_title">
{{ nav.title }}
<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>
<div class="lab_title">
{{ nav.title }}
</div>
</div>
</div>
</div>
</div>
</div>
</el-col>
<el-col :xs="20" :sm="20" :md="15" :lg="14" :xl="12">
<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="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>
</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>
</el-col>
<el-col :xs="20" :sm="20" :md="15" :lg="14" :xl="12">
<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"/>
<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>
</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"/>
<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="2" :lg="4" :xl="5">
<div class="grid-content"></div>
</el-col>
</el-row>
</div>
</div>
</template>
@@ -107,6 +110,7 @@ import Introduction from './components/Introduction.vue'
import List from './components/list.vue'
import DireData from './components/dire_data.vue'
import Details from './components/details.vue'
import FileList from './components/file_list.vue'
import {handleTree} from "@/utils/ebts";
import {getParentNode} from "@/utils/sist";
@@ -116,7 +120,8 @@ export default {
Introduction,
List,
DireData,
Details
Details,
FileList
},
data() {
return {
@@ -128,7 +133,7 @@ export default {
showSecond: true,
contextData: {},
type: 2,
bgImage: null, crumbs: {
bgImage: null, crumbs: {
"two": {
"title": "学院领导",
},
@@ -146,11 +151,11 @@ export default {
let id = this.$route.params && this.$route.params.secondId
this.type = this.$route.query && this.$route.query.type
console.log("触发了 $route")
if (this.type==3||this.type==1||this.type==2){
if (this.type == 3 || this.type == 1 || this.type == 2) {
this.secondId = id
this.showSecond = false
let info = getParentNode(this.secondId);
console.log("获取到info",info)
console.log("获取到info", info)
if (arcId != undefined) {
console.log("getContext")
this.getContext(arcId)
@@ -201,12 +206,12 @@ export default {
})
},
getNav() {
if (this.type==3||this.type==1||this.type==2){
if (this.type == 3 || this.type == 1 || this.type == 2) {
console.log("进入二级")
this.showSecond = false
let info =null
let info = null
info = getParentNode(this.secondId);
if (info == null){
if (info == null) {
location.reload();
}
let arcId = null
@@ -225,7 +230,7 @@ export default {
this.getNodes()
},
getNodes(){
getNodes() {
this.navList = []
getNode({id: this.secondId}).then(res => {
this.navList = res.data
@@ -253,16 +258,13 @@ export default {
}
})
},
getContent(menu) {
console.log("getContent内部,menu:",menu)
console.log("getContent内部,menu:", menu)
this.type = menu.type
this.contextData = null
this.bgImage = menu.link
let data = null
if (this.type == 2) {
if (this.type == 2 || this.type == 4) {
data = {
id: menu.encodeId,
pageNum: 1,
@@ -274,8 +276,8 @@ export default {
}
}
getNode(data).then(res => {
console.log(res,"res值")
if (this.type == 2) {
console.log(res, "res值")
if (this.type == 2 || this.type == 4) {
this.contextData = {
data: res.rows,
total: res.total,
@@ -303,6 +305,14 @@ export default {
</script>
<style scoped lang="scss">
.content {
background-color: #F8F8F8 !important;
}
.context {
background-color: #ffffff;
}
.top {
img {
width: 100%;

View File

@@ -216,7 +216,7 @@ export default {
}
}
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
background: #F8F8F8;
.left_lab {
@@ -349,7 +349,7 @@ export default {
}
}
.tw_time {
border-right: .1rem solid #D5D5D5;
border-right: .3rem solid #D5D5D5;
height: 10rem;
width: 10rem;
color: #1956BC;

View File

@@ -213,7 +213,7 @@ export default {
text-align: center;
float: left;
font-size: 1.4rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #FFFFFF;
cursor: pointer;

View File

@@ -52,7 +52,7 @@
<el-col :xs="22" :sm="20" :md="20" :lg="18" :xl="14">
<div class="slideshow">
<el-carousel trigger="click" height="23.3vw">
<el-carousel-item v-for="(item,index) in bannerDate" :key="index">
<el-carousel-item v-for="(item,index) in bannerDate" :key="index" @click="clickTo(item.link)">
<div>
<img :src="item.imgurl" alt="">
<div class="bottom_title">
@@ -96,7 +96,7 @@
<div class="grid-content"></div>
</el-col>
<el-col class="headline" :xs="22" :sm="20" :md="16" :lg="12" :xl="12">
<div class="more">
<div class="more" @click="lookMore(newsDate[0])">
{{ $t('message.more') }}
</div>
<div class="more_img">
@@ -125,6 +125,29 @@ export default {
this.getBanner()
},
methods: {
clickTo(link){
//console.log(link)
window.location.href=link;//当前标签页
},
lookMore(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
getList() {
getArticleList({
type: "XC7D8m5gkr35BX1b4Otiln4",
@@ -152,6 +175,11 @@ export default {
},
}
</script>
<style>
.el-carousel__indicators{
display: none;
}
</style>
<style scoped lang="scss">
@import '../css/comment.css';
@@ -178,7 +206,7 @@ export default {
bottom: 0;
line-height: 3.6vw;
font-size: 2rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #FFFFFF;
}
@@ -212,7 +240,7 @@ export default {
.news_context_text {
font-size: 1.6rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #262626;
margin: 1rem auto;

View File

@@ -115,7 +115,8 @@
<script>
import SlideshowCard from './slideshow_card'
import {getArticleList} from "@/api";
import {getArticleList, info} from "@/api";
import {getParentNode} from "@/utils/sist";
export default {
name: "party_building_activities",
@@ -131,6 +132,26 @@ export default {
this.getListData()
},
methods:{
lookMore(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
getListData(){
getArticleList({
type: "LlBbF5OM6ILqxX69TIg7ipg",
@@ -217,6 +238,10 @@ export default {
display:-webkit-box; //作为弹性伸缩盒子模型显示。
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:3; //显示的行
//color: inherit !important;
span{
color: #565656 !important;
}
}
}

View File

@@ -138,7 +138,7 @@
<div class="grid-content"></div>
</el-col>
<el-col class="headline" :xs="22" :sm="20" :md="16" :lg="12" :xl="12">
<div style="background: #FFFFFF;color: #1956BC;" class="more"@click="lookMore(academiaData[0])">
<div style="background: #FFFFFF;color: #1956BC;" class="more" @click="lookMore(academiaData[0])">
{{ $t('message.more') }}
</div>
<div class="more_img">
@@ -173,12 +173,19 @@ export default {
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
@@ -279,8 +286,9 @@ export default {
.time {
text-align: center;
font-size: 1.2rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
padding: .2rem .5rem;
width: 7.2rem;
height: 2.2rem;
line-height: 2.2rem;
@@ -331,7 +339,7 @@ export default {
.time {
font-size: 1.2rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #1956BC;
line-height: 2.4rem;

View File

@@ -1,7 +1,7 @@
<template>
<div class="banner-card">
<ul class="ul">
<li v-for="(item,index) in bannerDate" :key="index">
<li v-for="(item,index) in bannerDate" :key="index" @click="clickTo(item.link)">
<div class="card_img">
<img
:src="item.imgurl"
@@ -53,6 +53,10 @@ export default {
created() {
},
methods: {
clickTo(link){
//console.log(link)
window.location.href=link;//当前标签页
},
constructor() {
this.bannerWrap = document.getElementsByClassName("banner-card")[0];
let lis = this.bannerWrap.getElementsByTagName("li");

View File

@@ -28,7 +28,7 @@
<div class="grid-content"></div>
</el-col>
<el-col :xs="22" :sm="20" :md="20" :lg="18" :xl="14" class="phe">
<div class="tw" v-for="(item,index) in listData" :key="index">
<div class="tw" v-for="(item,index) in listData" :key="index" @click="getArticle(item)">
<el-row>
<el-col :xs="5" :sm="5" :md="5" :lg="3" :xl="3">
<div class="tw_time">
@@ -45,7 +45,7 @@
<div class="tw_context_title">
{{item.title}}
</div>
<div class="tw_context_text" v-html="item.content"></div>
<div class="tw_context_text" style="color:#757575 !important;" v-html="item.content"></div>
</div>
</el-col>
<el-col v-show="width" :md="3" :lg="3" :xl="3">
@@ -64,7 +64,7 @@
<div class="grid-content"></div>
</el-col>
<el-col class="headline" :xs="22" :sm="20" :md="16" :lg="12" :xl="12">
<div class="more">
<div class="more" @click="lookMore(listData[0])">
{{ $t('message.more') }}
</div>
<div class="more_img">
@@ -76,7 +76,8 @@
</template>
<script>
import {getArticleList} from "@/api";
import {getArticleList, info} from "@/api";
import {getParentNode} from "@/utils/sist";
export default {
name: "teaching_student",
@@ -90,6 +91,27 @@ export default {
this.getListData()
},
methods:{
lookMore(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
getListData(){
getArticleList({
type: "--AMgi-Z8eHpj9W0a_fbhpk",
@@ -102,6 +124,26 @@ export default {
getDay(time){
return new Date(time).getDate()
},
getArticle(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(info)
if (info.three == null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
}
}
})
},
getTime(time){
let date = new Date(time);
return date.getFullYear() +"-" + date.getMonth()+1
@@ -119,7 +161,7 @@ export default {
margin-top: 4rem;
.tw_time {
border-right: .1rem solid #D5D5D5;
border-right: .3rem solid #D5D5D5;
height: 10rem;
width: 10rem;
color: #1956BC;
@@ -160,6 +202,7 @@ export default {
font-size: 1.6rem;
font-weight: 400;
overflow: hidden;
color: #757575 !important;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示。
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列

View File

@@ -84,7 +84,7 @@
background: #1956BC;
border-radius: 1.8rem;
font-size: 1.4rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
text-align: center;
margin: 2rem auto;

View File

@@ -63,12 +63,41 @@ export default {
return {
width: document.documentElement.clientWidth,
imageUrl:null,
iftop: false,
timer : true,
}
},
beforeDestroy() { //及时释放
window.removeEventListener('scroll', this.handleScroll)
},
created() {
getConfig("sist_bg").then(res=>{
this.imageUrl = res.data
})
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
const that = this
window.onresize = () => {
return (() => {
//这里写要操作的函数
window.screenWidth = document.body.clientWidth
that.width = window.screenWidth>992
})()
}
},
methods: {
handleScroll() {
this.iftop = window.pageYOffset > 400
console.log(window.pageYOffset)
this.$emit("input", window.pageYOffset)
},
backTop() {
window.scrollTo({top: 0, behavior: 'smooth',})
}
}
}
</script>

View File

@@ -34,6 +34,7 @@
<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>
@@ -54,6 +55,7 @@ import Introduction from '@/views/content/components/Introduction.vue'
import List from '@/views/content/components/list.vue'
import DireData from '@/views/content/components/dire_data.vue'
import Details from '@/views/content/components/details.vue'
import FileList from '@/views/content/components/file_list.vue'
import {handleTree} from "@/utils/ebts";
import {getParentNode} from "@/utils/sist";
@@ -64,6 +66,7 @@ export default {
List,
DireData,
Details,
FileList
},
data() {
return {
@@ -163,7 +166,7 @@ export default {
this.contextData = null
this.bgImage = menu.link
let data = null
if (this.type == 2) {
if (this.type == 2||this.type == 4) {
data = {
id: menu.encodeId,
pageNum: 1,
@@ -175,7 +178,7 @@ export default {
}
}
getNode(data).then(res => {
if (this.type == 2) {
if (this.type == 2||this.type == 4) {
this.contextData = {
data: res.rows,
total: res.total,

View File

@@ -144,7 +144,7 @@ export default {
}
}
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
background: #F8F8F8;
.left_lab {

View File

@@ -331,7 +331,7 @@ export default {
}
}
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
background: #F8F8F8;
.left_lab {