7889dbb6 by 杨炀

no message

1 parent a67ee05d
...@@ -22,11 +22,14 @@ ...@@ -22,11 +22,14 @@
22 </template> 22 </template>
23 </el-input> 23 </el-input>
24 <a class="text-primary text-sm mt10" href="https://www.worlddancesport.org/Athlete/List" target="_blank"> 24 <a class="text-primary text-sm mt10" href="https://www.worlddancesport.org/Athlete/List" target="_blank">
25 <el-icon><Link /></el-icon> 25 <el-icon>
26 {{language==0?'去WDSF官网查询我的会员号':'Search my WSDF MIN on the WDSF official website'}} 26 <Link/>
27 </el-icon>
28 {{ language == 0 ? '去WDSF官网查询我的会员号' : 'Search my WSDF MIN on the WDSF official website' }}
27 </a> 29 </a>
28 30
29 <Vcode :successText="successVcode" :failText="failVcode" :slider-text="sliderText" :show="showVcode" :z-index="2999" @success="codeSuccess()"></Vcode> 31 <Vcode :successText="successVcode" :failText="failVcode" :slider-text="sliderText" :show="showVcode"
32 :z-index="2999" @success="codeSuccess()"></Vcode>
30 </el-form-item> 33 </el-form-item>
31 <div class="h30"></div> 34 <div class="h30"></div>
32 <div class="leftboderTT">{{ language == 0 ? '个人信息' : 'Personal information' }} 35 <div class="leftboderTT">{{ language == 0 ? '个人信息' : 'Personal information' }}
...@@ -96,7 +99,7 @@ ...@@ -96,7 +99,7 @@
96 <template #footer> 99 <template #footer>
97 <div class="dialog-footer text-center"> 100 <div class="dialog-footer text-center">
98 <el-button type="primary" class="btn-lineG w200px" round @click="submitForm"> 101 <el-button type="primary" class="btn-lineG w200px" round @click="submitForm">
99 {{language == 0 ? '确定' : 'Save' }} 102 {{ language == 0 ? '确定' : 'Save' }}
100 </el-button> 103 </el-button>
101 </div> 104 </div>
102 </template> 105 </template>
...@@ -155,8 +158,10 @@ const data = reactive({ ...@@ -155,8 +158,10 @@ const data = reactive({
155 successVcode: '验证通过!', 158 successVcode: '验证通过!',
156 sliderText: '拖动滑块完成拼图', 159 sliderText: '拖动滑块完成拼图',
157 }) 160 })
158 const {form, show, showVcode, title, labels, uType, isMe, isCodeTrue, card, cptId, 161 const {
159 failVcode,successVcode,sliderText} = toRefs(data) 162 form, show, showVcode, title, labels, uType, isMe, isCodeTrue, card, cptId,
163 failVcode, successVcode, sliderText
164 } = toRefs(data)
160 165
161 let editgay = false 166 let editgay = false
162 let groupId = '0' 167 let groupId = '0'
...@@ -185,25 +190,28 @@ const open = (params) => { ...@@ -185,25 +190,28 @@ const open = (params) => {
185 editgay = false 190 editgay = false
186 } else {// 编辑舞伴 191 } else {// 编辑舞伴
187 editgay = true 192 editgay = true
188 if(params.form){ 193 if (params.form) {
189 form.value = params.form 194 form.value = params.form
190 }else { 195 } else {
191 getFormById(params.id) 196 getFormById(params.id)
192 } 197 }
193 } 198 }
194 } 199 }
195 } 200 }
196 defineExpose({open}) 201 defineExpose({open})
202
197 function getMyInfo() { 203 function getMyInfo() {
198 match.getMyPersonInfo().then(res => { 204 match.getMyPersonInfo().then(res => {
199 form.value = res.data 205 form.value = res.data
200 }) 206 })
201 } 207 }
208
202 function getFormById(id) { 209 function getFormById(id) {
203 match.getPersonInfoById(id).then(res => { 210 match.getPersonInfoById(id).then(res => {
204 form.value = res.data 211 form.value = res.data
205 }) 212 })
206 } 213 }
214
207 watch(show, (value) => { 215 watch(show, (value) => {
208 if (!value) { 216 if (!value) {
209 card.value = '' 217 card.value = ''
...@@ -219,11 +227,11 @@ watch(show, (value) => { ...@@ -219,11 +227,11 @@ watch(show, (value) => {
219 227
220 function submitForm() { 228 function submitForm() {
221 if (!form.value.passportNumber) { 229 if (!form.value.passportNumber) {
222 ElMessage.warning(language.value == 0 ?'请输入你的证件号':'Please fill in your passport number') 230 ElMessage.warning(language.value == 0 ? '请输入你的证件号' : 'Please fill in your passport number')
223 return 231 return
224 } 232 }
225 if (!form.value.birth) { 233 if (!form.value.birth) {
226 ElMessage.warning(language.value == 0 ?'请输入你的出生日期':'Please fill in your birthday') 234 ElMessage.warning(language.value == 0 ? '请输入你的出生日期' : 'Please fill in your birthday')
227 return 235 return
228 } 236 }
229 // if (!form.value.picUrl) { 237 // if (!form.value.picUrl) {
...@@ -231,11 +239,11 @@ function submitForm() { ...@@ -231,11 +239,11 @@ function submitForm() {
231 // return 239 // return
232 // } 240 // }
233 if (!form.value.sex) { 241 if (!form.value.sex) {
234 ElMessage.warning(language.value == 0 ?'请选择性别':'Please select your gender') 242 ElMessage.warning(language.value == 0 ? '请选择性别' : 'Please select your gender')
235 return 243 return
236 } 244 }
237 if (!form.value.passportUrl||form.value.passportUrl==''||form.value.passportUrl.length==0) { 245 if (!form.value.passportUrl || form.value.passportUrl == '' || form.value.passportUrl.length == 0) {
238 ElMessage.warning(language.value == 0 ?'请上传证件':'Please upload passport file') 246 ElMessage.warning(language.value == 0 ? '请上传证件' : 'Please upload passport file')
239 return 247 return
240 } 248 }
241 if (editgay) { 249 if (editgay) {
...@@ -245,7 +253,7 @@ function submitForm() { ...@@ -245,7 +253,7 @@ function submitForm() {
245 form.value.passportUrl = form.value.passportUrl[0].url 253 form.value.passportUrl = form.value.passportUrl[0].url
246 } 254 }
247 match.editPersonInfo(form.value).then(res => { 255 match.editPersonInfo(form.value).then(res => {
248 ElMessage.success(language.value == 0 ? '保存成功' :'Successfully') 256 ElMessage.success(language.value == 0 ? '保存成功' : 'Successfully')
249 show.value = false 257 show.value = false
250 emit('submitForm') 258 emit('submitForm')
251 }) 259 })
...@@ -270,16 +278,17 @@ function submitForm() { ...@@ -270,16 +278,17 @@ function submitForm() {
270 if (Array.isArray(form.value.passportUrl)) { 278 if (Array.isArray(form.value.passportUrl)) {
271 form.value.passportUrl = form.value.passportUrl[0].url 279 form.value.passportUrl = form.value.passportUrl[0].url
272 } 280 }
273 if(groupId=='0'||!groupId){ 281 if (groupId == '0' || !groupId) {
274 addPersonal() 282 addPersonal()
275 } else { 283 } else {
276 if(groupId){ 284 if (groupId) {
277 addGroupMember() 285 addGroupMember()
278 } 286 }
279 } 287 }
280 } 288 }
281 } 289 }
282 } 290 }
291
283 function addPersonal() { 292 function addPersonal() {
284 match.savePersonForMyPerson2(form.value).then(res => { 293 match.savePersonForMyPerson2(form.value).then(res => {
285 ElMessage.success('保存成功') 294 ElMessage.success('保存成功')
...@@ -287,15 +296,17 @@ function addPersonal() { ...@@ -287,15 +296,17 @@ function addPersonal() {
287 emit('submitForm', res.data) 296 emit('submitForm', res.data)
288 }) 297 })
289 } 298 }
299
290 function addGroupMember() { 300 function addGroupMember() {
291 form.value.groupId = groupId 301 form.value.groupId = groupId
292 match.savePersonForMyGroup(form.value).then(res => { 302 match.savePersonForMyGroup(form.value).then(res => {
293 ElMessage.success(language.value == 0 ?'保存成功':'Save successful') 303 ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
294 show.value = false 304 show.value = false
295 emit('submitForm') 305 emit('submitForm')
296 }) 306 })
297 307
298 } 308 }
309
299 function cancel() { 310 function cancel() {
300 show.value = false 311 show.value = false
301 showVcode.value = false 312 showVcode.value = false
...@@ -324,9 +335,9 @@ function codeSuccess(msg) { ...@@ -324,9 +335,9 @@ function codeSuccess(msg) {
324 console.log('验证通过' + msg); 335 console.log('验证通过' + msg);
325 showVcode.value = false 336 showVcode.value = false
326 isCodeTrue.value = true 337 isCodeTrue.value = true
327 checkWdsfAthletes({card: card.value,groupId:groupId}).then(res => { 338 checkWdsfAthletes({card: card.value, groupId: groupId}).then(res => {
328 if (res.data.wdsfFlag==-1) { 339 if (res.data.wdsfFlag == -1) {
329 ElMessage.warning(language.value == 0 ?'您添加的运动员代表国家/地区,与团体账号注册的国家/地区不符,无法添加':'The athlete \'s representing, does not match the group account‘s country/region and cannot be added.') 340 ElMessage.warning(language.value == 0 ? '您添加的运动员代表国家/地区,与团体账号注册的国家/地区不符,无法添加' : 'The athlete \'s representing, does not match the group account‘s country/region and cannot be added.')
330 isCodeTrue.value = false 341 isCodeTrue.value = false
331 return 342 return
332 } 343 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!