zq 1 deň pred
rodič
commit
a7d44f82e4
1 zmenil súbory, kde vykonal 38 pridanie a 3 odobranie
  1. 38 3
      src/web_preview/index.vue

+ 38 - 3
src/web_preview/index.vue

@@ -325,7 +325,10 @@
           </div>
 
           <div v-if="curToolbarIcon === 'feedback'" class="resource_box">
-            <h5>{{ drawerTitle }}</h5>
+            <div class="drawer-header">
+              <h5>{{ drawerTitle }}</h5>
+              <el-button type="text" size="mini" icon="el-icon-plus" @click="handAddFeedback">添加反馈</el-button>
+            </div>
             <div style="height: 40px"></div>
             <ul v-if="allFeedbackList.length > 0" class="card-box">
               <li v-for="item in allFeedbackList" :key="item.id">
@@ -337,8 +340,10 @@
                   <el-button type="text" class="el-icon-edit" @click="handEditFeedback(item)"> 编辑</el-button>
                   <el-divider direction="vertical" />
                   <el-button type="text" class="el-icon-delete" @click="handDelFeedback(item.id)"> 删除</el-button>
-                  <el-divider direction="vertical" />
-                  <el-button type="text" class="el-icon-place" @click="handleLocation(item, 13)"> 定位</el-button>
+                  <el-divider direction="vertical" v-if="item.blockId" />
+                  <el-button v-if="item.blockId" type="text" class="el-icon-place" @click="handleLocation(item, 13)">
+                    定位</el-button
+                  >
                 </div>
               </li>
             </ul>
@@ -1450,6 +1455,15 @@ export default {
         }
       });
     },
+    handAddFeedback() {
+      this.oldRichData = {};
+      this.newSelectedInfo = {
+        text: '整体反馈',
+        coursewareId: this.curSelectId,
+      };
+      this.editDialogOpen = true;
+      this.dialogType = 2;
+    },
     async handEditFeedback(feedBack) {
       this.oldRichData = {};
       if (this.allFeedbackList.length === 0) {
@@ -1471,6 +1485,7 @@ export default {
       this.dialogType = 2;
     },
     saveFeedback(feedBack) {
+      debugger;
       if (feedBack.id) {
         this.delFeedback(feedBack.id);
       }
@@ -1961,6 +1976,26 @@ $total-width: $courseware-width + $courseware-left-margin + $courseware-right-ma
             background: #f2f3f5;
           }
 
+          .drawer-header {
+            position: fixed;
+            z-index: 999;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            width: 240px;
+            padding: 0 5px;
+            background: #f2f3f5;
+
+            h5 {
+              position: static;
+              width: auto;
+              margin: 0;
+              font-size: 18px;
+              line-height: 40px;
+              background: transparent;
+            }
+          }
+
           .scroll-container {
             display: flex;
             flex-direction: column;