Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3760ec89
authored
Jun 04, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
修改样式
2 parents
eb8188f2
e8efb59a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
28 deletions
public/index.html
src/components/DesktopLeftSider/Sub/Menu.vue
src/components/DesktopLeftSider/Sub/NavInfoCard.vue
src/components/DesktopRightSider/DesktopRightSider.vue
src/components/HomeContent/HomeContent.vue
src/components/HomeContent/Sub/LoginForm.vue
src/store/modules/menu.js
src/views/Login.vue
public/index.html
View file @
3760ec8
...
...
@@ -7,7 +7,7 @@
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
<
%= htmlWebpackPlugin.options.title %>
</title>
</head>
<body>
<body
style=
"margin: 0;"
>
<noscript>
<strong>
We're sorry but
<
%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
...
...
src/components/DesktopLeftSider/Sub/Menu.vue
View file @
3760ec8
...
...
@@ -6,7 +6,7 @@
class=
"section"
v-for=
"(item, index) in menuList"
:key=
"item.origin.menuNo"
>
<input
type=
"radio"
name=
"accordion-radio"
:id=
"'section-'+index"
:checked=
"item.showSubList"
@
click=
"titleClick(item)"
/>
<input
type=
"radio"
name=
"accordion-radio"
:id=
"'section-'+index"
:checked=
"item.showSubList"
@
click=
"titleClick(item
, index
)"
/>
<label
:for=
"'section-'+index"
>
<span>
{{
item
.
origin
.
menuName
}}
</span>
<!-- :class="
{'rotate-deg': item.showSubList}" -->
...
...
@@ -97,11 +97,13 @@ export default {
});
// 点击主菜单标题
const
titleClick
=
(
item
)
=>
{
state
.
menuList
.
forEach
(
i
=>
{
i
.
showSubList
=
false
;
const
titleClick
=
(
item
,
idx
)
=>
{
state
.
menuList
.
forEach
((
i
,
index
)
=>
{
if
(
idx
!==
index
)
{
i
.
showSubList
=
false
;
}
})
item
.
showSubList
=
true
;
item
.
showSubList
=
!
item
.
showSubList
;
};
// 高亮被选中的子集标题
...
...
@@ -212,15 +214,17 @@ export default {
}
// 同步激活样式
resData
.
forEach
((
item
)
=>
{
const
{
menuName
:
pMenuName
}
=
item
.
origin
;
item
.
showSubList
=
pMenuName
===
curBreadcrumb
[
0
].
name
;
item
.
children
.
forEach
((
cItem
,
cIndex
)
=>
{
cItem
.
subItemActive
=
false
;
if
(
cItem
.
origin
.
menuName
===
curBreadcrumb
[
1
].
name
)
{
cItem
.
subItemActive
=
true
;
curBreadcrumb
[
1
].
id
=
cItem
.
id
;
}
})
if
(
curBreadcrumb
)
{
const
{
menuName
:
pMenuName
}
=
item
.
origin
;
item
.
showSubList
=
pMenuName
===
curBreadcrumb
[
0
].
name
;
item
.
children
.
forEach
((
cItem
,
cIndex
)
=>
{
cItem
.
subItemActive
=
false
;
if
(
cItem
.
origin
.
menuName
===
curBreadcrumb
[
1
].
name
)
{
cItem
.
subItemActive
=
true
;
curBreadcrumb
[
1
].
id
=
cItem
.
id
;
}
})
}
});
if
(
isInit
&&
curBreadcrumb
)
{
...
...
@@ -228,10 +232,33 @@ export default {
let
path
=
thisBread
.
path
||
'/noData'
;
let
name
=
thisBread
.
name
||
''
;
let
id
=
thisBread
.
id
||
''
;
if
(
!
path
||
path
==
'/noData'
)
{
showEmpty
=
true
;
};
name
&&
getMenuAuth
(
id
,
name
);
history
.
pushState
(
null
,
path
,
path
);
history
.
pushState
({
breadcrumb
:
curBreadcrumb
},
path
,
path
);
store
.
dispatch
(
'app/setCommonData'
,
{
showEmpty
});
}
else
{
let
firstList
=
state
.
menuList
[
0
];
let
pOrigin
=
firstList
.
origin
;
let
cOrigin
=
firstList
.
children
[
0
].
origin
;
const
breadcrumb
=
[
{
name
:
pOrigin
.
menuName
,
path
:
pOrigin
.
frontRoute
},
{
name
:
cOrigin
.
menuName
,
path
:
cOrigin
.
frontRoute
}
];
if
(
!
cOrigin
.
frontRoute
||
cOrigin
.
frontRoute
==
'/noData'
)
{
showEmpty
=
true
;
};
name
&&
getMenuAuth
(
firstList
.
children
[
0
].
id
,
cOrigin
.
menuName
);
history
.
pushState
({
breadcrumb
},
cOrigin
.
frontRoute
,
cOrigin
.
frontRoute
);
store
.
dispatch
(
'app/setCommonData'
,
{
showEmpty
});
}
}
},
err
=>
{
...
...
src/components/DesktopLeftSider/Sub/NavInfoCard.vue
View file @
3760ec8
...
...
@@ -142,6 +142,7 @@ export default {
visibility
:
hidden
;
-webkit-transition
:
all
400ms
cubic-bezier
(
0.34
,
1.25
,
0.3
,
1
);
transition
:
all
400ms
cubic-bezier
(
0.34
,
1.25
,
0.3
,
1
);
font-size
:
16px
!important
;
.arrow-icon
{
height
:
21px
;
...
...
src/components/DesktopRightSider/DesktopRightSider.vue
View file @
3760ec8
...
...
@@ -40,7 +40,7 @@ export default {
const
subMircroEle
=
document
.
getElementById
(
'sub-system-frame'
);
subMircroEle
.
addEventListener
(
'DOMNodeInserted'
,
function
(
e
)
{
const
target
=
e
.
currentTarget
,
tarInner
=
target
.
innerHTML
;
tarInner
=
target
.
innerHTML
;
if
(
!
state
.
el_sub_innerH
!==
!
tarInner
)
{
state
.
el_sub_innerH
=
target
.
innerHTML
;
}
...
...
src/components/HomeContent/HomeContent.vue
View file @
3760ec8
...
...
@@ -22,12 +22,16 @@ export default {
.home-content-wrapper
{
position
:
absolute
;
z-index
:
1
;
top
:
139px
;
left
:
0
;
background-image
:
url(../../assets/images/car-bg.png)
;
background-size
:
100%
;
background-repeat
:
no-repeat
;
background-position
:
center
;
width
:
100%
;
height
:
calc
(
100%
-
278px
);
margin-top
:
139px
;
background
:
url(../../assets/images/car-bg.png)
no-repeat
center
;
background-size
:
cover
;
padding
:
20px
200px
;
overflow
:
hidden
;
height
:
calc
(
100%
-
268px
);
min-width
:
1000px
;
min-height
:
650px
;
}
</
style
>
\ No newline at end of file
src/components/HomeContent/Sub/LoginForm.vue
View file @
3760ec8
...
...
@@ -41,7 +41,7 @@
<img
class=
"captcha-img"
:src=
"`data:image/jpeg;base64,$
{captchaUrl}`" alt="验证码" />
</div>
</a-form-item>
-->
<el-form-item
class=
"login-button-wrapper"
@
click
=
"handleSubmit"
>
<el-form-item
class=
"login-button-wrapper"
@
keyup
.
enter=
"handleSubmit"
@
click
.
native
.
prevent
=
"handleSubmit"
>
<el-button
class=
"login-button"
type=
"primary"
...
...
@@ -65,7 +65,7 @@ import LoginService from '@/services/Login';
// import { UserOutlined, LockOutlined } from '@ant-design/icons-vue';
import
{
reactive
,
toRefs
,
getCurrentInstance
,
computed
}
from
'vue'
;
import
{
reactive
,
toRefs
,
getCurrentInstance
,
computed
,
onBeforeMount
}
from
'vue'
;
import
{
useStore
}
from
'vuex'
;
import
{
useRouter
}
from
'vue-router'
;
...
...
@@ -94,6 +94,14 @@ export default {
const
{
ctx
:
_this
}
=
getCurrentInstance
()
const
loginService
=
new
LoginService
();
onBeforeMount
(()
=>
{
document
.
onkeydown
=
e
=>
{
if
(
e
.
keyCode
===
13
)
{
handleSubmit
()
}
}
})
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'请输入密码'
));
...
...
@@ -203,7 +211,7 @@ export default {
.login-content
{
display
:
flex
;
justify-content
:
space-between
;
width
:
100
%
;
width
:
95
%
;
height
:
420px
;
}
...
...
src/store/modules/menu.js
View file @
3760ec8
...
...
@@ -16,6 +16,16 @@ try {
}
const
checkRepeatedData
=
(
data
,
type
)
=>
{
let
arr
=
[];
data
.
forEach
(
item
=>
{
if
(
arr
.
indexOf
(
item
[
type
])
<
0
)
{
arr
.
push
(
item
);
}
});
return
arr
;
}
export
default
{
namespaced
:
true
,
state
,
...
...
@@ -31,7 +41,7 @@ export default {
// 设置面包屑
SET_BREAD_CRUMB
(
state
,
data
)
{
if
(
!
init
)
{
state
.
curBreadCrumb
=
data
;
state
.
curBreadCrumb
=
checkRepeatedData
(
data
,
'name'
)
;
localStorage
.
setItem
(
'breadcrumb'
,
JSON
.
stringify
(
data
));
}
init
=
false
;
...
...
src/views/Login.vue
View file @
3760ec8
...
...
@@ -35,5 +35,6 @@ export default {
left
:
0
;
width
:
100%
;
min-width
:
1190px
;
overflow-y
:
scroll
;
}
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment