diff --git a/main/manager-web/src/components/HeaderBar.vue b/main/manager-web/src/components/HeaderBar.vue index 476358db..552beb56 100644 --- a/main/manager-web/src/components/HeaderBar.vue +++ b/main/manager-web/src/components/HeaderBar.vue @@ -101,7 +101,8 @@ $route.path === '/agent-template-management' || $route.path === '/ota-management' || $route.path === '/user-management' || - $route.path === '/feature-management', + $route.path === '/feature-management' || + $route.path === '/replacement-word-management' }" @visible-change="handleParamDropdownVisibleChange"> @@ -154,32 +156,6 @@
-
-
- - - - -
-
- {{ $t("header.searchHistory") }} - - {{ $t("header.clearHistory") }} - -
-
-
- {{ item }} - -
-
-
-
-
- {{ userInfo.username || "加载中..." }} @@ -220,12 +196,6 @@ export default { voiceCloneDropdownVisible: false, userMenuVisible: false, // 添加用户菜单可见状态 menuVisibleTimer: null, // 菜单显示定时器,防止够快触发 - isSmallScreen: false, - // 搜索历史相关 - searchHistory: [], - showHistory: false, - SEARCH_HISTORY_KEY: "xiaozhi_search_history", - MAX_HISTORY_COUNT: 3, // Cascader 配置 cascaderProps: { expandTrigger: "click", @@ -351,17 +321,9 @@ export default { }, }, async mounted() { - this.checkScreenSize(); - window.addEventListener("resize", this.checkScreenSize); - // 从localStorage加载搜索历史 - this.loadSearchHistory(); // 等待featureManager初始化完成后再加载功能状态 await this.loadFeatureStatus(); }, - //移除事件监听器 - beforeDestroy() { - window.removeEventListener("resize", this.checkScreenSize); - }, methods: { handleRouter(type) { this.$router.push(this.routerPaths[type]); @@ -371,104 +333,6 @@ export default { // 等待featureManager初始化完成 await featureManager.waitForInitialization(); }, - checkScreenSize() { - this.isSmallScreen = window.innerWidth <= 1386; - }, - // 处理搜索 - handleSearch() { - const searchValue = this.search.trim(); - - // 如果搜索内容为空,触发重置事件 - if (!searchValue) { - this.$emit("search-reset"); - return; - } - - // 保存搜索历史 - this.saveSearchHistory(searchValue); - - // 触发搜索事件,将搜索关键词传递给父组件 - this.$emit("search", searchValue); - - // 搜索完成后让输入框失去焦点,从而触发blur事件隐藏搜索历史 - if (this.$refs.searchInput) { - this.$refs.searchInput.blur(); - } - }, - - // 显示搜索历史 - showSearchHistory() { - this.showHistory = true; - }, - - // 隐藏搜索历史 - hideSearchHistory() { - // 延迟隐藏,以便点击事件能够执行 - setTimeout(() => { - this.showHistory = false; - }, 200); - }, - - // 加载搜索历史 - loadSearchHistory() { - try { - const history = localStorage.getItem(this.SEARCH_HISTORY_KEY); - if (history) { - this.searchHistory = JSON.parse(history); - } - } catch (error) { - console.error("加载搜索历史失败:", error); - this.searchHistory = []; - } - }, - - // 保存搜索历史 - saveSearchHistory(keyword) { - if (!keyword || this.searchHistory.includes(keyword)) { - return; - } - - // 添加到历史记录开头 - this.searchHistory.unshift(keyword); - - // 限制历史记录数量 - if (this.searchHistory.length > this.MAX_HISTORY_COUNT) { - this.searchHistory = this.searchHistory.slice(0, this.MAX_HISTORY_COUNT); - } - - // 保存到localStorage - try { - localStorage.setItem(this.SEARCH_HISTORY_KEY, JSON.stringify(this.searchHistory)); - } catch (error) { - console.error("保存搜索历史失败:", error); - } - }, - - // 选择搜索历史项 - selectSearchHistory(keyword) { - this.search = keyword; - this.handleSearch(); - }, - - // 移除单个搜索历史项 - removeSearchHistory(index) { - this.searchHistory.splice(index, 1); - try { - localStorage.setItem(this.SEARCH_HISTORY_KEY, JSON.stringify(this.searchHistory)); - } catch (error) { - console.error("更新搜索历史失败:", error); - } - }, - - // 清空所有搜索历史 - clearSearchHistory() { - this.searchHistory = []; - try { - localStorage.removeItem(this.SEARCH_HISTORY_KEY); - } catch (error) { - console.error("清空搜索历史失败:", error); - } - }, // 显示修改密码弹窗 showChangePasswordDialog() { this.isChangePasswordDialogVisible = true; @@ -631,11 +495,9 @@ export default { \ No newline at end of file diff --git a/main/manager-web/src/views/VoicePrint.vue b/main/manager-web/src/views/VoicePrint.vue index 839ef8b5..e52f88f7 100644 --- a/main/manager-web/src/views/VoicePrint.vue +++ b/main/manager-web/src/views/VoicePrint.vue @@ -228,7 +228,7 @@ export default { position: relative; flex-direction: column; background-size: cover; - background: linear-gradient(to bottom right, #dce8ff, #e4eeff, #e6cbfd) center; + background: #eff4ff; -webkit-background-size: cover; -o-background-size: cover; overflow: hidden; diff --git a/main/manager-web/src/views/VoiceResourceManagement.vue b/main/manager-web/src/views/VoiceResourceManagement.vue index cf3e9ee9..21bdc8e2 100644 --- a/main/manager-web/src/views/VoiceResourceManagement.vue +++ b/main/manager-web/src/views/VoiceResourceManagement.vue @@ -286,7 +286,7 @@ export default { position: relative; flex-direction: column; background-size: cover; - background: linear-gradient(to bottom right, #dce8ff, #e4eeff, #e6cbfd) center; + background: #eff4ff; -webkit-background-size: cover; -o-background-size: cover; overflow: hidden; diff --git a/main/manager-web/src/views/home.vue b/main/manager-web/src/views/home.vue index 126cf9d1..1ecc9d5b 100644 --- a/main/manager-web/src/views/home.vue +++ b/main/manager-web/src/views/home.vue @@ -1,7 +1,7 @@