소스 검색

Merge branch 'master' into gcj

guanchunjie 3 년 전
부모
커밋
1d7ae539f8

+ 9 - 5
src/components/Adult/common/UploadView.vue

@@ -44,6 +44,7 @@ export default {
     "uiType",
     "fileList",
     "accept",
+    "type",
   ],
   data() {
     return {
@@ -86,13 +87,18 @@ export default {
       deep: true,
     },
     fileList(newval, oldval) {
-      this.currentfileList = newval||[];
+      this.currentfileList = newval || [];
     },
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   created() {
     this.currentfileList = this.fileList || [];
-    this.showList = this.fileList ? true : false;
+    // this.showList = this.fileList ? true : false;
+    if (this.type == "upload_control_preview_chs") {
+      this.showList = true;
+    }else{
+      this.showList = false;
+    }
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
@@ -114,12 +120,10 @@ export default {
           ? response.file_info_list[0].media_duration
           : 10;
         this.$message.success("用户上传成功");
-
         this.changeFillId(fileList, response.duration, this.index);
-
         this.loading.close();
       } else {
-        this.fileList = [];
+        // this.fileList = [];
         this.$message.warning(response.msg);
         this.loading.close();
       }

+ 9 - 6
src/components/Adult/inputModules/UploadControl.vue

@@ -1,12 +1,13 @@
 <!--  -->
 <template>
   <div class="Big-Book-prev-Textdes Tinydemo" v-if="curQue">
-    <template v-if="type =='upload_control_preview_chs'">
+    <template v-if="type == 'upload_control_preview_chs'">
       <UploadView
         :changeFillId="changeFillId"
         :accept="accept"
         :filleNumber="1"
         :fileList="curQue.fileList"
+        :type="type"
       />
     </template>
     <div v-else>
@@ -94,11 +95,13 @@ export default {
     },
     changeFillId(fileList, item, index) {
       this.curQue.fileList = JSON.parse(JSON.stringify(fileList));
-      this.curQue.data = fileList[0].response.file_info_list[0];
-      if (this.curQue.data.file_name.indexOf("pdf") != -1) {
-        this.curQue.data.fileRelativePath =
-          process.env.VUE_APP_BASE_API + this.curQue.data.file_relative_path;
-        this.getNumPages();
+      if (fileList.length > 0) {
+        this.curQue.data = fileList[0]?.response?.file_info_list[0];
+        if (this.curQue.data?.file_name.indexOf("pdf") != -1) {
+          this.curQue.data.fileRelativePath =
+            process.env.VUE_APP_BASE_API + this.curQue.data.file_relative_path;
+          this.getNumPages();
+        }
       }
     },
     // 获取pdf的页数

+ 0 - 1
src/components/Adult/inputModules/VideoControl.vue

@@ -68,7 +68,6 @@ export default {
             name: item.name,
             url: item.response.file_info_list[0].file_url,
             id: "[FID##" + item.response.file_info_list[0].file_id + "##FID]",
-
             media_duration: item.response.file_info_list[0].media_duration, //音频时长
           };
           articleImgRes.push(obj);

+ 6 - 3
src/components/Adult/preview/InputHasRecord.vue

@@ -390,9 +390,6 @@ export default {
 }
 .NPC-zhedie {
   width: 780px;
-  border: 1px solid rgba(0, 0, 0, 0.1);
-  overflow: hidden;
-  border-radius: 8px;
   //   margin-top: 16px;
   .topTitle {
     width: 100%;
@@ -401,6 +398,9 @@ export default {
     padding-left: 24px;
     padding-right: 16px;
     height: 48px;
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    overflow: hidden;
+    border-radius: 8px 8px 0 0 ;
     .NPC-top-left {
       display: flex;
       justify-content: flex-start;
@@ -437,6 +437,9 @@ export default {
   }
   .NPC-word-list {
     padding: 0px 24px;
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    border-top: none;
+    border-radius: 0 0 8px 8px;
   }
 }
 @keyframes firstrotate {

+ 6 - 3
src/components/Adult/preview/Notes.vue

@@ -108,15 +108,15 @@ export default {
 .NPC-zhedie {
   width: 780px;
   margin-bottom: 16px;
-  border: 1px solid rgba(0, 0, 0, 0.1);
-  overflow: hidden;
-  border-radius: 8px;
   .topTitle {
     width: 100%;
     display: flex;
     justify-content: space-between;
     padding-left: 24px;
     padding-right: 16px;
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    overflow: hidden;
+    border-radius: 8px 8px 0 0;
     .NPC-top-left {
       display: flex;
       justify-content: flex-start;
@@ -163,6 +163,9 @@ export default {
   }
   .NPC-notes-list {
     padding: 24px 24px 5px 24px;
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    border-top: none;
+    border-radius: 0 0 8px 8px;
     .NPC-notes {
       width: 100%;
       margin-bottom: 24px;

+ 1 - 1
src/components/Adult/preview/NumberSelectHasRecord.vue

@@ -177,7 +177,7 @@ export default {
             .luyin-box{
                 width: 64px;
                 height: 32px;
-                border: 1px solid rgba(0, 0, 0, 0.1);
+                // border: 1px solid rgba(0, 0, 0, 0.1);
                 border-radius: 8px;
                 margin-left: 4px;
             }

+ 2 - 2
src/components/Adult/preview/RecordModule.vue

@@ -61,7 +61,7 @@ export default {
     width: 100%;
     .luyin-box{
         padding:0 12px;
-        border: 1px solid rgba(0, 0, 0, 0.1);
+        // border: 1px solid rgba(0, 0, 0, 0.1);
         border-radius: 8px;
         padding:0 12px;
     }
@@ -70,7 +70,7 @@ export default {
         padding: initial;
     }
     .record_control_normal{
-        width:129px;
+        width:128px;
     }
     .record_control_pro{
         width:200px;

+ 2 - 2
src/components/Adult/preview/SentenceListenRead.vue

@@ -298,9 +298,9 @@ export default {
         }
       }
       .luyin-box {
-        border: 1px solid rgba(0, 0, 0, 0.1);
+        // border: 1px solid rgba(0, 0, 0, 0.1);
         border-radius: 8px;
-        width: 129px;
+        width: 128px;
         padding: 0 12px;
       }
     }

+ 3 - 1
src/components/Adult/preview/SentenceSortQP.vue

@@ -252,6 +252,8 @@ export default {
           margin-right: 2px;
           color: #000000;
           margin-bottom: 2px;
+          cursor: pointer;
+          border: 1px solid #ffffff;
           p {
             margin: 0;
             line-height: 150%;
@@ -290,7 +292,7 @@ export default {
         padding-top: 4px;
         max-height: 103px;
         min-height: 74px;
-        overflow-x: scroll;
+        overflow-x: auto;
 
         .item {
           // width: 82px;

+ 4 - 4
src/components/Adult/preview/TextInputRecord.vue

@@ -24,7 +24,7 @@
           placeholder="输入"
         />
         <template v-if="items.IsRecord">
-          <Soundrecord @handleWav="handleWav" type="promax" class="luyin-box" />
+          <Soundrecord @handleWav="handleWav" type="pro" class="luyin-box" />
         </template>
       </li>
     </ul>
@@ -100,7 +100,7 @@ export default {
       border-radius: 8px;
       display: flex;
       align-items: center;
-      padding: 8px 8px 8px 16px;
+      padding: 8px 12px;
       margin-bottom: 8px;
       .audio-play {
         width: 16px;
@@ -147,9 +147,9 @@ export default {
         line-height: 150%;
       }
       .luyin-box {
-        border: 1px solid rgba(0, 0, 0, 0.1);
+        // border: 1px solid rgba(0, 0, 0, 0.1);
         border-radius: 8px;
-        width: 280px;
+        width: 200px;
         height: 40px;
         margin-left: 8px;
         padding: 0 12px;

+ 11 - 6
src/components/Adult/preview/UploadControlView.vue

@@ -6,7 +6,8 @@
         :changeFillId="changeFillId"
         :accept="accept"
         :filleNumber="1"
-        :fileList="false"
+        :fileList="curQue.fileList"
+        :type="type"
       />
       <!-- <div class="uploadBtn" @click="downLoad">
         <img
@@ -17,7 +18,7 @@
         下载表格
       </div> -->
     </div>
-    <div class="dv"  v-if="curQue.data">
+    <div class="dv" v-if="curQue.data">
       <div class="main">
         <div class="content">
           <template v-if="curQue.data">
@@ -109,13 +110,16 @@ export default {
         `/GCLSFileServer/WebFileDownload?UserCode=${data.UserCode}&UserType=${data.UserType}&SessionID=${data.SessionID}&FileID=${data.FileID}`;
     },
     remove() {
-      this.data = null;
-      this.curQue.data = null;
-      this.curQue.fileList = [];
-      this.$message.success("删除成功");
+      if (this.curQue.data) {
+        this.data = null;
+        this.curQue.data = null;
+        this.curQue.fileList = [];
+        this.$message.success("删除成功");
+      }
     },
     changeFillId(fileList, item, index) {
       this.curQue.fileList = fileList;
+      // this.$set(this.curQue,data,fileList[0].response.file_info_list[0])
       this.curQue.data = fileList[0].response.file_info_list[0];
       if (this.curQue.data.file_name.indexOf("pdf") != -1) {
         this.curQue.data = fileList[0].response.file_info_list[0];
@@ -123,6 +127,7 @@ export default {
           process.env.VUE_APP_BASE_API + this.curQue.data.file_relative_path;
         this.getNumPages();
       }
+      this.$forceUpdate();
     },
     // 获取pdf的页数
     getNumPages() {

+ 1 - 0
src/components/Adult/preview/VideoControl.vue

@@ -126,6 +126,7 @@ export default {
   box-sizing: border-box;
   border-radius: 8px;
   position: relative;
+  margin-bottom: 16px;
   video {
     width: 100%;
     height: 100%;

+ 6 - 3
src/components/Adult/preview/WordPhrase.vue

@@ -363,9 +363,6 @@ export default {
 .NPC-zhedie {
   width: 780px;
   margin-bottom: 16px;
-  border: 1px solid rgba(0, 0, 0, 0.1);
-  overflow: hidden;
-  border-radius: 8px;
 
   .NPC-word-table {
     width: 100%;
@@ -461,6 +458,9 @@ export default {
   }
   .NPC-word-list {
     padding: 20px 24px;
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    border-top: none;
+    border-radius: 0 0 8px 8px;
   }
   .detail-icon {
     width: 56px;
@@ -496,6 +496,9 @@ export default {
     padding-right: 16px;
     height: 48px;
     background: #e35454;
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    overflow: hidden;
+    border-radius: 8px 8px 0 0;
     .NPC-top-left {
       display: flex;
       justify-content: flex-start;

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

@@ -89,44 +89,37 @@
         </div>
         <div class="zhedie-white">
           <div v-if="data.list1.length > 0">
-            <el-collapse v-model="wordShow">
-              <el-collapse-item name="1">
-                <template #title>
-                  <div class="topTitle">
-                    <span>本课例句</span>
-                    <span
-                      >{{ wordShow.indexOf("1") != -1 ? "收起" : "展开" }}
-                      <img
-                        v-if="wordShow.indexOf('1') != -1"
-                        src="../../../../assets/newImage/common/show-black.png"
-                        alt=""
-                      />
-                      <img
-                        v-else
-                        src="../../../../assets/newImage/common/hide-black.png"
-                        alt=""
-                      />
-                    </span>
-                  </div>
-                </template>
-                <div class="liju">
-                  <div v-for="(item, i) in data.list1" :key="i">
-                    <p v-html="item.res"></p>
-                  </div>
+            <div class="topTitle">
+                <span>本课例句</span>
+                <span @click="handleChangeTab('wordShow')"
+                    >{{ wordShow ? "收起" : "展开" }}
+                    <img
+                    v-if="wordShow"
+                    src="../../../../assets/newImage/common/show-black.png"
+                    alt=""
+                    />
+                    <img
+                    v-else
+                    src="../../../../assets/newImage/common/hide-black.png"
+                    alt=""
+                    />
+                </span>
+            </div>
+            <el-collapse-transition>
+                <div class="liju" v-show="wordShow">
+                    <div v-for="(item, i) in data.list1" :key="i">
+                        <p v-html="item.res"></p>
+                    </div>
                 </div>
-              </el-collapse-item>
-            </el-collapse>
+            </el-collapse-transition>
           </div>
           <div v-if="data.list2.length > 0">
-            <el-collapse v-model="wordShow">
-              <el-collapse-item name="2">
-                <template #title>
-                  <div class="topTitle">
+                <div class="topTitle">
                     <span>本书例句</span>
-                    <span
-                      >{{ wordShow.indexOf("2") != -1 ? "收起" : "展开" }}
+                    <span @click="handleChangeTab('wordShow2')"
+                      >{{ wordShow2 ? "收起" : "展开" }}
                       <img
-                        v-if="wordShow.indexOf('1') != -1"
+                        v-if="wordShow2"
                         src="../../../../assets/newImage/common/show-black.png"
                         alt=""
                       />
@@ -136,9 +129,9 @@
                         alt=""
                       />
                     </span>
-                  </div>
-                </template>
-                <div class="liju">
+            </div>
+            <el-collapse-transition>
+                <div class="liju" v-show="wordShow2">
                   <div v-for="(item, i) in data.list2" :key="i">
                     <div>{{ i + 1 }}.</div>
                     <div>
@@ -149,19 +142,15 @@
                     </div>
                   </div>
                 </div>
-              </el-collapse-item>
-            </el-collapse>
+            </el-collapse-transition>
           </div>
           <div v-if="data.list3.length > 0">
-            <el-collapse v-model="wordShow">
-              <el-collapse-item name="3">
-                <template #title>
                   <div class="topTitle">
                     <span>本套教材例句</span>
-                    <span
-                      >{{ wordShow.indexOf("3") != -1 ? "收起" : "展开" }}
+                    <span @click="handleChangeTab('wordShow3')"
+                      >{{ wordShow3 ? "收起" : "展开" }}
                       <img
-                        v-if="wordShow.indexOf('1') != -1"
+                        v-if="wordShow3"
                         src="../../../../assets/newImage/common/show-black.png"
                         alt=""
                       />
@@ -172,7 +161,7 @@
                       />
                     </span>
                   </div>
-                </template>
+            <el-collapse-transition>
                 <div class="liju">
                   <div v-for="(item, i) in data.list3" :key="i">
                     <div>{{ data.list3.length + i + 1 }}.</div>
@@ -184,8 +173,7 @@
                     </div>
                   </div>
                 </div>
-              </el-collapse-item>
-            </el-collapse>
+            </el-collapse-transition>
           </div>
         </div>
       </div>
@@ -267,7 +255,9 @@ export default {
     return {
       height: "",
       margintop: "",
-      wordShow: "",
+      wordShow: false,
+      wordShow2: false,
+      wordShow3: false,
       list1: [],
       isShow: false,
       old_word: "",
@@ -351,6 +341,9 @@ export default {
         this.margintop = "-" + window.innerHeight / 2 + "px";
       }
     },
+    handleChangeTab(flag){
+        this[flag] = !this[flag]
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -523,6 +516,8 @@ export default {
         display: flex;
         justify-content: space-between;
         padding: 0 12px;
+        align-items: center;
+        background: #fff !important;
         > :nth-child(1) {
           font-weight: 500;
           font-size: 16px;
@@ -536,6 +531,7 @@ export default {
           font-size: 14px;
           line-height: 22px;
           color: rgba(0, 0, 0, 0.85);
+          cursor: pointer;
         }
         img {
           width: 16px;
@@ -551,9 +547,13 @@ export default {
       }
       .liju {
         padding-bottom: 16px;
-        margin-right: 24px;
+        padding-right: 24px;
+        background: #F7F7F7;
+        border: 1px solid rgba(0, 0, 0, 0.1);
+        border-top: none;
+        border-radius: 0 0 4px 4px;
         > div {
-          margin-top: 16px;
+          padding-top: 16px;
           margin-left: 8px;
           display: flex;
 
@@ -657,7 +657,7 @@ export default {
 .NPC-Big-Book-preview-red {
   .wordDetailChs {
     .zhedie-white {
-      .el-collapse-item__header {
+      .topTitle {
         height: 40px;
         background: #fff !important;
         border: 1px solid rgba(0, 0, 0, 0.1);
@@ -671,7 +671,7 @@ export default {
 .NPC-Big-Book-preview-green {
   .wordDetailChs {
     .zhedie-white {
-      .el-collapse-item__header {
+      .topTitle {
         height: 40px;
         background: #fff !important;
         border: 1px solid rgba(0, 0, 0, 0.1);
@@ -685,7 +685,7 @@ export default {
 .NPC-Big-Book-preview-brown {
   .wordDetailChs {
     .zhedie-white {
-      .el-collapse-item__header {
+      .topTitle {
         height: 40px;
         background: #fff !important;
         border: 1px solid rgba(0, 0, 0, 0.1);