fix(测试跟踪): 功能用例页面迁移部分BUG修复 (#18393)

--bug=1017613,1017617,1017618,1017638 --user=宋昌昌 【测试跟踪】功能用例列表页-复制用例,复制的用例再次复制,会丢失责任人信息 https://www.tapd.cn/55049933/s/1257568

Co-authored-by: song-cc-rock <changchang.song@fit2cloud.com>
This commit is contained in:
MeterSphere Bot 2022-10-10 19:56:24 +08:00 committed by GitHub
parent ba576198ea
commit 931f31552b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 20 deletions

View File

@ -9,7 +9,7 @@
</div>
<div class="ms_btn">
<el-button v-if="enableCancel" @click="cancel" :size="btnSize">{{ $t('commons.cancel') }}</el-button>
<el-button type="primary" @click="confirm" @keydown.enter.native.prevent :size="btnSize">
<el-button type="primary" @click="confirm" @keydown.enter.native.prevent v-prevent-re-click :size="btnSize">
{{ $t('commons.confirm') }}
</el-button>
</div>

View File

@ -394,7 +394,9 @@
</select>
<select id="get" resultType="io.metersphere.dto.TestReviewCaseDTO">
select test_case.remark, test_case_review_test_case.*, test_case.*, test_case_node.name as model, project.name as projectName
select test_case_review_test_case.id id, test_case_review_test_case.case_id caseId,
test_case.remark, test_case.review_status reviewStatus, test_case.status status, test_case.*,
test_case_review_test_case.*, test_case_node.name as model, project.name as projectName
from test_case_review_test_case
inner join test_case on test_case_review_test_case.case_id = test_case.id
left join test_case_node on test_case_node.id=test_case.node_id

View File

@ -152,13 +152,9 @@ export function getReviewCasesForMinder(request, callback) {
}
export function getRelateTest(caseId) {
if (caseId) {
return get('/test/case/relate/test/list/' + caseId);
}
return {};
}
export function deleteRelateTest(caseId, testId) {
return get('/test/case/relate/delete/' + caseId + '/' + testId);
}

View File

@ -622,6 +622,9 @@ export default {
this.operationType = 'add';
this.copyCaseId = testCase.copyId;
this.setFormData(testCase);
this.testCaseTemplate.customFields.forEach(item => {
item.isEdit = false;
});
this.setTestCaseExtInfo(testCase);
this.getSelectOptions();
this.reload();

View File

@ -477,6 +477,10 @@ export default {
if (ids) {
this.condition.ids = ids;
}
let dataSelectRange = this.$route.params.dataSelectRange;
if (!dataSelectRange) {
delete this.condition.filters.review_status
}
this.initTableData();
this.condition.ids = null;
this.getVersionOptions();
@ -670,9 +674,6 @@ export default {
this.condition.selectThisWeedRelevanceData = false;
this.condition.caseCoverage = null;
this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"];
if (!this.selectDataRange) {
delete this.condition.filters.review_status
}
switch (this.selectDataRange) {
case 'thisWeekCount':
this.condition.selectThisWeedData = true;

View File

@ -132,11 +132,13 @@ export default {
});
},
initTable() {
if (this.caseId) {
getRelateTest(this.caseId)
.then((response) => {
this.data = response.data;
this.notInIds = this.data.map(i => i.testId);
});
}
},
}
}

View File

@ -385,7 +385,7 @@ export default {
parseCustomField(item, this.testCaseTemplate, null, buildTestCaseOldFields(item));
this.isCustomFiledActive = true;
this.testCase = item;
this.oldReviewStatus = this.testCase.status;
this.oldReviewStatus = this.testCase.reviewStatus;
if (!this.testCase.actualResult) {
// ,使
this.testCase.actualResult = this.testCaseTemplate.actualResult;
@ -404,7 +404,7 @@ export default {
openTestCaseEdit(testCase, tableData) {
this.showDialog = true;
//
this.oldReviewStatus = testCase.status;
this.oldReviewStatus = testCase.reviewStatus;
this.activeTab = 'detail';
this.hasTapdId = false;
this.hasZentaoId = false;