refactor(接口定义): 优化批量生成依赖关系数据量大时的友好提示
--bug=1014704 --user=王孝刚 【接口测试】github#15559,接口自动化批量生成依赖关系图时,当选择所有数据时,生成失败并报错 https://www.tapd.cn/55049933/s/1201691
This commit is contained in:
parent
6aab3c9883
commit
ec618b68db
|
@ -326,7 +326,8 @@ import {
|
|||
buildBatchParam,
|
||||
getCustomTableHeader,
|
||||
getCustomTableWidth,
|
||||
getLastTableSortField
|
||||
getLastTableSortField,
|
||||
getSelectDataCounts
|
||||
} from "@/common/js/tableUtils";
|
||||
import {API_SCENARIO_FILTERS} from "@/common/js/table-constants";
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
|
@ -688,6 +689,10 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
generateGraph() {
|
||||
if (getSelectDataCounts(this.condition, this.total, this.selectRows) > 100) {
|
||||
this.$warning(this.$t('test_track.case.generate_dependencies_warning'));
|
||||
return;
|
||||
}
|
||||
getGraphByCondition('API_SCENARIO', buildBatchParam(this, this.$refs.scenarioTable.selectIds), (data) => {
|
||||
this.graphData = data;
|
||||
this.$refs.relationshipGraph.open();
|
||||
|
|
|
@ -249,6 +249,7 @@ import {
|
|||
getCustomTableHeader,
|
||||
getCustomTableWidth,
|
||||
getLastTableSortField,
|
||||
getSelectDataCounts,
|
||||
initCondition
|
||||
} from "@/common/js/tableUtils";
|
||||
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
||||
|
@ -581,6 +582,10 @@ export default {
|
|||
});
|
||||
},
|
||||
generateGraph() {
|
||||
if (getSelectDataCounts(this.condition, this.total, this.selectRows) > 100) {
|
||||
this.$warning(this.$t('test_track.case.generate_dependencies_warning'));
|
||||
return;
|
||||
}
|
||||
getGraphByCondition('API', buildBatchParam(this, this.$refs.table.selectIds), (data) => {
|
||||
this.graphData = data;
|
||||
this.$refs.relationshipGraph.open();
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
:value="getCustomFieldValue(scope.row, field, scope.row.priority)"/>
|
||||
</span>
|
||||
<span v-else-if="field.name === '用例状态'">
|
||||
{{ getCustomFieldValue(scope.row, field, scope.row.status)}}
|
||||
{{ getCustomFieldValue(scope.row, field, scope.row.status) }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ getCustomFieldValue(scope.row, field) }}
|
||||
|
@ -238,12 +238,14 @@ import ApiStatus from "@/business/components/api/definition/components/list/ApiS
|
|||
import {
|
||||
buildBatchParam,
|
||||
deepClone,
|
||||
getCustomFieldBatchEditOption, getCustomFieldFilter,
|
||||
getCustomFieldBatchEditOption,
|
||||
getCustomFieldFilter,
|
||||
getCustomFieldValue,
|
||||
getCustomTableHeader,
|
||||
getCustomTableWidth,
|
||||
getLastTableSortField,
|
||||
getPageInfo,
|
||||
getSelectDataCounts,
|
||||
getTableHeaderWithCustomFields,
|
||||
initCondition,
|
||||
parseCustomFilesForList,
|
||||
|
@ -967,6 +969,10 @@ export default {
|
|||
});
|
||||
},
|
||||
generateGraph() {
|
||||
if (getSelectDataCounts(this.condition, this.total, this.selectRows) > 100) {
|
||||
this.$warning(this.$t('test_track.case.generate_dependencies_warning'));
|
||||
return;
|
||||
}
|
||||
getGraphByCondition('TEST_CASE', buildBatchParam(this, this.$refs.table.selectIds), (data) => {
|
||||
this.graphData = data;
|
||||
this.$refs.relationshipGraph.open();
|
||||
|
|
|
@ -2133,6 +2133,7 @@ export default {
|
|||
batch_add_public: 'Batch add public',
|
||||
public_warning: 'The public library configuration is not enabled',
|
||||
generate_dependencies: 'Generate dependencies',
|
||||
generate_dependencies_warning: 'For a better experience, it is recommended to check the data below 100',
|
||||
batch_delete_case: 'Batch delete',
|
||||
batch_unlink: 'Batch Unlink',
|
||||
unlink: 'Unlink',
|
||||
|
|
|
@ -2133,6 +2133,7 @@ export default {
|
|||
batch_add_public: '批量添加到公共用例库',
|
||||
public_warning: '未开启公共库用例配置',
|
||||
generate_dependencies: '生成依赖关系',
|
||||
generate_dependencies_warning: '为了更好的体验,建议勾选一百条以下的数据',
|
||||
batch_unlink: '批量取消关联',
|
||||
unlink: '取消关联',
|
||||
project_name: '所属项目',
|
||||
|
|
|
@ -2128,6 +2128,7 @@ export default {
|
|||
batch_add_public: '批量添加到公共用例庫',
|
||||
public_warning: '未開啟公共庫用例配置',
|
||||
generate_dependencies: '生成依賴關系',
|
||||
generate_dependencies_warning: '為了更好的體驗,建議勾選一百條以下的數據',
|
||||
batch_unlink: '批量取消關聯',
|
||||
unlink: '取消關聯',
|
||||
project_name: '所屬項目',
|
||||
|
|
Loading…
Reference in New Issue