fix(ui): 修复登录与并发请求并统一表格、主题和页面展示

验证:868 项单测、ESLint、Prettier、UI 依赖审计和差异检查通过。
This commit is contained in:
zhanjunhao
2026-11-19 18:58:46 +08:00
parent 9f5e0cddfb
commit e70e0d2224
128 changed files with 4672 additions and 5391 deletions
+13 -6
View File
@@ -16,6 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { formatIdReference } from '../../helpers/safeDisplay';
import { formatPercent } from '../../helpers/safeDisplay';
import { Trans } from 'react-i18next';
import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
@@ -1611,7 +1613,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
}
if (assignmentScope === 'member') {
return members.map((item) => ({
label: item.display_name || item.username || `#${item.id}`,
label: item.display_name || item.username || formatIdReference(item.id),
value: item.id,
}));
}
@@ -1640,9 +1642,11 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
)
.map((item) => ({
...item,
expert_name: expertNameById.get(item.expert_id) || `#${item.expert_id}`,
expert_name:
expertNameById.get(item.expert_id) ||
formatIdReference(item.expert_id),
scope_type_label: scopeTypeLabel[item.scope_type] || item.scope_type,
scope_label: item.scope_name || `#${item.scope_id}`,
scope_label: item.scope_name || formatIdReference(item.scope_id),
}));
}, [assignments, expertCatalog, t]);
@@ -1882,7 +1886,9 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
</div>
<div>
<span>{t('任务完成率')}</span>
<strong>{(metrics.completion_rate * 100).toFixed(1)}%</strong>
<strong>
{formatPercent(Number(metrics.completion_rate) * 100, 1)}
</strong>
</div>
<div>
<span>{t('平均耗时')}</span>
@@ -1892,7 +1898,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<span>{t('用户认可率')}</span>
<strong>
{metrics.feedback_count
? `${(metrics.useful_rate * 100).toFixed(1)}%`
? formatPercent(Number(metrics.useful_rate) * 100, 1)
: '—'}
</strong>
</div>
@@ -2702,7 +2708,8 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<b>[{citation.citation_id}]</b>
<span>{citation.source_label}</span>
<small>
{t('相关度')} {(citation.score * 100).toFixed(1)}%
{t('相关度')}{' '}
{formatPercent(Number(citation.score) * 100, 1)}
</small>
</div>
))}