clay commit : 通知公告响应式基本完成

Reviewed-on: http://git.hchyun.com/feashow/sist_web/pulls/17
This commit is contained in:
clay
2022-10-05 08:13:51 +00:00
6 changed files with 146 additions and 52 deletions

View File

@@ -18,10 +18,8 @@
{{ chile.name }}<span v-if="chile.children.length>1">({{chile.children.length}})</span> {{ chile.name }}<span v-if="chile.children.length>1">({{chile.children.length}})</span>
</el-col> </el-col>
<el-col class="text" :offset="1" :span="23"> <el-col class="text" :offset="1" :span="23">
<div v-for="(item,index) in chile.children" :key="index"> <div v-for="(item,index) in chile.children" :key="index" @click="linkClick(item)">
<a :href="item.link">
{{ item.name }} {{ item.name }}
</a>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@@ -57,6 +55,13 @@ export default {
}], }],
}, },
}, },
methods:{
linkClick(chile){
if (chile.link){
window.open(chile.link)
}
}
}
} }
</script> </script>
@@ -104,16 +109,13 @@ export default {
div { div {
float: left; float: left;
margin-top: .4rem; margin-top: .4rem;
cursor: pointer;
//width: 7.4%; //width: 7.4%;
margin-left: 1rem; margin-right: 1.5rem;
margin-right: 1rem; color: #000000;
a{ }
color: #000000; div:hover{
text-decoration: none color: #1956BC;
}
a:hover{
color: #1956BC;
}
} }
} }
} }

View File

@@ -0,0 +1,109 @@
<template>
<div class="dire_data" style="background-color:#fff; margin-top: 3rem;">
<el-row v-for="(dire,index) in value" :key="index">
<!--正文内容-->
<el-col class="context" :span="23">
<el-row class="context_el-row">
<el-col :span="1" :offset="1">
<img class="context_img" src="@/assets/teaching_staff/eji_icon_ys.png" alt="">
</el-col>
<el-col :span="4" class="context_name">{{ dire.name }}</el-col>
<el-col :span="16">
<hr class="context_hr">
</el-col>
</el-row>
<el-row>
<el-col :offset="1" :span="22">
<div class="name" v-for="(chile,index) in dire.children" :key="index" @click="linkClick(chile)">
{{ chile.name }}
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: "dire_data_tow",
data() {
return {
width: document.documentElement.clientWidth
}
},
props:{
value: {
type: Array,
default: [{
name: "学院",
children: [
{
name: "办公室",
children: [
{
children: [],
name: "人员1"
},
],
}
],
}],
},
},
methods:{
linkClick(chile){
if (chile.link){
window.open(chile.link)
}
}
}
}
</script>
<style scoped lang="scss">
.context {
margin: 3rem 2rem;
padding-bottom: 3rem;
//width: 84.3rem;
//background: #FFFFFF;
.context_el-row {
margin-top: 2rem;
.context_img {
width: 2.2rem;
}
.context_name {
font-size: 1.8rem;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #1956BC;
line-height: 2.2rem;
}
.context_hr {
line-height: 2.2rem;
margin-top: 1.1rem;
border: #1956BC solid 0.1rem;
background-color: #1956BC;
}
}
.name {
margin-top: 2rem;
font-size: 1.6rem;
font-weight: 600;
display: inline-block;
margin-right: 1.5rem;
cursor: pointer;
color: #000000;
}
.name:hover {
color: #1956BC;
}
}
</style>

View File

@@ -1,13 +0,0 @@
<template>
</template>
<script>
export default {
name: "organization"
}
</script>
<style scoped>
</style>

View File

