natasha vor 3 Jahren
Ursprung
Commit
5dc032464f

+ 4 - 1
src/components/Adult/Preview.vue

@@ -121,7 +121,7 @@
           v-if="item.number || item.z_title || item.f_title"
         >
           <b v-if="item.number">{{ item.number }}</b>
-          <div class="title-box-right">
+          <div class="title-box-right" :class="[item.is_textIndex?'title-box-right-index':'']">
             <h2 v-if="item.z_title" v-html="item.z_title"></h2>
             <h3
               v-if="item.f_title"
@@ -898,6 +898,9 @@ export default {
           white-space: pre-wrap;
           word-break: break-word;
         }
+        .title-box-right-index{
+            padding-left: 51px;
+        }
       }
     }
     .NNPE-tableList {

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

@@ -14,6 +14,7 @@
           :options="{
             group: { name: 'itxst' + index, pull: 'clone' },
           }"
+          class="content-box"
         >
           <transition-group>
             <div
@@ -269,6 +270,11 @@ export default {
       line-height: 32px;
       margin-right: 4px;
     }
+    .content-box{
+        background: #E9E9E9;
+        padding: 8px;
+        border-radius: 8px;
+    }
   }
   .fw {
     height: 100%;
@@ -304,7 +310,7 @@ export default {
         .item {
           // width: 82px;
           // height: 70px;
-          padding: 8px 16px;
+          padding: 0px 16px;
           background: #ffffff;
           border-radius: 8px;
           text-align: center;

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

@@ -240,7 +240,7 @@ export default {
 
   .close-icon {
     position: absolute;
-    top: 8px;
+    top: 0px;
     right: 8px;
     width: 32px;
     height: 32px;

+ 1 - 1
src/components/TreeView.vue

@@ -9,7 +9,7 @@
               : '0px',
         }"
         class="tree_box"
-        slot-scope="{ node, index, path, tree }"
+        slot-scope="{ node, path, tree }"
       >
         <span
           @click="tree.toggleFold(node, path)"

+ 6 - 1
src/views/adultInput.vue

@@ -144,7 +144,11 @@
               @blur="onBlur(topic, 'f_title')"
             />
           </div>
-
+          <div class="Big-Book-top">
+            <span>标题缩进</span>
+            <el-radio v-model="topic.is_textIndex" :label="true">是</el-radio>
+            <el-radio v-model="topic.is_textIndex" :label="false">否</el-radio>
+          </div>
           <div class="Big-Book-top">
             <span>是否有背景色</span>
             <el-radio v-model="topic.is_bg" :label="true">有</el-radio>
@@ -1121,6 +1125,7 @@ export default {
           f_title: "",
           is_bg: false, // 是否有背景色
           is_layout: false, // 是不是按背景图布局
+          is_textIndex: false,
           table_list: [],
         };
         for (let i = 0; i < this.row; i++) {

+ 33 - 2
src/views/courseView.vue

@@ -2,7 +2,7 @@
   <div class="container">
     <Header />
     <div class="content">
-      <div id="content-tree" class="content-tree">
+      <div id="content-tree" :class="[fullTree ? 'content-tree-full' : 'content-tree']">
         <TreeView
           ref="treeView"
           :book-id="bookId"
@@ -18,9 +18,14 @@
         <div v-if="chapterId" class="title-box">
           <img
             v-if="!treeFlag"
-            src="../assets/common/icon-treelist.png"
+            src="../assets/common/icon-view-back.png"
             @click="treeShow"
           />
+          <img
+            v-if="!treeFlag"
+            src="../assets/common/icon-treelist.png"
+            @click="chooseCourseware"
+          />
           <!-- <h2 class="title">{{ chapterName }}</h2> -->
           <!-- <el-switch
             v-if="!treeFlag"
@@ -80,6 +85,7 @@ export default {
       FatherTreeData: null,
       themeColor: "",
       loading: false,
+      fullTree: false, // 全屏模式下树是否显示
     };
   },
   created() {
@@ -98,6 +104,10 @@ export default {
       _this.isAnswerShow = false;
 
       _this.onGetData();
+      if (!_this.treeFlag) {
+        _this.fullTree = false;
+        document.getElementById("content-tree").style.display = "none";
+      }
     },
     // 点击全屏展示 隐藏tree
     fullScreen() {
@@ -106,6 +116,7 @@ export default {
     },
     treeShow() {
       this.treeFlag = true;
+      this.fullTree = false;
       document.getElementById("content-tree").style.display = "block";
     },
     // 获取预览数据
@@ -163,6 +174,15 @@ export default {
     handleBookUserAnswer(data) {
       console.log(data);
     },
+    // 悬浮树隐藏显示
+    chooseCourseware() {
+      this.fullTree = !this.fullTree;
+      if (this.fullTree) {
+        document.getElementById("content-tree").style.display = "block";
+      } else {
+        document.getElementById("content-tree").style.display = "none";
+      }
+    },
   },
 };
 </script>
@@ -187,6 +207,17 @@ export default {
       left: 0;
       padding-top: 64px;
     }
+    .content-tree-full {
+      position: fixed;
+      top: 100px;
+      left: 152px;
+      max-height: 588px;
+      overflow: auto;
+      z-index: 999;
+      background: #fff;
+      box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
+      border-radius: 4px;
+    }
     .inner {
       // border-left: 1px solid #d9d9d9;
       width: 1000px;