You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
218 lines
4.6 KiB
218 lines
4.6 KiB
<template>
|
|
<div>
|
|
<search-box @getData="getData" />
|
|
<div class="d-flex flex-wrap" v-if="lists.length > 0">
|
|
<div :class="(index + 1) % 4 === 0 ? 'margin-0' : ''" :key="index" class="pro-box" v-for="(item, index) in lists">
|
|
<p class="pro-title">{{ item.title }}</p>
|
|
<p class="pro-content">{{ item.content }}</p>
|
|
<p class="pro-time">时间:{{ item.deadline }}</p>
|
|
<unveiling :pro-id="item.id" class="pro-btn" type="primary" />
|
|
</div>
|
|
</div>
|
|
<a-empty v-else />
|
|
<div>
|
|
<a-pagination
|
|
:current="current"
|
|
:page-size="pageSize"
|
|
:total="total"
|
|
@change="onShowSizeChange"
|
|
class="pagination"
|
|
show-less-items
|
|
show-quick-jumper
|
|
v-show="total > 8"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import SearchBox from './components/SearchBox.vue';
|
|
import Unveiling from './components/Unveiling.vue';
|
|
import { selTelease } from 'config/api';
|
|
export default {
|
|
name: 'Release',
|
|
components: { SearchBox, Unveiling },
|
|
data() {
|
|
return {
|
|
title: '项目发布',
|
|
typeOfPlatform: '创新挑战',
|
|
arr: [
|
|
{ name: '创新挑战', url: '/Challenge/Solicitation' },
|
|
{ name: '项目发布', url: '' },
|
|
],
|
|
str: '发布界面',
|
|
current: 1,
|
|
pageSize: 8,
|
|
total: 10,
|
|
list: [
|
|
{
|
|
id: 1,
|
|
name: '功能食品',
|
|
isActive: false,
|
|
},
|
|
{
|
|
id: 2,
|
|
name: '生物医药',
|
|
isActive: false,
|
|
},
|
|
{
|
|
id: 3,
|
|
name: '大健康',
|
|
isActive: false,
|
|
},
|
|
],
|
|
lists: [],
|
|
companyName: '',
|
|
address: '',
|
|
dataTitle: '',
|
|
serviccs: '',
|
|
};
|
|
},
|
|
created() {
|
|
this.getData();
|
|
},
|
|
methods: {
|
|
async getData(getParam) {
|
|
try {
|
|
if (getParam) {
|
|
this.companyName = getParam.companyName;
|
|
this.address = getParam.address;
|
|
this.dataTitle = getParam.dataTitle;
|
|
this.serviccs = getParam.serviccs;
|
|
}
|
|
const params = {
|
|
param: {
|
|
companyName: this.companyName,
|
|
address: this.address,
|
|
title: this.dataTitle,
|
|
serviccs: this.serviccs,
|
|
pageNum: this.current,
|
|
pageSize: 8,
|
|
},
|
|
};
|
|
const res = await selTelease(params);
|
|
const { code, msg, data } = res.data;
|
|
if (code === 200) {
|
|
this.lists = data.list;
|
|
this.total = parseInt(data.total);
|
|
} else {
|
|
console.log(msg);
|
|
}
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
},
|
|
choose(index) {
|
|
const that = this;
|
|
// that.achList = [];
|
|
const { list } = this;
|
|
list[index].isActive = !list[index].isActive;
|
|
this.list = [...list];
|
|
// for (let i = 0; i < list.length; i++) {
|
|
// if (list[i].isActive) {
|
|
// this.achList.push(list[i].id);
|
|
// }
|
|
// }
|
|
// this.setAchList(this.achList);
|
|
},
|
|
// 改变单当前页数
|
|
onShowSizeChange(current, size) {
|
|
this.current = current;
|
|
this.getData();
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="stylus" scoped>
|
|
.inner {
|
|
margin: 10px auto 15px;
|
|
}
|
|
|
|
.search-background {
|
|
background: rgba(0, 0, 0, 0.02);
|
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
height: auto;
|
|
padding: 0 20px;
|
|
width: 82%;
|
|
margin: 40px auto;
|
|
line-height: 44px;
|
|
}
|
|
|
|
.pagination {
|
|
margin: 40px 0;
|
|
text-align: right;
|
|
}
|
|
|
|
.ins-title {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
color: rgba(0, 0, 0, 0.65);
|
|
}
|
|
|
|
.ins-name {
|
|
font-size: 16px;
|
|
color: rgba(0, 0, 0, 0.65);
|
|
padding: 0 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.act-color {
|
|
color: #13ACC4 !important;
|
|
}
|
|
|
|
.margin-0 {
|
|
margin-right: 0% !important;
|
|
}
|
|
|
|
.pro-box {
|
|
width: 23.5%;
|
|
margin-right: 2%;
|
|
height: 300px;
|
|
background: #FFFFFF;
|
|
padding: 24px 20px;
|
|
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
|
|
position: relative;
|
|
margin-bottom: 20px;
|
|
opacity: 1;
|
|
}
|
|
|
|
.pro-title {
|
|
font-size: 24px;
|
|
font-family: Microsoft YaHei;
|
|
font-weight: bold;
|
|
line-height: 31px;
|
|
color: rgba(0, 0, 0, 0.85);
|
|
opacity: 1;
|
|
}
|
|
|
|
.pro-content {
|
|
font-size: 16px;
|
|
overflow: hidden;
|
|
font-family: Microsoft YaHei;
|
|
font-weight: 400;
|
|
line-height: 24px;
|
|
color: rgba(0, 0, 0, 0.65);
|
|
opacity: 1;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 5;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
.pro-time {
|
|
position: absolute;
|
|
font-size: 14px;
|
|
font-family: Microsoft YaHei;
|
|
font-weight: 400;
|
|
line-height: 22px;
|
|
color: rgba(0, 0, 0, 0.45);
|
|
opacity: 1;
|
|
bottom: 60px;
|
|
}
|
|
|
|
.pro-btn {
|
|
position: absolute;
|
|
bottom: 24px;
|
|
width: 100px;
|
|
}
|
|
</style>
|
|
|