Explorar o código

添加审批增加选中文本

natasha hai 1 semana
pai
achega
200dc44073

+ 22 - 1
src/components/AuditRemark.vue

@@ -2,7 +2,14 @@
   <div class="audit-remark">
   <div class="audit-remark">
     <h5>审校批注</h5>
     <h5>审校批注</h5>
     <ul v-if="remarkList.length > 0">
     <ul v-if="remarkList.length > 0">
-      <li v-for="{ id: remarkId, content, remark_person_name, remark_time } in remarkList" :key="remarkId">
+      <li
+        v-for="{ id: remarkId, content, remark_person_name, remark_time, content_select } in remarkList"
+        :key="remarkId"
+      >
+        <template v-if="content_select">
+          <span class="el-icon-notebook-2"> 原文</span>
+          <span class="content-select">{{ content_select }}</span>
+        </template>
         <p v-html="content"></p>
         <p v-html="content"></p>
         <div v-if="isAudit" class="remark-bottom">
         <div v-if="isAudit" class="remark-bottom">
           <span>{{ remark_person_name + ':' + remark_time }}</span>
           <span>{{ remark_person_name + ':' + remark_time }}</span>
@@ -66,6 +73,20 @@ export default {
     li {
     li {
       border-bottom: 1px solid #e5e5e5;
       border-bottom: 1px solid #e5e5e5;
 
 
+      .el-icon-notebook-2 {
+        display: block;
+        padding: 10px 10px 0;
+        margin-bottom: 4px;
+        font-size: 12px;
+        color: grey;
+      }
+
+      .content-select {
+        display: block;
+        margin-left: 10px;
+        border-bottom: 1px solid #eee;
+      }
+
       > p {
       > p {
         padding: 5px;
         padding: 5px;
       }
       }

+ 4 - 1
src/components/CommonPreview.vue

@@ -834,7 +834,7 @@ export default {
         }, {});
         }, {});
       });
       });
     },
     },
-    addRemark(selectNode, x, y, componentId) {
+    addRemark(selectNode, x, y, componentId, content_select) {
       this.remark_content = '';
       this.remark_content = '';
       this.visible = true;
       this.visible = true;
       if (selectNode) {
       if (selectNode) {
@@ -842,12 +842,14 @@ export default {
           x,
           x,
           y,
           y,
           componentId,
           componentId,
+          content_select,
         };
         };
       } else {
       } else {
         this.menuPosition = {
         this.menuPosition = {
           x: -1,
           x: -1,
           y: -1,
           y: -1,
           componentId: 'WHOLE',
           componentId: 'WHOLE',
+          content_select,
         };
         };
       }
       }
     },
     },
@@ -863,6 +865,7 @@ export default {
         component_id: this.menuPosition.componentId,
         component_id: this.menuPosition.componentId,
         position_x: this.menuPosition.x,
         position_x: this.menuPosition.x,
         position_y: this.menuPosition.y,
         position_y: this.menuPosition.y,
+        content_select: this.menuPosition.content_select,
       })
       })
         .then(() => {
         .then(() => {
           this.submit_loading = false;
           this.submit_loading = false;

+ 3 - 0
src/views/book/courseware/preview/CoursewarePreview.vue

@@ -446,6 +446,7 @@ export default {
     },
     },
     handleMenuItemClick(event, type) {
     handleMenuItemClick(event, type) {
       this.showMenu = false; // 隐藏菜单
       this.showMenu = false; // 隐藏菜单
+      let text = '';
       if (type && type === 'tool') {
       if (type && type === 'tool') {
         let info = this.selectHandleInfo;
         let info = this.selectHandleInfo;
         this.menuPosition = {
         this.menuPosition = {
@@ -453,6 +454,7 @@ export default {
           y: event.clientY - this.divPosition.top - 20,
           y: event.clientY - this.divPosition.top - 20,
         }; // 设置菜单位置
         }; // 设置菜单位置
         this.componentId = info.blockId;
         this.componentId = info.blockId;
+        text = info.text;
 
 
         this.$emit('computeScroll');
         this.$emit('computeScroll');
         this.showMenu = false;
         this.showMenu = false;
@@ -463,6 +465,7 @@ export default {
         this.menuPosition.x,
         this.menuPosition.x,
         this.menuPosition.y,
         this.menuPosition.y,
         this.componentId,
         this.componentId,
+        text,
       );
       );
     },
     },
     handleMouseDown(event) {
     handleMouseDown(event) {