fix(接口自动化): 修复旧数据迁移选择模块根节点问题
This commit is contained in:
parent
9d8c0b731e
commit
324cc0fd5f
|
@ -220,14 +220,14 @@
|
||||||
if (tab.name === 'add') {
|
if (tab.name === 'add') {
|
||||||
this.handleTabsEdit(this.$t('api_test.definition.request.fast_debug'), "debug");
|
this.handleTabsEdit(this.$t('api_test.definition.request.fast_debug'), "debug");
|
||||||
}
|
}
|
||||||
if(this.$refs.apiConfig) {
|
if (this.$refs.apiConfig) {
|
||||||
this.$refs.apiConfig.forEach(item => {
|
this.$refs.apiConfig.forEach(item => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
item.removeListener();
|
item.removeListener();
|
||||||
}); // 删除所有tab的 ctrl + s 监听
|
}); // 删除所有tab的 ctrl + s 监听
|
||||||
let tabs = this.apiTabs;
|
let tabs = this.apiTabs;
|
||||||
let index = tabs.findIndex(item => item.name === tab.name); // 找到当前选中tab的index
|
let index = tabs.findIndex(item => item.name === tab.name); // 找到当前选中tab的index
|
||||||
if(index != -1) {
|
if (index != -1) {
|
||||||
this.$refs.apiConfig[index - 1].addListener(); // 为选中tab添加 ctrl + s 监听(index-1的原因是要除去第一个固有tab)
|
this.$refs.apiConfig[index - 1].addListener(); // 为选中tab添加 ctrl + s 监听(index-1的原因是要除去第一个固有tab)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -336,7 +336,11 @@
|
||||||
} else {
|
} else {
|
||||||
let condition = {};
|
let condition = {};
|
||||||
let url = "/api/definition/list/all";
|
let url = "/api/definition/list/all";
|
||||||
condition.filters = ["Prepare", "Underway", "Completed"];
|
condition.filters = new Map(
|
||||||
|
[
|
||||||
|
["status", ["Prepare", "Underway", "Completed"]],
|
||||||
|
]
|
||||||
|
);
|
||||||
condition.projectId = getCurrentProjectID();
|
condition.projectId = getCurrentProjectID();
|
||||||
this.$post(url, condition, response => {
|
this.$post(url, condition, response => {
|
||||||
obj.data = response.data;
|
obj.data = response.data;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<ms-node-tree
|
<ms-node-tree
|
||||||
v-loading="result.loading"
|
v-loading="result.loading"
|
||||||
:tree-nodes="data"
|
:tree-nodes="data"
|
||||||
|
allLabel="默认模块"
|
||||||
@add="add"
|
@add="add"
|
||||||
:type="'edit'"
|
:type="'edit'"
|
||||||
@edit="edit"
|
@edit="edit"
|
||||||
|
@ -97,6 +98,11 @@
|
||||||
this.$warning("请选择一个模块");
|
this.$warning("请选择一个模块");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(this.currentModule)
|
||||||
|
if (this.currentModule.id === "root") {
|
||||||
|
this.$warning("不能选默认模块,请重新选择一个模块");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let arr = Array.from(this.selectIds);
|
let arr = Array.from(this.selectIds);
|
||||||
let obj = {testIds: arr, projectId: getCurrentProjectID(), modulePath: this.getPath(this.currentModule.id), moduleId: this.currentModule.id};
|
let obj = {testIds: arr, projectId: getCurrentProjectID(), modulePath: this.getPath(this.currentModule.id), moduleId: this.currentModule.id};
|
||||||
|
|
Loading…
Reference in New Issue