选择试题
@@ -131,7 +178,9 @@
name: "",
// workscope: null,
limit: 60,
+ paper_types:"",
total_score: 0,
+ category:[],
pass_score: 60,
questions_: [],
danxuan_score: 2,
@@ -172,6 +221,15 @@
watch: {
questions: "calScore"
},
+ computed:{
+ totalScore(){
+ return(
+ this.Form.danxuan_score * this.Form.danxuan_count +
+ this.Form.duoxuan_score * this.Form.duoxuan_count +
+ this.Form.panduan_score * this.Form.panduan_count
+ );
+ },
+ },
created() {
this.getQuestioncat();
},
@@ -222,6 +280,11 @@
this.$refs[formName].validate(valid => {
if (valid) {
this.submitLoding = true;
+ if (this.Form.paper_types == 'false'){
+ this.Form.paper_types = '抽考';
+ this.Form.total_score = this.totalScore;
+ }else{this.Form.paper_types = '押题'};
+
createPaper(this.Form).then(response => {
this.submitLoding = false;
this.$message({
diff --git a/client/src/views/system/userExam.vue b/client/src/views/system/userExam.vue
index a31eb2d..67c2b61 100644
--- a/client/src/views/system/userExam.vue
+++ b/client/src/views/system/userExam.vue
@@ -520,7 +520,7 @@ export default {
updateUser(this.user.id, this.user).then((res) => {
if (res.code >= 200) {
this.getList();
- this.dialogVisible = true;
+ this.dialogVisible = false;
this.impForm.file = ''
this.$message.success("成功");
};