CommonPreview.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  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"></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. <span class="title">
  29. <SvgIcon icon-class="menu-2" size="24" />
  30. <span>{{ courseware_info.name_path }}</span>
  31. </span>
  32. <CoursewarePreview
  33. v-if="courseware_info.book_name"
  34. ref="courserware"
  35. :is-show-group="isShowGroup"
  36. :group-show-all="groupShowAll"
  37. :group-row-list="content_group_row_list"
  38. :data="data"
  39. :component-list="component_list"
  40. :background="background"
  41. :can-remark="isTrue(courseware_info.is_my_audit_task) && isTrue(courseware_info.is_can_add_audit_remark)"
  42. :show-remark="isShowAudit"
  43. :component-remark-obj="remark_list_obj"
  44. @computeScroll="computeScroll"
  45. @addRemark="addRemark"
  46. />
  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. };
  283. },
  284. computed: {
  285. disabled() {
  286. return this.loading || this.noMore;
  287. },
  288. noMore() {
  289. return this.file_list.length >= this.total_count && this.total_count > 0;
  290. },
  291. },
  292. created() {
  293. if (this.id) {
  294. this.getBookCoursewareInfo(this.id);
  295. this.getCoursewareComponentContent_View(this.id);
  296. this.getCoursewareAuditRemarkList(this.id);
  297. } else {
  298. this.isBook ? this.getBookBaseInfo() : this.getProjectBaseInfo();
  299. }
  300. this.getBookChapterStructExpandList();
  301. },
  302. mounted() {
  303. this.calcDrawerPosition();
  304. },
  305. methods: {
  306. getProjectBaseInfo() {
  307. GetProjectBaseInfo({ id: this.projectId }).then(({ project_info }) => {
  308. this.courseware_info = { ...project_info, book_name: project_info.name };
  309. });
  310. },
  311. getBookBaseInfo() {
  312. GetBookBaseInfo({ id: this.projectId }).then(({ book_info }) => {
  313. this.courseware_info = { ...this.courseware_info, ...book_info, book_name: book_info.name };
  314. });
  315. },
  316. /**
  317. * 得到教材课件信息
  318. * @param {string} id - 课件ID
  319. */
  320. getBookCoursewareInfo(id) {
  321. GetBookCoursewareInfo({ id, is_contain_producer: 'true', is_contain_auditor: 'true' }).then(
  322. ({ courseware_info }) => {
  323. this.courseware_info = { ...this.courseware_info, ...courseware_info };
  324. this.getLangList();
  325. },
  326. );
  327. },
  328. /**
  329. * 得到课件内容(展示内容)
  330. * @param {string} id - 课件ID
  331. */
  332. getCoursewareComponentContent_View(id) {
  333. ContentGetCoursewareContent_View({ id }).then(({ content, component_list, content_group_row_list }) => {
  334. if (content) {
  335. const _content = JSON.parse(content);
  336. this.data = _content;
  337. this.background = {
  338. background_image_url: _content.background_image_url,
  339. background_position: _content.background_position,
  340. };
  341. } else {
  342. this.data = { row_list: [] };
  343. }
  344. if (component_list) this.component_list = component_list;
  345. if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
  346. });
  347. },
  348. getLangList() {
  349. GetLanguageTypeList({ book_id: this.courseware_info.book_id, is_contain_zh: 'true' }).then(
  350. ({ language_type_list }) => {
  351. this.langList = language_type_list;
  352. },
  353. );
  354. },
  355. /**
  356. * 得到教材章节结构展开列表
  357. */
  358. getBookChapterStructExpandList() {
  359. ChapterGetBookChapterStructExpandList({
  360. book_id: this.projectId,
  361. node_deep_mode: 0,
  362. is_contain_producer: 'true',
  363. is_contain_auditor: 'true',
  364. }).then(({ node_list }) => {
  365. this.node_list = node_list;
  366. });
  367. },
  368. /**
  369. * 选择节点
  370. * @param {string} nodeId - 节点ID
  371. */
  372. selectNode(nodeId) {
  373. this.getCoursewareComponentContent_View(nodeId);
  374. this.getBookCoursewareInfo(nodeId);
  375. this.getCoursewareAuditRemarkList(nodeId);
  376. this.select_node = nodeId;
  377. },
  378. // 审校批注列表
  379. getCoursewareAuditRemarkList(id) {
  380. this.remark_list = [];
  381. let remarkListObj = {};
  382. GetCoursewareAuditRemarkList({
  383. courseware_id: id,
  384. }).then(({ remark_list }) => {
  385. this.remark_list = remark_list;
  386. if (!remark_list) return;
  387. remarkListObj = remark_list.reduce((acc, item) => {
  388. if (!acc[item.component_id]) {
  389. acc[item.component_id] = [];
  390. }
  391. acc[item.component_id].push(item);
  392. return acc;
  393. }, {});
  394. this.remark_list_obj = remarkListObj;
  395. });
  396. },
  397. addRemark(selectNode, x, y, componentId) {
  398. this.remark_content = '';
  399. this.visible = true;
  400. if (selectNode) {
  401. this.menuPosition = {
  402. x,
  403. y,
  404. componentId,
  405. };
  406. } else {
  407. this.menuPosition = {
  408. x: -1,
  409. y: -1,
  410. componentId: 'WHOLE',
  411. };
  412. }
  413. },
  414. dialogClose(type) {
  415. this[`visible${type}`] = false;
  416. },
  417. // 添加审校批注
  418. addCoursewareAuditRemark(id) {
  419. this.submit_loading = true;
  420. AddCoursewareAuditRemark({
  421. courseware_id: id || this.id,
  422. content: this.remark_content,
  423. component_id: this.menuPosition.componentId,
  424. position_x: this.menuPosition.x,
  425. position_y: this.menuPosition.y,
  426. })
  427. .then(() => {
  428. this.submit_loading = false;
  429. this.visible = false;
  430. this.getCoursewareAuditRemarkList(id || this.id);
  431. })
  432. .catch(() => {
  433. this.submit_loading = false;
  434. });
  435. },
  436. // 删除批注
  437. deleteRemarks(id) {
  438. this.$confirm('确定要删除此条批注吗?', '提示', {
  439. confirmButtonText: '确定',
  440. cancelButtonText: '取消',
  441. type: 'warning',
  442. })
  443. .then(() => {
  444. DeleteCoursewareAuditRemarkList({ id }).then(() => {
  445. this.getCoursewareAuditRemarkList(this.select_node ? this.select_node : this.id);
  446. this.$message.success('删除成功!');
  447. });
  448. })
  449. .catch(() => {});
  450. },
  451. // 计算previewMain滑动距离
  452. computeScroll() {
  453. this.$refs.courserware.handleResult(
  454. this.$refs.previewMain.scrollTop,
  455. this.$refs.previewMain.scrollLeft,
  456. this.select_node,
  457. );
  458. },
  459. /**
  460. * 处理侧边栏图标点击事件
  461. * @param {string} handle - 处理函数名
  462. * @param {any} param - 处理函数参数
  463. */
  464. handleSidebarClick(handle, param) {
  465. if (typeof handle === 'string' && handle && typeof this[handle] === 'function') {
  466. this[handle](param);
  467. }
  468. },
  469. openMindMap() {
  470. MangerGetBookMindMap({ book_id: this.projectId }).then(({ content }) => {
  471. if (content) {
  472. this.mindMapJsonData = JSON.parse(content);
  473. this.isChildDataLoad = true;
  474. }
  475. });
  476. this.visibleMindMap = true;
  477. },
  478. async handleNodeClick(data) {
  479. let [nodeId, componentId] = data.split('#');
  480. if (nodeId) this.selectNode(nodeId);
  481. if (componentId) {
  482. let node = await this.$refs.courserware.findChildComponentByKey(componentId);
  483. if (node) {
  484. await this.$nextTick();
  485. this.$refs.previewMain.scrollTo({
  486. top: node.offsetTop - 50,
  487. left: node.offsetLeft - 50,
  488. behavior: 'smooth',
  489. });
  490. }
  491. }
  492. this.visibleMindMap = false;
  493. },
  494. // 计算抽屉滑出位置
  495. calcDrawerPosition() {
  496. const menu = this.$refs.sidebarMenu;
  497. if (menu) {
  498. const rect = menu.getBoundingClientRect();
  499. this.drawerStyle = {
  500. top: `${rect.top}px`,
  501. height: `${rect.height}px`,
  502. right: `${window.innerWidth - rect.left + 1}px`,
  503. };
  504. }
  505. },
  506. /**
  507. * 打开抽屉并初始化加载
  508. * @param {Object} param - 抽屉参数
  509. * @param {string} param.type - 抽屉类型(0: 图片, 1: 音频, 2: 视频)
  510. */
  511. openDrawer({ type }) {
  512. if (this.drawerType === type) {
  513. this.drawerType = '';
  514. return;
  515. }
  516. this.drawerType = type;
  517. this.drawerVisible = true;
  518. this.$nextTick(() => {
  519. this.cur_page = 1;
  520. this.file_list = [];
  521. this.loadMore();
  522. });
  523. },
  524. // 加载更多数据
  525. loadMore() {
  526. if (this.disabled) return;
  527. this.loading = true;
  528. const params = {
  529. page_capacity: this.page_capacity,
  530. cur_page: this.cur_page,
  531. book_id: this.projectId,
  532. type: parseInt(this.drawerType),
  533. };
  534. PageQueryBookResourceList(params)
  535. .then(({ total_count, resource_list }) => {
  536. this.total_count = total_count;
  537. this.file_list = this.cur_page === 1 ? resource_list : [...this.file_list, ...resource_list];
  538. this.cur_page += this.cur_page;
  539. })
  540. .finally(() => {
  541. this.loading = false;
  542. });
  543. },
  544. async handleFileClick(courseware_id, component_id) {
  545. if (courseware_id) this.selectNode(courseware_id);
  546. if (component_id) {
  547. let node = await this.$refs.courserware.findChildComponentByKey(component_id);
  548. if (node) {
  549. await this.$nextTick();
  550. this.$refs.previewMain.scrollTo({
  551. top: node.offsetTop - 50,
  552. left: node.offsetLeft - 50,
  553. behavior: 'smooth',
  554. });
  555. }
  556. }
  557. },
  558. /**
  559. * 文本转换
  560. * @param {string} text - 要转换的文本
  561. * @returns {string} - 转换后的文本
  562. */
  563. convertText(text) {
  564. if (this.chinese === 'zh-Hant' && this.opencc) {
  565. return this.opencc(text);
  566. }
  567. return text;
  568. },
  569. },
  570. };
  571. </script>
  572. <style lang="scss" scoped>
  573. @use '@/styles/mixin.scss' as *;
  574. .common-preview {
  575. &__header {
  576. position: sticky;
  577. top: 56px;
  578. left: 0;
  579. z-index: 9;
  580. display: flex;
  581. align-items: center;
  582. height: 40px;
  583. padding: 6px 4px;
  584. margin-bottom: 5px;
  585. background-color: #fff;
  586. border-top: $border;
  587. border-bottom: $border;
  588. > .menu-container {
  589. display: flex;
  590. justify-content: space-between;
  591. width: 360px;
  592. padding: 4px 8px;
  593. border-right: $border;
  594. }
  595. > .courseware {
  596. display: flex;
  597. flex-grow: 1;
  598. column-gap: 16px;
  599. align-items: center;
  600. justify-content: space-between;
  601. height: 40px;
  602. .name-path {
  603. min-width: 200px;
  604. height: 40px;
  605. padding: 4px 8px;
  606. font-size: 14px;
  607. line-height: 32px;
  608. border-right: $border;
  609. }
  610. .lang-select {
  611. :deep .el-input {
  612. width: 100px;
  613. }
  614. :deep .el-input__inner {
  615. height: 24px;
  616. line-height: 24px;
  617. background-color: #fff;
  618. }
  619. :deep .el-input__icon {
  620. line-height: 24px;
  621. }
  622. }
  623. .flow-nodename {
  624. flex: 1;
  625. }
  626. .group {
  627. display: flex;
  628. align-items: center;
  629. }
  630. .operator {
  631. display: flex;
  632. column-gap: 8px;
  633. align-items: center;
  634. .link {
  635. + .link {
  636. margin-left: 0;
  637. &::before {
  638. margin-right: 8px;
  639. color: #999;
  640. content: '|';
  641. }
  642. }
  643. }
  644. }
  645. }
  646. }
  647. .main-container {
  648. flex: 1;
  649. min-width: 1110px;
  650. overflow: auto;
  651. }
  652. main.preview-main {
  653. display: flex;
  654. flex: 1;
  655. flex-direction: column;
  656. row-gap: 5px;
  657. width: 1100px;
  658. min-width: 1100px;
  659. min-height: 100%;
  660. padding: 5px;
  661. margin: 0 5px;
  662. background-color: #fff;
  663. border: 3px solid #f44444;
  664. border-radius: 4px;
  665. box-shadow: 0 2px 4px rgba(0, 0, 0, 10%);
  666. &.no-audit {
  667. margin: 0 auto;
  668. }
  669. .title {
  670. display: inline-flex;
  671. column-gap: 24px;
  672. align-items: center;
  673. width: 100%;
  674. min-width: 280px;
  675. height: 64px;
  676. padding: 18px 24px;
  677. font-size: 20px;
  678. color: #fff;
  679. background-color: #f44444;
  680. border-top-left-radius: 12px;
  681. border-bottom-right-radius: 16px;
  682. }
  683. }
  684. .audit-content {
  685. display: flex;
  686. min-width: 1400px;
  687. height: calc(100vh - 175px);
  688. .remark-list {
  689. width: 300px;
  690. margin-left: 20px;
  691. overflow: auto;
  692. border: 1px solid #e5e5e5;
  693. h5 {
  694. padding: 0 5px;
  695. margin: 0;
  696. font-size: 18px;
  697. line-height: 40px;
  698. background: #f2f3f5;
  699. }
  700. .delete-btn {
  701. padding-left: 10px;
  702. color: #f44444;
  703. border-left: 1px solid #e5e5e5;
  704. }
  705. ul {
  706. height: calc(100% - 40px);
  707. overflow: auto;
  708. li {
  709. border-bottom: 1px solid #e5e5e5;
  710. > p {
  711. padding: 5px;
  712. }
  713. :deep p {
  714. margin: 0;
  715. }
  716. .remark-bottom {
  717. display: flex;
  718. align-items: center;
  719. justify-content: space-between;
  720. padding: 0 5px;
  721. font-size: 14px;
  722. color: #555;
  723. border-top: 1px solid #e5e5e5;
  724. }
  725. }
  726. }
  727. }
  728. .sidebar {
  729. display: flex;
  730. flex-direction: column;
  731. row-gap: 16px;
  732. align-items: center;
  733. height: 100%;
  734. padding: 12px 8px;
  735. margin-left: 8px;
  736. box-shadow: -4px 0 4px rgba(0, 0, 0, 10%);
  737. &-icon {
  738. cursor: pointer;
  739. }
  740. }
  741. .el-drawer__body {
  742. .scroll-container {
  743. display: flex;
  744. flex-direction: column;
  745. row-gap: 8px;
  746. margin: 6px;
  747. .list-item {
  748. display: flex;
  749. align-items: center;
  750. cursor: pointer;
  751. border: 1px solid #ccc;
  752. border-radius: 8px;
  753. :deep .el-slider {
  754. .el-slider__runway {
  755. background-color: #eee;
  756. }
  757. }
  758. :deep .audio-middle {
  759. width: calc(25vw - 40px);
  760. border: none;
  761. border-radius: 8px;
  762. }
  763. .el-image {
  764. display: flex;
  765. width: 30%;
  766. min-width: 30%;
  767. height: 90px;
  768. margin: 6px;
  769. background-color: #ccc;
  770. border-radius: 8px;
  771. }
  772. .video-play {
  773. width: 30%;
  774. min-width: 30%;
  775. margin: 6px;
  776. }
  777. .text-box {
  778. word-break: break-word;
  779. }
  780. }
  781. }
  782. p {
  783. color: #999;
  784. text-align: center;
  785. }
  786. }
  787. }
  788. }
  789. :deep .audit-dialog {
  790. .el-dialog__body {
  791. height: calc(100vh - 260px);
  792. padding: 5px 20px;
  793. }
  794. .mind-map-container .mind-map {
  795. height: calc(100vh - 310px);
  796. }
  797. }
  798. </style>
  799. <style lang="scss">
  800. .tox-tinymce-aux {
  801. z-index: 9999 !important;
  802. }
  803. </style>