dsy 1 месяц назад
Родитель
Сommit
14afab301a

+ 1 - 1
.env

@@ -11,4 +11,4 @@ VUE_APP_BookWebSI = '/GCLSBookWebSI/ServiceInterface'
 VUE_APP_EepServer = '/EEPServer/SI'
 
 #version
-VUE_APP_VERSION = '2026.01.23'
+VUE_APP_VERSION = '2026.01.27'

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "eep_page",
-  "version": "2026.01.23",
+  "version": "2026.01.27",
   "private": true,
   "main": "main.js",
   "description": "智慧梧桐数字教材编辑器",

+ 19 - 2
src/components/CommonPreview.vue

@@ -49,7 +49,7 @@
         <!-- 教材章节树 -->
         <div class="courseware-tree">
           <div
-            v-for="{ id: nodeId, name, deep, is_leaf_chapter } in node_list"
+            v-for="{ id: nodeId, name, status_name, deep, is_leaf_chapter } in node_list"
             :key="nodeId"
             :class="['menu-item', { active: curSelectId === nodeId }, { courseware: isTrue(is_leaf_chapter) }]"
             :style="computedNameStyle(deep, isTrue(is_leaf_chapter))"
@@ -58,6 +58,7 @@
             <span class="name nowrap-ellipsis" :title="name">
               {{ name }}
             </span>
+            <span v-if="type === 'edit_preview'" class="status">{{ status_name }}</span>
           </div>
         </div>
       </aside>
@@ -430,6 +431,10 @@ export default {
       type: Boolean,
       default: false,
     },
+    type: {
+      type: String,
+      default: '',
+    },
   },
   data() {
     const sidebarIconList = [
@@ -1595,7 +1600,8 @@ $total-width: $courseware-width + $courseware-left-margin + $courseware-right-ma
 
           &.courseware {
             &:hover {
-              .name {
+              .name,
+              .status {
                 background-color: #f3f3f3;
               }
             }
@@ -1615,6 +1621,17 @@ $total-width: $courseware-width + $courseware-left-margin + $courseware-right-ma
             border-radius: 4px;
           }
 
+          .status {
+            height: 32px;
+            padding: 4px 8px 4px 4px;
+            font-size: 12px;
+            line-height: 24px;
+            color: #f00004;
+            border-radius: 4px;
+            border-top-left-radius: 0;
+            border-bottom-left-radius: 0;
+          }
+
           &.active {
             .name {
               font-weight: bold;

+ 1 - 1
src/views/book/courseware/create/components/CreateCanvas.vue

@@ -1473,7 +1473,7 @@ export default {
         this.$message.error('请选择两个组件进行交换');
         return;
       }
-      this.$confirm('组件未保存改动将丢失。确定要交换这两个组件的位置吗?', '提示', {
+      this.$confirm('组件未保存改动将丢失。确定要交换这两个组件的位置吗?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',

+ 114 - 22
src/views/personal_workbench/check_task/index.vue

@@ -23,18 +23,48 @@
         </ul>
       </div>
       <div class="textbook-chapter">
-        <div class="chapter-header">
+        <div ref="chapterHeader" class="chapter-header">
           <span class="cell">教材内容</span>
+          <span class="cell">最后编辑人</span>
+          <span class="cell">最后编辑时间</span>
+          <span class="cell">制作人</span>
           <span class="cell">我的审校节点</span>
           <span class="cell">状态</span>
         </div>
-        <div class="chapter-list">
-          <div v-for="chapter in courseware_list" :key="chapter.id" class="chapter-item">
-            <span class="path" @click="navigateToChapter(chapter.id)">{{ chapter.name_path }}</span>
-            <span class="audit-node-desc nowrap-ellipsis" :title="chapter.my_audit_node_desc">
-              {{ chapter.my_audit_node_desc }}
+        <div ref="chapterList" class="chapter-list">
+          <div
+            v-for="{
+              id,
+              name,
+              producer_list,
+              status_name,
+              deep,
+              is_my_audit_task,
+              last_editor_name,
+              last_edit_time,
+              is_leaf_chapter,
+              my_audit_node_desc,
+            } in node_list"
+            :key="id"
+            :style="computedNameStyle(deep, isTrue(is_my_audit_task))"
+            class="chapter-item"
+          >
+            <span
+              class="path"
+              :style="computedPathStyle(isTrue(is_my_audit_task))"
+              @click="navigateToChapter(id, isTrue(is_my_audit_task))"
+            >
+              {{ name }}
+            </span>
+            <span>{{ isTrue(is_leaf_chapter) ? last_editor_name : '' }}</span>
+            <span>{{ isTrue(is_leaf_chapter) ? last_edit_time : '' }}</span>
+            <span :title="producer_list.map((producer) => producer.name).join(';')">
+              {{ producer_list.map((producer) => producer.name).join(';') }}
+            </span>
+            <span class="audit-node-desc nowrap-ellipsis" :title="my_audit_node_desc">
+              {{ my_audit_node_desc }}
             </span>
-            <span class="status">{{ chapter.status_name }}</span>
+            <span class="status">{{ status_name }}</span>
           </div>
         </div>
       </div>
@@ -45,8 +75,9 @@
 <script>
 import MenuPage from '../common/menu.vue';
 
-import { GetMyBookCoursewareTaskList_Audit } from '@/api/project';
+import { ChapterGetBookChapterStructExpandList } from '@/api/book';
 import { PageQueryMyProjectList_Auditor } from '@/api/list';
+import { isTrue } from '@/utils/validate';
 
 export default {
   name: 'CheckTaskPage',
@@ -57,7 +88,8 @@ export default {
     return {
       project_list: [],
       cur_project_id: '',
-      courseware_list: [],
+      node_list: [],
+      isTrue,
     };
   },
   created() {
@@ -72,16 +104,30 @@ export default {
         this.project_list = project_list;
         if (this.project_list.length > 0) {
           this.cur_project_id = this.project_list[0].id;
-          this.getMyBookCoursewareTaskList();
+          this.getBookChapterStructExpandList();
         }
       });
     },
     /**
-     * 查询当前项目的审校任务列表
+     * 得到教材章节结构展开列表
      */
-    getMyBookCoursewareTaskList() {
-      GetMyBookCoursewareTaskList_Audit({ project_id: this.cur_project_id }).then(({ courseware_list }) => {
-        this.courseware_list = courseware_list;
+    getBookChapterStructExpandList() {
+      ChapterGetBookChapterStructExpandList({
+        book_id: this.cur_project_id,
+        node_deep_mode: 0,
+        is_contain_producer: 'true',
+        is_contain_auditor: 'true',
+      }).then(({ node_list }) => {
+        this.node_list = node_list;
+
+        this.$nextTick(() => {
+          const chapterList = this.$refs.chapterList;
+          if (chapterList.scrollHeight > chapterList.clientHeight) {
+            this.$refs.chapterHeader.classList.add('has-scrollbar');
+          } else {
+            this.$refs.chapterHeader.classList.remove('has-scrollbar');
+          }
+        });
       });
     },
     /**
@@ -90,13 +136,41 @@ export default {
      */
     selectProject(id) {
       this.cur_project_id = id;
-      this.getMyBookCoursewareTaskList();
+      this.getBookChapterStructExpandList();
+    },
+    /**
+     * 计算章节名称样式
+     * @param {number} deep - 节点深度
+     * @param {boolean} isMyAuditTask - 是否是我的审校任务
+     * @returns {Object} - 样式对象
+     */
+    computedNameStyle(deep, isMyAuditTask) {
+      return {
+        'padding-left': `${(deep - 1) * 16}px`,
+        fontWeight: deep === 1 ? 'bold' : 'normal',
+        cursor: isMyAuditTask ? 'pointer' : 'auto',
+      };
+    },
+    /**
+     * 计算章节路径样式
+     * @param {boolean} isMyAuditTask - 是否是我的审校任务
+     * @returns {Object} - 样式对象
+     */
+    computedPathStyle(isMyAuditTask) {
+      console.log(isMyAuditTask);
+
+      return {
+        color: isMyAuditTask ? '#165dff' : 'default',
+      };
     },
     /**
      * 导航到章节
      * @param {string} id - 章节ID
+     * @param {boolean} isMyAuditTask - 是否是我的审校任务
      */
-    navigateToChapter(id) {
+    navigateToChapter(id, isMyAuditTask) {
+      if (!isMyAuditTask) return;
+      if (!id) return;
       this.$router.push({
         path: `/personal_workbench/check_task/audit/${id}`,
         query: { project_id: this.cur_project_id },
@@ -112,6 +186,8 @@ export default {
 .check-task {
   @include page-base;
 
+  height: 100%;
+
   .check-main {
     display: flex;
     flex: 1;
@@ -206,7 +282,9 @@ export default {
 
       @mixin cell {
         > span {
+          min-height: 37px;
           padding: 8px 12px;
+          border-right: $border;
         }
 
         :first-child {
@@ -215,9 +293,24 @@ export default {
         }
 
         :nth-child(2) {
+          width: 120px;
+          max-width: 120px;
+        }
+
+        :nth-child(3) {
+          width: 170px;
+          max-width: 170px;
+          font-weight: normal;
+        }
+
+        :nth-child(4) {
+          width: 140px;
+          max-width: 140px;
+        }
+
+        :nth-child(5) {
           width: 320px;
           text-align: center;
-          border-right: $border;
         }
 
         :last-child {
@@ -239,6 +332,10 @@ export default {
           font-weight: bold;
           text-align: center;
         }
+
+        &.has-scrollbar {
+          padding-right: 15px;
+        }
       }
 
       .chapter-list {
@@ -251,11 +348,6 @@ export default {
           font-size: 14px;
           border-bottom: $border;
 
-          .path {
-            color: $main-color;
-            cursor: pointer;
-          }
-
           @include cell;
         }
       }

+ 3 - 2
src/views/personal_workbench/edit_task/index.vue

@@ -41,6 +41,7 @@
               is_my_edit_task,
               last_editor_name,
               last_edit_time,
+              is_leaf_chapter,
             } in node_list"
             :key="id"
             :style="computedNameStyle(deep, isTrue(is_my_edit_task))"
@@ -53,8 +54,8 @@
             >
               {{ name }}
             </span>
-            <span>{{ last_editor_name }}</span>
-            <span>{{ last_edit_time }}</span>
+            <span>{{ isTrue(is_leaf_chapter) ? last_editor_name : '' }}</span>
+            <span>{{ isTrue(is_leaf_chapter) ? last_edit_time : '' }}</span>
             <span :title="producer_list.map((producer) => producer.name).join(';')">
               {{ producer_list.map((producer) => producer.name).join(';') }}
             </span>

+ 1 - 1
src/views/personal_workbench/edit_task/preview/index.vue

@@ -2,7 +2,7 @@
   <div class="task-preview">
     <MenuPage only-key="/personal_workbench/edit_task" />
 
-    <CommonPreview :id="id" ref="preview" :project-id="project_id">
+    <CommonPreview :id="id" ref="preview" :project-id="project_id" type="edit_preview">
       <template #operator="{ courseware }">
         <span class="link" @click="saveCoursewareAsTemplate">保存为个人模板</span>
         <span v-if="isTrue(courseware.is_can_start_edit)" class="link" @click="editTask">开始编辑</span>

+ 3 - 3
src/views/personal_workbench/project/ProductionEditorialManage.vue

@@ -89,8 +89,8 @@
             {{ auditor_desc }}
           </div>
           <div class="status">{{ status_name }}</div>
-          <div class="last-editor">{{ last_editor_name }}</div>
-          <div class="last-edit-time">{{ last_edit_time }}</div>
+          <div class="last-editor">{{ isEnable(is_leaf_chapter) ? last_editor_name : '' }}</div>
+          <div class="last-edit-time">{{ isEnable(is_leaf_chapter) ? last_edit_time : '' }}</div>
           <div class="operator">
             <template v-if="isEnable(is_leaf_chapter)">
               <span v-if="i > 0 && computedIsFirst(i)" class="link" @click="moveChapterTreeNode(i, 0)">上移</span>
@@ -569,7 +569,7 @@ export default {
       }
 
       &:nth-child(4) {
-        width: 100px;
+        width: 120px;
       }
 
       &:nth-child(5) {