diff --git a/web-admin/src/components/business/ProjectSelect.vue b/web-admin/src/components/business/ProjectSelect.vue
index fe680c22..a91af791 100644
--- a/web-admin/src/components/business/ProjectSelect.vue
+++ b/web-admin/src/components/business/ProjectSelect.vue
@@ -55,6 +55,8 @@
bizType?: BizType
disabled?: boolean
projectName?: string
+ /** Bump to reload options without remounting (e.g. after assignment). */
+ refreshKey?: number | string
}>()
const emit = defineEmits<{
'update:modelValue': [value: string]
@@ -79,7 +81,7 @@
retry = ref(0)
let version = 0
watch(
- () => [props.bizType, props.disabled, props.filter, retry.value],
+ () => [props.bizType, props.disabled, props.filter, props.refreshKey, retry.value],
async () => {
const requestVersion = ++version
if (props.disabled) {
diff --git a/web-admin/src/utils/filter-options-epoch.test.ts b/web-admin/src/utils/filter-options-epoch.test.ts
new file mode 100644
index 00000000..d542eca6
--- /dev/null
+++ b/web-admin/src/utils/filter-options-epoch.test.ts
@@ -0,0 +1,11 @@
+import { describe, it } from 'node:test'
+import assert from 'node:assert/strict'
+import { nextFilterOptionsEpoch } from './filter-options-epoch'
+
+describe('nextFilterOptionsEpoch', () => {
+ it('bumps only when at least one assignment succeeded', () => {
+ assert.equal(nextFilterOptionsEpoch(3, 1), 4)
+ assert.equal(nextFilterOptionsEpoch(3, 2), 4)
+ assert.equal(nextFilterOptionsEpoch(3, 0), 3)
+ })
+})
diff --git a/web-admin/src/utils/filter-options-epoch.ts b/web-admin/src/utils/filter-options-epoch.ts
new file mode 100644
index 00000000..2a746801
--- /dev/null
+++ b/web-admin/src/utils/filter-options-epoch.ts
@@ -0,0 +1,4 @@
+/** After successful assignment saves, bump so filter ProjectSelect reloads options. */
+export function nextFilterOptionsEpoch(epoch: number, successCount: number) {
+ return successCount > 0 ? epoch + 1 : epoch
+}
diff --git a/web-admin/src/views/project-management/RecordList.vue b/web-admin/src/views/project-management/RecordList.vue
index f31e202f..9469859d 100644
--- a/web-admin/src/views/project-management/RecordList.vue
+++ b/web-admin/src/views/project-management/RecordList.vue
@@ -37,6 +37,7 @@
team
v-model="query.teamId"
:biz-type="query.bizType"
+ :refresh-key="filterOptionsEpoch"
/>
void } | null>(null)
+ const filterOptionsEpoch = ref(0)
const rows = ref([]),
total = ref(0),
statusCounts = ref>({}),
@@ -509,6 +513,10 @@
} else {
ElMessage.warning(`成功 ${successCount} 条,失败 ${failCount} 条`)
}
+ filterOptionsEpoch.value = nextFilterOptionsEpoch(
+ filterOptionsEpoch.value,
+ successCount
+ )
await load()
}
} finally {