Files
jiace-web/src/views/home/achievements.vue

346 lines
9.0 KiB
Vue
Raw Normal View History

2021-08-02 17:40:23 +08:00
<template>
2021-08-05 09:35:02 +08:00
<div class="notice_page p0-100">
<!-- 搜索部分 -->
<div class="search">
<div class="search_input" style="display:flex">
<span>科技成果检索</span>
2021-08-11 09:30:53 +08:00
<el-input
v-model="queryParams.title"
placeholder="请输入搜索关键字"
@keyup.enter.native="getList"
></el-input>
<el-button type="warning" @click="getList">搜索</el-button>
2021-08-05 09:35:02 +08:00
</div>
</div>
<!-- 筛选部分 -->
<div class="screen">
<div class="screen_l">
<!-- 检索条件 -->
<div class="screen_l_t">
<div class="screen_l_t_item">
<span class="text_col">技术领域</span>
2021-08-11 09:30:53 +08:00
<el-radio-group v-model="queryParams.field" size="medium">
<el-radio-button label="">不限</el-radio-button>
2021-08-05 09:35:02 +08:00
<el-radio-button
2021-08-11 09:30:53 +08:00
:label="item.id"
2021-08-05 09:35:02 +08:00
v-for="item in levelList"
2021-08-11 09:30:53 +08:00
:key="item.id"
2021-08-05 09:35:02 +08:00
>
{{ item.name }}
</el-radio-button>
</el-radio-group>
</div>
<div class="screen_l_t_item">
<span class="text_col">成熟度</span>
2021-08-11 09:30:53 +08:00
<el-radio-group v-model="queryParams.maturityId" size="medium">
2021-08-05 09:35:02 +08:00
<el-radio-button label="">不限</el-radio-button>
2021-08-11 09:30:53 +08:00
<el-radio-button
:label="item.id"
v-for="item in maturityList"
:key="item.id"
>
{{ item.name }}
2021-08-05 09:35:02 +08:00
</el-radio-button>
</el-radio-group>
</div>
<div class="screen_l_t_item">
<span class="text_col">合作标签</span>
2021-08-11 09:30:53 +08:00
<el-radio-group v-model="queryParams.labelId" size="medium">
2021-08-05 09:35:02 +08:00
<el-radio-button label="">不限</el-radio-button>
2021-08-11 09:30:53 +08:00
<el-radio-button
:label="item.id"
v-for="item in cooperationList"
:key="item.id"
>
{{ item.name }}
2021-08-05 09:35:02 +08:00
</el-radio-button>
</el-radio-group>
</div>
</div>
<!-- 检索列表 -->
<div class="screen_l_b">
2021-08-11 09:30:53 +08:00
<div v-for="item in listData" :key="item.id">
<router-link
target="_blank"
:to="{
path: '/result',
query: { key: 'scienceResult', id: item.id }
}"
>
<div class="screen_item">
<div class="screen_item_l">
<img :src="item.picList[0]" alt="" />
</div>
<div class="screen_item_r">
<div class="title">{{ item.title }}</div>
<div class="text_hidden_two text" v-html="item.text"></div>
<div class="tags">
<el-tag type="warning" effect="dark">
{{ item.fieldName }}
</el-tag>
<el-tag type="warning" effect="dark">
{{ item.maturityName }}
</el-tag>
<el-tag type="warning" effect="dark">
{{ item.labelName }}
</el-tag>
</div>
<div class="time">
{{ parseTime(item.createTime, '{y}-{m}-{d}') }}发布
</div>
</div>
2021-08-10 09:04:25 +08:00
</div>
2021-08-11 09:30:53 +08:00
</router-link>
2021-08-05 09:35:02 +08:00
</div>
</div>
<!-- 分页 -->
2021-08-11 09:30:53 +08:00
<pagination
v-show="total > 0"
:total="total"
2021-08-05 09:35:02 +08:00
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
2021-08-11 09:30:53 +08:00
/>
2021-08-05 09:35:02 +08:00
</div>
</div>
2021-08-02 17:40:23 +08:00
</div>
</template>
2021-08-05 09:35:02 +08:00
<script>
import { mapGetters } from 'vuex';
2021-08-11 09:30:53 +08:00
import { getDictListByStatus } from '@/api/home/info';
2021-08-11 08:46:50 +08:00
import { getScienceResultList } from '@/api/home/demand';
2021-08-05 09:35:02 +08:00
export default {
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
2021-08-11 09:30:53 +08:00
title: '',
field: '',
maturityId: '', // 成熟度id
labelId: '' // 合作标签id
2021-08-05 09:35:02 +08:00
},
2021-08-11 09:30:53 +08:00
listData: [],
total: 0,
levelList: [], // 技术领域
maturityList: [], // 成熟度
cooperationList: [] // 合作标签
2021-08-05 09:35:02 +08:00
};
},
computed: {
...mapGetters(['token'])
},
methods: {
2021-08-11 09:30:53 +08:00
getList() {
getScienceResultList(this.queryParams).then(({ data }) => {
this.listData = data.list;
this.total = data.total;
});
},
2021-08-05 09:35:02 +08:00
handleClick() {},
handleSizeChange() {},
handleCurrentChange() {}
},
created() {
2021-08-11 09:30:53 +08:00
// 技术领域
getDictListByStatus({ type: 1 }).then(({ data }) => {
this.levelList = data;
2021-08-05 09:35:02 +08:00
});
2021-08-11 09:30:53 +08:00
// 成熟度
getDictListByStatus({ type: 3 }).then(({ data }) => {
this.maturityList = data;
});
// 合作标签
getDictListByStatus({ type: 4 }).then(({ data }) => {
this.cooperationList = data;
});
this.getList();
2021-08-05 09:35:02 +08:00
}
};
</script>
<style lang="scss" scoped>
.notice_page {
.search {
padding-top: 52px;
padding-bottom: 52px;
text-align: center;
.search_input {
display: flex;
justify-content: center;
align-items: center;
/deep/.el-input--medium .el-input__inner {
height: 40px;
line-height: 40px;
border-radius: 6px 0 0 6px;
border: 1px solid #ffa32c;
border-right: 0;
}
span:nth-child(1) {
color: #333;
font-size: 24px;
margin-right: 21px;
}
.el-input {
width: 304px;
}
.el-button {
border-radius: 0 6px 6px 0;
background-color: #ffa32c;
font-size: 18px;
}
}
.tags {
margin-top: 26px;
.txt {
font-size: 18px;
color: #999;
}
.el-tag {
border-radius: 20px;
margin-right: 18px;
}
}
}
.screen {
display: flex;
.screen_l {
flex: 2;
.screen_l_t {
border-radius: 6px;
background-color: #f8f8f8;
.screen_l_t_item {
// height: 50px;
// line-height: 50px;
display: flex;
align-items: center;
padding: 0 20px;
.text_col {
min-width: 100px;
color: #333;
font-size: 18px;
}
.el-radio-group {
display: flex;
flex-wrap: wrap;
align-items: center;
.el-radio-button {
margin: 10px 0;
}
}
}
}
.screen_l_b {
margin-top: 10px;
padding: 10px 0;
2021-08-11 09:30:53 +08:00
// display: flex;
// flex-wrap: wrap;
// justify-content: flex-start;
2021-08-05 09:35:02 +08:00
.screen_item {
2021-08-11 09:30:53 +08:00
cursor: pointer;
2021-08-05 09:35:02 +08:00
display: flex;
2021-08-10 09:04:25 +08:00
border: 1px solid #ffa32c;
padding: 15px;
margin-top: 30px;
.screen_item_l {
width: 225px;
2021-08-11 09:30:53 +08:00
img {
width: 100%;
height: 100%;
}
2021-08-10 09:04:25 +08:00
}
.screen_item_r {
width: calc(100% - 225px);
margin-left: 15px;
.title {
font-size: 18px;
font-weight: bold;
2021-08-05 09:35:02 +08:00
color: #ffa32c;
2021-08-10 09:04:25 +08:00
padding: 10px 0;
2021-08-05 09:35:02 +08:00
}
2021-08-10 09:04:25 +08:00
.text {
font-size: 14px;
line-height: 20px;
color: #999;
}
.tags {
margin-top: 15px;
.el-tag {
margin-right: 15px;
}
}
.time {
font-size: 14px;
color: #999;
text-align: right;
2021-08-05 09:35:02 +08:00
}
}
}
}
.el-pagination {
text-align: right;
}
}
.screen_r {
flex: 1;
margin-left: 10px;
max-width: 310px;
.title {
color: #ffffff;
height: 60px;
line-height: 60px;
font-size: 20px;
text-align: center;
background: #3394ff;
border-radius: 6px 6px 0px 0px;
}
.tabs {
height: 551px;
background: #f8f8f8;
padding: 0px 14px;
.tabs_row {
display: flex;
align-items: center;
.span {
width: 30%;
min-width: 84px;
}
.el-tabs {
// width: 240px;
width: 70%;
/deep/.el-tabs__nav-wrap::after {
height: 0;
}
/deep/.el-tabs__item.is-active {
font-weight: bold;
color: #1890ff;
}
}
}
.tabs_item {
height: 110px;
display: flex;
flex-direction: column;
justify-content: center;
border-bottom: 1px solid #e3e3e3;
div:nth-child(1) {
font-size: 18px;
color: #333333;
}
div:nth-child(2) {
margin-top: 16px;
font-size: 16px;
color: #999999;
}
}
.more {
text-align: center;
.el-button {
margin-top: 12px;
}
}
}
}
}
}
</style>