Commit 1453321b by 莫晓莉

跳转修改

parent 2738722c
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-col :span="10" style="padding-left:0;padding-right:0;"> <el-col :span="10" style="padding-left:0;padding-right:0;">
<div > <div >
<el-carousel style="border-radius:8px;" height="280px" :interval="4000"> <el-carousel style="border-radius:8px;" height="280px" :interval="4000">
<el-carousel-item style="border-radius:8px;" v-for="(item,index) in headlineRotation" :key="index"> <el-carousel-item style="border-radius:8px;" v-for="(item,index) in headlineRotation.slice(0,3)" :key="index" >
<div v-if="item.attInfoList" class="carousel-div" style="border-radius:8px;" @click="setParams(item)"> <div v-if="item.attInfoList" class="carousel-div" style="border-radius:8px;" @click="setParams(item)">
<el-image v-if="item.attInfoList[0] && item.attInfoList[0].downloadPath" :src="item.attInfoList[0].downloadPath" fit="contain" style="width:100%;height:100%;"></el-image> <el-image v-if="item.attInfoList[0] && item.attInfoList[0].downloadPath" :src="item.attInfoList[0].downloadPath" fit="contain" style="width:100%;height:100%;"></el-image>
<div class="carousel-intro" style=""> <div class="carousel-intro" style="">
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<!-- 法院业务右边轮播轮播图 --> <!-- 法院业务右边轮播轮播图 -->
<el-col :span="11"> <el-col :span="11">
<el-carousel style="border-radius:8px;" height="280px" :interval="4000"> <el-carousel style="border-radius:8px;" height="280px" :interval="4000">
<el-carousel-item style="border-radius:8px;" v-for="(item,index) in tableData" :key="item.id"> <el-carousel-item style="border-radius:8px;" v-for="(item,index) in tableData.slice(0,3)" :key="item.id">
<div v-if="item.attInfoList && index<3" class="carousel-div" style="border-radius:8px;" @click="setParams(item)"> <div v-if="item.attInfoList && index<3" class="carousel-div" style="border-radius:8px;" @click="setParams(item)">
<el-image v-if="item.attInfoList[0] && item.attInfoList[0].downloadPath" :src="item.attInfoList[0].downloadPath" fit="contain" style="width:100%;height:100%;"></el-image> <el-image v-if="item.attInfoList[0] && item.attInfoList[0].downloadPath" :src="item.attInfoList[0].downloadPath" fit="contain" style="width:100%;height:100%;"></el-image>
<div class="carousel-intro" style=""> <div class="carousel-intro" style="">
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
<!--<el-col :span="8"></el-col> <!--<el-col :span="8"></el-col>
<el-col :span="8"></el-col> <el-col :span="8"></el-col>
<el-col :span="8"></el-col>--> <el-col :span="8"></el-col>-->
<el-col style="border-radius:5px;" :span="8" v-for="item in policeOfficer" :key="item.id" > <el-col style="border-radius:5px;" :span="8" v-for="item in policeOfficer.slice(0,5)" :key="item.id" >
<div v-if="item.attInfoList.length>0" class="imgs-div" style="width:100%;border-radius:8px;" @click="setParams(item)"> <div v-if="item.attInfoList.length>0" class="imgs-div" style="width:100%;border-radius:8px;" @click="setParams(item)">
<el-image :src="item.attInfoList[0].downloadPath" fit="contain" style="width:100%;display:block;border-radius:5px;"> <el-image :src="item.attInfoList[0].downloadPath" fit="contain" style="width:100%;display:block;border-radius:5px;">
</el-image> </el-image>
...@@ -821,6 +821,7 @@ export default { ...@@ -821,6 +821,7 @@ export default {
query: { query: {
//参数对象 //参数对象
boardId: 1965,//视频点播 boardId: 1965,//视频点播
type:'menu'
}, },
}); });
}else if(activeItemPolice==1){ }else if(activeItemPolice==1){
...@@ -839,7 +840,8 @@ export default { ...@@ -839,7 +840,8 @@ export default {
path: "/list", //跳转路由 path: "/list", //跳转路由
query: { query: {
//参数对象 //参数对象
boardId: boardId,//视频点播 boardId: boardId,
type:'menu'
}, },
}); });
......
...@@ -352,16 +352,6 @@ export default { ...@@ -352,16 +352,6 @@ export default {
this.getSubLevelBoard(2, 130); //法院业务 this.getSubLevelBoard(2, 130); //法院业务
}, },
methods: { methods: {
// selectedNav(item, index) {
// console.log("index==", index);
// this.classA = index;
// console.log("this.classA==", this.classA);
// if (item.name == "manage") {
// // var url=process.env.VUE_APP_LOGIN_API+'/manage'
// // window.open(url)
// window.open("/#/manage");
// }
// },
menuRouterClick(item, index) { menuRouterClick(item, index) {
console.log("menuRouterClick-index==", index); console.log("menuRouterClick-index==", index);
console.log("menuRouterClick-item==", item); console.log("menuRouterClick-item==", item);
...@@ -397,6 +387,7 @@ export default { ...@@ -397,6 +387,7 @@ export default {
query: { query: {
//参数对象 //参数对象
boardId: item.boardId, boardId: item.boardId,
type:'menu'
}, },
}); });
} }
...@@ -418,6 +409,7 @@ export default { ...@@ -418,6 +409,7 @@ export default {
query: { query: {
//参数对象 //参数对象
boardId: subItem.boardId, boardId: subItem.boardId,
type:'sub'
}, },
}); });
}, },
......
...@@ -184,6 +184,7 @@ import { ...@@ -184,6 +184,7 @@ import {
} from "@/api/list.js"; } from "@/api/list.js";
import { import {
getSelectedBoardTree,//获取指定栏目树 getSelectedBoardTree,//获取指定栏目树
getBoardAndSubAllNews,//获取栏目及子栏目全部新闻列表
} from "@/api/homePage.js" } from "@/api/homePage.js"
export default { export default {
name: "show", name: "show",
...@@ -292,15 +293,30 @@ export default { ...@@ -292,15 +293,30 @@ export default {
console.log("xxxxxxxxxxxx", this.$route.query); console.log("xxxxxxxxxxxx", this.$route.query);
this.getBreadcrumb(); this.getBreadcrumb();
this.getSubLevelBoardF(this.$route.query.boardId); this.getSubLevelBoardF(this.$route.query.boardId);
// this.newsFromBoard();
//如果是点击主菜单则显示主模块的全部数据,某个子菜单栏目就显示栏目的数据
var type=this.$route.query.type;
if(type=='menu'){
this.getBoardAndSubAllNews();
}else if(type=='sub'){
this.newsFromBoard(); this.newsFromBoard();
}
}, },
//监听路由获取面包屑 //监听路由获取面包屑
watch: { watch: {
$route() { $route() {
console.log("xxxxxxxxxxxxroute", this.$route.query);
this.getBreadcrumb(); this.getBreadcrumb();
if (this.$route.query.boardId) { if (this.$route.query.boardId && this.$route.query.type) {
this.newsFromBoard();
this.getSubLevelBoardF(this.$route.query.boardId); this.getSubLevelBoardF(this.$route.query.boardId);
//如果是点击主菜单则显示主模块的全部数据,某个子菜单栏目就显示栏目的数据
var type=this.$route.query.type
if(type=='menu'){
this.getBoardAndSubAllNews();
}else if(type=='sub'){
this.newsFromBoard();
}
} }
}, },
}, },
...@@ -338,6 +354,16 @@ export default { ...@@ -338,6 +354,16 @@ export default {
} }
}); });
}, },
// 获取栏目及子栏目全部新闻列表
getBoardAndSubAllNews(){
this.pageInfo.boardId=this.$route.query.boardId;
getBoardAndSubAllNews(this.pageInfo).then(res=>{
if(res.success){
this.newsList=res.data.records;
this.pageInfo.total=res.data.total;
}
})
},
handleNodeClick(data,node,obj){ handleNodeClick(data,node,obj){
console.log(data,node,obj); console.log(data,node,obj);
this.pageInfo.boardId=data.boardId; this.pageInfo.boardId=data.boardId;
...@@ -347,7 +373,14 @@ export default { ...@@ -347,7 +373,14 @@ export default {
}, },
pageChange(e) { pageChange(e) {
this.pageInfo.page = e; this.pageInfo.page = e;
// this.newsFromBoard();
//如果是点击主菜单则显示主模块的全部数据,某个子菜单栏目就显示栏目的数据
var type=this.$route.query.type;
if(type=='menu'){
this.getBoardAndSubAllNews();
}else if(type=='sub'){
this.newsFromBoard(); this.newsFromBoard();
}
}, },
sizeChange(e) { sizeChange(e) {
this.pageInfo.size = e; this.pageInfo.size = e;
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<el-col :span="8" style="padding-left:0;padding-right:0;"> <el-col :span="8" style="padding-left:0;padding-right:0;">
<div > <div >
<el-carousel style="border-radius:8px;" height="280px" :interval="4000"> <el-carousel style="border-radius:8px;" height="280px" :interval="4000">
<el-carousel-item style="border-radius:8px;" v-for="item in newestList" :key="item.newsId"> <el-carousel-item style="border-radius:8px;" v-for="item in newestList.slice(0,3)" :key="item.newsId">
<div class="carousel-div" style="border-radius:8px;" @click="setParams(item)"> <div v-if="item.attInfoList" class="carousel-div" style="border-radius:8px;" @click="setParams(item)">
<el-image :src="item.attInfoList.downloadPath" style="width:100%;height:100%;"></el-image> <el-image v-if="item.attInfoList[0] && item.attInfoList[0].downloadPath" :src="item.attInfoList[0].downloadPath" style="width:100%;height:100%;"></el-image>
<div class="carousel-intro" style=""> <div class="carousel-intro" style="">
{{item.subject}} {{item.subject}}
</div> </div>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
</div> </div>
</div> </div>
<el-row class="mt-15" :gutter="20"> <el-row class="mt-15" :gutter="20">
<el-col style="border-radius:5px;" :span="8" v-for="item in newsGanList" :key="item.id" > <el-col style="border-radius:5px;" :span="8" v-for="item in newsGanList.slice(0,5)" :key="item.id" >
<div class="imgs-div" style="width:100%;border-radius:8px;" @click="setParams(item)"> <div class="imgs-div" style="width:100%;border-radius:8px;" @click="setParams(item)">
<el-image :src="item.attInfoList[0].downloadPath" style="width:100%;display:block;border-radius:5px;"> <el-image :src="item.attInfoList[0].downloadPath" style="width:100%;display:block;border-radius:5px;">
</el-image> </el-image>
...@@ -229,6 +229,7 @@ export default { ...@@ -229,6 +229,7 @@ export default {
query: { query: {
//参数对象 //参数对象
boardId: boardId, boardId: boardId,
type:'menu'
}, },
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment