8 Commits

12 changed files with 248 additions and 295 deletions

View File

@@ -3,7 +3,7 @@ ENV = 'development'
# EBTS/开发环境 # EBTS/开发环境
#VUE_APP_BASE_API = '/dev-api' #VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.101.4:8085/dev-api' VUE_APP_BASE_API = 'http://192.168.101.5:8085/dev-api'
#VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api' #VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api'
SITE_TYPE = 'NEd5n92EMIpyyBslaNqsRgE' SITE_TYPE = 'NEd5n92EMIpyyBslaNqsRgE'
#VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api' #VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'

View File

@@ -30,6 +30,13 @@ export function getNode(data) {
data:data data:data
}) })
} }
export function getNodeNav(data) {
return request({
url: '/web/nodeNav',
method: 'post',
data:data
})
}
// 获取文章列表 // 获取文章列表
export function getArticleList(data) { export function getArticleList(data) {
return request({ return request({

View File

@@ -98,19 +98,22 @@ export function toArticle(news, width) {
if (info == null) { if (info == null) {
return return
} }
let routeData = null;
if (info.three == null) { if (info.three == null) {
if (width) { if (width) {
vm.$router.push("/pc/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang")); routeData = vm.$router.resolve("/pc/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
} else { } else {
vm.$router.push("/mobile/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang")); routeData = vm.$router.resolve("/mobile/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
} }
} else { } else {
console.log(info.three, "toArticle,info.three")
if (width) { if (width) {
vm.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "&id=" + news.id + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang")); routeData = vm.$router.resolve("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
} else { } else {
vm.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "&id=" + news.id + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang")); routeData = vm.$router.resolve("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
} }
} }
window.open(routeData.href,"_blank")
}) })
} }

View File

@@ -64,8 +64,8 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.context { .context {
margin: 3rem 2rem; margin: 2rem 2rem;
padding-bottom: 3rem; //padding-bottom: 3rem;
//width: 84.3rem; //width: 84.3rem;
//background: #FFFFFF; //background: #FFFFFF;

View File

@@ -39,7 +39,8 @@
<div class="tw_context_title" @click="getContext(item)"> <div class="tw_context_title" @click="getContext(item)">
{{ item.title }} {{ item.title }}
</div> </div>
<div class="tw_context_text" v-html="item.content"></div> <div v-if="item.description" class="tw_context_text">{{item.description}}</div>
<div v-if="!item.description" class="tw_context_text" v-html="item.content"></div>
</div> </div>
</el-col> </el-col>
<el-col v-show="width>992" :xs="1" :sm="1" :md="3" :lg="4" :xl="3"> <el-col v-show="width>992" :xs="1" :sm="1" :md="3" :lg="4" :xl="3">

View File

@@ -102,7 +102,13 @@ export default {
let time = new Date(date); let time = new Date(date);
let year = time.getFullYear(); let year = time.getFullYear();
let month = time.getMonth() + 1 let month = time.getMonth() + 1
if (month < 10){
month = "0"+month
}
let day = time.getDate(); let day = time.getDate();
if (day<10){
day = "0"+ day
}
return year + "-" + month + "-" + day; return year + "-" + month + "-" + day;
}, },
getContext(context) { getContext(context) {
@@ -177,6 +183,7 @@ export default {
.article_name { .article_name {
float: left; float: left;
cursor: pointer;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; //作为弹性伸缩盒子模型显示。 display: -webkit-box; //作为弹性伸缩盒子模型显示。

View File

@@ -45,6 +45,7 @@
</div> </div>
</el-col> </el-col>
<el-col v-if="$i18n.locale === 'en'" :xs="2" :sm="2" :md="2" :lg="2" :xl="3"> <el-col v-if="$i18n.locale === 'en'" :xs="2" :sm="2" :md="2" :lg="2" :xl="3">
<div class="grid-content"></div> <div class="grid-content"></div>
</el-col> </el-col>
@@ -80,96 +81,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>
<!--<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>
<span>
<span v-if="$i18n.locale === 'cn'">{{ crumbs.two.title }}</span>
<span v-if="$i18n.locale === 'en'">{{ crumbs.two.englishTitle }}</span>
</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col>
<Introduction :introduction="contextData" v-if="type === 1"/>
<List :list="contextData" v-if="type === 2 && listDataType == 0"/>
<SimpleList :list="contextData" v-if="type === 2 && listDataType == 1"/>
<FileList :value="contextData" v-if="type === 4"/>
<DireData :value="contextData" v-if="type === 3 && dreDataType == '1'"/>
<DireDataTow :value="contextData" v-if="type === 3 && dreDataType == '2'"/>
<Details :value="detailsData" v-if="type == null"/>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row v-show="false">
<el-col v-if="$i18n.locale === 'cn'" :xs="2" :sm="2" :md="1.5" :lg="2" :xl="4">
<div class="grid-content"></div>
</el-col>
<el-col v-if="$i18n.locale === 'cn'" v-show="width" :md="6" :lg="6" :xl="4">
<div class="left_lab">
<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>
</el-col>
<el-col v-if="$i18n.locale === 'en'" :xs="2" :sm="2" :md="2" :lg="2" :xl="3">
<div class="grid-content"></div>
</el-col>
<el-col v-if="$i18n.locale === 'en'" v-show="width" :md="6" :lg="6" :xl="5">
<div class="left_lab english" 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.englishTitle }}
</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.englishTitle }}
</div>
</div>
</div>
</div>
</div>
</el-col>
<!--<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 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="">-->
@@ -207,7 +119,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="">-->
@@ -248,15 +160,16 @@
<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";
import {getNodeNav} from "../../api";
export default { export default {
name: "index", name: "index",
@@ -284,86 +197,104 @@ 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("$route触发了")
this.showIndex = 0; this.showIndex = 0
let arcId = this.$route.params && this.$route.query.id; this.rest()
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.showSecond = false
this.getCrumbs(); this.getCrumbs();
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(); console.log(this.navId, "this.navId1")
this.secondId = id
this.getNodes()
this.getCrumbs();
} }
} }
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) {
} }
this.showIndex = 0
// if (this.secondId!=id){
// this.getCrumbs();
// }
console.log("开始循环查找id信息",this.secondId == id && this.navList,this.secondId , id, this.navList)
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; console.log("找到了")
this.getContent(this.navList[i]); this.showIndex = i
this.getContent(this.navList[i])
} }
} }
} else { } else {
this.navList = []; console.log("跳转的路由和以前不一样")
this.secondId = id; this.navList = []
this.getNav(); this.secondId = id
this.getNav()
} }
} }
}, },
created() { created() {
setLanguage(this); console.log("created触发了")
this.showIndex = 0; setLanguage(this)
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()
this.getNodes()
}, 200); }, 200);
//this.getNav() //this.getNav()
this.getCrumbs(); this.getCrumbs();
}, },
methods: { methods: {
rest() {
this.showIndex = 0
this.navId = null
this.type = null
},
/** /**
* 获得面包屑导航 * 获得面包屑导航
*/ */
getCrumbs() { getCrumbs(id) {
crumbs(this.secondId).then(res => { crumbs(this.secondId).then(res => {
this.crumbs = res.data; this.crumbs = res.data
}); })
}, },
/** /**
* 获得内容 * 获得内容
@@ -371,9 +302,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
}); })
}, },
/** /**
* 获得菜单下的信息 * 获得菜单下的信息
@@ -381,34 +312,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();
}, },
/** /**
* 获得节点信息 * 获得节点信息
*/ */
async getNodes() { async getNodes() {
this.navList = []; console.log("getNodes被触发了")
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 {
@@ -438,29 +369,38 @@ export default {
// } // }
// } // }
// }) // })
let res = await getNode({id: this.secondId}); let res = await getNodeNav({id: this.secondId})
// todo 延时异步问题 // todo 延时异步问题
setTimeout(() => { console.log(res, "2222")
this.$refs.lab.style.height = res.data.length * 8 + 10 + "rem"; if (res.data.length == 0) {
}, 100); this.navList = []
this.navList = res.data; this.showSecond = false
return
}
this.navList = res.data
// setTimeout(() => {
this.$refs.lab.style.height = res.data.length * 8 + 10 + 'rem'
console.log("qqq")
// }, 100);
// 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
console.log("进入到arcId 的判断", arcId)
if (arcId != undefined) { if (arcId != undefined) {
this.getContext(arcId); this.getContext(arcId)
} else { } else {
console.log("测试,我被触发了!"); console.log("进入到this.navId 的判断", this.navId)
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])
} }
} }
}, },
@@ -469,39 +409,39 @@ export default {
* @param menu * @param menu
*/ */
getContent(menu) { getContent(menu) {
console.log("getContent内部,menu:", menu); console.log("getContent被触发了", 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
console.log(menu.isSimple,"menu.isSimple")
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 = {
@@ -510,21 +450,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")
} }
}); })
}, },
@@ -535,14 +475,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">
@@ -592,9 +532,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;
@@ -650,34 +590,6 @@ export default {
} }
} }
//.left_lab {
// --lab: 1.5rem;
// --left_lab: calc(var(--lab) * 3.2);
// width: 22rem;
// background: #1956BC;
// border-radius: 0 0 13px 0;
// padding-bottom: var(--left_lab);
// padding-top: 5rem;
// padding-left: 4.8rem;
// margin-left: 4rem;
// .lab {
// background: #FFFFFF;
// 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;
margin-top: 1.5rem; margin-top: 1.5rem;
@@ -686,7 +598,6 @@ export default {
a { a {
text-decoration: none; text-decoration: none;
font-size: 1.4rem !important;
color: #3C3C3C; color: #3C3C3C;
} }
} }
@@ -705,26 +616,25 @@ 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 {
margin-left: .75rem;
width: 13.5rem;
height: 6rem;
line-height: 6rem;
.lab_img { .lab_list {
margin-top: .1rem; margin-left: .75rem;
width: 1.05rem; width: 13.5rem;
height: 1.05rem; height: 6rem;
display: none; line-height: 6rem;
margin-left: 3rem;
}
.lab_title { .lab_img {
margin-left: 1.5rem; margin-top: .1rem;
} width: 1.05rem;
height: 1.05rem;
display: none;
margin-left: 3rem;
} }
.lab_title {
margin-left: 1.5rem;
}
}
} }
} }
} }

