This commit is contained in:
2022-12-11 17:22:31 +08:00
parent 4f613bfb28
commit 3642362bf1
4 changed files with 46 additions and 4 deletions

View File

@@ -40,6 +40,14 @@ export function cancel(instruction_id) {
})
}
export function forceCancel(instruction_id) {
return request({
url: 'api/instruction/forceCancel/' + instruction_id,
method: 'post',
data: instruction_id
})
}
export function queryUnFinish() {
return request({
url: 'api/instruction/unfinish/',
@@ -62,4 +70,4 @@ export function reload() {
})
}
export default { add, edit, del, finish, cancel, queryUnFinish, queryByTaskId, reload }
export default { add, edit, del, finish, forceCancel, cancel, queryUnFinish, queryByTaskId, reload }

View File

@@ -165,6 +165,7 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">完成</el-dropdown-item>
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">取消</el-dropdown-item>
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">强制取消</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
@@ -295,6 +296,14 @@ export default {
console.log(err.response.data.message)
})
},
forceCancel(index, row) {
crudInstruction.forceCancel(row.instruction_id).then(res => {
this.crud.toQuery()
this.crud.notify('强制取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(err => {
console.log(err.response.data.message)
})
},
reload() {
crudInstruction.reload().then(res => {
this.crud.toQuery()
@@ -318,6 +327,9 @@ export default {
case 'b':// 取消
this.cancel(command.index, command.row)
break
case 'c':// 取消
this.forceCancel(command.index, command.row)
break
}
}