no message
Showing
10 changed files
with
1135 additions
and
174 deletions
| ... | @@ -21,9 +21,12 @@ | ... | @@ -21,9 +21,12 @@ |
| 21 | <div class="chooseForm"> | 21 | <div class="chooseForm"> |
| 22 | <el-checkbox-group v-model="form.coachs" @change="changecoachs"> | 22 | <el-checkbox-group v-model="form.coachs" @change="changecoachs"> |
| 23 | <div class="addBttn" @click="addCoach(0)">+</div> | 23 | <div class="addBttn" @click="addCoach(0)">+</div> |
| 24 | <el-checkbox v-for="c in coachList" :label="c.id"> | 24 | <el-checkbox v-for="c in personAllList?.coaches" :label="c.id"> |
| 25 | <el-avatar fit="cover" :size="60" :src="fillImgUrl(c.picUrl)"/> | 25 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> |
| 26 | <p class="name">{{ c.realName }} | 26 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> |
| 27 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 28 | |||
| 29 | <p class="name">{{ c.xing }}{{c.ming}} | ||
| 27 | <el-icon @click.stop="editPerson(c.id)"> | 30 | <el-icon @click.stop="editPerson(c.id)"> |
| 28 | <Edit/> | 31 | <Edit/> |
| 29 | </el-icon> | 32 | </el-icon> |
| ... | @@ -46,9 +49,11 @@ | ... | @@ -46,9 +49,11 @@ |
| 46 | <div class="chooseForm"> | 49 | <div class="chooseForm"> |
| 47 | <el-checkbox-group v-model="form.leader"> | 50 | <el-checkbox-group v-model="form.leader"> |
| 48 | <div class="addBttn" @click="addCoach(0)">+</div> | 51 | <div class="addBttn" @click="addCoach(0)">+</div> |
| 49 | <el-checkbox v-for="c in leaderList" :label="c.id"> | 52 | <el-checkbox v-for="c in personAllList?.leaders" :label="c.id"> |
| 50 | <el-avatar fit="cover" :size="60" :src="fillImgUrl(c.picUrl)"/> | 53 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> |
| 51 | <p class="name">{{ c.realName }} | 54 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> |
| 55 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 56 | <p class="name">{{ c.xing }}{{c.ming}} | ||
| 52 | <el-icon @click.stop="editPerson(c.id)"> | 57 | <el-icon @click.stop="editPerson(c.id)"> |
| 53 | <Edit/> | 58 | <Edit/> |
| 54 | </el-icon> | 59 | </el-icon> |
| ... | @@ -69,9 +74,11 @@ | ... | @@ -69,9 +74,11 @@ |
| 69 | <div class="chooseForm"> | 74 | <div class="chooseForm"> |
| 70 | <el-checkbox-group v-model="form.doctor"> | 75 | <el-checkbox-group v-model="form.doctor"> |
| 71 | <div class="addBttn" @click="addCoach(0)">+</div> | 76 | <div class="addBttn" @click="addCoach(0)">+</div> |
| 72 | <el-checkbox v-for="c in doctorList" :label="c.id"> | 77 | <el-checkbox v-for="c in personAllList?.teamDoctors" :label="c.id"> |
| 73 | <el-avatar fit="cover" :size="60" :src="fillImgUrl(c.picUrl)"/> | 78 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> |
| 74 | <p class="name">{{ c.realName }} | 79 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> |
| 80 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 81 | <p class="name">{{ c.xing }}{{c.ming}} | ||
| 75 | <el-icon @click.stop="editPerson(c.id)"> | 82 | <el-icon @click.stop="editPerson(c.id)"> |
| 76 | <Edit/> | 83 | <Edit/> |
| 77 | </el-icon> | 84 | </el-icon> |
| ... | @@ -92,9 +99,11 @@ | ... | @@ -92,9 +99,11 @@ |
| 92 | <div class="chooseForm"> | 99 | <div class="chooseForm"> |
| 93 | <el-checkbox-group v-model="form.translator"> | 100 | <el-checkbox-group v-model="form.translator"> |
| 94 | <div class="addBttn" @click="addCoach(0)">+</div> | 101 | <div class="addBttn" @click="addCoach(0)">+</div> |
| 95 | <el-checkbox v-for="c in translatorList" :label="c.id"> | 102 | <el-checkbox v-for="c in personAllList?.translators" :label="c.id"> |
| 96 | <el-avatar fit="cover" :size="60" :src="fillImgUrl(c.picUrl)"/> | 103 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> |
| 97 | <p class="name">{{ c.realName }} | 104 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> |
| 105 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 106 | <p class="name">{{ c.xing }}{{c.ming}} | ||
| 98 | <el-icon @click.stop="editPerson(c.id)"> | 107 | <el-icon @click.stop="editPerson(c.id)"> |
| 99 | <Edit/> | 108 | <Edit/> |
| 100 | </el-icon> | 109 | </el-icon> |
| ... | @@ -115,9 +124,11 @@ | ... | @@ -115,9 +124,11 @@ |
| 115 | <div class="chooseForm"> | 124 | <div class="chooseForm"> |
| 116 | <el-checkbox-group v-model="form.official"> | 125 | <el-checkbox-group v-model="form.official"> |
| 117 | <div class="addBttn" @click="addCoach(0)">+</div> | 126 | <div class="addBttn" @click="addCoach(0)">+</div> |
| 118 | <el-checkbox v-for="c in officialList" :label="c.id"> | 127 | <el-checkbox v-for="c in personAllList?.officials" :label="c.id"> |
| 119 | <el-avatar fit="cover" :size="60" :src="fillImgUrl(c.picUrl)"/> | 128 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> |
| 120 | <p class="name">{{ c.realName }} | 129 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> |
| 130 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 131 | <p class="name">{{ c.xing }}{{c.ming}} | ||
| 121 | <el-icon @click.stop="editPerson(c.id)"> | 132 | <el-icon @click.stop="editPerson(c.id)"> |
| 122 | <Edit/> | 133 | <Edit/> |
| 123 | </el-icon> | 134 | </el-icon> |
| ... | @@ -138,9 +149,11 @@ | ... | @@ -138,9 +149,11 @@ |
| 138 | <div class="chooseForm"> | 149 | <div class="chooseForm"> |
| 139 | <el-checkbox-group v-model="form.other"> | 150 | <el-checkbox-group v-model="form.other"> |
| 140 | <div class="addBttn" @click="addCoach(0)">+</div> | 151 | <div class="addBttn" @click="addCoach(0)">+</div> |
| 141 | <el-checkbox v-for="c in otherList" :label="c.id"> | 152 | <el-checkbox v-for="c in personAllList?.others" :label="c.id"> |
| 142 | <el-avatar fit="cover" :size="60" :src="fillImgUrl(c.picUrl)"/> | 153 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> |
| 143 | <p class="name">{{ c.realName }} | 154 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> |
| 155 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 156 | <p class="name">{{ c.xing }}{{c.ming}} | ||
| 144 | <el-icon @click.stop="editPerson(c.id)"> | 157 | <el-icon @click.stop="editPerson(c.id)"> |
| 145 | <Edit/> | 158 | <Edit/> |
| 146 | </el-icon> | 159 | </el-icon> |
| ... | @@ -189,25 +202,14 @@ const data = reactive({ | ... | @@ -189,25 +202,14 @@ const data = reactive({ |
| 189 | coachs: [], | 202 | coachs: [], |
| 190 | leader: [] | 203 | leader: [] |
| 191 | }, | 204 | }, |
| 192 | coachList: [], | 205 | personAllList: [], |
| 193 | leaderList: [], | ||
| 194 | otherList: [], | ||
| 195 | doctorList: [], | ||
| 196 | translatorList: [], | ||
| 197 | officialList: [], | ||
| 198 | hasChooseObj: {}, | 206 | hasChooseObj: {}, |
| 199 | groupId: '0', | 207 | groupId: '0', |
| 200 | signType: '', | 208 | signType: '', |
| 201 | activeStep: 1 | 209 | activeStep: 1 |
| 202 | }) | 210 | }) |
| 203 | const {loading, | 211 | const {loading, |
| 204 | form, | 212 | form,personAllList, |
| 205 | coachList, | ||
| 206 | leaderList, | ||
| 207 | otherList, | ||
| 208 | doctorList, | ||
| 209 | translatorList, | ||
| 210 | officialList, | ||
| 211 | rules, | 213 | rules, |
| 212 | signType, | 214 | signType, |
| 213 | groupId, | 215 | groupId, |
| ... | @@ -246,12 +248,7 @@ function tuandui() { | ... | @@ -246,12 +248,7 @@ function tuandui() { |
| 246 | match.getMyGroupForCpt(groupId.value, matchId), | 248 | match.getMyGroupForCpt(groupId.value, matchId), |
| 247 | match.getChooseDoneGroupCoachs(matchId, groupId.value) | 249 | match.getChooseDoneGroupCoachs(matchId, groupId.value) |
| 248 | ]).then((res) => { | 250 | ]).then((res) => { |
| 249 | coachList.value = res[0].data.coaches | 251 | personAllList.value = res[0].data |
| 250 | leaderList.value = res[0].data.leaders | ||
| 251 | doctorList.value = res[0].data.teamDoctors | ||
| 252 | translatorList.value = res[0].data.translators | ||
| 253 | officialList.value = res[0].data.officials | ||
| 254 | otherList.value = res[0].data.others | ||
| 255 | loading.value = false | 252 | loading.value = false |
| 256 | if (res[1].data.id != null) { | 253 | if (res[1].data.id != null) { |
| 257 | hasChooseObj.value = res[1].data | 254 | hasChooseObj.value = res[1].data |
| ... | @@ -280,12 +277,7 @@ function geren() { | ... | @@ -280,12 +277,7 @@ function geren() { |
| 280 | match.getMyPersonInfoWithcptId(matchId), | 277 | match.getMyPersonInfoWithcptId(matchId), |
| 281 | match.getChooseDoneSingleCoachs(matchId) | 278 | match.getChooseDoneSingleCoachs(matchId) |
| 282 | ]).then((res) => { | 279 | ]).then((res) => { |
| 283 | coachList.value = res[0].data.coaches | 280 | personAllList.value = res[0].data |
| 284 | leaderList.value = res[0].data.leaders | ||
| 285 | otherList.value = res[0].data.others | ||
| 286 | doctorList.value = res[0].data.teamDoctors | ||
| 287 | translatorList.value = res[0].data.translators | ||
| 288 | officialList.value = res[0].data.officials | ||
| 289 | loading.value = false | 281 | loading.value = false |
| 290 | if (res[1].data.id != null) { | 282 | if (res[1].data.id != null) { |
| 291 | hasChooseObj.value = res[1].data | 283 | hasChooseObj.value = res[1].data | ... | ... |
| ... | @@ -7,22 +7,22 @@ | ... | @@ -7,22 +7,22 @@ |
| 7 | 7 | ||
| 8 | <el-card :body-style="{'padding-top': '0'}"> | 8 | <el-card :body-style="{'padding-top': '0'}"> |
| 9 | <el-row class="mt20" :gutter="20"> | 9 | <el-row class="mt20" :gutter="20"> |
| 10 | <el-col :lg="8"> | 10 | <el-col :lg="12"> |
| 11 | <div class="panel border"> | 11 | <div class="panel border"> |
| 12 | <div class="panel-header "> | 12 | <div class="panel-header "> |
| 13 | <h3 class="panel-title" v-if="language==0">选择参赛运动员清单</h3> | 13 | <h3 class="panel-title" v-if="language==0">选择参赛运动员清单</h3> |
| 14 | <h3 class="panel-title" v-else>Select list of participating athletes</h3> | 14 | <h3 class="panel-title" v-else>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 | </div> | 16 | </div> |
| 17 | <div class="panel-body" style="padding: 10px"> | 17 | <div class="panel-body" style="padding: 10px"> |
| 18 | <div style="margin: 0 4px 10px"> | 18 | <div style="margin: 0 4px 10px"> |
| 19 | <el-input size="small" v-model="athletesQuery.name" :prefix-icon="Search" | 19 | <el-select multiple v-model="choosedchoosed" collapse-tags-tooltip filterable |
| 20 | @change="queryAthletes" | 20 | @change="getProjectList"> |
| 21 | clearable/> | 21 | <el-option v-for="c in athletesList" :key="c.id" :label="c.realName" :value="c.id" ></el-option> |
| 22 | </el-select> | ||
| 22 | </div> | 23 | </div> |
| 23 | <div class="noPicChooseForm" id="chooseArr"> | 24 | <div class="noPicChooseForm" id="chooseArr"> |
| 24 | <el-checkbox-group v-model="choosedchoosed" @change="changechoosed"> | 25 | <el-checkbox-group v-model="choosedchoosed" @change="changechoosed"> |
| 25 | <el-button id="addRef" plain @click="chooseSportman">+{{ language == 0 ? '选择' : 'add' }}</el-button> | ||
| 26 | <el-checkbox v-for="c in choosedListBak" :value="c.id" border> | 26 | <el-checkbox v-for="c in choosedListBak" :value="c.id" border> |
| 27 | <p class="name">{{ c.realName }} | 27 | <p class="name">{{ c.realName }} |
| 28 | <!-- ({{ c.sexStr }})--> | 28 | <!-- ({{ c.sexStr }})--> |
| ... | @@ -35,39 +35,7 @@ | ... | @@ -35,39 +35,7 @@ |
| 35 | </div> | 35 | </div> |
| 36 | </div> | 36 | </div> |
| 37 | </el-col> | 37 | </el-col> |
| 38 | <el-col :lg="8"> | 38 | <el-col :lg="12"> |
| 39 | <div class="panel border"> | ||
| 40 | <div class="panel-header "> | ||
| 41 | <h3 class="panel-title" v-if="language==0">选择一个参赛组合</h3> | ||
| 42 | <h3 class="panel-title" v-else>Select a Participating team</h3> | ||
| 43 | <a class="fr" @click="emptyChangechoosed">{{ language == 0 ? '清空' : 'Empty' }}</a> | ||
| 44 | </div> | ||
| 45 | <div class="panel-body" style="padding: 10px"> | ||
| 46 | <div class="mb20"> | ||
| 47 | <el-input size="small" v-model="zuQuery.name" :prefix-icon="Search" | ||
| 48 | @change="queryTeam" clearable/> | ||
| 49 | </div> | ||
| 50 | <div class="chooseForm"> | ||
| 51 | <el-checkbox-group v-model="choosedchoosed" @change="changechoosed"> | ||
| 52 | <!-- v-show="choosedchoosed.indexOf(c.id) !== -1"--> | ||
| 53 | <el-checkbox v-for="c in choosed2Listbak" :value="c.id" checked> | ||
| 54 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> | ||
| 55 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> | ||
| 56 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 57 | <p class="name">{{ c.realName }} | ||
| 58 | <img v-if="c.sex=='0'" src="@/assets/img/female.png"/> | ||
| 59 | <img v-if="c.sex=='1'" src="@/assets/img/male.png"/> | ||
| 60 | <!-- <el-icon @click.stop="editPerson(c.id)">--> | ||
| 61 | <!-- <Edit/>--> | ||
| 62 | <!-- </el-icon>--> | ||
| 63 | </p> | ||
| 64 | </el-checkbox> | ||
| 65 | </el-checkbox-group> | ||
| 66 | </div> | ||
| 67 | </div> | ||
| 68 | </div> | ||
| 69 | </el-col> | ||
| 70 | <el-col :lg="8"> | ||
| 71 | <div class="panel border"> | 39 | <div class="panel border"> |
| 72 | <div class="panel-header "> | 40 | <div class="panel-header "> |
| 73 | <h3 class="panel-title" v-if="language==0">可参与报名的项目</h3> | 41 | <h3 class="panel-title" v-if="language==0">可参与报名的项目</h3> |
| ... | @@ -78,8 +46,8 @@ | ... | @@ -78,8 +46,8 @@ |
| 78 | clearable/> | 46 | clearable/> |
| 79 | </div> | 47 | </div> |
| 80 | </div> | 48 | </div> |
| 81 | <div v-loading="loadingProject" id="projectbox" style="height: 60vh"> | 49 | <div v-loading="loadingProject" id="projectbox" style="height: 60vh;overflow: auto;"> |
| 82 | <el-checkbox-group v-model="projectIds"> | 50 | <el-checkbox-group v-model="projectIds" @change="changeProject"> |
| 83 | <el-checkbox class="flexBetweenBox" v-for="c in projectList" :value="c.id" :key="c.id"> | 51 | <el-checkbox class="flexBetweenBox" v-for="c in projectList" :value="c.id" :key="c.id"> |
| 84 | <div class="flexBetween w100"> | 52 | <div class="flexBetween w100"> |
| 85 | <div class="l"> | 53 | <div class="l"> |
| ... | @@ -158,7 +126,7 @@ | ... | @@ -158,7 +126,7 @@ |
| 158 | 126 | ||
| 159 | </el-dialog> | 127 | </el-dialog> |
| 160 | <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList"/> | 128 | <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList"/> |
| 161 | 129 | <dialogWdsf ref="popWdsf" @submitForm="getSignInfoList"/> | |
| 162 | <el-tour v-model="openTour" :current="tourCurrent"> | 130 | <el-tour v-model="openTour" :current="tourCurrent"> |
| 163 | <el-tour-step target="#addRef" title="第一步" description="点击选择运动员" :next-button-props="nextButtonProps"/> | 131 | <el-tour-step target="#addRef" title="第一步" description="点击选择运动员" :next-button-props="nextButtonProps"/> |
| 164 | <el-tour-step v-if="choosedList.length>0" target="#chooseArr" title="第二步" description="勾选报项运动员"/> | 132 | <el-tour-step v-if="choosedList.length>0" target="#chooseArr" title="第二步" description="勾选报项运动员"/> |
| ... | @@ -172,10 +140,11 @@ | ... | @@ -172,10 +140,11 @@ |
| 172 | import {ref, reactive, toRefs, watch} from 'vue' | 140 | import {ref, reactive, toRefs, watch} from 'vue' |
| 173 | import * as match from '@/apiPc/match' | 141 | import * as match from '@/apiPc/match' |
| 174 | import {getCurrentInstance, onMounted} from '@vue/runtime-core' | 142 | import {getCurrentInstance, onMounted} from '@vue/runtime-core' |
| 175 | import dialogAddCoach from './components/addCoach' | 143 | import DialogAddCoach from './components/addCoach' |
| 176 | import dialogAllSportsmanList from './components/allSportsmanList' | 144 | import DialogAllSportsmanList from './components/allSportsmanList' |
| 177 | import dialogImport from './components/import' | 145 | import DialogImport from './components/import' |
| 178 | import dialogExtraForm from './components/extraForm' | 146 | import DialogExtraForm from './components/extraForm' |
| 147 | import DialogWdsf from './components/wdsfForm' | ||
| 179 | import {Search, Switch} from "@element-plus/icons-vue"; | 148 | import {Search, Switch} from "@element-plus/icons-vue"; |
| 180 | const {proxy} = getCurrentInstance() | 149 | const {proxy} = getCurrentInstance() |
| 181 | const router = useRouter() | 150 | const router = useRouter() |
| ... | @@ -197,6 +166,7 @@ const data = reactive({ | ... | @@ -197,6 +166,7 @@ const data = reactive({ |
| 197 | signInfoList: [], | 166 | signInfoList: [], |
| 198 | zuTableList: [], | 167 | zuTableList: [], |
| 199 | choosedList: [], | 168 | choosedList: [], |
| 169 | athletesList: [], | ||
| 200 | choosedListBak: [], | 170 | choosedListBak: [], |
| 201 | athletesQuery: { | 171 | athletesQuery: { |
| 202 | name: '' | 172 | name: '' |
| ... | @@ -225,7 +195,7 @@ const data = reactive({ | ... | @@ -225,7 +195,7 @@ const data = reactive({ |
| 225 | openTour:false | 195 | openTour:false |
| 226 | }) | 196 | }) |
| 227 | const { | 197 | const { |
| 228 | activeTeam, names, tableData, signInfoList, zuTableList, choosedList,choosedListBak, | 198 | activeTeam, names, tableData, signInfoList, zuTableList, choosedList,choosedListBak,athletesList, |
| 229 | extraform, groupId, signType, coachOrLeaderFlag, showResult, noPhotoCanSign, projectIds, choosedchoosed, activeStep, projectList, choosed2List,choosed2Listbak, loadingProject, | 199 | extraform, groupId, signType, coachOrLeaderFlag, showResult, noPhotoCanSign, projectIds, choosedchoosed, activeStep, projectList, choosed2List,choosed2Listbak, loadingProject, |
| 230 | projectQuery, tableType, athletesQuery, zuQuery,openTour,tourCurrent | 200 | projectQuery, tableType, athletesQuery, zuQuery,openTour,tourCurrent |
| 231 | } = toRefs(data) | 201 | } = toRefs(data) |
| ... | @@ -237,11 +207,18 @@ onMounted(() => { | ... | @@ -237,11 +207,18 @@ onMounted(() => { |
| 237 | getSignInfoList() | 207 | getSignInfoList() |
| 238 | getMatch(matchId.value) | 208 | getMatch(matchId.value) |
| 239 | getMySignInfo() | 209 | getMySignInfo() |
| 210 | getAthletesList() | ||
| 240 | // openTour.value = true | 211 | // openTour.value = true |
| 241 | }) | 212 | }) |
| 242 | 213 | ||
| 243 | let chargeFlag | 214 | let chargeFlag |
| 244 | 215 | ||
| 216 | function getAthletesList() { | ||
| 217 | // athletesList.value | ||
| 218 | match.getGroupPersonList({}, groupId.value).then(res => { | ||
| 219 | athletesList.value = res.rows | ||
| 220 | }) | ||
| 221 | } | ||
| 245 | function getMatch(id) { | 222 | function getMatch(id) { |
| 246 | match.getMatchById({ | 223 | match.getMatchById({ |
| 247 | id: id | 224 | id: id |
| ... | @@ -301,17 +278,6 @@ function submitForm() { | ... | @@ -301,17 +278,6 @@ function submitForm() { |
| 301 | } | 278 | } |
| 302 | } | 279 | } |
| 303 | } | 280 | } |
| 304 | afterRecover() | ||
| 305 | router.push({ | ||
| 306 | name: 'signPreview', | ||
| 307 | query: { | ||
| 308 | matchId: matchId.value, | ||
| 309 | groupId: groupId.value | ||
| 310 | } | ||
| 311 | }) | ||
| 312 | } | ||
| 313 | |||
| 314 | function afterRecover() { | ||
| 315 | if (signInfoList.value.length == 0) { | 281 | if (signInfoList.value.length == 0) { |
| 316 | if (language.value == 0) { | 282 | if (language.value == 0) { |
| 317 | ElMessage.error('请至少选择一个项目') | 283 | ElMessage.error('请至少选择一个项目') |
| ... | @@ -320,6 +286,13 @@ function afterRecover() { | ... | @@ -320,6 +286,13 @@ function afterRecover() { |
| 320 | } | 286 | } |
| 321 | return | 287 | return |
| 322 | } | 288 | } |
| 289 | router.push({ | ||
| 290 | name: 'signPreview', | ||
| 291 | query: { | ||
| 292 | matchId: matchId.value, | ||
| 293 | groupId: groupId.value | ||
| 294 | } | ||
| 295 | }) | ||
| 323 | } | 296 | } |
| 324 | 297 | ||
| 325 | function goPrev() { | 298 | function goPrev() { |
| ... | @@ -383,15 +356,6 @@ function getProjectList() { | ... | @@ -383,15 +356,6 @@ function getProjectList() { |
| 383 | }) | 356 | }) |
| 384 | } | 357 | } |
| 385 | 358 | ||
| 386 | function queryAthletes() { | ||
| 387 | choosedListBak.value = [] | ||
| 388 | for (var t of choosedList.value) { | ||
| 389 | if (t.realName.indexOf(athletesQuery.value.name) > -1) { | ||
| 390 | // 筛选 | ||
| 391 | choosedListBak.value.push(t) | ||
| 392 | } | ||
| 393 | } | ||
| 394 | } | ||
| 395 | 359 | ||
| 396 | function queryTeam() { | 360 | function queryTeam() { |
| 397 | choosed2Listbak.value = [] | 361 | choosed2Listbak.value = [] |
| ... | @@ -444,19 +408,6 @@ function addCoach() { | ... | @@ -444,19 +408,6 @@ function addCoach() { |
| 444 | proxy.$refs['dialogAddCoachRef'].open(params) | 408 | proxy.$refs['dialogAddCoachRef'].open(params) |
| 445 | } | 409 | } |
| 446 | 410 | ||
| 447 | function emptyChoosed() { | ||
| 448 | choosedList.value = [] | ||
| 449 | choosedListBak.value = [] | ||
| 450 | } | ||
| 451 | |||
| 452 | function emptyChangechoosed() { | ||
| 453 | choosedchoosed.value = [] | ||
| 454 | choosed2List.value = [] | ||
| 455 | choosed2Listbak.value = [] | ||
| 456 | projectList.value = [] | ||
| 457 | projectIds.value = [] | ||
| 458 | } | ||
| 459 | |||
| 460 | function signUp() { | 411 | function signUp() { |
| 461 | if (projectIds.value.length == 0) { | 412 | if (projectIds.value.length == 0) { |
| 462 | return | 413 | return |
| ... | @@ -562,6 +513,22 @@ function switchTabletype() { | ... | @@ -562,6 +513,22 @@ function switchTabletype() { |
| 562 | tableType.value = 0 | 513 | tableType.value = 0 |
| 563 | } | 514 | } |
| 564 | } | 515 | } |
| 516 | |||
| 517 | function changeProject(e) { | ||
| 518 | console.log(projectIds.value,e) | ||
| 519 | var obj | ||
| 520 | obj = _.find(projectList.value, (c) => { | ||
| 521 | return e.indexOf(c.id)>-1 | ||
| 522 | }) | ||
| 523 | // if(obj.majorFlag==1){ | ||
| 524 | //需要填wdsf | ||
| 525 | // const params = { | ||
| 526 | // title: '验证WDSF', | ||
| 527 | // list:choosed2Listbak.value | ||
| 528 | // } | ||
| 529 | // proxy.$refs['popWdsf'].open(_.cloneDeep(params)) | ||
| 530 | // } | ||
| 531 | } | ||
| 565 | watch(choosedchoosed, (newVal, oldVal) => { | 532 | watch(choosedchoosed, (newVal, oldVal) => { |
| 566 | // console.log(choosedchoosed.value) | 533 | // console.log(choosedchoosed.value) |
| 567 | if(newVal.length>oldVal.length){ | 534 | if(newVal.length>oldVal.length){ |
| ... | @@ -604,7 +571,7 @@ watch(choosedchoosed, (newVal, oldVal) => { | ... | @@ -604,7 +571,7 @@ watch(choosedchoosed, (newVal, oldVal) => { |
| 604 | 571 | ||
| 605 | .flexBetweenBox { | 572 | .flexBetweenBox { |
| 606 | width: 100%; | 573 | width: 100%; |
| 607 | height: auto; | 574 | height: auto;margin: 0; |
| 608 | border-bottom: 1px solid #eee; | 575 | border-bottom: 1px solid #eee; |
| 609 | padding: 0 10px; | 576 | padding: 0 10px; |
| 610 | } | 577 | } | ... | ... |
src/viewsPc/match/chooseSportsman_bak.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <div class="box ph-30"> | ||
| 4 | <el-card class="mb20"> | ||
| 5 | <team-sign-step :activeStep="activeStep" :language="language"/> | ||
| 6 | </el-card> | ||
| 7 | |||
| 8 | <el-card :body-style="{'padding-top': '0'}"> | ||
| 9 | <el-row class="mt20" :gutter="20"> | ||
| 10 | <el-col :lg="8"> | ||
| 11 | <div class="panel border"> | ||
| 12 | <div class="panel-header "> | ||
| 13 | <h3 class="panel-title" v-if="language==0">选择参赛运动员清单</h3> | ||
| 14 | <h3 class="panel-title" v-else>Select list of participating athletes</h3> | ||
| 15 | <a class="fr" @click="emptyChoosed">{{ language == 0 ? '清空' : 'Empty' }}</a> | ||
| 16 | </div> | ||
| 17 | <div class="panel-body" style="padding: 10px"> | ||
| 18 | <div style="margin: 0 4px 10px"> | ||
| 19 | <el-input size="small" v-model="athletesQuery.name" :prefix-icon="Search" | ||
| 20 | @change="queryAthletes" | ||
| 21 | clearable/> | ||
| 22 | </div> | ||
| 23 | <div class="noPicChooseForm" id="chooseArr"> | ||
| 24 | <el-checkbox-group v-model="choosedchoosed" @change="changechoosed"> | ||
| 25 | <el-button id="addRef" plain @click="chooseSportman">+{{ language == 0 ? '选择' : 'add' }}</el-button> | ||
| 26 | <el-checkbox v-for="c in choosedListBak" :value="c.id" border> | ||
| 27 | <p class="name">{{ c.realName }} | ||
| 28 | <!-- ({{ c.sexStr }})--> | ||
| 29 | <img v-if="c.sex=='0'" src="@/assets/img/female.png"/> | ||
| 30 | <img v-if="c.sex=='1'" src="@/assets/img/male.png"/> | ||
| 31 | </p> | ||
| 32 | </el-checkbox> | ||
| 33 | </el-checkbox-group> | ||
| 34 | </div> | ||
| 35 | </div> | ||
| 36 | </div> | ||
| 37 | </el-col> | ||
| 38 | <el-col :lg="8"> | ||
| 39 | <div class="panel border"> | ||
| 40 | <div class="panel-header "> | ||
| 41 | <h3 class="panel-title" v-if="language==0">选择一个参赛组合</h3> | ||
| 42 | <h3 class="panel-title" v-else>Select a Participating team</h3> | ||
| 43 | <a class="fr" @click="emptyChangechoosed">{{ language == 0 ? '清空' : 'Empty' }}</a> | ||
| 44 | </div> | ||
| 45 | <div class="panel-body" style="padding: 10px"> | ||
| 46 | <div class="mb20"> | ||
| 47 | <el-input size="small" v-model="zuQuery.name" :prefix-icon="Search" | ||
| 48 | @change="queryTeam" clearable/> | ||
| 49 | </div> | ||
| 50 | <div class="chooseForm"> | ||
| 51 | <el-checkbox-group v-model="choosedchoosed" @change="changechoosed"> | ||
| 52 | <!-- v-show="choosedchoosed.indexOf(c.id) !== -1"--> | ||
| 53 | <el-checkbox v-for="c in choosed2Listbak" :value="c.id" checked> | ||
| 54 | <el-avatar fit="cover" v-if="c.picUrl" :size="60" :src="fillImgUrl(c.picUrl)"/> | ||
| 55 | <el-avatar fit="cover" v-else-if="c.sex == 0" :size="60" src="/img/head1.png"/> | ||
| 56 | <el-avatar fit="cover" v-else-if="c.sex == 1" :size="60" src="/img/head0.png"/> | ||
| 57 | <p class="name">{{ c.realName }} | ||
| 58 | <img v-if="c.sex=='0'" src="@/assets/img/female.png"/> | ||
| 59 | <img v-if="c.sex=='1'" src="@/assets/img/male.png"/> | ||
| 60 | <!-- <el-icon @click.stop="editPerson(c.id)">--> | ||
| 61 | <!-- <Edit/>--> | ||
| 62 | <!-- </el-icon>--> | ||
| 63 | </p> | ||
| 64 | </el-checkbox> | ||
| 65 | </el-checkbox-group> | ||
| 66 | </div> | ||
| 67 | </div> | ||
| 68 | </div> | ||
| 69 | </el-col> | ||
| 70 | <el-col :lg="8"> | ||
| 71 | <div class="panel border"> | ||
| 72 | <div class="panel-header "> | ||
| 73 | <h3 class="panel-title" v-if="language==0">可参与报名的项目</h3> | ||
| 74 | <h3 class="panel-title" v-else>Eligible Events for Registration</h3> | ||
| 75 | <div class="fr"> | ||
| 76 | <el-input size="small" v-model="projectQuery.name" :prefix-icon="Search" | ||
| 77 | @change="getProjectList" | ||
| 78 | clearable/> | ||
| 79 | </div> | ||
| 80 | </div> | ||
| 81 | <div v-loading="loadingProject" id="projectbox" style="height: 60vh"> | ||
| 82 | <el-checkbox-group v-model="projectIds" @change="changeProject"> | ||
| 83 | <el-checkbox class="flexBetweenBox" v-for="c in projectList" :value="c.id" :key="c.id"> | ||
| 84 | <div class="flexBetween w100"> | ||
| 85 | <div class="l"> | ||
| 86 | {{ c.code }}:{{ c.name }} | ||
| 87 | <div>{{ c.danceTypeDetailStr }}</div> | ||
| 88 | </div> | ||
| 89 | <div class="text-primary">{{ language == 0 ? '¥' : '€' }}{{ c.serviceFee }}</div> | ||
| 90 | </div> | ||
| 91 | </el-checkbox> | ||
| 92 | </el-checkbox-group> | ||
| 93 | <el-empty v-if="projectList.length==0" :image="`/img/order_no.png`" :image-size="228" | ||
| 94 | :description="language==0?'无可选项目':''"/> | ||
| 95 | </div> | ||
| 96 | </div> | ||
| 97 | </el-col> | ||
| 98 | </el-row> | ||
| 99 | <el-row class="mt20"> | ||
| 100 | <el-col :span="24"> | ||
| 101 | <div class="text-center"> | ||
| 102 | <el-button type="primary" class="btn-lineG w200px" id="signUpBtn" | ||
| 103 | :disabled="projectIds.length==0||choosedchoosed.length==0" round @click="signUp"> | ||
| 104 | {{ language == 0 ? '确定' : 'Confirm' }} | ||
| 105 | </el-button> | ||
| 106 | </div> | ||
| 107 | </el-col> | ||
| 108 | </el-row> | ||
| 109 | </el-card> | ||
| 110 | |||
| 111 | <el-card class="mt20" :body-style="{'padding': '0'}"> | ||
| 112 | <coach-info-row :match-id="matchId" :group-id="groupId" :language="language"/> | ||
| 113 | <div class="m20"> | ||
| 114 | <!-- <el-button type="success" @click="importSportman">批量导入人员</el-button>--> | ||
| 115 | <!-- <el-button type="success" @click="addCoach">新增运动员</el-button>--> | ||
| 116 | <div class="ttbb"> | ||
| 117 | <div :class="tableType==1 ? 'active' : ''" @click="switchTabletype"> | ||
| 118 | {{ language == 0 ? '按组别查看报项' : 'View Entries by Group' }} | ||
| 119 | </div> | ||
| 120 | <div :class="tableType==0 ? 'active' : ''" @click="switchTabletype"> | ||
| 121 | {{ language == 0 ? '按人员查看报项' : 'View Entries by Participant' }} | ||
| 122 | </div> | ||
| 123 | </div> | ||
| 124 | <!-- <div class="fr mb20" @click="switchTabletype">--> | ||
| 125 | <!-- <el-button plain type="primary" :icon="Switch" v-if="tableType==1">--> | ||
| 126 | <!-- {{ language == 0 ? '按人员查看报项' : 'View Entries by Participant' }}--> | ||
| 127 | <!-- </el-button>--> | ||
| 128 | <!-- <el-button plain type="primary" :icon="Switch" v-else>--> | ||
| 129 | <!-- {{ language == 0 ? '按组别查看报项' : 'View Entries by Group' }}--> | ||
| 130 | <!-- </el-button>--> | ||
| 131 | <!-- </div>--> | ||
| 132 | <sign-info-table v-if="tableType==0" :match-id="matchId" | ||
| 133 | :extraform="extraform" :list="signInfoList" | ||
| 134 | @editExtra="goPersonInfo"/> | ||
| 135 | <zu-table v-else :list="zuTableList" @delete="removeThis"/> | ||
| 136 | <div class="text-center mt20"> | ||
| 137 | <el-button type="primary" class="w200px" plain round @click="goPrev()"> | ||
| 138 | {{ language == 0 ? "上一步" : 'Go back' }} | ||
| 139 | </el-button> | ||
| 140 | <el-button type="primary" class="btn-lineG w200px" round @click="submitForm()"> | ||
| 141 | {{ language == 0 ? '预览报名信息' : 'Preview registration information' }} | ||
| 142 | </el-button> | ||
| 143 | </div> | ||
| 144 | </div> | ||
| 145 | </el-card> | ||
| 146 | </div> | ||
| 147 | |||
| 148 | <dialogAddCoach ref="dialogAddCoachRef"/> | ||
| 149 | <dialogAllSportsmanList ref="dialogAllSportsmanListRef" @transfer="getChoosed" @submitForm="getSignInfoList"/> | ||
| 150 | <dialogImport ref="dialogImportProps" @submitForm="getMySignInfo"/> | ||
| 151 | <el-dialog v-model="showResult" :close-on-click-modal="false" :show-close="false"> | ||
| 152 | <el-result icon="success" :title="language==0?'报名成功':'Sign up successful'"> | ||
| 153 | <template #extra> | ||
| 154 | <el-button type="primary" @click="downloadVoucher">下载凭证</el-button> | ||
| 155 | <el-button type="primary" @click="goMySign">{{ language == 0 ? '查看报项' : 'View Entries' }}</el-button> | ||
| 156 | </template> | ||
| 157 | </el-result> | ||
| 158 | |||
| 159 | </el-dialog> | ||
| 160 | <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList"/> | ||
| 161 | <dialogWdsf ref="popWdsf" @submitForm="getSignInfoList"/> | ||
| 162 | <el-tour v-model="openTour" :current="tourCurrent"> | ||
| 163 | <el-tour-step target="#addRef" title="第一步" description="点击选择运动员" :next-button-props="nextButtonProps"/> | ||
| 164 | <el-tour-step v-if="choosedList.length>0" target="#chooseArr" title="第二步" description="勾选报项运动员"/> | ||
| 165 | <el-tour-step v-if="projectList.length>0" target="#projectbox" title="第三步" description="选择报名项目"/> | ||
| 166 | <el-tour-step v-if="projectIds.length>0" target="#signUpBtn" title="第四步" description="点击报项"/> | ||
| 167 | </el-tour> | ||
| 168 | </div> | ||
| 169 | </template> | ||
| 170 | |||
| 171 | <script setup> | ||
| 172 | import {ref, reactive, toRefs, watch} from 'vue' | ||
| 173 | import * as match from '@/apiPc/match' | ||
| 174 | import {getCurrentInstance, onMounted} from '@vue/runtime-core' | ||
| 175 | import DialogAddCoach from './components/addCoach' | ||
| 176 | import DialogAllSportsmanList from './components/allSportsmanList' | ||
| 177 | import DialogImport from './components/import' | ||
| 178 | import DialogExtraForm from './components/extraForm' | ||
| 179 | import DialogWdsf from './components/wdsfForm' | ||
| 180 | import {Search, Switch} from "@element-plus/icons-vue"; | ||
| 181 | const {proxy} = getCurrentInstance() | ||
| 182 | const router = useRouter() | ||
| 183 | const route = useRoute() | ||
| 184 | import _ from 'lodash' | ||
| 185 | import {ElMessage, ElMessageBox} from 'element-plus' | ||
| 186 | import cache from "@/plugins/cache" | ||
| 187 | import TeamSignStep from "@/viewsPc/match/components/teamSignStep" | ||
| 188 | import CoachInfoRow from "@/viewsPc/match/components/coachInfo-row" | ||
| 189 | import SignInfoTable from "@/viewsPc/match/components/signInfo-table" | ||
| 190 | import ZuTable from '@/viewsPc/match/components/zu-table' | ||
| 191 | import {signgetSignInfoConflict} from "@/apiPc/match"; | ||
| 192 | import {useStorage} from "@vueuse/core/index"; | ||
| 193 | const language= useStorage('language',0) | ||
| 194 | const data = reactive({ | ||
| 195 | coachForm: {}, activeStep: 2, | ||
| 196 | tourCurrent:0, | ||
| 197 | tableData: [], | ||
| 198 | signInfoList: [], | ||
| 199 | zuTableList: [], | ||
| 200 | choosedList: [], | ||
| 201 | choosedListBak: [], | ||
| 202 | athletesQuery: { | ||
| 203 | name: '' | ||
| 204 | }, | ||
| 205 | zuQuery: { | ||
| 206 | name: '' | ||
| 207 | }, | ||
| 208 | extraPersonInfoMapList: [], | ||
| 209 | teamList: [], | ||
| 210 | extraform: [], | ||
| 211 | groupId: route.query.groupId || 0, | ||
| 212 | signType: '', | ||
| 213 | coachOrLeaderFlag: null, | ||
| 214 | noPhotoCanSign: null, | ||
| 215 | showResult: false, | ||
| 216 | showExtraForm: false, | ||
| 217 | loadingProject: false, | ||
| 218 | activeTeam: '', | ||
| 219 | names: {}, | ||
| 220 | choosedchoosed: [], | ||
| 221 | projectIds: [], | ||
| 222 | projectList: [], | ||
| 223 | choosed2List: [], | ||
| 224 | choosed2Listbak: [], | ||
| 225 | projectQuery: {}, tableType: 1, | ||
| 226 | openTour:false | ||
| 227 | }) | ||
| 228 | const { | ||
| 229 | activeTeam, names, tableData, signInfoList, zuTableList, choosedList,choosedListBak, | ||
| 230 | extraform, groupId, signType, coachOrLeaderFlag, showResult, noPhotoCanSign, projectIds, choosedchoosed, activeStep, projectList, choosed2List,choosed2Listbak, loadingProject, | ||
| 231 | projectQuery, tableType, athletesQuery, zuQuery,openTour,tourCurrent | ||
| 232 | } = toRefs(data) | ||
| 233 | const nextButtonProps = ref({}) | ||
| 234 | const matchId = ref(route.query.matchId) | ||
| 235 | let signInfoType = null | ||
| 236 | onMounted(() => { | ||
| 237 | signType.value = route.query.signType || 1 | ||
| 238 | getSignInfoList() | ||
| 239 | getMatch(matchId.value) | ||
| 240 | getMySignInfo() | ||
| 241 | // openTour.value = true | ||
| 242 | }) | ||
| 243 | |||
| 244 | let chargeFlag | ||
| 245 | |||
| 246 | function getMatch(id) { | ||
| 247 | match.getMatchById({ | ||
| 248 | id: id | ||
| 249 | }).then(res => { | ||
| 250 | chargeFlag = res.data.chargeFlag | ||
| 251 | noPhotoCanSign.value = res.data.noPhotoCanSign | ||
| 252 | coachOrLeaderFlag.value = res.data.coachOrLeaderFlag | ||
| 253 | extraform.value = JSON.parse(res.data.participantsInfo) | ||
| 254 | }) | ||
| 255 | } | ||
| 256 | |||
| 257 | function getMySignInfo() { | ||
| 258 | // 获取已报 | ||
| 259 | match.getMySignInfo({ | ||
| 260 | cptId: matchId.value, | ||
| 261 | groupId: groupId.value | ||
| 262 | }).then(res => { | ||
| 263 | tableData.value = res.data.signInfo | ||
| 264 | signInfoType = res.data.type | ||
| 265 | }) | ||
| 266 | } | ||
| 267 | |||
| 268 | function getSignInfoList() { | ||
| 269 | match.getMySignInfoList({ | ||
| 270 | cptId: matchId.value, | ||
| 271 | groupId: groupId.value | ||
| 272 | }).then(res => { | ||
| 273 | signInfoList.value = res.data.singleData || [] | ||
| 274 | zuTableList.value = res.data.zuData || [] | ||
| 275 | }) | ||
| 276 | } | ||
| 277 | |||
| 278 | function submitForm() { | ||
| 279 | if (signInfoType == '1') { | ||
| 280 | ElMessageBox.confirm(language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission', | ||
| 281 | language.value == 0 ? '提示' : 'Tips', { | ||
| 282 | confirmButtonText: language.value == 0 ? '确定' : 'OK', | ||
| 283 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 284 | type: 'warning' | ||
| 285 | }).then(() => { | ||
| 286 | router.push({name: 'myMatch'}) | ||
| 287 | }) | ||
| 288 | return | ||
| 289 | } | ||
| 290 | if (extraform.value && extraform.value.length > 0) { | ||
| 291 | let needBuchong = false | ||
| 292 | for (const e of extraform.value) { | ||
| 293 | if (e.status == '0') { | ||
| 294 | needBuchong = true | ||
| 295 | } | ||
| 296 | } | ||
| 297 | for (const s of signInfoList.value) { | ||
| 298 | if (s.extraPersonInfo == null && needBuchong) { | ||
| 299 | ElMessage.error(language.value == 0 ? '请完善补充信息' : 'Please fill in the supplementary information') | ||
| 300 | tableType.value = 0 | ||
| 301 | return | ||
| 302 | } | ||
| 303 | } | ||
| 304 | } | ||
| 305 | if (signInfoList.value.length == 0) { | ||
| 306 | if (language.value == 0) { | ||
| 307 | ElMessage.error('请至少选择一个项目') | ||
| 308 | } else { | ||
| 309 | ElMessage.error('select at least one project') | ||
| 310 | } | ||
| 311 | return | ||
| 312 | } | ||
| 313 | router.push({ | ||
| 314 | name: 'signPreview', | ||
| 315 | query: { | ||
| 316 | matchId: matchId.value, | ||
| 317 | groupId: groupId.value | ||
| 318 | } | ||
| 319 | }) | ||
| 320 | } | ||
| 321 | |||
| 322 | function goPrev() { | ||
| 323 | router.push({ | ||
| 324 | name: `chooseCoach`, | ||
| 325 | query: { | ||
| 326 | matchId: matchId.value | ||
| 327 | } | ||
| 328 | }) | ||
| 329 | } | ||
| 330 | |||
| 331 | function chooseSportman() { | ||
| 332 | const params = { | ||
| 333 | title: language.value == 0 ? '选择运动员' : 'Participating athletes', | ||
| 334 | matchId: matchId.value, | ||
| 335 | groupId: groupId.value, | ||
| 336 | rankId: activeTeam.value, | ||
| 337 | signType: signType.value, | ||
| 338 | noPhotoCanSign: noPhotoCanSign.value, | ||
| 339 | coachOrLeaderFlag: coachOrLeaderFlag.value, | ||
| 340 | choosedList: choosedList.value | ||
| 341 | } | ||
| 342 | proxy.$refs['dialogAllSportsmanListRef'].open(params) | ||
| 343 | } | ||
| 344 | |||
| 345 | function changechoosed(e) { | ||
| 346 | // console.log(e) | ||
| 347 | choosed2List.value = [] | ||
| 348 | choosed2Listbak.value = [] | ||
| 349 | |||
| 350 | for (var c of choosedList.value) { | ||
| 351 | if (choosedchoosed.value.indexOf(c.id) > -1) { | ||
| 352 | choosed2List.value.push(c) | ||
| 353 | choosed2Listbak.value.push(c) | ||
| 354 | } | ||
| 355 | } | ||
| 356 | } | ||
| 357 | |||
| 358 | function getProjectList() { | ||
| 359 | projectIds.value = [] | ||
| 360 | if (choosedchoosed.value.length == 0) { | ||
| 361 | // ElMessage.error('请先选择运动员') | ||
| 362 | projectList.value = [] | ||
| 363 | return | ||
| 364 | } | ||
| 365 | loadingProject.value = true | ||
| 366 | //根据已选人员id 获取项目列表 | ||
| 367 | var obj = { | ||
| 368 | cptId: matchId.value, | ||
| 369 | perIds: choosedchoosed.value.toString() | ||
| 370 | } | ||
| 371 | match.getProjectPageByPerIds(obj).then(res => { | ||
| 372 | projectList.value = res.rows | ||
| 373 | loadingProject.value = false | ||
| 374 | if(choosed2Listbak.value.length>0 && projectList.value.length>0){ | ||
| 375 | tourCurrent.value = 2 | ||
| 376 | } | ||
| 377 | }).catch(err => { | ||
| 378 | loadingProject.value = false | ||
| 379 | ElMessage.error(err.msg) | ||
| 380 | }) | ||
| 381 | } | ||
| 382 | |||
| 383 | function queryAthletes() { | ||
| 384 | choosedListBak.value = [] | ||
| 385 | for (var t of choosedList.value) { | ||
| 386 | if (t.realName.indexOf(athletesQuery.value.name) > -1) { | ||
| 387 | // 筛选 | ||
| 388 | choosedListBak.value.push(t) | ||
| 389 | } | ||
| 390 | } | ||
| 391 | } | ||
| 392 | |||
| 393 | function queryTeam() { | ||
| 394 | choosed2Listbak.value = [] | ||
| 395 | choosedchoosed.value = [] | ||
| 396 | for (var t of choosed2List.value) { | ||
| 397 | if (t.realName.indexOf(zuQuery.value.name) > -1) { | ||
| 398 | // 筛选 | ||
| 399 | choosed2Listbak.value.push(t) | ||
| 400 | choosedchoosed.value.push(t.id) | ||
| 401 | } | ||
| 402 | } | ||
| 403 | } | ||
| 404 | |||
| 405 | function getChoosed(list) { | ||
| 406 | console.log(list) | ||
| 407 | choosedList.value = list | ||
| 408 | choosedListBak.value = list | ||
| 409 | if(list.length>0){ | ||
| 410 | // openTour.value = false | ||
| 411 | tourCurrent.value = 1 | ||
| 412 | } | ||
| 413 | // console.log('选好了', choosedchoosed.value) | ||
| 414 | } | ||
| 415 | |||
| 416 | function addCoach() { | ||
| 417 | if (signInfoType == '2') { | ||
| 418 | match.recoverMySign({ | ||
| 419 | cptId: matchId.value, | ||
| 420 | groupId: groupId.value | ||
| 421 | }).then(res => { | ||
| 422 | if (res.msg.indexOf('Exception:') > -1) { | ||
| 423 | const msg = res.msg.slice(10) | ||
| 424 | ElMessageBox.confirm(msg, '提示', { | ||
| 425 | confirmButtonText: '确定', | ||
| 426 | cancelButtonText: '取消', | ||
| 427 | type: 'warning' | ||
| 428 | }).then(() => { | ||
| 429 | console.log('用户点击确定') | ||
| 430 | }) | ||
| 431 | return | ||
| 432 | } | ||
| 433 | getMySignInfo() | ||
| 434 | }) | ||
| 435 | } | ||
| 436 | const params = { | ||
| 437 | title: '新增运动员', | ||
| 438 | id: 0, | ||
| 439 | groupId: groupId.value | ||
| 440 | } | ||
| 441 | proxy.$refs['dialogAddCoachRef'].open(params) | ||
| 442 | } | ||
| 443 | |||
| 444 | function emptyChoosed() { | ||
| 445 | choosedList.value = [] | ||
| 446 | choosedListBak.value = [] | ||
| 447 | } | ||
| 448 | |||
| 449 | function emptyChangechoosed() { | ||
| 450 | choosedchoosed.value = [] | ||
| 451 | choosed2List.value = [] | ||
| 452 | choosed2Listbak.value = [] | ||
| 453 | projectList.value = [] | ||
| 454 | projectIds.value = [] | ||
| 455 | } | ||
| 456 | |||
| 457 | function signUp() { | ||
| 458 | if (projectIds.value.length == 0) { | ||
| 459 | return | ||
| 460 | } | ||
| 461 | if (choosedchoosed.value.length == 0) { | ||
| 462 | return | ||
| 463 | } | ||
| 464 | const obj = { | ||
| 465 | athleteIds: choosedchoosed.value.toString(), | ||
| 466 | projectIds: projectIds.value.toString(), | ||
| 467 | groupId: groupId.value | ||
| 468 | } | ||
| 469 | match.sportsmanDone(obj).then(res => { | ||
| 470 | choosedchoosed.value = [] | ||
| 471 | choosed2List.value = [] | ||
| 472 | choosed2Listbak.value = [] | ||
| 473 | projectList.value = [] | ||
| 474 | projectIds.value = [] | ||
| 475 | getSignInfoList() | ||
| 476 | }) | ||
| 477 | } | ||
| 478 | |||
| 479 | function removeThis(id) { | ||
| 480 | ElMessageBox.confirm('确定移除这条报项吗?', '提示', { | ||
| 481 | confirmButtonText: '确定', | ||
| 482 | cancelButtonText: '取消', | ||
| 483 | type: 'warning' | ||
| 484 | }).then(() => { | ||
| 485 | match.deleteSign(id).then(res => { | ||
| 486 | // 重新获取已报名信息 | ||
| 487 | ElMessage.success('已移除该报项') | ||
| 488 | getSignInfoList() | ||
| 489 | }) | ||
| 490 | }) | ||
| 491 | } | ||
| 492 | |||
| 493 | function changeCoach(cptId, groupId) { | ||
| 494 | // 更换教练 | ||
| 495 | const params = { | ||
| 496 | title: '修改教练', | ||
| 497 | groupId: groupId, | ||
| 498 | cptId: cptId | ||
| 499 | } | ||
| 500 | proxy.$refs['popChangeCoach'].open(params) | ||
| 501 | } | ||
| 502 | |||
| 503 | function importSportman() { | ||
| 504 | const params = { | ||
| 505 | title: '批量导入人员', | ||
| 506 | groupId: groupId.value | ||
| 507 | } | ||
| 508 | proxy.$refs['dialogImportProps'].open(params) | ||
| 509 | } | ||
| 510 | |||
| 511 | function goMySign() { | ||
| 512 | router.push({ | ||
| 513 | name: 'myMatch' | ||
| 514 | }) | ||
| 515 | } | ||
| 516 | |||
| 517 | const goPersonInfo = (row) => { | ||
| 518 | if (signInfoType == '1') { | ||
| 519 | ElMessageBox.alert('已报项,前往我的报项', '提示', { | ||
| 520 | confirmButtonText: 'OK', | ||
| 521 | callback: (Action) => { | ||
| 522 | router.push({name: 'myMatch'}) | ||
| 523 | } | ||
| 524 | }) | ||
| 525 | return | ||
| 526 | } | ||
| 527 | // 完善补充信息 | ||
| 528 | console.log(row) | ||
| 529 | // debugger | ||
| 530 | const params = { | ||
| 531 | matchId:matchId.value, | ||
| 532 | title: language.value == 0 ? '完善补充信息' : 'Complete the supplementary information', | ||
| 533 | participantsInfoArr: extraform.value, | ||
| 534 | personId: row.personInfo.id, | ||
| 535 | extraId: row.extraPersonInfo?.id || 0 | ||
| 536 | } | ||
| 537 | proxy.$refs['popExtraForm'].open(_.cloneDeep(params)) | ||
| 538 | } | ||
| 539 | |||
| 540 | function downloadVoucher() { | ||
| 541 | // 下载凭证 | ||
| 542 | proxy.download( | ||
| 543 | `/pdf/getPayedOrderPdf/${matchId.value}/${groupId.value || 0}`, {}, '报项凭证.pdf' | ||
| 544 | ) | ||
| 545 | } | ||
| 546 | |||
| 547 | function editPerson(id) { | ||
| 548 | proxy.$refs['dialogAddCoachRef'].open({ | ||
| 549 | title: '编辑人员', | ||
| 550 | id: id, | ||
| 551 | groupId: groupId.value | ||
| 552 | }) | ||
| 553 | } | ||
| 554 | |||
| 555 | function switchTabletype() { | ||
| 556 | if (tableType.value == 0) { | ||
| 557 | tableType.value = 1 | ||
| 558 | } else { | ||
| 559 | tableType.value = 0 | ||
| 560 | } | ||
| 561 | } | ||
| 562 | |||
| 563 | function changeProject(e) { | ||
| 564 | console.log(projectIds.value,e) | ||
| 565 | var obj | ||
| 566 | obj = _.find(projectList.value, (c) => { | ||
| 567 | return e.indexOf(c.id)>-1 | ||
| 568 | }) | ||
| 569 | // if(obj.majorFlag==1){ | ||
| 570 | //需要填wdsf | ||
| 571 | // const params = { | ||
| 572 | // title: '验证WDSF', | ||
| 573 | // list:choosed2Listbak.value | ||
| 574 | // } | ||
| 575 | // proxy.$refs['popWdsf'].open(_.cloneDeep(params)) | ||
| 576 | // } | ||
| 577 | } | ||
| 578 | watch(choosedchoosed, (newVal, oldVal) => { | ||
| 579 | // console.log(choosedchoosed.value) | ||
| 580 | if(newVal.length>oldVal.length){ | ||
| 581 | match.signgetSignInfoConflict({ | ||
| 582 | cptId: matchId.value, | ||
| 583 | perId: _.last(newVal), | ||
| 584 | groupId: groupId.value | ||
| 585 | }).then(res => { | ||
| 586 | if(!res.data){ | ||
| 587 | ElMessage.error(language.value==0?'该人员已在其他团队中报名,请重新选择':'This person has already registered in another team, please select again') | ||
| 588 | choosedchoosed.value = _.without(choosedchoosed.value,_.last(newVal)) | ||
| 589 | |||
| 590 | for(var c of choosed2List.value){ | ||
| 591 | if(c.id == _.last(newVal)){ | ||
| 592 | choosed2List.value = _.without(choosed2List.value,c) | ||
| 593 | } | ||
| 594 | } | ||
| 595 | for(var c of choosed2Listbak.value){ | ||
| 596 | if(c.id == _.last(newVal)){ | ||
| 597 | choosed2Listbak.value = _.without(choosed2Listbak.value,c) | ||
| 598 | } | ||
| 599 | } | ||
| 600 | projectList.value = [] | ||
| 601 | console.log(choosedchoosed.value,choosed2List.value,choosed2Listbak.value) | ||
| 602 | return | ||
| 603 | } else { | ||
| 604 | getProjectList() | ||
| 605 | } | ||
| 606 | }) | ||
| 607 | } else { | ||
| 608 | getProjectList() | ||
| 609 | } | ||
| 610 | }) | ||
| 611 | </script> | ||
| 612 | |||
| 613 | <style scoped lang="scss"> | ||
| 614 | :deep(.el-checkbox__label) { | ||
| 615 | flex: 1 1 auto; | ||
| 616 | } | ||
| 617 | |||
| 618 | .flexBetweenBox { | ||
| 619 | width: 100%; | ||
| 620 | height: auto; | ||
| 621 | border-bottom: 1px solid #eee; | ||
| 622 | padding: 0 10px; | ||
| 623 | } | ||
| 624 | |||
| 625 | .flexBetweenBox:nth-child(odd) { | ||
| 626 | background: #FAFBFD; | ||
| 627 | } | ||
| 628 | |||
| 629 | .flexBetween { | ||
| 630 | padding: 10px; | ||
| 631 | border-left: 1px solid #eee; | ||
| 632 | |||
| 633 | .l { | ||
| 634 | div { | ||
| 635 | margin: 4px 0 0; | ||
| 636 | color: #999; | ||
| 637 | } | ||
| 638 | } | ||
| 639 | } | ||
| 640 | |||
| 641 | .app-container { | ||
| 642 | padding: 0; | ||
| 643 | background: #F5F7F9; | ||
| 644 | } | ||
| 645 | |||
| 646 | .panel-footer .el-button--success { | ||
| 647 | background: #254385; | ||
| 648 | border: none; | ||
| 649 | padding: 0 40px; | ||
| 650 | font-size: 16px; | ||
| 651 | } | ||
| 652 | |||
| 653 | .panel-footer .el-button--success.is-plain { | ||
| 654 | background: #fff; | ||
| 655 | border: 1px solid #2ED981; | ||
| 656 | color: #2ED981; | ||
| 657 | } | ||
| 658 | |||
| 659 | .hasChoose { | ||
| 660 | margin: 0 0 20px; | ||
| 661 | display: flex; | ||
| 662 | justify-content: space-between; | ||
| 663 | |||
| 664 | button { | ||
| 665 | position: relative; | ||
| 666 | margin: 10px; | ||
| 667 | } | ||
| 668 | |||
| 669 | .choseItem { | ||
| 670 | margin: 10px; | ||
| 671 | position: relative; | ||
| 672 | |||
| 673 | .poClose { | ||
| 674 | position: absolute; | ||
| 675 | right: -6px; | ||
| 676 | top: -12px; | ||
| 677 | z-index: 1; | ||
| 678 | } | ||
| 679 | } | ||
| 680 | } | ||
| 681 | |||
| 682 | .chooseForm { | ||
| 683 | :deep(.el-form-item__content) { | ||
| 684 | background: rgba(245, 247, 249, 0.38); | ||
| 685 | padding: 20px 40px 10px; | ||
| 686 | } | ||
| 687 | |||
| 688 | .el-checkbox { | ||
| 689 | height: auto; | ||
| 690 | margin-right: 20px; | ||
| 691 | } | ||
| 692 | |||
| 693 | :deep(.el-checkbox__input) { | ||
| 694 | position: absolute; | ||
| 695 | right: 0; | ||
| 696 | top: 0; | ||
| 697 | } | ||
| 698 | |||
| 699 | .name { | ||
| 700 | text-align: center; | ||
| 701 | } | ||
| 702 | } | ||
| 703 | |||
| 704 | :deep(.el-avatar) > img { | ||
| 705 | width: 100%; | ||
| 706 | } | ||
| 707 | |||
| 708 | .panel { | ||
| 709 | height: 100%; | ||
| 710 | } | ||
| 711 | |||
| 712 | .border-info { | ||
| 713 | .item { | ||
| 714 | margin: 5px 0; | ||
| 715 | color: #4C5359; | ||
| 716 | font-size: 14px; | ||
| 717 | |||
| 718 | label { | ||
| 719 | font-size: 14px; | ||
| 720 | margin-right: 14px | ||
| 721 | } | ||
| 722 | } | ||
| 723 | } | ||
| 724 | |||
| 725 | .ttbb { | ||
| 726 | font-size: 14px; | ||
| 727 | color: #4C5359; | ||
| 728 | display: flex; | ||
| 729 | justify-content: center; | ||
| 730 | |||
| 731 | div { | ||
| 732 | padding: 20px; | ||
| 733 | position: relative; | ||
| 734 | cursor: pointer; | ||
| 735 | } | ||
| 736 | |||
| 737 | div:first-child::after { | ||
| 738 | content: ''; | ||
| 739 | position: absolute; | ||
| 740 | right: 0; | ||
| 741 | background: #ccc; | ||
| 742 | width: 1px; | ||
| 743 | height: 14px; | ||
| 744 | top: 0; | ||
| 745 | bottom: 0; | ||
| 746 | margin: auto; | ||
| 747 | } | ||
| 748 | |||
| 749 | .active { | ||
| 750 | color: var(--el-color-primary); | ||
| 751 | |||
| 752 | &::before { | ||
| 753 | width: 33px; | ||
| 754 | content: ''; | ||
| 755 | position: absolute; | ||
| 756 | height: 2px; | ||
| 757 | bottom: 14px; | ||
| 758 | left: 0; | ||
| 759 | right: 0; | ||
| 760 | margin: auto; | ||
| 761 | background: #453DEA; | ||
| 762 | border-radius: 1px; | ||
| 763 | } | ||
| 764 | } | ||
| 765 | } | ||
| 766 | |||
| 767 | .noPicChooseForm { | ||
| 768 | overflow: auto; | ||
| 769 | //height: 70vh; | ||
| 770 | |||
| 771 | .el-checkbox-group { | ||
| 772 | display: flex; | ||
| 773 | flex-wrap: wrap; | ||
| 774 | text-align: justify; | ||
| 775 | |||
| 776 | .el-button { | ||
| 777 | width: 31%; | ||
| 778 | margin: 1%; | ||
| 779 | } | ||
| 780 | |||
| 781 | .el-checkbox { | ||
| 782 | margin: 1%; | ||
| 783 | width: 31%; | ||
| 784 | overflow: hidden; | ||
| 785 | } | ||
| 786 | |||
| 787 | .name { | ||
| 788 | justify-content: left; | ||
| 789 | } | ||
| 790 | } | ||
| 791 | } | ||
| 792 | |||
| 793 | .name { | ||
| 794 | display: flex; | ||
| 795 | align-items: center; | ||
| 796 | justify-content: center; | ||
| 797 | |||
| 798 | img { | ||
| 799 | height: 20px; | ||
| 800 | margin-left: 4px; | ||
| 801 | } | ||
| 802 | } | ||
| 803 | </style> |
| ... | @@ -7,7 +7,12 @@ | ... | @@ -7,7 +7,12 @@ |
| 7 | <el-form ref="dialogRef" :model="form" :rules="language==0?rules:rules_cn" label-width="120px" inline> | 7 | <el-form ref="dialogRef" :model="form" :rules="language==0?rules:rules_cn" label-width="120px" inline> |
| 8 | <el-row :gutter="30" class="mt30"> | 8 | <el-row :gutter="30" class="mt30"> |
| 9 | <el-col :lg="12" class="touxiang"> | 9 | <el-col :lg="12" class="touxiang"> |
| 10 | 10 | <el-form-item prop="picUrl" :label="language==0?'个人照片':'photo'"> | |
| 11 | <ImageUpload2 | ||
| 12 | v-model="form.picUrl" :crop-height="280" :crop-width="200" class="threeFour" :limit="1" | ||
| 13 | :is-show-tip="false" | ||
| 14 | /> | ||
| 15 | </el-form-item> | ||
| 11 | <el-form-item :label="language==0?'姓氏':'surname'" prop="xing" required> | 16 | <el-form-item :label="language==0?'姓氏':'surname'" prop="xing" required> |
| 12 | <el-input v-model="form.xing"/> | 17 | <el-input v-model="form.xing"/> |
| 13 | </el-form-item> | 18 | </el-form-item> |
| ... | @@ -27,13 +32,15 @@ | ... | @@ -27,13 +32,15 @@ |
| 27 | <el-form-item :label="language==0?'证件号码':'ID NO'" prop="idcCode" required> | 32 | <el-form-item :label="language==0?'证件号码':'ID NO'" prop="idcCode" required> |
| 28 | <el-input v-model="form.idcCode" @blur="checkCode"/> | 33 | <el-input v-model="form.idcCode" @blur="checkCode"/> |
| 29 | </el-form-item> | 34 | </el-form-item> |
| 35 | |||
| 36 | </el-col> | ||
| 37 | <el-col :lg="12"> | ||
| 30 | <el-form-item :label="language==0?'性别':'sex'" prop="sex"> | 38 | <el-form-item :label="language==0?'性别':'sex'" prop="sex"> |
| 31 | <el-radio-group v-model="form.sex"> | 39 | <el-radio-group v-model="form.sex"> |
| 32 | <el-radio value="0">{{ language==0?'女':'female' }}</el-radio> | 40 | <el-radio value="0">{{ language==0?'女':'female' }}</el-radio> |
| 33 | <el-radio value="1">{{ language==0?'男':'male' }}</el-radio> | 41 | <el-radio value="1">{{ language==0?'男':'male' }}</el-radio> |
| 34 | </el-radio-group> | 42 | </el-radio-group> |
| 35 | </el-form-item> | 43 | </el-form-item> |
| 36 | |||
| 37 | <el-form-item :label="language==0?'出生日期':'birth'" prop="birth" required> | 44 | <el-form-item :label="language==0?'出生日期':'birth'" prop="birth" required> |
| 38 | <el-date-picker | 45 | <el-date-picker |
| 39 | v-model="form.birth" | 46 | v-model="form.birth" |
| ... | @@ -46,38 +53,31 @@ | ... | @@ -46,38 +53,31 @@ |
| 46 | <el-option v-for="l in labels" :key="l.value" :value="l.value" :label="language==0?l.label:l.enlabel"/> | 53 | <el-option v-for="l in labels" :key="l.value" :value="l.value" :label="language==0?l.label:l.enlabel"/> |
| 47 | </el-select> | 54 | </el-select> |
| 48 | </el-form-item> | 55 | </el-form-item> |
| 49 | </el-col> | ||
| 50 | <el-col :lg="12"> | ||
| 51 | <el-form-item :label="language==0?'手机号码':'Phone'" prop="phone" required> | 56 | <el-form-item :label="language==0?'手机号码':'Phone'" prop="phone" required> |
| 52 | <el-input v-model="form.phone" type="number"/> | 57 | <el-input v-model="form.phone" type="number"/> |
| 53 | </el-form-item> | 58 | </el-form-item> |
| 54 | 59 | ||
| 55 | 60 | ||
| 56 | <el-form-item :label="language==0?'所属国家':'Nationality'" prop="countryId" required> | 61 | <!-- <el-form-item :label="language==0?'所属国家':'Nationality'" prop="countryId" required>--> |
| 57 | <el-select :disabled="language==0" filterable v-model="form.countryId" style="width: 100%;" @change="changeCountryId"> | 62 | <!-- <el-select :disabled="language==0" filterable v-model="form.countryId" style="width: 100%;" @change="changeCountryId">--> |
| 58 | <el-option v-for="item in countryList" :key="item.id" :label="language==0?item.name:item.enName" :value="item.id"/> | 63 | <!-- <el-option v-for="item in countryList" :key="item.id" :label="language==0?item.name:item.enName" :value="item.id"/>--> |
| 59 | </el-select> | 64 | <!-- </el-select>--> |
| 60 | </el-form-item> | 65 | <!-- </el-form-item>--> |
| 61 | 66 | ||
| 62 | <el-form-item :label="language==0?'详细地址':'Address'" prop="address" required> | 67 | <!-- <el-form-item :label="language==0?'详细地址':'Address'" prop="address" required>--> |
| 63 | <el-cascader v-if="form.countryId == 240" | 68 | <!-- <el-cascader v-if="form.countryId == 240"--> |
| 64 | v-model="form.regionId" | 69 | <!-- v-model="form.regionId"--> |
| 65 | style="width: 100%;margin-bottom: 15px" | 70 | <!-- style="width: 100%;margin-bottom: 15px"--> |
| 66 | :options="regionsList" | 71 | <!-- :options="regionsList"--> |
| 67 | :props="{ label:'text' }" | 72 | <!-- :props="{ label:'text' }"--> |
| 68 | /> | 73 | <!-- />--> |
| 69 | <el-input v-model="form.address" type="textarea" :rows="4"/> | 74 | <!-- <el-input v-model="form.address" type="textarea" :rows="4"/>--> |
| 70 | 75 | ||
| 71 | </el-form-item> | 76 | <!-- </el-form-item>--> |
| 72 | <el-form-item :label="language==0?'WDSF会员号':'WDSF code'" prop="wdsfMin"> | 77 | <el-form-item :label="language==0?'WDSF会员号':'WDSF code'" prop="wdsfMin"> |
| 73 | <el-input v-model="form.wdsfMin" type="number"/> | 78 | <el-input v-model="form.wdsfMin" type="number"/> |
| 74 | </el-form-item> | 79 | </el-form-item> |
| 75 | <el-form-item prop="picUrl" :label="language==0?'个人照片':'photo'"> | 80 | |
| 76 | <ImageUpload2 | ||
| 77 | v-model="form.picUrl" :crop-height="280" :crop-width="200" class="threeFour" :limit="1" | ||
| 78 | :is-show-tip="false" | ||
| 79 | /> | ||
| 80 | </el-form-item> | ||
| 81 | 81 | ||
| 82 | <!-- <el-form-item :label="language==0?'邮箱':'Email'" prop="email" required>--> | 82 | <!-- <el-form-item :label="language==0?'邮箱':'Email'" prop="email" required>--> |
| 83 | <!-- <el-input v-model="form.email"/>--> | 83 | <!-- <el-input v-model="form.email"/>--> | ... | ... |
| ... | @@ -8,7 +8,13 @@ | ... | @@ -8,7 +8,13 @@ |
| 8 | </el-col> | 8 | </el-col> |
| 9 | <el-col :span="20"> | 9 | <el-col :span="20"> |
| 10 | <div class="item"><label>{{ language==0?'团体名称':'Team Name' }}</label>{{ groupInfo.name }}</div> | 10 | <div class="item"><label>{{ language==0?'团体名称':'Team Name' }}</label>{{ groupInfo.name }}</div> |
| 11 | <div class="item"><label>{{ language==0?'团体类型':'Group type' }}</label>{{ groupInfo.typeStr }}</div> | 11 | <div class="item"><label>{{ language==0?'团体类型':'Group type' }}</label> |
| 12 | <text v-if="groupInfo.type=='0'">{{language==0?'普通院校':'School'}}</text> | ||
| 13 | <text v-if="groupInfo.type=='1'">{{language==0?'专业舞蹈学校':'Professional dance school'}}</text> | ||
| 14 | <text v-if="groupInfo.type=='2'">{{language==0?'培训机构/俱乐部':'Company/Club'}}</text> | ||
| 15 | <text v-if="groupInfo.type=='3'">{{language==0?'地方协会':'Local Association'}}</text> | ||
| 16 | <text v-if="groupInfo.type=='4'">{{language==0?'国家协会':'National Association'}}</text> | ||
| 17 | </div> | ||
| 12 | </el-col> | 18 | </el-col> |
| 13 | </el-row> | 19 | </el-row> |
| 14 | </el-col> | 20 | </el-col> | ... | ... |
src/viewsPc/match/components/wdsfForm.vue
0 → 100644
| 1 | <template> | ||
| 2 | <el-dialog | ||
| 3 | v-model="show" :title="title" width="500px" append-to-body :close-on-click-modal="false" | ||
| 4 | destroy-on-close | ||
| 5 | > | ||
| 6 | <el-form label-width="120"> | ||
| 7 | <el-form-item required :label="item.realName" v-for="item in list"> | ||
| 8 | <el-input :disabled="item.checked" | ||
| 9 | v-model="item.wdsfMin" placeholder="输入WDSF会员号" | ||
| 10 | > | ||
| 11 | <template #append> | ||
| 12 | <view @click="checkCode(item)" class="checkbb"> | ||
| 13 | <el-icon v-if="item.checked" color="#13ce66" size="24"><CircleCheck /></el-icon> | ||
| 14 | <text class="text-primary" v-else>验证</text> | ||
| 15 | </view> | ||
| 16 | </template> | ||
| 17 | </el-input> | ||
| 18 | </el-form-item> | ||
| 19 | </el-form> | ||
| 20 | <template #footer> | ||
| 21 | <div class="dialog-footer text-center"> | ||
| 22 | <el-button type="primary" @click="submitForm">保 存</el-button> | ||
| 23 | <el-button @click="cancel">取 消</el-button> | ||
| 24 | </div> | ||
| 25 | </template> | ||
| 26 | </el-dialog> | ||
| 27 | </template> | ||
| 28 | |||
| 29 | <script setup> | ||
| 30 | import { reactive, ref, toRefs, watch } from 'vue' | ||
| 31 | import { getCurrentInstance, nextTick, onMounted } from '@vue/runtime-core' | ||
| 32 | import * as match from '@/apiPc/match' | ||
| 33 | import { SuccessFilled } from '@element-plus/icons-vue' | ||
| 34 | import { ElMessage } from 'element-plus' | ||
| 35 | import { useRoute } from 'vue-router' | ||
| 36 | |||
| 37 | const { proxy } = getCurrentInstance() | ||
| 38 | const emit = defineEmits(['submitForm']) | ||
| 39 | const uploadUrl = ref('/upload/upLoadToFileServer') | ||
| 40 | const route = useRoute() | ||
| 41 | import {useStorage} from "@vueuse/core/index"; | ||
| 42 | const language= useStorage('language',0) | ||
| 43 | |||
| 44 | const data = reactive({ | ||
| 45 | form: {}, | ||
| 46 | show: false, | ||
| 47 | list: [], | ||
| 48 | title: '', | ||
| 49 | groupId: '0' | ||
| 50 | }) | ||
| 51 | const { form, show, countryList, list, title, groupId } = toRefs(data) | ||
| 52 | let extraId = 0 | ||
| 53 | let personId | ||
| 54 | let matchId | ||
| 55 | |||
| 56 | const open = (params) => { | ||
| 57 | console.log(params) | ||
| 58 | show.value = true | ||
| 59 | title.value = params.title | ||
| 60 | matchId = params.matchId | ||
| 61 | list.value = params.list | ||
| 62 | init() | ||
| 63 | } | ||
| 64 | defineExpose({ open }) | ||
| 65 | watch(show, (value) => { | ||
| 66 | if (!value) { | ||
| 67 | form.value = {} | ||
| 68 | list.value = [] | ||
| 69 | } | ||
| 70 | }) | ||
| 71 | |||
| 72 | function init() { | ||
| 73 | for (let n of list.value){ | ||
| 74 | if (n.wdsfMin) { | ||
| 75 | n.checked = true | ||
| 76 | } else { | ||
| 77 | n.checked = false | ||
| 78 | } | ||
| 79 | } | ||
| 80 | } | ||
| 81 | function checkCode(item) { | ||
| 82 | if (!item.wdsfMin) { | ||
| 83 | if (language.value == 0) { | ||
| 84 | ElMessage.error('请填写WDSF卡号') | ||
| 85 | } else { | ||
| 86 | ElMessage.error('Please fill in your WDSF code') | ||
| 87 | } | ||
| 88 | return | ||
| 89 | } | ||
| 90 | |||
| 91 | match.checkWdsf({card: item.wdsfMin}).then(res => { | ||
| 92 | if(res.data.wdsfFlag=='0'){ | ||
| 93 | if (language.value == 0) { | ||
| 94 | ElMessage.error('验证失败,卡号不存在') | ||
| 95 | } else { | ||
| 96 | ElMessage.error('Verification failed, card number does not exist') | ||
| 97 | } | ||
| 98 | return | ||
| 99 | } | ||
| 100 | if(res.data.wdsfFlag=='1'){ | ||
| 101 | item.checked = true | ||
| 102 | } | ||
| 103 | }) | ||
| 104 | } | ||
| 105 | function submitForm() { | ||
| 106 | //list.value | ||
| 107 | show.value = false | ||
| 108 | emit('submitForm') | ||
| 109 | } | ||
| 110 | |||
| 111 | function cancel() { | ||
| 112 | show.value = false | ||
| 113 | } | ||
| 114 | </script> | ||
| 115 | |||
| 116 | <style lang="scss"> | ||
| 117 | .threeFour { | ||
| 118 | width: 100%; | ||
| 119 | |||
| 120 | :deep(.el-upload--picture-card) { | ||
| 121 | width: 120px; | ||
| 122 | height: 160px; | ||
| 123 | } | ||
| 124 | |||
| 125 | :deep(.el-upload-list--picture-card .el-upload-list__item) { | ||
| 126 | width: 120px; | ||
| 127 | height: 160px; | ||
| 128 | } | ||
| 129 | } | ||
| 130 | |||
| 131 | .tip { | ||
| 132 | font-size: 13px; | ||
| 133 | color: #999; | ||
| 134 | margin: 10px 0; | ||
| 135 | |||
| 136 | i { | ||
| 137 | color: red; | ||
| 138 | margin: 0 4px 0 0; | ||
| 139 | } | ||
| 140 | } | ||
| 141 | |||
| 142 | .red { | ||
| 143 | color: #f56c6c; | ||
| 144 | } | ||
| 145 | .checkbb{width: 30px;display: flex;align-items: center;text-align: center;} | ||
| 146 | </style> |
| ... | @@ -25,6 +25,28 @@ | ... | @@ -25,6 +25,28 @@ |
| 25 | <p class="ppl"><label class="bm2">赛事级别:</label>{{ matchData.level }}</p> | 25 | <p class="ppl"><label class="bm2">赛事级别:</label>{{ matchData.level }}</p> |
| 26 | <p class="ppl" v-if="matchData.address"><label class="bm3">地    点:</label>{{ matchData.address }}</p> | 26 | <p class="ppl" v-if="matchData.address"><label class="bm3">地    点:</label>{{ matchData.address }}</p> |
| 27 | <p class="ppl" v-if="matchData.signEndTime"><label class="bm4">报名截止:</label>{{ matchData.signEndTime?.slice(0, 10) }}</p> | 27 | <p class="ppl" v-if="matchData.signEndTime"><label class="bm4">报名截止:</label>{{ matchData.signEndTime?.slice(0, 10) }}</p> |
| 28 | <div> | ||
| 29 | <el-link class="mr20" v-if="matchData.signKnowUrl" type="primary" :href="fillImgUrl(JSON.parse(matchData.signKnowUrl)[0]?.url)" target="_blank"> | ||
| 30 | <el-icon :size="20"> | ||
| 31 | <Download /> | ||
| 32 | </el-icon> | ||
| 33 | <!-- {{ JSON.parse(matchData.signKnowUrl)[0]?.name}}--> | ||
| 34 | 报名须知 | ||
| 35 | </el-link> | ||
| 36 | |||
| 37 | <el-link class="mr20" v-if="matchData.disclaimerUrl" type="primary" :href="fillImgUrl(JSON.parse(matchData.disclaimerUrl)[0]?.url)" target="_blank"> | ||
| 38 | <el-icon :size="20"> | ||
| 39 | <Download /> | ||
| 40 | </el-icon>免责声明 | ||
| 41 | <!-- {{ JSON.parse(matchData.disclaimerUrl)[0]?.name }}--> | ||
| 42 | </el-link> | ||
| 43 | <el-link v-if="matchData.ruleUrl" type="primary" :href="fillImgUrl(JSON.parse(matchData.ruleUrl)[0]?.url)" target="_blank"> | ||
| 44 | <el-icon :size="20"> | ||
| 45 | <Download /> | ||
| 46 | </el-icon>赛事规程 | ||
| 47 | <!-- {{ JSON.parse(matchData.ruleUrl)[0]?.name }}--> | ||
| 48 | </el-link> | ||
| 49 | </div> | ||
| 28 | </el-col> | 50 | </el-col> |
| 29 | <el-col :lg="8" :md="12" :xl="8" v-if="matchData.type=='0'"> | 51 | <el-col :lg="8" :md="12" :xl="8" v-if="matchData.type=='0'"> |
| 30 | <p class="countDownTitle"><span>报名截止倒计时</span></p> | 52 | <p class="countDownTitle"><span>报名截止倒计时</span></p> |
| ... | @@ -42,7 +64,8 @@ | ... | @@ -42,7 +64,8 @@ |
| 42 | </van-count-down> | 64 | </van-count-down> |
| 43 | 65 | ||
| 44 | <div> | 66 | <div> |
| 45 | <a class="btn-lineG mb20" @click="choseSignType" style="display: block;text-align: center;">我要报名</a> | 67 | <a class="btn-lineG mb20" v-if="time>0" @click="choseSignType" style="display: block;text-align: center;">我要报名</a> |
| 68 | <div v-else style="opacity: 0.5;" class="btn-lineG mb20 mauto text-center">报名已结束</div> | ||
| 46 | </div> | 69 | </div> |
| 47 | </el-col> | 70 | </el-col> |
| 48 | </el-row> | 71 | </el-row> | ... | ... |
| ... | @@ -26,6 +26,29 @@ | ... | @@ -26,6 +26,29 @@ |
| 26 | <p class="ppl" v-if="matchData.address"><label class="bm3">Location:</label>{{ matchData.address }}</p> | 26 | <p class="ppl" v-if="matchData.address"><label class="bm3">Location:</label>{{ matchData.address }}</p> |
| 27 | <p class="ppl" v-if="matchData.signEndTime"><label class="bm4">Registration | 27 | <p class="ppl" v-if="matchData.signEndTime"><label class="bm4">Registration |
| 28 | Deadline:</label>{{ matchData.signEndTime?.slice(0, 10) }}</p> | 28 | Deadline:</label>{{ matchData.signEndTime?.slice(0, 10) }}</p> |
| 29 | <div> | ||
| 30 | <el-link class="mr20" v-if="matchData.signKnowUrl" type="primary" :href="fillImgUrl(JSON.parse(matchData.signKnowUrl)[0]?.url)" target="_blank"> | ||
| 31 | <el-icon :size="20"> | ||
| 32 | <Download /> | ||
| 33 | </el-icon> | ||
| 34 | <!-- {{ JSON.parse(matchData.signKnowUrl)[0]?.name}}--> | ||
| 35 | Notes | ||
| 36 | </el-link> | ||
| 37 | |||
| 38 | <el-link class="mr20" v-if="matchData.disclaimerUrl" type="primary" :href="fillImgUrl(JSON.parse(matchData.disclaimerUrl)[0]?.url)" target="_blank"> | ||
| 39 | <el-icon :size="20"> | ||
| 40 | <Download /> | ||
| 41 | </el-icon>Disclaimers | ||
| 42 | <!-- {{ JSON.parse(matchData.disclaimerUrl)[0]?.name }}--> | ||
| 43 | </el-link> | ||
| 44 | <el-link v-if="matchData.ruleUrl" type="primary" :href="fillImgUrl(JSON.parse(matchData.ruleUrl)[0]?.url)" target="_blank"> | ||
| 45 | <el-icon :size="20"> | ||
| 46 | <Download /> | ||
| 47 | </el-icon>Competition Regulations | ||
| 48 | <!-- {{ JSON.parse(matchData.ruleUrl)[0]?.name }}--> | ||
| 49 | </el-link> | ||
| 50 | </div> | ||
| 51 | |||
| 29 | </el-col> | 52 | </el-col> |
| 30 | <el-col :lg="8" :md="12" :xl="8" v-if="matchData.type=='0'"> | 53 | <el-col :lg="8" :md="12" :xl="8" v-if="matchData.type=='0'"> |
| 31 | <p class="countDownTitle"><span>Registration deadline countdown</span></p> | 54 | <p class="countDownTitle"><span>Registration deadline countdown</span></p> |
| ... | @@ -43,9 +66,10 @@ | ... | @@ -43,9 +66,10 @@ |
| 43 | </van-count-down> | 66 | </van-count-down> |
| 44 | 67 | ||
| 45 | <div class="flexCenter"> | 68 | <div class="flexCenter"> |
| 46 | <el-button ref="RegisterRef" type="primary" round size="large" class="btn-lineG mb20 mt30 w100" | 69 | <el-button v-if="time>0" ref="RegisterRef" type="primary" round size="large" class="btn-lineG mb20 mt30 w100" |
| 47 | @click="choseSignType" style="font-size: 16px">Register | 70 | @click="choseSignType" style="font-size: 16px">Register |
| 48 | </el-button> | 71 | </el-button> |
| 72 | <div v-else style="opacity: 0.5;" class="btn-lineG mb20 mauto text-center">Registration has ended</div> | ||
| 49 | </div> | 73 | </div> |
| 50 | </el-col> | 74 | </el-col> |
| 51 | </el-row> | 75 | </el-row> | ... | ... |
| ... | @@ -7,30 +7,30 @@ | ... | @@ -7,30 +7,30 @@ |
| 7 | <el-card> | 7 | <el-card> |
| 8 | <ul> | 8 | <ul> |
| 9 | <li> | 9 | <li> |
| 10 | <label>类型:</label> | 10 | <label>{{ language==0?'类型':'Type' }}:</label> |
| 11 | <el-radio-group v-model="query.type" @change="getList"> | 11 | <el-radio-group v-model="query.type" @change="getList"> |
| 12 | <el-radio-button value="-1">全部</el-radio-button> | 12 | <el-radio-button value="-1">{{ language==0?'全部':'All' }}</el-radio-button> |
| 13 | <el-radio-button value="0">联赛</el-radio-button> | 13 | <el-radio-button value="0">{{ language==0?'联赛':'League' }}</el-radio-button> |
| 14 | <el-radio-button value="1">分站赛</el-radio-button> | 14 | <el-radio-button value="1">{{ language==0?'分站赛':'Station race' }}</el-radio-button> |
| 15 | </el-radio-group> | 15 | </el-radio-group> |
| 16 | </li> | 16 | </li> |
| 17 | <li> | 17 | <li> |
| 18 | <label>状态:</label> | 18 | <label>{{ language==0?'状态':'Status' }}:</label> |
| 19 | <el-radio-group | 19 | <el-radio-group |
| 20 | v-model="query.progressStatusCode" | 20 | v-model="query.progressStatusCode" |
| 21 | @change="getList" | 21 | @change="getList" |
| 22 | > | 22 | > |
| 23 | <el-radio-button value="-1">全部</el-radio-button> | 23 | <el-radio-button value="-1">{{ language==0?'全部':'All' }}</el-radio-button> |
| 24 | <el-radio-button value="2">报名中</el-radio-button> | 24 | <el-radio-button value="2">{{ language==0?'报名中':'Registration in progress' }}</el-radio-button> |
| 25 | <el-radio-button value="4">赛事进行中</el-radio-button> | 25 | <el-radio-button value="4">{{ language==0?'赛事进行中':'In progress' }}</el-radio-button> |
| 26 | <el-radio-button value="3">即将开始</el-radio-button> | 26 | <el-radio-button value="3">{{ language==0?'即将开始':'Begin in a minute' }}</el-radio-button> |
| 27 | <el-radio-button value="5">已结束</el-radio-button> | 27 | <el-radio-button value="5">{{ language==0?'已结束':'Ended' }}</el-radio-button> |
| 28 | </el-radio-group> | 28 | </el-radio-group> |
| 29 | </li> | 29 | </li> |
| 30 | <li> | 30 | <li> |
| 31 | <label>时间:</label> | 31 | <label>{{ language==0?'时间':'Date' }}:</label> |
| 32 | <el-radio-group v-model="query.month" @change="getList"> | 32 | <el-radio-group v-model="query.month" @change="getList"> |
| 33 | <el-radio-button value="">全部</el-radio-button> | 33 | <el-radio-button value="">{{ language==0?'全部':'All' }}</el-radio-button> |
| 34 | <el-radio-button v-for="m in monthList" :key="m" :value="m">{{m}}</el-radio-button> | 34 | <el-radio-button v-for="m in monthList" :key="m" :value="m">{{m}}</el-radio-button> |
| 35 | </el-radio-group> | 35 | </el-radio-group> |
| 36 | </li> | 36 | </li> |
| ... | @@ -41,15 +41,15 @@ | ... | @@ -41,15 +41,15 @@ |
| 41 | </div> | 41 | </div> |
| 42 | <div class="box"> | 42 | <div class="box"> |
| 43 | <div class="listTitle"> | 43 | <div class="listTitle"> |
| 44 | <h3>赛事列表</h3> | 44 | <h3>{{ language==0?'赛事列表':'List' }}</h3> |
| 45 | <div class="search"> | 45 | <div class="search"> |
| 46 | <el-input | 46 | <el-input |
| 47 | v-model="query.name" | 47 | v-model="query.name" |
| 48 | placeholder="请输入赛事名称查询" | 48 | :placeholder="language==0?'请输入赛事名称查询':'Search'" |
| 49 | class="input-with-select" @change="getList" | 49 | class="input-with-select" @change="getList" |
| 50 | > | 50 | > |
| 51 | <template #append> | 51 | <template #append> |
| 52 | <el-button type="success" round @click="getList">查询</el-button> | 52 | <el-button type="success" round @click="getList">{{ language==0?'查询':'Search' }}</el-button> |
| 53 | </template> | 53 | </template> |
| 54 | </el-input> | 54 | </el-input> |
| 55 | </div> | 55 | </div> |
| ... | @@ -64,12 +64,12 @@ | ... | @@ -64,12 +64,12 @@ |
| 64 | <div class="info"> | 64 | <div class="info"> |
| 65 | <h3>{{ n.name }}</h3> | 65 | <h3>{{ n.name }}</h3> |
| 66 | <p class="ppl"><label>{{ language==0?'比赛时间':'Playing Time' }}:</label>{{n.beginTime?.slice(0,10)}} ~ {{ n.endTime?.slice(0,10) }}</p> | 66 | <p class="ppl"><label>{{ language==0?'比赛时间':'Playing Time' }}:</label>{{n.beginTime?.slice(0,10)}} ~ {{ n.endTime?.slice(0,10) }}</p> |
| 67 | <p class="ppl"><label>{{ language==0?'地    点':'Location' }}:</label>{{ n.address }}</p> | 67 | <p class="ppl" v-if="n.address"><label>{{ language==0?'地    点':'Location' }}:</label>{{ n.address }}</p> |
| 68 | <p class="ppl"><label>{{ language==0?'报名截止':'Registration Deadline' }}:</label>{{ n.signEndTime?.slice(0,10) }}</p> | 68 | <p class="ppl"><label>{{ language==0?'报名截止':'Registration Deadline' }}:</label>{{ n.signEndTime?.slice(0,10) }}</p> |
| 69 | 69 | ||
| 70 | <p class="ppl"><label>{{ language==0?'联系人员':'Contact Person' }}:</label>{{ n.contactPerson }}</p> | 70 | <p class="ppl" v-if="n.contactPerson"><label>{{ language==0?'联系人员':'Contact Person' }}:</label>{{ n.contactPerson }}</p> |
| 71 | <p class="ppl"><label>{{ language==0?'联系电话':'Phone' }}:</label>{{ n.contactTelno }}</p> | 71 | <p class="ppl"><label>{{ language==0?'联系电话':'Phone' }}:</label>{{ n.contactTelno }}</p> |
| 72 | <p class="ppl"><label>{{ language==0?'邮    箱':'E-mail' }}:</label>{{ n.contactEmail }}</p> | 72 | <p class="ppl" v-if="n.contactEmail"><label>{{ language==0?'邮    箱':'E-mail' }}:</label>{{ n.contactEmail }}</p> |
| 73 | 73 | ||
| 74 | </div> | 74 | </div> |
| 75 | </el-col> | 75 | </el-col> |
| ... | @@ -94,7 +94,7 @@ | ... | @@ -94,7 +94,7 @@ |
| 94 | <div class="text-center mt30"> | 94 | <div class="text-center mt30"> |
| 95 | <a class="btn-lineG mb20 mauto" v-if="n.time>0" style="display: block;"> | 95 | <a class="btn-lineG mb20 mauto" v-if="n.time>0" style="display: block;"> |
| 96 | {{ language==0?'我要报名':'Register' }}</a> | 96 | {{ language==0?'我要报名':'Register' }}</a> |
| 97 | <div v-else style="opacity: 0.5;" class="btn-lineG mb20 mauto">报名已结束</div> | 97 | <div v-else style="opacity: 0.5;" class="btn-lineG mb20 mauto">{{ language==0?'报名已结束':'Registration has ended' }}</div> |
| 98 | </div> | 98 | </div> |
| 99 | </el-col> | 99 | </el-col> |
| 100 | </el-row> | 100 | </el-row> | ... | ... |
| ... | @@ -76,14 +76,14 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -76,14 +76,14 @@ export default defineConfig(({ mode, command }) => { |
| 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') | 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') |
| 77 | }, | 77 | }, |
| 78 | '/dev-api/ztx-webSite': { | 78 | '/dev-api/ztx-webSite': { |
| 79 | // target: 'http://123.60.96.243:1897/stage-api/', | 79 | target: 'https://dance.itechtop.cn/stage-api', |
| 80 | target: 'http://192.168.1.131:8083/', | 80 | // target: 'http://192.168.1.131:8083/', |
| 81 | changeOrigin: true, | 81 | changeOrigin: true, |
| 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 83 | }, | 83 | }, |
| 84 | '/dev-api': { | 84 | '/dev-api': { |
| 85 | target: 'http://192.168.1.131:8083', | 85 | // target: 'http://192.168.1.131:8083', |
| 86 | // target: 'http://localhost:8787', | 86 | target: 'https://dance.itechtop.cn/stage-api', |
| 87 | changeOrigin: true, | 87 | changeOrigin: true, |
| 88 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 88 | rewrite: (p) => p.replace(/^\/dev-api/, '') |
| 89 | } | 89 | } | ... | ... |
-
Please register or sign in to post a comment