-
+
{{ $t('project.case_public') }}
{{ '(' + publicTotal + ')' }}
@@ -73,6 +73,7 @@ export default {
width: auto;
border-radius: 4px;
display: flex;
+ overflow-x: hidden;
}
.to-public:hover {
diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue
index 57c0fa9600..c34c16b973 100644
--- a/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue
+++ b/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue
@@ -700,7 +700,7 @@ export default {
:deep(.node-icon .svg-icon) {
width: 1.2em;
height: 1.2em;
- margin-top: 4px;
+ margin-top: 2px;
}
.node-title {
diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue
index 5ccf6feb25..3472da8165 100644
--- a/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue
+++ b/framework/sdk-parent/frontend/src/components/new-ui/MsTable.vue
@@ -373,8 +373,15 @@ export default {
}
},
handleSelectAll(selection) {
+ if (this.condition.selectAll) {
+ return;
+ }
_handleSelectAll(this, selection, this.data, this.selectRows, this.condition);
- setUnSelectIds(this.data, this.condition, this.selectRows);
+ if (this.condition.selectAll) {
+ this.condition.unSelectIds = [];
+ } else {
+ setUnSelectIds(this.data, this.condition, this.selectRows);
+ }
this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows);
this.selectIds = Array.from(this.selectRows).map(o => o.id);
//有的组件需要回调父组件的函数,做下一步处理
@@ -422,7 +429,7 @@ export default {
//更新统计信息
this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows);
this.selectIds = Array.from(this.selectRows).map(o => o.id);
- this.$emit('callBackSelect');
+ this.$emit(data ? 'callBackSelectAll' : 'callBackSelect');
},
headerDragend(newWidth, oldWidth, column, event) {
if (column) {
diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsTableAdvSearch.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsTableAdvSearch.vue
index a405d50025..efa908e575 100644
--- a/framework/sdk-parent/frontend/src/components/new-ui/MsTableAdvSearch.vue
+++ b/framework/sdk-parent/frontend/src/components/new-ui/MsTableAdvSearch.vue
@@ -352,6 +352,7 @@ export default {
.search-item {
display: block;
width: 100%;
+ margin-left: -15px;
}
.delete-icon {
@@ -370,6 +371,7 @@ export default {
height: 26px;
width: 112px;
border-radius: 4px;
+ float: left;
}
:deep(span.el-select__tags-text) {
@@ -431,7 +433,7 @@ span.condition-num {
:deep(button.el-button.el-button--default.el-button--mini svg) {
position: relative;
right: 7px;
- top: 1px;
+ top: -1px;
width: 14px;
height: 14px;
}
diff --git a/framework/sdk-parent/frontend/src/components/search/MsTableSearchNodeTree.vue b/framework/sdk-parent/frontend/src/components/search/MsTableSearchNodeTree.vue
index 2471b1bc78..626264af21 100644
--- a/framework/sdk-parent/frontend/src/components/search/MsTableSearchNodeTree.vue
+++ b/framework/sdk-parent/frontend/src/components/search/MsTableSearchNodeTree.vue
@@ -14,7 +14,6 @@
@change="changeTreeTag"
class="search-select"
size="small"
- collapse-tags
multiple>
and p.workspace_id = #{request.workspaceId}
- group by tcn.id;
+ group by tcn.id, test_case.project_id;
diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java
index 83f80d33e9..2837865844 100644
--- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java
+++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java
@@ -80,6 +80,7 @@ import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
+import java.util.stream.Stream;
@Service
@Transactional(rollbackFor = Exception.class)
@@ -1894,6 +1895,12 @@ public class TestCaseService {
batchEditTag(request);
} else {
// 批量移动
+ if (request.getCondition().isSelectAll()) {
+ // 全选则重新设置MoveIds
+ List testCaseDTOS = listTestCase(request.getCondition());
+ List ids = testCaseDTOS.stream().map(TestCaseDTO::getId).collect(Collectors.toList());
+ request.setIds(ids);
+ }
TestCaseWithBLOBs batchEdit = new TestCaseWithBLOBs();
BeanUtils.copyBean(batchEdit, request);
batchEdit.setUpdateTime(System.currentTimeMillis());
diff --git a/test-track/frontend/src/business/TestTrack.vue b/test-track/frontend/src/business/TestTrack.vue
index ff1080b998..6d3e9e3c6e 100644
--- a/test-track/frontend/src/business/TestTrack.vue
+++ b/test-track/frontend/src/business/TestTrack.vue
@@ -248,5 +248,24 @@ button.el-button.el-button--default.el-button--small.el-button--danger {
.el-icon-warning:before, .el-icon-success:before {
font-size: 17px;
}
+
+/**
+ * el-icon-close
+ */
+i.el-tag__close.el-icon-close {
+ height: 0;
+}
+
+.el-select .el-tag__close.el-icon-close::before {
+ font-size: 26px;
+ position: relative;
+ top: -7px;
+ left: -6px;
+}
+
+.el-tag.el-tag--info .el-tag__close:hover {
+ color: #1F2329;
+ background-color: #909399;
+}
diff --git a/test-track/frontend/src/business/case/TestCase.vue b/test-track/frontend/src/business/case/TestCase.vue
index d7ad44abc3..a94ac04949 100644
--- a/test-track/frontend/src/business/case/TestCase.vue
+++ b/test-track/frontend/src/business/case/TestCase.vue
@@ -143,7 +143,6 @@
:tree-nodes="treeNodes"
:version-enable="versionEnable"
@refreshTable="refresh"
- @testCaseCopy="copyTestCase"
@refresh="refresh"
@refreshAll="refreshAll"
@refreshPublic="refreshPublic"
diff --git a/test-track/frontend/src/business/case/components/BatchMove.vue b/test-track/frontend/src/business/case/components/BatchMove.vue
index d8b9dbf7ce..fbc4374d95 100644
--- a/test-track/frontend/src/business/case/components/BatchMove.vue
+++ b/test-track/frontend/src/business/case/components/BatchMove.vue
@@ -77,12 +77,13 @@ export default {
}
},
methods: {
- open(isMoveBatch, caseTitle, treeNodes, selectNum, moduleOptions) {
+ open(isMoveBatch, caseTitle, treeNodes, selectNum, selectIds, moduleOptions) {
this.isMoveBatch = isMoveBatch;
this.moveCaseTitle = caseTitle;
this.dialogVisible = true;
this.treeNodes = treeNodes;
this.selectNum = selectNum;
+ this.selectIds = selectIds;
this.moduleOptions = moduleOptions;
},
save() {
diff --git a/test-track/frontend/src/business/case/components/TestCaseList.vue b/test-track/frontend/src/business/case/components/TestCaseList.vue
index 0a6600a6dd..66d128ed3e 100644
--- a/test-track/frontend/src/business/case/components/TestCaseList.vue
+++ b/test-track/frontend/src/business/case/components/TestCaseList.vue
@@ -1151,12 +1151,12 @@ export default {
handleBatchMove() {
this.isMoveBatch = true;
let firstSelectRow = this.$refs.table.selectRows.values().next().value;
- this.$refs.testBatchMove.open(this.isMoveBatch, firstSelectRow.name, this.treeNodes, this.selectCounts, this.moduleOptions);
+ this.$refs.testBatchMove.open(this.isMoveBatch, firstSelectRow.name, this.treeNodes, this.selectCounts, this.$refs.table.selectIds, this.moduleOptions);
},
handleBatchCopy() {
this.isMoveBatch = false;
let firstSelectRow = this.$refs.table.selectRows.values().next().value;
- this.$refs.testBatchMove.open(this.isMoveBatch, firstSelectRow.name, this.treeNodes, this.selectCounts, this.moduleOptions);
+ this.$refs.testBatchMove.open(this.isMoveBatch, firstSelectRow.name, this.treeNodes, this.selectCounts, this.$refs.table.selectIds, this.moduleOptions);
},
_handleDeleteVersion(testCase, deleteCurrentVersion) {
// 删除指定版本
diff --git a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
index eef4d6526f..74a4e65be1 100644
--- a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
+++ b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
@@ -352,7 +352,7 @@
or test_case.tags like CONCAT('%', #{request.name},'%')
or test_case.custom_num like CONCAT('%', #{request.name},'%'))
-
+
and test_case.id in
#{id}