3a5fe9f7 by zhangmeng

大师课,报名调整

1 parent d41baa03
...@@ -13,28 +13,30 @@ ...@@ -13,28 +13,30 @@
13 </el-steps> 13 </el-steps>
14 <div v-if="activeStep==0"> 14 <div v-if="activeStep==0">
15 <div class="mb60 xzRich" style="max-height: 50vh;overflow: auto"> 15 <div class="mb60 xzRich" style="max-height: 50vh;overflow: auto">
16 <div v-if="language==0" style="width: 300px;margin: auto"><br> 16 <div v-if="language==0" style="width: 400px;margin: auto"><br>
17 培训地点:无锡君来世尊酒店<br> 17 培训地点:南京国际博览会议中心<br>
18 详细地址:江苏省 无锡市 滨湖区 和风路111号<br> 18 详细地址:江苏省南京市建邺区江东中路300号南京国际博览会议中心302、303、402、403。<br>
19 报到时间:2024年7月14日13:30 -17:00<br> 19 上课时间:2026年7月13日-7月14日<br>
20 联系人:蒋璐<br> 20 报到时间:2026年7月12日 13:30- 17:00<br>
21 联系电话:15961580050<br> 21 联系人:祝昊乐<br>
22 报名截止日期:<span style="text-decoration: underline">2026-06-30</span><br> 22 联系电话:010-67183764<br>
23 报名截止日期:<span style="text-decoration: underline">2026-07-10</span><br>
23 </div> 24 </div>
24 <div v-else style="width: 400px;margin: auto;text-transform: capitalize"><br> 25 <div v-else style="width: 400px;margin: auto;text-transform: capitalize"><br>
25 <!-- The age limit for Youth Session: Born between 1st Jan, 2006 and 31st Dec., 2009.<br/>--> 26 <!-- The age limit for Youth Session: Born between 1st Jan, 2006 and 31st Dec., 2009.<br/>-->
26 <!-- The age limit for Juvenile Session: Born after 1 Jan., 2010.<br/>--> 27 <!-- The age limit for Juvenile Session: Born after 1 Jan., 2010.<br/>-->
27 Training Camp Venue:Worldhotel Grand Juna Wuxi<br> 28 Training Camp Venue:Nanjing International Exhibition and Convention Center<br>
28 Address:No.111 Hefeng Road, Binhu District, Wuxi, Jiangsu<br> 29 Address:No. 300 Jiangdong Zhong Road, Jianye District, Nanjing City, Jiangsu Province. Nanjing International Exhibition and Conference Center, Room 302, 303, 402, 403.<br>
29 Check-in:From 13:30 to 17:00 on July 14, 2026.<br> 30 Schooltime:July 13th - July 14th, 2026.<br>
30 Contact Person:Dean Ding<br> 31 Check-in:July 12, 2026 13:30 - 17:0.<br>
31 Tel:+86 19951486130<br> 32 Contact Person:Mr.Zhu<br>
32 Registration Deadline:<span style="text-decoration: underline">2026-06-30</span><br> 33 Tel:+86 010-67183764<br>
34 Registration Deadline:<span style="text-decoration: underline">2026-07-10</span><br>
33 </div> 35 </div>
34 </div> 36 </div>
35 <div v-loading="loading" class="text-center"> 37 <div v-loading="loading" class="text-center">
36 <el-button v-if="courseList.length>0" class="btn-lineG" round type="primary" @click="setActive(1)"> 38 <el-button v-if="courseList.length>0" class="btn-lineG" round type="primary" @click="setActive(1)">
37 <span v-if="dayjs().format('YYYY-MM-DD')>'2026-06-30'"> 39 <span v-if="dayjs().format('YYYY-MM-DD')>'2026-07-10'">
38 {{ language == 0 ? '报名已结束' : 'Registration has ended' }} 40 {{ language == 0 ? '报名已结束' : 'Registration has ended' }}
39 </span> 41 </span>
40 <span v-else>{{ language == 0 ? '下一步' : 'NEXT' }}</span> 42 <span v-else>{{ language == 0 ? '下一步' : 'NEXT' }}</span>
...@@ -121,12 +123,12 @@ ...@@ -121,12 +123,12 @@
121 <img class="mauto" src="@/assets/dance/ok.png"> 123 <img class="mauto" src="@/assets/dance/ok.png">
122 <h2 class="text-center">{{ language == 0 ? '申请已提交' : 'Submitted successfully' }}</h2> 124 <h2 class="text-center">{{ language == 0 ? '申请已提交' : 'Submitted successfully' }}</h2>
123 <h4 v-if="language == 0" class="text-center"> 125 <h4 v-if="language == 0" class="text-center">
124 我们已收到您的申请,请在7月14日到无锡报到。 126 我们已收到您的申请,请在7月14日到南京报到。
125 </h4> 127 </h4>
126 <h4 v-else> 128 <h4 v-else>
127 Your application has been received, 129 Your application has been received,
128 <br> 130 <br>
129 Please register in Wuxi on July 14. 131 Please report to Nanjing on July 14th.
130 </h4> 132 </h4>
131 </div> 133 </div>
132 <div v-else> 134 <div v-else>
...@@ -151,7 +153,7 @@ ...@@ -151,7 +153,7 @@
151 </div> 153 </div>
152 154
153 <el-tag 155 <el-tag
154 v-if="(form.nationality==240&&c.viewStateCn == 0)||(form.nationality!=240&&c.viewStateEn == 0)" 156 v-if="(c.viewStateCn == 0)||(c.viewStateEn == 0)"
155 class="ml20" 157 class="ml20"
156 effect="dark" type="danger" 158 effect="dark" type="danger"
157 >{{ language == 0 ? '已报满' : 'Already full' }} 159 >{{ language == 0 ? '已报满' : 'Already full' }}
...@@ -183,7 +185,7 @@ ...@@ -183,7 +185,7 @@
183 185
184 <script setup> 186 <script setup>
185 import { useStorage } from '@vueuse/core/index' 187 import { useStorage } from '@vueuse/core/index'
186 import { getCurrentInstance, watch ,onMounted} from 'vue' 188 import { getCurrentInstance, watch ,onMounted,ref} from 'vue'
187 import { nextTick } from '@vue/runtime-core' 189 import { nextTick } from '@vue/runtime-core'
188 import { ElMessage, ElMessageBox } from 'element-plus' 190 import { ElMessage, ElMessageBox } from 'element-plus'
189 import { addInvitation, countryList } from '@/apiPc/match' 191 import { addInvitation, countryList } from '@/apiPc/match'
...@@ -208,6 +210,8 @@ const rules = ref( ...@@ -208,6 +210,8 @@ const rules = ref(
208 { 210 {
209 nationality: [{ required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose' }], 211 nationality: [{ required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose' }],
210 name: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter' }], 212 name: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter' }],
213 phone: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter' }],
214 gender: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请选择' : 'Please choose' }],
211 email: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter' }], 215 email: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter' }],
212 birth: [{ required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose' }], 216 birth: [{ required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose' }],
213 passportNo: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter' }], 217 passportNo: [{ required: true, trigger: 'blur', message: language.value == 0 ? '请输入' : 'Please enter' }],
...@@ -218,8 +222,11 @@ const rules = ref( ...@@ -218,8 +222,11 @@ const rules = ref(
218 const open = (params) => { 222 const open = (params) => {
219 console.log(params) 223 console.log(params)
220 show.value = true 224 show.value = true
221 title.value = language.value == 0 ? '亚洲青少年体育舞蹈公益课' : 'Asian Youth DanceSport Training Camp' 225 title.value = language.value == 0 ? '2026年亚洲青少年体育舞蹈公益课' : '2026 Asian Youth Sports Dance Charity Class'
222 cptId.value = params.cptId 226 cptId.value = params.cptId
227 form.value={
228 gender:'0'
229 }
223 getCourse() 230 getCourse()
224 } 231 }
225 const checkMobile = () => { 232 const checkMobile = () => {
...@@ -230,19 +237,19 @@ onMounted(() => { ...@@ -230,19 +237,19 @@ onMounted(() => {
230 window.addEventListener('resize', checkMobile) 237 window.addEventListener('resize', checkMobile)
231 }) 238 })
232 defineExpose({ open }) 239 defineExpose({ open })
233 watch(show, (value) => { 240 // watch(show, (value) => {
234 if (!value) { 241 // if (!value) {
235 form.value = { 242 // form.value = {
236 sex: '0' 243 // sex: '0'
237 } 244 // }
238 if (language.value == 0) { 245 // if (language.value == 0) {
239 form.value.countryId = 240 246 // form.value.countryId = 240
240 } 247 // }
241 } 248 // }
242 nextTick(() => { 249 // nextTick(() => {
243 // proxy.$refs['dialogRef'].clearValidate() 250 // // proxy.$refs['dialogRef'].clearValidate()
244 }) 251 // })
245 }) 252 // })
246 253
247 function getCourse() { 254 function getCourse() {
248 // '1777256058082189313' 255 // '1777256058082189313'
...@@ -332,6 +339,8 @@ function getCountryList() { ...@@ -332,6 +339,8 @@ function getCountryList() {
332 countryList().then(res => { 339 countryList().then(res => {
333 countrys.value = res.data 340 countrys.value = res.data
334 }) 341 })
342
343 console.log(countrys.value)
335 } 344 }
336 345
337 const submit = () => { 346 const submit = () => {
......
...@@ -303,7 +303,7 @@ const data = reactive({ ...@@ -303,7 +303,7 @@ const data = reactive({
303 currProjectId: '', 303 currProjectId: '',
304 openTour: false, 304 openTour: false,
305 isNational: false, // 是否为国际赛 305 isNational: false, // 是否为国际赛
306 languageSource: '', singlePersonEntryLimit: '', doublePersonEntryLimit: '' 306 languageSource: '', singlePersonEntryLimit: '', doublePersonEntryLimit: '', simlsEntryLimit: ''
307 }) 307 })
308 const { 308 const {
309 activeTeam, 309 activeTeam,
...@@ -331,7 +331,7 @@ const { ...@@ -331,7 +331,7 @@ const {
331 tableType, 331 tableType,
332 zuQuery, 332 zuQuery,
333 openTour, currProjectId, 333 openTour, currProjectId,
334 tourCurrent, isNational, languageSource, singlePersonEntryLimit, doublePersonEntryLimit 334 tourCurrent, isNational, languageSource, singlePersonEntryLimit, doublePersonEntryLimit, simlsEntryLimit
335 } = toRefs(data) 335 } = toRefs(data)
336 336
337 const matchId = ref(route.query.matchId) 337 const matchId = ref(route.query.matchId)
...@@ -759,8 +759,6 @@ function switchTabletype() { ...@@ -759,8 +759,6 @@ function switchTabletype() {
759 } 759 }
760 } 760 }
761 761
762 let isDanNum = 0
763 let isShuangNum = 0
764 watch(projectIds, (newVal, oldVal) => { 762 watch(projectIds, (newVal, oldVal) => {
765 if (newVal.length > oldVal.length) { 763 if (newVal.length > oldVal.length) {
766 currProjectId.value = _.last(newVal) 764 currProjectId.value = _.last(newVal)
...@@ -768,31 +766,46 @@ watch(projectIds, (newVal, oldVal) => { ...@@ -768,31 +766,46 @@ watch(projectIds, (newVal, oldVal) => {
768 currProjectId.value = '' 766 currProjectId.value = ''
769 } 767 }
770 if (newVal.length > 0) { 768 if (newVal.length > 0) {
771 isDanNum = 0
772 isShuangNum = 0
773 for (const hh of projectList.value) {
774 if (!projectIds.value.includes(hh.id)) {
775 continue
776 }
777 if (hh.singleFlag == '1') {
778 isDanNum += 1
779 }
780 if (hh.doubleSingleProjectFlag == '1') {
781 isShuangNum += 1
782 }
783 }
784 filterProjectList() 769 filterProjectList()
785 } else { 770 } else {
786 resetProjectList() 771 resetProjectList()
787 } 772 }
788 }) 773 })
789 774
790 function getSelectedProjects() { 775 function getSelectedProjects(mtype = null) {
791 return projectList.value.filter(p => projectIds.value.includes(p.id)) 776 return projectList.value.filter(p => {
777 if (!projectIds.value.includes(p.id)) return false
778 if (mtype != null && p.mtype !== mtype) return false
779 return true
780 })
781 }
782
783 function normalizeMajorFlag(flag) {
784 if (flag == null || flag === '') return null
785 return String(flag)
786 }
787
788 function getProjectMajorFlag(p) {
789 const flag = normalizeMajorFlag(p.majorFlag)
790 if (flag != null) return flag
791 if (p.name && p.name.indexOf('业余') > -1) return '0'
792 return '1'
793 }
794
795 function isSimlsProject(p) {
796 return p.simlsFlag == '1' && p.almightyFlag != '1'
797 }
798
799 function countSimlsProjects() {
800 return getSelectedProjects().filter(isSimlsProject).length
801 }
802
803 function countSimlsSingleProjects() {
804 return getSelectedProjects().filter(p => p.singleFlag == '1' && isSimlsProject(p)).length
792 } 805 }
793 806
794 function isSameMtype(a, b) { 807 function countSimlsDoubleSingleProjects() {
795 return a.mtype === b.mtype 808 return getSelectedProjects().filter(p => p.doubleSingleProjectFlag == '1' && isSimlsProject(p)).length
796 } 809 }
797 810
798 function hasDanceCountConflict(pp) { 811 function hasDanceCountConflict(pp) {
...@@ -800,13 +813,10 @@ function hasDanceCountConflict(pp) { ...@@ -800,13 +813,10 @@ function hasDanceCountConflict(pp) {
800 return false 813 return false
801 } 814 }
802 const ppDanceCount = pp.danceTypeDetailStr.split(',').length 815 const ppDanceCount = pp.danceTypeDetailStr.split(',').length
803 return getSelectedProjects().some(selected => { 816 return getSelectedProjects(pp.mtype).some(selected => {
804 if (!selected.pproperty || !selected.danceTypeDetailStr) { 817 if (!selected.pproperty || !selected.danceTypeDetailStr) {
805 return false 818 return false
806 } 819 }
807 if (!isSameMtype(selected, pp)) {
808 return false
809 }
810 if (selected.pproperty !== pp.pproperty) { 820 if (selected.pproperty !== pp.pproperty) {
811 return false 821 return false
812 } 822 }
...@@ -819,13 +829,10 @@ function hasPpropertyConflict(pp) { ...@@ -819,13 +829,10 @@ function hasPpropertyConflict(pp) {
819 if (!pp.pproperty) { 829 if (!pp.pproperty) {
820 return false 830 return false
821 } 831 }
822 return getSelectedProjects().some(selected => { 832 return getSelectedProjects(pp.mtype).some(selected => {
823 if (!selected.pproperty) { 833 if (!selected.pproperty) {
824 return false 834 return false
825 } 835 }
826 if (!isSameMtype(selected, pp)) {
827 return false
828 }
829 return selected.pproperty !== pp.pproperty 836 return selected.pproperty !== pp.pproperty
830 }) 837 })
831 } 838 }
...@@ -834,43 +841,53 @@ function hasPlevelConflict(pp) { ...@@ -834,43 +841,53 @@ function hasPlevelConflict(pp) {
834 if (!pp.plevel) { 841 if (!pp.plevel) {
835 return false 842 return false
836 } 843 }
837 return getSelectedProjects().some(selected => { 844 return getSelectedProjects(pp.mtype).some(selected => {
838 if (!selected.plevel) { 845 if (!selected.plevel) {
839 return false 846 return false
840 } 847 }
841 if (!isSameMtype(selected, pp)) {
842 return false
843 }
844 return selected.plevel !== pp.plevel 848 return selected.plevel !== pp.plevel
845 }) 849 })
846 } 850 }
847 851
852 function hasMajorFlagConflict(pp) {
853 const ppFlag = getProjectMajorFlag(pp)
854 if (projectIds.value.includes(pp.id)) {
855 return false
856 }
857 return getSelectedProjects(pp.mtype).some(selected => {
858 return getProjectMajorFlag(selected) !== ppFlag
859 })
860 }
861
848 function hasAlmightyDanceCountConflict(pp) { 862 function hasAlmightyDanceCountConflict(pp) {
849 if (pp.almightyFlag !== '1' || !pp.danceTypeDetailStr) { 863 if (pp.almightyFlag !== '1' || !pp.danceTypeDetailStr) {
850 return false 864 return false
851 } 865 }
852 const ppDanceCount = pp.danceTypeDetailStr.split(',').length 866 const ppDanceCount = pp.danceTypeDetailStr.split(',').length
853 return getSelectedProjects().some(selected => { 867 return getSelectedProjects(pp.mtype).some(selected => {
854 if (selected.almightyFlag !== '1' || !selected.danceTypeDetailStr) { 868 if (selected.almightyFlag !== '1' || !selected.danceTypeDetailStr) {
855 return false 869 return false
856 } 870 }
857 if (!isSameMtype(selected, pp)) {
858 return false
859 }
860 return selected.danceTypeDetailStr.split(',').length !== ppDanceCount 871 return selected.danceTypeDetailStr.split(',').length !== ppDanceCount
861 }) 872 })
862 } 873 }
863 874
875 function hasSimlsEntryLimitReached(pp) {
876 const limit = Number(simlsEntryLimit.value)
877 if (!limit || !isSimlsProject(pp) || projectIds.value.includes(pp.id)) return false
878 return countSimlsProjects() >= limit
879 }
880
864 function hasSingleEntryLimitReached(pp) { 881 function hasSingleEntryLimitReached(pp) {
865 return isDanNum == Number(singlePersonEntryLimit.value) && 882 const limit = Number(singlePersonEntryLimit.value)
866 pp.singleFlag == '1' && 883 if (!limit || pp.singleFlag != '1' || projectIds.value.includes(pp.id)) return false
867 !projectIds.value.includes(pp.id) 884 return countSimlsSingleProjects() >= limit
868 } 885 }
869 886
870 function hasDoubleSingleEntryLimitReached(pp) { 887 function hasDoubleSingleEntryLimitReached(pp) {
871 return isShuangNum == Number(doublePersonEntryLimit.value) && 888 const limit = Number(doublePersonEntryLimit.value)
872 pp.doubleSingleProjectFlag == '1' && 889 if (!limit || pp.doubleSingleProjectFlag != '1' || projectIds.value.includes(pp.id)) return false
873 !projectIds.value.includes(pp.id) 890 return countSimlsDoubleSingleProjects() >= limit
874 } 891 }
875 892
876 function filterProjectList() { 893 function filterProjectList() {
...@@ -878,7 +895,9 @@ function filterProjectList() { ...@@ -878,7 +895,9 @@ function filterProjectList() {
878 pp.disabled = hasDanceCountConflict(pp) || 895 pp.disabled = hasDanceCountConflict(pp) ||
879 hasPpropertyConflict(pp) || 896 hasPpropertyConflict(pp) ||
880 hasPlevelConflict(pp) || 897 hasPlevelConflict(pp) ||
898 hasMajorFlagConflict(pp) ||
881 hasAlmightyDanceCountConflict(pp) || 899 hasAlmightyDanceCountConflict(pp) ||
900 hasSimlsEntryLimitReached(pp) ||
882 hasSingleEntryLimitReached(pp) || 901 hasSingleEntryLimitReached(pp) ||
883 hasDoubleSingleEntryLimitReached(pp) 902 hasDoubleSingleEntryLimitReached(pp)
884 } 903 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!