From ffcf7748fb1e965e8616c1b966db17930e139b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E7=9D=BF=20=E5=BC=A0?= Date: Fri, 9 Oct 2026 10:34:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=A8=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=9A=84=E4=BF=9D=E5=AD=98=E4=BA=92=E6=96=A5?= =?UTF-8?q?=E4=B8=8E=E6=97=A7=E8=AF=BB=E8=AF=B7=E6=B1=82=E4=B8=AD=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 保存请求执行期间禁止切换:organization store 新增 saving/busy 与 beginSaving/endSaving,切换守卫与切换器禁用条件均由 switching 改为 busy - 切换提交时 abort 旧读请求:commitOrganizationId 内调用 abortReadRequests, 不再只在 resetOrganizationContext 里取消 - validateCandidate 仅将 403 视为候选失效,网络异常/500 等向上抛出; initialize 置 loadError,App 据此区分“加载失败”与“请先选择公司”并支持重试 - 补竞态与中止测试;需要写请求时旧响应仍被版本丢弃的用例改用 POST 覆盖 --- frontend/src/App.vue | 25 ++++- .../layout/OrganizationSwitcher.test.js | 15 +++ .../layout/OrganizationSwitcher.vue | 4 +- frontend/src/stores/organization.js | 91 +++++++++++++------ frontend/src/stores/organization.test.js | 71 ++++++++++++++- frontend/src/utils/organizationContext.js | 3 + .../src/utils/organizationContext.test.js | 30 +++++- 7 files changed, 202 insertions(+), 37 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7d62dfb3..a7b44a63 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -7,7 +7,12 @@
- + + + 重新加载 + + +
@@ -20,7 +25,7 @@