编辑模块,过滤失效 --bug=1005962 --user=陈建星 【github#5477】接口定义的模块内搜索目标模块,点击编辑目标模块时模块页面会跳出,又要重新往下拉寻找目标模块才能编辑 https://www.tapd.cn/55049933/s/1041081

This commit is contained in:
chenjianxing 2021-08-27 11:46:29 +08:00 committed by jianxing
parent aea566f8f8
commit d34bef161c
4 changed files with 24 additions and 7 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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');
});
}
});
},

View File

@ -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);
}
});
}