-
-
-
-
-
- {{ detailData?.name ?? '-' }}
-
- {{ eventTypeText(detailData) }}
-
-
- {{ registrationTypeText(detailData) }}
-
- {{ chargeModeText(detailData) }}
-
- {{ eventStatusText(detailData?.status) }}
-
-
- {{ formatRange(detailData?.registrationStartTime, detailData?.registrationEndTime) }}
-
-
- {{ formatRange(detailData?.matchStartTime, detailData?.matchEndTime) }}
-
-
- {{ detailData?.pointsRuleName ?? '-' }}
-
-
-
-
项目列表
-
-
-
-
-
-
-
-
+
@@ -449,6 +420,10 @@ import {
} from '/@/api/match/usereventregistration';
import { teamPageGet, teamDetailGet } from '/@/api/match/unitUser';
import QRCode from 'qrcodejs2-fixes';
+import Step1BasicInfo from '/@/views/match/manage/Steps/Step1BasicInfo.vue';
+import Step2Units from '/@/views/match/manage/Steps/Step2Units.vue';
+import Step3ProjectConfig from '/@/views/match/manage/Steps/Step3ProjectConfig.vue';
+import Step4FeeConfig from '/@/views/match/manage/Steps/Step4FeeConfig.vue';
const tableRef = ref();
const initParam = ref({ refresh: true });
@@ -594,10 +569,87 @@ const detailProjectsForDisplay = computed(() => {
const isShowDetailDialog = ref(false);
const detailLoading = ref(false);
const detailData = ref(null);
+const formData = ref({
+ // 步骤1:基本信息
+ basicInfo: {
+ id: undefined,
+ eventName: '',
+ coverImage: '',
+ eventVideo: '',
+ eventType: '',
+ registrationType: '',
+ pointsRuleId: undefined,
+ registrationTime: [],
+ isNeedMaterial: false,
+ materialRemark: '',
+ materialUploadTime: [],
+ matchTime: [],
+ regionIds: [],
+ detailAddress: '',
+ eventIntroduction: '',
+ customConfigJson: '',
+ },
+ // 步骤2:参与单位
+ units: {
+ units: [],
+ },
+ // 步骤3:项目与限报配置
+ projectConfig: {
+ projects: [],
+ registrationLimit: {
+ individualProjectLimit: 1,
+ teamProjectLimit: 1,
+ },
+ },
+ // 步骤4:费用与账户配置
+ feeConfig: {
+ chargeMode: 'Free',
+ price: 0,
+ merchantId: undefined,
+ merchantName: '',
+ creditCode: '',
+ bankName: '',
+ accountNumber: '',
+ },
+});
const clearDetailState = () => {
detailLoading.value = false;
detailData.value = null;
+ formData.value = {
+ basicInfo: {
+ id: undefined,
+ eventName: '',
+ coverImage: '',
+ eventVideo: '',
+ eventType: '',
+ registrationType: '',
+ pointsRuleId: undefined,
+ registrationTime: [],
+ isNeedMaterial: false,
+ materialRemark: '',
+ materialUploadTime: [],
+ matchTime: [],
+ regionIds: [],
+ detailAddress: '',
+ eventIntroduction: '',
+ customConfigJson: '',
+ },
+ units: { units: [] },
+ projectConfig: {
+ projects: [],
+ registrationLimit: { individualProjectLimit: 1, teamProjectLimit: 1 },
+ },
+ feeConfig: {
+ chargeMode: 'Free',
+ price: 0,
+ merchantId: undefined,
+ merchantName: '',
+ creditCode: '',
+ bankName: '',
+ accountNumber: '',
+ },
+ };
};
const openDetailDialog = async (row) => {
@@ -613,6 +665,34 @@ const openDetailDialog = async (row) => {
return;
}
detailData.value = data ?? null;
+ if (data) {
+ // 映射数据到 formData 结构
+ formData.value.basicInfo = {
+ ...formData.value.basicInfo,
+ id: data.id,
+ eventName: data.name || data.eventName || '',
+ coverImage: data.coverImage || '',
+ eventVideo: data.eventVideo || '',
+ eventType: data.type || data.eventType || '',
+ registrationType: data.registrationType || data.registrationMode || '',
+ pointsRuleId: data.pointsRuleId,
+ registrationTime: [data.registrationStartTime, data.registrationEndTime],
+ isNeedMaterial: !!data.isNeedMaterial,
+ materialRemark: data.materialRemark || '',
+ materialUploadTime: [data.materialUploadStartTime, data.materialUploadEndTime],
+ matchTime: [data.matchStartTime, data.matchEndTime],
+ regionIds: [data.provinceId, data.cityId, data.districtId].filter((x) => x !== undefined && x !== null),
+ detailAddress: data.detailAddress || '',
+ eventIntroduction: data.eventIntroduction || '',
+ customConfigJson: data.customConfigJson || '',
+ };
+ formData.value.units = { units: data.units || [] };
+ formData.value.projectConfig = {
+ projects: data.projects || [],
+ registrationLimit: data.registrationLimit || { individualProjectLimit: 1, teamProjectLimit: 1 },
+ };
+ formData.value.feeConfig = { ...formData.value.feeConfig, ...(data.feeConfig || {}) };
+ }
} catch {
ElMessage.error('赛事详情加载失败');
} finally {