Browse Source

修改样式

aaa 3 years ago
parent
commit
f39801a699

+ 21 - 16
src/views/home/answer/page-answer-special.vue

@@ -49,7 +49,8 @@ export default {
       loading: false,
       finished: false,
       specialPage: 0,
-      specialSize: 10
+      specialSize: 10,
+      specialFlag: true
     };
   },
   created() {
@@ -73,21 +74,25 @@ export default {
         engineertypeid: this.chooseEngneeringWork.id,
         username: this.userInfo.userName
       };
-      this.$_http
-        .get(this.$_API.GET_JTXT_SPECIAL_QUESTIONS, { params })
-        .then(res => {
-          this.specialAnswerList = [
-            ...this.specialAnswerList,
-            ...res.data.content
-          ];
-          // 不能上拉了就是加载玩了
-          this.finished = res.data.last;
-          this.specialPage++;
-          this.loading = false;
-        })
-        .catch(() => {
-          this.$store.commit("toggleLoading", false);
-        });
+      if (this.specialFlag) {
+        this.specialFlag = false;
+        this.$_http
+          .get(this.$_API.GET_JTXT_SPECIAL_QUESTIONS, { params })
+          .then(res => {
+            this.specialAnswerList = [
+              ...this.specialAnswerList,
+              ...res.data.content
+            ];
+            // 不能上拉了就是加载玩了
+            this.finished = res.data.last;
+            this.specialPage++;
+            this.loading = false;
+            this.specialFlag = true;
+          })
+          .catch(() => {
+            this.$store.commit("toggleLoading", false);
+          });
+      }
     },
     clickAnswer(item) {
       this.$store.commit("updateAnswerItemStore", {

+ 1 - 29
src/views/home/answer/through/through-question-doing.vue

@@ -78,37 +78,9 @@
             @change="handleExamQuestionOptionsItemFun(inputValue, index)"
           />
         </div>
-        <div
-          v-if="answerRecruitId === 'daily-questions'"
-          class="through-question-button-box"
-        >
-          <div class="through-question-single-button-box"></div>
-          <div class="through-question-single-button-box">
-            <van-button
-              class="through-question-button"
-              type="primary"
-              color="#0088e9"
-              :disabled="answerValue.length === 0"
-              @click="handleSureFun"
-              >确定</van-button
-            >
-          </div>
+        <div v-else class="through-question-button-box">
           <div class="through-question-single-button-box">
-            <van-button
-              v-show="examQuestionList[answerIndex].userAnswer.length"
-              class="through-question-button"
-              type="primary"
-              color="#0088e9"
-              @click="handleNextFun"
-              >{{
-                this.examQuestionList.length - 1 > this.answerIndex
-                  ? "下一题"
-                  : "完成"
-              }}</van-button
-            >
           </div>
-        </div>
-        <div v-else class="through-question-button-box">
           <div class="through-question-single-button-box">
             <van-button
               v-show="answerStatus === 0"

+ 26 - 25
src/views/home/exam/page-exam-item-doing.vue

@@ -241,43 +241,44 @@ export default {
           console.log("--333--" + JSON.stringify(res.data));
           if (res.data) {
             let httpResultData = [];
-            res.data.forEach((item, index) => {
-              this.getExamQuestionsListFun(
-                item,
-                httpResultData,
-                index === res.data.length - 1
-              );
+            res.data.forEach((item) => {
+              httpResultData.push(this.setPersonDataFun(item));
             });
-          }
-        })
-        .catch(() => {
-          this.$store.commit("toggleLoading", false);
-        });
-    },
-    // 查询:试题信息
-    async getExamQuestionsListFun(questionId, httpResultData, isLast) {
-      this.$_http
-        .get(
-          this.$pathParams(this.$_API.GET_JTXT_GET_EXAMS_ONE_QUESTIONS_LIST, {
-            questionId: questionId
-          })
-        )
-        .then(res => {
-          let resData = { ...res.data };
-          httpResultData.push(this.setPersonDataFun(resData));
-          if (isLast) {
             this.examQuestionList = httpResultData;
             this.handleExamQuestionItemFun(this.examQuestionList[0], 0); // 设置第一题开始
             this.isInited = true;
             this.getExamTimeFun(); // 获取:当前时间及考试限时
             this.setIntervalFun(); // 设置:倒计时定时器
-            this.$store.commit("toggleLoading", false);
           }
         })
         .catch(() => {
           this.$store.commit("toggleLoading", false);
         });
     },
+    // // 查询:试题信息
+    // async getExamQuestionsListFun(questionId, httpResultData, isLast) {
+    //   this.$_http
+    //     .get(
+    //       this.$pathParams(this.$_API.GET_JTXT_GET_EXAMS_ONE_QUESTIONS_LIST, {
+    //         questionId: questionId
+    //       })
+    //     )
+    //     .then(res => {
+    //       let resData = { ...res.data };
+    //       httpResultData.push(this.setPersonDataFun(resData));
+    //       if (isLast) {
+    //         this.examQuestionList = httpResultData;
+    //         this.handleExamQuestionItemFun(this.examQuestionList[0], 0); // 设置第一题开始
+    //         this.isInited = true;
+    //         this.getExamTimeFun(); // 获取:当前时间及考试限时
+    //         this.setIntervalFun(); // 设置:倒计时定时器
+    //         this.$store.commit("toggleLoading", false);
+    //       }
+    //     })
+    //     .catch(() => {
+    //       this.$store.commit("toggleLoading", false);
+    //     });
+    // },
     // 方法:过滤试题的类型,添加用户作答的字段
     setPersonDataFun(httpResultDataItme) {
       let results = this.formatQuestionType(