Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
94d39cb8
authored
2021-01-14 16:44:34 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增全局loading显隐方法
1 parent
68b05121
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
8 deletions
src/App.vue
src/views/manage/index.vue
src/views/panel/index.vue
src/views/zd/zddcb/index.vue
src/App.vue
View file @
94d39cb
<
template
>
<div
id=
"app"
>
<router-view
v-if=
"isRouterAlive"
/>
<div
class=
"loading"
v-show=
"isShow"
>
<div
class=
"content"
>
<i
class=
"fa fa-spinner fa-pulse fa-3x fa-fw"
style=
"color:#0081FF"
></i>
<span>
{{
tips
}}
</span>
</div>
</div>
</div>
</
template
>
...
...
@@ -14,10 +20,13 @@ export default {
data
(){
return
{
isRouterAlive
:
true
,
isShow
:
false
,
tips
:
'正在努力加载中...'
}
},
mounted
()
{
window
.
addEventListener
(
"unload"
,
this
.
saveState
);
window
.
vm
=
this
;
},
methods
:
{
saveState
()
{
...
...
@@ -29,11 +38,56 @@ export default {
this
.
isRouterAlive
=
true
;
})
},
loadingShow
(
tips
){
this
.
isShow
=
true
;
this
.
tips
=
tips
+
'...'
;
},
loadingHide
(
tips
){
this
.
isShow
=
false
;
}
},
};
</
script
>
<
style
lang=
"less"
>
#app
{
position
:
relative
;
.loading{
width
:
100%
;
height
:
100%
;
//
background-color
:
rgba
(
255
,
255
,
255
,
.3
);
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
1
;
.content{
width
:
240px
;
height
:
160px
;
background
:
#FFFFFF
;
box-shadow
:
0px
4px
28px
0px
rgba
(
0
,
0
,
0
,
0.24
);
border-radius
:
4px
;
border
:
1px
solid
#E6E6E6
;
box-sizing
:
border-box
;
padding
:
32px
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
margin-left
:
-80px
;
margin-top
:
-120px
;
i,span{
display
:
block
;
margin
:
0
auto
;
text-align
:
center
;
}
span
{
margin-top
:
26px
;
color
:
#6D7278
;
font-size
:
14px
;
}
}
}
}
.popper-zxx
{
padding
:
0
!important
;
/deep/
.el-tabs__header{
...
...
src/views/manage/index.vue
View file @
94d39cb
<
template
>
<div>
<el-tabs
v-model=
"activeName"
type=
"border-card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"日志管理"
name=
"log"
><log></log></el-tab-pane>
<el-tab-pane
label=
"字典管理"
name=
"dictionary"
><dictionary></dictionary></el-tab-pane>
</el-tabs>
</div>
</
template
>
<
script
>
...
...
src/views/panel/index.vue
View file @
94d39cb
...
...
@@ -372,14 +372,10 @@ export default {
.tj
{
flex
:
1
;
width
:
100%
;
display
:
-webkit-box
;
display
:
-moz-box
;
display
:
box
;
display
:
flex
;
>div{
flex
:
1
;
-webkit-box-orient
:
vertical
;
/*属性值:[horizontal]横向/[vertical]纵向*/
-moz-box-orient
:
horizontal
;
box-orient
:
horizontal
;
//
flex-grow
:
1
;
height
:
100%
;
margin-right
:
20px
;
background
:
#fff
;
...
...
src/views/zd/zddcb/index.vue
View file @
94d39cb
...
...
@@ -768,8 +768,10 @@
if
(
this
.
$refs
.
qlrxxModule
.
getQlgyfsData
()
==
'PSHGSBDCQJDC000000000000DC340020'
&&
this
.
$refs
.
qlrxxModule
.
getQlrxxData
().
length
<
2
)
{
Message
.
error
(
'当前权利人共有方式至少需要添加两名权利人'
)
}
else
{
vm
.
loadingShow
(
'请求发送中'
);
updateQjZdjbxx
(
this
.
formData
)
.
then
((
res
)
=>
{
vm
.
loadingHide
();
if
(
res
.
code
==
200
)
{
this
.
$message
({
message
:
'保存成功'
,
...
...
@@ -785,6 +787,7 @@
}
})
.
catch
((
error
)
=>
{
vm
.
loadingHide
();
this
.
$message
({
message
:
error
.
message
+
",查看日志,联系管理员"
,
type
:
"error"
,
...
...
Please
register
or
sign in
to post a comment