Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
b82b5d34
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b82b5d34
编写于
8月 05, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/metersphere/server
上级
b04904d1
2d14ace6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
133 addition
and
3 deletion
+133
-3
frontend/src/business/components/track/case/TestCase.vue
frontend/src/business/components/track/case/TestCase.vue
+8
-1
frontend/src/business/components/track/case/components/BatchMove.vue
...c/business/components/track/case/components/BatchMove.vue
+120
-0
frontend/src/business/components/track/case/components/ShowMoreBtn.vue
...business/components/track/case/components/ShowMoreBtn.vue
+1
-1
frontend/src/business/components/track/case/components/TestCaseList.vue
...usiness/components/track/case/components/TestCaseList.vue
+4
-1
未找到文件。
frontend/src/business/components/track/case/TestCase.vue
浏览文件 @
b82b5d34
...
...
@@ -29,6 +29,7 @@
@
testCaseEdit=
"editTestCase"
@
testCaseCopy=
"copyTestCase"
@
testCaseDetail=
"showTestCaseDetail"
@
batchMove=
"batchMove"
@
refresh=
"refresh"
@
moveToNode=
"moveToNode"
ref=
"testCaseList"
>
...
...
@@ -46,6 +47,8 @@
<test-case-move
@
refresh=
"refresh"
ref=
"testCaseMove"
/>
<batch-move
@
refresh=
"refresh"
ref=
"testBatchMove"
/>
</ms-container>
</
template
>
...
...
@@ -62,12 +65,13 @@
import
MsAsideContainer
from
"
../../common/components/MsAsideContainer
"
;
import
MsMainContainer
from
"
../../common/components/MsMainContainer
"
;
import
{
checkoutTestManagerOrTestUser
,
hasRoles
}
from
"
../../../../common/js/utils
"
;
import
BatchMove
from
"
./components/BatchMove
"
;
export
default
{
name
:
"
TestCase
"
,
components
:
{
MsMainContainer
,
MsAsideContainer
,
MsContainer
,
TestCaseMove
,
TestCaseList
,
NodeTree
,
TestCaseEdit
,
SelectMenu
},
MsAsideContainer
,
MsContainer
,
TestCaseMove
,
TestCaseList
,
NodeTree
,
TestCaseEdit
,
SelectMenu
,
BatchMove
},
comments
:
{},
data
()
{
return
{
...
...
@@ -236,6 +240,9 @@
}
this
.
$refs
.
testCaseEditDialog
.
getModuleOptions
();
this
.
$refs
.
testCaseMove
.
open
(
this
.
$refs
.
testCaseEditDialog
.
moduleOptions
,
selectIds
);
},
batchMove
(
selectIds
)
{
this
.
$refs
.
testBatchMove
.
open
(
this
.
treeNodes
,
selectIds
,
this
.
$refs
.
testCaseEditDialog
.
moduleOptions
);
}
}
}
...
...
frontend/src/business/components/track/case/components/BatchMove.vue
0 → 100644
浏览文件 @
b82b5d34
<
template
>
<div
v-loading=
"result.loading"
>
<el-dialog
title=
"选择用例目录"
:visible.sync=
"dialogVisible"
:before-close=
"close"
:destroy-on-close=
"true"
width=
"20%"
>
<div>
<el-input
:placeholder=
"$t('test_track.module.search')"
v-model=
"filterText"
size=
"small"
/>
<el-tree
class=
"filter-tree node-tree"
:data=
"treeNodes"
node-key=
"id"
:filter-node-method=
"filterNode"
:expand-on-click-node=
"false"
highlight-current
@
node-click=
"nodeClick"
ref=
"tree"
>
<template
v-slot:default=
"
{node}">
<span>
<span
class=
"node-icon"
>
<i
class=
"el-icon-folder"
/>
</span>
<span
class=
"node-title"
>
{{
node
.
label
}}
</span>
</span>
</
template
>
</el-tree>
</div>
<
template
v-slot:footer
>
<ms-dialog-footer
@
cancel=
"close"
@
confirm=
"save"
/>
</
template
>
</el-dialog>
</div>
</template>
<
script
>
import
MsDialogFooter
from
"
../../../common/components/MsDialogFooter
"
;
export
default
{
name
:
"
BatchMove
"
,
components
:
{
MsDialogFooter
},
data
()
{
return
{
treeNodes
:
[],
selectIds
:
[],
selectNode
:
{},
dialogVisible
:
false
,
currentKey
:
""
,
moduleOptions
:
[],
filterText
:
""
,
result
:
{},
}
},
watch
:
{
filterText
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
}
},
methods
:
{
open
(
treeNodes
,
selectIds
,
moduleOptions
)
{
this
.
dialogVisible
=
true
;
this
.
treeNodes
=
treeNodes
;
this
.
selectIds
=
selectIds
;
this
.
moduleOptions
=
moduleOptions
;
},
save
()
{
if
(
!
this
.
currentKey
)
{
this
.
$warning
(
this
.
$t
(
'
test_track.case.input_module
'
));
return
;
}
let
param
=
{};
param
.
nodeId
=
this
.
currentKey
;
this
.
moduleOptions
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
currentKey
)
{
param
.
nodePath
=
item
.
path
;
}
});
param
.
ids
=
this
.
selectIds
;
this
.
result
=
this
.
$post
(
'
/test/case/batch/edit
'
,
param
,
()
=>
{
this
.
$success
(
this
.
$t
(
'
commons.save_success
'
));
this
.
close
();
this
.
$emit
(
'
refresh
'
);
});
},
refresh
()
{
this
.
$emit
(
"
refresh
"
);
},
close
()
{
this
.
filterText
=
""
;
this
.
dialogVisible
=
false
;
this
.
selectNode
=
{};
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
},
nodeClick
()
{
this
.
currentKey
=
this
.
$refs
.
tree
.
getCurrentKey
();
}
}
}
</
script
>
<
style
scoped
>
.node-title
{
width
:
0
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
flex
:
1
1
auto
;
padding
:
0
5px
;
overflow
:
hidden
;
}
</
style
>
frontend/src/business/components/track/case/components/ShowMoreBtn.vue
浏览文件 @
b82b5d34
...
...
@@ -22,7 +22,7 @@
},
methods
:
{
click
()
{
console
.
log
(
"
click
"
);
//
console.log("click");
},
clickStop
(
btn
)
{
if
(
btn
.
stop
instanceof
Function
)
{
...
...
frontend/src/business/components/track/case/components/TestCaseList.vue
浏览文件 @
b82b5d34
...
...
@@ -193,7 +193,7 @@
{
name
:
'
批量编辑用例
'
,
stop
:
this
.
handleClickStop
},
{
name
:
'
批量移动用例
'
,
stop
:
this
.
handle
ClickStop
name
:
'
批量移动用例
'
,
stop
:
this
.
handle
Move
},
{
name
:
'
批量删除用例
'
,
stop
:
this
.
handleDeleteBatch
}
...
...
@@ -430,6 +430,9 @@
},
handleClickStop
()
{
this
.
$refs
.
batchEdit
.
open
();
},
handleMove
()
{
this
.
$emit
(
"
batchMove
"
,
Array
.
from
(
this
.
selectRows
).
map
(
row
=>
row
.
id
));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录