no message
Showing
14 changed files
with
1085 additions
and
172 deletions
| ... | @@ -105,6 +105,13 @@ export function registerSingle(data) { | ... | @@ -105,6 +105,13 @@ export function registerSingle(data) { |
| 105 | data:data | 105 | data:data |
| 106 | }) | 106 | }) |
| 107 | } | 107 | } |
| 108 | export function loginSingle(data) { | ||
| 109 | return request({ | ||
| 110 | url: `/userLoginAboard`, | ||
| 111 | method: 'post', | ||
| 112 | data:data | ||
| 113 | }) | ||
| 114 | } | ||
| 108 | 115 | ||
| 109 | // 根据Id获取我的团队 | 116 | // 根据Id获取我的团队 |
| 110 | export function getGroupInfo() { | 117 | export function getGroupInfo() { | ... | ... |
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | <router-link to="/about">亚洲体育舞蹈节版权所有</router-link> | 8 | <router-link to="/about">亚洲体育舞蹈节版权所有</router-link> |
| 9 | </li> | 9 | </li> |
| 10 | <li> | 10 | <li> |
| 11 | <a target="_blank" href="https://beian.miit.gov.cn/">ICP备案号:苏ICP备17015770号-3</a> | 11 | <a target="_blank" href="https://beian.miit.gov.cn/">ICP备案号:苏ICP备2023054420号-2</a> |
| 12 | <!-- <a class="ffoot" target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010102004192">--> | 12 | <!-- <a class="ffoot" target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010102004192">--> |
| 13 | <!-- <img src="@/assets/v1/beian.png">--> | 13 | <!-- <img src="@/assets/v1/beian.png">--> |
| 14 | <!-- 京公网安备 11010102004192号</a>--> | 14 | <!-- 京公网安备 11010102004192号</a>--> | ... | ... |
| ... | @@ -176,7 +176,7 @@ function handleSelect(key, keyPath) { | ... | @@ -176,7 +176,7 @@ function handleSelect(key, keyPath) { |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | const logout = () => { | 178 | const logout = () => { |
| 179 | proxy.$modal.confirm('确定退出?').then(function() { | 179 | proxy.$modal.confirm(language.value==0?'确定退出?':'Are you sure to exit?').then(function() { |
| 180 | return useUserStore().logOut() | 180 | return useUserStore().logOut() |
| 181 | }).then(() => { | 181 | }).then(() => { |
| 182 | isLogin.value = true | 182 | isLogin.value = true | ... | ... |
| ... | @@ -147,7 +147,7 @@ function handleSelect(key, keyPath) { | ... | @@ -147,7 +147,7 @@ function handleSelect(key, keyPath) { |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | const logout = () => { | 149 | const logout = () => { |
| 150 | proxy.$modal.confirm('确定退出?').then(function() { | 150 | proxy.$modal.confirm(language.value==0?'确定退出?':'Are you sure to exit?').then(function() { |
| 151 | return useUserStore().logOut() | 151 | return useUserStore().logOut() |
| 152 | }).then(() => { | 152 | }).then(() => { |
| 153 | isLogin.value = true | 153 | isLogin.value = true | ... | ... |
| ... | @@ -20,26 +20,51 @@ | ... | @@ -20,26 +20,51 @@ |
| 20 | <el-form-item :label="language==0?'姓名':'Real Name'" required prop="realName"> | 20 | <el-form-item :label="language==0?'姓名':'Real Name'" required prop="realName"> |
| 21 | <el-input v-model="myform.realName"/> | 21 | <el-input v-model="myform.realName"/> |
| 22 | </el-form-item> | 22 | </el-form-item> |
| 23 | <el-form-item :label="language==0?'性别':'Sex'" required prop="sex"> | 23 | <el-form-item :label="language==0?'性别':'Sex'" required > |
| 24 | <el-radio-group v-model="myform.sex"> | 24 | <el-radio-group v-model="myform.sex"> |
| 25 | <el-radio label="0">{{ language == 0 ? '女' : 'female' }}</el-radio> | 25 | <el-radio label="0">{{ language == 0 ? '女' : 'female' }}</el-radio> |
| 26 | <el-radio label="1">{{ language == 0 ? '男' : 'male' }}</el-radio> | 26 | <el-radio label="1">{{ language == 0 ? '男' : 'male' }}</el-radio> |
| 27 | </el-radio-group> | 27 | </el-radio-group> |
| 28 | </el-form-item> | 28 | </el-form-item> |
| 29 | <el-form-item :label="language==0?'证件类型':'ID type'" required prop="idcType"> | 29 | <el-form-item :label="language==0?'出生日期':'Birthday'" required> |
| 30 | <el-select v-model="myform.idcType" style="width: 100%"> | 30 | <el-date-picker |
| 31 | <el-option | 31 | v-model="myform.birth" |
| 32 | v-for="item in certificates" | 32 | style="width: 100%;" |
| 33 | :key="item.value" | 33 | type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" |
| 34 | :label="item.label" | ||
| 35 | :value="item.value" | ||
| 36 | /> | 34 | /> |
| 37 | </el-select> | ||
| 38 | </el-form-item> | 35 | </el-form-item> |
| 39 | <el-form-item :label="language==0?'证件号码':'ID NO'" prop="idcCode"> | 36 | <el-form-item label="Representing"> |
| 40 | <el-input v-model="myform.idcCode" @blur="checkCode"/> | 37 | <el-input v-model="myform.representing" disabled/> |
| 38 | </el-form-item> | ||
| 39 | <el-form-item label="Age group"> | ||
| 40 | <el-input v-model="myform.ageGroup" disabled/> | ||
| 41 | </el-form-item> | ||
| 42 | <el-form-item label="Division"> | ||
| 43 | <el-input v-model="myform.division" disabled/> | ||
| 44 | </el-form-item> | ||
| 45 | <el-form-item label="Status"> | ||
| 46 | <el-input v-model="myform.status" disabled/> | ||
| 41 | </el-form-item> | 47 | </el-form-item> |
| 42 | <el-form-item :label="language==0?'类型':'Type'" prop="type"> | 48 | <el-form-item label="Passport" required> |
| 49 | <el-input v-model="myform.passportNumber"/> | ||
| 50 | </el-form-item> | ||
| 51 | <el-form-item label="Passport File"> | ||
| 52 | <file-upload v-model="myform.passportUrl" :limit="1" :is-show-tip="false" :button-text="'Upload'"/> | ||
| 53 | </el-form-item> | ||
| 54 | <!-- <el-form-item :label="language==0?'证件类型':'ID type'" required prop="idcType">--> | ||
| 55 | <!-- <el-select v-model="myform.idcType" style="width: 100%">--> | ||
| 56 | <!-- <el-option--> | ||
| 57 | <!-- v-for="item in certificates"--> | ||
| 58 | <!-- :key="item.value"--> | ||
| 59 | <!-- :label="item.label"--> | ||
| 60 | <!-- :value="item.value"--> | ||
| 61 | <!-- />--> | ||
| 62 | <!-- </el-select>--> | ||
| 63 | <!-- </el-form-item>--> | ||
| 64 | <!-- <el-form-item :label="language==0?'证件号码':'ID NO'" prop="idcCode">--> | ||
| 65 | <!-- <el-input v-model="myform.idcCode" @blur="checkCode"/>--> | ||
| 66 | <!-- </el-form-item>--> | ||
| 67 | <el-form-item :label="language==0?'类型':'Type'" required> | ||
| 43 | <el-select v-model="myform.type" style="width: 100%;"> | 68 | <el-select v-model="myform.type" style="width: 100%;"> |
| 44 | <el-option :label="language==0?'业余':'amateur'" value="0"/> | 69 | <el-option :label="language==0?'业余':'amateur'" value="0"/> |
| 45 | <el-option :label="language==0?'专业':'Professional'" value="1"/> | 70 | <el-option :label="language==0?'专业':'Professional'" value="1"/> |
| ... | @@ -47,9 +72,9 @@ | ... | @@ -47,9 +72,9 @@ |
| 47 | <el-option :label="language==0?'其他':'Other'" value="3"/> | 72 | <el-option :label="language==0?'其他':'Other'" value="3"/> |
| 48 | </el-select> | 73 | </el-select> |
| 49 | </el-form-item> | 74 | </el-form-item> |
| 50 | <el-form-item :label="language==0?'邮箱':'Email'" required prop="email"> | 75 | <!-- <el-form-item :label="language==0?'邮箱':'Email'" required prop="email">--> |
| 51 | <el-input v-model="myform.email" type="email" :placeholder="language==0?'请输入内容':''"/> | 76 | <!-- <el-input v-model="myform.email" type="email" :placeholder="language==0?'请输入内容':''"/>--> |
| 52 | </el-form-item> | 77 | <!-- </el-form-item>--> |
| 53 | </el-form> | 78 | </el-form> |
| 54 | <div class="text-center"> | 79 | <div class="text-center"> |
| 55 | <el-button type="primary" class="btn-lineG" round @click="save"> | 80 | <el-button type="primary" class="btn-lineG" round @click="save"> | ... | ... |
| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | <match-info-row :match-id="matchId"/> | 10 | <match-info-row :match-id="matchId"/> |
| 11 | <div class="pd20"> | 11 | <div class="pd20"> |
| 12 | <el-row :gutter="20"> | 12 | <el-row :gutter="20"> |
| 13 | <el-col :lg="4"> | 13 | <el-col :lg="6"> |
| 14 | <div class="panel border"> | 14 | <div class="panel border"> |
| 15 | <div class="panel-header "> | 15 | <div class="panel-header "> |
| 16 | <h3 class="panel-title" v-if="language==0">完善我的信息</h3> | 16 | <h3 class="panel-title" v-if="language==0">完善我的信息</h3> |
| ... | @@ -18,40 +18,55 @@ | ... | @@ -18,40 +18,55 @@ |
| 18 | </div> | 18 | </div> |
| 19 | <div class="panel-body"> | 19 | <div class="panel-body"> |
| 20 | <div class="chooseForm" style="display: flex"> | 20 | <div class="chooseForm" style="display: flex"> |
| 21 | <div @click="editPerson" style="width: 60px" class="mr20"> | 21 | <div @click="editPerson" style="width: 50%;text-align: center;"> |
| 22 | <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)"/> |
| 23 | <div class="addBttn" v-else>+</div> | 23 | <div v-else> |
| 24 | 24 | <el-avatar fit="cover" v-if="form.sex == 0" :size="60" src="@/assets/img/head1.png"/> | |
| 25 | <el-avatar fit="cover" v-if="form.sex == 1" :size="60" src="@/assets/img/head0.png"/> | ||
| 26 | </div> | ||
| 25 | <div class="text-center mt10"> | 27 | <div class="text-center mt10"> |
| 26 | <span>{{ form.name }}</span> | 28 | <span>{{ form.realName }}</span> |
| 27 | <el-icon> | 29 | <el-icon> |
| 28 | <Edit/> | 30 | <Edit/> |
| 29 | </el-icon> | 31 | </el-icon> |
| 30 | </div> | 32 | </div> |
| 31 | </div> | 33 | </div> |
| 32 | <!-- 舞伴--> | 34 | <!--舞伴--> |
| 33 | <el-checkbox-group style="width: 60px"> | 35 | <div style="width:50%;text-align: center;" v-if="form.danceMate"> |
| 34 | <el-checkbox> | 36 | <el-checkbox-group v-model="mateChosed" @change="changeMate"> |
| 37 | <el-checkbox :label="form.danceMate.id"> | ||
| 35 | <div> | 38 | <div> |
| 36 | <el-avatar fit="cover" v-if="form.picUrl" :size="60" :src="fillImgUrl(form.picUrl)"/> | 39 | <el-avatar fit="cover" v-if="form.danceMate.sex == 0" :size="60" |
| 37 | <div class="addBttn" v-else>+</div> | 40 | src="@/assets/img/head1.png"/> |
| 38 | 41 | <el-avatar fit="cover" v-if="form.danceMate.sex == 1" :size="60" | |
| 39 | <div class="text-center mt10"> | 42 | src="@/assets/img/head0.png"/> |
| 40 | <span>{{ form.name }}</span> | 43 | <div class="text-center mt10" @click="editMate(form.danceMate)"> |
| 41 | <el-icon> | 44 | <span>{{ form.danceMate.realName }}</span> |
| 45 | <el-icon @click.stop="editMate(form.danceMate)"> | ||
| 42 | <Edit/> | 46 | <Edit/> |
| 43 | </el-icon> | 47 | </el-icon> |
| 48 | <el-icon @click.stop="delMate(form.danceMate)"> | ||
| 49 | <Delete/> | ||
| 50 | </el-icon> | ||
| 44 | </div> | 51 | </div> |
| 45 | </div> | 52 | </div> |
| 46 | </el-checkbox> | 53 | </el-checkbox> |
| 47 | </el-checkbox-group> | 54 | </el-checkbox-group> |
| 48 | 55 | </div> | |
| 56 | <div v-else @click="editMate()"> | ||
| 57 | <div class="addBttn">+</div> | ||
| 58 | <div class="text-center mt10"> | ||
| 59 | <el-icon> | ||
| 60 | <Edit/> | ||
| 61 | </el-icon> | ||
| 62 | </div> | ||
| 63 | </div> | ||
| 49 | </div> | 64 | </div> |
| 50 | </div> | 65 | </div> |
| 51 | </div> | 66 | </div> |
| 52 | </el-col> | 67 | </el-col> |
| 53 | 68 | ||
| 54 | <el-col :lg="20"> | 69 | <el-col :lg="18"> |
| 55 | <div class="panel border"> | 70 | <div class="panel border"> |
| 56 | <div class="panel-header "> | 71 | <div class="panel-header "> |
| 57 | <h3 class="panel-title" v-if="language==0">可参与报名的项目</h3> | 72 | <h3 class="panel-title" v-if="language==0">可参与报名的项目</h3> |
| ... | @@ -106,22 +121,24 @@ | ... | @@ -106,22 +121,24 @@ |
| 106 | @editExtra="goPersonInfo"/> | 121 | @editExtra="goPersonInfo"/> |
| 107 | <zu-table v-else :list="zuTableList" :language="language" @delete="removeThis"/> | 122 | <zu-table v-else :list="zuTableList" :language="language" @delete="removeThis"/> |
| 108 | 123 | ||
| 109 | <div v-if="showPersonList"> | 124 | <div v-if="showPersonList||myMemberTable.length>0"> |
| 110 | <el-row class="mt20"> | 125 | <el-row class="mt20"> |
| 111 | <el-col :span="24"> | 126 | <el-col :span="24"> |
| 112 | <el-button type="primary" plain>{{ language == 0 ? '添加随行人员' : 'Add accompanying personnel' }} | 127 | <el-button @click="addAccompany" type="primary" plain> |
| 128 | {{ language == 0 ? '添加随行人员' : 'Add accompanying personnel' }} | ||
| 113 | </el-button> | 129 | </el-button> |
| 114 | </el-col> | 130 | </el-col> |
| 115 | </el-row> | 131 | </el-row> |
| 116 | <el-table class="mt20"> | 132 | <el-table class="mt20" :data="myMemberTable" border> |
| 117 | <el-table-column type="index" label="Index" width="60"/> | 133 | <el-table-column type="index" label="Index" width="70" align="center"/> |
| 118 | <el-table-column label="Name"/> | 134 | <el-table-column :label="language==0?'姓氏':'surname'" prop="xing" min-width="100"/> |
| 119 | <el-table-column label="Passport number"/> | 135 | <el-table-column :label="language==0?'名':'name'" prop="ming" min-width="100"/> |
| 120 | <el-table-column label="Birthday"/> | 136 | <el-table-column label="Passport number" prop="idcCode" min-width="120"/> |
| 121 | <el-table-column label="Sex"/> | 137 | <el-table-column label="Birthday" prop="birth"/> |
| 122 | <el-table-column label="Role"> | 138 | <el-table-column label="Sex" prop="sexStr"/> |
| 139 | <el-table-column label="Role" min-width="160"> | ||
| 123 | <template #default="scope"> | 140 | <template #default="scope"> |
| 124 | <div class="esp"> | 141 | <div class="roletd"> |
| 125 | <span v-for="item in scope.row.label?.split(',')" :key="item.id" class="text-primary"> | 142 | <span v-for="item in scope.row.label?.split(',')" :key="item.id" class="text-primary"> |
| 126 | <span v-if="item==='0'" class="ml5">{{ language == 0 ? '运动员' : 'athletes' }}</span> | 143 | <span v-if="item==='0'" class="ml5">{{ language == 0 ? '运动员' : 'athletes' }}</span> |
| 127 | <span v-if="item==='1'" class="ml5">{{ language == 0 ? '教练' : 'coach' }}</span> | 144 | <span v-if="item==='1'" class="ml5">{{ language == 0 ? '教练' : 'coach' }}</span> |
| ... | @@ -156,7 +173,8 @@ | ... | @@ -156,7 +173,8 @@ |
| 156 | </el-card> | 173 | </el-card> |
| 157 | </div> | 174 | </div> |
| 158 | 175 | ||
| 159 | <dialogAddCoach ref="dialogAddCoachRef" @submitForm="changeMeDone"/> | 176 | <dialogEditWdsf ref="dialogEditWdsfRef" @submitForm="changeMeDone"/> |
| 177 | <dialogEditAccompany ref="dialogEditAccompanyRef" @submitForm="getMyMemberTable"/> | ||
| 160 | <!-- <dialogChangeCoach ref="popChangeCoach" @submitForm="getMySignInfo"/>--> | 178 | <!-- <dialogChangeCoach ref="popChangeCoach" @submitForm="getMySignInfo"/>--> |
| 161 | <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList"/> | 179 | <dialogExtraForm ref="popExtraForm" @submitForm="getSignInfoList"/> |
| 162 | </div> | 180 | </div> |
| ... | @@ -166,7 +184,8 @@ | ... | @@ -166,7 +184,8 @@ |
| 166 | import {ref, reactive, toRefs} from 'vue' | 184 | import {ref, reactive, toRefs} from 'vue' |
| 167 | import * as match from '@/apiPc/match' | 185 | import * as match from '@/apiPc/match' |
| 168 | import {getCurrentInstance, onMounted} from '@vue/runtime-core' | 186 | import {getCurrentInstance, onMounted} from '@vue/runtime-core' |
| 169 | import dialogAddCoach from './components/addCoach' | 187 | import dialogEditWdsf from './components/addWdsf' |
| 188 | import dialogEditAccompany from './components/addAccompany' | ||
| 170 | import dialogSportsmanList from './components/sportsmanList' | 189 | import dialogSportsmanList from './components/sportsmanList' |
| 171 | import dialogAllSportsmanList from './components/allSportsmanList' | 190 | import dialogAllSportsmanList from './components/allSportsmanList' |
| 172 | import dialogChangeCoach from './components/changeCoach' | 191 | import dialogChangeCoach from './components/changeCoach' |
| ... | @@ -187,6 +206,7 @@ import ZuTable from '@/viewsPc/match/components/zu-table' | ... | @@ -187,6 +206,7 @@ import ZuTable from '@/viewsPc/match/components/zu-table' |
| 187 | import SingleSignStep from "@/viewsPc/match/components/singleSignStep"; | 206 | import SingleSignStep from "@/viewsPc/match/components/singleSignStep"; |
| 188 | import MatchInfoRow from "@/viewsPc/match/components/matchInfo-row"; | 207 | import MatchInfoRow from "@/viewsPc/match/components/matchInfo-row"; |
| 189 | import useUserStore from "@/store/modules/user"; | 208 | import useUserStore from "@/store/modules/user"; |
| 209 | import {getPerPersonList} from "@/apiPc/match"; | ||
| 190 | 210 | ||
| 191 | const language = ref(cache.local.get('language') || 0) | 211 | const language = ref(cache.local.get('language') || 0) |
| 192 | 212 | ||
| ... | @@ -196,6 +216,7 @@ const data = reactive({ | ... | @@ -196,6 +216,7 @@ const data = reactive({ |
| 196 | signInfoList: [], | 216 | signInfoList: [], |
| 197 | zuTableList: [], | 217 | zuTableList: [], |
| 198 | choosedList: [], | 218 | choosedList: [], |
| 219 | myMemberTable: [], | ||
| 199 | extraPersonInfoMapList: [], | 220 | extraPersonInfoMapList: [], |
| 200 | teamList: [], | 221 | teamList: [], |
| 201 | extraform: [], | 222 | extraform: [], |
| ... | @@ -210,14 +231,39 @@ const data = reactive({ | ... | @@ -210,14 +231,39 @@ const data = reactive({ |
| 210 | activeTeam: '', | 231 | activeTeam: '', |
| 211 | names: {}, | 232 | names: {}, |
| 212 | choosedchoosed: [], | 233 | choosedchoosed: [], |
| 234 | mateChosed: [], | ||
| 213 | projectIds: [], | 235 | projectIds: [], |
| 214 | projectList: [], | 236 | projectList: [], |
| 215 | choosed2List: [], projectQuery: {}, tableType: 1, | 237 | choosed2List: [], projectQuery: {}, tableType: 1, |
| 216 | }) | 238 | }) |
| 217 | const { | 239 | const { |
| 218 | activeTeam, names, tableData, signInfoList, zuTableList, choosedList, showExtraForm, extraPersonInfoMapList, teamList, | 240 | activeTeam, |
| 219 | extraform, groupId, signType, coachOrLeaderFlag, showResult, noPhotoCanSign, extraTableHead, | 241 | names, |
| 220 | coachForm, projectIds, choosedchoosed, activeStep, projectList, choosed2List, loadingProject, projectQuery, tableType | 242 | tableData, |
| 243 | myMemberTable, | ||
| 244 | signInfoList, | ||
| 245 | zuTableList, | ||
| 246 | choosedList, | ||
| 247 | showExtraForm, | ||
| 248 | extraPersonInfoMapList, | ||
| 249 | teamList, | ||
| 250 | extraform, | ||
| 251 | groupId, | ||
| 252 | signType, | ||
| 253 | coachOrLeaderFlag, | ||
| 254 | showResult, | ||
| 255 | noPhotoCanSign, | ||
| 256 | extraTableHead, | ||
| 257 | coachForm, | ||
| 258 | projectIds, | ||
| 259 | choosedchoosed, | ||
| 260 | mateChosed, | ||
| 261 | activeStep, | ||
| 262 | projectList, | ||
| 263 | choosed2List, | ||
| 264 | loadingProject, | ||
| 265 | projectQuery, | ||
| 266 | tableType | ||
| 221 | } = toRefs(data) | 267 | } = toRefs(data) |
| 222 | const matchId = ref(route.query.matchId) | 268 | const matchId = ref(route.query.matchId) |
| 223 | let signInfoType = null | 269 | let signInfoType = null |
| ... | @@ -234,7 +280,7 @@ onMounted(() => { | ... | @@ -234,7 +280,7 @@ onMounted(() => { |
| 234 | getSignInfoList() | 280 | getSignInfoList() |
| 235 | getMatch(matchId.value) | 281 | getMatch(matchId.value) |
| 236 | getMyInfo() | 282 | getMyInfo() |
| 237 | 283 | getMyMemberTable() | |
| 238 | getMySignInfo() | 284 | getMySignInfo() |
| 239 | }) | 285 | }) |
| 240 | 286 | ||
| ... | @@ -246,7 +292,23 @@ function getMyInfo() { | ... | @@ -246,7 +292,23 @@ function getMyInfo() { |
| 246 | }) | 292 | }) |
| 247 | } | 293 | } |
| 248 | 294 | ||
| 249 | function changeMeDone() { | 295 | function getMyMemberTable() { |
| 296 | // | ||
| 297 | match.getPerPersonList({cptId: matchId.value, searchLabels: '1,2,3,4,5,6'}, userId.value).then(res => { | ||
| 298 | myMemberTable.value = res.rows | ||
| 299 | }) | ||
| 300 | } | ||
| 301 | |||
| 302 | function addAccompany() { | ||
| 303 | proxy.$refs['dialogEditAccompanyRef'].open({ | ||
| 304 | title: 'Add accompanying personnel', | ||
| 305 | cptId: matchId.value, | ||
| 306 | id: 0 | ||
| 307 | }) | ||
| 308 | } | ||
| 309 | |||
| 310 | function changeMeDone(mateId) { | ||
| 311 | console.log(mateId) | ||
| 250 | getMyInfo() | 312 | getMyInfo() |
| 251 | getProjectList() | 313 | getProjectList() |
| 252 | } | 314 | } |
| ... | @@ -326,13 +388,26 @@ function submitForm(n) { | ... | @@ -326,13 +388,26 @@ function submitForm(n) { |
| 326 | } | 388 | } |
| 327 | } | 389 | } |
| 328 | 390 | ||
| 329 | if(showPersonList.value){ | 391 | if (showPersonList.value) { |
| 392 | if (myMemberTable.value.length == 0) { | ||
| 393 | ElMessageBox.confirm(language.value == 0 ? '是否继续添加随性人员?' : 'Do you want to add casual personnel?', | ||
| 394 | language.value == 0 ? '提示' : 'Tip', { | ||
| 395 | confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 396 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 397 | type: 'warning' | ||
| 398 | }).then(() => { | ||
| 399 | |||
| 400 | }).catch(() => { | ||
| 401 | commit() | ||
| 402 | }) | ||
| 403 | } else { | ||
| 330 | commit() | 404 | commit() |
| 405 | } | ||
| 331 | } else { | 406 | } else { |
| 332 | ElMessageBox.confirm(language.value==0?'是否添加随性人员?':'Do you want to add casual personnel?', | 407 | ElMessageBox.confirm(language.value == 0 ? '是否添加随性人员?' : 'Do you want to add casual personnel?', |
| 333 | language.value==0?'提示':'Tip', { | 408 | language.value == 0 ? '提示' : 'Tip', { |
| 334 | confirmButtonText: language.value==0?'确定':'Yes', | 409 | confirmButtonText: language.value == 0 ? '确定' : 'Yes', |
| 335 | cancelButtonText: language.value==0?'取消':'Cancel', | 410 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 336 | type: 'warning' | 411 | type: 'warning' |
| 337 | }).then(() => { | 412 | }).then(() => { |
| 338 | showPersonList.value = true | 413 | showPersonList.value = true |
| ... | @@ -346,6 +421,12 @@ function submitForm(n) { | ... | @@ -346,6 +421,12 @@ function submitForm(n) { |
| 346 | } | 421 | } |
| 347 | 422 | ||
| 348 | function commit() { | 423 | function commit() { |
| 424 | ElMessageBox.confirm(language.value == 0 ? '确定提交吗?' : 'Are you sure to submit?', | ||
| 425 | language.value == 0 ? '提示' : 'Tip', | ||
| 426 | { | ||
| 427 | confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 428 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 429 | }).then(()=>{ | ||
| 349 | match.commitSign({ | 430 | match.commitSign({ |
| 350 | groupId: 0, | 431 | groupId: 0, |
| 351 | cptId: matchId.value | 432 | cptId: matchId.value |
| ... | @@ -356,18 +437,29 @@ function commit() { | ... | @@ -356,18 +437,29 @@ function commit() { |
| 356 | orderId: res.data | 437 | orderId: res.data |
| 357 | } | 438 | } |
| 358 | }) | 439 | }) |
| 359 | }) | 440 | })} |
| 441 | ) | ||
| 442 | |||
| 360 | } | 443 | } |
| 361 | 444 | ||
| 362 | function getProjectList() { | 445 | function getProjectList() { |
| 363 | projectIds.value = [] | 446 | projectIds.value = [] |
| 364 | loadingProject.value = true | 447 | loadingProject.value = true |
| 365 | //根据已选人员id 获取项目列表 | 448 | //根据已选人员id 获取项目列表 |
| 366 | var obj = { | 449 | var obj = {} |
| 450 | if (mateChosed.value.length > 0 && form.value.danceMate) { | ||
| 451 | obj = { | ||
| 452 | cptId: matchId.value, | ||
| 453 | perIds: `${myId.value},${form.value.danceMate?.id}`, | ||
| 454 | name: projectQuery.value.name | ||
| 455 | } | ||
| 456 | } else { | ||
| 457 | obj = { | ||
| 367 | cptId: matchId.value, | 458 | cptId: matchId.value, |
| 368 | perIds: myId.value, | 459 | perIds: myId.value, |
| 369 | name: projectQuery.value.name | 460 | name: projectQuery.value.name |
| 370 | } | 461 | } |
| 462 | } | ||
| 371 | match.getProjectPageByPerIds(obj).then(res => { | 463 | match.getProjectPageByPerIds(obj).then(res => { |
| 372 | projectList.value = res.rows | 464 | projectList.value = res.rows |
| 373 | loadingProject.value = false | 465 | loadingProject.value = false |
| ... | @@ -402,18 +494,50 @@ function addCoach() { | ... | @@ -402,18 +494,50 @@ function addCoach() { |
| 402 | id: 0, | 494 | id: 0, |
| 403 | groupId: groupId.value | 495 | groupId: groupId.value |
| 404 | } | 496 | } |
| 405 | proxy.$refs['dialogAddCoachRef'].open(params) | 497 | proxy.$refs['dialogEditWdsfRef'].open(params) |
| 406 | } | 498 | } |
| 407 | 499 | ||
| 500 | function delperson(p) { | ||
| 501 | //删除团队下的人 | ||
| 502 | let text = '' | ||
| 503 | let t = '提示' | ||
| 504 | let s = '确定' | ||
| 505 | let c = '取消' | ||
| 506 | let msg = '操作成功' | ||
| 507 | if (language.value == 0) { | ||
| 508 | text = `确定删除${p.realName}吗?` | ||
| 509 | } else { | ||
| 510 | text = `Delete ${p.realName}?` | ||
| 511 | t = 'Tips' | ||
| 512 | s = 'Confirm' | ||
| 513 | c = 'Cancel' | ||
| 514 | msg = ' Successful!' | ||
| 515 | } | ||
| 516 | ElMessageBox.confirm(text, t, { | ||
| 517 | confirmButtonText: s, | ||
| 518 | cancelButtonText: c, | ||
| 519 | type: 'warning' | ||
| 520 | }).then(() => { | ||
| 521 | match.delPerson(p.id).then(res => { | ||
| 522 | ElMessage.success(msg) | ||
| 523 | getMyMemberTable() | ||
| 524 | getMyInfo() | ||
| 525 | }) | ||
| 526 | }) | ||
| 527 | } | ||
| 408 | 528 | ||
| 409 | function signUp() { | 529 | function signUp() { |
| 410 | if (projectIds.value.length == 0) { | 530 | if (projectIds.value.length == 0) { |
| 411 | return | 531 | return |
| 412 | } | 532 | } |
| 413 | const obj = { | 533 | let obj = { |
| 414 | athleteIds: myId.value, | ||
| 415 | projectIds: projectIds.value.toString(), | 534 | projectIds: projectIds.value.toString(), |
| 416 | groupId: groupId.value | 535 | groupId: 0 |
| 536 | } | ||
| 537 | if (mateChosed.value.length > 0 && form.value.danceMate) { | ||
| 538 | obj.athleteIds= `${myId.value},${form.value.danceMate?.id}` | ||
| 539 | } else { | ||
| 540 | obj.athleteIds= myId.value | ||
| 417 | } | 541 | } |
| 418 | match.sportsmanDone(obj).then(res => { | 542 | match.sportsmanDone(obj).then(res => { |
| 419 | getSignInfoList() | 543 | getSignInfoList() |
| ... | @@ -456,7 +580,9 @@ function goMySign() { | ... | @@ -456,7 +580,9 @@ function goMySign() { |
| 456 | 580 | ||
| 457 | const goPersonInfo = (row) => { | 581 | const goPersonInfo = (row) => { |
| 458 | if (signInfoType == '1') { | 582 | if (signInfoType == '1') { |
| 459 | ElMessageBox.alert('已报项,前往我的报项', '提示', { | 583 | ElMessageBox.alert( |
| 584 | language.value == 0 ? '已报项,前往我的报项' : 'Reported items, go to my submission', | ||
| 585 | language.value == 0 ? '提示' : 'Tips', { | ||
| 460 | confirmButtonText: 'OK', | 586 | confirmButtonText: 'OK', |
| 461 | callback: (Action) => { | 587 | callback: (Action) => { |
| 462 | router.push({name: 'myMatch'}) | 588 | router.push({name: 'myMatch'}) |
| ... | @@ -484,12 +610,39 @@ function downloadVoucher() { | ... | @@ -484,12 +610,39 @@ function downloadVoucher() { |
| 484 | } | 610 | } |
| 485 | 611 | ||
| 486 | function editPerson() { | 612 | function editPerson() { |
| 487 | proxy.$refs['dialogAddCoachRef'].open({ | 613 | proxy.$refs['dialogEditWdsfRef'].open({ |
| 488 | title: language.value == 0 ? '编辑个人信息' : 'Edit My Information', | 614 | title: language.value == 0 ? '编辑个人信息' : 'Edit My Information', |
| 489 | isMe: true | 615 | isMe: true |
| 490 | }) | 616 | }) |
| 491 | } | 617 | } |
| 492 | 618 | ||
| 619 | function editMate(obj) { | ||
| 620 | proxy.$refs['dialogEditWdsfRef'].open({ | ||
| 621 | title: language.value == 0 ? '编辑舞伴' : 'Edit My Mate', | ||
| 622 | isMe: false, | ||
| 623 | form: obj || {}, | ||
| 624 | cptId:matchId.value, | ||
| 625 | id: obj?.id || 0 | ||
| 626 | }) | ||
| 627 | } | ||
| 628 | |||
| 629 | function delMate(mate) { | ||
| 630 | delperson(mate) | ||
| 631 | // ElMessageBox.confirm(language.value == 0 ? '确定删除队友吗?' : 'Are you sure to delete the teammate?', | ||
| 632 | // language.value == 0 ? '提示' : 'Tip', | ||
| 633 | // { | ||
| 634 | // confirmButtonText: language.value == 0 ? '确定' : 'Yes', | ||
| 635 | // cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 636 | // }).then(()=>{ | ||
| 637 | // | ||
| 638 | // }) | ||
| 639 | } | ||
| 640 | |||
| 641 | function changeMate(e) { | ||
| 642 | console.log(e, mateChosed.value) | ||
| 643 | getProjectList() | ||
| 644 | } | ||
| 645 | |||
| 493 | function switchTabletype() { | 646 | function switchTabletype() { |
| 494 | if (tableType.value == 0) { | 647 | if (tableType.value == 0) { |
| 495 | tableType.value = 1 | 648 | tableType.value = 1 |
| ... | @@ -652,4 +805,10 @@ function switchTabletype() { | ... | @@ -652,4 +805,10 @@ function switchTabletype() { |
| 652 | } | 805 | } |
| 653 | } | 806 | } |
| 654 | } | 807 | } |
| 808 | |||
| 809 | .roletd { | ||
| 810 | .ml5 { | ||
| 811 | display: inline-block | ||
| 812 | } | ||
| 813 | } | ||
| 655 | </style> | 814 | </style> | ... | ... |
| 1 | <template> | ||
| 2 | <el-dialog | ||
| 3 | v-model="show" :title="title" width="800px" append-to-body close-icon="CircleClose" center | ||
| 4 | :close-on-click-modal="false" class="pcloginpop" | ||
| 5 | destroy-on-close | ||
| 6 | > | ||
| 7 | <el-form ref="dialogRef" :model="form" :rules="language==0?rules:rules_cn" label-width="160px" inline> | ||
| 8 | <el-row :gutter="30"> | ||
| 9 | <el-col :lg="24"> | ||
| 10 | |||
| 11 | <el-form-item :label="language==0?'姓氏':'surname'" prop="xing" required> | ||
| 12 | <el-input v-model="form.xing"/> | ||
| 13 | </el-form-item> | ||
| 14 | <el-form-item :label="language==0?'名':'name'" prop="ming" required> | ||
| 15 | <el-input v-model="form.ming"/> | ||
| 16 | </el-form-item> | ||
| 17 | <!-- <el-form-item :label="language==0?'证件类型':'ID type'" prop="idcType" required>--> | ||
| 18 | <!-- <el-select v-model="form.idcType" style="width: 100%;">--> | ||
| 19 | <!-- <el-option--> | ||
| 20 | <!-- v-for="item in certificates"--> | ||
| 21 | <!-- :key="item.value"--> | ||
| 22 | <!-- :label="item.label"--> | ||
| 23 | <!-- :value="item.value"--> | ||
| 24 | <!-- />--> | ||
| 25 | <!-- </el-select>--> | ||
| 26 | <!-- </el-form-item>--> | ||
| 27 | <el-form-item :label="language==0?'护照号':'PassPort Number'" prop="idcCode" required> | ||
| 28 | <el-input v-model="form.idcCode"/> | ||
| 29 | </el-form-item> | ||
| 30 | |||
| 31 | <el-form-item :label="language==0?'出生日期':'birth'" prop="birth" required> | ||
| 32 | <el-date-picker | ||
| 33 | v-model="form.birth" | ||
| 34 | style="width: 100%;" | ||
| 35 | type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" | ||
| 36 | /> | ||
| 37 | </el-form-item> | ||
| 38 | <el-form-item :label="language==0?'性别':'sex'" prop="sex"> | ||
| 39 | <el-radio-group v-model="form.sex"> | ||
| 40 | <el-radio label="0">{{ language == 0 ? '女' : 'female' }}</el-radio> | ||
| 41 | <el-radio label="1">{{ language == 0 ? '男' : 'male' }}</el-radio> | ||
| 42 | </el-radio-group> | ||
| 43 | </el-form-item> | ||
| 44 | |||
| 45 | <el-form-item :label="language==0?'主要会员角色':'roles'" prop="labelArr"> | ||
| 46 | <el-select v-model="form.labelArr" multiple> | ||
| 47 | <el-option v-for="l in labels" :key="l.value" :value="l.value" :label="language==0?l.label:l.enlabel"/> | ||
| 48 | </el-select> | ||
| 49 | </el-form-item> | ||
| 50 | |||
| 51 | |||
| 52 | </el-col> | ||
| 53 | </el-row> | ||
| 54 | </el-form> | ||
| 55 | <template #footer> | ||
| 56 | <div class="dialog-footer text-center"> | ||
| 57 | <el-button type="primary" class="btn-lineG w200px" round @click="submitForm">{{ | ||
| 58 | language == 0 ? '确定' : 'Save' | ||
| 59 | }} | ||
| 60 | </el-button> | ||
| 61 | </div> | ||
| 62 | </template> | ||
| 63 | </el-dialog> | ||
| 64 | </template> | ||
| 65 | |||
| 66 | <script setup> | ||
| 67 | import {reactive, ref, toRefs, watch} from 'vue' | ||
| 68 | import {getCurrentInstance, nextTick, onMounted} from '@vue/runtime-core' | ||
| 69 | import * as match from '@/apiPc/match' | ||
| 70 | import {ElMessage} from 'element-plus' | ||
| 71 | import {nationList} from '@/assets/js/data' | ||
| 72 | import _ from 'lodash' | ||
| 73 | import cache from "@/plugins/cache"; | ||
| 74 | |||
| 75 | const language = ref(cache.local.get('language') || 0) | ||
| 76 | const certificates = ref([ | ||
| 77 | { | ||
| 78 | value: '0', | ||
| 79 | label: language.value == 0 ? '居民身份证' : 'Resident ID card' | ||
| 80 | }, | ||
| 81 | { | ||
| 82 | value: '1', | ||
| 83 | label: language.value == 0 ? '护照' : 'Passport' | ||
| 84 | }, | ||
| 85 | { | ||
| 86 | value: '2', | ||
| 87 | label: language.value == 0 ? '其他' : 'Other' | ||
| 88 | } | ||
| 89 | ]) | ||
| 90 | const {proxy} = getCurrentInstance() | ||
| 91 | const emit = defineEmits(['submitForm']) | ||
| 92 | const data = reactive({ | ||
| 93 | form: { | ||
| 94 | idcType: '1', | ||
| 95 | sex:'0' | ||
| 96 | }, | ||
| 97 | rules: { | ||
| 98 | xing: [{required: true, message: '必填', trigger: 'blur'}], | ||
| 99 | ming: [{required: true, message: '必填', trigger: 'blur'}], | ||
| 100 | idcCode: [{required: true, message: '必填', trigger: 'blur'}], | ||
| 101 | birth: [{required: true, message: '必填', trigger: 'change'}], | ||
| 102 | sex: [{required: true, message: '必填', trigger: 'change'}], | ||
| 103 | labelArr: [{required: true, message: '必填', trigger: 'blur'}] | ||
| 104 | }, | ||
| 105 | rules_cn: { | ||
| 106 | xing: [{required: true, message: 'required', trigger: 'blur'}], | ||
| 107 | ming: [{required: true, message: 'required', trigger: 'blur'}], | ||
| 108 | idcCode: [{required: true, message: 'required', trigger: 'blur'}], | ||
| 109 | birth: [{required: true, message: 'required', trigger: 'change'}], | ||
| 110 | address: [{required: true, message: 'required', trigger: 'blur'}], | ||
| 111 | sex: [{required: true, message: 'required', trigger: 'change'}], | ||
| 112 | labelArr: [{required: true, message: 'required', trigger: 'blur'}] | ||
| 113 | }, | ||
| 114 | show: false, | ||
| 115 | labels: [ | ||
| 116 | // {value: '0', label: '运动员', enlabel: 'Sportsman'}, | ||
| 117 | {value: '1', label: '教练', enlabel: 'Coach'}, | ||
| 118 | {value: '2', label: '领队', enlabel: 'Leader'}, | ||
| 119 | {value: '4', label: '队医', enlabel: 'Nurse'}, | ||
| 120 | {value: '5', label: '翻译', enlabel: 'Translator'}, | ||
| 121 | {value: '6', label: '官员', enlabel: 'Official'}, | ||
| 122 | {value: '3', label: '其他', enlabel: 'Other'} | ||
| 123 | ], | ||
| 124 | title: 'Add accompanying personnel', | ||
| 125 | cptId:'' | ||
| 126 | }) | ||
| 127 | const { | ||
| 128 | form, | ||
| 129 | rules, | ||
| 130 | rules_cn, | ||
| 131 | show, | ||
| 132 | title, | ||
| 133 | cptId, | ||
| 134 | labels, | ||
| 135 | uType | ||
| 136 | } = toRefs(data) | ||
| 137 | let editgay = false | ||
| 138 | const open = (params) => { | ||
| 139 | console.log(params) | ||
| 140 | show.value = true | ||
| 141 | cptId.value = params.cptId | ||
| 142 | title.value = params.title | ||
| 143 | if (params.id != 0) { // 编辑 | ||
| 144 | editgay = true | ||
| 145 | match.getPersonInfoById(params.id).then(res => { | ||
| 146 | form.value = res.data | ||
| 147 | form.value.id = params.id | ||
| 148 | if (form.value.label) { | ||
| 149 | // {0:0,1:1,2:3} | ||
| 150 | form.value.labelArr = form.value.label.split(',') | ||
| 151 | } | ||
| 152 | }) | ||
| 153 | } | ||
| 154 | } | ||
| 155 | defineExpose({open}) | ||
| 156 | watch(show, (value) => { | ||
| 157 | if (!value) { | ||
| 158 | form.value = {} | ||
| 159 | } | ||
| 160 | nextTick(() => { | ||
| 161 | proxy.$refs['dialogRef'].clearValidate() | ||
| 162 | }) | ||
| 163 | }) | ||
| 164 | |||
| 165 | function submitForm() { | ||
| 166 | proxy.$refs['dialogRef'].validate((valid) => { | ||
| 167 | if (valid) { | ||
| 168 | form.value.label = form.value.labelArr.toString() | ||
| 169 | if (editgay) { | ||
| 170 | // id不是0 | ||
| 171 | match.editPersonInfo(form.value).then(res => { | ||
| 172 | ElMessage.success('保存成功') | ||
| 173 | show.value = false | ||
| 174 | emit('submitForm') | ||
| 175 | }) | ||
| 176 | } else { | ||
| 177 | form.value.cptId = cptId.value | ||
| 178 | match.savePersonForMyPerson(form.value).then(res => { | ||
| 179 | ElMessage.success('保存成功') | ||
| 180 | show.value = false | ||
| 181 | emit('submitForm') | ||
| 182 | }) | ||
| 183 | } | ||
| 184 | } | ||
| 185 | }) | ||
| 186 | } | ||
| 187 | |||
| 188 | function cancel() { | ||
| 189 | show.value = false | ||
| 190 | } | ||
| 191 | </script> | ||
| 192 | |||
| 193 | <style lang="scss"> | ||
| 194 | .threeFour { | ||
| 195 | width: 100%; | ||
| 196 | |||
| 197 | .el-upload--picture-card { | ||
| 198 | width: 120px; | ||
| 199 | height: 160px; | ||
| 200 | } | ||
| 201 | |||
| 202 | .el-upload-list--picture-card .el-upload-list__item { | ||
| 203 | width: 120px; | ||
| 204 | height: 160px; | ||
| 205 | } | ||
| 206 | } | ||
| 207 | |||
| 208 | .tip { | ||
| 209 | font-size: 13px; | ||
| 210 | color: #999; | ||
| 211 | margin: 10px 0; | ||
| 212 | |||
| 213 | i { | ||
| 214 | color: red; | ||
| 215 | margin: 0 4px 0 0; | ||
| 216 | } | ||
| 217 | } | ||
| 218 | |||
| 219 | .shenfen { | ||
| 220 | .el-upload--picture-card { | ||
| 221 | width: 320px; | ||
| 222 | height: 200px; | ||
| 223 | } | ||
| 224 | |||
| 225 | .el-upload-list--picture-card .el-upload-list__item { | ||
| 226 | width: 320px; | ||
| 227 | height: 200px; | ||
| 228 | } | ||
| 229 | } | ||
| 230 | |||
| 231 | .touxiang { | ||
| 232 | :deep(.el-upload--picture-card ) { | ||
| 233 | width: 140px; | ||
| 234 | height: 200px; | ||
| 235 | } | ||
| 236 | } | ||
| 237 | |||
| 238 | .touxiang { | ||
| 239 | :deep(.el-upload-list__item ) { | ||
| 240 | width: 140px; | ||
| 241 | height: 200px; | ||
| 242 | } | ||
| 243 | |||
| 244 | } | ||
| 245 | |||
| 246 | .el-form--inline .el-form-item { | ||
| 247 | width: 100% | ||
| 248 | } | ||
| 249 | |||
| 250 | |||
| 251 | .boxDialog { | ||
| 252 | .el-dialog__header { | ||
| 253 | background: linear-gradient(#ed2c22, #fe6d45); | ||
| 254 | margin-right: 0; | ||
| 255 | height: 52px; | ||
| 256 | |||
| 257 | span { | ||
| 258 | color: #fff; | ||
| 259 | } | ||
| 260 | } | ||
| 261 | } | ||
| 262 | |||
| 263 | </style> |
| ... | @@ -42,7 +42,7 @@ | ... | @@ -42,7 +42,7 @@ |
| 42 | /> | 42 | /> |
| 43 | </el-form-item> | 43 | </el-form-item> |
| 44 | <el-form-item :label="language==0?'主要会员角色':'roles'" prop="labelArr"> | 44 | <el-form-item :label="language==0?'主要会员角色':'roles'" prop="labelArr"> |
| 45 | <el-select v-model="form.labelArr" multiple @change="labelvalue"> | 45 | <el-select v-model="form.labelArr" multiple> |
| 46 | <el-option v-for="l in labels" :key="l.value" :value="l.value" :label="language==0?l.label:l.enlabel"/> | 46 | <el-option v-for="l in labels" :key="l.value" :value="l.value" :label="language==0?l.label:l.enlabel"/> |
| 47 | </el-select> | 47 | </el-select> |
| 48 | </el-form-item> | 48 | </el-form-item> |
| ... | @@ -63,6 +63,7 @@ | ... | @@ -63,6 +63,7 @@ |
| 63 | <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"/> |
| 64 | </el-select> | 64 | </el-select> |
| 65 | </el-form-item> | 65 | </el-form-item> |
| 66 | |||
| 66 | <el-form-item :label="language==0?'详细地址':'Address'" prop="address" required> | 67 | <el-form-item :label="language==0?'详细地址':'Address'" prop="address" required> |
| 67 | <el-cascader v-if="form.countryId == 240" | 68 | <el-cascader v-if="form.countryId == 240" |
| 68 | v-model="form.regionId" | 69 | v-model="form.regionId" |
| ... | @@ -201,7 +202,8 @@ const open = (params) => { | ... | @@ -201,7 +202,8 @@ const open = (params) => { |
| 201 | if (form.value.label) { | 202 | if (form.value.label) { |
| 202 | // {0:0,1:1,2:3} | 203 | // {0:0,1:1,2:3} |
| 203 | form.value.labelArr = form.value.label.split(',') | 204 | form.value.labelArr = form.value.label.split(',') |
| 204 | labelvalue(form.value.labelArr) | 205 | } else { |
| 206 | form.value.labelArr = ['0'] | ||
| 205 | } | 207 | } |
| 206 | }) | 208 | }) |
| 207 | } else { | 209 | } else { |
| ... | @@ -213,7 +215,6 @@ const open = (params) => { | ... | @@ -213,7 +215,6 @@ const open = (params) => { |
| 213 | if (form.value.label) { | 215 | if (form.value.label) { |
| 214 | // {0:0,1:1,2:3} | 216 | // {0:0,1:1,2:3} |
| 215 | form.value.labelArr = form.value.label.split(',') | 217 | form.value.labelArr = form.value.label.split(',') |
| 216 | labelvalue(form.value.labelArr) | ||
| 217 | } | 218 | } |
| 218 | }) | 219 | }) |
| 219 | } | 220 | } |
| ... | @@ -259,7 +260,6 @@ function checkCode() { | ... | @@ -259,7 +260,6 @@ function checkCode() { |
| 259 | form.value = res.data | 260 | form.value = res.data |
| 260 | if (form.value.label != null) { | 261 | if (form.value.label != null) { |
| 261 | form.value.labelArr = form.value.label.split(',') | 262 | form.value.labelArr = form.value.label.split(',') |
| 262 | labelvalue(form.value.labelArr) | ||
| 263 | } | 263 | } |
| 264 | form.value.groupId = groupId.value | 264 | form.value.groupId = groupId.value |
| 265 | } | 265 | } |
| ... | @@ -297,16 +297,6 @@ function giveBirthDay() { | ... | @@ -297,16 +297,6 @@ function giveBirthDay() { |
| 297 | } | 297 | } |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | function labelvalue(e) { | ||
| 301 | if (e.indexOf('1') > -1 || e.indexOf('2') > -1) { | ||
| 302 | // 联系方式必填 | ||
| 303 | showRequire.value = true | ||
| 304 | } else { | ||
| 305 | showRequire.value = false | ||
| 306 | } | ||
| 307 | console.log(showRequire.value) | ||
| 308 | } | ||
| 309 | |||
| 310 | function submitForm() { | 300 | function submitForm() { |
| 311 | proxy.$refs['dialogRef'].validate((valid) => { | 301 | proxy.$refs['dialogRef'].validate((valid) => { |
| 312 | if (valid) { | 302 | if (valid) { | ... | ... |
src/viewsPc/match/components/addWdsf.vue
0 → 100644
| 1 | <template> | ||
| 2 | <el-dialog | ||
| 3 | v-model="show" :title="title" width="800px" append-to-body close-icon="CircleClose" center | ||
| 4 | :close-on-click-modal="false" class="pcloginpop" @close="cancel" | ||
| 5 | destroy-on-close | ||
| 6 | > | ||
| 7 | <el-form ref="dialogRef" :model="form" :label-width="language==0?120:180" inline> | ||
| 8 | <el-form-item :label="language==0?'WDSF卡号':'WDSF ID'" v-if="form.id"> | ||
| 9 | {{ form.wdsfMin }} | ||
| 10 | </el-form-item> | ||
| 11 | <el-form-item :label="language==0?'WDSF卡号':'WDSF ID'" required v-else> | ||
| 12 | <el-input type="text" v-model="card" @change="resetCode" > | ||
| 13 | <template #append> | ||
| 14 | <el-button type="primary" plain style="width: 110px" @click="checkCard"> | ||
| 15 | <el-icon v-if="isCodeTrue" size="16" color="#67C23A"> | ||
| 16 | <CircleCheckFilled/> | ||
| 17 | </el-icon> | ||
| 18 | <span v-else>{{ language == 0 ? '校验卡号' : 'Check Code' }}</span> | ||
| 19 | </el-button> | ||
| 20 | </template> | ||
| 21 | </el-input> | ||
| 22 | <Vcode :show="showVcode" :z-index="2999" @success="codeSuccess()"></Vcode> | ||
| 23 | </el-form-item> | ||
| 24 | <div class="h30"></div> | ||
| 25 | <div class="leftboderTT">{{ language == 0 ? '个人信息' : 'Personal information' }} | ||
| 26 | <span v-if="language==0">(登录时需要验证,保护账户信息)</span> | ||
| 27 | <span v-else>(Obtain automatically according to the WDSF number)</span> | ||
| 28 | </div> | ||
| 29 | <div class="h20"></div> | ||
| 30 | <el-form-item :label="language==0?'名':'name'"> | ||
| 31 | <el-input v-model="form.ming" disabled/> | ||
| 32 | </el-form-item> | ||
| 33 | <el-form-item :label="language==0?'姓氏':'surname'"> | ||
| 34 | <el-input v-model="form.xing" disabled/> | ||
| 35 | </el-form-item> | ||
| 36 | <el-form-item label="Representing"> | ||
| 37 | <el-input v-model="form.representing" disabled/> | ||
| 38 | </el-form-item> | ||
| 39 | <el-form-item label="Age group"> | ||
| 40 | <el-input v-model="form.ageGroup" disabled/> | ||
| 41 | </el-form-item> | ||
| 42 | <el-form-item label="Division"> | ||
| 43 | <el-input v-model="form.division" disabled/> | ||
| 44 | </el-form-item> | ||
| 45 | <el-form-item label="Status"> | ||
| 46 | <el-input v-model="form.wdsfStatus" disabled/> | ||
| 47 | </el-form-item> | ||
| 48 | <div class="h30"></div> | ||
| 49 | <div class="leftboderTT"> | ||
| 50 | {{ language == 0 ? '补充信息' : 'Supplementary Information' }} | ||
| 51 | </div> | ||
| 52 | <div class="h20"></div> | ||
| 53 | <el-form-item :label="language==0?'性别':'Sex'" required> | ||
| 54 | <el-radio-group v-model="form.sex"> | ||
| 55 | <el-radio label="0">{{ language == 0 ? '女' : 'female' }}</el-radio> | ||
| 56 | <el-radio label="1">{{ language == 0 ? '男' : 'male' }}</el-radio> | ||
| 57 | </el-radio-group> | ||
| 58 | </el-form-item> | ||
| 59 | |||
| 60 | <el-form-item :label="language==0?'出生日期':'Birthday'" required> | ||
| 61 | <el-date-picker | ||
| 62 | v-model="form.birth" | ||
| 63 | style="width: 100%;" | ||
| 64 | type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" | ||
| 65 | /> | ||
| 66 | </el-form-item> | ||
| 67 | <el-form-item label="Passport number" required> | ||
| 68 | <el-input v-model="form.passportNumber"/> | ||
| 69 | </el-form-item> | ||
| 70 | <el-form-item label="Passport File"> | ||
| 71 | <file-upload v-model="form.passportUrl" :limit="1" :is-show-tip="false" :button-text="'Upload'"/> | ||
| 72 | </el-form-item> | ||
| 73 | </el-form> | ||
| 74 | <template #footer> | ||
| 75 | <div class="dialog-footer text-center"> | ||
| 76 | <el-button type="primary" class="btn-lineG w200px" round @click="submitForm">{{ | ||
| 77 | language == 0 ? '确定' : 'Save' | ||
| 78 | }} | ||
| 79 | </el-button> | ||
| 80 | </div> | ||
| 81 | </template> | ||
| 82 | </el-dialog> | ||
| 83 | </template> | ||
| 84 | |||
| 85 | <script setup> | ||
| 86 | import {reactive, ref, toRefs, watch} from 'vue' | ||
| 87 | import {getCurrentInstance, nextTick, onMounted} from '@vue/runtime-core' | ||
| 88 | import * as match from '@/apiPc/match' | ||
| 89 | import {ElMessage} from 'element-plus' | ||
| 90 | import _ from 'lodash' | ||
| 91 | import cache from "@/plugins/cache"; | ||
| 92 | import Vcode from "vue3-puzzle-vcode" | ||
| 93 | import {checkWdsf} from "@/apiPc/match"; | ||
| 94 | const language = ref(cache.local.get('language') || 0) | ||
| 95 | const certificates = ref([ | ||
| 96 | { | ||
| 97 | value: '0', | ||
| 98 | label: language.value == 0 ? '居民身份证' : 'Resident ID card' | ||
| 99 | }, | ||
| 100 | { | ||
| 101 | value: '1', | ||
| 102 | label: language.value == 0 ? '护照' : 'Passport' | ||
| 103 | }, | ||
| 104 | { | ||
| 105 | value: '2', | ||
| 106 | label: language.value == 0 ? '其他' : 'Other' | ||
| 107 | } | ||
| 108 | ]) | ||
| 109 | const {proxy} = getCurrentInstance() | ||
| 110 | const emit = defineEmits(['submitForm']) | ||
| 111 | const data = reactive({ | ||
| 112 | form: { | ||
| 113 | // countryId: 240 | ||
| 114 | sex:'0' | ||
| 115 | }, | ||
| 116 | card:'', | ||
| 117 | show: false, | ||
| 118 | showVcode: false, | ||
| 119 | labels: [ | ||
| 120 | {value: '0', label: '运动员', enlabel: 'Sportsman'}, | ||
| 121 | {value: '1', label: '教练', enlabel: 'Coach'}, | ||
| 122 | {value: '2', label: '领队', enlabel: 'Leader'}, | ||
| 123 | {value: '4', label: '队医', enlabel: 'Nurse'}, | ||
| 124 | {value: '5', label: '翻译', enlabel: 'Translator'}, | ||
| 125 | {value: '6', label: '官员', enlabel: 'Official'}, | ||
| 126 | {value: '3', label: '其他', enlabel: 'Other'} | ||
| 127 | ], | ||
| 128 | title: '添加选手信息', | ||
| 129 | isMe: false, | ||
| 130 | isCodeTrue: false, | ||
| 131 | cptId:'' | ||
| 132 | }) | ||
| 133 | const {form, show,showVcode, title, labels, uType, isMe,isCodeTrue,card,cptId} = toRefs(data) | ||
| 134 | |||
| 135 | let editgay = false | ||
| 136 | const open = (params) => { | ||
| 137 | console.log(params) | ||
| 138 | show.value = true | ||
| 139 | title.value = params.title | ||
| 140 | isMe.value = params.isMe | ||
| 141 | cptId.value = params.cptId | ||
| 142 | if (language.value == 0) { | ||
| 143 | form.value.countryId = 240 | ||
| 144 | } | ||
| 145 | if (isMe.value) { | ||
| 146 | //个人 | ||
| 147 | match.getMyPersonInfo().then(res => { | ||
| 148 | form.value = res.data | ||
| 149 | form.value.id = res.data.id | ||
| 150 | if (form.value.label) { | ||
| 151 | // {0:0,1:1,2:3} | ||
| 152 | form.value.labelArr = form.value.label.split(',') | ||
| 153 | } else { | ||
| 154 | form.value.labelArr = ['0'] | ||
| 155 | } | ||
| 156 | }) | ||
| 157 | } else { | ||
| 158 | if (params.id != 0) { // 编辑舞伴 | ||
| 159 | editgay = true | ||
| 160 | form.value = params.form | ||
| 161 | } | ||
| 162 | } | ||
| 163 | } | ||
| 164 | defineExpose({open}) | ||
| 165 | watch(show, (value) => { | ||
| 166 | if (!value) { | ||
| 167 | form.value = { | ||
| 168 | sex:'0' | ||
| 169 | } | ||
| 170 | } | ||
| 171 | nextTick(() => { | ||
| 172 | proxy.$refs['dialogRef'].clearValidate() | ||
| 173 | }) | ||
| 174 | }) | ||
| 175 | |||
| 176 | function submitForm() { | ||
| 177 | if (editgay) { | ||
| 178 | // id不是0 | ||
| 179 | form.value.cptId = cptId.value | ||
| 180 | match.editPersonInfo(form.value).then(res => { | ||
| 181 | ElMessage.success('保存成功') | ||
| 182 | show.value = false | ||
| 183 | emit('submitForm') | ||
| 184 | }) | ||
| 185 | } else { | ||
| 186 | if (!form.value.passportNumber) { | ||
| 187 | ElMessage.error('Please fill in your passport number') | ||
| 188 | return | ||
| 189 | } | ||
| 190 | if (!form.value.birth) { | ||
| 191 | ElMessage.error('Please fill in your birthday') | ||
| 192 | return | ||
| 193 | } | ||
| 194 | if(Array.isArray(form.value.passportUrl)){ | ||
| 195 | form.value.passportUrl = form.value.passportUrl[0].url | ||
| 196 | } | ||
| 197 | if (isMe.value) { | ||
| 198 | match.saveMyBaseInfo(form.value).then(res => { | ||
| 199 | ElMessage.success('保存成功') | ||
| 200 | show.value = false | ||
| 201 | emit('submitForm') | ||
| 202 | }) | ||
| 203 | } else { | ||
| 204 | delete form.value.status | ||
| 205 | delete form.value.id | ||
| 206 | form.value.label = '0' | ||
| 207 | form.value.cptId = cptId.value | ||
| 208 | form.value.wdsfMin = form.value.min | ||
| 209 | form.value.idcCode = form.value.passportNumber | ||
| 210 | form.value.idcType = '1' | ||
| 211 | match.savePersonForMyPerson(form.value).then(res => { | ||
| 212 | ElMessage.success('保存成功') | ||
| 213 | show.value = false | ||
| 214 | emit('submitForm', res.data) | ||
| 215 | }) | ||
| 216 | } | ||
| 217 | } | ||
| 218 | } | ||
| 219 | |||
| 220 | function cancel() { | ||
| 221 | show.value = false | ||
| 222 | showVcode.value = false | ||
| 223 | } | ||
| 224 | function resetCode() { | ||
| 225 | isCodeTrue.value = false | ||
| 226 | } | ||
| 227 | function checkCard() { | ||
| 228 | if(isCodeTrue.value){ | ||
| 229 | return | ||
| 230 | } | ||
| 231 | if (!card.value) { | ||
| 232 | if (language.value == 0) { | ||
| 233 | ElMessage.error('请填写WDSF卡号') | ||
| 234 | } else { | ||
| 235 | ElMessage.error('Please fill in your WDSF code') | ||
| 236 | } | ||
| 237 | return | ||
| 238 | } | ||
| 239 | showVcode.value = true | ||
| 240 | } | ||
| 241 | function codeSuccess(msg) { | ||
| 242 | console.log('验证通过' + msg); | ||
| 243 | showVcode.value = false | ||
| 244 | isCodeTrue.value = true | ||
| 245 | checkWdsf({card: card.value}).then(res => { | ||
| 246 | form.value = res.data | ||
| 247 | form.value.xing = form.value.surname | ||
| 248 | form.value.ming = form.value.name | ||
| 249 | form.value.wdsfStatus = form.value.status | ||
| 250 | if (!form.value.sex) { | ||
| 251 | form.value.sex = '0' | ||
| 252 | } | ||
| 253 | if (form.value.wdsfFlag == '0') { | ||
| 254 | isCodeTrue.value = false | ||
| 255 | if (language.value == 0) { | ||
| 256 | ElMessage.error('WDSF卡号错误') | ||
| 257 | } else { | ||
| 258 | ElMessage.error('WDSF ID is Error') | ||
| 259 | } | ||
| 260 | } | ||
| 261 | }) | ||
| 262 | } | ||
| 263 | </script> | ||
| 264 | |||
| 265 | <style lang="scss"> | ||
| 266 | .el-input-group__append button.el-button, .el-input-group__append button.el-button:hover { | ||
| 267 | color: var(--el-color-primary); | ||
| 268 | background: #efefff; | ||
| 269 | border: var(--el-color-primary) solid 1px; | ||
| 270 | border-radius: 0; | ||
| 271 | } | ||
| 272 | |||
| 273 | .leftboderTT { | ||
| 274 | color: var(--el-color-primary); | ||
| 275 | font-size: 16px; | ||
| 276 | font-weight: 600; | ||
| 277 | |||
| 278 | span { | ||
| 279 | color: #929AA0; | ||
| 280 | font-size: 14px; | ||
| 281 | } | ||
| 282 | } | ||
| 283 | |||
| 284 | .threeFour { | ||
| 285 | width: 100%; | ||
| 286 | |||
| 287 | .el-upload--picture-card { | ||
| 288 | width: 120px; | ||
| 289 | height: 160px; | ||
| 290 | } | ||
| 291 | |||
| 292 | .el-upload-list--picture-card .el-upload-list__item { | ||
| 293 | width: 120px; | ||
| 294 | height: 160px; | ||
| 295 | } | ||
| 296 | } | ||
| 297 | |||
| 298 | .tip { | ||
| 299 | font-size: 13px; | ||
| 300 | color: #999; | ||
| 301 | margin: 10px 0; | ||
| 302 | |||
| 303 | i { | ||
| 304 | color: red; | ||
| 305 | margin: 0 4px 0 0; | ||
| 306 | } | ||
| 307 | } | ||
| 308 | |||
| 309 | .shenfen { | ||
| 310 | .el-upload--picture-card { | ||
| 311 | width: 320px; | ||
| 312 | height: 200px; | ||
| 313 | } | ||
| 314 | |||
| 315 | .el-upload-list--picture-card .el-upload-list__item { | ||
| 316 | width: 320px; | ||
| 317 | height: 200px; | ||
| 318 | } | ||
| 319 | } | ||
| 320 | |||
| 321 | .touxiang { | ||
| 322 | :deep(.el-upload--picture-card ) { | ||
| 323 | width: 140px; | ||
| 324 | height: 200px; | ||
| 325 | } | ||
| 326 | } | ||
| 327 | |||
| 328 | .touxiang { | ||
| 329 | :deep(.el-upload-list__item ) { | ||
| 330 | width: 140px; | ||
| 331 | height: 200px; | ||
| 332 | } | ||
| 333 | |||
| 334 | } | ||
| 335 | |||
| 336 | .el-form--inline .el-form-item { | ||
| 337 | width: 100% | ||
| 338 | } | ||
| 339 | |||
| 340 | |||
| 341 | .boxDialog { | ||
| 342 | .el-dialog__header { | ||
| 343 | background: linear-gradient(#ed2c22, #fe6d45); | ||
| 344 | margin-right: 0; | ||
| 345 | height: 52px; | ||
| 346 | |||
| 347 | span { | ||
| 348 | color: #fff; | ||
| 349 | } | ||
| 350 | } | ||
| 351 | } | ||
| 352 | |||
| 353 | </style> |
| ... | @@ -7,10 +7,10 @@ | ... | @@ -7,10 +7,10 @@ |
| 7 | <el-descriptions-item v-if="form.picUrl" :label="language==0?'个人照片':'photo'"> | 7 | <el-descriptions-item v-if="form.picUrl" :label="language==0?'个人照片':'photo'"> |
| 8 | <img style="width: 60px" :src="fillImgUrl(form.picUrl)"> | 8 | <img style="width: 60px" :src="fillImgUrl(form.picUrl)"> |
| 9 | </el-descriptions-item> | 9 | </el-descriptions-item> |
| 10 | <el-descriptions-item :label="language==0?'姓氏':'surname'">{{ form.xing }}</el-descriptions-item> | 10 | <el-descriptions-item v-if="form.xing" :label="language==0?'姓氏':'surname'">{{ form.xing }}</el-descriptions-item> |
| 11 | <el-descriptions-item :label="language==0?'名':'name'">{{ form.ming }}</el-descriptions-item> | 11 | <el-descriptions-item :label="language==0?'名':'name'">{{ form.ming }}</el-descriptions-item> |
| 12 | <el-descriptions-item :label="language==0?'性别':'sex'">{{ form.sexStr }}</el-descriptions-item> | 12 | <el-descriptions-item :label="language==0?'性别':'sex'">{{ form.sexStr }}</el-descriptions-item> |
| 13 | <el-descriptions-item :label="language==0?'所属国家':'Nationality'">{{ form.countryName }}</el-descriptions-item> | 13 | <el-descriptions-item v-if="form.countryName" :label="language==0?'所属国家':'Nationality'">{{ form.countryName }}</el-descriptions-item> |
| 14 | <el-descriptions-item :label="language==0?'证件类型':'ID type'">{{ form.idcTypeStr }}</el-descriptions-item> | 14 | <el-descriptions-item :label="language==0?'证件类型':'ID type'">{{ form.idcTypeStr }}</el-descriptions-item> |
| 15 | <el-descriptions-item :label="language==0?'证件号码':'ID NO'">{{ form.idcCode }}</el-descriptions-item> | 15 | <el-descriptions-item :label="language==0?'证件号码':'ID NO'">{{ form.idcCode }}</el-descriptions-item> |
| 16 | <el-descriptions-item :label="language==0?'出生日期':'birth'">{{ form.birth }}</el-descriptions-item> | 16 | <el-descriptions-item :label="language==0?'出生日期':'birth'">{{ form.birth }}</el-descriptions-item> | ... | ... |
| ... | @@ -2,9 +2,14 @@ | ... | @@ -2,9 +2,14 @@ |
| 2 | <div class="mt20"></div> | 2 | <div class="mt20"></div> |
| 3 | <el-table :data="list" :sum-text="sumText" border style="width: 100%" v-loading="loading"> | 3 | <el-table :data="list" :sum-text="sumText" border style="width: 100%" v-loading="loading"> |
| 4 | <el-table-column :label="language==0?'序号':'Index'" type="index" width="70" align="center"/> | 4 | <el-table-column :label="language==0?'序号':'Index'" type="index" width="70" align="center"/> |
| 5 | <el-table-column :label="language==0?'姓氏':'Last Name'" prop="personInfo.xing" min-width="100"/> | 5 | <el-table-column :label="language==0?'姓氏':'Surname'" prop="personInfo.xing" min-width="100"/> |
| 6 | <el-table-column :label="language==0?'名':'First Name'" prop="personInfo.ming" min-width="100"/> | 6 | <el-table-column :label="language==0?'名':'Name'" prop="personInfo.ming" min-width="100"/> |
| 7 | <el-table-column :label="language==0?'所属国家':'Nationality'" prop="personInfo.countryName" :min-width="language==0?'100':'120'"/> | 7 | <el-table-column :label="language==0?'所属国家':'Nationality'" prop="" :min-width="language==0?'100':'120'"> |
| 8 | <template #default="scope"> | ||
| 9 | <span v-if="scope.row.personInfo.countryName">{{scope.row.personInfo.countryName}}</span> | ||
| 10 | <span v-if="scope.row.personInfo.Representing">{{scope.row.personInfo.Representing}}</span> | ||
| 11 | </template> | ||
| 12 | </el-table-column> | ||
| 8 | <!-- <el-table-column :label="language==0?'短名':'Nick Name'" prop="personInfo.shortName" min-width="110"/>--> | 13 | <!-- <el-table-column :label="language==0?'短名':'Nick Name'" prop="personInfo.shortName" min-width="110"/>--> |
| 9 | <el-table-column :label="language==0?'性别':'Gender'" prop="personInfo.sexStr"/> | 14 | <el-table-column :label="language==0?'性别':'Gender'" prop="personInfo.sexStr"/> |
| 10 | <!-- <el-table-column :label="language==0?'年龄':'Age'" prop="personInfo.age"/>--> | 15 | <!-- <el-table-column :label="language==0?'年龄':'Age'" prop="personInfo.age"/>--> | ... | ... |
| ... | @@ -355,10 +355,9 @@ function goTeamSign() { | ... | @@ -355,10 +355,9 @@ function goTeamSign() { |
| 355 | function goPersonalSign() { | 355 | function goPersonalSign() { |
| 356 | // 选项目 | 356 | // 选项目 |
| 357 | router.push({ | 357 | router.push({ |
| 358 | name: `chooseCoach`, | 358 | name: 'chooseProject', |
| 359 | query: { | 359 | query: { |
| 360 | matchId: matchId.value, | 360 | matchId: matchId.value |
| 361 | signType: matchData.value.signType | ||
| 362 | } | 361 | } |
| 363 | }) | 362 | }) |
| 364 | } | 363 | } | ... | ... |
| ... | @@ -7,14 +7,16 @@ | ... | @@ -7,14 +7,16 @@ |
| 7 | <div> | 7 | <div> |
| 8 | <el-card style="min-height: 50vh"> | 8 | <el-card style="min-height: 50vh"> |
| 9 | <div class="pt30"> | 9 | <div class="pt30"> |
| 10 | <el-form class="d-form" size="large" :label-width="language==0?120:180" | 10 | <el-form ref="wdsfDataRef" class="d-form" size="large" :label-width="language==0?120:180" |
| 11 | style="max-width: 560px;margin: auto"> | 11 | style="max-width: 560px;margin: auto" :rules="wdsfDataRule"> |
| 12 | <el-form-item :label="language==0?'WDSF卡号':'WDSF ID'" required> | 12 | <el-form-item :label="language==0?'WDSF卡号':'WDSF ID'" required> |
| 13 | <el-input type="text" v-model="form.card" @change="resetCode(0)" @blur="verifyCode"> | 13 | <el-input type="text" v-model="form.card" @change="resetCode(0)" @blur="verifyCode"> |
| 14 | <template #append> | 14 | <template #append> |
| 15 | <el-button type="primary" plain style="width: 110px" @click="checkCard"> | 15 | <el-button type="primary" plain style="width: 110px" @click="checkCard"> |
| 16 | <el-icon v-if="checkStatus" size="16" color="#67C23A"><CircleCheckFilled /></el-icon> | 16 | <el-icon v-if="wdsfData.wdsfFlag=='1'" size="16" color="#67C23A"> |
| 17 | <span v-else>{{ language==0?'校验卡号':'Check Code' }}</span> | 17 | <CircleCheckFilled/> |
| 18 | </el-icon> | ||
| 19 | <span v-else>{{ language == 0 ? '校验卡号' : 'Check Code' }}</span> | ||
| 18 | </el-button> | 20 | </el-button> |
| 19 | </template> | 21 | </template> |
| 20 | </el-input> | 22 | </el-input> |
| ... | @@ -25,48 +27,48 @@ | ... | @@ -25,48 +27,48 @@ |
| 25 | <span v-else>(Obtain automatically according to the WDSF number)</span> | 27 | <span v-else>(Obtain automatically according to the WDSF number)</span> |
| 26 | </div> | 28 | </div> |
| 27 | <div class="h20"></div> | 29 | <div class="h20"></div> |
| 28 | <el-form-item :label="language==0?'姓氏':'surname'" prop="xing" required> | 30 | <el-form-item :label="language==0?'姓氏':'surname'"> |
| 29 | <el-input v-model="form.xing" disabled/> | 31 | <el-input v-model="wdsfData.surname" disabled/> |
| 30 | </el-form-item> | 32 | </el-form-item> |
| 31 | <el-form-item :label="language==0?'名':'name'" prop="ming" required> | 33 | <el-form-item :label="language==0?'名':'name'"> |
| 32 | <el-input v-model="form.ming" disabled/> | 34 | <el-input v-model="wdsfData.name" disabled/> |
| 33 | </el-form-item> | 35 | </el-form-item> |
| 34 | <el-form-item label="Representing" required> | 36 | <el-form-item label="Representing"> |
| 35 | <el-input v-model="form.Representing" disabled/> | 37 | <el-input v-model="wdsfData.representing" disabled/> |
| 36 | </el-form-item> | 38 | </el-form-item> |
| 37 | <el-form-item label="Age group" required> | 39 | <el-form-item label="Age group"> |
| 38 | <el-input v-model="form.ageGroup" disabled/> | 40 | <el-input v-model="wdsfData.ageGroup" disabled/> |
| 39 | </el-form-item> | 41 | </el-form-item> |
| 40 | <el-form-item label="Division" required> | 42 | <el-form-item label="Division"> |
| 41 | <el-input v-model="form.division" disabled/> | 43 | <el-input v-model="wdsfData.division" disabled/> |
| 42 | </el-form-item> | 44 | </el-form-item> |
| 43 | <el-form-item label="Status" required> | 45 | <el-form-item label="Status"> |
| 44 | <el-input v-model="form.status" disabled/> | 46 | <el-input v-model="wdsfData.status" disabled/> |
| 45 | </el-form-item> | 47 | </el-form-item> |
| 46 | <div class="h30"></div> | 48 | <div class="h30"></div> |
| 47 | <div class="leftboderTT"> | 49 | <div class="leftboderTT"> |
| 48 | {{ language == 0 ? '补充信息' : 'Supplementary Information' }} | 50 | {{ language == 0 ? '补充信息' : 'Supplementary Information' }} |
| 49 | </div> | 51 | </div> |
| 50 | <div class="h20"></div> | 52 | <div class="h20"></div> |
| 51 | <el-form-item :label="language==0?'性别':'Sex'" prop="sex" required> | 53 | <el-form-item :label="language==0?'性别':'Sex'" required> |
| 52 | <el-radio-group v-model="form.sex"> | 54 | <el-radio-group v-model="wdsfData.sex"> |
| 53 | <el-radio label="0">{{ language==0?'女':'female' }}</el-radio> | 55 | <el-radio label="0">{{ language == 0 ? '女' : 'female' }}</el-radio> |
| 54 | <el-radio label="1">{{ language==0?'男':'male' }}</el-radio> | 56 | <el-radio label="1">{{ language == 0 ? '男' : 'male' }}</el-radio> |
| 55 | </el-radio-group> | 57 | </el-radio-group> |
| 56 | </el-form-item> | 58 | </el-form-item> |
| 57 | 59 | ||
| 58 | <el-form-item :label="language==0?'出生日期':'Birthday'" prop="birth" required> | 60 | <el-form-item :label="language==0?'出生日期':'Birthday'" required> |
| 59 | <el-date-picker | 61 | <el-date-picker |
| 60 | v-model="form.birth" | 62 | v-model="wdsfData.birthday" |
| 61 | style="width: 100%;" | 63 | style="width: 100%;" |
| 62 | type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" | 64 | type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" |
| 63 | /> | 65 | /> |
| 64 | </el-form-item> | 66 | </el-form-item> |
| 65 | <el-form-item label="Passport number" required prop="idcCode"> | 67 | <el-form-item label="Passport number" required> |
| 66 | <el-input v-model="form.idcCode"/> | 68 | <el-input v-model="wdsfData.passportNumber"/> |
| 67 | </el-form-item> | 69 | </el-form-item> |
| 68 | <el-form-item label="Passport File"> | 70 | <el-form-item label="Passport File"> |
| 69 | <file-upload :is-show-tip="false" :button-text="'Upload'"/> | 71 | <file-upload v-model="wdsfData.passportUrl" :limit="1" :is-show-tip="false" :button-text="'Upload'"/> |
| 70 | </el-form-item> | 72 | </el-form-item> |
| 71 | 73 | ||
| 72 | 74 | ||
| ... | @@ -75,25 +77,30 @@ | ... | @@ -75,25 +77,30 @@ |
| 75 | v-if="language==0">(登录时需要验证,保护账户信息)</span></div> | 77 | v-if="language==0">(登录时需要验证,保护账户信息)</span></div> |
| 76 | <div class="h20"></div> | 78 | <div class="h20"></div> |
| 77 | <el-form-item :label="language==0?'邮箱':'E-mail'" required> | 79 | <el-form-item :label="language==0?'邮箱':'E-mail'" required> |
| 78 | <el-input type="text" v-model="form.account" @change="resetCode(1)" | 80 | <el-input type="text" v-model="wdsfData.email" @change="resetCode(1)" |
| 79 | @blur="verifyCode"/> | 81 | @blur="verifyCode" :disabled="wdsfData.personFlag=='1'"/> |
| 80 | <div class="tip" v-if="language==0"> | 82 | <div class="tip" v-if="wdsfData.personFlag=='0'"> |
| 83 | <div v-if="language==0"> | ||
| 81 | (请填写正确的邮箱信息,邮箱信息在注册完成后无法修改。 | 84 | (请填写正确的邮箱信息,邮箱信息在注册完成后无法修改。 |
| 82 | 该邮箱后续会接收您报名审核、支付账单、比赛邀请函等。) | 85 | 该邮箱后续会接收您报名审核、支付账单、比赛邀请函等。) |
| 83 | </div> | 86 | </div> |
| 84 | <div class="tip" v-else> | 87 | <div v-else> |
| 85 | Please fill in a correct mailbox information, which cannot be modified after registration. | 88 | Please fill in a correct mailbox information, which cannot be modified after registration. |
| 86 | The mailbox will receive your registration review, payment of bills, competition invitation and so on. | 89 | The mailbox will receive your registration review, payment of bills, competition invitation and so |
| 90 | on. | ||
| 87 | </div> | 91 | </div> |
| 92 | </div> | ||
| 93 | |||
| 94 | |||
| 88 | </el-form-item> | 95 | </el-form-item> |
| 89 | <el-form-item :label="language==0?'验证码':'Code'" required> | 96 | <el-form-item :label="language==0?'验证码':'Code'" required v-if="wdsfData.personFlag=='0'"> |
| 90 | <el-input v-model="form.code"> | 97 | <el-input v-model="form.code"> |
| 91 | <template #append> | 98 | <template #append> |
| 92 | <el-button type="primary" plain style="width: 110px" @click="sendsmsMsg"> | 99 | <el-button type="primary" plain style="width: 110px" @click="sendsmsMsg"> |
| 93 | <count-down v-if="counting" v-slot="{ totalSeconds }" :time="60000" @end="counting=false"> | 100 | <count-down v-if="counting" v-slot="{ totalSeconds }" :time="60000" @end="counting=false"> |
| 94 | {{ totalSeconds }} {{ language==0?'秒':'s' }} | 101 | {{ totalSeconds }} {{ language == 0 ? '秒' : 's' }} |
| 95 | </count-down> | 102 | </count-down> |
| 96 | <span v-else>{{ language==0?'发送验证码':'Send code' }}</span> | 103 | <span v-else>{{ language == 0 ? '发送验证码' : 'Send code' }}</span> |
| 97 | </el-button> | 104 | </el-button> |
| 98 | </template> | 105 | </template> |
| 99 | </el-input> | 106 | </el-input> |
| ... | @@ -103,74 +110,88 @@ | ... | @@ -103,74 +110,88 @@ |
| 103 | <el-input type="password" show-password v-model="form.password" | 110 | <el-input type="password" show-password v-model="form.password" |
| 104 | :placeholder="language==0?'6-16位密码。区分大小写':'Password'"/> | 111 | :placeholder="language==0?'6-16位密码。区分大小写':'Password'"/> |
| 105 | </el-form-item> | 112 | </el-form-item> |
| 106 | <el-form-item :label="language==0?'确认密码':'Confirm Password'" required> | 113 | <el-form-item :label="language==0?'确认密码':'Confirm Password'" required |
| 114 | v-if="wdsfData.personFlag=='0'"> | ||
| 107 | <el-input type="password" show-password v-model="form.confirmPassword" @change="vconfirmPassword" | 115 | <el-input type="password" show-password v-model="form.confirmPassword" @change="vconfirmPassword" |
| 108 | :placeholder="language==0?'再次输入密码':'Confirm Password'"/> | 116 | :placeholder="language==0?'再次输入密码':'Confirm Password'"/> |
| 109 | <div class="text-danger" v-if="showError">{{ language==0?'密码不一致':'Password inconsistency' }}</div> | 117 | <div class="text-danger" v-if="showError">{{ |
| 118 | language == 0 ? '密码不一致' : 'Password inconsistency' | ||
| 119 | }} | ||
| 120 | </div> | ||
| 110 | </el-form-item> | 121 | </el-form-item> |
| 111 | </el-form> | 122 | </el-form> |
| 112 | </div> | 123 | </div> |
| 113 | <div class="text-center"> | 124 | <div class="text-center"> |
| 114 | <el-button class="primary-kx" round @click="goBack"> {{ language==0?'取消':'Cancel'}}</el-button> | 125 | <el-button class="primary-kx" round @click="goBack"> {{ language == 0 ? '取消' : 'Cancel' }}</el-button> |
| 115 | <el-button type="primary" class="btn-lineG w200px" round @click="next" v-if="matchId=='0'"> | 126 | <el-button type="primary" class="btn-lineG w200px" round @click="next" v-if="wdsfData.wdsfFlag=='1'"> |
| 116 | {{ language==0?'立即注册':'Register Now' }} | 127 | <span v-if="matchId=='0'">{{ language == 0 ? '立即注册' : 'Register Now' }}</span> |
| 117 | </el-button> | 128 | <span>{{ language == 0 ? '下一步' : 'Next' }}</span> |
| 118 | <el-button type="primary" class="btn-lineG w200px" round @click="next" v-else> | ||
| 119 | {{ language==0?'下一步':'Next' }} | ||
| 120 | </el-button> | 129 | </el-button> |
| 121 | </div> | 130 | </div> |
| 122 | </el-card> | 131 | </el-card> |
| 123 | </div> | 132 | </div> |
| 124 | 133 | ||
| 125 | <Vcode :show="isShow" @success="codeSuccess()"></Vcode> | 134 | <Vcode :show="isShow" :z-index="3000" @success="codeSuccess()"></Vcode> |
| 126 | </div> | 135 | </div> |
| 127 | </div> | 136 | </div> |
| 128 | </div> | 137 | </div> |
| 129 | </template> | 138 | </template> |
| 130 | 139 | ||
| 131 | <script setup> | 140 | <script setup> |
| 132 | import {ref,toRefs,reactive} from "vue" | 141 | import {ref, toRefs, reactive} from "vue" |
| 133 | import {onMounted} from "@vue/runtime-core"; | 142 | import {getCurrentInstance, onMounted} from "@vue/runtime-core"; |
| 134 | import Step3 from "./team/step3" | 143 | import Step3 from "./team/step3" |
| 135 | import Vcode from "vue3-puzzle-vcode" | 144 | import Vcode from "vue3-puzzle-vcode" |
| 136 | import { ElMessage } from 'element-plus' | 145 | import {ElMessage} from 'element-plus' |
| 137 | import CountDown from '@chenfengyuan/vue-countdown' | 146 | import CountDown from '@chenfengyuan/vue-countdown' |
| 138 | import cache from '@/plugins/cache' | 147 | import cache from '@/plugins/cache' |
| 139 | import {checkWdsf, getCaptchaSms, registerSingle} from "@/apiPc/match"; | 148 | import {checkWdsf, getCaptchaSms, loginSingle, registerSingle} from "@/apiPc/match"; |
| 140 | import {setToken} from "@/utils/auth"; | 149 | import {setToken} from "@/utils/auth"; |
| 141 | import PersonalStep from "@/viewsPc/register/components/personal-step"; | 150 | import PersonalStep from "@/viewsPc/register/components/personal-step"; |
| 142 | import FileUpload from "@/components/FileUpload"; | 151 | import FileUpload from "@/components/FileUpload"; |
| 143 | import {useRouter,useRoute} from "vue-router"; | 152 | import {useRouter, useRoute} from "vue-router"; |
| 153 | |||
| 144 | const language = ref(cache.local.get('language') || 0) | 154 | const language = ref(cache.local.get('language') || 0) |
| 145 | const router = useRouter() | 155 | const router = useRouter() |
| 146 | const route = useRoute() | 156 | const route = useRoute() |
| 157 | const {proxy} = getCurrentInstance() | ||
| 158 | |||
| 147 | const data = reactive({ | 159 | const data = reactive({ |
| 148 | isShow:false, | 160 | isShow: false, |
| 149 | isCodeTrue:0, | 161 | isCodeTrue: 0, |
| 150 | counting:false, | 162 | counting: false, |
| 151 | checkStatus:false, | 163 | checkStatus: false, |
| 152 | form:{ | 164 | form: {}, |
| 153 | sex:'0' | ||
| 154 | }, | ||
| 155 | activeStep: 0, | 165 | activeStep: 0, |
| 156 | failVcode:'验证失败,请重试', | 166 | failVcode: '验证失败,请重试', |
| 157 | successVcode:'验证通过!', | 167 | successVcode: '验证通过!', |
| 158 | sliderText: '拖动滑块完成拼图', | 168 | sliderText: '拖动滑块完成拼图', |
| 159 | showError: false | 169 | showError: false, |
| 170 | wdsfData: { | ||
| 171 | sex: '0' | ||
| 172 | }, | ||
| 173 | wdsfDataRule: { | ||
| 174 | birthday: [{required: true, message: 'required', trigger: 'blur'}], | ||
| 175 | passportNumber: [{required: true, message: 'required', trigger: 'blur'}], | ||
| 176 | } | ||
| 160 | }) | 177 | }) |
| 161 | const {isShow,isCodeTrue,counting,form,activeStep,failVcode,successVcode,sliderText,checkStatus,showError} = toRefs(data) | 178 | const { |
| 179 | isShow, isCodeTrue, counting, form, activeStep, failVcode, successVcode, sliderText, | ||
| 180 | checkStatus, showError, wdsfData, wdsfDataRule | ||
| 181 | } = toRefs(data) | ||
| 162 | const matchId = ref('0') | 182 | const matchId = ref('0') |
| 163 | onMounted(()=>{ | 183 | onMounted(() => { |
| 164 | if(language.value==1){ | 184 | if (language.value == 1) { |
| 165 | failVcode.value = 'Error!' | 185 | failVcode.value = 'Error!' |
| 166 | successVcode.value = 'Success!' | 186 | successVcode.value = 'Success!' |
| 167 | sliderText.value = 'Drag the slider to complete the puzzle' | 187 | sliderText.value = 'Drag the slider to complete the puzzle' |
| 168 | } | 188 | } |
| 169 | matchId.value = route.query.matchId | 189 | matchId.value = route.query.matchId || '0' |
| 170 | }) | 190 | }) |
| 191 | |||
| 171 | function sendsmsMsg() { | 192 | function sendsmsMsg() { |
| 172 | if(!form.value.account){ | 193 | if (!form.value.account) { |
| 173 | if(language.value==0){ | 194 | if (language.value == 0) { |
| 174 | ElMessage.error('请填写手机/邮箱') | 195 | ElMessage.error('请填写手机/邮箱') |
| 175 | } else { | 196 | } else { |
| 176 | ElMessage.error('Please fill in your phone/email address') | 197 | ElMessage.error('Please fill in your phone/email address') |
| ... | @@ -178,15 +199,16 @@ function sendsmsMsg() { | ... | @@ -178,15 +199,16 @@ function sendsmsMsg() { |
| 178 | return | 199 | return |
| 179 | } | 200 | } |
| 180 | 201 | ||
| 181 | if(counting.value){ | 202 | if (counting.value) { |
| 182 | return | 203 | return |
| 183 | } else { | 204 | } else { |
| 184 | isShow.value = true | 205 | isShow.value = true |
| 185 | } | 206 | } |
| 186 | } | 207 | } |
| 208 | |||
| 187 | function checkCard() { | 209 | function checkCard() { |
| 188 | if(!form.value.card){ | 210 | if (!form.value.card) { |
| 189 | if(language.value==0){ | 211 | if (language.value == 0) { |
| 190 | ElMessage.error('请填写WDSF卡号') | 212 | ElMessage.error('请填写WDSF卡号') |
| 191 | } else { | 213 | } else { |
| 192 | ElMessage.error('Please fill in your WDSF code') | 214 | ElMessage.error('Please fill in your WDSF code') |
| ... | @@ -195,51 +217,123 @@ function checkCard() { | ... | @@ -195,51 +217,123 @@ function checkCard() { |
| 195 | } | 217 | } |
| 196 | isShow.value = true | 218 | isShow.value = true |
| 197 | } | 219 | } |
| 220 | |||
| 198 | function verifyCode() { | 221 | function verifyCode() { |
| 199 | if(!form.value.account){ | 222 | if (!form.value.account) { |
| 200 | return | 223 | return |
| 201 | } | 224 | } |
| 202 | if(form.value.account.indexOf('@')>-1){ | 225 | if (form.value.account.indexOf('@') > -1) { |
| 203 | //邮箱 | 226 | //邮箱 |
| 204 | } | 227 | } |
| 205 | } | 228 | } |
| 229 | |||
| 206 | function codeSuccess(msg) { | 230 | function codeSuccess(msg) { |
| 207 | console.log('验证通过' + msg); | 231 | console.log('验证通过' + msg); |
| 208 | isShow.value = false | 232 | isShow.value = false |
| 209 | isCodeTrue.value += 1 | 233 | isCodeTrue.value += 1 |
| 210 | if(isCodeTrue.value==1){ | 234 | if (isCodeTrue.value == 1) { |
| 211 | checkWdsf({card:form.value.card}).then(res=>{ | 235 | checkWdsf({card: form.value.card}).then(res => { |
| 212 | checkStatus.value = res.data | 236 | wdsfData.value = res.data |
| 237 | if (!wdsfData.value.sex) { | ||
| 238 | wdsfData.value.sex = '0' | ||
| 239 | } | ||
| 240 | if (wdsfData.value.wdsfFlag == '0') { | ||
| 241 | isCodeTrue.value = 0 | ||
| 242 | if (language.value == 0) { | ||
| 243 | ElMessage.error('WDSF卡号错误') | ||
| 244 | } else { | ||
| 245 | ElMessage.error('WDSF ID is Error') | ||
| 246 | } | ||
| 247 | } | ||
| 248 | }).catch(err => { | ||
| 249 | isCodeTrue.value = 0 | ||
| 213 | }) | 250 | }) |
| 214 | } | 251 | } |
| 215 | if(isCodeTrue.value==2){ | 252 | if (isCodeTrue.value == 2) { |
| 216 | counting.value = true | 253 | counting.value = true |
| 217 | getCaptchaSms({account:form.value.account}).then(res=>{ | 254 | getCaptchaSms({account: form.value.account}).then(res => { |
| 218 | 255 | ||
| 219 | }) | 256 | }) |
| 220 | } | 257 | } |
| 221 | 258 | ||
| 222 | } | 259 | } |
| 260 | |||
| 223 | function resetCode(n) { | 261 | function resetCode(n) { |
| 224 | isCodeTrue.value = n | 262 | isCodeTrue.value = n |
| 225 | } | 263 | } |
| 264 | |||
| 226 | function vconfirmPassword() { | 265 | function vconfirmPassword() { |
| 227 | if(form.value.password != form.value.confirmPassword){ | 266 | if (form.value.password != form.value.confirmPassword) { |
| 228 | showError.value = true | 267 | showError.value = true |
| 229 | } else { | 268 | } else { |
| 230 | showError.value = false | 269 | showError.value = false |
| 231 | } | 270 | } |
| 232 | } | 271 | } |
| 272 | |||
| 233 | function goBack() { | 273 | function goBack() { |
| 234 | router.go(-1) | 274 | router.go(-1) |
| 235 | } | 275 | } |
| 276 | |||
| 236 | function next() { | 277 | function next() { |
| 237 | // registerSingle(form.value).then(res=>{ | 278 | // proxy.$refs['wdsfDataRef'].validate((valid) => { |
| 238 | // setToken(res.data.token) | 279 | // if (valid) |
| 239 | if(matchId.value!='0'){ | 280 | if (!wdsfData.value.passportNumber) { |
| 281 | ElMessage.error('Please fill in your passport number') | ||
| 282 | return | ||
| 283 | } | ||
| 284 | if (!wdsfData.value.birthday) { | ||
| 285 | ElMessage.error('Please fill in your birthday') | ||
| 286 | return | ||
| 287 | } | ||
| 288 | if (wdsfData.value.personFlag == '0') { | ||
| 289 | let obj = { | ||
| 290 | card: form.value.card, | ||
| 291 | account: wdsfData.value.email, | ||
| 292 | code: form.value.code, | ||
| 293 | password: form.value.password, | ||
| 294 | sex: wdsfData.value.sex, | ||
| 295 | birth: wdsfData.value.birthday, | ||
| 296 | passportUrl: wdsfData.value.passportUrl[0].url, | ||
| 297 | passportNumber: wdsfData.value.passportNumber, | ||
| 298 | } | ||
| 299 | registerSingle(obj).then(res => { | ||
| 300 | setToken(res.data.token) | ||
| 301 | console.log(matchId.value) | ||
| 302 | afterR() | ||
| 303 | }) | ||
| 304 | } | ||
| 305 | if (wdsfData.value.personFlag == '1') { | ||
| 306 | if(!form.value.password){ | ||
| 307 | ElMessage.error('Please fill in your password') | ||
| 308 | return | ||
| 309 | } | ||
| 310 | let obj = { | ||
| 311 | sex: wdsfData.value.sex, | ||
| 312 | passportNumber: wdsfData.value.passportNumber, | ||
| 313 | birth: wdsfData.value.birthday, | ||
| 314 | personId: wdsfData.value.personId, | ||
| 315 | username: wdsfData.value.email, | ||
| 316 | password: form.value.password, | ||
| 317 | } | ||
| 318 | if(Array.isArray(wdsfData.value.passportUrl)){ | ||
| 319 | obj.passportUrl = form.value.passportUrl[0].url | ||
| 320 | } else { | ||
| 321 | obj.passportUrl = wdsfData.value.passportUrl | ||
| 322 | } | ||
| 323 | loginSingle(obj).then(res => { | ||
| 324 | setToken(res.data.token) | ||
| 325 | console.log(matchId.value) | ||
| 326 | afterR() | ||
| 327 | }) | ||
| 328 | } | ||
| 329 | // }) | ||
| 330 | } | ||
| 331 | |||
| 332 | function afterR() { | ||
| 333 | if (matchId.value != '0') { | ||
| 240 | router.push({ | 334 | router.push({ |
| 241 | name: 'chooseProject', | 335 | name: 'chooseProject', |
| 242 | params:{ | 336 | params: { |
| 243 | id: matchId.value | 337 | id: matchId.value |
| 244 | }, | 338 | }, |
| 245 | query: { | 339 | query: { |
| ... | @@ -249,32 +343,46 @@ function next() { | ... | @@ -249,32 +343,46 @@ function next() { |
| 249 | } else { | 343 | } else { |
| 250 | router.push({ | 344 | router.push({ |
| 251 | name: 'matchDetail', | 345 | name: 'matchDetail', |
| 252 | params:{ | 346 | params: { |
| 253 | id: 0 | 347 | id: 0 |
| 254 | } | 348 | } |
| 255 | }) | 349 | }) |
| 256 | } | 350 | } |
| 257 | // }) | ||
| 258 | } | 351 | } |
| 259 | </script> | 352 | </script> |
| 260 | 353 | ||
| 261 | <style scoped lang="scss"> | 354 | <style scoped lang="scss"> |
| 262 | .tip{line-height: 1.6;font-size: 12px;margin-top: 6px;color: #666;} | 355 | .tip { |
| 356 | line-height: 1.6; | ||
| 357 | font-size: 12px; | ||
| 358 | margin-top: 6px; | ||
| 359 | color: #666; | ||
| 360 | } | ||
| 361 | |||
| 263 | .leftboderTT { | 362 | .leftboderTT { |
| 264 | color: var(--el-color-primary); | 363 | color: var(--el-color-primary); |
| 265 | font-size: 16px; | 364 | font-size: 16px; |
| 266 | font-weight: 600; | 365 | font-weight: 600; |
| 267 | 366 | ||
| 268 | span { | 367 | span { |
| 269 | color: #929AA0; | 368 | color: #929AA0; |
| 270 | font-size: 14px; | 369 | font-size: 14px; |
| 370 | } | ||
| 371 | } | ||
| 372 | |||
| 373 | .h20 { | ||
| 374 | height: 20px | ||
| 271 | } | 375 | } |
| 376 | |||
| 377 | .h30 { | ||
| 378 | height: 30px | ||
| 379 | } | ||
| 380 | |||
| 381 | .el-input-group__append { | ||
| 382 | flex: 1 1 auto; | ||
| 272 | } | 383 | } |
| 273 | .h20{height: 20px} | ||
| 274 | .h30{height: 30px} | ||
| 275 | 384 | ||
| 276 | .el-input-group__append{ flex: 1 1 auto;} | 385 | .el-input-group__append button.el-button, .el-input-group__append button.el-button:hover { |
| 277 | .el-input-group__append button.el-button, .el-input-group__append button.el-button:hover{ | ||
| 278 | color: var(--el-color-primary); | 386 | color: var(--el-color-primary); |
| 279 | background: #efefff; | 387 | background: #efefff; |
| 280 | border: var(--el-color-primary) solid 1px; | 388 | border: var(--el-color-primary) solid 1px; | ... | ... |
| ... | @@ -5,6 +5,10 @@ | ... | @@ -5,6 +5,10 @@ |
| 5 | <el-form-item :label="language==0?'邮箱':'E-mail'" required> | 5 | <el-form-item :label="language==0?'邮箱':'E-mail'" required> |
| 6 | <el-input type="text" v-model="form.account" @change="resetCode" @blur="verifyCode" | 6 | <el-input type="text" v-model="form.account" @change="resetCode" @blur="verifyCode" |
| 7 | /> | 7 | /> |
| 8 | <div class="tip"> | ||
| 9 | (请填写正确的邮箱信息,邮箱信息在注册完成后无法修改。 | ||
| 10 | 该邮箱后续会会作为您登录的账户,并接收您报名审核、支付账单、比赛邀请函等。) | ||
| 11 | </div> | ||
| 8 | </el-form-item> | 12 | </el-form-item> |
| 9 | <el-form-item :label="language==0?'验证码':'Code'" required> | 13 | <el-form-item :label="language==0?'验证码':'Code'" required> |
| 10 | <el-input v-model="form.code"> | 14 | <el-input v-model="form.code"> | ... | ... |
-
Please register or sign in to post a comment