Merge branch 'dev' of https://code.itechtop.cn/yangyang/dance-pc into dev
Showing
4 changed files
with
88 additions
and
47 deletions
| ... | @@ -2,11 +2,12 @@ | ... | @@ -2,11 +2,12 @@ |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | <div class="box"> | 3 | <div class="box"> |
| 4 | <el-row :gutter="20"> | 4 | <el-row :gutter="20"> |
| 5 | <el-col :lg="5" :md="5" :xl="6" :sm="8" :xs="8"> | 5 | <el-col :lg="5" :md="5" :sm="8" :xl="6" :xs="8"> |
| 6 | <el-card class="mb20"> | 6 | <el-card class="mb20"> |
| 7 | <div :class="language==0?'center-menu':'center-menu en-menu'"> | 7 | <div :class="language==0?'center-menu':'center-menu en-menu'"> |
| 8 | <ul v-if="user.utype=='2'&&language==0"> | 8 | <ul v-if="user.utype=='2'&&language==0"> |
| 9 | <li v-for="(m, i) in menus" | 9 | <li |
| 10 | v-for="(m, i) in menus" | ||
| 10 | :key="i" | 11 | :key="i" |
| 11 | :class="{ active: m.isActive }" | 12 | :class="{ active: m.isActive }" |
| 12 | > | 13 | > |
| ... | @@ -17,7 +18,8 @@ | ... | @@ -17,7 +18,8 @@ |
| 17 | </li> | 18 | </li> |
| 18 | </ul> | 19 | </ul> |
| 19 | <ul v-if="user.utype=='2'&&language==1"> | 20 | <ul v-if="user.utype=='2'&&language==1"> |
| 20 | <li v-for="(m, i) in menusEn" | 21 | <li |
| 22 | v-for="(m, i) in menusEn" | ||
| 21 | :key="i" | 23 | :key="i" |
| 22 | :class="{ active: m.isActive }" | 24 | :class="{ active: m.isActive }" |
| 23 | > | 25 | > |
| ... | @@ -78,8 +80,8 @@ | ... | @@ -78,8 +80,8 @@ |
| 78 | </div> | 80 | </div> |
| 79 | </el-card> | 81 | </el-card> |
| 80 | </el-col> | 82 | </el-col> |
| 81 | <el-col :lg="19" :md="19" :xl="18" :sm="16" :xs="16"> | 83 | <el-col :lg="19" :md="19" :sm="16" :xl="18" :xs="16"> |
| 82 | <router-view :user="user" class="rightPart"/> | 84 | <router-view :user="user" class="rightPart" /> |
| 83 | </el-col> | 85 | </el-col> |
| 84 | </el-row> | 86 | </el-row> |
| 85 | </div> | 87 | </div> |
| ... | @@ -87,12 +89,12 @@ | ... | @@ -87,12 +89,12 @@ |
| 87 | </template> | 89 | </template> |
| 88 | 90 | ||
| 89 | <script setup> | 91 | <script setup> |
| 90 | import {ref} from 'vue' | 92 | import { ref } from 'vue' |
| 91 | import {useRoute, useRouter} from 'vue-router' | 93 | import { useRoute, useRouter } from 'vue-router' |
| 92 | import {onMounted} from '@vue/runtime-core' | 94 | import { onMounted } from '@vue/runtime-core' |
| 93 | import useUserStore from '@/store/modules/user' | 95 | import useUserStore from '@/store/modules/user' |
| 94 | import _ from 'lodash' | 96 | import _ from 'lodash' |
| 95 | import {useStorage} from "@vueuse/core/index"; | 97 | import { useStorage } from '@vueuse/core/index' |
| 96 | 98 | ||
| 97 | const language = useStorage('language', 0) | 99 | const language = useStorage('language', 0) |
| 98 | 100 | ||
| ... | @@ -245,13 +247,13 @@ const menus3 = ref([ | ... | @@ -245,13 +247,13 @@ const menus3 = ref([ |
| 245 | picUrl2: '/img/nav_29_dwn.png', | 247 | picUrl2: '/img/nav_29_dwn.png', |
| 246 | isActive: false | 248 | isActive: false |
| 247 | }, | 249 | }, |
| 248 | { | 250 | // { |
| 249 | name: language.value == 0 ? '票务预订' : 'Ticket Reservation', | 251 | // name: language.value == 0 ? '票务预订' : 'Ticket Reservation', |
| 250 | routeName: 'seat_order', | 252 | // routeName: 'seat_order', |
| 251 | picUrl1: '/img/c7.png', | 253 | // picUrl1: '/img/c7.png', |
| 252 | picUrl2: '/img/c7.png', | 254 | // picUrl2: '/img/c7.png', |
| 253 | isActive: false | 255 | // isActive: false |
| 254 | }, | 256 | // }, |
| 255 | { | 257 | { |
| 256 | name: language.value == 0 ? '发票申请' : 'Electronic invoice', | 258 | name: language.value == 0 ? '发票申请' : 'Electronic invoice', |
| 257 | routeName: 'myKP', | 259 | routeName: 'myKP', |
| ... | @@ -281,14 +283,14 @@ const menus3En = ref([ | ... | @@ -281,14 +283,14 @@ const menus3En = ref([ |
| 281 | picUrl1: '/img/nav_29.png', | 283 | picUrl1: '/img/nav_29.png', |
| 282 | picUrl2: '/img/nav_29_dwn.png', | 284 | picUrl2: '/img/nav_29_dwn.png', |
| 283 | isActive: false | 285 | isActive: false |
| 284 | }, | ||
| 285 | { | ||
| 286 | name: language.value == 0 ? '票务预订' : 'Ticket Reservation', | ||
| 287 | routeName: 'seat_order', | ||
| 288 | picUrl1: '/img/c7.png', | ||
| 289 | picUrl2: '/img/c7.png', | ||
| 290 | isActive: false | ||
| 291 | } | 286 | } |
| 287 | // { | ||
| 288 | // name: language.value == 0 ? '票务预订' : 'Ticket Reservation', | ||
| 289 | // routeName: 'seat_order', | ||
| 290 | // picUrl1: '/img/c7.png', | ||
| 291 | // picUrl2: '/img/c7.png', | ||
| 292 | // isActive: false | ||
| 293 | // } | ||
| 292 | ]) | 294 | ]) |
| 293 | const menusPersonal = ref([ | 295 | const menusPersonal = ref([ |
| 294 | { | 296 | { |
| ... | @@ -319,13 +321,13 @@ const menusPersonal = ref([ | ... | @@ -319,13 +321,13 @@ const menusPersonal = ref([ |
| 319 | picUrl2: '/img/nav_29_dwn.png', | 321 | picUrl2: '/img/nav_29_dwn.png', |
| 320 | isActive: false | 322 | isActive: false |
| 321 | }, | 323 | }, |
| 322 | { | 324 | // { |
| 323 | name: language.value == 0 ? '票务预订' : 'Ticket Reservation', | 325 | // name: language.value == 0 ? '票务预订' : 'Ticket Reservation', |
| 324 | routeName: 'seat_order', | 326 | // routeName: 'seat_order', |
| 325 | picUrl1: '/img/c7.png', | 327 | // picUrl1: '/img/c7.png', |
| 326 | picUrl2: '/img/c7.png', | 328 | // picUrl2: '/img/c7.png', |
| 327 | isActive: false | 329 | // isActive: false |
| 328 | }, | 330 | // }, |
| 329 | { | 331 | { |
| 330 | name: language.value == 0 ? '系统消息' : 'System messages', | 332 | name: language.value == 0 ? '系统消息' : 'System messages', |
| 331 | routeName: 'mySms', | 333 | routeName: 'mySms', |
| ... | @@ -370,13 +372,13 @@ const menusPersonalEn = ref([ | ... | @@ -370,13 +372,13 @@ const menusPersonalEn = ref([ |
| 370 | picUrl2: '/img/nav_29_dwn.png', | 372 | picUrl2: '/img/nav_29_dwn.png', |
| 371 | isActive: false | 373 | isActive: false |
| 372 | }, | 374 | }, |
| 373 | { | 375 | // { |
| 374 | name: language.value == 0 ? '票务预订' : 'Ticket Reservation', | 376 | // name: language.value == 0 ? '票务预订' : 'Ticket Reservation', |
| 375 | routeName: 'seat_order', | 377 | // routeName: 'seat_order', |
| 376 | picUrl1: '/img/c7.png', | 378 | // picUrl1: '/img/c7.png', |
| 377 | picUrl2: '/img/c7.png', | 379 | // picUrl2: '/img/c7.png', |
| 378 | isActive: false | 380 | // isActive: false |
| 379 | }, | 381 | // }, |
| 380 | { | 382 | { |
| 381 | name: language.value == 0 ? '系统消息' : 'System messages', | 383 | name: language.value == 0 ? '系统消息' : 'System messages', |
| 382 | routeName: 'mySms', | 384 | routeName: 'mySms', |
| ... | @@ -389,7 +391,7 @@ let currMenu | ... | @@ -389,7 +391,7 @@ let currMenu |
| 389 | onMounted(() => { | 391 | onMounted(() => { |
| 390 | console.log(route.query) | 392 | console.log(route.query) |
| 391 | if (!user.utype) { | 393 | if (!user.utype) { |
| 392 | router.push({name: 'home'}) | 394 | router.push({ name: 'home' }) |
| 393 | return | 395 | return |
| 394 | } | 396 | } |
| 395 | if (user.utype == '1') { | 397 | if (user.utype == '1') { |
| ... | @@ -412,7 +414,6 @@ onMounted(() => { | ... | @@ -412,7 +414,6 @@ onMounted(() => { |
| 412 | }) | 414 | }) |
| 413 | currMenu.isActive = true | 415 | currMenu.isActive = true |
| 414 | } | 416 | } |
| 415 | |||
| 416 | }) | 417 | }) |
| 417 | 418 | ||
| 418 | const toInfo = (item, list) => { | 419 | const toInfo = (item, list) => { |
| ... | @@ -427,7 +428,7 @@ const toInfo = (item, list) => { | ... | @@ -427,7 +428,7 @@ const toInfo = (item, list) => { |
| 427 | } | 428 | } |
| 428 | </script> | 429 | </script> |
| 429 | 430 | ||
| 430 | <style scoped lang="scss"> | 431 | <style lang="scss" scoped> |
| 431 | :deep(.el-tabs__nav-wrap) { | 432 | :deep(.el-tabs__nav-wrap) { |
| 432 | padding: 0 15px; | 433 | padding: 0 15px; |
| 433 | } | 434 | } | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -59,19 +59,36 @@ | ... | @@ -59,19 +59,36 @@ |
| 59 | <el-option v-for="l in labels" :key="l.value" :label="language==0?l.label:l.enlabel" :value="l.value" /> | 59 | <el-option v-for="l in labels" :key="l.value" :label="language==0?l.label:l.enlabel" :value="l.value" /> |
| 60 | </el-select> | 60 | </el-select> |
| 61 | </el-form-item> | 61 | </el-form-item> |
| 62 | <el-form-item :label="language==0?'有效证件':'Valid Passport'" required> | 62 | <!-- <el-form-item :label="language==0?'有效证件':'Valid Passport'" required>--> |
| 63 | <!-- <image-upload--> | ||
| 64 | <!-- v-model="form.passportUrl" :button-text="language==0?'上传':'Upload'" :is-show-tip="false"--> | ||
| 65 | <!-- :limit="1"--> | ||
| 66 | <!-- />--> | ||
| 67 | <!-- <div class="tip">--> | ||
| 68 | <!-- <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span>--> | ||
| 69 | <!-- <span v-else>Please upload a scanned copy of your valid passport for verification of identity information,application of visa invitation letter and purchasing insurance etc.</span>--> | ||
| 70 | <!-- </div>--> | ||
| 71 | <!-- </el-form-item>--> | ||
| 72 | |||
| 73 | <el-form-item :label="language==0?'有效证件':'Valid Passport'" prop="" required> | ||
| 63 | <image-upload | 74 | <image-upload |
| 64 | v-model="form.passportUrl" :button-text="language==0?'上传':'Upload'" :is-show-tip="false" | 75 | ref="uploadPassportRef" |
| 76 | v-model="form.passportUrl" | ||
| 77 | :action="'/common/getPersonInfoFromCert/6'" | ||
| 78 | :button-text="language==0?'上传':'Upload'" | ||
| 79 | :is-show-tip="false" | ||
| 65 | :limit="1" | 80 | :limit="1" |
| 81 | param-name="pic" | ||
| 82 | @response="ocrSuccess" | ||
| 66 | /> | 83 | /> |
| 67 | <div class="tip"> | 84 | <div class="tip"> |
| 68 | <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span> | 85 | <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等 </span> |
| 69 | <span v-else>Please upload a scanned copy of your valid passport for verification of identity information, | 86 | <span v-else> |
| 87 | Please upload a scanned copy of your valid passport for verification of identity information, | ||
| 70 | application of visa invitation letter and purchasing insurance etc.</span> | 88 | application of visa invitation letter and purchasing insurance etc.</span> |
| 71 | </div> | 89 | </div> |
| 72 | </el-form-item> | ||
| 73 | |||
| 74 | 90 | ||
| 91 | </el-form-item> | ||
| 75 | </el-col> | 92 | </el-col> |
| 76 | <el-col :lg="12" class="touxiang"> | 93 | <el-col :lg="12" class="touxiang"> |
| 77 | <el-form-item :label="language==0?'个人照片':'Photo'" prop="picUrl"> | 94 | <el-form-item :label="language==0?'个人照片':'Photo'" prop="picUrl"> |
| ... | @@ -80,7 +97,9 @@ | ... | @@ -80,7 +97,9 @@ |
| 80 | class="threeFour" | 97 | class="threeFour" |
| 81 | /> | 98 | /> |
| 82 | </el-form-item> | 99 | </el-form-item> |
| 83 | 100 | <el-form-item :label="language==0?'证件姓名':'Name'" prop="certName"> | |
| 101 | <el-input v-model="form.certName" :disabled="editgay" /> | ||
| 102 | </el-form-item> | ||
| 84 | <el-form-item | 103 | <el-form-item |
| 85 | :label="language==0?'证件类型':'ID Type'" :required="!form.wdsfMin&&form.labelArr.indexOf('0')>-1" | 104 | :label="language==0?'证件类型':'ID Type'" :required="!form.wdsfMin&&form.labelArr.indexOf('0')>-1" |
| 86 | prop="idcType" | 105 | prop="idcType" |
| ... | @@ -154,6 +173,7 @@ import { dayjs, ElMessage } from 'element-plus' | ... | @@ -154,6 +173,7 @@ import { dayjs, ElMessage } from 'element-plus' |
| 154 | import _ from 'lodash' | 173 | import _ from 'lodash' |
| 155 | import { useStorage } from '@vueuse/core/index' | 174 | import { useStorage } from '@vueuse/core/index' |
| 156 | import { checkWdsf, getCaptchaSms } from '@/apiPc/match' | 175 | import { checkWdsf, getCaptchaSms } from '@/apiPc/match' |
| 176 | import ImageUpload from '/@/components/ImageUpload/index.vue' | ||
| 157 | 177 | ||
| 158 | const language = useStorage('language', 0) | 178 | const language = useStorage('language', 0) |
| 159 | const certificates = ref([ | 179 | const certificates = ref([ |
| ... | @@ -414,6 +434,23 @@ function giveBirthDay() { | ... | @@ -414,6 +434,23 @@ function giveBirthDay() { |
| 414 | } | 434 | } |
| 415 | } | 435 | } |
| 416 | 436 | ||
| 437 | // 有效证件 | ||
| 438 | const ocrSuccess = (res) => { | ||
| 439 | // form.value.passportUrl = res.data.url | ||
| 440 | console.log(form.value.passportUrl) | ||
| 441 | if (res.code == 200) { | ||
| 442 | form.value.passportUrl = res.data.url | ||
| 443 | form.value.idcCode = res.data.code | ||
| 444 | form.value.birth = res.data.birth?.slice(0, 10) | ||
| 445 | form.value.sex = res.data.sex | ||
| 446 | form.value.certName = res.data.name | ||
| 447 | form.value.idcType = res.data.type == '3' ? '1' : '0' | ||
| 448 | } else if (res.code == 500) { | ||
| 449 | ElMessage.warning(res.msg) | ||
| 450 | form.value.passportCopy = '' | ||
| 451 | } | ||
| 452 | } | ||
| 453 | |||
| 417 | function submitForm() { | 454 | function submitForm() { |
| 418 | proxy.$refs['dialogRef'].validate((valid) => { | 455 | proxy.$refs['dialogRef'].validate((valid) => { |
| 419 | if (valid) { | 456 | if (valid) { |
| ... | @@ -451,6 +488,7 @@ function submitForm() { | ... | @@ -451,6 +488,7 @@ function submitForm() { |
| 451 | if (groupId.value != 0) { | 488 | if (groupId.value != 0) { |
| 452 | // 团队 | 489 | // 团队 |
| 453 | form.value.groupId = groupId.value | 490 | form.value.groupId = groupId.value |
| 491 | form.value.ocrFlag = '1' | ||
| 454 | match.savePersonForMyGroup(form.value).then(res => { | 492 | match.savePersonForMyGroup(form.value).then(res => { |
| 455 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') | 493 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') |
| 456 | show.value = false | 494 | show.value = false |
| ... | @@ -466,6 +504,7 @@ function submitForm() { | ... | @@ -466,6 +504,7 @@ function submitForm() { |
| 466 | }) | 504 | }) |
| 467 | } else { | 505 | } else { |
| 468 | if (isMe.value) { | 506 | if (isMe.value) { |
| 507 | form.value.ocrFlag = '1' | ||
| 469 | match.saveMyBaseInfo(form.value).then(res => { | 508 | match.saveMyBaseInfo(form.value).then(res => { |
| 470 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') | 509 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') |
| 471 | show.value = false | 510 | show.value = false |
| ... | @@ -473,6 +512,7 @@ function submitForm() { | ... | @@ -473,6 +512,7 @@ function submitForm() { |
| 473 | }) | 512 | }) |
| 474 | } else { | 513 | } else { |
| 475 | form.value.cptId = cptId.value | 514 | form.value.cptId = cptId.value |
| 515 | form.value.ocrFlag = '1' | ||
| 476 | match.savePersonForMyPerson(form.value).then(res => { | 516 | match.savePersonForMyPerson(form.value).then(res => { |
| 477 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') | 517 | ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful') |
| 478 | show.value = false | 518 | show.value = false | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment