国内赛修改
Showing
11 changed files
with
1423 additions
and
236 deletions
| ... | @@ -39,11 +39,12 @@ export function getMySignDetailById(params) { | ... | @@ -39,11 +39,12 @@ export function getMySignDetailById(params) { |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | // 获取赛事下的已报团队 | 41 | // 获取赛事下的已报团队 |
| 42 | export function getGroupListByCptId(cptId) { | 42 | export function getGroupListByCptId(cptId,query) { |
| 43 | return request({ | 43 | return request({ |
| 44 | // url: `/league/group/getGroupListByCptId/${cptId}`, | 44 | // url: `/league/group/getGroupListByCptId/${cptId}`, |
| 45 | url: `/league/sign/getSignInfoDataByCptId/${cptId}`, | 45 | url: `/league/sign/getSignInfoDataByCptId/${cptId}`, |
| 46 | method: 'get' | 46 | method: 'get', |
| 47 | params: query | ||
| 47 | }) | 48 | }) |
| 48 | } | 49 | } |
| 49 | 50 | ||
| ... | @@ -363,6 +364,13 @@ export function savePersonForMyPerson(data) { | ... | @@ -363,6 +364,13 @@ export function savePersonForMyPerson(data) { |
| 363 | data: data | 364 | data: data |
| 364 | }) | 365 | }) |
| 365 | } | 366 | } |
| 367 | export function savePersonForMyPerson2(data) { | ||
| 368 | return request({ | ||
| 369 | url: `/systemj/personInfo/savePersonForMyPerson2`, | ||
| 370 | method: 'post', | ||
| 371 | data: data | ||
| 372 | }) | ||
| 373 | } | ||
| 366 | 374 | ||
| 367 | // 人员修改 | 375 | // 人员修改 |
| 368 | export function editPersonInfo(params) { | 376 | export function editPersonInfo(params) { |
| ... | @@ -380,6 +388,13 @@ export function delPerson(id) { | ... | @@ -380,6 +388,13 @@ export function delPerson(id) { |
| 380 | method: 'delete' | 388 | method: 'delete' |
| 381 | }) | 389 | }) |
| 382 | } | 390 | } |
| 391 | //个人账号 | ||
| 392 | export function delPersonForPersonal(id) { | ||
| 393 | return request({ | ||
| 394 | url: `/systemj/personInfo/singleDelete/${id}`, | ||
| 395 | method: 'delete' | ||
| 396 | }) | ||
| 397 | } | ||
| 383 | 398 | ||
| 384 | export function singleSignSavePerson(data) { | 399 | export function singleSignSavePerson(data) { |
| 385 | return request({ | 400 | return request({ |
| ... | @@ -657,6 +672,13 @@ export function checkIdcCode(query) { | ... | @@ -657,6 +672,13 @@ export function checkIdcCode(query) { |
| 657 | params:query | 672 | params:query |
| 658 | }) | 673 | }) |
| 659 | } | 674 | } |
| 675 | export function getProjectByCptId(cptId,query) { | ||
| 676 | return request({ | ||
| 677 | url: `/league/competitionProject/getTableByLanguageSourceAndCptId/${cptId}`, | ||
| 678 | method: 'get', | ||
| 679 | params: query | ||
| 680 | }) | ||
| 681 | } | ||
| 660 | export function addInvitation(data) { | 682 | export function addInvitation(data) { |
| 661 | return request({ | 683 | return request({ |
| 662 | url: `/league/person`, | 684 | url: `/league/person`, | ... | ... |
| ... | @@ -95,7 +95,7 @@ | ... | @@ -95,7 +95,7 @@ |
| 95 | </div> | 95 | </div> |
| 96 | <div @click="goHelp"> | 96 | <div @click="goHelp"> |
| 97 | <img class="kf" src="@/assets/logo/btn02.png"/> | 97 | <img class="kf" src="@/assets/logo/btn02.png"/> |
| 98 | <div class="text-center gradient-text">GUIDELINE</div> | 98 | <div class="text-center gradient-text uppercase">Video Guide</div> |
| 99 | </div> | 99 | </div> |
| 100 | </div> | 100 | </div> |
| 101 | </div> | 101 | </div> | ... | ... |
| ... | @@ -17,59 +17,64 @@ | ... | @@ -17,59 +17,64 @@ |
| 17 | <h3 class="panel-title" v-else>My Information</h3> | 17 | <h3 class="panel-title" v-else>My Information</h3> |
| 18 | </div> | 18 | </div> |
| 19 | <div class="panel-body"> | 19 | <div class="panel-body"> |
| 20 | <div v-if="form.danceMate"> | ||
| 21 | <div class="text-danger fontsize14 mb10" v-if="language==0">*如果您报名双人舞项目,请勾选您的舞伴</div> | ||
| 22 | <div class="text-danger fontsize14 mb10" v-else> | ||
| 23 | *Please select your dance partner if you are registering for a couple event | ||
| 24 | </div> | ||
| 25 | </div> | ||
| 26 | <div class="chooseForm" style="display: flex;flex-wrap: wrap;"> | 20 | <div class="chooseForm" style="display: flex;flex-wrap: wrap;"> |
| 27 | <div @click="editPerson" class="mb20" style="width: 50%;text-align: center;"> | 21 | <!-- <div @click="editPerson" class="mb20" style="width: 50%;text-align: center;">--> |
| 28 | <el-avatar fit="cover" v-if="form.picUrl" :size="60" :src="fillImgUrl(form.picUrl)"/> | 22 | <!-- <el-avatar fit="cover" v-if="form.picUrl" :size="60" :src="fillImgUrl(form.picUrl)"/>--> |
| 29 | <div v-else> | 23 | <!-- <div v-else>--> |
| 30 | <el-avatar fit="cover" v-if="form.sex == 0" :size="60" src="/img/head1.png"/> | 24 | <!-- <el-avatar fit="cover" v-if="form.sex == 0" :size="60" src="/img/head1.png"/>--> |
| 31 | <el-avatar fit="cover" v-if="form.sex == 1" :size="60" src="/img/head0.png"/> | 25 | <!-- <el-avatar fit="cover" v-if="form.sex == 1" :size="60" src="/img/head0.png"/>--> |
| 32 | </div> | 26 | <!-- </div>--> |
| 33 | <div class="text-center mt10"> | 27 | <!-- <div class="text-center mt10">--> |
| 34 | <span class="mName">{{ form.realName }}</span> | 28 | <!-- <span class="mName">{{ form.realName }}</span>--> |
| 35 | <el-icon size="20"> | 29 | <!-- <el-icon size="20">--> |
| 36 | <Edit/> | 30 | <!-- <Edit/>--> |
| 37 | </el-icon> | 31 | <!-- </el-icon>--> |
| 38 | </div> | 32 | <!-- </div>--> |
| 39 | </div> | 33 | <!-- </div>--> |
| 40 | <!--舞伴--> | 34 | <!-- <!–舞伴–>--> |
| 41 | <div style="width:50%;text-align: center;" v-if="form.danceMate"> | 35 | <!-- <div style="width:50%;text-align: center;" v-if="form.danceMate">--> |
| 42 | <el-checkbox-group v-model="mateChosed" @change="changeMate"> | 36 | <!-- <el-checkbox-group v-model="mateChosed" @change="changeMate">--> |
| 43 | <el-checkbox :label="form.danceMate.id"> | 37 | <!-- <el-checkbox :label="form.danceMate.id">--> |
| 38 | <!-- <div>--> | ||
| 39 | <!-- <el-avatar fit="cover" v-if="form.danceMate.picUrl" :size="60" :src="fillImgUrl(form.danceMate.picUrl)"/>--> | ||
| 40 | <!-- <el-avatar fit="cover" v-else-if="form.danceMate.sex == 0" :size="60"--> | ||
| 41 | <!-- src="/img/head1.png"/>--> | ||
| 42 | <!-- <el-avatar fit="cover" v-else-if="form.danceMate.sex == 1" :size="60"--> | ||
| 43 | <!-- src="/img/head0.png"/>--> | ||
| 44 | <!-- <div class="text-center mt10" @click="editMate(form.danceMate)">--> | ||
| 45 | <!-- <span class="mName">{{ form.danceMate.realName }}</span>--> | ||
| 46 | <!-- <el-icon @click.stop="editMate(form.danceMate)" size="20">--> | ||
| 47 | <!-- <Edit/>--> | ||
| 48 | <!-- </el-icon>--> | ||
| 49 | <!--<!– <el-icon @click.stop="delMate(form.danceMate)">–>--> | ||
| 50 | <!--<!– <Delete/>–>--> | ||
| 51 | <!--<!– </el-icon>–>--> | ||
| 52 | <!-- </div>--> | ||
| 53 | <!-- </div>--> | ||
| 54 | <!-- </el-checkbox>--> | ||
| 55 | <!-- </el-checkbox-group>--> | ||
| 56 | <!-- </div>--> | ||
| 57 | <div style="width:50%;text-align: center;" v-for="s in choosedList"> | ||
| 44 | <div> | 58 | <div> |
| 45 | <el-avatar fit="cover" v-if="form.danceMate.picUrl" :size="60" :src="fillImgUrl(form.danceMate.picUrl)"/> | 59 | <el-avatar fit="cover" v-if="s.picUrl" :size="60" :src="fillImgUrl(form.danceMate.picUrl)"/> |
| 46 | <el-avatar fit="cover" v-else-if="form.danceMate.sex == 0" :size="60" | 60 | <el-avatar fit="cover" v-else-if="s.sex == 0" :size="60" |
| 47 | src="/img/head1.png"/> | 61 | src="/img/head1.png"/> |
| 48 | <el-avatar fit="cover" v-else-if="form.danceMate.sex == 1" :size="60" | 62 | <el-avatar fit="cover" v-else-if="s.sex == 1" :size="60" |
| 49 | src="/img/head0.png"/> | 63 | src="/img/head0.png"/> |
| 50 | <div class="text-center mt10" @click="editMate(form.danceMate)"> | 64 | <div class="text-center mt10" @click="editMate(s)"> |
| 51 | <span class="mName">{{ form.danceMate.realName }}</span> | 65 | <span class="mName">{{ s.realName }}</span> |
| 52 | <el-icon @click.stop="editMate(form.danceMate)" size="20"> | 66 | <el-icon @click.stop="editMate(s)" size="20"> |
| 53 | <Edit/> | 67 | <Edit/> |
| 54 | </el-icon> | 68 | </el-icon> |
| 55 | <!-- <el-icon @click.stop="delMate(form.danceMate)">--> | ||
| 56 | <!-- <Delete/>--> | ||
| 57 | <!-- </el-icon>--> | ||
| 58 | </div> | 69 | </div> |
| 59 | </div> | 70 | </div> |
| 60 | </el-checkbox> | ||
| 61 | </el-checkbox-group> | ||
| 62 | </div> | 71 | </div> |
| 63 | <!-- <div style="min-width:50%;" v-else @click="addMate" hidden>--> | 72 | |
| 64 | <!-- <div class="addBttn" style="margin: 0 auto">+</div>--> | ||
| 65 | <!-- <div class="text-center mt10 text-primary text-sm">--> | ||
| 66 | <!-- Please add your partner--> | ||
| 67 | <!-- <el-icon>--> | ||
| 68 | <!-- <Edit/>--> | ||
| 69 | <!-- </el-icon>--> | ||
| 70 | <!-- </div>--> | ||
| 71 | <!-- </div>--> | ||
| 72 | </div> | 73 | </div> |
| 74 | <div class="text-center mt20"> | ||
| 75 | <el-button type="primary" plain @click="switchPerson">{{language==0?'切换':'Switch'}}</el-button> | ||
| 76 | </div> | ||
| 77 | |||
| 73 | </div> | 78 | </div> |
| 74 | </div> | 79 | </div> |
| 75 | </el-col> | 80 | </el-col> |
| ... | @@ -84,9 +89,10 @@ | ... | @@ -84,9 +89,10 @@ |
| 84 | clearable/> | 89 | clearable/> |
| 85 | </div> | 90 | </div> |
| 86 | </div> | 91 | </div> |
| 92 | <div class="pl-15 text-danger fontsize14" v-if="cantBao.flag">*{{language==0?`请上传 ${ cantBao.name } 的有效证件`:`Please upload the Valid Passport of ${cantBao.name}`}}</div> | ||
| 87 | <div v-loading="loadingProject" style="height: 55vh;overflow: auto;"> | 93 | <div v-loading="loadingProject" style="height: 55vh;overflow: auto;"> |
| 88 | <el-checkbox-group v-model="projectIds"> | 94 | <el-checkbox-group v-model="projectIds"> |
| 89 | <el-checkbox class="flexBetweenBox" v-for="c in projectList" :label="c.id" :key="c.id"> | 95 | <el-checkbox class="flexBetweenBox" v-for="c in projectList" :label="c.id" :key="c.id" :disabled="cantBao.flag"> |
| 90 | <div class="flexBetween w100"> | 96 | <div class="flexBetween w100"> |
| 91 | <div class="l"> | 97 | <div class="l"> |
| 92 | {{ c.code }}:{{ c.name }} | 98 | {{ c.code }}:{{ c.name }} |
| ... | @@ -187,6 +193,7 @@ | ... | @@ -187,6 +193,7 @@ |
| 187 | </el-card> | 193 | </el-card> |
| 188 | </div> | 194 | </div> |
| 189 | 195 | ||
| 196 | <DialogAllSportsmanListPerson ref="dialogAllSportsmanListPersonalRef" @transfer="getChoosed"/> | ||
| 190 | <dialogEditWdsf ref="dialogEditWdsfRef" @submitForm="changeMeDone"/> | 197 | <dialogEditWdsf ref="dialogEditWdsfRef" @submitForm="changeMeDone"/> |
| 191 | <dialogEditAccompany ref="dialogEditAccompanyRef" @submitForm="getMyMemberTable"/> | 198 | <dialogEditAccompany ref="dialogEditAccompanyRef" @submitForm="getMyMemberTable"/> |
| 192 | <addCoachEn ref="dialogAddCoachEnRef" @submitForm="getMyMemberTable"/> | 199 | <addCoachEn ref="dialogAddCoachEnRef" @submitForm="getMyMemberTable"/> |
| ... | @@ -201,7 +208,7 @@ import {getCurrentInstance, onMounted} from '@vue/runtime-core' | ... | @@ -201,7 +208,7 @@ import {getCurrentInstance, onMounted} from '@vue/runtime-core' |
| 201 | import DialogEditWdsf from './components/addWdsf' | 208 | import DialogEditWdsf from './components/addWdsf' |
| 202 | import DialogEditAccompany from './components/addAccompany' | 209 | import DialogEditAccompany from './components/addAccompany' |
| 203 | import AddCoachEn from './components/addCoach_en' | 210 | import AddCoachEn from './components/addCoach_en' |
| 204 | import DialogAllSportsmanList from './components/allSportsmanList' | 211 | import DialogAllSportsmanListPerson from './components/allSportsmanListForPersonal' |
| 205 | import DialogExtraForm from './components/extraForm' | 212 | import DialogExtraForm from './components/extraForm' |
| 206 | import {Search, Switch} from "@element-plus/icons-vue"; | 213 | import {Search, Switch} from "@element-plus/icons-vue"; |
| 207 | 214 | ||
| ... | @@ -248,35 +255,31 @@ const data = reactive({ | ... | @@ -248,35 +255,31 @@ const data = reactive({ |
| 248 | projectIds: [], | 255 | projectIds: [], |
| 249 | projectList: [], | 256 | projectList: [], |
| 250 | choosed2List: [], projectQuery: {}, tableType: 1, | 257 | choosed2List: [], projectQuery: {}, tableType: 1, |
| 258 | isNational:true, | ||
| 259 | cantBao: { | ||
| 260 | flag: false, | ||
| 261 | name:'' | ||
| 262 | } | ||
| 251 | }) | 263 | }) |
| 252 | const { | 264 | const { |
| 253 | activeTeam, | ||
| 254 | names, | 265 | names, |
| 255 | tableData, | 266 | tableData, |
| 256 | myMemberTable, | 267 | myMemberTable, |
| 257 | signInfoList, | 268 | signInfoList, |
| 258 | zuTableList, | 269 | zuTableList, |
| 259 | choosedList, | 270 | choosedList,isNational, |
| 260 | showExtraForm, | ||
| 261 | extraPersonInfoMapList, | ||
| 262 | teamList, | ||
| 263 | extraform, | 271 | extraform, |
| 264 | groupId, | 272 | groupId, |
| 265 | signType, | 273 | signType, |
| 266 | coachOrLeaderFlag, | 274 | coachOrLeaderFlag, |
| 267 | showResult, | ||
| 268 | noPhotoCanSign, | 275 | noPhotoCanSign, |
| 269 | extraTableHead, | ||
| 270 | coachForm, | ||
| 271 | projectIds, | 276 | projectIds, |
| 272 | choosedchoosed, | ||
| 273 | mateChosed, | 277 | mateChosed, |
| 274 | activeStep, | 278 | activeStep, |
| 275 | projectList, | 279 | projectList, |
| 276 | choosed2List, | ||
| 277 | loadingProject, | 280 | loadingProject, |
| 278 | projectQuery, | 281 | projectQuery, |
| 279 | tableType | 282 | tableType,cantBao |
| 280 | } = toRefs(data) | 283 | } = toRefs(data) |
| 281 | const matchId = ref(route.query.matchId) | 284 | const matchId = ref(route.query.matchId) |
| 282 | let signInfoType = null | 285 | let signInfoType = null |
| ... | @@ -289,7 +292,7 @@ onMounted(() => { | ... | @@ -289,7 +292,7 @@ onMounted(() => { |
| 289 | if (useUserStore().user) { | 292 | if (useUserStore().user) { |
| 290 | userId.value = useUserStore().user.userId | 293 | userId.value = useUserStore().user.userId |
| 291 | } | 294 | } |
| 292 | signType.value = route.query.signType | 295 | signType.value = route.query.signType || null |
| 293 | getSignInfoList() | 296 | getSignInfoList() |
| 294 | getMatch(matchId.value) | 297 | getMatch(matchId.value) |
| 295 | getMyInfo() | 298 | getMyInfo() |
| ... | @@ -300,6 +303,17 @@ onMounted(() => { | ... | @@ -300,6 +303,17 @@ onMounted(() => { |
| 300 | function getMyInfo() { | 303 | function getMyInfo() { |
| 301 | match.getMyPersonInfo().then(res => { | 304 | match.getMyPersonInfo().then(res => { |
| 302 | form.value = res.data | 305 | form.value = res.data |
| 306 | if(form.value.danceMate){ | ||
| 307 | choosedList.value = [form.value,form.value.danceMate] | ||
| 308 | if(!form.value.danceMate.passportUrl){ | ||
| 309 | cantBao.value.flag = true | ||
| 310 | cantBao.value.name = form.value.danceMate.realName | ||
| 311 | } else { | ||
| 312 | cantBao.value.flag = false | ||
| 313 | } | ||
| 314 | } else { | ||
| 315 | choosedList.value = [form.value] | ||
| 316 | } | ||
| 303 | myId.value = res.data.id | 317 | myId.value = res.data.id |
| 304 | getProjectList() | 318 | getProjectList() |
| 305 | }).catch(err => { | 319 | }).catch(err => { |
| ... | @@ -308,7 +322,6 @@ function getMyInfo() { | ... | @@ -308,7 +322,6 @@ function getMyInfo() { |
| 308 | } | 322 | } |
| 309 | 323 | ||
| 310 | function getMyMemberTable() { | 324 | function getMyMemberTable() { |
| 311 | // | ||
| 312 | match.getPerPersonList({cptId: matchId.value, searchLabels: '1,2,3,4,5,6'}, userId.value).then(res => { | 325 | match.getPerPersonList({cptId: matchId.value, searchLabels: '1,2,3,4,5,6'}, userId.value).then(res => { |
| 313 | myMemberTable.value = res.rows | 326 | myMemberTable.value = res.rows |
| 314 | if(res.rows.length > 0){ | 327 | if(res.rows.length > 0){ |
| ... | @@ -455,45 +468,27 @@ function commit() { | ... | @@ -455,45 +468,27 @@ function commit() { |
| 455 | matchId: matchId.value | 468 | matchId: matchId.value |
| 456 | } | 469 | } |
| 457 | }) | 470 | }) |
| 458 | // ElMessageBox.confirm(language.value == 0 ? '确定提交吗?' : 'Are you sure to submit?', | ||
| 459 | // language.value == 0 ? '提示' : 'Tip', | ||
| 460 | // { | ||
| 461 | // confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 462 | // cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 463 | // }).then(()=>{ | ||
| 464 | // match.commitSign({ | ||
| 465 | // groupId: 0, | ||
| 466 | // cptId: matchId.value | ||
| 467 | // }).then(res => { | ||
| 468 | // router.push({ | ||
| 469 | // name: `commitDone`, | ||
| 470 | // params: { | ||
| 471 | // orderId: res.data | ||
| 472 | // } | ||
| 473 | // }) | ||
| 474 | // })} | ||
| 475 | // ) | ||
| 476 | |||
| 477 | } | 471 | } |
| 478 | 472 | function getChoosed(list) { | |
| 473 | console.log(list) | ||
| 474 | choosedList.value = list | ||
| 475 | getProjectList() | ||
| 476 | } | ||
| 479 | function getProjectList() { | 477 | function getProjectList() { |
| 478 | let arr = [] | ||
| 479 | for(var l of choosedList.value){ | ||
| 480 | arr.push(l.id) | ||
| 481 | } | ||
| 480 | projectIds.value = [] | 482 | projectIds.value = [] |
| 481 | loadingProject.value = true | 483 | loadingProject.value = true |
| 482 | //根据已选人员id 获取项目列表 | 484 | //根据已选人员id 获取项目列表 |
| 483 | var obj = {} | 485 | var obj = {} |
| 484 | if (mateChosed.value.length > 0 && form.value.danceMate) { | ||
| 485 | obj = { | 486 | obj = { |
| 486 | cptId: matchId.value, | 487 | cptId: matchId.value, |
| 487 | perIds: `${myId.value},${form.value.danceMate?.id}`, | 488 | perIds: arr.toString(), |
| 488 | name: projectQuery.value.name | 489 | name: projectQuery.value.name |
| 489 | } | 490 | } |
| 490 | } else { | 491 | |
| 491 | obj = { | ||
| 492 | cptId: matchId.value, | ||
| 493 | perIds: myId.value, | ||
| 494 | name: projectQuery.value.name | ||
| 495 | } | ||
| 496 | } | ||
| 497 | match.getProjectPageByPerIds(obj).then(res => { | 492 | match.getProjectPageByPerIds(obj).then(res => { |
| 498 | projectList.value = res.rows | 493 | projectList.value = res.rows |
| 499 | loadingProject.value = false | 494 | loadingProject.value = false |
| ... | @@ -569,14 +564,14 @@ function signUp() { | ... | @@ -569,14 +564,14 @@ function signUp() { |
| 569 | } | 564 | } |
| 570 | return | 565 | return |
| 571 | } | 566 | } |
| 567 | let arr = [] | ||
| 568 | for(var l of choosedList.value){ | ||
| 569 | arr.push(l.id) | ||
| 570 | } | ||
| 572 | let obj = { | 571 | let obj = { |
| 573 | projectIds: projectIds.value.toString(), | 572 | projectIds: projectIds.value.toString(), |
| 574 | groupId: 0 | 573 | groupId: 0, |
| 575 | } | 574 | athleteIds: arr.toString() |
| 576 | if (mateChosed.value.length > 0 && form.value.danceMate) { | ||
| 577 | obj.athleteIds= `${myId.value},${form.value.danceMate?.id}` | ||
| 578 | } else { | ||
| 579 | obj.athleteIds= myId.value | ||
| 580 | } | 575 | } |
| 581 | match.sportsmanDone(obj).then(res => { | 576 | match.sportsmanDone(obj).then(res => { |
| 582 | getSignInfoList() | 577 | getSignInfoList() |
| ... | @@ -600,21 +595,18 @@ function removeThis(id) { | ... | @@ -600,21 +595,18 @@ function removeThis(id) { |
| 600 | }) | 595 | }) |
| 601 | } | 596 | } |
| 602 | 597 | ||
| 603 | function changeCoach(cptId, groupId) { | 598 | function switchPerson(){ |
| 604 | // 更换教练 | ||
| 605 | const params = { | 599 | const params = { |
| 606 | title: '修改教练', | 600 | title: language.value == 0 ? '选择运动员' : 'Participating athletes', |
| 607 | groupId: groupId, | 601 | matchId: matchId.value, |
| 608 | cptId: cptId | 602 | signType: signType.value, |
| 603 | noPhotoCanSign: noPhotoCanSign.value, | ||
| 604 | coachOrLeaderFlag: coachOrLeaderFlag.value, | ||
| 605 | choosedList: choosedList.value, | ||
| 606 | isNational: isNational.value, | ||
| 607 | mateId:form.value.danceMate?.id || 0, | ||
| 609 | } | 608 | } |
| 610 | proxy.$refs['popChangeCoach'].open(params) | 609 | proxy.$refs['dialogAllSportsmanListPersonalRef'].open(params) |
| 611 | } | ||
| 612 | |||
| 613 | |||
| 614 | function goMySign() { | ||
| 615 | router.push({ | ||
| 616 | name: 'myMatch' | ||
| 617 | }) | ||
| 618 | } | 610 | } |
| 619 | 611 | ||
| 620 | const goPersonInfo = (row) => { | 612 | const goPersonInfo = (row) => { |
| ... | @@ -630,8 +622,6 @@ const goPersonInfo = (row) => { | ... | @@ -630,8 +622,6 @@ const goPersonInfo = (row) => { |
| 630 | return | 622 | return |
| 631 | } | 623 | } |
| 632 | // 完善补充信息 | 624 | // 完善补充信息 |
| 633 | console.log(row) | ||
| 634 | // debugger | ||
| 635 | const params = { | 625 | const params = { |
| 636 | matchId: matchId.value, | 626 | matchId: matchId.value, |
| 637 | title: language.value==0?'完善补充信息':'Complete the supplementary information', | 627 | title: language.value==0?'完善补充信息':'Complete the supplementary information', |
| ... | @@ -644,13 +634,6 @@ const goPersonInfo = (row) => { | ... | @@ -644,13 +634,6 @@ const goPersonInfo = (row) => { |
| 644 | proxy.$refs['popExtraForm'].open(_.cloneDeep(params)) | 634 | proxy.$refs['popExtraForm'].open(_.cloneDeep(params)) |
| 645 | } | 635 | } |
| 646 | 636 | ||
| 647 | function downloadVoucher() { | ||
| 648 | // 下载凭证 | ||
| 649 | proxy.download( | ||
| 650 | `/pdf/getPayedOrderPdf/${matchId.value}/${groupId.value || 0}`, {}, '报项凭证.pdf' | ||
| 651 | ) | ||
| 652 | } | ||
| 653 | |||
| 654 | function editPerson() { | 637 | function editPerson() { |
| 655 | proxy.$refs['dialogEditWdsfRef'].open({ | 638 | proxy.$refs['dialogEditWdsfRef'].open({ |
| 656 | title: language.value == 0 ? '编辑个人信息' : 'Edit My Information', | 639 | title: language.value == 0 ? '编辑个人信息' : 'Edit My Information', |
| ... | @@ -658,14 +641,6 @@ function editPerson() { | ... | @@ -658,14 +641,6 @@ function editPerson() { |
| 658 | }) | 641 | }) |
| 659 | } | 642 | } |
| 660 | 643 | ||
| 661 | function addMate() { | ||
| 662 | proxy.$refs['dialogEditWdsfRef'].open({ | ||
| 663 | title: language.value == 0 ? '添加舞伴' : 'Add My Mate', | ||
| 664 | isMe: false, | ||
| 665 | cptId:matchId.value, | ||
| 666 | id: 0 | ||
| 667 | }) | ||
| 668 | } | ||
| 669 | function editMate(obj) { | 644 | function editMate(obj) { |
| 670 | proxy.$refs['dialogEditWdsfRef'].open({ | 645 | proxy.$refs['dialogEditWdsfRef'].open({ |
| 671 | title: language.value == 0 ? '编辑舞伴' : 'Edit My Mate', | 646 | title: language.value == 0 ? '编辑舞伴' : 'Edit My Mate', |
| ... | @@ -676,18 +651,6 @@ function editMate(obj) { | ... | @@ -676,18 +651,6 @@ function editMate(obj) { |
| 676 | }) | 651 | }) |
| 677 | } | 652 | } |
| 678 | 653 | ||
| 679 | function delMate(mate) { | ||
| 680 | delperson(mate) | ||
| 681 | // ElMessageBox.confirm(language.value == 0 ? '确定删除队友吗?' : 'Are you sure to delete the teammate?', | ||
| 682 | // language.value == 0 ? '提示' : 'Tip', | ||
| 683 | // { | ||
| 684 | // confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 685 | // cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 686 | // }).then(()=>{ | ||
| 687 | // | ||
| 688 | // }) | ||
| 689 | } | ||
| 690 | |||
| 691 | function changeMate(e) { | 654 | function changeMate(e) { |
| 692 | console.log(e, mateChosed.value,form.value.danceMate.passportUrl) | 655 | console.log(e, mateChosed.value,form.value.danceMate.passportUrl) |
| 693 | if(form.value.danceMate.passportUrl==''||!form.value.danceMate.passportUrl){ | 656 | if(form.value.danceMate.passportUrl==''||!form.value.danceMate.passportUrl){ | ... | ... |
src/viewsPc/match/chooseProject_bak.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <!-- 个人报名-国外--> | ||
| 4 | <div class="box ph-30"> | ||
| 5 | <el-card class="mb20"> | ||
| 6 | <single-sign-step :activeStep="1" :language="language"/> | ||
| 7 | </el-card> | ||
| 8 | |||
| 9 | <el-card :body-style="{'padding': '0'}"> | ||
| 10 | <match-info-row :match-id="matchId"/> | ||
| 11 | <div class="pd20"> | ||
| 12 | <el-row :gutter="20"> | ||
| 13 | <el-col :lg="6"> | ||
| 14 | <div class="panel border"> | ||
| 15 | <div class="panel-header "> | ||
| 16 | <h3 class="panel-title" v-if="language==0">完善我的信息</h3> | ||
| 17 | <h3 class="panel-title" v-else>My Information</h3> | ||
| 18 | </div> | ||
| 19 | <div class="panel-body"> | ||
| 20 | <div v-if="form.danceMate"> | ||
| 21 | <div class="text-danger fontsize14 mb10" v-if="language==0">*如果您报名双人舞项目,请勾选您的舞伴</div> | ||
| 22 | <div class="text-danger fontsize14 mb10" v-else> | ||
| 23 | *Please select your dance partner if you are registering for a couple event | ||
| 24 | </div> | ||
| 25 | </div> | ||
| 26 | <div class="chooseForm" style="display: flex;flex-wrap: wrap;"> | ||
| 27 | <div @click="editPerson" class="mb20" style="width: 50%;text-align: center;"> | ||
| 28 | <el-avatar fit="cover" v-if="form.picUrl" :size="60" :src="fillImgUrl(form.picUrl)"/> | ||
| 29 | <div v-else> | ||
| 30 | <el-avatar fit="cover" v-if="form.sex == 0" :size="60" src="/img/head1.png"/> | ||
| 31 | <el-avatar fit="cover" v-if="form.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 32 | </div> | ||
| 33 | <div class="text-center mt10"> | ||
| 34 | <span class="mName">{{ form.realName }}</span> | ||
| 35 | <el-icon size="20"> | ||
| 36 | <Edit/> | ||
| 37 | </el-icon> | ||
| 38 | </div> | ||
| 39 | </div> | ||
| 40 | <!--舞伴--> | ||
| 41 | <div style="width:50%;text-align: center;" v-if="form.danceMate"> | ||
| 42 | <el-checkbox-group v-model="mateChosed" @change="changeMate"> | ||
| 43 | <el-checkbox :label="form.danceMate.id"> | ||
| 44 | <div> | ||
| 45 | <el-avatar fit="cover" v-if="form.danceMate.picUrl" :size="60" :src="fillImgUrl(form.danceMate.picUrl)"/> | ||
| 46 | <el-avatar fit="cover" v-else-if="form.danceMate.sex == 0" :size="60" | ||
| 47 | src="/img/head1.png"/> | ||
| 48 | <el-avatar fit="cover" v-else-if="form.danceMate.sex == 1" :size="60" | ||
| 49 | src="/img/head0.png"/> | ||
| 50 | <div class="text-center mt10" @click="editMate(form.danceMate)"> | ||
| 51 | <span class="mName">{{ form.danceMate.realName }}</span> | ||
| 52 | <el-icon @click.stop="editMate(form.danceMate)" size="20"> | ||
| 53 | <Edit/> | ||
| 54 | </el-icon> | ||
| 55 | <!-- <el-icon @click.stop="delMate(form.danceMate)">--> | ||
| 56 | <!-- <Delete/>--> | ||
| 57 | <!-- </el-icon>--> | ||
| 58 | </div> | ||
| 59 | </div> | ||
| 60 | </el-checkbox> | ||
| 61 | </el-checkbox-group> | ||
| 62 | </div> | ||
| 63 | <!-- <div style="min-width:50%;" v-else @click="addMate" hidden>--> | ||
| 64 | <!-- <div class="addBttn" style="margin: 0 auto">+</div>--> | ||
| 65 | <!-- <div class="text-center mt10 text-primary text-sm">--> | ||
| 66 | <!-- Please add your partner--> | ||
| 67 | <!-- <el-icon>--> | ||
| 68 | <!-- <Edit/>--> | ||
| 69 | <!-- </el-icon>--> | ||
| 70 | <!-- </div>--> | ||
| 71 | <!-- </div>--> | ||
| 72 | </div> | ||
| 73 | </div> | ||
| 74 | </div> | ||
| 75 | </el-col> | ||
| 76 | |||
| 77 | <el-col :lg="18"> | ||
| 78 | <div class="panel border"> | ||
| 79 | <div class="panel-header "> | ||
| 80 | <h3 class="panel-title" v-if="language==0">可参与报名的项目</h3> | ||
| 81 | <h3 class="panel-title" v-else>Search Events</h3> | ||
| 82 | <div class="fr"> | ||
| 83 | <el-input size="small" v-model="projectQuery.name" :prefix-icon="Search" @change="getProjectList" | ||
| 84 | clearable/> | ||
| 85 | </div> | ||
| 86 | </div> | ||
| 87 | <div v-loading="loadingProject" style="height: 55vh;overflow: auto;"> | ||
| 88 | <el-checkbox-group v-model="projectIds"> | ||
| 89 | <el-checkbox class="flexBetweenBox" v-for="c in projectList" :label="c.id" :key="c.id"> | ||
| 90 | <div class="flexBetween w100"> | ||
| 91 | <div class="l"> | ||
| 92 | {{ c.code }}:{{ c.name }} | ||
| 93 | <div>{{ c.danceTypeDetailStr }}</div> | ||
| 94 | </div> | ||
| 95 | <div class="text-primary">{{ language == 0 ? '¥' : '€' }}{{ c.serviceFee }}</div> | ||
| 96 | </div> | ||
| 97 | </el-checkbox> | ||
| 98 | </el-checkbox-group> | ||
| 99 | <el-empty v-if="projectList.length==0" :image="`/img/order_no.png`" :image-size="228" | ||
| 100 | :description="language==0?'无可选项目':''"/> | ||
| 101 | </div> | ||
| 102 | </div> | ||
| 103 | </el-col> | ||
| 104 | </el-row> | ||
| 105 | </div> | ||
| 106 | <el-row class="mt20"> | ||
| 107 | <el-col :span="24"> | ||
| 108 | <div class="text-center"> | ||
| 109 | <el-button type="primary" class="btn-lineG w200px" round @click="signUp"> | ||
| 110 | {{ language == 0 ? '确定' : 'Confirm' }} | ||
| 111 | </el-button> | ||
| 112 | </div> | ||
| 113 | </el-col> | ||
| 114 | </el-row> | ||
| 115 | |||
| 116 | <div class="m20"> | ||
| 117 | <!-- <el-button type="success" @click="importSportman">批量导入人员</el-button>--> | ||
| 118 | <!-- <el-button type="success" @click="addCoach">新增运动员</el-button>--> | ||
| 119 | <div class="ttbb"> | ||
| 120 | <div :class="tableType==1 ? 'active' : ''" @click="switchTabletype"> | ||
| 121 | {{ language == 0 ? '按组别查看报项' : 'Check Registrations by Group' }} | ||
| 122 | </div> | ||
| 123 | <div :class="tableType==0 ? 'active' : ''" @click="switchTabletype"> | ||
| 124 | {{ language == 0 ? '按人员查看报项' : 'Check Registrations by Participant' }} | ||
| 125 | </div> | ||
| 126 | </div> | ||
| 127 | <sign-info-table v-if="tableType==0" :match-id="matchId" | ||
| 128 | :extraform="extraform" :language="language" :list="signInfoList" | ||
| 129 | @editExtra="goPersonInfo"/> | ||
| 130 | <zu-table v-else :list="zuTableList" :language="language" @delete="removeThis"/> | ||
| 131 | |||
| 132 | <div v-if="showPersonList||myMemberTable.length>0"> | ||
| 133 | <el-row class="mt20"> | ||
| 134 | <el-col :span="24"> | ||
| 135 | <el-button @click="addAccompany" type="primary" plain> | ||
| 136 | {{ language == 0 ? '添加随行人员' : 'Add accompanying personnel' }} | ||
| 137 | </el-button> | ||
| 138 | </el-col> | ||
| 139 | </el-row> | ||
| 140 | <el-table class="mt20" :data="myMemberTable" border> | ||
| 141 | <el-table-column type="index" :label="language==0?'序号':'Index'" width="70" align="center"/> | ||
| 142 | <el-table-column :label="language==0?'姓氏':'Surname'" prop="xing" min-width="100"/> | ||
| 143 | <el-table-column :label="language==0?'名':'Name'" prop="ming" min-width="100"/> | ||
| 144 | <el-table-column :label="language==0?'国家/地区':'Nationality'" prop="countryName" min-width="100"/> | ||
| 145 | <!-- <el-table-column :label="language==0?'证件号':'Valid Documents'" prop="idcCode" min-width="120"/>--> | ||
| 146 | <!-- <el-table-column label="Birthday" prop="birth"/>--> | ||
| 147 | <el-table-column :label="language==0?'性别':'Gender'" prop="sexStr"/> | ||
| 148 | <el-table-column :label="language==0?'会员角色':'Role'" min-width="160"> | ||
| 149 | <template #default="scope"> | ||
| 150 | <div class="roletd"> | ||
| 151 | <span v-for="item in scope.row.label?.split(',')" :key="item.id" class="text-primary"> | ||
| 152 | <span v-if="item==='0'" class="ml5">{{ language == 0 ? '运动员' : 'Athletes' }}</span> | ||
| 153 | <span v-if="item==='1'" class="ml5">{{ language == 0 ? '教练' : 'Coach' }}</span> | ||
| 154 | <span v-if="item==='2'" class="ml5">{{ language == 0 ? '领队' : 'Head Of Team' }}</span> | ||
| 155 | <span v-if="item==='4'" class="ml5">{{ language == 0 ? '队医' : 'Team doctor' }}</span> | ||
| 156 | <span v-if="item==='5'" class="ml5">{{ language == 0 ? '翻译' : 'Interpreter' }}</span> | ||
| 157 | <span v-if="item==='6'" class="ml5">{{ language == 0 ? '官员' : 'Official' }}</span> | ||
| 158 | <span v-if="item==='3'" class="ml5">{{ language == 0 ? '其他' : 'Other' }}</span> | ||
| 159 | </span> | ||
| 160 | </div> | ||
| 161 | </template> | ||
| 162 | </el-table-column> | ||
| 163 | <el-table-column label="Actions"> | ||
| 164 | <template #default="scope"> | ||
| 165 | <a class="text-primary pd10" @click="delperson(scope.row)"> | ||
| 166 | {{ language == 0 ? '删除' : 'Delete' }} | ||
| 167 | </a> | ||
| 168 | </template> | ||
| 169 | </el-table-column> | ||
| 170 | </el-table> | ||
| 171 | </div> | ||
| 172 | |||
| 173 | <div class="text-center mt20"> | ||
| 174 | <el-button type="primary" class="btn-lineG w200px" round @click="submitForm()"> | ||
| 175 | {{ language == 0 ? '预览报名信息' : 'Preview Registration Information' }} | ||
| 176 | </el-button> | ||
| 177 | </div> | ||
| 178 | <!-- <div class="text-center mt20">--> | ||
| 179 | <!-- <el-button type="primary" class="" plain round @click="submitForm(0)">--> | ||
| 180 | <!-- {{ language == 0 ? '保存暂不提交审核' : 'Save, Do Not Submit for Review Yet' }}--> | ||
| 181 | <!-- </el-button>--> | ||
| 182 | <!-- <el-button type="primary" class="btn-lineG w200px" round @click="submitForm(1)">--> | ||
| 183 | <!-- {{ language == 0 ? '提交审核' : 'Submit for review' }}--> | ||
| 184 | <!-- </el-button>--> | ||
| 185 | <!-- </div>--> | ||
| 186 | </div> | ||
| 187 | </el-card> | ||
| 188 | </div> | ||
| 189 | |||
| 190 | <dialogEditWdsf ref="dialogEditWdsfRef" @submitForm="changeMeDone"/> | ||
| 191 | <dialogEditAccompany ref="dialogEditAccompanyRef" @submitForm="getMyMemberTable"/> | ||
| 192 | <addCoachEn ref="dialogAddCoachEnRef" @submitForm="getMyMemberTable"/> | ||
| 193 | <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList"/> | ||
| 194 | </div> | ||
| 195 | </template> | ||
| 196 | |||
| 197 | <script setup> | ||
| 198 | import {ref, reactive, toRefs} from 'vue' | ||
| 199 | import * as match from '@/apiPc/match' | ||
| 200 | import {getCurrentInstance, onMounted} from '@vue/runtime-core' | ||
| 201 | import DialogEditWdsf from './components/addWdsf' | ||
| 202 | import DialogEditAccompany from './components/addAccompany' | ||
| 203 | import AddCoachEn from './components/addCoach_en' | ||
| 204 | import DialogAllSportsmanList from './components/allSportsmanList' | ||
| 205 | import DialogExtraForm from './components/extraForm' | ||
| 206 | import {Search, Switch} from "@element-plus/icons-vue"; | ||
| 207 | |||
| 208 | const {proxy} = getCurrentInstance() | ||
| 209 | const router = useRouter() | ||
| 210 | const route = useRoute() | ||
| 211 | import _ from 'lodash' | ||
| 212 | import {ElMessage, ElMessageBox} from 'element-plus' | ||
| 213 | import cache from "@/plugins/cache" | ||
| 214 | import TeamSignStep from "@/viewsPc/match/components/teamSignStep" | ||
| 215 | import CoachInfoRow from "@/viewsPc/match/components/coachInfo-row" | ||
| 216 | import SignInfoTable from "@/viewsPc/match/components/signInfo-table" | ||
| 217 | import ZuTable from '@/viewsPc/match/components/zu-table' | ||
| 218 | import SingleSignStep from "@/viewsPc/match/components/singleSignStep"; | ||
| 219 | import MatchInfoRow from "@/viewsPc/match/components/matchInfo-row"; | ||
| 220 | import useUserStore from "@/store/modules/user"; | ||
| 221 | import {getPerPersonList} from "@/apiPc/match"; | ||
| 222 | import {useStorage} from "@vueuse/core/index"; | ||
| 223 | |||
| 224 | const language= useStorage('language',0) | ||
| 225 | |||
| 226 | const data = reactive({ | ||
| 227 | coachForm: {}, activeStep: 2, | ||
| 228 | tableData: [], | ||
| 229 | signInfoList: [], | ||
| 230 | zuTableList: [], | ||
| 231 | choosedList: [], | ||
| 232 | myMemberTable: [], | ||
| 233 | extraPersonInfoMapList: [], | ||
| 234 | teamList: [], | ||
| 235 | extraform: [], | ||
| 236 | groupId: 0, | ||
| 237 | signType: '', | ||
| 238 | coachOrLeaderFlag: null, | ||
| 239 | noPhotoCanSign: null, | ||
| 240 | showResult: false, | ||
| 241 | showExtraForm: false, | ||
| 242 | loadingProject: false, | ||
| 243 | extraTableHead: [], | ||
| 244 | activeTeam: '', | ||
| 245 | names: {}, | ||
| 246 | choosedchoosed: [], | ||
| 247 | mateChosed: [], | ||
| 248 | projectIds: [], | ||
| 249 | projectList: [], | ||
| 250 | choosed2List: [], projectQuery: {}, tableType: 1, | ||
| 251 | }) | ||
| 252 | const { | ||
| 253 | activeTeam, | ||
| 254 | names, | ||
| 255 | tableData, | ||
| 256 | myMemberTable, | ||
| 257 | signInfoList, | ||
| 258 | zuTableList, | ||
| 259 | choosedList, | ||
| 260 | showExtraForm, | ||
| 261 | extraPersonInfoMapList, | ||
| 262 | teamList, | ||
| 263 | extraform, | ||
| 264 | groupId, | ||
| 265 | signType, | ||
| 266 | coachOrLeaderFlag, | ||
| 267 | showResult, | ||
| 268 | noPhotoCanSign, | ||
| 269 | extraTableHead, | ||
| 270 | coachForm, | ||
| 271 | projectIds, | ||
| 272 | choosedchoosed, | ||
| 273 | mateChosed, | ||
| 274 | activeStep, | ||
| 275 | projectList, | ||
| 276 | choosed2List, | ||
| 277 | loadingProject, | ||
| 278 | projectQuery, | ||
| 279 | tableType | ||
| 280 | } = toRefs(data) | ||
| 281 | const matchId = ref(route.query.matchId) | ||
| 282 | let signInfoType = null | ||
| 283 | const form = ref({}) | ||
| 284 | const showPersonList = ref(false) | ||
| 285 | const signEndTime = ref('') | ||
| 286 | const userId = ref('') | ||
| 287 | const myId = ref('') | ||
| 288 | onMounted(() => { | ||
| 289 | if (useUserStore().user) { | ||
| 290 | userId.value = useUserStore().user.userId | ||
| 291 | } | ||
| 292 | signType.value = route.query.signType | ||
| 293 | getSignInfoList() | ||
| 294 | getMatch(matchId.value) | ||
| 295 | getMyInfo() | ||
| 296 | getMyMemberTable() | ||
| 297 | getMySignInfo() | ||
| 298 | }) | ||
| 299 | |||
| 300 | function getMyInfo() { | ||
| 301 | match.getMyPersonInfo().then(res => { | ||
| 302 | form.value = res.data | ||
| 303 | myId.value = res.data.id | ||
| 304 | getProjectList() | ||
| 305 | }).catch(err => { | ||
| 306 | router.push({name: 'home'}) | ||
| 307 | }) | ||
| 308 | } | ||
| 309 | |||
| 310 | function getMyMemberTable() { | ||
| 311 | // | ||
| 312 | match.getPerPersonList({cptId: matchId.value, searchLabels: '1,2,3,4,5,6'}, userId.value).then(res => { | ||
| 313 | myMemberTable.value = res.rows | ||
| 314 | if(res.rows.length > 0){ | ||
| 315 | showPersonList.value = true | ||
| 316 | } | ||
| 317 | }) | ||
| 318 | } | ||
| 319 | |||
| 320 | function addAccompany() { | ||
| 321 | proxy.$refs['dialogAddCoachEnRef'].open({ | ||
| 322 | title: language.value == 0 ? '添加随行人员' : 'Add accompanying personnel', | ||
| 323 | cptId: matchId.value, | ||
| 324 | id: 0 | ||
| 325 | }) | ||
| 326 | } | ||
| 327 | |||
| 328 | function changeMeDone(mateId) { | ||
| 329 | console.log(mateId) | ||
| 330 | getMyInfo() | ||
| 331 | getProjectList() | ||
| 332 | } | ||
| 333 | |||
| 334 | let chargeFlag | ||
| 335 | |||
| 336 | function getMatch(id) { | ||
| 337 | match.getMatchById({ | ||
| 338 | id: id | ||
| 339 | }).then(res => { | ||
| 340 | signEndTime.value = res.data.signEndTime | ||
| 341 | chargeFlag = res.data.chargeFlag | ||
| 342 | noPhotoCanSign.value = res.data.noPhotoCanSign | ||
| 343 | coachOrLeaderFlag.value = res.data.coachOrLeaderFlag | ||
| 344 | extraform.value = JSON.parse(res.data.participantsInfo) | ||
| 345 | }) | ||
| 346 | } | ||
| 347 | |||
| 348 | function getMySignInfo() { | ||
| 349 | // 获取已报 | ||
| 350 | match.getMySignInfo({ | ||
| 351 | cptId: matchId.value, | ||
| 352 | groupId: 0 | ||
| 353 | }).then(res => { | ||
| 354 | tableData.value = res.data.signInfo | ||
| 355 | signInfoType = res.data.type | ||
| 356 | }) | ||
| 357 | } | ||
| 358 | |||
| 359 | function getSignInfoList() { | ||
| 360 | match.getMySignInfoList({ | ||
| 361 | cptId: matchId.value, | ||
| 362 | groupId: 0 | ||
| 363 | }).then(res => { | ||
| 364 | signInfoList.value = res.data.singleData || [] | ||
| 365 | zuTableList.value = res.data.zuData || [] | ||
| 366 | }) | ||
| 367 | } | ||
| 368 | |||
| 369 | |||
| 370 | function submitForm(n) { | ||
| 371 | if (signInfoList.value.length == 0) { | ||
| 372 | if (language.value == 0) { | ||
| 373 | ElMessage.warning('请至少选择一个项目') | ||
| 374 | } else { | ||
| 375 | ElMessage.warning('select at least one project') | ||
| 376 | } | ||
| 377 | return | ||
| 378 | } | ||
| 379 | |||
| 380 | if (signInfoType == '1') { | ||
| 381 | ElMessageBox.confirm(language.value==0?'已报项,前往我的报项':'Reported items, go to my submission', | ||
| 382 | language.value==0?'提示':'Tips', { | ||
| 383 | confirmButtonText: language.value==0?'确定':'OK', | ||
| 384 | cancelButtonText: language.value==0?'取消':'Cancel', | ||
| 385 | type: 'warning' | ||
| 386 | }).then(() => { | ||
| 387 | router.push({name: 'myMatch'}) | ||
| 388 | }) | ||
| 389 | return | ||
| 390 | } | ||
| 391 | if (extraform.value && extraform.value.length > 0) { | ||
| 392 | let needBuchong = false | ||
| 393 | for (const e of extraform.value) { | ||
| 394 | if (e.status == '0') { | ||
| 395 | needBuchong = true | ||
| 396 | } | ||
| 397 | } | ||
| 398 | for (const s of signInfoList.value) { | ||
| 399 | if (s.extraPersonInfo == null && needBuchong) { | ||
| 400 | ElMessage.warning(language.value == 0 ? '请完善运动员补充信息' : 'Complete Supplementary Information') | ||
| 401 | tableType.value = 0 | ||
| 402 | return | ||
| 403 | } | ||
| 404 | } | ||
| 405 | } | ||
| 406 | if (showPersonList.value) { | ||
| 407 | if (myMemberTable.value.length == 0) { | ||
| 408 | ElMessageBox.confirm(language.value == 0 ? '是否继续添加随行人员?' : 'Do you want to add casual personnel?', | ||
| 409 | language.value == 0 ? '提示' : 'Tip', { | ||
| 410 | confirmButtonText: language.value == 0 ? '是' : 'Yes', | ||
| 411 | cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next', | ||
| 412 | type: 'warning' | ||
| 413 | }).then(() => { | ||
| 414 | |||
| 415 | }).catch(() => { | ||
| 416 | commit() | ||
| 417 | }) | ||
| 418 | } else { | ||
| 419 | commit() | ||
| 420 | } | ||
| 421 | } else { | ||
| 422 | ElMessageBox.confirm(language.value == 0 ? '是否添加随行人员?' : 'Do you want to add casual personnel?', | ||
| 423 | language.value == 0 ? '提示' : 'Tip', { | ||
| 424 | confirmButtonText: language.value == 0 ? '是' : 'Yes', | ||
| 425 | cancelButtonText: language.value == 0 ? '否,进入下一步' : 'NO,Go Next', | ||
| 426 | type: 'warning' | ||
| 427 | }).then(() => { | ||
| 428 | showPersonList.value = true | ||
| 429 | }).catch(() => { | ||
| 430 | commit() | ||
| 431 | }) | ||
| 432 | } | ||
| 433 | // if (n == 0) { | ||
| 434 | // ElMessageBox.confirm(language.value==0?`您当前的操作为暂存,并不是提交审核, | ||
| 435 | // 必须在报名截止时间${signEndTime.value}之前完成提交。 | ||
| 436 | // 您也可以在个人中心-我的报名中,找到这条报名,点击提交审核。`: | ||
| 437 | // `Your current operation is temporary and not submitted for review, | ||
| 438 | // Submission must be completed before the registration deadline${signEndTime.value}。 | ||
| 439 | // You can also find this registration in the My Registration section of your personal center and click submit for review.`, | ||
| 440 | // language.value == 0 ? '提示' : 'Tip', { | ||
| 441 | // confirmButtonText: language.value == 0 ? '去个人中心' : 'Go My Registration ', | ||
| 442 | // cancelButtonText: language.value == 0 ? '知道了' : 'OK', | ||
| 443 | // type: 'warning' | ||
| 444 | // }).then((res) => { | ||
| 445 | // console.log(res) | ||
| 446 | // router.push({name: 'myMatch'}) | ||
| 447 | // }) | ||
| 448 | // } | ||
| 449 | } | ||
| 450 | |||
| 451 | function commit() { | ||
| 452 | router.push({ | ||
| 453 | name: 'signPreview', | ||
| 454 | query: { | ||
| 455 | matchId: matchId.value | ||
| 456 | } | ||
| 457 | }) | ||
| 458 | // ElMessageBox.confirm(language.value == 0 ? '确定提交吗?' : 'Are you sure to submit?', | ||
| 459 | // language.value == 0 ? '提示' : 'Tip', | ||
| 460 | // { | ||
| 461 | // confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 462 | // cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 463 | // }).then(()=>{ | ||
| 464 | // match.commitSign({ | ||
| 465 | // groupId: 0, | ||
| 466 | // cptId: matchId.value | ||
| 467 | // }).then(res => { | ||
| 468 | // router.push({ | ||
| 469 | // name: `commitDone`, | ||
| 470 | // params: { | ||
| 471 | // orderId: res.data | ||
| 472 | // } | ||
| 473 | // }) | ||
| 474 | // })} | ||
| 475 | // ) | ||
| 476 | |||
| 477 | } | ||
| 478 | |||
| 479 | function getProjectList() { | ||
| 480 | projectIds.value = [] | ||
| 481 | loadingProject.value = true | ||
| 482 | //根据已选人员id 获取项目列表 | ||
| 483 | var obj = {} | ||
| 484 | if (mateChosed.value.length > 0 && form.value.danceMate) { | ||
| 485 | obj = { | ||
| 486 | cptId: matchId.value, | ||
| 487 | perIds: `${myId.value},${form.value.danceMate?.id}`, | ||
| 488 | name: projectQuery.value.name | ||
| 489 | } | ||
| 490 | } else { | ||
| 491 | obj = { | ||
| 492 | cptId: matchId.value, | ||
| 493 | perIds: myId.value, | ||
| 494 | name: projectQuery.value.name | ||
| 495 | } | ||
| 496 | } | ||
| 497 | match.getProjectPageByPerIds(obj).then(res => { | ||
| 498 | projectList.value = res.rows | ||
| 499 | loadingProject.value = false | ||
| 500 | }).catch(err => { | ||
| 501 | loadingProject.value = false | ||
| 502 | ElMessage.warning(err.msg) | ||
| 503 | }) | ||
| 504 | } | ||
| 505 | |||
| 506 | function addCoach() { | ||
| 507 | if (signInfoType == '2') { | ||
| 508 | match.recoverMySign({ | ||
| 509 | cptId: matchId.value, | ||
| 510 | groupId: groupId.value | ||
| 511 | }).then(res => { | ||
| 512 | if (res.msg.indexOf('Exception:') > -1) { | ||
| 513 | const msg = res.msg.slice(10) | ||
| 514 | ElMessageBox.confirm(msg, '提示', { | ||
| 515 | confirmButtonText: '确定', | ||
| 516 | cancelButtonText: '取消', | ||
| 517 | type: 'warning' | ||
| 518 | }).then(() => { | ||
| 519 | console.log('用户点击确定') | ||
| 520 | }) | ||
| 521 | return | ||
| 522 | } | ||
| 523 | getMySignInfo() | ||
| 524 | }) | ||
| 525 | } | ||
| 526 | const params = { | ||
| 527 | title: '新增运动员', | ||
| 528 | id: 0, | ||
| 529 | groupId: groupId.value | ||
| 530 | } | ||
| 531 | proxy.$refs['dialogEditWdsfRef'].open(params) | ||
| 532 | } | ||
| 533 | |||
| 534 | function delperson(p) { | ||
| 535 | //删除团队下的人 | ||
| 536 | let text = '' | ||
| 537 | let t = '提示' | ||
| 538 | let s = '确定' | ||
| 539 | let c = '取消' | ||
| 540 | let msg = '操作成功' | ||
| 541 | if (language.value == 0) { | ||
| 542 | text = `确定删除${p.realName}吗?` | ||
| 543 | } else { | ||
| 544 | text = `Delete ${p.realName}?` | ||
| 545 | t = 'Tips' | ||
| 546 | s = 'Confirm' | ||
| 547 | c = 'Cancel' | ||
| 548 | msg = ' Successful!' | ||
| 549 | } | ||
| 550 | ElMessageBox.confirm(text, t, { | ||
| 551 | confirmButtonText: s, | ||
| 552 | cancelButtonText: c, | ||
| 553 | type: 'warning' | ||
| 554 | }).then(() => { | ||
| 555 | match.delPerson(p.id).then(res => { | ||
| 556 | ElMessage.success(msg) | ||
| 557 | getMyMemberTable() | ||
| 558 | getMyInfo() | ||
| 559 | }) | ||
| 560 | }) | ||
| 561 | } | ||
| 562 | |||
| 563 | function signUp() { | ||
| 564 | if (projectIds.value.length == 0) { | ||
| 565 | if (language.value == 0) { | ||
| 566 | ElMessage.warning('请选择项目') | ||
| 567 | } else { | ||
| 568 | ElMessage.warning('Please select project') | ||
| 569 | } | ||
| 570 | return | ||
| 571 | } | ||
| 572 | let obj = { | ||
| 573 | projectIds: projectIds.value.toString(), | ||
| 574 | groupId: 0 | ||
| 575 | } | ||
| 576 | if (mateChosed.value.length > 0 && form.value.danceMate) { | ||
| 577 | obj.athleteIds= `${myId.value},${form.value.danceMate?.id}` | ||
| 578 | } else { | ||
| 579 | obj.athleteIds= myId.value | ||
| 580 | } | ||
| 581 | match.sportsmanDone(obj).then(res => { | ||
| 582 | getSignInfoList() | ||
| 583 | getProjectList() | ||
| 584 | }) | ||
| 585 | } | ||
| 586 | |||
| 587 | function removeThis(id) { | ||
| 588 | ElMessageBox.confirm(language.value == 0 ? '确定移除这条报项吗?' : 'Are you sure to remove this report item', | ||
| 589 | language.value == 0 ? '提示' : 'Tips', { | ||
| 590 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | ||
| 591 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 592 | type: 'warning' | ||
| 593 | }).then(() => { | ||
| 594 | match.deleteSign(id).then(res => { | ||
| 595 | // 重新获取已报名信息 | ||
| 596 | ElMessage.success(language.value == 0 ? '已移除该报项' : 'success') | ||
| 597 | getSignInfoList() | ||
| 598 | getProjectList() | ||
| 599 | }) | ||
| 600 | }) | ||
| 601 | } | ||
| 602 | |||
| 603 | function changeCoach(cptId, groupId) { | ||
| 604 | // 更换教练 | ||
| 605 | const params = { | ||
| 606 | title: '修改教练', | ||
| 607 | groupId: groupId, | ||
| 608 | cptId: cptId | ||
| 609 | } | ||
| 610 | proxy.$refs['popChangeCoach'].open(params) | ||
| 611 | } | ||
| 612 | |||
| 613 | |||
| 614 | function goMySign() { | ||
| 615 | router.push({ | ||
| 616 | name: 'myMatch' | ||
| 617 | }) | ||
| 618 | } | ||
| 619 | |||
| 620 | const goPersonInfo = (row) => { | ||
| 621 | if (signInfoType == '1') { | ||
| 622 | ElMessageBox.alert( | ||
| 623 | language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission', | ||
| 624 | language.value == 0 ? '提示' : 'Tips', { | ||
| 625 | confirmButtonText: 'OK', | ||
| 626 | callback: (Action) => { | ||
| 627 | router.push({name: 'myMatch'}) | ||
| 628 | } | ||
| 629 | }) | ||
| 630 | return | ||
| 631 | } | ||
| 632 | // 完善补充信息 | ||
| 633 | console.log(row) | ||
| 634 | // debugger | ||
| 635 | const params = { | ||
| 636 | matchId: matchId.value, | ||
| 637 | title: language.value==0?'完善补充信息':'Complete the supplementary information', | ||
| 638 | participantsInfoArr: extraform.value, | ||
| 639 | personId: row.personInfo.id, | ||
| 640 | extraId: row.extraPersonInfo?.id || 0, | ||
| 641 | isNational:true | ||
| 642 | |||
| 643 | } | ||
| 644 | proxy.$refs['popExtraForm'].open(_.cloneDeep(params)) | ||
| 645 | } | ||
| 646 | |||
| 647 | function downloadVoucher() { | ||
| 648 | // 下载凭证 | ||
| 649 | proxy.download( | ||
| 650 | `/pdf/getPayedOrderPdf/${matchId.value}/${groupId.value || 0}`, {}, '报项凭证.pdf' | ||
| 651 | ) | ||
| 652 | } | ||
| 653 | |||
| 654 | function editPerson() { | ||
| 655 | proxy.$refs['dialogEditWdsfRef'].open({ | ||
| 656 | title: language.value == 0 ? '编辑个人信息' : 'Edit My Information', | ||
| 657 | isMe: true | ||
| 658 | }) | ||
| 659 | } | ||
| 660 | |||
| 661 | function addMate() { | ||
| 662 | proxy.$refs['dialogEditWdsfRef'].open({ | ||
| 663 | title: language.value == 0 ? '添加舞伴' : 'Add My Mate', | ||
| 664 | isMe: false, | ||
| 665 | cptId:matchId.value, | ||
| 666 | id: 0 | ||
| 667 | }) | ||
| 668 | } | ||
| 669 | function editMate(obj) { | ||
| 670 | proxy.$refs['dialogEditWdsfRef'].open({ | ||
| 671 | title: language.value == 0 ? '编辑舞伴' : 'Edit My Mate', | ||
| 672 | isMe: false, | ||
| 673 | form: obj || {}, | ||
| 674 | cptId:matchId.value, | ||
| 675 | id: obj?.id || 0 | ||
| 676 | }) | ||
| 677 | } | ||
| 678 | |||
| 679 | function delMate(mate) { | ||
| 680 | delperson(mate) | ||
| 681 | // ElMessageBox.confirm(language.value == 0 ? '确定删除队友吗?' : 'Are you sure to delete the teammate?', | ||
| 682 | // language.value == 0 ? '提示' : 'Tip', | ||
| 683 | // { | ||
| 684 | // confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 685 | // cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 686 | // }).then(()=>{ | ||
| 687 | // | ||
| 688 | // }) | ||
| 689 | } | ||
| 690 | |||
| 691 | function changeMate(e) { | ||
| 692 | console.log(e, mateChosed.value,form.value.danceMate.passportUrl) | ||
| 693 | if(form.value.danceMate.passportUrl==''||!form.value.danceMate.passportUrl){ | ||
| 694 | mateChosed.value = [] | ||
| 695 | ElMessageBox.confirm(language.value == 0 ? '请先上传舞伴的有效证件' : 'Please upload the valid certificate of the teammate', | ||
| 696 | language.value == 0 ? '提示' : 'Tip', | ||
| 697 | { | ||
| 698 | confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 699 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 700 | }).then(()=>{ | ||
| 701 | editMate(form.value.danceMate) | ||
| 702 | return | ||
| 703 | }).catch(()=>{ | ||
| 704 | return | ||
| 705 | }) | ||
| 706 | } | ||
| 707 | getProjectList() | ||
| 708 | } | ||
| 709 | |||
| 710 | function switchTabletype() { | ||
| 711 | if (tableType.value == 0) { | ||
| 712 | tableType.value = 1 | ||
| 713 | } else { | ||
| 714 | tableType.value = 0 | ||
| 715 | } | ||
| 716 | } | ||
| 717 | </script> | ||
| 718 | |||
| 719 | <style scoped lang="scss"> | ||
| 720 | :deep(.el-checkbox__label) { | ||
| 721 | flex: 1 1 auto; | ||
| 722 | } | ||
| 723 | |||
| 724 | .flexBetweenBox { | ||
| 725 | width: 100%;margin-right: 0; | ||
| 726 | height: auto; | ||
| 727 | border-bottom: 1px solid #eee; | ||
| 728 | padding: 0 10px; | ||
| 729 | } | ||
| 730 | |||
| 731 | .flexBetweenBox:nth-child(odd) { | ||
| 732 | background: #FAFBFD; | ||
| 733 | } | ||
| 734 | |||
| 735 | .flexBetween { | ||
| 736 | padding: 10px; | ||
| 737 | border-left: 1px solid #eee; | ||
| 738 | |||
| 739 | .l { | ||
| 740 | div { | ||
| 741 | margin: 4px 0 0; | ||
| 742 | color: #999; | ||
| 743 | } | ||
| 744 | } | ||
| 745 | } | ||
| 746 | |||
| 747 | .app-container { | ||
| 748 | padding: 0; | ||
| 749 | background: #F5F7F9; | ||
| 750 | } | ||
| 751 | |||
| 752 | .panel-footer .el-button--success { | ||
| 753 | background: #254385; | ||
| 754 | border: none; | ||
| 755 | padding: 0 40px; | ||
| 756 | font-size: 16px; | ||
| 757 | } | ||
| 758 | |||
| 759 | .panel-footer .el-button--success.is-plain { | ||
| 760 | background: #fff; | ||
| 761 | border: 1px solid #2ED981; | ||
| 762 | color: #2ED981; | ||
| 763 | } | ||
| 764 | |||
| 765 | .hasChoose { | ||
| 766 | margin: 0 0 20px; | ||
| 767 | display: flex; | ||
| 768 | justify-content: space-between; | ||
| 769 | |||
| 770 | button { | ||
| 771 | position: relative; | ||
| 772 | margin: 10px; | ||
| 773 | } | ||
| 774 | |||
| 775 | .choseItem { | ||
| 776 | margin: 10px; | ||
| 777 | position: relative; | ||
| 778 | |||
| 779 | .poClose { | ||
| 780 | position: absolute; | ||
| 781 | right: -6px; | ||
| 782 | top: -12px; | ||
| 783 | z-index: 1; | ||
| 784 | } | ||
| 785 | } | ||
| 786 | } | ||
| 787 | |||
| 788 | .chooseForm { | ||
| 789 | :deep(.el-form-item__content) { | ||
| 790 | background: rgba(245, 247, 249, 0.38); | ||
| 791 | padding: 20px 40px 10px; | ||
| 792 | } | ||
| 793 | |||
| 794 | .el-checkbox { | ||
| 795 | height: auto; | ||
| 796 | margin-right: 20px; | ||
| 797 | } | ||
| 798 | |||
| 799 | :deep(.el-checkbox__input) { | ||
| 800 | position: absolute; | ||
| 801 | right: 0; | ||
| 802 | top: 0; | ||
| 803 | } | ||
| 804 | |||
| 805 | .name { | ||
| 806 | text-align: center; | ||
| 807 | } | ||
| 808 | } | ||
| 809 | |||
| 810 | :deep(.el-avatar) > img { | ||
| 811 | width: 100%; | ||
| 812 | } | ||
| 813 | |||
| 814 | .panel { | ||
| 815 | height: 100%; | ||
| 816 | } | ||
| 817 | |||
| 818 | .border-info { | ||
| 819 | .item { | ||
| 820 | margin: 5px 0; | ||
| 821 | color: #4C5359; | ||
| 822 | font-size: 14px; | ||
| 823 | |||
| 824 | label { | ||
| 825 | font-size: 14px; | ||
| 826 | margin-right: 14px | ||
| 827 | } | ||
| 828 | } | ||
| 829 | } | ||
| 830 | |||
| 831 | .ttbb { | ||
| 832 | font-size: 14px; | ||
| 833 | color: #4C5359; | ||
| 834 | display: flex; | ||
| 835 | justify-content: center; | ||
| 836 | |||
| 837 | div { | ||
| 838 | padding: 20px; | ||
| 839 | position: relative; | ||
| 840 | cursor: pointer; | ||
| 841 | } | ||
| 842 | |||
| 843 | div:first-child::after { | ||
| 844 | content: ''; | ||
| 845 | position: absolute; | ||
| 846 | right: 0; | ||
| 847 | background: #ccc; | ||
| 848 | width: 1px; | ||
| 849 | height: 14px; | ||
| 850 | top: 0; | ||
| 851 | bottom: 0; | ||
| 852 | margin: auto; | ||
| 853 | } | ||
| 854 | |||
| 855 | .active { | ||
| 856 | color: var(--el-color-primary); | ||
| 857 | |||
| 858 | &::before { | ||
| 859 | width: 33px; | ||
| 860 | content: ''; | ||
| 861 | position: absolute; | ||
| 862 | height: 2px; | ||
| 863 | bottom: 14px; | ||
| 864 | left: 0; | ||
| 865 | right: 0; | ||
| 866 | margin: auto; | ||
| 867 | background: #453DEA; | ||
| 868 | border-radius: 1px; | ||
| 869 | } | ||
| 870 | } | ||
| 871 | } | ||
| 872 | |||
| 873 | .roletd { | ||
| 874 | .ml5 { | ||
| 875 | display: inline-block | ||
| 876 | } | ||
| 877 | } | ||
| 878 | .mName{color: #000;font-size: 15px;display: inline-block;max-width: 6.5em;text-overflow: ellipsis; | ||
| 879 | overflow: hidden;} | ||
| 880 | </style> |
| ... | @@ -281,7 +281,7 @@ function submitForm() { | ... | @@ -281,7 +281,7 @@ function submitForm() { |
| 281 | } | 281 | } |
| 282 | } | 282 | } |
| 283 | function addPersonal() { | 283 | function addPersonal() { |
| 284 | match.savePersonForMyPerson(form.value).then(res => { | 284 | match.savePersonForMyPerson2(form.value).then(res => { |
| 285 | ElMessage.success('保存成功') | 285 | ElMessage.success('保存成功') |
| 286 | show.value = false | 286 | show.value = false |
| 287 | emit('submitForm', res.data) | 287 | emit('submitForm', res.data) | ... | ... |
| 1 | <template> | ||
| 2 | <el-dialog v-model="show" :title="title" width="1000px" append-to-body @close="close" center> | ||
| 3 | <div class="funcBtns"> | ||
| 4 | <el-button type="primary" @click="addMember"> | ||
| 5 | {{ language == 0 ? '添加选手' : 'Add Player' }} | ||
| 6 | </el-button> | ||
| 7 | </div> | ||
| 8 | <div class="from-Card"> | ||
| 9 | <el-form :inline="true" :model="query" class="mt20" label-width="60" size="small"> | ||
| 10 | <el-form-item :label="language==0?'姓名':'Name'"> | ||
| 11 | <el-input v-model="query.realName" style="width: 120px;" clearable/> | ||
| 12 | </el-form-item> | ||
| 13 | <el-form-item :label="language==0?'证件类型':'ID Type'" v-if="!isNational"> | ||
| 14 | <el-select v-model="query.idcType" style="width: 100px;" clearable @change="getList" @clear="getList"> | ||
| 15 | <el-option | ||
| 16 | v-for="item in certificates" | ||
| 17 | :key="item.value" | ||
| 18 | :label="item.label" | ||
| 19 | :value="item.value" | ||
| 20 | /> | ||
| 21 | </el-select> | ||
| 22 | </el-form-item> | ||
| 23 | <el-form-item :label="language==0?'证件号码':'ID NO.'" v-if="!isNational"> | ||
| 24 | <el-input v-model="query.idcode" style="width: 120px;" clearable/> | ||
| 25 | </el-form-item> | ||
| 26 | <!-- <el-form-item label="角色">--> | ||
| 27 | <!-- <el-input v-model="query.label" style="width: 120px;" clearable/>--> | ||
| 28 | <!-- </el-form-item>--> | ||
| 29 | <el-form-item> | ||
| 30 | <el-button type="primary" @click="getList">{{language==0?'查询':'Search'}}</el-button> | ||
| 31 | </el-form-item> | ||
| 32 | <el-form-item class="fr"> | ||
| 33 | <el-button @click="resetChose" type="primary" plain>{{language==0?'清空选择':'Clear Selection'}}</el-button> | ||
| 34 | </el-form-item> | ||
| 35 | </el-form> | ||
| 36 | </div> | ||
| 37 | <p v-if="noPhotoCanSign == 0" class="text-danger">{{ language==0?'*需上传照片才可报名':'*Please upload photo before sign up' }}</p> | ||
| 38 | <el-table ref="allSportmenTable" v-loading="loading" :data="tableData" height="60vh" | ||
| 39 | @selection-change="handleSelectionChange" :row-key="getRowKeys"> | ||
| 40 | <el-table-column type="selection" :label="language==0?'选择':'Selection'" :reserve-selection="true" :selectable="selectable"/> | ||
| 41 | <!-- <el-table-column align="center" type="index" :label="language==0?'序号':'Index'" width="60" :selectable="selectable"/>--> | ||
| 42 | <el-table-column v-if="isNational" :label="language==0?'WDSF MIN':'WDSF MIN'" prop="wdsfMin" width="100"/> | ||
| 43 | <el-table-column align="center" :label="language==0?'姓氏':'Surname'" prop="xing" min-width="100"/> | ||
| 44 | <el-table-column align="center" :label="language==0?'名':'Name'" prop="ming" min-width="100"/> | ||
| 45 | <el-table-column align="center" v-if="isNational" :label="language==0?'代表':'Representing'" prop="representing" min-width="120"/> | ||
| 46 | <el-table-column align="center" v-if="!isNational" :label="language==0?'所属国家/地区':'Nationality'" prop="countryName" min-width="110"/> | ||
| 47 | <el-table-column :label="language==0?'性别':'Gender'" align="center" prop="sexStr"/> | ||
| 48 | <el-table-column align="center" v-if="isNational" :label="language==0?'年龄组':'Age group'" prop="ageGroup" min-width="100"/> | ||
| 49 | <el-table-column align="center" v-if="isNational" :label="language==0?'舞种':'Division'" prop="division" min-width="100"/> | ||
| 50 | |||
| 51 | <el-table-column v-if="!isNational" :label="language==0?'年龄':'Age'" prop="age"/> | ||
| 52 | <el-table-column v-if="!isNational" :label="language==0?'出生日期':'Date of Birth'" prop="birth" width="130"/> | ||
| 53 | <el-table-column v-if="!isNational" :label="language==0?'证件类型':'ID Type'" prop="idcTypeStr" width="120"/> | ||
| 54 | <el-table-column v-if="!isNational" :label="language==0?'证件号码':'ID NO.'" prop="idcCode" width="200"/> | ||
| 55 | <!-- <el-table-column label="会员角色" width="200">--> | ||
| 56 | <!-- <template #default="scope">--> | ||
| 57 | <!-- <div>--> | ||
| 58 | <!-- <div style="white-space: nowrap" class="esp">--> | ||
| 59 | <!-- <span v-for="item in scope.row.label?.split(',')" :key="item.id">--> | ||
| 60 | <!-- <span v-if="item==='0'" class="ml5">{{ language==0?'运动员':'athletes' }}</span>--> | ||
| 61 | <!-- <span v-if="item==='1'" class="ml5">{{ language==0?'教练':'coach' }}</span>--> | ||
| 62 | <!-- <span v-if="item==='2'" class="ml5">{{ language==0?'领队':'team leader' }}</span>--> | ||
| 63 | <!-- <span v-if="item==='3'" class="ml5">{{ language==0?'队医':'team doctor' }}</span>--> | ||
| 64 | <!-- <span v-if="item==='4'" class="ml5">{{ language==0?'翻译':'translator' }}</span>--> | ||
| 65 | <!-- <span v-if="item==='5'" class="ml5">{{ language==0?'官员':'official' }}</span>--> | ||
| 66 | <!-- <span v-if="item==='6'" class="ml5">{{ language==0?'其他':'other' }}</span>--> | ||
| 67 | <!-- </span>--> | ||
| 68 | <!-- </div>--> | ||
| 69 | <!-- </div>--> | ||
| 70 | <!-- </template>--> | ||
| 71 | <!-- </el-table-column>--> | ||
| 72 | <el-table-column :label="language==0?'操作':'Actions'" :width="language==0?180:200" fixed="right" align="center"> | ||
| 73 | <template #default="scope"> | ||
| 74 | <span class="text-primary pointer" v-if="scope.row.passportUrl" @click="editPerson(scope.row)"> | ||
| 75 | {{language==0?'编辑':'Edit'}} | ||
| 76 | </span> | ||
| 77 | <span v-else class="text-danger pointer" @click="editPerson(scope.row)">{{language==0?'上传证件':'Upload Valid Passport'}}</span> | ||
| 78 | <span class="text-primary pd10 pointer" v-if="scope.row.userId=='0'&&mateId!=scope.row.id" @click="deletePerson(scope.row)"> | ||
| 79 | {{language==0?'删除':'Delete'}} | ||
| 80 | </span> | ||
| 81 | </template> | ||
| 82 | </el-table-column> | ||
| 83 | </el-table> | ||
| 84 | <paginationPc | ||
| 85 | v-show="total>0" | ||
| 86 | v-model:page="query.pageNum" | ||
| 87 | v-model:limit="query.pageSize" | ||
| 88 | :total="total" | ||
| 89 | @pagination="getList" | ||
| 90 | /> | ||
| 91 | <template #footer> | ||
| 92 | <div class="dialog-footer text-center"> | ||
| 93 | <el-button type="primary" @click="submit">{{language==0?'确定':'Confirm'}}</el-button> | ||
| 94 | <el-button @click="cancel">{{language==0?'取消':'Cancel'}}</el-button> | ||
| 95 | </div> | ||
| 96 | </template> | ||
| 97 | </el-dialog> | ||
| 98 | |||
| 99 | <!-- 国内赛运动员--> | ||
| 100 | <add-coach ref="dialogAddCoach" @submitForm="getList"/> | ||
| 101 | <!-- 国际赛运动员--> | ||
| 102 | <add-wdsf ref="dialogAddWdsf" @submitForm="getList"/> | ||
| 103 | <Import ref="dialogImportProps" @submitForm="getList"/> | ||
| 104 | </template> | ||
| 105 | |||
| 106 | <script setup> | ||
| 107 | import {reactive, ref, toRefs, watch} from 'vue' | ||
| 108 | import {getCurrentInstance, nextTick, onMounted} from '@vue/runtime-core' | ||
| 109 | import * as match from '@/apiPc/match' | ||
| 110 | import AddCoach from '../components/addCoach' | ||
| 111 | import AddWdsf from '../components/addWdsf' | ||
| 112 | import Import from '../components/import' | ||
| 113 | import {useStorage} from "@vueuse/core/index"; | ||
| 114 | import {delPersonForPersonal, getPerPersonList} from "@/apiPc/match"; | ||
| 115 | import useUserStore from "@/store/modules/user"; | ||
| 116 | import {ElMessage, ElMessageBox} from "element-plus"; | ||
| 117 | import _ from "lodash"; | ||
| 118 | const language= useStorage('language',0) | ||
| 119 | const user = useUserStore().user | ||
| 120 | const {proxy} = getCurrentInstance() | ||
| 121 | const emit = defineEmits([ 'transfer']) | ||
| 122 | const data = reactive({ | ||
| 123 | query: { | ||
| 124 | label:'0', | ||
| 125 | pageSize: 10, | ||
| 126 | pageNum:1 | ||
| 127 | }, | ||
| 128 | tableData: [], | ||
| 129 | show: false, | ||
| 130 | loading: false, | ||
| 131 | title: '选择运动员', | ||
| 132 | noPhotoCanSign: 0, | ||
| 133 | total: 0, | ||
| 134 | isNational:false, | ||
| 135 | mateId:0 | ||
| 136 | }) | ||
| 137 | const {query, tableData, show, title, loading, noPhotoCanSign,total,isNational,mateId} = toRefs(data) | ||
| 138 | const certificates = ref([ | ||
| 139 | { | ||
| 140 | value: '0', | ||
| 141 | label: language.value == 0 ? '居民身份证' : 'Resident ID card' | ||
| 142 | }, | ||
| 143 | { | ||
| 144 | value: '1', | ||
| 145 | label: language.value == 0 ? '护照' : 'Passport' | ||
| 146 | }, | ||
| 147 | { | ||
| 148 | value: '2', | ||
| 149 | label: language.value == 0 ? '其他' : 'Other' | ||
| 150 | } | ||
| 151 | ]) | ||
| 152 | let matchId | ||
| 153 | let choosedList = [] | ||
| 154 | let choosedIds = [] | ||
| 155 | const open = (params) => { | ||
| 156 | title.value = params.title | ||
| 157 | matchId = params.matchId | ||
| 158 | mateId.value = params.mateId | ||
| 159 | noPhotoCanSign.value = params.noPhotoCanSign | ||
| 160 | show.value = true | ||
| 161 | isNational.value = params.isNational | ||
| 162 | choosedList = params.choosedList | ||
| 163 | getList() | ||
| 164 | } | ||
| 165 | defineExpose({ | ||
| 166 | open | ||
| 167 | }) | ||
| 168 | const reSetChoosed = () => { | ||
| 169 | choosedIds = [] | ||
| 170 | for (const p of choosedList) { | ||
| 171 | choosedIds.push(p.id) | ||
| 172 | } | ||
| 173 | console.log(choosedIds,choosedList) | ||
| 174 | for (const n of tableData.value) { | ||
| 175 | if (choosedIds.indexOf(n.id) > -1) { | ||
| 176 | proxy.$refs['allSportmenTable'].toggleRowSelection(n, true) | ||
| 177 | } | ||
| 178 | } | ||
| 179 | } | ||
| 180 | const resetChose = () => { | ||
| 181 | proxy.$refs['allSportmenTable'].clearSelection() | ||
| 182 | } | ||
| 183 | const selectable = (row) => { | ||
| 184 | if (!row.picUrl && noPhotoCanSign.value == 0) { | ||
| 185 | return false | ||
| 186 | } else if (!row.passportUrl) { | ||
| 187 | // ElMessageBox.confirm(language.value == 0 ? `请上传${row.realName}的有效证件` : `Please Upload ${row.realName}'s Valid Passport`) | ||
| 188 | return false | ||
| 189 | } else { | ||
| 190 | return true | ||
| 191 | } | ||
| 192 | } | ||
| 193 | const getList = () => { | ||
| 194 | loading.value = true | ||
| 195 | getPerPersonList(query.value,user.userId).then(res => { | ||
| 196 | total.value = res.total | ||
| 197 | // const startIndex = (query.value.pageNum - 1) * query.value.pageSize; | ||
| 198 | // const endIndex = startIndex + query.value.pageSize; | ||
| 199 | // tableData.value = res.rows.slice(startIndex, endIndex) | ||
| 200 | tableData.value = res.rows | ||
| 201 | nextTick(() => { | ||
| 202 | reSetChoosed() | ||
| 203 | }) | ||
| 204 | loading.value = false | ||
| 205 | }) | ||
| 206 | } | ||
| 207 | |||
| 208 | function handleSelectionChange(val) { | ||
| 209 | // console.log('change',val) | ||
| 210 | choosedList = val | ||
| 211 | for (const p of val) { | ||
| 212 | choosedIds.push(p.id) | ||
| 213 | } | ||
| 214 | //判断是否队友 | ||
| 215 | if(val.length==2){ | ||
| 216 | if(val[0].sex!=val[1].sex){ | ||
| 217 | checkTwo(val[0].id,val[1].id) | ||
| 218 | } | ||
| 219 | } | ||
| 220 | if(val.length>0){ | ||
| 221 | const newVal = _.last(val) | ||
| 222 | match.signgetSignInfoConflict({ | ||
| 223 | cptId: matchId, | ||
| 224 | perId: newVal.id, | ||
| 225 | groupId: '0' | ||
| 226 | }).then(res => { | ||
| 227 | if (!res.data) { | ||
| 228 | ElMessage.warning(language.value == 0 ? '该人员已在其他团队中报名,请重新选择' : 'This person has already registered in another team, please select again') | ||
| 229 | proxy.$refs['allSportmenTable'].toggleRowSelection(newVal, false) | ||
| 230 | } | ||
| 231 | }) | ||
| 232 | } | ||
| 233 | } | ||
| 234 | function checkTwo(a,b) { | ||
| 235 | match.checkMate({per1Id:a,per2Id:b,cptId:matchId}).then(res=>{ | ||
| 236 | if(!res.data){ | ||
| 237 | ElMessage.warning(language.value == 0 ? '他们不是固定组合':'They\'re not a couple') | ||
| 238 | proxy.$refs['allSportmenTable'].clearSelection() | ||
| 239 | } | ||
| 240 | }) | ||
| 241 | } | ||
| 242 | function submit() { | ||
| 243 | if (choosedIds.length == 0) { | ||
| 244 | ElMessage.warning(language.value == 0 ? '请选择运动员' : 'Please select athletes') | ||
| 245 | return | ||
| 246 | } | ||
| 247 | emit('transfer', choosedList) | ||
| 248 | show.value = false | ||
| 249 | } | ||
| 250 | function getRowKeys(row) { | ||
| 251 | return row.id | ||
| 252 | } | ||
| 253 | function close() { | ||
| 254 | choosedIds = [] | ||
| 255 | } | ||
| 256 | function cancel() { | ||
| 257 | show.value = false | ||
| 258 | } | ||
| 259 | |||
| 260 | function editPerson(row) { | ||
| 261 | console.log(isNational.value) | ||
| 262 | const params = { | ||
| 263 | id: row.id, | ||
| 264 | title: language.value == 0 ?'编辑人员':'Edit Person', | ||
| 265 | groupId: '0', | ||
| 266 | label: '0' | ||
| 267 | } | ||
| 268 | if (isNational.value){ | ||
| 269 | proxy.$refs['dialogAddWdsf'].open(params) | ||
| 270 | } else { | ||
| 271 | proxy.$refs['dialogAddCoach'].open(params) | ||
| 272 | } | ||
| 273 | } | ||
| 274 | |||
| 275 | function addMember() { | ||
| 276 | console.log(isNational.value) | ||
| 277 | const params = { | ||
| 278 | title: language.value == 0 ?'添加人员':'Add', | ||
| 279 | id: 0, | ||
| 280 | groupId: '0', | ||
| 281 | label: '0' | ||
| 282 | } | ||
| 283 | if (isNational.value){ | ||
| 284 | proxy.$refs['dialogAddWdsf'].open(params) | ||
| 285 | } else { | ||
| 286 | proxy.$refs['dialogAddCoach'].open(params) | ||
| 287 | } | ||
| 288 | } | ||
| 289 | function deletePerson(p) { | ||
| 290 | let text = '' | ||
| 291 | let t = '提示' | ||
| 292 | let s = '确定' | ||
| 293 | let c = '取消' | ||
| 294 | let msg = '操作成功' | ||
| 295 | if (language.value==0){ | ||
| 296 | text = `确定删除${p.realName}和${p.sex=='1'?'他':'她'}的舞伴吗?` | ||
| 297 | } else { | ||
| 298 | text = `Delete ${p.realName} ${p.sex=='1'?'he':'she'} and ${p.sex=='1'?'his':'hers'} dance mate?` | ||
| 299 | t = 'Tips' | ||
| 300 | s = 'Confirm' | ||
| 301 | c = 'Cancel' | ||
| 302 | msg = ' Successful!' | ||
| 303 | } | ||
| 304 | ElMessageBox.confirm(text, t, { | ||
| 305 | confirmButtonText: s, | ||
| 306 | cancelButtonText: c, | ||
| 307 | type: 'warning' | ||
| 308 | }).then(() => { | ||
| 309 | match.delPersonForPersonal(p.id).then(res => { | ||
| 310 | ElMessage.success(msg) | ||
| 311 | getList() | ||
| 312 | }) | ||
| 313 | }) | ||
| 314 | } | ||
| 315 | |||
| 316 | </script> | ||
| 317 | <style scoped lang="scss"> | ||
| 318 | .el-form--inline .el-form-item { | ||
| 319 | width: auto; | ||
| 320 | } | ||
| 321 | </style> |
| 1 | <template> | 1 | <template> |
| 2 | <div class="collapsebox"> | 2 | <div class="collapsebox"> |
| 3 | <div class="pd20"> | 3 | <div class="pd20"> |
| 4 | <div class="fr mb20"> | ||
| 5 | <el-input size="small" v-model="query.projectName" :prefix-icon="Search" | ||
| 6 | @change="getList" clearable/> | ||
| 7 | </div> | ||
| 4 | <el-table :data="list" border> | 8 | <el-table :data="list" border> |
| 5 | <el-table-column :label="language==0?'组别编号':'Event Code'" prop="code" align="center"></el-table-column> | 9 | <el-table-column :label="language==0?'组别编号':'Event Code'" prop="code" align="center" :min-width="language==0?70:100"> |
| 10 | |||
| 11 | </el-table-column> | ||
| 6 | <el-table-column :label="language==0?'组别名称':'Event'" min-width="150" prop="name" align="center"></el-table-column> | 12 | <el-table-column :label="language==0?'组别名称':'Event'" min-width="150" prop="name" align="center"></el-table-column> |
| 7 | <el-table-column :label="language==0?'舞种':'DISCIPLINE'" width="110" prop="danceType" align="center"> | 13 | <el-table-column :label="language==0?'舞种':'DISCIPLINE'" width="110" prop="danceType" align="center"> |
| 8 | </el-table-column> | 14 | </el-table-column> |
| 9 | <el-table-column :label="language==0?'舞种明细':'Dance Detail'" width="120" prop="danceTypeDetailStr" align="center"></el-table-column> | 15 | <el-table-column :label="language==0?'舞种明细':'Dance Detail'" width="120" prop="danceTypeDetailStr" align="center"> |
| 16 | |||
| 17 | </el-table-column> | ||
| 10 | 18 | ||
| 11 | <el-table-column :label="language==0?'参赛性别':'Sex'" align="center"> | 19 | <el-table-column :label="language==0?'参赛性别':'Sex'" align="center"> |
| 12 | <template #default="scope"> | 20 | <template #default="scope"> |
| ... | @@ -45,76 +53,40 @@ | ... | @@ -45,76 +53,40 @@ |
| 45 | </template> | 53 | </template> |
| 46 | </el-table-column> | 54 | </el-table-column> |
| 47 | </el-table> | 55 | </el-table> |
| 48 | 56 | <PaginationPc | |
| 49 | <!-- <table class="table" cellspacing="0" cellpadding="0" v-if="list.length > 0">--> | 57 | v-show="total>0" |
| 50 | <!-- <tr v-if="language==0">--> | 58 | :total="total" |
| 51 | <!-- <th>组别编号</th>--> | 59 | v-model:page="query.pageNum" |
| 52 | <!-- <th>组别名称</th>--> | 60 | v-model:limit="query.pageSize" |
| 53 | <!-- <th>舞种</th>--> | 61 | @pagination="getList" |
| 54 | <!-- <th>舞种明细</th>--> | 62 | /> |
| 55 | <!-- <th>参赛性别</th>--> | ||
| 56 | <!-- <th>参赛年龄</th>--> | ||
| 57 | <!-- <th>服务费(元)</th>--> | ||
| 58 | <!-- </tr>--> | ||
| 59 | <!-- <tr v-else>--> | ||
| 60 | <!-- <th>EVENT code</th>--> | ||
| 61 | <!-- <th>EVENT</th>--> | ||
| 62 | <!-- <th>DISCIPLINE</th>--> | ||
| 63 | <!-- <th>Dance Detail</th>--> | ||
| 64 | <!-- <th>Sex</th>--> | ||
| 65 | <!-- <th>Age</th>--> | ||
| 66 | <!-- <th>Registration Fee</th>--> | ||
| 67 | <!-- </tr>--> | ||
| 68 | <!-- <tr v-for="(p,index) in list" :key="index">--> | ||
| 69 | <!-- <td>{{ p.code }}</td>--> | ||
| 70 | <!-- <td>{{ p.name }}</td>--> | ||
| 71 | <!-- <td>{{ p.danceType }}</td>--> | ||
| 72 | <!-- <td>{{ p.danceTypeDetailStr }}</td>--> | ||
| 73 | <!-- <td>{{ p.playTypeStr }}</td>--> | ||
| 74 | <!-- <td>--> | ||
| 75 | <!--<!– {{ isNational }}–>--> | ||
| 76 | <!-- <div v-if="isNational">--> | ||
| 77 | <!-- <span v-if="p.ageGroup == '0'" >{{ language==0?'不限制':'Unlimited' }}</span>--> | ||
| 78 | <!-- <span v-if="p.ageGroup == '1'" >Juvenile I</span>--> | ||
| 79 | <!-- <span v-if="p.ageGroup == '2'" >Juvenile II</span>--> | ||
| 80 | <!-- <span v-if="p.ageGroup == '3'" >Juv1& II (comb.)</span>--> | ||
| 81 | <!-- <span v-if="p.ageGroup == '4'" >Junior I</span>--> | ||
| 82 | <!-- <span v-if="p.ageGroup == '5'" >Junior II</span>--> | ||
| 83 | <!-- <span v-if="p.ageGroup == '6'" >Juv I & II (comb.)</span>--> | ||
| 84 | <!-- <span v-if="p.ageGroup == '7'" >Youth</span>--> | ||
| 85 | <!-- <span v-if="p.ageGroup == '8'" >Under 21</span>--> | ||
| 86 | <!-- <span v-if="p.ageGroup == '9'" >Adult</span>--> | ||
| 87 | <!-- <span v-if="p.ageGroup == '10'" >Senior I</span>--> | ||
| 88 | <!-- <span v-if="p.ageGroup == '11'" >Senior II</span>--> | ||
| 89 | <!-- <span v-if="p.ageGroup == '12'" >Senior III</span>--> | ||
| 90 | <!-- <span v-if="p.ageGroup == '13'" >Senior IV</span>--> | ||
| 91 | <!-- <span v-if="p.ageGroup == '14'" >Senior V</span>--> | ||
| 92 | <!-- </div>--> | ||
| 93 | <!-- <div v-else>--> | ||
| 94 | <!-- <div>{{ p.birthPeriod }}</div>--> | ||
| 95 | <!-- <div>{{p.birthPeriodSecond}}</div>--> | ||
| 96 | <!-- </div>--> | ||
| 97 | |||
| 98 | <!-- <!– <div>{{ p.birthAgeGroup }};{{p.birthAgeSecondGroup}}</div>–>--> | ||
| 99 | <!-- </td>--> | ||
| 100 | <!-- <td>{{ language==0?'¥':'€' }}{{ p.serviceFee }}</td>--> | ||
| 101 | <!-- </tr>--> | ||
| 102 | <!-- </table>--> | ||
| 103 | |||
| 104 | </div> | 63 | </div> |
| 105 | <!-- <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list.length == 0" description=""/>--> | 64 | <!-- <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list.length == 0" description=""/>--> |
| 106 | </div> | 65 | </div> |
| 107 | </template> | 66 | </template> |
| 108 | 67 | ||
| 109 | <script setup> | 68 | <script setup> |
| 69 | import {Search} from "@element-plus/icons-vue"; | ||
| 110 | import {useStorage} from "@vueuse/core/index" | 70 | import {useStorage} from "@vueuse/core/index" |
| 71 | import {getProjectByCptId} from "@/apiPc/match"; | ||
| 72 | import PaginationPc from "@/components/PaginationPc"; | ||
| 111 | const language= useStorage('language',0) | 73 | const language= useStorage('language',0) |
| 112 | 74 | const list = ref([]) | |
| 75 | const total = ref(0) | ||
| 76 | const query = ref({ | ||
| 77 | projectName:'', | ||
| 78 | pageSize:10, | ||
| 79 | pageNum:1 | ||
| 80 | }) | ||
| 113 | const props = defineProps({ | 81 | const props = defineProps({ |
| 114 | list: { | 82 | // list: { |
| 115 | type: Array, | 83 | // type: Array, |
| 116 | required: true, | 84 | // required: true, |
| 117 | default:[] | 85 | // default:[] |
| 86 | // }, | ||
| 87 | matchId: { | ||
| 88 | type: String, | ||
| 89 | required: false | ||
| 118 | }, | 90 | }, |
| 119 | isNational: { | 91 | isNational: { |
| 120 | type: Boolean, | 92 | type: Boolean, |
| ... | @@ -122,6 +94,13 @@ const props = defineProps({ | ... | @@ -122,6 +94,13 @@ const props = defineProps({ |
| 122 | default: false | 94 | default: false |
| 123 | }, | 95 | }, |
| 124 | }) | 96 | }) |
| 97 | getList() | ||
| 98 | function getList() { | ||
| 99 | getProjectByCptId(props.matchId,query.value).then(res=>{ | ||
| 100 | list.value = res.rows | ||
| 101 | total.value = res.total | ||
| 102 | }) | ||
| 103 | } | ||
| 125 | </script> | 104 | </script> |
| 126 | 105 | ||
| 127 | <style scoped lang="scss"> | 106 | <style scoped lang="scss"> | ... | ... |
| ... | @@ -82,7 +82,7 @@ | ... | @@ -82,7 +82,7 @@ |
| 82 | <!-- </div>--> | 82 | <!-- </div>--> |
| 83 | <div class="indexTitle" v-if="form.type==1 && form.cptProjectList?.length > 0"><h3 class="leftboderTT">Event settings</h3></div> | 83 | <div class="indexTitle" v-if="form.type==1 && form.cptProjectList?.length > 0"><h3 class="leftboderTT">Event settings</h3></div> |
| 84 | <div v-if="form.type==1 && form.cptProjectList?.length > 0"> | 84 | <div v-if="form.type==1 && form.cptProjectList?.length > 0"> |
| 85 | <match-info-project-list :list="form.cptProjectList" :is-national="form.languageSource!='100'"/> | 85 | <match-info-project-list :match-id="form.id" :is-national="form.languageSource!='100'"/> |
| 86 | </div> | 86 | </div> |
| 87 | </div> | 87 | </div> |
| 88 | </template> | 88 | </template> | ... | ... |
| ... | @@ -99,7 +99,7 @@ | ... | @@ -99,7 +99,7 @@ |
| 99 | </div> | 99 | </div> |
| 100 | <matchInfo :form="matchData" v-if="menu[0].active==1"/> | 100 | <matchInfo :form="matchData" v-if="menu[0].active==1"/> |
| 101 | <div v-if="menu[1].active==1"> | 101 | <div v-if="menu[1].active==1"> |
| 102 | <match-info-project-list :list="matchData.cptProjectList" /> | 102 | <match-info-project-list :match-id="matchData.id" /> |
| 103 | </div> | 103 | </div> |
| 104 | <match-schedule-list :match-data="matchData" v-if="menu[2].active==1"/> | 104 | <match-schedule-list :match-data="matchData" v-if="menu[2].active==1"/> |
| 105 | <div v-if="menu[3].active==1"> | 105 | <div v-if="menu[3].active==1"> | ... | ... |
| ... | @@ -185,31 +185,47 @@ | ... | @@ -185,31 +185,47 @@ |
| 185 | </div> | 185 | </div> |
| 186 | <matchInfo :form="matchData" v-if="menu[0].active==1"/> | 186 | <matchInfo :form="matchData" v-if="menu[0].active==1"/> |
| 187 | <div v-if="menu[1].active==1"> | 187 | <div v-if="menu[1].active==1"> |
| 188 | <match-info-project-list :list="matchData.cptProjectList" :is-national="isNational"/> | 188 | <match-info-project-list :match-id="matchData.id" :is-national="isNational"/> |
| 189 | </div> | 189 | </div> |
| 190 | <match-schedule-list :match-data="matchData" v-if="menu[2].active==1"/> | 190 | <match-schedule-list :match-data="matchData" v-if="menu[2].active==1"/> |
| 191 | <div v-if="menu[3].active==1"> | 191 | <div v-if="menu[3].active==1"> |
| 192 | <el-row :gutter="20" v-if="matchData.signType == '0'"> | 192 | <div v-if="matchData.showPersonFlag=='1'"> |
| 193 | <el-col v-for="t in signDoneGroupList" :key="t.id" :span="8"> | 193 | <el-row :gutter="20" v-if="matchData.signType == '0'"> |
| 194 | <div class="teamItem"> | 194 | <el-col v-for="t in signDoneGroupList" :key="t.id" :span="8"> |
| 195 | <el-avatar :size="60" :src="fillImgUrl(t.imgUrl||t.avatar)"/> | 195 | <div class="teamItem"> |
| 196 | <span class="name">{{ t.name }}</span> | 196 | <el-avatar :size="60" :src="fillImgUrl(t.imgUrl||t.avatar)"/> |
| 197 | </div> | 197 | <span class="name">{{ t.name }}</span> |
| 198 | </el-col> | 198 | </div> |
| 199 | </el-row> | 199 | </el-col> |
| 200 | <el-row :gutter="20" class="pd20" v-else> | 200 | </el-row> |
| 201 | <el-col :span="24"> | 201 | <el-row :gutter="20" class="pd20" v-else> |
| 202 | <el-table :data="signDoneGroupList"> | 202 | <el-col :span="24"> |
| 203 | <el-table-column prop="groupCode" :label="language == 0 ? '组别代码' :'EVENT CODE'" min-width="120"/> | 203 | <div class="fr mb20"> |
| 204 | <el-table-column prop="EVENT" :label="language == 0 ?'组别':'Group'" min-width="120"/> | 204 | <el-input size="small" v-model="queryGroupList.name" :prefix-icon="Search" |
| 205 | <el-table-column prop="maleAthName" :label="language == 0 ?'男运动员':'man name'" min-width="150"/> | 205 | @change="getGroupListByCptId" clearable/> |
| 206 | <el-table-column prop="femaleAthName" :label="language == 0 ?'女运动员':'woman name'" min-width="150"/> | 206 | </div> |
| 207 | <el-table-column prop="danceType" :label="language == 0 ?'舞种':'Division'" min-width="120"/> | 207 | <el-table :data="signDoneGroupList"> |
| 208 | <el-table-column prop="countryName" :label="language == 0 ?'国籍':'Representing'" min-width="130"/> | 208 | <el-table-column prop="groupCode" align="center" :label="language == 0 ? '组别代码' :'EVENT CODE'" min-width="120"/> |
| 209 | <el-table-column prop="groupName" :label="language == 0 ?'参赛队名称':'Team name'" min-width="150"/> | 209 | <el-table-column prop="group" :label="language == 0 ?'组别':'EVENT'" min-width="120"/> |
| 210 | </el-table> | 210 | <el-table-column prop="maleAthName" :label="language == 0 ?'男运动员':'man name'" min-width="150"/> |
| 211 | </el-col> | 211 | <el-table-column prop="femaleAthName" :label="language == 0 ?'女运动员':'woman name'" min-width="150"/> |
| 212 | </el-row> | 212 | <el-table-column prop="danceType" :label="language == 0 ?'舞种':'Division'" min-width="120"/> |
| 213 | <el-table-column prop="countryName" align="center" :label="language == 0 ?'国籍':'Representing'" min-width="130"/> | ||
| 214 | <el-table-column prop="groupName" align="center" :label="language == 0 ?'参赛队名称':'Team name'" min-width="150"/> | ||
| 215 | </el-table> | ||
| 216 | <PaginationPc | ||
| 217 | v-show="signDoneGroupListToTal>0" | ||
| 218 | :total="signDoneGroupListToTal" | ||
| 219 | v-model:page="queryGroupList.pageNum" | ||
| 220 | v-model:limit="queryGroupList.pageSize" | ||
| 221 | @pagination="getGroupListByCptId" | ||
| 222 | /> | ||
| 223 | </el-col> | ||
| 224 | </el-row> | ||
| 225 | </div> | ||
| 226 | <div v-else> | ||
| 227 | <el-empty :image="`/img/order_no.png`" :image-size="228" description=""/> | ||
| 228 | </div> | ||
| 213 | </div> | 229 | </div> |
| 214 | <div v-if="menu[4].active==1"> | 230 | <div v-if="menu[4].active==1"> |
| 215 | <!--成绩--> | 231 | <!--成绩--> |
| ... | @@ -309,9 +325,9 @@ const {proxy} = getCurrentInstance() | ... | @@ -309,9 +325,9 @@ const {proxy} = getCurrentInstance() |
| 309 | import * as match from '@/apiPc/match' | 325 | import * as match from '@/apiPc/match' |
| 310 | import {toRefs} from '@vueuse/shared' | 326 | import {toRefs} from '@vueuse/shared' |
| 311 | import {dayjs, ElMessage, ElMessageBox} from 'element-plus' | 327 | import {dayjs, ElMessage, ElMessageBox} from 'element-plus' |
| 312 | import useUserStore from "@/store/modules/user"; | 328 | import useUserStore from "@/store/modules/user" |
| 313 | import {useStorage} from "@vueuse/core/index"; | 329 | import {useStorage} from "@vueuse/core/index" |
| 314 | 330 | import {Search} from "@element-plus/icons-vue" | |
| 315 | const user = useUserStore().user | 331 | const user = useUserStore().user |
| 316 | const group = useUserStore().group | 332 | const group = useUserStore().group |
| 317 | const data = reactive({ | 333 | const data = reactive({ |
| ... | @@ -333,6 +349,12 @@ const data = reactive({ | ... | @@ -333,6 +349,12 @@ const data = reactive({ |
| 333 | {name: 'Event details', cn: '赛事详情', active: 0}, | 349 | {name: 'Event details', cn: '赛事详情', active: 0}, |
| 334 | {name: 'Schedule', cn: '日程', active: 0}], | 350 | {name: 'Schedule', cn: '日程', active: 0}], |
| 335 | signDoneGroupList: [], | 351 | signDoneGroupList: [], |
| 352 | signDoneGroupListToTal:0, | ||
| 353 | queryGroupList:{ | ||
| 354 | name:'', | ||
| 355 | pageSize:10, | ||
| 356 | pageNum:1 | ||
| 357 | }, | ||
| 336 | time: '', | 358 | time: '', |
| 337 | startSign: '', | 359 | startSign: '', |
| 338 | isNational:false | 360 | isNational:false |
| ... | @@ -343,10 +365,9 @@ const { | ... | @@ -343,10 +365,9 @@ const { |
| 343 | matchData, | 365 | matchData, |
| 344 | matchId, | 366 | matchId, |
| 345 | groupId, | 367 | groupId, |
| 346 | activeName2, | ||
| 347 | menu, | 368 | menu, |
| 348 | menu1, | 369 | menu1, |
| 349 | signDoneGroupList, | 370 | signDoneGroupList,signDoneGroupListToTal,queryGroupList, |
| 350 | time, startSign,isNational | 371 | time, startSign,isNational |
| 351 | } = toRefs(data) | 372 | } = toRefs(data) |
| 352 | const signTypePop = ref(false) | 373 | const signTypePop = ref(false) |
| ... | @@ -370,7 +391,7 @@ function getMatchId() { | ... | @@ -370,7 +391,7 @@ function getMatchId() { |
| 370 | match.getMaList({topFlag: 1, status: 1}).then((res) => { | 391 | match.getMaList({topFlag: 1, status: 1}).then((res) => { |
| 371 | matchId.value = res.rows[0].id | 392 | matchId.value = res.rows[0].id |
| 372 | getMatch(matchId.value) | 393 | getMatch(matchId.value) |
| 373 | getGroupListByCptId(matchId.value) | 394 | getGroupListByCptId() |
| 374 | }) | 395 | }) |
| 375 | } | 396 | } |
| 376 | 397 | ||
| ... | @@ -394,9 +415,10 @@ function getMatch(id) { | ... | @@ -394,9 +415,10 @@ function getMatch(id) { |
| 394 | }) | 415 | }) |
| 395 | } | 416 | } |
| 396 | 417 | ||
| 397 | function getGroupListByCptId(id) { | 418 | function getGroupListByCptId() { |
| 398 | match.getGroupListByCptId(id).then(res => { | 419 | match.getGroupListByCptId(matchId.value,queryGroupList.value).then(res => { |
| 399 | signDoneGroupList.value = res.data | 420 | signDoneGroupList.value = res.rows |
| 421 | signDoneGroupListToTal.value = res.total | ||
| 400 | }) | 422 | }) |
| 401 | } | 423 | } |
| 402 | 424 | ... | ... |
| ... | @@ -330,7 +330,7 @@ function bigNext(){ | ... | @@ -330,7 +330,7 @@ function bigNext(){ |
| 330 | ElMessage.warning(language.value == 0 ? '请选择性别' : 'Please select your gender') | 330 | ElMessage.warning(language.value == 0 ? '请选择性别' : 'Please select your gender') |
| 331 | return | 331 | return |
| 332 | } | 332 | } |
| 333 | if(user.utype=='3'){ | 333 | if(user&&user.utype=='3'){ |
| 334 | let obj = { | 334 | let obj = { |
| 335 | card: form.value.card, | 335 | card: form.value.card, |
| 336 | userId: user.userId, | 336 | userId: user.userId, | ... | ... |
-
Please register or sign in to post a comment