Commit 42dcc7da authored by fit2-zhao's avatar fit2-zhao Committed by fit2-zhao
Browse files

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

parent 313e2aba
Showing with 34 additions and 7 deletions
+34 -7
......@@ -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() {
this.expandedNode = [];
this.expandedStatus = true;
this.shrinkTreeNode();
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;
......
......@@ -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;
}
......
......@@ -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() {
this.expandedNode = [];
this.expandedStatus = true;
this.shrinkTreeNode();
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;
......
......@@ -785,6 +785,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",
......
......@@ -784,6 +784,7 @@ export default {
other_config: "其他设置",
message_template: "报文模版",
tcp_parameter_tip: "请求参数可以在请求模版通过${xxx}引用",
step_message: "步骤过多,是否展开前 30 个步骤?",
esb_table: {
name: "参数名",
type: "类型",
......
......@@ -785,6 +785,7 @@ export default {
cert_alias: "證書別名",
message_template: "報文模版",
tcp_parameter_tip: "請求參數可以在請求模版通過${xxx}引用",
step_message: "步驟過多,是否展開前 30 個步驟?",
esb_table: {
name: "參數名",
type: "類型",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment