|
|
@@ -35,9 +35,6 @@
|
|
|
"
|
|
|
>显示分组</span
|
|
|
>
|
|
|
- <span class="link">
|
|
|
- <el-checkbox v-model="chinese" true-label="zh-Hant" false-label="zh-Hans">繁体</el-checkbox>
|
|
|
- </span>
|
|
|
<span v-if="false" class="link">
|
|
|
<el-checkbox v-model="showPinYin" true-label="true" false-label="false">拼音</el-checkbox>
|
|
|
</span>
|
|
|
@@ -71,7 +68,16 @@
|
|
|
<!-- 教材章节树 -->
|
|
|
<div class="courseware-tree">
|
|
|
<div
|
|
|
- v-for="{ id: nodeId, name, status, status_name, deep, is_leaf_chapter, is_my_edit_task } in node_list"
|
|
|
+ v-for="{
|
|
|
+ id: nodeId,
|
|
|
+ name,
|
|
|
+ status,
|
|
|
+ status_name,
|
|
|
+ deep,
|
|
|
+ is_leaf_chapter,
|
|
|
+ is_my_edit_task,
|
|
|
+ is_show_submit_audit_button,
|
|
|
+ } in node_list"
|
|
|
:key="nodeId"
|
|
|
:class="['menu-item', { active: curSelectId === nodeId }, { courseware: isTrue(is_leaf_chapter) }]"
|
|
|
:style="computedNameStyle(deep, isTrue(is_leaf_chapter))"
|
|
|
@@ -85,6 +91,9 @@
|
|
|
{{ name }}
|
|
|
</span>
|
|
|
<span v-if="['audit', 'edit_preview'].includes(type)" class="status">{{ status_name }}</span>
|
|
|
+ <template v-if="!isTrue(is_leaf_chapter) && isTrue(is_show_submit_audit_button)">
|
|
|
+ <span class="link" @click="submitChapterAllCoursewareToAuditFlow(nodeId)">提交审核</span>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</aside>
|
|
|
@@ -337,6 +346,7 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
+
|
|
|
<div v-if="curToolbarIcon === 'note'" class="resource_box">
|
|
|
<h5>{{ drawerTitle }}</h5>
|
|
|
<div style="height: 40px"></div>
|
|
|
@@ -356,6 +366,7 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
+
|
|
|
<div v-if="curToolbarIcon === 'translate'" class="resource_box">
|
|
|
<h5>{{ drawerTitle }}</h5>
|
|
|
<div style="height: 40px"></div>
|
|
|
@@ -365,6 +376,7 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<template v-if="curToolbarIcon === 'audit'">
|
|
|
<AuditRemark
|
|
|
:remark-list="remark_list"
|
|
|
@@ -373,6 +385,19 @@
|
|
|
@handleLocationRemarks="handleLocationRemarks"
|
|
|
/>
|
|
|
</template>
|
|
|
+ <!-- 设置 -->
|
|
|
+ <div v-if="curToolbarIcon === 'setting'" class="setting">
|
|
|
+ <h5>{{ drawerTitle }}</h5>
|
|
|
+ <div class="setting-content">
|
|
|
+ <el-switch
|
|
|
+ v-model="chinese"
|
|
|
+ active-value="zh-Hant"
|
|
|
+ active-text="繁体"
|
|
|
+ inactive-value="zh-Hans"
|
|
|
+ inactive-text="简体"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="back-top" @click="backTop">
|
|
|
@@ -473,6 +498,7 @@ import {
|
|
|
DeleteMyCollect,
|
|
|
SearchBookContentText,
|
|
|
SetBookResourceHide,
|
|
|
+ SubmitChapterAllCoursewareToAuditFlow,
|
|
|
} from '@/api/book';
|
|
|
import { toggleFullScreen } from '@/utils/common';
|
|
|
import * as OpenCC from 'opencc-js';
|
|
|
@@ -553,7 +579,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: 'setting', title: '设置', handle: '', param: {} },
|
|
|
+ { icon: 'setting', title: '设置', handle: 'openSetting', param: { type: 6 } },
|
|
|
];
|
|
|
|
|
|
if (this.isShowAudit) {
|
|
|
@@ -618,6 +644,17 @@ export default {
|
|
|
isChildDataLoad: false,
|
|
|
mindMapJsonData: {}, // 思维导图json数据
|
|
|
drawerType: '', // 抽屉类型
|
|
|
+ titleMap: {
|
|
|
+ 0: '图片资源',
|
|
|
+ 1: '音频资源',
|
|
|
+ 2: '视频资源',
|
|
|
+ 5: '文本资源',
|
|
|
+ 6: '设置',
|
|
|
+ 11: '收藏列表',
|
|
|
+ 12: '笔记列表',
|
|
|
+ 13: '搜索结果',
|
|
|
+ 21: '多语言',
|
|
|
+ },
|
|
|
page_capacity: 10,
|
|
|
cur_page: 1,
|
|
|
file_list: [],
|
|
|
@@ -678,17 +715,7 @@ export default {
|
|
|
return result;
|
|
|
},
|
|
|
drawerTitle() {
|
|
|
- const titleMap = {
|
|
|
- 0: '图片资源',
|
|
|
- 1: '音频资源',
|
|
|
- 2: '视频资源',
|
|
|
- 5: '文本资源',
|
|
|
- 11: '收藏列表',
|
|
|
- 12: '笔记列表',
|
|
|
- 13: '搜索结果',
|
|
|
- 21: '多语言',
|
|
|
- };
|
|
|
- return titleMap[this.drawerType] || '资源列表';
|
|
|
+ return this.titleMap[this.drawerType] || '资源列表';
|
|
|
},
|
|
|
shouldMediaShowItem() {
|
|
|
return (chapter, item) => {
|
|
|
@@ -1051,6 +1078,9 @@ export default {
|
|
|
openTranslate(params) {
|
|
|
if (params && params.type) this.drawerType = Number(params.type);
|
|
|
},
|
|
|
+ openSetting({ type }) {
|
|
|
+ this.drawerType = type;
|
|
|
+ },
|
|
|
/**
|
|
|
* 打开抽屉并初始化加载
|
|
|
* @param {Object} param - 抽屉参数
|
|
|
@@ -1267,19 +1297,24 @@ export default {
|
|
|
if (!isTrue(is_leaf_chapter)) {
|
|
|
return '';
|
|
|
}
|
|
|
- // 如果当前选中节点且不可编辑,显示默认色
|
|
|
- if (is_my_edit_task === 'false') {
|
|
|
- return '';
|
|
|
- }
|
|
|
+
|
|
|
// 当前选中节点,显示高亮蓝色
|
|
|
if (this.curSelectId === nodeId) {
|
|
|
return '#4095e5';
|
|
|
}
|
|
|
+
|
|
|
// 审核通过显示绿色,其他显示默认蓝色
|
|
|
let color = '#74b9ff';
|
|
|
if (status === 2) {
|
|
|
color = '#27ae60';
|
|
|
+ return color;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果当前节点不可编辑,显示默认色
|
|
|
+ if (is_my_edit_task === 'false') {
|
|
|
+ return '';
|
|
|
}
|
|
|
+
|
|
|
return color;
|
|
|
},
|
|
|
/**
|
|
|
@@ -1598,6 +1633,22 @@ export default {
|
|
|
this.inputActiveIndex = this.data.input_list.length - 1;
|
|
|
}
|
|
|
},
|
|
|
+ async submitChapterAllCoursewareToAuditFlow(chapter_id) {
|
|
|
+ try {
|
|
|
+ await this.$confirm('确定要提交审核吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ });
|
|
|
+ await SubmitChapterAllCoursewareToAuditFlow({ chapter_id });
|
|
|
+ this.getBookChapterStructExpandList();
|
|
|
+ this.$message.success('提交成功');
|
|
|
+ } catch (e) {
|
|
|
+ if (e === 'cancel') {
|
|
|
+ this.$message.error('已取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -2118,6 +2169,20 @@ $total-width: $courseware-width + $courseware-left-margin + $courseware-right-ma
|
|
|
text-align: center;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .setting {
|
|
|
+ h5 {
|
|
|
+ padding: 0 5px;
|
|
|
+ margin: 0;
|
|
|
+ font-size: 18px;
|
|
|
+ line-height: 40px;
|
|
|
+ background: #f2f3f5;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-content {
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.back-top {
|