Commit 81afcb1c by Lyan

资讯和知识中心部分页面联调

parent 788f72a0
...@@ -8,21 +8,37 @@ const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : ''; ...@@ -8,21 +8,37 @@ const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '';
// 政策法规列表 // 政策法规列表
const policyList = (params = {}) => { const policyList = (params = {}) => {
return POST(`${Prefix}/office/policy/api/policyList`, params) return POST(`${Prefix}/office/news/api/zcfgList`, params)
} }
// 政策法规详情 // 政策法规详情
const policyInfo = (params = {}) => { const policyInfo = (params = {}) => {
return GET(`${Prefix}/office/policy/api/info/${params.id}`) return GET(`${Prefix}/office/policy/api/info/${params.id}`)
} }
// 右侧相关标准
const ycxgbzList = (params = {}) => {
return POST(`${Prefix}/office/news/api/ycxgbzList`, params)
}
// 标准文献
const xgbzList = (params = {}) => {
return POST(`${Prefix}/office/news/api/xgbzList`, params)
}
// 小贴士 // 小贴士
const tips = (params = {}) => { const tips = (params = {}) => {
return POST(`${Prefix}/office/news/api/tips`, params) return POST(`${Prefix}/office/news/api/tips`, params)
} }
// 专业术语
const glossaryList = (params = {}) => {
return POST(`${Prefix}/office/news/api/glossaryList`, params)
}
export default { export default {
policyList, policyList,
policyInfo, policyInfo,
tips tips,
ycxgbzList,
xgbzList,
glossaryList
} }
...@@ -57,6 +57,11 @@ const iotList = (params = {}) => { ...@@ -57,6 +57,11 @@ const iotList = (params = {}) => {
return POST(`${Prefix}/office/news/api/iotList`, params) return POST(`${Prefix}/office/news/api/iotList`, params)
} }
//top10列表
const newsTop10 = (params = {}) => {
return GET(`${Prefix}/office/news/api/newsTop10`, params)
}
export default { export default {
pictureList, pictureList,
pictureInfo, pictureInfo,
...@@ -69,5 +74,6 @@ export default { ...@@ -69,5 +74,6 @@ export default {
otherList, otherList,
newsList, newsList,
newsInfo, newsInfo,
iotList iotList,
newsTop10
} }
...@@ -3,14 +3,15 @@ ...@@ -3,14 +3,15 @@
<div class="guide-msg container"> <div class="guide-msg container">
<div class="msg-cont"> <div class="msg-cont">
<div class="title">术语搜索</div> <div class="title">术语搜索</div>
<div class="keyletter " > <div class="keyletter" >
<span v-for="(item, i) in chaxun.keyArr" :key="i">{{item}}</span> <span v-for="(item, i) in chaxun.keyArr" :key="i" @click="searchInfo(item)" > {{item}}</span>
</div> </div>
<div class="knowledge-top-form col-lg-24"> <div class="knowledge-top-form col-lg-24">
<el-select class="col-lg-3" <el-select class="col-lg-3"
v-model="chaxun.type" v-model="chaxun.type"
placeholder="请选择" placeholder="请选择"
clearable clearable
@change='changeType'
> >
<el-option <el-option
v-for="(item, i) in chaxun.options" v-for="(item, i) in chaxun.options"
...@@ -20,8 +21,8 @@ ...@@ -20,8 +21,8 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<el-input class="col-lg-7" placeholder="请输入内容" clearable v-model="chaxun.keywords"></el-input> <el-input class="col-lg-7" placeholder="请输入内容" clearable v-model="chaxun.keywords" ></el-input>
<div class="top-form-btn col-lg-2" > <div class="top-form-btn col-lg-2" @click="getList()">
<img src="../../assets/image/home/sousuo-ico1.png" alt="" /> <img src="../../assets/image/home/sousuo-ico1.png" alt="" />
</div> </div>
</div> </div>
...@@ -30,16 +31,16 @@ ...@@ -30,16 +31,16 @@
<table class="table table-bordered table-hover "> <table class="table table-bordered table-hover ">
<thead> <thead>
<tr> <tr>
<th >英文标题</th> <th>英文标题</th>
<th>中文标题</th> <th>中文标题</th>
<th>解 释</th> <th>解 释</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(item, i) of tableList" :key="i"> <tr v-for="(item, i) of tableList" :key="i">
<td>{{item.ywtitle}}</td> <td>{{item.titleEn}}</td>
<td>{{item.zwtitle}}</td> <td>{{item.titleCn}}</td>
<td>{{item.des}}</td> <td>{{item.content}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -66,36 +67,52 @@ export default { ...@@ -66,36 +67,52 @@ export default {
label: "中文标题", label: "中文标题",
value: "1", value: "1",
}, },
{
label: "英文标题",
value: "3",
}
], ],
keywords: "", keywords: "",
}, },
tableList:[ type:1,
{ tableList:[]
ywtitle:'AIDC(Automatic Identification and Data Capture)',
zwtitle:'自动识别和数据采集',
des:'一项用于自动采集数据的技术。AIDC技术包括条码技术、智能卡技术、生物识别技术和射频识别技术。'
},
{
ywtitle:'AIDC(Automatic Identification and Data Capture)',
zwtitle:'自动识别和数据采集',
des:'一项用于自动采集数据的技术。AIDC技术包括条码技术、智能卡技术、生物识别技术和射频识别技术。'
},
{
ywtitle:'AIDC(Automatic Identification and Data Capture)',
zwtitle:'自动识别和数据采集',
des:'一项用于自动采集数据的技术。AIDC技术包括条码技术、智能卡技术、生物识别技术和射频识别技术。'
}
]
}; };
}, },
created() { created() {
for (var i = 0; i < 26; i++) { for (var i = 0; i < 26; i++) {
this.chaxun.keyArr.push(String.fromCharCode((65 + i))); this.chaxun.keyArr.push(String.fromCharCode((65 + i)));
} }
this.glossaryList()
},
methods:{
searchInfo(i){
this.glossaryList(3,i)
},
getList(){
this.glossaryList(this.type,this.chaxun.keywords)
},
// 专业术语列表
async glossaryList(type,title) {
const params = {
type: type,
title:title
};
const policyListRes =
await this.$api.knowledge.glossaryList(params);
const { returnCode, data } = policyListRes;
if (returnCode === "0") {
this.tableList = data
}
}, },
changeType(e){
this.type=e
}
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
...@@ -154,20 +171,28 @@ export default { ...@@ -154,20 +171,28 @@ export default {
line-height: 28px; line-height: 28px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.isActive{
font-weight: 800!important;
}
.keyletter{ .keyletter{
overflow: hidden; overflow: hidden;
margin-top: 15px; margin-top: 15px;
span{ span{
display: inline-block; display: inline-block;
width: 12px;
float: left; float: left;
color: #F26335; color: #F26335;
margin-right: 4px; margin-right: 4px;
cursor: pointer; cursor: pointer;
font-size: 13px; font-size: 14px;
// font-family: PingFangSC-Medium, PingFang SC; // font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F26335; color: #F26335;
line-height: 18px; line-height: 18px;
&:hover,&:active{
font-weight: 800!important;
}
} }
} }
......
...@@ -4,53 +4,64 @@ ...@@ -4,53 +4,64 @@
<div class="msg-cont"> <div class="msg-cont">
<div class="title">标准文献</div> <div class="title">标准文献</div>
<ul> <ul>
<li v-for="(item,i) of fileList" :key="i"> <li v-for="(item,i) of policyList.list" :key="i" @click="getInfo(item.id,item.directpath)">
<a :href="item.path" class="btn " role="button" :data="item.id"> {{item.title}}</a> <span>{{item.title}}</span>
</li> </li>
</ul> </ul>
<pages :total="policyList.totalCount" :currPage="policyList.currPage" @getLimit='ycListFn' />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Title from "../comps/title.vue"; import Title from "../comps/title.vue";
import pages from "../comps/pages.vue";
export default { export default {
components: { components: {
Title, Title,
pages
}, },
data() { data() {
return { return {
fileList:[ policyList:{
{ list:[],
id:1, currPage:1,
title:'商品条码 参与方位置编码与条码表示 GB/T 16828-2007', pageSize:15,
path:'' totalCount:0
},
{
id:2,
title:'商品条码 店内条码 GB/T 18283-2008',
path:''
}, },
{
id:3, };
title:'商品条码 条码符号印制质量的检验 GB/T 18348-2008',
path:''
},
{
id:4,
title:'商品条码 储运包装商品编码与条码表示 GB/T 16830-2008',
path:''
}, },
{ created(){
id:5, this.ycListFn(this.policyList.currPage)
title:'商品条码 零售商品编码与条码表示 GB 12904-2008',
link:''
}, },
] methods:{
// 政策法规列表
async ycListFn(page,limit) {
const params = {
page: page,
limit:15
}; };
const policyListRes =
await this.$api.knowledge.xgbzList(params);
const { returnCode, data } = policyListRes;
if (returnCode === "0") {
this.policyList = data
}
}, },
getInfo(id,directpath){
if(directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({
path: `/Knowledge/Statuteinfo?id=${id}`,
});
window.open(link.href,'_blank')
}
}
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -116,9 +127,8 @@ export default { ...@@ -116,9 +127,8 @@ export default {
width: 100%; width: 100%;
:hover,:active{ :hover,:active{
color: #F26335; color: #F26335;
} }
a{ span{
display: inline-block; display: inline-block;
width: 95%; width: 95%;
padding: 0; padding: 0;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<td style="width:50%"> <td style="width:50%">
<ul> <ul>
<li> <li>
<a @click="getInfo(item.id)" role="button" > {{item.title}}</a> <a @click="getInfo(item.id,item.directpath)" role="button" > {{item.title}}</a>
</li> </li>
</ul> </ul>
</td> </td>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="listStyle xgbz"> <div class="listStyle xgbz">
<div class="title">相关标准</div> <div class="title">相关标准</div>
<ul> <ul>
<li v-for="(item,i) of fileList2" :key="i"> <li v-for="(item,i) of ycList" :key="i" @click="getInfo(item.id,item.directpath)">
<a role="button" > {{item.title}}</a> <a role="button" > {{item.title}}</a>
</li> </li>
</ul> </ul>
...@@ -60,39 +60,13 @@ export default { ...@@ -60,39 +60,13 @@ export default {
data() { data() {
return { return {
fileList2:[
{
id:1,
title:'商品条码 参与方位置编码与条码表示 GB/T',
path:''
},
{
id:2,
title:'商品条码 参与方位置编码与条码表示 GB/T22222',
path:''
},
{
id:3,
title:'商品条码 参与方位置编码与条码表示 GB/T …',
path:''
},
{
id:4,
title:'商品条码 参与方位置编码与条码表示 GB/T …',
path:''
},
{
id:5,
title:'商品条码 参与方位置编码与条码表示 GB/T …',
link:''
},
],
policyList:{ policyList:{
list:[], list:[],
currPage:1, currPage:1,
pageSize:15, pageSize:15,
totalCount:0 totalCount:0
} },
ycList:[]
}; };
}, },
computed: { computed: {
...@@ -102,6 +76,7 @@ export default { ...@@ -102,6 +76,7 @@ export default {
}, },
created() { created() {
this.policyListFn(this.policyList.currPage); this.policyListFn(this.policyList.currPage);
this.ycListFn()
}, },
methods:{ methods:{
// 政策法规列表 // 政策法规列表
...@@ -114,17 +89,36 @@ export default { ...@@ -114,17 +89,36 @@ export default {
await this.$api.knowledge.policyList(params); await this.$api.knowledge.policyList(params);
const { returnCode, data } = policyListRes; const { returnCode, data } = policyListRes;
if (returnCode === "0") { if (returnCode === "0") {
console.log(data, "政策法规列表");
this.policyList = data this.policyList = data
} }
}, },
getInfo(id){ // 政策法规列表
console.log(id,'id') async ycListFn(page,limit) {
this.$router.push({ const params = {
page: 1,
};
const policyListRes =
await this.$api.knowledge.ycxgbzList(params);
const { returnCode, data } = policyListRes;
if (returnCode === "0") {
this.ycList = data
}
},
getInfo(id,directpath){
if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({
path: `/Knowledge/Statuteinfo?id=${id}`, path: `/Knowledge/Statuteinfo?id=${id}`,
}); });
window.open(link.href,'_blank')
}
} }
} }
}; };
......
...@@ -47,7 +47,6 @@ export default { ...@@ -47,7 +47,6 @@ export default {
await this.$api.knowledge.policyInfo(params); await this.$api.knowledge.policyInfo(params);
const { returnCode, data } = policyInfoRes; const { returnCode, data } = policyInfoRes;
if (returnCode === "0") { if (returnCode === "0") {
console.log(data, "政策法规详情");
this.content=data.content; this.content=data.content;
this.title=data.title this.title=data.title
this.$store.commit("system/SET_BREADCRUMB", [ this.$store.commit("system/SET_BREADCRUMB", [
...@@ -91,7 +90,7 @@ export default { ...@@ -91,7 +90,7 @@ export default {
padding:0 20px; padding:0 20px;
>div{ >div{
font-size: 14px; font-size: 14px;
padding-bottom: 20px; padding-bottom:30px;
} }
} }
......
...@@ -46,23 +46,23 @@ ...@@ -46,23 +46,23 @@
<div class="knowledge-container card "> <div class="knowledge-container card ">
<div class="row g-2 "> <div class="row g-2 ">
<div class="col-md-6"> <div class="col-md-6">
<img src="../../assets/image/knowledge/pic.png" class="img-fluid rounded-start" alt="..."> <img src="../../assets/image/knowledge/pic.png" class="img-fluid rounded-start" @click="goGjbm">
</div> </div>
<div class="col-md-6 gjwp"> <div class="col-md-6 gjwp">
<div class="card-body"> <div class="card-body">
<p class="card-title">物品基础编码展示</p> <p class="card-title" @click="goGjbm">物品基础编码展示</p>
<p class="card-text"> <p class="card-text">
<ul> <ul>
<li>物品编码系统</li> <li @click="goGjbm">物品编码系统</li>
<li>物品信息标识编码</li> <li @click="goGjbm">物品信息标识编码</li>
<li>物品标识编码</li> <li @click="goGjbm">物品标识编码</li>
</ul> </ul>
</p> </p>
<p class="card-title">物品应用编码系统</p> <p class="card-title" @click="goGjbm">物品应用编码系统</p>
<p class="card-text"> <p class="card-text">
<ul> <ul>
<li>商品流通与公共服务编码</li> <li @click="goGjbm">商品流通与公共服务编码</li>
<li>其他物品应用编码</li> <li @click="goGjbm">其他物品应用编码</li>
</ul> </ul>
</p> </p>
</div> </div>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<div class="knowledge-container card h-100"> <div class="knowledge-container card h-100">
<div class="row g-2 "> <div class="row g-2 ">
<div class="col-md-4"> <div class="col-md-4">
<img src="../../assets/image/knowledge/pic2.png" class="img-fluid rounded-start" alt="..."> <img src="../../assets/image/knowledge/pic2.png" class="img-fluid rounded-start" alt="..." @click="goGs1">
</div> </div>
<div class="col-md-8 gsxt"> <div class="col-md-8 gsxt">
<div class="card-body h-100"> <div class="card-body h-100">
...@@ -87,11 +87,11 @@ ...@@ -87,11 +87,11 @@
GS1系统为在全球范围内标识货物、服务、资产和位置提供了准确的编码。这些编码能够以条码符号来表示,以便进行商务流程所需的电子识读。该系统客服了厂商、组织使用自身的编码系统或部分特殊编码系统的局限性,提高了贸易的效率和对客户的反应能力。 GS1系统为在全球范围内标识货物、服务、资产和位置提供了准确的编码。这些编码能够以条码符号来表示,以便进行商务流程所需的电子识读。该系统客服了厂商、组织使用自身的编码系统或部分特殊编码系统的局限性,提高了贸易的效率和对客户的反应能力。
</p> </p>
<p class="card-text"><span class="more-des">详情>></span></p> <p class="card-text"><span class="more-des" @click="goGs1">>详情>></span></p>
<p class="card-text gsb-btn-cnt row"> <p class="card-text gsb-btn-cnt row">
<el-button type="primary" class="gsbtn col-lg-3">编码体系</el-button> <el-button type="primary" class="gsbtn col-lg-3" @click="goBmtx">>编码体系</el-button>
<el-button type="primary" class="gsbtn col-lg-4">数据载体体系</el-button> <el-button type="primary" class="gsbtn col-lg-4" @click="goSjzt">>数据载体体系</el-button>
<el-button type="primary" class="gsbtn col-lg-4" >数据交换体系</el-button> <el-button type="primary" class="gsbtn col-lg-4" @click="gosjjh">>数据交换体系</el-button>
</p> </p>
</div> </div>
...@@ -451,7 +451,36 @@ export default { ...@@ -451,7 +451,36 @@ export default {
}, },
methods: { methods: {
goGjbm(){
let link = this.$router.resolve({
path: '/Knowledge/ANCCSystem',
});
window.open(link.href,'_blank')
},
goGs1(){
let link = this.$router.resolve({
path: '/Knowledge/GS1System2',
});
window.open(link.href,'_blank')
},
goSjzt(){
let link = this.$router.resolve({
path: '/Knowledge/GS1System/sjzttx',
});
window.open(link.href,'_blank')
},
goBmtx(){
let link = this.$router.resolve({
path: '/Knowledge/GS1System/bmtx',
});
window.open(link.href,'_blank')
},
goSjjh(){
let link = this.$router.resolve({
path: '/Knowledge/GS1System/sjjhtx',
});
window.open(link.href,'_blank')
}
} }
}; };
</script> </script>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div class="msg-cont"> <div class="msg-cont">
<div class="title">小贴士</div> <div class="title">小贴士</div>
<ul> <ul>
<li v-for="(item,i) of tableResult.list" :key="i"> <li v-for="(item,i) of tableResult.list" :key="i" @click="getInfo(item.knowledgeinfoid,item.directpath)">
<a :href="item.path" role="button" :data="item.id"> {{item.title}}</a> <a role="button" :data="item.id"> {{item.title}}</a>
</li> </li>
</ul> </ul>
<pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' /> <pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' />
...@@ -49,14 +49,18 @@ export default { ...@@ -49,14 +49,18 @@ export default {
this.tableResult.list = data this.tableResult.list = data
this.tableResult.totalCount = data.length this.tableResult.totalCount = data.length
} }
}, },
// getInfo(id){ getInfo(id,directpath){
// console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
// this.$router.push({ window.open(directpath,'_blank');
// path: `/Knowledge/Statuteinfo?id=${id}`, }else{
// }); let link = this.$router.resolve({
// } path: `/Knowledge/Statuteinfo?id=${id}`,
});
window.open(link.href,'_blank')
}
}
} }
}; };
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="composite"> <div class="composite">
<cate :father="bzkydtCate"></cate> <cate :father="bzkydtCate"></cate>
<div class="container"> <div class="container">
<list :list="tableResult.list" /> <list :list="tableResult.list" @getInfo='getInfo'/>
<pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' /> <pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' />
</div> </div>
</div> </div>
...@@ -24,20 +24,7 @@ export default { ...@@ -24,20 +24,7 @@ export default {
name: "行业应用", name: "行业应用",
ico: "", ico: "",
}, },
list: [
{
name: "[精彩推荐]企业可通过国家食品(产品)安全追溯平台自动生成物流标…",
time: "2017/10/31",
},
{
name: "[精彩推荐]从企业、服务商和消费者的角度解读《商品二维码》国家标",
time: "2017/08/25",
},
{
name: "商务部办公厅 财政部办公厅关于开展供应链体系建设工作的通知",
time: "2017/08/18",
},
],
tableResult:{ tableResult:{
list:[], list:[],
currPage:1, currPage:1,
...@@ -65,13 +52,19 @@ export default { ...@@ -65,13 +52,19 @@ export default {
} }
}, },
getInfo(id){
console.log(id,'id') getInfo(id,directpath){
if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/Knowledge/Statuteinfo?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
...@@ -73,13 +73,17 @@ export default { ...@@ -73,13 +73,17 @@ export default {
}, },
// 详情 // 详情
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
}, },
}; };
</script> </script>
......
...@@ -54,13 +54,17 @@ export default { ...@@ -54,13 +54,17 @@ export default {
}, },
// 详情 // 详情
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
...@@ -54,13 +54,17 @@ export default { ...@@ -54,13 +54,17 @@ export default {
}, },
// 详情 // 详情
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</div> </div>
<list :list="tableResult.list" /> <list :list="tableResult.list" @getInfo='getInfo' />
<pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' /> <pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' />
</div> </div>
...@@ -101,44 +101,44 @@ export default { ...@@ -101,44 +101,44 @@ export default {
list: [ list: [
{ {
name: "GS1全球追溯标准(第二版)", title: "GS1全球追溯标准(第二版)",
path:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准(第二版).pdf' path:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准(第二版).pdf'
}, },
{ {
name: "GS1生鲜果蔬追溯实施指南", title: "GS1生鲜果蔬追溯实施指南",
path:"http://www.gs1cn.org/Manage/down/GS1生鲜果蔬追溯实施指南.pdf" path:"http://www.gs1cn.org/Manage/down/GS1生鲜果蔬追溯实施指南.pdf"
}, },
{ {
name: "GS1肉禽追溯指南", title: "GS1肉禽追溯指南",
path:'http://www.gs1cn.org/Manage/down/GS1肉禽追溯指南.pdf' path:'http://www.gs1cn.org/Manage/down/GS1肉禽追溯指南.pdf'
}, },
{ {
name: "GS1鱼类、海鲜和水产养殖追溯指南", title: "GS1鱼类、海鲜和水产养殖追溯指南",
path:'http://www.gs1cn.org/Manage/down/GS1鱼类、海鲜和水产养殖追溯指南.pdf' path:'http://www.gs1cn.org/Manage/down/GS1鱼类、海鲜和水产养殖追溯指南.pdf'
}, },
{ {
name: "GS1标准助力食品安全全程追溯", title: "GS1标准助力食品安全全程追溯",
path:'http://www.gs1cn.org/Manage/down/GS1标准助力食品安全全程追溯.pdf' path:'http://www.gs1cn.org/Manage/down/GS1标准助力食品安全全程追溯.pdf'
}, },
{ {
name: "食品追溯 我来教你怎么做", title: "食品追溯 我来教你怎么做",
path:'http://www.gs1cn.org/Manage/down/食品追溯我来教你怎么做.pdf' path:'http://www.gs1cn.org/Manage/down/食品追溯我来教你怎么做.pdf'
}, },
{ {
name: "GS1标准在食品安全领域中的应用", title: "GS1标准在食品安全领域中的应用",
path:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准在食品安全领域中的应用.pdf' path:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准在食品安全领域中的应用.pdf'
}, },
{ {
name: "中国食品的跨国追溯", title: "中国食品的跨国追溯",
path:'http://www.gs1cn.org/Manage/down/中国食品的跨国追溯.pdf' path:'http://www.gs1cn.org/Manage/down/中国食品的跨国追溯.pdf'
}, },
{ {
name: "商品条码食品安全追溯案例集", title: "商品条码食品安全追溯案例集",
path:'http://www.gs1cn.org/Manage/down/shangpintiaomaanquanzhuisuanliji.pdf' path:'http://www.gs1cn.org/Manage/down/shangpintiaomaanquanzhuisuanliji.pdf'
}, },
{ {
name: "乳制品、熟食品与烘烤食品追溯实施指南(美国)", title: "乳制品、熟食品与烘烤食品追溯实施指南(美国)",
path:'http://www.gs1cn.org/Manage/down/ruzhipinshushipin.pdf' path:'http://www.gs1cn.org/Manage/down/ruzhipinshushipin.pdf'
}, },
], ],
...@@ -169,6 +169,17 @@ export default { ...@@ -169,6 +169,17 @@ export default {
} }
}, },
getInfo(id,directpath){
if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({
path: `/news/msg?id=${id}`,
});
window.open(link.href,'_blank')
}
}
}, },
}; };
</script> </script>
......
...@@ -54,13 +54,17 @@ export default { ...@@ -54,13 +54,17 @@ export default {
}, },
// 详情 // 详情
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
...@@ -63,13 +63,17 @@ export default { ...@@ -63,13 +63,17 @@ export default {
}, },
// 详情 // 详情
// getInfo(id){ getInfo(id,directpath){
// console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
// let link = this.$router.resolve({ window.open(directpath,'_blank');
// path: `/News/msg?id=${id}`, }else{
// }); let link = this.$router.resolve({
// window.open(link.href,'_blank') path: `/news/msg?id=${id}`,
// } });
window.open(link.href,'_blank')
}
}
} }
}; };
</script> </script>
......
...@@ -54,13 +54,17 @@ export default { ...@@ -54,13 +54,17 @@ export default {
}, },
// 详情 // 详情
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<list :list="list" /> <!-- <list :list="list" /> -->
</div> </div>
...@@ -41,21 +41,22 @@ export default { ...@@ -41,21 +41,22 @@ export default {
list: [ list: [
{ {
name: "移动商务领域新标准—电子优惠券管理", title: "移动商务领域新标准—电子优惠券管理",
}, },
{ {
name: "越来越多的消费者通过移动终端浏览商品", title: "越来越多的消费者通过移动终端浏览商品",
}, },
{ {
name: "二维码进入医院 挂号、导诊、就医一条龙", title: "二维码进入医院 挂号、导诊、就医一条龙",
}, },
], ],
list2:[ list2:[
{ {
name:'移动商务(宣传折页)' title:'移动商务(宣传折页)',
path:'http://www.gs1cn.org/Manage/down/20130620GS1 MobileCom.pdf'
} }
] ]
}; };
......
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
// 行业应用 // 通知公告
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
page: page, page: page,
...@@ -53,13 +53,17 @@ export default { ...@@ -53,13 +53,17 @@ export default {
}, },
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/NoticeArticle?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<list :list="tableResult.list" /> <list :list="tableResult.list" @getInfo='getInfo' />
<pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' /> <pages :total="tableResult.totalCount" :currPage="tableResult.currPage" @getLimit='initListFn' />
</div> </div>
...@@ -43,11 +43,11 @@ export default { ...@@ -43,11 +43,11 @@ export default {
list2:[ list2:[
{ {
name:'《建材行业商品条码应用指南》', title:'《建材行业商品条码应用指南》',
path:'http://www.gs1cn.org/Manage/down/建材行业商品条码应用指南.pdf' path:'http://www.gs1cn.org/Manage/down/建材行业商品条码应用指南.pdf'
}, },
{ {
name:' 服装行业商品条码应用指南', title:' 服装行业商品条码应用指南',
path:'http://www.gs1cn.org/Manage/down/服装行业商品条码应用指南.pdf' path:'http://www.gs1cn.org/Manage/down/服装行业商品条码应用指南.pdf'
} }
], ],
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
// 行业应用 // 其他
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
page: page, page: page,
...@@ -77,12 +77,17 @@ export default { ...@@ -77,12 +77,17 @@ export default {
} }
}, },
// getInfo(id){ getInfo(id,directpath){
// console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
// this.$router.push({ window.open(directpath,'_blank');
// path: `/Knowledge/Statuteinfo?id=${id}`, }else{
// }); let link = this.$router.resolve({
// } path: `/news/msg?id=${id}`,
});
window.open(link.href,'_blank')
}
}
} }
}; };
</script> </script>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="picNews-bottom"> <div class="picNews-bottom">
<div class="container"> <div class="container">
<ul class="picNews-ul"> <ul class="picNews-ul">
<li v-for="(tmp, i) in tableResult.list" :key="i" @click="goInfo(tmp.pictureid)"> <li v-for="(tmp, i) in tableResult.list" :key="i" @click="getInfo(tmp.pictureid,tmp.jumppath)">
<div class="picNews-li-tp"> <div class="picNews-li-tp">
<img :src="tmp.picFile" alt="" /> <img :src="tmp.picFile" alt="" />
</div> </div>
...@@ -91,12 +91,17 @@ export default { ...@@ -91,12 +91,17 @@ export default {
}, },
// 详情 // 详情
goInfo(id){ getInfo(id,directpath){
if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
}, },
}; };
</script> </script>
......
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
const params = { const params = {
page: page, page: page,
limit: 15, limit: 15,
classId:30 classId:31
}; };
const listRes = const listRes =
await this.$api.news.newsList(params); await this.$api.news.newsList(params);
...@@ -54,13 +54,17 @@ export default { ...@@ -54,13 +54,17 @@ export default {
}, },
// 详情 // 详情
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
...@@ -54,13 +54,17 @@ export default { ...@@ -54,13 +54,17 @@ export default {
}, },
// 详情 // 详情
getInfo(id){ getInfo(id,directpath){
console.log(id,'id') if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/News/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
} }
}
} }
}; };
</script> </script>
......
<template> <template>
<div class="list"> <div class="list">
<div v-for="(tmp, i) in list" :key="i" class="row" @click="giveId(tmp.id)"> <div v-for="(tmp, i) in list" :key="i" class="row" @click="giveId(tmp.id,tmp.directpath)">
<div class="col-lg-6 list-left"> <div class="col-lg-6 list-left">
<span></span> <span></span>
<span>{{tmp.title}}</span> <span>{{tmp.title}}</span>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
export default { export default {
props: ['list'], props: ['list'],
methods:{ methods:{
giveId(id){ giveId(id,directpath){
this.$emit('getInfo',id) this.$emit('getInfo',id,directpath)
} }
} }
} }
......
<template> <template>
<div class="list"> <div class="list">
<div v-for="(tmp, i) in list" :key="i" class="list-li"> <div v-for="(tmp, i) in list" :key="i" class="list-li" @click="giveId(tmp.id,tmp.directpath)">
<div> <div>
<span></span> <span></span>
<span><a :href="tmp.path" target="_blank">{{tmp.name}}</a></span> <span >{{tmp.title}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
<script> <script>
export default { export default {
props: ['list'], props: ['list'],
methods:{
giveId(id,directpath){
this.$emit('getInfo',id,directpath)
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -40,18 +40,18 @@ ...@@ -40,18 +40,18 @@
<div class="top10"> <div class="top10">
<div class="container"> <div class="container">
<div class="cate"> <div class="cate">
<span>8月资讯排行TOP10</span> <span>资讯排行TOP10</span>
</div> </div>
<div class="top10-ul"> <div class="top10-ul">
<div v-for="(tmp, i) in top10.data" :key="i" class="top10-li"> <div v-for="(tmp, i) in top10.data" :key="i" class="top10-li">
<div v-if="i<3"> <div v-if="i<3">
<img :src="require(`../../assets/image/news/icon_${i+1}.png`)" alt="" > <img :src="require(`../../assets/image/news/icon_${i+1}.png`)" alt="" >
<span class="no"></span> <span class="no"></span>
<span class="name">{{ tmp.name }}</span> <span class="name" @click="getInfo(tmp.id,tmp.directpath)">{{ tmp.title }}</span>
</div> </div>
<div v-else> <div v-else>
<span class="no">{{i+1}}</span> <span class="no">{{i+1}}</span>
<span class="name">{{ tmp.name }}</span> <span class="name" @click="getInfo(tmp.id,tmp.directpath)">{{ tmp.title }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="cate"> <div class="cate">
<span>公告通知</span> <span>公告通知</span>
</div> </div>
<list2 :list="top10.data" /> <list2 :list="announceListArr" @getInfo='getInfo' />
</div> </div>
</div> </div>
<div class="zttj"> <div class="zttj">
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<div class="cate"> <div class="cate">
<span>专题推荐</span> <span>专题推荐</span>
</div> </div>
<list2 :list="top10.data" /> <list2 :list="xgljList" @getInfo='getInfo'/>
</div> </div>
</div> </div>
</div> </div>
...@@ -117,29 +117,16 @@ export default { ...@@ -117,29 +117,16 @@ export default {
], ],
}, },
top10: { top10: {
data: [ data: [],
{
name: "中国石油物资采购中心赴中国物品编码中心交流座谈",
},
{
name: "中国石油物资采购中心赴中国物品编码中心交流座谈",
},
{
name: "中国石油物资采购中心赴中国物品编码中心交流座谈",
},
{
name: "中国石油物资采购中心赴中国物品编码中心交流座谈",
},
{
name: "中国石油物资采购中心赴中国物品编码中心交流座谈",
},
],
}, },
announceListArr:[],
xgljList:[]
}; };
}, },
created() { created() {
this.InfoFn() this.InfoFn()
this.newsTop10()
this.announceList()
}, },
methods: { methods: {
...@@ -165,6 +152,42 @@ export default { ...@@ -165,6 +152,42 @@ export default {
} }
}, },
// top列表
async newsTop10() {
const policyListRes =
await this.$api.news.newsTop10();
const { returnCode, data } = policyListRes;
if (returnCode === "0") {
this.top10.data = data
}
},
// 公告
async announceList() {
const params = {
page: 1,
limit: 10,
};
const listRes =
await this.$api.news.announceList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.announceListArr = data.list
}
},
getInfo(id,directpath){
if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
let link = this.$router.resolve({
path: `/news/msg?id=${id}`,
});
window.open(link.href,'_blank')
}
}
}, },
}; };
</script> </script>
......
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