no message
Showing
1 changed file
with
23 additions
and
6 deletions
| ... | @@ -80,9 +80,9 @@ | ... | @@ -80,9 +80,9 @@ |
| 80 | <el-input v-model="form.address" type="textarea" :rows="4"/> | 80 | <el-input v-model="form.address" type="textarea" :rows="4"/> |
| 81 | 81 | ||
| 82 | </el-form-item> | 82 | </el-form-item> |
| 83 | <el-form-item v-if="language=='0'" :label="language==0?'WDSF会员号':'WDSF code'" prop="wdsfMin"> | 83 | <el-form-item v-if="language=='0'" :label="language==0?'WDSF会员号':'WDSF code'"> |
| 84 | <span v-if="form.wdsfMin">{{form.wdsfMin}}</span> | 84 | <span v-if="editgay&&form.wdsfMin">{{form.wdsfMin}}</span> |
| 85 | <el-input v-else v-model="form.wdsfMin" type="text"/> | 85 | <el-input v-else v-model="wdsfMin" type="text"/> |
| 86 | </el-form-item> | 86 | </el-form-item> |
| 87 | 87 | ||
| 88 | 88 | ||
| ... | @@ -131,6 +131,7 @@ const data = reactive({ | ... | @@ -131,6 +131,7 @@ const data = reactive({ |
| 131 | // countryId: 240 | 131 | // countryId: 240 |
| 132 | sex:'0' | 132 | sex:'0' |
| 133 | }, | 133 | }, |
| 134 | wdsfMin:'', | ||
| 134 | rules: { | 135 | rules: { |
| 135 | realName: [{required: true, message: '必填', trigger: 'blur'}], | 136 | realName: [{required: true, message: '必填', trigger: 'blur'}], |
| 136 | // countryId: [{required: true, message: '必填', trigger: 'change'}], | 137 | // countryId: [{required: true, message: '必填', trigger: 'change'}], |
| ... | @@ -171,10 +172,9 @@ const data = reactive({ | ... | @@ -171,10 +172,9 @@ const data = reactive({ |
| 171 | ], | 172 | ], |
| 172 | title: '添加选手信息', | 173 | title: '添加选手信息', |
| 173 | groupId: '0', | 174 | groupId: '0', |
| 174 | showRequire: false, | ||
| 175 | isMe:false | 175 | isMe:false |
| 176 | }) | 176 | }) |
| 177 | const {showRequire, form, rules,rules_cn, show, countryList, regionsList, title, groupId, labels,uType,isMe} = toRefs(data) | 177 | const {wdsfMin, form, rules,rules_cn, show, countryList, regionsList, title, groupId, labels,uType,isMe} = toRefs(data) |
| 178 | onMounted(() => { | 178 | onMounted(() => { |
| 179 | getCountryList() | 179 | getCountryList() |
| 180 | getRegionsList() | 180 | getRegionsList() |
| ... | @@ -186,6 +186,7 @@ const open = (params) => { | ... | @@ -186,6 +186,7 @@ const open = (params) => { |
| 186 | title.value = params.title | 186 | title.value = params.title |
| 187 | groupId.value = params.groupId || '0' | 187 | groupId.value = params.groupId || '0' |
| 188 | isMe.value = params.isMe | 188 | isMe.value = params.isMe |
| 189 | wdsfMin.value = '' | ||
| 189 | if(params.label){ | 190 | if(params.label){ |
| 190 | form.value.labelArr= [params.label] | 191 | form.value.labelArr= [params.label] |
| 191 | } else { | 192 | } else { |
| ... | @@ -237,7 +238,17 @@ watch(show, (value) => { | ... | @@ -237,7 +238,17 @@ watch(show, (value) => { |
| 237 | // proxy.$refs['dialogRef'].clearValidate() | 238 | // proxy.$refs['dialogRef'].clearValidate() |
| 238 | }) | 239 | }) |
| 239 | }) | 240 | }) |
| 240 | 241 | function reset(){ | |
| 242 | if( editgay.value ){ | ||
| 243 | match.getPersonInfoById(form.value.id).then(res => { | ||
| 244 | form.value = res.data | ||
| 245 | if (form.value.label) { | ||
| 246 | // {0:0,1:1,2:3} | ||
| 247 | form.value.labelArr = form.value.label.split(',') | ||
| 248 | } | ||
| 249 | }) | ||
| 250 | } | ||
| 251 | } | ||
| 241 | function getCountryList() { | 252 | function getCountryList() { |
| 242 | match.countryList().then(res => { | 253 | match.countryList().then(res => { |
| 243 | countryList.value = res.data | 254 | countryList.value = res.data |
| ... | @@ -332,6 +343,9 @@ function submitForm() { | ... | @@ -332,6 +343,9 @@ function submitForm() { |
| 332 | if(Array.isArray(form.value.passportUrl)){ | 343 | if(Array.isArray(form.value.passportUrl)){ |
| 333 | form.value.passportUrl = form.value.passportUrl[0].url | 344 | form.value.passportUrl = form.value.passportUrl[0].url |
| 334 | } | 345 | } |
| 346 | if(wdsfMin.value){ | ||
| 347 | form.value.wdsfMin = wdsfMin.value | ||
| 348 | } | ||
| 335 | if (groupId.value != 0) { | 349 | if (groupId.value != 0) { |
| 336 | // 团队 | 350 | // 团队 |
| 337 | form.value.groupId = groupId.value | 351 | form.value.groupId = groupId.value |
| ... | @@ -381,10 +395,13 @@ function saveGroupMember() { | ... | @@ -381,10 +395,13 @@ function saveGroupMember() { |
| 381 | ElMessage.success(language.value == 0 ?'保存成功':'Save successful') | 395 | ElMessage.success(language.value == 0 ?'保存成功':'Save successful') |
| 382 | show.value = false | 396 | show.value = false |
| 383 | emit('submitForm') | 397 | emit('submitForm') |
| 398 | }).catch(err => { | ||
| 399 | reset() | ||
| 384 | }) | 400 | }) |
| 385 | } | 401 | } |
| 386 | function cancel() { | 402 | function cancel() { |
| 387 | show.value = false | 403 | show.value = false |
| 404 | delete wdsfMin.value | ||
| 388 | } | 405 | } |
| 389 | </script> | 406 | </script> |
| 390 | 407 | ... | ... |
-
Please register or sign in to post a comment