Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
23c3a3fc
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
大约 1 年 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
23c3a3fc
编写于
6月 14, 2022
作者:
Z
zhaoke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* Add toolbar icon.
上级
2e454115
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
45 addition
and
18 deletion
+45
-18
ui/src/locales/en-US.ts
ui/src/locales/en-US.ts
+2
-0
ui/src/locales/zh-CN.ts
ui/src/locales/zh-CN.ts
+2
-0
ui/src/views/script/WorkDir.vue
ui/src/views/script/WorkDir.vue
+35
-17
ui/src/views/script/service.ts
ui/src/views/script/service.ts
+6
-1
未找到文件。
ui/src/locales/en-US.ts
浏览文件 @
23c3a3fc
...
...
@@ -83,6 +83,8 @@ export default {
'
edit_workspace
'
:
'
Edit WorkDir
'
,
'
create_file
'
:
'
Create file
'
,
'
del_file
'
:
'
Delete File
'
,
'
execCase
'
:
'
Execute By Case
'
,
'
execUnit
'
:
'
Execute UnitTest
'
,
'
duration
'
:
'
Duration
'
,
'
duration_sec
'
:
'
Duration(sec)
'
,
...
...
ui/src/locales/zh-CN.ts
浏览文件 @
23c3a3fc
...
...
@@ -91,6 +91,8 @@ export default {
'
edit_workspace
'
:
'
编辑工作目录
'
,
'
create_file
'
:
'
新建脚本
'
,
'
del_file
'
:
'
删除脚本
'
,
'
execCase
'
:
'
执行用例
'
,
'
execUnit
'
:
'
执行单元测试
'
,
'
duration
'
:
'
耗时
'
,
'
duration_sec
'
:
'
耗时(秒)
'
,
...
...
ui/src/views/script/WorkDir.vue
浏览文件 @
23c3a3fc
...
...
@@ -46,6 +46,7 @@ import throttle from "lodash.debounce";
import
Modal
from
"
@/utils/modal
"
import
FormNode
from
"
./FormNode.vue
"
;
import
{
key
}
from
"
localforage
"
;
import
settings
from
"
@/config/settings
"
;
const
{
t
}
=
useI18n
();
...
...
@@ -90,29 +91,46 @@ const onToolbarClicked = (e) => {
{
id
:
node
.
workspaceId
,
type
:
node
.
workspaceType
})
currentNode
.
value
=
node
;
if
(
e
.
event
.
key
==
'
runTest
'
)
{
runTest
(
currentNode
);
}
else
if
(
e
.
event
.
key
==
'
createFile
'
||
e
.
event
.
key
==
'
createWorkspace
'
||
e
.
event
.
key
==
'
createDir
'
)
{
showModal
.
value
=
true
;
toolbarAction
.
value
=
e
.
event
.
key
;
}
else
if
(
e
.
event
.
key
===
'
deleteWorkspace
'
)
{
Modal
.
confirm
({
title
:
t
(
'
delete
'
),
content
:
t
(
'
confirm_to_delete_workspace
'
,
{
p
:
node
.
title
}),
showOkBtn
:
true
},
{
"
onOk
"
:
()
=>
{
store
.
dispatch
(
'
Workspace/removeWorkspace
'
,
node
.
path
)
.
then
((
response
)
=>
{
switch
(
e
.
event
.
key
)
{
case
'
runTest
'
:
runTest
(
currentNode
);
break
;
case
'
createFile
'
:
case
'
createWorkspace
'
:
case
'
createDir
'
:
showModal
.
value
=
true
;
toolbarAction
.
value
=
e
.
event
.
key
;
break
;
case
'
deleteWorkspace
'
:
Modal
.
confirm
({
title
:
t
(
'
delete
'
),
content
:
t
(
'
confirm_to_delete_workspace
'
,
{
p
:
node
.
title
}),
showOkBtn
:
true
},
{
"
onOk
"
:
()
=>
{
store
.
dispatch
(
'
Workspace/removeWorkspace
'
,
node
.
path
)
.
then
((
response
)
=>
{
if
(
response
)
{
notification
.
success
({
message
:
t
(
'
delete_success
'
)
});
loadScripts
()
}
})
}
}
}
)
);
break
;
case
'
runScript
'
:
console
.
log
(
'
run script
'
,
currentNode
.
value
);
bus
.
emit
(
settings
.
eventExec
,
{
execType
:
currentNode
.
value
.
workspaceType
===
'
ztf
'
?
'
ztf
'
:
'
unit
'
,
scripts
:
currentNode
.
value
.
isLeaf
?
[
currentNode
.
value
]
:
currentNode
.
value
.
children
});
break
;
case
'
checkinCase
'
:
console
.
log
(
'
checkin case
'
,
currentNode
.
value
);
break
;
case
'
checkoutCase
'
:
console
.
log
(
'
checkout case
'
,
currentNode
.
value
);
break
;
}
}
...
...
ui/src/views/script/service.ts
浏览文件 @
23c3a3fc
...
...
@@ -235,10 +235,15 @@ export function scriptTreeAddAttr(treeData) {
item
.
checkable
=
item
.
workspaceType
==
'
ztf
'
?
true
:
false
;
if
(
item
.
isLeaf
)
{
item
.
toolbarItems
=
[
// { hint: 'create_file', icon: 'file-add', key: 'createFile'},
{
hint
:
'
execCase
'
,
icon
:
'
play
'
,
key
:
'
runScript
'
},
{
hint
:
'
checkin_case
'
,
icon
:
'
arrow-up
'
,
key
:
'
checkinCase
'
},
{
hint
:
'
checkout_case
'
,
icon
:
'
arrow-down
'
,
key
:
'
checkoutCase
'
},
];
}
else
{
item
.
toolbarItems
=
[
{
hint
:
item
.
checkable
?
'
exec_all
'
:
'
execUnit
'
,
icon
:
'
play
'
,
key
:
'
runScript
'
},
{
hint
:
'
checkin_case
'
,
icon
:
'
arrow-up
'
,
key
:
'
checkinCase
'
},
{
hint
:
'
checkout_case
'
,
icon
:
'
arrow-down
'
,
key
:
'
checkoutCase
'
},
{
hint
:
'
create_workspace
'
,
icon
:
'
folder-add
'
,
key
:
'
createDir
'
},
{
hint
:
'
create_file
'
,
icon
:
'
file-add
'
,
key
:
'
createFile
'
},
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录