| | |
| | | let res |
| | | try { |
| | | if (this.form.id) { |
| | | res = await this.$HTTP.put('/api/blade-cps/shift', data).catch(() => { |
| | | res = await this.$HTTP.put('/api/smis/shift', data).catch(() => { |
| | | throw new Error() |
| | | }) |
| | | } else { |
| | | res = await this.$HTTP.post('/api/blade-cps/shift', data).catch(() => { |
| | | res = await this.$HTTP.post('/api/smis/shift', data).catch(() => { |
| | | throw new Error() |
| | | }) |
| | | } |
| | |
| | | this.visible = false; |
| | | this.$message.success("操作成功") |
| | | } else { |
| | | this.$alert(res.message, "提示", { type: 'error' }) |
| | | this.$alert(res.msg, "提示", { type: 'error' }) |
| | | } |
| | | } else { |
| | | return false; |