852a632e by zhangmeng

赛事报名限制

1 parent df7a4ef6
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 <el-card class="mb20"> 4 <el-card class="mb20">
5 <team-sign-step :active-step="activeStep" :language="language" /> 5 <team-sign-step :active-step="activeStep" :language="language" />
6 </el-card> 6 </el-card>
7 7
8 <el-card :body-style="{'padding-top': '0'}"> 8 <el-card :body-style="{'padding-top': '0'}">
9 <el-row :gutter="20" class="mt20"> 9 <el-row :gutter="20" class="mt20">
10 <el-col :lg="12"> 10 <el-col :lg="12">
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
14 <h3 v-else class="panel-title">Select list of participating athletes</h3> 14 <h3 v-else class="panel-title">Select list of participating athletes</h3>
15 <!-- <a class="fr" @click="emptyChoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>--> 15 <!-- <a class="fr" @click="emptyChoosed">{{ language == 0 ? '清空' : 'Empty' }}</a>-->
16 <el-button 16 <el-button
17 class="fr" plain size="small" style="top:12px" type="primary" 17 class="fr" plain size="small" style="top:12px" type="primary"
18 @click="chooseSportman" 18 @click="chooseSportman"
19 > 19 >
20 {{ language == 0 ? '选手管理' : 'Athlete Management' }} 20 {{ language == 0 ? '选手管理' : 'Athlete Management' }}
21 </el-button> 21 </el-button>
...@@ -27,32 +27,32 @@ ...@@ -27,32 +27,32 @@
27 <!-- }}--> 27 <!-- }}-->
28 *{{ 28 *{{
29 language == 0 ? 29 language == 0 ?
30 '可通过选手管理,增加运动员和完善运动员信息' : `You can add players and complete athletes' details through [Athlete Management]` 30 '可通过选手管理,增加运动员和完善运动员信息' : `You can add players and complete athletes' details through [Athlete Management]`
31 }} 31 }}
32 </div> 32 </div>
33 <div style="margin: 0 4px 10px;display: flex"> 33 <div style="margin: 0 4px 10px;display: flex">
34 <el-select 34 <el-select
35 v-model="choosedchoosed" collapse-tags-tooltip filterable multiple 35 v-model="choosedchoosed" collapse-tags-tooltip filterable multiple
36 @change="changechoosed" 36 @change="changechoosed"
37 > 37 >
38 <el-option 38 <el-option
39 v-for="c in athletesList" :key="c.id" :label="c.realName" 39 v-for="c in athletesList" :key="c.id" :label="c.realName"
40 :value="c.id" @click="handelOption(c.id)" 40 :value="c.id" @click="handelOption(c.id)"
41 > 41 >
42 <div class="flexOption" style="width: 100%"> 42 <div class="flexOption" style="width: 100%">
43 {{ c.realName }} 43 {{ c.realName }}
44 <img v-if="c.sex=='0'" src="@/assets/img/female.png"> 44 <img v-if="c.sex=='0'" src="@/assets/img/female.png">
45 <img v-if="c.sex=='1'" src="@/assets/img/male.png"> 45 <img v-if="c.sex=='1'" src="@/assets/img/male.png">
46 46
47 {{ c.representing }} 47 {{ c.representing }}
48 {{ c.ageGroup }} 48 {{ c.ageGroup }}
49 {{ c.division }}<span v-if="c.age"> -{{ c.age }}{{ language == 0 ? '岁' : 'years' }}</span> 49 {{ c.division }}<span v-if="c.age"> -{{ c.age }}{{ language == 0 ? '岁' : 'years' }}</span>
50 <!-- @click="editPerson(c.id)"--> 50 <!-- @click="editPerson(c.id)"-->
51 <span 51 <span
52 v-if="c.disabled||c.ocrFlag==0" 52 v-if="c.disabled||c.ocrFlag==0"
53 class="text-danger po-right" 53 class="text-danger po-right"
54 >{{ language == 0 ? '完善信息' : 'complete details' }}</span> 54 >{{ language == 0 ? '完善信息' : 'complete details' }}</span>
55 55
56 </div> 56 </div>
57 </el-option> 57 </el-option>
58 <!-- <template #tag>--> 58 <!-- <template #tag>-->
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
65 {{ language == 0 ? '重选' : 'Re-select' }} 65 {{ language == 0 ? '重选' : 'Re-select' }}
66 </el-button> 66 </el-button>
67 </div> 67 </div>
68 68
69 69
70 <!-- --> 70 <!-- -->
71 <div v-if="athletesList.length==0" class="pd20 text-center"> 71 <div v-if="athletesList.length==0" class="pd20 text-center">
72 <span>{{ language == 0 ? '暂无参赛选手' : 'No athlete yet,' }} 72 <span>{{ language == 0 ? '暂无参赛选手' : 'No athlete yet,' }}
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
82 根据选择的人员自动匹配项目,选择单人匹配单人项 82 根据选择的人员自动匹配项目,选择单人匹配单人项
83 目,选择双人匹配双人项目(注意男女),选择多人匹配多人项目。 83 目,选择双人匹配双人项目(注意男女),选择多人匹配多人项目。
84 </div> 84 </div>
85 85
86 <!-- <div class="noPicChooseForm" id="chooseArr">--> 86 <!-- <div class="noPicChooseForm" id="chooseArr">-->
87 <!-- <el-checkbox-group v-model="choosedchoosed" @change="changechoosed">--> 87 <!-- <el-checkbox-group v-model="choosedchoosed" @change="changechoosed">-->
88 <!-- <el-checkbox v-for="c in choosedListBak" :value="c.id" border>--> 88 <!-- <el-checkbox v-for="c in choosedListBak" :value="c.id" border>-->
...@@ -108,17 +108,17 @@ ...@@ -108,17 +108,17 @@
108 </h3> 108 </h3>
109 <div class="fr"> 109 <div class="fr">
110 <el-input 110 <el-input
111 v-model="projectQuery.name" :prefix-icon="Search" clearable 111 v-model="projectQuery.name" :prefix-icon="Search" clearable
112 size="small" 112 size="small"
113 @change="getProjectList" 113 @change="getProjectList"
114 /> 114 />
115 </div> 115 </div>
116 </div> 116 </div>
117 <div id="projectbox" v-loading="loadingProject" style="height: 50vh;overflow: auto;"> 117 <div id="projectbox" v-loading="loadingProject" style="height: 50vh;overflow: auto;">
118 <el-checkbox-group v-model="projectIds" @change="changeProject"> 118 <el-checkbox-group v-model="projectIds" @change="changeProject">
119 <el-checkbox 119 <el-checkbox
120 v-for="c in projectList" v-show="!c.disabled" :key="c.id" :disabled="c.disabled" 120 v-for="c in projectList" v-show="!c.disabled" :key="c.id" :disabled="c.disabled"
121 :value="c.id" class="flexBetweenBox" 121 :value="c.id" class="flexBetweenBox"
122 > 122 >
123 <div class="flexBetween w100"> 123 <div class="flexBetween w100">
124 <div class="l"> 124 <div class="l">
...@@ -131,9 +131,9 @@ ...@@ -131,9 +131,9 @@
131 </el-checkbox> 131 </el-checkbox>
132 </el-checkbox-group> 132 </el-checkbox-group>
133 <el-empty 133 <el-empty
134 v-if="projectList.length==0" :description="language==0?'无可选项目':''" 134 v-if="projectList.length==0" :description="language==0?'无可选项目':''"
135 :image="`/img/order_no.png`" 135 :image="`/img/order_no.png`"
136 :image-size="228" 136 :image-size="228"
137 /> 137 />
138 </div> 138 </div>
139 </div> 139 </div>
...@@ -143,9 +143,9 @@ ...@@ -143,9 +143,9 @@
143 <el-col :span="24"> 143 <el-col :span="24">
144 <div class="text-center"> 144 <div class="text-center">
145 <el-button 145 <el-button
146 id="signUpBtn" :disabled="projectIds.length==0||choosedchoosed.length==0" 146 id="signUpBtn" :disabled="projectIds.length==0||choosedchoosed.length==0"
147 class="btn-lineG w200px" 147 class="btn-lineG w200px"
148 round type="primary" @click="signUp" 148 round type="primary" @click="signUp"
149 > 149 >
150 {{ language == 0 ? '确定' : 'Confirm' }} 150 {{ language == 0 ? '确定' : 'Confirm' }}
151 </el-button> 151 </el-button>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
155 </el-card> 155 </el-card>
156 <!-- <el-button type="success" @click="importSportman">批量导入人员</el-button>--> 156 <!-- <el-button type="success" @click="importSportman">批量导入人员</el-button>-->
157 <!-- <el-button type="success" @click="addCoach">新增运动员</el-button>--> 157 <!-- <el-button type="success" @click="addCoach">新增运动员</el-button>-->
158 158
159 <el-card :body-style="{'padding': '0'}" class="mt20"> 159 <el-card :body-style="{'padding': '0'}" class="mt20">
160 <coach-info-row :group-id="groupId" :language="language" :match-id="matchId" /> 160 <coach-info-row :group-id="groupId" :language="language" :match-id="matchId" />
161 <div class="m20"> 161 <div class="m20">
...@@ -176,44 +176,44 @@ ...@@ -176,44 +176,44 @@
176 <!-- </el-button>--> 176 <!-- </el-button>-->
177 <!-- </div>--> 177 <!-- </div>-->
178 <sign-info-table 178 <sign-info-table
179 v-if="tableType==0" :extraform="extraform" 179 v-if="tableType==0" :extraform="extraform"
180 :is-national="isNational" :list="signInfoList" 180 :is-national="isNational" :list="signInfoList"
181 :match-id="matchId" @editExtra="goPersonInfo" 181 :match-id="matchId" @editExtra="goPersonInfo"
182 /> 182 />
183 <zu-table v-else :list="zuTableList" @delete="removeThis" /> 183 <zu-table v-else :list="zuTableList" @delete="removeThis" />
184 <div class="text-center mt20 father"> 184 <div class="text-center mt20 father">
185 <el-button 185 <el-button
186 class="w200px" plain round style="position: relative ;z-index: 99" type="primary" 186 class="w200px" plain round style="position: relative ;z-index: 99" type="primary"
187 @click="goPrev()" 187 @click="goPrev()"
188 > 188 >
189 {{ language == 0 ? "上一步" : 'Go back' }} 189 {{ language == 0 ? "上一步" : 'Go back' }}
190 </el-button> 190 </el-button>
191 <el-button 191 <el-button
192 class="btn-lineG w200px" round style="position: relative ;z-index: 99" type="primary" 192 class="btn-lineG w200px" round style="position: relative ;z-index: 99" type="primary"
193 @click="submitForm()" 193 @click="submitForm()"
194 > 194 >
195 {{ language == 0 ? '预览报名信息' : 'Preview registration information' }} 195 {{ language == 0 ? '预览报名信息' : 'Preview registration information' }}
196 </el-button> 196 </el-button>
197 197
198 <span v-if="language==0&& insuranceFlag!=0||language==1&&insuranceFlag==1" class="checkbox"> 198 <span v-if="language==0&& insuranceFlag!=0||language==1&&insuranceFlag==1" class="checkbox">
199 <br v-if="language == 1"> 199 <br v-if="language == 1">
200 <br v-if="language == 1"> 200 <br v-if="language == 1">
201 <el-checkbox 201 <el-checkbox
202 v-model="checked" 202 v-model="checked"
203 :label="language==0?'我同意授权赛事方帮忙购买保险':'I agree to authorize the event organizer to purchase insurance on my behalf'" 203 :label="language==0?'我同意授权赛事方帮忙购买保险':'I agree to authorize the event organizer to purchase insurance on my behalf'"
204 false-value="0" 204 false-value="0"
205 size="large" true-value="1" 205 size="large" true-value="1"
206 /> 206 />
207 <br v-if="language == 1"> 207 <br v-if="language == 1">
208 <span 208 <span
209 @click="handelInsurance" 209 @click="handelInsurance"
210 >《{{ language == 0 ? '赛事购买协议' : 'Event Insurance Procurement Agreement' }} 》</span> 210 >《{{ language == 0 ? '赛事购买协议' : 'Event Insurance Procurement Agreement' }} 》</span>
211 </span> 211 </span>
212 </div> 212 </div>
213 </div> 213 </div>
214 </el-card> 214 </el-card>
215 </div> 215 </div>
216 216
217 <dialogAddCoach ref="dialogAddCoachRef" /> 217 <dialogAddCoach ref="dialogAddCoachRef" />
218 <!-- <dialogAllSportsmanList ref="dialogAllSportsmanListRef" @transfer="getChoosed" @submitForm="getSignInfoList"/>--> 218 <!-- <dialogAllSportsmanList ref="dialogAllSportsmanListRef" @transfer="getChoosed" @submitForm="getSignInfoList"/>-->
219 <dialogAllSportsmanList ref="dialogAllSportsmanListRef" @submitForm="getAthletesList" /> 219 <dialogAllSportsmanList ref="dialogAllSportsmanListRef" @submitForm="getAthletesList" />
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
225 <el-button type="primary" @click="goMySign">{{ language == 0 ? '查看报项' : 'View Entries' }}</el-button> 225 <el-button type="primary" @click="goMySign">{{ language == 0 ? '查看报项' : 'View Entries' }}</el-button>
226 </template> 226 </template>
227 </el-result> 227 </el-result>
228 228
229 </el-dialog> 229 </el-dialog>
230 <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList" /> 230 <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList" />
231 <dialogWdsf ref="popWdsf" @cancel="removeCurproject" @submitForm="getAthletesList" /> 231 <dialogWdsf ref="popWdsf" @cancel="removeCurproject" @submitForm="getAthletesList" />
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
235 <!-- <el-tour-step v-if="projectList.length>0" target="#projectbox" title="第三步" description="选择报名项目"/>--> 235 <!-- <el-tour-step v-if="projectList.length>0" target="#projectbox" title="第三步" description="选择报名项目"/>-->
236 <!-- <el-tour-step v-if="projectIds.length>0" target="#signUpBtn" title="第四步" description="点击报项"/>--> 236 <!-- <el-tour-step v-if="projectIds.length>0" target="#signUpBtn" title="第四步" description="点击报项"/>-->
237 <!-- </el-tour>--> 237 <!-- </el-tour>-->
238 238
239 <insuranceView ref="insuranceViewRef" @checkedChange="checkedChange" @scuess="handelSuccess" /> 239 <insuranceView ref="insuranceViewRef" @checkedChange="checkedChange" @scuess="handelSuccess" />
240 </div> 240 </div>
241 </template> 241 </template>
...@@ -359,7 +359,7 @@ function getAthletesList() { ...@@ -359,7 +359,7 @@ function getAthletesList() {
359 // athletesList.value 359 // athletesList.value
360 match.getGroupPersonList({ label: '0' }, groupId.value).then(res => { 360 match.getGroupPersonList({ label: '0' }, groupId.value).then(res => {
361 athletesList.value = res.rows 361 athletesList.value = res.rows
362 362
363 for (const ath of athletesList.value) { 363 for (const ath of athletesList.value) {
364 if (!isNational.value) { 364 if (!isNational.value) {
365 ath.disabled = false 365 ath.disabled = false
...@@ -383,7 +383,6 @@ function getMatch(id) { ...@@ -383,7 +383,6 @@ function getMatch(id) {
383 noPhotoCanSign.value = res.data.noPhotoCanSign 383 noPhotoCanSign.value = res.data.noPhotoCanSign
384 coachOrLeaderFlag.value = res.data.coachOrLeaderFlag 384 coachOrLeaderFlag.value = res.data.coachOrLeaderFlag
385 extraform.value = JSON.parse(res.data.participantsInfo) 385 extraform.value = JSON.parse(res.data.participantsInfo)
386 console.log(11111,extraform.value)
387 insuranceAgreement.value = res.data.insuranceAgreement 386 insuranceAgreement.value = res.data.insuranceAgreement
388 insuranceFlag.value = res.data.insuranceFlag 387 insuranceFlag.value = res.data.insuranceFlag
389 if (insuranceFlag.value == 1) checked.value = '1' 388 if (insuranceFlag.value == 1) checked.value = '1'
...@@ -419,11 +418,11 @@ function getSignInfoList() { ...@@ -419,11 +418,11 @@ function getSignInfoList() {
419 function submitForm() { 418 function submitForm() {
420 if (signInfoType == '1') { 419 if (signInfoType == '1') {
421 ElMessageBox.confirm(language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission', 420 ElMessageBox.confirm(language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission',
422 language.value == 0 ? '提示' : 'Tips', { 421 language.value == 0 ? '提示' : 'Tips', {
423 confirmButtonText: language.value == 0 ? '确定' : 'OK', 422 confirmButtonText: language.value == 0 ? '确定' : 'OK',
424 cancelButtonText: language.value == 0 ? '取消' : 'Cancel', 423 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
425 type: 'warning' 424 type: 'warning'
426 }).then(() => { 425 }).then(() => {
427 router.push({ name: 'myMatch' }) 426 router.push({ name: 'myMatch' })
428 }) 427 })
429 return 428 return
...@@ -463,7 +462,7 @@ function submitForm() { ...@@ -463,7 +462,7 @@ function submitForm() {
463 } 462 }
464 return 463 return
465 } 464 }
466 465
467 if (language.value == 0 && insuranceFlag.value == 2 && checked.value == 0) { 466 if (language.value == 0 && insuranceFlag.value == 2 && checked.value == 0) {
468 handelInsurance() // 非购买保险 467 handelInsurance() // 非购买保险
469 } else { 468 } else {
...@@ -477,7 +476,7 @@ function submitForm() { ...@@ -477,7 +476,7 @@ function submitForm() {
477 } 476 }
478 }) 477 })
479 } 478 }
480 479
481 // if (insuranceFlag.value == '1' && checked.value == 0) { 480 // if (insuranceFlag.value == '1' && checked.value == 0) {
482 // ElMessageBox.confirm(language.value == 0 ? '请阅读并勾选同意赛事保险购买协议' : 'Please read and tick to agree to the event insurance purchase agreement', 481 // ElMessageBox.confirm(language.value == 0 ? '请阅读并勾选同意赛事保险购买协议' : 'Please read and tick to agree to the event insurance purchase agreement',
483 // language.value == 0 ? '提示' : 'Tip', { 482 // language.value == 0 ? '提示' : 'Tip', {
...@@ -571,9 +570,9 @@ function handelOption(id) { ...@@ -571,9 +570,9 @@ function handelOption(id) {
571 if (ocr.disabled || ocr.ocrFlag == 0) { 570 if (ocr.disabled || ocr.ocrFlag == 0) {
572 choosedchoosed.value = choosedchoosed.value.filter(v => v != id) 571 choosedchoosed.value = choosedchoosed.value.filter(v => v != id)
573 return proxy.$modal.confirm( 572 return proxy.$modal.confirm(
574 language.value == 0 573 language.value == 0
575 ? '请到选手管理完善信息' 574 ? '请到选手管理完善信息'
576 : 'You can complete athletes details through [Athlete Manage') 575 : 'You can complete athletes details through [Athlete Manage')
577 } 576 }
578 } 577 }
579 } 578 }
...@@ -676,11 +675,11 @@ function signUp() { ...@@ -676,11 +675,11 @@ function signUp() {
676 675
677 function removeThis(id) { 676 function removeThis(id) {
678 ElMessageBox.confirm(language.value == 0 ? '确定移除这条报项吗?' : 'Are you sure to remove this report item', 677 ElMessageBox.confirm(language.value == 0 ? '确定移除这条报项吗?' : 'Are you sure to remove this report item',
679 language.value == 0 ? '提示' : 'Tips', { 678 language.value == 0 ? '提示' : 'Tips', {
680 confirmButtonText: language.value == 0 ? '确定' : 'Confirm', 679 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
681 cancelButtonText: language.value == 0 ? '取消' : 'Cancel', 680 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
682 type: 'warning' 681 type: 'warning'
683 }).then(() => { 682 }).then(() => {
684 match.deleteSign(id).then(res => { 683 match.deleteSign(id).then(res => {
685 // 重新获取已报名信息 684 // 重新获取已报名信息
686 ElMessage.success(language.value == 0 ? '已移除该报项' : 'success') 685 ElMessage.success(language.value == 0 ? '已移除该报项' : 'success')
...@@ -740,7 +739,7 @@ const goPersonInfo = (row) => { ...@@ -740,7 +739,7 @@ const goPersonInfo = (row) => {
740 function downloadVoucher() { 739 function downloadVoucher() {
741 // 下载凭证 740 // 下载凭证
742 proxy.download( 741 proxy.download(
743 `/pdf/getPayedOrderPdf/${matchId.value}/${groupId.value || 0}`, {}, '报项凭证.pdf', {}, 'application/pdf' 742 `/pdf/getPayedOrderPdf/${matchId.value}/${groupId.value || 0}`, {}, '报项凭证.pdf', {}, 'application/pdf'
744 ) 743 )
745 } 744 }
746 745
...@@ -762,6 +761,7 @@ function switchTabletype() { ...@@ -762,6 +761,7 @@ function switchTabletype() {
762 761
763 let hasPproperty = '' 762 let hasPproperty = ''
764 let hasPlevel = '' 763 let hasPlevel = ''
764 let hasMtype = ''
765 let hasAlmighty = {} 765 let hasAlmighty = {}
766 let hasPpropertyLength = 0 766 let hasPpropertyLength = 0
767 let isDanNum = 0 767 let isDanNum = 0
...@@ -781,6 +781,7 @@ watch(projectIds, (newVal, oldVal) => { ...@@ -781,6 +781,7 @@ watch(projectIds, (newVal, oldVal) => {
781 if (newVal.length > 0) { 781 if (newVal.length > 0) {
782 hasPproperty = '' 782 hasPproperty = ''
783 hasPlevel = '' 783 hasPlevel = ''
784 hasMtype = ''
784 hasAlmighty = {} 785 hasAlmighty = {}
785 isDanNum = 0 786 isDanNum = 0
786 isShuangNum = 0 787 isShuangNum = 0
...@@ -789,6 +790,7 @@ watch(projectIds, (newVal, oldVal) => { ...@@ -789,6 +790,7 @@ watch(projectIds, (newVal, oldVal) => {
789 if (projectIds.value.indexOf(hh.id) > -1 && hh.pproperty) { 790 if (projectIds.value.indexOf(hh.id) > -1 && hh.pproperty) {
790 hasPproperty = hh.pproperty 791 hasPproperty = hh.pproperty
791 hasPpropertyLength = hh.danceTypeDetailStr.split(',').length 792 hasPpropertyLength = hh.danceTypeDetailStr.split(',').length
793 hasMtype = hh.mtype
792 } 794 }
793 if (projectIds.value.indexOf(hh.id) > -1 && hh.plevel) { 795 if (projectIds.value.indexOf(hh.id) > -1 && hh.plevel) {
794 hasPlevel = hh.plevel 796 hasPlevel = hh.plevel
...@@ -810,19 +812,52 @@ watch(projectIds, (newVal, oldVal) => { ...@@ -810,19 +812,52 @@ watch(projectIds, (newVal, oldVal) => {
810 } 812 }
811 }) 813 })
812 814
815 function hasDanceCountConflict(pp) {
816 if (!pp.pproperty || !pp.danceTypeDetailStr) {
817 return false
818 }
819 const ppDanceCount = pp.danceTypeDetailStr.split(',').length
820 const selectedProjects = projectList.value.filter(p => projectIds.value.includes(p.id) && p.pproperty)
821 return selectedProjects.some(selected => {
822 if (selected.pproperty !== pp.pproperty) {
823 return false
824 }
825 // 名次赛与等级赛不互斥,仅同类型项目限制三支/四支舞兼报
826 if (selected.mtype !== pp.mtype) {
827 return false
828 }
829 const selectedDanceCount = selected.danceTypeDetailStr.split(',').length
830 return (ppDanceCount >= 4 && selectedDanceCount < 4) || (ppDanceCount < 4 && selectedDanceCount >= 4)
831 })
832 }
833
834 function hasPpropertyConflict(pp) {
835 if (!pp.pproperty) {
836 return false
837 }
838 const selectedProjects = projectList.value.filter(p => projectIds.value.includes(p.id) && p.pproperty)
839 return selectedProjects.some(selected => {
840 // 名次赛与等级赛不互斥,ABC 属性仅在同一赛事类型内互斥
841 if (selected.mtype !== pp.mtype) {
842 return false
843 }
844 return selected.pproperty !== pp.pproperty
845 })
846 }
847
813 function filterProjectList(currProject) { 848 function filterProjectList(currProject) {
814 for (const pp of projectList.value) { 849 for (const pp of projectList.value) {
815 if ( 850 if (
816 (hasPproperty && pp.pproperty == hasPproperty) && ((pp.danceTypeDetailStr.split(',').length >= 4 && hasPpropertyLength < 4) || (pp.danceTypeDetailStr.split(',').length < 4 && hasPpropertyLength >= 4)) || 851 hasDanceCountConflict(pp) ||
817 (hasPproperty && pp.pproperty && pp.pproperty != hasPproperty) || 852 hasPpropertyConflict(pp) ||
818 (hasPlevel && pp.plevel && pp.plevel != hasPlevel) || 853 (hasPlevel && pp.plevel && pp.plevel != hasPlevel) ||
819 (isDanNum == Number(singlePersonEntryLimit.value) && pp.singleFlag == '1' && projectIds.value.indexOf(pp.id) == -1) || 854 (isDanNum == Number(singlePersonEntryLimit.value) && pp.singleFlag == '1' && projectIds.value.indexOf(pp.id) == -1) ||
820 (isShuangNum == Number(doublePersonEntryLimit.value) && pp.doubleSingleProjectFlag == '1' && projectIds.value.indexOf(pp.id) == -1) 855 (isShuangNum == Number(doublePersonEntryLimit.value) && pp.doubleSingleProjectFlag == '1' && projectIds.value.indexOf(pp.id) == -1)
821 ) { 856 ) {
822 console.log(pp.name) 857 console.log(pp.name)
823 pp.disabled = true 858 pp.disabled = true
824 } else if ((hasAlmighty.almightyFlag == '1' && pp.almightyFlag == '1') && 859 } else if ((hasAlmighty.almightyFlag == '1' && pp.almightyFlag == '1') &&
825 (hasAlmighty.danceTypeDetailStr.split(',').length != pp.danceTypeDetailStr.split(',').length) 860 (hasAlmighty.danceTypeDetailStr.split(',').length != pp.danceTypeDetailStr.split(',').length)
826 ) { 861 ) {
827 console.log(pp.name) 862 console.log(pp.name)
828 pp.disabled = true 863 pp.disabled = true
...@@ -885,11 +920,11 @@ function checkTwo(a, b) { ...@@ -885,11 +920,11 @@ function checkTwo(a, b) {
885 ElMessage.warning(language.value == 0 ? '他们不是固定组合' : 'They\'re not a couple') 920 ElMessage.warning(language.value == 0 ? '他们不是固定组合' : 'They\'re not a couple')
886 } else { 921 } else {
887 ElMessageBox.confirm(language.value == 0 ? `${a.realName}/${b.realName} 已经和其他人组成舞伴,无法报名,请重新选择` : `${a.realName}/${b.realName} has already formed a dancer with another person, cannot sign up: please select again`, 922 ElMessageBox.confirm(language.value == 0 ? `${a.realName}/${b.realName} 已经和其他人组成舞伴,无法报名,请重新选择` : `${a.realName}/${b.realName} has already formed a dancer with another person, cannot sign up: please select again`,
888 language.value == 0 ? '提示' : 'Tips', { 923 language.value == 0 ? '提示' : 'Tips', {
889 confirmButtonText: language.value == 0 ? '确定' : 'Confirm', 924 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
890 showCancelButton: false, 925 showCancelButton: false,
891 type: 'warning' 926 type: 'warning'
892 }).then(() => { 927 }).then(() => {
893 console.log('Confirm') 928 console.log('Confirm')
894 }) 929 })
895 } 930 }
...@@ -916,7 +951,7 @@ watch(choosedchoosed, (newVal, oldVal) => { ...@@ -916,7 +951,7 @@ watch(choosedchoosed, (newVal, oldVal) => {
916 if (!res.data) { 951 if (!res.data) {
917 ElMessage.warning(language.value == 0 ? '该人员已在其他团队中报名,请重新选择' : 'This person has already registered in another team, please select again') 952 ElMessage.warning(language.value == 0 ? '该人员已在其他团队中报名,请重新选择' : 'This person has already registered in another team, please select again')
918 choosedchoosed.value = _.without(choosedchoosed.value, _.last(newVal)) 953 choosedchoosed.value = _.without(choosedchoosed.value, _.last(newVal))
919 954
920 for (var c of choosed2List.value) { 955 for (var c of choosed2List.value) {
921 if (c.id == _.last(newVal)) { 956 if (c.id == _.last(newVal)) {
922 choosed2List.value = _.without(choosed2List.value, c) 957 choosed2List.value = _.without(choosed2List.value, c)
...@@ -945,11 +980,11 @@ function handelSuccess(v) { ...@@ -945,11 +980,11 @@ function handelSuccess(v) {
945 checked.value = v 980 checked.value = v
946 if (signInfoType == '1') { 981 if (signInfoType == '1') {
947 ElMessageBox.confirm(language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission', 982 ElMessageBox.confirm(language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission',
948 language.value == 0 ? '提示' : 'Tips', { 983 language.value == 0 ? '提示' : 'Tips', {
949 confirmButtonText: language.value == 0 ? '确定' : 'OK', 984 confirmButtonText: language.value == 0 ? '确定' : 'OK',
950 cancelButtonText: language.value == 0 ? '取消' : 'Cancel', 985 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
951 type: 'warning' 986 type: 'warning'
952 }).then(() => { 987 }).then(() => {
953 router.push({ name: 'myMatch' }) 988 router.push({ name: 'myMatch' })
954 }) 989 })
955 return 990 return
...@@ -977,7 +1012,7 @@ function handelSuccess(v) { ...@@ -977,7 +1012,7 @@ function handelSuccess(v) {
977 } 1012 }
978 return 1013 return
979 } 1014 }
980 1015
981 router.push({ 1016 router.push({
982 name: 'signPreview', 1017 name: 'signPreview',
983 query: { 1018 query: {
...@@ -1015,7 +1050,7 @@ function checkedChange(v) { ...@@ -1015,7 +1050,7 @@ function checkedChange(v) {
1015 .flexBetween { 1050 .flexBetween {
1016 padding: 10px; 1051 padding: 10px;
1017 border-left: 1px solid #eee; 1052 border-left: 1px solid #eee;
1018 1053
1019 .l { 1054 .l {
1020 div { 1055 div {
1021 margin: 4px 0 0; 1056 margin: 4px 0 0;
...@@ -1046,16 +1081,16 @@ function checkedChange(v) { ...@@ -1046,16 +1081,16 @@ function checkedChange(v) {
1046 margin: 0 0 20px; 1081 margin: 0 0 20px;
1047 display: flex; 1082 display: flex;
1048 justify-content: space-between; 1083 justify-content: space-between;
1049 1084
1050 button { 1085 button {
1051 position: relative; 1086 position: relative;
1052 margin: 10px; 1087 margin: 10px;
1053 } 1088 }
1054 1089
1055 .choseItem { 1090 .choseItem {
1056 margin: 10px; 1091 margin: 10px;
1057 position: relative; 1092 position: relative;
1058 1093
1059 .poClose { 1094 .poClose {
1060 position: absolute; 1095 position: absolute;
1061 right: -6px; 1096 right: -6px;
...@@ -1070,18 +1105,18 @@ function checkedChange(v) { ...@@ -1070,18 +1105,18 @@ function checkedChange(v) {
1070 background: rgba(245, 247, 249, 0.38); 1105 background: rgba(245, 247, 249, 0.38);
1071 padding: 20px 40px 10px; 1106 padding: 20px 40px 10px;
1072 } 1107 }
1073 1108
1074 .el-checkbox { 1109 .el-checkbox {
1075 height: auto; 1110 height: auto;
1076 margin-right: 20px; 1111 margin-right: 20px;
1077 } 1112 }
1078 1113
1079 :deep(.el-checkbox__input) { 1114 :deep(.el-checkbox__input) {
1080 position: absolute; 1115 position: absolute;
1081 right: 0; 1116 right: 0;
1082 top: 0; 1117 top: 0;
1083 } 1118 }
1084 1119
1085 .name { 1120 .name {
1086 text-align: center; 1121 text-align: center;
1087 } 1122 }
...@@ -1100,7 +1135,7 @@ function checkedChange(v) { ...@@ -1100,7 +1135,7 @@ function checkedChange(v) {
1100 margin: 5px 0; 1135 margin: 5px 0;
1101 color: #4C5359; 1136 color: #4C5359;
1102 font-size: 14px; 1137 font-size: 14px;
1103 1138
1104 label { 1139 label {
1105 font-size: 14px; 1140 font-size: 14px;
1106 margin-right: 14px 1141 margin-right: 14px
...@@ -1113,13 +1148,13 @@ function checkedChange(v) { ...@@ -1113,13 +1148,13 @@ function checkedChange(v) {
1113 color: #4C5359; 1148 color: #4C5359;
1114 display: flex; 1149 display: flex;
1115 justify-content: center; 1150 justify-content: center;
1116 1151
1117 div { 1152 div {
1118 padding: 20px; 1153 padding: 20px;
1119 position: relative; 1154 position: relative;
1120 cursor: pointer; 1155 cursor: pointer;
1121 } 1156 }
1122 1157
1123 div:first-child::after { 1158 div:first-child::after {
1124 content: ''; 1159 content: '';
1125 position: absolute; 1160 position: absolute;
...@@ -1131,10 +1166,10 @@ function checkedChange(v) { ...@@ -1131,10 +1166,10 @@ function checkedChange(v) {
1131 bottom: 0; 1166 bottom: 0;
1132 margin: auto; 1167 margin: auto;
1133 } 1168 }
1134 1169
1135 .active { 1170 .active {
1136 color: var(--el-color-primary); 1171 color: var(--el-color-primary);
1137 1172
1138 &::before { 1173 &::before {
1139 width: 33px; 1174 width: 33px;
1140 content: ''; 1175 content: '';
...@@ -1153,23 +1188,23 @@ function checkedChange(v) { ...@@ -1153,23 +1188,23 @@ function checkedChange(v) {
1153 .noPicChooseForm { 1188 .noPicChooseForm {
1154 overflow: auto; 1189 overflow: auto;
1155 //height: 70vh; 1190 //height: 70vh;
1156 1191
1157 .el-checkbox-group { 1192 .el-checkbox-group {
1158 display: flex; 1193 display: flex;
1159 flex-wrap: wrap; 1194 flex-wrap: wrap;
1160 text-align: justify; 1195 text-align: justify;
1161 1196
1162 .el-button { 1197 .el-button {
1163 width: 31%; 1198 width: 31%;
1164 margin: 1%; 1199 margin: 1%;
1165 } 1200 }
1166 1201
1167 .el-checkbox { 1202 .el-checkbox {
1168 margin: 1%; 1203 margin: 1%;
1169 width: 31%; 1204 width: 31%;
1170 overflow: hidden; 1205 overflow: hidden;
1171 } 1206 }
1172 1207
1173 .name { 1208 .name {
1174 justify-content: left; 1209 justify-content: left;
1175 } 1210 }
...@@ -1180,7 +1215,7 @@ function checkedChange(v) { ...@@ -1180,7 +1215,7 @@ function checkedChange(v) {
1180 display: flex; 1215 display: flex;
1181 align-items: center; 1216 align-items: center;
1182 justify-content: center; 1217 justify-content: center;
1183 1218
1184 img { 1219 img {
1185 height: 20px; 1220 height: 20px;
1186 margin-left: 4px; 1221 margin-left: 4px;
...@@ -1190,7 +1225,7 @@ function checkedChange(v) { ...@@ -1190,7 +1225,7 @@ function checkedChange(v) {
1190 .flexOption { 1225 .flexOption {
1191 display: flex; 1226 display: flex;
1192 align-items: center; 1227 align-items: center;
1193 1228
1194 img { 1229 img {
1195 height: 18px; 1230 height: 18px;
1196 } 1231 }
...@@ -1220,7 +1255,7 @@ function checkedChange(v) { ...@@ -1220,7 +1255,7 @@ function checkedChange(v) {
1220 1255
1221 1256
1222 @media (max-width: 767px) { 1257 @media (max-width: 767px) {
1223 1258
1224 .father { 1259 .father {
1225 position: relative; 1260 position: relative;
1226 height: 110px; 1261 height: 110px;
...@@ -1233,7 +1268,7 @@ function checkedChange(v) { ...@@ -1233,7 +1268,7 @@ function checkedChange(v) {
1233 top: 0; 1268 top: 0;
1234 text-align: left; 1269 text-align: left;
1235 font-size: 14px; 1270 font-size: 14px;
1236 1271
1237 span { 1272 span {
1238 color: #453DEA; 1273 color: #453DEA;
1239 position: relative; 1274 position: relative;
...@@ -1250,13 +1285,13 @@ function checkedChange(v) { ...@@ -1250,13 +1285,13 @@ function checkedChange(v) {
1250 height: 85px; 1285 height: 85px;
1251 line-height: 85px; 1286 line-height: 85px;
1252 } 1287 }
1253 1288
1254 .checkbox { 1289 .checkbox {
1255 position: absolute; 1290 position: absolute;
1256 right: 0%; 1291 right: 0%;
1257 text-align: left; 1292 text-align: left;
1258 font-size: 12px; 1293 font-size: 12px;
1259 1294
1260 span { 1295 span {
1261 color: #453DEA; 1296 color: #453DEA;
1262 position: relative; 1297 position: relative;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!