fix(测试跟踪): 修复功能用例点击切换版本控制台报错
This commit is contained in:
parent
dd612ba5a9
commit
720d24e657
|
@ -435,7 +435,7 @@
|
|||
<if test="request.selectFields == null or request.selectFields.size() == 0">
|
||||
<include refid="io.metersphere.base.mapper.TestCaseMapper.Base_Column_List"/>
|
||||
</if>
|
||||
from test_case
|
||||
from test_case left join project on test_case.project_id = project.id
|
||||
<include refid="queryWhereCondition"/>
|
||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
||||
</select>
|
||||
|
|
|
@ -108,12 +108,6 @@ public class TestCaseController {
|
|||
return testCaseService.listTestCaseIds(request);
|
||||
}
|
||||
|
||||
@PostMapping("/list/ids/public")
|
||||
public List<TestCaseDTO> getTestPlanCaseIdsPublic(@RequestBody QueryTestCaseRequest request) {
|
||||
return testCaseService.publicListTestCase(request);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/relationship/case/{id}/{relationshipType}")
|
||||
public List<RelationshipEdgeDTO> getRelationshipCase(@PathVariable("id") String id, @PathVariable("relationshipType") String relationshipType) {
|
||||
return testCaseService.getRelationshipCase(id, relationshipType);
|
||||
|
|
|
@ -1712,8 +1712,8 @@ public class TestCaseService {
|
|||
public List<TestCaseDTO> listTestCaseIds(QueryTestCaseRequest request) {
|
||||
setDefaultOrder(request);
|
||||
List<String> selectFields = new ArrayList<>();
|
||||
selectFields.add("id");
|
||||
selectFields.add("name");
|
||||
selectFields.add("test_case.id");
|
||||
selectFields.add("test_case.name");
|
||||
request.setSelectFields(selectFields);
|
||||
return extTestCaseMapper.listIds(request);
|
||||
}
|
||||
|
|
|
@ -663,7 +663,6 @@ export default {
|
|||
checkout(testCase, item) {
|
||||
Object.assign(item.testCaseInfo, testCase)
|
||||
//子组件先变更 copy 状态,再执行初始化操作
|
||||
this.$refs.testCaseEdit[0].changeType("copy");
|
||||
this.$refs.testCaseEdit[0].initEdit(item.testCaseInfo, () => {
|
||||
this.$nextTick(() => {
|
||||
let vh = this.$refs.testCaseEdit[0].$refs.versionHistory;
|
||||
|
@ -676,7 +675,6 @@ export default {
|
|||
checkoutPublic(testCase, item) {
|
||||
Object.assign(item.testCaseInfo, testCase)
|
||||
//子组件先变更 copy 状态,再执行初始化操作
|
||||
this.$refs.testCaseEditShow[0].changeType("copy");
|
||||
this.$refs.testCaseEditShow[0].initEdit(item.testCaseInfo, () => {
|
||||
this.$nextTick(() => {
|
||||
let vh = this.$refs.testCaseEditShow[0].$refs.versionHistory;
|
||||
|
|
|
@ -114,7 +114,8 @@
|
|||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||
|
||||
<test-case-edit-other-info :read-only="readOnly" :project-id="projectIds" :form="form"
|
||||
:label-width="formLabelWidth" :case-id="form.id" :version-enable="versionEnable" ref="otherInfo"/>
|
||||
:label-width="formLabelWidth" :case-id="form.id" :version-enable="versionEnable"
|
||||
ref="otherInfo"/>
|
||||
|
||||
<el-row style="margin-top: 10px" v-if="type!=='add'">
|
||||
<el-col :span="20" :offset="1">{{ $t('test_track.review.comment') }}:
|
||||
|
@ -637,17 +638,11 @@ export default {
|
|||
},
|
||||
initTestCases(testCase) {
|
||||
if (this.publicEnable) {
|
||||
this.result = this.$post('/test/case/list/ids/public', this.selectCondition, response => {
|
||||
this.testCases = response.data;
|
||||
for (let i = 0; i < this.testCases.length; i++) {
|
||||
if (this.testCases[i].id === testCase.id) {
|
||||
this.index = i;
|
||||
this.getTestCase(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.selectCondition.projectId = null;
|
||||
} else {
|
||||
this.selectCondition.workspaceId = null;
|
||||
}
|
||||
this.selectCondition.versionId = testCase.versionId
|
||||
this.result = this.$post('/test/case/list/ids', this.selectCondition, response => {
|
||||
this.testCases = response.data;
|
||||
for (let i = 0; i < this.testCases.length; i++) {
|
||||
|
@ -657,7 +652,6 @@ export default {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getTestCase(index) {
|
||||
let id = "";
|
||||
|
|
|
@ -594,27 +594,20 @@ export default {
|
|||
},
|
||||
initTestCases(testCase) {
|
||||
if (this.publicEnable) {
|
||||
this.result = this.$post('/test/case/list/ids/public', this.selectCondition, response => {
|
||||
this.testCases = response.data;
|
||||
for (let i = 0; i < this.testCases.length; i++) {
|
||||
if (this.testCases[i].id === testCase.id) {
|
||||
this.index = i;
|
||||
this.getTestCase(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.selectCondition.projectId = null;
|
||||
} else {
|
||||
this.selectCondition.workspaceId = null;
|
||||
this.result = this.$post('/test/case/list/ids', this.selectCondition, response => {
|
||||
this.testCases = response.data;
|
||||
for (let i = 0; i < this.testCases.length; i++) {
|
||||
if (this.testCases[i].id === testCase.id) {
|
||||
this.index = i;
|
||||
this.getTestCase(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
this.selectCondition.versionId = testCase.versionId
|
||||
this.result = this.$post('/test/case/list/ids', this.selectCondition, response => {
|
||||
this.testCases = response.data;
|
||||
for (let i = 0; i < this.testCases.length; i++) {
|
||||
if (this.testCases[i].id === testCase.id) {
|
||||
this.index = i;
|
||||
this.getTestCase(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getTestCase(index) {
|
||||
let id = "";
|
||||
|
|
Loading…
Reference in New Issue