Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
e641039a
Commit
e641039a
authored
Jun 26, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增消息提示
parent
11c193a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
3 deletions
+71
-3
commonShouSun.vue
src/components/commonPage/commonShouSun.vue
+1
-0
index.vue
src/components/index.vue
+70
-3
No files found.
src/components/commonPage/commonShouSun.vue
View file @
e641039a
...
...
@@ -152,6 +152,7 @@
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
closeDialog
();
this
.
MsgBus
.
$emit
(
'comMsgTips'
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
src/components/index.vue
View file @
e641039a
...
...
@@ -8,17 +8,26 @@
<div
class=
"nav-middle"
>
<ul
class=
"clearfix"
:style=
"
{width:`${allWindowWidth}px`}">
<li
v-for=
"(item,index) in menuList"
v-if=
"item.MenuUrl!='' && index
<
=
maxLength
"
:class=
"
{active:item.MenuId==chosenIndex}" @click="goUrl(item.MenuUrl,item.MenuId,index)" >
<span
class=
"big_tittle"
><i
:class=
"[fontPub,item.icon]"
></i>
{{
item
.
MenuName
}}
</span>
<span
class=
"big_tittle"
><i
:class=
"[fontPub,item.icon]"
></i>
{{
item
.
MenuName
}}
<span
class=
"MenuConfirm"
v-if=
"item.fatherCount>0"
>
{{
item
.
fatherCount
}}
</span>
</span>
<div
class=
"hoverNote"
></div>
<!--
<div
:class=
"
{menuList_son:item.ChildMenu.length>=1}" :style="{width:item.ChildMenu.length>=1 ? ((item.ChildMenu.length*160) + 'px') : '0',left: item.ChildMenu.length>1 ? '-50%' : '0'}" @click.stop>-->
<div
:class=
"
{menuList_son:item.ChildMenu.length>=1}" :style="{width:item.ChildMenu.length>=1 ? '1300px' : '0',left:'50px'}" @click.stop>
<div
class=
"menuList_son_item"
@
mousemove
.
stop
@
mouseout
.
stop
>
<div
v-for=
"(son, sIndex) in item.ChildMenu"
style=
"width: 150px;margin-right: 20px"
>
<p
class=
"menuList_son_one_tittle"
>
{{
son
.
MenuName
}}
</p>
<p
class=
"menuList_son_one_tittle"
>
{{
son
.
MenuName
}}
<span
class=
"MenuConfirm"
v-if=
"son.childCount>0"
>
{{
son
.
childCount
}}
</span>
</p>
<div
v-for=
"(grand, gIndex) in son.NewChildMenu"
class=
"menuList_tittle_box"
>
<p
v-if=
"grand.GCode !== '默认'"
class=
"menuList_son_two_tittle"
>
{{
grand
.
GCode
}}
</p>
<template
v-for=
"(grandSon, gsIndex) in grand.list"
>
<p
@
click
.
stop=
"goUrl(grandSon.MenuUrl,grandSon.MenuId,gsIndex)"
class=
"menuList_son_three_tittle"
><i
:class=
"[fontPub,JSON.parse(grandSon.MenuStyle).icon ? JSON.parse(grandSon.MenuStyle).icon : 'icon-guanli2']"
></i>
{{
grandSon
.
MenuName
}}
</p>
<p
@
click
.
stop=
"goUrl(grandSon.MenuUrl,grandSon.MenuId,gsIndex)"
class=
"menuList_son_three_tittle"
><i
:class=
"[fontPub,JSON.parse(grandSon.MenuStyle).icon ? JSON.parse(grandSon.MenuStyle).icon : 'icon-guanli2']"
></i>
{{
grandSon
.
MenuName
}}
<span
class=
"MenuConfirm"
v-if=
"grandSon.Count>0"
>
{{
grandSon
.
Count
}}
</span>
</p>
</
template
>
</div>
</div>
...
...
@@ -1327,6 +1336,14 @@ export default {
this
.
MsgBus
.
$on
(
'openChat'
,
function
(
obj
){
that
.
lt
(
obj
)
});
//调用初始化信息提示
this
.
MsgBus
.
$on
(
'comMsgTips'
,
function
(){
that
.
getNumber
();
});
setInterval
(
function
(){
that
.
getNumber
();
},
600000
)
const
permissionNow
=
Notification
.
requestPermission
();
var
hiddenProperty
=
"hidden"
in
document
...
...
@@ -1373,6 +1390,7 @@ export default {
//获取版本
this
.
getVersion
();
this
.
getMenu
();
// this.getNumber();
this
.
setCheckMenu
();
this
.
getDynamic
();
...
...
@@ -3220,8 +3238,46 @@ export default {
x
.
icon
=
menuStyle
.
icon
;
x
.
color
=
menuStyle
.
color
;
this
.
menuList
.
push
(
x
);
}
});
this
.
getNumber
();
},
getNumber
(){
this
.
menuList
.
forEach
(
x
=>
{
x
.
fatherCount
=
0
;
x
.
ChildMenu
.
forEach
(
y
=>
{
y
.
childCount
=
0
;
})
})
this
.
apipost
(
"sellorder_post_GetMenuInformationList"
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
dataList
=
res
.
data
.
data
;
dataList
.
forEach
(
item
=>
{
this
.
menuList
.
forEach
(
x
=>
{
x
.
ChildMenu
.
forEach
(
y
=>
{
y
.
NewChildMenu
.
forEach
(
z
=>
{
z
.
list
.
forEach
(
j
=>
{
if
(
j
.
MenuId
==
item
.
MenuId
){
j
.
Count
=
item
.
Count
;
y
.
childCount
+=
j
.
Count
;
}
})
})
})
})
})
this
.
menuList
.
forEach
(
x
=>
{
x
.
ChildMenu
.
forEach
(
y
=>
{
x
.
fatherCount
+=
y
.
childCount
;
})
})
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//设置菜单选中
setCheckMenu
()
{
...
...
@@ -4278,4 +4334,15 @@ export default {
margin-bottom: 0 !important;
height: 850px;
}
.MenuConfirm{
display: inline-block;
width:15px;
height:15px;
font-size:12px;
text-align: center;
border-radius: 50%;
background-color: #E95252;
color:#fff;
line-height: 15px;
}
</
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