Commit d220f926 by Lyan

资讯部分列表重构,解决一些bug

parent d43bd77a
......@@ -114,6 +114,27 @@ const relatedLinks = (params = {}) => {
const getSearchInfo = (params = {}) => {
return POST(`${Prefix}/office/news/api/getSearchInfo`, params);
}
// 综合报道
const zhbdList = (params = {}) => {
return POST(`${Prefix}/office/news/api/zhbdList`, params);
}
// 标准科研
const bzkydtList = (params = {}) => {
return POST(`${Prefix}/office/news/api/bzkydtList`, params);
}
// 深度资讯
const sdztList = (params = {}) => {
return POST(`${Prefix}/office/news/api/sdztList`, params);
}
// 精彩视频
const jcspList = (params = {}) => {
return POST(`${Prefix}/office/news/api/jcspList`, params);
}
//精彩视频详情
const jcspiInfo = (params = {}) => {
return GET(`${Prefix}/office/news/api/jcspiInfo/${params.id}`)
}
export default {
......@@ -141,5 +162,10 @@ export default {
dsxxjyTop8,
gzzdTop7,
centerTop6,
getSearchInfo
getSearchInfo,
zhbdList,
bzkydtList,
sdztList,
jcspList,
jcspiInfo
}
import {uuid} from "@/utils/utils";
export default {
id: "6",
name: "技术与标准",
......
......@@ -713,6 +713,14 @@ const routes = [{
component: () => import("@/views/News/msg.vue"),
},
{
path: "/News/msgVideo",
name: "msgVideo",
meta: {
name: "精彩视频详情",
},
component: () => import("@/views/News/msgVideo.vue"),
},
{
path: "/News/NoticeArticle",
name: "NoticeArticle",
meta: {
......
......@@ -100,7 +100,7 @@
<li><a :href="path+'/djwh/download/19thfile/党的十九大报告全文.docx'" target="_blank">党的十九大报告全文</a></li>
<li><a :href="path+'/djwh/download/19thfile/质检总局党组关于认真学习宣传贯彻党的十九大精神的通知.doc'" target="_blank">质检总局党组关于认真学习宣传贯彻党的十九大精神的通知</a></li>
<li><a :href="path+'/djwh/download/19thfile/质检总局党组关于印发质检系统学习宣传贯彻党的十九大精神工作方案的通知.doc'" target="_blank">质检总局党组关于印发质检系统学习宣传贯彻党的十九大精神工作方案的通知</a></li>
<li><a :href="path+'/djwh/download/19thfile/中共中央关于认真学习宣传贯彻党的十九大精神的决定.docx'" target="_blank">中共中央关于认真学习宣传贯彻党的十九大精神的决定</a></li>
<li><a :href="path+'/djwh/download/19thfile/中共中央关 于认真学习宣传贯彻党的十九大精神的决定.docx'" target="_blank">中共中央关于认真学习宣传贯彻党的十九大精神的决定</a></li>
<li><a :href="path+'/djwh/download/19thfile/中共中央宣传部关于印发《党的十九大精神宣讲提纲》的通知.pdf'" target="_blank">中共中央宣传部关于印发《党的十九大精神宣讲提纲》的通知</a></li>
<li><a :href="path+'/djwh/download/19thfile/中国物品编码中心关于印发学习宣传贯彻党的十九大精神工作方案的通知.PDF'" target="_blank">中国物品编码中心关于印发学习宣传贯彻党的十九大精神工作方案的通知</a></li>
......@@ -133,10 +133,10 @@
<div class="border-div list-style xglj">
<div class="middle-title">
<h4>相关链接</h4>
<a href=""> <img src="../../assets/image/djwh/19th_rmw.jpg" alt=""></a>
<a href=""> <img src="../../assets/image/djwh/dsxx.jpg" alt=""></a>
<a href=""> <img src="../../assets/image/djwh/lxyz_xxjyw.png" alt=""></a>
<a href=""> <img src="../../assets/image/djwh/lxyz_rmw.png" alt=""></a>
<a href="http://www.12371.cn/special/xg19thjs/"> <img src="../../assets/image/djwh/19th_rmw.jpg" alt=""></a>
<a href="http://www.samr.gov.cn/zt/fdqh/"> <img src="../../assets/image/djwh/dsxx.jpg" alt=""></a>
<a href="http://lxyz.12371.cn"> <img src="../../assets/image/djwh/lxyz_xxjyw.png" alt=""></a>
<a href="http://lxyz.people.cn/GB/index.html"> <img src="../../assets/image/djwh/lxyz_rmw.png" alt=""></a>
</div>
<div class="middle-list">
......@@ -456,7 +456,7 @@ html{
}
.hdtp{
.list-style{
height: 140px;
height: 136px;
a{
display: inline-block;
height: 100%!important;
......@@ -540,10 +540,15 @@ html{
.middle-title{
}
a{
display: inline-block;
width: 100%;
padding: 5px 15px 0 15px;
}
img{
height: 72px;
width: 100%;
padding: 5px 15px 0 15px;
}
}
......
......@@ -5,9 +5,9 @@
<div class="title">GS1系统</div>
<img src="../../../assets/image/knowledge/2013GS1system.jpg" alt="">
<div class="imgBtn">
<a href="#" target="_blank" ><img src="../../../assets/image/knowledge/bmtx.gif" alt=""></a>
<a href="#" target="_blank" ><img src="../../../assets/image/knowledge/sjzttx.gif" alt=""></a>
<a href="#" target="_blank"><img src="../../../assets/image/knowledge/sjjhtx.gif" alt=""></a>
<a href="/Knowledge/GS1System/bmtx" ><img src="../../../assets/image/knowledge/bmtx.gif" alt=""></a>
<a href="/Knowledge/GS1System/sjzttx"><img src="../../../assets/image/knowledge/sjzttx.gif" alt=""></a>
<a href="/Knowledge/GS1System/sjjhtx"><img src="../../../assets/image/knowledge/sjjhtx.gif" alt=""></a>
</div>
<p>GS1系统起源于美国,由美国统一代码委员会(UCC,于2005年更名为GS1 US)于1973年创建。UCC创造性地采用12位的数字标识代码(UPC)。1974年,标识代码和条码首次在开放的贸易中得以应用。继UPC系统成功之后,欧洲物品编码协会,即早期的国际物品编码协会(EAN International,2005年更名为GS1),于1977年成立并开发了与之兼容的系统并在北美以外的地区使用。EAN系统设计意在兼容 UCC系统,主要用13位数字编码。随着条码与数据结构的确定,GS1 系统得以快速发展。</p>
<p>GS1系统为在全球范围内标识货物、服务、资产和位置提供了准确的编码。这些编码能够以条码符号来表示,以便进行商务流程所需的电子识读。该系统克服了厂商、组织使用自身的编码系统或部分特殊编码系统的局限性,提高了贸易的效率和对客户的反应能力。</p>
......
<template>
<div class="org container">
<breadcrumb />
<div class="row status-container">
<div class="row status-container" v-loading='loading'>
<p class="title-style">{{title}}</p>
<div v-html="content"></div>
</div>
......@@ -19,6 +19,7 @@ export default {
},
data() {
return {
loading:false,
id:this.$route.query.id,
content:'',
title:''
......@@ -33,13 +34,12 @@ export default {
this.policyInfoFn();
},
mounted() {
console.log(2)
// 面包屑单独处理
},
methods:{
// 政策法规列表
async policyInfoFn() {
this.loading=true
const params = {
id:this.id,
};
......@@ -47,6 +47,7 @@ export default {
await this.$api.knowledge.policyInfo(params);
const { returnCode, data } = policyInfoRes;
if (returnCode === "0") {
this.loading=false
this.content=data.content;
this.title=data.title
this.$store.commit("system/SET_BREADCRUMB", [
......
......@@ -3,7 +3,7 @@
<breadcrumb/>
<div class="row">
<div class="col-lg-3">
<SubNav/>
<SubNav />
<div v-show="$route.path=='/Knowledge/GS1System/bmtx'" class="showBmtx">
<p>相关链接</p>
<ul>
......@@ -24,7 +24,7 @@
</template>
<script>
import SubNav from "../comps/SubNav.vue";
import SubNav from "../comps/SubNav2.vue";
import breadcrumb from "../comps/breadcrumb.vue";
import "../Search/style/common.scss";
import knowledge from "@/components/layout/header/knowledge.js";
......@@ -38,6 +38,7 @@ export default {
data() {
return {
// showBMTX:false
list:[]
};
},
watch:{
......@@ -50,6 +51,7 @@ export default {
},
data() {
return {};
......
......@@ -45,10 +45,9 @@ export default {
const params = {
page: page,
limit: this.tableResult.pageSize,
classId:5
};
const listRes =
await this.$api.news.newsList(params);
await this.$api.news.zhbdList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.tableResult = data
......
......@@ -48,7 +48,7 @@ export default {
classId:9
};
const listRes =
await this.$api.news.newsList(params);
await this.$api.news.sdztList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.tableResult = data
......
......@@ -34,7 +34,7 @@
<p>电子邮箱:wuxm@ancc.org.cn,liwt@ancc.org.cn</p>
<div class="down">
<span style="margin:20px 0 10px;font-size:14px;display:inline-block">资料下载</span>
<list2 :list="list" @getInfo='getInfo'/>
<list2 :list="listFile" @getInfo='getInfo'/>
</div>
......@@ -61,7 +61,8 @@ export default {
pages,
},
computed: {
...mapState(["urls"]),
...mapState(["urls"])
},
data() {
return {
......@@ -101,9 +102,22 @@ export default {
name: "联系方式",
},
},
listFile:[],
tableResult:{
list:[],
currPage:1,
pageSize:15,
totalCount:0
}
};
},
created(){
this.initListFn(this.tableResult.currPage);
list: [
},
mounted(){
this.listFile= [
{
title: "GS1全球追溯标准(第二版)",
directpath: `${this.urls.gs1cn}Manage/down/GS1全球追溯标准(第二版).pdf`
......@@ -145,17 +159,7 @@ export default {
title: "乳制品、熟食品与烘烤食品追溯实施指南(美国)",
directpath: `${this.urls.gs1cn}Manage/down/ruzhipinshushipin.pdf`
},
],
tableResult:{
list:[],
currPage:1,
pageSize:15,
totalCount:0
}
};
},
created(){
this.initListFn(this.tableResult.currPage);
]
},
methods: {
...mapMutations({
......
......@@ -42,7 +42,7 @@ export default {
name: "移动商务",
ico: "",
},
list2:[],
list: [
{
title: "移动商务领域新标准—电子优惠券管理",
......@@ -57,20 +57,25 @@ export default {
},
],
list2:[
};
},
mounted(){
this.list2=[
{
title:'移动商务(宣传折页)',
directpath: `${this.urls.gs1cn}Manage/down/20130620GS1 MobileCom.pdf`
}
],
]
},
methods: {
goDown(id,url){
if(url&&url!==''){
window.open(url,'_blank');
}
}
};
},
methods: {},
};
</script>
<style lang="scss" scoped>
......
......@@ -47,14 +47,7 @@ export default {
},
list2:[
{
title:'《建材行业商品条码应用指南》',
directpath: `${this.urls.gs1cn}Manage/down/建材行业商品条码应用指南.pdf`
},
{
title:' 服装行业商品条码应用指南',
directpath: `${this.urls.gs1cn}Manage/down/服装行业商品条码应用指南.pdf`
}
],
tableResult:{
list:[],
......@@ -67,6 +60,16 @@ export default {
created() {
this.initListFn(this.tableResult.currPage);
},
mounted(){
this.list2=[{
title:'《建材行业商品条码应用指南》',
directpath: `${this.urls.gs1cn}Manage/down/建材行业商品条码应用指南.pdf`
},
{
title:' 服装行业商品条码应用指南',
directpath: `${this.urls.gs1cn}Manage/down/服装行业商品条码应用指南.pdf`
}]
},
methods:{
...mapMutations({
setMatche: "setMatche",
......
......@@ -45,10 +45,9 @@ export default {
const params = {
page: page,
limit: this.tableResult.pageSize,
classId:31
};
const listRes =
await this.$api.news.newsList(params);
await this.$api.news.bzkydtList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.tableResult = data
......
......@@ -48,7 +48,7 @@ export default {
classId:10
};
const listRes =
await this.$api.news.newsList(params);
await this.$api.news.jcspList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.tableResult = data
......@@ -70,7 +70,7 @@ export default {
];
this.setMatche(matche);
let link = this.$router.resolve({
path: `/News/msg?id=${id}`,
path: `/News/msgVideo?id=${id}`,
});
window.open(link.href,'_blank')
}
......
......@@ -24,7 +24,7 @@
</div>
<div class="top10-kj">
<ul>
<li v-for="(tmp, i) in topData" :key="i" @click="getInfo(tmp.id,tmp.directpath)">
<li v-for="(tmp, i) in topData.slice(0,5)" :key="i" @click="getInfo(tmp.id,tmp.directpath)">
<span></span
><span>{{tmp.title}}</span
>
......
<template>
<el-menu
:default-active="activeMenu"
class="el-menu-vertical gs-subnav"
:collapse="false"
:default-openeds="openeds"
:collapse-transition='true'
@select="handleSelect"
@open='opengo'
@close='opengo'
>
<template v-for="submenu in subNav">
<el-submenu
v-if="submenu.children && submenu.children.length > 0"
:key="submenu.id"
:index="submenu.name"
>
<template slot="title">
<span :index="submenu.name" :class="{ 'is-active': activeMenu === submenu.id }">{{ submenu.name }}</span>
</template>
<template v-for="item in submenu.children">
<template v-if="item.children && item.children.length > 0">
<el-submenu :index="item.name" :key="item.id">
<template slot="title">
<span style="margin-left: 6px">{{ item.name }}</span>
</template>
<template v-for="third in item.children">
<el-menu-item
:key="third.id"
:index="third.name"
:class="{ 'is-active': activeMenu === third.id }"
>
{{ third.name }}
</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item
:key="item.id"
:index="item.name"
:class="{ 'is-active': activeMenu === item.id }"
>
{{ item.name }}
</el-menu-item>
</template>
</template>
</el-submenu>
<template v-else>
<el-menu-item
:key="submenu.id"
:index="submenu.name"
:class="{ 'is-active': activeMenu === submenu.id }"
>
<span>{{ submenu.name }}</span>
</el-menu-item>
</template>
</template>
</el-menu>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
activeMenu: "",
openeds: []
};
},
computed: {
...mapState("system", ["subNav"]),
},
created() {
console.log(this.subNav);
this.openeds = this.subNav.map(nav => nav.name)
},
watch: {
subNav: {
handler(val) {
// console.log("watch------ subNav", val);
const result = this.treeFind(
val,
(item) => item.link === this.$route.path
);
if (result) {
console.log(result);
this.activeMenu = result.id;
}
},
immediate: true,
},
},
methods: {
treeFind(tree, func) {
for (const data of tree) {
if (func(data)) return data;
if (data.children) {
const res = this.treeFind(data.children, func);
if (res) return res;
}
}
return null;
},
handleSelect(index, indexP) {
// console.log(index, indexP);
const temp = JSON.parse(JSON.stringify(indexP));
const key = temp.shift();
this.subNav.forEach((item) => {
if (item.name === key) {
if (temp.length > 1) {
this.checkChildren(index, temp, item.children);
} else if (temp.length === 0) {
this.showApp(item);
} else {
item.children.forEach((_item) => {
if (_item.name === index) {
this.showApp(_item);
}
});
}
}
});
},
checkChildren(index, indexP, list) {
const key = indexP.shift();
list.forEach((item) => {
// console.log(key);
if (item.name === key) {
if (indexP.length > 1) {
this.checkChildren(index, indexP, item.children);
} else {
item.children.forEach((_item) => {
if (_item.name === index) {
this.activeMenu = _item.name;
this.showApp(_item);
}
});
}
}
});
},
showApp(item) {
this.activeMenu = item.id;
if (item.link.startsWith("http")) {
window.open(item.link);
} else {
if (item.breadcrumb) {
this.$store.commit("system/SET_BREADCRUMB", item.breadcrumb);
}
this.$router.push({ path: item.link });
}
},
handleOpen(key, keyPath) {
console.log(key, keyPath);
},
handleClose(key, keyPath) {
console.log(key, keyPath);
},
goLink(item){
console.log(item)
this.$router.push({ path: item.link });
},
opengo(index,indexPath){
this.$router.push({ path: '/Knowledge/GS1System2' });
}
},
};
</script>
<style lang="scss">
.el-menu.gs-subnav {
border-right: none;
background: $side-bg-color;
margin-bottom: 20px;
padding-left: 0;
.el-submenu__title {
background: $side-bg-color;
height: 44px;
line-height: 44px;
}
.menu-title {
margin-top: 25px;
margin-bottom: 10px;
padding-left: 28px;
font-size: 14px;
color: #b7b6b6;
}
.el-menu-item {
height: 44px;
line-height: 44px;
color: #6b6a6a;
background: transparent;
font-size: 14px;
i {
color: $side-bg-color;
font-size: 25px;
position: absolute;
top: 15px;
right: 15px;
}
&:hover,
&:focus,
&.is-active {
color: #f26335;
background: $side-menu-active-color;
border-right: 3px solid #f26335;
}
}
}
</style>
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