|
|
|
@ -103,11 +103,24 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
switchOff(val, row, index) { |
|
|
|
|
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`) |
|
|
|
|
.then(res => { |
|
|
|
|
}) |
|
|
|
|
.catch(err => { |
|
|
|
|
}); |
|
|
|
|
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 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
add() { |
|
|
|
|
this.$router.push(`/noticeDetail?contestId=${this.id}`) |
|
|
|
|