Commit fdf90221 authored by 杨梦雪's avatar 杨梦雪

11

parent 4752b62b
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div class="qrcode" ref="qrCodeUrl"></div> <div class="qrcode" ref="qrCodeUrl"></div>
</div> </div>
<div>请使用<span>微信</span>扫一扫,扫描二维码支付</div> <div>请使用<span>微信</span>扫一扫,扫描二维码支付</div>
<div>手机完成支付后,请等待系统处理,在此之前请勿关闭窗口</div> <div>付款码为动态码,仅支持通过本页面进行扫描付款操作,不支持另存图片后扫描支付。</div>
</div> </div>
<div v-if="!isShowqr"> <div v-if="!isShowqr">
<div class="info_2" style="color: #000; font-size: 18px"> <div class="info_2" style="color: #000; font-size: 18px">
......
...@@ -24,6 +24,15 @@ export function PostWorkStudentOss(data) { ...@@ -24,6 +24,15 @@ export function PostWorkStudentOss(data) {
data data
}) })
} }
//下载
export function downloadTeacherWork(data) {
data['identity'] = store.state.indexIdentity;
return request({
method: 'post',
url: 'web/download/downloadTeacherWork',
params: data
})
}
//删除图片 //删除图片
export function delPic(data) { export function delPic(data) {
data['identity'] = store.state.indexIdentity; data['identity'] = store.state.indexIdentity;
......
...@@ -32,6 +32,7 @@ instance.interceptors.request.use( ...@@ -32,6 +32,7 @@ instance.interceptors.request.use(
if (config.method === "post" && !config.notQs) { if (config.method === "post" && !config.notQs) {
console.log(config) console.log(config)
config.data = qs.stringify(config.data); config.data = qs.stringify(config.data);
// config.data = config.data;
} }
if (config.url.indexOf(SERVER_URL) === -1) { if (config.url.indexOf(SERVER_URL) === -1) {
// console.log("upload"); // console.log("upload");
......
export function tansParams(params) { export function tansParams(params) {
let result = '' // let result = ''
Object.keys(params).forEach((key) => { let result = params
if (!Object.is(params[key], undefined) && !Object.is(params[key], null) && !Object.is(JSON.stringify(params[key]), '{}')) { // Object.keys(params).forEach((key) => {
result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + '&' // if (!Object.is(params, undefined) && !Object.is(params, null) && !Object.is(JSON.stringify(params), '{}')) {
} // result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + '&'
}) // }
// })
return result return result
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
}" }"
>首页</el-breadcrumb-item >首页</el-breadcrumb-item
> >
<el-breadcrumb-item>活动管理</el-breadcrumb-item> <el-breadcrumb-item>个人信息</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
</el-header> </el-header>
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
watch: {}, watch: {},
created() { created() {
// this.ToSignUp(this.index); // this.ToSignUp(this.index);
this.ToSignUp(); this.ToSignUp(this.index);
// this.$refs.child.signUpInit(); // this.$refs.child.signUpInit();
}, },
mounted() { mounted() {
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
console.log(index, "index"); console.log(index, "index");
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
this.campindex_type = index; this.campindex_type = index;
console.log(this.$route);
// if (this.campindex_type == 0) { // if (this.campindex_type == 0) {
// this.$router.push("Info/personalInfo?code=" + code); // this.$router.push("Info/personalInfo?code=" + code);
// } else // } else
...@@ -187,8 +187,8 @@ export default { ...@@ -187,8 +187,8 @@ export default {
.bg-top { .bg-top {
height: 24px; height: 24px;
background-color: #f8f8f8; background-color: #f8f8f8;
padding: 20px 0 5px 0; padding: 30px 0 0 0;
padding-left: 120px; padding-left: 50px;
} }
} }
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
// height: calc(100% - 100px); // height: calc(100% - 100px);
// } // }
.index-container { .index-container {
padding: 150px 0 70px 0; padding: 130px 0 70px 0;
display: flex; display: flex;
flex-flow: row; flex-flow: row;
......
...@@ -619,10 +619,14 @@ export default { ...@@ -619,10 +619,14 @@ export default {
this.selectCitySchool = this.getCurrentCityLists( this.selectCitySchool = this.getCurrentCityLists(
this.addressForm.certificate_province this.addressForm.certificate_province
); );
if ( res.data.info.certificate_address) {
this.county = res.data.info.certificate_address.split("-")[0]; this.county = res.data.info.certificate_address.split("-")[0];
this.certificate_address = this.certificate_address =
res.data.info.certificate_address.split("-")[1]; res.data.info.certificate_address.split("-")[1];
// console.log(res.data.info.certificate_address.split("-")) // console.log(res.data.info.certificate_address.split("-"))
}
}); });
}, },
//获取近10年的年份 //获取近10年的年份
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<el-button @click="getCertifi">获得营地证书</el-button> <el-button @click="getCertifi">获得营地证书</el-button>
</div> </div>
</div> </div>
<!--
<div class="pay_bottom"> <div class="pay_bottom">
<div>注意事项:</div> <div>注意事项:</div>
<div> <div>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div> <div>
2、支付确认后,将不能再修改姓名和身份证号,请在支付前核对信息。 2、支付确认后,将不能再修改姓名和身份证号,请在支付前核对信息。
</div> </div>
</div> </div> -->
</div> </div>
<!-- 确认收货地址对话框 --> <!-- 确认收货地址对话框 -->
<el-dialog <el-dialog
......
...@@ -29,14 +29,21 @@ ...@@ -29,14 +29,21 @@
<div v-html="item.work_context">></div> <div v-html="item.work_context">></div>
<div class="time flex"> <div class="time flex">
<div>发布时间:{{ item.create_time }}</div> <div>发布时间:{{ item.start_time }}</div>
<div>截止日期:{{ item.end_time }}</div> <div>截止日期:{{ item.end_time }}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div> <div class="pagination">
<el-pagination layout="prev, pager, next" :total="50"> </el-pagination> <el-pagination
layout="prev, pager, next"
:page-size="pageSize"
:total="this.homeworkList.length"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination>
</div> </div>
<!-- 下载作业 --> <!-- 下载作业 -->
<refer <refer
...@@ -61,6 +68,8 @@ export default { ...@@ -61,6 +68,8 @@ export default {
}, },
data() { data() {
return { return {
pageSize: 1,
currentPage: 1,
homeworkList: {}, homeworkList: {},
dialogVisibleFu: false, dialogVisibleFu: false,
work_context: "", work_context: "",
...@@ -74,23 +83,36 @@ export default { ...@@ -74,23 +83,36 @@ export default {
}, },
watch: {}, watch: {},
methods: { methods: {
handleSizeChange(val) {
this.pageSize = val;
// console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
this.currentPage = val;
// console.log(`当前页: ${val}`);
this.getTeacherWork();
},
// 子组件触发,关闭确认报名弹框 // 子组件触发,关闭确认报名弹框
closeDialog(val, type) { closeDialog(val, type) {
this.dialogVisibleFu = val; this.dialogVisibleFu = val;
// if (type) {
// clearInterval(this.timer);
// }
}, },
toRefer(item) { toRefer(item) {
//time_out:提交作业时间状态
if (item.time_out == 1) {
this.dialogVisibleFu = true; this.dialogVisibleFu = true;
// console.log(item.work_num,'val') // console.log(item.work_num,'val')
this.work_context = item.work_context; this.work_context = item.work_context;
this.enclosure_url = item.enclosure_url; this.enclosure_url = item.enclosure_url;
this.work_num = item.work_num; this.work_num = item.work_num;
this.student_status = item.student_status; this.student_status = item.student_status;
} else if (item.time_out == 2) {
return this.$message.error("填写作业时间未开始");
} else if (item.time_out == 3) {
return this.$message.error("填写作业时间已截止");
}
}, },
getTeacherWork() { getTeacherWork() {
getTeacherWork({ page: 1 }).then((res) => { getTeacherWork({ page: this.currentPage }).then((res) => {
console.log(res, "getTeacherWork"); console.log(res, "getTeacherWork");
if (res.data.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
...@@ -147,7 +169,7 @@ export default { ...@@ -147,7 +169,7 @@ export default {
} }
.home_content { .home_content {
padding-bottom: 200px; padding-bottom: 20px;
font-size: 13px; font-size: 13px;
.each_content { .each_content {
...@@ -184,6 +206,10 @@ export default { ...@@ -184,6 +206,10 @@ export default {
} }
} }
} }
.pagination {
position: relative;
float: right;
}
} }
</style> </style>
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
v-loading="loading" v-loading="loading"
ref="formRef" ref="formRef"
:model="formData" :model="formData"
:rules="referRules"
label-position="top" label-position="top"
class="readForm" class="readForm"
> >
...@@ -27,8 +28,8 @@ ...@@ -27,8 +28,8 @@
<div v-html="this.work_contexts" class="cont_info">}</div> <div v-html="this.work_contexts" class="cont_info">}</div>
<div class="cont_title_2">相关附件</div> <div class="cont_title_2">相关附件</div>
<div class="upload_box"> <div class="upload_box">
<div v-if="teaFileList.length > 0">
<div <div
v-if="teaFileList.length > 0"
class="img_list" class="img_list"
v-for="(item, index) in teaFileList" v-for="(item, index) in teaFileList"
:key="index" :key="index"
...@@ -41,6 +42,8 @@ ...@@ -41,6 +42,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div v-if="teaFileList.length <= 0" class="img_list"> <div v-if="teaFileList.length <= 0" class="img_list">
<div> <div>
<div class="item_name">暂无相关附件</div> <div class="item_name">暂无相关附件</div>
...@@ -49,12 +52,13 @@ ...@@ -49,12 +52,13 @@
<div style="clear: both"></div> <div style="clear: both"></div>
</div> </div>
<!-- 我的作业 --> <!-- 我的作业(未提交) -->
<div v-if="this.student_status == 0 || this.student_status == 1"> <div v-if="this.student_status == 0">
<div class="cont_title"> <div class="cont_title">
<div class="line"></div> <div class="line"></div>
我的作业 我的作业
</div> </div>
<el-form-item <el-form-item
label="文字描述(如超过300字,建议以附件形式上传)" label="文字描述(如超过300字,建议以附件形式上传)"
prop="stu_answer" prop="stu_answer"
...@@ -68,7 +72,7 @@ ...@@ -68,7 +72,7 @@
show-word-limit show-word-limit
/> />
</el-form-item> </el-form-item>
<el-form-item label="相关附件" prop="teacherUrl"> <el-form-item label="相关附件" prop="studentUrl">
<div class="fj_info">1、请上传1-10份相关附件;</div> <div class="fj_info">1、请上传1-10份相关附件;</div>
<div class="fj_info"> <div class="fj_info">
2、单个附件大小不超过100M,支持JPG、JPEG、PNG、docx、doc、pdf、mp4等格式; 2、单个附件大小不超过100M,支持JPG、JPEG、PNG、docx、doc、pdf、mp4等格式;
...@@ -76,7 +80,7 @@ ...@@ -76,7 +80,7 @@
<div class="upload_box"> <div class="upload_box">
<div <div
class="img_list" class="img_list"
v-for="(item, index) in stuFileList" v-for="(item, index) in fileList"
:key="index" :key="index"
> >
<div> <div>
...@@ -89,11 +93,11 @@ ...@@ -89,11 +93,11 @@
</div> </div>
<el-upload <el-upload
v-if="stuFileList.length < 10" v-if="fileList.length < 10"
ref="systemLogo" ref="systemLogo"
name="multipartFile" name="multipartFile"
action="#" action="#"
:file-list="stuFileList" :file-list="fileList"
:disabled="isUploading || fileList.length >= 10" :disabled="isUploading || fileList.length >= 10"
:limit="10" :limit="10"
list-type="picture-card" list-type="picture-card"
...@@ -115,8 +119,80 @@ ...@@ -115,8 +119,80 @@
</div> </div>
</el-form-item> </el-form-item>
</div> </div>
<!-- 我的作业(已提交待评分 -不可编辑 )-->
<div v-if="this.student_status == 1">
<div class="cont_title">
<div class="line"></div>
我的作业
</div>
<el-form-item
label="文字描述(如超过300字,建议以附件形式上传)"
v-show="formData.stu_answer"
>
<el-input
type="textarea"
v-model="formData.stu_answer"
placeholder="请输入300字以内的描述"
size="small"
:maxlength="300"
show-word-limit
:disabled="true"
/>
</el-form-item>
<el-form-item
label="相关附件"
prop="teacherUrl"
v-show="!stu_fileList === []"
>
<div class="fj_info">1、请上传1-10份相关附件;</div>
<div class="fj_info">
2、单个附件大小不超过100M,支持JPG、JPEG、PNG、docx、doc、pdf、mp4等格式;
</div>
<div class="upload_box">
<div
class="img_list"
v-for="(item, index) in stu_fileList"
:key="index"
>
<div>
<el-image :src="fileImg"></el-image>
<div class="item_name">{{ item.name }}</div>
<!-- <div class="item_remove" @click="handleRemove(item)">
删除
</div> -->
</div>
</div>
<!-- <el-upload
v-if="stu_fileList.length < 10"
ref="systemLogo"
name="multipartFile"
action="#"
:file-list="stu_fileList"
:disabled="isUploading || fileList.length >= 10"
:limit="10"
list-type="picture-card"
:show-file-list="false"
:before-upload="beforeAvatarUpload"
:on-progress="handleUploadProgress"
:on-success="uploadSuccess"
:http-request="uploadPicture"
>
<i
v-if="!upLoading"
class="el-icon-plus avatar-uploader-icon"
></i>
<i
v-if="upLoading"
class="el-icon-loading avatar-uploader-icon"
></i>
</el-upload> -->
</div>
</el-form-item>
</div>
<!-- 评阅结果 --> <!-- 评阅结果 -->
<div v-if="this.student_status == 2" style="height:350px"> <div v-if="this.student_status == 2" style="height: 350px">
<div class="cont_title"> <div class="cont_title">
<div class="line"></div> <div class="line"></div>
<div class="lf"> <div class="lf">
...@@ -125,12 +201,12 @@ ...@@ -125,12 +201,12 @@
</div> </div>
<div class="cont_title_2">导师评分</div> <div class="cont_title_2">导师评分</div>
<div class="cont_info">{{ score }}</div> <div class="cont_info">{{ score }}</div>
<div class="cont_title_2">作业内容</div> <div class="cont_title_2">导师评语</div>
<div v-html="this.teacher_commment" class="cont_info">}</div> <div v-html="this.teacher_commment" class="cont_info">}</div>
<div class="cont_title_2">相关附件</div> <div class="cont_title_2">相关附件</div>
<div class="upload_box"> <div class="upload_box">
<div v-if="tea_scoreFileList.length > 0">
<div <div
v-if="tea_scoreFileList.length > 0"
class="img_list" class="img_list"
v-for="(item, index) in tea_scoreFileList" v-for="(item, index) in tea_scoreFileList"
:key="index" :key="index"
...@@ -143,6 +219,8 @@ ...@@ -143,6 +219,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div v-if="tea_scoreFileList.length <= 0" class="img_list"> <div v-if="tea_scoreFileList.length <= 0" class="img_list">
<div> <div>
<div class="item_name">暂无相关附件</div> <div class="item_name">暂无相关附件</div>
...@@ -152,7 +230,7 @@ ...@@ -152,7 +230,7 @@
</div> </div>
<el-form-item class="btn" v-if="this.student_status == 0"> <el-form-item class="btn" v-if="this.student_status == 0">
<el-button type="primary" @click="confirm">保存</el-button> <el-button type="primary" @click="confirm">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -166,6 +244,7 @@ import { ...@@ -166,6 +244,7 @@ import {
delPic, delPic,
getStudentWork, getStudentWork,
subStudentWork, subStudentWork,
downloadTeacherWork,
} from "r/index/homework"; } from "r/index/homework";
import fileImg from "@/assets/img/homework/file_img.png"; import fileImg from "@/assets/img/homework/file_img.png";
...@@ -179,7 +258,24 @@ export default { ...@@ -179,7 +258,24 @@ export default {
student_status: [Number], //作业状态 student_status: [Number], //作业状态
}, },
data() { data() {
var validateNum = (rule, value, callback) => {
if (!this.formData.stu_answer && !this.formData.stu_enclosure_url) {
callback(new Error("请至少填写一项"));
} else {
callback();
}
};
return { return {
referRules: {
stu_answer: [
{ required: true, validator: validateNum, trigger: "blur" },
],
studentUrl: [
{ required: true, validator: validateNum, trigger: "blur" },
],
},
titleName: "", titleName: "",
isUploading: false, // 图片上传蒙层 isUploading: false, // 图片上传蒙层
work_context: "", //简介 work_context: "", //简介
...@@ -188,35 +284,36 @@ export default { ...@@ -188,35 +284,36 @@ export default {
dialogVisible: this.dialogVisibleFu, dialogVisible: this.dialogVisibleFu,
dialogVisibleimage: false, dialogVisibleimage: false,
stuWork: {}, // 学生-作业 stuWork: {}, // 学生-作业
stuFileList: [], // 学生-相关附件
teaFileList: [], // 老师-相关附件
formData: { formData: {
stu_work_num: "", stu_work_num: "",
stu_answer: "", stu_answer: "",
stu_enclosure_url: "", stu_enclosure_url: "",
}, // 老师-评阅结果 }, // 老师-评阅结果
upLoading: false, // 老师-上传loading upLoading: false, // 老师-上传loading
fileList: [],
stu_fileList: "",
disabled: false, //限制输入框 disabled: false, //限制输入框
stu_fileListoss: [], // 学生-上传相关附件(展示-存在缓存)
teaFileList: [], // 老师-布置作业附件
fileList: [], //学生上传的作业文件
stu_fileList: [], //学生上传的文件(传给接口的格式)
score: false, //老师评分 score: false, //老师评分
teacher_commment: false, //老师评语 teacher_commment: false, //老师评语
tea_scoreFileList: [], tea_scoreFileList: [], //老师评语的附件
}; };
}, },
created() { created() {
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
let studentFile = window.localStorage.getItem( let stu_fileListoss = window.localStorage.getItem(
"student_file_" + window.localStorage.getItem("phone" + code) + code "student_file_" + window.localStorage.getItem("phone" + code) + code
); );
if (studentFile && JSON.parse(studentFile).length > 0) { if (stu_fileListoss && JSON.parse(stu_fileListoss).length > 0) {
this.stuFileList = JSON.parse(studentFile); this.stu_fileListoss = JSON.parse(stu_fileListoss);
} }
}, },
methods: { methods: {
open() { open() {
this.titleName = this.work_nums; this.titleName = this.work_nums;
console.log(this.student_status); // console.log(this.student_status);
this.getTeachList(); this.getTeachList();
if (this.student_status == 0) { if (this.student_status == 0) {
} else if (this.student_status == 1) { } else if (this.student_status == 1) {
...@@ -234,44 +331,44 @@ export default { ...@@ -234,44 +331,44 @@ export default {
arr.forEach((item) => { arr.forEach((item) => {
this.teaFileList.push({ this.teaFileList.push({
url: item, url: item,
name: item.split("/work/")[1], name: item.split("work/")[1],
status: "success", status: "success",
}); });
}); });
} else { } else {
this.stuFileList = []; this.stu_fileList = [];
} }
}, },
// 下载老师附件 // 下载老师附件
downloadStuFile(url) { downloadStuFile(url) {
this.download( // this.download(
"http://api.campcenter.cn/web/download/downloadTeacherWork", // "http://api.campcenter.cn/web/download/downloadTeacherWork",
{ // {
enclosure_url: url, // enclosure_url: url,
identity: this.$store.state.indexIdentity, // identity: this.$store.state.indexIdentity
}, // },
"" // ""
); // );
// downloadTeacherWork({ enclosure_url:url }).then((res) => { downloadTeacherWork({ enclosure_url: url }).then((res) => {
// console.log(res, "res"); console.log(res, "res");
// if (res.code != 200) { if (res.data.code != 200) {
// return this.$message.error(res.data.message); return this.$message.error(res.data.message);
// } }
// this.$message.success(res.data.message); this.$message.success("下载成功");
// }); window.location.href = res.data.url;
// window.location.href = url; });
}, },
// 下载老师评分结果 // 下载老师评分结果
downloadScoreFile(url) { downloadScoreFile(url) {
this.download( downloadTeacherWork({ enclosure_url: url }).then((res) => {
"http://api.campcenter.cn/web/download/downloadTeacherWork", console.log(res, "res");
{ if (res.data.code != 200) {
enclosure_url: url, return this.$message.error(res.data.message);
identity: this.$store.state.indexIdentity, }
}, this.$message.success("下载成功");
"" window.location.href = res.data.url;
); });
}, },
// 学生作业回显 // 学生作业回显
getStudentWork() { getStudentWork() {
...@@ -285,7 +382,7 @@ export default { ...@@ -285,7 +382,7 @@ export default {
// console.log(res.data.stu_answer); // console.log(res.data.stu_answer);
this.formData.stu_answer = res.data.data.stu_answer; this.formData.stu_answer = res.data.data.stu_answer;
let gotfileList = res.data.data.stu_enclosure_url_arr; let gotfileList = res.data.data.stu_enclosure_url_arr;
this.stuFileList = gotfileList.map((item) => { this.stu_fileList = gotfileList.map((item) => {
return { return {
name: item.split("/work/")[1], name: item.split("/work/")[1],
url: item, url: item,
...@@ -304,20 +401,6 @@ export default { ...@@ -304,20 +401,6 @@ export default {
}); });
}); });
}, },
// 保存按钮
confirm() {
this.$refs["formRef"].validate((valid) => {
if (!valid) return;
if (this.student_status == 0) {
// 未完成
this.notReadHandle();
} else if (this.student_status == 1) {
console.log(11111);
// 已完成
this.yiReadHandle();
}
});
},
// 未完成 // 未完成
notReadHandle() { notReadHandle() {
...@@ -358,18 +441,28 @@ export default { ...@@ -358,18 +441,28 @@ export default {
}, },
// 成功确认取消,关闭弹框,修改父组件的值 // 成功确认取消,关闭弹框,修改父组件的值
cancelBtnTrue() { cancelBtnTrue() {
let code = this.$store.state.indexIdentity;
window.localStorage.removeItem(
"student_file_" + window.localStorage.getItem("phone" + code) + code
);
this.stuWork = {}; this.stuWork = {};
this.stuFileList = []; this.stu_fileList = [];
this.teaFileList = []; this.stu_fileListoss = [];
// this.teaFileList = [];
this.$refs["formRef"].resetFields(); this.$refs["formRef"].resetFields();
this.dialogVisible = false; this.dialogVisible = false;
this.$emit("closeDialog", this.dialogVisible, true); this.$emit("closeDialog", this.dialogVisible, true);
}, },
// 取消,关闭弹框,修改父组件的值 // 取消,关闭弹框,修改父组件的值
cancelBtn() { cancelBtn() {
let code = this.$store.state.indexIdentity;
window.localStorage.removeItem(
"student_file_" + window.localStorage.getItem("phone" + code) + code
);
this.stuWork = {}; this.stuWork = {};
this.stuFileList = []; this.stu_fileList = [];
this.teaFileList = []; this.stu_fileListoss = [];
// this.teaFileList = [];
this.dialogVisible = false; this.dialogVisible = false;
this.$emit("closeDialog", this.dialogVisible, false); this.$emit("closeDialog", this.dialogVisible, false);
}, },
...@@ -391,7 +484,7 @@ export default { ...@@ -391,7 +484,7 @@ export default {
handleUploadProgress(event, file, fileList) { handleUploadProgress(event, file, fileList) {
// console.log(fileList); // console.log(fileList);
this.isUploading = true; this.isUploading = true;
if (this.stuFileList.lenge < 10) { if (this.stu_fileList.lenge < 10) {
return this.$message.info("chaochushuliamng"); return this.$message.info("chaochushuliamng");
} }
}, },
...@@ -400,7 +493,7 @@ export default { ...@@ -400,7 +493,7 @@ export default {
console.log(file, "file"); console.log(file, "file");
// console.log(fileList, "fileList"); // console.log(fileList, "fileList");
this.referForm.achievementPath = res; this.referForm.achievementPath = res;
this.stuFileList = { this.stu_fileList = {
name: file.name, name: file.name,
url: res, url: res,
}; };
...@@ -465,23 +558,23 @@ export default { ...@@ -465,23 +558,23 @@ export default {
this.fileList.push(obj); this.fileList.push(obj);
console.log(this.fileList); console.log(this.fileList);
// let stu_obj={ // let stu_obj = {
// url: ress.data.picture_path, // url: ress.data.picture_path,
// } // };
// this.stu_fileList.push(stu_obj); // this.stu_fileList.push(stu_obj);
// let arrNew = []; // let arrNew = [];
this.stu_fileList = this.fileList this.stu_fileListoss = this.fileList
.map((item) => { .map((item) => {
return item.url; return item.url;
}) })
.join(","); .join(",");
console.log(this.stu_fileList); console.log(this.stu_fileListoss);
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
window.localStorage.setItem( window.localStorage.setItem(
"student_file_" + "student_file_" +
+window.localStorage.getItem("phone" + code) + +window.localStorage.getItem("phone" + code) +
code, code,
JSON.stringify(this.fileList) JSON.stringify(this.stu_fileListoss)
); );
}) })
.catch((err) => { .catch((err) => {
...@@ -524,16 +617,17 @@ export default { ...@@ -524,16 +617,17 @@ export default {
if (res.data.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
this.stuFileList.forEach((item, idx) => { console.log(this.fileList);
this.fileList.forEach((item, idx) => {
// console.log(item.url == file.url); // console.log(item.url == file.url);
if (item.url == file.url) { if (item.url == file.url) {
this.stuFileList.splice(idx, 1); this.fileList.splice(idx, 1);
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
window.localStorage.setItem( window.localStorage.setItem(
"student_file_" + "student_file_" +
window.localStorage.getItem("phone" + code) + window.localStorage.getItem("phone" + code) +
code, code,
JSON.stringify(this.stuFileList) JSON.stringify(this.stu_fileListoss)
); );
} }
}); });
...@@ -551,6 +645,20 @@ export default { ...@@ -551,6 +645,20 @@ export default {
}); });
}); });
}, },
// 提交按钮
confirm() {
this.$refs["formRef"].validate((valid) => {
if (!valid) return;
if (this.student_status == 0) {
// 未完成
this.notReadHandle();
} else if (this.student_status == 1) {
console.log(11111);
// 已完成
this.yiReadHandle();
}
});
},
}, },
watch: { watch: {
......
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