合并yy与远程qyqy_develop并保留业务优先级
This commit is contained in:
@@ -32,7 +32,7 @@ class RiskAlertPageQuery(BaseModel):
|
||||
start_time: datetime | None = None
|
||||
end_time: datetime | None = None
|
||||
cursor: str | None = Field(default=None, max_length=512)
|
||||
limit: int = Field(default=5, ge=1, le=5)
|
||||
limit: int = Field(default=10, ge=1, le=10)
|
||||
|
||||
@field_validator("keyword", "customer_no", "product_code", "product_name", "rule_code")
|
||||
@classmethod
|
||||
|
||||
@@ -72,6 +72,17 @@ function footerMarkup() {
|
||||
}
|
||||
|
||||
export function mountShell({ active, mode = 'public' }) {
|
||||
// ⚠️ 幂等保护:同一个页面被挂两次 shell,就会看到**两份一模一样的顶部导航与页脚**。
|
||||
//
|
||||
// 已知的触发方式只有一种:HTML 里引了两条入口 <script type="module">,且 `?v=` 不同。
|
||||
// 浏览器按**完整 URL** 去重,两条会被当成两个模块、**各执行一次** ——
|
||||
// 2026-09-14 的 `employee-console/workspace/index.html` 正是如此
|
||||
// (合并时把两个分支各自改的版本号都保留下来,成了两行)。
|
||||
//
|
||||
// 那次已经把那两行收敛成一行;这里再挡一道,理由是这个错误**从症状上很难联想到原因**
|
||||
// (页面看起来只是"多了一块"),而且以后别人加缓存版本号时很容易再犯一次。
|
||||
if (document.querySelector('.site-header')) return;
|
||||
|
||||
startAuthSync();
|
||||
document.body.classList.add(`portal-${mode}`);
|
||||
const context = getAuthContext();
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
</main>
|
||||
<dialog class="operations-dialog" data-admin-detail><div class="operations-dialog__header"><h2 data-detail-title>详情</h2><button class="button icon-button" type="button" data-close-detail aria-label="关闭">×</button></div><div class="operations-dialog__body" data-detail-body></div><div class="operations-dialog__footer"><button class="button" type="button" data-close-detail>关闭</button></div></dialog>
|
||||
<dialog class="operations-dialog" data-admin-action><form data-admin-action-form><div class="operations-dialog__header"><h2 data-admin-action-title>确认操作</h2><button class="button icon-button" type="button" data-close-admin-action aria-label="关闭">×</button></div><div class="operations-dialog__body"><p class="admin-action-copy" data-admin-action-copy></p><label class="form-field" data-admin-comment-field hidden><span class="form-field__label">审核意见</span><textarea class="form-field__input admin-comment" name="comment" maxlength="1000"></textarea></label><div class="form-alert" data-admin-action-alert></div></div><div class="operations-dialog__footer"><button class="button" type="button" data-close-admin-action>取消</button><button class="button button--primary" type="submit">确认提交</button></div></form></dialog>
|
||||
<script type="module" src="/static/portal/employee-console/workspace/workspace.js?v=20260913-3"></script>
|
||||
<!-- ⚠️ 入口 JS 只能引一次。这里曾经同时引了两条,且 `?v=` 不同
|
||||
(20260913-3 与 20260914 —— 合并时两个分支各自改了版本号,都被保留下来):
|
||||
浏览器按**完整 URL** 去重,两条不同 query 会被当成两个模块、**各执行一次**,
|
||||
于是入口里的 `mountShell()` 跑两遍,页面上出现**两份顶部导航与页脚**。
|
||||
改版本号时是**替换**这一行,不是新增一行。 -->
|
||||
<script type="module" src="/static/portal/employee-console/workspace/workspace.js?v=20260914"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -537,6 +537,8 @@ if (requireAdmin()) {
|
||||
apiClient.reportError(error);
|
||||
status.textContent = error.message || '提交失败';
|
||||
} finally { submit.disabled = false; }
|
||||
}
|
||||
|
||||
async function loadDriftReviews() {
|
||||
renderLoading(targets.drift, 3);
|
||||
try {
|
||||
|
||||
@@ -236,7 +236,7 @@ if (requireRiskStaff()) {
|
||||
document.querySelector(`[data-${kind}-prev]`).disabled = current.page === 0;
|
||||
document.querySelector(`[data-${kind}-next]`).disabled = !current.next;
|
||||
const total = Number(meta.total ?? 0);
|
||||
const pageSize = Number(meta.page_size ?? (kind === 'alert' ? 5 : 10));
|
||||
const pageSize = Number(meta.page_size ?? 10);
|
||||
const totalPages = total > 0 && pageSize > 0 ? Math.ceil(total / pageSize) : 0;
|
||||
document.querySelector(`[data-${kind}-summary]`).textContent = total > 0
|
||||
? `第 ${current.page + 1} / ${totalPages} 页,共 ${total} 条`
|
||||
@@ -247,7 +247,7 @@ if (requireRiskStaff()) {
|
||||
renderLoading(alertTable, 4);
|
||||
document.querySelector('[data-alert-summary]').textContent = '正在加载';
|
||||
try {
|
||||
const response = await apiClient.get('RK002', { query: { ...state.alert.filters, cursor: state.alert.cursors[state.alert.page], limit: 5 } });
|
||||
const response = await apiClient.get('RK002', { query: { ...state.alert.filters, cursor: state.alert.cursors[state.alert.page], limit: 10 } });
|
||||
const items = Array.isArray(response.data) ? response.data : [];
|
||||
if (!items.length) renderEmpty(alertTable, '暂无预警', '当前筛选条件下没有风险预警。');
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user