Commit 4db528e7 authored by 杨梦雪's avatar 杨梦雪

bug

parent 611673f2
.btn { .btn {
padding-bottom: 0 !important; padding-bottom: 0 !important;
} }
.referInfo { .referInfo {
padding: 0 50px 110px 50px; padding: 0 50px 110px 50px;
...@@ -79,11 +81,14 @@ ...@@ -79,11 +81,14 @@
} }
} }
} }
.el-textarea .el-input__count{
right: 15px!important; .el-textarea .el-input__count {
right: 15px !important;
} }
.el-textarea__inner { .el-textarea__inner {
padding: 5px 17px 59px 10px!important; padding: 5px 17px 59px 10px !important;
&:hover { &:hover {
border-color: var(--color); border-color: var(--color);
} }
...@@ -211,6 +216,11 @@ ...@@ -211,6 +216,11 @@
text-align: center; text-align: center;
} }
} }
.hide .el-upload--picture-card {
display: none;
}
} }
} }
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div> <div>
<span class="pay_titile">报名信息</span> <span class="pay_titile">报名信息</span>
<div class="pay_top"> <div class="pay_top">
<div>营地名称:{{ camp_name }}</div> <div>营地名称:{{ $store.state.info.name }}</div>
<div>真实姓名:{{ personalInfo.name }}</div> <div>真实姓名:{{ personalInfo.name }}</div>
<div>身份证号:{{ personalInfo.id_card }}</div> <div>身份证号:{{ personalInfo.id_card }}</div>
<!-- <div>缴费时间:{{ personalInfo.create_time }}</div> --> <!-- <div>缴费时间:{{ personalInfo.create_time }}</div> -->
...@@ -169,7 +169,6 @@ ...@@ -169,7 +169,6 @@
<el-upload <el-upload
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
:class="{ hide: hideUpload }" :class="{ hide: hideUpload }"
:disabled="isUploading || fileList.length >= 1"
:file-list="fileList" :file-list="fileList"
:http-request="uploadPicture" :http-request="uploadPicture"
:limit="1" :limit="1"
...@@ -277,13 +276,11 @@ ...@@ -277,13 +276,11 @@
resultPicture: "", resultPicture: "",
disabled: false, //限制输入框 disabled: false, //限制输入框
hideUpload: false, hideUpload: false,
limitCount: 1,
isBank_infoFile: false, isBank_infoFile: false,
}; };
}, },
created() { created() {
const code = this.$store.state.indexIdentity; const code = this.$store.state.indexIdentity;
this.camp_name = window.localStorage.getItem("camp_name" + code);
this.has_amount = window.localStorage.getItem("has_amount" + code); this.has_amount = window.localStorage.getItem("has_amount" + code);
// 已上传的银行付款图片 // 已上传的银行付款图片
let bank_infoFile = window.localStorage.getItem( let bank_infoFile = window.localStorage.getItem(
...@@ -509,11 +506,9 @@ ...@@ -509,11 +506,9 @@
}, },
// cos上传 // cos上传
async getCosConfigs(image, file) { async getCosConfigs(image, file) {
console.log(file)
this.loading = true; this.loading = true;
await cosSignature({image: image, index: '3'}) await cosSignature({image: image, index: '3'})
.then((res) => { .then((res) => {
console.log(res, "开始上传图片");
let resData = res.data.data let resData = res.data.data
if (res.data.code === 200) { if (res.data.code === 200) {
const cos = new COS({ const cos = new COS({
...@@ -556,23 +551,22 @@ ...@@ -556,23 +551,22 @@
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
// this.getIdCardPic();
}); });
}, },
// cos上传-告诉后端上传成功 // cos上传-告诉后端上传成功
async signUploadSuccess(path, resData) { async signUploadSuccess(path, resData) {
await achievementCallBack({key: resData.key, index: 1}).then(res => { await achievementCallBack({key: resData.key, index: 3}).then(res => {
if (res.data.code != 200) { if (res.data.code != 200) {
this.loading = false; this.loading = false;
return this.$message.error('上传失败!'); return this.$message.error('上传失败!');
} }
console.log(res)
this.loading = false; this.loading = false;
this.$message.success('上传成功!'); this.$message.success('上传成功!');
this.resultPicture = path + "?t=" + Date.parse(new Date()); this.resultPicture = path + "?t=" + Date.parse(new Date());
this.$forceUpdate(); this.$forceUpdate();
let obj = { let obj = {
url: res.data.picture_path, url: res.data.picture_path,
savefile: res.data.config.savefile,
}; };
this.fileList.push(obj); this.fileList.push(obj);
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
...@@ -582,8 +576,8 @@ ...@@ -582,8 +576,8 @@
"您已上传成功,等待短信通知,审核通过后登录报名网址。", "您已上传成功,等待短信通知,审核通过后登录报名网址。",
duration: 5000, duration: 5000,
}); });
this.hideUpload = this.fileList.length >= 1;
this.changeStatus(); this.changeStatus();
this.hideUpload = this.fileList.length >= this.limitCount;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
}) })
...@@ -659,11 +653,13 @@ ...@@ -659,11 +653,13 @@
}) })
.then(() => { .then(() => {
let getfile = file.url; let getfile = file.url;
console.log(file)
// console.log(savefile.match(/^(?:[^\/]|\/\/)*/),'222222');//获取域名 // console.log(savefile.match(/^(?:[^\/]|\/\/)*/),'222222');//获取域名
let str = getfile.split( let str = getfile.split(
"https://yingdi-bank-info.oss-cn-beijing.aliyuncs.com/" "https://yingdi-bank-info-1320656968.cos.ap-beijing.myqcloud.com/"
); //https://yingdi-achievement.oss-cn-beijing.aliyuncs.com/进行分割, ); //https://yingdi-bank-info-1320656968.cos.ap-beijing.myqcloud.com/进行分割,
let savefile = str[1];
let savefile = str[1].split('?')[0];
delPayingPic({object: savefile}).then((res) => { delPayingPic({object: savefile}).then((res) => {
if (res.data.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.data.msg); return this.$message.error(res.data.msg);
...@@ -674,7 +670,7 @@ ...@@ -674,7 +670,7 @@
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
window.localStorage.setItem("sign_up_payfile_" + window.localStorage.getItem("index-phone-all") + code, JSON.stringify(this.fileList)); window.localStorage.setItem("sign_up_payfile_" + window.localStorage.getItem("index-phone-all") + code, JSON.stringify(this.fileList));
this.$message.success("删除成功"); this.$message.success("删除成功");
this.hideUpload = this.fileList.length >= this.limitCount; this.hideUpload = this.fileList.length >= 1;
window.localStorage.removeItem( window.localStorage.removeItem(
"bank_info" + "bank_info" +
window.localStorage.getItem("index-phone-all") + window.localStorage.getItem("index-phone-all") +
...@@ -682,7 +678,6 @@ ...@@ -682,7 +678,6 @@
); );
} }
}); });
// console.log(this.fileList);
}); });
}) })
.catch((err) => { .catch((err) => {
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
" "
label="年龄" label="年龄"
prop="age" prop="age"
style="height: 70px" style="height: 73px"
> >
<el-input <el-input
clearable clearable
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
" "
label="国籍" label="国籍"
prop="country" prop="country"
style="height: 70px" style="height: 73px"
> >
<el-select <el-select
:popper-append-to-body="false" :popper-append-to-body="false"
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
" "
label="身份证号" label="身份证号"
prop="id_card" prop="id_card"
style="height: 70px" style="height: 73px"
> >
<el-input <el-input
placeholder="填写真实身份证号" placeholder="填写真实身份证号"
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
: [{ required: false }] : [{ required: false }]
" "
label="手机号" label="手机号"
style="height: 70px" style="height: 73px"
> >
<el-input <el-input
:disabled="true" :disabled="true"
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
" "
label="学历" label="学历"
prop="education" prop="education"
style="height: 70px" style="height: 73px"
> >
<el-select <el-select
:popper-append-to-body="false" :popper-append-to-body="false"
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
" "
label="单位名称及身份" label="单位名称及身份"
prop="unit_and_identity" prop="unit_and_identity"
style="height: 70px" style="height: 73px"
> >
<el-input <el-input
placeholder="请输入单位名称及身份" placeholder="请输入单位名称及身份"
...@@ -561,11 +561,11 @@ ...@@ -561,11 +561,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 既往病史或过敏史 --> <!-- 既往病史或过敏史 -->
<el-col :span="12" v-show="configJson.pastMedicalHistory == 1&&isOffline==true"> <el-col :span="12" v-show="configJson.pastMedicalHistory == 1">
<el-form-item <el-form-item
:rules=" :rules="
(configJson.pastMedicalHistory == 1?true:false)&&isOffline==true (configJson.pastMedicalHistory == 1?true:false)&&isOffline==true
? referInfoRules.clothesSize ? referInfoRules.pastMedicalHistory
: [{ required: false }] : [{ required: false }]
" "
label="既往病史或过敏史" label="既往病史或过敏史"
...@@ -582,11 +582,11 @@ ...@@ -582,11 +582,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 备注或其它 --> <!-- 备注或其它 -->
<el-col :span="12" v-show="configJson.noteOther == 1&&isOffline==true"> <el-col :span="12" v-show="configJson.noteOther == 1">
<el-form-item <el-form-item
:rules=" :rules="
(configJson.noteOther == 1?true:false)&&isOffline==true (configJson.noteOther == 1?true:false)&&isOffline==true
? referInfoRules.clothesSize ? referInfoRules.noteOther
: [{ required: false }] : [{ required: false }]
" "
label="备注或其它" label="备注或其它"
...@@ -603,7 +603,7 @@ ...@@ -603,7 +603,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 衣服尺码--> <!-- 衣服尺码-->
<el-col :span="12" v-show="configJson.clothesSize == 1&&isOffline==true"> <el-col :span="12" v-show="configJson.clothesSize == 1">
<el-form-item <el-form-item
:rules=" :rules="
(configJson.clothesSize == 1?true:false)&&isOffline==true (configJson.clothesSize == 1?true:false)&&isOffline==true
...@@ -897,17 +897,18 @@ ...@@ -897,17 +897,18 @@
<div class="image_in"> <div class="image_in">
<el-upload <el-upload
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
:class="{ hide: hideUpload }"
:disabled="isUploading || fileList.length >= 10" :disabled="isUploading || fileList.length >= 10"
:file-list="fileList" :file-list="fileList"
:http-request="uploadPicture" :http-request="uploadPicture"
:limit="10" :limit="10"
:on-progress="handleUploadProgress"
:on-success="uploadSuccess" :on-success="uploadSuccess"
accept=".jpg,.jpeg,.png" accept=".jpg,.jpeg,.png"
action="#" action="#"
list-type="picture-card" list-type="picture-card"
name="multipartFile" name="multipartFile"
ref="imgUrl" ref="imgUrl"
> >
<i class="el-icon-circle-plus" style="font-size: 44px"> </i> <i class="el-icon-circle-plus" style="font-size: 44px"> </i>
<!-- <div class="text">上传材料</div> --> <!-- <div class="text">上传材料</div> -->
...@@ -965,7 +966,7 @@ ...@@ -965,7 +966,7 @@
/* eslint-disable */ /* eslint-disable */
import {delPic, getAccount, getProAndCity, getSchool, setAccount} from "r/index/signUp"; import {delPic, getAccount, getProAndCity, getSchool, setAccount} from "r/index/signUp";
import COS from "cos-js-sdk-v5"; import COS from "cos-js-sdk-v5";
import {cosSignature,achievementCallBack} from "r/index/cosUpload"; import {achievementCallBack, cosSignature} from "r/index/cosUpload";
import validator from "common/validator"; import validator from "common/validator";
import area from "config/area"; import area from "config/area";
import cueDialog from "c/index/cueDialog"; import cueDialog from "c/index/cueDialog";
...@@ -1376,18 +1377,19 @@ ...@@ -1376,18 +1377,19 @@
resultPicture: "", resultPicture: "",
disabled: false, //限制输入框 disabled: false, //限制输入框
isOffline: false, //活动形式是否包含线下字段 isOffline: false, //活动形式是否包含线下字段
hideUpload: false
}; };
}, },
created() { created() {
const code = this.$store.state.indexIdentity; const code = this.$store.state.indexIdentity;
this.referForm.phone = window.localStorage.getItem("index-phone-all"); //本地取用户手机号 this.referForm.phone = window.localStorage.getItem("index-phone-all"); //本地取用户手机号
this.referForm.email = window.localStorage.getItem("index-email-all"); //本地取用户邮箱
let signUpFile = window.localStorage.getItem( let signUpFile = window.localStorage.getItem(
"sign_up_file_" + window.localStorage.getItem("index-phone-all") + code "sign_up_file_" + window.localStorage.getItem("index-phone-all") + code
); );
// console.log(signUpFile); // console.log(signUpFile);
if (signUpFile && JSON.parse(signUpFile).length > 0) { if (signUpFile && JSON.parse(signUpFile).length > 0) {
this.fileList = JSON.parse(signUpFile); this.fileList = JSON.parse(signUpFile);
this.hideUpload = this.fileList.length >= 10;
} }
// this.getSchool(); // this.getSchool();
this.getTenYear(); this.getTenYear();
...@@ -1400,16 +1402,18 @@ ...@@ -1400,16 +1402,18 @@
//若线下形式(既往病史或过敏史,备注或其它,衣服尺码)为必填项,否则为选填。 //若线下形式(既往病史或过敏史,备注或其它,衣服尺码)为必填项,否则为选填。
let multiform = JSON.parse(window.localStorage.getItem("multiform" + code)); let multiform = JSON.parse(window.localStorage.getItem("multiform" + code));
let multiform_id = window.localStorage.getItem("multiform_id" + code); let multiform_id = window.localStorage.getItem("multiform_id" + code);
multiform.forEach((i) => { if (multiform != '[]') {
if (i.id == multiform_id) { multiform.forEach((i) => {
let reg = /[\u7ebf][\u4e0b]/ if (i.id == multiform_id) {
this.isOffline = reg.test(i.multiform_name) let reg = /[\u7ebf][\u4e0b]/
} this.isOffline = reg.test(i.multiform_name)
}) }
})
}
console.log(this.isOffline)
}, },
watch: { watch: {
referForm(val) { referForm(val) {
console.log(val, "val");
for (let k in val) { for (let k in val) {
if (val[k] == null || !val[k]) { if (val[k] == null || !val[k]) {
val[k] = this.referForm[k]; val[k] = this.referForm[k];
...@@ -1769,14 +1773,6 @@ ...@@ -1769,14 +1773,6 @@
this.resultPicture = file.url; this.resultPicture = file.url;
this.dialogVisible = true; this.dialogVisible = true;
}, },
// 文件上传中处理
handleUploadProgress(event, file, fileList) {
// console.log(fileList);
this.isUploading = true;
if (this.fileList.lenge < 10) {
return this.$message.info("chaochushuliamng");
}
},
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.referForm.achievementPath = res; this.referForm.achievementPath = res;
this.fileList = { this.fileList = {
...@@ -1796,6 +1792,9 @@ ...@@ -1796,6 +1792,9 @@
}; };
this.getCosConfigs(image, params.file); this.getCosConfigs(image, params.file);
}, },
ChangeImage(fileList) {
this.hideUpload = fileList.length >= 10;
},
// cos上传 // cos上传
async getCosConfigs(image, file) { async getCosConfigs(image, file) {
console.log(file) console.log(file)
...@@ -1835,7 +1834,7 @@ ...@@ -1835,7 +1834,7 @@
this.$message.error('上传失败!') this.$message.error('上传失败!')
} else { } else {
console.log(data); console.log(data);
this.signUploadSuccess('http://' + data.Location,resData); this.signUploadSuccess('http://' + data.Location, resData);
} }
} }
); );
...@@ -1849,8 +1848,8 @@ ...@@ -1849,8 +1848,8 @@
}); });
}, },
// cos上传-告诉后端上传成功 // cos上传-告诉后端上传成功
async signUploadSuccess(path,resData) { async signUploadSuccess(path, resData) {
await achievementCallBack({key:resData.key,index:1}).then(res => { await achievementCallBack({key: resData.key, index: 1}).then(res => {
if (res.data.code != 200) { if (res.data.code != 200) {
this.loading = false; this.loading = false;
return this.$message.error('上传失败!'); return this.$message.error('上传失败!');
...@@ -1860,7 +1859,7 @@ ...@@ -1860,7 +1859,7 @@
this.resultPicture = path + "?t=" + Date.parse(new Date()); this.resultPicture = path + "?t=" + Date.parse(new Date());
this.$forceUpdate(); this.$forceUpdate();
let obj = { let obj = {
url:res.data.picture_path, url: res.data.picture_path,
}; };
this.fileList.push(obj); this.fileList.push(obj);
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
...@@ -1869,6 +1868,8 @@ ...@@ -1869,6 +1868,8 @@
code, code,
JSON.stringify(this.fileList) JSON.stringify(this.fileList)
); );
this.ChangeImage(this.fileList)
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
}) })
...@@ -1933,7 +1934,6 @@ ...@@ -1933,7 +1934,6 @@
}, },
//删除图片 //删除图片
handleRemove(file) { handleRemove(file) {
// console.log(file, "file");
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", { this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -1941,13 +1941,10 @@ ...@@ -1941,13 +1941,10 @@
}) })
.then(() => { .then(() => {
let getfile = file.url; let getfile = file.url;
// console.log(savefile.match(/^(?:[^\/]|\/\/)*/),'222222');//获取域名
let str = getfile.split( let str = getfile.split(
"https://yingdi-achievement.oss-cn-beijing.aliyuncs.com/" "https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/"
); //https://yingdi-achievement.oss-cn-beijing.aliyuncs.com/进行分割, ); //https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/进行分割,
// console.log(str, "str"); let savefile = str[1].split('?')[0];
let savefile = str[1];
// console.log(savefile, "savefile");
delPic({object: savefile}).then((res) => { delPic({object: savefile}).then((res) => {
// console.log(res, "delpic"); // console.log(res, "delpic");
if (res.data.code != 200) { if (res.data.code != 200) {
...@@ -1965,6 +1962,7 @@ ...@@ -1965,6 +1962,7 @@
); );
} }
}); });
this.ChangeImage(this.fileList)
this.$message.success(res.data.msg); this.$message.success(res.data.msg);
}); });
}) })
......
...@@ -664,10 +664,10 @@ ...@@ -664,10 +664,10 @@
let getfile = file.url_open; let getfile = file.url_open;
// console.log(savefile.match(/^(?:[^\/]|\/\/)*/),'222222');//获取域名 // console.log(savefile.match(/^(?:[^\/]|\/\/)*/),'222222');//获取域名
let str = getfile.split( let str = getfile.split(
"https://campiste.oss-cn-beijing.aliyuncs.com/" "https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/"
); //https://yingdi-achievement.oss-cn-beijing.aliyuncs.com/进行分割, ); //https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/进行分割,
console.log(str, "str"); console.log(str, "str");
let savefile = str[1]; let savefile = str[1].split('?')[0];
let stu_work_num = this.work_nums; let stu_work_num = this.work_nums;
delPic({object: savefile, teacher_id: stu_work_num}).then((res) => { delPic({object: savefile, teacher_id: stu_work_num}).then((res) => {
// console.log(res, "delpic"); // console.log(res, "delpic");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment