fix(接口测试): 接口自动化定时任务添加通知时接收人显示不一致问题

--bug=1018070 --user=李玉号
【接口测试】接口自动化定时任务-任务通知设置执行成功和执行失败,接受人相同,会分别显示用户名称和id
https://www.tapd.cn/55049933/s/1263377
This commit is contained in:
shiziyuan9527 2022-10-17 10:51:43 +08:00 committed by lyh
parent 7d45a1ad06
commit 29a15dfd6f
3 changed files with 39 additions and 21 deletions

View File

@ -10,12 +10,14 @@
</el-row>
<el-row>
<el-col :span="24">
<notification-table :table-data="scheduleTask"
:event-options="scheduleEventOptions"
:receive-type-options="receiveTypeOptions"
@handleReceivers="handleReceivers"
@handleTemplate="handleTemplate"
@refresh="initForm"/>
<notification-table
v-loading="loading"
:table-data="scheduleTask"
:event-options="scheduleEventOptions"
:receive-type-options="receiveTypeOptions"
@handleReceivers="handleReceivers"
@handleTemplate="handleTemplate"
@refresh="initForm"/>
</el-col>
</el-row>
<mx-notice-template v-xpack ref="noticeTemplate" :variables="variables"/>
@ -47,6 +49,7 @@ export default {
},
data() {
return {
loading: false,
modes: ['text', 'html'],
robotTitle: "${operator}执行接口测试成功: ${name}, 报告: ${reportUrl}",
scheduleTask: [{
@ -210,8 +213,11 @@ export default {
},
methods: {
initForm() {
this.result = getMessageById(this.testId).then(response => {
this.loading = getMessageById(this.testId).then(response => {
this.scheduleTask = response.data;
this.scheduleTask.forEach(task => {
this.handleReceivers(task);
});
});
},
handleAddTaskModel() {

View File

@ -10,12 +10,14 @@
</el-row>
<el-row>
<el-col :span="24">
<notification-table :table-data="scheduleTask"
:event-options="scheduleEventOptions"
:receive-type-options="receiveTypeOptions"
@handleReceivers="handleReceivers"
@handleTemplate="handleTemplate"
@refresh="initForm"/>
<notification-table
v-loading="loading"
:table-data="scheduleTask"
:event-options="scheduleEventOptions"
:receive-type-options="receiveTypeOptions"
@handleReceivers="handleReceivers"
@handleTemplate="handleTemplate"
@refresh="initForm"/>
</el-col>
</el-row>
<mx-notice-template v-xpack ref="noticeTemplate" :variables="variables"/>
@ -48,6 +50,7 @@ export default {
},
data() {
return {
loading: false,
modes: ['text', 'html'],
robotTitle: "${operator}执行接口测试成功: ${name}, 报告: ${reportUrl}",
scheduleTask: [{
@ -211,8 +214,11 @@ export default {
},
methods: {
initForm() {
this.result = getMessageById(this.testId).then(response => {
this.loading = getMessageById(this.testId).then(response => {
this.scheduleTask = response.data;
this.scheduleTask.forEach(task => {
this.handleReceivers(task);
});
});
},
handleAddTaskModel() {

View File

@ -10,12 +10,14 @@
</el-row>
<el-row>
<el-col :span="24">
<notification-table :table-data="scheduleTask"
:event-options="scheduleEventOptions"
:receive-type-options="receiveTypeOptions"
@handleReceivers="handleReceivers"
@handleTemplate="handleTemplate"
@refresh="initForm"/>
<notification-table
v-loading="loading"
:table-data="scheduleTask"
:event-options="scheduleEventOptions"
:receive-type-options="receiveTypeOptions"
@handleReceivers="handleReceivers"
@handleTemplate="handleTemplate"
@refresh="initForm"/>
</el-col>
</el-row>
<mx-notice-template v-xpack ref="noticeTemplate"/>
@ -47,6 +49,7 @@ export default {
},
data() {
return {
loading: false,
modes: ['text', 'html'],
robotTitle:
"swagger:${url}导入成功",
@ -80,8 +83,11 @@ export default {
},
methods: {
initForm() {
this.result = getMessageById(this.apiTestId).then(response => {
this.loading = getMessageById(this.apiTestId).then(response => {
this.scheduleTask = response.data;
this.scheduleTask.forEach(task => {
this.handleReceivers(task);
});
});
},
handleAddTaskModel() {