|
@@ -8,6 +8,10 @@
|
|
|
<span class="name-path">{{ courseware_info.name_path }}</span>
|
|
|
<span class="flow-nodename">{{ courseware_info.cur_audit_flow_node_name }}</span>
|
|
|
<slot name="middle" :courseware="courseware_info"></slot>
|
|
|
+ <div class="group">
|
|
|
+ <el-checkbox v-model="isShowGroup">显示分组</el-checkbox>
|
|
|
+ <el-checkbox v-model="groupShowAll">分组显示全部</el-checkbox>
|
|
|
+ </div>
|
|
|
<div class="operator">
|
|
|
<slot name="operator" :courseware="courseware_info"></slot>
|
|
|
</div>
|
|
@@ -24,6 +28,9 @@
|
|
|
<CoursewarePreview
|
|
|
v-if="courseware_info.book_name"
|
|
|
ref="courserware"
|
|
|
+ :is-show-group="isShowGroup"
|
|
|
+ :group-show-all="groupShowAll"
|
|
|
+ :group-row-list="content_group_row_list"
|
|
|
:data="data"
|
|
|
:component-list="component_list"
|
|
|
:background="background"
|
|
@@ -219,6 +226,7 @@ export default {
|
|
|
node_list: [],
|
|
|
data: { row_list: [] },
|
|
|
component_list: [],
|
|
|
+ content_group_row_list: [],
|
|
|
remark_list: [],
|
|
|
remark_list_obj: {}, // 存放以组件为对象的数组
|
|
|
visible: false,
|
|
@@ -256,6 +264,8 @@ export default {
|
|
|
file_list: [],
|
|
|
total_count: 0,
|
|
|
loading: false,
|
|
|
+ isShowGroup: false,
|
|
|
+ groupShowAll: true,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -308,14 +318,20 @@ export default {
|
|
|
* @param {string} id - 课件ID
|
|
|
*/
|
|
|
getCoursewareComponentContent_View(id) {
|
|
|
- ContentGetCoursewareContent_View({ id }).then(({ content, component_list }) => {
|
|
|
+ ContentGetCoursewareContent_View({ id }).then(({ content, component_list, content_group_row_list }) => {
|
|
|
if (content) {
|
|
|
- this.data = JSON.parse(content);
|
|
|
+ const _content = JSON.parse(content);
|
|
|
+ this.data = _content;
|
|
|
+ this.background = {
|
|
|
+ background_image_url: _content.background_image_url,
|
|
|
+ background_position: _content.background_position,
|
|
|
+ };
|
|
|
} else {
|
|
|
this.data = { row_list: [] };
|
|
|
}
|
|
|
|
|
|
if (component_list) this.component_list = component_list;
|
|
|
+ this.content_group_row_list = JSON.parse(content_group_row_list) || [];
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
@@ -349,6 +365,7 @@ export default {
|
|
|
courseware_id: id,
|
|
|
}).then(({ remark_list }) => {
|
|
|
this.remark_list = remark_list;
|
|
|
+ if (!remark_list) return;
|
|
|
remarkListObj = remark_list.reduce((acc, item) => {
|
|
|
if (!acc[item.component_id]) {
|
|
|
acc[item.component_id] = [];
|
|
@@ -575,6 +592,11 @@ export default {
|
|
|
flex: 1;
|
|
|
}
|
|
|
|
|
|
+ .group {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
.operator {
|
|
|
display: flex;
|
|
|
column-gap: 8px;
|