2 Комити efe3726702 ... 287c4387c3

Аутор SHA1 Порука Датум
  zq 287c4387c3 Merge branch 'master' of http://gcls-git.helxsoft.cn/GCLS/eep_page пре 2 дана
  zq 26d4386d30 搜索功能 加全路径,修复搜藏按钮位置问题 пре 2 дана

+ 5 - 8
src/components/CommonPreview.vue

@@ -194,16 +194,13 @@
             </el-row>
             </el-row>
             <div>
             <div>
               <el-table :data="searchList" :show-header="false">
               <el-table :data="searchList" :show-header="false">
-                <!-- <el-table-column prop="courseware_name" label="课件" />
-                <el-table-column prop="component_type" label="组件" /> -->
                 <el-table-column>
                 <el-table-column>
                   <template #default="{ row }">
                   <template #default="{ row }">
-                    {{ row.courseware_name + ' / ' + row.component_type_name }}
-                  </template>
-                </el-table-column>
-                <el-table-column label="" width="50">
-                  <template #default="{ row }">
-                    <el-link type="primary" @click="handleLocation(row, 0)">定位</el-link>
+                    <div>{{ row.courseware_name_path }}</div>
+                    <div style="display: flex; align-items: center; justify-content: space-between">
+                      <span>{{ row.courseware_name }}</span>
+                      <el-link type="primary" @click="handleLocation(row, 0)">定位</el-link>
+                    </div>
                   </template>
                   </template>
                 </el-table-column>
                 </el-table-column>
               </el-table>
               </el-table>

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

@@ -773,7 +773,6 @@ export default {
     // 处理选中文本
     // 处理选中文本
     handleTextSelection() {
     handleTextSelection() {
       this.showToolbar = false;
       this.showToolbar = false;
-      // 延迟处理,确保选择已完成
       setTimeout(() => {
       setTimeout(() => {
         const selection = window.getSelection();
         const selection = window.getSelection();
         if (selection.toString().trim() === '') return null;
         if (selection.toString().trim() === '') return null;
@@ -789,12 +788,11 @@ export default {
         this.selectHandleInfo = selectHandleInfo;
         this.selectHandleInfo = selectHandleInfo;
 
 
         if (!this.canRemark) this.showToolbar = true;
         if (!this.canRemark) this.showToolbar = true;
-        const container = document.querySelector('.courseware');
-        const boxRect = container.getBoundingClientRect();
         const selectRect = range.getBoundingClientRect();
         const selectRect = range.getBoundingClientRect();
         this.contentmenu = {
         this.contentmenu = {
-          left: `${Math.round(selectRect.left - boxRect.left + selectRect.width / 2 - 63)}px`,
-          top: `${Math.round(selectRect.top - boxRect.top + selectRect.height)}px`, // 向上偏移10px
+          position: 'fixed',
+          left: `${Math.round(selectRect.left + selectRect.width / 2 - 63)}px`,
+          top: `${Math.round(selectRect.bottom + 5)}px`,
         };
         };
       }, 100);
       }, 100);
       if (this.canRemark) {
       if (this.canRemark) {
@@ -1216,7 +1214,6 @@ export default {
   }
   }
 
 
   .contentmenu {
   .contentmenu {
-    position: absolute;
     z-index: 999;
     z-index: 999;
     display: flex;
     display: flex;
     column-gap: 4px;
     column-gap: 4px;