diff --git a/.gitignore b/.gitignore index 1f018d373..c195e9f4f 100644 --- a/.gitignore +++ b/.gitignore @@ -146,6 +146,7 @@ tmp .history .DS_Store main/xiaozhi-server/data +main/xiaozhi-server/config/assets/wakeup_words.* main/manager-web/node_modules .config.yaml .secrets.yaml diff --git a/main/manager-web/src/apis/module/user.js b/main/manager-web/src/apis/module/user.js index bf3eea34d..2e9bc6e29 100755 --- a/main/manager-web/src/apis/module/user.js +++ b/main/manager-web/src/apis/module/user.js @@ -206,5 +206,20 @@ export default { }); }).send(); }, + // 删除智能体 + deleteAgent(agentId, callback) { + RequestService.sendRequest() + .url(`${getServiceUrl()}/api/v1/user/agent/${agentId}`) + .method('DELETE') + .success((res) => { + RequestService.clearRequestTime(); + callback(res); + }) + .fail(() => { + RequestService.reAjaxFun(() => { + this.deleteAgent(agentId, callback); + }); + }).send(); + }, } diff --git a/main/manager-web/src/components/DeviceItem.vue b/main/manager-web/src/components/DeviceItem.vue index 912fd9d5d..cb8783886 100644 --- a/main/manager-web/src/components/DeviceItem.vue +++ b/main/manager-web/src/components/DeviceItem.vue @@ -6,7 +6,7 @@
+ style="width: 18px;height: 18px;margin-right: 10px;" @click.stop="handleDelete" />
@@ -44,6 +44,11 @@ export default { }, data() { return { switchValue: false } + }, + methods: { + handleDelete() { + this.$emit('delete', this.device.agentId) + } } } diff --git a/main/manager-web/src/components/EditVoiceDialog.vue b/main/manager-web/src/components/EditVoiceDialog.vue new file mode 100644 index 000000000..b7feb78d0 --- /dev/null +++ b/main/manager-web/src/components/EditVoiceDialog.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/main/manager-web/src/components/HeaderBar.vue b/main/manager-web/src/components/HeaderBar.vue index afd1e1bb8..a8dff30cb 100644 --- a/main/manager-web/src/components/HeaderBar.vue +++ b/main/manager-web/src/components/HeaderBar.vue @@ -8,13 +8,11 @@ 智能体管理 -
- - 控制台 +
+ 用户管理
-
- 设备管理 - +
+ 模型配置
@@ -27,7 +25,7 @@ - {{ userInfo.username || '加载中...' }} + {{ userInfo.username }} 个人中心 @@ -64,10 +62,19 @@ export default { // 跳转到首页 this.$router.push('/') }, + goUserManagement() { + this.$router.push('/user-management') + }, + goModelConfig() { + this.$router.push('/model-config') + }, // 获取用户信息 fetchUserInfo() { userApi.getUserInfo(({data}) => { - this.userInfo = data.data + this.userInfo = { + username: data.data.mobile, // 暂时先使用手机号作为用户名 + mobile: data.data.mobile + } }) }, @@ -117,18 +124,24 @@ export default { } .equipment-management2 { - width: 87px; - height: 22px; - border-radius: 11px; + width: 82px; + height: 24px; + border-radius: 12px; background: #fff; display: flex; justify-content: center; - font-size: 9px; - font-weight: 400; + font-size: 10px; + font-weight: 500; gap: 7px; color: #3d4566; - margin-left: 2px; + margin-left: 1px; align-items: center; + transition: all 0.3s ease; +} + +.equipment-management2.active-tab { + background: #5778ff !important; + color: #fff !important; } .header { @@ -168,28 +181,4 @@ export default { color: #3d4566; } -.console { - width: 90px; - height: 22px; - border-radius: 11px; - background: radial-gradient(50% 50% at 50% 50%, #fff 0%, #e8f0ff 100%); - display: flex; - align-items: center; - justify-content: center; - font-size: 9px; - color: #979db1; - font-weight: 400; - gap: 7px; - margin-left: 15px; -} - -.el-dropdown-link { - cursor: pointer; - color: #5778ff; -} - -.el-icon-arrow-down { - font-size: 12px; -} - diff --git a/main/manager-web/src/components/ModelEditDialog.vue b/main/manager-web/src/components/ModelEditDialog.vue new file mode 100644 index 000000000..09e5570c5 --- /dev/null +++ b/main/manager-web/src/components/ModelEditDialog.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/main/manager-web/src/components/TtsModel.vue b/main/manager-web/src/components/TtsModel.vue new file mode 100644 index 000000000..92b107ed6 --- /dev/null +++ b/main/manager-web/src/components/TtsModel.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/main/manager-web/src/router/index.js b/main/manager-web/src/router/index.js index d3add00ae..6bc588230 100644 --- a/main/manager-web/src/router/index.js +++ b/main/manager-web/src/router/index.js @@ -39,15 +39,30 @@ const routes = [ return import('../views/register.vue') } }, - // 新增设备管理页面路由 + // 设备管理页面路由 { path: '/device-management', name: 'DeviceManagement', component: function () { return import('../views/DeviceManagement.vue') } + }, + // 添加用户管理路由 + { + path: '/user-management', + name: 'UserManagement', + component: function () { + return import('../views/UserManagement.vue') + } + }, + { + path: '/model-config', + name: 'ModelConfig', + component: function () { + return import('../views/ModelConfig.vue') + } + }, - } ] const router = new VueRouter({ diff --git a/main/manager-web/src/views/DeviceManagement.vue b/main/manager-web/src/views/DeviceManagement.vue index 06c4317c6..03939a283 100644 --- a/main/manager-web/src/views/DeviceManagement.vue +++ b/main/manager-web/src/views/DeviceManagement.vue @@ -9,11 +9,11 @@ - - - - - + + + + +