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
33b40cd0
Commit
33b40cd0
authored
Nov 16, 2021
by
晓彤
Browse files
Options
Browse Files
Download
Plain Diff
更新
parents
0f5d1304
2f967eef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
4 deletions
+61
-4
DbSync.vue
src/views/effect/DbSync.vue
+9
-3
Notify.vue
src/views/qa/Notify.vue
+52
-1
No files found.
src/views/effect/DbSync.vue
View file @
33b40cd0
...
...
@@ -4,6 +4,7 @@
<slot
name=
"description"
>
<p>
1. 同步数据库是将线上的表结构和配置数据同步到测试库;
</p>
<p>
2. 保留业务数据的意思是仅将线上的表结构同步到测试库,但仍保留测试环境的业务数据;
</p>
<p>
3. 如果测试环境没有对应的库或者表,同步数据库时,请不要勾选保留业务数据,否则会导致同步失败;
</p>
</slot>
</el-alert>
<div
class=
"app-container"
style=
"width:1000px; margin:0 auto;"
>
...
...
@@ -14,8 +15,8 @@
</el-select>
</el-form-item>
<el-form-item
label=
"数据库名:"
prop=
"dbName"
>
<el-select
v-model=
"temp.dbName"
filterable
clearable
style=
"width: 300px"
placeholder=
"要同步的数据库名称
"
@
change=
"dbChange"
>
<el-select
v-model=
"temp.dbName"
filterable
clearable
@
clear=
"setValueNull"
style=
"width: 300px
"
placeholder=
"要同步的数据库名称"
@
change=
"dbChange"
>
<el-option
v-for=
"item in dbNameList"
:value=
"item"
:label=
"item"
:key=
"item"
/>
</el-select>
</el-form-item>
...
...
@@ -27,7 +28,8 @@
</el-form-item>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"是否仅将线上的表结构同步到测试库,且仍保留测试环境的业务数据"
placement=
"bottom-start"
>
<el-form-item
label=
"是否保留业务数据:"
prop=
"notDeleteBusinessData"
>
<el-switch
v-model=
"temp.notDeleteBusinessData"
style=
"margin-right:280px"
active-text=
"是"
inactive-text=
"否"
/>
<el-switch
v-model=
"temp.notDeleteBusinessData"
style=
"margin-right:280px"
active-text=
"是"
inactive-text=
"否"
/>
</el-form-item>
</el-tooltip>
</el-form>
...
...
@@ -175,6 +177,10 @@ export default {
this
.
$message
.
success
(
'
数据库同步中...
'
)
}
})
},
// 清空时间
setValueNull
()
{
this
.
temp
.
tableName
=
''
}
}
}
...
...
src/views/qa/Notify.vue
View file @
33b40cd0
...
...
@@ -41,6 +41,7 @@
<
template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.dingRobot.status===1"
>
进行中
</p>
<p
v-if=
"scope.row.dingRobot.status===2"
>
已完成
</p>
<p
v-if=
"scope.row.dingRobot.status===3"
>
已挂起
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"dingRobot.creator"
label=
"创建人"
width=
"80px"
></el-table-column>
...
...
@@ -54,9 +55,18 @@
<el-button
type=
"success"
size=
"small"
@
click=
"openSendDialog(scope.row)"
v-permission=
"('qa:process:schedule')"
>
发送进度
</el-button>
<el-button
:disabled=
"scope.row.dingRobot.status===1?false:true"
type=
"success"
size=
"small"
<!-- 完成按钮 -->
<el-button
v-if=
"scope.row.dingRobot.status===1||scope.row.dingRobot.status===3"
type=
"success"
size=
"small"
@
click=
"finishDialog(scope.row)"
v-permission=
"('qa:process:finish')"
>
完成
</el-button>
<!-- 添加刮起按钮 -->
<el-button
v-if=
"scope.row.dingRobot.status===1"
type=
"info"
size=
"small"
@
click=
"HangDialog(scope.row.dingRobot.id)"
>
挂起
</el-button>
<el-button
v-if=
"scope.row.dingRobot.status===3"
type=
"info"
size=
"small"
@
click=
"EnableDialog(scope.row)"
>
启用
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"delProjectRobot(scope.row.dingRobot.id)"
v-permission=
"('qa:process:del')"
>
删除
</el-button>
</slot>
...
...
@@ -767,6 +777,7 @@ export default {
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
标记完成成功!
'
)
this
.
showMsg
=
false
return
this
.
getProjectRobotList
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
...
...
@@ -855,6 +866,46 @@ export default {
// 查询方法
queryData
()
{
this
.
getProjectRobotList
()
},
// 挂起按钮
HangDialog
(
id
)
{
var
formdata
=
new
FormData
()
formdata
.
set
(
'
dingRobotId
'
,
id
)
formdata
.
set
(
'
status
'
,
3
)
this
.
openMessage
(
'
是否需要挂起?
'
,
'
确定
'
,
()
=>
{
changePipelineStatus
(
formdata
)
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
挂起成功!
'
)
return
this
.
getProjectRobotList
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
type
:
'
error
'
,
message
:
error
})
})
})
},
// 启用按钮
EnableDialog
(
row
)
{
var
formdata
=
new
FormData
()
formdata
.
set
(
'
dingRobotId
'
,
row
.
dingRobot
.
id
)
formdata
.
set
(
'
status
'
,
1
)
this
.
openMessage
(
'
是否需要启用?
'
,
'
确定
'
,
()
=>
{
changePipelineStatus
(
formdata
)
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
启用成功!
'
)
return
this
.
getProjectRobotList
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
type
:
'
error
'
,
message
:
error
})
})
})
}
},
created
()
{
...
...
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