courseView.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903
  1. <template>
  2. <div class="container GCLS-BOOK-Container" v-if="showContent">
  3. <template v-if="!isPhone && !isPad">
  4. <div v-if="!type" class="header-box">
  5. <Header />
  6. <Nav nav-value="书籍预览" />
  7. </div>
  8. <div v-else class="header-box">
  9. <div class="bookname">
  10. <i
  11. style="cursor: pointer; margin-right: 5px"
  12. class="el-icon-arrow-left"
  13. @click="back"
  14. ></i>
  15. {{ name }}
  16. </div>
  17. </div>
  18. </template>
  19. <div
  20. class="content"
  21. id="content-scroll"
  22. :class="[
  23. type ? 'content-top' : '',
  24. isPhone ? 'content-phone' : '',
  25. isPad ? 'content-pad' : '',
  26. ]"
  27. >
  28. <div
  29. id="content-tree"
  30. :class="[
  31. fullTree ? 'content-tree-full' : 'content-tree',
  32. isPhone || isPad ? 'content-tree-phone' : '',
  33. showMenu ? '' : 'content-tree-unfold',
  34. ]"
  35. :style="{ background: isPhone && showMenu ? themeColorPhone : '' }"
  36. >
  37. <template v-if="isPhone || isPad">
  38. <div class="toggle-box" :class="[showMenu ? 'toggle-box-fold' : '']">
  39. <i
  40. @click="toggleMenu"
  41. :class="[showMenu ? 'el-icon-s-fold' : 'el-icon-s-unfold']"
  42. ></i>
  43. </div>
  44. </template>
  45. <TreeView
  46. ref="treeView"
  47. :book-id="bookId"
  48. :change-id="changeId"
  49. :changeTreeData="changeTreeData"
  50. :currentTreeID="chapterId"
  51. v-show="((isPhone || isPad) && showMenu) || (!isPhone && !isPad)"
  52. />
  53. <div class="moveBtn-nnpe" v-move></div>
  54. </div>
  55. <i
  56. class="el-icon-close close-phone"
  57. v-if="isPhone || isPad"
  58. @click="back"
  59. ></i>
  60. <div
  61. id="data-screen"
  62. :class="[
  63. 'inner',
  64. fullscreen ? 'inner-full' : '',
  65. isPhone ? 'inner-phone' : '',
  66. isPad ? 'inner-pad' : '',
  67. ]"
  68. :style="{
  69. background: isPhone ? themeColorPhone : '',
  70. marginLeft: isPad ? '0' : '',
  71. }"
  72. v-loading="loading"
  73. >
  74. <el-image
  75. :src="pictureUrl"
  76. fit="scale-down"
  77. class="img_url"
  78. v-if="!chapterId && pictureUrl"
  79. >
  80. <div slot="placeholder" class="image-slot">
  81. <img src="../assets/common/icon-imgloading.png" />
  82. </div>
  83. </el-image>
  84. <!-- 显示答案按钮 -->
  85. <!-- <a v-if="chapterId" :class="['answerShow',isAnswerShow?'answerShowTrue':'']" @click="handleAnswerShow">显示答案</a> -->
  86. <!-- <a class="edit-btn" @click="handleEdit">编辑</a> -->
  87. <div v-if="chapterId" class="title-box">
  88. <img
  89. v-if="!treeFlag"
  90. src="../assets/common/icon-view-back.png"
  91. @click="treeShow"
  92. />
  93. <img
  94. v-if="!treeFlag"
  95. src="../assets/common/icon-treelist.png"
  96. @click="chooseCourseware"
  97. />
  98. <!-- <h2 class="title">{{ chapterName }}</h2> -->
  99. <!-- <el-switch
  100. v-if="!treeFlag"
  101. v-model="switchvalue"
  102. active-color="#FF9900"
  103. active-text
  104. inactive-text="生词模式"
  105. /> -->
  106. </div>
  107. <template v-if="category == 'OC' || !category">
  108. <Preview
  109. v-if="chapterId && context"
  110. ref="previewAnswer"
  111. :context="context"
  112. :bookAnswerContent="bookAnswerContent"
  113. bookclientwidth="900"
  114. :TaskModel="TaskModel"
  115. @handleBookUserAnswer="handleBookUserAnswer"
  116. />
  117. </template>
  118. <template v-if="category == 'NPC'">
  119. <Booknpc
  120. v-if="chapterId && context"
  121. ref="previewAnswerNPC"
  122. :context="context"
  123. :currentTreeID="chapterId"
  124. :FatherTreeData="FatherTreeData"
  125. :change-id="changeId"
  126. :themeColor="themeColor"
  127. :isShowTitle="true"
  128. :TaskModel="TaskModel"
  129. :isShowSave="false"
  130. @finishTaskMaterial="finishTaskMaterial"
  131. :bookAnswerContent="bookAnswerContent"
  132. :isAnswerItemShow="isAnswerItemShow"
  133. @changeThemeColorPhone="changeThemeColorPhone"
  134. />
  135. </template>
  136. <template v-if="category == 'NNPE'">
  137. <Booknnpe
  138. v-if="chapterId && context"
  139. ref="previewAnswerNNPE"
  140. :context="context"
  141. :currentTreeID="chapterId"
  142. :FatherTreeData="FatherTreeData"
  143. :change-id="changeId"
  144. :themeColor="themeColor"
  145. :isShowTitle="true"
  146. :isAnswerItemShow="true"
  147. :TaskModel="TaskModel"
  148. :isShowSave="true"
  149. @finishTaskMaterial="finishTaskMaterial"
  150. :bookAnswerContent="bookAnswerContent"
  151. />
  152. </template>
  153. <template v-if="category == 'RLC'">
  154. <Bookrlc
  155. v-if="chapterId && context"
  156. ref="previewAnswerRLC"
  157. :context="context"
  158. :currentTreeID="chapterId"
  159. :FatherTreeData="FatherTreeData"
  160. :change-id="changeId"
  161. :themeColor="themeColor"
  162. :isShowTitle="true"
  163. :bookFontSize="bookFontSize"
  164. :isAnswerItemShow="isAnswerItemShow"
  165. :TaskModel="TaskModel"
  166. :isShowSave="false"
  167. @finishTaskMaterial="finishTaskMaterial"
  168. :bookAnswerContent="bookAnswerContent"
  169. />
  170. </template>
  171. <template v-if="category == 'NEW'">
  172. <BookNew
  173. v-if="chapterId && context"
  174. ref="book"
  175. :context="context"
  176. :currentTreeID="chapterId"
  177. />
  178. </template>
  179. <template v-if="category == 'EEP'">
  180. <BookEep
  181. v-if="view_content && chapterId"
  182. :id="chapterId"
  183. :content-group-row-list="view_content.content_group_row_list"
  184. :component-list="view_content.component_list"
  185. :background="view_content.background"
  186. ></BookEep>
  187. </template>
  188. </div>
  189. </div>
  190. <!-- <Preview :context="context" :queIndex="queIndex" /> -->
  191. <a
  192. v-if="chapterId && treeFlag && !isPhone && !isPad"
  193. class="screen-full"
  194. @click="fullScreen()"
  195. />
  196. </div>
  197. </template>
  198. <script>
  199. import Header from "@/components/inputModules/common/Header";
  200. import Nav from "@/components/inputModules/common/Nav";
  201. import TreeView from "@/components/inputModules/common/TreeView";
  202. import { getContent, getLogin } from "@/api/ajax";
  203. import Cookies from "js-cookie";
  204. // import Preview from '@/componentsAnswer/PreviewAnswer.vue'
  205. import Preview from "@/components/Preview";
  206. import { getToken } from "../utils/auth";
  207. export default {
  208. name: "CourseView",
  209. directives: {
  210. move(el, bindings) {
  211. el.onmousedown = function (e) {
  212. var init = e.clientX;
  213. var parent = document.getElementById("content-tree");
  214. var initWidth = parent.offsetWidth;
  215. document.onmousemove = function (e) {
  216. var end = e.clientX;
  217. var newWidth = end - init + initWidth;
  218. if (newWidth >= 340 && newWidth <= 680)
  219. parent.style.width = newWidth + "px";
  220. };
  221. document.onmouseup = function () {
  222. document.onmousemove = document.onmouseup = null;
  223. };
  224. };
  225. },
  226. },
  227. components: {
  228. Header,
  229. Nav,
  230. TreeView,
  231. Preview,
  232. },
  233. data() {
  234. return {
  235. bookId: "",
  236. chapterId: "",
  237. chapterName: "",
  238. fullscreen: false, // 控制全屏
  239. fullTree: false, // 全屏模式下树是否显示
  240. context: null,
  241. question: null, // 选择的模板题型
  242. queIndex: "",
  243. treeFlag: true, // tree是否显示
  244. switchvalue: true, // 生词模式
  245. isAnswerShow: false, // 是否显示答案
  246. bookAnswerContent: "",
  247. TaskModel: "",
  248. category: "",
  249. FatherTreeData: null,
  250. themeColor: "",
  251. type: "",
  252. name: "",
  253. loading: false,
  254. bookFontSize: "",
  255. showContent: false,
  256. bookName: [
  257. {
  258. name: "新实用汉语课本1",
  259. id: "002-20211006-10-NHVOMDLDRY",
  260. },
  261. {
  262. name: "发展汉语初级综合(Ⅰ)",
  263. id: "002-20211007-06-4DGL2ZRIB5",
  264. },
  265. {
  266. name: "HSK标准教程1",
  267. id: "002-20211007-14-UNYIWU8EKW",
  268. },
  269. {
  270. name: "新实用汉语",
  271. id: "003-20210908-10-1ZWNGSASZL",
  272. },
  273. {
  274. name: "新航标职业英语 综合英语(基础级)学生用书1(修订版)",
  275. id: "002-20211029-14-9VGMXLV2NU",
  276. },
  277. {
  278. name: "新航标职业英语 综合英语(提高级)学生用书1 (第3版)",
  279. id: "002-20211011-10-GOLXUZST4G",
  280. },
  281. {
  282. name: "新航标英语 汽车英语",
  283. id: "002-20211222-15-O7WVMR4XHK",
  284. },
  285. {
  286. name: "新航标职业英语 英语视听说教程(入门级)1",
  287. id: "001-20211222-15-LXK64LQZST",
  288. },
  289. {
  290. name: "新航标职业英语 综合英语(提高级)学生用书2(第3版)",
  291. id: "001-20220118-14-EZVO52PYXF",
  292. },
  293. {
  294. name: "新航标职业英语 综合英语(基础级)学生用书2(修订版)",
  295. id: "002-20220208-09-FDKUJJSLI8",
  296. },
  297. {
  298. name: "轻松学中文. 课本 .第1册",
  299. id: "002-20220312-11-HK93JKDAGR",
  300. },
  301. {
  302. name: "轻松学中文. 课本. 第2册",
  303. id: "001-20220312-11-WU8XCRQMDB",
  304. },
  305. {
  306. name: "轻松学中文 . 练习册 . 第1册",
  307. id: "001-20220429-18-ZDIKBFQ9DP",
  308. },
  309. {
  310. name: "轻松学中文 . 练习册 . 第 2 册",
  311. id: "002-20220429-18-KIOM0VEXLY",
  312. },
  313. ],
  314. isAnswerItemShow: false,
  315. pictureUrl: "",
  316. isPhone: false, // 是否是移动端打开
  317. isPad: false, //是否是平板打开
  318. showMenu: false, //是否展开菜单
  319. themeColorPhone: "", // 移动端护眼色
  320. view_content: null,
  321. };
  322. },
  323. created() {
  324. const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
  325. this.isPhone = regExp.test(navigator.userAgent) && window.innerWidth < 860;
  326. this.isPad =
  327. /(?:iPad)/.test(
  328. navigator.userAgent || navigator.vendor || window.opera
  329. ) ||
  330. /(?:PlayBook)/.test(
  331. navigator.userAgent || navigator.vendor || window.opera
  332. ) ||
  333. (/(?:Android)/.test(
  334. navigator.userAgent || navigator.vendor || window.opera
  335. ) &&
  336. !/(?:Mobile)/.test(
  337. navigator.userAgent || navigator.vendor || window.opera
  338. )) ||
  339. (/(?:Firefox)/.test(
  340. navigator.userAgent || navigator.vendor || window.opera
  341. ) &&
  342. /(?:Tablet)/.test(
  343. navigator.userAgent || navigator.vendor || window.opera
  344. ));
  345. this.showMenu = !(
  346. regExp.test(navigator.userAgent) && window.innerWidth < 860
  347. );
  348. const _this = this;
  349. if (
  350. _this.$route.query.encryption &&
  351. _this.$route.query.encryption != "undefined" &&
  352. _this.$route.query.type
  353. ) {
  354. if (
  355. _this.$route.query.encryption.substring(
  356. _this.$route.query.encryption.length - 8
  357. ) *
  358. 1 <
  359. 20240712
  360. ) {
  361. _this.$message({
  362. message: "链接已停用",
  363. type: "warning",
  364. });
  365. return false;
  366. }
  367. getLogin("login_control-CheckValidDateEncryptionString", {
  368. encryption_string: _this.$route.query.encryption,
  369. })
  370. .then((res) => {
  371. if (res.is_check_pass == "true") {
  372. _this.bookId = this.$route.query.bookId;
  373. _this.type = this.$route.query.type;
  374. const MethodName = "book-book_manager-GetBook";
  375. const data = {
  376. id: _this.bookId,
  377. };
  378. getContent(MethodName, data).then((res) => {
  379. this.showContent = true;
  380. _this.name = res.name;
  381. sessionStorage.setItem("Bookdetail", JSON.stringify(res));
  382. });
  383. } else {
  384. _this.$message({
  385. message: "链接已失效",
  386. type: "warning",
  387. });
  388. }
  389. })
  390. .catch(() => {
  391. _this.$message({
  392. message: "链接已失效",
  393. type: "warning",
  394. });
  395. });
  396. } else if (_this.$route.query.showCourse) {
  397. _this.bookId = this.$route.query.bookId;
  398. this.showContent = true;
  399. const MethodName = "book-book_manager-GetBook";
  400. const data = {
  401. id: _this.bookId,
  402. };
  403. getContent(MethodName, data).then((res) => {
  404. sessionStorage.setItem("Bookdetail", JSON.stringify(res));
  405. });
  406. } else if (_this.$route.query.fromPage === "OBOC") {
  407. _this.bookId = this.$route.query.bookId;
  408. const MethodName = "book-book_manager-GetBook";
  409. const data = {
  410. id: _this.$route.query.bookId,
  411. };
  412. getContent(MethodName, data).then((res) => {
  413. this.showContent = true;
  414. _this.name = res.name;
  415. sessionStorage.setItem("Bookdetail", JSON.stringify(res));
  416. });
  417. } else {
  418. _this.$message({
  419. message: "链接已失效",
  420. type: "warning",
  421. });
  422. }
  423. let userInfor = JSON.parse(getToken());
  424. if (
  425. userInfor &&
  426. (userInfor.user_type == "TEACHER" || userInfor.user_type == "INNER")
  427. ) {
  428. _this.isAnswerItemShow = true;
  429. } else {
  430. _this.isAnswerItemShow = false;
  431. }
  432. this.themeColorPhone = localStorage.getItem("themeColorPhone")
  433. ? localStorage.getItem("themeColorPhone")
  434. : "";
  435. },
  436. mounted() {},
  437. methods: {
  438. toggleMenu() {
  439. this.showMenu = !this.showMenu;
  440. },
  441. back() {
  442. this.$router.go(-1);
  443. },
  444. changeTreeData(val) {
  445. const _this = this;
  446. if (_this.$route.query.nodeId) {
  447. _this.changeId(_this.$route.query.nodeId, "");
  448. } else {
  449. this.FatherTreeData = JSON.parse(JSON.stringify(val));
  450. let nodes = this.FatherTreeData;
  451. if (
  452. sessionStorage.getItem("gclsBookId") &&
  453. sessionStorage.getItem("gclsBookId") === this.bookId &&
  454. sessionStorage.getItem("gclsChapterId")
  455. ) {
  456. this.changeId(sessionStorage.getItem("gclsChapterId"), "");
  457. } else {
  458. for (let i = 0; i < nodes.length; i++) {
  459. if (nodes[i].is_courseware == "true") {
  460. _this.changeId(nodes[i].id, "");
  461. return false;
  462. } else {
  463. if (nodes[i].children) {
  464. let nodesC = nodes[i].children;
  465. for (let j = 0; j < nodesC.length; j++) {
  466. if (nodesC[j].is_courseware == "true") {
  467. _this.changeId(nodesC[j].id, "");
  468. return false;
  469. } else {
  470. if (nodesC[j].children) {
  471. let nodesCs = nodesC[j].children;
  472. for (let l = 0; j < nodesCs.length; l++) {
  473. if (nodesCs[l].is_courseware == "true") {
  474. _this.changeId(nodesCs[l].id, "");
  475. return false;
  476. }
  477. }
  478. }
  479. }
  480. }
  481. }
  482. }
  483. }
  484. }
  485. }
  486. },
  487. changeId(id, name) {
  488. const _this = this;
  489. _this.chapterId = id;
  490. _this.chapterName = name;
  491. _this.isAnswerShow = false;
  492. sessionStorage.setItem("gclsChapterId", id);
  493. sessionStorage.setItem("gclsBookId", this.bookId);
  494. _this.onGetData();
  495. if (!_this.treeFlag) {
  496. _this.fullTree = false;
  497. document.getElementById("content-tree").style.display = "none";
  498. }
  499. if (document.getElementById("content-scroll")) {
  500. document.getElementById("content-scroll").scrollTop = 0;
  501. }
  502. if (_this.isPhone || _this.isPad) {
  503. _this.showMenu = false;
  504. document.getElementsByClassName("content-tree-phone")[0].scrollTop = 0;
  505. }
  506. },
  507. // 点击全屏展示 隐藏tree
  508. fullScreen() {
  509. this.treeFlag = false;
  510. this.fullscreen = true;
  511. document.getElementById("content-tree").style.display = "none";
  512. },
  513. treeShow() {
  514. this.treeFlag = true;
  515. this.fullTree = false;
  516. this.fullscreen = false;
  517. document.getElementById("content-tree").style.display = "block";
  518. },
  519. // 获取预览数据
  520. onGetData() {
  521. this.loading = true;
  522. const _this = this;
  523. const MethodName = "book-courseware_manager-GetCoursewareContent_View";
  524. const data = {
  525. id: _this.chapterId,
  526. };
  527. getContent(MethodName, data).then((res) => {
  528. this.category = res.category;
  529. this.themeColor = res.book_theme_color;
  530. this.bookFontSize = res.book_font_size;
  531. if (res.content) {
  532. const _this = this;
  533. if (!this.category || this.category == "OC") {
  534. _this.context = {
  535. id: _this.chapterId,
  536. ui_type: JSON.parse(res.content).question
  537. ? JSON.parse(res.content).question.ui_type
  538. : "",
  539. sort_number: 1,
  540. content: JSON.parse(res.content),
  541. };
  542. } else {
  543. _this.context = JSON.parse(res.content);
  544. }
  545. } else {
  546. const _this = this;
  547. _this.context = null;
  548. }
  549. if (res.category === "EEP") {
  550. this.view_content = res;
  551. }
  552. this.loading = false;
  553. });
  554. },
  555. // 跳转编辑页面
  556. handleEdit() {
  557. const index = this.$refs.treeView.handleParentIndex().split("###");
  558. if (index.length > 1) {
  559. Cookies.set("bookIndex", index[0]);
  560. Cookies.set("bookLevel", index[1]);
  561. Cookies.set("bookNodename", index[2]);
  562. }
  563. this.$router.push("/input?bookId=" + this.bookId);
  564. },
  565. // 显示或隐藏答案
  566. handleAnswerShow() {
  567. this.isAnswerShow = !this.isAnswerShow;
  568. this.$refs.previewAnswer.bookAnswerShow(this.isAnswerShow);
  569. },
  570. // 得到用户答题答案
  571. handleBookUserAnswer(data) {
  572. console.log(data);
  573. },
  574. // 悬浮树隐藏显示
  575. chooseCourseware() {
  576. this.fullTree = !this.fullTree;
  577. if (this.fullTree) {
  578. document.getElementById("content-tree").style.display = "block";
  579. } else {
  580. document.getElementById("content-tree").style.display = "none";
  581. }
  582. },
  583. finishTaskMaterial(data, duration) {
  584. console.log("保存答案:");
  585. console.log(data);
  586. console.log(duration);
  587. },
  588. changeThemeColorPhone(color) {
  589. this.themeColorPhone = color;
  590. },
  591. },
  592. };
  593. </script>
  594. <style lang="scss" scoped>
  595. .header-box {
  596. position: fixed;
  597. width: 100%;
  598. top: 0;
  599. left: 0;
  600. z-index: 999;
  601. }
  602. .container {
  603. width: 100%;
  604. height: auto;
  605. .bookname {
  606. width: 100%;
  607. height: 60px;
  608. display: flex;
  609. align-items: center;
  610. box-sizing: border-box;
  611. padding: 0 46px;
  612. background: #f3f7fa;
  613. position: relative;
  614. z-index: 999;
  615. }
  616. .content {
  617. width: 100%;
  618. display: flex;
  619. justify-content: flex-start;
  620. align-items: flex-start;
  621. height: 100vh;
  622. overflow: auto;
  623. padding-top: 124px;
  624. &-top {
  625. padding-top: 60px;
  626. .title-box {
  627. top: 66px !important;
  628. }
  629. .content-tree-full {
  630. top: 100px !important;
  631. }
  632. }
  633. &-phone,
  634. &-pad {
  635. padding-top: 0;
  636. }
  637. &-tree {
  638. width: 340px;
  639. height: 85vh;
  640. overflow: auto;
  641. padding: 20px 0px;
  642. border-right: 1px solid #d9d9d9;
  643. background: #fff;
  644. position: fixed;
  645. left: 0;
  646. z-index: 2;
  647. &-phone,
  648. &-pad {
  649. width: 50%;
  650. height: 100%;
  651. padding-top: 50px;
  652. z-index: 4;
  653. overflow-x: hidden;
  654. }
  655. &-unfold {
  656. width: 40px;
  657. height: 40px;
  658. border: none;
  659. overflow: hidden;
  660. background: none;
  661. > div {
  662. text-align: left !important;
  663. }
  664. }
  665. }
  666. .content-tree-full {
  667. position: fixed !important;
  668. top: 170px;
  669. left: 152px;
  670. max-height: 588px;
  671. overflow: auto;
  672. z-index: 1000;
  673. background: #fff;
  674. box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
  675. border-radius: 4px;
  676. }
  677. #content-tree {
  678. // position: relative;
  679. }
  680. .moveBtn-nnpe {
  681. position: absolute;
  682. height: 100%;
  683. width: 10px;
  684. right: 0;
  685. top: 0;
  686. cursor: col-resize;
  687. }
  688. .inner {
  689. // border-left: 1px solid #d9d9d9;
  690. width: 1000px;
  691. margin: 0 auto;
  692. flex: 1;
  693. margin-left: 340px;
  694. box-sizing: border-box;
  695. padding: 20px;
  696. position: relative;
  697. background: #fff;
  698. &.inner-full {
  699. margin-left: 0;
  700. }
  701. &-phone,
  702. &-pad {
  703. margin-left: 0;
  704. padding: 0;
  705. width: 100%;
  706. }
  707. .title-box {
  708. display: flex;
  709. align-items: center;
  710. margin-bottom: 12px;
  711. padding-right: 160px;
  712. position: fixed;
  713. top: 76px;
  714. left: 230px;
  715. z-index: 999;
  716. > img {
  717. width: 40px;
  718. margin-right: 16px;
  719. cursor: pointer;
  720. }
  721. }
  722. .title {
  723. font-size: 24px;
  724. margin-bottom: 20px;
  725. line-height: 40px;
  726. margin: 0;
  727. }
  728. .has-module {
  729. display: flex;
  730. justify-content: flex-start;
  731. align-items: flex-start;
  732. &-tree {
  733. width: 340px;
  734. height: 100%;
  735. overflow: auto;
  736. padding: 20px 0px;
  737. border-right: 1px solid #d9d9d9;
  738. }
  739. .inner {
  740. // border-left: 1px solid #d9d9d9;
  741. width: 1000px;
  742. flex: 1;
  743. margin: 0 auto;
  744. box-sizing: border-box;
  745. padding: 20px;
  746. position: relative;
  747. background: #fff;
  748. .title-box {
  749. display: flex;
  750. align-items: center;
  751. margin-bottom: 12px;
  752. padding-right: 160px;
  753. position: relative;
  754. > img {
  755. width: 40px;
  756. margin-right: 16px;
  757. cursor: pointer;
  758. }
  759. }
  760. .title {
  761. font-size: 24px;
  762. margin-bottom: 20px;
  763. line-height: 40px;
  764. margin: 0;
  765. }
  766. .has-module {
  767. display: flex;
  768. justify-content: flex-start;
  769. align-items: flex-start;
  770. }
  771. .edit-btn {
  772. display: inline-block;
  773. font-size: 14px;
  774. background: #ff9900;
  775. float: right;
  776. line-height: 36px;
  777. color: #fff;
  778. width: 60px;
  779. text-align: center;
  780. border-radius: 4px;
  781. }
  782. }
  783. }
  784. }
  785. .nav-list {
  786. width: 200px;
  787. height: 40px;
  788. background: rgba(49, 212, 134, 0.2);
  789. border-radius: 240px;
  790. display: flex;
  791. justify-content: flex-start;
  792. align-items: center;
  793. padding: 0;
  794. margin: 0;
  795. margin-bottom: 10px;
  796. list-style: none;
  797. > li {
  798. height: 40px;
  799. width: 100px;
  800. text-align: center;
  801. font-style: normal;
  802. font-weight: bold;
  803. font-size: 14px;
  804. line-height: 40px;
  805. color: #19b068;
  806. cursor: pointer;
  807. &.active {
  808. background: #19b068;
  809. border-radius: 240px;
  810. color: #ffffff;
  811. }
  812. }
  813. }
  814. }
  815. .answerShow {
  816. position: absolute;
  817. right: 20px;
  818. top: 20px;
  819. width: 112px;
  820. height: 40px;
  821. background: #ffffff url("../assets/common/icon-eye-close.png") 16px center
  822. no-repeat;
  823. background-size: 16px;
  824. border: 1px solid rgba(44, 44, 44, 0.15);
  825. box-sizing: border-box;
  826. border-radius: 4px;
  827. font-size: 14px;
  828. line-height: 150%;
  829. color: #000000;
  830. padding: 9px 16px 9px 36px;
  831. cursor: pointer;
  832. z-index: 2;
  833. &.answerShowTrue {
  834. background: #f5f5f5 url("../assets/common/icon-eye-open.png") 16px center
  835. no-repeat;
  836. background-size: 16px;
  837. }
  838. }
  839. .close-phone {
  840. position: fixed;
  841. top: 10px;
  842. right: 0;
  843. z-index: 1;
  844. font-size: 20px;
  845. color: #fff;
  846. cursor: pointer;
  847. padding: 10px;
  848. }
  849. }
  850. .img_url {
  851. width: 1000px;
  852. height: 700px;
  853. }
  854. .toggle-box {
  855. position: fixed;
  856. top: 15px;
  857. left: 0;
  858. z-index: 5;
  859. text-align: right;
  860. color: black;
  861. padding: 10px;
  862. width: 40px;
  863. &-fold {
  864. width: 50%;
  865. }
  866. }
  867. </style>
  868. <style lang="scss">
  869. .GCLS-BOOK-Container {
  870. .screen-full {
  871. position: fixed;
  872. right: 30px;
  873. bottom: 30px;
  874. width: 48px;
  875. height: 48px;
  876. background: rgba(0, 0, 0, 0.4) url("../assets/common/icon-screenFull.png")
  877. center no-repeat;
  878. background-size: 32px;
  879. }
  880. }
  881. .title-box {
  882. .el-switch {
  883. position: absolute;
  884. top: 0;
  885. right: 0px;
  886. border: 1px solid rgba(44, 44, 44, 0.15);
  887. border-radius: 40px;
  888. height: 40px;
  889. padding: 6px 6px 6px 16px;
  890. }
  891. .el-switch__label.is-active {
  892. color: #000000;
  893. font-size: 16px;
  894. }
  895. }
  896. </style>