CommonPreview.vue 24 KB

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