courseView.vue 25 KB

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