CommonPreview.vue 24 KB

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