fix(接口自动化): 修复 BUG0609_8 一键展开问题;BUG0609_15 数据选择问题

This commit is contained in:
fit2-zhao 2021-06-10 12:24:51 +08:00 committed by fit2-zhao
parent 7366f015f6
commit 2541f784be
6 changed files with 34 additions and 7 deletions

View File

@ -1144,6 +1144,9 @@ export default {
shrinkTreeNode() {
//
for (let i in this.scenarioDefinition) {
if (i > 30 && this.expandedStatus) {
continue;
}
if (this.scenarioDefinition[i]) {
if (this.expandedStatus && this.expandedNode.indexOf(this.scenarioDefinition[i].resourceId) === -1) {
this.expandedNode.push(this.scenarioDefinition[i].resourceId);
@ -1169,9 +1172,18 @@ export default {
}
},
openExpansion() {
if (this.scenarioDefinition && this.scenarioDefinition.length > 30) {
this.$alert(this.$t('api_test.definition.request.step_message'), '', {
confirmButtonText: this.$t('commons.confirm'),
callback: (action) => {
if (action === 'confirm') {
this.expandedNode = [];
this.expandedStatus = true;
this.shrinkTreeNode();
}
}
});
}
},
closeExpansion() {
this.expandedStatus = false;

View File

@ -241,7 +241,7 @@ export default {
});
}
}
if (databaseConfigsOptions.length > 0) {
if (databaseConfigsOptions.length > 0 && this.request.environmentId !== this.environment.id) {
this.request.dataSourceId = databaseConfigsOptions[0].id;
this.request.environmentId = this.environment.id;
}

View File

@ -923,6 +923,9 @@ export default {
shrinkTreeNode() {
//
for (let i in this.scenarioDefinition) {
if (i > 30 && this.expandedStatus) {
continue;
}
if (this.scenarioDefinition[i]) {
if (this.expandedStatus) {
this.expandedNode.push(this.scenarioDefinition[i].resourceId);
@ -948,9 +951,18 @@ export default {
}
},
openExpansion() {
if (this.scenarioDefinition && this.scenarioDefinition.length > 30) {
this.$alert(this.$t('api_test.definition.request.step_message'), '', {
confirmButtonText: this.$t('commons.confirm'),
callback: (action) => {
if (action === 'confirm') {
this.expandedNode = [];
this.expandedStatus = true;
this.shrinkTreeNode();
}
}
});
}
},
closeExpansion() {
this.expandedStatus = false;

View File

@ -797,6 +797,7 @@ export default {
cert_alias: "Certificate Alias",
message_template: "Message Template",
tcp_parameter_tip: "The request parameters can be referenced in the request template ${XXX}",
step_message: "Too many steps, whether to expand the first 30 steps",
esb_table: {
name: "name",
type: "type",

View File

@ -796,6 +796,7 @@ export default {
other_config: "其他设置",
message_template: "报文模版",
tcp_parameter_tip: "请求参数可以在请求模版通过${xxx}引用",
step_message: "步骤过多,是否展开前 30 个步骤?",
esb_table: {
name: "参数名",
type: "类型",

View File

@ -797,6 +797,7 @@ export default {
cert_alias: "證書別名",
message_template: "報文模版",
tcp_parameter_tip: "請求參數可以在請求模版通過${xxx}引用",
step_message: "步驟過多,是否展開前 30 個步驟?",
esb_table: {
name: "參數名",
type: "類型",