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.
118 lines
2.6 KiB
118 lines
2.6 KiB
<template>
|
|
<div>
|
|
<div class="inner d-flex flex-wrap">
|
|
<div v-for="(item, index) in list" :key="index" class="item-box" :class="(index + 1) % 4 === 0 ? 'margin-0' : ''">
|
|
<p class="font-24 my-3" style="cursor: pointer" @click="detail(item.id)">{{ item.name }}</p>
|
|
<p class="font-16" style="color: rgba(0, 0, 0, 0.45); cursor: pointer" @click="detail(item.id)">编号:{{ item.identifier }}</p>
|
|
<p class="font-16 baseColor item-more">
|
|
<a-button type="primary" style="cursor: pointer">转化意向填报</a-button>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="inner">
|
|
<a-pagination
|
|
:current="achCurrent"
|
|
:total="total"
|
|
:page-size="pageSize"
|
|
@change="onShowSizeChange"
|
|
class="pagination"
|
|
show-less-items
|
|
show-quick-jumper
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapMutations, mapState } from 'vuex';
|
|
import { selRes } from 'config/api';
|
|
export default {
|
|
name: 'PlatformList',
|
|
data() {
|
|
return {
|
|
list: [],
|
|
pageSize: 12,
|
|
total: 0,
|
|
};
|
|
},
|
|
computed: mapState('home', ['achList', 'achIpt', 'achCurrent']),
|
|
watch: {
|
|
achList(val) {
|
|
this.getData();
|
|
},
|
|
achIpt(val) {
|
|
if (val.isBtn === 1) {
|
|
this.getData();
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
this.getData();
|
|
},
|
|
methods: {
|
|
...mapMutations('home', ['setAchCurrent', 'setAchId']),
|
|
// 改变单当前页数
|
|
onShowSizeChange(current, size) {
|
|
this.setAchCurrent(current);
|
|
this.getData();
|
|
},
|
|
// 获取成果列表
|
|
async getData() {
|
|
try {
|
|
const params = {
|
|
param: {
|
|
content: this.achIpt.content,
|
|
modelIds: this.achList,
|
|
pageNum: this.achCurrent,
|
|
pageSize: 12,
|
|
},
|
|
};
|
|
const res = await selRes(params);
|
|
const { code, msg, data } = res.data;
|
|
if (code === 200) {
|
|
this.list = data.list;
|
|
this.total = parseInt(data.total);
|
|
}
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
},
|
|
// 点击查看详情
|
|
detail(id) {
|
|
this.setAchId(id);
|
|
this.$router.push('/NewPlatform/AchDet');
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="stylus" scoped>
|
|
.pagination {
|
|
margin: 40px 0;
|
|
text-align: right;
|
|
}
|
|
|
|
.item-box {
|
|
position: relative;
|
|
width: 20.5%;
|
|
background: #fff;
|
|
margin-right: 6%;
|
|
border-radius: 4px;
|
|
margin-bottom: 40px;
|
|
padding: 10px;
|
|
padding-bottom: 60px;
|
|
}
|
|
|
|
.margin-0 {
|
|
margin-right: 0% !important;
|
|
}
|
|
|
|
.item-more {
|
|
position: absolute;
|
|
bottom: 10px;
|
|
right: 10px;
|
|
text-align: right;
|
|
margin-bottom: 0 !important;
|
|
margin-top: 40px;
|
|
}
|
|
</style>
|
|
|