编辑模块,过滤失效 --bug=1005962 --user=陈建星 【github#5477】接口定义的模块内搜索目标模块,点击编辑目标模块时模块页面会跳出,又要重新往下拉寻找目标模块才能编辑 https://www.tapd.cn/55049933/s/1041081
This commit is contained in:
parent
aea566f8f8
commit
d34bef161c
|
@ -17,6 +17,7 @@
|
|||
@drag="drag"
|
||||
@remove="remove"
|
||||
@refresh="list"
|
||||
@filter="filter"
|
||||
@nodeSelectEvent="nodeChange"
|
||||
ref="nodeTree">
|
||||
|
||||
|
@ -138,8 +139,8 @@
|
|||
this.list();
|
||||
},
|
||||
watch: {
|
||||
'condition.filterText'(val) {
|
||||
this.$refs.nodeTree.filter(val);
|
||||
'condition.filterText'() {
|
||||
this.filter();
|
||||
},
|
||||
'condition.trashEnable'() {
|
||||
this.$emit('enableTrash', this.condition.trashEnable);
|
||||
|
@ -165,6 +166,9 @@
|
|||
this.$refs.apiImport.open(this.currentModule);
|
||||
}
|
||||
},
|
||||
filter() {
|
||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||
},
|
||||
list(projectId) {
|
||||
let url = undefined;
|
||||
if (this.isPlanModel) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
@drag="drag"
|
||||
@remove="remove"
|
||||
@refresh="list"
|
||||
@filter="filter"
|
||||
:delete-permission="['PROJECT_API_DEFINITION:READ+DELETE_API']"
|
||||
:add-permission="['PROJECT_API_DEFINITION:READ+CREATE_API']"
|
||||
:update-permission="['PROJECT_API_DEFINITION:READ+EDIT_API']"
|
||||
|
@ -112,8 +113,8 @@
|
|||
},
|
||||
|
||||
watch: {
|
||||
'condition.filterText'(val) {
|
||||
this.$refs.nodeTree.filter(val);
|
||||
'condition.filterText'() {
|
||||
this.filter();
|
||||
},
|
||||
'condition.protocol'() {
|
||||
this.$emit('protocolChange', this.condition.protocol);
|
||||
|
@ -140,6 +141,9 @@
|
|||
this.list();
|
||||
});
|
||||
},
|
||||
filter() {
|
||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||
},
|
||||
list(projectId) {
|
||||
let url = undefined;
|
||||
if (this.isPlanModel) {
|
||||
|
|
|
@ -198,10 +198,15 @@ export default {
|
|||
this.$set(data, 'isEdit', true);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.nameInput.focus();
|
||||
|
||||
// 不知为何,执行this.$set(data, 'isEdit', true);进入编辑状态之后过滤会失效,重新执行下过滤
|
||||
if (!isAppend) {
|
||||
this.$nextTick(() => {
|
||||
this.filter(this.filterText);
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.$emit('filter');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
@remove="remove"
|
||||
@nodeSelectEvent="nodeChange"
|
||||
@refresh="list"
|
||||
@filter="filter"
|
||||
ref="nodeTree">
|
||||
<template v-slot:header>
|
||||
<ms-search-bar
|
||||
|
@ -94,8 +95,8 @@ export default {
|
|||
treeNodes() {
|
||||
this.$emit('setTreeNodes', this.treeNodes);
|
||||
},
|
||||
'condition.filterText'(val) {
|
||||
this.$refs.nodeTree.filter(val);
|
||||
'condition.filterText'() {
|
||||
this.filter();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
@ -114,6 +115,9 @@ export default {
|
|||
}
|
||||
this.$refs.testCaseCreate.open(this.currentModule)
|
||||
},
|
||||
filter() {
|
||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||
},
|
||||
saveAsEdit(data) {
|
||||
this.$emit('saveAsEdit', data);
|
||||
},
|
||||
|
@ -139,7 +143,7 @@ export default {
|
|||
});
|
||||
this.setModuleOptions();
|
||||
if (this.$refs.nodeTree) {
|
||||
this.$refs.nodeTree.filter();
|
||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue