update:运动员成绩项目选择
This commit is contained in:
parent
5380069f1f
commit
397ec78dd0
@ -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);
|
||||
|
||||
@ -150,7 +150,7 @@
|
||||
<div v-loading="isScoreTableLoading" style="width: 100%; height: 100%;">
|
||||
<ProTable ref="tableuu" :request-api="eventscorePageathletePost"
|
||||
:columns="columnsScore" :pagination="true" :tool-button="false" :initParam="scoreQueryParam" toolButton
|
||||
preserve-expanded-content @selectionChange="selection">
|
||||
@selectionChange="selection">
|
||||
<template #tools>
|
||||
<el-button v-auth="'event:add'" type="primary" :loading="importingScore" @click="inScore"> 导入成绩 </el-button>
|
||||
<el-button v-auth="'event:add'" type="primary" @click="downloadTemplate"> 下载模板 </el-button>
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user