fix: 修复消息通知配置 --bug=1006101 --user=刘瑞斌 【消息通知】建议新建... https://www.tapd.cn/55049933/s/1039841

--bug=1006190 --user=刘瑞斌 【系统设置-消息设置】... https://www.tapd.cn/55049933/s/1039862
This commit is contained in:
Captain.B 2021-08-25 17:33:57 +08:00 committed by 刘瑞斌
parent 13fd888f50
commit 94a69f003e
16 changed files with 103 additions and 103 deletions

View File

@ -250,7 +250,7 @@ export default {
Task.identification = ''; Task.identification = '';
Task.taskType = 'SCHEDULE_TASK'; Task.taskType = 'SCHEDULE_TASK';
Task.testId = this.testId; Task.testId = this.testId;
this.scheduleTask.push(Task); this.scheduleTask.unshift(Task);
}, },
handleEditTask(index, data) { handleEditTask(index, data) {
data.isSet = true; data.isSet = true;

View File

@ -220,7 +220,7 @@ export default {
Task.identification = ''; Task.identification = '';
Task.taskType = 'SWAGGER_URL'; Task.taskType = 'SWAGGER_URL';
Task.testId = this.testId; Task.testId = this.testId;
this.scheduleTask.push(Task); this.scheduleTask.unshift(Task);
}, },
handleEditTask(index, data) { handleEditTask(index, data) {
data.isSet = true; data.isSet = true;

View File

@ -241,7 +241,7 @@ export default {
Task.identification = ''; Task.identification = '';
Task.taskType = 'SCHEDULE_TASK'; Task.taskType = 'SCHEDULE_TASK';
Task.testId = this.testId; Task.testId = this.testId;
this.scheduleTask.push(Task); this.scheduleTask.unshift(Task);
}, },
handleEditTask(index, data) { handleEditTask(index, data) {
data.isSet = true; data.isSet = true;

View File

@ -237,7 +237,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -257,8 +257,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -240,7 +240,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -260,8 +260,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -237,7 +237,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -257,8 +257,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -233,7 +233,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -253,8 +253,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -248,7 +248,7 @@ export default {
Task.isSet = true; Task.isSet = true;
Task.identification = ''; Task.identification = '';
Task.taskType = TASK_TYPE; Task.taskType = TASK_TYPE;
this.jenkinsTask.push(Task); this.jenkinsTask.unshift(Task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
if (data.event && data.userIds.length > 0 && data.type) { if (data.event && data.userIds.length > 0 && data.type) {

View File

@ -233,7 +233,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -253,8 +253,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -8,21 +8,21 @@
{{ $t('organization.message.create_new_notification') }} {{ $t('organization.message.create_new_notification') }}
</el-button> </el-button>
<el-popover <el-popover
placement="right-end" placement="right-end"
title="示例" title="示例"
width="600" width="600"
trigger="click"> trigger="click">
<ms-code-edit :read-only="true" height="400px" :data.sync="title" :modes="modes" :mode="'html'"/> <ms-code-edit :read-only="true" height="400px" :data.sync="title" :modes="modes" :mode="'html'"/>
<el-button icon="el-icon-warning" plain size="mini" slot="reference"> <el-button icon="el-icon-warning" plain size="mini" slot="reference">
{{ $t('organization.message.mail_template_example') }} {{ $t('organization.message.mail_template_example') }}
</el-button> </el-button>
</el-popover> </el-popover>
<el-popover <el-popover
placement="right-end" placement="right-end"
title="示例" title="示例"
width="400" width="400"
trigger="click" trigger="click"
:content="robotTitle"> :content="robotTitle">
<ms-code-edit :read-only="true" height="200px" :data.sync="robotTitle" :modes="modes" :mode="'text'"/> <ms-code-edit :read-only="true" height="200px" :data.sync="robotTitle" :modes="modes" :mode="'text'"/>
<el-button icon="el-icon-warning" plain size="mini" slot="reference"> <el-button icon="el-icon-warning" plain size="mini" slot="reference">
{{ $t('organization.message.robot_template') }} {{ $t('organization.message.robot_template') }}
@ -33,11 +33,11 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-table <el-table
:data="defectTask" :data="defectTask"
class="tb-edit" class="tb-edit"
border border
:cell-style="rowClass" :cell-style="rowClass"
:header-cell-style="headClass" :header-cell-style="headClass"
> >
<el-table-column :label="$t('schedule.event')" min-width="15%" prop="events"> <el-table-column :label="$t('schedule.event')" min-width="15%" prop="events">
<template slot-scope="scope"> <template slot-scope="scope">
@ -45,10 +45,10 @@
@change="handleReceivers(scope.row)" @change="handleReceivers(scope.row)"
prop="event" :disabled="!scope.row.isSet"> prop="event" :disabled="!scope.row.isSet">
<el-option <el-option
v-for="item in eventOptions" v-for="item in eventOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
@ -59,10 +59,10 @@
:placeholder="$t('commons.please_select')" :placeholder="$t('commons.please_select')"
style="width: 100%;" :disabled="!row.isSet"> style="width: 100%;" :disabled="!row.isSet">
<el-option <el-option
v-for="item in row.receiverOptions" v-for="item in row.receiverOptions"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
@ -73,10 +73,10 @@
size="mini" size="mini"
:disabled="!scope.row.isSet" @change="handleEdit(scope.$index, scope.row)"> :disabled="!scope.row.isSet" @change="handleEdit(scope.$index, scope.row)">
<el-option <el-option
v-for="item in receiveTypeOptions" v-for="item in receiveTypeOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
@ -90,48 +90,48 @@
<el-table-column :label="$t('commons.operating')" min-width="25%" prop="result"> <el-table-column :label="$t('commons.operating')" min-width="25%" prop="result">
<template v-slot:default="scope"> <template v-slot:default="scope">
<ms-tip-button <ms-tip-button
circle circle
type="success" type="success"
size="mini" size="mini"
v-if="scope.row.isSet" v-if="scope.row.isSet"
v-xpack v-xpack
@click="handleTemplate(scope.$index,scope.row)" @click="handleTemplate(scope.$index,scope.row)"
:tip="$t('organization.message.template')" :tip="$t('organization.message.template')"
icon="el-icon-tickets"/> icon="el-icon-tickets"/>
<ms-tip-button <ms-tip-button
circle circle
type="primary" type="primary"
size="mini" size="mini"
v-show="scope.row.isSet" v-show="scope.row.isSet"
@click="handleAddTask(scope.$index,scope.row)" @click="handleAddTask(scope.$index,scope.row)"
:tip="$t('commons.add')" :tip="$t('commons.add')"
icon="el-icon-check"/> icon="el-icon-check"/>
<ms-tip-button <ms-tip-button
circle circle
size="mini" size="mini"
v-show="scope.row.isSet" v-show="scope.row.isSet"
@click="removeRowTask(scope.$index,defectTask)" @click="removeRowTask(scope.$index,defectTask)"
:tip="$t('commons.cancel')" :tip="$t('commons.cancel')"
icon="el-icon-refresh-left"/> icon="el-icon-refresh-left"/>
<ms-tip-button <ms-tip-button
el-button el-button
circle circle
type="primary" type="primary"
size="mini" size="mini"
icon="el-icon-edit" icon="el-icon-edit"
v-show="!scope.row.isSet" v-show="!scope.row.isSet"
:tip="$t('commons.edit')" :tip="$t('commons.edit')"
@click="handleEditTask(scope.$index,scope.row)" @click="handleEditTask(scope.$index,scope.row)"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"/> v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"/>
<ms-tip-button <ms-tip-button
circle circle
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
v-show="!scope.row.isSet" v-show="!scope.row.isSet"
@click="deleteRowTask(scope.$index,scope.row)" @click="deleteRowTask(scope.$index,scope.row)"
:tip="$t('commons.delete')" :tip="$t('commons.delete')"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"/> v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -169,17 +169,17 @@ export default {
return { return {
modes: ['text', 'html'], modes: ['text', 'html'],
title: "<!DOCTYPE html>\n" + title: "<!DOCTYPE html>\n" +
"<html lang=\"en\">\n" + "<html lang=\"en\">\n" +
"<head>\n" + "<head>\n" +
" <meta charset=\"UTF-8\">\n" + " <meta charset=\"UTF-8\">\n" +
" <title>MeterSphere</title>\n" + " <title>MeterSphere</title>\n" +
"</head>\n" + "</head>\n" +
"<body>\n" + "<body>\n" +
"<div>\n" + "<div>\n" +
" <p>${creator}创建了测试用例</p>\n" + " <p>${creator}创建了测试用例</p>\n" +
"</div>\n" + "</div>\n" +
"</body>\n" + "</body>\n" +
"</html>", "</html>",
robotTitle: "【任务通知】:${creator}创建了测试用例", robotTitle: "【任务通知】:${creator}创建了测试用例",
defectTask: [{ defectTask: [{
taskType: "defectTask", taskType: "defectTask",
@ -236,7 +236,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -256,8 +256,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -234,7 +234,7 @@ export default {
Task.isSet = true; Task.isSet = true;
Task.identification = ''; Task.identification = '';
Task.taskType = TASK_TYPE; Task.taskType = TASK_TYPE;
this.defectTask.push(Task); this.defectTask.unshift(Task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -254,8 +254,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -236,7 +236,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -256,8 +256,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -244,7 +244,7 @@ export default {
Task.isSet = true; Task.isSet = true;
Task.identification = ''; Task.identification = '';
Task.taskType = TASK_TYPE; Task.taskType = TASK_TYPE;
this.testCasePlanTask.push(Task); this.testCasePlanTask.unshift(Task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -264,8 +264,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -242,7 +242,7 @@ export default {
Task.isSet = true; Task.isSet = true;
Task.identification = ''; Task.identification = '';
Task.taskType = TASK_TYPE; Task.taskType = TASK_TYPE;
this.reviewTask.push(Task); this.reviewTask.unshift(Task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -262,8 +262,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -237,7 +237,7 @@ export default {
task.isSet = true; task.isSet = true;
task.identification = ''; task.identification = '';
task.taskType = TASK_TYPE; task.taskType = TASK_TYPE;
this.defectTask.push(task); this.defectTask.unshift(task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -257,8 +257,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });

View File

@ -233,7 +233,7 @@ export default {
Task.isSet = true; Task.isSet = true;
Task.identification = ''; Task.identification = '';
Task.taskType = TASK_TYPE; Task.taskType = TASK_TYPE;
this.defectTask.push(Task); this.defectTask.unshift(Task);
}, },
handleAddTask(index, data) { handleAddTask(index, data) {
@ -253,8 +253,8 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
data.isSet = false;
this.result = this.$post("/notice/save/message/task", data, () => { this.result = this.$post("/notice/save/message/task", data, () => {
data.isSet = false;
this.initForm(); this.initForm();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });