| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/disable/task/delete1") |
| | | // @ManagerAuth(memo = "初始化任务") |
| | | public R taskDisabledelete1(@RequestParam Long wrkNo){ |
| | | Date now = new Date(); |
| | | log.info("/disable/task/delete1===》初始化任务!!!wrkNo:{},data:{}",wrkNo,new Date()); |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkNo)); |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | return R.error().add("未找到此任务,异常!!!"); |
| | | } |
| | | wrkMast.setWrkSts(1L); |
| | | wrkMast.setRgvNo(0); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setLogErrTime(now); |
| | | if (wrkMastService.updateById(wrkMast)){ |
| | | return R.ok(); |
| | | } |
| | | return R.error("初始化失败!!!"); |
| | | } |
| | | |
| | | } |
| | |
| | | <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; |