-
-
-
+
+
+
- {{trainPlan.name}}
+ {{ trainPlan.name }}
-
-
+
+
-
+
-
+
- {{trainPlan.subjectName}}
+ {{ trainPlan.subjectName }}
-
+
- {{trainPlan.name}}
+ {{ trainPlan.name }}
-
-
-
+
+
+
- {{scope.row.isPass === 1 ? '合格':'不合格'}}
+ {{
+ scope.row.isPass === 1 ? "合格" : "不合格"
+ }}
-
+
+
-
+
-
-
+
+
- {{trainPlan.name}}
+ {{ trainPlan.name }}
- {{trainPlan.subjectName}}
+ {{ trainPlan.subjectName }}
- {{trainPlan.courseName}}
+ {{ trainPlan.courseName }}
-
+
-
-
+
+
- {{trainPlan.name}}
+ {{ trainPlan.name }}
- {{trainPlan.subjectName}}
+ {{ trainPlan.subjectName }}
- {{trainPlan.paperName}}
+ {{ trainPlan.paperName }}
-
+
@@ -114,19 +210,15 @@
import {
pageStudyRecordApi,
pageRecordApi,
- getExamTrainRecordApi
-} from '@/assets/js/api/examSystem/examSystem'
+ getExamTrainRecordApi,
+} from "@/assets/js/api/examSystem/examSystem";
export default {
props: ["trainPlan", "isSuperDanger"],
- computed:{
-
- },
+ computed: {},
data() {
return {
-
-
- projectSn: '',
- activeName: 'study', //tab切换
+ projectSn: "",
+ activeName: "study", //tab切换
pagInfo: {
pageNo: 1,
pageSize: 10,
@@ -134,108 +226,108 @@ export default {
},
tableList: [],
dialogVisible: false, //弹窗
- }
+ };
},
created() {
- this.projectSn = this.$store.state.projectSn
- this.getRecordList()
- console.log('11111111111111111')
- console.log(this.trainPlan)
+ this.projectSn = this.$store.state.projectSn;
+ this.getRecordList();
+ console.log("11111111111111111");
+ console.log(this.trainPlan);
},
- watch:{
- "activeName"() {
+ watch: {
+ activeName() {
this.pagInfo.pageNo = 1;
- }
+ },
},
methods: {
- arrayLength(val){
- console.log('==================================')
+ arrayLength(val) {
+ console.log("==================================");
// console.log(val.correctAnswers.length)
- let arr = val.correctAnswers
- let len = arr.reduce((acc) => acc + 1, 0)
+ let arr = val.correctAnswers;
+ let len = arr.reduce((acc) => acc + 1, 0);
return len;
},
//分页查询
getRecordList() {
- let data = {}
+ let data = {};
data.pageNo = this.pagInfo.pageNo;
data.pageSize = this.pagInfo.pageSize;
data.projectSn = this.projectSn;
- data.trainId = this.trainPlan.id
-
- if (this.activeName == 'study') {
- data.number = 1
+ data.trainId = this.trainPlan.id;
+
+ if (this.activeName == "study") {
+ data.number = 1;
// data.userEnterpriseId = this.$store.state.userInfo.userEnterpriseId;
pageStudyRecordApi(data).then((res) => {
if (res.code == 200) {
- this.tableList = res.result.records
- this.pagInfo.total = res.result.total
+ this.tableList = res.result.records;
+ this.pagInfo.total = res.result.total;
}
- })
+ });
}
- if (this.activeName == 'exam') {
- data.examNum = 1
+ if (this.activeName == "exam") {
+ data.examNum = 1;
// pageRecordApi(data).then((res) => {
getExamTrainRecordApi(data).then((res) => {
if (res.code == 200) {
- this.tableList = res.result.records
- this.pagInfo.total = res.result.total
+ this.tableList = res.result.records;
+ this.pagInfo.total = res.result.total;
}
- })
+ });
}
- if (this.activeName == 'noStudy') {
- data.number = 0
+ if (this.activeName == "noStudy") {
+ data.number = 0;
// data.userEnterpriseId = this.$store.state.userInfo.userEnterpriseId;
pageStudyRecordApi(data).then((res) => {
if (res.code == 200) {
- this.tableList = res.result.records
- this.pagInfo.total = res.result.total
+ this.tableList = res.result.records;
+ this.pagInfo.total = res.result.total;
}
- })
+ });
}
- if (this.activeName == 'noExam') {
- data.examNum = 0
+ if (this.activeName == "noExam") {
+ data.examNum = 0;
// pageRecordApi(data).then((res) => {
getExamTrainRecordApi(data).then((res) => {
if (res.code == 200) {
- this.tableList = res.result.records
- this.pagInfo.total = res.result.total
+ this.tableList = res.result.records;
+ this.pagInfo.total = res.result.total;
}
- })
+ });
}
},
//切换Tab记录类型
handleClick(val) {
- this.activeName = val.name
+ this.activeName = val.name;
this.pagInfo = {
pageNo: 1,
pageSize: 10,
total: 0,
- }
- this.getRecordList()
+ };
+ this.getRecordList();
},
//详情按钮
detailInfoBtn(val) {
- this.dialogVisible = true
+ this.dialogVisible = true;
},
//切换条数
sizeChange(val) {
- this.pagInfo.pageSize = val
- this.getRecordList()
+ this.pagInfo.pageSize = val;
+ this.getRecordList();
},
//切换页数
currentChange(val) {
- this.pagInfo.pageNo = val
- this.getRecordList()
+ this.pagInfo.pageNo = val;
+ this.getRecordList();
},
},
-}
+};