Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qahome-diamond
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
QA
qahome-diamond
Commits
5d62a2d8
Commit
5d62a2d8
authored
May 10, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拦截器中增加loading
parent
9549141b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
69 deletions
+49
-69
article.js
src/api/article.js
+0
-41
remoteSearch.js
src/api/remoteSearch.js
+0
-9
loading.js
src/utils/loading.js
+33
-0
request.js
src/utils/request.js
+16
-0
manager.vue
src/views/dbconfig/manager.vue
+0
-3
envDetail.vue
src/views/docker/envDetail.vue
+0
-5
runingEnv.vue
src/views/docker/runingEnv.vue
+0
-5
index.vue
src/views/proconfig/index.vue
+0
-3
index.vue
src/views/statistics/index.vue
+0
-3
No files found.
src/api/article.js
deleted
100644 → 0
View file @
9549141b
import
request
from
'
@/utils/request
'
export
function
fetchList
(
query
)
{
return
request
({
url
:
'
/article/list
'
,
method
:
'
get
'
,
params
:
query
})
}
export
function
fetchArticle
(
id
)
{
return
request
({
url
:
'
/article/detail
'
,
method
:
'
get
'
,
params
:
{
id
}
})
}
export
function
fetchPv
(
pv
)
{
return
request
({
url
:
'
/article/pv
'
,
method
:
'
get
'
,
params
:
{
pv
}
})
}
export
function
createArticle
(
data
)
{
return
request
({
url
:
'
/article/create
'
,
method
:
'
post
'
,
data
})
}
export
function
updateArticle
(
data
)
{
return
request
({
url
:
'
/article/update
'
,
method
:
'
post
'
,
data
})
}
src/api/remoteSearch.js
deleted
100644 → 0
View file @
9549141b
import
request
from
'
@/utils/request
'
export
function
userSearch
(
name
)
{
return
request
({
url
:
'
/search/user
'
,
method
:
'
get
'
,
params
:
{
name
}
})
}
src/utils/loading.js
0 → 100644
View file @
5d62a2d8
import
{
Loading
}
from
'
element-ui
'
let
loadingCount
=
0
let
loading
const
startLoading
=
()
=>
{
loading
=
Loading
.
service
({
lock
:
true
,
text
:
'
加载中...
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
})
}
const
endLoading
=
()
=>
{
loading
.
close
()
}
export
const
showLoading
=
()
=>
{
if
(
loadingCount
===
0
)
{
startLoading
()
}
loadingCount
+=
1
}
export
const
hideLoading
=
()
=>
{
if
(
loadingCount
<=
0
)
{
return
}
loadingCount
-=
1
if
(
loadingCount
===
0
)
{
endLoading
()
}
}
src/utils/request.js
View file @
5d62a2d8
...
...
@@ -3,6 +3,7 @@ import { Message } from 'element-ui'
import
store
from
'
@/store
'
import
{
getToken
}
from
'
@/utils/auth
'
import
{
MessageBox
}
from
'
element-ui
'
import
{
showLoading
,
hideLoading
}
from
'
./loading
'
// create an axios instance
const
service
=
axios
.
create
({
...
...
@@ -71,4 +72,19 @@ service.interceptors.response.use(
}
)
/* 请求拦截器(请求之前的操作) */
service
.
interceptors
.
request
.
use
((
req
)
=>
{
showLoading
()
return
req
},
err
=>
Promise
.
reject
(
err
))
/* 请求之后的操作 */
service
.
interceptors
.
response
.
use
((
res
)
=>
{
hideLoading
()
return
res
},
(
err
)
=>
{
hideLoading
()
return
Promise
.
reject
(
err
)
})
export
default
service
src/views/dbconfig/manager.vue
View file @
5d62a2d8
...
...
@@ -5,7 +5,6 @@
</div>
<el-table
v-loading=
"listLoading"
:data=
"configs"
:header-cell-style=
"
{background:'#F3F4F7',color:'#555'}"
border
...
...
@@ -88,7 +87,6 @@ export default {
},
data
()
{
return
{
listLoading
:
true
,
temp
:
{
},
dialogFormVisible
:
false
,
...
...
@@ -114,7 +112,6 @@ export default {
getConfig
()
{
getConfig
(
this
.
listQuery
).
then
(
res
=>
{
this
.
configs
=
res
.
data
this
.
listLoading
=
false
})
},
...
...
src/views/docker/envDetail.vue
View file @
5d62a2d8
...
...
@@ -20,7 +20,6 @@
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"FormatTabledata.base"
:header-cell-style=
"
{background:'#F3F4F7',color:'#555'}"
size="medium"
...
...
@@ -88,7 +87,6 @@
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"FormatTabledata[item._id]"
:header-cell-style=
"{background:'#F3F4F7',color:'#555'}"
size=
"medium"
...
...
@@ -301,7 +299,6 @@ export default {
data
()
{
return
{
centerDialogVisible
:
false
,
listLoading
:
true
,
namespace
:
null
,
tableData
:
[],
options
:
[],
...
...
@@ -352,11 +349,9 @@ export default {
// message: '服务状态已拉取',
// type: 'success'
// })
this
.
listLoading
=
false
})
},
refresh
()
{
this
.
listLoading
=
true
this
.
getServicelist
()
},
getRepository
(
label
)
{
...
...
src/views/docker/runingEnv.vue
View file @
5d62a2d8
...
...
@@ -6,7 +6,6 @@
运行环境列表
</p>
<el-table
v-loading=
"listLoading"
:data=
"tableData"
:header-cell-style=
"
{background:'#F3F4F7',color:'#555'}"
size="medium"
...
...
@@ -55,7 +54,6 @@ export default {
data
()
{
return
{
name
:
'
hello
'
,
listLoading
:
true
,
tableData
:
[]
}
},
...
...
@@ -88,9 +86,6 @@ export default {
}
})
})
setTimeout
(()
=>
{
this
.
listLoading
=
false
},
0.5
*
1000
)
},
indexMethod
(
index
)
{
return
index
+
1
...
...
src/views/proconfig/index.vue
View file @
5d62a2d8
...
...
@@ -13,7 +13,6 @@
</div>
<el-table
v-loading=
"listLoading"
:data=
"proconfigs"
border
fit
...
...
@@ -202,7 +201,6 @@ export default {
data
()
{
return
{
total
:
0
,
listLoading
:
true
,
listQuery
:
{
project_name
:
undefined
,
type
:
undefined
,
...
...
@@ -241,7 +239,6 @@ export default {
}
getProjects
(
this
.
listQuery
).
then
(
res
=>
{
this
.
proconfigs
=
res
.
data
this
.
listLoading
=
false
})
},
handleFilter
()
{
...
...
src/views/statistics/index.vue
View file @
5d62a2d8
...
...
@@ -9,7 +9,6 @@
</div>
<el-table
v-loading=
"listLoading"
:data=
"logs"
border
fit
...
...
@@ -84,7 +83,6 @@ export default {
},
data
()
{
return
{
listLoading
:
true
,
page
:
1
,
listQuery
:
{
query
:
{
...
...
@@ -118,7 +116,6 @@ export default {
}
getLog
(
this
.
listQuery
).
then
(
res
=>
{
this
.
logs
=
res
.
data
this
.
listLoading
=
false
})
},
...
...
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