|
|
|
@ -102,11 +102,24 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
switchOff(val, row, index) { |
|
|
|
|
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`) |
|
|
|
|
.then(res => { |
|
|
|
|
if (val) { |
|
|
|
|
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {}) |
|
|
|
|
} else if (!row.status) { |
|
|
|
|
this.$confirm('是否发布该公告?', '提示', { |
|
|
|
|
type: 'success' |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => { |
|
|
|
|
this.$post(this.api.amendmentAnnouncement, { |
|
|
|
|
id: row.id, |
|
|
|
|
status: 1 |
|
|
|
|
}).then(res => { |
|
|
|
|
this.getData() |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(() => { |
|
|
|
|
row.isOpen = 1 |
|
|
|
|
}) |
|
|
|
|
.catch(err => { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
add() { |
|
|
|
|
this.$router.push(`/match/noticeDetail?contestId=${this.id}`) |
|
|
|
|