fix(ui): 完善控制台列表并优化企业中心与个人操作
This commit is contained in:
@@ -3,7 +3,6 @@ import {
|
||||
Button,
|
||||
Input,
|
||||
InputNumber,
|
||||
Modal,
|
||||
Select,
|
||||
TabPane,
|
||||
Tabs,
|
||||
@@ -22,9 +21,11 @@ import {
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import './org-experts.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
import OrgModal from './components/OrgModal';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import OrgStateBlock from './components/OrgStateBlock';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
const { Paragraph } = Typography;
|
||||
|
||||
const emptyForm = {
|
||||
definition_id: 0,
|
||||
@@ -315,45 +316,47 @@ const OrgExperts = ({ orgId }) => {
|
||||
closeGuide();
|
||||
}, [orgId, closeGuide]);
|
||||
return (
|
||||
<main className='org-expert-page'>
|
||||
<header className='org-expert-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<Title heading={3}>{t('企业专家工坊')}</Title>
|
||||
<Paragraph>
|
||||
{t(
|
||||
'从平台安全基线派生不可变版本,配置模型、契约与多步骤交付路径。',
|
||||
)}
|
||||
</Paragraph>
|
||||
</div>
|
||||
<div className='org-expert-hero-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
onClick={() => beginVersion(null)}
|
||||
>
|
||||
{t('创建企业专家')}
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
<main className='uc-page oc-page org-governance-page'>
|
||||
<OrgPageHeader
|
||||
title={t('企业专家工坊')}
|
||||
subtitle={t(
|
||||
'从平台安全基线派生不可变版本,配置模型、契约与多步骤交付路径。',
|
||||
)}
|
||||
actions={
|
||||
<>
|
||||
<Button theme='solid' onClick={() => beginVersion(null)}>
|
||||
{t('创建企业专家')}
|
||||
</Button>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<PageGuidePill guide={guide} />
|
||||
<PageGuideDrawer guide={guide} />
|
||||
|
||||
<section className='org-expert-grid'>
|
||||
{definitions.length === 0 ? (
|
||||
<div className='org-expert-empty'>
|
||||
<strong>{t('尚未创建企业专家')}</strong>
|
||||
<Text type='tertiary'>
|
||||
{t('选择一个平台专家作为安全来源开始派生。')}
|
||||
</Text>
|
||||
</div>
|
||||
) : (
|
||||
definitions.map((view) => (
|
||||
{definitions.length === 0 ? (
|
||||
<OrgPanel flush padding='p-0'>
|
||||
<OrgStateBlock
|
||||
loading={!loaded}
|
||||
title={t('尚未创建企业专家')}
|
||||
description={t('选择一个平台专家作为安全来源开始派生。')}
|
||||
/>
|
||||
</OrgPanel>
|
||||
) : (
|
||||
<section className='org-expert-grid'>
|
||||
{definitions.map((view) => (
|
||||
<OrgPanel
|
||||
key={view.definition.id}
|
||||
className='org-expert-card'
|
||||
flush
|
||||
padding='p-4'
|
||||
bodyClassName='org-expert-card-body'
|
||||
title={view.current?.name_zh || view.definition.expert_key}
|
||||
actions={<Tag color='green'>{view.definition.status}</Tag>}
|
||||
actions={
|
||||
<Tag variant='filled' color='green'>
|
||||
{view.definition.status}
|
||||
</Tag>
|
||||
}
|
||||
>
|
||||
<Paragraph>
|
||||
{view.current?.description_zh || t('等待首个版本发布')}
|
||||
@@ -362,24 +365,30 @@ const OrgExperts = ({ orgId }) => {
|
||||
{(view.versions || []).map((version) => (
|
||||
<div key={version.id}>
|
||||
<span>v{version.version}</span>
|
||||
<Tag>{version.status}</Tag>
|
||||
<Tag variant='filled'>{version.status}</Tag>
|
||||
{version.status === 'draft' && (
|
||||
<Button size='small' onClick={() => submit(version.id)}>
|
||||
<Button
|
||||
type='link'
|
||||
size='small'
|
||||
onClick={() => submit(version.id)}
|
||||
>
|
||||
{t('提交审核')}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<Button onClick={() => beginVersion(view)}>
|
||||
{t('创建新版本')}
|
||||
</Button>
|
||||
<div className='org-expert-card-actions'>
|
||||
<Button onClick={() => beginVersion(view)}>
|
||||
{t('创建新版本')}
|
||||
</Button>
|
||||
</div>
|
||||
</OrgPanel>
|
||||
))
|
||||
)}
|
||||
</section>
|
||||
))}
|
||||
</section>
|
||||
)}
|
||||
|
||||
<Modal
|
||||
<OrgModal
|
||||
title={form.definition_id ? t('创建专家新版本') : t('创建企业专家')}
|
||||
visible={open}
|
||||
onCancel={() => setOpen(false)}
|
||||
@@ -388,7 +397,7 @@ const OrgExperts = ({ orgId }) => {
|
||||
width={880}
|
||||
className='org-expert-modal'
|
||||
>
|
||||
<Tabs type='line'>
|
||||
<Tabs type='line' className='org-expert-editor-tabs'>
|
||||
<TabPane tab={t('身份与模型')} itemKey='identity'>
|
||||
<div className='org-expert-form-grid'>
|
||||
<label>
|
||||
@@ -621,7 +630,7 @@ const OrgExperts = ({ orgId }) => {
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</Modal>
|
||||
</OrgModal>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user