From bbcdaa7ab2df0b49e570ac506ee96b3f7117cc7f Mon Sep 17 00:00:00 2001 From: tanlianwang Date: Fri, 20 Mar 2026 11:06:02 +0800 Subject: [PATCH 1/8] =?UTF-8?q?chore(build):=20=E6=B8=85=E7=90=86=E8=BF=87?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E9=9D=99=E6=80=81=E8=B5=84=E6=BA=90=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 backend/static/admin 目录下的 404 样式文件 - 删除 static/admin/admin 目录下的 404 样式文件 - 删除 static/admin/chat 目录下的 404 样式文件 - 删除各个静态目录下过时的 500 错误页面 JS 文件 - 移除多个 channel 相关的 JS 模块文件 - 清理 admin 和 chat 相关的静态资源文件 --- config.yaml | 2 +- ui/src/api/system-settings/system-config.ts | 2 +- ui/src/views/mindmap/index.vue | 23 ++++++++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index 3f7070adc..56afa8f1a 100644 --- a/config.yaml +++ b/config.yaml @@ -44,4 +44,4 @@ SESSION_TIMEOUT: 28800 SANDBOX_PYTHON_PACKAGE_PATHS: /opt/py3/lib/python3.11/site-packages,/opt/maxkb-app/sandbox/python-packages,/opt/maxkb/python-packages # 思维导图服务配置 -MINDMAP_URL: http://10.100.52.76:3000/ \ No newline at end of file +MINDMAP_URL: http://10.100.52.43:9898/ \ No newline at end of file diff --git a/ui/src/api/system-settings/system-config.ts b/ui/src/api/system-settings/system-config.ts index fa5c88adc..6d0de914d 100644 --- a/ui/src/api/system-settings/system-config.ts +++ b/ui/src/api/system-settings/system-config.ts @@ -6,7 +6,7 @@ import { type Ref } from 'vue' * 获取系统配置 */ const getSystemConfig: (loading?: Ref) => Promise> = (loading) => { - return get('/config', undefined, loading) + return get('/system_manage/config', undefined, loading) } export default { diff --git a/ui/src/views/mindmap/index.vue b/ui/src/views/mindmap/index.vue index 710a402ac..d20d5fa7a 100644 --- a/ui/src/views/mindmap/index.vue +++ b/ui/src/views/mindmap/index.vue @@ -1,6 +1,12 @@ +
+ {{ $t('chat.comprehensiveScore') }} + {{ formattedComprehensiveScore }} +
+ diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index 209fdb614..5aff435dd 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -93,7 +93,15 @@ + + + + +
@@ -101,12 +109,14 @@ + diff --git a/ui/src/views/chat-log/index.vue b/ui/src/views/chat-log/index.vue index 0d6b89e70..c484af832 100644 --- a/ui/src/views/chat-log/index.vue +++ b/ui/src/views/chat-log/index.vue @@ -163,6 +163,14 @@ + + + + + +
-
+
diff --git a/ui/src/locales/lang/en-US/views/system.ts b/ui/src/locales/lang/en-US/views/system.ts index 1f5aabebb..e219fe03f 100644 --- a/ui/src/locales/lang/en-US/views/system.ts +++ b/ui/src/locales/lang/en-US/views/system.ts @@ -153,6 +153,53 @@ export default { }, }, }, + policy: { + title: 'Policy Management', + configTab: 'Policy Config', + recordTab: 'Application Records', + createPolicy: 'Create Policy', + editPolicy: 'Edit Policy', + applyPolicy: 'Apply Policy', + applySuccess: 'Policy applied successfully', + selectedPolicy: 'Policy', + policyName: 'Policy Name', + policyNameRequired: 'Enter the policy name', + policyContent: 'Policy Content', + description: 'Description', + effectiveTime: 'Effective Time', + applicationCount: 'Applications', + lastAppliedTime: 'Last Applied', + accessTimeLimit: 'Access Time Limit', + weekdays: 'Weekdays', + accessPeriod: 'Access Period', + startTime: 'Start Time', + endTime: 'End Time', + deviceTypes: 'Device Types', + regions: 'Regions', + searchPolicyPlaceholder: 'Search policy name', + searchRecordPolicyPlaceholder: 'Search policy name', + searchRecordTargetPlaceholder: 'Search target name or identifier', + allStatus: 'All Statuses', + deletePolicyTip: 'Delete policy "{name}"? It cannot be applied after deletion.', + unlimited: 'Unlimited', + targetType: 'Target Type', + targetTypeRequired: 'Select a target type', + targetName: 'Target', + targetNameRequired: 'Enter the target name', + targetIdentifier: 'Target Identifier', + operator: 'Operator', + applyTime: 'Apply Time', + remark: 'Remark', + device: 'Device', + service: 'Service', + monday: 'Mon', + tuesday: 'Tue', + wednesday: 'Wed', + thursday: 'Thu', + friday: 'Fri', + saturday: 'Sat', + sunday: 'Sun', + }, resourceAuthorization: { title: 'Resource Authorization', diff --git a/ui/src/locales/lang/zh-CN/views/system.ts b/ui/src/locales/lang/zh-CN/views/system.ts index a08a502b1..31591e2c4 100644 --- a/ui/src/locales/lang/zh-CN/views/system.ts +++ b/ui/src/locales/lang/zh-CN/views/system.ts @@ -155,6 +155,53 @@ export default { }, }, }, + policy: { + title: '策略管理', + configTab: '策略配置', + recordTab: '应用记录', + createPolicy: '创建策略', + editPolicy: '编辑策略', + applyPolicy: '应用策略', + applySuccess: '策略应用成功', + selectedPolicy: '当前策略', + policyName: '策略名称', + policyNameRequired: '请输入策略名称', + policyContent: '策略内容', + description: '策略描述', + effectiveTime: '生效时间', + applicationCount: '应用次数', + lastAppliedTime: '最近应用时间', + accessTimeLimit: '访问时段限制', + weekdays: '允许星期', + accessPeriod: '访问时段', + startTime: '开始时间', + endTime: '结束时间', + deviceTypes: '设备类型限制', + regions: '区域限制', + searchPolicyPlaceholder: '请输入策略名称', + searchRecordPolicyPlaceholder: '请输入策略名称', + searchRecordTargetPlaceholder: '请输入应用对象名称或标识', + allStatus: '全部状态', + deletePolicyTip: '确认删除策略“{name}”吗?删除后将无法继续应用该策略。', + unlimited: '不限', + targetType: '应用对象类型', + targetTypeRequired: '请选择应用对象类型', + targetName: '应用对象', + targetNameRequired: '请输入应用对象名称', + targetIdentifier: '对象标识', + operator: '操作人员', + applyTime: '应用时间', + remark: '备注', + device: '设备', + service: '服务', + monday: '周一', + tuesday: '周二', + wednesday: '周三', + thursday: '周四', + friday: '周五', + saturday: '周六', + sunday: '周日', + }, resourceAuthorization: { title: '资源授权', member: '成员', diff --git a/ui/src/locales/lang/zh-Hant/views/system.ts b/ui/src/locales/lang/zh-Hant/views/system.ts index b59aef67f..a367fd185 100644 --- a/ui/src/locales/lang/zh-Hant/views/system.ts +++ b/ui/src/locales/lang/zh-Hant/views/system.ts @@ -1,5 +1,6 @@ export default { title: '系統設置', + subTitle: '系統設置', test: '測試連線', testSuccess: '測試連線成功', testFailed: '測試連線失敗', @@ -153,6 +154,53 @@ export default { }, }, }, + policy: { + title: '策略管理', + configTab: '策略配置', + recordTab: '應用記錄', + createPolicy: '創建策略', + editPolicy: '編輯策略', + applyPolicy: '應用策略', + applySuccess: '策略應用成功', + selectedPolicy: '當前策略', + policyName: '策略名稱', + policyNameRequired: '請輸入策略名稱', + policyContent: '策略內容', + description: '策略描述', + effectiveTime: '生效時間', + applicationCount: '應用次數', + lastAppliedTime: '最近應用時間', + accessTimeLimit: '訪問時段限制', + weekdays: '允許星期', + accessPeriod: '訪問時段', + startTime: '開始時間', + endTime: '結束時間', + deviceTypes: '設備類型限制', + regions: '區域限制', + searchPolicyPlaceholder: '請輸入策略名稱', + searchRecordPolicyPlaceholder: '請輸入策略名稱', + searchRecordTargetPlaceholder: '請輸入應用對象名稱或標識', + allStatus: '全部狀態', + deletePolicyTip: '確認刪除策略“{name}”嗎?刪除後將無法繼續應用該策略。', + unlimited: '不限', + targetType: '應用對象類型', + targetTypeRequired: '請選擇應用對象類型', + targetName: '應用對象', + targetNameRequired: '請輸入應用對象名稱', + targetIdentifier: '對象標識', + operator: '操作人員', + applyTime: '應用時間', + remark: '備註', + device: '設備', + service: '服務', + monday: '週一', + tuesday: '週二', + wednesday: '週三', + thursday: '週四', + friday: '週五', + saturday: '週六', + sunday: '週日', + }, resourceAuthorization: { title: '資源授權', diff --git a/ui/src/router/modules/system.ts b/ui/src/router/modules/system.ts index a38198db7..c95ca2497 100644 --- a/ui/src/router/modules/system.ts +++ b/ui/src/router/modules/system.ts @@ -614,6 +614,21 @@ const systemRouter = { }, component: () => import('@/views/system-setting/menu/index.vue'), }, + { + path: '/system/setting/policy', + name: 'SystemPolicyManagement', + meta: { + title: 'views.system.policy.title', + activeMenu: '/system', + parentPath: '/system', + parentName: 'system', + sameRoute: 'setting', + permission: [ + new ComplexPermission([RoleConst.ADMIN], [PermissionConst.USER_READ], [], 'OR'), + ], + }, + component: () => import('@/views/system-setting/policy/index.vue'), + }, { path: '/system/email', name: 'email', diff --git a/ui/src/views/system-setting/policy/index.vue b/ui/src/views/system-setting/policy/index.vue new file mode 100644 index 000000000..6342fcd46 --- /dev/null +++ b/ui/src/views/system-setting/policy/index.vue @@ -0,0 +1,633 @@ + + + + +