瀏覽代碼

1、课件移动调整 2、只有编辑预览才有选中组件

dsy 4 天之前
父節點
當前提交
be2b1d5481

+ 1 - 1
.env

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

+ 1 - 0
src/components/CommonPreview.vue

@@ -134,6 +134,7 @@
             :show-remark="isShowAudit"
             :component-remark-obj="remark_list_obj"
             :project="project"
+            :type="type"
             @computeScroll="computeScroll"
             @addRemark="addRemark"
             @editNote="handEditNote"

+ 1 - 1
src/views/book/courseware/create/components/question/fill/FillSetting.vue

@@ -58,7 +58,7 @@
           <el-option v-for="{ value, label } in fillFontList" :key="value" :label="label" :value="value" />
         </el-select>
       </el-form-item>
-      <el-form-item label="输入框初始宽度">
+      <el-form-item label="横线长度">
         <el-input v-model="property.input_default_width" type="number" placeholder="请输入">
           <template slot="append">px</template>
         </el-input>

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

@@ -149,6 +149,10 @@ export default {
       type: Object,
       default: () => ({}),
     },
+    type: {
+      type: String,
+      default: '',
+    },
   },
   data() {
     return {
@@ -208,9 +212,12 @@ export default {
   methods: {
     /**
      * 处理选中组件事件
+     * 这个事件只在编辑预览模式下触发
      * @param {string} component_id 组件在课件内部的 ID
      */
     selectedComponent(component_id) {
+      if (this.type !== 'edit_preview') return;
+
       this.curSelectId = component_id;
       const selectedComponent = this.componentList.find((item) => item.component_id === component_id);
 

+ 5 - 5
src/views/book/courseware/preview/components/picture/PicturePreview.vue

@@ -1,5 +1,5 @@
 <template>
-  <div ref="pictureArea" class="picture-preview" :style="getAreaStyle()">
+  <div ref="pictureArea" class="picture-preview" :style="[getAreaStyle(), getComponentStyle()]">
     <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
 
     <div ref="pictureAreaBox" class="main">
@@ -10,7 +10,7 @@
             ref="pictureCarousel"
             indicator-position="none"
             :autoplay="false"
-            :style="{ height: elementHeight - 144 - 32 + 'px' }"
+            :style="{ height: `${elementHeight - 144 - 32}px` }"
             @change="handleChange"
           >
             <el-carousel-item v-for="(file, i) in data.file_list" :key="i">
@@ -37,8 +37,8 @@
           </div>
         </div>
         <div
-          v-else
           v-for="file in data.file_list"
+          v-else
           :key="file.file_id"
           class="alone-pic-area"
           :style="getVideoItemStyle()"
@@ -89,7 +89,7 @@ export default {
     data: {
       handler(val) {
         this.fileLen = val.file_list.length;
-        if (this.fileLen == 0) return;
+        if (this.fileLen === 0) return;
         if (this.data.property.view_method === 'list') {
           const ele = this.$refs.pictureAreaBox;
           const sn_position = this.data.property.sn_position;
@@ -136,7 +136,7 @@ export default {
         }
 
         this.elementHeight = Math.max(this.elementHeight, this.data.min_height);
-        this.$emit('handleHeightChange', this.id, this.elementHeight + 'px');
+        this.$emit('handleHeightChange', this.id, `${this.elementHeight}px`);
       },
       deep: true,
     },

+ 6 - 8
src/views/personal_workbench/project/ProductionEditorialManage.vue

@@ -102,7 +102,7 @@
           <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>
+              <span v-if="i > 1 && computedIsRootFirst(i)" class="link" @click="moveChapterTreeNode(i, 0)">上移</span>
               <span v-if="i < node_list.length - 1" class="link" @click="moveChapterTreeNode(i, 1)">下移</span>
             </template>
 
@@ -474,12 +474,12 @@ export default {
         });
     },
     /**
-     * 计算是否为第一个教材内容节点
+     * 计算是否为根节点下第一个教材内容节点
      * @param {number} i - 当前节点索引
+     * @return {boolean} - 是否为根节点下第一个教材内容节点
      */
-    computedIsFirst(i) {
-      const index = this.node_list.findIndex((node) => node.is_leaf_chapter === 'true');
-      return i !== index;
+    computedIsRootFirst(i) {
+      return !isEnable(this.node_list[i - 1].is_root);
     },
     /**
      * 计算是否为同深度最后一个节点
@@ -505,9 +505,7 @@ export default {
      */
     moveChapterTreeNode(i, dest_position) {
       const id = this.node_list[i].id;
-      const is_leaf_chapter = this.node_list[dest_position === 0 ? i - 1 : i + 1].is_leaf_chapter === 'false';
-      const deep = is_leaf_chapter ? 2 : 1;
-      const num = dest_position === 0 ? i - deep : i + deep;
+      const num = dest_position === 0 ? i - 1 : i + 1;
       const dest_id = this.node_list[num].id;
 
       ChapterMoveTreeNode({ id, dest_id, dest_position }).then(() => {

+ 2 - 6
src/views/personal_workbench/template_list_manager/index.vue

@@ -34,8 +34,8 @@
             {{ row.type === 1 ? '整本教材' : row.type === 3 ? '整课内容' : '单页内容' }}
           </template>
         </el-table-column>
-        <el-table-column prop="label_list" label="标签" align="center" header-align="center"
-          ><template slot-scope="{ row }">
+        <el-table-column prop="label_list" label="标签" align="center" header-align="center">
+          <template slot-scope="{ row }">
             {{ row.label_list.join('、') }}
           </template>
         </el-table-column>
@@ -61,12 +61,8 @@
         <el-table-column prop="operation" label="操作" fixed="right" width="230" align="center" header-align="center">
           <template slot-scope="{ row }">
             <span class="link" @click="previewTemplate(row)">预览</span>
-            <span v-if="row.status === 0 || row.status === 3" class="link" @click="changeStatusTemplate(row, 1)">{{
-              '申请发布'
-            }}</span>
             <span v-if="row.status === 1" class="link" @click="changeStatusTemplate(row, 2)">{{ '发布' }}</span>
             <span v-if="row.status === 1" class="link" @click="changeStatusTemplate(row, 4)">{{ '驳回' }}</span>
-            <span v-if="row.status === 2" class="link" @click="changeStatusTemplate(row, 3)">{{ '取消发布' }}</span>
             <span v-if="row.status === 4" class="link" @click="changeStatusTemplate(row, 1)">{{ '撤销驳回' }}</span>
             <span class="link" @click="changeUseScope(row)">{{
               row.use_scope === 0 ? '设置全域范围' : '取消全域范围'