|
@@ -140,6 +140,34 @@
|
|
|
</div>
|
|
</div>
|
|
|
</aside>
|
|
</aside>
|
|
|
<div class="content">
|
|
<div class="content">
|
|
|
|
|
+ <div v-if="curToolbarIcon === 'search'" class="resource_box">
|
|
|
|
|
+ <h5>{{ drawerTitle }}</h5>
|
|
|
|
|
+ <div style="height: 40px"></div>
|
|
|
|
|
+ <el-row :gutter="10" style="margin: 5px -5px">
|
|
|
|
|
+ <el-col :span="16">
|
|
|
|
|
+ <el-input v-model="searchContent" placeholder="请输入文本内容" clearable />
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
|
+ <el-button type="primary" @click="querySearchList"> 查询 </el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-table :data="searchList">
|
|
|
|
|
+ <el-table-column v-if="false" prop="text" label="文字">
|
|
|
|
|
+ <template slot-scope="{ $row }">
|
|
|
|
|
+ {{ searchContent }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="courseware_name" label="课件" />
|
|
|
|
|
+ <el-table-column prop="component_type" label="组件" />
|
|
|
|
|
+ <el-table-column label="" width="50">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-link type="primary" @click="handLocation(row, 3)">定位</el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<div v-if="['image', 'audio', 'video'].includes(curToolbarIcon)" class="resource_box">
|
|
<div v-if="['image', 'audio', 'video'].includes(curToolbarIcon)" class="resource_box">
|
|
|
<h5>{{ drawerTitle }}</h5>
|
|
<h5>{{ drawerTitle }}</h5>
|
|
|
<div style="height: 40px"></div>
|
|
<div style="height: 40px"></div>
|
|
@@ -275,6 +303,7 @@ import {
|
|
|
AddMyCollect,
|
|
AddMyCollect,
|
|
|
GetMyCollectList,
|
|
GetMyCollectList,
|
|
|
DeleteMyCollect,
|
|
DeleteMyCollect,
|
|
|
|
|
+ SearchBookContentText,
|
|
|
} from '@/api/book';
|
|
} from '@/api/book';
|
|
|
import { getLocalStore } from '@/utils/auth';
|
|
import { getLocalStore } from '@/utils/auth';
|
|
|
|
|
|
|
@@ -303,6 +332,7 @@ export default {
|
|
|
// { icon: 'search', title: '搜索', handle: '', param: {} },
|
|
// { icon: 'search', title: '搜索', handle: '', param: {} },
|
|
|
{ icon: 'mindmap', title: '思维导图', handle: 'openMindMap', param: {} },
|
|
{ icon: 'mindmap', title: '思维导图', handle: 'openMindMap', param: {} },
|
|
|
{ icon: 'knowledge', title: '知识图谱', handle: 'openVisNetwork', param: {} },
|
|
{ icon: 'knowledge', title: '知识图谱', handle: 'openVisNetwork', param: {} },
|
|
|
|
|
+ { icon: 'search', title: '搜索', handle: 'getSearch', param: { type: '5' } },
|
|
|
// { icon: 'totalResources', title: '总资源', handle: '', param: {} },
|
|
// { icon: 'totalResources', title: '总资源', handle: '', param: {} },
|
|
|
{ icon: 'collect', title: '收藏', handle: 'getCollect', param: { type: '3' } },
|
|
{ icon: 'collect', title: '收藏', handle: 'getCollect', param: { type: '3' } },
|
|
|
{ icon: 'audio', title: '音频', handle: 'openDrawer', param: { type: '1' } },
|
|
{ icon: 'audio', title: '音频', handle: 'openDrawer', param: { type: '1' } },
|
|
@@ -342,6 +372,8 @@ export default {
|
|
|
content_group_row_list: [],
|
|
content_group_row_list: [],
|
|
|
remark_list: [],
|
|
remark_list: [],
|
|
|
remark_list_obj: {}, // 存放以组件为对象的数组
|
|
remark_list_obj: {}, // 存放以组件为对象的数组
|
|
|
|
|
+ searchList: [],
|
|
|
|
|
+ searchContent: '',
|
|
|
visible: false,
|
|
visible: false,
|
|
|
remark_content: '',
|
|
remark_content: '',
|
|
|
submit_loading: false,
|
|
submit_loading: false,
|
|
@@ -481,7 +513,7 @@ export default {
|
|
|
({ courseware_info }) => {
|
|
({ courseware_info }) => {
|
|
|
this.courseware_info = { ...this.courseware_info, ...courseware_info };
|
|
this.courseware_info = { ...this.courseware_info, ...courseware_info };
|
|
|
this.getLangList();
|
|
this.getLangList();
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
@@ -510,7 +542,7 @@ export default {
|
|
|
GetLanguageTypeList({ book_id: this.courseware_info.book_id, is_contain_zh: 'true' }).then(
|
|
GetLanguageTypeList({ book_id: this.courseware_info.book_id, is_contain_zh: 'true' }).then(
|
|
|
({ language_type_list }) => {
|
|
({ language_type_list }) => {
|
|
|
this.langList = language_type_list;
|
|
this.langList = language_type_list;
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -574,7 +606,7 @@ export default {
|
|
|
this.$refs.courserware.handleResult(
|
|
this.$refs.courserware.handleResult(
|
|
|
this.$refs.previewMain.scrollTop,
|
|
this.$refs.previewMain.scrollTop,
|
|
|
this.$refs.previewMain.scrollLeft,
|
|
this.$refs.previewMain.scrollLeft,
|
|
|
- this.select_node,
|
|
|
|
|
|
|
+ this.select_node
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -790,6 +822,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
handLocation(item, type) {
|
|
handLocation(item, type) {
|
|
|
|
|
+ if (type == 3) {
|
|
|
|
|
+ var did = item.courseware_id + '#' + item.component_id;
|
|
|
|
|
+ this.handleNodeClick(did);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (this.$refs.courserware && this.$refs.courserware.handLocation) {
|
|
if (this.$refs.courserware && this.$refs.courserware.handLocation) {
|
|
|
item.type = type;
|
|
item.type = type;
|
|
|
this.$refs.courserware.handLocation(item);
|
|
this.$refs.courserware.handLocation(item);
|
|
@@ -828,7 +865,7 @@ export default {
|
|
|
x.coursewareId === note.coursewareId &&
|
|
x.coursewareId === note.coursewareId &&
|
|
|
x.blockId === note.blockId &&
|
|
x.blockId === note.blockId &&
|
|
|
x.startIndex === note.startIndex &&
|
|
x.startIndex === note.startIndex &&
|
|
|
- x.endIndex === note.endIndex,
|
|
|
|
|
|
|
+ x.endIndex === note.endIndex
|
|
|
);
|
|
);
|
|
|
if (old) {
|
|
if (old) {
|
|
|
this.oldRichData = old;
|
|
this.oldRichData = old;
|
|
@@ -922,7 +959,7 @@ export default {
|
|
|
x.coursewareId === collect.coursewareId &&
|
|
x.coursewareId === collect.coursewareId &&
|
|
|
x.blockId === collect.blockId &&
|
|
x.blockId === collect.blockId &&
|
|
|
x.startIndex === collect.startIndex &&
|
|
x.startIndex === collect.startIndex &&
|
|
|
- x.endIndex === collect.endIndex,
|
|
|
|
|
|
|
+ x.endIndex === collect.endIndex
|
|
|
);
|
|
);
|
|
|
if (old) {
|
|
if (old) {
|
|
|
this.$message({
|
|
this.$message({
|
|
@@ -968,6 +1005,18 @@ export default {
|
|
|
})
|
|
})
|
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
|
},
|
|
},
|
|
|
|
|
+ getSearch(params) {
|
|
|
|
|
+ if (params && params.type) this.drawerType = Number(params.type);
|
|
|
|
|
+ },
|
|
|
|
|
+ async querySearchList() {
|
|
|
|
|
+ this.searchList = [];
|
|
|
|
|
+ if (!this.searchContent) return;
|
|
|
|
|
+ await SearchBookContentText({ book_id: this.projectId, text: this.searchContent }).then((res) => {
|
|
|
|
|
+ if (res.status === 1) {
|
|
|
|
|
+ this.searchList = res.courseware_component_list;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|