| | |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="taskDelete1(scope.row)"> |
| | | 初始化 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="taskDelete(scope.row)"> |
| | | 删除 |
| | | </el-button> |
| | |
| | | }, |
| | | taskDelete(row) { |
| | | let that = this; |
| | | that.$confirm('确认要删除该设备吗?', '提示', { |
| | | that.$confirm('确认要删除该任务吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | taskDelete1(row) { |
| | | let that = this; |
| | | that.$confirm('确认要初始化该任务吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | $.ajax({ |
| | | url: baseUrl + "/rgv/disable/task/delete1", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | data: { |
| | | wrkNo: row.wrkNo |
| | | }, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | that.$message.success('初始化成功'); |
| | | // 删除当前行 |
| | | // that.tableDataRight.splice(that.tableDataRight.indexOf(row), 1); |
| | | } else { |
| | | that.$message.error('初始化失败'); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | toggleStatus(index, row) { |
| | | let that = this; |
| | | const currentStatus = row.status; |