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
d85fb029
Commit
d85fb029
authored
Oct 03, 2021
by
Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 条码查询页面
parent
3eceb338
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
29 deletions
+85
-29
HeaderDropdown.vue
src/components/layout/header/HeaderDropdown.vue
+3
-4
index.vue
src/components/layout/header/index.vue
+16
-7
mock.js
src/components/layout/header/mock.js
+37
-13
index.js
src/router/index.js
+15
-0
index.vue
src/views/Business/index.vue
+1
-1
index.vue
src/views/Search/index.vue
+13
-4
No files found.
src/components/layout/header/HeaderDropdown.vue
View file @
d85fb029
...
@@ -65,12 +65,12 @@ export default {
...
@@ -65,12 +65,12 @@ export default {
return
(
<
div
class
=
"gs-dropdown-rect"
>
return
(
<
div
class
=
"gs-dropdown-rect"
>
<
div
class
=
"rect-title"
<
div
class
=
"rect-title"
vOn
:
click_stop_prevent
=
{()
=>
{
vOn
:
click_stop_prevent
=
{()
=>
{
this
.
$emit
(
'itemClick'
,
{...
nav
})
this
.
$emit
(
'itemClick'
,
{...
nav
,
root
:
{...
this
.
nav
}
})
}}
}}
>
>
<
span
class
=
"pointer"
>
{
nav
.
nameInHeaderNav
?
nav
.
nameInHeaderNav
:
nav
.
name
}
<
/span
>
<
span
class
=
"pointer"
>
{
nav
.
nameInHeaderNav
?
nav
.
nameInHeaderNav
:
nav
.
name
}
<
/span
>
<
/div
>
<
/div
>
<
div
class
Name
=
"rect-body"
>
<
div
class
=
"rect-body"
>
{
children
}
{
children
}
<
/div
>
<
/div
>
<
/div>
)
<
/div>
)
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
{
items
.
map
(
item
=>
{
{
items
.
map
(
item
=>
{
return
(
<
div
class
=
"gs-dropdown-item"
>
return
(
<
div
class
=
"gs-dropdown-item"
>
<
span
vOn
:
click_stop_prevent
=
{()
=>
{
<
span
vOn
:
click_stop_prevent
=
{()
=>
{
this
.
$emit
(
'itemClick'
,
{...
item
})
this
.
$emit
(
'itemClick'
,
{...
item
,
root
:
{...
this
.
nav
}
})
}}
}}
class
=
"pointer gs-hover"
class
=
"pointer gs-hover"
>
{
item
.
name
}
>
{
item
.
name
}
...
@@ -150,7 +150,6 @@ export default {
...
@@ -150,7 +150,6 @@ export default {
.rect-body
{
.rect-body
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
}
}
}
}
...
...
src/components/layout/header/index.vue
View file @
d85fb029
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
aria-expanded="false">
{{
nav
.
name
}}
</a>
aria-expanded="false">
{{
nav
.
name
}}
</a>
<!-- Dropdown Menu -->
<!-- Dropdown Menu -->
<HeaderDropdown
:nav=
"nav"
@
itemClick=
"handleItemClick"
/>
<HeaderDropdown
v-if=
"nav.children.length>0"
:nav=
"nav"
@
itemClick=
"handleItemClick"
/>
<!-- End Dropdown Menu -->
<!-- End Dropdown Menu -->
</li>
</li>
<!-- Nav items End-->
<!-- Nav items End-->
...
@@ -62,19 +62,29 @@ export default {
...
@@ -62,19 +62,29 @@ export default {
},
},
methods
:
{
methods
:
{
handleNavClick
(
nav
)
{
handleNavClick
(
nav
)
{
this
.
currentNav
=
nav
.
id
;
if
(
!!
nav
.
children
||
nav
.
children
.
length
===
0
){
this
.
currentNav
=
nav
.
id
;
}
},
},
handleItemClick
(
item
){
handleItemClick
(
item
)
{
console
.
log
(
item
);
console
.
log
(
item
);
if
(
item
.
link
.
startsWith
(
'http'
))
{
window
.
open
(
item
.
link
);
}
else
{
this
.
currentNav
=
item
.
root
.
id
;
item
.
breadcrumb
&&
this
.
$store
.
commit
(
'system/SET_BREADCRUMB'
,
item
.
breadcrumb
)
this
.
$router
.
push
({
path
:
item
.
link
})
}
},
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.navbar
{
.navbar
{
background
:
#fff
;
background
:
#fff
;
}
}
.gs-header-nav
{
.gs-header-nav
{
.navbar-nav-wrap
{
.navbar-nav-wrap
{
...
@@ -106,7 +116,6 @@ export default {
...
@@ -106,7 +116,6 @@ export default {
}
}
.navbar-toggler
{
.navbar-toggler
{
padding
:
.5rem
.5rem
padding
:
.5rem
.5rem
}
}
...
...
src/components/layout/header/mock.js
View file @
d85fb029
...
@@ -23,32 +23,57 @@ export const nav = [
...
@@ -23,32 +23,57 @@ export const nav = [
id
:
'3'
,
id
:
'3'
,
name
:
'条码查询'
,
name
:
'条码查询'
,
index
:
3
,
index
:
3
,
link
:
'/code'
,
link
:
'/search'
,
breadcrumb
:
[
{
name
:
'服务中心'
,
path
:
'/service'
},
{
name
:
'查询服务'
,
path
:
'/search'
},
{
name
:
'条码信息查询'
},
],
children
:
[
children
:
[
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'条码信息查询'
,
name
:
'条码信息查询'
,
nameInHeaderNav
:
'条码查询'
,
nameInHeaderNav
:
'条码查询'
,
index
:
0
,
index
:
0
,
link
:
'/tool'
,
link
:
'/search'
,
breadcrumb
:
[
{
name
:
'服务中心'
,
path
:
'/service'
},
{
name
:
'查询服务'
,
path
:
'/search'
},
{
name
:
'条码信息查询'
},
],
children
:
[
children
:
[
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'
国
内条码信息查询'
,
name
:
'
境
内条码信息查询'
,
index
:
0
,
index
:
0
,
link
:
'/tool/internal'
,
link
:
'/search/internal'
,
breadcrumb
:
[
{
name
:
'服务中心'
,
path
:
'/service'
},
{
name
:
'查询服务'
,
path
:
'/search'
},
{
name
:
'境内条码信息查询'
},
],
},
},
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'
国
外条码信息查询'
,
name
:
'
境
外条码信息查询'
,
index
:
1
,
index
:
1
,
link
:
'/tool/external'
,
link
:
'/search/external'
,
breadcrumb
:
[
{
name
:
'服务中心'
,
path
:
'/service'
},
{
name
:
'查询服务'
,
path
:
'/search'
},
{
name
:
'境外条码信息查询'
},
],
},
},
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'缩短码查询'
,
name
:
'缩短码查询'
,
index
:
2
,
index
:
2
,
link
:
'/tool/shortcode'
,
link
:
'/search/shortcode'
,
breadcrumb
:
[
{
name
:
'服务中心'
,
path
:
'/service'
},
{
name
:
'查询服务'
,
path
:
'/search'
},
{
name
:
'缩短码查询'
},
],
},
},
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
...
@@ -62,33 +87,32 @@ export const nav = [
...
@@ -62,33 +87,32 @@ export const nav = [
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'GLN查询'
,
name
:
'GLN查询'
,
index
:
1
,
index
:
1
,
link
:
'/
tool
/gln'
,
link
:
'/
search
/gln'
,
},
},
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'自行车企业代码公告查询'
,
name
:
'自行车企业代码公告查询'
,
index
:
2
,
index
:
2
,
link
:
'/
tool
/bike'
,
link
:
'/
search
/bike'
,
},
},
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'条码术语查询'
,
name
:
'条码术语查询'
,
index
:
3
,
index
:
3
,
link
:
'/
tool
/glossary'
,
link
:
'/
search
/glossary'
,
},
},
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'校验码计算工具'
,
name
:
'校验码计算工具'
,
index
:
4
,
index
:
4
,
link
:
'/
tool
/check'
,
link
:
'/
search
/check'
,
},
},
{
{
id
:
uuid
(
'gs_nav'
),
id
:
uuid
(
'gs_nav'
),
name
:
'国家及地区前缀码查询'
,
name
:
'国家及地区前缀码查询'
,
index
:
5
,
index
:
5
,
link
:
'/
tool
/country'
,
link
:
'/
search
/country'
,
},
},
]
]
},
{
},
{
id
:
'4'
,
id
:
'4'
,
...
...
src/router/index.js
View file @
d85fb029
...
@@ -82,6 +82,21 @@ const routes = [
...
@@ -82,6 +82,21 @@ const routes = [
]
]
},
},
{
{
// 查询中心
path
:
"/search"
,
name
:
"search"
,
component
:
main
,
meta
:
{
name
:
"首页"
},
children
:
[
{
path
:
"/"
,
component
:
()
=>
import
(
"@/views/Search/index"
)
},
]
},
{
path
:
"/login"
,
path
:
"/login"
,
name
:
"login"
,
name
:
"login"
,
component
:
()
=>
import
(
"@/views/User/index"
),
component
:
()
=>
import
(
"@/views/User/index"
),
...
...
src/views/Business/index.vue
View file @
d85fb029
<
template
>
<
template
>
<div
class=
"org container"
>
<div
class=
"org container"
>
<breadcrumb
:value=
"bread"
/>
<breadcrumb/>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-3"
>
<div
class=
"col-lg-3"
>
<left2/>
<left2/>
...
...
src/views/Search/index.vue
View file @
d85fb029
<
template
>
<
template
>
<div
class=
"container"
>
<div
class=
"container"
>
<breadcrumb
:value=
"bread"
/>
<breadcrumb/>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-3"
>
<div
class=
"col-lg-3"
>
<left2/>
<left2/>
...
@@ -9,13 +9,22 @@
...
@@ -9,13 +9,22 @@
<router-view
class=
"marginTopLg20"
></router-view>
<router-view
class=
"marginTopLg20"
></router-view>
</div>
</div>
</div>
</div>
<div
class=
"marginTop20"
>
<zxcxgj/>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
left2
from
'../comps/left2.vue'
import
breadcrumb
from
'../comps/breadcrumb.vue'
export
default
{
components
:{
left2
,
breadcrumb
,
},
data
()
{
return
{
}
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
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