1 Commits

Author SHA1 Message Date
clay
11e2837946 dengjie commit : 修改新闻中心第四个border-right为none的样式 2022-10-07 18:57:48 +08:00
2 changed files with 174 additions and 140 deletions

View File

@@ -16,7 +16,7 @@
<div style="background-color:#F8F8F8 ; padding-bottom: 19rem"> <div style="background-color:#F8F8F8 ; padding-bottom: 19rem">
<!--有三级菜单--> <!--有三级菜单-->
<el-row v-show="false"> <el-row v-show="showSecond">
<el-col v-if="$i18n.locale === 'cn'" :xs="2" :sm="2" :md="1.5" :lg="2" :xl="4"> <el-col v-if="$i18n.locale === 'cn'" :xs="2" :sm="2" :md="1.5" :lg="2" :xl="4">
<div class="grid-content"></div> <div class="grid-content"></div>
</el-col> </el-col>
@@ -80,7 +80,7 @@
<el-row> <el-row>
<el-col> <el-col>
<div class="tab"> <div class="tab">
<router-link style="color: #1956BC; font-size: 16px;" to="/home">{{ $t('message.home') }}</router-link> <router-link style="color: #1956BC; font-size: 16px;" to="/home">{{ $t("message.home") }}</router-link>
<span> > </span> <span> > </span>
<span> <span>
<!--<router-link to="">--> <!--<router-link to="">-->
@@ -109,15 +109,28 @@
</el-row> </el-row>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="true"> <el-row v-show="false">
<el-col v-if="$i18n.locale === 'cn'" :xs="2" :sm="2" :md="1.5" :lg="2" :xl="4"> <el-col v-if="$i18n.locale === 'cn'" :xs="2" :sm="2" :md="1.5" :lg="2" :xl="4">
<div class="grid-content"></div> <div class="grid-content"></div>
</el-col> </el-col>
<el-col v-if="$i18n.locale === 'cn'" v-show="width" :md="6" :lg="6" :xl="4"> <el-col v-if="$i18n.locale === 'cn'" v-show="width" :md="6" :lg="6" :xl="4">
<div class="left_bgc"> <div class="left_lab">
<div class="right_bgc"> <div class="lab">
<div class="lab_div">
<div class="lab_list">
<img src="@/assets/school_profile/eji_icon_xz.png" alt="">
<span class="lab_title">教师名录</span>
</div>
<div class="lab_list">
<img src="@/assets/school_profile/eji_icon_xz.png" alt="">
<span class="lab_title">教师名录</span>
</div>
<div class="lab_list">
<img src="@/assets/school_profile/eji_icon_xz.png" alt="">
<span class="lab_title">教师名录</span>
</div>
</div>
</div> </div>
</div> </div>
</el-col> </el-col>
@@ -156,7 +169,7 @@
<el-row> <el-row>
<el-col> <el-col>
<div class="tab"> <div class="tab">
<router-link style="color: #1956BC; font-size: 16px;" to="/home">{{ $t('message.home') }}</router-link> <router-link style="color: #1956BC; font-size: 16px;" to="/home">{{ $t("message.home") }}</router-link>
<span> > </span> <span> > </span>
<span> <span>
<!--<router-link to="">--> <!--<router-link to="">-->
@@ -194,7 +207,7 @@
<el-row> <el-row>
<el-col> <el-col>
<div class="tab"> <div class="tab">
<router-link style="color: #1956BC; font-size: 16px;" to="/">{{ $t('message.home') }}</router-link> <router-link style="color: #1956BC; font-size: 16px;" to="/">{{ $t("message.home") }}</router-link>
<span> > </span> <span> > </span>
<span> <span>
<!--<router-link to="">--> <!--<router-link to="">-->
@@ -235,13 +248,13 @@
<script> <script>
import {getNode, crumbs, article} from "@/api"; import {getNode, crumbs, article} from "@/api";
import Introduction from './components/Introduction.vue' import Introduction from "./components/Introduction.vue";
import List from './components/list.vue' import List from "./components/list.vue";
import DireData from './components/dire_data.vue' import DireData from "./components/dire_data.vue";
import DireDataTow from './components/dire_data_tow.vue' import DireDataTow from "./components/dire_data_tow.vue";
import Details from './components/details.vue' import Details from "./components/details.vue";
import FileList from './components/file_list.vue' import FileList from "./components/file_list.vue";
import SimpleList from './components/simple_list.vue' import SimpleList from "./components/simple_list.vue";
import {handleTree} from "@/utils/ebts"; import {handleTree} from "@/utils/ebts";
import {getParentNode, setLanguage} from "@/utils/sist"; import {getParentNode, setLanguage} from "@/utils/sist";
@@ -271,74 +284,74 @@ export default {
bgImage: null, bgImage: null,
crumbs: { crumbs: {
"two": { "two": {
"title": "学院领导", "title": "学院领导"
}, },
"one": { "one": {
"title": "学院概况", "title": "学院概况"
} }
}, },
detailsData: {} detailsData: {}
} };
}, },
watch: { watch: {
$route(to, from) { $route(to, from) {
console.log("我被触发了") console.log("我被触发了");
this.showIndex = 0 this.showIndex = 0;
let arcId = this.$route.params && this.$route.query.id let arcId = this.$route.params && this.$route.query.id;
this.navId = this.$route.params && this.$route.params.navId; this.navId = this.$route.params && this.$route.params.navId;
let id = this.$route.params && this.$route.params.secondId let id = this.$route.params && this.$route.params.secondId;
this.type = this.$route.query && this.$route.query.type this.type = this.$route.query && this.$route.query.type;
if (this.type == 3 || this.type == 1 || this.type == 2) { if (this.type == 3 || this.type == 1 || this.type == 2) {
this.secondId = id this.secondId = id;
this.getCrumbs(); this.getCrumbs();
this.showSecond = false this.showSecond = false;
let info = getParentNode(this.secondId); let info = getParentNode(this.secondId);
console.log("获取到info", info) console.log("获取到info", info);
if (arcId != undefined) { if (arcId != undefined) {
console.log("getContext") console.log("getContext");
this.getContext(arcId) this.getContext(arcId);
} else { } else {
console.log("getContent") console.log("getContent");
this.getContent(info.second) this.getContent(info.second);
} }
return return;
} else { } else {
console.log(this.navId, "this.navId") console.log(this.navId, "this.navId");
if (undefined == this.navId) { if (undefined == this.navId) {
this.getNodes() this.getNodes();
} }
} }
this.showSecond = true this.showSecond = true;
if (arcId != undefined) { if (arcId != undefined) {
this.getContext(arcId) this.getContext(arcId);
} }
try { try {
this.$refs.lab.style.height = this.navList.length * 8 + 10 + 'rem' this.$refs.lab.style.height = this.navList.length * 8 + 10 + "rem";
} catch (e) { } catch (e) {
} }
if (this.secondId == id && this.navList) { if (this.secondId == id && this.navList) {
for (let i = 0; i < this.navList.length; i++) { for (let i = 0; i < this.navList.length; i++) {
if (this.navId == this.navList[i].encodeId) { if (this.navId == this.navList[i].encodeId) {
this.showIndex = i this.showIndex = i;
this.getContent(this.navList[i]) this.getContent(this.navList[i]);
} }
} }
} else { } else {
this.navList = [] this.navList = [];
this.secondId = id this.secondId = id;
this.getNav() this.getNav();
} }
} }
}, },
created() { created() {
setLanguage(this) setLanguage(this);
this.showIndex = 0 this.showIndex = 0;
this.secondId = this.$route.params && this.$route.params.secondId; this.secondId = this.$route.params && this.$route.params.secondId;
this.navId = this.$route.params && this.$route.params.navId; this.navId = this.$route.params && this.$route.params.navId;
this.type = this.$route.query && this.$route.query.type this.type = this.$route.query && this.$route.query.type;
console.log(this.type, "this.type") console.log(this.type, "this.type");
setTimeout(() => { setTimeout(() => {
this.getNav() this.getNav();
}, 200); }, 200);
//this.getNav() //this.getNav()
this.getCrumbs(); this.getCrumbs();
@@ -349,8 +362,8 @@ export default {
*/ */
getCrumbs() { getCrumbs() {
crumbs(this.secondId).then(res => { crumbs(this.secondId).then(res => {
this.crumbs = res.data this.crumbs = res.data;
}) });
}, },
/** /**
* 获得内容 * 获得内容
@@ -358,9 +371,9 @@ export default {
*/ */
getContext(arcId) { getContext(arcId) {
article(arcId).then(res => { article(arcId).then(res => {
this.detailsData = res.data.data this.detailsData = res.data.data;
this.type = null this.type = null;
}) });
}, },
/** /**
* 获得菜单下的信息 * 获得菜单下的信息
@@ -368,34 +381,34 @@ export default {
getNav() { getNav() {
this.getCrumbs(); this.getCrumbs();
if (this.type == 3 || this.type == 1 || this.type == 2) { if (this.type == 3 || this.type == 1 || this.type == 2) {
console.log("进入二级") console.log("进入二级");
this.showSecond = false this.showSecond = false;
let info = null let info = null;
info = getParentNode(this.secondId); info = getParentNode(this.secondId);
if (info == null) { if (info == null) {
location.reload(); location.reload();
} }
let arcId = null let arcId = null;
arcId = this.$route.query && this.$route.query.id arcId = this.$route.query && this.$route.query.id;
console.log(arcId) console.log(arcId);
if (arcId != undefined) { if (arcId != undefined) {
this.getContext(arcId) this.getContext(arcId);
} else { } else {
console.log("获取二级列表") console.log("获取二级列表");
this.getContent(info.second) this.getContent(info.second);
} }
return return;
} }
this.showSecond = true this.showSecond = true;
this.getNodes() this.getNodes();
}, },
/** /**
* 获得节点信息 * 获得节点信息
*/ */
async getNodes() { async getNodes() {
this.navList = [] this.navList = [];
// await getNode({id: this.secondId}).then(res => { // await getNode({id: this.secondId}).then(res => {
// this.navList = res.data // this.navList = res.data
// try { // try {
@@ -425,29 +438,29 @@ export default {
// } // }
// } // }
// }) // })
let res = await getNode({id: this.secondId}) let res = await getNode({id: this.secondId});
// todo 延时异步问题 // todo 延时异步问题
setTimeout(() => { setTimeout(() => {
this.$refs.lab.style.height = res.data.length * 8 + 10 + 'rem' this.$refs.lab.style.height = res.data.length * 8 + 10 + "rem";
}, 100); }, 100);
this.navList = res.data this.navList = res.data;
// if (!this.navList){ // if (!this.navList){
// return // return
// } // }
for (let i = 0; i < this.navList.length; i++) { for (let i = 0; i < this.navList.length; i++) {
if (this.navId == this.navList[i].encodeId) { if (this.navId == this.navList[i].encodeId) {
this.showIndex = i this.showIndex = i;
} }
} }
let arcId = this.$route.query && this.$route.query.id let arcId = this.$route.query && this.$route.query.id;
if (arcId != undefined) { if (arcId != undefined) {
this.getContext(arcId) this.getContext(arcId);
} else { } else {
console.log("测试,我被触发了!") console.log("测试,我被触发了!");
if (this.navId == undefined) { if (this.navId == undefined) {
this.getContent(this.navList[0]) this.getContent(this.navList[0]);
} else { } else {
this.getContent(this.navList[this.showIndex]) this.getContent(this.navList[this.showIndex]);
} }
} }
}, },
@@ -456,39 +469,39 @@ export default {
* @param menu * @param menu
*/ */
getContent(menu) { getContent(menu) {
console.log("getContent内部,menu:", menu) console.log("getContent内部,menu:", menu);
console.log(menu) console.log(menu);
if (menu == undefined) { if (menu == undefined) {
return return;
} }
this.type = menu.type this.type = menu.type;
this.contextData = null this.contextData = null;
this.bgImage = menu.link this.bgImage = menu.link;
let data = null let data = null;
if (this.type === 2 || this.type === 4) { if (this.type === 2 || this.type === 4) {
data = { data = {
id: menu.encodeId, id: menu.encodeId,
pageNum: 1, pageNum: 1,
pageSize: 5 pageSize: 5
} };
this.listDataType = 0 this.listDataType = 0;
if (this.type === 4 || menu.isSimple == 1) { if (this.type === 4 || menu.isSimple == 1) {
data.pageSize = 10 data.pageSize = 10;
this.listDataType = 1 this.listDataType = 1;
} }
} else { } else {
data = { data = {
id: menu.encodeId, id: menu.encodeId
} };
} }
getNode(data).then(res => { getNode(data).then(res => {
console.log(res, "res值") console.log(res, "res值");
console.log(this.type); console.log(this.type);
if (null == res.data && null == res.rows) { if (null == res.data && null == res.rows) {
this.contextData = null this.contextData = null;
console.log("将值设为null", this.contextData) console.log("将值设为null", this.contextData);
this.type = 0 this.type = 0;
return return;
} }
if (this.type === 2 || this.type === 4) { if (this.type === 2 || this.type === 4) {
this.contextData = { this.contextData = {
@@ -497,21 +510,21 @@ export default {
pageNum: data.pageNum, pageNum: data.pageNum,
pageSize: data.pageSize, pageSize: data.pageSize,
navId: menu.encodeId, navId: menu.encodeId,
secondId: this.secondId, secondId: this.secondId
} };
} else if (this.type == 1) { } else if (this.type == 1) {
this.contextData = res.data this.contextData = res.data;
} else if (this.type == 3) { } else if (this.type == 3) {
if (res.additional == "") { if (res.additional == "") {
this.dreDataType = "1" this.dreDataType = "1";
} else { } else {
console.log(this.dreDataType, "this.organizationType") console.log(this.dreDataType, "this.organizationType");
this.dreDataType = res.additional this.dreDataType = res.additional;
} }
this.contextData = handleTree(res.data, "id", "pid", null, null) this.contextData = handleTree(res.data, "id", "pid", null, null);
console.log(this.contextData, "this.contextData") console.log(this.contextData, "this.contextData");
} }
}) });
}, },
@@ -522,14 +535,14 @@ export default {
*/ */
navClick(nav, index) { navClick(nav, index) {
//if (index != this.showIndex) { //if (index != this.showIndex) {
this.showIndex = index this.showIndex = index;
this.type = nav.type this.type = nav.type;
this.$router.push("/pc/" + this.secondId + "/" + nav.encodeId + "?lang=" + sessionStorage.getItem("lang")); this.$router.push("/pc/" + this.secondId + "/" + nav.encodeId + "?lang=" + sessionStorage.getItem("lang"));
//this.getContent(nav) //this.getContent(nav)
//} //}
} }
},
} }
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@@ -579,9 +592,9 @@ export default {
box-shadow: 0rem 0.2rem 0.4rem 0rem rgba(6, 42, 102, 0.67); box-shadow: 0rem 0.2rem 0.4rem 0rem rgba(6, 42, 102, 0.67);
border-radius: 0rem 0rem 2.5rem 2rem; border-radius: 0rem 0rem 2.5rem 2rem;
.lab_list:last-child { //.lab_list:last-child {
border: none; // border: none;
} //}
.lab_div { .lab_div {
border-bottom: 0.1rem solid #94BCFF !important; border-bottom: 0.1rem solid #94BCFF !important;
@@ -637,21 +650,33 @@ export default {
} }
} }
.left_bgc{ //.left_lab {
width: 13.8rem; // --lab: 1.5rem;
//height: 250px; // --left_lab: calc(var(--lab) * 3.2);
background: #1956BC; // width: 22rem;
border-radius: 0px 0px 13px 0px; // background: #1956BC;
position: relative; // border-radius: 0 0 13px 0;
.right_bgc{ // padding-bottom: var(--left_lab);
// padding-top: 5rem;
width: 119px; // padding-left: 4.8rem;
height: 200px; // margin-left: 4rem;
background: #FFFFFF; // .lab {
box-shadow: 0px 1px 3px 0px rgba(6,42,102,0.67); // background: #FFFFFF;
border-radius: 0px 0px 16px 13px; // box-shadow: 0 1px 3px 0 rgba(6, 42, 102, 0.67);
} // border-radius: 0 0 16px 13px;
} // margin-right: -2rem!important;
// .lab_div {
// padding-left: var(--lab);
// .lab_list {
// line-height: 8rem;
// border-bottom: .1rem solid #94BCFF;
// }
// .lab_list:last-child {
// border-bottom: none !important;
// }
// }
// }
//}
.tab { .tab {
margin-left: 1.9rem; margin-left: 1.9rem;
@@ -680,7 +705,6 @@ export default {
width: 14.25rem; width: 14.25rem;
margin-bottom: 2.25rem; margin-bottom: 2.25rem;
border-radius: 0rem 0rem 1.2rem 1rem; border-radius: 0rem 0rem 1.2rem 1rem;
.lab_list { .lab_list {
margin-left: .75rem; margin-left: .75rem;
width: 13.5rem; width: 13.5rem;
@@ -699,6 +723,8 @@ export default {
margin-left: 1.5rem; margin-left: 1.5rem;
} }
} }
} }
} }
} }

