需求删除逻辑修改
This commit is contained in:
@@ -21,6 +21,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求controller
|
||||||
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/test/project")
|
@RequestMapping("/test/project")
|
||||||
@@ -66,7 +69,9 @@ public class TestProjectController extends BaseController {
|
|||||||
@Log(title = "需求", businessType = BusinessType.DELETE)
|
@Log(title = "需求", businessType = BusinessType.DELETE)
|
||||||
@PostMapping("/delProject")
|
@PostMapping("/delProject")
|
||||||
public AjaxResult delProject(@RequestBody IDQO qo) {
|
public AjaxResult delProject(@RequestBody IDQO qo) {
|
||||||
return toAjax(testProjectService.deleteTestProjectById(qo.getId()));
|
TestProject testProject = testProjectService.selectTestProjectById(qo.getId());
|
||||||
|
testProject.setDelFlag("1");
|
||||||
|
return toAjax(testProjectService.updateTestProject(testProject));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ import jakarta.annotation.Resource;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求实现类
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class TestProjectServiceImpl implements ITestProjectService {
|
public class TestProjectServiceImpl implements ITestProjectService {
|
||||||
// 0正常,1删除
|
// 0正常,1删除
|
||||||
|
|||||||
@@ -22,16 +22,9 @@
|
|||||||
@click="handleCollapse(!activeNames.includes('1'))"
|
@click="handleCollapse(!activeNames.includes('1'))"
|
||||||
>高级筛选
|
>高级筛选
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-dropdown trigger="click" placement="bottom-end">-->
|
<el-button icon="el-icon-plus" type="primary" size="medium" style="margin-left: 10px;" @click="addProjectVue">
|
||||||
<!-- <span class="el-dropdown-link">-->
|
新建需求
|
||||||
<!-- 列表视图<i class="el-icon-arrow-down el-icon--right"></i>-->
|
</el-button>
|
||||||
<!-- </span>-->
|
|
||||||
<!-- <el-dropdown-menu slot="dropdown">-->
|
|
||||||
<!-- <el-dropdown-item>列表视图</el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item>看板视图</el-dropdown-item>-->
|
|
||||||
<!-- </el-dropdown-menu>-->
|
|
||||||
<!-- </el-dropdown>-->
|
|
||||||
<el-button icon="el-icon-plus" type="primary" size="medium" style="margin-left: 10px;" @click="addProjectVue">新建需求</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -321,9 +314,7 @@ export default {
|
|||||||
type: '',
|
type: '',
|
||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
editForm: {
|
editForm: {},
|
||||||
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -463,14 +454,14 @@ export default {
|
|||||||
this.editSubmitLoading = true
|
this.editSubmitLoading = true
|
||||||
updateProject(form)
|
updateProject(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$message.success('编辑成功')
|
this.$message.success('编辑成功')
|
||||||
this.editSubmitLoading = false
|
this.editSubmitLoading = false
|
||||||
this.editOpen = false
|
this.editOpen = false
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.$message.error('编辑失败')
|
this.$message.error('编辑失败')
|
||||||
this.editSubmitLoading = false
|
this.editSubmitLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 全部导出按钮操作 */
|
/** 全部导出按钮操作 */
|
||||||
@@ -487,7 +478,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 批量导出按钮操作 */
|
/** 批量导出按钮操作 */
|
||||||
handleSelectExport() {
|
handleSelectExport() {
|
||||||
this.selectedData = this.selectedRows.map(row => ({
|
this.selectedData = this.selectedRows.map(row => ({
|
||||||
serialNumber: row.serialNumber,
|
serialNumber: row.serialNumber,
|
||||||
name: row.name,
|
name: row.name,
|
||||||
outline: row.outline,
|
outline: row.outline,
|
||||||
@@ -501,7 +492,6 @@ export default {
|
|||||||
createTime: row.createTime,
|
createTime: row.createTime,
|
||||||
status: row.status
|
status: row.status
|
||||||
}));
|
}));
|
||||||
console.log('selectedData', this.selectedData)
|
|
||||||
requestDownload({
|
requestDownload({
|
||||||
url: '/test/project/batchExportProject',
|
url: '/test/project/batchExportProject',
|
||||||
fileName: `需求列表信息_${new Date().getTime()}.xlsx`,
|
fileName: `需求列表信息_${new Date().getTime()}.xlsx`,
|
||||||
|
|||||||
Reference in New Issue
Block a user