更新
This commit is contained in:
@@ -159,6 +159,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>
|
||||
@@ -290,6 +291,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()
|
||||
@@ -313,6 +322,9 @@ export default {
|
||||
case 'b':// 取消
|
||||
this.cancel(command.index, command.row)
|
||||
break
|
||||
case 'c':// 强制取消
|
||||
this.forceCancel(command.index, command.row)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -315,6 +315,13 @@ export default {
|
||||
this.form.next_device_code = Array.of(data.form.next_device_code.split('').join(''))
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit](data) {
|
||||
if (this.crud.status.edit === 1) {
|
||||
this.form.device_code = data.form.device_code.join('')
|
||||
this.form.next_device_code = data.form.next_device_code.join('')
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 改变状态
|
||||
changeEnabled(data) {
|
||||
var msg = '停用'
|
||||
|
||||
Reference in New Issue
Block a user