Commit ecd0c97f by 李耀琨

更新代码

parent 9bd5fdae
...@@ -36,3 +36,13 @@ export function newsFromBoard(data) { ...@@ -36,3 +36,13 @@ export function newsFromBoard(data) {
method: 'post' method: 'post'
}) })
} }
// 文章详情
export function newsDetail(data) {
return request({
url: `websiteCluster/website/newsDetail`,
data,
method: 'post'
})
}
\ No newline at end of file
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
<span>鹿心社与自治区级政法机关领导班子成立交付给来访登记过了多久</span> <span>鹿心社与自治区级政法机关领导班子成立交付给来访登记过了多久</span>
</div> </div>
</div> </div>
<div v-for="(item,index) in topList" :key="index" class="k-flex k-space-between top-list"> <div v-for="(item,index) in topList" :key="index" class="k-flex k-space-between top-list" @click="setParams(item)">
<div class="article-name"> <div class="article-name">
<span class="right-line">我为群众办实事</span> <span class="right-line">{{item.boardName}}</span>
<span >{{item.subject}}</span> <span >{{item.subject}}</span>
</div> </div>
<div>{{item.newsTime}}</div> <div>{{item.newsTime.substring(5,10)}}</div>
</div> </div>
</div> </div>
<!--今日头条结束--> <!--今日头条结束-->
...@@ -55,33 +55,19 @@ ...@@ -55,33 +55,19 @@
<div v-if="activeItem==1" class="mt-15"> <div v-if="activeItem==1" class="mt-15">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8" style=""> <el-col :span="8" style="">
<div class="work-tab-list"> <div class="work-tab-list" v-for="(item,index) in WorkButton" :key="index" >
<div class="tab-item"> <div class="tab-item" @click="informationSelection(item)">
&ensp;&ensp;&ensp;&ensp; {{item.boardName}}
</div>
<div class="tab-item">
桂高法通报
</div>
<div class="tab-item">
最高人民法院简报
</div>
<div class="tab-item">
广西高院简报<br/>信息专报
</div>
<div class="tab-item">
广西高院队伍<br/>教育整顿简报和动态
</div>
<div class="tab-item">
最高人民法院队伍<br/>教育整顿工作简报
</div> </div>
</div> </div>
</el-col > </el-col >
<el-col :span="16" style=""> <el-col :span="16" style="">
<div v-for="(item,index) in topList" :key="index" class="k-flex k-space-between work-top-list"> <div v-for="(item,index) in topList" :key="index" class="k-flex k-space-between work-top-list" @click="setParams(item)">
<div class="article-name" style=""> <div class="article-name" style="">
<span >{{item.subject}}</span> <span >{{item.subject}}</span>
</div> </div>
<div>{{item.newsTime}}</div> <div>{{item.newsTime.substring(5,10)}}</div>
</div> </div>
</el-col > </el-col >
</el-row> </el-row>
...@@ -364,7 +350,7 @@ ...@@ -364,7 +350,7 @@
</div> </div>
<el-row class="mt-10" :gutter="20"> <el-row class="mt-10" :gutter="20">
<el-col :span="7" style="background: #fafafa;padding:15px;"> <el-col :span="10" style="background: #fafafa;padding:15px;">
<div style="height:250px;overflow-y:auto;"> <div style="height:250px;overflow-y:auto;">
<div class="tree-search mb-15"> <div class="tree-search mb-15">
<el-input <el-input
...@@ -452,14 +438,16 @@ ...@@ -452,14 +438,16 @@
<!--结束--> <!--结束-->
</div> </div>
</el-col> </el-col>
<el-col :span="17"> <el-col :span="14">
<ul class="business-ul"> <ul class="business-ul">
<li v-for="(item,index) in tableData" :key="index"> <li v-for="(item,index) in tableData" :key="index" class="k-flex k-space-between " @click="setParams(item)" >
<div class="article-name">
<span></span> <span></span>
<span>过分过分的话</span> <span>{{item.boardName}}</span>
<span></span> <span></span>
<span>{{item.subject}}</span> <span>{{item.subject}}</span></div>
<div>
<span class="">{{item.newsTime.substring(5,10)}}</span></div>
</li> </li>
</ul> </ul>
</el-col> </el-col>
...@@ -1161,7 +1149,11 @@ export default { ...@@ -1161,7 +1149,11 @@ export default {
{name:'新疆'}, {name:'新疆'},
{name:'新疆兵团'}, {name:'新疆兵团'},
] ],
WorkButton:[{
boardName:'全部',
boardId:'',
}],
} }
...@@ -1169,10 +1161,34 @@ export default { ...@@ -1169,10 +1161,34 @@ export default {
created(){ created(){
this.getBoardTreeFun() this.getBoardTreeFun()
this.topListFun() this.topListFun()
this.initializationList()
}, },
methods: { methods: {
setParams(val){
this.$router.push({
path:'/detail',//跳转路由
query:{//参数对象
newsId:val.newsId
}
});
},
initializationList(){
newsFromBoard({boardId:'129',page:1,size:5}).then(res=>{
this.tableData = res.data.top.records
})
},
newsFromBoard(val){
newsFromBoard({boardId:val.boardId,page:1,size:5}).then(res=>{
this.topList = res.data.records
})
},
informationSelection(val){
console.log(val);
this.newsFromBoard(val)
},
topListFun(){ topListFun(){
topList({fyId:32}).then(res=>{ topList({fyId:32,page:1,size:5}).then(res=>{
this.topList = res.data.records this.topList = res.data.records
}) })
}, },
...@@ -1193,13 +1209,17 @@ export default { ...@@ -1193,13 +1209,17 @@ export default {
console.log('111===', i) console.log('111===', i)
this.activeItem=i; this.activeItem=i;
if (i==0) { if (i==0) {
topList({fyId:32}).then(res=>{ this.topListFun()
this.topList = res.data.records
})
}else{
getSubLevelBoard({boardId:32}).then(res=>{
}else{
getSubLevelBoard({boardId:1929,}).then(res=>{
this.WorkButton = [{ boardName:'全部'}]
res.data.forEach(item => {
this.WorkButton.push(item)
});
}) })
let val = {boardId:''}
this.newsFromBoard(val)
} }
}, },
switchBtnPolice(i){ switchBtnPolice(i){
...@@ -1209,7 +1229,9 @@ export default { ...@@ -1209,7 +1229,9 @@ export default {
searchEvent(){}, searchEvent(){},
handleNodeClick(data,node,obj){ handleNodeClick(data,node,obj){
console.log(data,node,obj); console.log(data,node,obj);
newsFromBoard({boardId:data.boardId}).then(res=>{
this.tableData = res.data.top.records
})
}, },
}, },
...@@ -1217,6 +1239,7 @@ export default { ...@@ -1217,6 +1239,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
} }
...@@ -1418,6 +1441,7 @@ color:#fff; ...@@ -1418,6 +1441,7 @@ color:#fff;
.tab-item{ .tab-item{
// height:45px; // height:45px;
// line-height:45px; // line-height:45px;
margin: 10px 0;
padding:10px 0; padding:10px 0;
text-align:center; text-align:center;
background:#ccc; background:#ccc;
...@@ -1456,7 +1480,7 @@ cursor: pointer; ...@@ -1456,7 +1480,7 @@ cursor: pointer;
.business-ul{ .business-ul{
margin:0; margin:0;
margin-top:10px; margin-top:10px;
width:80%; width:100%;
// white-space:nowrap; // white-space:nowrap;
// overflow:hidden; // overflow:hidden;
// text-overflow:ellipsis; // text-overflow:ellipsis;
...@@ -1537,6 +1561,7 @@ padding:0; ...@@ -1537,6 +1561,7 @@ padding:0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-left: 1px dashed #6e6e6e; border-left: 1px dashed #6e6e6e;
} }
&-title { &-title {
width: 90%; width: 90%;
......
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