@@ -102,8 +102,8 @@
<Introduction :introduction="contextData" v-if="type === 1"/> <Introduction :introduction="contextData" v-if="type === 1"/>
<List :list="contextData" v-if="type === 2"/> <List :list="contextData" v-if="type === 2"/>
<FileList :value="contextData" v-if="type === 4"/> <FileList :value="contextData" v-if="type === 4"/>
<DireData :value="contextData" v-if="type === 3 && organizationType == '1'"/> <DireData :value="contextData" v-if="type === 3 && dreDataType == '1'"/>
<Organization :value="contextData" v-if="type === 3 && organizationType == '2'"/> <DireDataTow :value="contextData" v-if="type === 3 && dreDataType == '2'"/>
<Details :value="detailsData" v-if="type == null"/> <Details :value="detailsData" v-if="type == null"/>
</el-col> </el-col>
</el-row> </el-row>
@@ -141,8 +141,8 @@
<Introduction :introduction="contextData" v-if="type === 1"/> <Introduction :introduction="contextData" v-if="type === 1"/>
<List :list="contextData" v-if="type === 2"/> <List :list="contextData" v-if="type === 2"/>
<FileList :value="contextData" v-if="type === 4"/> <FileList :value="contextData" v-if="type === 4"/>
<DireData :value="contextData" v-if="type === 3 && organizationType == '1'"/> <DireData :value="contextData" v-if="type === 3 && dreDataType == '1'"/>
<Organization :value="contextData" v-if="type === 3 && organizationType == '2'"/> <DireDataTow :value="contextData" v-if="type === 3 && dreDataType == '2'"/>
<Details :value="detailsData" v-if="type == null"/> <Details :value="detailsData" v-if="type == null"/>
</el-col> </el-col>
</el-row> </el-row>
@@ -161,7 +161,7 @@ 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 Organization from './components/organization.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 {handleTree} from "@/utils/ebts"; import {handleTree} from "@/utils/ebts";
@@ -174,14 +174,15 @@ export default {
List, List,
DireData, DireData,
Details, Details,
FileList FileList,
DireDataTow
}, },
data() { data() {
return { return {
width: document.documentElement.clientWidth > 992, width: document.documentElement.clientWidth > 992,
secondId: null, secondId: null,
navId: null, navId: null,
organizationType: "", dreDataType: "",
navList: [], navList: [],
showIndex: 0, showIndex: 0,
showSecond: true, showSecond: true,
@@ -416,10 +417,10 @@ export default {
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.organizationType = "1" this.dreDataType = "1"
} else { } else {
console.log(this.organizationType, "this.organizationType") console.log(this.dreDataType, "this.organizationType")
this.organizationType = 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")

View File

@@ -1,12 +1,9 @@
<template> <template>
<div class="academy_and_sciences"> <div class="academy_and_sciences">
<el-row> <el-row type="flex" justify="center">
<el-col :xs="1" :sm="1" :md="2" :lg="2" :xl="2" > <el-col :xs="22" :sm="22" :md="20" :lg="16" :xl="14" >
<div class="grid-content"></div>
</el-col>
<el-col :xs="23" :sm="22" :md="20" :lg="20" :xl="20" >
<el-row> <el-row>
<el-col :span="12"> <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="sciences_title"> <div class="sciences_title">
科学研究 科学研究
</div> </div>
@@ -87,7 +84,7 @@
<img src="../../../assets/index/academy_and_sciences/gangduobai1.png" alt=""> <img src="../../../assets/index/academy_and_sciences/gangduobai1.png" alt="">
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="academy_title"> <div class="academy_title">
学术交流 学术交流
</div> </div>
@@ -181,7 +178,7 @@ export default {
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 100%; width: 100%;
height: 68.3rem; //height: 68.3rem;
.sciences_title, .academy_title { .sciences_title, .academy_title {
display: flex; display: flex;
@@ -234,6 +231,7 @@ export default {
display: flex; display: flex;
height: 2.3rem; height: 2.3rem;
margin-top: 3.4rem; margin-top: 3.4rem;
margin-bottom: 2rem;
cursor: pointer; cursor: pointer;
.more_text { .more_text {
font-size: 1.6rem; font-size: 1.6rem;

View File

@@ -1,12 +1,9 @@
<template> <template>
<div class="undergraduate_and_graduate"> <div class="undergraduate_and_graduate">
<el-row> <el-row type="flex" justify="center">
<el-col :xs="1" :sm="1" :md="2" :lg="2" :xl="2"> <el-col :xs="22" :sm="22" :md="20" :lg="16" :xl="14" >
<div class="grid-content"></div>
</el-col>
<el-col :xs="23" :sm="22" :md="20" :lg="20" :xl="20" >
<el-row class="undergraduate_and_graduate_bgc"> <el-row class="undergraduate_and_graduate_bgc">
<el-col :span="12"> <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="undergraduate headline"> <div class="undergraduate headline">
<img src="../../../assets/index/undergraduate_and_graduate/benka.png" alt=""/> <img src="../../../assets/index/undergraduate_and_graduate/benka.png" alt=""/>
<span>本科教育</span> <span>本科教育</span>
@@ -58,7 +55,7 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="graduate headline"> <div class="graduate headline">
<img src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png" alt=""/> <img src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png" alt=""/>
<span>研究生教育</span> <span>研究生教育</span>
@@ -127,11 +124,11 @@ export default {
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 100%; width: 100%;
height: 54.2rem; //height: 54.2rem;
&_bgc { &_bgc {
background-color: #fff; background-color: #fff;
height: 33.8rem; //height: 33.8rem;
margin-top: 8.1rem; margin-top: 8.1rem;
} }