Jelajahi Sumber

dialog 遮罩层UI包不关闭问题

natasha 11 bulan lalu
induk
melakukan
a6c9bc8377

+ 1 - 1
src/components/Adult/preview/ArticleViewChs/PhraseModelChs.vue

@@ -1546,7 +1546,7 @@ export default {
   }
   .NNPE-wordDetail {
     position: fixed;
-    z-index: 9999;
+    z-index: 101;
     top: 50%;
     margin-top: -196px;
     left: 50%;

+ 2 - 2
src/components/Adult/preview/ArticleViewChs/WordModelChs.vue

@@ -701,7 +701,7 @@ export default {
       resArr: [],
       resObj: null,
       curTime: 0, //单位s
-      chsFhList: [",", "。", "”", ":", "》", "?", "!", ";", "、"],
+      chsFhList: [",", "。", "”", ":", "》", "?", "!", ";", "、", "……"],
       enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
       NumberList: [
         "①",
@@ -1255,7 +1255,7 @@ export default {
 }
 .NNPE-wordDetail {
   position: fixed;
-  z-index: 9999;
+  z-index: 101;
   top: 50%;
   margin-top: -196px;
   left: 50%;

+ 1 - 1
src/components/Adult/preview/DialogueArticleViewChs/PhraseModelChs.vue

@@ -1329,7 +1329,7 @@ export default {
   }
   .NNPE-wordDetail {
     position: fixed;
-    z-index: 9999;
+    z-index: 101;
     top: 50%;
     margin-top: -196px;
     left: 50%;

+ 2 - 2
src/components/Adult/preview/DialogueArticleViewChs/WordModelChs.vue

@@ -501,7 +501,7 @@ export default {
     return {
       resArr: [],
       curTime: 0, //单位s
-      chsFhList: [",", "。", "”", ":", "》", "?", "!", ";", "、"],
+      chsFhList: [",", "。", "”", ":", "》", "?", "!", ";", "、", "……"],
       enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
       NumberList: [
         "①",
@@ -1187,7 +1187,7 @@ export default {
 }
 .NNPE-wordDetail {
   position: fixed;
-  z-index: 9999;
+  z-index: 101;
   top: 50%;
   margin-top: -196px;
   left: 50%;

+ 6 - 4
src/components/Adult/preview/NewWordShow.vue

@@ -115,8 +115,9 @@
     <el-dialog
       :visible.sync="isPraShow"
       :show-close="false"
-      :close-on-click-modal="false"
-      :modal-append-to-body="false"
+      :close-on-click-modal="true"
+      :modal-append-to-body="true"
+      :append-to-body="true"
       :lock-scroll="true"
       width="504px"
       class="practiceBox practiceBoxStrock"
@@ -138,8 +139,9 @@
     <el-dialog
       :visible.sync="ifFreeShow"
       :show-close="false"
-      :close-on-click-modal="false"
-      :modal-append-to-body="false"
+      :close-on-click-modal="true"
+      :modal-append-to-body="true"
+      :append-to-body="true"
       :lock-scroll="true"
       width="320px"
       class="practiceBox practiceBoxStrock"

+ 51 - 42
src/components/Adult/preview/UploadControlView.vue

@@ -10,15 +10,16 @@
           <template
             v-if="
               curQue.Bookanswer.file_name.indexOf('png') != -1 ||
-              curQue.Bookanswer.file_name.indexOf('jpg') != -1 ||
-              curQue.Bookanswer.file_name.indexOf('jpeg') != -1
+                curQue.Bookanswer.file_name.indexOf('jpg') != -1 ||
+                curQue.Bookanswer.file_name.indexOf('jpeg') != -1
             "
           >
-            <el-image 
-                style="width: 100%; height: 100%"
-                :src="curQue.Bookanswer.file_url" 
-                :fit="'contain'"
-                :preview-src-list="[curQue.Bookanswer.file_url]">
+            <el-image
+              style="width: 100%; height: 100%"
+              :src="curQue.Bookanswer.file_url"
+              :fit="'contain'"
+              :preview-src-list="[curQue.Bookanswer.file_url]"
+            >
             </el-image>
             <!-- <img :src="curQue.Bookanswer.file_url" alt="" /> -->
           </template>
@@ -47,15 +48,16 @@
           <template
             v-if="
               curQue.data.file_name.indexOf('png') != -1 ||
-              curQue.data.file_name.indexOf('jpg') != -1 ||
-              curQue.data.file_name.indexOf('jpeg') != -1
+                curQue.data.file_name.indexOf('jpg') != -1 ||
+                curQue.data.file_name.indexOf('jpeg') != -1
             "
           >
-            <el-image 
-                style="width: 100%; height: 100%"
-                :src="curQue.data.id" 
-                :fit="'contain'"
-                :preview-src-list="[curQue.data.id]">
+            <el-image
+              style="width: 100%; height: 100%"
+              :src="curQue.data.id"
+              :fit="'contain'"
+              :preview-src-list="[curQue.data.id]"
+            >
             </el-image>
             <!-- <img :src="curQue.data.id" alt="" /> -->
           </template>
@@ -117,26 +119,28 @@
         <div
           v-if="type == 'upload_control_chs'"
           class="remove zoom-in"
-          @click="showIframe=true"
+          @click="showIframe = true"
         >
           <i class="el-icon-zoom-in"></i>
         </div>
       </div>
     </div>
     <el-dialog
-        :visible.sync="showIframe"
-        :show-close="true"
-        :close-on-click-modal="false"
-        :modal-append-to-body="false"
-        width="1000px"
-        class="login-dialog"
-        v-if="showIframe">
-        <iframe
-            :src="curQue.Bookanswer.newpath"
-            id="ifms"
-            width="100%"
-            height="600px"
-        ></iframe>
+      :visible.sync="showIframe"
+      :show-close="true"
+      :close-on-click-modal="false"
+      :modal-append-to-body="true"
+      :append-to-body="true"
+      width="1000px"
+      class="login-dialog"
+      v-if="showIframe"
+    >
+      <iframe
+        :src="curQue.Bookanswer.newpath"
+        id="ifms"
+        width="100%"
+        height="600px"
+      ></iframe>
     </el-dialog>
   </div>
 </template>
@@ -150,7 +154,7 @@ const Base64 = require("js-base64").Base64;
 export default {
   components: {
     UploadView,
-    pdf,
+    pdf
   },
   props: ["curQue", "fn_data", "type", "TaskModel"],
   data() {
@@ -168,9 +172,9 @@ export default {
           {
             number: "",
             con: "",
-            answer: "",
-          },
-        ],
+            answer: ""
+          }
+        ]
       },
       loading: false,
       file_preview_url: "",
@@ -197,7 +201,7 @@ export default {
         SessionID,
         UserCode,
         UserType,
-        FileID,
+        FileID
       };
       location.href =
         process.env.VUE_APP_BASE_API +
@@ -229,9 +233,14 @@ export default {
         //   process.env.VUE_APP_BASE_API +
         //   this.curQue.Bookanswer.file_relative_path;
         // this.getNumPages();
-      }else{
-        let path = `${this.file_preview_url}/onlinePreview?url=` +
-          Base64.encode(this.curQue.data.id?this.curQue.data.id:this.curQue.Bookanswer.file_url);
+      } else {
+        let path =
+          `${this.file_preview_url}/onlinePreview?url=` +
+          Base64.encode(
+            this.curQue.data.id
+              ? this.curQue.data.id
+              : this.curQue.Bookanswer.file_url
+          );
         this.curQue.Bookanswer.newpath = path;
       }
       this.$forceUpdate();
@@ -243,12 +252,12 @@ export default {
         _this.curQue.Bookanswer.fileRelativePath
       );
       loadingTask.promise
-        .then((pdff) => {
+        .then(pdff => {
           _this.numPages = pdff.numPages;
           _this.curQue.Bookanswer.numPages = pdff.numPages;
           this.$forceUpdate();
         })
-        .catch((err) => {
+        .catch(err => {
           console.error("pdf 加载失败", err);
         });
     },
@@ -261,7 +270,7 @@ export default {
       let single = null;
       if (this.curQue.data) {
         let path =
-           `${this.file_preview_url}/onlinePreview?url=` +
+          `${this.file_preview_url}/onlinePreview?url=` +
           Base64.encode(this.curQue.data.file_url);
         this.curQue.data.newpath = path;
         single = JSON.parse(JSON.stringify(this.curQue.data));
@@ -272,7 +281,7 @@ export default {
       if (!this.curQue.Bookanswer) {
         this.$set(this.curQue, "Bookanswer", single);
       }
-    },
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
@@ -288,10 +297,10 @@ export default {
   updated() {}, //生命周期 - 更新之后
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 //@import url(); 引入公共css类
 .Big-Book-prev-Textdes {
   width: 100%;

+ 3 - 3
src/components/Adult/preview/components/WordPhraseDetail.vue

@@ -448,9 +448,9 @@ export default {
         const _this = this;
         if (val) {
           _this.initData();
-          if (_this.type == "newWordDetail") {
-            _this.getChineseInfo();
-          }
+          // if (_this.type == "newWordDetail") {
+          //   _this.getChineseInfo();
+          // }
         }
       },
       // 深度观察监听

+ 3 - 2
src/components/Adult/preview/components/Wordcard.vue

@@ -177,8 +177,9 @@
       <el-dialog
         :visible.sync="isPraShow"
         :show-close="false"
-        :close-on-click-modal="false"
-        :modal-append-to-body="false"
+        :close-on-click-modal="true"
+        :modal-append-to-body="true"
+        append-to-body
         :lock-scroll="true"
         width="504px"
         class="practiceBox practiceBoxStrock"