调整首页
This commit is contained in:
parent
336a330e84
commit
9e38668c29
|
@ -22,6 +22,13 @@ export default [
|
|||
//redirect: '/user/login',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/gateway/listPage')
|
||||
},
|
||||
{
|
||||
path: '/listPage2',
|
||||
name: 'listPage2',
|
||||
//component: BlankLayout,
|
||||
//redirect: '/user/login',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/gateway/listPage2')
|
||||
},
|
||||
{
|
||||
path: '/detailedPage',
|
||||
name: 'detailedPage',
|
||||
|
@ -29,6 +36,13 @@ export default [
|
|||
//redirect: '/user/login',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/gateway/detailedPage')
|
||||
},
|
||||
{
|
||||
path: '/detailedPage2',
|
||||
name: 'detailedPage2',
|
||||
//component: BlankLayout,
|
||||
//redirect: '/user/login',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/gateway/detailedPage2')
|
||||
},
|
||||
{
|
||||
path: '/gybs',
|
||||
name: 'gybs',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="h_down clearfloat">
|
||||
<div class="logo left"><img src="img/logo.png" ></div>
|
||||
<div class="sch_downbox right">
|
||||
<input type="" name="" id="" value="请输入要搜索的内容" />
|
||||
<input type="" name="" id="" placeholder="请输入要搜索的内容" />
|
||||
<span class="sch_img right"><img src="img/search.png" ></span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,62 +32,54 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="multiUlli" @mouseenter="openMenu" @mouseleave="closeMenu">
|
||||
<a class="mulgo" href="qynyzy.html" title="区域农业资源">
|
||||
<a class="mulgo" href="javascript:void(0);" title="区域农业资源" @click="$to('listPage2',{pid:101,id:10101})">
|
||||
<span class="mulgochie">区域农业资源</span>
|
||||
</a>
|
||||
<blockquote>
|
||||
<div class="ChildNavIn">
|
||||
<ul>
|
||||
<li class="clearfloat">
|
||||
<a href="" class="xbzlzd left">
|
||||
<a href="javascript:void(0);" class="xbzlzd left" @click="$to('listPage2',{pid:101,id:10101})">
|
||||
<span><img src="img/dou.png" style="width: 26px;"></span>
|
||||
<span>西部杂粮杂豆</span>
|
||||
</a>
|
||||
<div class="xbcot right">
|
||||
<a href="xiangqyi.html">高梁</a>
|
||||
<a href="xiangqyi.html">花生</a>
|
||||
<a href="xiangqyi.html">绿豆</a>
|
||||
<a href="xiangqyi.html">小豆</a>
|
||||
<a href="xiangqyi.html">燕麦</a>
|
||||
<a href="xiangqyi.html">谷子</a>
|
||||
<a href="xiangqyi.html">向日葵</a>
|
||||
<template v-for="(col,colIndex) in xbzlzdList" >
|
||||
<a href="javascript:void(0);" :key="colIndex" @click="$to('detailedPage2',{id:col.id})">{{col.title}}</a>
|
||||
</template>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfloat">
|
||||
<a href="" class="xbzlzd left">
|
||||
<a href="javascript:void(0);" class="xbzlzd left" @click="$to('listPage2',{pid:101,id:10102})">
|
||||
<span><img src="img/jingji.png" style="width: 26px;"></span>
|
||||
<span>东部经济资源</span>
|
||||
</a>
|
||||
<div class="xbcot right">
|
||||
<a href="xiangqyi.html">大豆</a>
|
||||
<a href="xiangqyi.html">食用菌</a>
|
||||
<a href="xiangqyi.html">中药材</a>
|
||||
<a href="xiangqyi.html">林果资源</a>
|
||||
<template v-for="(col,colIndex) in dbjjzyList" >
|
||||
<a href="javascript:void(0);" :key="colIndex" @click="$to('detailedPage2',{id:col.id})">{{col.title}}</a>
|
||||
</template>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfloat">
|
||||
<a href="" class="xbzlzd left">
|
||||
<a href="javascript:void(0);" class="xbzlzd left" @click="$to('listPage2',{pid:101,id:10103})">
|
||||
<span><img src="img/liangshi.png" style="width: 26px;"></span>
|
||||
<span>中部粮食资源</span>
|
||||
</a>
|
||||
<div class="xbcot right">
|
||||
<a href="xiangqyi.html">水稻</a>
|
||||
<a href="xiangqyi.html">玉米</a>
|
||||
<template v-for="(col,colIndex) in zblszyList" >
|
||||
<a href="javascript:void(0);" :key="colIndex" @click="$to('detailedPage2',{id:col.id})">{{col.title}}</a>
|
||||
</template>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfloat">
|
||||
<a href="" class="xbzlzd left">
|
||||
<a href="javascript:void(0);" class="xbzlzd left" @click="$to('listPage2',{pid:101,id:10104})">
|
||||
<span><img src="img/dou.png" style="width: 26px;"></span>
|
||||
<span>适宜吉林省<br>种质资源</span>
|
||||
</a>
|
||||
<div class="xbcot right">
|
||||
<a href="xiangqyi.html">高梁</a>
|
||||
<a href="xiangqyi.html">花生</a>
|
||||
<a href="xiangqyi.html">绿豆</a>
|
||||
<a href="xiangqyi.html">小豆</a>
|
||||
<a href="xiangqyi.html">燕麦</a>
|
||||
<a href="xiangqyi.html">谷子</a>
|
||||
<a href="xiangqyi.html">向日葵</a>
|
||||
<template v-for="(col,colIndex) in syjlsList" >
|
||||
<a href="javascript:void(0);" :key="colIndex" @click="$to('detailedPage2',{id:col.id})">{{col.title}}</a>
|
||||
</template>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -103,15 +95,15 @@
|
|||
<div class="gersawd clearfloat">
|
||||
<div class="fjsojg left"><img src="img/mune_1.jpg" ></div>
|
||||
<div class="vdas left">
|
||||
<a href="nycyh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:102,id:10201})">
|
||||
<span><img src="img/mue_3.png" style="width: 32px;"></span>
|
||||
<span>特色农业产业化</span>
|
||||
</a>
|
||||
<a href="lscyh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:102,id:10202})">
|
||||
<span><img src="img/mue_2.png" style="width: 32px;"></span>
|
||||
<span>粮食产业化</span>
|
||||
</a>
|
||||
<a href="xmycyh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:102,id:10203})">
|
||||
<span><img src="img/mue_1.png" style="width: 32px;"></span>
|
||||
<span>畜牧业产业化</span>
|
||||
</a>
|
||||
|
@ -129,19 +121,19 @@
|
|||
<div class="gersawd clearfloat">
|
||||
<div class="fjsojg left"><img src="img/mune_1.jpg" ></div>
|
||||
<div class="vdas left">
|
||||
<a href="bjgh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:103,id:10301})">
|
||||
<span><img src="img/mue_4.png" style="width: 32px;"></span>
|
||||
<span>吉林省农业资源规划</span>
|
||||
</a>
|
||||
<a href="xbbjgh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:103,id:10302})">
|
||||
<span><img src="img/mue_6.png" style="width: 32px;"></span>
|
||||
<span>西部特色经济作物区域布局</span>
|
||||
</a>
|
||||
<a href="zbbjgh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:103,id:10303})">
|
||||
<span><img src="img/mue_7.png" style="width: 32px;"></span>
|
||||
<span>中部粮食加工业区域布局</span>
|
||||
</a>
|
||||
<a href="lsbjgh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:103,id:10304})">
|
||||
<span><img src="img/mue_5.png" style="width: 32px;"></span>
|
||||
<span>历史区划数据</span>
|
||||
</a>
|
||||
|
@ -159,19 +151,19 @@
|
|||
<div class="gersawd clearfloat">
|
||||
<div class="fjsojg left"><img src="img/mune_1.jpg" ></div>
|
||||
<div class="vdas left">
|
||||
<a href="lsny.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:104,id:10401})">
|
||||
<span><img src="img/mue_10.png" style="width: 32px;"></span>
|
||||
<span>保护性耕作</span>
|
||||
</a>
|
||||
<a href="xhlsny.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:104,id:10402})">
|
||||
<span><img src="img/mue_8.png" style="width: 32px;"></span>
|
||||
<span>农业资源循环利用</span>
|
||||
</a>
|
||||
<a href="ncpaq.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:104,id:10403})">
|
||||
<span><img src="img/mue_9.png" style="width: 32px;"></span>
|
||||
<span>农产品安全</span>
|
||||
</a>
|
||||
<a href="pmjj.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:104,id:10404})">
|
||||
<span><img src="img/mue_11.png" style="width: 32px;"></span>
|
||||
<span>棚膜经济</span>
|
||||
</a>
|
||||
|
@ -189,11 +181,11 @@
|
|||
<div class="gersawd clearfloat">
|
||||
<div class="fjsojg left"><img src="img/mune_1.jpg" ></div>
|
||||
<div class="vdas left">
|
||||
<a href="kydt.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:105,id:10501})">
|
||||
<span><img src="img/mue_12.png" style="width: 32px;"></span>
|
||||
<span>资源区划</span>
|
||||
</a>
|
||||
<a href="kydtnycyh.html" class="fjsjkih left">
|
||||
<a href="javascript:void(0);" class="fjsjkih left" @click="$to('listPage',{pid:105,id:10502})">
|
||||
<span><img src="img/mue_13.png" style="width: 32px;"></span>
|
||||
<span>农业产业化</span>
|
||||
</a>
|
||||
|
@ -203,12 +195,12 @@
|
|||
</blockquote>
|
||||
</li>
|
||||
<li class="multiUlli" >
|
||||
<a class="mulgo" title="助力乡村振兴" href="javascript:void(0);" @click="$to('listPage',{pid:106,id:106})">
|
||||
<a class="mulgo" title="助力乡村振兴" href="javascript:void(0);" @click="$to('listPage',{pid:106})">
|
||||
<span class="mulgochie">助力乡村振兴</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="multiUlli">
|
||||
<a class="mulgo" title="其他" href="javascript:void(0);" @click="$to('listPage',{pid:107,id:107})">
|
||||
<a class="mulgo" title="其他" href="javascript:void(0);" @click="$to('listPage',{pid:107})">
|
||||
<span class="mulgochie">其他</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -234,6 +226,10 @@ export default {
|
|||
window,
|
||||
searchText: '',
|
||||
columnList: [],
|
||||
xbzlzdList:[],
|
||||
dbjjzyList:[],
|
||||
zblszyList:[],
|
||||
syjlsList:[],
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
@ -243,32 +239,60 @@ export default {
|
|||
},
|
||||
methods:{
|
||||
loadData(){
|
||||
if(this.$route.query.findStr){
|
||||
this.searchText = this.$route.query.findStr;
|
||||
}
|
||||
if(this.$route.query.findStr){
|
||||
this.searchText = this.$route.query.findStr;
|
||||
}
|
||||
//查询区域农业资源--西部杂粮杂豆 内容列表
|
||||
getAction('/gateway/gatewayArticle/list',{pageSize:-1,isRelease:'Y',columnId:10101}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
this.xbzlzdList = list;
|
||||
}
|
||||
});
|
||||
//查询区域农业资源--东部经济资源 内容列表
|
||||
getAction('/gateway/gatewayArticle/list',{pageSize:-1,isRelease:'Y',columnId:10102}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
this.dbjjzyList = list;
|
||||
}
|
||||
});
|
||||
//查询区域农业资源--中部粮食资源 内容列表
|
||||
getAction('/gateway/gatewayArticle/list',{pageSize:-1,isRelease:'Y',columnId:10103}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
this.zblszyList = list;
|
||||
}
|
||||
});
|
||||
//查询区域农业资源--适宜吉林省 内容列表
|
||||
getAction('/gateway/gatewayArticle/list',{pageSize:-1,isRelease:'Y',columnId:10104}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
this.syjlsList = list;
|
||||
}
|
||||
});
|
||||
//查询栏目
|
||||
getAction('/gateway/gatewayColumn/list',{pageSize:-1,isEnable:'Y',type:'!!BLANK'}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
let map = {};
|
||||
//转成,map
|
||||
let parentList = list.filter(x => {
|
||||
if(x.parent){
|
||||
return false;
|
||||
}else{
|
||||
map[x.id] = x;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
//孩子找父亲
|
||||
list.forEach(x => {
|
||||
let parent = map[x.parent] || {};
|
||||
if(!parent.list) parent.list = [];
|
||||
parent.list.push(x);
|
||||
});
|
||||
this.columnList = parentList;
|
||||
}
|
||||
});
|
||||
// getAction('/gateway/gatewayColumn/list',{pageSize:-1,isEnable:'Y',type:'!!BLANK'}).then((res)=>{
|
||||
// if(res.success){
|
||||
// let list = res.result.records||res.result;
|
||||
// let map = {};
|
||||
// //转成,map
|
||||
// let parentList = list.filter(x => {
|
||||
// if(x.parent){
|
||||
// return false;
|
||||
// }else{
|
||||
// map[x.id] = x;
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
// //孩子找父亲
|
||||
// list.forEach(x => {
|
||||
// let parent = map[x.parent] || {};
|
||||
// if(!parent.list) parent.list = [];
|
||||
// parent.list.push(x);
|
||||
// });
|
||||
// this.columnList = parentList;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//鼠标移入菜单上,显示其下菜单
|
||||
openMenu(e){
|
||||
|
|
|
@ -4,104 +4,103 @@
|
|||
<div class="contant">
|
||||
<div class="PageBox">
|
||||
<div class="scrollbox cl">
|
||||
<div class="scroltit">
|
||||
<!-- <div class="scroltit">
|
||||
<small id="but_up"><img src="img/icon6.png"></small>
|
||||
<small id="but_down"><img src="img/icon6_1.png"></small>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 头条 -->
|
||||
<div id="scrollDiv">
|
||||
<ul>
|
||||
<!-- <ul>
|
||||
<li v-for="(tt,ttIndex) in ttList" :key="ttIndex">
|
||||
<a href="xiangqer.html">
|
||||
<a href="javascript:void(0);">
|
||||
<h2>{{tt.title}}</h2>
|
||||
<p class="elli">{{tt.content}}</p>
|
||||
<p class="elli">{{$tfnm(tt,'content',84)}}</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul> -->
|
||||
<el-carousel height="200px" direction="vertical" :autoplay="true">
|
||||
<el-carousel-item v-for="(tt,ttIndex) in ttList" :key="ttIndex">
|
||||
<h2 @click="$to('detailedPage',{id:tt.id})">{{tt.title}}</h2>
|
||||
<p class="elli" @click="$to('detailedPage',{id:tt.id})">{{$tfnm(tt,'content',60)}}</p>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PageOne clearfloat">
|
||||
<div class="PageOneL left">
|
||||
<div id="inlunbo" class="pos1">
|
||||
<ul id="inlunone">
|
||||
<el-carousel height="400px">
|
||||
<el-carousel-item v-for="(lbt,lbtIndex) in lbtList" :key="lbtIndex">
|
||||
<a href="javascript:void(0);" @click="$to('detailedPage',{id:lbt.id})"><img :src="$tImg(lbt,'cover')"></a>
|
||||
<div class="luntxt">
|
||||
<a href="javascript:void(0);" class="ltxta elli" @click="$to('detailedPage',{id:lbt.id})">{{lbt.title}}</a>
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<!-- <ul id="inlunone">
|
||||
<li class="lunactive" v-for="(lbt,lbtIndex) in lbtList" :key="lbtIndex">
|
||||
<!-- <a href="javascript:;"><img :src='${lbt.cover}'></a> -->
|
||||
<a href="javascript:;"><img :src="$tImg(lbt,'cover')"></a>
|
||||
<a href="javascript:void(0);"><img :src="$tImg(lbt,'cover')"></a>
|
||||
<div class="luntxt">
|
||||
<a href="" class="ltxta elli">{{lbt.title}}</a>
|
||||
<a href="javascript:void(0);" class="ltxta elli">{{lbt.title}}</a>
|
||||
</div>
|
||||
</li>
|
||||
<!-- <li class="lunactive">
|
||||
<a href="javascript:;"><img src="img/tu1.png"></a>
|
||||
<div class="luntxt">
|
||||
<a href="" class="ltxta elli">省委专题会议:努力把人参产业打造成为千亿级优势产业</a>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;"><img src="img/tu5.png"></a>
|
||||
<div class="luntxt">
|
||||
<a href="" class="ltxta elli">王喜东局长深入亚泰集团走访调研王喜东局长深入亚泰集团走访调研</a>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;"><img src="img/tu6.png"></a>
|
||||
<div class="luntxt">
|
||||
<a href="" class="ltxta elli">王喜东局长深入亚泰集团走访调研王喜东局长深入亚泰集团走访调研</a>
|
||||
</div>
|
||||
</li> -->
|
||||
</ul>
|
||||
<ul id="inluntwo">
|
||||
</ul> -->
|
||||
<!-- <ul id="inluntwo">
|
||||
<li class="lunactive">1</li>
|
||||
<li>2</li>
|
||||
<li>3</li>
|
||||
</ul>
|
||||
</ul> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="PageOneR right">
|
||||
<div id="menu">
|
||||
<div class="PageOneRUp">
|
||||
<ul id="nav">
|
||||
<li><a href="#" class="selected">工作动态</a></li>
|
||||
<li><a href="#" class="">行业要闻</a></li>
|
||||
<li><a href="javascript:void(0);" :class="currentTab == 301 ? 'selected' : ''" @click="changeTab(301)">工作动态</a></li>
|
||||
<li><a href="javascript:void(0);" :class="currentTab == 302 ? 'selected' : ''" @click="changeTab(302)">行业要闻</a></li>
|
||||
</ul>
|
||||
<a href="gzdt.html" class="gengdduo right">more+</a>
|
||||
<a href="javascript:void(0);" class="gengdduo right" @click="$to('listPage',{pid:currentTab})">more+</a>
|
||||
</div>
|
||||
<div id="menu_con">
|
||||
<div class="tag" style="display: block;">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="tagup">
|
||||
<h3 class="elli">{{gzdtList[0].title}}</h3>
|
||||
<p class="over-line2">{{gzdtList[0].content}}</p>
|
||||
</span>
|
||||
</li>
|
||||
<li v-for="(gzdt,gzdtIndex) in gzdtList" :key="gzdtIndex" >
|
||||
<template v-if="gzdtIndex>0">
|
||||
<a class="clearfloat" href="xiangqer.html">
|
||||
<h3 class="elli">{{gzdt.title}}</h3>
|
||||
<span>{{gzdt.createTime}}</span>
|
||||
</a>
|
||||
</template>
|
||||
</li>
|
||||
</ul>
|
||||
<div id="menu_con">
|
||||
<div class="tag" v-show="currentTab == 301">
|
||||
<template v-if="gzdtList && gzdtList.length > 0">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="tagup" @click="$to('detailedPage',{id:gzdtList[0].id})">
|
||||
<h3 class="elli">{{gzdtList[0].title}}</h3>
|
||||
<p class="over-line2">{{$tfnm(gzdtList[0],'content',84)}}</p>
|
||||
</span>
|
||||
</li>
|
||||
<li v-for="(gzdt,gzdtIndex) in gzdtList" :key="gzdtIndex" >
|
||||
<template v-if="gzdtIndex>0">
|
||||
<a class="clearfloat" href="javascript:void(0);" @click="$to('detailedPage',{id:gzdt.id})">
|
||||
<h3 class="elli">{{gzdt.title}}</h3>
|
||||
<span>{{gzdt.createTime}}</span>
|
||||
</a>
|
||||
</template>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</div>
|
||||
<div class="tag" style="display:none">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="tagup">
|
||||
<h3 class="elli">{{hyywList[0].title}}</h3>
|
||||
<p class="over-line2">{{hyywList[0].content}}</p>
|
||||
</span>
|
||||
</li>
|
||||
<li v-for="(hyyw,hyywIndex) in hyywList" :key="hyywIndex" >
|
||||
<template v-if="hyywIndex>0">
|
||||
<a class="clearfloat" href="xiangqer.html">
|
||||
<h3 class="elli">{{hyyw.title}}</h3>
|
||||
<span>{{hyyw.createTime}}</span>
|
||||
</a>
|
||||
</template>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tag" v-show="currentTab == 302">
|
||||
<template v-if="hyywList && hyywList.length > 0">
|
||||
<ul>
|
||||
<li>
|
||||
<span class="tagup" @click="$to('detailedPage',{id:hyywList[0].id})">
|
||||
<h3 class="elli">{{hyywList[0].title}}</h3>
|
||||
<p class="over-line2">{{$tfnm(hyywList[0],'content',84)}}</p>
|
||||
</span>
|
||||
</li>
|
||||
<li v-for="(hyyw,hyywIndex) in hyywList" :key="hyywIndex" >
|
||||
<template v-if="hyywIndex>0">
|
||||
<a class="clearfloat" href="javascript:void(0);" @click="$to('detailedPage',{id:hyyw.id})">
|
||||
<h3 class="elli">{{hyyw.title}}</h3>
|
||||
<span>{{hyyw.createTime}}</span>
|
||||
</a>
|
||||
</template>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -110,42 +109,42 @@
|
|||
<div class="kjrukou">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="nycyh.html">
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:102,id:10201})">
|
||||
<span class="spanmg"><img src="img/k_01.png" ></span>
|
||||
<span class="spanmg1" style="display: none;"><img src="img/k_01-1.png" ></span>
|
||||
<h3>特色农业产业化</h3>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="sjzx.html">
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:401,id:40101})">
|
||||
<span class="spanmg"><img src="img/k_02.png" ></span>
|
||||
<span class="spanmg1" style="display: none;"><img src="img/k_02-2.png" ></span>
|
||||
<h3>数据中心</h3>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="pmjj.html">
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:104,id:10404})">
|
||||
<span class="spanmg"><img src="img/k_03.png" ></span>
|
||||
<span class="spanmg1" style="display: none;"><img src="img/k_03-3.png" ></span>
|
||||
<h3>棚膜经济</h3>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ncpaq.html">
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:104,id:10403})">
|
||||
<span class="spanmg"><img src="img/k_04.png" ></span>
|
||||
<span class="spanmg1" style="display: none;"><img src="img/k_04-4.png" ></span>
|
||||
<h3>农产品安全</h3>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="zbbjgh.html">
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:103,id:10303})">
|
||||
<span class="spanmg"><img src="img/k_05.png" ></span>
|
||||
<span class="spanmg1" style="display: none;"><img src="img/k_05-5.png" ></span>
|
||||
<h3>中部粮食资源</h3>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="xmycyh.html">
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:102,id:10203})">
|
||||
<span class="spanmg"><img src="img/k_06.png" ></span>
|
||||
<span class="spanmg1" style="display: none;"><img src="img/k_06-6.png" ></span>
|
||||
<h3>畜牧业产业化</h3>
|
||||
|
@ -161,12 +160,12 @@
|
|||
<div class="h_l left">
|
||||
<div class="h_lup clearfloat">
|
||||
<span class="h_lupl left">合作<span class="h_luph">交流</span></span>
|
||||
<a href="hzjl.html" class="right">more+</a>
|
||||
<a href="javascript:void(0);" class="right" @click="$to('listPage',{pid:303})">more+</a>
|
||||
</div>
|
||||
<div class="h_ldown">
|
||||
<ul>
|
||||
<li v-for="(hzjl,hzjlIndex) in hzjlList" :key="hzjlIndex">
|
||||
<a href="xiangqer.html" class="elli">
|
||||
<a href="javascript:void(0);" class="elli" @click="$to('detailedPage',{id:hzjl.id})">
|
||||
<span></span>
|
||||
{{hzjl.title}}
|
||||
</a>
|
||||
|
@ -177,15 +176,15 @@
|
|||
<div class="h_r right">
|
||||
<div class="h_lup clearfloat">
|
||||
<span class="h_lupl left">科研<span class="h_luph">成果</span></span>
|
||||
<a href="kycg.html" class="right">more+</a>
|
||||
<a href="javascript:void(0);" class="right" @click="$to('listPage',{pid:304})">more+</a>
|
||||
</div>
|
||||
<div class="h_rdown">
|
||||
<ul>
|
||||
<li v-for="(kycg,kycgIndex) in kycgList" :key="kycgIndex">
|
||||
<a href="xiangqer.html">
|
||||
<a href="javascript:void(0);" @click="$to('detailedPage',{id:kycg.id})">
|
||||
<span class="spimg"><img :src="$tImg(kycg,'cover')" ></span>
|
||||
<h3 class="over-line2">{{kycg.title}}</h3>
|
||||
<p>{{kycg.content}}<span>[详情]</span></p>
|
||||
<p>{{$tfnm(kycg,'content',84)}}<span>[详情]</span></p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -198,51 +197,55 @@
|
|||
<div class="h_l left">
|
||||
<div class="h_lup clearfloat">
|
||||
<span class="h_lupl left">政策<span class="h_luph">文件</span></span>
|
||||
<a href="zcwj.html" class="right">more+</a>
|
||||
<a href="javascript:void(0);" class="right" @click="$to('listPage',{pid:305})">more+</a>
|
||||
</div>
|
||||
<div class="z_ldown">
|
||||
<a href="xiangqer.html" class="zxwjbox clearfloat">
|
||||
<span class="z_img left"><img src="img/zxwj.png" ></span>
|
||||
<h3 class="over-line2 left">{{zcwjList[0].title}}</h3>
|
||||
<span class="z_date right">{{zcwjList[0].createTime}}</span>
|
||||
</a>
|
||||
<ul>
|
||||
<li v-for="(zcwj,zcwjIndex) in zcwjList" :key="zcwjIndex">
|
||||
<a href="xiangqer.html" class="clearfloat">
|
||||
<span class="jiantou left">></span>
|
||||
<h4 class="over-line2 left">{{zcwj.title}}</h4>
|
||||
<span class="c_span right">{{zcwj.createTime}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<template v-if="zcwjList && zcwjList.length > 0">
|
||||
<a href="javascript:void(0);" class="zxwjbox clearfloat" @click="$to('detailedPage',{id:zcwjList[0].id})">
|
||||
<span class="z_img left" @click="$to('detailedPage',{id:zcwjList[0].id})"><img src="img/zxwj.png" ></span>
|
||||
<h3 class="over-line2 left" @click="$to('detailedPage',{id:zcwjList[0].id})">{{zcwjList[0].title}}</h3>
|
||||
<span class="z_date right" @click="$to('detailedPage',{id:zcwjList[0].id})">{{getMonthAndDay(zcwjList[0].updateTime || zcwjList[0].createTime)}}</span>
|
||||
</a>
|
||||
<ul>
|
||||
<li v-for="(zcwj,zcwjIndex) in zcwjList" :key="zcwjIndex">
|
||||
<a v-if="zcwjIndex>0" href="javascript:void(0);" class="clearfloat" @click="$to('detailedPage',{id:zcwj.id})">
|
||||
<span class="jiantou left">></span>
|
||||
<h4 class="over-line2 left" >{{zcwj.title}}</h4>
|
||||
<span class="c_span right">{{getMonthAndDay(zcwj.updateTime || zcwj.createTime)}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h_r right">
|
||||
<div class="h_lup clearfloat">
|
||||
<span class="h_lupl left">特色农业资源<span class="h_luph">最新动态</span></span>
|
||||
<a href="tsnyzy.html" class="right">more+</a>
|
||||
<a href="javascript:void(0);" class="right" @click="$to('listPage',{pid:306})">more+</a>
|
||||
</div>
|
||||
<div class="c_rdown clearfloat">
|
||||
<div class="c_rdownl left">
|
||||
<a href="xiangqer.html" class="gredsgre">{{tsnyzyList[0].title}}</a>
|
||||
<div class="c_sdfimg"><img :src="$tImg(tsnyzyList[0],'cover')" ></div>
|
||||
<p class="over-line2">{{tsnyzyList[0].content}}</p>
|
||||
<div class="clearfloat">
|
||||
<a href="" class="left" style="font-size: 14px;color: #EE8515;">[阅读]</a>
|
||||
<span class="right" style="color: #999999;font-size: 14px;">{{tsnyzyList[0].createTime}}</span>
|
||||
<template v-if="tsnyzyList && tsnyzyList.length > 0">
|
||||
<div class="c_rdownl left">
|
||||
<a href="javascript:void(0);" class="gredsgre" @click="$to('detailedPage',{id:tsnyzyList[0].id})">{{tsnyzyList[0].title}}</a>
|
||||
<div class="c_sdfimg" @click="$to('detailedPage',{id:tsnyzyList[0].id})"><img :src="$tImg(tsnyzyList[0],'cover')" ></div>
|
||||
<p class="over-line2" @click="$to('detailedPage',{id:tsnyzyList[0].id})">{{$tfnm(tsnyzyList[0],'content',84)}}</p>
|
||||
<div class="clearfloat">
|
||||
<a href="javascript:void(0);" class="left" style="font-size: 14px;color: #EE8515;" @click="$to('detailedPage',{id:tsnyzyList[0].id})">[阅读]</a>
|
||||
<span class="right" style="color: #999999;font-size: 14px;">{{getMonthAndDay(tsnyzyList[0].updateTime || tsnyzyList[0].createTime)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="z_ldown right" style="width: 384px;">
|
||||
<ul>
|
||||
<li v-for="(tsnyzy,tsnyzyIndex) in tsnyzyList" :key="tsnyzyIndex">
|
||||
<a href="xiangqer.html" class="clearfloat">
|
||||
<span class="jiantou left">></span>
|
||||
<h4 class="over-line2 left">{{tsnyzy.title}}</h4>
|
||||
<span class="c_span right">{{tsnyzy.createTime}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="z_ldown right" style="width: 384px;">
|
||||
<ul>
|
||||
<li v-for="(tsnyzy,tsnyzyIndex) in tsnyzyList" :key="tsnyzyIndex">
|
||||
<a href="javascript:void(0);" class="clearfloat" @click="$to('detailedPage',{id:tsnyzy.id})">
|
||||
<span class="jiantou left">></span>
|
||||
<h4 class="over-line2 left">{{tsnyzy.title}}</h4>
|
||||
<span class="c_span right">{{getMonthAndDay(tsnyzy.updateTime || tsnyzy.createTime)}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -251,21 +254,21 @@
|
|||
<div class="ztzl">
|
||||
<div class="h_lup clearfloat">
|
||||
<span class="h_lupl left">专题<span class="h_luph">专栏</span></span>
|
||||
<a href="ztzl.html" class="right">more+</a>
|
||||
<a href="javascript:void(0);" class="right" @click="$to('listPage',{pid:501,id:50101})">more+</a>
|
||||
</div>
|
||||
<div class="ztzldown" style="margin-top: 20px;">
|
||||
<ul class="clearfloat">
|
||||
<li>
|
||||
<a href="ztzl.html"><img src="img/zt_1.png" ></a>
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:501,id:50101})"><img src="img/zt_1.png" ></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="szy.html"><img src="img/zt_2.png" ></a>
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:501,id:50102})"><img src="img/zt_2.png" ></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="qhzy.html"><img src="img/zt_3.png" ></a>
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:501,id:50103})"><img src="img/zt_3.png" ></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="swzy.html"><img src="img/zt_4.png" ></a>
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:501,id:50104})"><img src="img/zt_4.png" ></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -304,7 +307,8 @@ export default {
|
|||
limitMoveNum: 2,
|
||||
direction: 2,
|
||||
},
|
||||
carouselHeight: ''
|
||||
carouselHeight: '',
|
||||
currentTab:301,
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -427,6 +431,12 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
//工作动态、行业要闻切换
|
||||
changeTab(index){
|
||||
this.currentTab = index;
|
||||
},
|
||||
|
||||
getDay(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
|
@ -471,6 +481,22 @@ export default {
|
|||
this.refreshImageHeight(image);
|
||||
},
|
||||
|
||||
getDay(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return d.getDate()
|
||||
},
|
||||
getMonthAndDay(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return (d.getMonth()+1) + '-' + d.getDate();
|
||||
},
|
||||
getYearAndMonth(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return d.getFullYear() + '-' + (d.getMonth()+1)
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,13 +1,28 @@
|
|||
<template>
|
||||
<div>
|
||||
<headerView/>
|
||||
<div class="er_bann2"></div>
|
||||
<div class="er_bann" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 101"></div>
|
||||
<div class="er_bann2" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 102"></div>
|
||||
<div class="er_bann3" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 103"></div>
|
||||
<div class="er_bann4" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 104"></div>
|
||||
<div class="er_bann5" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 105"></div>
|
||||
<div class="er_bann6" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 106"></div>
|
||||
<div class="er_bann7" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 107"></div>
|
||||
|
||||
<div class="er_bann8" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 501"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 306"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 305"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 304"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 303"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 302"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 301"></div>
|
||||
|
||||
<div class="weizhibox">
|
||||
<div class="weizhi">
|
||||
<span><img src="img/shouye.png" style="width: 16px;margin: 11px 4px 0 0;"></span>
|
||||
<span>当前位置:</span>
|
||||
<a href="javascript:void(0);" @click="$to('home')">首页 ></a>
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:thisColumn.parent,id:thisColumn.id})">{{parentData.name}} > </a>
|
||||
<a href="javascript:void(0);" @click="$to('home')">首页{{thisColumn.parent}} -- {{thisColumn.id}}></a>
|
||||
<a href="javascript:void(0);" @click="$to('listPage',{pid:thisColumn.parent?thisColumn.parent:thisColumn.id,id:thisColumn.parent?thisColumn.id:null})">{{parentData.name}} > </a>
|
||||
<!-- <a href="javascript:void(0);" >{{parentData.name}} > </a> -->
|
||||
<a href="javascript:void(0);">{{thisColumn.name}}</a>
|
||||
</div>
|
||||
|
@ -20,8 +35,8 @@
|
|||
</div>
|
||||
<ul>
|
||||
<template v-for="(col,colIndex) in columnList" >
|
||||
<li v-if="col.id == thisColumn.id" :key="colIndex" class="active2" ><a href="javascript:void(0);" class="active3" @click="$to('listPage',{pid:col.parent,id:col.id})">{{col.name}}</a></li>
|
||||
<li v-if="col.id != thisColumn.id" :key="colIndex"><a href="javascript:void(0);" @click="$to('listPage',{pid:col.parent,id:col.id})">{{col.name}}</a></li>
|
||||
<li v-if="col.id == thisColumn.id" :key="colIndex" class="active2" ><a href="javascript:void(0);" class="active3" @click="$to('listPage',{pid:col.parent?col.parent:col.id,id:col.parent?col.id:null})">{{col.name}}</a></li>
|
||||
<li v-if="col.id != thisColumn.id" :key="colIndex"><a href="javascript:void(0);" @click="$to('listPage',{pid:col.parent?col.parent:col.id,id:col.id})">{{col.name}}</a></li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -87,10 +102,22 @@ export default {
|
|||
console.log('res =>',res.result);
|
||||
let data = res.result;
|
||||
this.articleData = data;
|
||||
//查出根节点
|
||||
this.parentData =data.parentGatewayColumn
|
||||
this.thisColumn = data.currentGatewayColumn
|
||||
this.columnList = data.gatewayColumnList
|
||||
//查出根节点
|
||||
if(data.parentGatewayColumn){
|
||||
this.parentData = data.parentGatewayColumn
|
||||
}else{
|
||||
this.parentData = data.currentGatewayColumn
|
||||
}
|
||||
|
||||
if(data.gatewayColumnList && data.gatewayColumnList.length > 0){
|
||||
this.columnList = data.gatewayColumnList
|
||||
}else{
|
||||
this.columnList = [];
|
||||
this.columnList.push(data.currentGatewayColumn);
|
||||
|
||||
}
|
||||
|
||||
console.log('columnList', this.columnList );
|
||||
|
||||
// if(!this.columnId){
|
||||
|
|
|
@ -0,0 +1,153 @@
|
|||
<template>
|
||||
<div>
|
||||
<headerView/>
|
||||
<div class="er_bann" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 101"></div>
|
||||
<div class="er_bann2" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 102"></div>
|
||||
<div class="er_bann3" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 103"></div>
|
||||
<div class="er_bann4" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 104"></div>
|
||||
<div class="er_bann5" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 105"></div>
|
||||
<div class="er_bann6" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 106"></div>
|
||||
<div class="er_bann7" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 107"></div>
|
||||
|
||||
<div class="er_bann8" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 501"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 306"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 305"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 304"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 303"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 302"></div>
|
||||
<div class="er_bann9" v-if="(thisColumn.parent?thisColumn.parent:thisColumn.id) == 301"></div>
|
||||
|
||||
<div class="weizhibox">
|
||||
<div class="weizhi">
|
||||
<span><img src="img/shouye.png" style="width: 16px;margin: 11px 4px 0 0;"></span>
|
||||
<span>当前位置:</span>
|
||||
<a href="javascript:void(0);" @click="$to('home')">首页 ></a>
|
||||
<a href="javascript:void(0);" @click="$to('listPage2',{pid:thisColumn.parent?thisColumn.parent:thisColumn.id,id:thisColumn.parent?thisColumn.id:null})">{{parentData.name}} > </a>
|
||||
<!-- <a href="javascript:void(0);" >{{parentData.name}} > </a> -->
|
||||
<a href="javascript:void(0);">{{thisColumn.name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="er_contant clearfloat">
|
||||
<div class="er_contl left">
|
||||
<div class="hjk_item">
|
||||
<h3>{{parentData.name}}</h3>
|
||||
<div class="" style="width: 60px;height: 3px;background-color: #3591EB;margin-top: -3px;"></div>
|
||||
</div>
|
||||
<ul>
|
||||
<template v-for="(col,colIndex) in columnList" >
|
||||
<li v-if="col.id == thisColumn.id" :key="colIndex" class="active2" ><a href="javascript:void(0);" class="active3" @click="$to('listPage2',{pid:col.parent?col.parent:col.id,id:col.parent?col.id:null})">{{col.name}}</a></li>
|
||||
<li v-if="col.id != thisColumn.id" :key="colIndex"><a href="javascript:void(0);" @click="$to('listPage2',{pid:col.parent?col.parent:col.id,id:col.id})">{{col.name}}</a></li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cyh_contr right">
|
||||
<div class="xqer_cont">
|
||||
<h3>{{articleData.title}}</h3>
|
||||
<div class="xqer_date">
|
||||
<span>发布日期:<span>{{articleData.updateTime || articleData.createTime}}</span></span>
|
||||
<span>作者:<span>{{articleData.author}}</span></span>
|
||||
</div>
|
||||
<p v-html="articleData.content"></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footerView/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getwayMixin } from '@/views/gateway/mixins/getwayMixin'
|
||||
import { getAction } from '@/api/manage'
|
||||
import headerView from '@/views/gateway/common/header'
|
||||
import footerView from '@/views/gateway/common/footer'
|
||||
|
||||
export default {
|
||||
mixins:[getwayMixin],
|
||||
components:{
|
||||
headerView,
|
||||
footerView
|
||||
},
|
||||
props:{
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
parentData:{},
|
||||
thisColumn:{},
|
||||
columnList:[],
|
||||
articleList: [],
|
||||
articleData:{},
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
id(){
|
||||
return this.$route.query.id || '-1';
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.loadData();
|
||||
},
|
||||
watch:{
|
||||
id(){
|
||||
this.loadData();
|
||||
},
|
||||
},
|
||||
updated(){
|
||||
},
|
||||
methods:{
|
||||
loadData(){
|
||||
//查询栏目(包含当前的和候选的)
|
||||
getAction('/gateway/gatewayArticle/queryArticleById',{id:this.id}).then((res)=>{
|
||||
if(res.success){
|
||||
console.log('res =>',res.result);
|
||||
let data = res.result;
|
||||
this.articleData = data;
|
||||
this.thisColumn = data.currentGatewayColumn
|
||||
//查出根节点
|
||||
if(data.parentGatewayColumn){
|
||||
this.parentData = data.parentGatewayColumn
|
||||
}else{
|
||||
this.parentData = data.currentGatewayColumn
|
||||
}
|
||||
|
||||
if(data.gatewayColumnList && data.gatewayColumnList.length > 0){
|
||||
this.columnList = data.gatewayColumnList
|
||||
}else{
|
||||
this.columnList = [];
|
||||
this.columnList.push(data.currentGatewayColumn);
|
||||
|
||||
}
|
||||
|
||||
console.log('columnList', this.columnList );
|
||||
|
||||
// if(!this.columnId){
|
||||
// let firstColumn = this.columnList[0]
|
||||
// if(firstColumn){
|
||||
// //this.$to('listPage',{pid:firstColumn.parent,id:firstColumn.id},true)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
});
|
||||
//如果没有ID自动选中一个
|
||||
// if(this.id){
|
||||
// //查询文章列表
|
||||
// getAction('/gateway/gatewayArticle/list',{pageSize:-1,isRelease:'Y',columnId:this.id}).then((res)=>{
|
||||
// if(res.success){
|
||||
// let list = res.result.records||res.result;
|
||||
// this.articleList = list;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
},
|
||||
getFileName(url){
|
||||
if(!url) return '';
|
||||
let filePaths = url.split('/');
|
||||
let fileAllName = filePaths[filePaths.length-1]
|
||||
return fileAllName.substring(0,fileAllName.lastIndexOf('_'));
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -9,6 +9,13 @@
|
|||
<div class="er_bann5" v-if="$route.query.pid == 105"></div>
|
||||
<div class="er_bann6" v-if="$route.query.pid == 106"></div>
|
||||
<div class="er_bann7" v-if="$route.query.pid == 107"></div>
|
||||
<div class="er_bann8" v-if="$route.query.pid == 501"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 306"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 305"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 304"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 303"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 302"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 301"></div>
|
||||
<div class="weizhibox">
|
||||
<div class="weizhi">
|
||||
<span><img src="img/shouye.png" style="width: 16px;margin: 11px 4px 0 0;"></span>
|
||||
|
@ -38,10 +45,10 @@
|
|||
<a href="javascript:void(0);" class="cyh_coa clearfloat" @click="$to('detailedPage',{id:art.id})">
|
||||
<div class="cyhl left">
|
||||
<h3 class="elli">{{art.title}}</h3>
|
||||
<p class="over-line2">{{art.content}}</p>
|
||||
<p class="over-line2">{{$tfnm(art,'content',104)}}</p>
|
||||
</div>
|
||||
<div class="cyhr right">
|
||||
<div class="cyhr_date">{{art.createTime}}</div>
|
||||
<div class="cyhr_date">{{getMonthAndDay(art.updateTime || art.createTime)}}</div>
|
||||
<div class="jianttewr">→</div>
|
||||
</div>
|
||||
</a>
|
||||
|
@ -114,10 +121,20 @@ export default {
|
|||
getAction('/gateway/gatewayColumn/list',{pageSize:-1,isEnable:'Y',fpid:this.pid}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
// console.log('list===>',list);
|
||||
//查出根节点
|
||||
this.parentData = list.find(x => !x.parent);
|
||||
this.thisColumn = list.find(x => x.id == this.id);
|
||||
this.columnList = list.filter(x => x.parent);
|
||||
if(this.id){
|
||||
this.thisColumn = list.find(x => x.id == this.id);
|
||||
this.columnList = list.filter(x => x.parent);
|
||||
}else{
|
||||
this.thisColumn = list[0];
|
||||
this.columnList = [];
|
||||
this.columnList.push(list[0]);
|
||||
}
|
||||
|
||||
// console.log('this.columnList===>',this.columnList);
|
||||
// console.log('this.thisColumn===>',this.thisColumn);
|
||||
// if(!this.id){
|
||||
// let firstColumn = this.columnList[0]
|
||||
// if(firstColumn){
|
||||
|
@ -149,6 +166,21 @@ export default {
|
|||
});
|
||||
// }
|
||||
},
|
||||
getDay(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return d.getDate()
|
||||
},
|
||||
getMonthAndDay(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return (d.getMonth()+1) + '-' + d.getDate();
|
||||
},
|
||||
getYearAndMonth(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return d.getFullYear() + '-' + (d.getMonth()+1)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,211 @@
|
|||
<template>
|
||||
<div>
|
||||
<headerView/>
|
||||
<!-- <div class="er_bann2"></div> -->
|
||||
<div class="er_bann" v-if="$route.query.pid == 101"></div>
|
||||
<div class="er_bann2" v-if="$route.query.pid == 102"></div>
|
||||
<div class="er_bann3" v-if="$route.query.pid == 103"></div>
|
||||
<div class="er_bann4" v-if="$route.query.pid == 104"></div>
|
||||
<div class="er_bann5" v-if="$route.query.pid == 105"></div>
|
||||
<div class="er_bann6" v-if="$route.query.pid == 106"></div>
|
||||
<div class="er_bann7" v-if="$route.query.pid == 107"></div>
|
||||
<div class="er_bann8" v-if="$route.query.pid == 501"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 306"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 305"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 304"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 303"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 302"></div>
|
||||
<div class="er_bann9" v-if="$route.query.pid == 301"></div>
|
||||
<div class="weizhibox">
|
||||
<div class="weizhi">
|
||||
<span><img src="img/shouye.png" style="width: 16px;margin: 11px 4px 0 0;"></span>
|
||||
<span>当前位置:</span>
|
||||
<a href="javascript:void(0);" @click="$to('home')">首页 ></a>
|
||||
<!-- <a href="javascript:void(0);" @click="$to('listPage',{pid:thisColumn.parent})">{{parentData.name}} > </a> -->
|
||||
<a href="javascript:void(0);" >{{parentData.name}} > </a>
|
||||
<a href="javascript:void(0);">{{thisColumn.name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="er_contant clearfloat">
|
||||
<div class="er_contl left">
|
||||
<div class="hjk_item">
|
||||
<h3>{{parentData.name}}</h3>
|
||||
<div class="" style="width: 60px;height: 3px;background-color: #3591EB;margin-top: -3px;"></div>
|
||||
</div>
|
||||
<ul>
|
||||
<template v-for="(col,colIndex) in columnList" >
|
||||
<li v-if="col.id == thisColumn.id" :key="colIndex" class="active2"><a href="javascript:void(0);" class="active3">{{col.name}}</a></li>
|
||||
<li v-if="col.id != thisColumn.id" :key="colIndex"><a href="javascript:void(0);" @click="$to('listPage2',{pid:col.parent,id:col.id})">{{col.name}}</a></li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="er_contr right">
|
||||
<ul>
|
||||
<li v-for="(art,artIndex) in articleList" :key="artIndex">
|
||||
<a href="javascript:void(0);" class="er_coa" @click="$to('detailedPage2',{id:art.id})">
|
||||
<div class="er_coaimg">
|
||||
<img :src="$tImg(art,'cover')" >
|
||||
</div>
|
||||
<div class="er_item">{{art.title}}</div>
|
||||
<div class="er_neirong">
|
||||
<p class="er_neip">{{$tfnm(art,'content',48)}}</p>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="er_bouutn" >[了解更多]</a>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="cyh_contr right">
|
||||
<ul>
|
||||
<li v-for="(art,artIndex) in articleList" :key="artIndex">
|
||||
<a href="javascript:void(0);" class="cyh_coa clearfloat" @click="$to('detailedPage',{id:art.id})">
|
||||
<div class="cyhl left">
|
||||
<h3 class="elli">{{art.title}}</h3>
|
||||
<p class="over-line2">{{$tfnm(art,'content',104)}}</p>
|
||||
</div>
|
||||
<div class="cyhr right">
|
||||
<div class="cyhr_date">{{getMonthAndDay(art.updateTime || art.createTime)}}</div>
|
||||
<div class="jianttewr">→</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<footerView/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getwayMixin } from '@/views/gateway/mixins/getwayMixin'
|
||||
import { getAction } from '@/api/manage'
|
||||
import headerView from '@/views/gateway/common/header'
|
||||
import footerView from '@/views/gateway/common/footer'
|
||||
|
||||
export default {
|
||||
mixins:[getwayMixin],
|
||||
components:{
|
||||
headerView,
|
||||
footerView
|
||||
},
|
||||
props:{
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
parentData:{},
|
||||
thisColumn:{},
|
||||
columnList:[],
|
||||
articleList: [],
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
pid(){
|
||||
return this.$route.query.pid || '-1';
|
||||
},
|
||||
id(){
|
||||
return this.$route.query.id;
|
||||
},
|
||||
findStr(){
|
||||
if(this.$route.query.findStr){
|
||||
return '*'+this.$route.query.findStr+'*';
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted(){
|
||||
this.loadData();
|
||||
},
|
||||
watch:{
|
||||
pid(){
|
||||
this.loadData();
|
||||
},
|
||||
id(){
|
||||
this.loadData();
|
||||
},
|
||||
findStr(){
|
||||
this.loadData();
|
||||
}
|
||||
},
|
||||
updated(){
|
||||
},
|
||||
methods:{
|
||||
loadData(){
|
||||
//查询栏目(包含当前的和候选的)
|
||||
getAction('/gateway/gatewayColumn/list',{pageSize:-1,isEnable:'Y',fpid:this.pid}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
// console.log('list===>',list);
|
||||
//查出根节点
|
||||
this.parentData = list.find(x => !x.parent);
|
||||
if(this.id){
|
||||
this.thisColumn = list.find(x => x.id == this.id);
|
||||
this.columnList = list.filter(x => x.parent);
|
||||
}else{
|
||||
this.thisColumn = list[0];
|
||||
this.columnList = [];
|
||||
this.columnList.push(list[0]);
|
||||
}
|
||||
|
||||
// console.log('this.columnList===>',this.columnList);
|
||||
// console.log('this.thisColumn===>',this.thisColumn);
|
||||
// if(!this.id){
|
||||
// let firstColumn = this.columnList[0]
|
||||
// if(firstColumn){
|
||||
// //this.$to('listPage',{pid:firstColumn.parent,id:firstColumn.id},true)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
});
|
||||
//如果没有ID自动选中一个
|
||||
// if(this.id){
|
||||
let columnId = this.id;
|
||||
//查询文章列表
|
||||
let findParam = {}
|
||||
if(this.findStr){
|
||||
if(this.utils.isCn()){
|
||||
findParam.title = this.findStr;
|
||||
}else if(this.utils.isEn()){
|
||||
findParam.titleen = this.findStr;
|
||||
}
|
||||
}else{
|
||||
//非搜索,还没有子id,差个锤子
|
||||
columnId = (columnId || this.pid) || '-1'
|
||||
}
|
||||
getAction('/gateway/gatewayArticle/list',{pageSize:-1,isRelease:'Y',columnId,...findParam}).then((res)=>{
|
||||
if(res.success){
|
||||
let list = res.result.records||res.result;
|
||||
this.articleList = list;
|
||||
}
|
||||
});
|
||||
// }
|
||||
},
|
||||
getDay(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return d.getDate()
|
||||
},
|
||||
getMonthAndDay(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return (d.getMonth()+1) + '-' + d.getDate();
|
||||
},
|
||||
getYearAndMonth(dateTime){
|
||||
if(!dateTime) return '';
|
||||
let d = new Date(dateTime);
|
||||
return d.getFullYear() + '-' + (d.getMonth()+1)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
Loading…
Reference in New Issue