This commit is contained in:
熊丽君
2021-10-26 15:58:47 +08:00
parent 270eb56fe6
commit 419e877993
11 changed files with 157 additions and 90 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div :class="{'hidden':hidden}" class="pagination-container"> <div :class="{ hidden: hidden }" class="pagination-container">
<el-pagination <el-pagination
:background="background" :background="background"
:current-page.sync="currentPage" :current-page.sync="currentPage"
@ -15,7 +15,7 @@
</template> </template>
<script> <script>
import { scrollTo } from '@/utils/scroll-to' import { scrollTo } from '@/utils/scroll-to';
export default { export default {
name: 'Pagination', name: 'Pagination',
@ -35,7 +35,7 @@ export default {
pageSizes: { pageSizes: {
type: Array, type: Array,
default() { default() {
return [10, 20, 30, 50] return [15, 30, 50];
} }
}, },
layout: { layout: {
@ -58,36 +58,36 @@ export default {
computed: { computed: {
currentPage: { currentPage: {
get() { get() {
return this.page return this.page;
}, },
set(val) { set(val) {
this.$emit('update:page', val) this.$emit('update:page', val);
} }
}, },
pageSize: { pageSize: {
get() { get() {
return this.limit return this.limit;
}, },
set(val) { set(val) {
this.$emit('update:limit', val) this.$emit('update:limit', val);
} }
} }
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.$emit('pagination', { page: this.currentPage, limit: val }) this.$emit('pagination', { page: this.currentPage, limit: val });
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800);
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this.pageSize }) this.$emit('pagination', { page: val, limit: this.pageSize });
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800);
} }
} }
} }
} };
</script> </script>
<style scoped> <style scoped>

View File

@ -76,10 +76,10 @@ export default {
}, },
created() { created() {
if (!this.flag) return false; if (!this.flag) return false;
getRead({ id: 1 }).then(({ data }) => { // getRead({ id: 1 }).then(({ data }) => {
this.totalNum = data.count; // this.totalNum = data.count;
this.goldNum = data.today; // this.goldNum = data.today;
}); // });
} }
}; };
</script> </script>

View File

