This commit is contained in:
bb_pan 2025-10-29 19:12:51 +08:00
parent f88d4fa80f
commit 86c010dc19
1 changed files with 9 additions and 10 deletions

View File

@ -21,7 +21,7 @@
<el-input <el-input
v-model="treeSearchKey" v-model="treeSearchKey"
placeholder="搜索" placeholder="搜索"
@keyup.enter.native="getDeviceListByTreeSearch" @input="getDeviceListByTreeSearch"
class="tree-search-input" class="tree-search-input"
@ -34,7 +34,6 @@
@click="getDeviceListByTreeSearch" @click="getDeviceListByTreeSearch"
title="查询" title="查询"
class="search-btn-embedded" class="search-btn-embedded"
@keyup.enter.native="getDeviceListByTreeSearch"
/> />
<el-button <el-button
icon="el-icon-refresh" icon="el-icon-refresh"
@ -1217,13 +1216,13 @@ export default {
this.defaultExpandedKeys = expandedIds; this.defaultExpandedKeys = expandedIds;
// 6. // 6.
if (filteredTreeData.length === 0 || this.isTreeEmpty(filteredTreeData)) { // if (filteredTreeData.length === 0 || this.isTreeEmpty(filteredTreeData)) {
this.$message.info('未找到匹配的类型分支'); // this.$message.info('');
} else { // } else {
this.$message.success(`找到 ${expandedIds.length} 个匹配项`); // this.$message.success(` ${expandedIds.length} `);
} // }
} catch (error) { } catch (error) {
this.$message.error('树形查询失败:' + (error.message || '未知错误')); // this.$message.error('' + (error.message || ''));
console.error(error); console.error(error);
} finally { } finally {
this.treeLoading = false; this.treeLoading = false;
@ -1336,9 +1335,9 @@ export default {
// this.collectFirstAndSecondLevelKeys(this.treeData); // this.collectFirstAndSecondLevelKeys(this.treeData);
this.initDefaultExpandedKeys() this.initDefaultExpandedKeys()
this.$message.success('树形查询已重置'); // this.$message.success('');
} catch (error) { } catch (error) {
this.$message.error('树形重置失败:' + (error.message || '未知错误')); // this.$message.error('' + (error.message || ''));
console.error(error); console.error(error);
} finally { } finally {
this.treeLoading = false; this.treeLoading = false;