View File

@@ -19,13 +19,13 @@
<!--轮播图下的新闻--> <!--轮播图下的新闻-->
<div class="news"> <div class="news">
<el-row> <el-row>
<el-col :span="6" v-for="(item,index) in newsData" :key="index"> <el-col :span="6" v-for="(item,index) in newsData" :key="index" :class="'border_right-' + (index + 1)">
<div class="news_context" @click="getArticle(item)"> <div class="news_context" @click="getArticle(item)">
<div class="news_context_img"> <div class="news_context_img">
<img v-if="!item.imgurl" src="../../../assets/index/news_center/t4.png" alt=""> <img v-if="!item.imgurl" src="../../../assets/index/news_center/t4.png" alt="">
<img v-if="item.imgurl" :src="item.imgurl" alt=""> <img v-if="item.imgurl" :src="item.imgurl" alt="">
</div> </div>
<div class="news_context_text" style="border-right: 1px solid #CCCCCC;"> <div class="news_context_text" >
<div class="news_context_text-title">{{ item.title }}</div> <div class="news_context_text-title">{{ item.title }}</div>
<div class="news_context_text-content" v-html="item.content"> <div class="news_context_text-content" v-html="item.content">
</div> </div>
@@ -223,6 +223,14 @@ export default {
} }
} }
.border_right-4{
.news_context{
.news_context_text{
border-right: none!important;
}
}
}
.news { .news {
margin: 4rem auto 0 auto; margin: 4rem auto 0 auto;
width: 115.4rem; width: 115.4rem;
@@ -261,7 +269,7 @@ export default {
.news_context_text { .news_context_text {
margin: 2rem 0 2rem 2rem; margin: 2rem 0 2rem 2rem;
padding-right: 2rem; padding-right: 2rem;
//border-right: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC;
.news_context_text-title { .news_context_text-title {
&:hover { &:hover {
color: #0040A4; color: #0040A4;