NewWordShow.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. <!-- -->
  2. <template>
  3. <div
  4. v-if="curQue"
  5. class="Big-Book-prev-Textdes NewWordShow"
  6. :class="[isPhone ? 'NewWordShow-phone' : '']"
  7. >
  8. <h2 v-if="curQue.title">{{ curQue.title }}</h2>
  9. <div class="item-box">
  10. <div v-for="(item, index) in curQue.option" :key="index" class="item-pre">
  11. <template v-if="isPhone">
  12. <div class="item-info">
  13. <template v-if="item.pinyin">
  14. <span class="pinyin" :style="{ width: pinyinWidth + 'px' }">{{
  15. item.pinyin
  16. }}</span>
  17. </template>
  18. <div
  19. class="con-box"
  20. v-if="
  21. (item.imgOrText && item.imgOrText == 'text' && item.con) ||
  22. (item.imgOrText == 'image' && item.img_list.length > 0)
  23. "
  24. >
  25. <template v-if="item.imgOrText == 'text'">
  26. <template v-if="item.con">
  27. <div
  28. v-for="(conItem, conindex) in item.con"
  29. :key="conindex"
  30. class="strockplay-newWord"
  31. @click="writeWord(conItem, item.pinyin)"
  32. >
  33. <Strockplayredline
  34. :Book_text="conItem"
  35. :play-storkes="true"
  36. :target-div="
  37. 'bwcHanziIntp' +
  38. index +
  39. conItem +
  40. conindex +
  41. indexStr +
  42. judgeAnswer
  43. "
  44. />
  45. <div
  46. v-if="conindex < item.con.length - 1"
  47. class="bwc-line"
  48. />
  49. </div>
  50. </template>
  51. <template v-else>
  52. <div class="blank-item" @click="freeWrite('', index, 0)">
  53. <img v-if="freeImg[index][0]" :src="freeImg[index][0]" />
  54. </div>
  55. </template>
  56. </template>
  57. <template v-else-if="item.imgOrText == 'image'">
  58. <div
  59. v-for="(imgItem, imgIndex) in item.img_list"
  60. :key="imgIndex"
  61. class="img-box"
  62. @click="freeWrite(imgItem.id, imgIndex, 0)"
  63. >
  64. <el-image :src="imgItem.id" fit="scale-down" class="img_url">
  65. <div slot="placeholder" class="image-slot">
  66. <img src="../../../assets/common/icon-imgloading.png" />
  67. </div>
  68. </el-image>
  69. </div>
  70. </template>
  71. </div>
  72. <span
  73. v-if="item.en"
  74. class="en"
  75. :style="{
  76. marginLeft: item.en.length < 12 ? '' : enMargin + 'px',
  77. textAlign: item.en.length < 12 ? 'center' : 'left',
  78. width: item.en.length < 12 ? '66px' : ''
  79. }"
  80. >{{ item.en }}</span
  81. >
  82. </div>
  83. <div class="item">
  84. <template v-if="item.type && item.type.indexOf('lm') > -1">
  85. <div
  86. v-for="(items, indexs) in item.imgarr"
  87. :key="indexs"
  88. class="con-box"
  89. >
  90. <div
  91. class="strockplay-newWord"
  92. @click="freeWrite(items, index, indexs)"
  93. >
  94. <!-- <div
  95. @click.stop="playHanzi(index, indexs, items)"
  96. :class="[
  97. 'strock-play-box',
  98. themeColor == 'green'
  99. ? 'green-border'
  100. : themeColor == 'red'
  101. ? 'red-border'
  102. : themeColor == 'brown'
  103. ? 'brown-border'
  104. : 'red-border',
  105. ]"
  106. ></div> -->
  107. <img
  108. v-if="!playStatus && items && items.strokes_image_url"
  109. :src="items.strokes_image_url"
  110. alt=""
  111. />
  112. <!-- <FreeWriteQP
  113. :id="'cans' + index + indexs"
  114. :ref="'cans'"
  115. :height="256"
  116. :width="256"
  117. /> -->
  118. </div>
  119. </div>
  120. </template>
  121. </div>
  122. </template>
  123. <template v-else>
  124. <template v-if="item.pinyin">
  125. <span class="pinyin" :style="{ width: pinyinWidth + 'px' }">{{
  126. item.pinyin
  127. }}</span>
  128. </template>
  129. <div class="item" style="margin-right: 20px">
  130. <div
  131. class="con-box"
  132. v-if="
  133. (item.imgOrText && item.imgOrText == 'text' && item.con) ||
  134. (item.imgOrText == 'image' && item.img_list.length > 0)
  135. "
  136. >
  137. <template v-if="item.imgOrText == 'text'">
  138. <template v-if="item.con">
  139. <div
  140. v-for="(conItem, conindex) in item.con"
  141. :key="conindex"
  142. class="strockplay-newWord"
  143. @click="writeWord(conItem, item.pinyin)"
  144. >
  145. <Strockplayredline
  146. :Book_text="conItem"
  147. :play-storkes="true"
  148. :target-div="
  149. 'bwcHanziIntp' +
  150. index +
  151. conItem +
  152. conindex +
  153. indexStr +
  154. judgeAnswer
  155. "
  156. />
  157. <div
  158. v-if="conindex < item.con.length - 1"
  159. class="bwc-line"
  160. />
  161. </div>
  162. </template>
  163. <template v-else>
  164. <div class="blank-item" @click="freeWrite('', index, 0)">
  165. <img v-if="freeImg[index][0]" :src="freeImg[index][0]" />
  166. </div>
  167. </template>
  168. </template>
  169. <template v-else-if="item.imgOrText == 'image'">
  170. <div
  171. v-for="(imgItem, imgIndex) in item.img_list"
  172. :key="imgIndex"
  173. class="img-box"
  174. @click="freeWrite(imgItem.id, imgIndex, 0)"
  175. >
  176. <el-image :src="imgItem.id" fit="scale-down" class="img_url">
  177. <div slot="placeholder" class="image-slot">
  178. <img src="../../../assets/common/icon-imgloading.png" />
  179. </div>
  180. </el-image>
  181. </div>
  182. </template>
  183. </div>
  184. <template v-if="item.type && item.type.indexOf('lm') > -1">
  185. <div
  186. v-for="(items, indexs) in item.imgarr"
  187. :key="indexs"
  188. class="con-box"
  189. >
  190. <div
  191. class="strockplay-newWord"
  192. @click="freeWrite(items, index, indexs)"
  193. >
  194. <!-- <div
  195. @click.stop="playHanzi(index, indexs, items)"
  196. :class="[
  197. 'strock-play-box',
  198. themeColor == 'green'
  199. ? 'green-border'
  200. : themeColor == 'red'
  201. ? 'red-border'
  202. : themeColor == 'brown'
  203. ? 'brown-border'
  204. : 'red-border',
  205. ]"
  206. ></div> -->
  207. <img
  208. v-if="!playStatus && items && items.strokes_image_url"
  209. :src="items.strokes_image_url"
  210. alt=""
  211. />
  212. <!-- <FreeWriteQP
  213. :id="'cans' + index + indexs"
  214. :ref="'cans'"
  215. :height="256"
  216. :width="256"
  217. /> -->
  218. </div>
  219. </div>
  220. </template>
  221. </div>
  222. <span
  223. v-if="item.en"
  224. class="en"
  225. :style="{
  226. marginLeft: item.en.length < 12 ? '' : enMargin + 'px',
  227. textAlign: item.en.length < 12 ? 'center' : 'left',
  228. width: item.en.length < 12 ? pinyinWidth + 'px' : ''
  229. }"
  230. >{{ item.en }}</span
  231. >
  232. </template>
  233. </div>
  234. </div>
  235. <el-dialog
  236. :visible.sync="isPraShow"
  237. :show-close="false"
  238. :close-on-click-modal="true"
  239. :modal-append-to-body="true"
  240. :append-to-body="true"
  241. :lock-scroll="true"
  242. :width="isPhone ? '100%' : '504px'"
  243. class="practiceBox practiceBoxStrock"
  244. v-if="isPraShow"
  245. >
  246. <Practice
  247. @changePraShow="changePraShow"
  248. :cur="curData"
  249. :theme-color="themeColor"
  250. />
  251. </el-dialog>
  252. <!-- <div v-if="isPraShow" class="practiceBox practiceBoxStrock">
  253. <Practice
  254. :change-pra-show="changePraShow"
  255. :cur="curData"
  256. :theme-color="themeColor"
  257. />
  258. </div> -->
  259. <el-dialog
  260. :visible.sync="ifFreeShow"
  261. :show-close="false"
  262. :close-on-click-modal="true"
  263. :modal-append-to-body="true"
  264. :append-to-body="true"
  265. :lock-scroll="true"
  266. width="320px"
  267. top="0"
  268. class="practiceBox practiceBoxStrock practiceBoxCenter"
  269. v-if="ifFreeShow"
  270. >
  271. <FreewriteLettle
  272. ref="freePaint"
  273. :change-pra-show="changePraShow"
  274. :theme-color="themeColor"
  275. :current-tree-i-d="currentTreeID"
  276. :current-hz="currentHz"
  277. :curren-hz-data="currenHzData"
  278. :row-index="activeIndex"
  279. :col-index="activeColIndex"
  280. :closeif-free-show="closeifFreeShow"
  281. :task-model="TaskModel"
  282. @changeCurQue="changeCurQue"
  283. @deleteWriteRecord="deleteWriteRecord"
  284. />
  285. </el-dialog>
  286. <!-- <div v-if="ifFreeShow" class="practiceBox practiceBoxStrock">
  287. <FreewriteLettle
  288. ref="freePaint"
  289. :change-pra-show="changePraShow"
  290. :theme-color="themeColor"
  291. :current-tree-i-d="currentTreeID"
  292. :current-hz="currentHz"
  293. :curren-hz-data="currenHzData"
  294. :row-index="activeIndex"
  295. :col-index="activeColIndex"
  296. :closeif-free-show="closeifFreeShow"
  297. :task-model="TaskModel"
  298. @changeCurQue="changeCurQue"
  299. @deleteWriteRecord="deleteWriteRecord"
  300. />
  301. </div> -->
  302. </div>
  303. </template>
  304. <script>
  305. import Strockplayredline from "../preview/components/Strockplayredline.vue";
  306. import Practice from "../preview/components/Practice.vue";
  307. import FreewriteLettle from "../preview/components/FreewriteLettle.vue";
  308. import { getContentFile, LearnWebSI } from "../../../api/ajax";
  309. import FreeWriteQP from "./components/FreewriteWord.vue";
  310. export default {
  311. components: { Strockplayredline, Practice, FreewriteLettle, FreeWriteQP },
  312. props: [
  313. "curQue",
  314. "themeColor",
  315. "indexStr",
  316. "currentTreeID",
  317. "TaskModel",
  318. "judgeAnswer",
  319. "isPhone"
  320. ],
  321. data() {
  322. return {
  323. isPraShow: false,
  324. curData: null,
  325. ifFreeShow: false,
  326. freeImg: [],
  327. activeIndex: null,
  328. activeColIndex: null,
  329. currentHz: "", // 当前汉字
  330. currenHzData: null, // 当前汉字数据
  331. playStatus: false, // 播放状态
  332. userAnswer: {
  333. writeModel: {} // 生词/取词模式
  334. },
  335. pinyinWidth: 91,
  336. enMargin: 13
  337. };
  338. },
  339. computed: {},
  340. watch: {},
  341. // 生命周期 - 创建完成(可以访问当前this实例)
  342. created() {
  343. let _this = this;
  344. if (!_this.curQue.Bookanswer) {
  345. _this.curQue.Bookanswer = JSON.parse(JSON.stringify(_this.userAnswer));
  346. }
  347. // if (_this.TaskModel != "ANSWER") {
  348. // _this.handleData();
  349. // } else {
  350. _this.handleAnswerData();
  351. // }
  352. },
  353. // 生命周期 - 挂载完成(可以访问DOM元素)
  354. mounted() {},
  355. beforeCreate() {}, // 生命周期 - 创建之前
  356. beforeMount() {}, // 生命周期 - 挂载之前
  357. beforeUpdate() {}, // 生命周期 - 更新之前
  358. updated() {}, // 生命周期 - 更新之后
  359. beforeDestroy() {}, // 生命周期 - 销毁之前
  360. destroyed() {}, // 生命周期 - 销毁完成
  361. activated() {},
  362. // 方法集合
  363. methods: {
  364. playHanzi(rowIndex, colIndex, item) {
  365. if (this.playStatus) {
  366. this.$message({
  367. showClose: true,
  368. message: "请等待播放完成",
  369. type: "warning",
  370. duration: 2000
  371. });
  372. return;
  373. }
  374. this.playStatus = true;
  375. let ref = null;
  376. this.$refs.cans.forEach(items => {
  377. if (items.$el.id == `cans${rowIndex}${colIndex}`) {
  378. ref = items;
  379. }
  380. });
  381. ref.reset();
  382. let c = document.getElementById(`cans${rowIndex}${colIndex}`);
  383. let cxt = document
  384. .getElementById(`cans${rowIndex}${colIndex}`)
  385. .getContext("2d");
  386. cxt.clearRect(0, 0, c.width, c.height);
  387. let history = item.history;
  388. const len = item.history.length;
  389. let i = 0;
  390. const runner = () => {
  391. i++;
  392. if (i < len) {
  393. ref.draw(null, history[i][0], history[i][1]);
  394. requestAnimationFrame(runner);
  395. } else {
  396. this.playStatus = false;
  397. }
  398. };
  399. requestAnimationFrame(runner);
  400. },
  401. // 处理数据
  402. handleData() {
  403. let _this = this;
  404. let MethodName = "teaching-practice_manager-GetMyHZHandwrittenRecordList";
  405. this.curQue.option.forEach((item, index) => {
  406. let data = {
  407. courseware_id: this.currentTreeID,
  408. hz: item.con,
  409. search_scope: 1,
  410. count_limit: 6
  411. };
  412. LearnWebSI(MethodName, data).then(res => {
  413. let imgarr = res.hz_handwritten_record_list;
  414. let newimgarr = imgarr.map(it => {
  415. it.history = JSON.parse(it.strokes_content);
  416. return it;
  417. });
  418. if (newimgarr.length < 6) {
  419. let num = 6 - newimgarr.length;
  420. for (let i = 0; i < num; i++) {
  421. newimgarr.push({});
  422. }
  423. }
  424. if (
  425. !item.imgOrText ||
  426. (item.imgOrText === "text" && !item.con.trim()) ||
  427. (item.imgOrText === "image" && item.img_list.length === 0)
  428. ) {
  429. newimgarr.push({});
  430. }
  431. item.imgarr = newimgarr;
  432. this.$forceUpdate();
  433. });
  434. });
  435. },
  436. // 处理数据
  437. handleAnswerData() {
  438. let _this = this;
  439. _this.curQue.option.forEach((item, index) => {
  440. let con =
  441. item.imgOrText == "text"
  442. ? item.con
  443. : item.img_list && item.img_list.length > 0 && item.img_list[0].id
  444. ? item.img_list[0].id
  445. : index;
  446. let arr = [];
  447. if (
  448. _this.curQue.Bookanswer.writeModel &&
  449. _this.curQue.Bookanswer.writeModel[con]
  450. ) {
  451. arr = _this.curQue.Bookanswer.writeModel[con].map(it => {
  452. if (it && it.strokes_content) {
  453. it.history = JSON.parse(it.strokes_content);
  454. }
  455. return it;
  456. });
  457. } else {
  458. for (let i = 0; i < this.curQue.numberList.con; i++) {
  459. arr.push(null);
  460. }
  461. if (
  462. !item.imgOrText ||
  463. (item.imgOrText === "text" && !item.con.trim()) ||
  464. (item.imgOrText === "image" && item.img_list.length === 0)
  465. ) {
  466. arr.push(null);
  467. }
  468. // arr = [null, null, null, null, null, null, null];
  469. }
  470. item.imgarr = arr;
  471. this.pinyinWidth = Number(
  472. 730 / (Number(this.curQue.numberList.con) + 1)
  473. );
  474. this.enMargin =
  475. (Number(730 / (Number(this.curQue.numberList.con) + 1)) - 64) / 2;
  476. });
  477. console.log(this.curQue);
  478. },
  479. changePraShow() {
  480. this.isPraShow = false;
  481. this.ifFreeShow = false;
  482. // this.freeImg[this.activeIndex][this.activeColIndex] =
  483. // this.$refs.freePaint.imgSrc;
  484. },
  485. async writeWord(words, pinyin) {
  486. this.activeIndex = null;
  487. this.activeColIndex = null;
  488. const MethodName = "tool-ChineseSCConvert";
  489. const data = {
  490. text: words,
  491. swap_mode: "S-C"
  492. };
  493. let TChinese = await getContentFile(MethodName, data);
  494. this.curData = {
  495. stem: [
  496. {
  497. con: words || "",
  498. pinyin: pinyin || "",
  499. mp3_url: "",
  500. TChinese: TChinese.text
  501. }
  502. ]
  503. };
  504. this.isPraShow = true;
  505. },
  506. closeifFreeShow(data, rowIndex, colIndex) {
  507. this.curQue.option[rowIndex].imgarr[colIndex] = data;
  508. this.ifFreeShow = false;
  509. this.freeWrite(data, rowIndex, colIndex);
  510. this.ifFreeShow = false;
  511. this.$forceUpdate();
  512. },
  513. freeWrite(imgUrl, index, indexs) {
  514. let _this = this;
  515. if (_this.TaskModel == "ANSWER" && !imgUrl) {
  516. return;
  517. }
  518. _this.ifFreeShow = true;
  519. _this.activeIndex = index;
  520. _this.activeColIndex = indexs;
  521. _this.currentHz =
  522. _this.curQue.option[index].imgOrText == "text"
  523. ? _this.curQue.option[index].con
  524. : _this.curQue.option[index].img_list[0]
  525. ? _this.curQue.option[index].img_list[0].id
  526. : index;
  527. _this.currenHzData = imgUrl;
  528. console.log(_this.curQue);
  529. },
  530. // 删除记录
  531. deleteWriteRecord(rowIndex, colIndex, currentHz) {
  532. this.$set(this.curQue.option[rowIndex].imgarr, colIndex, {});
  533. let answer = {
  534. hz: currentHz,
  535. strokes_content: "",
  536. strokes_image_url: ""
  537. };
  538. this.changeCurQue(answer, colIndex);
  539. this.$forceUpdate();
  540. },
  541. changeCurQue(answer, colIndex) {
  542. if (answer) {
  543. let writeModel = this.curQue.Bookanswer.writeModel;
  544. let hz = answer.hz;
  545. if (writeModel.hasOwnProperty(hz)) {
  546. writeModel[hz][colIndex] = answer;
  547. } else {
  548. writeModel[hz] = [];
  549. for (let i = 0; i < 6; i++) {
  550. writeModel[hz].push(null);
  551. }
  552. writeModel[hz][colIndex] = answer;
  553. }
  554. }
  555. }
  556. } // 如果页面有keep-alive缓存功能,这个函数会触发
  557. };
  558. </script>
  559. <style lang="scss" scoped>
  560. //@import url(); 引入公共css类
  561. .NewWordShow {
  562. width: 100%;
  563. margin-bottom: 24px;
  564. h2 {
  565. margin: 0 0 8px 0;
  566. font-weight: 500;
  567. font-size: 16px;
  568. line-height: 24px;
  569. color: #000000;
  570. }
  571. .item-box {
  572. padding-bottom: 8px;
  573. padding: 0 4px;
  574. background: #f7f7f7;
  575. border: 1px solid rgba(0, 0, 0, 0.1);
  576. border-radius: 8px;
  577. .item-pre {
  578. padding: 9px 20px;
  579. }
  580. .pinyin {
  581. text-align: center;
  582. display: block;
  583. margin-bottom: 4px;
  584. font-family: Sans-GBNPC;
  585. color: #000;
  586. }
  587. .en {
  588. display: block;
  589. margin-top: 4px;
  590. font-family: robot, "alabo";
  591. }
  592. .item {
  593. box-sizing: border-box;
  594. // width: 66px;
  595. cursor: pointer;
  596. display: flex;
  597. flex-flow: wrap;
  598. align-items: flex-end;
  599. > p {
  600. white-space: nowrap;
  601. :nth-child(1) {
  602. font-family: "GB-PINYINOK-B";
  603. }
  604. :nth-child(2) {
  605. font-family: "robot", "alabo";
  606. margin-left: 4px;
  607. }
  608. color: #2c2c2c;
  609. font-size: 14px;
  610. line-height: 130%;
  611. text-align: center;
  612. margin: 0 0 8px 0;
  613. }
  614. }
  615. .strockplay {
  616. display: flex;
  617. justify-content: center;
  618. align-items: center;
  619. position: relative;
  620. width: 64px;
  621. height: 64px;
  622. }
  623. .strockplayRedInner {
  624. width: 64px;
  625. height: 64px;
  626. }
  627. .bwc-line {
  628. width: 1px;
  629. height: 62px;
  630. background: #de4444;
  631. }
  632. .con-box {
  633. width: 66px;
  634. height: 66px;
  635. display: flex;
  636. border: 1px solid #de4444;
  637. border-radius: 8px;
  638. overflow: hidden;
  639. margin: 0 auto;
  640. .img-box {
  641. background: #fff url("../../../assets/NPC/chinaTianRed.png") center
  642. no-repeat;
  643. background-size: cover;
  644. .img_url {
  645. width: 64px;
  646. height: 64px;
  647. }
  648. }
  649. }
  650. .strockplay-newWord {
  651. width: 64px;
  652. height: 64px;
  653. background: #fff url("../../../assets/NPC/chinaTianRed.png") center
  654. no-repeat;
  655. background-size: cover;
  656. position: relative;
  657. .strock-play-box {
  658. position: absolute;
  659. cursor: pointer;
  660. }
  661. canvas {
  662. width: 64px;
  663. height: 64px;
  664. }
  665. img {
  666. width: 100%;
  667. height: 100%;
  668. }
  669. }
  670. }
  671. .practiceBox {
  672. position: fixed;
  673. left: 0;
  674. top: 0;
  675. z-index: 1000;
  676. width: 100%;
  677. height: 100vh;
  678. background: rgba(0, 0, 0, 0.19);
  679. box-sizing: border-box;
  680. overflow: hidden;
  681. overflow-y: auto;
  682. &.practiceBoxStrock {
  683. display: flex;
  684. justify-content: center;
  685. align-items: center;
  686. padding-top: 0px;
  687. }
  688. }
  689. &-phone {
  690. .item-box {
  691. .item-pre {
  692. padding: 10px 4px;
  693. }
  694. .item-info {
  695. .pinyin {
  696. width: 66px !important;
  697. }
  698. }
  699. .con-box {
  700. margin: 0;
  701. }
  702. .item {
  703. margin-top: 10px;
  704. gap: 10px;
  705. justify-content: start;
  706. }
  707. }
  708. }
  709. }
  710. .NPC-Big-Book-preview-brown {
  711. .NewWordShow {
  712. .item-box {
  713. .item {
  714. .bwc-line {
  715. background: #bf875e;
  716. }
  717. }
  718. .con-box {
  719. border: 1px solid #bf875e;
  720. .img-box {
  721. background: #fff url("../../../assets/NPC/chinaTianYellow.png") center
  722. no-repeat;
  723. background-size: cover;
  724. }
  725. .blank-item {
  726. background: #fff url("../../../assets/NPC/chinaTianYellow.png") center
  727. no-repeat;
  728. background-size: cover;
  729. }
  730. }
  731. }
  732. }
  733. }
  734. .NPC-Big-Book-preview-green {
  735. .NewWordShow {
  736. .item-box {
  737. .item {
  738. .bwc-line {
  739. background: #24b99e;
  740. }
  741. }
  742. .con-box {
  743. border: 1px solid #24b99e;
  744. .img-box {
  745. background: #fff url("../../../assets/NPC/chinaTianGreen.png") center
  746. no-repeat;
  747. background-size: cover;
  748. }
  749. .blank-item {
  750. background: #fff url("../../../assets/NPC/chinaTianGreen.png") center
  751. no-repeat;
  752. background-size: cover;
  753. }
  754. }
  755. }
  756. }
  757. }
  758. </style>
  759. <style lang="scss">
  760. .NPC-Big-Book-preview-red {
  761. .strockplay-newWord {
  762. .strock-play-box {
  763. width: 16px !important;
  764. height: 16px !important;
  765. right: -1px;
  766. top: 0;
  767. background: url("../../../assets/NPC/strock-play-red-click.png") center
  768. no-repeat;
  769. background-size: cover;
  770. }
  771. .character-target-div {
  772. // background-color: initial;
  773. }
  774. }
  775. }
  776. .NPC-Big-Book-preview-green {
  777. .strockplay-newWord {
  778. .strock-play-box {
  779. width: 16px !important;
  780. height: 16px !important;
  781. right: -1px;
  782. top: 0;
  783. background: url("../../../assets/NPC/strock-play-green-click.png") center
  784. no-repeat;
  785. background-size: cover;
  786. }
  787. .character-target-div {
  788. // background-color: initial;
  789. }
  790. }
  791. }
  792. .NPC-Big-Book-preview-brown {
  793. .strockplay-newWord {
  794. .strock-play-box {
  795. width: 16px !important;
  796. height: 16px !important;
  797. right: -1px;
  798. top: 0;
  799. background: url("../../../assets/NPC/strock-play-yellow-click.png") center
  800. no-repeat;
  801. background-size: cover;
  802. }
  803. .character-target-div {
  804. // background-color: initial;
  805. }
  806. }
  807. }
  808. .practiceBoxCenter {
  809. display: flex;
  810. flex-direction: column;
  811. justify-content: center;
  812. }
  813. </style>