Commit 53f5ea8f by 莫晓莉

视频点播和权限判断

parent e7452288
...@@ -136,9 +136,7 @@ export default { ...@@ -136,9 +136,7 @@ export default {
}, },
enableTurnOnSystem(){ enableTurnOnSystem(){
enableTurnOnSystem({fyId:32}).then((res) => { enableTurnOnSystem({fyId:32}).then((res) => {
if(res.success){ sessionStorage.setItem('publishFlag',res.success);
}
}); });
} }
}, },
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-button @click.native="switchBtn(1)" :class="['btn-item',{'sanjiao':activeItem==1}]">工作信息</el-button> <el-button @click.native="switchBtn(1)" :class="['btn-item',{'sanjiao':activeItem==1}]">工作信息</el-button>
</div> </div>
<!-- 工作信息的boardId=1929 --> <!-- 工作信息的boardId=1929 -->
<div @click="toMorelist(1929)" style="font-size:12px;color: #999999;"> <div @click="toTopMorelist(activeItem)" style="font-size:12px;color: #999999;">
<span>MORE></span> <span>MORE></span>
</div> </div>
</div> </div>
...@@ -65,11 +65,11 @@ ...@@ -65,11 +65,11 @@
</el-col > </el-col >
<el-col :span="16" style=""> <el-col :span="16" style="">
<div v-for="(item,index) in workList" :key="index" class="k-flex k-space-between work-top-list" @click="setParams(item)"> <div v-for="(item,index) in workList" :key="index" class="k-flex k-space-between work-top-list" @click="setParams(item)">
<div class="article-name" style=""> <div class="article-name k-flex k-align-center " style="overflow:h">
<span class="right-line">{{item.boardName}}</span> <span class="right-line">{{item.boardName}}</span>
<span >{{item.subject}}</span> <div class="k-all" style="overflow:hidden;text-overflow:ellipsis;">{{item.subject}}</div>
</div> </div>
<div v-if="item.newsTime">{{item.newsTime.substring(5,10)}}</div> <div v-if="item.newsTime" style="white-space:nowrap;">{{item.newsTime.substring(5,10)}}</div>
</div> </div>
</el-col > </el-col >
</el-row> </el-row>
...@@ -756,8 +756,6 @@ export default { ...@@ -756,8 +756,6 @@ export default {
topList({fyId:32,page:1,size:5}).then(res=>{ topList({fyId:32,page:1,size:5}).then(res=>{
this.topList = res.data.records this.topList = res.data.records
this.headlineRotation = res.data.records this.headlineRotation = res.data.records
}) })
}, },
getSubLevelBoardF(){ getSubLevelBoardF(){
...@@ -818,12 +816,19 @@ export default { ...@@ -818,12 +816,19 @@ export default {
// 跳转到全区速递和视频点播更多模块 // 跳转到全区速递和视频点播更多模块
toAllMorelist(activeItemPolice){ toAllMorelist(activeItemPolice){
if(activeItemPolice==0){ if(activeItemPolice==0){
// this.$router.push({
// path: "/list", //跳转路由
// query: {
// //参数对象
// boardId: 1965,//视频点播
// type:'menu'
// },
// });
this.$router.push({ this.$router.push({
path: "/list", //跳转路由 path: "/zone", //跳转路由
query: { query: {
//参数对象 //参数对象
boardId: 1965,//视频点播 type: 'vedio',
type:'menu'
}, },
}); });
}else if(activeItemPolice==1){ }else if(activeItemPolice==1){
...@@ -831,7 +836,28 @@ export default { ...@@ -831,7 +836,28 @@ export default {
path: "/zone", //跳转路由 path: "/zone", //跳转路由
query: { query: {
//参数对象 //参数对象
type: activeItemPolice, type: 'all',
},
});
}
},
// 跳转到全区速递和视频点播更多模块
toTopMorelist(activeItem){
if(activeItem==0){
this.$router.push({
path: "/zone", //跳转路由
query: {
//参数对象
type: 'top',
},
});
}else if(activeItem==1){
this.$router.push({
path: "/list", //跳转路由工作信息
query: {
//参数对象
boardId: 1929,
type:'menu'
}, },
}); });
} }
...@@ -1052,6 +1078,10 @@ color:#fff; ...@@ -1052,6 +1078,10 @@ color:#fff;
border-bottom:1px solid #ccc; border-bottom:1px solid #ccc;
} }
.right-line{ .right-line{
display:inline-block;
width:20%;
overflow: hidden;
text-overflow: ellipsis;
padding-right:2px; padding-right:2px;
border-right:2px solid black; border-right:2px solid black;
margin-right:5px; margin-right:5px;
......
...@@ -255,6 +255,29 @@ export default { ...@@ -255,6 +255,29 @@ export default {
name: "news", name: "news",
path: "/news", path: "/news",
meta: { title: "法院新闻" }, meta: { title: "法院新闻" },
children:[
{
name: "top",
path:'',
boardId:'',
type:'top',
meta:{title:'今日头条',},
},
{
name: "all",
path:'',
type:'all',
meta:{title:'全区速递',},
},
{
name: "vedio",
path:'',
boardId:1965,
type:'vedio',
meta:{title:'视频点播',},
},
]
// children:[ // children:[
// { // {
// name: "news", // name: "news",
...@@ -345,7 +368,7 @@ export default { ...@@ -345,7 +368,7 @@ export default {
}, },
created() { created() {
this.getAllCourts(); //获取全区法院 this.getAllCourts(); //获取全区法院
this.getSubLevelBoard(1, 129); //法院新闻 // this.getSubLevelBoard(1, 129); //法院新闻
this.getSubLevelBoard(2, 1929); //工作信息 this.getSubLevelBoard(2, 1929); //工作信息
this.getSubLevelBoard(3, 130); //法院业务 this.getSubLevelBoard(3, 130); //法院业务
this.getSubLevelBoard(4, 135); //干警作品 this.getSubLevelBoard(4, 135); //干警作品
...@@ -367,6 +390,7 @@ export default { ...@@ -367,6 +390,7 @@ export default {
// window.open(url) // window.open(url)
// window.open("/#/manage"); // window.open("/#/manage");
var userInfo=sessionStorage.getItem('userInfo'); var userInfo=sessionStorage.getItem('userInfo');
var publishFlag=sessionStorage.getItem('publishFlag');
console.log('user==',userInfo); console.log('user==',userInfo);
if(!userInfo){ if(!userInfo){
...@@ -378,9 +402,19 @@ export default { ...@@ -378,9 +402,19 @@ export default {
return; return;
}else{ }else{
console.log('publishFlag=',publishFlag);
if(publishFlag){
this.$router.push({ this.$router.push({
path: item.path, //跳转路由 path: item.path, //跳转路由
}); });
}else{
this.$message({
message:'您的账号没有权限!',
type:'error',
});
return;
}
} }
}else if(item.name == "homePage" || item.name == "news"){ }else if(item.name == "homePage" || item.name == "news"){
this.$router.push({ this.$router.push({
...@@ -425,7 +459,16 @@ export default { ...@@ -425,7 +459,16 @@ export default {
// }); // });
// return; // return;
// } // }
if(subItem.name=='top' || subItem.name=='all' || subItem.name=='vedio'){
this.$router.push({
path: "/zone", //跳转路由
query: {
//参数对象
boardId: subItem.boardId,
type:subItem.type
},
});
}else{
this.$router.push({ this.$router.push({
path: "/list", //跳转路由 path: "/list", //跳转路由
query: { query: {
...@@ -434,6 +477,9 @@ export default { ...@@ -434,6 +477,9 @@ export default {
type:'sub' type:'sub'
}, },
}); });
}
......
...@@ -4,18 +4,19 @@ ...@@ -4,18 +4,19 @@
<el-col :span="18" :offset="3"> <el-col :span="18" :offset="3">
<el-row class="mt-20" :gutter="20"> <el-row class="mt-20" :gutter="20">
<!--左边栏目开始--> <!--左边栏目开始-->
<!-- <el-col :span="5"> <el-col :span="5">
<div class="list-container" style=""> <div class="list-container" style="">
<div class="list-title mb-10" style="">按分类查看</div> <div class="list-title mb-10" style="">按分类查看</div>
<ul class="type-list"> <ul class="type-list">
<li><a href="#">最高法通报</a></li> <li @click="switchMenu('top')"><a href="#">今日头条</a></li>
<li><a href="#">最高人民法院简报</a></li> <li @click="switchMenu('all')"><a href="#">全区速递</a></li>
<li @click="switchMenu('vedio')"><a href="#">音视频点播</a></li>
</ul> </ul>
</div> </div>
</el-col> --> </el-col>
<!--左边栏目结束--> <!--左边栏目结束-->
<!-- <el-col :span="19"> --> <el-col :span="19">
<div class="zone-style"> <div class="zone-style">
<div style="min-height:76vh;"> <div style="min-height:76vh;">
<el-table <el-table
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
</div> </div>
</div> </div>
<!-- </el-col> --> </el-col>
</el-row> </el-row>
...@@ -88,7 +89,9 @@ ...@@ -88,7 +89,9 @@
</template> </template>
<script> <script>
import { import {
newsFromBoard,
latestNewOfGXCourt,//获取全区速递 latestNewOfGXCourt,//获取全区速递
topList,//今日头条
} from "@/api/homePage.js" } from "@/api/homePage.js"
export default { export default {
name: "show", name: "show",
...@@ -106,17 +109,34 @@ export default { ...@@ -106,17 +109,34 @@ export default {
}, },
created() { created() {
this.getLatestNewOfGXCourt(); // this.getLatestNewOfGXCourt();
var type=this.$route.query.type;
if(type=='vedio'){
this.getVedio();
}else if(type=='top'){
this.topListFun();//今日头条
}else if(type=='all'){
this.getLatestNewOfGXCourt();//获取全区速递
}
}, },
//监听路由获取面包屑 //监听路由获取面包屑
watch: { watch: {
$route() { $route() {
if (this.$route.query.type) { if (this.$route.query.type) {
this.getLatestNewOfGXCourt(); var type=this.$route.query.type;
if(type=='vedio'){
this.getVedio();
}else if(type=='top'){
this.topListFun();//今日头条
}else if(type=='all'){
this.getLatestNewOfGXCourt();//获取全区速递
}
} }
}, },
}, },
methods:{ methods:{
//全区速递
getLatestNewOfGXCourt(){ getLatestNewOfGXCourt(){
// this.pageInfo.deptId=32; // this.pageInfo.deptId=32;
latestNewOfGXCourt(this.pageInfo).then(res=>{ latestNewOfGXCourt(this.pageInfo).then(res=>{
...@@ -127,10 +147,38 @@ export default { ...@@ -127,10 +147,38 @@ export default {
}) })
}, },
//今日头条
topListFun(){
this.pageInfo.fyId=32;
topList(this.pageInfo).then(res=>{
// this.topList = res.data.records
// this.headlineRotation = res.data.records
this.moreNewsList=res.data.records;
this.pageInfo.total=res.data.total;
})
},
// 视频点播
// 视频点播boardId是1965
getVedio(){
this.pageInfo.fyId=1965;
newsFromBoard(this.pageInfo).then(res=>{
// this.videoLiet = res.data.newsList.records
this.moreNewsList=res.data.newsList.records;
this.pageInfo.total=res.data.total;
})
},
pageChange(e) { pageChange(e) {
this.pageInfo.page = e; this.pageInfo.page = e;
this.getLatestNewOfGXCourt(); // this.getLatestNewOfGXCourt();
var type=this.$route.query.type;
if(type=='vedio'){
this.getVedio();
}else if(type=='top'){
this.topListFun();//今日头条
}else if(type=='all'){
this.getLatestNewOfGXCourt();//获取全区速递
}
}, },
sizeChange(e) { sizeChange(e) {
this.pageInfo.size = e; this.pageInfo.size = e;
...@@ -145,6 +193,18 @@ export default { ...@@ -145,6 +193,18 @@ export default {
} }
}); });
}, },
switchMenu(type){
this.pageInfo.page=1;
this.pageInfo.size=10;
this.pageInfo.total=0;
if(type=='vedio'){
this.getVedio();
}else if(type=='top'){
this.topListFun();//今日头条
}else if(type=='all'){
this.getLatestNewOfGXCourt();//获取全区速递
}
}
} }
} }
......
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