fix(ui): 完善控制台列表并优化企业中心与个人操作

This commit is contained in:
zhanjunhao
2026-11-25 10:05:30 +08:00
parent dd4da99f1d
commit a532b860c8
51 changed files with 1736 additions and 1306 deletions
+48 -15
View File
@@ -1,8 +1,10 @@
import React from 'react';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import OrgPageHeader from './components/OrgPageHeader';
import OrgSubpageTabs from './components/OrgSubpageTabs';
import OrgMySkills from './OrgMySkills';
import OrgMyConnectors from './OrgMyConnectors';
import './org-my-capabilities.css';
/**
* 我的 AI 能力:成员自助视图的合并入口(我的技能 + 业务系统授权)。
@@ -18,21 +20,52 @@ const OrgMyCapabilities = ({
showConnectors = true,
}) => {
const { t } = useTranslation();
const [skillsActionsHost, setSkillsActionsHost] = useState(null);
const [connectorsActionsHost, setConnectorsActionsHost] = useState(null);
return (
<OrgSubpageTabs
tabs={[
showSkills && {
key: 'skills',
label: t('我的技能'),
node: <OrgMySkills orgId={orgId} />,
},
showConnectors && {
key: 'connectors',
label: t('业务系统授权'),
node: <OrgMyConnectors orgId={orgId} />,
},
]}
/>
<main className='uc-page oc-page org-capabilities-page'>
<OrgSubpageTabs
renderHeader={({ key, label, subtitle }) => (
<OrgPageHeader
title={label}
subtitle={subtitle}
actions={
<div
key={key}
ref={
key === 'skills'
? setSkillsActionsHost
: setConnectorsActionsHost
}
/>
}
/>
)}
tabs={[
showSkills && {
key: 'skills',
label: t('我的技能'),
subtitle: t(
'这里展示与任务运行时相同的有效能力集,以及每项技能为什么对你生效。',
),
node: <OrgMySkills orgId={orgId} actionsHost={skillsActionsHost} />,
},
showConnectors && {
key: 'connectors',
label: t('业务系统授权'),
subtitle: t(
'查看专家在任务中可代表你调用的业务系统、方法和确认策略。',
),
node: (
<OrgMyConnectors
orgId={orgId}
actionsHost={connectorsActionsHost}
/>
),
},
]}
/>
</main>
);
};