no message
Showing
3 changed files
with
30 additions
and
18 deletions
| ... | @@ -17,8 +17,10 @@ | ... | @@ -17,8 +17,10 @@ |
| 17 | <h3 class="panel-title" v-else>My Information</h3> | 17 | <h3 class="panel-title" v-else>My Information</h3> |
| 18 | </div> | 18 | </div> |
| 19 | <div class="panel-body"> | 19 | <div class="panel-body"> |
| 20 | <div v-if="form.danceMate"> | ||
| 20 | <div class="text-danger fontsize14 mb10" v-if="language==0">*报名双人项目请勾选您的舞伴</div> | 21 | <div class="text-danger fontsize14 mb10" v-if="language==0">*报名双人项目请勾选您的舞伴</div> |
| 21 | <div class="text-danger fontsize14 mb10" v-else>*Please select your dance mate if you are signing up for a double event</div> | 22 | <div class="text-danger fontsize14 mb10" v-else>*Please select your dance mate if you are signing up for a double event</div> |
| 23 | </div> | ||
| 22 | <div class="chooseForm" style="display: flex;flex-wrap: wrap;"> | 24 | <div class="chooseForm" style="display: flex;flex-wrap: wrap;"> |
| 23 | <div @click="editPerson" class="mb20" style="width: 50%;text-align: center;"> | 25 | <div @click="editPerson" class="mb20" style="width: 50%;text-align: center;"> |
| 24 | <el-avatar fit="cover" v-if="form.picUrl" :size="60" :src="fillImgUrl(form.picUrl)"/> | 26 | <el-avatar fit="cover" v-if="form.picUrl" :size="60" :src="fillImgUrl(form.picUrl)"/> |
| ... | @@ -56,15 +58,15 @@ | ... | @@ -56,15 +58,15 @@ |
| 56 | </el-checkbox> | 58 | </el-checkbox> |
| 57 | </el-checkbox-group> | 59 | </el-checkbox-group> |
| 58 | </div> | 60 | </div> |
| 59 | <div style="min-width:50%;" v-else @click="addMate"> | 61 | <!-- <div style="min-width:50%;" v-else @click="addMate" hidden>--> |
| 60 | <div class="addBttn" style="margin: 0 auto">+</div> | 62 | <!-- <div class="addBttn" style="margin: 0 auto">+</div>--> |
| 61 | <div class="text-center mt10 text-primary text-sm"> | 63 | <!-- <div class="text-center mt10 text-primary text-sm">--> |
| 62 | Please add your partner | 64 | <!-- Please add your partner--> |
| 63 | <el-icon> | 65 | <!-- <el-icon>--> |
| 64 | <Edit/> | 66 | <!-- <Edit/>--> |
| 65 | </el-icon> | 67 | <!-- </el-icon>--> |
| 66 | </div> | 68 | <!-- </div>--> |
| 67 | </div> | 69 | <!-- </div>--> |
| 68 | </div> | 70 | </div> |
| 69 | </div> | 71 | </div> |
| 70 | </div> | 72 | </div> | ... | ... |
| ... | @@ -254,25 +254,32 @@ function submitForm() { | ... | @@ -254,25 +254,32 @@ function submitForm() { |
| 254 | if (Array.isArray(form.value.passportUrl)) { | 254 | if (Array.isArray(form.value.passportUrl)) { |
| 255 | form.value.passportUrl = form.value.passportUrl[0].url | 255 | form.value.passportUrl = form.value.passportUrl[0].url |
| 256 | } | 256 | } |
| 257 | if(groupId=='0'){ | 257 | if(groupId=='0'||!groupId){ |
| 258 | addPersonal() | ||
| 259 | } else { | ||
| 260 | if(groupId){ | ||
| 261 | addGroupMember() | ||
| 262 | } | ||
| 263 | } | ||
| 264 | } | ||
| 265 | } | ||
| 266 | } | ||
| 267 | function addPersonal() { | ||
| 258 | match.savePersonForMyPerson(form.value).then(res => { | 268 | match.savePersonForMyPerson(form.value).then(res => { |
| 259 | ElMessage.success('保存成功') | 269 | ElMessage.success('保存成功') |
| 260 | show.value = false | 270 | show.value = false |
| 261 | emit('submitForm', res.data) | 271 | emit('submitForm', res.data) |
| 262 | }) | 272 | }) |
| 263 | } else { | 273 | } |
| 274 | function addGroupMember() { | ||
| 264 | form.value.groupId = groupId | 275 | form.value.groupId = groupId |
| 265 | match.savePersonForMyGroup(form.value).then(res => { | 276 | match.savePersonForMyGroup(form.value).then(res => { |
| 266 | ElMessage.success(language.value == 0 ?'保存成功':'Save successful') | 277 | ElMessage.success(language.value == 0 ?'保存成功':'Save successful') |
| 267 | show.value = false | 278 | show.value = false |
| 268 | emit('submitForm') | 279 | emit('submitForm') |
| 269 | }) | 280 | }) |
| 270 | } | ||
| 271 | 281 | ||
| 272 | } | ||
| 273 | } | ||
| 274 | } | 282 | } |
| 275 | |||
| 276 | function cancel() { | 283 | function cancel() { |
| 277 | show.value = false | 284 | show.value = false |
| 278 | showVcode.value = false | 285 | showVcode.value = false | ... | ... |
| ... | @@ -10,8 +10,7 @@ | ... | @@ -10,8 +10,7 @@ |
| 10 | 10 | ||
| 11 | <el-calendar v-model="calendarValue"> | 11 | <el-calendar v-model="calendarValue"> |
| 12 | <template #date-cell="data"> | 12 | <template #date-cell="data"> |
| 13 | <div v-if="data.data.day.slice(8,10)==22" class="primaryDate date">22</div> | 13 | <div class="date" :class="data.data.day==calendarValue?'primaryDate':''" @click="selectDate(data.data.day)"> |
| 14 | <div v-else class="date"> | ||
| 15 | {{ data.data.day.slice(8,10) }} | 14 | {{ data.data.day.slice(8,10) }} |
| 16 | </div> | 15 | </div> |
| 17 | 16 | ||
| ... | @@ -85,7 +84,7 @@ const ztxPlanList = ref([]) | ... | @@ -85,7 +84,7 @@ const ztxPlanList = ref([]) |
| 85 | const planList = ref([]) | 84 | const planList = ref([]) |
| 86 | const schList = ref([]) | 85 | const schList = ref([]) |
| 87 | const loading = ref(false) | 86 | const loading = ref(false) |
| 88 | const calendarValue = ref('2024-07-22') | 87 | const calendarValue = ref(new Date()) |
| 89 | 88 | ||
| 90 | 89 | ||
| 91 | // onMounted(() => { | 90 | // onMounted(() => { |
| ... | @@ -101,6 +100,10 @@ const calendarValue = ref('2024-07-22') | ... | @@ -101,6 +100,10 @@ const calendarValue = ref('2024-07-22') |
| 101 | // } | 100 | // } |
| 102 | // }) | 101 | // }) |
| 103 | 102 | ||
| 103 | function selectDate(date) { | ||
| 104 | console.log(date,calendarValue.value) | ||
| 105 | } | ||
| 106 | |||
| 104 | function getPlanList() { | 107 | function getPlanList() { |
| 105 | loading.value = true | 108 | loading.value = true |
| 106 | 109 | ... | ... |
-
Please register or sign in to post a comment