fix(sign): 补齐模板查询院区参数

This commit is contained in:
xy
2026-09-28 21:04:03 +08:00
parent b6775a66c7
commit f7804d476d
5 changed files with 45 additions and 12 deletions
@@ -234,8 +234,14 @@ function syncFilterFromRoute() {
}
async function loadTemplates() {
const campusId = appStore.selectedCampusId
if (!campusId) {
templates.value = []
return
}
try {
templates.value = await getSigningTemplates()
templates.value = await getSigningTemplates({ campusId })
} catch {
ElMessage.error('文档模板加载失败,请稍后重试')
}
@@ -1088,9 +1094,12 @@ watch(
/** 切换全局院区:列表跟着换(院区不再是筛选条里的一个下拉,见 syncFilterFromRoute) */
watch(
() => appStore.selectedCampus,
() => {
() => appStore.selectedCampusId,
(campusId, previousCampusId) => {
page.value = 1
if (campusId && previousCampusId) {
void loadTemplates()
}
void loadTasks()
},
)