fb8342d4 by 杨炀

Merge branch 'dev' of https://code.itechtop.cn/yangyang/dance-pc into dev

2 parents 24537552 f3e5beef
......@@ -2,13 +2,14 @@
<div class="app-container">
<div class="box">
<el-row :gutter="20">
<el-col :lg="5" :md="5" :xl="6" :sm="8" :xs="8">
<el-col :lg="5" :md="5" :sm="8" :xl="6" :xs="8">
<el-card class="mb20">
<div :class="language==0?'center-menu':'center-menu en-menu'">
<ul v-if="user.utype=='2'&&language==0">
<li v-for="(m, i) in menus"
:key="i"
:class="{ active: m.isActive }"
<li
v-for="(m, i) in menus"
:key="i"
:class="{ active: m.isActive }"
>
<a href="javascript:void(0)" @click="toInfo(m,menus)">
<img :src="m.isActive ? m.picUrl2 : m.picUrl1">
......@@ -17,9 +18,10 @@
</li>
</ul>
<ul v-if="user.utype=='2'&&language==1">
<li v-for="(m, i) in menusEn"
:key="i"
:class="{ active: m.isActive }"
<li
v-for="(m, i) in menusEn"
:key="i"
:class="{ active: m.isActive }"
>
<a href="javascript:void(0)" @click="toInfo(m,menusEn)">
<img :src="m.isActive ? m.picUrl2 : m.picUrl1">
......@@ -29,9 +31,9 @@
</ul>
<ul v-if="user.utype=='1'&&language==0">
<li
v-for="(m, i) in menusPersonal"
:key="i"
:class="{ active: m.isActive }"
v-for="(m, i) in menusPersonal"
:key="i"
:class="{ active: m.isActive }"
>
<a href="javascript:void(0)" @click="toInfo(m,menusPersonal)">
<img :src="m.isActive ? m.picUrl2 : m.picUrl1">
......@@ -41,9 +43,9 @@
</ul>
<ul v-if="user.utype=='1'&&language==1">
<li
v-for="(m, i) in menusPersonalEn"
:key="i"
:class="{ active: m.isActive }"
v-for="(m, i) in menusPersonalEn"
:key="i"
:class="{ active: m.isActive }"
>
<a href="javascript:void(0)" @click="toInfo(m,menusPersonalEn)">
<img :src="m.isActive ? m.picUrl2 : m.picUrl1">
......@@ -53,9 +55,9 @@
</ul>
<ul v-if="user.utype=='3'&&language==0">
<li
v-for="(m, i) in menus3"
:key="i"
:class="{ active: m.isActive }"
v-for="(m, i) in menus3"
:key="i"
:class="{ active: m.isActive }"
>
<a href="javascript:void(0)" @click="toInfo(m,menus3)">
<img :src="m.isActive ? m.picUrl2 : m.picUrl1">
......@@ -65,9 +67,9 @@
</ul>
<ul v-if="user.utype=='3'&&language==1">
<li
v-for="(m, i) in menus3En"
:key="i"
:class="{ active: m.isActive }"
v-for="(m, i) in menus3En"
:key="i"
:class="{ active: m.isActive }"
>
<a href="javascript:void(0)" @click="toInfo(m,menus3En)">
<img :src="m.isActive ? m.picUrl2 : m.picUrl1">
......@@ -78,8 +80,8 @@
</div>
</el-card>
</el-col>
<el-col :lg="19" :md="19" :xl="18" :sm="16" :xs="16">
<router-view :user="user" class="rightPart"/>
<el-col :lg="19" :md="19" :sm="16" :xl="18" :xs="16">
<router-view :user="user" class="rightPart" />
</el-col>
</el-row>
</div>
......@@ -87,12 +89,12 @@
</template>
<script setup>
import {ref} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import {onMounted} from '@vue/runtime-core'
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { onMounted } from '@vue/runtime-core'
import useUserStore from '@/store/modules/user'
import _ from 'lodash'
import {useStorage} from "@vueuse/core/index";
import { useStorage } from '@vueuse/core/index'
const language = useStorage('language', 0)
......@@ -245,13 +247,13 @@ const menus3 = ref([
picUrl2: '/img/nav_29_dwn.png',
isActive: false
},
{
name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
routeName: 'seat_order',
picUrl1: '/img/c7.png',
picUrl2: '/img/c7.png',
isActive: false
},
// {
// name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
// routeName: 'seat_order',
// picUrl1: '/img/c7.png',
// picUrl2: '/img/c7.png',
// isActive: false
// },
{
name: language.value == 0 ? '发票申请' : 'Electronic invoice',
routeName: 'myKP',
......@@ -281,14 +283,14 @@ const menus3En = ref([
picUrl1: '/img/nav_29.png',
picUrl2: '/img/nav_29_dwn.png',
isActive: false
},
{
name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
routeName: 'seat_order',
picUrl1: '/img/c7.png',
picUrl2: '/img/c7.png',
isActive: false
}
// {
// name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
// routeName: 'seat_order',
// picUrl1: '/img/c7.png',
// picUrl2: '/img/c7.png',
// isActive: false
// }
])
const menusPersonal = ref([
{
......@@ -319,13 +321,13 @@ const menusPersonal = ref([
picUrl2: '/img/nav_29_dwn.png',
isActive: false
},
{
name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
routeName: 'seat_order',
picUrl1: '/img/c7.png',
picUrl2: '/img/c7.png',
isActive: false
},
// {
// name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
// routeName: 'seat_order',
// picUrl1: '/img/c7.png',
// picUrl2: '/img/c7.png',
// isActive: false
// },
{
name: language.value == 0 ? '系统消息' : 'System messages',
routeName: 'mySms',
......@@ -370,13 +372,13 @@ const menusPersonalEn = ref([
picUrl2: '/img/nav_29_dwn.png',
isActive: false
},
{
name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
routeName: 'seat_order',
picUrl1: '/img/c7.png',
picUrl2: '/img/c7.png',
isActive: false
},
// {
// name: language.value == 0 ? '票务预订' : 'Ticket Reservation',
// routeName: 'seat_order',
// picUrl1: '/img/c7.png',
// picUrl2: '/img/c7.png',
// isActive: false
// },
{
name: language.value == 0 ? '系统消息' : 'System messages',
routeName: 'mySms',
......@@ -389,7 +391,7 @@ let currMenu
onMounted(() => {
console.log(route.query)
if (!user.utype) {
router.push({name: 'home'})
router.push({ name: 'home' })
return
}
if (user.utype == '1') {
......@@ -399,7 +401,7 @@ onMounted(() => {
currMenu.isActive = true
}
console.log(route.name)
if (user.utype == '2') {
currMenu = _.find(menus.value, (m) => {
return m.routeName === route.name
......@@ -412,7 +414,6 @@ onMounted(() => {
})
currMenu.isActive = true
}
})
const toInfo = (item, list) => {
......@@ -420,37 +421,37 @@ const toInfo = (item, list) => {
m.isActive = false
})
item.isActive = true
router.push({
name: item.routeName
})
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
:deep(.el-tabs__nav-wrap) {
padding: 0 15px;
}
.center-menu {
text-align: center;
li {
margin-bottom: 15px;
}
&.en-menu {
text-align: left;
li {
padding: 6px 0 6px 14px;
a {
display: flex;
align-items: center;
}
}
img {
padding: 0;
width: 26px;
......@@ -477,7 +478,7 @@ li img {
}
.el-card {
box-shadow: none !important;
:deep(.el-card__body) {
padding: 0 !important;
}
......@@ -495,16 +496,16 @@ li img {
top: 80px;
width: 100px;
border-right: 1px solid #eee;
li {
font-size: 13px;
padding: 8px 10px;
border-radius: 0;
img {
display: none
}
&.active {
background: #fff;
border-left: 2px solid var(--el-color-primary);
......
......@@ -59,19 +59,36 @@
<el-option v-for="l in labels" :key="l.value" :label="language==0?l.label:l.enlabel" :value="l.value" />
</el-select>
</el-form-item>
<el-form-item :label="language==0?'有效证件':'Valid Passport'" required>
<!-- <el-form-item :label="language==0?'有效证件':'Valid Passport'" required>-->
<!-- <image-upload-->
<!-- v-model="form.passportUrl" :button-text="language==0?'上传':'Upload'" :is-show-tip="false"-->
<!-- :limit="1"-->
<!-- />-->
<!-- <div class="tip">-->
<!-- <span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span>-->
<!-- <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>-->
<!-- </div>-->
<!-- </el-form-item>-->
<el-form-item :label="language==0?'有效证件':'Valid Passport'" prop="" required>
<image-upload
v-model="form.passportUrl" :button-text="language==0?'上传':'Upload'" :is-show-tip="false"
ref="uploadPassportRef"
v-model="form.passportUrl"
:action="'/common/getPersonInfoFromCert/6'"
:button-text="language==0?'上传':'Upload'"
:is-show-tip="false"
:limit="1"
param-name="pic"
@response="ocrSuccess"
/>
<div class="tip">
<span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span>
<span v-else>Please upload a scanned copy of your valid passport for verification of identity information,
<span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等 </span>
<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>
</div>
</el-form-item>
</el-col>
<el-col :lg="12" class="touxiang">
<el-form-item :label="language==0?'个人照片':'Photo'" prop="picUrl">
......@@ -80,7 +97,9 @@
class="threeFour"
/>
</el-form-item>
<el-form-item :label="language==0?'证件姓名':'Name'" prop="certName">
<el-input v-model="form.certName" :disabled="editgay" />
</el-form-item>
<el-form-item
:label="language==0?'证件类型':'ID Type'" :required="!form.wdsfMin&&form.labelArr.indexOf('0')>-1"
prop="idcType"
......@@ -154,6 +173,7 @@ import { dayjs, ElMessage } from 'element-plus'
import _ from 'lodash'
import { useStorage } from '@vueuse/core/index'
import { checkWdsf, getCaptchaSms } from '@/apiPc/match'
import ImageUpload from '/@/components/ImageUpload/index.vue'
const language = useStorage('language', 0)
const certificates = ref([
......@@ -414,6 +434,23 @@ function giveBirthDay() {
}
}
// 有效证件
const ocrSuccess = (res) => {
// form.value.passportUrl = res.data.url
console.log(form.value.passportUrl)
if (res.code == 200) {
form.value.passportUrl = res.data.url
form.value.idcCode = res.data.code
form.value.birth = res.data.birth?.slice(0, 10)
form.value.sex = res.data.sex
form.value.certName = res.data.name
form.value.idcType = res.data.type == '3' ? '1' : '0'
} else if (res.code == 500) {
ElMessage.warning(res.msg)
form.value.passportCopy = ''
}
}
function submitForm() {
proxy.$refs['dialogRef'].validate((valid) => {
if (valid) {
......@@ -451,6 +488,7 @@ function submitForm() {
if (groupId.value != 0) {
// 团队
form.value.groupId = groupId.value
form.value.ocrFlag = '1'
match.savePersonForMyGroup(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
......@@ -466,6 +504,7 @@ function submitForm() {
})
} else {
if (isMe.value) {
form.value.ocrFlag = '1'
match.saveMyBaseInfo(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
......@@ -473,6 +512,7 @@ function submitForm() {
})
} else {
form.value.cptId = cptId.value
form.value.ocrFlag = '1'
match.savePersonForMyPerson(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!