|
@@ -1,137 +1,65 @@
|
|
|
<template>
|
|
|
- <div class="home-box">
|
|
|
- <el-row type="flex" justify="space-between" class="event-box">
|
|
|
- <el-col :span="18" class="sort-box">
|
|
|
- <el-row type="flex">
|
|
|
- <el-col :span="4" :class="active === 'views' && 'active'"
|
|
|
- ><span @click="getList('views')">浏览量排序</span></el-col
|
|
|
- >
|
|
|
- <el-col :span="4" :class="active === 'likes' && 'active'"
|
|
|
- ><span @click="getList('likes')">点赞量排序</span></el-col
|
|
|
- >
|
|
|
- <el-col :span="4" :class="active === 'comments' && 'active'"
|
|
|
- ><span @click="getList('comments')">评论数排序</span></el-col
|
|
|
- >
|
|
|
- <el-col :span="5" :class="active === 'time' && 'active'"
|
|
|
- ><span @click="getList('time')">发布时间排序</span></el-col
|
|
|
- >
|
|
|
- </el-row>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-input
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="searchText"
|
|
|
- @keyup.enter="search()"
|
|
|
- >
|
|
|
- <el-button slot="append" @click="search()">搜索</el-button>
|
|
|
- </el-input>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div class="body-box" v-if="blogsList.length">
|
|
|
- <div class="bolg-box">
|
|
|
- <div class="list-box">
|
|
|
- <div
|
|
|
- @click="showDetail(item.id)"
|
|
|
- class="item"
|
|
|
- v-for="(item, index) in blogsList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <img :src="item.image" alt="" />
|
|
|
- <div>{{ item.name }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout="prev, pager, next"
|
|
|
- :current-page="size"
|
|
|
- :total="total"
|
|
|
- @current-change="sizeChange"
|
|
|
- :pager-count="this.pageSize"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- <div class="other-box">
|
|
|
- <div class="tag-box">
|
|
|
- <div class="title">热门标签</div>
|
|
|
- <div class="tags">
|
|
|
- <span
|
|
|
- class="tag"
|
|
|
- :style="{
|
|
|
- backgroundColor: item.color,
|
|
|
- }"
|
|
|
- v-for="item in tags"
|
|
|
- :key="item.name"
|
|
|
- @click="searchTag(item.name)"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="click-box" v-if="clickList.length">
|
|
|
- <div class="title">点击排行</div>
|
|
|
- <div class="list-box">
|
|
|
- <div
|
|
|
- class="item"
|
|
|
- v-for="(item, index) in clickList"
|
|
|
- :key="index"
|
|
|
- @click="showDetail(item.id)"
|
|
|
- >
|
|
|
- <div v-if="index === 0" class="index">
|
|
|
- <img :src="item.image" alt="" />
|
|
|
- <div class="name">{{ item.name }}</div>
|
|
|
- </div>
|
|
|
- <div v-else class="other">
|
|
|
- <img :src="item.image" alt="" />
|
|
|
- <div class="content">
|
|
|
- <div>{{ item.name }}</div>
|
|
|
- <div>{{ item.createTime }}</div>
|
|
|
+ <div class="page-box">
|
|
|
+ <div class="swiper-box">
|
|
|
+ <div class="base">
|
|
|
+ <div class="img">
|
|
|
+ <img src="../../assets/home_0.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="text-box">
|
|
|
+ <div class="title">What is DeepBIO?</div>
|
|
|
+ <div class="content">DeepBIO is a user-friendly interpretable deep-learning platform for biological sequence functional analysis, such as sequence-level functional prediction and base-wise functional annotation. As for the sequence-level functional prediction, DeepBIO integrates a total of 42 state-of-the-art deep-learning approaches, and enables a one-stop-shop web service for researchers to develop a new deep learning architecture to answer any biological question. To be specific, given any biological sequence data, DeepBIO allows to train and evaluate deep-learning models, conduct model comparison and optimization, and provide a series of visualization analyses. As for the base-wise functional site annotation, DeepBIO offers well-pretrained deep-learning
|
|
|
+ architectures
|
|
|
+ for over 20 functional site annotation tasks, supports comprehensive interpretations and graphical visualizations of identified sites, and validates the reliability of the identified sites by conservation motif analysis.
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="base">
|
|
|
+
|
|
|
+ <div class="text-box">
|
|
|
+ <div class="title">What is DeepBIO?</div>
|
|
|
+ <div class="content">DeepBIO is a user-friendly interpretable deep-learning platform for biological sequence functional analysis, such as sequence-level functional prediction and base-wise functional annotation. As for the sequence-level functional prediction, DeepBIO integrates a total of 42 state-of-the-art deep-learning approaches, and enables a one-stop-shop web service for researchers to develop a new deep learning architecture to answer any biological question. To be specific, given any biological sequence data, DeepBIO allows to train and evaluate deep-learning models, conduct model comparison and optimization, and provide a series of visualization analyses. As for the base-wise functional site annotation, DeepBIO offers well-pretrained deep-learning
|
|
|
+ architectures
|
|
|
+ for over 20 functional site annotation tasks, supports comprehensive interpretations and graphical visualizations of identified sites, and validates the reliability of the identified sites by conservation motif analysis.
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="img">
|
|
|
+ <img src="../../assets/home_1.png" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="base">
|
|
|
+ <div class="img">
|
|
|
+ <img src="../../assets/home_2.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="text-box">
|
|
|
+ <div class="title">What is DeepBIO?</div>
|
|
|
+ <div class="content">DeepBIO is a user-friendly interpretable deep-learning platform for biological sequence functional analysis, such as sequence-level functional prediction and base-wise functional annotation. As for the sequence-level functional prediction, DeepBIO integrates a total of 42 state-of-the-art deep-learning approaches, and enables a one-stop-shop web service for researchers to develop a new deep learning architecture to answer any biological question. To be specific, given any biological sequence data, DeepBIO allows to train and evaluate deep-learning models, conduct model comparison and optimization, and provide a series of visualization analyses. As for the base-wise functional site annotation, DeepBIO offers well-pretrained deep-learning
|
|
|
+ architectures
|
|
|
+ for over 20 functional site annotation tasks, supports comprehensive interpretations and graphical visualizations of identified sites, and validates the reliability of the identified sites by conservation motif analysis.
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import axios from "axios";
|
|
|
-import { hotTags, getClicks, getBlogs } from "@/api";
|
|
|
|
|
|
export default {
|
|
|
name: "home",
|
|
|
+ components: {
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- /*
|
|
|
- * active
|
|
|
- * 浏览量排序: views
|
|
|
- * 点赞量排序: likes
|
|
|
- * 评论数排序: comments
|
|
|
- * 发布时间排序: time
|
|
|
- * */
|
|
|
- active: "views",
|
|
|
- tag: "",
|
|
|
- searchText: "",
|
|
|
- tags: [],
|
|
|
- blogsList: [],
|
|
|
- clickList: [],
|
|
|
- color: [
|
|
|
- "#2B6363",
|
|
|
- "#DB704D",
|
|
|
- "#63B4AE",
|
|
|
- "#EA5368",
|
|
|
- "#EFA19D",
|
|
|
- "#E7CA65",
|
|
|
- "#C7C7AB",
|
|
|
- "#EA5368",
|
|
|
- "#EFA19D",
|
|
|
- "#2B6363",
|
|
|
- "#DB704D",
|
|
|
- ],
|
|
|
- total: 0,
|
|
|
- pageSize: 15,
|
|
|
- size: 1,
|
|
|
- };
|
|
|
+ // modules: [Pagination],
|
|
|
+ swiperOption: {
|
|
|
+ slidesPerView: 1,
|
|
|
+ spaceBetween: 30,
|
|
|
+ direction: "vertical",
|
|
|
+ pagination: {
|
|
|
+ el: '.swiper-pagination',
|
|
|
+ clickable: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
tags() {
|
|
@@ -139,226 +67,96 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- setTimeout(() => {
|
|
|
- if (this.$route.query && this.$route.query.search) {
|
|
|
- this.searchText = this.$route.query.search;
|
|
|
- }
|
|
|
- this.getList("views");
|
|
|
- this.getTagsFn();
|
|
|
- this.getClickListFn();
|
|
|
- }, 200);
|
|
|
},
|
|
|
methods: {
|
|
|
- async getList(type) {
|
|
|
- if (this.active !== type) {
|
|
|
- this.active = type;
|
|
|
- }
|
|
|
- const params = {
|
|
|
- sort: this.active,
|
|
|
- tag: this.tag,
|
|
|
- searchText: this.searchText,
|
|
|
- size: this.size,
|
|
|
- pageSize: this.pageSize,
|
|
|
- };
|
|
|
- const res = await getBlogs(params);
|
|
|
- this.total = res.data.total;
|
|
|
- this.blogsList = res.data.list;
|
|
|
- },
|
|
|
- async getClickListFn() {
|
|
|
- const res = await getClicks();
|
|
|
- this.clickList = res.data;
|
|
|
- },
|
|
|
- async getTagsFn() {
|
|
|
- const res = await hotTags();
|
|
|
- console.log("8080", res);
|
|
|
- this.tags = res.data.map((item) => {
|
|
|
- return {
|
|
|
- name: item,
|
|
|
- color: this.color[Math.floor(Math.random() * 9)],
|
|
|
- };
|
|
|
- });
|
|
|
- },
|
|
|
- showDetail(id) {
|
|
|
- this.$router.push({
|
|
|
- path: "/blogDetails",
|
|
|
- query: {
|
|
|
- id,
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- search() {
|
|
|
- this.tag = "";
|
|
|
- this.total = 0;
|
|
|
- this.pageSize = 15;
|
|
|
- this.size = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- searchTag(tag) {
|
|
|
- this.tag = tag;
|
|
|
- this.searchText = "";
|
|
|
- this.total = 0;
|
|
|
- this.pageSize = 15;
|
|
|
- this.size = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- sizeChange(size) {
|
|
|
- this.size = size;
|
|
|
- this.getList();
|
|
|
+ onSlideChange() {
|
|
|
+ console.log('111');
|
|
|
},
|
|
|
+ scroll() {
|
|
|
+ // 获取当前 swiper-wrapper 元素的 left 值,即偏移量
|
|
|
+ const wrapperLeft = this.$refs.mySwiper.wrapperEl.style.left;
|
|
|
+ // 将 left 值转换为数值
|
|
|
+ const left = parseInt(wrapperLeft);
|
|
|
+ // 计算当前滚动位置对应的 slide 的索引值
|
|
|
+ const currentIndex = -left / this.$refs.mySwiper.slidesGrid[0];
|
|
|
+ // 切换到下一个或上一个 slide
|
|
|
+ if (this.$refs.mySwiper.progress > 0.5) {
|
|
|
+ this.$refs.mySwiper.slideNext();
|
|
|
+ } else {
|
|
|
+ this.$refs.mySwiper.slidePrev();
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.home-box {
|
|
|
- //background-color: #ffffff;
|
|
|
- .event-box {
|
|
|
- padding: 15px 20px;
|
|
|
- margin-bottom: 20px;
|
|
|
- background-color: #ffffff;
|
|
|
- border-radius: 4px;
|
|
|
- .sort-box {
|
|
|
- //font-size: 14px;
|
|
|
- span {
|
|
|
- &:hover {
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .active {
|
|
|
- color: #409eff;
|
|
|
- }
|
|
|
- }
|
|
|
- .body-box {
|
|
|
- display: flex;
|
|
|
- .bolg-box {
|
|
|
- flex: 1;
|
|
|
- .list-box {
|
|
|
+.page-box {
|
|
|
+ .swiper-box {
|
|
|
+ height: calc(100vh - 67px);
|
|
|
+ //overflow: hidden;
|
|
|
+ //position: relative;
|
|
|
+
|
|
|
+ .base {
|
|
|
+ width: 100%;
|
|
|
+ //height: 100%;
|
|
|
+ height: calc(80vh - 67px);
|
|
|
+ padding: 20px 50px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ //flex-direction: row;
|
|
|
+ //align-items: center;
|
|
|
+
|
|
|
+ .img {
|
|
|
+ box-sizing: border-box;
|
|
|
display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- .item {
|
|
|
- //width: 300px;
|
|
|
- background-color: #ffffff;
|
|
|
- flex: 1 1 260px;
|
|
|
- margin-right: 15px;
|
|
|
- margin-bottom: 15px;
|
|
|
- img {
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- }
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 35%;
|
|
|
+
|
|
|
img {
|
|
|
+ width: 100%;
|
|
|
+ display: block;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .other-box {
|
|
|
- .tag-box {
|
|
|
- border-radius: 4px;
|
|
|
- width: 280px;
|
|
|
- background-color: #f8f9fb;
|
|
|
- margin-bottom: 24px;
|
|
|
- .title {
|
|
|
- text-align: left;
|
|
|
- padding-left: 5px;
|
|
|
|
|
|
- &:before {
|
|
|
- content: "";
|
|
|
- display: block;
|
|
|
- position: relative;
|
|
|
- top: 35px;
|
|
|
- width: 85px;
|
|
|
- height: 2px;
|
|
|
- border-radius: 4px;
|
|
|
- background: #2c3e50;
|
|
|
- }
|
|
|
+ .text-box {
|
|
|
+ box-sizing: border-box;
|
|
|
+ flex: 1;
|
|
|
+ padding: 40px;
|
|
|
+ text-align: left;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin: 20px 0;
|
|
|
+ //margin: 0px;
|
|
|
+ font-family: Roboto, Helvetica, Arial, sans-serif;
|
|
|
+ font-size: 2.125rem;
|
|
|
+ line-height: 1.235;
|
|
|
+ letter-spacing: 0.00735em;
|
|
|
+ font-weight: 700;
|
|
|
}
|
|
|
- .tags {
|
|
|
- padding: 0 5px;
|
|
|
- text-align: left;
|
|
|
- min-height: 150px;
|
|
|
- .tag {
|
|
|
- font-size: 14px;
|
|
|
- color: #ffffff;
|
|
|
- cursor: pointer;
|
|
|
- padding: 1px 5px;
|
|
|
- border-radius: 4px;
|
|
|
- margin-right: 5px;
|
|
|
- margin-bottom: 5px;
|
|
|
- display: inline-block;
|
|
|
- transition: all 0.3ms;
|
|
|
- &:hover {
|
|
|
- color: #409eff;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- .click-box {
|
|
|
- border-radius: 4px;
|
|
|
- width: 280px;
|
|
|
- background-color: #f8f9fb;
|
|
|
- .title {
|
|
|
- text-align: left;
|
|
|
- padding-left: 5px;
|
|
|
|
|
|
- &:before {
|
|
|
- content: "";
|
|
|
- display: block;
|
|
|
- position: relative;
|
|
|
- top: 35px;
|
|
|
- width: 85px;
|
|
|
- height: 2px;
|
|
|
- border-radius: 4px;
|
|
|
- background: #2c3e50;
|
|
|
- }
|
|
|
- }
|
|
|
- .list-box {
|
|
|
- //height: 250px;
|
|
|
- min-height: 250px;
|
|
|
- max-height: 470px;
|
|
|
- //max-height: 50vh;
|
|
|
- padding: 5px;
|
|
|
- overflow: scroll;
|
|
|
- background-color: #f8f9fb;
|
|
|
- .item {
|
|
|
- cursor: pointer;
|
|
|
- .index {
|
|
|
- margin-bottom: 5px;
|
|
|
- img {
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .name {
|
|
|
- transition: color ease-in-out 0.3s;
|
|
|
- background-color: #000000;
|
|
|
- color: #ffffff;
|
|
|
- }
|
|
|
- &:hover {
|
|
|
- .name {
|
|
|
- color: #409eff;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .other {
|
|
|
- display: flex;
|
|
|
- margin-bottom: 10px;
|
|
|
- img {
|
|
|
- cursor: pointer;
|
|
|
- width: 70px;
|
|
|
- height: 70px;
|
|
|
- }
|
|
|
- .content {
|
|
|
- text-align: left;
|
|
|
- color: #333;
|
|
|
- padding-left: 10px;
|
|
|
- font-size: 18px;
|
|
|
- }
|
|
|
- &:hover {
|
|
|
- .content {
|
|
|
- color: #409eff;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .text {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .other-box {
|
|
|
+ margin-top: 1px;
|
|
|
}
|
|
|
}
|
|
|
}
|