|
@@ -9,16 +9,13 @@
|
|
|
<el-col :span="24" class="main">
|
|
|
<achieves
|
|
|
:peaceAchieveList="peaceAchieveList"
|
|
|
+ :showPicker="showPicker"
|
|
|
+ :peaceScore="peaceScore"
|
|
|
@showBtn="showBtn"
|
|
|
- @showGuan="showGuan"
|
|
|
- @access="clickscore"
|
|
|
+ @onConfirm="onConfirm"
|
|
|
:achieveList="achieveList"
|
|
|
:show="show"
|
|
|
:form="form"
|
|
|
- :score="score"
|
|
|
- :formscore="formscore"
|
|
|
- @clickDialog="clickAchieve"
|
|
|
- @submit="submitAchieve"
|
|
|
:deptList="deptList"
|
|
|
:lesson="lesson"
|
|
|
></achieves>
|
|
@@ -45,12 +42,12 @@ export default {
|
|
|
achieves, //班级学生成绩列表
|
|
|
},
|
|
|
data: () => ({
|
|
|
- lesson: [],
|
|
|
peaceAchieveList: [],
|
|
|
- deptList: [],
|
|
|
- score: false,
|
|
|
- formscore: {},
|
|
|
+ showPicker: false,
|
|
|
+ peaceScore: '',
|
|
|
studid: '',
|
|
|
+ lesson: [],
|
|
|
+ deptList: [],
|
|
|
achieveList: {},
|
|
|
show: false,
|
|
|
form: {},
|
|
@@ -63,7 +60,6 @@ export default {
|
|
|
}),
|
|
|
created() {
|
|
|
this.search();
|
|
|
- // this.searchLesson();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
@@ -83,43 +79,42 @@ export default {
|
|
|
...mapClass({ classinfo: 'fetch', classlist: 'query' }),
|
|
|
...mapLesson({ lessoninfo: 'fetch', classlist: 'query' }),
|
|
|
...mapUploadtask({ uploadtaskinfo: 'fetch', uploadtasklist: 'query' }),
|
|
|
- async search({ ...info } = {}) {
|
|
|
+ // 平时成绩学生名单查询+作业成绩学生名单查询
|
|
|
+ async search() {
|
|
|
let classid = this.user.classid;
|
|
|
const res = await this.list({ classid });
|
|
|
this.$set(this, `peaceAchieveList`, res.data);
|
|
|
this.$set(this, `achieveList`, res.data);
|
|
|
- const result = await this.classinfo(classid);
|
|
|
- const lessonInfo = await this.uploadtasklist({ ...info });
|
|
|
- // this.$set(this, `lesson`, lessonInfo.data.lessons);
|
|
|
- console.log(lessonInfo);
|
|
|
-
|
|
|
- // // const ress = await this.subjectlist();
|
|
|
- // // const resss = await this.uploadtasklist();
|
|
|
- // const ressss = await this.classlist({ classid });
|
|
|
},
|
|
|
+ // 学委上作业分+存储学生id
|
|
|
clickAchieve({ id }) {
|
|
|
this.$set(this, `stuid`, id);
|
|
|
this.show = true;
|
|
|
},
|
|
|
+ // 学委上作业分提交
|
|
|
async submitAchieve(form) {
|
|
|
this.form.id = this.stuid;
|
|
|
let data = this.form;
|
|
|
const res = await this.uploadtaskupdate(data);
|
|
|
- console.log(res);
|
|
|
this.show = false;
|
|
|
},
|
|
|
+ // 平时成绩上分显示+学生id
|
|
|
showBtn(id) {
|
|
|
this.$set(this, `studid`, id);
|
|
|
- this.score = true;
|
|
|
- },
|
|
|
- showGuan() {
|
|
|
- this.score = false;
|
|
|
+ this.showPicker = true;
|
|
|
},
|
|
|
- async clickscore(formscore) {
|
|
|
- this.formscore.id = this.$route.query.id;
|
|
|
- let data = this.formscore;
|
|
|
- const ress = await this.updates(data);
|
|
|
- this.score = false;
|
|
|
+ // 给学生上分
|
|
|
+ async onConfirm(peaceScore) {
|
|
|
+ let data = {};
|
|
|
+ data.id = this.studid;
|
|
|
+ data.selfscore = peaceScore;
|
|
|
+ const res = await this.updates(data);
|
|
|
+ this.$message({
|
|
|
+ message: '平时成绩上分成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.showPicker = false;
|
|
|
+ this.search();
|
|
|
},
|
|
|
},
|
|
|
};
|