UI_2022-02-10
e 3 years ago
parent 1caaa74de8
commit 708919ee2e
  1. 4
      src/api/index.js
  2. 14
      src/pages/ass/list/index.vue
  3. 4
      src/pages/record/details/index.vue
  4. 25
      src/pages/record/list/index.vue

@ -36,8 +36,8 @@ export default {
experimentOverview: `${host}occupationlab/achievement/experimentOverview`, //实验概览
queryAssessmentByStudent: `${host}occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩
queryPracticeByStudent: `${host}occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩
exportAssessmentInfo: `${host}occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host}occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
exportAssessmentByStudent: `${host}occupationlab/achievement/exportAssessmentByStudent`, // 批量导出考核成绩
exportPracticeByStudent: `${host}occupationlab/achievement/exportPracticeByStudent`, // 批量导出练习成绩
practiceByStudentDetail: `${host}occupationlab/achievement/practiceByStudentDetail`, // 学生端练习实验情况
exportPracticeByStudentDetail: `${host}occupationlab/achievement/exportPracticeByStudentDetail`, // 导出学生端练习实验情况
reportDetail: `${host}occupationlab/achievement/reportDetail`, // 成绩报告详情

@ -68,8 +68,8 @@
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="sysName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="sysName" label="课程名称" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="className" label="实验班级" align="center"></el-table-column>
<el-table-column prop="experimentalNum" label="实验人数" align="center"></el-table-column>
<el-table-column prop="experimentDuration" label="考试时长" align="center"></el-table-column>
@ -94,12 +94,12 @@
<el-table-column label="操作" align="center">
<template slot-scope="scope" v-if="scope.row.show">
<!--status:考核状态(0待开始 1进行中 2已结束); stuState:学生考试状态(0未考 1在考 2已考)-->
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 0" type="text" disabled>未参加</el-button>
<el-button v-if="scope.row.status !== 2 && (scope.row.stuState === 0 || scope.row.stuState === 1)" type="text"
<el-button v-if="scope.row.status == 2 && scope.row.stuState == 0" type="text" disabled>未参加</el-button>
<el-button v-if="scope.row.status != 2 && (scope.row.stuState == 0 || scope.row.stuState == 1)" type="text"
@click="entry(scope.row)" :disabled="scope.row.status !== 1">进入
</el-button>
<el-button v-if="scope.row.status === 1 && scope.row.stuState === 2" type="text" disabled>已提交</el-button>
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 2" type="text"
<el-button v-if="scope.row.status == 1 && scope.row.stuState == 2" type="text" disabled>已提交</el-button>
<el-button v-if="scope.row.status == 2 && scope.row.stuState == 2" type="text"
@click="show(scope.row)">查看成绩
</el-button>
</template>
@ -396,7 +396,7 @@ export default {
}
},
show(row) { //
this.$router.push(`/record/list?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`);
this.$router.push(`/record/show?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`);
},
saveIc() {
if (!this.invitationCode) return util.warningMsg("请输入邀请码");

@ -102,7 +102,7 @@ export default {
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`按数据库统计使用概况导出.xls`,new Blob([res.data]))
util.downloadFileDirect(`学生练习实验情况.xls`,new Blob([res.data]))
}).catch(res => {})
// location.href = this.$get(`${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&token=${this.token}&ids=${ids.toString()}`);
} else {
@ -112,7 +112,7 @@ export default {
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`按数据库统计使用概况导出.xls`,new Blob([res.data]))
util.downloadFileDirect(`学生练习实验情况.xls`,new Blob([res.data]))
}).catch(res => {})
// location.href = `${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&token=${this.token}&ids=`;
}

@ -62,7 +62,9 @@
import { mapState, mapActions } from "vuex";
import practice from "./practice";
import ass from "./ass";
import axios from 'axios';
import Setting from "@/setting";
import util from "@/libs/util";
export default {
components: {
practice,
@ -77,7 +79,8 @@ export default {
tabList: {
practice: "练习",
ass: "考核"
}
},
token:util.local.get(Setting.tokenKey),
};
},
computed: {
@ -113,10 +116,24 @@ export default {
exportData() { //
if (this.active == "practice") {
//
location.href = `${this.api.exportPracticeInfo}?ids=`;
axios.get(`${this.api.exportPracticeByStudent}?curriculumId=${this.curriculumId}`,{
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生练习成绩.xls`,new Blob([res.data]))
}).catch(res => {})
} else {
//
location.href = `${this.api.exportAssessmentInfo}?ids=`;
axios.get(`${this.api.exportAssessmentByStudent}?curriculumId=${this.curriculumId}`,{
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生考核成绩.xls`,new Blob([res.data]))
}).catch(res => {})
}
},
tabChange(index) {

Loading…
Cancel
Save