11
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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">
|
||||
<!--正文内容-->
|
||||
|
||||
241
src/views/content/components/file_list.vue
Normal file
241
src/views/content/components/file_list.vue
Normal 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>
|
||||
@@ -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) {
|
||||
|
||||
@@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user