CommonPreview.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. <template>
  2. <div class="common-preview">
  3. <div class="common-preview__header">
  4. <div class="menu-container">
  5. <MenuPopover :id="id" :node-list="node_list" :book-name="courseware_info.book_name" @selectNode="selectNode" />
  6. </div>
  7. <div class="courseware">
  8. <span class="name-path">{{ courseware_info.name_path }}</span>
  9. <span class="flow-nodename">{{ courseware_info.cur_audit_flow_node_name }}</span>
  10. <slot name="middle" :courseware="courseware_info"></slot>
  11. <div class="group">
  12. <el-checkbox v-model="isShowGroup">显示分组</el-checkbox>
  13. <el-checkbox v-model="groupShowAll">分组显示全部</el-checkbox>
  14. <el-checkbox v-model="isJudgeCorrect">判断对错</el-checkbox>
  15. <el-checkbox v-model="isShowAnswer" :disabled="!isJudgeCorrect">显示答案</el-checkbox>
  16. </div>
  17. <span class="link">
  18. <el-select v-model="lang" placeholder="请选择语言" size="mini" class="lang-select">
  19. <el-option v-for="item in langList" :key="item.type" :label="item.name" :value="item.type" />
  20. </el-select>
  21. </span>
  22. <div class="operator">
  23. <slot name="operator" :courseware="courseware_info" :project-id="projectId"></slot>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="audit-content">
  28. <div ref="previewMain" class="main-container">
  29. <main :class="['preview-main', { 'no-audit': !isShowAudit }]">
  30. <div class="preview-left"></div>
  31. <CoursewarePreview
  32. v-if="courseware_info.book_name"
  33. ref="courserware"
  34. :is-show-group="isShowGroup"
  35. :group-show-all="groupShowAll"
  36. :group-row-list="content_group_row_list"
  37. :data="data"
  38. :component-list="component_list"
  39. :background="background"
  40. :can-remark="isTrue(courseware_info.is_my_audit_task) && isTrue(courseware_info.is_can_add_audit_remark)"
  41. :show-remark="isShowAudit"
  42. :component-remark-obj="remark_list_obj"
  43. @computeScroll="computeScroll"
  44. @addRemark="addRemark"
  45. />
  46. <div class="preview-right"></div>
  47. </main>
  48. </div>
  49. <div v-if="isShowAudit" class="remark-list">
  50. <h5>审校批注</h5>
  51. <ul v-if="remark_list.length > 0">
  52. <li v-for="{ id: remarkId, content, remark_person_name, remark_time } in remark_list" :key="remarkId">
  53. <!-- eslint-disable-next-line vue/no-v-html -->
  54. <p v-html="content"></p>
  55. <div v-if="isAudit" class="remark-bottom">
  56. <span>{{ remark_person_name + ':' + remark_time }}</span>
  57. <el-button type="text" class="delete-btn" @click="deleteRemarks(remarkId)">删除</el-button>
  58. </div>
  59. </li>
  60. </ul>
  61. <p v-else style="text-align: center">暂无批注</p>
  62. </div>
  63. <div ref="sidebarMenu" class="sidebar">
  64. <div
  65. v-for="{ icon, title, handle, param } in sidebarIconList"
  66. :key="icon"
  67. :title="title"
  68. class="sidebar-icon"
  69. @click="handleSidebarClick(handle, param)"
  70. >
  71. <SvgIcon :icon-class="`sidebar-${icon}`" size="24" />
  72. </div>
  73. </div>
  74. <el-drawer
  75. custom-class="custom-drawer"
  76. :visible="drawerType.length > 0"
  77. :with-header="false"
  78. :modal="false"
  79. size="25%"
  80. :style="drawerStyle"
  81. >
  82. <div class="infinite-list-wrapper" style="overflow: auto">
  83. <ul v-infinite-scroll="loadMore" class="scroll-container" infinite-scroll-disabled="disabled">
  84. <li
  85. v-for="(item, index) in file_list"
  86. :key="index"
  87. class="list-item"
  88. @click="handleFileClick(item?.courseware_id, item?.component_id)"
  89. >
  90. <template v-if="parseInt(drawerType) === 0">
  91. <el-image :src="item.file_url" fit="contain" />
  92. <span class="text-box">{{ item.file_name.slice(0, item.file_name.lastIndexOf('.')) }}</span>
  93. </template>
  94. <template v-else-if="parseInt(drawerType) === 1">
  95. <AudioPlay
  96. view-size="middle"
  97. :file-id="item.file_id"
  98. :file-name="item.file_name.slice(0, item.file_name.lastIndexOf('.'))"
  99. :show-slider="true"
  100. :audio-index="index"
  101. />
  102. </template>
  103. <template v-else-if="parseInt(drawerType) === 2">
  104. <VideoPlay view-size="big" :file-id="item.file_id" :video-index="index" />
  105. <span class="text-box">{{ item.file_name.slice(0, item.file_name.lastIndexOf('.')) }}</span>
  106. </template>
  107. </li>
  108. </ul>
  109. <p v-if="loading">加载中...</p>
  110. <p v-if="noMore">没有更多了</p>
  111. </div>
  112. </el-drawer>
  113. </div>
  114. <el-dialog
  115. title="添加课件审校批注"
  116. :visible="visible"
  117. width="680px"
  118. :close-on-click-modal="false"
  119. class="audit-dialog"
  120. @close="dialogClose('')"
  121. >
  122. <RichText
  123. v-model="remark_content"
  124. toolbar="fontselect fontsizeselect forecolor backcolor | underline | bold italic strikethrough alignleft aligncenter alignright"
  125. :wordlimit-num="false"
  126. :height="240"
  127. page-from="audit"
  128. />
  129. <div slot="footer">
  130. <el-button @click="dialogClose">取消</el-button>
  131. <el-button type="primary" :loading="submit_loading" @click="addCoursewareAuditRemark(select_node)">
  132. 确定
  133. </el-button>
  134. </div>
  135. </el-dialog>
  136. <el-dialog title="" :visible="visibleMindMap" width="1100px" class="audit-dialog" @close="dialogClose('MindMap')">
  137. <MindMap
  138. v-if="isChildDataLoad"
  139. ref="mindMapRef"
  140. :project-id="projectId"
  141. :mind-map-json-data="mindMapJsonData"
  142. @child-click="handleNodeClick"
  143. />
  144. </el-dialog>
  145. </div>
  146. </template>
  147. <script>
  148. import CoursewarePreview from '@/views/book/courseware/preview/CoursewarePreview.vue';
  149. import MenuPopover from '@/views/personal_workbench/common/MenuPopover.vue';
  150. import RichText from '@/components/RichText.vue';
  151. import { isTrue } from '@/utils/validate';
  152. import MindMap from '@/components/MindMap.vue';
  153. import VideoPlay from '@/views/book/courseware/preview/components/common/VideoPlay.vue';
  154. import AudioPlay from '@/views/book/courseware/preview/components/common/AudioPlay.vue';
  155. import * as OpenCC from 'opencc-js';
  156. import {
  157. GetBookCoursewareInfo,
  158. GetProjectBaseInfo,
  159. GetCoursewareAuditRemarkList,
  160. AddCoursewareAuditRemark,
  161. DeleteCoursewareAuditRemarkList,
  162. } from '@/api/project';
  163. import {
  164. ContentGetCoursewareContent_View,
  165. ChapterGetBookChapterStructExpandList,
  166. GetBookBaseInfo,
  167. MangerGetBookMindMap,
  168. PageQueryBookResourceList,
  169. GetLanguageTypeList,
  170. } from '@/api/book';
  171. export default {
  172. name: 'CommonPreview',
  173. components: {
  174. CoursewarePreview,
  175. MenuPopover,
  176. RichText,
  177. MindMap,
  178. AudioPlay,
  179. VideoPlay,
  180. },
  181. provide() {
  182. return {
  183. getLang: () => this.lang,
  184. getChinese: () => this.chinese,
  185. getLangList: () => this.langList,
  186. convertText: this.convertText,
  187. };
  188. },
  189. props: {
  190. projectId: {
  191. type: String,
  192. required: true,
  193. },
  194. id: {
  195. type: String,
  196. default: '',
  197. },
  198. // 是否是审校页面
  199. isAudit: {
  200. type: Boolean,
  201. default: false,
  202. },
  203. isShowAudit: {
  204. type: Boolean,
  205. default: true,
  206. },
  207. isBook: {
  208. type: Boolean,
  209. default: false,
  210. },
  211. },
  212. data() {
  213. return {
  214. select_node: this.id,
  215. courseware_info: {
  216. book_name: '',
  217. is_can_start_edit: 'false',
  218. is_can_submit_audit: 'false',
  219. is_can_audit_pass: 'false',
  220. is_can_audit_reject: 'false',
  221. is_can_add_audit_remark: 'false',
  222. is_can_finish_audit: 'false',
  223. is_can_request_shangjia_book: 'false',
  224. is_can_request_rollback_project: 'false',
  225. is_can_shangjia_book: 'false',
  226. is_can_rollback_project: 'false',
  227. },
  228. background: {
  229. background_image_url: '',
  230. background_position: {
  231. left: 0,
  232. top: 0,
  233. },
  234. },
  235. node_list: [],
  236. data: { row_list: [] },
  237. component_list: [],
  238. content_group_row_list: [],
  239. remark_list: [],
  240. remark_list_obj: {}, // 存放以组件为对象的数组
  241. visible: false,
  242. remark_content: '',
  243. submit_loading: false,
  244. isTrue,
  245. menuPosition: {
  246. x: -1,
  247. y: -1,
  248. componentId: 'WHOLE',
  249. },
  250. sidebarIconList: [
  251. { icon: 'search', title: '搜索', handle: '', param: {} },
  252. { icon: 'mindmap', title: '思维导图', handle: 'openMindMap', param: {} },
  253. { icon: 'connect', title: '连接', handle: '', param: {} },
  254. { icon: 'audio', title: '音频', handle: 'openDrawer', param: { type: '1' } },
  255. { icon: 'image', title: '图片', handle: 'openDrawer', param: { type: '0' } },
  256. { icon: 'video', title: '视频', handle: 'openDrawer', param: { type: '2' } },
  257. { icon: 'text', title: '文本', handle: '', param: {} },
  258. { icon: 'file', title: '文件', handle: '', param: {} },
  259. { icon: 'collect', title: '收藏', handle: '', param: {} },
  260. { icon: 'setting', title: '设置', handle: '', param: {} },
  261. ],
  262. visibleMindMap: false,
  263. isChildDataLoad: false,
  264. mindMapJsonData: {}, // 思维导图json数据
  265. drawerType: '', // 抽屉类型
  266. drawerStyle: {
  267. top: '0',
  268. height: '0',
  269. right: '0',
  270. },
  271. page_capacity: 10,
  272. cur_page: 1,
  273. file_list: [],
  274. total_count: 0,
  275. loading: false,
  276. isShowGroup: false,
  277. groupShowAll: true,
  278. opencc: OpenCC.Converter({ from: 'cn', to: 'tw' }),
  279. langList: [],
  280. lang: 'ZH',
  281. chinese: 'zh-Hans',
  282. isJudgeCorrect: false,
  283. isShowAnswer: false,
  284. };
  285. },
  286. computed: {
  287. disabled() {
  288. return this.loading || this.noMore;
  289. },
  290. noMore() {
  291. return this.file_list.length >= this.total_count && this.total_count > 0;
  292. },
  293. },
  294. watch: {
  295. isJudgeCorrect(newVal) {
  296. if (!newVal) {
  297. this.isShowAnswer = false;
  298. }
  299. this.simulateAnswer(newVal);
  300. },
  301. isShowAnswer() {
  302. this.simulateAnswer();
  303. },
  304. },
  305. created() {
  306. if (this.id) {
  307. this.getBookCoursewareInfo(this.id);
  308. this.getCoursewareComponentContent_View(this.id);
  309. this.getCoursewareAuditRemarkList(this.id);
  310. } else {
  311. this.isBook ? this.getBookBaseInfo() : this.getProjectBaseInfo();
  312. }
  313. this.getBookChapterStructExpandList();
  314. },
  315. mounted() {
  316. this.calcDrawerPosition();
  317. },
  318. methods: {
  319. getProjectBaseInfo() {
  320. GetProjectBaseInfo({ id: this.projectId }).then(({ project_info }) => {
  321. this.courseware_info = { ...project_info, book_name: project_info.name };
  322. });
  323. },
  324. getBookBaseInfo() {
  325. GetBookBaseInfo({ id: this.projectId }).then(({ book_info }) => {
  326. this.courseware_info = { ...this.courseware_info, ...book_info, book_name: book_info.name };
  327. });
  328. },
  329. /**
  330. * 得到教材课件信息
  331. * @param {string} id - 课件ID
  332. */
  333. getBookCoursewareInfo(id) {
  334. GetBookCoursewareInfo({ id, is_contain_producer: 'true', is_contain_auditor: 'true' }).then(
  335. ({ courseware_info }) => {
  336. this.courseware_info = { ...this.courseware_info, ...courseware_info };
  337. this.getLangList();
  338. },
  339. );
  340. },
  341. /**
  342. * 得到课件内容(展示内容)
  343. * @param {string} id - 课件ID
  344. */
  345. getCoursewareComponentContent_View(id) {
  346. ContentGetCoursewareContent_View({ id }).then(({ content, component_list, content_group_row_list }) => {
  347. if (content) {
  348. const _content = JSON.parse(content);
  349. this.data = _content;
  350. this.background = {
  351. background_image_url: _content.background_image_url,
  352. background_position: _content.background_position,
  353. };
  354. } else {
  355. this.data = { row_list: [] };
  356. }
  357. if (component_list) this.component_list = component_list;
  358. if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
  359. });
  360. },
  361. getLangList() {
  362. GetLanguageTypeList({ book_id: this.courseware_info.book_id, is_contain_zh: 'true' }).then(
  363. ({ language_type_list }) => {
  364. this.langList = language_type_list;
  365. },
  366. );
  367. },
  368. /**
  369. * 得到教材章节结构展开列表
  370. */
  371. getBookChapterStructExpandList() {
  372. ChapterGetBookChapterStructExpandList({
  373. book_id: this.projectId,
  374. node_deep_mode: 0,
  375. is_contain_producer: 'true',
  376. is_contain_auditor: 'true',
  377. }).then(({ node_list }) => {
  378. this.node_list = node_list;
  379. });
  380. },
  381. /**
  382. * 选择节点
  383. * @param {string} nodeId - 节点ID
  384. */
  385. selectNode(nodeId) {
  386. this.getCoursewareComponentContent_View(nodeId);
  387. this.getBookCoursewareInfo(nodeId);
  388. this.getCoursewareAuditRemarkList(nodeId);
  389. this.select_node = nodeId;
  390. },
  391. // 审校批注列表
  392. getCoursewareAuditRemarkList(id) {
  393. this.remark_list = [];
  394. let remarkListObj = {};
  395. GetCoursewareAuditRemarkList({
  396. courseware_id: id,
  397. }).then(({ remark_list }) => {
  398. this.remark_list = remark_list;
  399. if (!remark_list) return;
  400. remarkListObj = remark_list.reduce((acc, item) => {
  401. if (!acc[item.component_id]) {
  402. acc[item.component_id] = [];
  403. }
  404. acc[item.component_id].push(item);
  405. return acc;
  406. }, {});
  407. this.remark_list_obj = remarkListObj;
  408. });
  409. },
  410. addRemark(selectNode, x, y, componentId) {
  411. this.remark_content = '';
  412. this.visible = true;
  413. if (selectNode) {
  414. this.menuPosition = {
  415. x,
  416. y,
  417. componentId,
  418. };
  419. } else {
  420. this.menuPosition = {
  421. x: -1,
  422. y: -1,
  423. componentId: 'WHOLE',
  424. };
  425. }
  426. },
  427. dialogClose(type) {
  428. this[`visible${type}`] = false;
  429. },
  430. // 添加审校批注
  431. addCoursewareAuditRemark(id) {
  432. this.submit_loading = true;
  433. AddCoursewareAuditRemark({
  434. courseware_id: id || this.id,
  435. content: this.remark_content,
  436. component_id: this.menuPosition.componentId,
  437. position_x: this.menuPosition.x,
  438. position_y: this.menuPosition.y,
  439. })
  440. .then(() => {
  441. this.submit_loading = false;
  442. this.visible = false;
  443. this.getCoursewareAuditRemarkList(id || this.id);
  444. })
  445. .catch(() => {
  446. this.submit_loading = false;
  447. });
  448. },
  449. // 删除批注
  450. deleteRemarks(id) {
  451. this.$confirm('确定要删除此条批注吗?', '提示', {
  452. confirmButtonText: '确定',
  453. cancelButtonText: '取消',
  454. type: 'warning',
  455. })
  456. .then(() => {
  457. DeleteCoursewareAuditRemarkList({ id }).then(() => {
  458. this.getCoursewareAuditRemarkList(this.select_node ? this.select_node : this.id);
  459. this.$message.success('删除成功!');
  460. });
  461. })
  462. .catch(() => {});
  463. },
  464. // 计算previewMain滑动距离
  465. computeScroll() {
  466. this.$refs.courserware.handleResult(
  467. this.$refs.previewMain.scrollTop,
  468. this.$refs.previewMain.scrollLeft,
  469. this.select_node,
  470. );
  471. },
  472. /**
  473. * 处理侧边栏图标点击事件
  474. * @param {string} handle - 处理函数名
  475. * @param {any} param - 处理函数参数
  476. */
  477. handleSidebarClick(handle, param) {
  478. if (typeof handle === 'string' && handle && typeof this[handle] === 'function') {
  479. this[handle](param);
  480. }
  481. },
  482. openMindMap() {
  483. MangerGetBookMindMap({ book_id: this.projectId }).then(({ content }) => {
  484. if (content) {
  485. this.mindMapJsonData = JSON.parse(content);
  486. this.isChildDataLoad = true;
  487. }
  488. });
  489. this.visibleMindMap = true;
  490. },
  491. async handleNodeClick(data) {
  492. let [nodeId, componentId] = data.split('#');
  493. if (nodeId) this.selectNode(nodeId);
  494. if (componentId) {
  495. let node = await this.$refs.courserware.findChildComponentByKey(componentId);
  496. if (node) {
  497. await this.$nextTick();
  498. this.$refs.previewMain.scrollTo({
  499. top: node.$el.offsetTop - 50,
  500. left: node.$el.offsetLeft - 50,
  501. behavior: 'smooth',
  502. });
  503. }
  504. }
  505. this.visibleMindMap = false;
  506. },
  507. // 计算抽屉滑出位置
  508. calcDrawerPosition() {
  509. const menu = this.$refs.sidebarMenu;
  510. if (menu) {
  511. const rect = menu.getBoundingClientRect();
  512. this.drawerStyle = {
  513. top: `${rect.top}px`,
  514. height: `${rect.height}px`,
  515. right: `${window.innerWidth - rect.left + 1}px`,
  516. };
  517. }
  518. },
  519. /**
  520. * 打开抽屉并初始化加载
  521. * @param {Object} param - 抽屉参数
  522. * @param {string} param.type - 抽屉类型(0: 图片, 1: 音频, 2: 视频)
  523. */
  524. openDrawer({ type }) {
  525. if (this.drawerType === type) {
  526. this.drawerType = '';
  527. return;
  528. }
  529. this.drawerType = type;
  530. this.drawerVisible = true;
  531. this.$nextTick(() => {
  532. this.cur_page = 1;
  533. this.file_list = [];
  534. this.loadMore();
  535. });
  536. },
  537. // 加载更多数据
  538. loadMore() {
  539. if (this.disabled) return;
  540. this.loading = true;
  541. const params = {
  542. page_capacity: this.page_capacity,
  543. cur_page: this.cur_page,
  544. book_id: this.projectId,
  545. type: parseInt(this.drawerType),
  546. };
  547. PageQueryBookResourceList(params)
  548. .then(({ total_count, resource_list }) => {
  549. this.total_count = total_count;
  550. this.file_list = this.cur_page === 1 ? resource_list : [...this.file_list, ...resource_list];
  551. this.cur_page += this.cur_page;
  552. })
  553. .finally(() => {
  554. this.loading = false;
  555. });
  556. },
  557. async handleFileClick(courseware_id, component_id) {
  558. if (courseware_id) this.selectNode(courseware_id);
  559. if (component_id) {
  560. let node = await this.$refs.courserware.findChildComponentByKey(component_id);
  561. if (node) {
  562. await this.$nextTick();
  563. this.$refs.previewMain.scrollTo({
  564. top: node.offsetTop - 50,
  565. left: node.offsetLeft - 50,
  566. behavior: 'smooth',
  567. });
  568. }
  569. }
  570. },
  571. /**
  572. * 文本转换
  573. * @param {string} text - 要转换的文本
  574. * @returns {string} - 转换后的文本
  575. */
  576. convertText(text) {
  577. if (this.chinese === 'zh-Hant' && this.opencc) {
  578. return this.opencc(text);
  579. }
  580. return text;
  581. },
  582. simulateAnswer(disabled = true) {
  583. this.$refs.courserware.simulateAnswer(this.isJudgeCorrect, this.isShowAnswer, disabled);
  584. },
  585. },
  586. };
  587. </script>
  588. <style lang="scss" scoped>
  589. @use '@/styles/mixin.scss' as *;
  590. .common-preview {
  591. &__header {
  592. position: sticky;
  593. top: 0;
  594. left: 0;
  595. z-index: 9;
  596. display: flex;
  597. align-items: center;
  598. height: 40px;
  599. padding: 6px 4px;
  600. margin-bottom: 5px;
  601. background-color: #fff;
  602. border-top: $border;
  603. border-bottom: $border;
  604. > .menu-container {
  605. display: flex;
  606. justify-content: space-between;
  607. width: 360px;
  608. padding: 4px 8px;
  609. border-right: $border;
  610. }
  611. > .courseware {
  612. display: flex;
  613. flex-grow: 1;
  614. column-gap: 16px;
  615. align-items: center;
  616. justify-content: space-between;
  617. height: 40px;
  618. .name-path {
  619. min-width: 200px;
  620. height: 40px;
  621. padding: 4px 8px;
  622. font-size: 14px;
  623. line-height: 32px;
  624. border-right: $border;
  625. }
  626. .lang-select {
  627. :deep .el-input {
  628. width: 100px;
  629. }
  630. :deep .el-input__inner {
  631. height: 24px;
  632. line-height: 24px;
  633. background-color: #fff;
  634. }
  635. :deep .el-input__icon {
  636. line-height: 24px;
  637. }
  638. }
  639. .flow-nodename {
  640. flex: 1;
  641. }
  642. .group {
  643. display: flex;
  644. align-items: center;
  645. }
  646. .operator {
  647. display: flex;
  648. column-gap: 8px;
  649. align-items: center;
  650. .link {
  651. + .link {
  652. margin-left: 0;
  653. &::before {
  654. margin-right: 8px;
  655. color: #999;
  656. content: '|';
  657. }
  658. }
  659. }
  660. }
  661. }
  662. }
  663. .main-container {
  664. flex: 1;
  665. min-width: 1110px;
  666. overflow: auto;
  667. background: url('@/assets/preview-bg.png') repeat;
  668. }
  669. main.preview-main {
  670. display: flex;
  671. flex: 1;
  672. width: calc($courseware-width + $courseware-left-margin + $courseware-right-margin);
  673. min-width: calc($courseware-width + $courseware-left-margin + $courseware-right-margin);
  674. min-height: 100%;
  675. margin: 0 auto;
  676. background-color: #fff;
  677. border-radius: 4px;
  678. box-shadow: 0 2px 4px rgba(0, 0, 0, 10%);
  679. .preview-left {
  680. width: $courseware-left-margin;
  681. min-width: $courseware-left-margin;
  682. max-width: $courseware-left-margin;
  683. background-color: #ecf0f1;
  684. }
  685. .preview-right {
  686. width: $courseware-right-margin;
  687. min-width: $courseware-right-margin;
  688. max-width: $courseware-right-margin;
  689. background-color: #ecf0f1;
  690. }
  691. &.no-audit {
  692. margin: 0 auto;
  693. }
  694. }
  695. .audit-content {
  696. display: flex;
  697. min-width: 1810px;
  698. height: calc(100vh - 175px);
  699. .remark-list {
  700. width: 300px;
  701. margin-left: 20px;
  702. overflow: auto;
  703. border: 1px solid #e5e5e5;
  704. h5 {
  705. padding: 0 5px;
  706. margin: 0;
  707. font-size: 18px;
  708. line-height: 40px;
  709. background: #f2f3f5;
  710. }
  711. .delete-btn {
  712. padding-left: 10px;
  713. color: #f44444;
  714. border-left: 1px solid #e5e5e5;
  715. }
  716. ul {
  717. height: calc(100% - 40px);
  718. overflow: auto;
  719. li {
  720. border-bottom: 1px solid #e5e5e5;
  721. > p {
  722. padding: 5px;
  723. }
  724. :deep p {
  725. margin: 0;
  726. }
  727. .remark-bottom {
  728. display: flex;
  729. align-items: center;
  730. justify-content: space-between;
  731. padding: 0 5px;
  732. font-size: 14px;
  733. color: #555;
  734. border-top: 1px solid #e5e5e5;
  735. }
  736. }
  737. }
  738. }
  739. .sidebar {
  740. display: flex;
  741. flex-direction: column;
  742. row-gap: 16px;
  743. align-items: center;
  744. height: 100%;
  745. padding: 12px 8px;
  746. margin-left: 8px;
  747. box-shadow: -4px 0 4px rgba(0, 0, 0, 10%);
  748. &-icon {
  749. cursor: pointer;
  750. }
  751. }
  752. .el-drawer__body {
  753. .scroll-container {
  754. display: flex;
  755. flex-direction: column;
  756. row-gap: 8px;
  757. margin: 6px;
  758. .list-item {
  759. display: flex;
  760. align-items: center;
  761. cursor: pointer;
  762. border: 1px solid #ccc;
  763. border-radius: 8px;
  764. :deep .el-slider {
  765. .el-slider__runway {
  766. background-color: #eee;
  767. }
  768. }
  769. :deep .audio-middle {
  770. width: calc(25vw - 40px);
  771. border: none;
  772. border-radius: 8px;
  773. }
  774. .el-image {
  775. display: flex;
  776. width: 30%;
  777. min-width: 30%;
  778. height: 90px;
  779. margin: 6px;
  780. background-color: #ccc;
  781. border-radius: 8px;
  782. }
  783. .video-play {
  784. width: 30%;
  785. min-width: 30%;
  786. margin: 6px;
  787. }
  788. .text-box {
  789. word-break: break-word;
  790. }
  791. }
  792. }
  793. p {
  794. color: #999;
  795. text-align: center;
  796. }
  797. }
  798. }
  799. }
  800. :deep .audit-dialog {
  801. .el-dialog__body {
  802. height: calc(100vh - 260px);
  803. padding: 5px 20px;
  804. }
  805. .mind-map-container .mind-map {
  806. height: calc(100vh - 310px);
  807. }
  808. }
  809. </style>
  810. <style lang="scss">
  811. .tox-tinymce-aux {
  812. z-index: 9999 !important;
  813. }
  814. </style>