解决服务指令-点击树任何节点会刷新树

This commit is contained in:
1378012178@qq.com 2025-07-31 14:20:34 +08:00
parent fed6aa8c72
commit a6ac0475e0
1 changed files with 7 additions and 5 deletions

View File

@ -478,17 +478,19 @@ function expandTreeNodeToLevel4(directiveData: any) {
/** /**
* 查询 * 查询
*/ */
function searchQuery() { function searchQuery(reloadTree = true) {
if (!!queryParam.directiveName || !!queryParam.bodyTags || !!queryParam.emotionTags || !!queryParam.izEnabled) { if (!!queryParam.directiveName || !!queryParam.bodyTags || !!queryParam.emotionTags || !!queryParam.izEnabled) {
queryParam.instructionTagId = ''; queryParam.instructionTagId = '';
queryParam.categoryId = ''; queryParam.categoryId = '';
queryParam.typeId = ''; queryParam.typeId = '';
} }
reload().then(() => { reload().then(() => {
if (reloadTree) {
initTree(); initTree();
});
} }
})
}
/** /**
* 重置 * 重置
@ -944,7 +946,7 @@ function handleTreeSelect(selectedKeys: string[], { node }: any) {
} }
if (level == 5) return if (level == 5) return
// //
searchQuery(); searchQuery(false);
} }
function initTree() { function initTree() {