View File

@@ -34,8 +34,8 @@
<div class="academy_content_title"> <div class="academy_content_title">
{{sciencesData[0].title}} {{sciencesData[0].title}}
</div> </div>
<div class="academy_content_text" v-html="sciencesData[0].content"> <div v-if="sciencesData[0].description" class="academy_content_text">{{sciencesData[0].description}}</div>
</div> <div v-if="!sciencesData[0].description" class="academy_content_text" v-html="sciencesData[0].content"></div>
</div> </div>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
@@ -50,8 +50,8 @@
<div class="academy_content_title"> <div class="academy_content_title">
{{sciencesData[1].title}} {{sciencesData[1].title}}
</div> </div>
<div class="academy_content_text" v-html="sciencesData[1].content"> <div v-if="sciencesData[1].description" class="academy_content_text">{{sciencesData[1].description}}</div>
</div> <div v-if="!sciencesData[1].description" class="academy_content_text" v-html="sciencesData[1].content"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@@ -65,8 +65,8 @@
<div class="academy_content_title"> <div class="academy_content_title">
{{sciencesData[2].title}} {{sciencesData[2].title}}
</div> </div>
<div class="academy_content_text" v-html="sciencesData[2].content"> <div v-if="sciencesData[2].description" class="academy_content_text">{{sciencesData[2].description}}</div>
</div> <div v-if="!sciencesData[2].description" class="academy_content_text" v-html="sciencesData[2].content"></div>
</div> </div>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
@@ -83,8 +83,8 @@
<div class="academy_content_title"> <div class="academy_content_title">
{{sciencesData[3].title}} {{sciencesData[3].title}}
</div> </div>
<div class="academy_content_text" v-html="sciencesData[3].content"> <div v-if="sciencesData[3].description" class="academy_content_text">{{sciencesData[3].description}}</div>
</div> <div v-if="!sciencesData[3].description" class="academy_content_text" v-html="sciencesData[3].content"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@@ -153,14 +153,26 @@ export default {
let time = new Date(date); let time = new Date(date);
let year = time.getFullYear(); let year = time.getFullYear();
let month = time.getMonth() + 1 let month = time.getMonth() + 1
if (month < 10){
month = "0"+month
}
let day = time.getDate(); let day = time.getDate();
if (day<10){
day = "0"+ day
}
return year + "-" + month + "-" + day; return year + "-" + month + "-" + day;
}, },
getMonthTime(date) { getMonthTime(date) {
let time = new Date(date); let time = new Date(date);
let month = time.getMonth() + 1 let month = time.getMonth() + 1
if (month < 10){
month = "0"+month
}
let day = time.getDate(); let day = time.getDate();
if (day<10){
day = "0"+ day
}
return month + "-" + day; return month + "-" + day;
}, },
}, },
@@ -264,6 +276,7 @@ export default {
color: #0049AF; color: #0049AF;
.academy_content_text{ .academy_content_text{
color: #575757; color: #575757;
font-size: 1.4rem !important;
} }
.img { .img {
@@ -314,7 +327,7 @@ export default {
//width: 139px; //width: 139px;
width: 100%; width: 100%;
//height: 38px; //height: 38px;
font-size: 1.4rem; font-size: 1.6rem;
font-weight: bold; font-weight: bold;
//color: #FFFFFF; //color: #FFFFFF;
line-height: 1.9rem; line-height: 1.9rem;

View File

@@ -23,8 +23,8 @@
</div> </div>
<div class="announcements_text_line"></div> <div class="announcements_text_line"></div>
<div class="announcements_text_title">{{item.title}}</div> <div class="announcements_text_title">{{item.title}}</div>
<div class="announcements_text_content" v-html="item.content"> <div v-if="item.description" class="announcements_text_content">{{item.description}}</div>
</div> <div v-if="!item.description" class="announcements_text_content" v-html="item.content"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@@ -173,7 +173,7 @@ export default {
width: 100%; width: 100%;
height: 3.8rem; height: 3.8rem;
font-size: 1.4rem; font-size: 1.6rem;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
line-height: 1.9rem; line-height: 1.9rem;
@@ -189,7 +189,7 @@ export default {
&_content { &_content {
width: 100%; width: 100%;
height: 7rem; height: 7rem;
font-size: 1rem; font-size: 1.4rem;
font-weight: 500; font-weight: 500;
color: #777777; color: #777777;
line-height: 1.8rem; line-height: 1.8rem;

View File

@@ -21,7 +21,7 @@
<td> <td>
<div class="right one"> <div class="right one">
<div class="table_tr_left">{{ $t('message.employees') }}</div> <div class="table_tr_left">{{ $t('message.employees') }}</div>
<div class="table_tr_right">{{data.worker}}</div> <div class="table_tr_right">{{data.worker}}</div>
</div> </div>
</td> </td>
</tr> </tr>
@@ -29,7 +29,7 @@
<td> <td>
<div class="right tow"> <div class="right tow">
<div class="table_tr_left">{{ $t('message.number_students') }}</div> <div class="table_tr_left">{{ $t('message.number_students') }}</div>
<div class="table_tr_right">{{data.students}}</div> <div class="table_tr_right">{{data.students}}</div>
</div> </div>
</td> </td>
</tr> </tr>
@@ -37,7 +37,7 @@
<td> <td>
<div class="right three"> <div class="right three">
<div class="table_tr_left">{{ $t('message.graduate_tutor') }}</div> <div class="table_tr_left">{{ $t('message.graduate_tutor') }}</div>
<div class="table_tr_right">{{data.postgraduateTutor}}</div> <div class="table_tr_right">{{data.postgraduateTutor}}</div>
</div> </div>
</td> </td>
</tr> </tr>
@@ -45,7 +45,7 @@
<td> <td>
<div class="right fourth"> <div class="right fourth">
<div class="table_tr_left">{{ $t('message.research_team') }}</div> <div class="table_tr_left">{{ $t('message.research_team') }}</div>
<div class="table_tr_right">{{data.scientificTeam}}</div> <div class="table_tr_right">{{data.scientificTeam}}</div>
</div> </div>
</td> </td>
</tr> </tr>
@@ -53,7 +53,7 @@
<td> <td>
<div class="right five"> <div class="right five">
<div class="table_tr_left">{{ $t('message.high_level_talents') }}</div> <div class="table_tr_left">{{ $t('message.high_level_talents') }}</div>
<div class="table_tr_right">{{data.highLevelTalents}}</div> <div class="table_tr_right">{{data.highLevelTalents}}</div>
</div> </div>
</td> </td>
</tr> </tr>
@@ -61,7 +61,7 @@
<td> <td>
<div class="right six"> <div class="right six">
<div class="table_tr_left">{{ $t('message.major_projects') }}</div> <div class="table_tr_left">{{ $t('message.major_projects') }}</div>
<div class="table_tr_right">{{data.majorProjects}}</div> <div class="table_tr_right">{{data.majorProjects}}</div>
</div> </div>
</td> </td>
</tr> </tr>

View File

@@ -22,13 +22,12 @@
<el-col :span="6" v-for="(item,index) in newsData" :key="index" :class="'border_right-' + (index + 1)"> <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="item.imgurl" alt=""> <img v-if="item.imgurl" :src="item.imgurl" alt="">
</div> </div>
<div class="news_context_text" > <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 v-if="item.description" class="news_context_text-content">{{item.description}}</div>
</div> <div v-if="!item.description" class="news_context_text-content" v-html="item.content"></div>
<div class="news_context_time"> <div class="news_context_time">
<div class="icon"><img src="../../../assets/index/news_center/shijian.png" alt=""></div> <div class="icon"><img src="../../../assets/index/news_center/shijian.png" alt=""></div>
<span class="time">{{ getDateTime(item.publishTime) }}</span> <span class="time">{{ getDateTime(item.publishTime) }}</span>
@@ -82,7 +81,13 @@ export default {
let time = new Date(date); let time = new Date(date);
let year = time.getFullYear(); let year = time.getFullYear();
let month = time.getMonth() + 1 let month = time.getMonth() + 1
if (month < 10){
month = "0"+month
}
let day = time.getDate(); let day = time.getDate();
if (day<10){
day = "0"+ day
}
return year + "-" + month + "-" + day; return year + "-" + month + "-" + day;
}, },
}, },
@@ -231,6 +236,7 @@ export default {
} }
} }
.news { .news {
margin: 4rem auto 0 auto; margin: 4rem auto 0 auto;
width: 115.4rem; width: 115.4rem;
@@ -318,7 +324,6 @@ export default {
} }
.time { .time {
width: 6rem;
height: 1.4rem; height: 1.4rem;
font-size: 1rem; font-size: 1rem;
font-weight: 500; font-weight: 500;

View File

@@ -9,12 +9,13 @@
<span>{{ $t("message.undergraduate_education") }}</span> <span>{{ $t("message.undergraduate_education") }}</span>
</div> </div>
<div class="vline"> <div class="vline">
<div class="undergraduate_content" v-for="(item,index) in undergraduateData" :key="index" @click="getArticle(item)"> <div class="undergraduate_content" v-for="(item,index) in undergraduateData" :key="index"
@click="getArticle(item)">
<div class="undergraduate_content_time"> <div class="undergraduate_content_time">
{{getMonthTime(item.publishTime)}} {{ getMonthTime(item.publishTime) }}
</div> </div>
<div class="undergraduate_content_text"> <div class="undergraduate_content_text">
{{item.title}} {{ item.title }}
</div> </div>
</div> </div>
<div class="more" @click="lookMore('KW_T7dJ2lt5sC-RJZSnPtk0')"> <div class="more" @click="lookMore('KW_T7dJ2lt5sC-RJZSnPtk0')">
@@ -25,15 +26,17 @@
</el-col> </el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="graduate headline"> <div class="graduate headline">
<img class="graduate_img" src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png" alt=""/> <img class="graduate_img" src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png"
alt=""/>
<span>{{ $t("message.postgraduate_education") }}</span> <span>{{ $t("message.postgraduate_education") }}</span>
</div> </div>
<div class="undergraduate_content" v-for="(item,index) in graduateData" :key="index" @click="getArticle(item)"> <div class="undergraduate_content" v-for="(item,index) in graduateData" :key="index"
@click="getArticle(item)">
<div class="undergraduate_content_time"> <div class="undergraduate_content_time">
{{getMonthTime(item.publishTime)}} {{ getMonthTime(item.publishTime) }}
</div> </div>
<div class="undergraduate_content_text"> <div class="undergraduate_content_text">
{{item.title}} {{ item.title }}
</div> </div>
</div> </div>
<div class="more" @click="lookMore('1yaM_T4qiBsFULvLXHbMflQ')"> <div class="more" @click="lookMore('1yaM_T4qiBsFULvLXHbMflQ')">
@@ -54,10 +57,10 @@ import {lookMoreFixedComment} from "../../../utils/sist";
export default { export default {
name: "undergraduate_and_graduate", name: "undergraduate_and_graduate",
data(){ data() {
return{ return {
undergraduateData:[], undergraduateData: [],
graduateData:[], graduateData: [],
width: document.documentElement.clientWidth > 992 width: document.documentElement.clientWidth > 992
} }
}, },
@@ -72,6 +75,7 @@ export default {
window.location.href = link;//当前标签页 window.location.href = link;//当前标签页
}, },
getArticle(news) { getArticle(news) {
console.log(news)
toArticle(news, this.width); toArticle(news, this.width);
}, },
lookMore(str) { lookMore(str) {
@@ -96,18 +100,16 @@ export default {
}); });
}, },
getDateTime(date) {
let time = new Date(date);
let year = time.getFullYear();
let month = time.getMonth() + 1
let day = time.getDate();
return year + "-" + month + "-" + day;
},
getMonthTime(date) { getMonthTime(date) {
let time = new Date(date); let time = new Date(date);
let month = time.getMonth() + 1 let month = time.getMonth() + 1
if (month < 10) {
month = "0" + month
}
let day = time.getDate(); let day = time.getDate();
if (day < 10) {
day = "0" + day
}
return month + "-" + day; return month + "-" + day;
}, },
}, },
@@ -117,9 +119,10 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.undergraduate_content{ .undergraduate_content {
cursor: pointer; cursor: pointer;
} }
@media screen and (max-width: 960px) { @media screen and (max-width: 960px) {
.undergraduate { .undergraduate {
border-radius: 36px 36px 0 0 !important; border-radius: 36px 36px 0 0 !important;
@@ -128,12 +131,13 @@ export default {
border-radius: 36px 36px 0 0 !important; border-radius: 36px 36px 0 0 !important;
} }
.more { .more {
justify-content: center!important; justify-content: center !important;
} }
.vline { .vline {
border-right: none!important; border-right: none !important;
} }
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.undergraduate { .undergraduate {
border-radius: 36px 36px 0 0 !important; border-radius: 36px 36px 0 0 !important;
@@ -142,11 +146,11 @@ export default {
border-radius: 36px 36px 0 0 !important; border-radius: 36px 36px 0 0 !important;
} }
.more { .more {
justify-content: center!important; justify-content: center !important;
} }
.vline { .vline {
border-right: none!important; border-right: none !important;
} }
} }
@@ -192,10 +196,12 @@ export default {
.undergraduate { .undergraduate {
border-radius: 36px 0 0 0; border-radius: 36px 0 0 0;
&_img{
&_img {
width: 3.1rem; width: 3.1rem;
height: 3.3rem; height: 3.3rem;
} }
&_content { &_content {
display: flex; display: flex;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
@@ -258,7 +264,8 @@ export default {
.graduate { .graduate {
border-radius: 0 36px 0 0; border-radius: 0 36px 0 0;
&_img{
&_img {
width: 4.3rem; width: 4.3rem;
height: 3.3rem; height: 3.3rem;
} }