فهرست منبع

组卷功能/还差模考

Tang 2 سال پیش
والد
کامیت
1d86ea10fe

+ 2 - 1
config/dev.env.js

@@ -2,7 +2,8 @@
 module.exports = {
   NODE_ENV: '"development"',
   BASE_IMG_URL: '"https://file-dev.xyyxt.net/"', //图片上传api
-  BASE_URL: '"http://120.79.166.78:19012"',
+  // BASE_URL: '"http://120.79.166.78:19012"',
+  BASE_URL: '"http://192.168.1.24:5055"',
   TENANT_ID: '"867735392558919680"',
   WEAPP_LOGO: '"@/assets/xcxqrcode.jpg"', // 微信小程序扫码图片
   TENANT_NANE: '"祥粤云学堂"',

+ 1 - 0
src/components/exam/HeaderTabBox.vue

@@ -72,6 +72,7 @@ export default {
 
     .btn {
       cursor: pointer;
+      user-select: none;
       width: 66px;
       height: 28px;
       background: #ffffff;

+ 3 - 0
src/pages/bank-exam-all-explain/index.vue

@@ -19,6 +19,7 @@
               <div class="left-box">
                 <Header-tab-box
                   :num="questionOverNum(true)"
+                  :allNum="simulateStatus ? questionList.length: 0"
                   @prevQuestion="prevQuestion"
                   @nextQuestion="nextQuestion"
                 ></Header-tab-box>
@@ -813,6 +814,7 @@ export default {
       current: 0,
       courseType: 1, //1题库,2视频 商品类型
       examName: "",
+      simulateStatus:"",
     };
   },
   async mounted() {
@@ -822,6 +824,7 @@ export default {
     this.chapterId = this.$route.query.chapterId;
     this.goodsId = this.$route.query.goodsId;
     this.courseType = this.$route.query.courseType;
+    this.simulateStatus = parseInt(this.$route.query.simulateStatus),
     this.goodsQuestionList();
     this.bankExam();
   },

+ 13 - 3
src/pages/bank-exam/index.vue

@@ -1152,6 +1152,7 @@ export default {
       isSubmit: false,
       postTimer: null,
       number: "",
+      simulateExamId: "",
     };
   },
   async mounted() {
@@ -1162,6 +1163,7 @@ export default {
     this.examId = this.$route.query.examId;
     this.moduleId = this.$route.query.moduleId;
     this.chapterId = this.$route.query.chapterId;
+    this.simulateStatus = parseInt(this.$route.query.simulateStatus),
     await this.bankExam();
     if (!this.number) {
       this.goodsQuestionList();
@@ -1332,11 +1334,18 @@ export default {
      * 请求题目列表
      */
     goodsQuestionList() {
-      this.$request
-        .goodsQuestionList({
+      this.$request[
+        this.doMode == 3 ? "goodsRandomQuestionList" : "goodsQuestionList"
+      ]({
           examId: this.examId,
+        goodsId: this.goodsId,
+        orderGoodsId: this.orderGoodsId,
         })
         .then(async (res) => {
+          if(this.doMode==3){
+            this.simulateExamId = res.data.simulateExamId
+            res.data = res.data.questionList
+          }
           if (!res.data.length) {
             this.$message({
               type: "warning",
@@ -1671,6 +1680,7 @@ export default {
             totalQuestionNum: questionList,
             allQuestionNum: this.questionList.length,
             doMode: this.doMode,
+            simulateExamId: this.simulateExamId,
           })
           .then((res) => {
             this.recordId = res.data;
@@ -2850,7 +2860,7 @@ export default {
       };
     },
     doMode() {
-      return this.number ? 2 : 1;
+      return this.simulateStatus ? 3 : this.number ? 2 : 1;
     },
     examType() {
       return this.$route.query.examType || (this.number ? 2 : 0);

+ 3 - 2
src/pages/bank-report/index.vue

@@ -150,13 +150,13 @@
               @click="backBank"
               >练习下一节</el-button
             >
-            <el-button type="primary" class="btn" @click="doRepeat(reportdata)"
+            <el-button type="primary" class="btn" @click="doRepeat(reportdata)" v-if="examData.simulateStatus != 1"
               >重新做题</el-button
             >
           </template>
           <template v-else>
             <el-button type="primary" @click="back" class="btn">返回</el-button>
-            <el-button type="primary" @click="back" class="btn"
+            <el-button type="primary" @click="back" class="btn" v-if="examData.simulateStatus != 1"
               >继续练习</el-button
             >
           </template>
@@ -453,6 +453,7 @@ export default {
       this.$router.push({
         path: "/bank-exam-all-explain/" + reportdata.recordId,
         query: {
+          simulateStatus:this.examData.simulateStatus,
           examId: reportdata.examId,
           moduleId: reportdata.moduleId || 0,
           chapterId: reportdata.chapterId || 0,

+ 1 - 1
src/pages/course-exam/index.vue

@@ -1798,7 +1798,7 @@ export default {
         if (this.bankType == 2) {
           this.needBack = true;
         }
-        // this.doMode = res.data.simulateStatus ? 3 : 1;
+        this.doMode = res.data.simulateStatus ? 3 : 1;
         return Promise.resolve();
       });
     },

+ 2 - 1
src/pages/course-report/index.vue

@@ -97,7 +97,7 @@
         <div class="section__footer">
           <el-button type="primary" class="btn"  @click="backList()">返回列表</el-button>
           <!-- <el-button type="primary" class="btn">练习下一节</el-button> -->
-          <el-button type="primary" class="btn" @click="doRepeat(reportdata)">重新做题</el-button>
+          <el-button type="primary" class="btn" @click="doRepeat(reportdata)" v-if="reportdata.doMode != 3">重新做题</el-button>
           <el-button type="primary" class="btn" @click="wrongExplain(reportdata)">错题解析</el-button>
           <el-button type="primary" class="btn" @click="allExplain(reportdata)">全部解析</el-button>
         </div>
@@ -322,6 +322,7 @@ export default {
       this.$router.push({
         path: "/bank-exam-all-explain/" + reportdata.recordId,
         query: {
+          simulateStatus:reportdata.doMode === 3 ? 1 : 0,
           examId: reportdata.examId,
           moduleId: reportdata.moduleId || 0,
           chapterId: reportdata.chapterId || 0,

+ 3 - 2
src/pages/mock-exam/index.vue

@@ -1136,7 +1136,7 @@ export default {
       isAutoSubmit: false,
       examEndTime: 0,
       examStartTime: 0,
-      doMode:1,
+      doMode:1,//3模考组卷1普通考卷
       simulateExamId:''
     };
   },
@@ -1323,6 +1323,7 @@ export default {
      * 请求题目列表
      */
     goodsQuestionList() {
+      console.log(this.doMode,this.examId,this.goodsId)
       this.$request[this.doMode==3?'goodsRandomQuestionList':'goodsQuestionList']({
           examId: this.examId,
           goodsId: this.goodsId,
@@ -1659,7 +1660,7 @@ export default {
         this.$request.bankExam(this.examId).then((res) => {
           this.bankType = res.data.doType;
           this.examData = res.data;
-          // this.doMode = res.data.simulateStatus ? 3 : 1;
+          this.doMode = res.data.simulateStatus ? 3 : 1;
           if (this.bankType == 2) {
             this.needBack = true;
           }

+ 26 - 14
src/pages/person-center/bank-record/index.vue

@@ -85,20 +85,28 @@
                       <div
                         class="btn-line__in"
                         @click="
-                          go('/bank-exam-explain/' + record.goodsId, {
-                            examId: record.examId,
-                            chapterId:
-                              record.courseType == 2
-                                ? record.chapterId
-                                : record.chapterExamId,
-                            moduleId:
-                              record.courseType == 2
-                                ? record.moduleId
-                                : record.moduleExamId,
-                            orderGoodsId: record.orderGoodsId,
-                            examType:
-                              record.paperName == '随机练习' ? 2 : undefined,
-                          })
+                          go(
+                            record.doMode === 3
+                              ? '/bank-exam-all-explain/' + record.recordId
+                              : '/bank-exam-explain/' + record.goodsId,
+                            {
+                              simulateStatus: record.doMode === 3 ? 1 : 0,
+                              examId: record.examId,
+                              chapterId:
+                                record.courseType == 2
+                                  ? record.chapterId
+                                  : record.chapterExamId,
+                              moduleId:
+                                record.courseType == 2
+                                  ? record.moduleId
+                                  : record.moduleExamId,
+                              orderGoodsId: record.orderGoodsId,
+                              examType:
+                                record.paperName == '随机练习' ? 2 : undefined,
+                              goodsId: record.goodsId,
+                              courseType: record.courseType,
+                            }
+                          )
                         "
                         v-if="record.status == 1"
                       >
@@ -155,6 +163,7 @@ export default {
       },
       recordList: [],
       total: 0,
+      simulateStatus: "",
     };
   },
   mounted() {
@@ -279,6 +288,7 @@ export default {
             this.$router.push({
               path: "/bank-exam/" + section.goodsId,
               query: {
+                simulateStatus: this.simulateStatus || 0,
                 orderGoodsId: section.orderGoodsId,
                 examId: section.examId,
                 moduleId: section.moduleExamId || 0,
@@ -291,6 +301,7 @@ export default {
           this.$router.push({
             path: "/bank-exam-all-explain/" + section.recordId,
             query: {
+              simulateStatus: this.simulateStatus || 0,
               examId: section.examId,
               moduleId: section.moduleExamId || 0,
               chapterId: section.chapterExamId || 0,
@@ -342,6 +353,7 @@ export default {
     getExamDetail(exam_id) {
       return new Promise((resolve) => {
         this.$request.getExamDetail(exam_id).then((res) => {
+          this.simulateStatus = res.data.simulateStatus;
           resolve(res.data.answerNum);
         });
       });

+ 29 - 15
src/pages/person-center/bank-record/record-list/index.vue

@@ -47,27 +47,37 @@
                       <div
                         class="btn-line__in"
                         @click="doRepeat(record)"
-                        v-if="record.status == 1 && record.paperName != '随机练习'"
+                        v-if="
+                          record.status == 1 && record.paperName != '随机练习'
+                        "
                       >
                         <div>重新做题</div>
                       </div>
                       <div
                         class="btn-line__in"
                         @click="
-                          go('/bank-exam-explain/' + record.goodsId, {
-                            examId: record.examId,
-                            chapterId:
-                              courseType == 2
-                                ? record.chapterId
-                                : record.chapterExamId,
-                            moduleId:
-                              courseType == 2
-                                ? record.moduleId
-                                : record.moduleExamId,
-                            orderGoodsId: record.orderGoodsId,
-                            examType:
-                              record.paperName == '随机练习' ? 2 : undefined,
-                          })
+                          go(
+                            record.doMode === 3
+                              ? '/bank-exam-all-explain/' + record.recordId
+                              : '/bank-exam-explain/' + record.goodsId,
+                            {
+                              simulateStatus: record.doMode === 3 ? 1 : 0,
+                              examId: record.examId,
+                              chapterId:
+                                courseType == 2
+                                  ? record.chapterId
+                                  : record.chapterExamId,
+                              moduleId:
+                                courseType == 2
+                                  ? record.moduleId
+                                  : record.moduleExamId,
+                              orderGoodsId: record.orderGoodsId,
+                              examType:
+                                record.paperName == '随机练习' ? 2 : undefined,
+                              goodsId: record.goodsId,
+                              courseType: courseType,
+                            }
+                          )
                         "
                         v-if="record.status == 1"
                       >
@@ -130,6 +140,7 @@ export default {
       recordList: [],
       total: 0,
       courseType: 1, // 2视频试卷
+      simulateStatus: "",
     };
   },
   mounted() {
@@ -246,6 +257,7 @@ export default {
             this.$router.push({
               path: "/bank-exam/" + section.goodsId,
               query: {
+                simulateStatus: this.simulateStatus || 0,
                 orderGoodsId: section.orderGoodsId,
                 examId: section.examId,
                 moduleId: section.moduleExamId || 0,
@@ -258,6 +270,7 @@ export default {
           this.$router.push({
             path: "/bank-exam-all-explain/" + section.recordId,
             query: {
+              simulateStatus: this.simulateStatus || 0,
               examId: section.examId,
               moduleId: section.moduleExamId || 0,
               chapterId: section.chapterExamId || 0,
@@ -309,6 +322,7 @@ export default {
     getExamDetail(exam_id) {
       return new Promise((resolve) => {
         this.$request.getExamDetail(exam_id).then((res) => {
+          this.simulateStatus = res.data.simulateStatus;
           resolve(res.data.answerNum);
         });
       });

+ 28 - 4
src/pages/person-center/my-bank/bank-detailCopy/index.vue

@@ -232,7 +232,10 @@
                                     >上次做到</span
                                   >
                                 </div>
-                                <div class="btn_div">
+                                <div
+                                  class="btn_div"
+                                  v-if="section.simulateStatus !== 1"
+                                >
                                   <!-- 正确率
                                   <span style="color: rgb(52, 216, 71)"
                                     >{{
@@ -298,7 +301,11 @@
                                     )
                                   "
                                   class="btn"
-                                  >重新做题</el-button
+                                  >{{
+                                    section.simulateStatus === 1
+                                      ? "开始做题"
+                                      : "重新做题"
+                                  }}</el-button
                                 >
                               </div>
                             </div>
@@ -359,6 +366,7 @@
                                   >
                                 </div>
                                 <div
+                                  v-if="section.simulateStatus !== 1"
                                   style="width: auto; padding: 0px 14px"
                                   class="btn_div"
                                 >
@@ -409,7 +417,11 @@
                                   type="primary"
                                   @click="doRepeat(section, item.majorId, 0)"
                                   class="btn"
-                                  >重新做题
+                                  >{{
+                                    section.simulateStatus === 1
+                                      ? "开始做题"
+                                      : "重新做题"
+                                  }}
                                 </el-button>
                               </div>
                             </div>
@@ -434,6 +446,7 @@
                               >
                             </div>
                             <div
+                              v-if="item.simulateStatus !== 1"
                               style="width: auto; padding: 0px 14px"
                               class="btn_div"
                             >
@@ -479,7 +492,11 @@
                               type="primary"
                               @click="doRepeat(item, 0, 0)"
                               class="btn"
-                              >重新做题</el-button
+                              >{{
+                                item.simulateStatus === 1
+                                  ? "开始做题"
+                                  : "重新做题"
+                              }}</el-button
                             >
                           </div>
                         </div>
@@ -770,6 +787,7 @@ export default {
       this.$router.push({
         path: "/bank-exam/" + this.goodsId,
         query: {
+          simulateStatus: this.simulateStatus || 0,
           orderGoodsId: this.orderGoodsId,
           number: this.activeNum,
           moduleId: 0,
@@ -941,6 +959,7 @@ export default {
       this.$router.push({
         path: "/bank-exam/" + this.goodsId,
         query: {
+          simulateStatus: this.simulateStatus || 0,
           examId: section.examId || section.majorId,
           moduleId: moduleId || 0,
           chapterId: chapterId || 0,
@@ -953,6 +972,7 @@ export default {
       this.$router.push({
         path: "/bank-exam/" + this.goodsId,
         query: {
+          simulateStatus: this.simulateStatus || 0,
           examId: examInfo.examId,
           moduleId: examInfo.moduleExamId,
           chapterId: examInfo.chapterExamId,
@@ -1021,9 +1041,11 @@ export default {
         showClose: false,
       })
         .then((_) => {
+          console.log(section, "aaa");
           this.$router.push({
             path: "/bank-exam/" + this.goodsId,
             query: {
+              simulateStatus: this.simulateStatus || 0,
               examId: section.examId || section.majorId,
               moduleId: moduleId || 0,
               chapterId: chapterId || 0,
@@ -1035,6 +1057,7 @@ export default {
           this.$router.push({
             path: "/bank-exam-all-explain/" + section.recordId,
             query: {
+              simulateStatus: this.simulateStatus || 0,
               examId: section.examId || section.majorId,
               moduleId: moduleId || 0,
               chapterId: chapterId || 0,
@@ -1068,6 +1091,7 @@ export default {
     getExamDetail(exam_id) {
       return new Promise((resolve) => {
         this.$request.getExamDetail(exam_id).then((res) => {
+          this.simulateStatus = res.data.simulateStatus;
           resolve(res.data.answerNum);
         });
       });