fix(ui): 完善控制台列表并优化企业中心与个人操作
This commit is contained in:
+138
-1
@@ -10,6 +10,22 @@
|
||||
|
||||
## 2026-11-24
|
||||
|
||||
### 修复 · 控制台会员列表与弹窗
|
||||
|
||||
- **范围**:控制台 `/console/subscription` 的会员列表、新建与编辑会员卡弹窗。
|
||||
- **变更**:列表卡补充「会员列表」标题,快捷筛选移到标题之后。操作列沿用用户列表的「编辑」和「更多」,额度与金额右对齐。新建和编辑弹窗的主按钮统一为「确定」,桌面宽度调整为 575px。
|
||||
- **影响**:有效会员行可正常渲染。补发额度从「更多」进入确认弹窗,原有筛选和会员操作仍使用原接口。
|
||||
- **回滚**:还原会员页的工具栏、操作列、弹窗和对应翻译。
|
||||
- **关联**:`src/pages/Subscription/index.jsx`、`src/i18n/locales/`、`docs/standards/UI_COMPONENT_STANDARDS.md`。
|
||||
|
||||
### 调整 · 顶栏推广海报预览
|
||||
|
||||
- **范围**:顶栏「推广分享」弹窗的「海报分享」页签。
|
||||
- **变更**:模板色铺满海报预览区,色块、预览和 PNG 导出共用配色。通过 CSS 隐藏海报页签的奖励规则入口。
|
||||
- **影响**:切换模板时整块预览同步换色,「链接分享」页签仍可打开奖励规则。
|
||||
- **回滚**:还原推广弹窗的模板配色与奖励入口显隐样式。
|
||||
- **关联**:`src/components/promotion/PromotionPosterModal.jsx`、`src/components/promotion/promotion-poster.css`。
|
||||
|
||||
### 调整 · Playwright 默认覆盖两档移动视口
|
||||
|
||||
- **范围**:项目 Playwright 配置与设备环境校验。
|
||||
@@ -18,6 +34,46 @@
|
||||
- **回滚**:从默认项目与设备配置移除 393×851 项目,并恢复对应断言。
|
||||
- **关联**:`playwright.config.js`、`scripts/browser-environment.mjs`、`scripts/ui-review/config.json`。
|
||||
|
||||
### 修复 · 企业设置的数据库密码表单
|
||||
|
||||
- **范围**:企业设置「提示词采集」的数据库连接配置。
|
||||
- **变更**:将数据库连接字段放入原生表单,为数据库用户名和密码指定自动填充属性。
|
||||
- **影响**:消除 Chrome 对数据库凭据字段的表单和自动填充警告。
|
||||
- **回滚**:还原数据库连接配置表单的 `component` 属性和两个凭据字段的 `autoComplete` 属性。
|
||||
- **关联**:`src/pages/Organization/OrgSettings.jsx`。
|
||||
|
||||
### 修复 · 渠道自动禁用开关初始化
|
||||
|
||||
- **范围**:控制台渠道管理的新建和编辑渠道表单。
|
||||
- **变更**:表单统一初始化「是否自动禁用」,详情返回的 0 和 1 转为开关使用的布尔值。
|
||||
- **影响**:消除 `auto_ban` 重复初始化警告,提交仍使用 0 或 1。
|
||||
- **回滚**:还原自动禁用开关的初始化配置。
|
||||
- **关联**:`src/components/table/channels/modals/EditChannelModal.jsx`。
|
||||
|
||||
### 调整 · 企业设置数据安全页签间距
|
||||
|
||||
- **范围**:企业设置「数据安全」的子页签。
|
||||
- **变更**:去掉子页签叠加的顶部内边距,沿用设置卡的 24px 内容间距。
|
||||
- **影响**:子页签文字与「登录与安全」的内容标题从相同高度开始。
|
||||
- **回滚**:移除企业设置对子页签顶部内边距的覆盖。
|
||||
- **关联**:`src/styles/org-center.css`。
|
||||
|
||||
### 调整 · 编辑标签的请求头变量提示
|
||||
|
||||
- **范围**:控制台渠道管理的「编辑标签」抽屉。
|
||||
- **变更**:将「支持变量」与渠道密钥占位符合并为一行,使用相同的字体和样式。
|
||||
- **影响**:请求头模板仍使用 `{api_key}`,表单行为保持原样。
|
||||
- **回滚**:还原请求头变量提示的布局。
|
||||
- **关联**:`src/components/table/channels/modals/EditTagModal.jsx`。
|
||||
|
||||
### 调整 · 渠道列表复选框与创建入口
|
||||
|
||||
- **范围**:控制台 `/console/channel` 的普通列表和标签聚合模式。
|
||||
- **变更**:多选复选框固定在表格左侧,「创建渠道」移到列表工具栏右侧、列设置按钮左边。
|
||||
- **影响**:窄屏横向滚动时仍可选择渠道,标签分组行保持不可选。创建权限和弹窗沿用原流程。
|
||||
- **回滚**:还原多选列的固定配置,并将创建按钮移回分类页签区域。
|
||||
- **关联**:`src/components/table/channels/ChannelsTable.jsx`、`src/components/table/channels/index.jsx`、`src/components/table/channels/ChannelsTabs.jsx`。
|
||||
|
||||
### 调整 · 表格日期范围与自动搜索
|
||||
|
||||
- **范围**:控制台、企业中心、用户中心的表格筛选区。
|
||||
@@ -26,10 +82,91 @@
|
||||
- **回滚**:按受影响页面恢复筛选事件和列表请求,并还原表格日期和搜索公共入口。
|
||||
- **关联**:`docs/standards/UI_COMPONENT_STANDARDS.md` 第 4、6 节,`src/hooks/common/useFilterSearch.js`。
|
||||
|
||||
### 调整 · 控制台预约、渠道与企业列表
|
||||
|
||||
- **范围**:控制台 `/console/demo-reservations`、`/console/channel`、`/console/organizations`。
|
||||
- **变更**:预约列表将「状态」改为「是否已响应」,两态开关隐藏内部文字。开启时确认「是否进行响应」,关闭时确认「是否取消响应」。渠道列表固定 ID 和名称,企业列表固定 ID 和企业名称。
|
||||
- **影响**:渠道及企业列表的操作列固定在右侧,多选框和其他未固定列在表格内横向滚动。窄屏空间不足时,左侧列参与滚动,为右侧操作和表格内容留出空间。预约开关沿用原确认流程。
|
||||
- **回滚**:还原预约表头和开关配置,以及渠道、企业列表的固定列配置。
|
||||
- **关联**:`src/pages/DemoReservations/index.jsx`、`src/components/table/channels/ChannelsTable.jsx`、`src/pages/AdminOrganizations/index.jsx`。
|
||||
|
||||
### 调整 · 业务系统授权标题
|
||||
|
||||
- **范围**:`/org/my-capabilities?tab=connectors`。
|
||||
- **变更**:主标题改为「业务系统授权」,与页签共用文案。
|
||||
- **影响**:两个页签的主标题都使用各自的页签名称。
|
||||
- **回滚**:恢复主标题单独配置。
|
||||
- **关联**:`src/pages/Organization/OrgMyCapabilities.jsx`。
|
||||
|
||||
### 调整 · 我的 AI 能力页签位置
|
||||
|
||||
- **范围**:企业中心 `/org/my-capabilities`。
|
||||
- **变更**:将「我的技能」「业务系统授权」页签移到通用页头下方,统一页签和正文的左右边距。
|
||||
- **影响**:切换后展示当前页签对应的标题、说明和使用指引,旧路由和模块开关沿用原逻辑。
|
||||
- **回滚**:还原合并页的页头渲染方式和两个子页的页头。
|
||||
- **关联**:`src/pages/Organization/OrgMyCapabilities.jsx`、`src/pages/Organization/OrgMySkills.jsx`、`src/pages/Organization/OrgMyConnectors.jsx`。
|
||||
|
||||
### 调整 · 企业云端大脑界面与导航
|
||||
|
||||
- **范围**:企业中心 `/org/cloud-brain` 的页头、页签和工作区布局。
|
||||
- **变更**:与体验中心云端大脑共用页头与线型页签,统一内容边距、图标和操作区排布。页签支持方向键移动焦点和键盘确认。
|
||||
- **影响**:保留企业专家管理、项目关联、专家卡片与任务流程。管理面板可通过「完成管理」或选择页签返回工作区。
|
||||
- **回滚**:还原企业页头和页签分支及对应样式。
|
||||
- **关联**:`src/pages/CloudBrain/index.jsx`、`src/pages/CloudBrain/cloud-brain.css`、`src/pages/ExperienceCenter/components/ExperiencePageHeader.jsx`。
|
||||
|
||||
### 调整 · 企业知识页页头、引导间距与保存文案
|
||||
|
||||
- **范围**:企业中心 `/org/knowledge`。
|
||||
- **变更**:页头对齐体验中心云端大脑,移除「企业可信知识层」标签,将 BETA 徽标移至「企业知识」标题右侧。「快速上手」提示条上方增加 12px 留白,两个知识库弹窗的主按钮统一为「保存」。
|
||||
- **影响**:页头使用统一的面包屑、标题和说明布局,两个弹窗沿用各自的提交逻辑。
|
||||
- **回滚**:还原原页头、提示条外边距和两个弹窗的确认按钮文案。
|
||||
- **关联**:`src/pages/Organization/OrgKnowledge.jsx`、`src/pages/Organization/org-knowledge.css`。
|
||||
|
||||
### 调整 · 企业调用质量页头
|
||||
|
||||
- **范围**:企业中心调用质量页。
|
||||
- **变更**:移除主标题上方重复的「调用质量」标签,使用通用企业页头。
|
||||
- **影响**:主标题和说明对齐企业中心规范,面包屑与使用指引保留原入口。
|
||||
- **回滚**:还原调用质量页头及对应的局部样式。
|
||||
- **关联**:`src/pages/Organization/OrgQuality.jsx`、`src/pages/Organization/org-quality.css`、`src/styles/org-page.css`。
|
||||
|
||||
### 修复 · 企业技能治理快速上手条
|
||||
|
||||
- **范围**:企业专家工坊、分发与锁定和业务系统连接器的快速上手条。
|
||||
- **变更**:网格内容从顶部按自然高度排列,连接器的快速上手条到页签导航的间距缩为 8px。
|
||||
- **影响**:内容较少时,页头、引导条与下方内容保持紧凑,引导条继续打开原有抽屉。
|
||||
- **回滚**:移除共用网格的顶部对齐声明和连接器页签的间距覆盖。
|
||||
- **关联**:`src/styles/org-page.css`、`src/pages/Organization/OrgConnectors.jsx`、`src/pages/Organization/org-connectors.css`。
|
||||
|
||||
### 调整 · 企业 Agent 任务审计
|
||||
|
||||
- **范围**:企业中心 `/org/agent-audit` 的任务元数据、待对账、安全策略及正文弹窗。
|
||||
- **变更**:任务卡片区分运行与计费状态,补充页签计数、空状态、表单标签与保存反馈,支持窄屏读取长编号。
|
||||
- **影响**:审计入口、筛选分页、策略保留和正文二次确认继续使用现有接口与权限。操作反馈沿用系统主题色,状态标签保留语义色。
|
||||
- **回滚**:还原该页组件、页面样式、原专家样式中的审计规则和对应语言项。
|
||||
- **关联**:`src/pages/Organization/OrgAgentAudit.jsx`、`src/pages/Organization/org-agent-audit.css`、`docs/ui/ORG_CENTER_SPEC.md`。
|
||||
|
||||
### 修复 · 个人密钥保存失败后保留表单
|
||||
|
||||
- **范围**:用户中心密钥管理的新建和编辑抽屉。
|
||||
- **变更**:保存失败时保留分组及其他输入,结束提交时统一恢复按钮状态。
|
||||
- **影响**:用户可以在原表单上修正信息或直接重试,继续沿用原有密钥接口。
|
||||
- **回滚**:还原密钥表单提交结束时的重置逻辑。
|
||||
- **关联**:`src/components/table/tokens/modals/EditTokenModal.jsx`。
|
||||
|
||||
### 调整 · 企业技能治理页面布局
|
||||
|
||||
- **范围**:分发与锁定、企业专家工坊、业务系统连接器。
|
||||
- **变更**:统一页头、主操作、列表卡片和表单弹层。整理成员预览、专家版本与连接器卡片,补齐连接器页签空态。
|
||||
- **影响**:页面权限、接口和已有治理操作沿用原流程。
|
||||
- **回滚**:还原三个页面及相关样式的布局改动。
|
||||
- **关联**:`src/pages/Organization/OrgSkillAssignments.jsx`、`src/pages/Organization/OrgExperts.jsx`、`src/pages/Organization/OrgConnectors.jsx`。
|
||||
|
||||
### 调整 · 企业技能中心布局
|
||||
|
||||
- **范围**:企业中心技能库与自研 Skill。
|
||||
- **变更**:统一页头与页签顺序,整理技能操作区、引入目录与自研技能表单标签。
|
||||
- **布局细节**:企业技能库与自研 Skill 的操作按钮统一放在当前页头右侧,与分发与锁定页一致。自研 Skill 的快速上手贴近页签。
|
||||
- **影响**:两种页签继续使用原有路由参数、权限及技能治理操作。
|
||||
- **回滚**:还原技能中心、两个子页与共用页签容器的对应布局改动。
|
||||
- **关联**:`src/pages/Organization/OrgSkillCenter.jsx`、`src/pages/Organization/org-skills.css`。
|
||||
@@ -37,7 +174,7 @@
|
||||
### 修复 · 企业质量维度分布提示栏对齐
|
||||
|
||||
- **范围**:企业中心质量监控「维度分布」的六个页签。
|
||||
- **变更**:提示图标与文案整体水平居中,两者垂直居中对齐,窄屏文案换行时保持居中。
|
||||
- **变更**:图标和文案从提示栏左侧内边距起排,两者垂直居中对齐,间距为 6px。窄屏换行后文案各行左对齐。
|
||||
- **影响**:仅调整企业端维度分布提示栏的布局,覆盖警告和信息提示。
|
||||
- **回滚**:移除企业端维度分布提示栏的居中样式。
|
||||
- **关联**:`src/components/quality/quality.css`。
|
||||
|
||||
@@ -162,7 +162,7 @@ html.dark .km-page {
|
||||
- 每列显式 `width`,长文本 `ellipsis` 并配 `Tooltip`;金额与数量右对齐;时间统一格式,必要时日期与时间分两行。
|
||||
- 状态列用只读 `Tag` 或 `TableStatusSwitch`(见第 11 节);启停开关请求中禁用,失败恢复原状态。
|
||||
- 调用、计费和访问权限分组列使用 `TableGroupTags`,单组与多组按同一套颜色渲染(见第 11 节)。
|
||||
- 操作列放在最后,标题固定为“操作”,按钮为 `type='link' size='small'`,同一行操作间距 8px;用户中心、企业中心、控制台(含系统设置)的操作列统一 `fixed: 'right'`。`/console/user` 的用户列表和 `/console/commission?view=partners` 的合作伙伴列表使用 `TableRowActions`:直出高频动作,其余放进带下箭头的文字“更多”菜单。其他列表沿用既有操作呈现方式,不批量套用此菜单。菜单点击打开、右对齐,无有效菜单项时不渲染入口;危险项置末、标记 `danger` 并保留业务确认。现有权限、状态限制、禁用项和回调不得因收纳而改变,方向键、Enter、Escape 可操作菜单。
|
||||
- 操作列放在最后,标题固定为“操作”,按钮为 `type='link' size='small'`,同一行操作间距 8px;用户中心、企业中心、控制台(含系统设置)的操作列统一 `fixed: 'right'`。`/console/user` 的用户列表、`/console/subscription` 的会员列表和 `/console/commission?view=partners` 的合作伙伴列表使用 `TableRowActions`:直出高频动作,其余放进带下箭头的文字“更多”菜单。其他列表沿用既有操作呈现方式,不批量套用此菜单。菜单点击打开、右对齐,无有效菜单项时不渲染入口;危险项置末、标记 `danger` 并保留业务确认。现有权限、状态限制、禁用项和回调不得因收纳而改变,方向键、Enter、Escape 可操作菜单。
|
||||
- 三中心表格通过 `CenterActionTable` 统一处理,最后一列存在创建、查看、编辑、测试、详情、删除、添加、设置、配置、弹窗 / 抽屉或请求交互时,列头统一显示“操作”并固定右侧,宽度按按钮 / 交互数量计算。没有操作列但估算列宽超出容器时,从右侧固定末 4 列,列数不足时降为 3、2、1 列。固定列使用不透明底色并保持表头层级;横向滚动条遵循 Ant Design 官方固定列表格行为,允许鼠标、触控板、触屏和键盘滚动,不隐藏滚动条。
|
||||
- 列显隐只在已有列设置的表格中提供,统一使用 `ColumnSettings`(见 `docs/ui/TABLE_COLUMN_SETTINGS_SPEC.md`)。
|
||||
- 三中心表头背景统一由 `center-table.css` 绘制:页面通过 `--center-table-head-bg` 提供色调,公共层在不透明的容器底色上叠加同色填充,普通列与固定列保持一致;页面不再直接覆盖表头 `background`。固定列使用 antd 6 的 `.ant-table-cell-fix` 与原生动态层级,不写死 `z-index`,不使用旧版 `fix-left` / `fix-right` 类名补丁;表头不换行,表头与正文沿用同一列宽和对齐方式。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 企业中心 UI 规范(/org/\*)
|
||||
|
||||
> 状态:有效 · 适用:antd 6.7.0 · 更新:2026-11-18 · 版本:v2.3
|
||||
> 状态:有效 · 适用:antd 6.7.0 · 更新:2026-11-24 · 版本:v2.4
|
||||
|
||||
企业中心 12 个目标页的规范:企业中心变量、通用组件的企业中心变体与各页面规则。
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
| 项目管理 | `OrgListCard` + link 操作(模型 / 分组 / 成员 / 密钥 / 编辑);状态开关 | 操作列不再显示“停用” |
|
||||
| 预算中心 | `.oc-policy` 固定说明条;列宽 300 / 110 / 260 / 120 / 120 / 130;状态开关 | 已加载数据前端分页 |
|
||||
| 审批中心 | 状态页签(回调 `setStatusFilter`)+ 申请列表卡;拒绝弹窗竖排表单项 | — |
|
||||
| Agent 任务审计 | 保留页头状态筛选、任务元数据 / 待对账 / 安全策略三个页签。记录按卡片排列,任务状态和计费状态使用独立标签,弹窗使用 `OrgModal` | 正文必须填写有效审计原因并经二次确认。页签计数、操作和焦点使用系统品牌色,状态标签使用语义色。窄屏按单列排列卡片,长编号换行 |
|
||||
| 密钥管理 | 密钥框 + 显隐 / 复制、可用模型 link、分组列、状态开关、绝对时间;列设置用共享组件;创建 / 编辑为 560px `OrgSideSheet` | 列设置只在当前页面生效;非操作列整体横向滚动,仅在可见列宽度超过容器时显示滚动条 |
|
||||
| 企业充值 | 企业钱包 + 充值工作区(额度卡 / 自定义 / 支付方式)+ 订单卡 + 记录;订单“立即充值”与支付方式点击同为 `handlePreTopUp` | 档位与折扣来自后台配置;无订单号搜索与发票入口 |
|
||||
| 消耗明细 | 统计卡 + 页签(明细日志 / 成员排行 / 绘图与视频)+ 消费记录样式筛选卡 + 列表卡;查询按钮为“搜索”(`handleSearch`) | 见第 5 节 |
|
||||
|
||||
@@ -24,43 +24,24 @@ const { Text, Title, Paragraph } = Typography;
|
||||
|
||||
// 默认海报模板配置
|
||||
const DEFAULT_TEMPLATES = [
|
||||
{
|
||||
id: 'blue',
|
||||
name: '科技蓝',
|
||||
bgGradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
||||
textColor: '#ffffff',
|
||||
},
|
||||
{
|
||||
id: 'orange',
|
||||
name: '活力橙',
|
||||
bgGradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
|
||||
textColor: '#ffffff',
|
||||
},
|
||||
{
|
||||
id: 'green',
|
||||
name: '清新绿',
|
||||
bgGradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
|
||||
textColor: '#ffffff',
|
||||
},
|
||||
{
|
||||
id: 'dark',
|
||||
name: '暗夜黑',
|
||||
bgGradient: 'linear-gradient(135deg, #232526 0%, #414345 100%)',
|
||||
textColor: '#ffffff',
|
||||
},
|
||||
{ id: 'blue', name: '科技蓝' },
|
||||
{ id: 'orange', name: '活力橙' },
|
||||
{ id: 'green', name: '清新绿' },
|
||||
{ id: 'dark', name: '暗夜黑' },
|
||||
];
|
||||
|
||||
const PromotionPosterModal = ({ visible, onClose }) => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const canvasRef = useRef(null);
|
||||
const previewRef = useRef(null);
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [affCode, setAffCode] = useState('');
|
||||
const [affLink, setAffLink] = useState('');
|
||||
const [systemName, setSystemName] = useState('');
|
||||
const [selectedTemplate, setSelectedTemplate] = useState(
|
||||
DEFAULT_TEMPLATES[0],
|
||||
DEFAULT_TEMPLATES[0].id,
|
||||
);
|
||||
const [downloading, setDownloading] = useState(false);
|
||||
const [posterConfig, setPosterConfig] = useState(null);
|
||||
@@ -123,9 +104,7 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
||||
|
||||
// 绘制海报内容
|
||||
const drawContent = useCallback(
|
||||
(ctx, width, height) => {
|
||||
const textColor = selectedTemplate.textColor;
|
||||
|
||||
(ctx, width, height, textColor) => {
|
||||
ctx.fillStyle = textColor;
|
||||
ctx.font =
|
||||
'bold 28px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
|
||||
@@ -187,15 +166,17 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
||||
height - 45,
|
||||
);
|
||||
},
|
||||
[selectedTemplate, posterConfig, systemName, affCode, t],
|
||||
[posterConfig, systemName, affCode, t],
|
||||
);
|
||||
|
||||
// 绘制海报到 Canvas
|
||||
const drawPoster = useCallback(() => {
|
||||
const canvas = canvasRef.current;
|
||||
if (!canvas || !affLink) return null;
|
||||
const preview = previewRef.current;
|
||||
if (!canvas || !preview || !affLink) return null;
|
||||
|
||||
const ctx = canvas.getContext('2d');
|
||||
const { backgroundColor, color } = getComputedStyle(preview);
|
||||
const width = 375;
|
||||
const height = 667;
|
||||
|
||||
@@ -203,26 +184,12 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
||||
canvas.height = height * 2;
|
||||
ctx.scale(2, 2);
|
||||
|
||||
const gradient = ctx.createLinearGradient(0, 0, width, height);
|
||||
if (selectedTemplate.id === 'blue') {
|
||||
gradient.addColorStop(0, '#667eea');
|
||||
gradient.addColorStop(1, '#764ba2');
|
||||
} else if (selectedTemplate.id === 'orange') {
|
||||
gradient.addColorStop(0, '#f093fb');
|
||||
gradient.addColorStop(1, '#f5576c');
|
||||
} else if (selectedTemplate.id === 'green') {
|
||||
gradient.addColorStop(0, '#4facfe');
|
||||
gradient.addColorStop(1, '#00f2fe');
|
||||
} else {
|
||||
gradient.addColorStop(0, '#232526');
|
||||
gradient.addColorStop(1, '#414345');
|
||||
}
|
||||
ctx.fillStyle = gradient;
|
||||
ctx.fillStyle = backgroundColor;
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
drawContent(ctx, width, height);
|
||||
drawContent(ctx, width, height, color);
|
||||
|
||||
return canvas;
|
||||
}, [affLink, selectedTemplate, drawContent]);
|
||||
}, [affLink, drawContent]);
|
||||
|
||||
// 下载海报
|
||||
const handleDownload = async () => {
|
||||
@@ -354,14 +321,12 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
||||
|
||||
const renderPosterMode = () => (
|
||||
<div className='pm-poster-layout'>
|
||||
<div className='pm-preview-stage'>
|
||||
<div
|
||||
className='pm-poster'
|
||||
style={{
|
||||
'--pm-poster-background': selectedTemplate.bgGradient,
|
||||
'--pm-poster-ink': selectedTemplate.textColor,
|
||||
}}
|
||||
className='pm-preview-stage'
|
||||
data-poster-template={selectedTemplate}
|
||||
ref={previewRef}
|
||||
>
|
||||
<div className='pm-poster'>
|
||||
<h2>{posterConfig?.slogan || t('邀请好友,共享AI')}</h2>
|
||||
<p className='pm-poster-subtitle'>
|
||||
{posterConfig?.sub_slogan || t('注册即可获得免费额度')}
|
||||
@@ -393,21 +358,15 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
||||
<Radio.Group
|
||||
className='pm-template-list'
|
||||
aria-labelledby='promotion-template-label'
|
||||
value={selectedTemplate.id}
|
||||
onChange={(event) =>
|
||||
setSelectedTemplate(
|
||||
DEFAULT_TEMPLATES.find(
|
||||
(item) => item.id === event.target.value,
|
||||
),
|
||||
)
|
||||
}
|
||||
value={selectedTemplate}
|
||||
onChange={(event) => setSelectedTemplate(event.target.value)}
|
||||
>
|
||||
{DEFAULT_TEMPLATES.map((template) => (
|
||||
<Radio key={template.id} value={template.id}>
|
||||
<span className='pm-template-label'>
|
||||
<span
|
||||
className='pm-template-swatch'
|
||||
style={{ '--pm-template-background': template.bgGradient }}
|
||||
data-poster-template={template.id}
|
||||
/>
|
||||
{t(template.name)}
|
||||
</span>
|
||||
@@ -447,7 +406,7 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
||||
footer={null}
|
||||
width={800}
|
||||
centered
|
||||
className='promotion-modal'
|
||||
className={`promotion-modal${activeTab === 'poster' ? ' promotion-modal--poster' : ''}`}
|
||||
>
|
||||
{loading ? (
|
||||
<div className='pm-loading' aria-label={t('加载中...')}>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
--pm-accent: var(--brand-primary);
|
||||
--pm-soft: var(--brand-primary-soft);
|
||||
--pm-qr-surface: #fff;
|
||||
--pm-poster-ink: #fff;
|
||||
max-width: calc(100vw - 32px);
|
||||
padding-block: 24px;
|
||||
}
|
||||
@@ -162,6 +163,9 @@
|
||||
border-color: var(--pm-accent);
|
||||
background: var(--pm-soft);
|
||||
}
|
||||
.promotion-modal--poster .pm-rewards {
|
||||
display: none;
|
||||
}
|
||||
.pm-rewards-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -197,27 +201,37 @@
|
||||
gap: 32px;
|
||||
align-items: center;
|
||||
}
|
||||
.promotion-modal [data-poster-template='blue'] {
|
||||
--pm-template-background: #2455b8;
|
||||
}
|
||||
.promotion-modal [data-poster-template='orange'] {
|
||||
--pm-template-background: #a94913;
|
||||
}
|
||||
.promotion-modal [data-poster-template='green'] {
|
||||
--pm-template-background: #226b50;
|
||||
}
|
||||
.promotion-modal [data-poster-template='dark'] {
|
||||
--pm-template-background: #272b33;
|
||||
}
|
||||
.pm-preview-stage {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
border: 1px solid var(--pm-border);
|
||||
padding-inline: 16px;
|
||||
border-radius: 12px;
|
||||
background: var(--pm-muted);
|
||||
background: var(--pm-template-background);
|
||||
color: var(--pm-poster-ink);
|
||||
min-width: 0;
|
||||
}
|
||||
.pm-poster {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 240px;
|
||||
width: min(100%, 280px);
|
||||
min-width: 0;
|
||||
aspect-ratio: 375 / 667;
|
||||
padding: 28px 16px 20px;
|
||||
background: var(--pm-poster-background);
|
||||
color: var(--pm-poster-ink);
|
||||
border-radius: 8px;
|
||||
min-height: 448px;
|
||||
padding: 32px 8px 24px;
|
||||
text-align: center;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.pm-poster h2 {
|
||||
margin: 0 0 8px;
|
||||
@@ -329,8 +343,9 @@
|
||||
.pm-field > .ant-btn {
|
||||
width: 100%;
|
||||
}
|
||||
.pm-preview-stage {
|
||||
padding: 16px;
|
||||
.pm-poster {
|
||||
min-height: 408px;
|
||||
padding-block: 24px 20px;
|
||||
}
|
||||
.pm-template-list {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
|
||||
@@ -223,8 +223,9 @@
|
||||
|
||||
.quality-breakdown-org-body .quality-notice {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
justify-content: flex-start;
|
||||
gap: 6px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.quality-breakdown-org-body .quality-notice > svg {
|
||||
|
||||
@@ -360,11 +360,16 @@ export const getChannelsColumns = ({
|
||||
key: COLUMN_KEYS.ID,
|
||||
title: t('ID'),
|
||||
dataIndex: 'id',
|
||||
fixed: 'left',
|
||||
width: 64,
|
||||
},
|
||||
{
|
||||
key: COLUMN_KEYS.NAME,
|
||||
title: t('名称'),
|
||||
dataIndex: 'name',
|
||||
fixed: 'left',
|
||||
width: 112,
|
||||
ellipsis: { showTitle: false },
|
||||
render: (text, record, index) => {
|
||||
if (record.remark && record.remark.trim() !== '') {
|
||||
return (
|
||||
@@ -394,11 +399,11 @@ export const getChannelsColumns = ({
|
||||
trigger={hoverOrClickTrigger()}
|
||||
position='topLeft'
|
||||
>
|
||||
<span>{text}</span>
|
||||
<span title={text}>{text}</span>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
return text;
|
||||
return <span title={text}>{text}</span>;
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -709,7 +714,6 @@ export const getChannelsColumns = ({
|
||||
key: COLUMN_KEYS.OPERATE,
|
||||
title: t('操作'),
|
||||
dataIndex: 'operate',
|
||||
fixed: 'right',
|
||||
render: (text, record, index) => {
|
||||
if (record.children === undefined) {
|
||||
const moreMenuItems = [
|
||||
|
||||
@@ -5,6 +5,8 @@ import CardTable from '../../common/ui/CardTable';
|
||||
import { isRoot } from '../../../helpers';
|
||||
import { getChannelsColumns } from './ChannelsColumnDefs';
|
||||
|
||||
const SELECTION_COLUMN_WIDTH = 34;
|
||||
|
||||
const ChannelsTable = (channelsData) => {
|
||||
const {
|
||||
channels,
|
||||
@@ -51,6 +53,7 @@ const ChannelsTable = (channelsData) => {
|
||||
} = channelsData;
|
||||
|
||||
const [idSortOrder, setIdSortOrder] = useState('descend');
|
||||
const canSelect = isRoot();
|
||||
|
||||
const handleTableChange = ({ sorter, extra, action }) => {
|
||||
if ((action ?? extra?.action) !== 'sort') return;
|
||||
@@ -166,7 +169,7 @@ const ChannelsTable = (channelsData) => {
|
||||
const visibleColumnsList = getVisibleColumns();
|
||||
|
||||
const tableColumns = useMemo(() => {
|
||||
const sortableColumns = visibleColumnsList.map((column) =>
|
||||
return visibleColumnsList.map((column) =>
|
||||
column.key === COLUMN_KEYS.ID
|
||||
? {
|
||||
...column,
|
||||
@@ -179,14 +182,12 @@ const ChannelsTable = (channelsData) => {
|
||||
}
|
||||
: column,
|
||||
);
|
||||
return compactMode
|
||||
? sortableColumns.map(({ fixed, ...rest }) => rest)
|
||||
: sortableColumns;
|
||||
}, [compactMode, visibleColumnsList, COLUMN_KEYS.ID, idSort, idSortOrder]);
|
||||
}, [visibleColumnsList, COLUMN_KEYS.ID, idSort, idSortOrder]);
|
||||
|
||||
return (
|
||||
<CardTable
|
||||
columns={tableColumns}
|
||||
minScrollableWidth={72 + (canSelect ? SELECTION_COLUMN_WIDTH : 0)}
|
||||
onChange={handleTableChange}
|
||||
dataSource={filteredChannels}
|
||||
scroll={compactMode ? undefined : { x: 'max-content' }}
|
||||
@@ -203,8 +204,10 @@ const ChannelsTable = (channelsData) => {
|
||||
expandAllRows={false}
|
||||
onRow={handleRow}
|
||||
rowSelection={
|
||||
isRoot()
|
||||
canSelect
|
||||
? {
|
||||
fixed: true,
|
||||
columnWidth: SELECTION_COLUMN_WIDTH,
|
||||
selectedRowKeys: selectedChannels.map(
|
||||
(channel) => channel.key ?? String(channel.id),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { Plus as ActionPlus } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Tabs, TabPane, Tag } from '@/components/ui';
|
||||
import { Button } from 'antd';
|
||||
import { CHANNEL_OPTIONS } from '../../../constants';
|
||||
import { getChannelIcon, isRoot } from '../../../helpers';
|
||||
import { getChannelIcon } from '../../../helpers';
|
||||
import './channels-tabs.css';
|
||||
|
||||
const ChannelsTabs = ({
|
||||
@@ -13,35 +11,11 @@ const ChannelsTabs = ({
|
||||
channelTypeCounts,
|
||||
availableTypeKeys,
|
||||
loadChannels,
|
||||
activePage,
|
||||
pageSize,
|
||||
idSort,
|
||||
setActivePage,
|
||||
setEditingChannel,
|
||||
setShowEdit,
|
||||
t,
|
||||
}) => {
|
||||
const createButton = isRoot() ? (
|
||||
<Button
|
||||
className='console-create-action'
|
||||
type='primary'
|
||||
size='middle'
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => {
|
||||
setEditingChannel({ id: undefined });
|
||||
setShowEdit(true);
|
||||
}}
|
||||
>
|
||||
{t('创建渠道')}
|
||||
</Button>
|
||||
) : null;
|
||||
|
||||
if (enableTagMode) {
|
||||
return createButton ? (
|
||||
<div className='flex justify-end'>{createButton}</div>
|
||||
) : null;
|
||||
}
|
||||
|
||||
const handleTabChange = (key) => {
|
||||
setActiveTypeKey(key);
|
||||
setActivePage(1);
|
||||
@@ -54,7 +28,6 @@ const ChannelsTabs = ({
|
||||
type='line'
|
||||
onChange={handleTabChange}
|
||||
className='channels-tabs mb-2'
|
||||
tabBarExtraContent={createButton}
|
||||
>
|
||||
<TabPane
|
||||
itemKey='all'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Button } from 'antd';
|
||||
import { Plus as ActionPlus } from '@/components/common/icons/ActionIcons';
|
||||
import CardPro from '../../common/ui/CardPro';
|
||||
import { ColumnSettingsButton } from '../../common/table/ColumnSettings';
|
||||
import ChannelsTable from './ChannelsTable';
|
||||
@@ -14,6 +16,7 @@ import EditChannelModal from './modals/EditChannelModal';
|
||||
import EditTagModal from './modals/EditTagModal';
|
||||
import MultiKeyManageModal from './modals/MultiKeyManageModal';
|
||||
import { createCardProPagination } from '../../../helpers/utils';
|
||||
import { isRoot } from '../../../helpers';
|
||||
|
||||
const ChannelsPage = () => {
|
||||
const channelsData = useChannelsData();
|
||||
@@ -49,14 +52,32 @@ const ChannelsPage = () => {
|
||||
tableTitle={channelsData.t('渠道列表')}
|
||||
tableActionsOffset
|
||||
type='type3'
|
||||
tabsArea={<ChannelsTabs {...channelsData} />}
|
||||
tabsArea={
|
||||
channelsData.enableTagMode ? null : <ChannelsTabs {...channelsData} />
|
||||
}
|
||||
actionsArea={<ChannelsActions {...channelsData} />}
|
||||
searchArea={<ChannelsFilters {...channelsData} />}
|
||||
tableActions={
|
||||
<>
|
||||
{isRoot() && (
|
||||
<Button
|
||||
className='console-create-action'
|
||||
type='primary'
|
||||
size='middle'
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => {
|
||||
channelsData.setEditingChannel({ id: undefined });
|
||||
channelsData.setShowEdit(true);
|
||||
}}
|
||||
>
|
||||
{channelsData.t('创建渠道')}
|
||||
</Button>
|
||||
)}
|
||||
<ColumnSettingsButton
|
||||
open={channelsData.showColumnSelector}
|
||||
onClick={() => channelsData.setShowColumnSelector(true)}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
paginationArea={createCardProPagination({
|
||||
preservePage: true,
|
||||
|
||||
@@ -133,7 +133,7 @@ const originInputs = {
|
||||
model_mapping: '',
|
||||
status_code_mapping: '',
|
||||
models: [],
|
||||
auto_ban: 1,
|
||||
auto_ban: true,
|
||||
test_model: '',
|
||||
groups: ['default'],
|
||||
priority: 0,
|
||||
@@ -195,7 +195,6 @@ const EditChannelModal = (props) => {
|
||||
const [batch, setBatch] = useState(false);
|
||||
const [multiToSingle, setMultiToSingle] = useState(false);
|
||||
const [multiKeyMode, setMultiKeyMode] = useState('random');
|
||||
const [autoBan, setAutoBan] = useState(true);
|
||||
const [inputs, setInputs] = useState(originInputs);
|
||||
const [originModelOptions, setOriginModelOptions] = useState([]);
|
||||
const [modelOptions, setModelOptions] = useState([]);
|
||||
@@ -552,7 +551,6 @@ const EditChannelModal = (props) => {
|
||||
// 重置手动输入模式状态
|
||||
setUseManualInput(false);
|
||||
}
|
||||
//setAutoBan
|
||||
};
|
||||
|
||||
const loadChannel = async () => {
|
||||
@@ -757,6 +755,7 @@ const EditChannelModal = (props) => {
|
||||
if (!data.fallback_primary_attempts) data.fallback_primary_attempts = 1;
|
||||
if (!data.fallback_hop_attempts) data.fallback_hop_attempts = 1;
|
||||
|
||||
data.auto_ban = Boolean(data.auto_ban ?? originInputs.auto_ban);
|
||||
setInputs(data);
|
||||
if (formApiRef.current) {
|
||||
formApiRef.current.setValues(data);
|
||||
@@ -768,11 +767,6 @@ const EditChannelModal = (props) => {
|
||||
data.work_hours_timezone || 'Asia/Shanghai',
|
||||
);
|
||||
}
|
||||
if (data.auto_ban === 0) {
|
||||
setAutoBan(false);
|
||||
} else {
|
||||
setAutoBan(true);
|
||||
}
|
||||
// 同步企业账户状态
|
||||
setIsEnterpriseAccount(data.is_enterprise_account || false);
|
||||
setBasicModels(getChannelModels(data.type));
|
||||
@@ -3192,11 +3186,9 @@ const EditChannelModal = (props) => {
|
||||
label={t('是否自动禁用')}
|
||||
checkedText={t('开')}
|
||||
uncheckedText={t('关')}
|
||||
onChange={(value) => setAutoBan(value)}
|
||||
extraText={t(
|
||||
'仅当自动禁用开启时有效,关闭后不会自动禁用该渠道',
|
||||
)}
|
||||
initValue={autoBan}
|
||||
/>
|
||||
|
||||
<Form.TextArea
|
||||
|
||||
@@ -637,17 +637,10 @@ const EditTagModal = (props) => {
|
||||
{t('不更改')}
|
||||
</Text>
|
||||
</div>
|
||||
<div>
|
||||
<Text type='tertiary' size='small'>
|
||||
{t('支持变量:')}
|
||||
</Text>
|
||||
<div className='text-xs text-tertiary ml-2'>
|
||||
<div>
|
||||
{t('渠道密钥')}:{' '}
|
||||
{t('支持变量:')} {t('渠道密钥')}:{' '}
|
||||
{I18N_TECHNICAL_TEXT.API_KEY_PLACEHOLDER}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Text>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -346,6 +346,7 @@ const EditTokenModal = (props) => {
|
||||
? -1
|
||||
: Math.ceil(expireDate.getTime() / 1000);
|
||||
|
||||
try {
|
||||
if (isEdit) {
|
||||
const localInputs = buildTokenPayload(values, expired_time);
|
||||
let res = await API.put(`/api/token/`, {
|
||||
@@ -388,8 +389,11 @@ const EditTokenModal = (props) => {
|
||||
props.handleClose();
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// The API client reports request failures.
|
||||
} finally {
|
||||
setLoading(false);
|
||||
formApiRef.current?.setValues(getInitValues());
|
||||
}
|
||||
};
|
||||
|
||||
// 自定义标签组件
|
||||
|
||||
@@ -11,7 +11,7 @@ import { isCenterTableScope, prepareCenterColumns } from './centerTablePolicy';
|
||||
import './center-table.css';
|
||||
|
||||
const CenterTable = forwardRef(function CenterTable(
|
||||
{ columns, className, scroll, style, ...props },
|
||||
{ columns, className, scroll, style, minScrollableWidth, ...props },
|
||||
ref,
|
||||
) {
|
||||
const { token } = theme.useToken();
|
||||
@@ -33,7 +33,12 @@ const CenterTable = forwardRef(function CenterTable(
|
||||
);
|
||||
const prepared =
|
||||
scoped && columns
|
||||
? prepareCenterColumns(columns, width, measuredActionWidths)
|
||||
? prepareCenterColumns(
|
||||
columns,
|
||||
width,
|
||||
measuredActionWidths,
|
||||
minScrollableWidth,
|
||||
)
|
||||
: columns;
|
||||
const enabled = prepared !== columns;
|
||||
useLayoutEffect(() => {
|
||||
|
||||
@@ -91,10 +91,28 @@ const markFixedRight = (
|
||||
.join(' '),
|
||||
});
|
||||
|
||||
export function prepareCenterColumns(columns, width = 0, measuredWidths = {}) {
|
||||
export function prepareCenterColumns(
|
||||
columns,
|
||||
width = 0,
|
||||
measuredWidths = {},
|
||||
minScrollableWidth = 0,
|
||||
) {
|
||||
const leaves = leafColumns(columns);
|
||||
const last = leaves.at(-1);
|
||||
const hasAction = last && isActionColumn(last);
|
||||
const fixedWidthLimit =
|
||||
width > 0 ? Math.max(56, width - minScrollableWidth) : 0;
|
||||
const otherFixedWidth = leaves.reduce(
|
||||
(total, column) =>
|
||||
column !== last && column.fixed ? total + columnWidth(column) : total,
|
||||
0,
|
||||
);
|
||||
const remainingActionWidth = fixedWidthLimit - otherFixedWidth;
|
||||
// Keep both sides fixed when wrapped action buttons still have enough space.
|
||||
const actionWidthLimit =
|
||||
minScrollableWidth > 0 && remainingActionWidth >= 120
|
||||
? remainingActionWidth
|
||||
: fixedWidthLimit;
|
||||
const pinnedWidth = hasAction
|
||||
? leaves.reduce(
|
||||
(total, column, index) =>
|
||||
@@ -102,7 +120,7 @@ export function prepareCenterColumns(columns, width = 0, measuredWidths = {}) {
|
||||
(column === last
|
||||
? Math.min(
|
||||
actionWidth(column, measuredWidths[index]),
|
||||
width || Infinity,
|
||||
actionWidthLimit || Infinity,
|
||||
)
|
||||
: column.fixed
|
||||
? columnWidth(column)
|
||||
@@ -110,7 +128,7 @@ export function prepareCenterColumns(columns, width = 0, measuredWidths = {}) {
|
||||
0,
|
||||
)
|
||||
: 0;
|
||||
const releaseOtherFixed = width > 0 && pinnedWidth > width;
|
||||
const releaseOtherFixed = width > 0 && pinnedWidth > fixedWidthLimit;
|
||||
const estimatedTotal = leaves.reduce(
|
||||
(total, column) => total + columnWidth(column),
|
||||
0,
|
||||
@@ -126,7 +144,13 @@ export function prepareCenterColumns(columns, width = 0, measuredWidths = {}) {
|
||||
return { ...column, children: column.children.map(mapColumn) };
|
||||
const columnIndex = index++;
|
||||
if (hasAction && column === last)
|
||||
return markFixedRight(column, columnIndex, true, measuredWidths, width);
|
||||
return markFixedRight(
|
||||
column,
|
||||
columnIndex,
|
||||
true,
|
||||
measuredWidths,
|
||||
actionWidthLimit,
|
||||
);
|
||||
if (fallback.has(column)) return markFixedRight(column, columnIndex);
|
||||
if (releaseOtherFixed && column.fixed) {
|
||||
const { fixed: _fixed, ...scrollable } = column;
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
"订单列表": "Order List",
|
||||
"文章列表": "Article List",
|
||||
"预约列表": "Reservation List",
|
||||
"是否已响应": "Responded?",
|
||||
"是否进行响应": "Respond to this demo request?",
|
||||
"是否取消响应": "Cancel the response to this demo request?",
|
||||
"请完善动态与洞察的配置": "Please complete the Updates & Insights configuration",
|
||||
"企业运行正常": "Organization operating normally",
|
||||
"可用额度充足": "Available credit is sufficient",
|
||||
@@ -2470,6 +2473,7 @@
|
||||
"会员购买记录": "Membership Purchase History",
|
||||
"会员管理": "Membership Management",
|
||||
"会员卡管理": "Membership Cards",
|
||||
"会员列表": "Membership List",
|
||||
"会员期间总消耗": "Total consumption during membership",
|
||||
"会员权益": "Membership Benefits",
|
||||
"会员页面标题": "Membership page title",
|
||||
@@ -4745,11 +4749,9 @@
|
||||
"确定要充值 $": "Confirm to recharge $",
|
||||
"确定要更新所有已启用通道余额吗?": "Are you sure you want to update the balance of all enabled channels?",
|
||||
"确定要降级此用户吗?": "Are you sure you want to demote this user?",
|
||||
"确定要禁用此预约吗?": "Are you sure you want to disable this reservation?",
|
||||
"确定要禁用此密钥吗?": "Are you sure you want to disable this key?",
|
||||
"确定要禁用此用户吗?": "Are you sure you want to disable this user?",
|
||||
"确定要禁用所有的密钥吗?": "Are you sure you want to disable all keys?",
|
||||
"确定要启用此预约吗?": "Are you sure you want to enable this reservation?",
|
||||
"确定要启用此密钥吗?": "Are you sure you want to enable this key?",
|
||||
"确定要启用此用户吗?": "Are you sure you want to enable this user?",
|
||||
"确定要启用所有密钥吗?": "Are you sure you want to enable all keys?",
|
||||
@@ -4892,6 +4894,8 @@
|
||||
"任务": "Task",
|
||||
"任务 ID": "Task ID",
|
||||
"任务保留策略": "Task retention policy",
|
||||
"启用任务归档": "Enable task archiving",
|
||||
"已结算": "Settled",
|
||||
"任务不存在或已不可见,请刷新任务列表。": "The task no longer exists or is not visible. Refresh the task list.",
|
||||
"任务队列": "Task queue",
|
||||
"任务额度上限 (quota)": "Task quota limit",
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
"订单列表": "Liste des commandes",
|
||||
"文章列表": "Liste des articles",
|
||||
"预约列表": "Liste des réservations",
|
||||
"是否已响应": "Réponse donnée ?",
|
||||
"是否进行响应": "Répondre à cette demande de démonstration ?",
|
||||
"是否取消响应": "Annuler la réponse à cette demande de démonstration ?",
|
||||
"请完善动态与洞察的配置": "Veuillez compléter la configuration des actualités et analyses",
|
||||
"企业运行正常": "L’entreprise fonctionne normalement",
|
||||
"可用额度充足": "Crédit disponible suffisant",
|
||||
@@ -2364,6 +2367,7 @@
|
||||
"会员购买记录": "Record des achats des membres",
|
||||
"会员管理": "Gestion des membres",
|
||||
"会员卡管理": "Cartes de membre",
|
||||
"会员列表": "Liste des adhésions",
|
||||
"会员期间总消耗": "Consommation totale pendant l'adhésion",
|
||||
"会员权益": "Avantages membre",
|
||||
"会员页面标题": "Titre de la page membre",
|
||||
@@ -4554,11 +4558,9 @@
|
||||
"确定要充值 $": "Confirmer la recharge de $",
|
||||
"确定要更新所有已启用通道余额吗?": "Êtes-vous sûr de vouloir mettre à jour le solde de tous les canaux activés ?",
|
||||
"确定要降级此用户吗?": "Êtes-vous sûr de vouloir rétrograder cet utilisateur ?",
|
||||
"确定要禁用此预约吗?": "Voulez-vous vraiment désactiver cette réservation ?",
|
||||
"确定要禁用此密钥吗?": "Êtes-vous sûr de vouloir désactiver cette clé?",
|
||||
"确定要禁用此用户吗?": "Êtes-vous sûr de vouloir désactiver cet utilisateur ?",
|
||||
"确定要禁用所有的密钥吗?": "Êtes-vous sûr de vouloir désactiver toutes les clés ?",
|
||||
"确定要启用此预约吗?": "Voulez-vous vraiment activer cette réservation ?",
|
||||
"确定要启用此密钥吗?": "Êtes-vous sûr de vouloir activer cette clé?",
|
||||
"确定要启用此用户吗?": "Êtes-vous sûr de vouloir activer cet utilisateur ?",
|
||||
"确定要启用所有密钥吗?": "Êtes-vous sûr de vouloir activer toutes les clés ?",
|
||||
@@ -4697,6 +4699,8 @@
|
||||
"任务": "Mission à",
|
||||
"任务 ID": "ID de la tâche",
|
||||
"任务保留策略": "Politique de rétention des tâches",
|
||||
"启用任务归档": "Activer l’archivage des tâches",
|
||||
"已结算": "Réglé",
|
||||
"任务队列": "La queue des tâches",
|
||||
"任务额度上限 (quota)": "Plafond de la ligne de mission (quota)",
|
||||
"任务记录": "Enregistrements de tâches",
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
"订单列表": "注文一覧",
|
||||
"文章列表": "記事一覧",
|
||||
"预约列表": "予約一覧",
|
||||
"是否已响应": "回答済み",
|
||||
"是否进行响应": "このデモ予約に回答しますか?",
|
||||
"是否取消响应": "このデモ予約への回答を取り消しますか?",
|
||||
"请完善动态与洞察的配置": "ニュースとインサイトの設定を完了してください",
|
||||
"企业运行正常": "企業は正常に稼働しています",
|
||||
"可用额度充足": "利用可能な残高は十分です",
|
||||
@@ -2470,6 +2473,7 @@
|
||||
"会员购买记录": "会員購入履歴",
|
||||
"会员管理": "会員管理",
|
||||
"会员卡管理": "会員カード管理",
|
||||
"会员列表": "会員一覧",
|
||||
"会员期间总消耗": "メンバーシップ期間中の総消費",
|
||||
"会员权益": "メンバー特典",
|
||||
"会员页面标题": "会員ページのタイトル",
|
||||
@@ -4745,11 +4749,9 @@
|
||||
"确定要充值 $": "チャージを確定しますか:$",
|
||||
"确定要更新所有已启用通道余额吗?": "有効なすべてのチャネルのクォータを更新してもよろしいですか?",
|
||||
"确定要降级此用户吗?": "このユーザーを降格させてもよろしいですか?",
|
||||
"确定要禁用此预约吗?": "この予約を無効にしますか?",
|
||||
"确定要禁用此密钥吗?": "このキーを無効にしますか?",
|
||||
"确定要禁用此用户吗?": "このユーザーを無効にしてもよろしいですか?",
|
||||
"确定要禁用所有的密钥吗?": "すべてのAPIキーを無効にしてもよろしいですか?",
|
||||
"确定要启用此预约吗?": "この予約を有効にしますか?",
|
||||
"确定要启用此密钥吗?": "このキーを有効にしますか?",
|
||||
"确定要启用此用户吗?": "このユーザーを有効にしてもよろしいですか?",
|
||||
"确定要启用所有密钥吗?": "すべてのAPIキーを有効にしてもよろしいですか?",
|
||||
@@ -4892,6 +4894,8 @@
|
||||
"任务": "タスク",
|
||||
"任务 ID": "タスクID",
|
||||
"任务保留策略": "タスク保持ポリシー",
|
||||
"启用任务归档": "タスクのアーカイブを有効にする",
|
||||
"已结算": "精算済み",
|
||||
"任务不存在或已不可见,请刷新任务列表。": "タスクが存在しないか表示できません。タスク一覧を更新してください。",
|
||||
"任务队列": "タスクキュー",
|
||||
"任务额度上限 (quota)": "タスククォータ上限 (quota)",
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
"订单列表": "주문 목록",
|
||||
"文章列表": "게시글 목록",
|
||||
"预约列表": "예약 목록",
|
||||
"是否已响应": "응답 여부",
|
||||
"是否进行响应": "이 데모 예약에 응답하시겠습니까?",
|
||||
"是否取消响应": "이 데모 예약에 대한 응답을 취소하시겠습니까?",
|
||||
"请完善动态与洞察的配置": "소식 및 인사이트 설정을 완료해 주세요",
|
||||
"企业运行正常": "기업이 정상 운영 중입니다",
|
||||
"可用额度充足": "사용 가능한 잔액이 충분합니다",
|
||||
@@ -2470,6 +2473,7 @@
|
||||
"会员购买记录": "멤버십 구매 내역",
|
||||
"会员管理": "멤버십 관리",
|
||||
"会员卡管理": "멤버십 카드",
|
||||
"会员列表": "멤버십 목록",
|
||||
"会员期间总消耗": "멤버십 기간 총 소비",
|
||||
"会员权益": "멤버십 혜택",
|
||||
"会员页面标题": "멤버십 페이지 제목",
|
||||
@@ -4745,11 +4749,9 @@
|
||||
"确定要充值 $": "충전하시겠습니까? $",
|
||||
"确定要更新所有已启用通道余额吗?": "활성화된 모든 채널의 잔액을 갱신하시겠습니까?",
|
||||
"确定要降级此用户吗?": "이 사용자를 강등하시겠습니까?",
|
||||
"确定要禁用此预约吗?": "이 예약을 비활성화하시겠습니까?",
|
||||
"确定要禁用此密钥吗?": "이 키를 비활성화하시겠습니까?",
|
||||
"确定要禁用此用户吗?": "이 사용자를 비활성화하시겠습니까?",
|
||||
"确定要禁用所有的密钥吗?": "모든 키를 비활성화하시겠습니까?",
|
||||
"确定要启用此预约吗?": "이 예약을 활성화하시겠습니까?",
|
||||
"确定要启用此密钥吗?": "이 키를 활성화하시겠습니까?",
|
||||
"确定要启用此用户吗?": "이 사용자를 활성화하시겠습니까?",
|
||||
"确定要启用所有密钥吗?": "모든 키를 활성화하시겠습니까?",
|
||||
@@ -4892,6 +4894,8 @@
|
||||
"任务": "작업",
|
||||
"任务 ID": "작업 ID",
|
||||
"任务保留策略": "작업 보존 정책",
|
||||
"启用任务归档": "작업 보관 활성화",
|
||||
"已结算": "정산 완료",
|
||||
"任务不存在或已不可见,请刷新任务列表。": "작업이 없거나 더 이상 보이지 않습니다. 작업 목록을 새로고침하세요.",
|
||||
"任务队列": "작업 대기열",
|
||||
"任务额度上限 (quota)": "작업 한도 상한 (quota)",
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
"订单列表": "Список заказов",
|
||||
"文章列表": "Список статей",
|
||||
"预约列表": "Список заявок на демонстрацию",
|
||||
"是否已响应": "Есть ответ?",
|
||||
"是否进行响应": "Ответить на эту заявку на демонстрацию?",
|
||||
"是否取消响应": "Отменить ответ на эту заявку на демонстрацию?",
|
||||
"请完善动态与洞察的配置": "Завершите настройку новостей и аналитики",
|
||||
"企业运行正常": "Организация работает нормально",
|
||||
"可用额度充足": "Доступных средств достаточно",
|
||||
@@ -2393,6 +2396,7 @@
|
||||
"会员购买记录": "История покупок",
|
||||
"会员管理": "Членский состав",
|
||||
"会员卡管理": "Карты участников",
|
||||
"会员列表": "Список подписок",
|
||||
"会员期间总消耗": "Общее потребление во время членства",
|
||||
"会员权益": "Привилегии участника",
|
||||
"会员页面标题": "Название страницы членства",
|
||||
@@ -4586,11 +4590,9 @@
|
||||
"确定要充值 $": "Подтвердить пополнение на $",
|
||||
"确定要更新所有已启用通道余额吗?": "Подтвердить обновление баланса всех включенных каналов?",
|
||||
"确定要降级此用户吗?": "Подтвердить понижение этого пользователя?",
|
||||
"确定要禁用此预约吗?": "Отключить эту запись на демо?",
|
||||
"确定要禁用此密钥吗?": "Вы уверены, что хотите отключить этот ключ?",
|
||||
"确定要禁用此用户吗?": "Подтвердить отключение этого пользователя?",
|
||||
"确定要禁用所有的密钥吗?": "Подтвердить отключение всех ключей?",
|
||||
"确定要启用此预约吗?": "Включить эту запись на демо?",
|
||||
"确定要启用此密钥吗?": "Вы уверены, что хотите включить этот ключ?",
|
||||
"确定要启用此用户吗?": "Подтвердить включение этого пользователя?",
|
||||
"确定要启用所有密钥吗?": "Подтвердить включение всех ключей?",
|
||||
@@ -4731,6 +4733,8 @@
|
||||
"任务": "Задание",
|
||||
"任务 ID": "ID задачи",
|
||||
"任务保留策略": "Политика удержания задач",
|
||||
"启用任务归档": "Включить архивирование задач",
|
||||
"已结算": "Рассчитано",
|
||||
"任务队列": "Очередь задач",
|
||||
"任务额度上限 (quota)": "Ограничение целевых квот",
|
||||
"任务记录": "Записи задач",
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
"订单列表": "รายการคำสั่งซื้อ",
|
||||
"文章列表": "รายการบทความ",
|
||||
"预约列表": "รายการจอง",
|
||||
"是否已响应": "ตอบกลับแล้วหรือไม่",
|
||||
"是否进行响应": "ต้องการตอบกลับคำขอสาธิตนี้หรือไม่?",
|
||||
"是否取消响应": "ต้องการยกเลิกการตอบกลับคำขอสาธิตนี้หรือไม่?",
|
||||
"请完善动态与洞察的配置": "โปรดกำหนดค่าข่าวสารและข้อมูลเชิงลึกให้ครบถ้วน",
|
||||
"企业运行正常": "องค์กรดำเนินงานตามปกติ",
|
||||
"可用额度充足": "เครดิตคงเหลือเพียงพอ",
|
||||
@@ -2470,6 +2473,7 @@
|
||||
"会员购买记录": "ประวัติการซื้อสมาชิก",
|
||||
"会员管理": "การจัดการสมาชิก",
|
||||
"会员卡管理": "บัตรสมาชิก",
|
||||
"会员列表": "รายการสมาชิก",
|
||||
"会员期间总消耗": "ยอดใช้จ่ายรวมช่วงเป็นสมาชิก",
|
||||
"会员权益": "สิทธิประโยชน์สมาชิก",
|
||||
"会员页面标题": "หัวข้อหน้าสมาชิก",
|
||||
@@ -4745,11 +4749,9 @@
|
||||
"确定要充值 $": "ยืนยันการเติมเงิน $",
|
||||
"确定要更新所有已启用通道余额吗?": "ต้องการอัปเดตยอดคงเหลือของช่องทางที่เปิดใช้งานทั้งหมดหรือไม่?",
|
||||
"确定要降级此用户吗?": "ต้องการลดระดับผู้ใช้รายนี้หรือไม่?",
|
||||
"确定要禁用此预约吗?": "คุณต้องการปิดใช้งานการจองนี้หรือไม่?",
|
||||
"确定要禁用此密钥吗?": "ต้องการปิดใช้งานคีย์นี้หรือไม่?",
|
||||
"确定要禁用此用户吗?": "ต้องการปิดใช้งานผู้ใช้รายนี้หรือไม่?",
|
||||
"确定要禁用所有的密钥吗?": "ต้องการปิดใช้งานคีย์ทั้งหมดหรือไม่?",
|
||||
"确定要启用此预约吗?": "คุณต้องการเปิดใช้งานการจองนี้หรือไม่?",
|
||||
"确定要启用此密钥吗?": "ต้องการเปิดใช้งานคีย์นี้หรือไม่?",
|
||||
"确定要启用此用户吗?": "ต้องการเปิดใช้งานผู้ใช้รายนี้หรือไม่?",
|
||||
"确定要启用所有密钥吗?": "ต้องการเปิดใช้งานคีย์ทั้งหมดหรือไม่?",
|
||||
@@ -4892,6 +4894,8 @@
|
||||
"任务": "งาน",
|
||||
"任务 ID": "ID งาน",
|
||||
"任务保留策略": "นโยบายการเก็บงาน",
|
||||
"启用任务归档": "เปิดใช้การเก็บถาวรงาน",
|
||||
"已结算": "ชำระบัญชีแล้ว",
|
||||
"任务不存在或已不可见,请刷新任务列表。": "ไม่มีงานนี้อยู่แล้ว หรือมองไม่เห็นแล้ว โปรดรีเฟรชรายการงาน",
|
||||
"任务队列": "คิวงาน",
|
||||
"任务额度上限 (quota)": "เพดานโควตาต่องาน (quota)",
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
"订单列表": "Danh sách đơn hàng",
|
||||
"文章列表": "Danh sách bài viết",
|
||||
"预约列表": "Danh sách đặt lịch",
|
||||
"是否已响应": "Đã phản hồi?",
|
||||
"是否进行响应": "Phản hồi yêu cầu đặt lịch demo này?",
|
||||
"是否取消响应": "Hủy phản hồi cho yêu cầu đặt lịch demo này?",
|
||||
"请完善动态与洞察的配置": "Vui lòng hoàn tất cấu hình Tin tức và thông tin chuyên sâu",
|
||||
"企业运行正常": "Doanh nghiệp hoạt động bình thường",
|
||||
"可用额度充足": "Hạn mức khả dụng còn đủ",
|
||||
@@ -2470,6 +2473,7 @@
|
||||
"会员购买记录": "Lịch sử mua hội viên",
|
||||
"会员管理": "Quản lý hội viên",
|
||||
"会员卡管理": "Quản lý thẻ thành viên",
|
||||
"会员列表": "Danh sách hội viên",
|
||||
"会员期间总消耗": "Tổng tiêu thụ trong thời gian hội viên",
|
||||
"会员权益": "Quyền lợi thành viên",
|
||||
"会员页面标题": "Tiêu đề trang hội viên",
|
||||
@@ -4745,11 +4749,9 @@
|
||||
"确定要充值 $": "Xác nhận nạp $",
|
||||
"确定要更新所有已启用通道余额吗?": "Bạn có chắc chắn muốn cập nhật số dư của tất cả các kênh đã bật không?",
|
||||
"确定要降级此用户吗?": "Bạn có chắc chắn muốn hạ cấp người dùng này không?",
|
||||
"确定要禁用此预约吗?": "Bạn có chắc muốn tắt lịch hẹn này không?",
|
||||
"确定要禁用此密钥吗?": "Bạn có chắc muốn tắt khóa này?",
|
||||
"确定要禁用此用户吗?": "Bạn có chắc chắn muốn vô hiệu hóa người dùng này không?",
|
||||
"确定要禁用所有的密钥吗?": "Bạn có chắc chắn muốn vô hiệu hóa tất cả các khóa không?",
|
||||
"确定要启用此预约吗?": "Bạn có chắc muốn bật lịch hẹn này không?",
|
||||
"确定要启用此密钥吗?": "Bạn có chắc muốn bật khóa này?",
|
||||
"确定要启用此用户吗?": "Bạn có chắc chắn muốn bật người dùng này không?",
|
||||
"确定要启用所有密钥吗?": "Bạn có chắc chắn muốn bật tất cả các khóa không?",
|
||||
@@ -4892,6 +4894,8 @@
|
||||
"任务": "Tác vụ",
|
||||
"任务 ID": "ID tác vụ",
|
||||
"任务保留策略": "Chính sách lưu giữ tác vụ",
|
||||
"启用任务归档": "Bật lưu trữ tác vụ",
|
||||
"已结算": "Đã quyết toán",
|
||||
"任务不存在或已不可见,请刷新任务列表。": "Tác vụ không tồn tại hoặc không còn hiển thị, vui lòng làm mới danh sách tác vụ.",
|
||||
"任务队列": "Hàng đợi tác vụ",
|
||||
"任务额度上限 (quota)": "Giới hạn hạn ngạch tác vụ (quota)",
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
"订单列表": "訂單列表",
|
||||
"文章列表": "文章列表",
|
||||
"预约列表": "預約列表",
|
||||
"是否已响应": "是否已回應",
|
||||
"是否进行响应": "是否進行回應",
|
||||
"是否取消响应": "是否取消回應",
|
||||
"请完善动态与洞察的配置": "請完善動態與洞察的設定",
|
||||
"企业运行正常": "企業運行正常",
|
||||
"可用额度充足": "可用額度充足",
|
||||
@@ -2470,6 +2473,7 @@
|
||||
"会员购买记录": "會員購買記錄",
|
||||
"会员管理": "會員管理",
|
||||
"会员卡管理": "會員卡管理",
|
||||
"会员列表": "會員列表",
|
||||
"会员期间总消耗": "會員期間總消耗",
|
||||
"会员权益": "會員權益",
|
||||
"会员页面标题": "會員頁面標題",
|
||||
@@ -4745,11 +4749,9 @@
|
||||
"确定要充值 $": "確定要儲值 $",
|
||||
"确定要更新所有已启用通道余额吗?": "確定要更新所有已啟用通道餘額嗎?",
|
||||
"确定要降级此用户吗?": "確定要降級此使用者嗎?",
|
||||
"确定要禁用此预约吗?": "確定要停用此預約嗎?",
|
||||
"确定要禁用此密钥吗?": "確定要停用此金鑰嗎?",
|
||||
"确定要禁用此用户吗?": "確定要停用此使用者嗎?",
|
||||
"确定要禁用所有的密钥吗?": "確定要停用所有的金鑰嗎?",
|
||||
"确定要启用此预约吗?": "確定要啟用此預約嗎?",
|
||||
"确定要启用此密钥吗?": "確定要啟用此金鑰嗎?",
|
||||
"确定要启用此用户吗?": "確定要啟用此使用者嗎?",
|
||||
"确定要启用所有密钥吗?": "確定要啟用所有金鑰嗎?",
|
||||
@@ -4892,6 +4894,8 @@
|
||||
"任务": "任務",
|
||||
"任务 ID": "任務 ID",
|
||||
"任务保留策略": "任務保留策略",
|
||||
"启用任务归档": "啟用任務封存",
|
||||
"已结算": "已結算",
|
||||
"任务不存在或已不可见,请刷新任务列表。": "任務不存在或已不可見,請重新整理任務列表。",
|
||||
"任务队列": "任務佇列",
|
||||
"任务额度上限 (quota)": "任務額度上限 (quota)",
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
"订单列表": "订单列表",
|
||||
"文章列表": "文章列表",
|
||||
"预约列表": "预约列表",
|
||||
"是否已响应": "是否已响应",
|
||||
"是否进行响应": "是否进行响应",
|
||||
"是否取消响应": "是否取消响应",
|
||||
"请完善动态与洞察的配置": "请完善动态与洞察的配置",
|
||||
"企业运行正常": "企业运行正常",
|
||||
"可用额度充足": "可用额度充足",
|
||||
@@ -2429,6 +2432,7 @@
|
||||
"会员购买记录": "会员购买记录",
|
||||
"会员管理": "会员管理",
|
||||
"会员卡管理": "会员卡管理",
|
||||
"会员列表": "会员列表",
|
||||
"会员期间总消耗": "会员期间总消耗",
|
||||
"会员权益": "会员权益",
|
||||
"会员页面标题": "会员页面标题",
|
||||
@@ -4694,11 +4698,9 @@
|
||||
"确定要充值 $": "确定要充值 $",
|
||||
"确定要更新所有已启用通道余额吗?": "确定要更新所有已启用通道余额吗?",
|
||||
"确定要降级此用户吗?": "确定要降级此用户吗?",
|
||||
"确定要禁用此预约吗?": "确定要禁用此预约吗?",
|
||||
"确定要禁用此密钥吗?": "确定要禁用此密钥吗?",
|
||||
"确定要禁用此用户吗?": "确定要禁用此用户吗?",
|
||||
"确定要禁用所有的密钥吗?": "确定要禁用所有的密钥吗?",
|
||||
"确定要启用此预约吗?": "确定要启用此预约吗?",
|
||||
"确定要启用此密钥吗?": "确定要启用此密钥吗?",
|
||||
"确定要启用此用户吗?": "确定要启用此用户吗?",
|
||||
"确定要启用所有密钥吗?": "确定要启用所有密钥吗?",
|
||||
@@ -4839,6 +4841,8 @@
|
||||
"任务": "任务",
|
||||
"任务 ID": "任务 ID",
|
||||
"任务保留策略": "任务保留策略",
|
||||
"启用任务归档": "启用任务归档",
|
||||
"已结算": "已结算",
|
||||
"任务不存在或已不可见,请刷新任务列表。": "任务不存在或已不可见,请刷新任务列表。",
|
||||
"任务队列": "任务队列",
|
||||
"任务额度上限 (quota)": "任务额度上限 (quota)",
|
||||
|
||||
@@ -700,6 +700,7 @@ const AdminOrganizations = () => {
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'id',
|
||||
fixed: 'left',
|
||||
width: 70,
|
||||
sorter: true,
|
||||
sortOrder: sortOrderFor('id'),
|
||||
@@ -707,6 +708,7 @@ const AdminOrganizations = () => {
|
||||
{
|
||||
title: t('企业名称'),
|
||||
dataIndex: 'name',
|
||||
fixed: 'left',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
sorter: true,
|
||||
@@ -840,7 +842,6 @@ const AdminOrganizations = () => {
|
||||
title: t('操作'),
|
||||
key: 'actions',
|
||||
width: 380,
|
||||
fixed: 'right',
|
||||
render: (_, record) => (
|
||||
<div className='console-module-row-actions'>
|
||||
{isAdmin() && (
|
||||
@@ -1059,6 +1060,7 @@ const AdminOrganizations = () => {
|
||||
<Table
|
||||
empty={<TableEmpty />}
|
||||
columns={columns}
|
||||
minScrollableWidth={72}
|
||||
dataSource={orgs}
|
||||
loading={loading}
|
||||
rowKey='id'
|
||||
|
||||
@@ -15,53 +15,13 @@
|
||||
position: relative;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
/* 页面留白对齐企业中心标准页(p-4 sm:p-6 lg:p-8),不做整页居中收窄 */
|
||||
padding: 16px;
|
||||
padding: var(--uc-page-pad-top) var(--uc-page-pad-x)
|
||||
calc(var(--uc-page-pad-bottom) / 2);
|
||||
color: var(--brain-ink);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
isolation: isolate;
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
.cloud-brain-shell {
|
||||
padding: 24px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.cloud-brain-shell {
|
||||
padding: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 装饰性大气层(光球/网格/米黄渐变)已移除——控制台风格用全局页面背景 */
|
||||
.brain-atmosphere,
|
||||
.brain-orb,
|
||||
.brain-grid {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 控制台式页头:实底卡片 + 细边框(参考主流云厂商控制台) */
|
||||
.brain-hero {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 28px;
|
||||
margin: 0 0 16px;
|
||||
padding: 20px 24px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--surface-card);
|
||||
}
|
||||
.brain-eyebrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--brain-sage);
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.brain-beta {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -78,61 +38,6 @@
|
||||
monospace;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
.brain-hero h1 {
|
||||
margin: 8px 0 6px;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
line-height: 1.35;
|
||||
}
|
||||
.brain-hero p {
|
||||
max-width: 710px;
|
||||
margin: 0;
|
||||
color: var(--brain-muted);
|
||||
font-size: 13px;
|
||||
line-height: 1.65;
|
||||
}
|
||||
/* 指标卡与旁边的操作按钮同排展示:压成横向芯片并垂直居中,
|
||||
高度不再明显高出一截(用户反馈的高度不一致问题) */
|
||||
.brain-hero-metric {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 7px 16px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 10px;
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.brain-hero-side {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
/* 企业管理员窄屏下「使用指引 + 管理企业专家」双按钮需可换行防挤压 */
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.brain-hero-metric span,
|
||||
.brain-hero-metric small {
|
||||
display: block;
|
||||
color: var(--brain-muted);
|
||||
font-size: 11px;
|
||||
line-height: 1.45;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.brain-hero-metric strong {
|
||||
display: block;
|
||||
color: var(--brain-sage);
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
/* 体验中心宿主:内容边距与页头对齐用户中心规范(GLOBAL_UI_BASELINE 4.4),
|
||||
企业中心宿主仍用上方 .brain-hero 卡片页头,不受影响 */
|
||||
.cloud-brain-shell.cloud-brain-shell--experience {
|
||||
/* 底部取标准下边距的一半,与图片生成 / 视频生成页统一 */
|
||||
padding: var(--uc-page-pad-top) var(--uc-page-pad-x)
|
||||
calc(var(--uc-page-pad-bottom) / 2);
|
||||
}
|
||||
/* 页头与下方页签间距:标准 18px 减 10px,页签自带上内边距,视觉上更紧凑 */
|
||||
.cloud-brain-shell .brain-page-header.uc-page-header {
|
||||
margin-bottom: 8px;
|
||||
@@ -164,36 +69,7 @@
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
.brain-tabs {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
margin: 0 0 16px;
|
||||
padding: 4px;
|
||||
width: fit-content;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 10px;
|
||||
background: var(--surface-card);
|
||||
}
|
||||
.brain-tabs button {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border: 0;
|
||||
border-radius: 10px;
|
||||
padding: 9px 16px;
|
||||
color: var(--brain-muted);
|
||||
background: transparent;
|
||||
font-weight: 650;
|
||||
cursor: pointer;
|
||||
}
|
||||
.brain-tabs button.is-active {
|
||||
color: #fff;
|
||||
background: var(--brain-sage);
|
||||
box-shadow: 0 2px 8px
|
||||
color-mix(in srgb, var(--ui-color-primary) 25%, transparent);
|
||||
}
|
||||
/* 体验中心:页签对齐 /console/analytics(antd 线型 Tabs):图标 16px、图标与文字间距 8px、
|
||||
/* 云端大脑:页签对齐 /console/analytics(antd 线型 Tabs):图标 16px、图标与文字间距 8px、
|
||||
选中 / 悬停为品牌色 2px 下划线(antd 主题默认),导航与下方内容间距 16px */
|
||||
.brain-view-tabs > .ant-tabs-nav {
|
||||
margin-bottom: 16px;
|
||||
@@ -1618,25 +1494,6 @@
|
||||
.brain-admin-metrics {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.cloud-brain-shell {
|
||||
padding: 20px 14px 84px;
|
||||
}
|
||||
.brain-hero {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.brain-hero-metric {
|
||||
display: none;
|
||||
}
|
||||
.brain-hero-side {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.brain-tabs {
|
||||
width: 100%;
|
||||
}
|
||||
.brain-tabs button {
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
}
|
||||
.brain-expert-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ import {
|
||||
} from '../../components/common/PageGuide';
|
||||
import { Tabs } from 'antd';
|
||||
import ExperiencePageHeader from '../ExperienceCenter/components/ExperiencePageHeader';
|
||||
import OrgBreadcrumb from '../Organization/components/OrgBreadcrumb';
|
||||
import './cloud-brain.css';
|
||||
|
||||
// Must match GetCloudBrainRun's per-request event limit; the timeline pages
|
||||
@@ -1774,52 +1775,12 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
|
||||
return (
|
||||
<section
|
||||
className={`cloud-brain-shell app-scrollbar${
|
||||
organization ? '' : ' cloud-brain-shell--experience'
|
||||
}`}
|
||||
className='cloud-brain-shell app-scrollbar'
|
||||
aria-label={t('云端大脑')}
|
||||
>
|
||||
<div className='brain-atmosphere' aria-hidden='true'>
|
||||
<span className='brain-orb brain-orb--one' />
|
||||
<span className='brain-orb brain-orb--two' />
|
||||
<span className='brain-grid' />
|
||||
</div>
|
||||
|
||||
{organization ? (
|
||||
<header className='brain-hero'>
|
||||
<div>
|
||||
<div className='brain-eyebrow'>
|
||||
<Sparkles size={14} />
|
||||
{organization ? t('企业智能工作空间') : t('个人智能工作空间')}
|
||||
<BetaBadge />
|
||||
</div>
|
||||
<h1>{t('云端大脑')}</h1>
|
||||
<p>
|
||||
{t(
|
||||
'选择经过审核的专业专家,把真实业务信息转化为结构清晰、可直接使用的成果。',
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<div className='brain-hero-side'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
{organization && canManage && (
|
||||
<Button onClick={() => setManageOpen((open) => !open)}>
|
||||
{manageOpen ? t('完成管理') : t('管理企业专家')}
|
||||
</Button>
|
||||
)}
|
||||
<div className='brain-hero-metric'>
|
||||
<strong>{experts.length}</strong>
|
||||
<div>
|
||||
<span>{t('可用专家')}</span>
|
||||
<small>{t('固定技能 · 全程可追溯')}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
) : (
|
||||
// 体验中心:页头对齐用户中心规范(面包屑 + 28px 标题 + 副标题 + 右侧操作)
|
||||
<ExperiencePageHeader
|
||||
className='brain-page-header'
|
||||
breadcrumb={organization ? <OrgBreadcrumb /> : undefined}
|
||||
title={t('云端大脑')}
|
||||
titleSuffix={<BetaBadge />}
|
||||
subtitle={t(
|
||||
@@ -1828,6 +1789,14 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
extra={
|
||||
<>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
{organization && canManage && (
|
||||
<Button
|
||||
aria-expanded={manageOpen}
|
||||
onClick={() => setManageOpen((open) => !open)}
|
||||
>
|
||||
{manageOpen ? t('完成管理') : t('管理企业专家')}
|
||||
</Button>
|
||||
)}
|
||||
<span
|
||||
className='brain-header-stat'
|
||||
title={t('固定技能 · 全程可追溯')}
|
||||
@@ -1838,41 +1807,12 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
</>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
{organization ? (
|
||||
<nav className='brain-tabs' aria-label={t('云端大脑导航')}>
|
||||
<button
|
||||
type='button'
|
||||
className={[
|
||||
'app-action-button',
|
||||
view === 'experts' ? 'is-active' : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() => setView('experts')}
|
||||
>
|
||||
<ActionBot size={17} /> {t('专家广场')}
|
||||
</button>
|
||||
<button
|
||||
type='button'
|
||||
className={['app-action-button', view === 'runs' ? 'is-active' : '']
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() => setView('runs')}
|
||||
>
|
||||
<ListChecks size={17} /> {t('我的任务')}
|
||||
{runs.some((run) => !terminalStatuses.has(run.status)) && (
|
||||
<span className='brain-live-dot' aria-label={t('有任务执行中')} />
|
||||
)}
|
||||
</button>
|
||||
</nav>
|
||||
) : (
|
||||
// 体验中心:列表页签(UI_COMPONENT_STANDARDS 列表页签规范),只承担导航,内容仍由 view 渲染
|
||||
<Tabs
|
||||
className='brain-view-tabs'
|
||||
activeKey={view}
|
||||
onChange={setView}
|
||||
onTabClick={() => setManageOpen(false)}
|
||||
aria-label={t('云端大脑导航')}
|
||||
items={[
|
||||
{
|
||||
@@ -1902,7 +1842,6 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
|
||||
<PageGuidePill guide={guide} />
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ export default function DemoReservations() {
|
||||
|
||||
const confirmStatusChange = (id, enabled) => {
|
||||
Modal.confirm({
|
||||
title: enabled ? t('确定要启用此预约吗?') : t('确定要禁用此预约吗?'),
|
||||
title: enabled ? t('是否进行响应') : t('是否取消响应'),
|
||||
onOk: () =>
|
||||
saveReservation(id, () => setDemoReservationEnabled(id, enabled)),
|
||||
});
|
||||
@@ -168,13 +168,15 @@ export default function DemoReservations() {
|
||||
const columns = [
|
||||
...fieldColumns,
|
||||
{
|
||||
title: t('状态'),
|
||||
title: t('是否已响应'),
|
||||
key: 'enabled',
|
||||
width: 128,
|
||||
render: (_, record) => (
|
||||
<TableStatusSwitch
|
||||
aria-label={record.enabled === false ? t('启用') : t('禁用')}
|
||||
aria-label={t('是否已响应')}
|
||||
checked={record.enabled !== false}
|
||||
checkedChildren=''
|
||||
unCheckedChildren=''
|
||||
disabled={busy}
|
||||
onChange={(enabled) => confirmStatusChange(record.id, enabled)}
|
||||
/>
|
||||
|
||||
@@ -6,10 +6,10 @@ import '../experience-page.css';
|
||||
|
||||
/**
|
||||
* 体验中心子页统一页头:复用用户中心页头规格(GLOBAL_UI_BASELINE 4.4 第 2 条),
|
||||
* 面包屑固定为“体验中心 / 当前页面”,标题 28 / 32px、副标题 14 / 22px、右侧操作走 extra。
|
||||
* 面包屑默认是“体验中心 / 当前页面”,也可由共用页面传入所在中心的面包屑。
|
||||
* 内容边距由各页根节点读取 --uc-page-pad-*,本组件只负责呈现。
|
||||
*
|
||||
* @param {{ title: string, titleSuffix?: React.ReactNode, subtitle?: React.ReactNode, extra?: React.ReactNode, className?: string }} props
|
||||
* @param {{ title: string, titleSuffix?: React.ReactNode, subtitle?: React.ReactNode, extra?: React.ReactNode, className?: string, breadcrumb?: React.ReactNode }} props
|
||||
*/
|
||||
export default function ExperiencePageHeader({
|
||||
title,
|
||||
@@ -17,16 +17,19 @@ export default function ExperiencePageHeader({
|
||||
subtitle,
|
||||
extra,
|
||||
className = '',
|
||||
breadcrumb,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<UserCenterPageHeader
|
||||
className={`exp-page-header ${className}`.trim()}
|
||||
breadcrumb={
|
||||
breadcrumb ?? (
|
||||
<Breadcrumb
|
||||
className='ui-dashboard-breadcrumb ui-user-center-breadcrumb'
|
||||
items={[{ title: t('体验中心') }, { title }]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
title={
|
||||
titleSuffix ? (
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import React, { useCallback, useEffect, useId, useMemo, useState } from 'react';
|
||||
import { Empty } from 'antd';
|
||||
import { Archive, ShieldCheck } from 'lucide-react';
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
InputNumber,
|
||||
Modal,
|
||||
Select,
|
||||
Switch,
|
||||
TabPane,
|
||||
@@ -12,22 +13,63 @@ import {
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { Lock } from '@/components/common/icons/ActionIcons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers';
|
||||
import './org-experts.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
import OrgModal from './components/OrgModal';
|
||||
import './org-agent-audit.css';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
|
||||
const AUDIT_PAGE_SIZE = 30;
|
||||
|
||||
const RUN_STATUS = {
|
||||
succeeded: { label: '已完成', color: 'success' },
|
||||
completed_with_warnings: { label: '完成但有警告', color: 'warning' },
|
||||
failed: { label: '失败', color: 'error' },
|
||||
cancelled: { label: '已取消', color: 'default' },
|
||||
};
|
||||
|
||||
const BILLING_STATUS = {
|
||||
pending_reconciliation: { label: '待对账', color: 'warning' },
|
||||
final: { label: '已结算', color: 'success' },
|
||||
settled: { label: '已结算', color: 'success' },
|
||||
failed: { label: '失败', color: 'error' },
|
||||
refunded: { label: '退款', color: 'default' },
|
||||
};
|
||||
|
||||
const AuditStatus = ({ value, statuses, prefix }) => {
|
||||
const { t } = useTranslation();
|
||||
const state = Object.hasOwn(statuses, value) ? statuses[value] : null;
|
||||
return (
|
||||
<Tag
|
||||
className={`org-audit-status org-audit-status--${state?.color ?? 'default'}`}
|
||||
variant='filled'
|
||||
>
|
||||
{prefix && <span className='org-audit-status-prefix'>{prefix}</span>}
|
||||
{state ? t(state.label) : value}
|
||||
</Tag>
|
||||
);
|
||||
};
|
||||
|
||||
const AuditTabLabel = ({ label, count }) => (
|
||||
<span className='org-audit-tab-label'>
|
||||
{label}
|
||||
<span className='org-audit-count'>{count}</span>
|
||||
</span>
|
||||
);
|
||||
|
||||
const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
const { t } = useTranslation();
|
||||
const fieldId = useId();
|
||||
const headers = useMemo(() => ({ 'X-Org-Id': String(orgId) }), [orgId]);
|
||||
const [runs, setRuns] = useState([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [page, setPage] = useState(1);
|
||||
const [cases, setCases] = useState([]);
|
||||
const [runsLoaded, setRunsLoaded] = useState(false);
|
||||
const [casesLoaded, setCasesLoaded] = useState(false);
|
||||
const [policies, setPolicies] = useState({});
|
||||
const [retention, setRetention] = useState({
|
||||
hot_days: 90,
|
||||
@@ -38,6 +80,7 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
const [selected, setSelected] = useState(null);
|
||||
const [confirmRun, setConfirmRun] = useState(null);
|
||||
const [inspecting, setInspecting] = useState(false);
|
||||
const [savingRetention, setSavingRetention] = useState(false);
|
||||
|
||||
const load = useCallback(async () => {
|
||||
const [runResponse, caseResponse, policyResponse, retentionResponse] =
|
||||
@@ -53,8 +96,12 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
if (runResponse.data?.success) {
|
||||
setRuns(runResponse.data.data || []);
|
||||
setTotal(runResponse.data.total || 0);
|
||||
setRunsLoaded(true);
|
||||
}
|
||||
if (caseResponse.data?.success) {
|
||||
setCases(caseResponse.data.data || []);
|
||||
setCasesLoaded(true);
|
||||
}
|
||||
if (caseResponse.data?.success) setCases(caseResponse.data.data || []);
|
||||
if (policyResponse.data?.success)
|
||||
setPolicies(policyResponse.data.data || {});
|
||||
if (retentionResponse.data?.success)
|
||||
@@ -80,7 +127,7 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
};
|
||||
|
||||
const inspect = async () => {
|
||||
if (!confirmRun) return;
|
||||
if (!confirmRun || inspecting) return;
|
||||
setInspecting(true);
|
||||
try {
|
||||
// Reason travels in the POST body: browsers reject non-Latin-1 header
|
||||
@@ -107,6 +154,8 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
}
|
||||
};
|
||||
const saveRetention = async () => {
|
||||
if (savingRetention) return;
|
||||
setSavingRetention(true);
|
||||
try {
|
||||
const response = await API.put(
|
||||
'/api/org/agent-audit/retention',
|
||||
@@ -128,13 +177,15 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
error?.message ||
|
||||
t('保留策略保存失败'),
|
||||
);
|
||||
} finally {
|
||||
setSavingRetention(false);
|
||||
}
|
||||
};
|
||||
|
||||
const pageCount = Math.max(1, Math.ceil(total / AUDIT_PAGE_SIZE));
|
||||
|
||||
return (
|
||||
<main className='org-expert-page'>
|
||||
<main className='org-audit-page'>
|
||||
<header className='org-audit-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
@@ -145,7 +196,10 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
)}
|
||||
</Paragraph>
|
||||
</div>
|
||||
<div className='org-audit-filter'>
|
||||
<label htmlFor={`${fieldId}-status`}>{t('任务状态')}</label>
|
||||
<Select
|
||||
id={`${fieldId}-status`}
|
||||
value={status}
|
||||
onChange={(value) => {
|
||||
setPage(1);
|
||||
@@ -153,22 +207,27 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
}}
|
||||
optionList={[
|
||||
{ value: '', label: t('全部状态') },
|
||||
{ value: 'succeeded', label: t('已完成') },
|
||||
{
|
||||
value: 'completed_with_warnings',
|
||||
label: t('完成但有警告'),
|
||||
},
|
||||
{ value: 'failed', label: t('失败') },
|
||||
{ value: 'cancelled', label: t('已取消') },
|
||||
...Object.entries(RUN_STATUS).map(([value, { label }]) => ({
|
||||
value,
|
||||
label: t(label),
|
||||
})),
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</header>
|
||||
<Tabs type='line'>
|
||||
<TabPane tab={`${t('任务元数据')} · ${total}`} itemKey='runs'>
|
||||
<Tabs className='org-audit-tabs' type='line'>
|
||||
<TabPane
|
||||
tab={<AuditTabLabel label={t('任务元数据')} count={total} />}
|
||||
itemKey='runs'
|
||||
>
|
||||
{canAuditContent && (
|
||||
<div className='org-audit-reason'>
|
||||
<Text>{t('正文审计原因')}</Text>
|
||||
<label htmlFor={`${fieldId}-reason`}>
|
||||
<ShieldCheck size={18} aria-hidden='true' />
|
||||
{t('正文审计原因')}
|
||||
</label>
|
||||
<Input
|
||||
id={`${fieldId}-reason`}
|
||||
value={reason}
|
||||
onChange={setReason}
|
||||
placeholder={t('原因将写入不可变审计记录')}
|
||||
@@ -176,42 +235,55 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
</div>
|
||||
)}
|
||||
<section className='org-audit-list'>
|
||||
{runsLoaded && runs.length === 0 && (
|
||||
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
)}
|
||||
{runs.map((run) => (
|
||||
<article key={run.id}>
|
||||
<div>
|
||||
<article className='org-audit-record org-audit-run' key={run.id}>
|
||||
<div className='org-audit-run-details'>
|
||||
<div className='org-audit-record-header'>
|
||||
<code>{run.id}</code>
|
||||
<Tag>{run.status}</Tag>
|
||||
<Tag
|
||||
color={
|
||||
run.billing_status === 'pending_reconciliation'
|
||||
? 'orange'
|
||||
: 'green'
|
||||
}
|
||||
>
|
||||
{run.billing_status}
|
||||
</Tag>
|
||||
<AuditStatus value={run.status} statuses={RUN_STATUS} />
|
||||
<AuditStatus
|
||||
value={run.billing_status}
|
||||
statuses={BILLING_STATUS}
|
||||
prefix={t('计费状态')}
|
||||
/>
|
||||
</div>
|
||||
<div className='org-audit-metrics'>
|
||||
<span>
|
||||
{t('专家')} #{run.expert_id}
|
||||
</span>
|
||||
<span>
|
||||
{t('模型')} {run.model_used || '-'}
|
||||
</span>
|
||||
<span>
|
||||
{t('消费')} {run.effective_quota}
|
||||
</span>
|
||||
<span>
|
||||
{t('成员')} #{run.org_member_id}
|
||||
</span>
|
||||
<dl className='org-audit-metrics'>
|
||||
<div>
|
||||
<dt>{t('专家')}</dt>
|
||||
<dd>#{run.expert_id}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>{t('模型')}</dt>
|
||||
<dd>{run.model_used || '-'}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>{t('消费')}</dt>
|
||||
<dd>{run.effective_quota}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>{t('成员')}</dt>
|
||||
<dd>#{run.org_member_id}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
{!!run.matched_skills?.length && (
|
||||
<div className='org-audit-skills'>
|
||||
{(run.matched_skills || []).map((skill) => (
|
||||
<Tag key={skill.id}>{skill.match_reason}</Tag>
|
||||
{run.matched_skills.map((skill) => (
|
||||
<Tag key={skill.id} variant='filled'>
|
||||
{skill.match_reason}
|
||||
</Tag>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{canAuditContent && (
|
||||
<Button size='small' onClick={() => requestInspect(run)}>
|
||||
<Button
|
||||
className='org-audit-view'
|
||||
icon={<Lock size={16} aria-hidden='true' />}
|
||||
onClick={() => requestInspect(run)}
|
||||
>
|
||||
{t('二次确认查看正文')}
|
||||
</Button>
|
||||
)}
|
||||
@@ -241,39 +313,54 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
)}
|
||||
</TabPane>
|
||||
<TabPane
|
||||
tab={`${t('待对账')} · ${cases.length}`}
|
||||
tab={<AuditTabLabel label={t('待对账')} count={cases.length} />}
|
||||
itemKey='reconciliation'
|
||||
>
|
||||
<section className='org-audit-list'>
|
||||
{casesLoaded && cases.length === 0 && (
|
||||
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
)}
|
||||
{cases.map((item) => (
|
||||
<article key={item.id}>
|
||||
<div>
|
||||
<article className='org-audit-record' key={item.id}>
|
||||
<div className='org-audit-record-header'>
|
||||
<code>{item.request_id}</code>
|
||||
<Tag color='orange'>{item.status}</Tag>
|
||||
<AuditStatus value={item.status} statuses={BILLING_STATUS} />
|
||||
</div>
|
||||
<div className='org-audit-case-details'>
|
||||
<Tag variant='filled'>{item.workload_type}</Tag>
|
||||
<span>{item.reason}</span>
|
||||
</div>
|
||||
<Text>
|
||||
{item.workload_type} / {item.reason}
|
||||
</Text>
|
||||
</article>
|
||||
))}
|
||||
</section>
|
||||
</TabPane>
|
||||
<TabPane tab={t('安全策略')} itemKey='policies'>
|
||||
<section className='org-policy-grid'>
|
||||
<article>
|
||||
<strong>{t('任务保留策略')}</strong>
|
||||
<Text>{t('热数据保留天数')}</Text>
|
||||
<article className='org-audit-record'>
|
||||
<h2 className='org-audit-policy-heading'>
|
||||
<Archive size={18} aria-hidden='true' />
|
||||
{t('任务保留策略')}
|
||||
</h2>
|
||||
<div className='org-audit-policy-field'>
|
||||
<label htmlFor={`${fieldId}-hot-days`}>
|
||||
{t('热数据保留天数')}
|
||||
</label>
|
||||
<InputNumber
|
||||
id={`${fieldId}-hot-days`}
|
||||
min={7}
|
||||
max={3650}
|
||||
disabled={!canManagePolicy}
|
||||
disabled={!canManagePolicy || savingRetention}
|
||||
value={retention.hot_days}
|
||||
onChange={(hot_days) =>
|
||||
setRetention((current) => ({ ...current, hot_days }))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className='org-audit-policy-field'>
|
||||
<span id={`${fieldId}-archive`}>{t('启用任务归档')}</span>
|
||||
<Switch
|
||||
disabled={!canManagePolicy}
|
||||
aria-labelledby={`${fieldId}-archive`}
|
||||
disabled={!canManagePolicy || savingRetention}
|
||||
checked={!!retention.archive_enabled}
|
||||
onChange={(archive_enabled) =>
|
||||
setRetention((current) => ({
|
||||
@@ -282,16 +369,22 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{canManagePolicy && (
|
||||
<Button size='small' onClick={saveRetention}>
|
||||
<Button
|
||||
className='org-audit-save'
|
||||
type='primary'
|
||||
loading={savingRetention}
|
||||
onClick={saveRetention}
|
||||
>
|
||||
{t('保存保留策略')}
|
||||
</Button>
|
||||
)}
|
||||
</article>
|
||||
{Object.entries(policies).map(([key, value]) => (
|
||||
<article key={key}>
|
||||
<strong>{key}</strong>
|
||||
<Text>
|
||||
<article className='org-audit-record' key={key}>
|
||||
<h2 className='org-audit-policy-heading'>{key}</h2>
|
||||
<Text className='org-audit-policy-value'>
|
||||
{typeof value === 'string' ? value : JSON.stringify(value)}
|
||||
</Text>
|
||||
</article>
|
||||
@@ -299,24 +392,33 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
</section>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
<Modal
|
||||
<OrgModal
|
||||
className='org-audit-dialog'
|
||||
title={t('确认查看任务正文')}
|
||||
visible={!!confirmRun}
|
||||
onCancel={() => setConfirmRun(null)}
|
||||
onOk={inspect}
|
||||
confirmLoading={inspecting}
|
||||
>
|
||||
<Paragraph>
|
||||
<Paragraph className='org-audit-dialog-notice'>
|
||||
<ShieldCheck size={18} aria-hidden='true' />
|
||||
{t('此操作将在返回内容前写入不可变审计记录,正文携带你的专属水印。')}
|
||||
</Paragraph>
|
||||
<Text type='tertiary'>
|
||||
{t('任务')}: <code>{confirmRun?.id}</code>
|
||||
</Text>
|
||||
<Paragraph>
|
||||
{t('审计原因')}: {reason.trim()}
|
||||
</Paragraph>
|
||||
</Modal>
|
||||
<Modal
|
||||
<dl className='org-audit-confirm-details'>
|
||||
<div>
|
||||
<dt>{t('任务')}</dt>
|
||||
<dd>
|
||||
<code>{confirmRun?.id}</code>
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>{t('审计原因')}</dt>
|
||||
<dd>{reason.trim()}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</OrgModal>
|
||||
<OrgModal
|
||||
className='org-audit-dialog'
|
||||
title={t('受保护的任务正文')}
|
||||
visible={!!selected}
|
||||
footer={null}
|
||||
@@ -324,8 +426,18 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
width={920}
|
||||
>
|
||||
{selected && (
|
||||
<div className='org-audit-content'>
|
||||
<Tag color='red'>{selected.watermark}</Tag>
|
||||
<div
|
||||
className='org-audit-content'
|
||||
tabIndex={0}
|
||||
role='region'
|
||||
aria-label={t('受保护的任务正文')}
|
||||
>
|
||||
<Tag
|
||||
className='org-audit-watermark org-audit-status org-audit-status--warning'
|
||||
variant='filled'
|
||||
>
|
||||
{selected.watermark}
|
||||
</Tag>
|
||||
<h4>{t('输入')}</h4>
|
||||
<pre>{selected.input}</pre>
|
||||
<h4>{t('步骤')}</h4>
|
||||
@@ -336,7 +448,7 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
<pre>{selected.artifact?.content}</pre>
|
||||
</div>
|
||||
)}
|
||||
</Modal>
|
||||
</OrgModal>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -10,9 +10,7 @@ import {
|
||||
Button,
|
||||
Input,
|
||||
InputNumber,
|
||||
Modal,
|
||||
Select,
|
||||
SideSheet,
|
||||
Switch,
|
||||
TabPane,
|
||||
Tabs,
|
||||
@@ -30,7 +28,11 @@ import {
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import './org-connectors.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
import OrgModal from './components/OrgModal';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import OrgSideSheet from './components/OrgSideSheet';
|
||||
import OrgStateBlock from './components/OrgStateBlock';
|
||||
import OrgListCard from './components/OrgListCard';
|
||||
|
||||
const headersFor = (orgId) => ({ 'X-Org-Id': String(orgId) });
|
||||
const blankConnector = {
|
||||
@@ -254,7 +256,7 @@ const OrgConnectors = ({ orgId }) => {
|
||||
};
|
||||
|
||||
const revoke = (row) => {
|
||||
Modal.confirm({
|
||||
OrgModal.confirm({
|
||||
title: t('撤销 Connector'),
|
||||
content: t('撤销后,排队和等待确认的调用都会在执行前重新校验并被阻断。'),
|
||||
onOk: async () => {
|
||||
@@ -339,22 +341,12 @@ const OrgConnectors = ({ orgId }) => {
|
||||
closeGuide();
|
||||
}, [orgId, closeGuide]);
|
||||
return (
|
||||
<main className='org-connector-page'>
|
||||
<header className='org-connector-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<h1>{t('业务系统连接器')}</h1>
|
||||
<p>{t('凭据、授权范围、写操作确认和调用审计在同一控制面闭环。')}</p>
|
||||
</div>
|
||||
<div className='org-connector-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={load}
|
||||
>
|
||||
{t('刷新')}
|
||||
</Button>
|
||||
<main className='uc-page oc-page org-governance-page'>
|
||||
<OrgPageHeader
|
||||
title={t('业务系统连接器')}
|
||||
subtitle={t('凭据、授权范围、写操作确认和调用审计在同一控制面闭环。')}
|
||||
actions={
|
||||
<>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<ActionPlus size={16} />}
|
||||
@@ -362,28 +354,47 @@ const OrgConnectors = ({ orgId }) => {
|
||||
>
|
||||
{t('配置 Connector')}
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
<Button
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={load}
|
||||
>
|
||||
{t('刷新')}
|
||||
</Button>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
<PageGuidePill guide={guide} />
|
||||
<PageGuideDrawer guide={guide} />
|
||||
|
||||
<Tabs type='line'>
|
||||
<Tabs type='line' className='oc-list-tabs org-connector-tabs'>
|
||||
<TabPane
|
||||
tab={`${t('实例')} · ${connectorRows.length}`}
|
||||
itemKey='instances'
|
||||
>
|
||||
{connectorRows.length === 0 ? (
|
||||
<OrgListCard>
|
||||
<OrgStateBlock loading={loading} title={t('暂无数据')} />
|
||||
</OrgListCard>
|
||||
) : (
|
||||
<section className='org-connector-grid'>
|
||||
{connectorRows.map((row) => {
|
||||
const definition = definitionsById.get(row.definition_id);
|
||||
const credentialState = connectorViewById.get(row.id)?.credential;
|
||||
const credentialState = connectorViewById.get(
|
||||
row.id,
|
||||
)?.credential;
|
||||
return (
|
||||
<article key={row.id} className='org-connector-card'>
|
||||
<div className='org-connector-card-top'>
|
||||
<span className='org-connector-icon'>
|
||||
<Cable size={20} />
|
||||
</span>
|
||||
<Tag color={row.status === 'active' ? 'green' : 'red'}>
|
||||
<Tag
|
||||
variant='filled'
|
||||
color={row.status === 'active' ? 'green' : 'red'}
|
||||
>
|
||||
{row.status}
|
||||
</Tag>
|
||||
</div>
|
||||
@@ -411,11 +422,16 @@ const OrgConnectors = ({ orgId }) => {
|
||||
</div>
|
||||
</dl>
|
||||
<div className='org-connector-card-actions'>
|
||||
<Button size='small' onClick={() => openEdit(row)}>
|
||||
<Button
|
||||
type='link'
|
||||
size='small'
|
||||
onClick={() => openEdit(row)}
|
||||
>
|
||||
{t('配置')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
type='link'
|
||||
icon={<ActionKeyRound size={14} />}
|
||||
onClick={() => {
|
||||
setSelected(row);
|
||||
@@ -438,6 +454,7 @@ const OrgConnectors = ({ orgId }) => {
|
||||
);
|
||||
})}
|
||||
</section>
|
||||
)}
|
||||
</TabPane>
|
||||
|
||||
<TabPane tab={`${t('授权矩阵')} · ${grants.length}`} itemKey='grants'>
|
||||
@@ -459,6 +476,11 @@ const OrgConnectors = ({ orgId }) => {
|
||||
{t('发布授权')}
|
||||
</Button>
|
||||
</div>
|
||||
{grants.length === 0 ? (
|
||||
<OrgListCard>
|
||||
<OrgStateBlock loading={loading} title={t('暂无数据')} />
|
||||
</OrgListCard>
|
||||
) : (
|
||||
<section className='org-connector-list'>
|
||||
{grants.map((item) => (
|
||||
<article key={item.id}>
|
||||
@@ -466,7 +488,7 @@ const OrgConnectors = ({ orgId }) => {
|
||||
<strong>
|
||||
{item.scope_type} #{item.scope_id || 0}
|
||||
</strong>
|
||||
<Tag>v{item.version}</Tag>
|
||||
<Tag variant='filled'>v{item.version}</Tag>
|
||||
</div>
|
||||
<code>{item.method_keys}</code>
|
||||
<span>
|
||||
@@ -476,15 +498,24 @@ const OrgConnectors = ({ orgId }) => {
|
||||
</article>
|
||||
))}
|
||||
</section>
|
||||
)}
|
||||
</TabPane>
|
||||
|
||||
<TabPane tab={`${t('审计')} · ${audit.length}`} itemKey='audit'>
|
||||
{audit.length === 0 ? (
|
||||
<OrgListCard>
|
||||
<OrgStateBlock loading={loading} title={t('暂无数据')} />
|
||||
</OrgListCard>
|
||||
) : (
|
||||
<section className='org-connector-list org-connector-audit'>
|
||||
{audit.map((item) => (
|
||||
<article key={item.id}>
|
||||
<div>
|
||||
<strong>{item.action}</strong>
|
||||
<Tag color={item.status === 'succeeded' ? 'green' : 'orange'}>
|
||||
<Tag
|
||||
variant='filled'
|
||||
color={item.status === 'succeeded' ? 'green' : 'orange'}
|
||||
>
|
||||
{item.status}
|
||||
</Tag>
|
||||
</div>
|
||||
@@ -493,14 +524,16 @@ const OrgConnectors = ({ orgId }) => {
|
||||
</article>
|
||||
))}
|
||||
</section>
|
||||
)}
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
<SideSheet
|
||||
<OrgSideSheet
|
||||
title={form.id ? t('编辑 Connector') : t('配置 Connector')}
|
||||
visible={editorOpen}
|
||||
onCancel={() => setEditorOpen(false)}
|
||||
width={520}
|
||||
width={560}
|
||||
className='org-connector-drawer'
|
||||
footer={
|
||||
<Button theme='solid' loading={saving} onClick={saveConnector}>
|
||||
{t('保存配置')}
|
||||
@@ -585,9 +618,9 @@ const OrgConnectors = ({ orgId }) => {
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
</SideSheet>
|
||||
</OrgSideSheet>
|
||||
|
||||
<Modal
|
||||
<OrgModal
|
||||
title={t('轮换加密凭据')}
|
||||
visible={credentialOpen}
|
||||
onCancel={() => setCredentialOpen(false)}
|
||||
@@ -598,13 +631,14 @@ const OrgConnectors = ({ orgId }) => {
|
||||
{t('提交后只显示哈希尾号,服务端不会回显明文。')}
|
||||
</p>
|
||||
<TextArea autosize value={credential} onChange={setCredential} />
|
||||
</Modal>
|
||||
</OrgModal>
|
||||
|
||||
<SideSheet
|
||||
<OrgSideSheet
|
||||
title={t('发布授权版本')}
|
||||
visible={grantOpen}
|
||||
onCancel={() => setGrantOpen(false)}
|
||||
width={520}
|
||||
width={560}
|
||||
className='org-connector-drawer'
|
||||
footer={
|
||||
<Button theme='solid' loading={saving} onClick={saveGrant}>
|
||||
{t('发布授权')}
|
||||
@@ -744,7 +778,7 @@ const OrgConnectors = ({ orgId }) => {
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
</SideSheet>
|
||||
</OrgSideSheet>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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(
|
||||
<main className='uc-page oc-page org-governance-page'>
|
||||
<OrgPageHeader
|
||||
title={t('企业专家工坊')}
|
||||
subtitle={t(
|
||||
'从平台安全基线派生不可变版本,配置模型、契约与多步骤交付路径。',
|
||||
)}
|
||||
</Paragraph>
|
||||
</div>
|
||||
<div className='org-expert-hero-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
onClick={() => beginVersion(null)}
|
||||
>
|
||||
actions={
|
||||
<>
|
||||
<Button theme='solid' onClick={() => beginVersion(null)}>
|
||||
{t('创建企业专家')}
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
<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>
|
||||
<OrgPanel flush padding='p-0'>
|
||||
<OrgStateBlock
|
||||
loading={!loaded}
|
||||
title={t('尚未创建企业专家')}
|
||||
description={t('选择一个平台专家作为安全来源开始派生。')}
|
||||
/>
|
||||
</OrgPanel>
|
||||
) : (
|
||||
definitions.map((view) => (
|
||||
<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>
|
||||
<div className='org-expert-card-actions'>
|
||||
<Button onClick={() => beginVersion(view)}>
|
||||
{t('创建新版本')}
|
||||
</Button>
|
||||
</div>
|
||||
</OrgPanel>
|
||||
))
|
||||
)}
|
||||
))}
|
||||
</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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import TableActionPopconfirm from '@/components/common/table/TableActionPopconfirm';
|
||||
import UserCenterPageHeader from '@/components/common/UserCenterPageHeader';
|
||||
import {
|
||||
formatIdReference,
|
||||
formatPercent,
|
||||
@@ -1335,20 +1336,20 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
|
||||
return (
|
||||
<main className='knowledge-page'>
|
||||
<header className='knowledge-hero'>
|
||||
<div className='knowledge-hero-copy'>
|
||||
<OrgBreadcrumb />
|
||||
<div className='knowledge-eyebrow'>
|
||||
<ShieldCheck size={15} />
|
||||
<span>{t('企业可信知识层')}</span>
|
||||
<UserCenterPageHeader
|
||||
className='knowledge-hero'
|
||||
breadcrumb={<OrgBreadcrumb />}
|
||||
title={
|
||||
<span className='knowledge-heading'>
|
||||
<span>{t('企业知识')}</span>
|
||||
<span className='knowledge-beta'>{I18N_TECHNICAL_TEXT.BETA}</span>
|
||||
</div>
|
||||
<h1>{t('企业知识')}</h1>
|
||||
<p>
|
||||
{t('把组织经验转化为专家可引用、可追溯、受权限保护的知识上下文。')}
|
||||
</p>
|
||||
</div>
|
||||
<div className='knowledge-hero-actions'>
|
||||
</span>
|
||||
}
|
||||
subtitle={t(
|
||||
'把组织经验转化为专家可引用、可追溯、受权限保护的知识上下文。',
|
||||
)}
|
||||
extra={
|
||||
<>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
@@ -1364,8 +1365,9 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
>
|
||||
{t('新建知识库')}
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
<PageGuidePill guide={guide} />
|
||||
|
||||
@@ -1999,7 +2001,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
confirmLoading={saving}
|
||||
onOk={createBase}
|
||||
onCancel={() => setCreateVisible(false)}
|
||||
okText={t('创建知识库')}
|
||||
okText={t('保存')}
|
||||
cancelText={t('取消')}
|
||||
width={620}
|
||||
>
|
||||
@@ -2102,7 +2104,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
confirmLoading={editSaving}
|
||||
onOk={updateBase}
|
||||
onCancel={() => setEditVisible(false)}
|
||||
okText={t('保存修改')}
|
||||
okText={t('保存')}
|
||||
cancelText={t('取消')}
|
||||
width={620}
|
||||
>
|
||||
|
||||
@@ -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 (
|
||||
<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('我的技能'),
|
||||
node: <OrgMySkills orgId={orgId} />,
|
||||
subtitle: t(
|
||||
'这里展示与任务运行时相同的有效能力集,以及每项技能为什么对你生效。',
|
||||
),
|
||||
node: <OrgMySkills orgId={orgId} actionsHost={skillsActionsHost} />,
|
||||
},
|
||||
showConnectors && {
|
||||
key: 'connectors',
|
||||
label: t('业务系统授权'),
|
||||
node: <OrgMyConnectors orgId={orgId} />,
|
||||
subtitle: t(
|
||||
'查看专家在任务中可代表你调用的业务系统、方法和确认策略。',
|
||||
),
|
||||
node: (
|
||||
<OrgMyConnectors
|
||||
orgId={orgId}
|
||||
actionsHost={connectorsActionsHost}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ import {
|
||||
PageGuideDrawer,
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import './org-my-capabilities.css';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
const confirmationLabels = {
|
||||
never: '无需确认',
|
||||
@@ -18,7 +17,7 @@ const confirmationLabels = {
|
||||
always: '每次调用都确认',
|
||||
};
|
||||
|
||||
const OrgMyConnectors = ({ orgId }) => {
|
||||
const OrgMyConnectors = ({ orgId, actionsHost }) => {
|
||||
const { t } = useTranslation();
|
||||
const headers = useMemo(() => ({ 'X-Org-Id': String(orgId) }), [orgId]);
|
||||
const [items, setItems] = useState([]);
|
||||
@@ -98,12 +97,9 @@ const OrgMyConnectors = ({ orgId }) => {
|
||||
],
|
||||
});
|
||||
return (
|
||||
<main className='uc-page org-capabilities-page'>
|
||||
<OrgPageHeader
|
||||
title={t('我的业务系统授权')}
|
||||
subtitle={t('查看专家在任务中可代表你调用的业务系统、方法和确认策略。')}
|
||||
actions={<PageGuideTrigger guide={guide} />}
|
||||
/>
|
||||
<>
|
||||
{actionsHost &&
|
||||
createPortal(<PageGuideTrigger guide={guide} />, actionsHost)}
|
||||
<PageGuideDrawer guide={guide} />
|
||||
{loadError ? (
|
||||
<Card>
|
||||
@@ -189,7 +185,7 @@ const OrgMyConnectors = ({ orgId }) => {
|
||||
))}
|
||||
</section>
|
||||
)}
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ import {
|
||||
PageGuideDrawer,
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import './org-my-capabilities.css';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
|
||||
@@ -29,7 +28,7 @@ const scopes = {
|
||||
member: '成员',
|
||||
};
|
||||
|
||||
const OrgMySkills = ({ orgId }) => {
|
||||
const OrgMySkills = ({ orgId, actionsHost }) => {
|
||||
const { t } = useTranslation();
|
||||
const headers = useMemo(() => ({ 'X-Org-Id': String(orgId) }), [orgId]);
|
||||
const [items, setItems] = useState([]);
|
||||
@@ -106,14 +105,9 @@ const OrgMySkills = ({ orgId }) => {
|
||||
],
|
||||
});
|
||||
return (
|
||||
<main className='uc-page org-capabilities-page'>
|
||||
<OrgPageHeader
|
||||
title={t('我的技能')}
|
||||
subtitle={t(
|
||||
'这里展示与任务运行时相同的有效能力集,以及每项技能为什么对你生效。',
|
||||
)}
|
||||
actions={<PageGuideTrigger guide={guide} />}
|
||||
/>
|
||||
<>
|
||||
{actionsHost &&
|
||||
createPortal(<PageGuideTrigger guide={guide} />, actionsHost)}
|
||||
<PageGuideDrawer guide={guide} />
|
||||
{items.length === 0 ? (
|
||||
<Card>
|
||||
@@ -197,7 +191,7 @@ const OrgMySkills = ({ orgId }) => {
|
||||
})}
|
||||
</section>
|
||||
)}
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
Code2 as ActionCode2,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
@@ -54,7 +55,7 @@ const split = (value) =>
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean);
|
||||
|
||||
const OrgPrivateSkills = ({ orgId }) => {
|
||||
const OrgPrivateSkills = ({ orgId, actionsHost }) => {
|
||||
const { t } = useTranslation();
|
||||
const editorLabels = {
|
||||
name_zh: t('中文名称'),
|
||||
@@ -409,7 +410,9 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
}, [orgId, closeGuide]);
|
||||
return (
|
||||
<div className='org-skill-center-content'>
|
||||
<div className='org-skill-center-actions'>
|
||||
{actionsHost &&
|
||||
createPortal(
|
||||
<>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<ActionCode2 size={16} />}
|
||||
@@ -418,10 +421,12 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
{t('创建私有 Skill')}
|
||||
</Button>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
</div>
|
||||
</>,
|
||||
actionsHost,
|
||||
)}
|
||||
<PageGuidePill guide={guide} />
|
||||
<PageGuideDrawer guide={guide} />
|
||||
<OrgPanel>
|
||||
<OrgPanel padding='p-0'>
|
||||
{items.length === 0 ? (
|
||||
<SkillEmptyGuide
|
||||
title={t('还没有自研 Skill')}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Typography } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
usePageGuide,
|
||||
@@ -8,9 +7,7 @@ import {
|
||||
} from '../../components/common/PageGuide';
|
||||
import QualityDashboard from '../../components/quality/QualityDashboard';
|
||||
import './org-quality.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
|
||||
/** 企业中心 · 调用质量:只见本企业数据,渠道与上游细节由后端屏蔽 */
|
||||
const OrgQuality = ({ orgId }) => {
|
||||
@@ -57,20 +54,14 @@ const OrgQuality = ({ orgId }) => {
|
||||
});
|
||||
|
||||
return (
|
||||
<div className='org-quality-page'>
|
||||
<header className='org-quality-hero'>
|
||||
<div className='min-w-0'>
|
||||
<OrgBreadcrumb />
|
||||
<div className='org-quality-eyebrow'>{t('调用质量')}</div>
|
||||
<Title heading={3}>{t('企业调用质量')}</Title>
|
||||
<Text type='tertiary'>
|
||||
{t(
|
||||
<div className='uc-page org-quality-page'>
|
||||
<OrgPageHeader
|
||||
title={t('企业调用质量')}
|
||||
subtitle={t(
|
||||
'查看本企业调用的成功率、自动兜底效果与失败原因,定位受影响的成员与模型。',
|
||||
)}
|
||||
</Text>
|
||||
</div>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
</header>
|
||||
actions={<PageGuideTrigger guide={guide} />}
|
||||
/>
|
||||
<PageGuideDrawer guide={guide} />
|
||||
<QualityDashboard scope='org' orgId={orgId} />
|
||||
</div>
|
||||
|
||||
@@ -779,7 +779,7 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
/>
|
||||
)}
|
||||
|
||||
<AntForm layout='vertical' requiredMark={false} component='div'>
|
||||
<AntForm layout='vertical' requiredMark={false}>
|
||||
<div className='oc-cs-grid'>
|
||||
<AntForm.Item label={t('主机地址')}>
|
||||
<Input
|
||||
@@ -801,6 +801,7 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
</AntForm.Item>
|
||||
<AntForm.Item label={t('用户名')}>
|
||||
<Input
|
||||
autoComplete='off'
|
||||
value={promptCfg.user}
|
||||
onChange={(v) => setPromptCfg({ ...promptCfg, user: v })}
|
||||
disabled={promptFieldsLocked}
|
||||
@@ -809,6 +810,7 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
<AntForm.Item label={t('密码')}>
|
||||
<Input
|
||||
mode='password'
|
||||
autoComplete='new-password'
|
||||
value={promptCfg.password}
|
||||
onChange={(v) => setPromptCfg({ ...promptCfg, password: v })}
|
||||
placeholder={t('保持 ****** 表示沿用已保存密码')}
|
||||
|
||||
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
InputNumber,
|
||||
Modal,
|
||||
Select,
|
||||
Table,
|
||||
Toast,
|
||||
@@ -24,11 +23,12 @@ import {
|
||||
PageGuideTrigger,
|
||||
flashGuideTarget,
|
||||
} from '../../components/common/PageGuide';
|
||||
import OrgPanel from './components/OrgPanel';
|
||||
import OrgListCard from './components/OrgListCard';
|
||||
import OrgModal from './components/OrgModal';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import './org-skills.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
const { Text } = Typography;
|
||||
|
||||
const defaultForm = {
|
||||
skill_id: 0,
|
||||
@@ -266,27 +266,24 @@ const OrgSkillAssignments = ({ orgId, orgRole = '' }) => {
|
||||
closeGuide();
|
||||
}, [orgId, closeGuide]);
|
||||
return (
|
||||
<main className='org-skills-page'>
|
||||
<header className='org-skills-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<Title heading={3}>{t('分发与锁定')}</Title>
|
||||
<Paragraph>
|
||||
{t(
|
||||
<main className='uc-page oc-page org-governance-page'>
|
||||
<OrgPageHeader
|
||||
title={t('分发与锁定')}
|
||||
subtitle={t(
|
||||
'按企业、部门子树、项目、角色、负责人或成员分发,并实时预览最终能力集。',
|
||||
)}
|
||||
</Paragraph>
|
||||
</div>
|
||||
<div className='org-skills-hero-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button theme='solid' type='primary' onClick={openCreateModal}>
|
||||
actions={
|
||||
<>
|
||||
<Button theme='solid' onClick={openCreateModal}>
|
||||
{t('创建分发策略')}
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<PageGuidePill guide={guide} />
|
||||
<PageGuideDrawer guide={guide} />
|
||||
<OrgPanel title={t('策略列表')}>
|
||||
<OrgListCard title={t('策略列表')}>
|
||||
{items.length === 0 ? (
|
||||
<SkillEmptyGuide
|
||||
title={t('还没有分发策略')}
|
||||
@@ -301,13 +298,18 @@ const OrgSkillAssignments = ({ orgId, orgRole = '' }) => {
|
||||
columns={columns}
|
||||
dataSource={items}
|
||||
rowKey='id'
|
||||
scroll={{ x: 640 }}
|
||||
pagination={{ resetOnDataChange: true }}
|
||||
/>
|
||||
)}
|
||||
</OrgPanel>
|
||||
<OrgPanel title={t('成员能力预览')} className='org-skill-preview'>
|
||||
</OrgListCard>
|
||||
<OrgListCard
|
||||
title={t('成员能力预览')}
|
||||
className='org-skill-preview'
|
||||
tools={
|
||||
<div className='org-skill-preview-controls'>
|
||||
<InputNumber
|
||||
aria-label={t('成员 ID')}
|
||||
min={1}
|
||||
value={previewMember}
|
||||
onChange={setPreviewMember}
|
||||
@@ -315,6 +317,8 @@ const OrgSkillAssignments = ({ orgId, orgRole = '' }) => {
|
||||
/>
|
||||
<Button onClick={runPreview}>{t('预览')}</Button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{preview.map((item) => (
|
||||
<div key={item.skill_id} className='org-skill-preview-row'>
|
||||
<Text strong>{item.canonical_id}</Text>
|
||||
@@ -330,14 +334,14 @@ const OrgSkillAssignments = ({ orgId, orgRole = '' }) => {
|
||||
</Text>
|
||||
</div>
|
||||
))}
|
||||
</OrgPanel>
|
||||
<Modal
|
||||
</OrgListCard>
|
||||
<OrgModal
|
||||
title={t('创建分发策略')}
|
||||
visible={visible}
|
||||
onCancel={() => setVisible(false)}
|
||||
onOk={save}
|
||||
>
|
||||
<div className='org-skill-form'>
|
||||
<div className='org-skill-form org-assignment-form'>
|
||||
<label>
|
||||
<Text>Skill</Text>
|
||||
<Select
|
||||
@@ -464,7 +468,7 @@ const OrgSkillAssignments = ({ orgId, orgRole = '' }) => {
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</Modal>
|
||||
</OrgModal>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import OrgSubpageTabs from './components/OrgSubpageTabs';
|
||||
@@ -24,11 +24,27 @@ const OrgSkillCenter = ({
|
||||
showPrivate = true,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const [libraryActionsHost, setLibraryActionsHost] = useState(null);
|
||||
const [privateActionsHost, setPrivateActionsHost] = useState(null);
|
||||
return (
|
||||
<main className='uc-page oc-page org-skill-center-page'>
|
||||
<OrgSubpageTabs
|
||||
renderHeader={({ label, subtitle }) => (
|
||||
<OrgPageHeader title={label} subtitle={subtitle} />
|
||||
renderHeader={({ key, label, subtitle }) => (
|
||||
<OrgPageHeader
|
||||
title={label}
|
||||
subtitle={subtitle}
|
||||
actions={
|
||||
<div
|
||||
key={key}
|
||||
ref={
|
||||
key === 'library'
|
||||
? setLibraryActionsHost
|
||||
: setPrivateActionsHost
|
||||
}
|
||||
className='org-skill-center-actions'
|
||||
/>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
tabs={[
|
||||
showLibrary && {
|
||||
@@ -44,6 +60,7 @@ const OrgSkillCenter = ({
|
||||
orgId={orgId}
|
||||
orgRole={orgRole}
|
||||
canAssignSkills={canAssignSkills}
|
||||
actionsHost={libraryActionsHost}
|
||||
/>
|
||||
),
|
||||
},
|
||||
@@ -53,7 +70,12 @@ const OrgSkillCenter = ({
|
||||
subtitle: t(
|
||||
'版本内容不可变;兼容扫描、双人审核、发布、回滚与紧急停用均保留审计。',
|
||||
),
|
||||
node: <OrgPrivateSkills orgId={orgId} />,
|
||||
node: (
|
||||
<OrgPrivateSkills
|
||||
orgId={orgId}
|
||||
actionsHost={privateActionsHost}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -5,6 +5,7 @@ import React, {
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import {
|
||||
Button,
|
||||
Empty,
|
||||
@@ -51,7 +52,12 @@ const jsonList = (value) => {
|
||||
}
|
||||
};
|
||||
|
||||
const OrgSkillLibrary = ({ orgId, orgRole, canAssignSkills = false }) => {
|
||||
const OrgSkillLibrary = ({
|
||||
orgId,
|
||||
orgRole,
|
||||
canAssignSkills = false,
|
||||
actionsHost,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const [statusState] = useContext(StatusContext);
|
||||
@@ -436,7 +442,9 @@ const OrgSkillLibrary = ({ orgId, orgRole, canAssignSkills = false }) => {
|
||||
});
|
||||
return (
|
||||
<div className='org-skill-center-content'>
|
||||
<div className='org-skill-center-actions'>
|
||||
{actionsHost &&
|
||||
createPortal(
|
||||
<>
|
||||
{/* 页内引入:对平台超管这是唯一可用入口(超市页解析不出其企业上下文);
|
||||
对普通管理员是就地快速添加。数据复用已加载的 catalog,不额外发请求。 */}
|
||||
{canImport ? (
|
||||
@@ -447,12 +455,17 @@ const OrgSkillLibrary = ({ orgId, orgRole, canAssignSkills = false }) => {
|
||||
{/* 浏览完整平台目录(分页/搜索/分类)仍去超市页;超管在那里没有企业
|
||||
上下文,故不对其展示,避免点过去发现无法启用。 */}
|
||||
{selfEnableAllowed && !isPlatformSuperAdmin ? (
|
||||
<Button theme='borderless' onClick={() => navigate('/skill-market')}>
|
||||
<Button
|
||||
theme='borderless'
|
||||
onClick={() => navigate('/skill-market')}
|
||||
>
|
||||
{t('浏览技能超市')}
|
||||
</Button>
|
||||
) : null}
|
||||
<PageGuideTrigger guide={guide} />
|
||||
</div>
|
||||
</>,
|
||||
actionsHost,
|
||||
)}
|
||||
<PageGuideDrawer guide={guide} />
|
||||
{!loaded ? (
|
||||
<SkillEmptyGuide title={t('正在加载企业技能库')} />
|
||||
|
||||
@@ -0,0 +1,386 @@
|
||||
.org-audit-page,
|
||||
.org-audit-dialog {
|
||||
--oc-audit-success-text: #21633b;
|
||||
--oc-audit-success-bg: #eef8f1;
|
||||
--oc-audit-warning-text: #865014;
|
||||
--oc-audit-warning-bg: #fdf3e1;
|
||||
--oc-audit-error-text: #a92b37;
|
||||
--oc-audit-error-bg: #fceef0;
|
||||
--oc-audit-muted: color-mix(
|
||||
in srgb,
|
||||
var(--text-primary) 40%,
|
||||
var(--text-secondary)
|
||||
);
|
||||
}
|
||||
|
||||
html.dark :is(.org-audit-page, .org-audit-dialog) {
|
||||
--oc-audit-success-text: #90d9a8;
|
||||
--oc-audit-success-bg: #203529;
|
||||
--oc-audit-warning-text: #f3c580;
|
||||
--oc-audit-warning-bg: #382e22;
|
||||
--oc-audit-error-text: #ffacb2;
|
||||
--oc-audit-error-bg: #3b272f;
|
||||
}
|
||||
|
||||
.org-audit-page {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: var(--uc-layout-gap);
|
||||
padding: var(--uc-page-pad-top, 30px) var(--uc-page-pad-x, 36px)
|
||||
var(--uc-page-pad-bottom, 36px);
|
||||
}
|
||||
|
||||
.org-audit-hero {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.org-audit-filter {
|
||||
display: grid;
|
||||
flex: 0 0 180px;
|
||||
gap: 6px;
|
||||
color: var(--oc-audit-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.org-audit-tabs {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.org-audit-tabs > .ant-tabs-nav {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.org-audit-tab-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.org-audit-count {
|
||||
display: inline-grid;
|
||||
min-width: 22px;
|
||||
padding: 0 6px;
|
||||
border-radius: 6px;
|
||||
background: var(--surface-bg-base);
|
||||
color: var(--oc-audit-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
place-items: center;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.org-audit-tabs .ant-tabs-tab-active .org-audit-count {
|
||||
background: var(--brand-selection-bg);
|
||||
color: var(--brand-selection-text);
|
||||
}
|
||||
|
||||
.org-audit-reason {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
padding: 12px 20px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 10px;
|
||||
background: var(--surface-card);
|
||||
}
|
||||
|
||||
.org-audit-reason label,
|
||||
.org-audit-policy-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.org-audit-reason svg,
|
||||
.org-audit-policy-heading svg,
|
||||
.org-audit-dialog-notice svg {
|
||||
flex-shrink: 0;
|
||||
color: var(--brand-selection-text);
|
||||
}
|
||||
|
||||
.org-audit-list,
|
||||
.org-audit-run-details,
|
||||
.org-policy-grid {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.org-audit-record,
|
||||
.org-audit-list > .ant-empty {
|
||||
min-width: 0;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 10px;
|
||||
background: var(--surface-card);
|
||||
}
|
||||
|
||||
.org-audit-list > .ant-empty {
|
||||
margin: 0;
|
||||
padding: 40px 16px;
|
||||
}
|
||||
|
||||
.org-audit-record {
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
}
|
||||
|
||||
.org-audit-run {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.org-audit-run-details {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.org-audit-record-header,
|
||||
.org-audit-skills,
|
||||
.org-audit-case-details {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.org-audit-record-header code {
|
||||
min-width: 0;
|
||||
color: var(--text-primary);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.org-audit-record .ant-tag {
|
||||
max-width: 100%;
|
||||
margin-inline-end: 0;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.org-audit-status-prefix {
|
||||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
.org-audit-status.ant-tag {
|
||||
background: var(--oc-audit-status-bg, var(--surface-bg-base));
|
||||
color: var(--oc-audit-status-text, var(--text-primary));
|
||||
}
|
||||
|
||||
.org-audit-status--success {
|
||||
--oc-audit-status-bg: var(--oc-audit-success-bg);
|
||||
--oc-audit-status-text: var(--oc-audit-success-text);
|
||||
}
|
||||
|
||||
.org-audit-status--warning {
|
||||
--oc-audit-status-bg: var(--oc-audit-warning-bg);
|
||||
--oc-audit-status-text: var(--oc-audit-warning-text);
|
||||
}
|
||||
|
||||
.org-audit-status--error {
|
||||
--oc-audit-status-bg: var(--oc-audit-error-bg);
|
||||
--oc-audit-status-text: var(--oc-audit-error-text);
|
||||
}
|
||||
|
||||
.org-audit-metrics {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 8px 24px;
|
||||
width: min(100%, 560px);
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.org-audit-metrics dt,
|
||||
.org-audit-confirm-details dt,
|
||||
.org-audit-case-details,
|
||||
.org-audit-policy-field {
|
||||
color: var(--oc-audit-muted);
|
||||
}
|
||||
|
||||
.org-audit-metrics dd,
|
||||
.org-audit-confirm-details dd {
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
overflow-wrap: anywhere;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.org-audit-metrics dd {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.org-audit-view.ant-btn {
|
||||
flex-shrink: 0;
|
||||
max-width: 100%;
|
||||
border-color: var(--border-subtle);
|
||||
background: var(--brand-selection-bg);
|
||||
color: var(--brand-selection-text);
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.org-audit-view.ant-btn:not(:disabled):hover {
|
||||
border-color: var(--brand-selection-text);
|
||||
background: var(--brand-selection-bg);
|
||||
color: var(--brand-selection-text);
|
||||
}
|
||||
|
||||
.org-audit-page :is(button, [role='tab']):focus-visible,
|
||||
.org-audit-dialog :is(button, .org-audit-content):focus-visible {
|
||||
outline: 2px solid var(--brand-selection-text);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.org-audit-pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.org-policy-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.org-audit-policy-heading {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 24px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.org-audit-policy-value {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.org-audit-policy-field {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 8px 0;
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.org-audit-policy-field .ant-input-number {
|
||||
width: 120px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.org-audit-save {
|
||||
justify-self: end;
|
||||
}
|
||||
|
||||
.org-audit-dialog-notice.ant-typography {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
background: var(--brand-selection-bg);
|
||||
color: var(--brand-selection-text);
|
||||
}
|
||||
|
||||
.org-audit-dialog-notice svg {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.org-audit-confirm-details {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.org-audit-confirm-details dt {
|
||||
margin-bottom: 2px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.org-audit-content {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
max-height: 65vh;
|
||||
padding-inline-end: 4px;
|
||||
overflow: auto;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
.org-audit-content h4 {
|
||||
margin: 4px 0 0;
|
||||
color: var(--text-primary);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.org-audit-content pre {
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 8px;
|
||||
background: var(--surface-bg-base);
|
||||
color: var(--text-primary);
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.org-audit-watermark.ant-tag {
|
||||
justify-self: start;
|
||||
max-width: 100%;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.org-audit-hero {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.org-audit-filter {
|
||||
flex-basis: auto;
|
||||
}
|
||||
|
||||
.org-audit-reason,
|
||||
.org-policy-grid {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.org-audit-reason,
|
||||
.org-audit-record {
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.org-audit-run {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.org-audit-metrics {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.org-audit-record-header code {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
}
|
||||
@@ -17,12 +17,13 @@
|
||||
padding: 32px;
|
||||
}
|
||||
}
|
||||
.org-connector-hero,
|
||||
.org-connector-section-head {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
/* 控制台式页头:实底卡片 + 细边框,标题紧凑无衬线(参考主流云厂商控制台) */
|
||||
.org-connector-hero {
|
||||
@@ -38,6 +39,9 @@
|
||||
.org-connector-page .page-guide-pill {
|
||||
justify-self: start;
|
||||
}
|
||||
.org-center .org-governance-page > .page-guide-pill + .org-connector-tabs {
|
||||
margin-block-start: calc(8px - var(--uc-layout-gap));
|
||||
}
|
||||
.org-connector-hero h1 {
|
||||
margin: 0 0 6px;
|
||||
color: var(--text-primary);
|
||||
@@ -61,21 +65,16 @@
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
padding-top: 18px;
|
||||
}
|
||||
.org-connector-card {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
padding: 16px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
border-radius: 8px;
|
||||
background: var(--surface-card);
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
transition:
|
||||
border-color 0.2s ease,
|
||||
box-shadow 0.2s ease;
|
||||
}
|
||||
.org-connector-card:hover {
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 35%, transparent);
|
||||
box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.org-connector-card-top,
|
||||
.org-connector-card-actions,
|
||||
@@ -102,7 +101,7 @@
|
||||
line-height: 1.4;
|
||||
}
|
||||
.org-connector-card p {
|
||||
min-height: 38px;
|
||||
margin: 0 0 12px;
|
||||
color: var(--text-secondary);
|
||||
font-size: 13px;
|
||||
line-height: 1.55;
|
||||
@@ -110,6 +109,7 @@
|
||||
.org-connector-card dl {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin: auto 0 0;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
background: var(--ui-color-fill-0);
|
||||
@@ -121,6 +121,7 @@
|
||||
gap: 12px;
|
||||
}
|
||||
.org-connector-card dt {
|
||||
flex-shrink: 0;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.org-connector-card dd {
|
||||
@@ -130,9 +131,9 @@
|
||||
text-align: right;
|
||||
}
|
||||
.org-connector-card-actions {
|
||||
justify-content: flex-start;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 16px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.org-connector-tags {
|
||||
display: flex;
|
||||
@@ -143,19 +144,21 @@
|
||||
.org-connector-list {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
.org-connector-list article {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(190px, 0.7fr) minmax(220px, 1.2fr) minmax(
|
||||
200px,
|
||||
1fr
|
||||
);
|
||||
grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.2fr) minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 14px 18px;
|
||||
padding: 12px 16px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
border-radius: 8px;
|
||||
background: var(--surface-card);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.org-connector-list article > div {
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.org-connector-list code {
|
||||
overflow: hidden;
|
||||
@@ -163,7 +166,7 @@
|
||||
font-family: 'IBM Plex Mono', 'Cascadia Code', monospace;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.org-connector-list span {
|
||||
.org-connector-list article > span:not(.ant-tag) {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.org-connector-form {
|
||||
@@ -172,9 +175,17 @@
|
||||
}
|
||||
.org-connector-form label {
|
||||
display: grid;
|
||||
gap: 7px;
|
||||
min-width: 0;
|
||||
gap: 6px;
|
||||
color: var(--ui-color-text-1);
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
}
|
||||
.org-connector-form .ant-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
.org-connector-drawer .ant-drawer-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.org-connector-form .org-connector-switch {
|
||||
display: flex;
|
||||
@@ -199,10 +210,8 @@
|
||||
}
|
||||
}
|
||||
@media (max-width: 760px) {
|
||||
.org-connector-hero,
|
||||
.org-connector-section-head {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.org-connector-grid {
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
@@ -14,40 +14,6 @@
|
||||
padding: 32px;
|
||||
}
|
||||
}
|
||||
/* 控制台式页头:实底卡片 + 细边框(参考主流云厂商控制台) */
|
||||
.org-expert-hero,
|
||||
.org-audit-hero {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 18px;
|
||||
padding: 20px 24px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--surface-card);
|
||||
}
|
||||
.org-expert-hero > div,
|
||||
.org-audit-hero > div {
|
||||
max-width: 760px;
|
||||
}
|
||||
.org-expert-hero h1,
|
||||
.org-expert-hero h2,
|
||||
.org-expert-hero h3,
|
||||
.org-audit-hero h1,
|
||||
.org-audit-hero h2,
|
||||
.org-audit-hero h3 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
line-height: 1.35;
|
||||
}
|
||||
/* 页头右侧动作区:使用指引入口与既有按钮并排 */
|
||||
.org-expert-hero-actions {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
/* 使用指引胶囊(PageGuide 通用组件):作为 grid 子项靠左收缩 */
|
||||
.org-expert-page .page-guide-pill {
|
||||
justify-self: start;
|
||||
@@ -57,36 +23,47 @@
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
.org-expert-empty {
|
||||
grid-column: 1 / -1;
|
||||
.org-expert-card-body {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
gap: 8px;
|
||||
min-height: 240px;
|
||||
border: 1px dashed var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--surface-card);
|
||||
gap: 12px;
|
||||
}
|
||||
.org-expert-card-body .ant-typography {
|
||||
margin-bottom: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.org-expert-card-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.org-expert-version-list {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin: 14px 0;
|
||||
margin: 0;
|
||||
}
|
||||
.org-expert-version-list > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
padding: 9px 0;
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
min-height: 36px;
|
||||
padding: 4px 10px;
|
||||
border-radius: 6px;
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.org-expert-version-list .ant-btn {
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
.org-expert-editor-tabs > .ant-tabs-nav {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.org-expert-form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 14px;
|
||||
padding-top: 14px;
|
||||
}
|
||||
.org-expert-form-grid label {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: 6px;
|
||||
color: var(--ui-color-text-1);
|
||||
}
|
||||
@@ -99,102 +76,17 @@
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.org-expert-form-grid .mono textarea,
|
||||
.org-audit-content pre,
|
||||
/* request_id 是 varchar(128)、run.id 是 char(36),都是不可断行的 ASCII。
|
||||
承载它们的是 flex 行,flex 项的 min-width:auto 不会收缩到 min-content 以下,
|
||||
缺这条会把整个 待对账 页撑出横向滚动条。 */
|
||||
.org-audit-list code {
|
||||
.org-expert-form-grid .mono textarea {
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.org-audit-list code {
|
||||
font-family: 'IBM Plex Mono', 'Cascadia Code', monospace;
|
||||
}
|
||||
.org-audit-reason {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(240px, 520px);
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin: 8px 0 16px;
|
||||
}
|
||||
.org-audit-list {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
.org-audit-list article {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding: 16px 18px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--surface-card);
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
.org-audit-list article > div:first-child,
|
||||
.org-audit-metrics,
|
||||
.org-audit-skills {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.org-audit-metrics span {
|
||||
padding-right: 12px;
|
||||
border-right: 1px solid var(--border-subtle);
|
||||
color: var(--ui-color-text-1);
|
||||
}
|
||||
.org-policy-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
.org-policy-grid article {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
padding: 16px 18px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--surface-card);
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
.org-audit-content {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
.org-audit-content pre {
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
white-space: pre-wrap;
|
||||
padding: 14px;
|
||||
border-radius: 10px;
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
@media (max-width: 760px) {
|
||||
.org-expert-grid,
|
||||
.org-expert-form-grid,
|
||||
.org-policy-grid {
|
||||
.org-expert-form-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.org-expert-form-grid .wide {
|
||||
grid-column: auto;
|
||||
}
|
||||
.org-expert-hero,
|
||||
.org-audit-hero {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
}
|
||||
.org-audit-reason {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.org-audit-pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
@@ -31,17 +31,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.knowledge-hero {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
margin: 0 0 22px;
|
||||
}
|
||||
|
||||
.knowledge-eyebrow,
|
||||
.knowledge-title-line,
|
||||
.knowledge-hero-actions,
|
||||
.knowledge-base-actions,
|
||||
.knowledge-card-heading,
|
||||
.knowledge-search-options,
|
||||
@@ -50,43 +40,36 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.knowledge-eyebrow {
|
||||
gap: 7px;
|
||||
color: var(--knowledge-green);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
.knowledge-heading {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.knowledge-beta {
|
||||
padding: 2px 7px;
|
||||
border: 1px solid color-mix(in srgb, var(--ui-color-primary) 30%, transparent);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 19px;
|
||||
padding: 0 7px;
|
||||
border: 1px solid color-mix(in srgb, var(--ui-color-warning) 40%, transparent);
|
||||
border-radius: 999px;
|
||||
background: var(--knowledge-mint);
|
||||
font-size: 9px;
|
||||
letter-spacing: 0.12em;
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 12%, transparent);
|
||||
color: var(--ui-color-warning);
|
||||
font:
|
||||
800 10px/1 ui-monospace,
|
||||
SFMono-Regular,
|
||||
Menlo,
|
||||
monospace;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.knowledge-hero h1 {
|
||||
margin: 8px 0 4px;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.01em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.knowledge-hero p,
|
||||
.knowledge-base-header p,
|
||||
.knowledge-card-heading p {
|
||||
margin: 0;
|
||||
color: var(--knowledge-muted);
|
||||
}
|
||||
|
||||
.knowledge-hero-copy > p {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* 键盘可达性:统一 focus 环 */
|
||||
.knowledge-page button:focus-visible,
|
||||
.knowledge-page textarea:focus-visible,
|
||||
@@ -96,15 +79,14 @@
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.knowledge-hero-actions,
|
||||
.knowledge-base-actions {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* 使用指引:入口/胶囊/抽屉由通用 PageGuide 组件承载(components/common/PageGuide),
|
||||
* 页面侧只负责胶囊的落位间距。 */
|
||||
.knowledge-page .page-guide-pill {
|
||||
margin: 0 0 16px;
|
||||
.knowledge-page > .page-guide-pill {
|
||||
margin: 12px 0 16px;
|
||||
}
|
||||
|
||||
/* 引导 CTA 落点的短暂高亮 */
|
||||
@@ -975,13 +957,6 @@
|
||||
.knowledge-page {
|
||||
padding: 18px 12px 36px;
|
||||
}
|
||||
.knowledge-hero {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
.knowledge-hero-actions {
|
||||
width: 100%;
|
||||
}
|
||||
.knowledge-metrics {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
@@ -1,48 +1,3 @@
|
||||
/* 企业中心 · 调用质量页:布局对齐企业中心标准页(p-4 / sm:p-6 / lg:p-8),配色全部走 token */
|
||||
.org-quality-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
color: var(--text-primary);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.org-quality-page {
|
||||
padding: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.org-quality-page {
|
||||
padding: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.org-quality-hero {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px 24px;
|
||||
padding: 20px 24px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--surface-card);
|
||||
}
|
||||
|
||||
.org-quality-hero h3 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
line-height: 1.35;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.org-quality-eyebrow {
|
||||
margin-bottom: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
@@ -161,6 +161,22 @@
|
||||
padding: 12px;
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
}
|
||||
.org-governance-page .org-skill-preview {
|
||||
display: block;
|
||||
}
|
||||
.org-governance-page .org-skill-preview-controls {
|
||||
gap: 8px;
|
||||
}
|
||||
.org-governance-page .org-skill-preview-row {
|
||||
padding-inline: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.org-assignment-form label {
|
||||
min-width: 0;
|
||||
}
|
||||
.org-assignment-form .ant-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
.org-my-skills article {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -5,13 +5,10 @@ import {
|
||||
|
||||
import { Trans } from 'react-i18next';
|
||||
import {
|
||||
Ban as ActionBan,
|
||||
ShieldCheck as ActionShieldCheck,
|
||||
CalendarClock as ActionCalendarClock,
|
||||
Pencil as ActionPencil,
|
||||
Plus as ActionPlus,
|
||||
CreditCard as ActionCreditCard,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { TableRowActions } from '@/components/common/table/TableToolbar';
|
||||
import {
|
||||
ConsoleFilterField,
|
||||
ConsoleFilterGrid,
|
||||
@@ -37,7 +34,6 @@ import {
|
||||
Input,
|
||||
InputNumber,
|
||||
Modal,
|
||||
Popconfirm,
|
||||
Select,
|
||||
Space,
|
||||
Tag,
|
||||
@@ -50,6 +46,11 @@ import { isAdmin, showError, showSuccess } from '../../helpers';
|
||||
import { renderQuota } from '../../helpers/render';
|
||||
import QuotaInput from '../../components/common/ui/QuotaInput';
|
||||
|
||||
const membershipFormLayout = {
|
||||
width: 575,
|
||||
style: { maxWidth: 'calc(100% - 32px)' },
|
||||
};
|
||||
|
||||
const statusColorMap = {
|
||||
active: 'green',
|
||||
expired: 'grey',
|
||||
@@ -150,6 +151,8 @@ const Subscription = () => {
|
||||
const [editVisible, setEditVisible] = useState(false);
|
||||
const [createVisible, setCreateVisible] = useState(false);
|
||||
const [detailVisible, setDetailVisible] = useState(false);
|
||||
const [grantRow, setGrantRow] = useState(null);
|
||||
const [grantSubmitting, setGrantSubmitting] = useState(false);
|
||||
const [currentRow, setCurrentRow] = useState(null);
|
||||
const [membershipPlans, setMembershipPlans] = useState([]);
|
||||
const [plansLoading, setPlansLoading] = useState(false);
|
||||
@@ -338,22 +341,27 @@ const Subscription = () => {
|
||||
setRefreshToken((prev) => prev + 1);
|
||||
};
|
||||
|
||||
const doGrant = async (row) => {
|
||||
const doGrant = async () => {
|
||||
if (!grantRow || grantSubmitting) return;
|
||||
setGrantSubmitting(true);
|
||||
try {
|
||||
const res = await API.post(
|
||||
`/api/user/membership/manage/subscriptions/${row.id}/grant`,
|
||||
`/api/user/membership/manage/subscriptions/${grantRow.id}/grant`,
|
||||
{
|
||||
reason: '管理员手动补发',
|
||||
},
|
||||
);
|
||||
if (res.data.success) {
|
||||
showSuccess(t('补发成功'));
|
||||
setGrantRow(null);
|
||||
setRefreshToken((key) => key + 1);
|
||||
} else {
|
||||
showError(res.data.message);
|
||||
}
|
||||
} catch (err) {
|
||||
showError(err.message);
|
||||
} finally {
|
||||
setGrantSubmitting(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -426,82 +434,61 @@ const Subscription = () => {
|
||||
title: t('每日额度'),
|
||||
dataIndex: 'daily_quota',
|
||||
width: 110,
|
||||
align: 'right',
|
||||
render: (v) => renderQuota(v, 2),
|
||||
},
|
||||
{
|
||||
title: t('支付金额'),
|
||||
dataIndex: 'price_paid',
|
||||
width: 100,
|
||||
align: 'right',
|
||||
render: (v) => (v != null ? formatCurrency(v) : '-'),
|
||||
},
|
||||
{
|
||||
title: t('操作'),
|
||||
key: 'actions',
|
||||
width: 300,
|
||||
width: 126,
|
||||
fixed: 'right',
|
||||
render: (_, r) => (
|
||||
<Space spacing={4} wrap>
|
||||
<Button size='small' theme='borderless' onClick={() => openDetail(r)}>
|
||||
render: (_, row) => {
|
||||
if (!admin) {
|
||||
return (
|
||||
<AntButton type='link' size='small' onClick={() => openDetail(row)}>
|
||||
{t('详情')}
|
||||
</Button>
|
||||
{admin && r.status !== 'banned' && (
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='danger'
|
||||
icon={<ActionBan size={12} />}
|
||||
onClick={() => openBan(r)}
|
||||
>
|
||||
{t('封禁')}
|
||||
</Button>
|
||||
)}
|
||||
{admin && r.status === 'banned' && (
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='primary'
|
||||
icon={<ActionShieldCheck size={12} />}
|
||||
onClick={() => openUnban(r)}
|
||||
>
|
||||
{t('解封')}
|
||||
</Button>
|
||||
)}
|
||||
{admin && r.status !== 'canceled' && r.status !== 'banned' && (
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<ActionCalendarClock size={12} />}
|
||||
onClick={() => openExtend(r)}
|
||||
>
|
||||
{t('延长')}
|
||||
</Button>
|
||||
)}
|
||||
{admin && (
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<ActionPencil size={12} />}
|
||||
onClick={() => openEdit(r)}
|
||||
>
|
||||
</AntButton>
|
||||
);
|
||||
}
|
||||
|
||||
const items = [
|
||||
{ key: 'detail', label: t('详情'), onClick: () => openDetail(row) },
|
||||
row.status !== 'canceled' &&
|
||||
row.status !== 'banned' && {
|
||||
key: 'extend',
|
||||
label: t('延长'),
|
||||
onClick: () => openExtend(row),
|
||||
},
|
||||
row.status === 'active' && {
|
||||
key: 'grant',
|
||||
label: t('补发'),
|
||||
onClick: () => setGrantRow(row),
|
||||
},
|
||||
row.status === 'banned'
|
||||
? { key: 'unban', label: t('解封'), onClick: () => openUnban(row) }
|
||||
: {
|
||||
key: 'ban',
|
||||
label: t('封禁'),
|
||||
danger: true,
|
||||
onClick: () => openBan(row),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<TableRowActions items={items}>
|
||||
<AntButton type='link' size='small' onClick={() => openEdit(row)}>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
)}
|
||||
{admin && r.status === 'active' && (
|
||||
<Popconfirm
|
||||
title={t('确认手动补发今日额度?')}
|
||||
onConfirm={() => doGrant(r)}
|
||||
>
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Sparkles size={12} />}
|
||||
>
|
||||
{t('补发')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
</AntButton>
|
||||
</TableRowActions>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -603,8 +590,9 @@ const Subscription = () => {
|
||||
</ConsoleFilterField>
|
||||
</ConsoleFilterGrid>
|
||||
}
|
||||
tableTitle={t('会员列表')}
|
||||
tableActionsOffset
|
||||
actionsArea={
|
||||
<div className='console-list-tools'>
|
||||
<div
|
||||
className='console-list-quick-filters'
|
||||
role='group'
|
||||
@@ -625,7 +613,9 @@ const Subscription = () => {
|
||||
</AntButton>
|
||||
))}
|
||||
</div>
|
||||
{admin && (
|
||||
}
|
||||
tableActions={
|
||||
admin && (
|
||||
<div className='console-list-tool-actions'>
|
||||
<Button
|
||||
icon={<ActionCreditCard size={16} />}
|
||||
@@ -641,8 +631,7 @@ const Subscription = () => {
|
||||
{t('新建会员')}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
paginationArea={createCardProPagination({
|
||||
preservePage: true,
|
||||
@@ -725,6 +714,18 @@ const Subscription = () => {
|
||||
t={t}
|
||||
/>
|
||||
|
||||
<Modal
|
||||
title={t('确认手动补发今日额度?')}
|
||||
visible={Boolean(grantRow)}
|
||||
onCancel={() => {
|
||||
if (!grantSubmitting) setGrantRow(null);
|
||||
}}
|
||||
onOk={doGrant}
|
||||
okText={t('确定')}
|
||||
cancelText={t('取消')}
|
||||
confirmLoading={grantSubmitting}
|
||||
/>
|
||||
|
||||
{/* 详情抽屉 */}
|
||||
<DetailDrawer
|
||||
visible={detailVisible}
|
||||
@@ -850,11 +851,11 @@ const CreateMembershipModal = ({
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
onOk={submit}
|
||||
okText={t('确认开通')}
|
||||
okText={t('确定')}
|
||||
cancelText={t('取消')}
|
||||
confirmLoading={submitting}
|
||||
okButtonProps={{ disabled: plansLoading || enabledPlans.length === 0 }}
|
||||
width={560}
|
||||
{...membershipFormLayout}
|
||||
>
|
||||
<div className='space-y-4'>
|
||||
<div className='rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700 dark:border-amber-700/40 dark:bg-amber-900/20 dark:text-amber-200'>
|
||||
@@ -1292,9 +1293,10 @@ const EditModal = ({ visible, row, onCancel, onDone, t }) => {
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
onOk={submit}
|
||||
okText={t('保存')}
|
||||
okText={t('确定')}
|
||||
cancelText={t('取消')}
|
||||
confirmLoading={submitting}
|
||||
{...membershipFormLayout}
|
||||
>
|
||||
{row && (
|
||||
<div className='space-y-3'>
|
||||
|
||||
@@ -838,6 +838,15 @@ html.dark .oc-page {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.org-center
|
||||
.oc-company-settings
|
||||
.org-nested-tabs
|
||||
> .ant-tabs
|
||||
> .ant-tabs-nav
|
||||
.ant-tabs-tab {
|
||||
padding-block-start: 0;
|
||||
}
|
||||
|
||||
.org-center .oc-company-settings .oc-cs-panel {
|
||||
min-height: 370px;
|
||||
}
|
||||
|
||||
+21
-23
@@ -7,9 +7,7 @@
|
||||
*/
|
||||
.org-center .org-expert-page,
|
||||
.org-center .org-skills-page,
|
||||
.org-center .org-connector-page,
|
||||
.org-center .org-effect-page,
|
||||
.org-center .org-quality-page,
|
||||
.org-center .knowledge-page {
|
||||
min-width: 0;
|
||||
gap: var(--uc-layout-gap);
|
||||
@@ -17,6 +15,25 @@
|
||||
var(--uc-page-pad-bottom, 36px);
|
||||
}
|
||||
|
||||
.org-center .org-governance-page {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
align-content: start;
|
||||
gap: var(--uc-layout-gap);
|
||||
}
|
||||
|
||||
.org-governance-page > .uc-page-header {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.org-governance-page > .page-guide-pill {
|
||||
justify-self: start;
|
||||
}
|
||||
|
||||
.org-center .org-governance-page > .oc-list-card + .oc-list-card {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.org-center .org-subpage-tabs > .ant-tabs > .ant-tabs-nav {
|
||||
margin: 0 var(--uc-page-pad-x) var(--uc-layout-gap);
|
||||
padding-top: var(--uc-page-pad-top);
|
||||
@@ -26,12 +43,9 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.org-center .org-expert-hero,
|
||||
.org-center .org-audit-hero,
|
||||
.org-center .org-skills-hero,
|
||||
.org-center .org-connector-hero,
|
||||
.org-center .org-effect-hero,
|
||||
.org-center .org-quality-hero,
|
||||
.org-center .knowledge-hero {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
@@ -42,15 +56,7 @@
|
||||
}
|
||||
|
||||
.org-center
|
||||
:is(
|
||||
.org-expert-hero,
|
||||
.org-audit-hero,
|
||||
.org-skills-hero,
|
||||
.org-connector-hero,
|
||||
.org-effect-hero,
|
||||
.org-quality-hero,
|
||||
.knowledge-hero
|
||||
)
|
||||
:is(.org-audit-hero, .org-skills-hero, .org-effect-hero, .knowledge-hero)
|
||||
:is(h1, h2, h3) {
|
||||
margin: 0;
|
||||
color: var(--uc-heading);
|
||||
@@ -61,15 +67,7 @@
|
||||
}
|
||||
|
||||
.org-center
|
||||
:is(
|
||||
.org-expert-hero,
|
||||
.org-audit-hero,
|
||||
.org-skills-hero,
|
||||
.org-connector-hero,
|
||||
.org-effect-hero,
|
||||
.org-quality-hero,
|
||||
.knowledge-hero
|
||||
)
|
||||
:is(.org-audit-hero, .org-skills-hero, .org-effect-hero, .knowledge-hero)
|
||||
:is(p, div.ant-typography, span.ant-typography),
|
||||
.org-center .knowledge-hero .knowledge-hero-copy > p {
|
||||
display: block;
|
||||
|
||||
Reference in New Issue
Block a user