代码更新
This commit is contained in:
@@ -264,22 +264,29 @@ export default {
|
||||
return this.dict.label.DEVICE_ATTRIBUTE_SCODE[row.device_type]
|
||||
},
|
||||
scrap() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
// if (data.status !== '10') {
|
||||
// return this.crud.notify('设备未启用或不存在', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// }
|
||||
if (data.device_is_delete === '1') {
|
||||
return this.crud.notify('设备不存在或被删除', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
if (data.status === '10' || data.status === '11') {
|
||||
crudDevicescrap.scrap(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
} else {
|
||||
return this.crud.notify('设备状态不正确,需启动设备或完成维修单及保养单', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const msg = '是否继续'
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
// if (data.status !== '10') {
|
||||
// return this.crud.notify('设备未启用或不存在', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// }
|
||||
if (data.device_is_delete === '1') {
|
||||
return this.crud.notify('设备不存在或被删除', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
if (data.status === '10' || data.status === '11') {
|
||||
crudDevicescrap.scrap(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
} else {
|
||||
return this.crud.notify('设备状态不正确,需启动设备或完成维修单及保养单', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
})
|
||||
},
|
||||
downloadWord() {
|
||||
const msg = '是否继续'
|
||||
|
||||
Reference in New Issue
Block a user