From 814a7a39d2b89cd1d96855229a1346998f647105 Mon Sep 17 00:00:00 2001
From: pfl <14579250+shadowman1@user.noreply.gitee.com>
Date: Thu, 24 Apr 2025 16:01:28 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=88=A0=E9=99=A4=E9=80=BB?=
=?UTF-8?q?=E8=BE=91=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/TestProjectController.java | 7 +++-
.../service/impl/TestProjectServiceImpl.java | 3 ++
test-ui/src/views/test/project/index.vue | 32 +++++++------------
3 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/test-test/src/main/java/com/test/test/controller/TestProjectController.java b/test-test/src/main/java/com/test/test/controller/TestProjectController.java
index 26398a3..4c83cfe 100644
--- a/test-test/src/main/java/com/test/test/controller/TestProjectController.java
+++ b/test-test/src/main/java/com/test/test/controller/TestProjectController.java
@@ -21,6 +21,9 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+/**
+ * 需求controller
+ */
@Slf4j
@RestController
@RequestMapping("/test/project")
@@ -66,7 +69,9 @@ public class TestProjectController extends BaseController {
@Log(title = "需求", businessType = BusinessType.DELETE)
@PostMapping("/delProject")
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));
}
/**
diff --git a/test-test/src/main/java/com/test/test/service/impl/TestProjectServiceImpl.java b/test-test/src/main/java/com/test/test/service/impl/TestProjectServiceImpl.java
index a599d43..5176f0e 100644
--- a/test-test/src/main/java/com/test/test/service/impl/TestProjectServiceImpl.java
+++ b/test-test/src/main/java/com/test/test/service/impl/TestProjectServiceImpl.java
@@ -9,6 +9,9 @@ import jakarta.annotation.Resource;
import java.util.List;
import org.springframework.stereotype.Service;
+/**
+ * 需求实现类
+ */
@Service
public class TestProjectServiceImpl implements ITestProjectService {
// 0正常,1删除
diff --git a/test-ui/src/views/test/project/index.vue b/test-ui/src/views/test/project/index.vue
index 9f1ac09..aea7f05 100644
--- a/test-ui/src/views/test/project/index.vue
+++ b/test-ui/src/views/test/project/index.vue
@@ -22,16 +22,9 @@
@click="handleCollapse(!activeNames.includes('1'))"
>高级筛选
-
-
-
-
-
-
-
-
-
- 新建需求
+
+ 新建需求
+
@@ -321,9 +314,7 @@ export default {
type: '',
version: ''
},
- editForm: {
-
- },
+ editForm: {},
};
},
created() {
@@ -463,14 +454,14 @@ export default {
this.editSubmitLoading = true
updateProject(form)
.then(() => {
- this.$message.success('编辑成功')
- this.editSubmitLoading = false
- this.editOpen = false
- this.getList()
+ this.$message.success('编辑成功')
+ this.editSubmitLoading = false
+ this.editOpen = false
+ this.getList()
})
.catch(() => {
- this.$message.error('编辑失败')
- this.editSubmitLoading = false
+ this.$message.error('编辑失败')
+ this.editSubmitLoading = false
})
},
/** 全部导出按钮操作 */
@@ -487,7 +478,7 @@ export default {
},
/** 批量导出按钮操作 */
handleSelectExport() {
- this.selectedData = this.selectedRows.map(row => ({
+ this.selectedData = this.selectedRows.map(row => ({
serialNumber: row.serialNumber,
name: row.name,
outline: row.outline,
@@ -501,7 +492,6 @@ export default {
createTime: row.createTime,
status: row.status
}));
- console.log('selectedData', this.selectedData)
requestDownload({
url: '/test/project/batchExportProject',
fileName: `需求列表信息_${new Date().getTime()}.xlsx`,