Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
d55354ab
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,体验更适合开发者的 AI 搜索 >>
提交
d55354ab
编写于
10月 23, 2020
作者:
C
Captain.B
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 消息通知的候选人列表隔离
上级
e367075c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
51 addition
and
20 deletion
+51
-20
frontend/src/business/components/settings/organization/TaskNotification.vue
...ess/components/settings/organization/TaskNotification.vue
+51
-20
未找到文件。
frontend/src/business/components/settings/organization/TaskNotification.vue
浏览文件 @
d55354ab
...
...
@@ -27,9 +27,7 @@
border
size=
"mini"
:cell-style=
"rowClass"
:header-cell-style=
"headClass"
>
:header-cell-style=
"headClass"
>
<el-table-column
:label=
"$t('schedule.event')"
min-width=
"20%"
prop=
"events"
>
<template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.event"
...
...
@@ -132,6 +130,7 @@
<el-table-column
:label=
"$t('schedule.event')"
min-width=
"20%"
prop=
"events"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.event"
:placeholder=
"$t('organization.message.select_events')"
@
change=
"handleTestPlanReceivers(scope.row)"
prop=
"events"
:disabled=
"!scope.row.isSet"
>
<el-option
v-for=
"item in otherEventOptions"
...
...
@@ -148,7 +147,7 @@
:placeholder=
"$t('commons.please_select')"
@
click.native=
"testPlanUserList()"
style=
"width: 100%;"
:disabled=
"!row.isSet"
>
<el-option
v-for=
"item in testPlanReceiverOptions"
v-for=
"item in
row.
testPlanReceiverOptions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
...
...
@@ -227,6 +226,7 @@
<el-table-column
:label=
"$t('schedule.event')"
min-width=
"20%"
prop=
"events"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.event"
:placeholder=
"$t('organization.message.select_events')"
@
change=
"handleReviewReceivers(scope.row)"
prop=
"event"
:disabled=
"!scope.row.isSet"
>
<el-option
v-for=
"item in reviewTaskEventOptions"
...
...
@@ -243,7 +243,7 @@
:placeholder=
"$t('commons.please_select')"
@
click.native=
"reviewUerList()"
style=
"width: 100%;"
:disabled=
"!row.isSet"
>
<el-option
v-for=
"item in reviewReceiverOptions"
v-for=
"item in r
ow.r
eviewReceiverOptions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
...
...
@@ -397,7 +397,7 @@
</template>
<
script
>
import
{
getCurrentUser
,
listenGoBack
,
removeGoBackListener
}
from
"
../../../../common/js/utils
"
;
import
{
getCurrentUser
}
from
"
../../../../common/js/utils
"
;
export
default
{
name
:
"
TaskNotification
"
,
...
...
@@ -481,9 +481,9 @@ export default {
}
},
activated
(){
activated
()
{
this
.
initForm
()
this
.
userList
()
this
.
userList
()
this
.
testPlanUserList
()
this
.
defectUserList
()
this
.
reviewUerList
()
...
...
@@ -511,15 +511,12 @@ export default {
reviewUerList
()
{
this
.
result
=
this
.
$get
(
'
user/list/orgId
'
,
response
=>
{
this
.
reviewReceiverOptions
=
response
.
data
this
.
reviewReceiverOptions
.
unshift
({
id
:
'
EXECUTOR
'
,
name
:
this
.
$t
(
'
test_track.review.reviewer
'
)},
{
id
:
'
FOUNDER
'
,
name
:
this
.
$t
(
'
test_track.review.review_creator
'
)},
{
id
:
'
MAINTAINER
'
,
name
:
this
.
$t
(
'
test_track.case.maintainer
'
)})
})
},
defectUserList
()
{
this
.
result
=
this
.
$get
(
'
user/list/orgId
'
,
response
=>
{
this
.
defectReceiverOptions
=
response
.
data
/* this.defectReceiverOptions.
unshift
({id: 'FOUNDER', name: this.$t('api_test.creator')}, {
/* this.defectReceiverOptions.
push
({id: 'FOUNDER', name: this.$t('api_test.creator')}, {
id: 'EXECUTOR',
name: this.$t('test_track.plan_view.executor')
})*/
...
...
@@ -528,10 +525,6 @@ export default {
testPlanUserList
()
{
this
.
result
=
this
.
$get
(
'
user/list/orgId
'
,
response
=>
{
this
.
testPlanReceiverOptions
=
response
.
data
this
.
testPlanReceiverOptions
.
unshift
({
id
:
'
FOUNDER
'
,
name
:
this
.
$t
(
'
api_test.creator
'
)},
{
id
:
'
EXECUTOR
'
,
name
:
this
.
$t
(
'
test_track.plan_view.executor
'
)
})
})
},
handleAddTaskModel
(
type
)
{
...
...
@@ -544,19 +537,19 @@ export default {
Task
.
identification
=
""
;
if
(
type
===
'
jenkinsTask
'
)
{
Task
.
taskType
=
'
JENKINS_TASK
'
this
.
form
.
jenkinsTask
.
unshift
(
Task
)
this
.
form
.
jenkinsTask
.
push
(
Task
)
}
if
(
type
===
'
testPlanTask
'
)
{
Task
.
taskType
=
'
TEST_PLAN_TASK
'
this
.
form
.
testCasePlanTask
.
unshift
(
Task
)
this
.
form
.
testCasePlanTask
.
push
(
Task
)
}
if
(
type
===
'
reviewTask
'
)
{
Task
.
taskType
=
'
REVIEW_TASK
'
this
.
form
.
reviewTask
.
unshift
(
Task
)
this
.
form
.
reviewTask
.
push
(
Task
)
}
if
(
type
===
'
defectTask
'
)
{
Task
.
taskType
=
'
DEFECT_TASK
'
this
.
form
.
defectTask
.
unshift
(
Task
)
this
.
form
.
defectTask
.
push
(
Task
)
}
},
handleAddTask
(
index
,
data
)
{
...
...
@@ -587,7 +580,45 @@ export default {
headClass
()
{
return
"
text-align:center;background:'#ededed'
"
},
handleTestPlanReceivers
(
row
)
{
console
.
log
(
row
);
let
testPlanReceivers
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
testPlanReceiverOptions
));
switch
(
row
.
event
)
{
case
"
CREATE
"
:
testPlanReceivers
.
unshift
({
id
:
'
EXECUTOR
'
,
name
:
this
.
$t
(
'
test_track.plan_view.executor
'
)})
break
;
case
"
UPDATE
"
:
case
"
DELETE
"
:
case
"
COMMENT
"
:
testPlanReceivers
.
unshift
({
id
:
'
FOUNDER
'
,
name
:
this
.
$t
(
'
api_test.creator
'
)});
break
;
default
:
break
;
}
row
.
testPlanReceiverOptions
=
testPlanReceivers
;
},
handleReviewReceivers
(
row
)
{
console
.
log
(
row
);
let
reviewReceiverOptions
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
reviewReceiverOptions
));
switch
(
row
.
event
)
{
case
"
CREATE
"
:
reviewReceiverOptions
.
unshift
({
id
:
'
EXECUTOR
'
,
name
:
this
.
$t
(
'
test_track.review.reviewer
'
)})
break
;
case
"
UPDATE
"
:
reviewReceiverOptions
.
unshift
({
id
:
'
FOUNDER
'
,
name
:
this
.
$t
(
'
test_track.review.review_creator
'
)})
break
;
case
"
DELETE
"
:
reviewReceiverOptions
.
unshift
({
id
:
'
FOUNDER
'
,
name
:
this
.
$t
(
'
test_track.review.review_creator
'
)})
break
;
case
"
COMMENT
"
:
reviewReceiverOptions
.
unshift
({
id
:
'
MAINTAINER
'
,
name
:
this
.
$t
(
'
test_track.case.maintainer
'
)})
break
;
default
:
break
;
}
row
.
reviewReceiverOptions
=
reviewReceiverOptions
;
}
}
}
</
script
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录