fix: 测试用例回收站数据错误

This commit is contained in:
chenjianxing 2021-11-04 10:55:34 +08:00 committed by jianxing
parent 0bdb1f29ad
commit 98279c7a28
2 changed files with 7 additions and 8 deletions

View File

@ -342,7 +342,7 @@
</if> </if>
</foreach> </foreach>
</if> </if>
<if test="request.filters == null || request.filters.size() == 0 || !request.filters.entrySet().contains('status')"> <if test="request.filters == null || request.filters.size() == 0 || !request.filters.containsKey('status')">
and (test_case.status is null or test_case.status != 'Trash') and (test_case.status is null or test_case.status != 'Trash')
</if> </if>
</sql> </sql>

View File

@ -272,7 +272,8 @@ export default {
deletePath: "/test/case/delete", deletePath: "/test/case/delete",
enableOrderDrag: true, enableOrderDrag: true,
condition: { condition: {
components: TEST_CASE_CONFIGS components: TEST_CASE_CONFIGS,
filters: {}
}, },
graphData: {}, graphData: {},
priorityFilters: [ priorityFilters: [
@ -409,11 +410,6 @@ export default {
created: function () { created: function () {
this.getTemplateField(); this.getTemplateField();
this.$emit('setCondition', this.condition); this.$emit('setCondition', this.condition);
if(this.trashEnable){
this.condition.filters = {status: ["Trash"]};
}else {
this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]};
}
this.initTableData(); this.initTableData();
let redirectParam = this.$route.query.dataSelectRange; let redirectParam = this.$route.query.dataSelectRange;
this.checkRedirectEditPage(redirectParam); this.checkRedirectEditPage(redirectParam);
@ -439,7 +435,6 @@ export default {
}, },
activated() { activated() {
this.getTemplateField(); this.getTemplateField();
this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]};
let ids = this.$route.params.ids; let ids = this.$route.params.ids;
if (ids) { if (ids) {
this.condition.ids = ids; this.condition.ids = ids;
@ -575,6 +570,7 @@ export default {
this.condition.selectThisWeedData = false; this.condition.selectThisWeedData = false;
this.condition.selectThisWeedRelevanceData = false; this.condition.selectThisWeedRelevanceData = false;
this.condition.caseCoverage = null; this.condition.caseCoverage = null;
this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"];
switch (this.selectDataRange) { switch (this.selectDataRange) {
case 'thisWeekCount': case 'thisWeekCount':
this.condition.selectThisWeedData = true; this.condition.selectThisWeedData = true;
@ -600,6 +596,9 @@ export default {
} }
this.condition.filters.priority = this.condition.filters['用例等级']; this.condition.filters.priority = this.condition.filters['用例等级'];
this.condition.filters.status = this.condition.filters['用例状态']; this.condition.filters.status = this.condition.filters['用例状态'];
if(this.trashEnable){
this.condition.filters = {status: ["Trash"]};
}
if (this.projectId) { if (this.projectId) {
this.condition.projectId = this.projectId; this.condition.projectId = this.projectId;
this.$emit('setCondition', this.condition); this.$emit('setCondition', this.condition);