writeTableNew.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  1. <template>
  2. <div :class="['writeTable', editCardflag ? '' : 'writeTable-preview writeTable-preview-' + totalNumber]" v-if="data">
  3. <div class="writeTop" v-bind:class="{ flipped: isFlipped && !editCardflag }">
  4. <template v-if="editCardflag">
  5. <div class="left">
  6. <div class="header-info">
  7. <el-input v-model="data.headerCon" placeholder="输入页眉"></el-input>
  8. <el-input class="label" v-model="data.label" placeholder="输入标签"></el-input>
  9. </div>
  10. <UploadDrag
  11. :fileList="data.left.fileList"
  12. @changeFillId="changeFillId"
  13. v-if="data.left.fileList.length === 0"
  14. :disabled="is_preview"
  15. ></UploadDrag>
  16. <div class="item-image" v-else>
  17. <el-image
  18. style="width: 568px; height: 294px"
  19. :src="data.left.fileList[0].fileUrl"
  20. :preview-src-list="[data.left.fileList[0].fileUrl]"
  21. fit="contain"
  22. />
  23. <span class="item-image-del" @click="handleDeleteImg"><i class="el-icon-delete"></i></span>
  24. </div>
  25. <div style="display: flex; flex-wrap: wrap">
  26. <div class="item-con">
  27. <label>字词</label>
  28. <el-input v-model="data.left.con" placeholder="输入" @blur="handleBlurCon"></el-input>
  29. </div>
  30. <div class="item-con">
  31. <label>拼音</label>
  32. <el-input
  33. class="pinyin"
  34. v-model="data.right.pinyin"
  35. placeholder="输入"
  36. @change="handleChangePinyin"
  37. ></el-input>
  38. </div>
  39. <div class="item-con">
  40. <label>词性</label>
  41. <el-input v-model="data.right.cixing" placeholder="输入"></el-input>
  42. </div>
  43. <div class="item-con">
  44. <label>字词</label>
  45. <el-radio v-model="data.right.hideHanzi" :label="true">隐藏</el-radio>
  46. <el-radio v-model="data.right.hideHanzi" :label="false">显示</el-radio>
  47. </div>
  48. </div>
  49. <a class="del-btn" @click="handleDelItem"><i class="el-icon-delete"></i></a>
  50. </div>
  51. <div class="right">
  52. <div class="config-box">
  53. <span class="title">主题颜色</span>
  54. <el-color-picker v-model="data.borderColor" style="margin-right: 16px"></el-color-picker>
  55. <span class="title">页眉颜色</span>
  56. <el-color-picker v-model="data.fontColor" style="margin-right: 16px"></el-color-picker>
  57. <span class="title">页眉对齐</span>
  58. <el-radio-group v-model="data.fontAlign">
  59. <el-radio label="left">左对齐</el-radio>
  60. <el-radio label="center">居中对齐</el-radio>
  61. </el-radio-group>
  62. </div>
  63. <label>释义</label>
  64. <el-input type="textarea" :rows="3" v-model="data.right.definition" placeholder="请输入"></el-input>
  65. <label>搭配</label>
  66. <el-input type="textarea" :rows="3" v-model="data.right.collocation" placeholder="请输入"></el-input>
  67. <label>例句</label>
  68. <el-input type="textarea" :rows="3" v-model="data.right.exampleSent" placeholder="请输入"></el-input>
  69. </div>
  70. </template>
  71. <template v-else>
  72. <div
  73. class="left left-preview"
  74. :class="[data.left.fileList.length === 0 ? 'left-big' : '']"
  75. v-if="(isPreview && showLeft) || !isPreview"
  76. :style="{
  77. borderColor: data.borderColor,
  78. padding:
  79. data.left.con && (data.headerCon || data.label)
  80. ? ''
  81. : !data.left.con && (data.headerCon || data.label)
  82. ? '40px 12px 0 12px'
  83. : '12px',
  84. }"
  85. >
  86. <div class="header-info-preview">
  87. <h5 :style="{ textAlign: data.fontAlign }">{{ data.headerCon }}</h5>
  88. <label :style="{ background: data.borderColor }">{{ data.label }}</label>
  89. </div>
  90. <div class="item-image" v-if="data.left.fileList.length > 0">
  91. <el-image
  92. :style="{
  93. width: totalNumber < 3 ? '368px' : totalNumber > 4 ? '288px' : '318px',
  94. height:
  95. data.left.con && !data.right.hideHanzi && (data.headerCon || data.label)
  96. ? totalNumber < 3
  97. ? '220px'
  98. : totalNumber > 4
  99. ? '190px'
  100. : '200px'
  101. : (!data.left.con || (data.right.hideHanzi && data.left.con)) && (data.headerCon || data.label)
  102. ? totalNumber < 3
  103. ? '240px'
  104. : totalNumber > 4
  105. ? '220px'
  106. : '222px'
  107. : totalNumber < 3
  108. ? '294px'
  109. : totalNumber > 4
  110. ? '246px'
  111. : '260px',
  112. }"
  113. :src="data.left.fileList[0].fileUrl"
  114. :preview-src-list="[data.left.fileList[0].fileUrl]"
  115. fit="contain"
  116. />
  117. </div>
  118. <h2
  119. :class="['con-preview', data.left.fileList.length === 0 ? 'con-preview-big' : '']"
  120. v-if="data.left.con && !data.right.hideHanzi"
  121. >
  122. {{ data.left.con }}
  123. </h2>
  124. <a class="overturn-btn" v-if="isPreview" @click="changeShowLeft"><i class="el-icon-refresh"></i></a>
  125. </div>
  126. <div
  127. class="right right-preview left-preview"
  128. :class="[isPreview ? 'right-preview-rota' : '']"
  129. v-if="(isPreview && !showLeft) || !isPreview"
  130. :style="{
  131. borderColor: data.borderColor,
  132. paddingTop:
  133. totalNumber < 3
  134. ? data.right.collocation || data.right.exampleSent || data.right.definition
  135. ? ''
  136. : '50px'
  137. : data.right.collocation || data.right.exampleSent || data.right.definition
  138. ? ''
  139. : '40px',
  140. }"
  141. >
  142. <div class="header-info-preview">
  143. <h5 :style="{ textAlign: data.fontAlign }">{{ data.headerCon }}</h5>
  144. <label :style="{ background: data.borderColor }">{{ data.label }}</label>
  145. </div>
  146. <div
  147. :style="{
  148. display: 'flex',
  149. justifyContent:
  150. !(data.right.collocation && data.right.exampleSent) && data.left.con.length < 4 ? 'center' : 'auto',
  151. columnGap: '16px',
  152. }"
  153. >
  154. <div style="width: max-content" v-if="data.right.hz_info.length > 0">
  155. <AudioPlay
  156. :style="{ background: data.borderColor }"
  157. :file-id="data.right.audio_file"
  158. v-if="data.right.audio_file"
  159. />
  160. <p
  161. :style="{ color: data.borderColor }"
  162. v-if="data.right.pinyin && data.right.pinyin.split(' ').length === 1"
  163. class="pinyin-box"
  164. >
  165. {{ data.right.pinyin }}
  166. </p>
  167. <div class="hz-box">
  168. <div class="hz-item" v-for="(itemh, indexh) in data.right.hz_info" :key="indexh">
  169. <p
  170. :style="{ color: data.borderColor }"
  171. v-if="data.right.pinyin && data.right.pinyin.split(' ').length > 1"
  172. >
  173. {{ data.right.pinyin.split(' ')[indexh] ? data.right.pinyin.split(' ')[indexh] : '' }}
  174. </p>
  175. <Strockplay
  176. className="adult-strockplay"
  177. :Book_text="itemh.con"
  178. :playStorkes="true"
  179. :strokePlayColor="data.borderColor"
  180. :strokeColor="'#000000'"
  181. :palyWidth="'18px'"
  182. :BoxbgType="'0'"
  183. :curItem="itemh.hzDetail.hz_json"
  184. :targetDiv="'writeTops-item-' + pageNumber + '-' + indexh + '-' + itemh.con"
  185. :class="[indexh !== 0 ? 'writeTop-item-noLeft' : '']"
  186. class="writeTop-item"
  187. :style="{ borderColor: data.borderColor }"
  188. />
  189. </div>
  190. </div>
  191. </div>
  192. <div
  193. class="definition-box"
  194. v-if="(data.right.collocation || data.right.exampleSent) && data.left.con.length < 4"
  195. :style="{
  196. flex: '1',
  197. marginTop:
  198. totalNumber < 3 ? (data.right.audio_file ? '85px' : '27px') : data.right.audio_file ? '73px' : '27px',
  199. }"
  200. >
  201. <div v-if="data.right.cixing">
  202. <p>词性:{{ data.right.cixing }}</p>
  203. </div>
  204. <div v-if="data.right.definition">
  205. <p>释义:{{ data.right.definition }}</p>
  206. </div>
  207. </div>
  208. </div>
  209. <div
  210. class="definition-box"
  211. :style="{
  212. width:
  213. !(data.right.collocation || data.right.exampleSent) && data.left.con.length < 4
  214. ? totalNumber < 3
  215. ? data.right.hz_info.length * 86 + 'px'
  216. : data.right.hz_info.length * 78 + 'px'
  217. : '',
  218. margin:
  219. !(data.right.collocation || data.right.exampleSent) && data.left.con.length < 4
  220. ? '16px auto 0 auto'
  221. : '',
  222. }"
  223. v-if="data.right.collocation || data.right.exampleSent || data.right.definition || data.right.cixing"
  224. >
  225. <template v-if="!(data.right.collocation || data.right.exampleSent) || data.left.con.length >= 4">
  226. <div v-if="data.right.cixing">
  227. <label class="card-label">词性:</label>
  228. <p>{{ data.right.cixing }}</p>
  229. </div>
  230. <div v-if="data.right.definition">
  231. <p>释义:{{ data.right.definition }}</p>
  232. </div>
  233. </template>
  234. <div v-if="data.right.collocation">
  235. <label class="card-label">搭配:</label>
  236. <p>{{ data.right.collocation }}</p>
  237. </div>
  238. <div v-if="data.right.exampleSent">
  239. <p>例句:{{ data.right.exampleSent }}</p>
  240. </div>
  241. </div>
  242. <a class="overturn-btn" v-if="isPreview" @click="changeShowLeft"><i class="el-icon-refresh"></i></a>
  243. </div>
  244. </template>
  245. </div>
  246. </div>
  247. </template>
  248. <script>
  249. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  250. import StrockplayredlineTable from '../../components/corpus/StrockplayredlineTable.vue';
  251. import Strockplay from '../../components/corpus/Strockplay.vue';
  252. import Strockred from '../../components/corpus/Strockred.vue';
  253. import FreewriteLettle from '../../components/corpus/FreewriteLettle.vue';
  254. import UploadDrag from './UploadDrag.vue';
  255. import AudioPlay from './AudioPlay.vue';
  256. const HanziWriter = require('hanzi-writer');
  257. import { getLogin, getHZChineseInfo } from '@/api/api';
  258. export default {
  259. //import引入的组件需要注入到对象中才能使用
  260. components: {
  261. StrockplayredlineTable,
  262. Strockplay,
  263. Strockred,
  264. FreewriteLettle,
  265. UploadDrag,
  266. AudioPlay,
  267. },
  268. props: ['isPreview', 'data', 'pageNumber', 'totalNumber', 'editCardflag', 'none', 'is_preview'],
  269. data() {
  270. //这里存放数据
  271. return {
  272. ifFreeShow: false,
  273. activeIndex: null,
  274. activeColIndex: null,
  275. fileList: [],
  276. info: {
  277. definition: '',
  278. collocation: '',
  279. exampleSent: '',
  280. },
  281. writer: null,
  282. audio_file: '',
  283. loading: false,
  284. isFlipped: false,
  285. showLeft: true,
  286. };
  287. },
  288. //计算属性 类似于data概念
  289. computed: {},
  290. //监控data中数据变化
  291. watch: {
  292. editCardflag: {
  293. handler: function (val, oldVal) {
  294. if (val != oldVal) {
  295. this.showLeft = true;
  296. this.isFlipped = false;
  297. }
  298. },
  299. deep: true,
  300. },
  301. pageNumber: {
  302. handler: function (val, oldVal) {
  303. if (val != oldVal) {
  304. this.initHanziwrite();
  305. }
  306. },
  307. deep: true,
  308. },
  309. },
  310. //方法集合
  311. methods: {
  312. ExerciseChangeCurQue(answer, rowIndex, colIndex) {
  313. if (answer) {
  314. this.data.list[rowIndex][colIndex].strokes_image_url = answer.strokes_image_url;
  315. this.data.list[rowIndex][colIndex].history = answer.history;
  316. this.$forceUpdate();
  317. }
  318. },
  319. changeFillId(file, fileList) {
  320. let obj = {
  321. name: file.name,
  322. fileId: file.file_id,
  323. fileUrl: file.file_url_open,
  324. };
  325. this.data.left.fileList.push(obj);
  326. },
  327. handleDeleteImg() {
  328. this.data.left.fileList = [];
  329. },
  330. initHanziwrite() {
  331. if (this.data.left.con.trim() && this.data.right.audio_file === '') {
  332. this.loading = true;
  333. let MethodName = 'tool-TextToVoiceFile';
  334. let datas = {
  335. text: this.data.left.con.trim(),
  336. };
  337. getLogin(MethodName, datas)
  338. .then((res) => {
  339. this.loading = false;
  340. if (res.status === 1) {
  341. this.data.right.audio_file = res.file_id;
  342. }
  343. })
  344. .catch(() => {
  345. this.loading = false;
  346. });
  347. }
  348. },
  349. handleDelItem() {
  350. this.$emit('handleDelItem', this.pageNumber - 1);
  351. },
  352. // 获取数据
  353. handleBlurCon() {
  354. this.loading = true;
  355. let con = this.data.left.con.trim();
  356. let MethodName = 'hz_resource_manager-GetMultHZStrokesContent';
  357. let data = {
  358. hz_str: con,
  359. };
  360. getLogin(MethodName, data)
  361. .then((res) => {
  362. this.loading = false;
  363. for (let key in res) {
  364. if (key != 'status' && key != ',' && res[key]) {
  365. res[key] = JSON.parse(res[key]);
  366. }
  367. }
  368. let hzDetailList = res;
  369. let hz_list = [];
  370. con.split('').forEach((items) => {
  371. let res = JSON.parse(JSON.stringify(hzDetailList[items]));
  372. let obj = {
  373. con: items,
  374. hzDetail: {
  375. hz_json: res,
  376. },
  377. };
  378. hz_list.push(obj);
  379. });
  380. this.data.right.hz_info = hz_list;
  381. this.data.right.pinyin = cnchar.spell(con, 'array', 'low', 'tone').join(' ');
  382. let MethodName = 'tool-TextToVoiceFile';
  383. if (con) {
  384. let datas = {
  385. text: con,
  386. };
  387. getLogin(MethodName, datas).then((res) => {
  388. if (res.status === 1) {
  389. this.data.right.audio_file = res.file_id;
  390. }
  391. });
  392. }
  393. })
  394. .catch(() => {
  395. this.loading = false;
  396. });
  397. },
  398. // 更改拼音
  399. handleChangePinyin() {
  400. let pinyin = this.data.right.pinyin.trim().split(' ').join(',');
  401. let MethodName = 'tool-PinyinToVoiceFile';
  402. if (this.data.right.pinyin.trim()) {
  403. let datas = {
  404. pinyin: pinyin,
  405. };
  406. getLogin(MethodName, datas).then((res) => {
  407. if (res.status === 1) {
  408. this.data.right.audio_file = res.file_id;
  409. }
  410. });
  411. }
  412. },
  413. // 翻面
  414. changeShowLeft() {
  415. this.showLeft = !this.showLeft;
  416. this.isFlipped = !this.isFlipped;
  417. },
  418. changeRota() {
  419. this.isFlipped = false;
  420. },
  421. },
  422. //生命周期 - 创建完成(可以访问当前this实例)
  423. created() {
  424. this.initHanziwrite();
  425. },
  426. //生命周期 - 挂载完成(可以访问DOM元素)
  427. mounted() {
  428. // let _this = this;
  429. // _this.$nextTick(() => {
  430. // if (_this.data.hz_info && _this.data.hz_info.length === 1) {
  431. // _this.initHanziwrite();
  432. // }
  433. // });
  434. },
  435. //生命周期-创建之前
  436. beforeCreated() {},
  437. //生命周期-挂载之前
  438. beforeMount() {},
  439. //生命周期-更新之前
  440. beforUpdate() {},
  441. //生命周期-更新之后
  442. updated() {},
  443. //生命周期-销毁之前
  444. beforeDestory() {},
  445. //生命周期-销毁完成
  446. destoryed() {},
  447. //如果页面有keep-alive缓存功能,这个函数会触发
  448. activated() {},
  449. };
  450. </script>
  451. <style lang="scss" scoped>
  452. .writeTable {
  453. width: 1208px;
  454. margin: 0 auto 19px auto;
  455. // height: 842px;
  456. box-sizing: border-box;
  457. perspective: 1000px;
  458. &-preview {
  459. width: 100%;
  460. }
  461. .writeTop {
  462. min-height: 332px;
  463. display: flex;
  464. column-gap: 8px;
  465. perspective: 1000px;
  466. transition: 0.6s;
  467. transform-style: preserve-3d;
  468. position: relative;
  469. .left,
  470. .right {
  471. width: 100%;
  472. min-height: 270px;
  473. padding: 8px 12px 18px 12px;
  474. border-radius: 24px;
  475. background: #fff;
  476. box-sizing: border-box;
  477. position: relative;
  478. border: 4px solid #fff;
  479. overflow: hidden;
  480. .header-info {
  481. display: flex;
  482. width: 100%;
  483. justify-content: space-between;
  484. margin-bottom: 12px;
  485. :deep .el-input__inner {
  486. color: rgba(0, 0, 0, 1);
  487. font-size: 24px;
  488. font-weight: 400;
  489. line-height: 100%;
  490. height: 24px;
  491. border: none;
  492. padding: 0;
  493. }
  494. .label {
  495. :deep .el-input__inner {
  496. text-align: right;
  497. }
  498. }
  499. }
  500. }
  501. .left-preview {
  502. padding-top: 40px;
  503. // padding-bottom: 32px;
  504. // position: absolute;
  505. backface-visibility: hidden;
  506. }
  507. .header-info-preview {
  508. position: absolute;
  509. width: 100%;
  510. left: 0;
  511. top: 0;
  512. z-index: 1;
  513. h5 {
  514. color: #000;
  515. font-size: 20px;
  516. font-weight: 400;
  517. line-height: 32px;
  518. padding: 0 12px;
  519. }
  520. label {
  521. position: absolute;
  522. right: -4px;
  523. top: -4px;
  524. border-radius: 0px 8px;
  525. background: #fff;
  526. padding: 0px 16px 0px 8px;
  527. color: #fff;
  528. font-size: 20px;
  529. font-weight: 500;
  530. line-height: 150%;
  531. }
  532. }
  533. .left-big {
  534. display: flex;
  535. align-items: center;
  536. justify-content: center;
  537. }
  538. .del-btn {
  539. cursor: pointer;
  540. border-radius: 40px;
  541. background: #f56767;
  542. padding: 5px 8px;
  543. position: absolute;
  544. right: 8px;
  545. bottom: 8px;
  546. color: #fff;
  547. font-size: 24px;
  548. }
  549. .overturn-btn {
  550. position: absolute;
  551. right: 8px;
  552. bottom: 8px;
  553. border-radius: 8px;
  554. background: #e0e0e0;
  555. padding: 8px;
  556. width: 24px;
  557. height: 24px;
  558. color: #fff;
  559. font-size: 24px;
  560. line-height: 1;
  561. cursor: pointer;
  562. }
  563. .right {
  564. display: flex;
  565. align-items: center;
  566. flex-flow: wrap;
  567. padding: 16px 24px 26px 24px;
  568. row-gap: 8px;
  569. .card-label {
  570. width: 100%;
  571. color: #4e5969;
  572. font-size: 14px;
  573. font-weight: 400;
  574. line-height: 22px;
  575. height: 22px;
  576. }
  577. :deep .el-textarea {
  578. height: 64px;
  579. }
  580. .config-box {
  581. display: flex;
  582. align-items: center;
  583. width: 100%;
  584. span {
  585. color: #000;
  586. font-size: 14px;
  587. line-height: 20px;
  588. margin-right: 8px;
  589. }
  590. .el-color-picker {
  591. height: 32px;
  592. }
  593. :deep .el-color-picker__trigger {
  594. height: 32px;
  595. }
  596. .el-radio {
  597. margin-right: 8px;
  598. }
  599. .el-radio-group {
  600. display: flex;
  601. }
  602. :deep .el-radio__input.is-checked .el-radio__inner {
  603. border-color: #000;
  604. background: #000;
  605. }
  606. :deep .el-radio__input.is-checked + .el-radio__label {
  607. color: #000;
  608. }
  609. }
  610. }
  611. .right-preview {
  612. padding: 36px;
  613. display: block;
  614. .pinyin-box {
  615. color: #de4444;
  616. font-feature-settings: 'cv01' on;
  617. font-family: League;
  618. // font-size: 18px;
  619. line-height: 120%;
  620. margin-bottom: 8px;
  621. text-align: center;
  622. }
  623. .hz-box {
  624. width: 100%;
  625. .hz-item {
  626. text-align: center;
  627. :deep .strockplayInner {
  628. width: 76px;
  629. height: 76px;
  630. }
  631. p {
  632. color: #de4444;
  633. font-feature-settings: 'cv01' on;
  634. font-family: League;
  635. font-size: 18px;
  636. line-height: 120%;
  637. margin-bottom: 8px;
  638. }
  639. }
  640. }
  641. :deep .audio-wrapper {
  642. margin: 0 auto 8px auto;
  643. border-radius: 40px;
  644. background: #f3f3f3;
  645. padding: 13px;
  646. width: 50px;
  647. height: 50px;
  648. box-sizing: border-box;
  649. cursor: pointer;
  650. .voice-play {
  651. width: 24px;
  652. height: 24px;
  653. }
  654. }
  655. .definition-box {
  656. white-space: pre;
  657. margin-top: 16px;
  658. > div {
  659. display: flex;
  660. margin-bottom: 8px;
  661. label,
  662. p {
  663. width: 40px;
  664. color: #000;
  665. font-size: 14px;
  666. font-weight: 400;
  667. line-height: 150%;
  668. }
  669. label {
  670. width: 47px;
  671. }
  672. p {
  673. flex: 1;
  674. word-break: break-word;
  675. white-space: pre-wrap;
  676. }
  677. }
  678. }
  679. }
  680. .right-preview-rota {
  681. transform: rotateY(180deg);
  682. }
  683. .item-image {
  684. position: relative;
  685. // background: #f2f3f5;
  686. border-radius: 8px;
  687. overflow: hidden;
  688. font-size: 0;
  689. .item-image-del {
  690. position: absolute;
  691. top: 8px;
  692. right: 8px;
  693. width: 16px;
  694. height: 16px;
  695. display: block;
  696. cursor: pointer;
  697. background-color: #ffffff;
  698. color: #ee3232;
  699. padding: 8px;
  700. border-radius: 50%;
  701. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  702. font-size: 16px;
  703. }
  704. }
  705. .item-con {
  706. width: 50%;
  707. display: flex;
  708. align-items: center;
  709. margin-top: 16px;
  710. label {
  711. color: #4e5969;
  712. font-size: 14px;
  713. font-weight: 400;
  714. line-height: 22px;
  715. width: 44px;
  716. }
  717. :deep .el-input__inner {
  718. border-radius: 2px;
  719. background: #f2f3f5;
  720. width: 235px;
  721. border: none;
  722. font-size: 14px;
  723. font-weight: 400;
  724. line-height: 22px;
  725. height: 32px;
  726. font-family: FZJCGFKTK;
  727. }
  728. .pinyin {
  729. :deep .el-input__inner {
  730. font-family: League;
  731. }
  732. }
  733. }
  734. .con-preview {
  735. margin-top: 8px;
  736. color: #000;
  737. text-align: center;
  738. font-family: 'FZJCGFKTK';
  739. font-size: 38px;
  740. font-weight: 400;
  741. line-height: 100%;
  742. &-big {
  743. font-size: 86px;
  744. margin-top: 0;
  745. }
  746. }
  747. .writeTop-row {
  748. display: flex;
  749. justify-content: center;
  750. }
  751. }
  752. &-preview-3,
  753. &-preview-4 {
  754. .writeTop {
  755. min-height: 295px;
  756. .left,
  757. .right {
  758. padding-top: 30px;
  759. padding-bottom: 8px;
  760. }
  761. .strockplayInner {
  762. width: 66px !important;
  763. height: 66px !important;
  764. }
  765. .audio-wrapper {
  766. width: 40px !important;
  767. height: 40px !important;
  768. padding: 8px !important;
  769. }
  770. }
  771. }
  772. &-preview-5 {
  773. .writeTop {
  774. min-height: 282px;
  775. .left,
  776. .right {
  777. padding-top: 30px;
  778. padding-bottom: 8px;
  779. }
  780. .strockplayInner {
  781. width: 66px !important;
  782. height: 66px !important;
  783. }
  784. .audio-wrapper {
  785. width: 40px !important;
  786. height: 40px !important;
  787. padding: 8px !important;
  788. }
  789. }
  790. }
  791. .writeTop-nopadding {
  792. padding-top: 0;
  793. height: 842px;
  794. }
  795. .item-info {
  796. display: flex;
  797. width: 100%;
  798. padding: 0 46px 8px 46px;
  799. column-gap: 16px;
  800. box-sizing: border-box;
  801. &-left {
  802. .writeTop-item {
  803. width: 98px;
  804. height: 98px;
  805. :deep .strock-play-box {
  806. width: 18px !important;
  807. height: 18px !important;
  808. }
  809. :deep .playStorkes-btn {
  810. width: 18px !important;
  811. height: 18px !important;
  812. }
  813. &-small {
  814. width: 62px;
  815. height: 62px;
  816. :deep .strock-play-box {
  817. width: 11px !important;
  818. height: 11px !important;
  819. }
  820. :deep .playStorkes-btn {
  821. width: 11px !important;
  822. height: 11px !important;
  823. }
  824. }
  825. }
  826. &-long {
  827. width: 100%;
  828. }
  829. }
  830. &-right {
  831. flex: 1;
  832. }
  833. :deep .el-textarea__inner {
  834. resize: none;
  835. background-color: #f3f3f3;
  836. border: none;
  837. outline: none;
  838. }
  839. .voice-box {
  840. width: 100%;
  841. height: 32px;
  842. display: flex;
  843. align-items: center;
  844. justify-content: center;
  845. column-gap: 4px;
  846. img {
  847. width: 24px;
  848. height: 24px;
  849. }
  850. span {
  851. font-family: League;
  852. font-size: 16px;
  853. font-weight: 400;
  854. color: #de4444;
  855. }
  856. }
  857. .item-info-row {
  858. display: flex;
  859. column-gap: 11px;
  860. margin-bottom: 6px;
  861. :deep .el-input__inner {
  862. background-color: #f3f3f3;
  863. border: none;
  864. outline: none;
  865. height: 32px;
  866. }
  867. }
  868. .item-info-half,
  869. .item-info-all {
  870. width: 50%;
  871. display: flex;
  872. font-size: 14px;
  873. line-height: 22px;
  874. height: 22px;
  875. }
  876. .item-info-all {
  877. width: 100%;
  878. }
  879. }
  880. .hz-box {
  881. display: flex;
  882. width: max-content;
  883. }
  884. .writeTop-item {
  885. border: 1px solid #de4444;
  886. }
  887. .writeTop-item-noLeft {
  888. border-left: none;
  889. }
  890. .tian-div {
  891. width: 100%;
  892. height: 100%;
  893. position: relative;
  894. .tian {
  895. width: 100%;
  896. height: 100%;
  897. }
  898. img {
  899. width: 100%;
  900. height: 100%;
  901. position: absolute;
  902. left: 0;
  903. top: 0;
  904. }
  905. }
  906. .flipped {
  907. transform: rotateY(180deg);
  908. }
  909. .flipped-back {
  910. transform: rotateY(180deg);
  911. }
  912. }
  913. </style>
  914. <style lang="scss">
  915. .writeTable {
  916. input::placeholder {
  917. font-family: initial;
  918. }
  919. input::-webkit-input-placeholder {
  920. font-family: initial;
  921. }
  922. input::-moz-placeholder {
  923. font-family: initial;
  924. }
  925. input:-moz-placeholder {
  926. font-family: initial;
  927. }
  928. input:-ms-input-placeholder {
  929. font-family: initial;
  930. }
  931. .header-info {
  932. input::placeholder {
  933. font-size: 16px;
  934. }
  935. input::-webkit-input-placeholder {
  936. font-size: 16px;
  937. }
  938. input::-moz-placeholder {
  939. font-size: 16px;
  940. }
  941. input:-moz-placeholder {
  942. font-size: 16px;
  943. }
  944. input:-ms-input-placeholder {
  945. font-size: 16px;
  946. }
  947. }
  948. }
  949. </style>