@ -71,7 +71,7 @@ export default {
queryParams: { queryParams: {
userId: '1385154178159804416', userId: '1385154178159804416',
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 15
}, },
msgTotal: 0, msgTotal: 0,
// 待发送信息 // 待发送信息

View File

@ -61,40 +61,43 @@
</div> </div>
<!-- 检索列表 --> <!-- 检索列表 -->
<div class="screen_l_b"> <div class="screen_l_b">
<div v-for="item in listData" :key="item.id"> <div class="screen_item" v-for="item in listData" :key="item.id">
<router-link <router-link
class="box_item"
target="_blank" target="_blank"
:to="{ :to="{
path: '/result', path: '/result',
query: { key: 'scienceResult', id: item.id } query: { key: 'scienceResult', id: item.id }
}" }"
> >
<div class="screen_item"> <div class="title text_hidden_two">
<div class="screen_item_l"> <span style="text-align:left">{{ item.title }}</span>
<img :src="item.picList[0]" alt="" /> </div>
</div>
<div class="screen_item_r"> <div v-html="item.text" class="text text_hidden_four"></div>
<div class="title">{{ item.title }}</div> <!-- <div class="time">
<div class="text_hidden_two text" v-html="item.text"></div> {{ parseTime(item.createTime, '{y}-{m}-{d}') }}发布
<div class="tags"> </div> -->
<el-tag type="warning" effect="dark"> <div class="tags">
{{ item.fieldName }} <div>
</el-tag> <el-tag size="mini" effect="dark">{{
<el-tag type="warning" effect="dark"> item.fieldName
{{ item.maturityName }} }}</el-tag>
</el-tag> <el-tag size="mini" effect="dark">{{
<el-tag type="warning" effect="dark"> item.maturityName
{{ item.labelName }} }}</el-tag>
</el-tag> <el-tag size="mini" effect="dark">{{
</div> item.labelName
<div class="time"> }}</el-tag>
{{ parseTime(item.createTime, '{y}-{m}-{d}') }}发布
</div>
</div> </div>
</div> </div>
<span class="txt">{{
parseTime(item.createTime, '{y}-{m}-{d}')
}}</span>
</router-link> </router-link>
</div> </div>
</div> </div>
<div style="text-align: center;margin:30px 0" v-show="!total"> <div style="text-align: center;margin:30px 0" v-show="!total">
<div style="height:210px;display: inline-block;color:#999"> <div style="height:210px;display: inline-block;color:#999">
<img <img
@ -106,13 +109,24 @@
</div> </div>
</div> </div>
<!-- 分页 --> <!-- 分页 -->
<pagination <el-pagination
v-show="total > 0"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryParams.pageNum"
:page-sizes="[8, 16, 24]"
:page-size="queryParams.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
<!-- <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> /> -->
</div> </div>
</div> </div>
</div> </div>
@ -127,7 +141,7 @@ export default {
loading: true, loading: true,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 8,
title: '', title: '',
field: '', field: '',
maturityId: '', // 成熟度id maturityId: '', // 成熟度id
@ -164,8 +178,14 @@ export default {
}); });
}, },
handleClick() {}, handleClick() {},
handleSizeChange() {}, handleSizeChange(val) {
handleCurrentChange() {} this.queryParams.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.queryParams.pageNum = val;
this.getList();
}
}, },
created() { created() {
// 技术领域 // 技术领域
@ -256,53 +276,69 @@ export default {
} }
} }
.screen_l_b { .screen_l_b {
// margin-top: 10px; margin-top: 10px;
// padding: 10px 0; padding: 10px 0;
// display: flex; display: flex;
// flex-wrap: wrap; flex-wrap: wrap;
// justify-content: flex-start; justify-content: flex-start;
.screen_item { .screen_item {
cursor: pointer; // display: flex;
display: flex; // flex-direction: column;
// justify-content: space-between;
width: calc((100% - 30px) / 4);
// height: 292px;
margin-right: 10px;
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.08);
border: 1px solid #ffa32c; border: 1px solid #ffa32c;
padding: 15px; margin-bottom: 10px;
margin-top: 15px; cursor: pointer;
.screen_item_l { border-radius: 6px;
width: 300px; overflow: hidden;
height: 160px; padding: 10px;
img { .box_item {
width: 100%; display: flex;
height: 100%; flex-direction: column;
} justify-content: space-between;
} height: 100%;
.screen_item_r {
width: calc(100% - 225px);
margin-left: 15px;
.title { .title {
font-size: 18px;
font-weight: bold;
color: #ffa32c;
padding: 10px 0;
text-align: left; text-align: left;
} font-size: 16px;
.text { font-weight: bold;
font-size: 14px; color: #333;
line-height: 20px;
color: #999;
} }
.tags { .tags {
margin-top: 15px; display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
margin-top: 10px;
.el-tag { .el-tag {
margin-right: 15px; margin-right: 10px;
} }
} }
.time { .txt {
font-size: 14px;
color: #999;
text-align: right; text-align: right;
margin-top: 5px;
color: #999;
}
.text {
min-height: 124px;
// max-height: 134px;
font-size: 14px;
color: #666;
line-height: 27px;
}
.time {
margin-top: 20px;
text-align: right;
font-size: 16px;
color: #999;
} }
} }
} }
.screen_item:nth-of-type(4n + 0) {
margin-right: 0;
}
} }
.el-pagination { .el-pagination {
text-align: right; text-align: right;

View File

@ -97,7 +97,7 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="queryParams.pageNum" :current-page="queryParams.pageNum"
:page-sizes="[8, 16, 24, 32]" :page-sizes="[8, 16, 24]"
:page-size="queryParams.pageSize" :page-size="queryParams.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="total" :total="total"

View File

@ -489,6 +489,12 @@
</div> </div>
</div> </div>
</div> </div>
<div ref="myBox" style="height:345px;overflow:hidden">
<div class="row" style="display:flex">
<div v-for="item in 100" :key="item">{{ item }}</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
@ -551,9 +557,28 @@ export default {
getAboutUs().then(res => { getAboutUs().then(res => {
this.aboutInfo = res.data; this.aboutInfo = res.data;
}); });
},
mounted() {
console.log(this.$refs.myBox);
} }
}; };
</script> </script>
<style scoped>
.row {
position: relative;
animation: 20s mymove infinite linear;
animation-iteration-count: infinite;
/* animation-timing-function: linear; */
}
@keyframes mymove {
from {
left: 0px;
}
to {
left: -100%;
}
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
// /deep/.el-carousel__button { // /deep/.el-carousel__button {
// width: 8px; // width: 8px;

View File

@ -54,7 +54,7 @@ export default {
return { return {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 15
}, },
total: 0, total: 0,
newsList: [] newsList: []

View File

@ -245,7 +245,7 @@ export default {
city: '', // 临时城市 city: '', // 临时城市
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 15,
city: '', city: '',
attribute: '', attribute: '',
labelId: [], labelId: [],
@ -355,7 +355,7 @@ export default {
// 获取标签 // 获取标签
getLabelList(flag) { getLabelList(flag) {
getLabel().then(({ data }) => { getLabel().then(({ data }) => {
this.labelList = data; this.labelList = [data[0]];
for (let i = 0; i < this.labelList.length; i++) { for (let i = 0; i < this.labelList.length; i++) {
this.queryParams.labelIds.push(''); this.queryParams.labelIds.push('');
} }
@ -538,7 +538,7 @@ export default {
.screen_l_b { .screen_l_b {
// .screen_l_b_item { // .screen_l_b_item {
padding: 0 20px; padding: 0 20px;
height: 75px; height: 70px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;

View File

@ -72,7 +72,7 @@ export default {
return { return {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 15
}, },
total: 0, total: 0,
policyList: [], policyList: [],

View File

@ -21,6 +21,7 @@
<div class="header" v-if="type == 'policy'"> <div class="header" v-if="type == 'policy'">
<span class="span">{{ val }}</span> <span class="span">{{ val }}</span>
<el-radio <el-radio
size="small"
v-model="queryParams.labelId" v-model="queryParams.labelId"
v-for="item in portraitList" v-for="item in portraitList"
:key="item.id" :key="item.id"
@ -33,6 +34,7 @@
<div class="header" v-else-if="type == 'policyRead'"> <div class="header" v-else-if="type == 'policyRead'">
<span class="span">{{ val }}</span> <span class="span">{{ val }}</span>
<el-radio <el-radio
size="small"
v-model="queryParams.attribute" v-model="queryParams.attribute"
v-for="item in attributeOptions" v-for="item in attributeOptions"
:key="item.value" :key="item.value"
@ -45,6 +47,7 @@
<div class="header" v-else-if="type == 'policyNotice'"> <div class="header" v-else-if="type == 'policyNotice'">
<span class="span">{{ val }}</span> <span class="span">{{ val }}</span>
<el-radio <el-radio
size="small"
v-model="queryParams.labelId" v-model="queryParams.labelId"
v-for="item in policyNoticeOptions" v-for="item in policyNoticeOptions"
:key="item.value" :key="item.value"
@ -125,7 +128,7 @@ export default {
val: '', val: '',
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 15
}, },
total: 0, total: 0,
portraitList: [], // 企业画像 portraitList: [], // 企业画像
@ -290,8 +293,8 @@ export default {
.header { .header {
display: flex; display: flex;
align-items: center; align-items: center;
height: 70px; height: 50px;
padding: 30px; padding: 0 30px;
background-color: #f5f5f5; background-color: #f5f5f5;
.el-tabs { .el-tabs {
margin-left: 20px; margin-left: 20px;
@ -302,12 +305,15 @@ export default {
/deep/.el-radio__input { /deep/.el-radio__input {
display: none; display: none;
} }
/deep/.el-radio {
margin-right: 10px;
}
} }
.screen_l_b { .screen_l_b {
padding: 0 20px; padding: 0 20px;
height: 50px; height: 44px;
line-height: 50px; line-height: 44px;
// display: flex; // display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;

View File

@ -35,7 +35,7 @@
<div class="my_main content p0-100 min_h_285" style="display: flex"> <div class="my_main content p0-100 min_h_285" style="display: flex">
<div class="l" style="width: 77%; background-color: #fff; padding: 30px"> <div class="l" style="width: 77%; background-color: #fff; padding: 30px">
<h2>{{ formData.title }}</h2> <h2 style="text-align:center">{{ formData.title }}</h2>
<div class="info" v-if="type != 'information'"> <div class="info" v-if="type != 'information'">
<span v-if="type != 'companyNeed' && type != 'scienceResult'" <span v-if="type != 'companyNeed' && type != 'scienceResult'"
>来源{{ formData.source }}</span >来源{{ formData.source }}</span