Commit 89b26c9c authored by 杨梦雪's avatar 杨梦雪

11

parent 0c2a5775
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "a/scss/common"; @import "a/scss/common";
.footer { .footer {
margin-top: 20px;
font-family: PingFang SC; font-family: PingFang SC;
font-size: 14px; font-size: 14px;
height: 169px; height: 169px;
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
恭喜你顺利结业!点击【获取营地证书】确认收货地址,证书将以纸质形式邮寄上门 恭喜你顺利结业!点击【获取营地证书】确认收货地址,证书将以纸质形式邮寄上门
</div> </div>
<div> <div>
<img src="@/assets/img/signUp/offer.png" alt="" /> <img src="@/assets/img/certificate.jpg" alt="" style="width: 25%" />
</div> </div>
<div class="btn"> <div class="btn">
<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>
...@@ -36,12 +36,7 @@ ...@@ -36,12 +36,7 @@
</div> --> </div> -->
</div> </div>
<!-- 确认收货地址对话框 --> <!-- 确认收货地址对话框 -->
<el-dialog <el-dialog title="确认收货地址" :visible.sync="dialogVisible" width="40%">
title="确认收货地址"
:visible.sync="dialogVisible"
width="40%"
@open="getAddress"
>
<el-form ref="addressRef" :model="addressForm" :rules="addressRules"> <el-form ref="addressRef" :model="addressForm" :rules="addressRules">
<el-form-item label="收件人" prop="certificate_name"> <el-form-item label="收件人" prop="certificate_name">
<el-input <el-input
...@@ -166,14 +161,14 @@ export default { ...@@ -166,14 +161,14 @@ export default {
certificate_province: [ certificate_province: [
{ {
required: true, required: true,
message: "请选择所在学校省份!", message: "请选择所在省份!",
trigger: "change", trigger: "change",
}, },
], ],
certificate_city: [ certificate_city: [
{ {
required: true, required: true,
message: "请选择所在学校城市!", message: "请选择所在城市!",
trigger: "change", trigger: "change",
}, },
], ],
...@@ -206,6 +201,9 @@ export default { ...@@ -206,6 +201,9 @@ export default {
}, },
watch: {}, watch: {},
methods: { methods: {
getCertifi() {
this.getAddress();
},
getAddress() { getAddress() {
// console.log(111111) // console.log(111111)
getAddress({}).then((res) => { getAddress({}).then((res) => {
...@@ -213,18 +211,27 @@ export default { ...@@ -213,18 +211,27 @@ 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);
} }
// console.log(Object.keys(res.data.info),'info')
if (Object.keys(res.data.info).length != 0) {
return this.$message.error("已保存地址");
}
this.dialogVisible = true;
this.addressForm.certificate_name = res.data.info.certificate_name; this.addressForm.certificate_name = res.data.info.certificate_name;
this.addressForm.certificate_phone = res.data.info.certificate_phone; this.addressForm.certificate_phone = res.data.info.certificate_phone;
this.addressForm.certificate_province = res.data.info.certificate_province; this.addressForm.certificate_province =
res.data.info.certificate_province;
this.addressForm.certificate_city = res.data.info.certificate_city; this.addressForm.certificate_city = res.data.info.certificate_city;
this.selectCitySchool = this.getCurrentCityLists(this.addressForm.certificate_province); this.selectCitySchool = this.getCurrentCityLists(
this.county = res.data.info.certificate_address.split("-")[0]; this.addressForm.certificate_province
this.certificate_address = res.data.info.certificate_address.split("-")[1]; );
if (res.data.info.certificate_address) {
this.county = res.data.info.certificate_address.split("-")[0];
this.certificate_address =
res.data.info.certificate_address.split("-")[1];
}
}); });
}, },
getCertifi() {
this.dialogVisible = true;
},
// 获取省份城市 // 获取省份城市
getProAndCity() { getProAndCity() {
......
...@@ -15,14 +15,12 @@ ...@@ -15,14 +15,12 @@
<div class="each_content" v-for="item in homeworkList" :key="item.id"> <div class="each_content" v-for="item in homeworkList" :key="item.id">
<div class="top flex"> <div class="top flex">
<div class="homework_name flex"> <div class="homework_name flex">
<div>作业名称:{{ item.work_name }}</div> <div class="work_name">{{ item.work_name }}</div>
<span v-if="item.student_status == 0">未完成</span> <span class="status_0" v-if="item.student_status == 0">未完成</span>
<span v-if="item.student_status == 1">待评分</span> <span class="status_1" v-if="item.student_status == 1">待评分</span>
<span v-if="item.student_status == 2">已评分</span> <span class="status_2" v-if="item.student_status == 2">已评分</span>
</div> </div>
<el-button size="mini" round @click="toRefer(item)" <div class="btn_refer" @click="toRefer(item)">查看作业</div>
>查看作业</el-button
>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="bottom"> <div class="bottom">
...@@ -39,7 +37,8 @@ ...@@ -39,7 +37,8 @@
<el-pagination <el-pagination
layout="prev, pager, next" layout="prev, pager, next"
:page-size="pageSize" :page-size="pageSize"
:total="this.homeworkList.length" :current-page="currentPage"
:total="total"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
> >
...@@ -51,6 +50,7 @@ ...@@ -51,6 +50,7 @@
:work_contexts="work_context" :work_contexts="work_context"
:enclosure_urls="enclosure_url" :enclosure_urls="enclosure_url"
:work_nums="work_num" :work_nums="work_num"
:order_nums="order_num"
:student_status="student_status" :student_status="student_status"
@closeDialog="closeDialog" @closeDialog="closeDialog"
></refer> ></refer>
...@@ -68,13 +68,15 @@ export default { ...@@ -68,13 +68,15 @@ export default {
}, },
data() { data() {
return { return {
pageSize: 1, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0,
homeworkList: {}, homeworkList: {},
dialogVisibleFu: false, dialogVisibleFu: false,
work_context: "", work_context: "",
enclosure_url: "", enclosure_url: "",
work_num: 0, work_num: 0,
order_num: 0,
student_status: 0, student_status: 0,
}; };
}, },
...@@ -95,6 +97,7 @@ export default { ...@@ -95,6 +97,7 @@ export default {
// 子组件触发,关闭确认报名弹框 // 子组件触发,关闭确认报名弹框
closeDialog(val, type) { closeDialog(val, type) {
this.dialogVisibleFu = val; this.dialogVisibleFu = val;
this.getTeacherWork();
}, },
toRefer(item) { toRefer(item) {
//time_out:提交作业时间状态 //time_out:提交作业时间状态
...@@ -103,7 +106,8 @@ export default { ...@@ -103,7 +106,8 @@ export default {
// 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.id;
this.order_num = item.work_num;
this.student_status = item.student_status; this.student_status = item.student_status;
} else if (item.time_out == 2) { } else if (item.time_out == 2) {
return this.$message.error("填写作业时间未开始"); return this.$message.error("填写作业时间未开始");
...@@ -113,12 +117,13 @@ export default { ...@@ -113,12 +117,13 @@ export default {
}, },
getTeacherWork() { getTeacherWork() {
getTeacherWork({ page: this.currentPage }).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);
} }
this.homeworkList = res.data.data; this.homeworkList = res.data.data.list;
this.$message.success(res.data.message); this.total = res.data.data.count;
// this.$message.success(res.data.message);
}); });
}, },
}, },
...@@ -127,11 +132,13 @@ export default { ...@@ -127,11 +132,13 @@ export default {
<style lang="scss" > <style lang="scss" >
@import "a/scss/btn";
.flex { .flex {
display: flex; display: flex;
} }
.homework { .homework {
font-family: PingFangSC-Medium, PingFang SC;
// background: #ffffff; // background: #ffffff;
// width: 856px; // width: 856px;
...@@ -174,34 +181,81 @@ export default { ...@@ -174,34 +181,81 @@ export default {
.each_content { .each_content {
padding: 25px 30px; padding: 25px 30px;
background-color: #eceaea; background-color: #f7f7f7;
margin: 0 30px 20px 30px; margin: 0 30px 20px 30px;
// border-radius: 25px; // border-radius: 25px;
.top { .top {
margin-bottom: 10px; margin-bottom: 10px;
justify-content: space-between; justify-content: space-between;
.homework_name { .homework_name {
div { .work_name {
padding: 7px 20px 7px 0; padding: 7px 20px 7px 0;
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
} }
span { span {
background-color: white; width: 65px;
padding: 7px 15px; line-height: 34px;
border-radius: 45px; text-align: center;
font-size: 10px; border-radius: 10px;
font-size: 12px;
font-weight: 500;
}
.status_0 {
background: #ffebf9;
color: #60194a;
}
.status_1 {
background: #fff0e5;
color: #ff6f00;
}
.status_2 {
background: #e4fff9;
color: #0a9071;
} }
} }
.btn_refer {
width: 88px;
background: #60194a;
border-radius: 4px;
opacity: 0.9;
font-size: 14px;
text-align: center;
font-weight: 400;
color: #ffffff;
line-height: 33px;
cursor: pointer;
}
} }
.line { .line {
border-bottom: 1px solid; border-bottom: 1px solid #d8d8d8;
} }
.bottom { .bottom {
//+ 相邻选择器 //+ 相邻选择器
// p+div{ // p+div{
// font-size: 20px; // font-size: 20px;
// } // }
:first-child {
margin-bottom: 10px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.time > div { .time > div {
margin-right: 20px; margin-right: 20px;
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 12px;
} }
} }
} }
......
This diff is collapsed.
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