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

11

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