前端补正

This commit is contained in:
xvv 2024-08-02 16:14:37 +08:00
parent 8b8c9363dd
commit 8506989c79
6 changed files with 178 additions and 117 deletions

View File

@ -2,34 +2,7 @@
<div class="container">
<div class="top-box">
<headers :msg='Serial' ></headers>
<!-- <div class="tab-box">-->
<!-- &lt;!&ndash; left &ndash;&gt;-->
<!-- <div class="d-s">-->
<!-- <div class="logo-box">-->
<!-- <img :src="baseInfo.webImg" />-->
<!-- </div>-->
<!-- <div class="logo-size">-->
<!-- {{ this.baseInfo.webName }}-->
<!-- </div>-->
<!-- </div>-->
<!-- &lt;!&ndash; tab &ndash;&gt;-->
<!-- <div class="d-s">-->
<!-- <div class="x-x" v-for="(item, index) in tablist " :key="index" @click="tabClick(item)" >-->
<!-- {{ item.label }}-->
<!-- </div>-->
<!-- </div>-->
<!-- &lt;!&ndash; right &ndash;&gt;-->
<!-- <div class="d-s" style="font-size: 20px; color: #fff;cursor: pointer;width: 170px;">-->
<!-- <i class="el-icon-search" v-if="show_search"></i>-->
<!-- <div style="font-size: 18px; margin-left: 15px; " v-if="show_search" @click="show_search = !show_search">搜索-->
<!-- </div>-->
<!-- <el-input placeholder="输入关键词" v-model="input4" style="width: 150px;height: 35px" v-if="!show_search">-->
<!-- <i slot="prefix" class="el-input__icon el-icon-search"></i>-->
<!-- </el-input>-->
<!-- <i class="el-icon-circle-close" v-if="!show_search" style="margin-left: 10px;"-->
<!-- @click="show_search = true"></i>-->
<!-- </div>-->
<!-- </div>-->
<div style="overflow: hidden;position: relative;" class="mySwiper">
<swiper ref="mySwiper" :options="swiperOptions" style="width: 100%">
<swiper-slide v-for="(item,index) in bannerlist" :key="index">
@ -87,7 +60,7 @@
</swiper-slide>
</swiper>
<div class="swiper-pagination"></div>
<div style=" width: 156px;height: 42px;position: absolute;bottom: 30px;">
<div style=" width: 156px;height: 42px;position: absolute;bottom: 30px; z-index: 99 " @click="golist(indexList[0].id)" >
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px" >
</div>
</div>
@ -162,7 +135,7 @@
</div>
<!-- 动画-->
</div>
<div style=" width: 156px;height: 42px;margin: 50px auto;">
<div style=" width: 156px;height: 42px;margin: 50px auto;" @click="golist(indexList[2].id)" >
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
</div>
</div>
@ -310,6 +283,13 @@ export default {
}
},
methods: {
golist(id){
console.log('跳转',id)
this.$router.push({
name: 'list',
query:{ id: id }
});
},
tabClick(item){
if(item.label=="联系我们"){
this.$router.push('/contact');
@ -334,10 +314,12 @@ export default {
getTab().then(response => {
if (response.code == 200) {
this.tablist = response.data;
console.log('所有id',this.tablist)
this.categoryQuery.categoryId = this.tablist[0].id
getbanner(this.categoryQuery).then(res => {
if (res.code == 200) {
this.indexList = res.data
console.log('indexList',this.indexList)
res.data[3].children.list.forEach(item => {
this.bannerlist.push(process.env.VUE_APP_BASE_API + item.imageUrl[0])
})

View File

@ -120,7 +120,7 @@ export default {
// { name: '' },
// { name: '' },
],
currentActive: 2,
currentActive: 0,
isMounted: false,
orgList: "",
postList: [],

View File

@ -117,7 +117,13 @@
<!-- main -->
<div v-for="(item, index) in nav " :key=index>
<div class="about-conts-item1" v-if="currentActive == index">
<div v-if="currentActive != 3" class="neirong" v-html="pageContextList[index]"></div>
<div v-if="currentActive != 3 && currentActive != 2 " class="neirong" v-html="pageContextList[index]"></div>
<div class="wrapbox">
<div v-if="currentActive == 2 " v-for="(item,index) in nav[2].children.list">
<img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px">
<div>{{item.contentTitle}}</div>
</div>
</div>
</div>
</div>
<!-- <div class="news">
@ -161,7 +167,9 @@ export default {
},
data() {
return {
imgurl:process.env.VUE_APP_BASE_API,
ruleForm: {
name: '',
teacherlsit:[
{}
@ -184,7 +192,7 @@ export default {
// { name: '' },
// { name: '' },
],
currentActive: 1,
currentActive: 0,
isMounted: false,
input4: ""
}
@ -204,6 +212,7 @@ export default {
return
}
this.currentActive = value
console.log(this.nav[2].children.list,'nav' )
},
initPageData() {
@ -223,17 +232,19 @@ export default {
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
},
}
}
</script>
<style scoped>
<style scoped lang="scss">
/* .container {
background: #F5F5F5;
} */
@ -346,7 +357,14 @@ export default {
margin-right: 20px;
cursor: pointer;
}
.wrapbox{
width: 100%;
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
padding: 15px;
}
.ny-banner {
width: 100%;
}
@ -434,6 +452,12 @@ export default {
margin: 40px auto;
background: #fff;
border-radius: 8px;
overflow: hidden;
box-sizing: border-box;
padding: 15px;
img{
width: 100%;
}
}
.committee-cont .news {

View File

@ -8,12 +8,27 @@
</div>
</div>
<!-- new -->
<div class="b-box">
<div class="gang_" v-for="(item,index) in listinfo" :key="index" @click="goDeatail(item)" >
<div class="title_">{{item.contentTitle || '暂无标题' }}</div>
<div class="time_" >{{item.createTime || 0.00 }}</div>
</div>
</div>
<div class="page-box">
<el-pagination
background
layout="prev, pager, next"
v-show="total>0"
:total="total"
:current-page.sync="queryParams.pageNum"
:page-size.sync="queryParams.pageSize"
@size-change="initPageData"
@current-change="initPageData">
</el-pagination>
</div>
<footers></footers>
</div>
</template>
<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css";
@ -38,28 +53,21 @@ export default {
},
data() {
return {
total: 0,
queryParams: {
id:this.$route.query.id,
pageNum: 1,
pageSize: 10,
},
pageContextList: [],
nav: [
// { name: '' },
// { name: '' },
// { name: '' },
],
nav: [ ],
listinfo: [],
currentActive: 2,
isMounted: false,
orgList: "",
postList: [],
// content: `<p style="box-sizing: inherit; text-align: justify; text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
// <span style="font-family: , &quot;Microsoft YaHei&quot;; font-size: 18px;">20065000300<br/></span>
// </p>
// <p style="text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
// <span style="font-family: , &quot;Microsoft YaHei&quot;; font-size: 18px;">:220线:线</span>
// </p>
// <p style="text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
// <span style="font-family: , &quot;Microsoft YaHei&quot;; font-size: 18px;">广</span>
// </p>
// <p style="box-sizing: inherit; margin-top: 0px; text-align: justify; text-indent: 2em; margin-bottom: 5px; line-height: 1.75em;">
// <span style="box-sizing: inherit; font-family: , MicrosoftYaHei;"></span><br/>
// </p>`
content: "",
leaderList: "",
}
@ -74,6 +82,21 @@ export default {
},
methods: {
goDeatail(data){
console.log(data)
if(data.linkType == 0){
this.$router.push({
name: 'details',
query:{ id: data.id }
});
}
if(data.linkType == 1){
window.open(data.link, '_blank');
}
},
//
getCurrentActive(value) {
if (this.currentActive == value) {
@ -82,64 +105,12 @@ export default {
this.currentActive = value
},
initPageData() {
console.log("123123", this.$route.query.id);
let routeParam = {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
}
getPageColumn(routeParam).then(response => {
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
// let introduction_center_param = {
// "categoryId": "1813827591224823808",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(introduction_center_param).then(response => {
// response.data.list.forEach(element => {
// this.content += element.contentDetail;
// });
// });
// let organizational_structure_param = {
// "categoryId": "1813827750121836544",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(organizational_structure_param).then(response => {
// response.data.list.forEach(element => {
// // this.orgList.push(element);
// this.orgList += element.contentDetail;
// });
// });
// let current_leader_param = {
// "categoryId": "1813827861774209024",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(current_leader_param).then(response => {
// response.data.list.forEach(element => {
// this.leaderList += element.contentDetail;
// });
// });
console.log("传参id", this.$route.query.id);
getPageData(this.queryParams).then(res => {
console.log('列表',res)
this.listinfo = res.data.list;
this.total =res.data.total;
})
},
}
@ -151,8 +122,8 @@ export default {
/* .container {
background: #F5F5F5;
} */
.bj {
background: #F5F5F5;
.container {
background: #fff;
}
.top-box {
@ -165,6 +136,24 @@ export default {
/* 禁止背景图片重复 */
position: relative;
}
.b-box{
width: 80%;
margin: 0 auto;
min-height: 500px;
background: #fff;
margin: 25px auto;
box-sizing: border-box;
padding: 15px;
}
.gang_{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 15px 0px;
border-bottom: 1px solid #eee;
}
.tab-box {
width: 100%;
@ -537,4 +526,70 @@ export default {
line-height: 18px;
}
.title_{
font-weight: 500;
font-size: 20px;
color: #333333;
cursor: pointer;
}
.title_:hover{
color: #005375 !important;
}
.time_{
font-weight: 500;
font-size: 14px;
color: #999999;
}
/* 圆形分页按钮样式 */
::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;
}
.page-box{
width: 80%;
margin: 10px auto;
}
</style>

View File

@ -181,7 +181,7 @@ export default {
// { name: '' },
// { name: '' },
],
currentActive: 3,
currentActive: 0,
isMounted: false,
content: `<p style="box-sizing: inherit; text-align: justify; text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
<span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; font-size: 18px;">淄博瑞安输变电工程有限公司成立于2006年公司原属国网淄博供电公司下属施工企业现为山东泉舜控股集团有限公司全资子公司注册资本5000万元公司设立于历史悠久的齐文化发祥地淄博市并在济南青岛聊城东营潍坊济宁泰安李庄邯郸等各地设有分支机构企业人才结构合理大专以上学历及具有各种专业技术职称的近300余人是一支经过国家电网公司多年锻造专业技术强电力工程施工经验丰富的的铁军队伍<br/></span>

View File

@ -64,7 +64,7 @@ export default {
// { name: '' },
// { name: '' },
],
currentActive: 2,
currentActive: 0,
resourceSharing: "",
guideBook: "",
syllabus: "",