Ver Fonte

修改问题

dsy há 1 dia atrás
pai
commit
7bd53d9da0

+ 5 - 27
src/components/CommonPreview.vue

@@ -25,14 +25,6 @@
             "
             >完成选择</span
           >
-          <span
-            class="link"
-            @click="
-              groupShowAll = false;
-              isShowGroup = false;
-            "
-            >完成选择</span
-          >
         </div>
         <span
           v-else
@@ -80,10 +72,7 @@
         <div class="courseware-tree">
           <div
             v-for="{ id: nodeId, name, status_name, deep, is_leaf_chapter } in node_list"
-            v-for="{ id: nodeId, name, status_name, deep, is_leaf_chapter } in node_list"
-          :key="nodeId"
             :key="nodeId"
-            <div
             :class="['menu-item', { active: curSelectId === nodeId }, { courseware: isTrue(is_leaf_chapter) }]"
             :style="computedNameStyle(deep, isTrue(is_leaf_chapter))"
             @click="selectChapterNode(nodeId, isTrue(is_leaf_chapter))"
@@ -443,18 +432,6 @@
 
     <SimAnswerPermissionControl :visible.sync="visiblePermissionControl" :permission-control.sync="permissionControl" />
     <PreviewURL :url="preview_url" :visible.sync="visiblePreviewURL" />
-
-    <el-dialog
-      title="翻译"
-      width="240px"
-      :close-on-click-modal="false"
-      :visible="visibleTranslate"
-      @close="dialogClose('Translate')"
-    >
-      <el-select v-model="lang" placeholder="请选择语言" size="mini" class="lang-select">
-        <el-option v-for="item in langList" :key="item.type" :label="item.name" :value="item.type" />
-      </el-select>
-    </el-dialog>
   </div>
 </template>
 
@@ -575,7 +552,7 @@ export default {
       },
       { icon: 'collect', title: '收藏', handle: 'getCollect', param: { type: '11' } },
       { icon: 'note', title: '笔记', handle: 'getNote', param: { type: '12' } },
-      { icon: 'translate', title: '翻译', handle: 'openTranslate', param: { type: '21' } },
+      { icon: 'translate', title: '多语言', handle: 'openTranslate', param: { type: '21' } },
       { icon: 'setting', title: '设置', handle: '', param: {} },
     ];
 
@@ -641,7 +618,6 @@ export default {
       isChildDataLoad: false,
       mindMapJsonData: {}, // 思维导图json数据
       drawerType: '', // 抽屉类型
-      visibleTranslate: false, // 翻译弹窗显示状态
       page_capacity: 10,
       cur_page: 1,
       file_list: [],
@@ -1073,7 +1049,6 @@ export default {
      * 打开选择语言弹窗
      */
     openTranslate(params) {
-      // this.visibleTranslate = true;
       if (params && params.type) this.drawerType = Number(params.type);
     },
     /**
@@ -1291,12 +1266,15 @@ export default {
       if (!isTrue(is_leaf_chapter)) {
         return '';
       }
-      if (this.courseware_info.is_can_start_edit === 'false') {
+      // 如果当前选中节点且不可编辑,显示默认色
+      if (this.curSelectId === nodeId && this.courseware_info.is_can_start_edit === 'false') {
         return '';
       }
+      // 当前选中节点,显示高亮色
       if (this.curSelectId === nodeId) {
         return '#4095e5';
       }
+      // 其他节点,根据状态显示不同颜色
       let color = '#74b9ff';
       if (statusName === '审核通过') {
         color = '#27ae60';

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

@@ -80,7 +80,7 @@ export default {
   },
   created() {
     GetCoursewareBackground({ id: this.id }).then(({ background }) => {
-      this.background = JSON.parse(background);
+      if (background) this.background = JSON.parse(background);
     });
   },
   methods: {