fix: 全选回收站用例生成关系图报错

This commit is contained in:
chenjianxing 2021-10-27 19:23:21 +08:00 committed by jianxing
parent b1b9a870c9
commit 9a3654a430
10 changed files with 66 additions and 19 deletions

View File

@ -624,6 +624,11 @@
<if test="request.protocol != null">
AND api_definition.protocol = #{request.protocol}
</if>
<if test="request.notEqStatus != null">
and (api_definition.status is null or api_definition.status != #{request.notEqStatus})
</if>
<if test="request.id != null">
AND api_definition.id = #{request.id}
</if>

View File

@ -183,6 +183,11 @@
or api_scenario.num like CONCAT('%', #{request.name},'%')
or api_scenario.custom_num like CONCAT('%', #{request.name},'%'))
</if>
<if test="request.notEqStatus != null">
and (api_scenario.status is null or api_scenario.status != #{request.notEqStatus})
</if>
<if test="request.workspaceId != null">
AND project.workspace_id = #{request.workspaceId}
</if>

View File

@ -355,6 +355,10 @@
<if test="request.statusIsNot != null">
and (test_case.status is null or test_case.status != #{request.statusIsNot})
</if>
<if test="request.notEqStatus != null">
and (test_case.status is null or test_case.status != #{request.notEqStatus})
</if>
<if test="request.name != null">
and (test_case.name like CONCAT('%', #{request.name},'%')
or test_case.num like CONCAT('%', #{request.name},'%')

View File

@ -14,6 +14,11 @@ public class BaseQueryRequest {
private String name;
/**
* 状态不等于 notEqStatus
*/
private String notEqStatus;
private String workspaceId;
private List<String> ids;

@ -1 +1 @@
Subproject commit ec08189a4f2c3aebf0688f4b9798af2993002d25
Subproject commit a58811e4dc08813267cdece3e0c24ab1136475fd

View File

@ -1,6 +1,6 @@
<template>
<chart
:style="{'height': height + 'px'}"
:style="{'height': chartHeight, 'width': width}"
class="ms-chart"
:init-options="defaultInitOptions"
:option="options"
@ -19,25 +19,52 @@ export default {
props: {
options: Object,
theme: [String, Object],
initOptions: Object,
initOptions: {
type: Object,
default() {
return {
renderer: 'canvas'
}
}
},
group: String,
autoresize: Boolean,
watchShallow: Boolean,
manualUpdate: Boolean,
height: {
type: Number,
type: [Number, String],
default() {
return 400
}
}
},
width: [Number, String],
},
data() {
return {
defaultInitOptions: this.initOptions
};
},
computed: {
chartHeight() {
if (this.height instanceof String) {
return this.height;
} else {
return this.height + 'px';
}
},
chartWidth() {
if (!this.width) {
return this.width;
}
if (this.width instanceof String) {
return this.width;
} else {
return this.width + 'px';
}
}
},
mounted() {
this.defaultInitOptions = this.defaultInitOptions || {};
// this.defaultInitOptions = this.defaultInitOptions || {};
// svg
// BUG: svg legend
// if (!this.defaultInitOptions.renderer) {
@ -49,8 +76,8 @@ export default {
this.$emit('onClick', params.data);
},
exportCharts(fileName, type) {
if (document.getElementById('chartsShow')) {
let chartsCanvas = document.getElementById('chartsShow').querySelectorAll('canvas')[0];
if (document.getElementsByClassName('ms-chart')) {
let chartsCanvas = document.getElementsByClassName('ms-chart')[0].querySelectorAll('canvas')[0];
let mime = 'image/png';
if (chartsCanvas) {
// toDataURL()canvascanvasbase64

View File

@ -146,14 +146,14 @@
</template>
</ms-table-column >
<ms-table-column
prop="status"
:filters="statusFilters"
:field="item"
:fields-width="fieldsWidth"
min-width="100px"
:label="$t('api_test.definition.api_case_status')">
</ms-table-column>
<!-- <ms-table-column-->
<!-- prop="status"-->
<!-- :filters="statusFilters"-->
<!-- :field="item"-->
<!-- :fields-width="fieldsWidth"-->
<!-- min-width="100px"-->
<!-- :label="$t('api_test.definition.api_case_status')">-->
<!-- </ms-table-column>-->
<ms-table-column v-for="field in testCaseTemplate.customFields" :key="field.id"
:filters="field.name === '用例等级' ? priorityFilters : null"

@ -1 +1 @@
Subproject commit 41c1f55d34da48de279d8e9e4675d2a735822c3a
Subproject commit 3beb86a57a5816e94d3b93ed7b9b7f465832a70f

View File

@ -8,7 +8,8 @@ import 'echarts/lib/component/title'
import 'echarts/lib/component/toolbox';
import 'echarts/lib/component/dataZoom';
import 'echarts/lib/component/legend';
import 'zrender/lib/svg/svg'
import 'zrender/lib/svg/svg' // initOption 支持使用svg
import 'zrender/lib/canvas/canvas' // initOption 支持使用canvas
import 'echarts/lib/component/grid'
export default {

View File

@ -186,7 +186,7 @@ export let CUSTOM_TABLE_HEADER = {
{id: 'createUser', key: '7', label: 'commons.create_user'},
{id: 'createTime', key: '8', label: 'commons.create_time'},
{id: 'desc', key: '9', label: 'test_track.case.case_desc'},
{id: 'status', key: '10', label: 'api_test.definition.api_case_status'},
// {id: 'status', key: 'a', label: 'api_test.definition.api_case_status'},
{id: 'projectName', key: 'c', label: 'commons.project'},
{id: 'caseStatus', key: 'd', label: 'commons.status'},
],