diff --git a/src/components/ProTable/hooks/useTable.ts b/src/components/ProTable/hooks/useTable.ts
index 5a0d4f5..b74f9c0 100644
--- a/src/components/ProTable/hooks/useTable.ts
+++ b/src/components/ProTable/hooks/useTable.ts
@@ -64,6 +64,7 @@ export const useTable = (
// 先把初始化参数和分页参数放到总参数里面
Object.assign(state.totalParam, initParam, isPageable ? pageParam.value : {});
+ // console.log('我是initParam', initParam);
// console.log('我是分页参数', pageParam.value);
// console.log('我是总参数', state.totalParam);
// console.log('我是查询参数', state.searchParam);
diff --git a/src/views/match/manage/work.vue b/src/views/match/manage/work.vue
index 3efc0ea..efc7015 100644
--- a/src/views/match/manage/work.vue
+++ b/src/views/match/manage/work.vue
@@ -150,7 +150,7 @@
+ @selectionChange="selection">
导入成绩
下载模板
@@ -379,6 +379,10 @@ const formData = ref({
const openDialog = async (id) => {
// 先设置 eventId,再显示对话框
initParam.value.eventId = id;
+ scoreQueryParam.value.projectId = ''
+ scoreQueryParam.value.eventProjectGroupId = ''
+ scoreQueryParam.value.groupName = ''
+ scoreQueryParam.value.eventId = id;
initParam.value.id = id;
selectedProjectGroup.value = null;
isShowDialog.value = true;
@@ -839,13 +843,13 @@ const treeProps = {
}
const selectedProjectGroup = ref(null)
-const scoreQueryParam = computed(() => ({
- refresh: initParam.value.refresh,
- eventId: initParam.value.eventId,
- projectId: selectedProjectGroup.value?.nodeKey.includes('project') ? selectedProjectGroup.value?.id : undefined,
- eventProjectGroupId: selectedProjectGroup.value?.nodeKey.includes('group') ? selectedProjectGroup.value?.eventProjectGroupId : undefined,
- groupName: selectedProjectGroup.value?.nodeKey.includes('group') ? selectedProjectGroup.value?.groupName : undefined
-}))
+const scoreQueryParam = ref({
+ refresh: false,
+ eventId: '',
+ projectId: '',
+ eventProjectGroupId: '',
+ groupName: ''
+})
const buildProjectGroupTree = (projects) => {
console.log('buildProjectGroupTree 开始处理 projects:', projects)
@@ -892,6 +896,16 @@ const handleTreeNodeClick = (data) => {
// 同时更新 refresh 标志,强制 ProTable 重新查询
// initParam.value.refresh = !initParam.value.refresh
console.log('更新后的 selectedProjectGroup:', selectedProjectGroup.value)
+ // scoreQueryParam.value = {
+ // refresh: !scoreQueryParam.value.refresh,
+ // eventId: initParam.value.eventId,
+ // projectId: data.nodeKey.includes('project') ? data.id : '',
+ // eventProjectGroupId: data.nodeKey.includes('group') ? data.eventProjectGroupId : '',
+ // groupName: data.nodeKey.includes('group') ? data.groupName : ''
+ // }
+ scoreQueryParam.value.projectId = data.nodeKey.includes('project') ? data.id : ''
+ scoreQueryParam.value.eventProjectGroupId = data.nodeKey.includes('group') ? data.eventProjectGroupId : ''
+ scoreQueryParam.value.groupName = data.nodeKey.includes('group') ? data.groupName : ''
console.log('scoreQueryParam:', scoreQueryParam.value)
nextTick(() => {
// refreshScoreTable()