Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
d220f926
Commit
d220f926
authored
Dec 24, 2021
by
Lyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯部分列表重构,解决一些bug
parent
d43bd77a
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
735 additions
and
56 deletions
+735
-56
news.js
src/axios/module/news.js
+27
-1
knowledge.js
src/components/layout/header/knowledge.js
+0
-2
index.js
src/router/index.js
+8
-0
index.vue
src/views/Djwh/index.vue
+12
-7
GS1System.vue
src/views/Knowledge/GS1System/GS1System.vue
+3
-3
Statuteinfo.vue
src/views/Knowledge/Statuteinfo.vue
+4
-3
TeKIndex.vue
src/views/Knowledge/TeKIndex.vue
+4
-2
Composite.vue
src/views/News/Composite.vue
+1
-2
DepthTopics.vue
src/views/News/DepthTopics.vue
+1
-1
FoodSafety.vue
src/views/News/FoodSafety.vue
+20
-16
MCommerce.vue
src/views/News/MCommerce.vue
+11
-6
Other.vue
src/views/News/Other.vue
+11
-8
Research.vue
src/views/News/Research.vue
+1
-2
Video.vue
src/views/News/Video.vue
+2
-2
index.vue
src/views/News/index.vue
+1
-1
msgVideo.vue
src/views/News/msgVideo.vue
+406
-0
SubNav2.vue
src/views/comps/SubNav2.vue
+223
-0
No files found.
src/axios/module/news.js
View file @
d220f926
...
...
@@ -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
}
src/components/layout/header/knowledge.js
View file @
d220f926
import
{
uuid
}
from
"@/utils/utils"
;
export
default
{
id
:
"6"
,
name
:
"技术与标准"
,
...
...
src/router/index.js
View file @
d220f926
...
...
@@ -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
:
{
...
...
src/views/Djwh/index.vue
View file @
d220f926
...
...
@@ -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
:
1
40
px
;
height
:
1
36
px
;
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
;
}
}
...
...
src/views/Knowledge/GS1System/GS1System.vue
View file @
d220f926
...
...
@@ -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>
...
...
src/views/Knowledge/Statuteinfo.vue
View file @
d220f926
<
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"
,
[
...
...
src/views/Knowledge/TeKIndex.vue
View file @
d220f926
...
...
@@ -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/SubNav
2
.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
:{
...
...
@@ -48,6 +49,7 @@ export default {
created
()
{
this
.
$store
.
commit
(
"system/SET_SUB_NAV"
,
knowledge
.
children
);
},
...
...
src/views/News/Composite.vue
View file @
d220f926
...
...
@@ -45,10 +45,9 @@ export default {
const
params
=
{
page
:
page
,
limit
:
this
.
tableResult
.
pageSize
,
classId
:
5
};
const
listRes
=
await
this
.
$api
.
news
.
news
List
(
params
);
await
this
.
$api
.
news
.
zhbd
List
(
params
);
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
this
.
tableResult
=
data
...
...
src/views/News/DepthTopics.vue
View file @
d220f926
...
...
@@ -48,7 +48,7 @@ export default {
classId
:
9
};
const
listRes
=
await
this
.
$api
.
news
.
news
List
(
params
);
await
this
.
$api
.
news
.
sdzt
List
(
params
);
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
this
.
tableResult
=
data
...
...
src/views/News/FoodSafety.vue
View file @
d220f926
...
...
@@ -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=
"list
File
"
@
getInfo=
'getInfo'
/>
</div>
...
...
@@ -61,7 +61,8 @@ export default {
pages
,
},
computed
:
{
...
mapState
([
"urls"
]),
...
mapState
([
"urls"
])
},
data
()
{
return
{
...
...
@@ -101,9 +102,22 @@ export default {
name
:
"联系方式"
,
},
},
list
:
[
listFile
:[],
tableResult
:{
list
:[],
currPage
:
1
,
pageSize
:
15
,
totalCount
:
0
}
};
},
created
(){
this
.
initListFn
(
this
.
tableResult
.
currPage
);
},
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
({
...
...
src/views/News/MCommerce.vue
View file @
d220f926
...
...
@@ -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`
}
],
goDown
(
id
,
url
){
]
},
methods
:
{
goDown
(
id
,
url
){
if
(
url
&&
url
!==
''
){
window
.
open
(
url
,
'_blank'
);
}
}
};
},
methods
:
{},
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/News/Other.vue
View file @
d220f926
...
...
@@ -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"
,
...
...
src/views/News/Research.vue
View file @
d220f926
...
...
@@ -45,10 +45,9 @@ export default {
const
params
=
{
page
:
page
,
limit
:
this
.
tableResult
.
pageSize
,
classId
:
31
};
const
listRes
=
await
this
.
$api
.
news
.
news
List
(
params
);
await
this
.
$api
.
news
.
bzkydt
List
(
params
);
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
this
.
tableResult
=
data
...
...
src/views/News/Video.vue
View file @
d220f926
...
...
@@ -48,7 +48,7 @@ export default {
classId
:
10
};
const
listRes
=
await
this
.
$api
.
news
.
news
List
(
params
);
await
this
.
$api
.
news
.
jcsp
List
(
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/msg
Video
?id=
${
id
}
`
,
});
window
.
open
(
link
.
href
,
'_blank'
)
}
...
...
src/views/News/index.vue
View file @
d220f926
...
...
@@ -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
>
...
...
src/views/News/msgVideo.vue
0 → 100644
View file @
d220f926
<
template
>
<div
class=
"msg container"
>
<breadcrumb
/>
<div
class=
"row"
>
<div
class=
"col-lg-9"
>
<div
class=
"msg-cont"
>
<div
class=
"container"
>
<div
class=
"msg-title"
>
{{
title
}}
</div>
<div
class=
"msg-head"
>
<div
class=
"msg-head-left"
>
<span>
作者:
{{
author
}}
</span>
<span>
日期:
{{
showtime
}}
</span>
<span>
编辑:
{{
editor
}}
</span>
<!--
<span>
来源:
{{
source
}}
</span>
-->
</div>
<div
class=
"msg-head-right"
>
<span>
分享至:
</span>
<share
:config=
"config"
></share>
</div>
<div
class=
"msg-head-right"
v-if=
"false"
>
<span>
分享至:
</span>
<img
src=
"../../assets/image/news/icon_weibo.png"
alt=
""
@
click=
"toweibo"
/>
<img
src=
"../../assets/image/news/icon_weixin.png"
alt=
""
@
click=
"weixinShareTimeline"
/>
</div>
</div>
<div
class=
"msg-text"
v-html=
"content"
></div>
<div
class=
"videoStyle"
>
<video
controls=
"controls"
:src=
"videoStr"
width=
"100%"
height=
"100%"
webkit-playsinline=
""
></video>
</div>
</div>
</div>
<div
class=
"xglj"
>
<div
class=
"container"
>
<div
class=
"cate"
>
<span>
相关连接
</span>
<!--
<span>
更多>>
</span>
-->
</div>
<list
:list=
"xgljListArr"
@
getInfo=
"getInfo"
/>
</div>
</div>
</div>
<div
class=
"col-lg-3"
>
<div
class=
"top10"
>
<div
class=
"container"
>
<div
class=
"cate"
>
<span>
上月资讯排行TOP10
</span>
</div>
<div
class=
"top10-ul"
>
<div
v-for=
"(tmp, i) in top10.data"
:key=
"i"
class=
"top10-li"
>
<div
v-if=
"i
<
3
"
>
<img
:src=
"require(`../../assets/image/news/icon_$
{i + 1}.png`)"
alt=""
/>
<span
class=
"no"
></span>
<span
class=
"name"
@
click=
"getInfo(tmp.id, tmp.directpath)"
>
{{
tmp
.
title
}}
</span>
</div>
<div
v-else
>
<span
class=
"no"
>
{{
i
+
1
}}
</span>
<span
class=
"name"
@
click=
"getInfo(tmp.id, tmp.directpath)"
>
{{
tmp
.
title
}}
</span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"ggtz"
>
<div
class=
"container"
>
<div
class=
"cate"
>
<span>
公告通知
</span>
</div>
<list2
:list=
"announceListArr"
@
getInfo=
"getInfo"
/>
</div>
</div>
<div
class=
"zttj"
>
<div
class=
"container"
>
<div
class=
"cate"
>
<span>
专题推荐
</span>
</div>
<list2
:list=
"zttjListListArr"
@
getInfo=
"getInfo"
/>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
mapState
}
from
"vuex"
;
import
breadcrumb
from
"../comps/breadcrumb.vue"
;
import
list
from
"./comps/list.vue"
;
import
list2
from
"./comps/list2.vue"
;
export
default
{
components
:
{
breadcrumb
,
list
,
list2
,
},
computed
:
{
...
mapState
({
matche
:
(
state
)
=>
state
.
matche
,
}),
},
data
()
{
return
{
config
:
{
sites
:
[
"weibo"
,
"wechat"
],
wechatQrcodeTitle
:
"微信扫一扫:分享"
,
wechatQrcodeHelper
:
"<p>扫一扫</p><p>二维码便可将本文分享至朋友圈。</p>"
,
},
id
:
this
.
$route
.
query
.
id
,
content
:
""
,
title
:
""
,
showtime
:
""
,
author
:
""
,
source
:
""
,
editor
:
""
,
videoStr
:
''
,
breadcrumb
:
[{
name
:
"资讯中心"
,
path
:
"/News/index"
}],
xglj
:
{
data
:
[
{
name
:
"中国石油物资采购中心赴中国物品编码中心交流座谈"
,
time
:
"2020年10月20日"
,
},
{
name
:
"中国石油物资采购中心赴中国物品编码中心交流座谈"
,
time
:
"2020年10月20日"
,
},
],
},
top10
:
{
data
:
[],
},
announceListArr
:
[],
xgljListArr
:
[],
zttjListListArr
:
[],
url
:
window
.
location
.
href
,
sharesinastring
:
null
,
};
},
created
()
{
this
.
InfoFn
();
this
.
newsTop10
();
this
.
announceList
();
this
.
zttjList
();
},
methods
:
{
async
InfoFn
()
{
const
params
=
{
id
:
this
.
id
,
};
const
listRes
=
await
this
.
$api
.
news
.
jcspiInfo
(
params
);
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
this
.
content
=
data
.
brief
;
this
.
title
=
data
.
title
;
this
.
showtime
=
data
.
showtime
;
this
.
author
=
data
.
author
;
this
.
videoStr
=
data
.
wavname
;
// this.source = data.source;
this
.
editor
=
data
.
editor
;
this
.
breadcrumb
=
this
.
breadcrumb
.
concat
(
this
.
matche
);
this
.
breadcrumb
.
push
({
name
:
this
.
title
,
});
this
.
$store
.
commit
(
"system/SET_BREADCRUMB"
,
this
.
breadcrumb
);
this
.
xgljList
(
data
.
keyword
);
}
},
// top列表
async
newsTop10
()
{
const
policyListRes
=
await
this
.
$api
.
news
.
syzxphList
();
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
;
}
},
// 专题
async
zttjList
()
{
const
params
=
{
page
:
1
,
limit
:
10
,
};
const
listRes
=
await
this
.
$api
.
news
.
zttjList
(
params
);
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
this
.
zttjListListArr
=
data
;
}
},
// 相关链接
async
xgljList
(
keyword
)
{
const
params
=
{
id
:
9979
,
keyword
:
keyword
,
};
const
listRes
=
await
this
.
$api
.
news
.
relatedLinks
(
params
);
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
this
.
xgljListArr
=
data
;
}
},
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"
);
}
},
// weibo
toweibo
()
{
this
.
sharesinastring
=
"http://service.weibo.com/share/share.php?title="
+
this
.
title
+
"&url="
+
this
.
url
;
window
.
open
(
this
.
sharesinastring
,
"_blank"
);
//微博在新页面打开
},
//weixin
weixinShareTimeline
()
{},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
@media
screen
and
(
min-width
:
992px
)
{
}
@media
screen
and
(
max-width
:
992px
)
{
.videoStyle
{
width
:
100%
!important
;
height
:
200px
!important
;
}
}
}
</
style
>
<
style
lang=
"scss"
scoped
>
.msg
{
.list
{
.row
{
&:last-child
{
border-bottom
:
none
;
}
}
}
}
</
style
>
<
style
lang=
"scss"
scoped
>
.msg
{
padding-bottom
:
20px
;
.cate
{
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
1px
dashed
#c5d8ee
;
padding
:
15px
0
;
span
{
&:nth-child(1)
{
font-size
:
16px
;
color
:
#454545
;
}
&
:nth-child
(
2
)
{
color
:
#f26335
;
font-size
:
12px
;
cursor
:
pointer
;
}
}
}
.videoStyle
{
width
:
449px
;
height
:
300px
;
margin-top
:
30px
;
text-align
:
center
;
margin
:
0
auto
}
.msg-cont
{
@include
module-box;
padding
:
30px
0
;
.msg-title
{
color
:
#454545
;
font-size
:
26px
;
text-align
:
center
;
}
.msg-head
{
border-bottom
:
1px
dashed
#c5d8ee
;
padding
:
20px
0
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
12px
;
flex-wrap
:
wrap
;
.msg-head-left
{
span
{
margin-right
:
25px
;
&:last-child
{
margin
:
0
;
}
}
}
.msg-head-right
{
display
:
flex
;
align-items
:
center
;
img
{
margin-left
:
14px
;
}
}
}
.msg-text
{
margin-top
:
20px
;
margin-bottom
:
30px
;
p
{
text-indent
:
25px
;
font-size
:
14px
;
}
.strong
{
font-size
:
14px
;
font-weight
:
bold
;
}
}
}
.xglj
{
@include
module-box;
margin-top
:
20px
;
padding-bottom
:
20px
;
}
.top10
{
position
:
relative
;
@include
module-box;
.top10-ul
{
margin
:
0
;
padding
:
0
;
.top10-li
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
0
;
margin
:
0
;
>
div
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
@include
ellipsis;
font-size
:
13px
;
img
{
position
:
absolute
;
left
:
-4px
;
}
span
{
display
:
inline-block
;
&.no
{
width
:
20px
;
}
&
.name
{
flex
:
1
;
@include
ellipsis;
cursor
:
pointer
;
}
}
}
}
}
}
.ggtz
{
@include
module-box;
margin-top
:
20px
;
}
.zttj
{
@include
module-box;
margin-top
:
20px
;
}
}
</
style
>
src/views/comps/SubNav2.vue
0 → 100644
View file @
d220f926
<
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
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment