courseView.vue 23 KB

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