Commit 7d40fb50 authored by ‘yangmengxue’'s avatar ‘yangmengxue’

个人信息-上传相关资料

parent e07c8350
File added
......@@ -223,5 +223,13 @@
color: #a7a2a6;
line-height: 24px;
}
.uploadIs {
::v-deep .el-form-item__label:before {
content: '*';
color: #F56C6C;
margin-right: 4px;
}
}
}
}
......@@ -902,10 +902,7 @@
</div>
<!-- 成绩证明资料 -->
<div v-show="configJson.achievementPath == 1">
<el-form-item
label="上传成绩证明资料"
style="height: 100%"
>
<el-form-item label="上传成绩证明资料" style="height: 100%">
<div class="image_add">
<div class="image_in">
<el-upload
......@@ -966,9 +963,10 @@
</div>
<!-- 学生成绩单 -->
<div v-show="configJson.transcripts == 1">
<div class="uploadIs" v-show="configJson.transcripts == 1">
<el-form-item
label="上传学生成绩单"
class="uploadIs"
style="height: 100%"
>
<div class="image_add">
......@@ -1031,10 +1029,7 @@
</div>
<!-- 获奖证书 -->
<div v-show="configJson.achievementCertificate == 1">
<el-form-item
label="上传获奖证书"
style="height: 100%"
>
<el-form-item label="上传获奖证书" style="height: 100%">
<div class="image_add">
<div class="image_in">
<el-upload
......@@ -1046,7 +1041,7 @@
list-type="picture-card"
name="multipartFile"
ref="imgUrl2"
:disabled="isUploading || fileList1.length >= 10"
:disabled="isUploading || fileList2.length >= 10"
:file-list="fileList2"
:http-request="(params) => uploadPicture(params, 2)"
:on-success="(res, file) => uploadSuccess(res, file, 2)"
......@@ -1094,11 +1089,8 @@
</el-form-item>
</div>
<!-- 安全告知书 -->
<div v-show="configJson.safetyNotices == 1">
<el-form-item
label="上传安全告知书"
style="height: 100%"
>
<div class="uploadIs" v-show="configJson.safetyNotices == 1">
<el-form-item label="上传安全告知书" style="height: 100%">
<div class="image_add">
<div class="image_in">
<el-upload
......@@ -2062,8 +2054,17 @@ export default {
};
this.getCosConfigs(image, params.file, type);
},
ChangeImage(fileList) {
this.hideUpload = fileList.length >= 10;
ChangeImage(fileList, type) {
if (type == 1) {
this.hideUpload1 = fileList.length >= 10;
} else if (type == 2) {
this.hideUpload2 = fileList.length >= 10;
} else if (type == 3) {
this.hideUpload3 = fileList.length >= 10;
} else {
// 4
this.hideUpload4 = fileList.length >= 10;
}
},
// cos上传
async getCosConfigs(image, file, type) {
......@@ -2089,7 +2090,7 @@ export default {
});
},
});
console.log(resData);
// console.log(resData);
cos.putObject(
{
Bucket: resData.credentials.bucket,
......@@ -2105,7 +2106,7 @@ export default {
if (err) {
console.log(err);
this.loading = false;
this.$message.error("上传失败!");
this.$message.error(res.data.msg);
} else {
console.log(data);
this.signUploadSuccess(
......@@ -2131,7 +2132,7 @@ export default {
.then((res) => {
if (res.data.code != 200) {
this.loading = false;
return this.$message.error("上传失败!");
return this.$message.error(res.data.msg);
}
this.loading = false;
this.$message.success("上传成功!");
......@@ -2164,7 +2165,7 @@ export default {
code,
JSON.stringify(filelist)
);
this.ChangeImage(filelist);
this.ChangeImage(filelist, type);
})
.catch((err) => {
this.loading = false;
......@@ -2241,7 +2242,7 @@ export default {
"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) => {
delPic({ object: savefile, type: type }).then((res) => {
// console.log(res, "delpic");
if (res.data.code != 200) {
return this.$message.error(res.data.msg);
......@@ -2275,7 +2276,7 @@ export default {
);
}
});
this.ChangeImage(filelist);
this.ChangeImage(filelist, type);
this.$message.success(res.data.msg);
});
})
......@@ -2418,6 +2419,29 @@ export default {
if (_this.configJson.code == 1) {
obj.code = _this.referForm.code;
}
// 相关资料图片上传
// if (_this.configJson.achievementPath == 1) {
// console.log(_this.fileList4.length)
// if (_this.fileList4.length == 0) {
// return _this.$message.error('请上传成绩证明资料!')
// }
// }
if (_this.configJson.transcripts == 1) {
if (_this.fileList1.length == 0) {
return _this.$message.error("请上传学生成绩单!");
}
}
// if (_this.configJson.achievementCertificate == 1) {
// if (_this.fileList2.length == 0) {
// return _this.$message.error('请上传获奖证书!')
// }
// }
if (_this.configJson.safetyNotices == 1) {
if (_this.fileList3.length == 0) {
return _this.$message.error("请上传安全告知书!");
}
}
// console.log(obj);
setAccount(obj).then((res) => {
console.log(res);
......
// 测试
// export const SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; //开发环境
// export const SERVER_WS_URL = "wss://tgwapi.campcenter.cn"; // websocket
export const SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; //开发环境
export const SERVER_WS_URL = "wss://tgwapi.campcenter.cn"; // websocket
// 正式
// export const SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; // 正式环境
......@@ -9,6 +9,6 @@
// export const SERVER_WS_URL = "wss://gwapi.campcenter.cn"; // websocket
// 测试
export const SERVER_URL = "http://192.168.1.146:8088/modules-campsite"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "http://192.168.1.146:8088/modules-campsite"; //开发环境
export const SERVER_WS_URL = "wss://192.168.1.146:8088"; // websocket
// export const SERVER_URL = "http://192.168.1.146:8088/modules-campsite"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "http://192.168.1.146:8088/modules-campsite"; //开发环境
// export const SERVER_WS_URL = "wss://192.168.1.146:8088"; // websocket
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