Merge pull request #2987 from xinnan-tech/update-agent-style

update: 智能体管理样式优化
This commit is contained in:
DaGou12138
2026-03-06 15:20:57 +08:00
committed by GitHub
8 changed files with 65 additions and 69 deletions
+10 -45
View File
@@ -33,7 +33,7 @@
</div> </div>
<div :class="['settings-btn', { 'disabled-btn': device.memModelId === 'Memory_nomem' }]" <div :class="['settings-btn', { 'disabled-btn': device.memModelId === 'Memory_nomem' }]"
@click="handleChatHistory"> @click="handleChatHistory">
<el-tooltip v-if="device.memModelId === 'Memory_nomem'" :content="$t('home.enableMemory')" placement="top"> <el-tooltip effect="light" v-if="device.memModelId === 'Memory_nomem'" :content="$t('home.enableMemory')" placement="top">
<span>{{ $t('home.chatHistory') }}</span> <span>{{ $t('home.chatHistory') }}</span>
</el-tooltip> </el-tooltip>
<span v-else>{{ $t('home.chatHistory') }}</span> <span v-else>{{ $t('home.chatHistory') }}</span>
@@ -41,11 +41,11 @@
</div> </div>
<div class="version-info"> <div class="version-info">
<div>{{ $t('home.lastConversation') }}{{ formattedLastConnectedTime }}</div> <div>{{ $t('home.lastConversation') }}{{ formattedLastConnectedTime }}</div>
<div ref="scrollRef" class="version-info-scroll"> <el-tooltip :content="tags.join()" placement="top" effect="light">
<div ref="tagsRef" class="version-info-tags"> <div class="version-info-scroll">
<el-tag v-for="(tag, index) in tags" :key="index" size="mini">{{ tag }}</el-tag> {{ tags.join() }}
</div> </div>
</div> </el-tooltip>
</div> </div>
</div> </div>
</template> </template>
@@ -114,25 +114,6 @@ export default {
this.$emit('chat-history', { agentId: this.device.agentId, agentName: this.device.agentName }) this.$emit('chat-history', { agentId: this.device.agentId, agentName: this.device.agentName })
} }
}, },
watch: {
tags: {
handler(newTags) {
if (newTags.length === 0) return;
this.$nextTick(() => {
const scrollWidth = this.$refs.scrollRef.clientWidth;
const tagsWidth = this.$refs.tagsRef.clientWidth;
if (tagsWidth < scrollWidth) {
this.$refs.tagsRef.style.width = '100%';
this.$refs.tagsRef.style.justifyContent = 'flex-end';
} else {
this.$refs.tagsRef.style.width = 'fit-content';
this.$refs.tagsRef.style.justifyContent = 'flex-start';
}
})
},
immediate: true
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -178,34 +159,18 @@ export default {
.version-info { .version-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
margin-top: 15px; margin-top: 15px;
font-size: 12px; font-size: 12px;
color: #979db1; color: #979db1;
font-weight: 400; font-weight: 400;
> div {
&:first-of-type {
margin-top: 5px;
}
}
&-scroll { &-scroll {
height: 26px;
margin-left: 20px; margin-left: 20px;
flex: 1; flex: 1;
overflow-x: auto; overflow: hidden;
padding-bottom: 4px; text-overflow: ellipsis;
&::-webkit-scrollbar { text-wrap: nowrap;
height: 6px; text-align: right;
background: #e6ebff;
}
&::-webkit-scrollbar-thumb {
background: #409EFF;
border-radius: 8px;
}
}
&-tags {
width: fit-content;
display: flex;
gap: 6px;
} }
} }
+2 -3
View File
@@ -463,7 +463,6 @@ export default {
'device.getListFailed': 'Geräteliste konnte nicht abgerufen werden', 'device.getListFailed': 'Geräteliste konnte nicht abgerufen werden',
'device.autoUpdateEnabled': 'Automatische Aktualisierung aktiviert', 'device.autoUpdateEnabled': 'Automatische Aktualisierung aktiviert',
'device.autoUpdateDisabled': 'Automatische Aktualisierung deaktiviert', 'device.autoUpdateDisabled': 'Automatische Aktualisierung deaktiviert',
'device.batchUnbindSuccess': 'Erfolgreich {count} Geräte entbunden',
'device.getFirmwareTypeFailed': 'Firmware-Typ konnte nicht abgerufen werden', 'device.getFirmwareTypeFailed': 'Firmware-Typ konnte nicht abgerufen werden',
'device.deviceStatus': 'Status', 'device.deviceStatus': 'Status',
'device.online': 'Online', 'device.online': 'Online',
@@ -748,7 +747,7 @@ export default {
// Role configuration page text // Role configuration page text
'roleConfig.title': 'Rollenkonfiguration', 'roleConfig.title': 'Rollenkonfiguration',
'roleConfig.addTag': 'Neues Label hinzufügen', 'roleConfig.addTag': 'Neues Label hinzufügen',
'roleConfig.restartNotice': 'Nach dem Speichern der Konfiguration müssen Sie das Gerät neu starten, damit die neue Konfiguration wirksam wird.', 'roleConfig.restartNotice': 'Neustart nach Konfigurationsspeichern zur Aktivierung.',
'roleConfig.saveConfig': 'Konfiguration speichern', 'roleConfig.saveConfig': 'Konfiguration speichern',
'roleConfig.reset': 'Zurücksetzen', 'roleConfig.reset': 'Zurücksetzen',
'roleConfig.agentName': 'Spitzname', 'roleConfig.agentName': 'Spitzname',
@@ -771,7 +770,7 @@ export default {
'roleConfig.ttsRate': 'Geschwindigkeit', 'roleConfig.ttsRate': 'Geschwindigkeit',
'roleConfig.ttsPitch': 'Tonhöhe', 'roleConfig.ttsPitch': 'Tonhöhe',
'roleConfig.ttsAdvanced': 'TTS-Parameter', 'roleConfig.ttsAdvanced': 'TTS-Parameter',
'roleConfig.advancedSettings': 'Erweiterte Einstellungen', 'roleConfig.advancedSettings': 'Sprachgeschwindigkeit',
'roleConfig.volumeHint': '-100=Min, 0=Standard, 100=Max', 'roleConfig.volumeHint': '-100=Min, 0=Standard, 100=Max',
'roleConfig.speedHint': '-100=Langsamste, 0=Standard, 100=Schnellste', 'roleConfig.speedHint': '-100=Langsamste, 0=Standard, 100=Schnellste',
'roleConfig.pitchHint': '-100=Niedrigste, 0=Standard, 100=Höchste', 'roleConfig.pitchHint': '-100=Niedrigste, 0=Standard, 100=Höchste',
+1 -2
View File
@@ -463,7 +463,6 @@ export default {
'device.getListFailed': 'Failed to fetch device list', 'device.getListFailed': 'Failed to fetch device list',
'device.autoUpdateEnabled': 'Auto update enabled', 'device.autoUpdateEnabled': 'Auto update enabled',
'device.autoUpdateDisabled': 'Auto update disabled', 'device.autoUpdateDisabled': 'Auto update disabled',
'device.batchUnbindSuccess': 'Successfully unbound {count} devices',
'device.getFirmwareTypeFailed': 'Failed to fetch firmware type', 'device.getFirmwareTypeFailed': 'Failed to fetch firmware type',
'device.deviceStatus': 'Status', 'device.deviceStatus': 'Status',
'device.online': 'Online', 'device.online': 'Online',
@@ -771,7 +770,7 @@ export default {
'roleConfig.ttsRate': 'Speed', 'roleConfig.ttsRate': 'Speed',
'roleConfig.ttsPitch': 'Pitch', 'roleConfig.ttsPitch': 'Pitch',
'roleConfig.ttsAdvanced': 'TTS Parameters', 'roleConfig.ttsAdvanced': 'TTS Parameters',
'roleConfig.advancedSettings': 'Advanced Settings', 'roleConfig.advancedSettings': 'Speech rate and pitch',
'roleConfig.volumeHint': '-100=Min, 0=Standard, 100=Max', 'roleConfig.volumeHint': '-100=Min, 0=Standard, 100=Max',
'roleConfig.speedHint': '-100=Slowest, 0=Standard, 100=Fastest', 'roleConfig.speedHint': '-100=Slowest, 0=Standard, 100=Fastest',
'roleConfig.pitchHint': '-100=Lowest, 0=Standard, 100=Highest', 'roleConfig.pitchHint': '-100=Lowest, 0=Standard, 100=Highest',
+13 -6
View File
@@ -463,7 +463,6 @@ export default {
'device.getListFailed': 'Falha ao buscar lista de dispositivos', 'device.getListFailed': 'Falha ao buscar lista de dispositivos',
'device.autoUpdateEnabled': 'Atualização automática ativada', 'device.autoUpdateEnabled': 'Atualização automática ativada',
'device.autoUpdateDisabled': 'Atualização automática desativada', 'device.autoUpdateDisabled': 'Atualização automática desativada',
'device.batchUnbindSuccess': '{count} dispositivos desvinculados com sucesso',
'device.getFirmwareTypeFailed': 'Falha ao buscar tipo de firmware', 'device.getFirmwareTypeFailed': 'Falha ao buscar tipo de firmware',
'device.deviceStatus': 'Status', 'device.deviceStatus': 'Status',
'device.online': 'Online', 'device.online': 'Online',
@@ -748,25 +747,33 @@ export default {
// Página de configuração de papel // Página de configuração de papel
'roleConfig.title': 'Configuração de Papel', 'roleConfig.title': 'Configuração de Papel',
'roleConfig.addTag': 'Adicionar Novo Rótulo', 'roleConfig.addTag': 'Adicionar Novo Rótulo',
'roleConfig.restartNotice': 'Após salvar a configuração, é necessário reiniciar o dispositivo para que a nova configuração tenha efeito.', 'roleConfig.restartNotice': 'Reinicie após salvar a configuração para ativação.',
'roleConfig.saveConfig': 'Salvar Configuração', 'roleConfig.saveConfig': 'Salvar Configuração',
'roleConfig.reset': 'Redefinir', 'roleConfig.reset': 'Redefinir',
'roleConfig.agentName': 'Apelido', 'roleConfig.agentName': 'Apelido',
'roleConfig.roleTemplate': 'Modelo', 'roleConfig.roleTemplate': 'Modelo',
'roleConfig.roleIntroduction': 'Introdução', 'roleConfig.roleIntroduction': 'Introdução',
'roleConfig.languageCode': 'Código do Idioma', 'roleConfig.languageCode': 'Código do Idioma',
'roleConfig.language': 'Selecionar Idioma',
'roleConfig.selectLanguage': 'Por favor, selecione o idioma',
'roleConfig.interactionLanguage': 'Idioma de Interação', 'roleConfig.interactionLanguage': 'Idioma de Interação',
'roleConfig.vad': 'Detecção de Voz', 'roleConfig.vad': 'Detecção de Voz',
'roleConfig.asr': 'Reconhecimento de Fala', 'roleConfig.asr': 'Reconhecimento de Fala',
'roleConfig.llm': 'Modelo de Linguagem', 'roleConfig.llm': 'Modelo de Linguagem',
'roleConfig.vllm': 'Modelo de Visão', 'roleConfig.vllm': 'Modelo de Visão',
'roleConfig.tts': 'Texto para Fala', 'roleConfig.intent': 'Reconhecimento de Intenção',
'roleConfig.memoryHis': 'Memória', 'roleConfig.memoryHis': 'Memória',
'roleConfig.memory': 'Modelo de Memória', 'roleConfig.memory': 'Modelo de Memória',
'roleConfig.intent': 'Reconhecimento de Intenção', 'roleConfig.tts': 'Texto para Fala',
'roleConfig.language': 'Linguagem do diálogo',
'roleConfig.selectLanguage': 'Por favor, selecione o idioma',
'roleConfig.voiceType': 'Tipo de Voz', 'roleConfig.voiceType': 'Tipo de Voz',
'roleConfig.ttsVolume': 'Volume',
'roleConfig.ttsRate': 'Velocidade da fala',
'roleConfig.ttsPitch': 'Tonalidade',
'roleConfig.ttsAdvanced': 'Parâmetros TTS',
'roleConfig.advancedSettings': 'Velocidade do som',
'roleConfig.volumeHint': '-100=mínimo, 0=padrão, 100=máximo',
'roleConfig.speedHint': '-100=mais lento, 0=padrão, 100=mais rápido',
'roleConfig.pitchHint': '-100=mínimo, 0=padrão, 100=máximo',
'roleConfig.pleaseEnterContent': 'Por favor, insira o conteúdo', 'roleConfig.pleaseEnterContent': 'Por favor, insira o conteúdo',
'roleConfig.pleaseEnterLangCode': 'Por favor, insira o código do idioma, ex.: pt_BR', 'roleConfig.pleaseEnterLangCode': 'Por favor, insira o código do idioma, ex.: pt_BR',
'roleConfig.pleaseEnterLangName': 'Por favor, insira o idioma de interação, ex.: Português', 'roleConfig.pleaseEnterLangName': 'Por favor, insira o idioma de interação, ex.: Português',
+1 -2
View File
@@ -463,7 +463,6 @@ export default {
'device.getListFailed': 'Không thể tải danh sách thiết bị', 'device.getListFailed': 'Không thể tải danh sách thiết bị',
'device.autoUpdateEnabled': 'Đã bật tự động cập nhật', 'device.autoUpdateEnabled': 'Đã bật tự động cập nhật',
'device.autoUpdateDisabled': 'Đã tắt tự động cập nhật', 'device.autoUpdateDisabled': 'Đã tắt tự động cập nhật',
'device.batchUnbindSuccess': 'Đã hủy liên kết thành công {count} thiết bị',
'device.getFirmwareTypeFailed': 'Không thể lấy loại firmware', 'device.getFirmwareTypeFailed': 'Không thể lấy loại firmware',
'device.deviceStatus': 'Trạng thái', 'device.deviceStatus': 'Trạng thái',
'device.online': 'Trực tuyến', 'device.online': 'Trực tuyến',
@@ -771,7 +770,7 @@ export default {
'roleConfig.ttsRate': 'Tốc độ', 'roleConfig.ttsRate': 'Tốc độ',
'roleConfig.ttsPitch': 'Cao độ', 'roleConfig.ttsPitch': 'Cao độ',
'roleConfig.ttsAdvanced': 'Tham số TTS', 'roleConfig.ttsAdvanced': 'Tham số TTS',
'roleConfig.advancedSettings': 'Cài đặt nâng cao', 'roleConfig.advancedSettings': 'Giọng nói',
'roleConfig.volumeHint': '-100=Tối thiểu, 0=Tiêu chuẩn, 100=Tối đa', 'roleConfig.volumeHint': '-100=Tối thiểu, 0=Tiêu chuẩn, 100=Tối đa',
'roleConfig.speedHint': '-100=Chậm nhất, 0=Tiêu chuẩn, 100=Nhanh nhất', 'roleConfig.speedHint': '-100=Chậm nhất, 0=Tiêu chuẩn, 100=Nhanh nhất',
'roleConfig.pitchHint': '-100=Thấp nhất, 0=Tiêu chuẩn, 100=Cao nhất', 'roleConfig.pitchHint': '-100=Thấp nhất, 0=Tiêu chuẩn, 100=Cao nhất',
+3 -4
View File
@@ -463,7 +463,6 @@ export default {
'device.getListFailed': '获取设备列表失败', 'device.getListFailed': '获取设备列表失败',
'device.autoUpdateEnabled': '已设置成自动升级', 'device.autoUpdateEnabled': '已设置成自动升级',
'device.autoUpdateDisabled': '已关闭自动升级', 'device.autoUpdateDisabled': '已关闭自动升级',
'device.batchUnbindSuccess': '成功解绑 {count} 台设备',
'device.getFirmwareTypeFailed': '获取固件类型失败', 'device.getFirmwareTypeFailed': '获取固件类型失败',
'device.deviceStatus': '状态', 'device.deviceStatus': '状态',
'device.online': '在线', 'device.online': '在线',
@@ -762,16 +761,16 @@ export default {
'roleConfig.vllm': '视觉大模型(VLLM)', 'roleConfig.vllm': '视觉大模型(VLLM)',
'roleConfig.intent': '意图识别(Intent)', 'roleConfig.intent': '意图识别(Intent)',
'roleConfig.memoryHis': '记忆', 'roleConfig.memoryHis': '记忆',
'roleConfig.memory': '记忆模式', 'roleConfig.memory': '记忆模式(Mem)',
'roleConfig.tts': '语音合成(TTS)', 'roleConfig.tts': '语音合成(TTS)',
'roleConfig.language': '选择语言', 'roleConfig.language': '对话语言(Lang)',
'roleConfig.selectLanguage': '请选择语言', 'roleConfig.selectLanguage': '请选择语言',
'roleConfig.voiceType': '声音音色(Voice)', 'roleConfig.voiceType': '声音音色(Voice)',
'roleConfig.ttsVolume': '音量', 'roleConfig.ttsVolume': '音量',
'roleConfig.ttsRate': '语速', 'roleConfig.ttsRate': '语速',
'roleConfig.ttsPitch': '音调', 'roleConfig.ttsPitch': '音调',
'roleConfig.ttsAdvanced': 'TTS参数', 'roleConfig.ttsAdvanced': 'TTS参数',
'roleConfig.advancedSettings': '高级设置', 'roleConfig.advancedSettings': '语速音调',
'roleConfig.volumeHint': '-100=最小, 0=标准, 100=最大', 'roleConfig.volumeHint': '-100=最小, 0=标准, 100=最大',
'roleConfig.speedHint': '-100=最慢, 0=标准, 100=最快', 'roleConfig.speedHint': '-100=最慢, 0=标准, 100=最快',
'roleConfig.pitchHint': '-100=最低, 0=标准, 100=最高', 'roleConfig.pitchHint': '-100=最低, 0=标准, 100=最高',
+3 -4
View File
@@ -463,7 +463,6 @@ export default {
'device.getListFailed': '獲取設備列表失敗', 'device.getListFailed': '獲取設備列表失敗',
'device.autoUpdateEnabled': '已設置成自動升級', 'device.autoUpdateEnabled': '已設置成自動升級',
'device.autoUpdateDisabled': '已關閉自動升級', 'device.autoUpdateDisabled': '已關閉自動升級',
'device.batchUnbindSuccess': '成功解綁 {count} 台設備',
'device.getFirmwareTypeFailed': '獲取固件類型失敗', 'device.getFirmwareTypeFailed': '獲取固件類型失敗',
'device.deviceStatus': '狀態', 'device.deviceStatus': '狀態',
'device.online': '在線', 'device.online': '在線',
@@ -762,16 +761,16 @@ export default {
'roleConfig.vllm': '視覺大模型(VLLM)', 'roleConfig.vllm': '視覺大模型(VLLM)',
'roleConfig.tts': '語音合成(TTS)', 'roleConfig.tts': '語音合成(TTS)',
'roleConfig.memoryHis': '記憶', 'roleConfig.memoryHis': '記憶',
'roleConfig.memory': '記憶模式', 'roleConfig.memory': '記憶模式(Men)',
'roleConfig.intent': '意圖識別(Intent)', 'roleConfig.intent': '意圖識別(Intent)',
'roleConfig.language': '選擇語言', 'roleConfig.language': '選擇語言(Lang)',
'roleConfig.selectLanguage': '請選擇語言', 'roleConfig.selectLanguage': '請選擇語言',
'roleConfig.voiceType': '聲音音色(Voice)', 'roleConfig.voiceType': '聲音音色(Voice)',
'roleConfig.ttsVolume': '音量', 'roleConfig.ttsVolume': '音量',
'roleConfig.ttsRate': '語速', 'roleConfig.ttsRate': '語速',
'roleConfig.ttsPitch': '音調', 'roleConfig.ttsPitch': '音調',
'roleConfig.ttsAdvanced': 'TTS參數', 'roleConfig.ttsAdvanced': 'TTS參數',
'roleConfig.advancedSettings': '高級設置', 'roleConfig.advancedSettings': '語速音調',
'roleConfig.volumeHint': '-100=最小, 0=標準, 100=最大', 'roleConfig.volumeHint': '-100=最小, 0=標準, 100=最大',
'roleConfig.speedHint': '-100=最慢, 0=標準, 100=最快', 'roleConfig.speedHint': '-100=最慢, 0=標準, 100=最快',
'roleConfig.pitchHint': '-100=最低, 0=標準, 100=最高', 'roleConfig.pitchHint': '-100=最低, 0=標準, 100=最高',
+32 -3
View File
@@ -21,6 +21,7 @@
<el-tag <el-tag
v-for="tag in dynamicTags" v-for="tag in dynamicTags"
:key="tag.id" :key="tag.id"
class="custom-tag"
closable closable
:disable-transitions="false" :disable-transitions="false"
@close="handleClose(tag.id)"> @close="handleClose(tag.id)">
@@ -32,12 +33,12 @@
v-model="inputValue" v-model="inputValue"
ref="saveTagInput" ref="saveTagInput"
size="small" size="small"
maxLength="64" maxLength="20"
@keyup.enter.native="handleInputConfirm" @keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm" @blur="handleInputConfirm"
> >
</el-input> </el-input>
<el-button v-else size="small" @click="showInput">+ {{ $t("roleConfig.addTag") }}</el-button> <el-button class="custom-tag-btn" v-else size="small" @click="showInput">+ {{ $t("roleConfig.addTag") }}</el-button>
</div> </div>
<div class="header-actions"> <div class="header-actions">
<div class="hint-text"> <div class="hint-text">
@@ -1261,6 +1262,15 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-radio-group {
.is-active {
.el-radio-button__inner {
&:hover {
color: #fff !important;
}
}
}
}
.welcome { .welcome {
min-width: 900px; min-width: 900px;
height: 100vh; height: 100vh;
@@ -1360,7 +1370,7 @@ export default {
background: #e6ebff; background: #e6ebff;
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
background: #409EFF; background: #5778ff;
border-radius: 8px; border-radius: 8px;
} }
} }
@@ -1422,6 +1432,7 @@ export default {
} }
.form-select { .form-select {
flex: 1;
width: 100%; width: 100%;
height: 36px; height: 36px;
} }
@@ -1702,6 +1713,24 @@ export default {
text-align: center; text-align: center;
padding: 0 8px; padding: 0 8px;
} }
.custom-tag {
background: #e6ebff;
color: #5778ff;
border-radius: 8px;
font-size: 12px;
font-weight: normal;
border: none;
}
.custom-tag-btn {
background: #e6ebff;
color: #5778ff;
border-radius: 8px;
font-weight: normal;
border: 1px solid #e6ebff;
&:hover {
background-color: #d0d8ff;
}
}
.input-new-tag { .input-new-tag {
width: 90px; width: 90px;
&::v-deep(.el-input__inner) { &::v-deep(.el-input__inner) {