ソースを参照

Merge branch 'five-second-add' of http://120.79.166.78:19005/zhongzheng-edu/saas_entrepot_admin into six

Tang 3 年 前
コミット
b8953873e4

+ 53 - 30
src/components/testPaperPreview/index.vue

@@ -2,7 +2,7 @@
   <div id="testPaperPreview">
     <el-dialog
       :visible.sync="diavos"
-      width="940px"
+      width="1080px"
       :show-close="false"
       :close-on-click-modal="false"
     >
@@ -60,31 +60,7 @@
               <span>题目内容:</span>
               <div>
                 <div class="divPy" v-html="imgExiz(item.content)"></div>
-                <ul v-if="item.type !== 4">
-                  <li
-                    v-for="(items, indexs) in item.optionsList"
-                    :key="indexs"
-                    style="margin-bottom: 10px"
-                  >
-                    {{ Gest(indexs + 1) }}:{{ items.content }}
-                    <div style="margin: 10px 0px">
-                      <el-image
-                        v-if="items.imgUrl"
-                        style="
-                          max-width: 100%;
-                          max-height: 100%;
-                          vertical-align: middle;
-                        "
-                        :src="$methodsTools.splitImgHost(items.imgUrl)"
-                        :preview-src-list="[
-                          $methodsTools.splitImgHost(items.imgUrl),
-                        ]"
-                      >
-                      </el-image>
-                    </div>
-                  </li>
-                </ul>
-                <div v-else>
+                <div v-if="item.type === 4">
                   <div
                     style="background: #e0e0e0; padding: 10px"
                     v-for="(its, inds) in JSON.parse(item.jsonStr)"
@@ -93,17 +69,28 @@
                     <div class="header_style">
                       <span>题目{{ inds + 1 }}</span>
                       <span>{{ getTypeName(its.type) }}</span>
-                      <span>分值:{{ its.score }}</span>
                     </div>
                     <div class="dis_flex">
                       <span>题目内容:</span>
                       <div>
                         <div class="divPy" v-html="imgExiz(its.content)"></div>
+                      </div>
+                    </div>
+                    <div
+                      class="dis_flex"
+                      v-if="its.type !== 4 && its.type !== 5 && its.type !== 3"
+                    >
+                      <span>选项内容:</span>
+                      <div>
                         <ul>
                           <li
                             v-for="(itemsxs, indexsxs) in its.optionsList"
                             :key="indexsxs"
-                            style="margin-bottom: 10px"
+                            :style="
+                              indexsxs === its.optionsList.length - 1
+                                ? 'margin-bottom: 0px'
+                                : 'margin-bottom: 10px'
+                            "
                           >
                             {{ Gest(indexsxs + 1) }}:{{ itemsxs.content }}
 
@@ -149,7 +136,43 @@
                 </div>
               </div>
             </div>
-            <div class="dis_flex" v-if="item.type !== 5">
+            <div
+              class="dis_flex"
+              v-if="item.type !== 3 && item.type !== 4 && item.type !== 5"
+            >
+              <span>选项内容:</span>
+              <div>
+                <ul v-if="item.type !== 4">
+                  <li
+                    v-for="(items, indexs) in item.optionsList"
+                    :key="indexs"
+                    :style="
+                      indexs === item.optionsList.length - 1
+                        ? 'margin-bottom: 0px'
+                        : 'margin-bottom: 10px'
+                    "
+                  >
+                    {{ Gest(indexs + 1) }}:{{ items.content }}
+                    <div style="margin: 10px 0px">
+                      <el-image
+                        v-if="items.imgUrl"
+                        style="
+                          max-width: 100%;
+                          max-height: 100%;
+                          vertical-align: middle;
+                        "
+                        :src="$methodsTools.splitImgHost(items.imgUrl)"
+                        :preview-src-list="[
+                          $methodsTools.splitImgHost(items.imgUrl),
+                        ]"
+                      >
+                      </el-image>
+                    </div>
+                  </li>
+                </ul>
+              </div>
+            </div>
+            <div class="dis_flex" v-if="item.type !== 5 && item.type !== 4">
               <span>正确答案:</span>
               <div>
                 <span v-if="item.type === 3">
@@ -160,7 +183,7 @@
                 </span>
               </div>
             </div>
-            <div class="dis_flex">
+            <div class="dis_flex" v-if="item.type !== 4">
               <span>答案解析:</span>
               <div><div v-html="imgExiz(item.analysisContent)"></div></div>
             </div>

+ 7 - 4
src/views/resource/bankManagement/testPaperManagement/wordPop.vue

@@ -81,8 +81,9 @@ export default {
   methods: {
     getDowm() {
       let url =
-        baseUrls.BASE_IMG_URL + "/oss/images/file/20220324/1648102107588.docx" +
-        `?time=${this.$methodsTools.getNewTime()}`;;
+        baseUrls.BASE_IMG_URL +
+        "/oss/images/file/20220324/1648102107588.docx" +
+        `?time=${this.$methodsTools.getNewTime()}`;
       let link = document.createElement("a");
       let fileName = "导入模板" + ".docx";
       document.body.appendChild(link);
@@ -119,15 +120,17 @@ export default {
                 }
               });
               res.data.forEach((items, indexs) => {
-                numIndex++
-                childrenIndex++
+                numIndex++;
+                childrenIndex++;
                 items.sort = numIndex;
                 items.index = childrenIndex;
+                items.jsonStr = JSON.stringify(items.optionsList);
               });
             } else {
               res.data.forEach((items, indexs) => {
                 items.sort = 1 + indexs;
                 items.index = indexs;
+                items.jsonStr = JSON.stringify(items.optionsList);
               });
             }
             self.$parent.$parent.tableData =

+ 1 - 0
src/views/resource/bankManagement/topicManagement/index.vue

@@ -686,6 +686,7 @@ export default {
       this.search();
     },
     handleCurrentChange(v) {
+      document.documentElement.scrollTop = 0;
       this.formData.pageNum = v;
       this.search();
     },