fix: 修改任务通知-编辑,无法修改webhook地址

This commit is contained in:
wenyann 2020-11-20 14:57:19 +08:00
parent 6629af30e5
commit fc4b266511
5 changed files with 42 additions and 6 deletions

View File

@ -145,10 +145,17 @@ export default {
data.isReadOnly = true; data.isReadOnly = true;
if (data.type === 'EMAIL') { if (data.type === 'EMAIL') {
data.isReadOnly = !data.isReadOnly data.isReadOnly = !data.isReadOnly
data.webhook = ""
} }
}, },
handleEditTask(index,data){ handleEditTask(index,data) {
data.isSet = true data.isSet = true
if (data.type === 'EMAIL') {
data.isReadOnly = false
data.webhook = ""
} else {
data.isReadOnly = true
}
}, },
handleAddTaskModel(type) { handleAddTaskModel(type) {
let Task = {}; let Task = {};

View File

@ -147,6 +147,7 @@ export default {
data.isReadOnly = true; data.isReadOnly = true;
if (data.type === 'EMAIL') { if (data.type === 'EMAIL') {
data.isReadOnly = !data.isReadOnly data.isReadOnly = !data.isReadOnly
data.webhook = ""
} }
}, },
handleAddTaskModel(type) { handleAddTaskModel(type) {
@ -190,8 +191,15 @@ export default {
this.$warning(this.$t('organization.message.message')); this.$warning(this.$t('organization.message.message'));
} }
}, },
handleEditTask(index,data){ handleEditTask(index,data) {
data.isSet = true data.isSet = true
if (data.type === 'EMAIL') {
data.isReadOnly = false
data.webhook = ""
} else {
data.isReadOnly = true
}
}, },
addTask(data) { addTask(data) {
let list = [] let list = []

View File

@ -148,6 +148,7 @@ export default {
data.isReadOnly = true; data.isReadOnly = true;
if (data.type === 'EMAIL') { if (data.type === 'EMAIL') {
data.isReadOnly = !data.isReadOnly data.isReadOnly = !data.isReadOnly
data.webhook = ""
} }
}, },
handleAddTaskModel(type) { handleAddTaskModel(type) {
@ -164,9 +165,15 @@ export default {
this.form.scheduleTask.push(Task) this.form.scheduleTask.push(Task)
} }
}, },
handleEditTask(index,data){ handleEditTask(index,data) {
data.isSet = true data.isSet = true
data.testId=this.testId data.testId = this.testId
if (data.type === 'EMAIL') {
data.isReadOnly = false
data.webhook = ""
} else {
data.isReadOnly = true
}
}, },
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

@ -151,10 +151,17 @@ export default {
data.isReadOnly = true; data.isReadOnly = true;
if (data.type === 'EMAIL') { if (data.type === 'EMAIL') {
data.isReadOnly = !data.isReadOnly data.isReadOnly = !data.isReadOnly
data.webhook = ""
} }
}, },
handleEditTask(index,data){ handleEditTask(index,data) {
data.isSet = true data.isSet = true
if (data.type === 'EMAIL') {
data.isReadOnly = false
data.webhook = ""
} else {
data.isReadOnly = true
}
}, },
handleAddTaskModel(type) { handleAddTaskModel(type) {
let Task = {}; let Task = {};

View File

@ -152,10 +152,17 @@ export default {
data.isReadOnly = true; data.isReadOnly = true;
if (data.type === 'EMAIL') { if (data.type === 'EMAIL') {
data.isReadOnly = !data.isReadOnly data.isReadOnly = !data.isReadOnly
data.webhook = ""
} }
}, },
handleEditTask(index,data){ handleEditTask(index,data) {
data.isSet = true data.isSet = true
if (data.type === 'EMAIL') {
data.isReadOnly = false
data.webhook = ""
} else {
data.isReadOnly = true
}
}, },
handleAddTaskModel(type) { handleAddTaskModel(type) {
let Task = {}; let Task = {};