From fe4dd98a58814d8cbfa9e80bdbd85652ff2480f2 Mon Sep 17 00:00:00 2001 From: clay <20932067@zju.edu.cn> Date: Wed, 5 Oct 2022 23:35:21 +0800 Subject: [PATCH] =?UTF-8?q?clay=20commit=20:=20=E6=96=B0=E9=97=BB=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=AF=B9=E6=8E=A5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scientific_research_trends/huidian.png | Bin 0 -> 358 bytes .../scientific_research_trends/huidian@2x.png | Bin 0 -> 768 bytes src/utils/sist.js | 19 ++ src/views/content/components/file_list.vue | 46 ++- src/views/content/components/list.vue | 36 +-- src/views/content/components/simple_list.vue | 288 ++++++++++++++++++ src/views/content/index.vue | 15 +- src/views/header/index.vue | 9 +- src/views/header/mobile_herder.vue | 237 +++++++------- src/views/index/components/news_center.vue | 86 ++---- src/views/index/components/slideshow_card.vue | 40 +-- src/views/mobile/index.vue | 158 +++++++--- 12 files changed, 648 insertions(+), 286 deletions(-) create mode 100644 src/assets/index/scientific_research_trends/huidian.png create mode 100644 src/assets/index/scientific_research_trends/huidian@2x.png create mode 100644 src/views/content/components/simple_list.vue diff --git a/src/assets/index/scientific_research_trends/huidian.png b/src/assets/index/scientific_research_trends/huidian.png new file mode 100644 index 0000000000000000000000000000000000000000..68d77435dcec103b592a2679cdba78ccb971fe6b GIT binary patch literal 358 zcmV-s0h#`ZP)Px$AW1|)R5(wi(!WZ@Fcb#x?`zXd{4=<-iee>-qKg2BRaGryS@!Lm`x24q zaggLtYdw?a`IJ)XZ6eq$YUju4{2iSeV4{|5@qe292dj+m{W6mUaR2}S07*qoM6N<$ Ef@Y7NEdT%j literal 0 HcmV?d00001 diff --git a/src/assets/index/scientific_research_trends/huidian@2x.png b/src/assets/index/scientific_research_trends/huidian@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f8b12d85b054f7776f313c602c8053e1c2ebe39a GIT binary patch literal 768 zcmV+b1ONPqP)Px%x=BPqR7gw3mN94)K@^7nH+xzo#bFmk6u}K12nvE0A}1(B;r3?KMr?#whze>g zO2k@&C>926#73RjT~I+GhgcX86oeBmAd19vaz#?JLiIF7e=I-N%V_NI`*JW)nqGf085*0n`Be25=}3odY@`GvnEi;QS3`d#yg3HwNygiw`b3m>2+q7n}lu|B)#c^Col4KabVP@W(HpzDYFFns2 ztJP}F{N^0g7-P~*CzMkAx<2mby3tzu*wsu3F_@RJ*=(+FwOTg;oCP2j$=E4z&-eYy zl}hDTUS4bMXIE1p#0l5EU7#_>E&4);Gxd6XEOSUu~^8B03_abnYQ>bg7^ zYlxYj189&jrp3(L0r*O($(&J>nRl!b_(@7x$$YieF1{OklP*Jdu=~p8a(}g2oy{3_ z*H;4sFsqd6&wLw=Mqj(#cJXEl1rpKBnn+q~(-eLz3P1RTkG3@#-VR#m_2htsU%+XW y#XT`{BdxecR0b{dnV28eg*}89-Vp!uss9HUU|T)ldJ*gZ0000
-
-
+
+
{{ file.fileName }}
-
+
{{ getDateTime(file.createTime) }}
@@ -43,8 +43,8 @@
- + +
@@ -66,8 +74,8 @@ export default { value: { type: Object, default() { - return{ - data:[], + return { + data: [], pageNum: 1, pageSize: 10, } @@ -77,11 +85,14 @@ export default { data() { return { width: document.documentElement.clientWidth, - small: document.documentElement.clientWidth <= 992, + smallType: document.documentElement.clientWidth <= 992, query: '', - pageSize:value.pageSize + pageSize: value.pageSize } }, + created() { + this.smallType = document.documentElement.clientWidth <= 992 + }, methods: { getDateTime(date) { let time = new Date(date); @@ -125,7 +136,7 @@ export default { if (this.type != null && this.type != 0) { data.id = this.value.secondId } - console.log(data,"data") + console.log(data, "data") getNode(data).then(res => { this.value.data = res.rows this.value.total = res.total @@ -150,13 +161,18 @@ export default { padding-top: 5rem; font-size: 1.6rem; - .file { + .article { color: #757575; clear: both; padding: 2rem 3rem; - .file_name { + .article_name { float: left; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; //作为弹性伸缩盒子模型显示。 + -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列 + -webkit-line-clamp: 1; //显示的行 .span { padding-right: 1rem; @@ -175,7 +191,7 @@ export default { } } - .file_time { + .article_time { float: right; } @@ -184,7 +200,7 @@ export default { } } - .file:hover { + .article:hover { //background-color: gray; color: #1956BC; @@ -193,7 +209,7 @@ export default { font-weight: bold; } - .file_name { + .article_name { .def_img { display: none; } diff --git a/src/views/content/components/list.vue b/src/views/content/components/list.vue index c912c31..727c325 100644 --- a/src/views/content/components/list.vue +++ b/src/views/content/components/list.vue @@ -54,14 +54,21 @@ - + + @@ -165,15 +172,6 @@ export default { } } - diff --git a/src/views/content/components/simple_list.vue b/src/views/content/components/simple_list.vue new file mode 100644 index 0000000..21de6fc --- /dev/null +++ b/src/views/content/components/simple_list.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/content/index.vue b/src/views/content/index.vue index 442c051..e900f4b 100644 --- a/src/views/content/index.vue +++ b/src/views/content/index.vue @@ -100,7 +100,8 @@ - + + @@ -139,7 +140,8 @@ - + + @@ -164,6 +166,7 @@ import DireData from './components/dire_data.vue' import DireDataTow from './components/dire_data_tow.vue' import Details from './components/details.vue' import FileList from './components/file_list.vue' +import SimpleList from './components/simple_list.vue' import {handleTree} from "@/utils/ebts"; import {getParentNode, setLanguage} from "@/utils/sist"; @@ -175,7 +178,8 @@ export default { DireData, Details, FileList, - DireDataTow + DireDataTow, + SimpleList }, data() { return { @@ -183,6 +187,7 @@ export default { secondId: null, navId: null, dreDataType: "", + listDataType: 0, navList: [], showIndex: 0, showSecond: true, @@ -387,8 +392,10 @@ export default { pageNum: 1, pageSize: 5 } - if (this.type === 4) { + this.listDataType = 0 + if (this.type === 4||menu.isSimple == 1) { data.pageSize = 10 + this.listDataType = 1 } } else { data = { diff --git a/src/views/header/index.vue b/src/views/header/index.vue index b530efd..6725f00 100644 --- a/src/views/header/index.vue +++ b/src/views/header/index.vue @@ -47,7 +47,8 @@
-
+ +
@@ -233,8 +234,8 @@ export default { .icont { img { // todo logo有问题 - // width: 23.3rem; - width: 15rem; + width: 23.3rem; + //width: 15rem; } } @@ -264,7 +265,7 @@ export default { font-size: 1.6rem; font-family: "微软雅黑"; font-weight: 400; - color: #FFFFFF; + color: #C5DCFE; cursor: pointer; display: flex; align-items: center; diff --git a/src/views/header/mobile_herder.vue b/src/views/header/mobile_herder.vue index 3e963ec..1b87f2d 100644 --- a/src/views/header/mobile_herder.vue +++ b/src/views/header/mobile_herder.vue @@ -1,58 +1,69 @@ diff --git a/src/views/index/components/slideshow_card.vue b/src/views/index/components/slideshow_card.vue index d161aaa..7a0b59a 100644 --- a/src/views/index/components/slideshow_card.vue +++ b/src/views/index/components/slideshow_card.vue @@ -198,39 +198,39 @@ export default { } } -.one { +.five { z-index: 98; left: 1%; transform: scale(0.8); } -.two { +.six { z-index: 99; left: 21%; transform: scale(0.9); } -.three { +.one { left: 37%; z-index: 100; transform: scale(1); border: 1px solid #DA2D2D; } -.four { +.two { z-index: 99; left: 53%; transform: scale(0.9); } -.five { +.three { left: 73%; z-index: 98; transform: scale(0.8); } -.six { - left: 70%; +.four { + left: 37%; z-index: 96; transform: scale(0.7); } @@ -271,33 +271,34 @@ export default { } - .one { + .five { left: -1%; } - .two { + .six { left: 15%; } - .three { + .one { left: 31%; } - .four { + .two { left: 47%; } - .five { + .three { left: 63%; } - .six { + .four { left: 31%; } } } + @media screen and (max-width: 1100px) { .banner-card { height: 26rem; @@ -314,27 +315,28 @@ export default { -webkit-line-clamp: 2; //显示的行 } } - .one { + + .five { left: 4%; } - .two { + .six { left: 17%; } - .three { + .one { left: 30%; } - .four { + .two { left: 43%; } - .five { + .three { left: 56%; } - .six { + .four { left: 10%; } } diff --git a/src/views/mobile/index.vue b/src/views/mobile/index.vue index 385919f..d2a7847 100644 --- a/src/views/mobile/index.vue +++ b/src/views/mobile/index.vue @@ -33,9 +33,11 @@ - + + - + +
@@ -53,11 +55,13 @@ import {getNode, crumbs, article} from "@/api"; import Introduction from '@/views/content/components/Introduction.vue' import List from '@/views/content/components/list.vue' +import SimpleList from '@/views/content/components/simple_list.vue' import DireData from '@/views/content/components/dire_data.vue' +import DireDataTow from '@/views/content/components/dire_data_tow.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, setLanguage} from "@/utils/sist"; +import {getParentNode, setLanguage, getNodeMenu} from "@/utils/sist"; export default { name: "index", @@ -66,12 +70,16 @@ export default { List, DireData, Details, - FileList + FileList, + DireDataTow, + SimpleList, }, data() { return { width: document.documentElement.clientWidth, navId: null, + dreDataType: "1", + listDataType: 0, navList: [], showIndex: 0, contextData: {}, @@ -90,28 +98,56 @@ export default { } }, watch: { + // $route(to, from) { + // console.log(to, "路由跳转") + // this.secondId = this.$route.params && this.$route.params.secondId; + // this.navId = this.$route.params && this.$route.params.navId; + // let arcId = this.$route.query && this.$route.query.id + // this.type = this.$route.query && this.$route.query.type + // this.getCrumbs() + // if (this.type != null&&this.type!=0){ + // console.log(111,this.navId) + // let info = getNodeMenu(this.navId); + // if (arcId != undefined) { + // this.getContext(arcId) + // } else { + // this.getContent(info) + // } + // return + // } + // if (arcId != undefined) { + // this.getContext(arcId) + // } else { + // this.menuData = getParentNode(this.navId) + // console.log(this.menuData, "menuData") + // this.getContent(this.menuData.three) + // } + // } $route(to, from) { - console.log(to) - + console.log(to, "路由跳转") this.secondId = this.$route.params && this.$route.params.secondId; this.navId = this.$route.params && this.$route.params.navId; let arcId = this.$route.query && this.$route.query.id this.type = this.$route.query && this.$route.query.type - if (this.type != null&&this.type!=0){ - let info = getParentNode(this.secondId); + this.getCrumbs() + if (this.type != null && this.type != 0) { + //当三级菜单id没有是,使用二级 if (arcId != undefined) { + console.log("getContext") this.getContext(arcId) - } else { - this.getContent(info.second) + return; + } + let info = null; + if (this.navId == null) { + console.log("1") + info = getParentNode(this.secondId); + this.getContent(info.second) + + } else { + console.log("2") + info = getParentNode(this.navId) + this.getContent(info.three) } - return - } - if (arcId != undefined) { - this.getContext(arcId) - } else { - this.menuData = getParentNode(this.navId) - console.log(this.menuData,"menuData") - this.getContent(this.menuData.three) } } }, @@ -125,34 +161,55 @@ export default { }, 200); }, methods: { - init(){ - console.log(this.navId) - this.menuData = getParentNode(this.navId) + init() { + let arcId = this.$route.params && this.$route.query.id + this.getCrumbs() + if (this.type != null && this.type != 0) { + //当三级菜单id没有是,使用二级 + if (arcId != undefined) { + console.log("getContext") + this.getContext(arcId) + return; + } + let info = null; + if (this.navId == null) { + console.log("1") + info = getParentNode(this.secondId); + this.getContent(info.second) + } else { + console.log("2") + info = getParentNode(this.navId) + this.getContent(info.three) + } + //this.showSecond = false + // let info = null + // info = getParentNode(this.secondId); + // if (info == null) { + // location.reload(); + // } + // let arcId = this.$route.query && this.$route.query.id + // if (arcId != undefined) { + // this.getContext(arcId) + // } else { + // this.getContent(this.menuData.three) + // } + // return + } + // let arcId = this.$route.params && this.$route.query.id + // if (arcId != undefined) { + // this.getContext(arcId) + // } else { + // console.log(this.menuData, "menuData") + // this.getContent(this.menuData.three) + // } + }, + /** + * 获得面包屑导航 + */ + getCrumbs() { crumbs(this.secondId).then(res => { this.crumbs = res.data }) - if (this.type != null&&this.type!=0){ - //this.showSecond = false - let info =null - info = getParentNode(this.secondId); - if (info == null){ - location.reload(); - } - let arcId = this.$route.query && this.$route.query.id - if (arcId != undefined) { - this.getContext(arcId) - } else { - this.getContent(info.second) - } - return - } - let arcId = this.$route.params && this.$route.query.id - if (arcId != undefined) { - this.getContext(arcId) - } else { - console.log(this.menuData,"menuData") - this.getContent(this.menuData.three) - } }, getContext(arcId) { @@ -169,14 +226,16 @@ export default { this.contextData = null this.bgImage = menu.link let data = null - if (this.type === 2||this.type === 4) { + if (this.type === 2 || this.type === 4) { data = { id: menu.encodeId, pageNum: 1, pageSize: 5 } - if (this.type === 4){ - data.pageSize=10 + this.listDataType = 0 + if (this.type === 4||menu.isSimple == 1) { + data.pageSize = 20 + this.listDataType = 1 } } else { data = { @@ -184,7 +243,7 @@ export default { } } getNode(data).then(res => { - if (this.type === 2||this.type === 4) { + if (this.type === 2 || this.type === 4) { this.contextData = { data: res.rows, total: res.total, @@ -196,6 +255,11 @@ export default { } else if (this.type == 1) { this.contextData = res.data } else if (this.type == 3) { + if (res.additional == "") { + this.dreDataType = "1" + } else { + this.dreDataType = res.additional + } this.contextData = handleTree(res.data, "id", "pid", null, null) } })