前端补正

This commit is contained in:
xiao-fajia 2024-08-04 22:23:17 +08:00
parent a60a469a38
commit e522044ed6
6 changed files with 110 additions and 33 deletions

View File

@ -64,12 +64,16 @@ export default {
initPageData() { initPageData() {
// console.log(1, this.queryParams) // console.log(1, this.queryParams)
// console.log(this.queryParams.pageNum) // console.log(this.queryParams.pageNum)
getPageData(this.queryParams).then(res => { if (this.queryParams.categoryId !== ''){
// console.log('',res) getPageData(this.queryParams).then(res => {
this.listinfo = res.data.list; // console.log('',res)
this.total =res.data.total; this.listinfo = res.data.list;
this.$emit('event-message', this.listinfo) this.total =res.data.total;
}) this.$emit('event-message', this.listinfo)
})
}else {
this.$emit('event-message', [])
}
}, },
}, },
} }

View File

@ -21,29 +21,29 @@
</div> </div>
</div> </div>
</div> </div>
<div class="committee-cont"> <div class="committee-cont" v-show="currentActive == 0">
<div v-if="currentActive == 0"> <div >
<div class="noticeRsr" v-for="(item,index) in onelist" @click="goDeatail(item)" > <div class="noticeRsr" v-for="(item,index) in onelist" @click="goDeatail(item)" >
<div >{{item.contentTitle}}</div> <div >{{item.contentTitle}}</div>
<div >{{item.publishDate}}</div> <div >{{item.publishDate}}</div>
</div> </div>
</div> </div>
<div v-if="currentActive == 0"> <page-util style="margin-top: 30px" :category-id="categoryId" @event-message="handleDataFromPage" />
<page-util :category-id="categoryId" @event-message="handleDataFromPage" /> </div>
</div>
<div class="committee-cont" v-if="currentActive !== 0" >
<!-- main --> <!-- main -->
<div v-for="(item, index) in nav " :key=index> <div>
<div class="about-conts-item1" v-if="currentActive == 2"> <div class="about-conts-item1" v-if="currentActive == 2">
<div class="noticeRsr" v-for="(item,index) in twolist" @click="goDeatail(item)" > <div class="noticeRsr" v-html="twolist[0].contentDetail" >
<div >{{item.contentTitle}}</div> <!-- <div >{{item.contentTitle}}</div>-->
<div >{{item.publishDate}}</div> <!-- <div >{{item.publishDate}}</div>-->
</div> </div>
</div> </div>
<div v-if="currentActive == 2"> <!-- <div v-show="currentActive == 2">-->
<page-util :category-id="categoryId" @event-message="handleDataFromPage" /> <!-- <page-util :category-id="categoryId" @event-message="handleDataFromPage" />-->
</div> <!-- </div>-->
<div class="about-conts-item1" v-if="currentActive == 1"> <div class="about-conts-item1" v-if="currentActive == 1">
<div class="dataClass"> <div class="dataClass">
<div v-for="(item, index) in dataList"> <div v-for="(item, index) in dataList">
@ -52,7 +52,9 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div v-show="currentActive !== 1 && currentActive !== 2">-->
<!-- -->
<!-- </div>-->
</div> </div>
<footers></footers> <footers></footers>
@ -95,7 +97,7 @@ export default {
input4: "" input4: ""
} }
}, },
mounted() { created() {
// //
this.initPageData(); this.initPageData();
}, },
@ -105,12 +107,18 @@ export default {
methods: { methods: {
handleDataFromPage(data){ handleDataFromPage(data){
if (this.currentActive == 0){ if (this.currentActive === 0){
this.onelist = data this.onelist = data
} }
if (this.currentActive == 2){ if (this.currentActive === 2){
this.twolist = data this.twolist = data
} }
// if (this.currentActive == 0){
// this.onelist = data
// }
// if (this.currentActive == 2){
// this.twolist = data
// }
}, },
goDeatail(data){ goDeatail(data){
@ -132,12 +140,17 @@ export default {
}, },
// //
getCurrentActive(value) { getCurrentActive(value) {
if (this.currentActive === 0){ // console.log(1,value, this.currentActive, this.categoryId)
this.categoryId = this.oneid if (this.value !== 1){
} this.categoryId = this.nav[value].id
if (this.currentActive === 1){
this.categoryId = this.twoid
} }
// console.log(2, this.currentActive, this.categoryId)
// if (this.currentActive === 0){
// this.categoryId = this.oneid
// }
// if (this.currentActive === 1){
// this.categoryId = this.twoid
// }
if (this.currentActive == value) { if (this.currentActive == value) {
return return
} }
@ -145,6 +158,7 @@ export default {
if (value === 1){ if (value === 1){
this.getContentByCategoryId(this.nav[value].id) this.getContentByCategoryId(this.nav[value].id)
} }
}, },
initPageData() { initPageData() {
@ -613,5 +627,8 @@ export default {
.noticeRsr:hover{ .noticeRsr:hover{
color: #00A0E8; color: #00A0E8;
cursor: pointer; cursor: pointer;
}
committee-cont2{
} }
</style> </style>

View File

@ -404,7 +404,13 @@ export default {
} }
this.currentActive = value this.currentActive = value
this.categoryId = value === 5 ? this.getNoticeId() : this.nav[value].id; this.categoryId = ""
if (value === 5){
this.categoryId = this.getNoticeId()
}else {
this.categoryId = this.nav[value].id;
}
// console.log(this.nav,'nav' ) // console.log(this.nav,'nav' )
}, },
initPageData() { initPageData() {

View File

@ -39,9 +39,9 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
</div> <div class="page-box">
<div class="page-box"> <page-util :category-id="categoryId" @event-message="handleDataFromPage" />
<page-util :category-id="categoryId" @event-message="handleDataFromPage" /> </div>
</div> </div>
<footers></footers> <footers></footers>
</div> </div>

View File

@ -21,6 +21,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="about-conts" v-bind:class="[currentActive == 1 ? 'bj' : '']"> <div class="about-conts" v-bind:class="[currentActive == 1 ? 'bj' : '']">
<!-- main --> <!-- main -->
<div v-for="(item, index) in nav " :key=index> <div v-for="(item, index) in nav " :key=index>
@ -29,7 +30,7 @@
</div> </div>
</div> </div>
<!-- 专业平台介绍 --> <!-- 专业平台介绍 -->
<div class="ayptjs" v-if="currentActive == 0"> <div class="ayptjs" v-show="currentActive == 0">
<div class="ayptjs-list"> <div class="ayptjs-list">
<div class="item" v-for="(item, index) in onelist" @click="goDeatail(item)" > <div class="item" v-for="(item, index) in onelist" @click="goDeatail(item)" >
@ -120,6 +121,7 @@ export default {
} }
}, },
handleDataFromPage(data){ handleDataFromPage(data){
console.log(data)
this.onelist = data this.onelist = data
}, },
// //

View File

@ -66,7 +66,7 @@
<div class="neirong" v-html="detailsContent"></div> <div class="neirong" v-html="detailsContent"></div>
</div> </div>
<div> <div v-show="currentActive === 1">
<page-util :page-size="8" :category-id="categoryId" @event-message="handleDataFromPage" /> <page-util :page-size="8" :category-id="categoryId" @event-message="handleDataFromPage" />
</div> </div>
@ -660,4 +660,52 @@ export default {
line-height: 18px; line-height: 18px;
} }
/* 圆形分页按钮样式 */
::v-deep .el-pagination .el-pager li:not(.disabled) {
border-radius: 100%;
/* 圆形 */
width: 50px;
height: 50px;
/* 按钮高度 */
line-height: 50px;
/* 文字垂直居中 */
text-align: center;
/* 文字水平居中 */
margin: 0 15px;
/* 按钮间距 */
border-radius: 50%;
width: 50px;
height: 50px;
background: #FFFFFF;
border: 1px solid #DDDDDD;
}
/* 选中的页码按钮样式 */
::v-deep .el-pagination .el-pager .active {
background-color: #005375;
;
/* 背景颜色 */
color: #fff;
/* 文字颜色 */
}
::v-deep .el-pagination.is-background .btn-next,
::v-deep .el-pagination.is-background .btn-prev {
background-color: #f4f4f5;
color: #333;
margin: 0 15px;
border-radius: 50%;
width: 50px;
height: 50px;
background: #FFFFFF;
border: 1px solid #DDDDDD;
}
::v-deep .el-pagination .btn-next .el-icon,
::v-deep .el-pagination .btn-prev .el-icon {
font-size: 18px;
}
</style> </style>