Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
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
qa-platform-ui
Commits
39baa2d2
Commit
39baa2d2
authored
Jul 07, 2021
by
晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
127e03dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
index.js
src/router/index.js
+10
-0
SceneList.vue
src/views/auto/SceneList.vue
+2
-1
Aside.vue
src/views/layout/leftAside/Aside.vue
+1
-0
No files found.
src/router/index.js
View file @
39baa2d2
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
// import store from '../store/store'
// import store from '../store/store'
import
NProgress
from
'
nprogress
'
// Progress 进度条
import
'
nprogress/nprogress.css
'
// Progress 进度条样式
import
Router
from
'
vue-router
'
import
Router
from
'
vue-router
'
import
Login
from
'
../views/login/Login
'
import
Login
from
'
../views/login/Login
'
import
Main
from
'
../views/Main
'
import
Main
from
'
../views/Main
'
...
@@ -213,10 +215,12 @@ const router = new Router({
...
@@ -213,10 +215,12 @@ const router = new Router({
})
})
// 判断用户是否登陆到系统
// 判断用户是否登陆到系统
router
.
beforeEach
(
function
(
to
,
from
,
next
)
{
router
.
beforeEach
(
function
(
to
,
from
,
next
)
{
NProgress
.
start
()
var
token
=
window
.
sessionStorage
.
getItem
(
'
token
'
)
var
token
=
window
.
sessionStorage
.
getItem
(
'
token
'
)
if
(
token
!==
null
)
{
if
(
token
!==
null
)
{
if
(
to
.
path
===
'
/login
'
)
{
if
(
to
.
path
===
'
/login
'
)
{
next
(
'
/main
'
)
next
(
'
/main
'
)
NProgress
.
done
()
// 结束Progress
}
else
if
(
to
.
path
===
'
/main
'
)
{
}
else
if
(
to
.
path
===
'
/main
'
)
{
next
()
next
()
}
else
{
}
else
{
...
@@ -225,6 +229,7 @@ router.beforeEach(function(to, from, next) {
...
@@ -225,6 +229,7 @@ router.beforeEach(function(to, from, next) {
next
()
next
()
}
else
{
}
else
{
next
(
'
/main
'
)
next
(
'
/main
'
)
NProgress
.
done
()
// 结束Progress
}
}
}
}
}
else
{
}
else
{
...
@@ -232,7 +237,12 @@ router.beforeEach(function(to, from, next) {
...
@@ -232,7 +237,12 @@ router.beforeEach(function(to, from, next) {
next
()
next
()
}
else
{
}
else
{
next
(
'
/login
'
)
next
(
'
/login
'
)
NProgress
.
done
()
// 结束Progress
}
}
}
}
})
})
router
.
afterEach
(()
=>
{
NProgress
.
done
()
// 结束Progress
})
export
default
router
export
default
router
src/views/auto/SceneList.vue
View file @
39baa2d2
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<slot
slot-scope=
"scope"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"success"
size=
"medium"
icon=
"el-icon-link"
@
click=
"executeSceneFrom(scope.row)"
style=
"width:80px;margin-left:1px"
>
执行
</el-button>
<el-button
type=
"success"
size=
"medium"
icon=
"el-icon-link"
@
click=
"executeSceneFrom(scope.row)"
style=
"width:80px;margin-left:1px"
>
执行
</el-button>
<el-button
type=
"warning"
size=
"medium"
icon=
"el-icon-edit-outline"
@
click=
"editeSceneCaseFrom(scope.row)"
style=
"width:135px;margin-left:1px"
v-permission=
"('auto:scene:case:edit')"
>
编辑场景用例
</el-button>
<el-button
type=
"warning"
size=
"medium"
icon=
"el-icon-edit-outline"
@
click=
"editeSceneCaseFrom(scope.row)"
style=
"width:135px;margin-left:1px"
v-permission=
"('auto:scene:case:edit')"
>
编辑场景用例
</el-button>
<el-button
type=
"warning"
size=
"medium"
icon=
"el-icon-edit"
@
click=
"editeSceneFrom(scope.row)"
style=
"width:110px;margin-left:1px"
v-permission=
"('auto:scene:edit')"
>
编辑场景
</el-button>
<el-button
type=
"warning"
size=
"medium"
icon=
"el-icon-edit"
@
click=
"editeSceneFrom(scope.row)"
style=
"width:110px;margin-left:1px"
v-permission=
"('auto:scene:edit')"
>
编辑场景
</el-button>
<el-button
type=
"primary"
size=
"medium"
icon=
"el-icon-circle-check"
@
click=
"checkReport(scope.row)"
style=
"width:110px;margin-left:1px"
>
查看报告
</el-button>
<el-button
type=
"primary"
size=
"medium"
icon=
"el-icon-circle-check"
@
click=
"checkReport(scope.row)"
style=
"width:110px;margin-left:1px"
>
查看报告
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"deleSceneFrom(scope.row)"
v-permission=
"('auto:scene:del')"
>
删除
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"deleSceneFrom(scope.row)"
v-permission=
"('auto:scene:del')"
>
删除
</el-button>
...
@@ -170,6 +170,7 @@ export default {
...
@@ -170,6 +170,7 @@ export default {
executeScene
(
this
.
executeScene
)
executeScene
(
this
.
executeScene
)
.
then
((
resp
)
=>
{
.
then
((
resp
)
=>
{
this
.
requestData
=
resp
.
data
.
data
this
.
requestData
=
resp
.
data
.
data
console
.
log
(
'
888
'
,
this
.
requestData
)
if
(
this
.
requestData
.
length
>
0
)
{
if
(
this
.
requestData
.
length
>
0
)
{
this
.
isShow
=
true
this
.
isShow
=
true
this
.
$message
.
success
(
'
执行成功!
'
)
this
.
$message
.
success
(
'
执行成功!
'
)
...
...
src/views/layout/leftAside/Aside.vue
View file @
39baa2d2
...
@@ -97,6 +97,7 @@ export default {
...
@@ -97,6 +97,7 @@ export default {
// this.$store.dispatch('user/userMsg', {
// this.$store.dispatch('user/userMsg', {
// userInfo: resp.data.data
// userInfo: resp.data.data
// })
// })
// 判断token失效时,清空缓存,跳转到登陆页面
if
(
resp
.
data
.
data
===
false
)
{
if
(
resp
.
data
.
data
===
false
)
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
this
.
$message
.
error
(
resp
.
data
.
msg
)
window
.
sessionStorage
.
clear
()
window
.
sessionStorage
.
clear
()
...
...
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