fix: backfill tenant via useForm channel and skip empty-tenant watch on search reset

- imSearchReset now receives setFieldsValue from useForm() instead of the
  template ref instance method, which was unreliable for backfilling tenantId
- imUser/imSensitiveWord watches skip tenantId<=0 so reset no longer fires
  policy-group/group requests that get rejected with empty tenant
- loadImTenantOptions wraps platform-branch TenantList in try/catch so a
  failed request no longer aborts page initialization
This commit is contained in:
Austin
2026-09-24 20:32:32 +08:00
parent 43f3581b1c
commit fce8dbbe32
10 changed files with 32 additions and 19 deletions
+1 -1
View File
@@ -96,7 +96,7 @@
}
// 重置后回填商户下拉第一个选项再查询(避免 tenantId 被清空导致列表为空)
const onSearchReset = imSearchReset(searchFormRef, tenantOptions, reloadTable);
const onSearchReset = imSearchReset(setFieldsValue, tenantOptions, reloadTable);
function handleReview(record: State, status: string, reviewReason = '') {
Review({ tenantId: record.tenantId, id: record.id, status, reviewReason }).then(() => {