b1e78587 by zhangmeng

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

2 parents 5e955dde 4276d1ac
......@@ -114,7 +114,7 @@ function popRemark(type) {
|| (form.value.isFoodView == 0 && type == '3')
|| (form.value.isMealView == 0 && type == '4')
|| (form.value.isPhotoView == 0 && type == '5')
// || (type == '0')
|| (type == '0')
) {
building()
return
......
......@@ -59,7 +59,8 @@
<div class="pl-15 text-danger fontsize14" v-if="cantBao.flag">*{{language==0?`请上传 ${ cantBao.name } 的有效证件`:`Please upload the Valid Passport of ${cantBao.name}`}}</div>
<div v-loading="loadingProject" style="height: 55vh;overflow: auto;">
<el-checkbox-group v-model="projectIds">
<el-checkbox class="flexBetweenBox" v-for="c in projectList" :label="c.id" :key="c.id" :disabled="cantBao.flag">
<el-checkbox class="flexBetweenBox" v-for="c in projectList" :label="c.id" :key="c.id"
:disabled="cantBao.flag">
<div class="flexBetween w100">
<div class="l">
{{ c.code }}:{{ c.name }} {{c.danceType}}
......
......@@ -92,7 +92,8 @@
</div>
<div v-loading="loadingProject" id="projectbox" style="height: 50vh;overflow: auto;">
<el-checkbox-group v-model="projectIds" @change="changeProject">
<el-checkbox class="flexBetweenBox" v-for="c in projectList" :value="c.id" :key="c.id">
<el-checkbox class="flexBetweenBox" v-for="c in projectList" :value="c.id" :key="c.id"
v-show="!c.disabled" :disabled="c.disabled">
<div class="flexBetween w100">
<div class="l">
{{ c.code }}:{{ c.name }}({{c.danceType}})
......@@ -579,13 +580,48 @@ function switchTabletype() {
}
watch(projectIds, (newVal, oldVal) => {
let currProject = {}
if (newVal.length > oldVal.length) {
currProjectId.value = _.last(newVal)
} else {
currProjectId.value = ''
}
for(let p of projectList.value){
if(p.id==_.last(newVal)){
currProject = p
}
}
if(newVal.length>0){
console.log(currProject.pproperty,currProject.plevel)
for(let pp of projectList.value){
if(
(currProject.pproperty&&pp.pproperty&&(pp.pproperty!=currProject.pproperty))||
(currProject.plevel&&pp.plevel&&(pp.plevel!=currProject.plevel))||
(currProject.pproperty&&pp.plevel&&currProject.pproperty=='A'&&pp.plevel!='6')||
(currProject.pproperty&&pp.plevel&&currProject.pproperty=='B'&&(pp.plevel!='2'&&pp.plevel!='4'))||
(currProject.pproperty&&pp.plevel&&currProject.pproperty=='C'&&(pp.plevel!='2'&&pp.plevel!='4'))||
(currProject.plevel&&pp.pproperty&&currProject.plevel=='6'&&pp.pproperty!='A')||
(currProject.plevel&&pp.pproperty&&currProject.plevel=='4'&&(pp.pproperty!='B'&&pp.pproperty!='C'))||
(currProject.plevel&&pp.pproperty&&currProject.plevel=='2'&&(pp.pproperty!='B'&&pp.pproperty!='C'))
){
console.log(pp.pproperty,pp.plevel)
pp.disabled = true
}else if((currProject.almightyFlag=='1'&&pp.almightyFlag=='1')&&(currProject.danceTypeDetailStr.split(',').length!=pp.danceTypeDetailStr.split(',').length)){
console.log(pp.name)
pp.disabled = true
}else {
pp.disabled = false
}
}
} else {
resetProjectList()
}
})
function resetProjectList(){
for(var p of projectList.value){
p.disabled = false
}
}
function changeProject(e) {
var obj = {}
obj = _.find(projectList.value, (c) => {
......@@ -599,7 +635,7 @@ function changeProject(e) {
}
}
//obj需要wdsf 且 currProjectId非空
if (obj.checkMemberFlag == '1' && currProjectId.value != '' && n > 0) {
if (obj&&obj.checkMemberFlag == '1' && currProjectId.value != '' && n > 0) {
const params = {
title: language.value == 0 ? '验证WDSF' : 'Verify WDSF',
groupId: groupId.value,
......
......@@ -22,11 +22,14 @@
</template>
</el-input>
<a class="text-primary text-sm mt10" href="https://www.worlddancesport.org/Athlete/List" target="_blank">
<el-icon><Link /></el-icon>
{{language==0?'去WDSF官网查询我的会员号':'Search my WSDF MIN on the WDSF official website'}}
<el-icon>
<Link/>
</el-icon>
{{ language == 0 ? '去WDSF官网查询我的会员号' : 'Search my WSDF MIN on the WDSF official website' }}
</a>
<Vcode :successText="successVcode" :failText="failVcode" :slider-text="sliderText" :show="showVcode" :z-index="2999" @success="codeSuccess()"></Vcode>
<Vcode :successText="successVcode" :failText="failVcode" :slider-text="sliderText" :show="showVcode"
:z-index="2999" @success="codeSuccess()"></Vcode>
</el-form-item>
<div class="h30"></div>
<div class="leftboderTT">{{ language == 0 ? '个人信息' : 'Personal information' }}
......@@ -79,7 +82,7 @@
</el-form-item>
<el-form-item :label="language==0?'有效证件':'Valid Passport'" required>
<image-upload v-model="form.passportUrl" :limit="1" :is-show-tip="false"
:button-text="language==0?'上传':'Upload'"/>
:button-text="language==0?'上传':'Upload'"/>
<div class="tip">
<span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等 </span>
<span v-else>
......@@ -96,7 +99,7 @@
<template #footer>
<div class="dialog-footer text-center">
<el-button type="primary" class="btn-lineG w200px" round @click="submitForm">
{{language == 0 ? '确定' : 'Save' }}
{{ language == 0 ? '确定' : 'Save' }}
</el-button>
</div>
</template>
......@@ -155,8 +158,10 @@ const data = reactive({
successVcode: '验证通过!',
sliderText: '拖动滑块完成拼图',
})
const {form, show, showVcode, title, labels, uType, isMe, isCodeTrue, card, cptId,
failVcode,successVcode,sliderText} = toRefs(data)
const {
form, show, showVcode, title, labels, uType, isMe, isCodeTrue, card, cptId,
failVcode, successVcode, sliderText
} = toRefs(data)
let editgay = false
let groupId = '0'
......@@ -185,25 +190,28 @@ const open = (params) => {
editgay = false
} else {// 编辑舞伴
editgay = true
if(params.form){
if (params.form) {
form.value = params.form
}else {
} else {
getFormById(params.id)
}
}
}
}
defineExpose({open})
function getMyInfo() {
match.getMyPersonInfo().then(res => {
form.value = res.data
})
}
function getFormById(id) {
match.getPersonInfoById(id).then(res => {
form.value = res.data
})
}
watch(show, (value) => {
if (!value) {
card.value = ''
......@@ -219,11 +227,11 @@ watch(show, (value) => {
function submitForm() {
if (!form.value.passportNumber) {
ElMessage.warning(language.value == 0 ?'请输入你的证件号':'Please fill in your passport number')
ElMessage.warning(language.value == 0 ? '请输入你的证件号' : 'Please fill in your passport number')
return
}
if (!form.value.birth) {
ElMessage.warning(language.value == 0 ?'请输入你的出生日期':'Please fill in your birthday')
ElMessage.warning(language.value == 0 ? '请输入你的出生日期' : 'Please fill in your birthday')
return
}
// if (!form.value.picUrl) {
......@@ -231,11 +239,11 @@ function submitForm() {
// return
// }
if (!form.value.sex) {
ElMessage.warning(language.value == 0 ?'请选择性别':'Please select your gender')
ElMessage.warning(language.value == 0 ? '请选择性别' : 'Please select your gender')
return
}
if (!form.value.passportUrl||form.value.passportUrl==''||form.value.passportUrl.length==0) {
ElMessage.warning(language.value == 0 ?'请上传证件':'Please upload passport file')
if (!form.value.passportUrl || form.value.passportUrl == '' || form.value.passportUrl.length == 0) {
ElMessage.warning(language.value == 0 ? '请上传证件' : 'Please upload passport file')
return
}
if (editgay) {
......@@ -245,7 +253,7 @@ function submitForm() {
form.value.passportUrl = form.value.passportUrl[0].url
}
match.editPersonInfo(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' :'Successfully')
ElMessage.success(language.value == 0 ? '保存成功' : 'Successfully')
show.value = false
emit('submitForm')
})
......@@ -270,16 +278,17 @@ function submitForm() {
if (Array.isArray(form.value.passportUrl)) {
form.value.passportUrl = form.value.passportUrl[0].url
}
if(groupId=='0'||!groupId){
if (groupId == '0' || !groupId) {
addPersonal()
} else {
if(groupId){
if (groupId) {
addGroupMember()
}
}
}
}
}
function addPersonal() {
match.savePersonForMyPerson2(form.value).then(res => {
ElMessage.success('保存成功')
......@@ -287,15 +296,17 @@ function addPersonal() {
emit('submitForm', res.data)
})
}
function addGroupMember() {
form.value.groupId = groupId
match.savePersonForMyGroup(form.value).then(res => {
ElMessage.success(language.value == 0 ?'保存成功':'Save successful')
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
emit('submitForm')
})
}
function cancel() {
show.value = false
showVcode.value = false
......@@ -324,9 +335,9 @@ function codeSuccess(msg) {
console.log('验证通过' + msg);
showVcode.value = false
isCodeTrue.value = true
checkWdsfAthletes({card: card.value,groupId:groupId}).then(res => {
if (res.data.wdsfFlag==-1) {
ElMessage.warning(language.value == 0 ?'您添加的运动员代表国家/地区,与团体账号注册的国家/地区不符,无法添加':'The athlete \'s representing, does not match the group account‘s country/region and cannot be added.')
checkWdsfAthletes({card: card.value, groupId: groupId}).then(res => {
if (res.data.wdsfFlag == -1) {
ElMessage.warning(language.value == 0 ? '您添加的运动员代表国家/地区,与团体账号注册的国家/地区不符,无法添加' : 'The athlete \'s representing, does not match the group account‘s country/region and cannot be added.')
isCodeTrue.value = false
return
}
......
......@@ -135,7 +135,7 @@ function popRemark(type) {
|| ( type == '3')
|| (form.value.isMealView == 0 && type == '4')
|| (type == '5')
// || (type == '0')
|| (type == '0')
)
{
building()
......
......@@ -82,17 +82,17 @@ export default defineConfig(({ mode, command }) => {
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
target: 'http://192.168.1.118:8081/',
// target: 'http://192.168.1.131:8081/',
// target: 'http://192.168.1.118:8081/',
target: 'http://192.168.1.131:8081/',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
},
'/ticket': {
target: 'http://192.168.1.118:8098/',
// target: 'http://192.168.1.118:8098/',
// target: 'http://192.168.1.131:8081/',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/ticket/, '')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!