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

bug

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