Commit 6a22c474 authored by 杨梦雪's avatar 杨梦雪

11

parent 0141615f
......@@ -14,15 +14,7 @@ export function getTeacherWork(data) {
params: data
})
}
// 下载老师作业
export function downloadTeacherWork(data) {
data['identity'] = store.state.indexIdentity;
return request({
method: 'get',
url: '/web/download/downloadTeacherWork',
params: data
})
}
// 获取学生上传作业的oss
export function PostWorkStudentOss(data) {
data['identity'] = store.state.indexIdentity;
......@@ -38,7 +30,7 @@ export function delPic(data) {
return request({
method: 'post',
url: '/web/download/delPic',
params:data
params: data
})
}
......
......@@ -5,21 +5,21 @@ import {
import store from '@/store'
// 获取学生提交的营地作业
export function getStudentWork(data) {
// 获取资料(个人信息)
export function getAccountInfo(data) {
data['identity'] = store.state.indexIdentity;
return request({
method: 'post',
url: '/web/download/getStudentWork ',
url: '/web/signUp/getAccountInfo',
data
})
}
// 提交营地作业
export function subStudentWork(data) {
// 保存个人资料
export function setAccountInfo(data) {
data['identity'] = store.state.indexIdentity;
return request({
method: 'post',
url: '/web/download/subStudentWork ',
url: '/web/signUp/setAccountInfo',
data
})
}
......@@ -5,7 +5,12 @@
<!-- <div class="bg-top"></div> -->
<div class="bg-top">
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item
:to="{
path: '/signUp/examInfo?code=' + $store.state.indexIdentity,
}"
>首页</el-breadcrumb-item
>
<el-breadcrumb-item>活动管理</el-breadcrumb-item>
</el-breadcrumb>
</div>
......@@ -101,12 +106,11 @@ export default {
window.removeEventListener("resize", this.onResize, true);
},
methods: {
ToSignUp(index) {
console.log(index, "index");
let code = this.$store.state.indexIdentity;
this.campindex_type = index;
console.log(this.$route)
console.log(this.$route);
// if (this.campindex_type == 0) {
// this.$router.push("Info/personalInfo?code=" + code);
// } else
......
......@@ -7,6 +7,7 @@
class="checkForm"
:rules="referInfoRules"
>
<!-- 个人信息 -->
<div class="cont_title">个人信息</div>
<el-row :gutter="20">
<el-col :span="12">
......@@ -210,34 +211,40 @@
</el-form-item>
</el-col>
</el-row>
<!-- 收件信息 (不可编辑) -->
<div class="cont_title">收件信息</div>
<el-form :model="addressForm" >
<el-form-item label="收件人" prop="certificate_name">
<el-input
v-model="addressForm.certificate_name"
placeholder="填写真实姓名"
size="small"
clearable
></el-input>
</el-form-item>
<el-form-item label="收件人电话" prop="certificate_phone">
<el-input
v-model="addressForm.certificate_phone"
placeholder="填写真实电话"
size="small"
clearable
></el-input>
</el-form-item>
<el-form :model="addressForm">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="收件人" prop="certificate_name">
<el-input
v-model="addressForm.certificate_name"
placeholder="填写真实姓名"
size="small"
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="收件人电话" prop="certificate_phone">
<el-input
v-model="addressForm.certificate_phone"
placeholder="填写真实电话"
size="small"
:disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="收货地址" prop="certificate_province">
<el-select
ref="certificate_province"
v-model="addressForm.certificate_province"
clearable
:disabled="true"
placeholder="选择省份"
@change="changeProvince($event)"
@change="changeProvince(3, $event)"
>
<el-option
v-for="item in selectProvince"
......@@ -254,7 +261,7 @@
<el-select
ref="certificate_city"
v-model="addressForm.certificate_city"
clearable
:disabled="true"
placeholder="选择城市"
>
<el-option
......@@ -284,11 +291,10 @@
</el-option>
</el-select> -->
<el-input
v-model="county"
placeholder="选择所在区县"
size="small"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
......@@ -299,8 +305,7 @@
v-model="certificate_address"
placeholder="填写详细地址"
size="small"
clearable
@change="getCertificate_address"
:disabled="true"
></el-input>
</el-form-item>
</el-form>
......@@ -314,12 +319,11 @@
<script>
/* eslint-disable */
import {
getAccount,
setAccount,
getProAndCity,
getSchool,
} from "r/index/signUp";
import { getStudentWork, subStudentWork } from "r/index/info";
import { getAccountInfo, setAccountInfo } from "r/index/info";
import { getAddress } from "r/index/certificate";
import validator from "common/validator";
......@@ -513,6 +517,17 @@ export default {
resultPicture: "",
dialogVisible: false,
disabled: false, //限制输入框
// 收货信息模块
// 收件地址-地址栏
addressForm: {
certificate_name: "",
certificate_phone: "",
certificate_province: null,
certificate_city: null,
certificate_address: "",
},
county: "", //区县
certificate_address: "", //详细地址
};
},
mounted() {},
......@@ -532,10 +547,11 @@ export default {
this.getProAndCity();
this.getTenYear();
this.getAccount(); // 页面信息个人获取
this.getAddress(); //收件信息获取
},
watch: {
referForm(val) {
// console.log(val, "val");
console.log(val, "val");
for (var k in val) {
if (val[k] == null || !val[k]) {
val[k] = this.referForm[k];
......@@ -587,6 +603,28 @@ export default {
},
},
methods: {
// 收件信息获取
getAddress() {
// console.log(111111)
getAddress({}).then((res) => {
// console.log(res, "getAddress");
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
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_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];
// console.log(res.data.info.certificate_address.split("-"))
});
},
//获取近10年的年份
getTenYear() {
let nowDate = new Date();
......@@ -608,8 +646,8 @@ export default {
},
// 页面信息个人获取
getAccount() {
getAccount({}).then((res) => {
// console.log(res, "getAccount");
getAccountInfo({}).then((res) => {
console.log(res, "getAccountInfo");
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
......@@ -637,6 +675,8 @@ export default {
getyear() {
this.referForm.start_school_date =
this.start_year.toString() + "-" + this.start_grade.toString();
console.log( this.referForm.start_school_date);
},
// 获取省份城市
getProAndCity() {
......@@ -815,7 +855,7 @@ export default {
this.scrollView(object);
return false;
}
setAccount(this.referForm).then((res) => {
setAccountInfo(this.referForm).then((res) => {
// console.log(res, "setAccount");
if (res.data.code != 200) {
if (res.data.code == 400068) {
......@@ -830,6 +870,7 @@ export default {
// let code = this.$store.state.indexIdentity;
// this.$router.push("/signUp/check?code=" + code);
this.referForm = res.data.data;
// this.getAccount(); // 页面信息个人获取(刷新)
});
});
},
......
......@@ -114,7 +114,6 @@
</el-option>
</el-select> -->
<el-input
v-model="county"
placeholder="选择所在区县"
size="small"
......@@ -130,7 +129,6 @@
placeholder="填写详细地址"
size="small"
clearable
@change="getCertificate_address"
></el-input>
</el-form-item>
</el-form>
......@@ -179,9 +177,9 @@ export default {
trigger: "change",
},
],
county: [
{ required: true, message: "请选择所在区县!", trigger: "blur" },
],
// county: [
// { required: true, message: "请选择所在区县!", trigger: "blur" },
// ],
certificate_address: [
{ required: true, message: "详细地址不能为空!", trigger: "blur" },
],
......@@ -217,25 +215,17 @@ export default {
}
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.getCurrentCityLists(this.addressForm.certificate_city, true);
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];
// console.log(res.data.info.certificate_address.split("-"))
this.certificate_address = res.data.info.certificate_address.split("-")[1];
});
},
getCertifi() {
this.dialogVisible = true;
},
getCertificate_address() {
this.addressForm.certificate_address =
this.county.toString() + "-" + this.certificate_address.toString();
},
// 获取省份城市
getProAndCity() {
getProAndCity({}).then((res) => {
......@@ -244,8 +234,7 @@ export default {
return this.$message.error(res.data.message);
}
this.selectProvince = res.data.province_list;
// this.CityName = res.data.city_list;
// console.log(this.selectProvince, this.CityName);
this.CityName = res.data.city_list;
});
},
......@@ -261,7 +250,7 @@ export default {
//返回当前省份下的城市列表
getCurrentCityLists(val) {
console.log(val)
console.log(val);
let currentCity = [];
if (
this.CityName == null ||
......@@ -270,12 +259,8 @@ export default {
) {
getProAndCity({})
.then((res) => {
// console.log(res, "getProAndCity");
if (res.data.code === 200) {
// this.selectProvince = res.data.province_list;
this.CityName = res.data.city_list;
console.log(this.CityName)
for (let key in this.CityName) {
if (this.CityName[key].parent_id == val) {
currentCity.push(this.CityName[key]);
......@@ -301,12 +286,15 @@ export default {
},
// 提交
setAddress() {
this.addressForm.certificate_address =
this.county.toString() + "-" + this.certificate_address.toString();
this.$refs["addressRef"].validate((valid, object) => {
console.log(valid, "valid");
if (!valid) {
return false;
}
});
setAddress(this.addressForm).then((res) => {
// console.log(res, "setAddress");
if (res.data.code != 200) {
......
......@@ -16,7 +16,9 @@
<div class="top flex">
<div class="homework_name flex">
<div>作业名称:{{ item.work_name }}</div>
<span>未完成</span>
<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>
<el-button size="mini" round @click="toRefer(item)"
>查看作业</el-button
......@@ -42,6 +44,7 @@
:work_contexts="work_context"
:enclosure_urls="enclosure_url"
:work_nums="work_num"
:student_status="student_status"
@closeDialog="closeDialog"
></refer>
</div>
......@@ -63,6 +66,7 @@ export default {
work_context: "",
enclosure_url: "",
work_num: 0,
student_status: 0,
};
},
created() {
......@@ -83,6 +87,7 @@ export default {
this.work_context = item.work_context;
this.enclosure_url = item.enclosure_url;
this.work_num = item.work_num;
this.student_status = item.student_status;
},
getTeacherWork() {
getTeacherWork({ page: 1 }).then((res) => {
......@@ -144,10 +149,11 @@ export default {
.home_content {
padding-bottom: 200px;
font-size: 13px;
.each_content {
padding: 25px 30px;
background-color: #eceaea;
margin: 0 30px;
margin: 0 30px 20px 30px;
// border-radius: 25px;
.top {
margin-bottom: 10px;
......
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