no message
Showing
15 changed files
with
571 additions
and
401 deletions
| ... | @@ -2,56 +2,58 @@ | ... | @@ -2,56 +2,58 @@ |
| 2 | <div class="component-upload-image"> | 2 | <div class="component-upload-image"> |
| 3 | <el-row> | 3 | <el-row> |
| 4 | <draggable | 4 | <draggable |
| 5 | v-if="fileList.length > 1" | 5 | v-if="fileList.length > 1" |
| 6 | v-model="fileList" | 6 | v-model="fileList" |
| 7 | item-key="index" | 7 | item-key="index" |
| 8 | @end="draggableEnd" | 8 | @end="draggableEnd" |
| 9 | > | 9 | > |
| 10 | <template #item="{ element }"> | 10 | <template #item="{ element }"> |
| 11 | <div class="fileItem el-upload-list__item is-success animated"> | 11 | <div class="fileItem el-upload-list__item is-success animated"> |
| 12 | <img | 12 | <img |
| 13 | :src="element.url" | 13 | :src="element.url" |
| 14 | alt="" | 14 | alt="" |
| 15 | class="el-upload-list__item-thumbnail" | 15 | class="el-upload-list__item-thumbnail" |
| 16 | > | 16 | > |
| 17 | <div class="hover-actions"> | 17 | <div class="hover-actions"> |
| 18 | <span @click="handlePictureCardPreview(element)"> | 18 | <span @click="handlePictureCardPreview(element)"> |
| 19 | <el-icon><ZoomIn /></el-icon> | 19 | <el-icon><ZoomIn/></el-icon> |
| 20 | </span> | 20 | </span> |
| 21 | <span v-if="!disabled" @click="handleDelete(element)"> | 21 | <span v-if="!disabled" @click="handleDelete(element)"> |
| 22 | <el-icon><Delete /></el-icon> | 22 | <el-icon><Delete/></el-icon> |
| 23 | </span> | 23 | </span> |
| 24 | </div> | 24 | </div> |
| 25 | </div> | 25 | </div> |
| 26 | </template> | 26 | </template> |
| 27 | </draggable> | 27 | </draggable> |
| 28 | <el-upload | 28 | <el-upload |
| 29 | ref="imageUpload" | 29 | ref="imageUpload" |
| 30 | :multiple="limit > 1" | 30 | :multiple="limit > 1" |
| 31 | :action="actionUrl || uploadImgUrl" | 31 | :action="actionUrl || uploadImgUrl" |
| 32 | :list-type="listType" | 32 | :list-type="listType" |
| 33 | :on-success="handleUploadSuccess" | 33 | :on-success="handleUploadSuccess" |
| 34 | :before-upload="handleBeforeUpload" | 34 | :before-upload="handleBeforeUpload" |
| 35 | :limit="limit" | 35 | :limit="limit" |
| 36 | :on-error="handleUploadError" | 36 | :on-error="handleUploadError" |
| 37 | :on-exceed="handleExceed" | 37 | :on-exceed="handleExceed" |
| 38 | :before-remove="handleDelete" | 38 | :before-remove="handleDelete" |
| 39 | :show-file-list="showFileList" | 39 | :show-file-list="showFileList" |
| 40 | :headers="headers" | 40 | :headers="headers" |
| 41 | :on-preview="handlePictureCardPreview" | 41 | :on-preview="handlePictureCardPreview" |
| 42 | :file-list="fileListInUpload" | 42 | :file-list="fileListInUpload" |
| 43 | :class="{ hide: fileList.length >= limit }" | 43 | :class="{ hide: fileList.length >= limit }" |
| 44 | :name="paramName" | 44 | :name="paramName" |
| 45 | :disabled="disabled" | 45 | :disabled="disabled" |
| 46 | :accept="accept" | 46 | :accept="accept" |
| 47 | > | 47 | > |
| 48 | <el-icon v-if="listType=='picture-card'" class="avatar-uploader-icon"><plus /></el-icon> | 48 | <el-icon v-if="listType=='picture-card'" class="avatar-uploader-icon"> |
| 49 | <el-link v-else class="mr10" type="primary"> | 49 | <plus/> |
| 50 | <el-icon> | 50 | </el-icon> |
| 51 | <Upload/> | 51 | <el-link v-else class="mr10" type="primary"> |
| 52 | </el-icon> | 52 | <el-icon> |
| 53 | {{ buttonText }} | 53 | <Upload/> |
| 54 | </el-link> | 54 | </el-icon> |
| 55 | {{ buttonText }} | ||
| 56 | </el-link> | ||
| 55 | </el-upload> | 57 | </el-upload> |
| 56 | </el-row> | 58 | </el-row> |
| 57 | 59 | ||
| ... | @@ -70,23 +72,24 @@ | ... | @@ -70,23 +72,24 @@ |
| 70 | </div> | 72 | </div> |
| 71 | 73 | ||
| 72 | <el-dialog | 74 | <el-dialog |
| 73 | v-model="dialogVisible" | 75 | v-model="dialogVisible" |
| 74 | title="预览" | 76 | title="预览" |
| 75 | width="800px" | 77 | width="800px" |
| 76 | append-to-body | 78 | append-to-body |
| 77 | > | 79 | > |
| 78 | <img | 80 | <img |
| 79 | :src="dialogImageUrl" | 81 | :src="dialogImageUrl" |
| 80 | style="display: block; max-width: 100%; margin: 0 auto" | 82 | style="display: block; max-width: 100%; margin: 0 auto" |
| 81 | > | 83 | > |
| 82 | </el-dialog> | 84 | </el-dialog> |
| 83 | </div> | 85 | </div> |
| 84 | </template> | 86 | </template> |
| 85 | 87 | ||
| 86 | <script setup> | 88 | <script setup> |
| 87 | import { getToken } from '@/utils/auth' | 89 | import {getToken} from '@/utils/auth' |
| 88 | import { computed, getCurrentInstance, ref, watch } from 'vue' | 90 | import {computed, getCurrentInstance, ref, watch} from 'vue' |
| 89 | import _ from 'lodash' | 91 | import _ from 'lodash' |
| 92 | import {useStorage} from "@vueuse/core"; | ||
| 90 | 93 | ||
| 91 | const props = defineProps({ | 94 | const props = defineProps({ |
| 92 | modelValue: [String, Object, Array], | 95 | modelValue: [String, Object, Array], |
| ... | @@ -130,7 +133,7 @@ const props = defineProps({ | ... | @@ -130,7 +133,7 @@ const props = defineProps({ |
| 130 | type: String, | 133 | type: String, |
| 131 | default: '' | 134 | default: '' |
| 132 | }, | 135 | }, |
| 133 | buttonText:{ | 136 | buttonText: { |
| 134 | type: String, | 137 | type: String, |
| 135 | default: '上传文件' | 138 | default: '上传文件' |
| 136 | } | 139 | } |
| ... | @@ -148,8 +151,8 @@ const accept = computed(() => { | ... | @@ -148,8 +151,8 @@ const accept = computed(() => { |
| 148 | }).join(',') | 151 | }).join(',') |
| 149 | }) | 152 | }) |
| 150 | 153 | ||
| 151 | const { proxy } = getCurrentInstance() | 154 | const {proxy} = getCurrentInstance() |
| 152 | const emit = defineEmits(['update:modelValue','response']) | 155 | const emit = defineEmits(['update:modelValue', 'response']) |
| 153 | const number = ref(0) | 156 | const number = ref(0) |
| 154 | const uploadList = ref([]) | 157 | const uploadList = ref([]) |
| 155 | const dialogImageUrl = ref('') | 158 | const dialogImageUrl = ref('') |
| ... | @@ -158,39 +161,41 @@ const baseUrl = import.meta.env.VITE_APP_BASE_API | ... | @@ -158,39 +161,41 @@ const baseUrl = import.meta.env.VITE_APP_BASE_API |
| 158 | const uploadImgUrl = ref( | 161 | const uploadImgUrl = ref( |
| 159 | baseUrl + '/upload/uploadImgToLocalServer' | 162 | baseUrl + '/upload/uploadImgToLocalServer' |
| 160 | ) // 上传的图片服务器地址 | 163 | ) // 上传的图片服务器地址 |
| 161 | const headers = ref({ Authorization: 'Bearer ' + getToken() }) | 164 | const headers = ref({Authorization: 'Bearer ' + getToken()}) |
| 162 | const fileList = ref([]) | 165 | const fileList = ref([]) |
| 163 | const fileListInUpload = ref([]) | 166 | const fileListInUpload = ref([]) |
| 164 | const showTip = computed( | 167 | const showTip = computed( |
| 165 | () => props.isShowTip && (props.fileType || props.fileSize) | 168 | () => props.isShowTip && (props.fileType || props.fileSize) |
| 166 | ) | 169 | ) |
| 170 | const language = useStorage('language', 0) | ||
| 171 | |||
| 167 | 172 | ||
| 168 | watch( | 173 | watch( |
| 169 | () => props.modelValue, | 174 | () => props.modelValue, |
| 170 | (val) => { | 175 | (val) => { |
| 171 | if (val) { | 176 | if (val) { |
| 172 | // 首先将值转为数组 | 177 | // 首先将值转为数组 |
| 173 | const list = Array.isArray(val) ? val : props.modelValue.split(',') | 178 | const list = Array.isArray(val) ? val : props.modelValue.split(',') |
| 174 | // 然后将数组转为对象数组 | 179 | // 然后将数组转为对象数组 |
| 175 | fileList.value = list.map((item) => { | 180 | fileList.value = list.map((item) => { |
| 176 | if (typeof item === 'string') { | 181 | if (typeof item === 'string') { |
| 177 | if (item.indexOf('http') === -1) { | 182 | if (item.indexOf('http') === -1) { |
| 178 | item = { name: item, url: baseUrl + item } | 183 | item = {name: item, url: baseUrl + item} |
| 179 | } else { | 184 | } else { |
| 180 | item = { name: item, url: item } | 185 | item = {name: item, url: item} |
| 186 | } | ||
| 181 | } | 187 | } |
| 188 | return item | ||
| 189 | }) | ||
| 190 | if (fileList.value.length == 1) { | ||
| 191 | fileListInUpload.value = fileList.value | ||
| 182 | } | 192 | } |
| 183 | return item | 193 | } else { |
| 184 | }) | 194 | fileList.value = [] |
| 185 | if (fileList.value.length == 1) { | 195 | return [] |
| 186 | fileListInUpload.value = fileList.value | ||
| 187 | } | 196 | } |
| 188 | } else { | 197 | }, |
| 189 | fileList.value = [] | 198 | {deep: true, immediate: true} |
| 190 | return [] | ||
| 191 | } | ||
| 192 | }, | ||
| 193 | { deep: true, immediate: true } | ||
| 194 | ) | 199 | ) |
| 195 | 200 | ||
| 196 | // 上传前loading加载 | 201 | // 上传前loading加载 |
| ... | @@ -211,31 +216,37 @@ function handleBeforeUpload(file) { | ... | @@ -211,31 +216,37 @@ function handleBeforeUpload(file) { |
| 211 | } | 216 | } |
| 212 | if (!isImg) { | 217 | if (!isImg) { |
| 213 | proxy.$modal.msgError( | 218 | proxy.$modal.msgError( |
| 214 | `文件格式不正确, 请上传${props.fileType.join('/')}图片格式文件!` | 219 | language.value == 0 ? |
| 220 | `文件格式不正确, 请上传${props.fileType.join('/')}图片格式文件!` : | ||
| 221 | `The file format is incorrect, please upload ${props.fileType.join('/')} image format file!` | ||
| 215 | ) | 222 | ) |
| 216 | return false | 223 | return false |
| 217 | } | 224 | } |
| 218 | if (props.fileSize) { | 225 | if (props.fileSize) { |
| 219 | const isLt = file.size / 1024 / 1024 < props.fileSize | 226 | const isLt = file.size / 1024 / 1024 < props.fileSize |
| 220 | if (!isLt) { | 227 | if (!isLt) { |
| 221 | proxy.$modal.msgError(`上传图片大小不能超过 ${props.fileSize} MB!`) | 228 | proxy.$modal.msgError( |
| 229 | language.value == 0 ? | ||
| 230 | `上传图片大小不能超过 ${props.fileSize} MB!` : | ||
| 231 | `Upload image size cannot exceed ${props.fileSize} MB!` | ||
| 232 | ) | ||
| 222 | return false | 233 | return false |
| 223 | } | 234 | } |
| 224 | } | 235 | } |
| 225 | proxy.$modal.loading('正在上传图片,请稍候...') | 236 | proxy.$modal.loading(language.value == 0 ? '正在上传图片,请稍候...' : 'Uploading images, please wait...') |
| 226 | number.value++ | 237 | number.value++ |
| 227 | } | 238 | } |
| 228 | 239 | ||
| 229 | // 文件个数超出 | 240 | // 文件个数超出 |
| 230 | function handleExceed() { | 241 | function handleExceed() { |
| 231 | proxy.$modal.msgError(`上传文件数量不能超过 ${props.limit} 个!`) | 242 | proxy.$modal.msgError(language.value == 0 ? `上传文件数量不能超过 ${props.limit} 个!` : `Maximum file count: ${props.limit}`) |
| 232 | } | 243 | } |
| 233 | 244 | ||
| 234 | // 上传成功回调 | 245 | // 上传成功回调 |
| 235 | function handleUploadSuccess(res, file) { | 246 | function handleUploadSuccess(res, file) { |
| 236 | if(!actionUrl.value){ | 247 | if (!actionUrl.value) { |
| 237 | if (res.code === 200) { | 248 | if (res.code === 200) { |
| 238 | uploadList.value.push({ name: file.name, url: res.data || res.msg }) | 249 | uploadList.value.push({name: file.name, url: res.data || res.msg}) |
| 239 | uploadedSuccessfully() | 250 | uploadedSuccessfully() |
| 240 | } else { | 251 | } else { |
| 241 | number.value-- | 252 | number.value-- |
| ... | @@ -264,8 +275,8 @@ function handleDelete(file) { | ... | @@ -264,8 +275,8 @@ function handleDelete(file) { |
| 264 | function uploadedSuccessfully() { | 275 | function uploadedSuccessfully() { |
| 265 | if (number.value > 0 && uploadList.value.length === number.value) { | 276 | if (number.value > 0 && uploadList.value.length === number.value) { |
| 266 | fileList.value = fileList.value | 277 | fileList.value = fileList.value |
| 267 | .filter((f) => f.url !== undefined) | 278 | .filter((f) => f.url !== undefined) |
| 268 | .concat(uploadList.value) | 279 | .concat(uploadList.value) |
| 269 | uploadList.value = [] | 280 | uploadList.value = [] |
| 270 | number.value = 0 | 281 | number.value = 0 |
| 271 | emit('update:modelValue', listToString(fileList.value)) | 282 | emit('update:modelValue', listToString(fileList.value)) |
| ... | @@ -279,7 +290,7 @@ function uploadedSuccessfully() { | ... | @@ -279,7 +290,7 @@ function uploadedSuccessfully() { |
| 279 | 290 | ||
| 280 | // 上传失败 | 291 | // 上传失败 |
| 281 | function handleUploadError() { | 292 | function handleUploadError() { |
| 282 | proxy.$modal.msgError('上传图片失败') | 293 | proxy.$modal.msgError(language.value == 0 ? '上传图片失败' : 'Upload failed') |
| 283 | proxy.$modal.closeLoading() | 294 | proxy.$modal.closeLoading() |
| 284 | } | 295 | } |
| 285 | 296 | ||
| ... | @@ -311,6 +322,7 @@ function draggableEnd() { | ... | @@ -311,6 +322,7 @@ function draggableEnd() { |
| 311 | :deep(.hide .el-upload--picture-card) { | 322 | :deep(.hide .el-upload--picture-card) { |
| 312 | display: none; | 323 | display: none; |
| 313 | } | 324 | } |
| 325 | |||
| 314 | .fileItem { | 326 | .fileItem { |
| 315 | position: relative; | 327 | position: relative; |
| 316 | width: 160px; | 328 | width: 160px; |
| ... | @@ -319,11 +331,13 @@ function draggableEnd() { | ... | @@ -319,11 +331,13 @@ function draggableEnd() { |
| 319 | margin: 0 20px 20px 0; | 331 | margin: 0 20px 20px 0; |
| 320 | float: left; | 332 | float: left; |
| 321 | } | 333 | } |
| 334 | |||
| 322 | .fileItem img { | 335 | .fileItem img { |
| 323 | width: 100%; | 336 | width: 100%; |
| 324 | height: 100%; | 337 | height: 100%; |
| 325 | object-fit: cover; | 338 | object-fit: cover; |
| 326 | } | 339 | } |
| 340 | |||
| 327 | .fileItem .hover-actions { | 341 | .fileItem .hover-actions { |
| 328 | background: rgba(0, 0, 0, 0.4); | 342 | background: rgba(0, 0, 0, 0.4); |
| 329 | width: 100%; | 343 | width: 100%; |
| ... | @@ -334,6 +348,7 @@ function draggableEnd() { | ... | @@ -334,6 +348,7 @@ function draggableEnd() { |
| 334 | color: #fff; | 348 | color: #fff; |
| 335 | transition: top 0.2s; | 349 | transition: top 0.2s; |
| 336 | text-align: center; | 350 | text-align: center; |
| 351 | |||
| 337 | span { | 352 | span { |
| 338 | cursor: pointer; | 353 | cursor: pointer; |
| 339 | font-size: 26px; | 354 | font-size: 26px; |
| ... | @@ -341,10 +356,12 @@ function draggableEnd() { | ... | @@ -341,10 +356,12 @@ function draggableEnd() { |
| 341 | margin: 50px 5px; | 356 | margin: 50px 5px; |
| 342 | display: inline-block; | 357 | display: inline-block; |
| 343 | } | 358 | } |
| 359 | |||
| 344 | span:hover { | 360 | span:hover { |
| 345 | background: rgba(255, 255, 255, 0.4); | 361 | background: rgba(255, 255, 255, 0.4); |
| 346 | } | 362 | } |
| 347 | } | 363 | } |
| 364 | |||
| 348 | .fileItem:hover .hover-actions { | 365 | .fileItem:hover .hover-actions { |
| 349 | top: 0; | 366 | top: 0; |
| 350 | } | 367 | } | ... | ... |
| ... | @@ -353,10 +353,10 @@ | ... | @@ -353,10 +353,10 @@ |
| 353 | <el-col :lg="12"> | 353 | <el-col :lg="12"> |
| 354 | <div v-if="form.payDate">{{ language == 0 ? '支付时间' : 'Payment Time' }}:{{ form.payDate }}</div> | 354 | <div v-if="form.payDate">{{ language == 0 ? '支付时间' : 'Payment Time' }}:{{ form.payDate }}</div> |
| 355 | <div class="mt10">{{ language == 0 ? '支付方式' : 'Payment Method' }}: | 355 | <div class="mt10">{{ language == 0 ? '支付方式' : 'Payment Method' }}: |
| 356 | <span v-if="form.paymentType=='1'">{{ language == 0 ? '微信支付' : 'WePay' }}</span> | 356 | <span v-if="payType=='1'">{{ language == 0 ? '微信支付' : 'WePay' }}</span> |
| 357 | <span v-else-if="form.paymentType=='3'">PayPal</span> | 357 | <span v-else-if="payType=='3'">PayPal</span> |
| 358 | <span | 358 | <span |
| 359 | v-else-if="form.paymentType=='4'|| form.paymentType=='5'">{{ | 359 | v-else-if="payType=='4'|| payType=='5'">{{ |
| 360 | language == 0 ? '对公转账' : 'Bank Transfer' | 360 | language == 0 ? '对公转账' : 'Bank Transfer' |
| 361 | }}</span> | 361 | }}</span> |
| 362 | <span v-else>--</span> | 362 | <span v-else>--</span> |
| ... | @@ -502,7 +502,8 @@ | ... | @@ -502,7 +502,8 @@ |
| 502 | <label style="width: 10em"> | 502 | <label style="width: 10em"> |
| 503 | {{ language == 0 ? '上传缴费凭证:' : 'Upload proof:' }} | 503 | {{ language == 0 ? '上传缴费凭证:' : 'Upload proof:' }} |
| 504 | </label> | 504 | </label> |
| 505 | <file-upload v-model="form.pic" :is-show-tip="false" :limit="1"/> | 505 | <file-upload v-model="form.pic" :is-show-tip="false" :limit="1" |
| 506 | :button-text="language==0?'上传文件':'Upload'"/> | ||
| 506 | </div> | 507 | </div> |
| 507 | </el-col> | 508 | </el-col> |
| 508 | <el-col :lg="12"> | 509 | <el-col :lg="12"> |
| ... | @@ -512,7 +513,8 @@ | ... | @@ -512,7 +513,8 @@ |
| 512 | </el-col> | 513 | </el-col> |
| 513 | <!-- 如果没审批通过--> | 514 | <!-- 如果没审批通过--> |
| 514 | <el-col :lg="24" align="center" justify="center"> | 515 | <el-col :lg="24" align="center" justify="center"> |
| 515 | <el-button round type="primary" @click="submitProof">提交凭证</el-button> | 516 | <el-button round type="primary" @click="submitProof">{{ language == '0' ? '提交凭证' : 'Submit Proof' }} |
| 517 | </el-button> | ||
| 516 | </el-col> | 518 | </el-col> |
| 517 | </el-row> | 519 | </el-row> |
| 518 | 520 | ||
| ... | @@ -577,7 +579,8 @@ | ... | @@ -577,7 +579,8 @@ |
| 577 | </div> | 579 | </div> |
| 578 | </div> | 580 | </div> |
| 579 | </el-dialog> | 581 | </el-dialog> |
| 580 | <el-dialog v-model="showOfflineSuccessDialog" :title="language==0?'提示':'Tip'" width="460px"> | 582 | <el-dialog v-model="showOfflineSuccessDialog" :title="language==0?'提示':'Tip'" width="460px" |
| 583 | @close="OfflineSuccessDialogClose"> | ||
| 581 | <el-result | 584 | <el-result |
| 582 | :sub-title="language==0?'请在7日内上传凭证,否则订单取消':'Please upload the payment receipt within 7 days, otherwise the order will be cancelled'" | 585 | :sub-title="language==0?'请在7日内上传凭证,否则订单取消':'Please upload the payment receipt within 7 days, otherwise the order will be cancelled'" |
| 583 | :title="language==0?'订单已提交':'Order submitted'" | 586 | :title="language==0?'订单已提交':'Order submitted'" |
| ... | @@ -696,6 +699,11 @@ function getData() { | ... | @@ -696,6 +699,11 @@ function getData() { |
| 696 | if (type.value == 'car') { | 699 | if (type.value == 'car') { |
| 697 | return booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => { | 700 | return booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => { |
| 698 | form.value = res.data | 701 | form.value = res.data |
| 702 | |||
| 703 | if (form.value.paymentType) { | ||
| 704 | payType.value = form.value.paymentType | ||
| 705 | } | ||
| 706 | |||
| 699 | if (language.value == 0) { | 707 | if (language.value == 0) { |
| 700 | totalFee.value = res.data.total | 708 | totalFee.value = res.data.total |
| 701 | } else { | 709 | } else { |
| ... | @@ -716,6 +724,11 @@ function getData() { | ... | @@ -716,6 +724,11 @@ function getData() { |
| 716 | form.value = res.data | 724 | form.value = res.data |
| 717 | form.value.messageObj = JSON.parse(form.value.message) | 725 | form.value.messageObj = JSON.parse(form.value.message) |
| 718 | form.value.extJsonObj = JSON.parse(form.value.extJson) | 726 | form.value.extJsonObj = JSON.parse(form.value.extJson) |
| 727 | |||
| 728 | if (form.value.paymentType) { | ||
| 729 | payType.value = form.value.paymentType | ||
| 730 | } | ||
| 731 | |||
| 719 | console.log(form.value) | 732 | console.log(form.value) |
| 720 | }) | 733 | }) |
| 721 | } | 734 | } |
| ... | @@ -726,6 +739,7 @@ function getData() { | ... | @@ -726,6 +739,7 @@ function getData() { |
| 726 | } else { | 739 | } else { |
| 727 | totalFee.value = res.data.totalEn | 740 | totalFee.value = res.data.totalEn |
| 728 | } | 741 | } |
| 742 | |||
| 729 | form.value = res.data | 743 | form.value = res.data |
| 730 | form.value.messageObj = JSON.parse(form.value.message) || {} | 744 | form.value.messageObj = JSON.parse(form.value.message) || {} |
| 731 | form.value.extJsonObj = JSON.parse(form.value.extJson) || {} | 745 | form.value.extJsonObj = JSON.parse(form.value.extJson) || {} |
| ... | @@ -734,6 +748,9 @@ function getData() { | ... | @@ -734,6 +748,9 @@ function getData() { |
| 734 | if (form.value.paymentType == '4' || form.value.paymentType == '5') { | 748 | if (form.value.paymentType == '4' || form.value.paymentType == '5') { |
| 735 | hideconfirmbtn.value = true | 749 | hideconfirmbtn.value = true |
| 736 | } | 750 | } |
| 751 | if (form.value.paymentType) { | ||
| 752 | payType.value = form.value.paymentType | ||
| 753 | } | ||
| 737 | }).catch(err => { | 754 | }).catch(err => { |
| 738 | console.log(err) | 755 | console.log(err) |
| 739 | errorBox.value = true | 756 | errorBox.value = true |
| ... | @@ -757,6 +774,9 @@ function getData() { | ... | @@ -757,6 +774,9 @@ function getData() { |
| 757 | async function getTicketOrderInfoFN() { | 774 | async function getTicketOrderInfoFN() { |
| 758 | const res = await getTicketOrderInfo({orderId: orderId.value}) | 775 | const res = await getTicketOrderInfo({orderId: orderId.value}) |
| 759 | form.value = res.data | 776 | form.value = res.data |
| 777 | if (form.value.paymentType) { | ||
| 778 | payType.value = form.value.paymentType | ||
| 779 | } | ||
| 760 | form.value.extJson = JSON.parse(form.value.extJson) | 780 | form.value.extJson = JSON.parse(form.value.extJson) |
| 761 | try { | 781 | try { |
| 762 | form.value.extJson.ticketDate = JSON.parse(form.value.extJson.ticketDate) | 782 | form.value.extJson.ticketDate = JSON.parse(form.value.extJson.ticketDate) |
| ... | @@ -772,7 +792,6 @@ async function getTicketOrderInfoFN() { | ... | @@ -772,7 +792,6 @@ async function getTicketOrderInfoFN() { |
| 772 | 792 | ||
| 773 | } | 793 | } |
| 774 | console.log(form.value) | 794 | console.log(form.value) |
| 775 | |||
| 776 | } | 795 | } |
| 777 | 796 | ||
| 778 | async function getDetail(activeId) { | 797 | async function getDetail(activeId) { |
| ... | @@ -876,6 +895,9 @@ function MakeUpOrder() { | ... | @@ -876,6 +895,9 @@ function MakeUpOrder() { |
| 876 | form.value = res.data | 895 | form.value = res.data |
| 877 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn | 896 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn |
| 878 | matchId.value = form.value.activeId | 897 | matchId.value = form.value.activeId |
| 898 | if (form.value.paymentType) { | ||
| 899 | payType.value = form.value.paymentType | ||
| 900 | } | ||
| 879 | MakeUpIno() | 901 | MakeUpIno() |
| 880 | console.log(res) | 902 | console.log(res) |
| 881 | }).catch(err => { | 903 | }).catch(err => { |
| ... | @@ -900,6 +922,9 @@ function photographyOrder() { | ... | @@ -900,6 +922,9 @@ function photographyOrder() { |
| 900 | return booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => { | 922 | return booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => { |
| 901 | form.value = res.data | 923 | form.value = res.data |
| 902 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn | 924 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn |
| 925 | if (form.value.paymentType) { | ||
| 926 | payType.value = form.value.paymentType | ||
| 927 | } | ||
| 903 | photographyInfo() | 928 | photographyInfo() |
| 904 | }).catch(err => { | 929 | }).catch(err => { |
| 905 | console.log(err) | 930 | console.log(err) |
| ... | @@ -1043,6 +1068,11 @@ const submitProof = () => { | ... | @@ -1043,6 +1068,11 @@ const submitProof = () => { |
| 1043 | getData() | 1068 | getData() |
| 1044 | }) | 1069 | }) |
| 1045 | } | 1070 | } |
| 1071 | |||
| 1072 | function OfflineSuccessDialogClose() { | ||
| 1073 | window.location.reload() | ||
| 1074 | } | ||
| 1075 | |||
| 1046 | </script> | 1076 | </script> |
| 1047 | 1077 | ||
| 1048 | <style lang="scss" scoped> | 1078 | <style lang="scss" scoped> | ... | ... |
| ... | @@ -120,9 +120,14 @@ | ... | @@ -120,9 +120,14 @@ |
| 120 | <el-button v-if="b.status == '0' &&!min" class="mb10" | 120 | <el-button v-if="b.status == '0' &&!min" class="mb10" |
| 121 | plain round size="small" type="primary" @click="goDetail(b)"> | 121 | plain round size="small" type="primary" @click="goDetail(b)"> |
| 122 | <span | 122 | <span |
| 123 | v-if="b.paymentType=='4'||b.paymentType=='5'">{{ language == 0 ? '上传凭证' : 'Upload Receipt' }}</span> | 123 | v-if="b.paymentType=='4'||b.paymentType=='5'">{{ |
| 124 | language == 0 ? '上传凭证' : 'Upload Payment Proof' | ||
| 125 | }}</span> | ||
| 124 | <span v-else>{{ language == 0 ? '支付' : 'Pay' }}</span> | 126 | <span v-else>{{ language == 0 ? '支付' : 'Pay' }}</span> |
| 125 | </el-button> | 127 | </el-button> |
| 128 | <el-button class="mb10" plain round size="small" type="warning" @click="downInvoice(b)"> | ||
| 129 | <span>{{ language == 0 ? '下载缴费单' : 'Download Invoice' }}</span> | ||
| 130 | </el-button> | ||
| 126 | <el-button v-if="b.viewStatus==0 &&!min" class="mb10" plain round size="small" type="warning" | 131 | <el-button v-if="b.viewStatus==0 &&!min" class="mb10" plain round size="small" type="warning" |
| 127 | @click="cancel(b)"> | 132 | @click="cancel(b)"> |
| 128 | {{ language == 0 ? '取消订单' : 'Cancel Order' }} | 133 | {{ language == 0 ? '取消订单' : 'Cancel Order' }} |
| ... | @@ -157,13 +162,15 @@ defineProps({ | ... | @@ -157,13 +162,15 @@ defineProps({ |
| 157 | }) | 162 | }) |
| 158 | 163 | ||
| 159 | const {proxy} = getCurrentInstance() | 164 | const {proxy} = getCurrentInstance() |
| 165 | const emit = defineEmits(['refresh']) | ||
| 160 | 166 | ||
| 161 | const language = useStorage('language', 0) | 167 | const language = useStorage('language', 0) |
| 162 | const router = useRouter() | 168 | const router = useRouter() |
| 163 | 169 | ||
| 164 | function finish(bill) { | 170 | function finish(bill) { |
| 165 | bill.status = '2' | 171 | bill.status = '2' |
| 166 | // getList() | 172 | |
| 173 | // emit('refresh') | ||
| 167 | } | 174 | } |
| 168 | 175 | ||
| 169 | function Rebook(row) { | 176 | function Rebook(row) { |
| ... | @@ -203,11 +210,12 @@ const cancel = (row) => { | ... | @@ -203,11 +210,12 @@ const cancel = (row) => { |
| 203 | //取消订单 | 210 | //取消订单 |
| 204 | proxy.$modal.confirm(language.value == 0 ? '确定取消订单吗 ?' : `Are you sure to cancel the order?`).then(() => { | 211 | proxy.$modal.confirm(language.value == 0 ? '确定取消订单吗 ?' : `Are you sure to cancel the order?`).then(() => { |
| 205 | return cancelOrder2(row.id).then(res => { | 212 | return cancelOrder2(row.id).then(res => { |
| 206 | getList() | ||
| 207 | ElMessage({ | 213 | ElMessage({ |
| 208 | message: language.value == 0 ? '操作成功' : 'Successful operation!', | 214 | message: language.value == 0 ? '操作成功' : 'Successful operation!', |
| 209 | type: 'success' | 215 | type: 'success' |
| 210 | }) | 216 | }) |
| 217 | |||
| 218 | emit('refresh') | ||
| 211 | }) | 219 | }) |
| 212 | }) | 220 | }) |
| 213 | } | 221 | } |
| ... | @@ -215,15 +223,22 @@ const cancel = (row) => { | ... | @@ -215,15 +223,22 @@ const cancel = (row) => { |
| 215 | const unsubscribe = (row) => { | 223 | const unsubscribe = (row) => { |
| 216 | proxy.$modal.confirm(language.value == 0 ? `确定退款吗 ?` : 'Are you sure to refund?').then(() => { | 224 | proxy.$modal.confirm(language.value == 0 ? `确定退款吗 ?` : 'Are you sure to refund?').then(() => { |
| 217 | return cancelOrder(row.id).then(res => { | 225 | return cancelOrder(row.id).then(res => { |
| 218 | getList() | ||
| 219 | ElMessage({ | 226 | ElMessage({ |
| 220 | message: language.value == 0 ? '已提交退款,请等待审核!' : 'Refund has been submitted, please wait for review!', | 227 | message: language.value == 0 ? '已提交退款,请等待审核!' : 'Refund has been submitted, please wait for review!', |
| 221 | type: 'success' | 228 | type: 'success' |
| 222 | }) | 229 | }) |
| 230 | |||
| 231 | emit('refresh') | ||
| 223 | }) | 232 | }) |
| 224 | }) | 233 | }) |
| 225 | } | 234 | } |
| 226 | 235 | ||
| 236 | const downInvoice = (row) => { | ||
| 237 | proxy.download(``, { | ||
| 238 | id: row.id | ||
| 239 | }, `Invoice_${new Date().getTime()}.pdf`) | ||
| 240 | } | ||
| 241 | |||
| 227 | </script> | 242 | </script> |
| 228 | 243 | ||
| 229 | <style lang="scss" scoped> | 244 | <style lang="scss" scoped> | ... | ... |
| ... | @@ -13,17 +13,18 @@ | ... | @@ -13,17 +13,18 @@ |
| 13 | </div> | 13 | </div> |
| 14 | 14 | ||
| 15 | <el-row align="middle" class="pd20 mt10" justify="space-between"> | 15 | <el-row align="middle" class="pd20 mt10" justify="space-between"> |
| 16 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | 16 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 17 | <div> | 17 | <div> |
| 18 | <p class="text-warning" style="margin: -10px 0 8px"> {{ b.invitationTypeName }} </p> | ||
| 18 | <h3 class="name">{{ b.fullName }}</h3> | 19 | <h3 class="name">{{ b.fullName }}</h3> |
| 19 | <p>{{ b.email }}</p> | 20 | <p>{{ b.email }}</p> |
| 20 | <p>{{ b.createTime }}</p> | 21 | <p>{{ b.createTime }}</p> |
| 21 | </div> | 22 | </div> |
| 22 | </el-col> | 23 | </el-col> |
| 23 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | 24 | <el-col :lg="8" :md="12" :sm="12" :xs="24" > |
| 24 | <span class="text-warning"> {{ b.invitationTypeName }} </span> | 25 | <span class="text-danger" v-if="b.remarks2">Reason for rejection: {{ b.remarks2 }} </span> |
| 25 | </el-col> | 26 | </el-col> |
| 26 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | 27 | <el-col :lg="8" :md="24" :sm="24" :xs="24"> |
| 27 | <div class="text-right"> | 28 | <div class="text-right"> |
| 28 | <el-button class="mb10" :disabled="b.emailFlag!='1'" plain round size="small" type="primary" | 29 | <el-button class="mb10" :disabled="b.emailFlag!='1'" plain round size="small" type="primary" |
| 29 | @click="handleDownload(b)"> | 30 | @click="handleDownload(b)"> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="mb20"> | 2 | <div class="mb20"> |
| 3 | <el-card :body-style="{'padding':'0'}"> | 3 | <el-card :body-style="{'padding':'0'}"> |
| 4 | <div class="indexTitle"><h3 class="leftboderTT">{{ language==0?'修改密码':'Change Password' }}</h3></div> | 4 | <div class="indexTitle"><h3 class="leftboderTT">{{ language == 0 ? '修改密码' : 'Change Password' }}</h3></div> |
| 5 | 5 | ||
| 6 | <div class="pd20"> | 6 | <div class="pd20"> |
| 7 | <div class="d-form-border" style="margin-top: 0"> | 7 | <div class="d-form-border" style="margin-top: 0"> |
| ... | @@ -9,20 +9,29 @@ | ... | @@ -9,20 +9,29 @@ |
| 9 | label-width="120px" :label-position="language==0?'left':'top'" | 9 | label-width="120px" :label-position="language==0?'left':'top'" |
| 10 | style="max-width: 500px;margin: auto"> | 10 | style="max-width: 500px;margin: auto"> |
| 11 | <el-form-item :label="language==0?'旧密码':'Old Password'" prop="oldPassword"> | 11 | <el-form-item :label="language==0?'旧密码':'Old Password'" prop="oldPassword"> |
| 12 | <el-input v-model="user.oldPassword" :placeholder="language==0?'请输入旧密码':''" type="password" show-password/> | 12 | <el-input v-model="user.oldPassword" |
| 13 | :placeholder="language==0?'请输入旧密码':'Please enter your old password'" type="password" | ||
| 14 | show-password/> | ||
| 13 | </el-form-item> | 15 | </el-form-item> |
| 14 | <el-form-item :label="language==0?'新密码':'New Password'" prop="newPassword"> | 16 | <el-form-item :label="language==0?'新密码':'New Password'" prop="newPassword"> |
| 15 | <el-input v-model="user.newPassword" :placeholder="language==0?'请设置8位以上大小写字母、数字、特殊符号':''" type="password" | 17 | <el-input v-model="user.newPassword" |
| 18 | :placeholder="language==0?'请设置8位以上大小写字母、数字、特殊符号':'Please set 8 characters or more, including uppercase and lowercase letters, numbers, and special characters'" | ||
| 19 | type="password" | ||
| 16 | show-password/> | 20 | show-password/> |
| 17 | </el-form-item> | 21 | </el-form-item> |
| 18 | <el-form-item :label="language==0?'确认密码':'Confirm Password'" prop="confirmPassword"> | 22 | <el-form-item :label="language==0?'确认密码':'Confirm Password'" prop="confirmPassword" style="margin-top: 30px"> |
| 19 | <el-input v-model="user.confirmPassword" :placeholder="language==0?'请确认新密码':''" type="password" show-password/> | 23 | <el-input v-model="user.confirmPassword" |
| 24 | :placeholder="language==0?'请确认新密码':'Please confirm your new password'" type="password" | ||
| 25 | show-password/> | ||
| 20 | </el-form-item> | 26 | </el-form-item> |
| 21 | 27 | ||
| 22 | </el-form> | 28 | </el-form> |
| 23 | </div> | 29 | </div> |
| 24 | <el-row justify="center"> | 30 | <el-row justify="center"> |
| 25 | <el-button type="primary" class="btn-lineG" round @click="submit">{{ language==0?'保存':'Save' }}</el-button> | 31 | <el-button type="primary" class="btn-lineG" round @click="submit">{{ |
| 32 | language == 0 ? '保存' : 'Save' | ||
| 33 | }} | ||
| 34 | </el-button> | ||
| 26 | </el-row> | 35 | </el-row> |
| 27 | </div> | 36 | </div> |
| 28 | </el-card> | 37 | </el-card> |
| ... | @@ -35,6 +44,7 @@ import useUserStore from '@/store/modules/user' | ... | @@ -35,6 +44,7 @@ import useUserStore from '@/store/modules/user' |
| 35 | import {reactive, ref, getCurrentInstance} from 'vue' | 44 | import {reactive, ref, getCurrentInstance} from 'vue' |
| 36 | import {validPassword} from '@/utils/validate' | 45 | import {validPassword} from '@/utils/validate' |
| 37 | import {useStorage} from "@vueuse/core/index"; | 46 | import {useStorage} from "@vueuse/core/index"; |
| 47 | |||
| 38 | const language = useStorage('language', 0) | 48 | const language = useStorage('language', 0) |
| 39 | 49 | ||
| 40 | const show = ref(false) | 50 | const show = ref(false) |
| ... | @@ -49,7 +59,7 @@ const user = reactive({ | ... | @@ -49,7 +59,7 @@ const user = reactive({ |
| 49 | 59 | ||
| 50 | const equalToPassword = (rule, value, callback) => { | 60 | const equalToPassword = (rule, value, callback) => { |
| 51 | if (user.newPassword !== value) { | 61 | if (user.newPassword !== value) { |
| 52 | callback(new Error('两次输入的密码不一致')) | 62 | callback(new Error(language.value == 0 ? '两次输入的密码不一致' : 'The two passwords are inconsistent')) |
| 53 | } else { | 63 | } else { |
| 54 | callback() | 64 | callback() |
| 55 | } | 65 | } |
| ... | @@ -60,7 +70,7 @@ const validPwd = (rule, value, callback) => { | ... | @@ -60,7 +70,7 @@ const validPwd = (rule, value, callback) => { |
| 60 | callback() | 70 | callback() |
| 61 | } else { | 71 | } else { |
| 62 | if (!validPassword(value)) { | 72 | if (!validPassword(value)) { |
| 63 | callback(new Error('请设置8位以上大小写字母、数字、特殊符号组合的密码')) | 73 | callback(new Error(language.value==0? '请设置8位以上大小写字母、数字、特殊符号组合的密码':'Please set 8 characters or more, including uppercase and lowercase letters, numbers, and special characters')) |
| 64 | } else { | 74 | } else { |
| 65 | callback() | 75 | callback() |
| 66 | } | 76 | } |
| ... | @@ -68,13 +78,13 @@ const validPwd = (rule, value, callback) => { | ... | @@ -68,13 +78,13 @@ const validPwd = (rule, value, callback) => { |
| 68 | } | 78 | } |
| 69 | 79 | ||
| 70 | const rules = ref({ | 80 | const rules = ref({ |
| 71 | oldPassword: [{required: true, message: language.value==0?'旧密码不能为空':'required', trigger: 'blur'}], | 81 | oldPassword: [{required: true, message: language.value == 0 ? '旧密码不能为空' : 'required', trigger: 'blur'}], |
| 72 | newPassword: [ | 82 | newPassword: [ |
| 73 | {required: true, message: language.value==0?'新密码不能为空':'required', trigger: 'blur'}, | 83 | {required: true, message: language.value == 0 ? '新密码不能为空' : 'required', trigger: 'blur'}, |
| 74 | {validator: validPwd, trigger: 'blur'} | 84 | {required: true, validator: validPwd, trigger: 'blur'} |
| 75 | ], | 85 | ], |
| 76 | confirmPassword: [ | 86 | confirmPassword: [ |
| 77 | {required: true, message: language.value==0?'确认密码不能为空':'required', trigger: 'blur'}, | 87 | {required: true, message: language.value == 0 ? '确认密码不能为空' : 'required', trigger: 'blur'}, |
| 78 | {required: true, validator: equalToPassword, trigger: 'blur'} | 88 | {required: true, validator: equalToPassword, trigger: 'blur'} |
| 79 | ] | 89 | ] |
| 80 | }) | 90 | }) |
| ... | @@ -84,7 +94,7 @@ function submit() { | ... | @@ -84,7 +94,7 @@ function submit() { |
| 84 | proxy.$refs['pwdRef'].validate(valid => { | 94 | proxy.$refs['pwdRef'].validate(valid => { |
| 85 | if (valid) { | 95 | if (valid) { |
| 86 | updateUserPwd(user.oldPassword, user.newPassword).then(response => { | 96 | updateUserPwd(user.oldPassword, user.newPassword).then(response => { |
| 87 | proxy.$modal.msgSuccess(language.value==0?'修改成功':'password is changed!') | 97 | proxy.$modal.msgSuccess(language.value == 0 ? '修改成功' : 'password is changed!') |
| 88 | 98 | ||
| 89 | userStore.logOut().then(() => { | 99 | userStore.logOut().then(() => { |
| 90 | setTimeout(() => { | 100 | setTimeout(() => { | ... | ... |
| ... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
| 9 | <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'我的发票':'My Invoice' }}</el-button>--> | 9 | <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'我的发票':'My Invoice' }}</el-button>--> |
| 10 | </div> | 10 | </div> |
| 11 | <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228"/> | 11 | <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228"/> |
| 12 | <reservation-info v-else :list="list"></reservation-info> | 12 | <reservation-info v-else :list="list" @refresh="getList"></reservation-info> |
| 13 | </el-card> | 13 | </el-card> |
| 14 | <div class="pd20"></div> | 14 | <div class="pd20"></div> |
| 15 | </div> | 15 | </div> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <el-calendar ref="calendar" v-model="currentDate"> | 3 | <match-calendar @select-date="getScheduleList"></match-calendar> |
| 4 | <template #header="{ date }"> | ||
| 5 | <div class="father"> | ||
| 6 | <span class="textDay">{{ date }}</span> | ||
| 7 | <el-button-group class="son"> | ||
| 8 | <el-button size="small" type="info" @click="selectDateCalendar('prev-month')"> | ||
| 9 | {{ language == 0 ? '上一月' : 'Last month' }} | ||
| 10 | </el-button> | ||
| 11 | <el-button size="small" type="info" @click="selectDateCalendar('today')"> | ||
| 12 | {{ language == 0 ? '今天' : 'Today' }} | ||
| 13 | </el-button> | ||
| 14 | <el-button size="small" type="info" @click="selectDateCalendar('next-month')"> | ||
| 15 | {{ language == 0 ? '下一月' : 'Next month' }} | ||
| 16 | </el-button> | ||
| 17 | </el-button-group> | ||
| 18 | </div> | ||
| 19 | 4 | ||
| 20 | </template> | ||
| 21 | <template #date-cell="data"> | ||
| 22 | <div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)"> | ||
| 23 | {{ data.data.day.slice(8, 10) }} | ||
| 24 | </div> | ||
| 25 | </template> | ||
| 26 | </el-calendar> | ||
| 27 | <div class="calendarList"> | 5 | <div class="calendarList"> |
| 28 | <ul v-loading="loading"> | 6 | <ul v-loading="loading"> |
| 29 | <li v-for="n in schList" :key="n.id" @click="goMatch(n)"> | 7 | <li v-for="n in schList" :key="n.id" @click="goMatch(n)"> |
| ... | @@ -32,68 +10,32 @@ | ... | @@ -32,68 +10,32 @@ |
| 32 | </li> | 10 | </li> |
| 33 | </ul> | 11 | </ul> |
| 34 | <el-empty | 12 | <el-empty |
| 35 | v-if="schList.length== 0" | 13 | v-if="schList.length== 0" |
| 36 | :image="`/img/order_no.png`" | 14 | :image="`/img/order_no.png`" |
| 37 | :image-size="200" style="--el-empty-padding:0;--el-empty-description-margin-top:0" | 15 | :image-size="200" style="--el-empty-padding:0;--el-empty-description-margin-top:0" |
| 38 | /> | 16 | /> |
| 39 | </div> | 17 | </div> |
| 40 | </div> | 18 | </div> |
| 41 | </template> | 19 | </template> |
| 42 | 20 | ||
| 43 | <script setup> | 21 | <script setup> |
| 44 | import { onMounted, ref } from 'vue' | 22 | import {ref} from 'vue' |
| 45 | import { dayjs } from 'element-plus' | 23 | import {useRouter} from 'vue-router' |
| 46 | import { getIndexScheduleList } from '@/apiPc/common' | 24 | import MatchCalendar from "/@/viewsPc/components/matchCalendar.vue"; |
| 47 | import { useRouter } from 'vue-router' | 25 | import {getIndexScheduleList} from "/@/apiPc/common"; |
| 48 | import { useStorage } from '@vueuse/core/index' | ||
| 49 | import { getMaList } from '@/apiPc/match' | ||
| 50 | 26 | ||
| 51 | const language = useStorage('language', 0) | ||
| 52 | |||
| 53 | const calendar = ref('') | ||
| 54 | const router = useRouter() | 27 | const router = useRouter() |
| 55 | const currentDate = ref() | ||
| 56 | const schList = ref([]) | 28 | const schList = ref([]) |
| 57 | const loading = ref(false) | 29 | const loading = ref(false) |
| 58 | const query = ref({ | ||
| 59 | currentDate: dayjs().format('YYYY-MM-DD') | ||
| 60 | }) | ||
| 61 | |||
| 62 | onMounted(async() => { | ||
| 63 | await handelGetMatch() | ||
| 64 | await getScheduleList() | ||
| 65 | }) | ||
| 66 | 30 | ||
| 67 | async function handelGetMatch() { | 31 | async function getScheduleList(params) { |
| 68 | const res = await getMaList({ | ||
| 69 | type: '-1', | ||
| 70 | progressStatusCode: '-1', | ||
| 71 | pageNum: 1, | ||
| 72 | pageSize: 10 | ||
| 73 | }) | ||
| 74 | if (res.rows.length > 0) { | ||
| 75 | query.value.currentDate = res.rows[0].beginTime | ||
| 76 | currentDate.value = res.rows[0].beginTime | ||
| 77 | } | ||
| 78 | } | ||
| 79 | |||
| 80 | |||
| 81 | async function getScheduleList() { | ||
| 82 | loading.value = true | 32 | loading.value = true |
| 83 | query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD') | 33 | await getIndexScheduleList(params).then(res => { |
| 84 | await getIndexScheduleList(query.value).then(res => { | ||
| 85 | loading.value = false | 34 | loading.value = false |
| 86 | schList.value = res.data | 35 | schList.value = res.data |
| 87 | }) | 36 | }) |
| 88 | } | 37 | } |
| 89 | 38 | ||
| 90 | function selectDate(date) { | ||
| 91 | console.log(dayjs(date).toDate()) | ||
| 92 | console.log(query.value.currentDate) | ||
| 93 | query.value.currentDate = dayjs(date).toDate() | ||
| 94 | getScheduleList() | ||
| 95 | } | ||
| 96 | |||
| 97 | function goMatch(n) { | 39 | function goMatch(n) { |
| 98 | router.push({ | 40 | router.push({ |
| 99 | name: 'matchDetail', | 41 | name: 'matchDetail', |
| ... | @@ -106,67 +48,10 @@ function goMatch(n) { | ... | @@ -106,67 +48,10 @@ function goMatch(n) { |
| 106 | }) | 48 | }) |
| 107 | } | 49 | } |
| 108 | 50 | ||
| 109 | const selectDateCalendar = (val) => { | ||
| 110 | if (!calendar.value) return | ||
| 111 | calendar.value.selectDate(val) | ||
| 112 | if (val == 'today') { | ||
| 113 | query.value.currentDate = dayjs().toDate() | ||
| 114 | getScheduleList() | ||
| 115 | } | ||
| 116 | } | ||
| 117 | |||
| 118 | 51 | ||
| 119 | </script> | 52 | </script> |
| 120 | 53 | ||
| 121 | <style lang="scss" scoped> | 54 | <style lang="scss" scoped> |
| 122 | .el-calendar { | ||
| 123 | --el-calendar-border: none; | ||
| 124 | --el-calendar-cell-width: 40px; | ||
| 125 | text-align: center; | ||
| 126 | --el-text-color-regular: #8E8D94; | ||
| 127 | |||
| 128 | :deep(.el-calendar__header) { | ||
| 129 | justify-content: center; | ||
| 130 | padding: 0 0 10px | ||
| 131 | } | ||
| 132 | |||
| 133 | :deep(.el-calendar__body) { | ||
| 134 | border: 1px solid #F0F0F0; | ||
| 135 | padding: 0 | ||
| 136 | } | ||
| 137 | |||
| 138 | :deep(.el-calendar-table .el-calendar-day) { | ||
| 139 | padding: 1px; | ||
| 140 | } | ||
| 141 | |||
| 142 | :deep(.el-calendar-table td.is-selected) { | ||
| 143 | background: transparent; | ||
| 144 | } | ||
| 145 | |||
| 146 | :deep(.el-calendar__button-group) { | ||
| 147 | display: none; | ||
| 148 | } | ||
| 149 | |||
| 150 | :deep(.el-calendar-table thead th) { | ||
| 151 | padding: 5px 0 0 | ||
| 152 | } | ||
| 153 | |||
| 154 | .primaryDate { | ||
| 155 | color: #fff; | ||
| 156 | //background: linear-gradient(90deg, #8623FC, #453DEA); | ||
| 157 | background: #000; | ||
| 158 | } | ||
| 159 | |||
| 160 | .date { | ||
| 161 | margin: auto; | ||
| 162 | border-radius: 50%; | ||
| 163 | width: 30px; | ||
| 164 | height: 30px; | ||
| 165 | line-height: 30px; | ||
| 166 | font-weight: bold; | ||
| 167 | } | ||
| 168 | } | ||
| 169 | |||
| 170 | .calendarList { | 55 | .calendarList { |
| 171 | border: 1px solid #F0F0F0; | 56 | border: 1px solid #F0F0F0; |
| 172 | padding: 12px 20px; | 57 | padding: 12px 20px; |
| ... | @@ -241,24 +126,4 @@ const selectDateCalendar = (val) => { | ... | @@ -241,24 +126,4 @@ const selectDateCalendar = (val) => { |
| 241 | } | 126 | } |
| 242 | } | 127 | } |
| 243 | } | 128 | } |
| 244 | |||
| 245 | .father { | ||
| 246 | text-align: center; | ||
| 247 | position: relative; | ||
| 248 | width: 100%; | ||
| 249 | } | ||
| 250 | |||
| 251 | .son { | ||
| 252 | position: absolute; | ||
| 253 | right: 0; | ||
| 254 | //width: 230px; | ||
| 255 | } | ||
| 256 | |||
| 257 | //.textDay { | ||
| 258 | // font-weight: bold; | ||
| 259 | // background: linear-gradient(to right, #8623FC, #453DEA); /* 定义渐变方向和颜色 */ | ||
| 260 | // -webkit-background-clip: text; /* 兼容 WebKit 浏览器 */ | ||
| 261 | // background-clip: text; /* 标准语法 */ | ||
| 262 | // -webkit-text-fill-color: transparent; /* 文字颜色透明 */ | ||
| 263 | //} | ||
| 264 | </style> | 129 | </style> | ... | ... |
src/viewsPc/components/matchCalendar.vue
0 → 100644
| 1 | <template> | ||
| 2 | <el-calendar ref="calendarRef" v-model="currentDate"> | ||
| 3 | <template #header="{ date }"> | ||
| 4 | <div class="father"> | ||
| 5 | <span class="textDay">{{ date }}</span> | ||
| 6 | <el-button-group class="son"> | ||
| 7 | <el-button size="small" type="info" @click="selectDateCalendar('prev-month')"> | ||
| 8 | {{ language == 0 ? '上一月' : 'Last month' }} | ||
| 9 | </el-button> | ||
| 10 | <el-button size="small" type="info" @click="selectDateCalendar('today')"> | ||
| 11 | {{ language == 0 ? '今天' : 'Today' }} | ||
| 12 | </el-button> | ||
| 13 | <el-button size="small" type="info" @click="selectDateCalendar('next-month')"> | ||
| 14 | {{ language == 0 ? '下一月' : 'Next month' }} | ||
| 15 | </el-button> | ||
| 16 | </el-button-group> | ||
| 17 | </div> | ||
| 18 | </template> | ||
| 19 | <template #date-cell="data"> | ||
| 20 | <div :class="data.data.day==query.currentDate?'primaryDate date':'date'" @click="selectDate(data.data.day)"> | ||
| 21 | {{ data.data.day.slice(8, 10) }} | ||
| 22 | </div> | ||
| 23 | </template> | ||
| 24 | </el-calendar> | ||
| 25 | </template> | ||
| 26 | |||
| 27 | <script setup> | ||
| 28 | import { onMounted, ref } from 'vue' | ||
| 29 | import { dayjs } from 'element-plus' | ||
| 30 | import { useStorage } from '@vueuse/core/index' | ||
| 31 | import { getMaList } from '@/apiPc/match' | ||
| 32 | |||
| 33 | const emit = defineEmits( ['selectDate']) | ||
| 34 | |||
| 35 | const language = useStorage('language', 0) | ||
| 36 | const calendarRef = ref(null) | ||
| 37 | const currentDate = ref() | ||
| 38 | const query = ref({ | ||
| 39 | currentDate: dayjs().format('YYYY-MM-DD') | ||
| 40 | }) | ||
| 41 | |||
| 42 | onMounted(async() => { | ||
| 43 | await handelGetMatch() | ||
| 44 | await getScheduleList() | ||
| 45 | }) | ||
| 46 | |||
| 47 | async function handelGetMatch() { | ||
| 48 | const res = await getMaList({ | ||
| 49 | type: '-1', | ||
| 50 | progressStatusCode: '-1', | ||
| 51 | pageNum: 1, | ||
| 52 | pageSize: 10 | ||
| 53 | }) | ||
| 54 | if (res.rows.length > 0) { | ||
| 55 | currentDate.value = dayjs(res.rows[0].beginTime).toDate() | ||
| 56 | query.value.currentDate = dayjs(res.rows[0].beginTime).format('YYYY-MM-DD') | ||
| 57 | } | ||
| 58 | } | ||
| 59 | |||
| 60 | |||
| 61 | async function getScheduleList() { | ||
| 62 | emit('selectDate', query.value) | ||
| 63 | } | ||
| 64 | |||
| 65 | function selectDate(date) { | ||
| 66 | query.value.currentDate = date | ||
| 67 | getScheduleList() | ||
| 68 | } | ||
| 69 | |||
| 70 | const selectDateCalendar = (val) => { | ||
| 71 | if (!calendarRef.value) return | ||
| 72 | calendarRef.value.selectDate(val) | ||
| 73 | if (val == 'today') { | ||
| 74 | query.value.currentDate = dayjs().format('YYYY-MM-DD') | ||
| 75 | getScheduleList() | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | </script> | ||
| 81 | |||
| 82 | <style lang="scss" scoped> | ||
| 83 | .el-calendar { | ||
| 84 | --el-calendar-border: none; | ||
| 85 | --el-calendar-cell-width: 40px; | ||
| 86 | text-align: center; | ||
| 87 | --el-text-color-regular: #8E8D94; | ||
| 88 | |||
| 89 | :deep(.el-calendar__header) { | ||
| 90 | justify-content: center; | ||
| 91 | padding: 0 0 10px | ||
| 92 | } | ||
| 93 | |||
| 94 | :deep(.el-calendar__body) { | ||
| 95 | border: 1px solid #F0F0F0; | ||
| 96 | padding: 0 | ||
| 97 | } | ||
| 98 | |||
| 99 | :deep(.el-calendar-table .el-calendar-day) { | ||
| 100 | padding: 1px; | ||
| 101 | } | ||
| 102 | |||
| 103 | :deep(.el-calendar-table td.is-selected) { | ||
| 104 | background: transparent; | ||
| 105 | } | ||
| 106 | |||
| 107 | :deep(.el-calendar__button-group) { | ||
| 108 | display: none; | ||
| 109 | } | ||
| 110 | |||
| 111 | :deep(.el-calendar-table thead th) { | ||
| 112 | padding: 5px 0 0 | ||
| 113 | } | ||
| 114 | |||
| 115 | .primaryDate { | ||
| 116 | color: #fff; | ||
| 117 | //background: linear-gradient(90deg, #8623FC, #453DEA); | ||
| 118 | background: #000; | ||
| 119 | } | ||
| 120 | |||
| 121 | .date { | ||
| 122 | margin: auto; | ||
| 123 | border-radius: 50%; | ||
| 124 | width: 30px; | ||
| 125 | height: 30px; | ||
| 126 | line-height: 30px; | ||
| 127 | font-weight: bold; | ||
| 128 | } | ||
| 129 | } | ||
| 130 | |||
| 131 | .father { | ||
| 132 | text-align: center; | ||
| 133 | position: relative; | ||
| 134 | width: 100%; | ||
| 135 | } | ||
| 136 | |||
| 137 | .son { | ||
| 138 | position: absolute; | ||
| 139 | right: 0; | ||
| 140 | //width: 230px; | ||
| 141 | } | ||
| 142 | |||
| 143 | //.textDay { | ||
| 144 | // font-weight: bold; | ||
| 145 | // background: linear-gradient(to right, #8623FC, #453DEA); /* 定义渐变方向和颜色 */ | ||
| 146 | // -webkit-background-clip: text; /* 兼容 WebKit 浏览器 */ | ||
| 147 | // background-clip: text; /* 标准语法 */ | ||
| 148 | // -webkit-text-fill-color: transparent; /* 文字颜色透明 */ | ||
| 149 | //} | ||
| 150 | </style> |
src/viewsPc/components/matchCj.vue
0 → 100644
| 1 | <template> | ||
| 2 | <el-card class="mt20 mb20" v-for="(n,index) in cjList"> | ||
| 3 | <div class="leftboderTT">{{ language == 0 ? n.title : n.en_title }}</div> | ||
| 4 | <div v-for="(m,jndex) in n.list"> | ||
| 5 | <h3 class="text-center">{{ m.title }}</h3> | ||
| 6 | <div class="tablebody"> | ||
| 7 | <table class="table table-striped"> | ||
| 8 | <thead> | ||
| 9 | <tr class="bg-lineg"> | ||
| 10 | <td class="text-center" style="width: 120px;">{{ language == 0 ? '名次' : 'RANK' }}</td> | ||
| 11 | <td class="text-center">{{ language == 0 ? '组合' : 'COUPLE' }}</td> | ||
| 12 | <td class="text-center w15">{{ language == 0 ? '国家' : 'COUNTRY' }}</td> | ||
| 13 | <td class="text-center w15">START #</td> | ||
| 14 | <td class="text-center w15" v-if="index>0">BASE</td> | ||
| 15 | <td class="text-center w15" v-if="index>0">POINTS</td> | ||
| 16 | </tr> | ||
| 17 | </thead> | ||
| 18 | <tbody> | ||
| 19 | <tr v-for="(l,kndex) in m.rows"> | ||
| 20 | <td class="text-center">{{ l.RANK }}</td> | ||
| 21 | <td class="text-center">{{ l.COUPLE }}</td> | ||
| 22 | <td class="text-center">{{ l.COUNTRY }}</td> | ||
| 23 | <td class="text-primary text-center">{{ l.START }}</td> | ||
| 24 | <td class="text-center" v-if="index>0">{{ l.BASE }}</td> | ||
| 25 | <td v-if="index>0" class="text-primary text-center">{{ l.POINTS }}</td> | ||
| 26 | </tr> | ||
| 27 | </tbody> | ||
| 28 | </table> | ||
| 29 | </div> | ||
| 30 | </div> | ||
| 31 | </el-card> | ||
| 32 | </template> | ||
| 33 | |||
| 34 | <script setup> | ||
| 35 | import {cjList} from '@/assets/js/data' | ||
| 36 | import {useStorage} from "@vueuse/core/index"; | ||
| 37 | const language = useStorage('language', 0) | ||
| 38 | </script> | ||
| 39 | |||
| 40 | <style scoped lang="scss"> | ||
| 41 | .leftboderTT { | ||
| 42 | margin: 0 0 20px; | ||
| 43 | color: var(--el-color-primary); | ||
| 44 | font-size: 20px; | ||
| 45 | } | ||
| 46 | |||
| 47 | h3 { | ||
| 48 | background: #F5F0FF; | ||
| 49 | margin: 0; | ||
| 50 | padding: 10px 0; | ||
| 51 | color: var(--el-color-primary); | ||
| 52 | font-size: 18px; | ||
| 53 | } | ||
| 54 | |||
| 55 | .table { | ||
| 56 | border-spacing: 0; | ||
| 57 | border-collapse: collapse; | ||
| 58 | width: 100%; | ||
| 59 | max-width: 100%; | ||
| 60 | margin-bottom: 20px; | ||
| 61 | |||
| 62 | td, th { | ||
| 63 | padding: 8px; | ||
| 64 | font-size: 14px; | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | :deep(.table-striped > tbody > tr:nth-of-type(odd)) { | ||
| 69 | background: #F6F9FE; | ||
| 70 | } | ||
| 71 | |||
| 72 | .w15 { | ||
| 73 | width: 15%; | ||
| 74 | } | ||
| 75 | </style> |
| ... | @@ -20,19 +20,20 @@ | ... | @@ -20,19 +20,20 @@ |
| 20 | Thank you so much for your kind patience. | 20 | Thank you so much for your kind patience. |
| 21 | </h4> | 21 | </h4> |
| 22 | 22 | ||
| 23 | <div class="red">To check your application status, please go to Account > Personal > Visa Review ReCEBOA Ror refer to your email for any updates.. | 23 | <div class="red">To check your application status, please go to Account > Personal > Visa Review Record, or |
| 24 | refer to your email for any updates. | ||
| 24 | </div> | 25 | </div> |
| 25 | 26 | ||
| 26 | </div> | 27 | </div> |
| 27 | 28 | ||
| 28 | <el-form :model="form" :rules="rules" ref="iformRef" label-position="top" v-else> | 29 | <el-form :model="form" :rules="rules" ref="iformRef" label-position="top" v-else> |
| 29 | <el-form-item :label="language==0?'申请人类别':'Applicant Type'" required prop="applicatType"> | 30 | <el-form-item :label="language==0?'申请人类别':'Applicant Type'" required prop="applicatType"> |
| 30 | <el-select v-model="form.applicatType"> | 31 | <el-select v-model="form.applicatType" @change="changeApplicatType"> |
| 31 | <el-option label="MNA/Team" value="1"/> | 32 | <el-option label="MNA/Team" value="1"/> |
| 32 | <el-option label="Technical Officials" value="2"/> | 33 | <el-option label="Technical Official" value="2"/> |
| 33 | <el-option label="WT Staff" value="3"/> | 34 | <el-option label="WT Team" value="3"/> |
| 34 | <el-option label="Supplier" value="4"/> | 35 | <!-- <el-option label="Supplier" value="4"/>--> |
| 35 | <el-option label="Other" value="5"/> | 36 | <el-option label="Other(not listed above)" value="5"/> |
| 36 | </el-select> | 37 | </el-select> |
| 37 | <el-input class="mt10" v-if="form.applicatType==5" placeholder="Please specify" v-model="form.remarks"/> | 38 | <el-input class="mt10" v-if="form.applicatType==5" placeholder="Please specify" v-model="form.remarks"/> |
| 38 | </el-form-item> | 39 | </el-form-item> |
| ... | @@ -45,10 +46,11 @@ | ... | @@ -45,10 +46,11 @@ |
| 45 | <el-form-item v-if="form.invitationType=='2'" label="Proof of Employment" required prop="invitationFileArr"> | 46 | <el-form-item v-if="form.invitationType=='2'" label="Proof of Employment" required prop="invitationFileArr"> |
| 46 | <div class="red">Proof of employment is required for TE/PU invitation letters.</div> | 47 | <div class="red">Proof of employment is required for TE/PU invitation letters.</div> |
| 47 | <div class="red"> | 48 | <div class="red"> |
| 48 | This document must be issued by the invitee's association and must bear an official stamp orsignature.) | 49 | This document must be issued by the invitee's association and must bear an official stamp or signature. |
| 49 | </div> | 50 | </div> |
| 50 | <br/> | 51 | <br/> |
| 51 | <file-upload v-model="form.invitationFileArr" :is-show-tip="false" :limit="1"></file-upload> | 52 | <file-upload v-model="form.invitationFileArr" :is-show-tip="false" :limit="1" |
| 53 | :button-text="language==0?'上传':'Upload'"></file-upload> | ||
| 52 | </el-form-item> | 54 | </el-form-item> |
| 53 | <el-form-item :label="language==0?'是否需要中文邀请函':'Do you need a Chinese invitation?'" required | 55 | <el-form-item :label="language==0?'是否需要中文邀请函':'Do you need a Chinese invitation?'" required |
| 54 | prop="chinese"> | 56 | prop="chinese"> |
| ... | @@ -150,18 +152,36 @@ | ... | @@ -150,18 +152,36 @@ |
| 150 | </template> | 152 | </template> |
| 151 | <template #default="scope"> | 153 | <template #default="scope"> |
| 152 | <el-select v-model="scope.row.position" size="small"> | 154 | <el-select v-model="scope.row.position" size="small"> |
| 153 | <el-option label="Head Of Team" value="Head Of Team"/> | 155 | <!--MNA/Team--> |
| 154 | <el-option label="Head Coach" value="Head Coach"/> | 156 | <template v-if="form.applicatType=='1'"> |
| 155 | <el-option label="Manager" value="Manager"/> | 157 | <el-option label="Head Of Team" value="Head Of Team"/> |
| 156 | <el-option label="Coach" value="Coach"/> | 158 | <el-option label="Head Coach" value="Head Coach"/> |
| 157 | <el-option label="Trainer" value="Trainer"/> | 159 | <el-option label="Manager" value="Manager"/> |
| 158 | <el-option label="Team Doctor" value="Team Doctor"/> | 160 | <el-option label="Coach" value="Coach"/> |
| 159 | <el-option label="Team Physiotherepaist" value="Team Physiotherepaist"/> | 161 | <el-option label="Trainer" value="Trainer"/> |
| 160 | <el-option label="Competitor" value="Competitor"/> | 162 | <el-option label="Team Doctor" value="Team Doctor"/> |
| 161 | <el-option label="MNA Official" value="MNA Official"/> | 163 | <el-option label="Team Physiotherepaist" value="Team Physiotherepaist"/> |
| 162 | <el-option label="MNA Guest" value="MNA Guest"/> | 164 | <el-option label="Competitor" value="Competitor"/> |
| 165 | <el-option label="MNA Official" value="MNA Official"/> | ||
| 166 | <el-option label="MNA Guest" value="MNA Guest"/> | ||
| 167 | </template> | ||
| 168 | <!--Technical Official--> | ||
| 169 | <template v-if="form.applicatType=='2'"> | ||
| 170 | <el-option label="International Referee" value="International Referee"/> | ||
| 171 | <el-option label="Technical Delegate" value="Technical Delegate"/> | ||
| 172 | <el-option label="CSB member" value="CSB member"/> | ||
| 173 | </template> | ||
| 174 | <!--WT Team--> | ||
| 175 | <template v-if="form.applicatType=='3'"> | ||
| 176 | <el-option label="WT Director" value="WT Director"/> | ||
| 177 | <el-option label="WT Manager" value="WT Manager"/> | ||
| 178 | <el-option label="WT Assistant Manager" value="WT Assistant Manager"/> | ||
| 179 | <el-option label="WT Coordinator" value="WT Coordinator"/> | ||
| 180 | </template> | ||
| 181 | <el-option label="Other (please specify)" value="other"/> | ||
| 163 | </el-select> | 182 | </el-select> |
| 164 | 183 | <el-input v-if="scope.row.position=='other'" placeholder="Please specify" v-model="scope.row.remarks" | |
| 184 | size="small"></el-input> | ||
| 165 | </template> | 185 | </template> |
| 166 | </el-table-column> | 186 | </el-table-column> |
| 167 | <el-table-column prop="lastName" :label="'lastName'" min-width="100"> | 187 | <el-table-column prop="lastName" :label="'lastName'" min-width="100"> |
| ... | @@ -205,7 +225,7 @@ | ... | @@ -205,7 +225,7 @@ |
| 205 | </template> | 225 | </template> |
| 206 | <template #default="scope"> | 226 | <template #default="scope"> |
| 207 | <el-select v-model="scope.row.nationality" size="small" filterable> | 227 | <el-select v-model="scope.row.nationality" size="small" filterable> |
| 208 | <el-option v-for="item in countrys" :key="item.id" :label="language==0?item.name:item.enName" | 228 | <el-option v-for="item in countrys" :key="item.id" :label="item.noc" |
| 209 | :value="item.id"/> | 229 | :value="item.id"/> |
| 210 | </el-select> | 230 | </el-select> |
| 211 | </template> | 231 | </template> |
| ... | @@ -290,8 +310,7 @@ | ... | @@ -290,8 +310,7 @@ |
| 290 | 310 | ||
| 291 | <script setup> | 311 | <script setup> |
| 292 | import {useStorage} from "@vueuse/core/index"; | 312 | import {useStorage} from "@vueuse/core/index"; |
| 293 | import {getCurrentInstance, watch} from "vue"; | 313 | import {getCurrentInstance, ref} from "vue"; |
| 294 | import {nextTick} from "@vue/runtime-core"; | ||
| 295 | import {ElMessage, ElMessageBox} from "element-plus"; | 314 | import {ElMessage, ElMessageBox} from "element-plus"; |
| 296 | import {addInvitation, associationList, countryList, getVisaInfo, sendVisaCode} from "@/apiPc/match"; | 315 | import {addInvitation, associationList, countryList, getVisaInfo, sendVisaCode} from "@/apiPc/match"; |
| 297 | import ImageUpload from '@/components/ImageUpload/index.vue' | 316 | import ImageUpload from '@/components/ImageUpload/index.vue' |
| ... | @@ -386,6 +405,10 @@ const submit = () => { | ... | @@ -386,6 +405,10 @@ const submit = () => { |
| 386 | ElMessage.warning(`Please specify ${row.fristName}'s position`) | 405 | ElMessage.warning(`Please specify ${row.fristName}'s position`) |
| 387 | return | 406 | return |
| 388 | } | 407 | } |
| 408 | if (row.position == 'other' && !row.remarks) { | ||
| 409 | ElMessage.warning(`Please specify ${row.fristName}'s position`) | ||
| 410 | return; | ||
| 411 | } | ||
| 389 | } | 412 | } |
| 390 | 413 | ||
| 391 | if (form.value.files && Array.isArray(form.value.files)) { | 414 | if (form.value.files && Array.isArray(form.value.files)) { |
| ... | @@ -419,8 +442,8 @@ const submit = () => { | ... | @@ -419,8 +442,8 @@ const submit = () => { |
| 419 | } | 442 | } |
| 420 | 443 | ||
| 421 | const getPassportInfo = (res) => { | 444 | const getPassportInfo = (res) => { |
| 422 | if (res.data) { | 445 | if (res.code == 200) { |
| 423 | var obj = { | 446 | let obj = { |
| 424 | position: '', | 447 | position: '', |
| 425 | lastName: res.data.surname, | 448 | lastName: res.data.surname, |
| 426 | fristName: res.data.givenName, | 449 | fristName: res.data.givenName, |
| ... | @@ -434,7 +457,25 @@ const getPassportInfo = (res) => { | ... | @@ -434,7 +457,25 @@ const getPassportInfo = (res) => { |
| 434 | } | 457 | } |
| 435 | form.value.cptVisaInfoBos.push(obj) | 458 | form.value.cptVisaInfoBos.push(obj) |
| 436 | } else { | 459 | } else { |
| 437 | ElMessage.error(res.msg) | 460 | if(res.data) { |
| 461 | ElMessage.error(res.data.code) | ||
| 462 | |||
| 463 | let obj = { | ||
| 464 | position: '', | ||
| 465 | lastName: '', | ||
| 466 | fristName: '', | ||
| 467 | sex: '', | ||
| 468 | birthday: '', | ||
| 469 | nationality: '', | ||
| 470 | passportNo: '', | ||
| 471 | issueDate: '', | ||
| 472 | expiryDate: '', | ||
| 473 | passportCopy: res.data.pic | ||
| 474 | } | ||
| 475 | form.value.cptVisaInfoBos.push(obj) | ||
| 476 | }else{ | ||
| 477 | ElMessage.error(res.msg) | ||
| 478 | } | ||
| 438 | } | 479 | } |
| 439 | } | 480 | } |
| 440 | 481 | ||
| ... | @@ -461,6 +502,13 @@ function sendEmail() { | ... | @@ -461,6 +502,13 @@ function sendEmail() { |
| 461 | } | 502 | } |
| 462 | }) | 503 | }) |
| 463 | } | 504 | } |
| 505 | |||
| 506 | function changeApplicatType() { | ||
| 507 | _.each(form.value.cptVisaInfoBos || [], (item) => { | ||
| 508 | item.position = '' | ||
| 509 | }) | ||
| 510 | } | ||
| 511 | |||
| 464 | </script> | 512 | </script> |
| 465 | 513 | ||
| 466 | <style scoped lang="scss"> | 514 | <style scoped lang="scss"> | ... | ... |
| ... | @@ -20,7 +20,7 @@ | ... | @@ -20,7 +20,7 @@ |
| 20 | 并接收报名审核结果、支付账单、签证邀请函等相关信息。) | 20 | 并接收报名审核结果、支付账单、签证邀请函等相关信息。) |
| 21 | </div> | 21 | </div> |
| 22 | <div v-else class="tip"> | 22 | <div v-else class="tip"> |
| 23 | Please fill in the correct email, which cannot be changed after the registration is completed. The email will be used as your login account and to receive relevant information including results of registration review, payment bills, visa invitation letters, etc. | 23 | Please fill in the correct email, which cannot be changed after the registration is completed. The email will be used as your login account and to receive relevant information including results of registration review, payment bills, visa invitation letters, etc. |
| 24 | </div> | 24 | </div> |
| 25 | </el-form-item> | 25 | </el-form-item> |
| 26 | <el-form-item :label="language==0?'验证码':'Code'" required> | 26 | <el-form-item :label="language==0?'验证码':'Code'" required> | ... | ... |
| ... | @@ -114,7 +114,7 @@ | ... | @@ -114,7 +114,7 @@ |
| 114 | 并接收报名审核结果、支付账单、签证邀请函等相关信息) | 114 | 并接收报名审核结果、支付账单、签证邀请函等相关信息) |
| 115 | </div> | 115 | </div> |
| 116 | <div v-else> | 116 | <div v-else> |
| 117 | Please fill in the correct email, which cannot be changed after the registration is completed. | 117 | Please fill in the correct email, which cannot be changed after the registration is completed. |
| 118 | The email will be used as your login account and to receive relevant information including | 118 | The email will be used as your login account and to receive relevant information including |
| 119 | results of registration review, payment bills, visa invitation letters, etc. | 119 | results of registration review, payment bills, visa invitation letters, etc. |
| 120 | </div> | 120 | </div> | ... | ... |
| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | 并接收报名审核结果、支付账单、签证邀请函等相关信息。) | 11 | 并接收报名审核结果、支付账单、签证邀请函等相关信息。) |
| 12 | </div> | 12 | </div> |
| 13 | <div v-else class="tip"> | 13 | <div v-else class="tip"> |
| 14 | Please fill in the correct email, which cannot be changed after the registration is completed. The email will be used as your login account and to receive relevant information including results of registration review, payment bills, visa invitation letters, etc. | 14 | Please fill in the correct email, which cannot be changed after the registration is completed. The email will be used as your login account and to receive relevant information including results of registration review, payment bills, visa invitation letters, etc. |
| 15 | </div> | 15 | </div> |
| 16 | </el-form-item> | 16 | </el-form-item> |
| 17 | <el-form-item :label="language==0?'验证码':'Code'" required> | 17 | <el-form-item :label="language==0?'验证码':'Code'" required> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | ||
| 3 | <div class="box"> | 2 | <div class="box"> |
| 4 | 3 | <div class="mt20"/> | |
| 5 | <div class="mt20" /> | ||
| 6 | <el-card> | 4 | <el-card> |
| 7 | <el-row :gutter="20"> | 5 | <el-row :gutter="20"> |
| 8 | <el-col :sm="24" :lg="12"> | 6 | <el-col :sm="24" :lg="12"> |
| 9 | <!--赛事日历--> | 7 | <!--赛事日历--> |
| 10 | 8 | <match-calendar @select-date="getScheduleList"></match-calendar> | |
| 11 | <el-calendar v-model="currentDate"> | ||
| 12 | <template #date-cell="data"> | ||
| 13 | |||
| 14 | <div class="date" :class="data.data.day==query.currentDate?'primaryDate':''" @click="selectDate(data.data.day)"> | ||
| 15 | {{ data.data.day.slice(8,10) }} | ||
| 16 | </div> | ||
| 17 | |||
| 18 | </template> | ||
| 19 | </el-calendar> | ||
| 20 | |||
| 21 | </el-col> | 9 | </el-col> |
| 22 | <el-col :sm="24" :lg="12"> | 10 | <el-col :sm="24" :lg="12"> |
| 23 | <div class="calendarList"> | 11 | <div class="calendarList"> |
| ... | @@ -33,81 +21,31 @@ | ... | @@ -33,81 +21,31 @@ |
| 33 | </el-col> | 21 | </el-col> |
| 34 | </el-row> | 22 | </el-row> |
| 35 | </el-card> | 23 | </el-card> |
| 36 | 24 | <!-- <match-cj />--> | |
| 37 | <el-card class="mt20 mb20" v-for="(n,index) in cjList" hidden> | ||
| 38 | <div class="leftboderTT">{{ language==0?n.title:n.en_title }}</div> | ||
| 39 | <div v-for="(m,jndex) in n.list"> | ||
| 40 | <h3 class="text-center">{{ m.title }}</h3> | ||
| 41 | <div class="tablebody"> | ||
| 42 | <table class="table table-striped"> | ||
| 43 | <thead> | ||
| 44 | <tr class="bg-lineg"> | ||
| 45 | <td class="text-center" style="width: 120px;">{{ language==0?'名次':'RANK' }}</td> | ||
| 46 | <td class="text-center">{{ language==0?'组合':'COUPLE' }}</td> | ||
| 47 | <td class="text-center w15">{{ language==0?'国家':'COUNTRY' }}</td> | ||
| 48 | <td class="text-center w15">START #</td> | ||
| 49 | <td class="text-center w15" v-if="index>0">BASE</td> | ||
| 50 | <td class="text-center w15" v-if="index>0">POINTS</td> | ||
| 51 | </tr> | ||
| 52 | </thead> | ||
| 53 | <tbody> | ||
| 54 | <tr v-for="(l,kndex) in m.rows"> | ||
| 55 | <td class="text-center">{{ l.RANK }}</td> | ||
| 56 | <td class="text-center">{{ l.COUPLE}}</td> | ||
| 57 | <td class="text-center">{{ l.COUNTRY }}</td> | ||
| 58 | <td class="text-primary text-center">{{ l.START }}</td> | ||
| 59 | <td class="text-center" v-if="index>0">{{l.BASE}}</td> | ||
| 60 | <td v-if="index>0" class="text-primary text-center">{{ l.POINTS }}</td> | ||
| 61 | </tr> | ||
| 62 | </tbody> | ||
| 63 | </table> | ||
| 64 | </div> | ||
| 65 | </div> | ||
| 66 | |||
| 67 | </el-card> | ||
| 68 | <br><br> | ||
| 69 | </div> | 25 | </div> |
| 70 | </div> | ||
| 71 | </template> | 26 | </template> |
| 72 | 27 | ||
| 73 | <script setup> | 28 | <script setup> |
| 74 | import { onMounted, ref, watch } from 'vue' | 29 | import {ref} from 'vue' |
| 75 | import { getPlanYears, getYearZtxPlanList } from '@/apiPc/train' | ||
| 76 | import {cjList} from '@/assets/js/data' | ||
| 77 | import { ArrowRight } from '@element-plus/icons-vue' | ||
| 78 | import { dayjs } from 'element-plus' | ||
| 79 | const router = useRouter() | ||
| 80 | import {useStorage} from "@vueuse/core/index"; | ||
| 81 | import {getIndexScheduleList} from "@/apiPc/common"; | 30 | import {getIndexScheduleList} from "@/apiPc/common"; |
| 82 | import {useRouter} from "vue-router"; | 31 | import {useRouter} from "vue-router"; |
| 83 | const language = useStorage('language', 0) | 32 | import MatchCalendar from "/@/viewsPc/components/matchCalendar.vue"; |
| 84 | const years = ref([]) | 33 | // import MatchCj from "/@/viewsPc/components/matchCj.vue"; |
| 85 | const currYear = ref(null) | 34 | |
| 86 | const ztxPlanList = ref([]) | 35 | |
| 87 | const planList = ref([]) | 36 | const router = useRouter() |
| 37 | |||
| 88 | const schList = ref([]) | 38 | const schList = ref([]) |
| 89 | const loading = ref(false) | 39 | const loading = ref(false) |
| 90 | const currentDate = ref(dayjs('2024-07-17').toDate()) | 40 | |
| 91 | const query = ref({ | 41 | function getScheduleList(params) { |
| 92 | // currentDate:dayjs().format('YYYY-MM-DD') | ||
| 93 | currentDate: '2024-07-17' | ||
| 94 | }) | ||
| 95 | |||
| 96 | getScheduleList() | ||
| 97 | function getScheduleList() { | ||
| 98 | loading.value = true | 42 | loading.value = true |
| 99 | query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD') | 43 | getIndexScheduleList(params).then(res => { |
| 100 | getIndexScheduleList(query.value).then(res=>{ | ||
| 101 | loading.value = false | 44 | loading.value = false |
| 102 | schList.value = res.data | 45 | schList.value = res.data |
| 103 | }) | 46 | }) |
| 104 | } | 47 | } |
| 105 | function selectDate(date) { | 48 | |
| 106 | console.log(dayjs(date).toDate()) | ||
| 107 | console.log(query.value.currentDate) | ||
| 108 | query.value.currentDate = dayjs(date).toDate() | ||
| 109 | getScheduleList() | ||
| 110 | } | ||
| 111 | function goMatch(n) { | 49 | function goMatch(n) { |
| 112 | router.push({ | 50 | router.push({ |
| 113 | name: 'matchDetail', | 51 | name: 'matchDetail', |
| ... | @@ -122,58 +60,79 @@ function goMatch(n) { | ... | @@ -122,58 +60,79 @@ function goMatch(n) { |
| 122 | </script> | 60 | </script> |
| 123 | 61 | ||
| 124 | <style scoped lang="scss"> | 62 | <style scoped lang="scss"> |
| 125 | .leftboderTT{margin: 0 0 20px;color: var(--el-color-primary); | 63 | .calendarList { |
| 126 | font-size: 20px;} | 64 | border: 1px solid #F0F0F0; |
| 127 | h3{background: #F5F0FF;margin: 0;padding: 10px 0; | 65 | padding: 12px 20px 0; |
| 128 | color: var(--el-color-primary); | 66 | overflow: hidden; |
| 129 | font-size: 18px;} | ||
| 130 | .table { border-spacing: 0; | ||
| 131 | border-collapse: collapse; | ||
| 132 | width: 100%; | ||
| 133 | max-width: 100%; | ||
| 134 | margin-bottom: 20px; | ||
| 135 | td,th{ padding: 8px; font-size: 14px;} | ||
| 136 | } | ||
| 137 | :deep(.table-striped > tbody > tr:nth-of-type(odd)){ | ||
| 138 | background: #F6F9FE; | ||
| 139 | } | ||
| 140 | |||
| 141 | .el-calendar{--el-calendar-border:none;--el-calendar-cell-width:51px;text-align:center; | ||
| 142 | --el-text-color-regular:#8E8D94; | ||
| 143 | :deep(.el-calendar__header){justify-content: center;} | ||
| 144 | :deep(.el-calendar__body){border: 1px solid #F0F0F0;padding: 0} | ||
| 145 | :deep(.el-calendar-table .el-calendar-day){padding: 1px;} | ||
| 146 | :deep(.el-calendar-table td.is-selected){background: transparent;} | ||
| 147 | :deep(.el-calendar__button-group){display: none;} | ||
| 148 | } | ||
| 149 | .primaryDate{color: #fff; | ||
| 150 | background: #000;} | ||
| 151 | .date{ margin:5px auto;border-radius: 50%;width: 34px;height: 34px;line-height: 34px; | ||
| 152 | font-weight: bold; | ||
| 153 | } | ||
| 154 | .calendarList{border: 1px solid #F0F0F0;padding:12px 20px 0;overflow: hidden; | ||
| 155 | height: 100%; | 67 | height: 100%; |
| 156 | ul{ overflow: auto;height: 330px;margin: 0; | 68 | |
| 157 | li{background: #F6F9FE;margin:7px 0 7px 20px;position: relative;padding: 13px; | 69 | ul { |
| 70 | overflow: auto; | ||
| 71 | height: 330px; | ||
| 72 | margin: 0; | ||
| 73 | |||
| 74 | li { | ||
| 75 | background: #F6F9FE; | ||
| 76 | margin: 7px 0 7px 20px; | ||
| 77 | position: relative; | ||
| 78 | padding: 13px; | ||
| 158 | border-radius: 10px; | 79 | border-radius: 10px; |
| 159 | font-weight: 500; | 80 | font-weight: 500; |
| 160 | font-size: 15px;cursor: pointer; | 81 | font-size: 15px; |
| 161 | label{color: #000;margin-right: 15px; | 82 | cursor: pointer; |
| 162 | &::before{content: '';background:#fff;left: -17px;top: 0px;bottom: 0;margin: auto; | 83 | |
| 163 | border-radius: 50%;width: 2px;height: 2px;position: absolute;z-index: 1} | 84 | label { |
| 85 | color: #000; | ||
| 86 | margin-right: 15px; | ||
| 87 | |||
| 88 | &::before { | ||
| 89 | content: ''; | ||
| 90 | background: #fff; | ||
| 91 | left: -17px; | ||
| 92 | top: 0px; | ||
| 93 | bottom: 0; | ||
| 94 | margin: auto; | ||
| 95 | border-radius: 50%; | ||
| 96 | width: 2px; | ||
| 97 | height: 2px; | ||
| 98 | position: absolute; | ||
| 99 | z-index: 1 | ||
| 100 | } | ||
| 164 | } | 101 | } |
| 165 | } | 102 | } |
| 166 | li::before{content: '';background: #000; | 103 | |
| 167 | border-radius: 50%;width: 8px;height: 8px;position: absolute; | 104 | li::before { |
| 168 | left: -20px;top: 0;bottom: 0;margin: auto;z-index: 1; | 105 | content: ''; |
| 106 | background: #000; | ||
| 107 | border-radius: 50%; | ||
| 108 | width: 8px; | ||
| 109 | height: 8px; | ||
| 110 | position: absolute; | ||
| 111 | left: -20px; | ||
| 112 | top: 0; | ||
| 113 | bottom: 0; | ||
| 114 | margin: auto; | ||
| 115 | z-index: 1; | ||
| 116 | } | ||
| 117 | |||
| 118 | li::after { | ||
| 119 | content: ''; | ||
| 120 | left: -16px; | ||
| 121 | width: 1px; | ||
| 122 | height: 100%; | ||
| 123 | background: #EBEBEB; | ||
| 124 | position: absolute; | ||
| 125 | top: 20px | ||
| 169 | } | 126 | } |
| 170 | li::after{content: ''; left: -16px;width: 1px;height: 100%; | 127 | |
| 171 | background: #EBEBEB; position: absolute;top: 20px} | 128 | li:hover { |
| 172 | li:hover{color: #fff; | 129 | color: #fff; |
| 173 | background: #000; | 130 | background: #000; |
| 174 | label{color: #fff;} | 131 | |
| 132 | label { | ||
| 133 | color: #fff; | ||
| 134 | } | ||
| 175 | } | 135 | } |
| 176 | } | 136 | } |
| 177 | } | 137 | } |
| 178 | .w15{width: 15%;} | ||
| 179 | </style> | 138 | </style> | ... | ... |
-
Please register or sign in to post a comment