Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
a4e463ae
Commit
a4e463ae
authored
Oct 22, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待出角标
parent
d7b2c5ea
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
10 deletions
+61
-10
order.js
src/api/ecw/order.js
+8
-0
Item.vue
src/layout/components/Sidebar/Item.vue
+16
-4
SidebarItem.vue
src/layout/components/Sidebar/SidebarItem.vue
+7
-2
index.vue
src/layout/components/Sidebar/index.vue
+8
-0
getters.js
src/store/getters.js
+3
-1
permission.js
src/store/modules/permission.js
+2
-1
user.js
src/store/modules/user.js
+8
-1
detail.vue
src/views/ecw/order/detail.vue
+4
-1
index.vue
src/views/system/menu/index.vue
+5
-0
No files found.
src/api/ecw/order.js
View file @
a4e463ae
...
@@ -999,3 +999,11 @@ export function exportOrderSummaryByContainerNumber(params){
...
@@ -999,3 +999,11 @@ export function exportOrderSummaryByContainerNumber(params){
responseType
:
'
blob
'
responseType
:
'
blob
'
})
})
}
}
// 查询权限范围内待出订单数量
export
function
getWaitingShipmentCount
(){
return
request
({
url
:
'
/air/order/data/scope/waiting/shipment/count
'
,
method
:
'
get
'
})
}
src/layout/components/Sidebar/Item.vue
View file @
a4e463ae
...
@@ -10,20 +10,32 @@ export default {
...
@@ -10,20 +10,32 @@ export default {
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
}
},
badge
:
Number
},
},
render
(
h
,
context
)
{
render
(
h
,
context
)
{
const
{
icon
,
title
}
=
context
.
props
const
{
icon
,
title
,
badge
}
=
context
.
props
const
vnodes
=
[]
const
vnodes
=
[]
if
(
icon
)
{
if
(
icon
)
{
vnodes
.
push
(
<
svg
-
icon
icon
-
class
=
{
icon
}
/>
)
vnodes
.
push
(
<
svg
-
icon
icon
-
class
=
{
icon
}
test
=
"
1
"
/>
)
}
}
if
(
title
)
{
if
(
title
)
{
vnodes
.
push
(
<
span
slot
=
'
title
'
>
{(
title
)}
<
/span>
)
vnodes
.
push
(
<
span
><
span
>
{(
title
)}
<
/span><span class="badge">{badge}</
span
>
<
/span>
)
}
}
return
vnodes
return
vnodes
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.badge
:not
(
:empty
)
{
background
:
red
;
color
:
#fff
;
padding
:
2px
8px
;
font-size
:
12px
;
border-radius
:
10px
;
margin-left
:
5px
;
}
</
style
>
src/layout/components/Sidebar/SidebarItem.vue
View file @
a4e463ae
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
<template
v-if=
"hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
>
<template
v-if=
"hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
>
<app-link
v-if=
"onlyOneChild.meta"
:to=
"resolvePath(onlyOneChild.path)"
>
<app-link
v-if=
"onlyOneChild.meta"
:to=
"resolvePath(onlyOneChild.path)"
>
<el-menu-item
:index=
"resolvePath(onlyOneChild.path)"
:class=
"
{'submenu-title-noDropdown':!isNest}">
<el-menu-item
:index=
"resolvePath(onlyOneChild.path)"
:class=
"
{'submenu-title-noDropdown':!isNest}">
<item
:icon=
"onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"
:title=
"$l(onlyOneChild.meta, 'title')"
/>
<item
:icon=
"onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"
:title=
"$l(onlyOneChild.meta, 'title')"
:badge=
"badge"
/>
</el-menu-item>
</el-menu-item>
</app-link>
</app-link>
</
template
>
</
template
>
<el-submenu
v-else
ref=
"subMenu"
:index=
"resolvePath(item.path)"
popper-append-to-body
>
<el-submenu
v-else
ref=
"subMenu"
:index=
"resolvePath(item.path)"
popper-append-to-body
>
<
template
slot=
"title"
>
<
template
slot=
"title"
>
<item
v-if=
"item.meta"
:icon=
"item.meta && item.meta.icon"
:title=
"$l(item.meta, 'title')"
/>
<item
v-if=
"item.meta"
:icon=
"item.meta && item.meta.icon"
:title=
"$l(item.meta, 'title')"
:badge=
"badge"
/>
</
template
>
</
template
>
<sidebar-item
<sidebar-item
v-for=
"child in item.children"
v-for=
"child in item.children"
...
@@ -54,6 +54,11 @@ export default {
...
@@ -54,6 +54,11 @@ export default {
this
.
onlyOneChild
=
null
this
.
onlyOneChild
=
null
return
{}
return
{}
},
},
computed
:{
badge
(){
return
this
.
$store
.
getters
.
badgeData
[
this
.
item
.
meta
.
badgeField
]
}
},
methods
:
{
methods
:
{
hasOneShowingChild
(
children
=
[],
parent
)
{
hasOneShowingChild
(
children
=
[],
parent
)
{
if
(
!
children
)
{
if
(
!
children
)
{
...
...
src/layout/components/Sidebar/index.vue
View file @
a4e463ae
...
@@ -28,6 +28,7 @@ import { mapGetters, mapState } from "vuex";
...
@@ -28,6 +28,7 @@ import { mapGetters, mapState } from "vuex";
import
Logo
from
"
./Logo
"
;
import
Logo
from
"
./Logo
"
;
import
SidebarItem
from
"
./SidebarItem
"
;
import
SidebarItem
from
"
./SidebarItem
"
;
import
variables
from
"
@/assets/styles/variables.scss
"
;
import
variables
from
"
@/assets/styles/variables.scss
"
;
import
{
getWaitingShipmentCount
}
from
"
@/api/ecw/order
"
;
export
default
{
export
default
{
components
:
{
SidebarItem
,
Logo
},
components
:
{
SidebarItem
,
Logo
},
...
@@ -52,6 +53,13 @@ export default {
...
@@ -52,6 +53,13 @@ export default {
isCollapse
()
{
isCollapse
()
{
return
!
this
.
sidebar
.
opened
;
return
!
this
.
sidebar
.
opened
;
}
}
},
created
()
{
// 查询待出订单数量 waitingShipment
getWaitingShipmentCount
().
then
(
res
=>
{
console
.
log
(
'
getWaitingShipmentCount
'
,
res
.
data
)
this
.
$store
.
commit
(
'
SET_BADGE_DATA
'
,
{
waitingShipment
:
res
.
data
},
)
})
}
}
};
};
</
script
>
</
script
>
src/store/getters.js
View file @
a4e463ae
...
@@ -17,6 +17,8 @@ const getters = {
...
@@ -17,6 +17,8 @@ const getters = {
defaultRoutes
:
state
=>
state
.
permission
.
defaultRoutes
,
defaultRoutes
:
state
=>
state
.
permission
.
defaultRoutes
,
sidebarRouters
:
state
=>
state
.
permission
.
sidebarRouters
,
sidebarRouters
:
state
=>
state
.
permission
.
sidebarRouters
,
// 数据字典
// 数据字典
dict_datas
:
state
=>
state
.
dict
.
dictDatas
dict_datas
:
state
=>
state
.
dict
.
dictDatas
,
// 角标数据
badgeData
:
state
=>
state
.
user
.
badgeData
}
}
export
default
getters
export
default
getters
src/store/modules/permission.js
View file @
a4e463ae
...
@@ -56,7 +56,8 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
...
@@ -56,7 +56,8 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
titleEn
:
route
.
nameEn
,
titleEn
:
route
.
nameEn
,
icon
:
route
.
icon
,
icon
:
route
.
icon
,
noCache
:
!
route
.
keepalive
,
// 不缓存,如果需要缓存则需要组件名称能对应上
noCache
:
!
route
.
keepalive
,
// 不缓存,如果需要缓存则需要组件名称能对应上
componentPath
:
route
.
component
componentPath
:
route
.
component
,
badgeField
:
route
.
badgeField
}
}
route
.
hidden
=
typeof
route
.
isShowInMenuBar
!=
'
undefined
'
&&
(
route
.
isShowInMenuBar
==
'
false
'
||
!
route
.
isShowInMenuBar
)
route
.
hidden
=
typeof
route
.
isShowInMenuBar
!=
'
undefined
'
&&
(
route
.
isShowInMenuBar
==
'
false
'
||
!
route
.
isShowInMenuBar
)
// 处理 component 属性
// 处理 component 属性
...
...
src/store/modules/user.js
View file @
a4e463ae
...
@@ -13,7 +13,11 @@ const user = {
...
@@ -13,7 +13,11 @@ const user = {
permissions
:
[],
permissions
:
[],
notMessage
:
0
,
notMessage
:
0
,
matterNum
:
0
,
matterNum
:
0
,
download
:
0
download
:
0
,
badgeData
:{
// 待出订单数量
waitingShipment
:
0
}
},
},
mutations
:
{
mutations
:
{
...
@@ -43,6 +47,9 @@ const user = {
...
@@ -43,6 +47,9 @@ const user = {
},
},
SET_DOWNLOAD
(
state
,
cnt
){
SET_DOWNLOAD
(
state
,
cnt
){
state
.
download
=
cnt
;
state
.
download
=
cnt
;
},
SET_BADGE_DATA
(
state
,
data
){
state
.
badgeData
=
Object
.
assign
({},
state
.
badgeData
,
data
)
}
}
},
},
...
...
src/views/ecw/order/detail.vue
View file @
a4e463ae
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
<el-timeline
v-if=
"order.orderTimeVOList && order.orderTimeVOList.length"
:reverse=
"true"
>
<el-timeline
v-if=
"order.orderTimeVOList && order.orderTimeVOList.length"
:reverse=
"true"
>
<el-timeline-item
v-for=
"(activity, index) in order.orderTimeVOList"
:key=
"index"
:timestamp=
"parseTime(activity.businessTime)"
>
<el-timeline-item
v-for=
"(activity, index) in order.orderTimeVOList"
:key=
"index"
:timestamp=
"parseTime(activity.businessTime)"
>
{{ $l(activity, 'title') }}
{{ $l(activity, 'title') }}
<div>
{{$l(activity, 'remarks')}}
</div>
<div
:class=
"{red: !!activity.mark}"
>
{{$l(activity, 'remarks')}}
</div>
</el-timeline-item>
</el-timeline-item>
</el-timeline>
</el-timeline>
<el-result
v-else
icon=
"info "
:title=
"$t('暂无数据')"
:subTitle=
"$t('暂无订单动态数据')"
/>
<el-result
v-else
icon=
"info "
:title=
"$t('暂无数据')"
:subTitle=
"$t('暂无订单动态数据')"
/>
...
@@ -794,6 +794,9 @@ export default {
...
@@ -794,6 +794,9 @@ export default {
<
/script
>
<
/script
>
<
style
scoped
>
<
style
scoped
>
.
red
{
color
:
red
;
}
.
card
{
.
card
{
margin
-
bottom
:
20
px
;
margin
-
bottom
:
20
px
;
}
}
...
...
src/views/system/menu/index.vue
View file @
a4e463ae
...
@@ -148,6 +148,11 @@
...
@@ -148,6 +148,11 @@
<el-input
v-model=
"form.redirect"
:placeholder=
"$t('请输入重定向地址')"
/>
<el-input
v-model=
"form.redirect"
:placeholder=
"$t('请输入重定向地址')"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('角标字段')"
prop=
"redirect"
>
<el-input
v-model=
"form.badgeField"
:placeholder=
"$t('不清楚请留空,已设勿改')"
/>
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
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