cread.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <template>
  2. <div class="cread" v-loading="loading">
  3. <template v-if="!showCard">
  4. <Header v-if="!userID" />
  5. <div class="go-back-box" :class="[userID ? 'go-back-box-user' : '']" v-if="!isPreview">
  6. <a v-if="!userID" class="go-back" :class="[editCardflag ? '' : 'go-back-preview']" @click="goBack">
  7. <i class="el-icon-arrow-left"></i>
  8. 返回
  9. </a>
  10. <template v-if="editCardflag">
  11. <div class="name-box">
  12. <label>卡片名称</label>
  13. <el-input v-model="saveName"></el-input>
  14. </div>
  15. <div class="btn-box">
  16. <el-button small @click="addCard"><i class="el-icon-plus"></i>增加卡片</el-button>
  17. <el-upload
  18. ref="upload"
  19. :action="url"
  20. accept=".xlsx,.xls"
  21. :limit="9999"
  22. :on-exceed="handleExceed"
  23. :on-success="handleSuccess"
  24. :show-file-list="false"
  25. class="btn"
  26. style="margin: 0 8px"
  27. >
  28. <el-button>通过模版导入</el-button>
  29. </el-upload>
  30. <el-button type="primary" plain small @click="save">结束编辑并保存</el-button>
  31. </div>
  32. </template>
  33. <template v-else>
  34. <h3>{{ saveName }}</h3>
  35. <div class="btn-box">
  36. <span class="checked-number" v-if="filtCardflag && filtTable.length > 0">已选{{ filtTable.length }}张</span>
  37. <!-- <el-button @click="changeRowLength">{{ showRoeText[showRowLength] }}</el-button> -->
  38. <el-button small @click="handleSureFilt" v-if="filtCardflag">类举</el-button>
  39. <el-button
  40. small
  41. @click="
  42. filtCardflag = true;
  43. showRowLength = newEditTable.length > 4 ? 6 : newEditTable.length;
  44. "
  45. v-else
  46. >筛选</el-button
  47. >
  48. <el-button small @click="editCardflag = true"><i class="el-icon-edit"></i>编辑</el-button>
  49. <el-button small @click="download2"
  50. ><img src="../../assets/teacherdev/word-eyes.png" alt="" />打印</el-button
  51. >
  52. </div>
  53. </template>
  54. </div>
  55. <div
  56. class="content"
  57. :class="[editCardflag ? '' : 'content-flex content-flex-' + showRowLength]"
  58. :style="{ minHeight: innerHeight - 220 + 'px' }"
  59. >
  60. <div
  61. v-for="(item, index) in filtCardflag ? newEditTable : filtTableShow"
  62. :key="index"
  63. :class="[editCardflag ? '' : 'item-flex']"
  64. >
  65. <writeTable
  66. :editCardflag="editCardflag"
  67. :dataConfig="writeTableData"
  68. :data="item"
  69. :pageNumber="index + 1"
  70. :totalNumber="showRowLength"
  71. :isPreview="true"
  72. @handleDelItem="handleDelItem"
  73. :filtCardflag="filtCardflag"
  74. :filtId="filtId"
  75. :filtTable="filtTable"
  76. @zoomInCard="zoomInCard"
  77. />
  78. </div>
  79. </div>
  80. <el-pagination
  81. background
  82. :current-page="currentPage"
  83. :page-size="showRowLength"
  84. :page-sizes="[1, 2, 3, 4, 6]"
  85. :total="filtTable.length"
  86. layout="total, prev, pager, next, sizes, jumper"
  87. @size-change="(val) => handleSizeChange(val, 'showRowLength', 'currentPage')"
  88. @current-change="(val) => handleCurrentChange(val, 'currentPage')"
  89. v-if="!filtCardflag"
  90. />
  91. </template>
  92. <el-dialog title="" :visible.sync="showCard" width="100%" class="wordCard-dialog" top="0">
  93. <i class="el-icon-arrow-left" :class="[showIndex === 0 ? 'disabled' : '']" @click="changeShowIndex('-')"></i>
  94. <writeTableZoom
  95. :editCardflag="false"
  96. :dataConfig="writeTableData"
  97. :data="filtTable[showIndex]"
  98. :pageNumber="showIndex"
  99. :totalNumber="0"
  100. :isPreview="true"
  101. :filtCardflag="false"
  102. ref="writeTableZoom"
  103. />
  104. <p style="width: 100%; text-align: center; font-size: 20px; color: #fff">
  105. {{ showIndex + 1 }} / {{ filtTable.length }}
  106. </p>
  107. <i
  108. class="el-icon-arrow-right"
  109. :class="[showIndex === filtTable.length - 1 ? 'disabled' : '']"
  110. @click="changeShowIndex('+')"
  111. ></i>
  112. </el-dialog>
  113. <!-- <div class="preview_dv" v-if="isPreview" :style="{ top: userID ? '0' : '' }">
  114. <img class="close" src="../../assets/teacherdev/creadCad-close.png" alt="" @click="closepreviewEvent" />
  115. <el-button type="primary" class="print-btn" small @click="download2">打印</el-button>
  116. <div class="preview_main">
  117. <img
  118. class="left"
  119. src="../../assets/teacherdev/creadCad-left.png"
  120. alt=""
  121. @click="changepreviewIndex('remove')"
  122. />
  123. <div class="word_main">
  124. <div class="word_main_table">
  125. <writeTable
  126. :type="typeIndex"
  127. :dataConfig="newEditTable"
  128. :data="newEditTable[previewIndex]"
  129. :pageNumber="previewIndex + 1"
  130. :totalNumber="newEditTable.length"
  131. :isPreview="true"
  132. :showLeft="showLeft"
  133. @changeShowLeft="changeShowLeft"
  134. ref="writeTable"
  135. />
  136. </div>
  137. </div>
  138. <img class="right" src="../../assets/teacherdev/creadCad-right.png" alt="" @click="changepreviewIndex('add')" />
  139. </div>
  140. </div> -->
  141. </div>
  142. </template>
  143. <script>
  144. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  145. //例如:import 《组件名称》from ‘《组件路径》';
  146. import Header from '@/components/Header';
  147. import { getLogin, LearnWebSI, getHZChineseInfo, getContentFile } from '@/api/api';
  148. import writeTable from './writeTableNew.vue';
  149. import writeTableZoom from './writeTableZoom.vue';
  150. import { getToken } from '@/utils/auth';
  151. import html2canvas from 'html2canvas';
  152. import { jsPDF } from 'jspdf';
  153. import canvg from 'canvg';
  154. import cnchar from 'cnchar';
  155. import 'cnchar-radical';
  156. import FileSaver from 'file-saver';
  157. import htmlDocx from 'html-docx-js/dist/html-docx';
  158. export default {
  159. //import引入的组件需要注入到对象中才能使用
  160. components: {
  161. Header,
  162. writeTable,
  163. writeTableZoom,
  164. },
  165. props: {},
  166. data() {
  167. //这里存放数据
  168. return {
  169. saveName: '',
  170. typeIndex: 0,
  171. loading: false,
  172. writeTableData: null,
  173. isPreview: false,
  174. previewIndex: 0,
  175. saveShow: false,
  176. hzDetailList: null,
  177. userID: this.$route.query.userID ? this.$route.query.userID : '',
  178. editCardflag: this.$route.query.id ? false : true, // 是否编辑卡片
  179. newEditTable: [
  180. // {
  181. // borderColor: '#243C97',
  182. // fontColor: '#243C97',
  183. // fontAlign: 'left',
  184. // label: '',
  185. // headerCon: '',
  186. // left: {
  187. // fileList: [],
  188. // con: '',
  189. // },
  190. // right: {
  191. // definition: '',
  192. // collocation: '',
  193. // exampleSent: '',
  194. // hz_info: [],
  195. // pinyin: '',
  196. // audio_file: '',
  197. // cixing: '',
  198. // },
  199. // },
  200. ],
  201. showLeft: true,
  202. showRowLength: 1, // 一页展示几个,有一行一列,一行两列,一行三列和两行两列
  203. showRoeText: {
  204. 1: '一行一列',
  205. 2: '一行两列',
  206. 3: '一行三列',
  207. 4: '两行两列',
  208. 5: '两行三列',
  209. },
  210. innerHeight: window.innerHeight,
  211. filtCardflag: true, // 筛选状态
  212. filtTable: [], // 筛选卡片
  213. filtTableShow: [], //分页后的筛选卡片
  214. filtId: [], // 筛选卡片id数组
  215. currentPage: 1,
  216. showCard: false, //卡片放大
  217. showIndex: null, // 卡片放大索引
  218. };
  219. },
  220. //计算属性 类似于data概念
  221. computed: {
  222. url() {
  223. let userInfo = getToken()
  224. ? JSON.parse(getToken())
  225. : sessionStorage.getItem('GCLS_Token_Tc')
  226. ? JSON.parse(sessionStorage.getItem('GCLS_Token_Tc'))
  227. : null;
  228. if (!userInfo) return `${process.env.VUE_APP_BASE_API}/GCLSFileServer/WebFileUpload`;
  229. return `${process.env.VUE_APP_BASE_API}/GCLSFileServer/WebFileUpload?AccessToken=${userInfo.access_token}&SecurityLevel=Mid"`;
  230. },
  231. },
  232. //监控data中数据变化
  233. watch: {},
  234. //方法集合
  235. methods: {
  236. addCard() {
  237. this.newEditTable.push({
  238. borderColor: '#243C97',
  239. fontColor: '#243C97',
  240. fontAlign: 'left',
  241. label: '',
  242. headerCon: '',
  243. left: {
  244. fileList: [],
  245. con: '',
  246. },
  247. right: {
  248. definition: '',
  249. collocation: '',
  250. exampleSent: '',
  251. hz_info: [],
  252. pinyin: '',
  253. audio_file: '',
  254. cixing: '',
  255. hideHanzi: false,
  256. },
  257. id: Math.random().toString(36).substring(2, 10),
  258. });
  259. },
  260. // 删除一条卡片
  261. handleDelItem(index) {
  262. this.newEditTable.splice(index, 1);
  263. },
  264. // 返回上一页
  265. goBack() {
  266. this.$router.push({
  267. path: '/wordcard/table',
  268. });
  269. },
  270. // 保存
  271. save() {
  272. if (!this.saveName || !this.saveName.trim()) {
  273. this.$message.warning('请填写卡片名称');
  274. return;
  275. }
  276. this.loading = this.$loading({
  277. lock: true,
  278. text: 'Loading',
  279. spinner: 'el-icon-loading',
  280. background: 'rgba(0, 0, 0, 0.7)',
  281. });
  282. let text = '';
  283. this.newEditTable.forEach((items) => {
  284. text += items.left.con.trim() + '\n';
  285. });
  286. if (this.$route.query.id) {
  287. // 编辑
  288. let Mname = 'tr_tool-wsc_manager-UpdateMyWordSentenceCard';
  289. LearnWebSI(Mname, {
  290. id: this.$route.query.id,
  291. name: this.saveName,
  292. type: this.typeIndex == 0 ? 'WORD' : 'SENTENCE',
  293. text: text,
  294. content: JSON.stringify(this.newEditTable),
  295. update_scope: 0,
  296. })
  297. .then((res) => {
  298. this.loading.close();
  299. this.loading = false;
  300. this.editCardflag = false;
  301. this.$message.success('保存成功');
  302. this.showRowLength = this.newEditTable.length > 4 ? 6 : this.newEditTable.length;
  303. })
  304. .catch((res) => {
  305. this.loading.close();
  306. this.loading = false;
  307. });
  308. } else {
  309. // 新建
  310. let Mname = 'tr_tool-wsc_manager-CreateMyWordSentenceCard';
  311. LearnWebSI(Mname, {
  312. name: this.saveName,
  313. type: this.typeIndex == 0 ? 'WORD' : 'SENTENCE',
  314. text: text,
  315. content: JSON.stringify(this.newEditTable),
  316. app_user_id: this.userID,
  317. })
  318. .then((res) => {
  319. this.$router.replace({
  320. path: '/wordcard/cread',
  321. query: {
  322. id: res.id,
  323. userID: this.userID,
  324. },
  325. });
  326. this.loading.close();
  327. this.loading = false;
  328. this.editCardflag = false;
  329. this.$message.success('保存成功');
  330. this.showRowLength = this.newEditTable.length > 4 ? 6 : this.newEditTable.length;
  331. })
  332. .catch((res) => {
  333. this.loading.close();
  334. this.loading = false;
  335. });
  336. }
  337. this.filtCardflag = true;
  338. },
  339. // 字句详情
  340. getdetai() {
  341. this.loading = true;
  342. let Mname = 'tr_tool-wsc_manager-GetWordSentenceCard';
  343. LearnWebSI(Mname, {
  344. id: this.$route.query.id,
  345. })
  346. .then((res) => {
  347. this.saveName = res.name;
  348. this.newEditTable = JSON.parse(res.content);
  349. this.newEditTable.forEach((item) => {
  350. if (!item.hasOwnProperty('id')) {
  351. this.$set(item, 'id', Math.random().toString(36).substring(2, 10));
  352. }
  353. });
  354. this.loading = false;
  355. this.showRowLength = this.newEditTable.length > 4 ? 6 : this.newEditTable.length;
  356. })
  357. .catch((res) => {
  358. this.loading = false;
  359. });
  360. },
  361. // 预览
  362. previewEvent() {
  363. this.previewIndex = 0;
  364. this.showLeft = true;
  365. this.isPreview = true;
  366. },
  367. // 关闭预览
  368. closepreviewEvent() {
  369. this.isPreview = false;
  370. },
  371. changepreviewIndex(type) {
  372. if (type == 'add') {
  373. if (this.previewIndex == this.newEditTable.length - 1) {
  374. this.$message.warning('当前已经是最后一页');
  375. return;
  376. }
  377. this.previewIndex++;
  378. } else {
  379. if (this.previewIndex == 0) {
  380. this.$message.warning('当前已经是第一页');
  381. return;
  382. }
  383. this.previewIndex--;
  384. }
  385. this.$refs.writeTable.changeRota();
  386. this.showLeft = true;
  387. this.$forceUpdate();
  388. },
  389. changeShowLeft() {
  390. this.showLeft = !this.showLeft;
  391. },
  392. download2() {
  393. if (this.filtTable.length === 0) {
  394. this.$message.warning('未选中卡片');
  395. return;
  396. }
  397. this.$nextTick(() => {
  398. if (this.filtTable) {
  399. let str = JSON.stringify(this.filtTable);
  400. localStorage.setItem('newEditTable', str);
  401. this.$router.replace({
  402. path: '/wordcard/printNew',
  403. query: {
  404. userID: this.userID,
  405. id: this.$route.query.id,
  406. },
  407. });
  408. }
  409. });
  410. },
  411. async handleSuccess(res, file, fileList) {
  412. if (res.status !== 1) {
  413. this.$message.error(res.message);
  414. return;
  415. }
  416. let file_id = file.response.file_info_list[0].file_id;
  417. this.loading = true;
  418. // 通过 fileList 的 response 判断是否已全部完成上传
  419. this.loading = true;
  420. this.$refs.upload.clearFiles();
  421. await LearnWebSI('tr_tool-wsc_manager-ParseWordSentenceCardImportFile', {
  422. file_id: file_id,
  423. })
  424. .then((res) => {
  425. this.loading = false;
  426. this.$message.success('导入成功');
  427. res.content_json_text.forEach((items) => {
  428. if (
  429. items.headerCon ||
  430. items.label ||
  431. items.left.con ||
  432. items.right.cixing ||
  433. items.right.collocation ||
  434. items.right.definition ||
  435. items.right.exampleSent ||
  436. items.right.pinyin
  437. ) {
  438. items.borderColor = '#243C97';
  439. items.fontAlign = 'left';
  440. items.fontColor = '#243C97';
  441. let con = items.left.con.trim();
  442. if (con) {
  443. let MethodName = 'hz_resource_manager-GetMultHZStrokesContent';
  444. let data = {
  445. hz_str: con,
  446. };
  447. getLogin(MethodName, data)
  448. .then((res) => {
  449. this.loading = false;
  450. for (let key in res) {
  451. if (key != 'status' && key != ',' && res[key]) {
  452. res[key] = JSON.parse(res[key]);
  453. }
  454. }
  455. let hzDetailList = res;
  456. let hz_list = [];
  457. con.split('').forEach((items) => {
  458. let res = JSON.parse(JSON.stringify(hzDetailList[items]));
  459. let obj = {
  460. con: items,
  461. hzDetail: {
  462. hz_json: res,
  463. },
  464. };
  465. hz_list.push(obj);
  466. });
  467. items.right.hz_info = hz_list;
  468. let MethodName = 'tool-TextToVoiceFile';
  469. if (con) {
  470. let datas = {
  471. text: con,
  472. };
  473. getLogin(MethodName, datas).then((res) => {
  474. if (res.status === 1) {
  475. items.right.audio_file = res.file_id;
  476. }
  477. });
  478. }
  479. })
  480. .catch(() => {
  481. this.loading = false;
  482. });
  483. }
  484. this.newEditTable.push(items);
  485. }
  486. });
  487. })
  488. .catch((res) => {
  489. this.loading = false;
  490. });
  491. },
  492. handleExceed(files) {
  493. this.$message.warning(`当前限制选择 9999 个文件,本次选择了 ${files.length} 个文件`);
  494. },
  495. changeRowLength() {
  496. if (this.showRowLength === 4) {
  497. this.showRowLength = 6;
  498. } else if (this.showRowLength === 6) {
  499. this.showRowLength = 1;
  500. } else {
  501. this.showRowLength++;
  502. }
  503. },
  504. handleSureFilt() {
  505. if (this.filtTable.length === 0) {
  506. this.$message.warning('请勾选要类举的卡片');
  507. return;
  508. }
  509. this.filtTable.slice().reverse();
  510. this.filtCardflag = false;
  511. this.showRowLength = this.filtTable.length > 4 ? 6 : this.filtTable.length;
  512. this.getList();
  513. },
  514. handleSizeChange(val, type, page) {
  515. this[type] = val;
  516. this[page] = 1;
  517. this.getList();
  518. },
  519. handleCurrentChange(val, type) {
  520. this[type] = val;
  521. this.getList();
  522. },
  523. getList() {
  524. this.filtTableShow = JSON.parse(JSON.stringify(this.filtTable)).splice(
  525. (this.currentPage - 1) * this.showRowLength,
  526. this.showRowLength,
  527. );
  528. },
  529. zoomInCard(index) {
  530. this.showIndex = index;
  531. this.showCard = true;
  532. },
  533. changeShowIndex(type) {
  534. if (type === '+') {
  535. if (this.showIndex !== this.filtTable.length - 1) {
  536. this.showIndex++;
  537. }
  538. } else {
  539. if (this.showIndex !== 0) {
  540. this.showIndex--;
  541. }
  542. }
  543. this.$refs.writeTableZoom.changeRota();
  544. },
  545. },
  546. //生命周期 - 创建完成(可以访问当前this实例)
  547. created() {},
  548. //生命周期 - 挂载完成(可以访问DOM元素)
  549. mounted() {},
  550. //生命周期-创建之前
  551. beforeCreated() {},
  552. //生命周期-挂载之前
  553. beforeMount() {},
  554. //生命周期-更新之前
  555. beforUpdate() {},
  556. //生命周期-更新之后
  557. updated() {},
  558. //生命周期-销毁之前
  559. beforeDestory() {},
  560. //生命周期-销毁完成
  561. destoryed() {},
  562. //如果页面有keep-alive缓存功能,这个函数会触发
  563. activated() {
  564. if (this.$route.query.cachesType == 'pop') {
  565. this.saveName = '';
  566. this.typeIndex = 0;
  567. this.loading = false;
  568. this.newEditTable = [
  569. // {
  570. // borderColor: '#243C97', // 卡片边框颜色
  571. // fontColor: '#243C97', // 字体颜色
  572. // fontAlign: 'left', // 页眉对齐方式
  573. // label: '', // 标签内容
  574. // headerCon: '', // 页眉内容
  575. // left: {
  576. // fileList: [], // 上传文件
  577. // con: '', // 字词卡片内容(即卡片显示的字词)
  578. // },
  579. // right: {
  580. // definition: '', // 释义
  581. // collocation: '', // 搭配
  582. // exampleSent: '', // 例句
  583. // hz_info: [], // 汉字笔顺等内容
  584. // pinyin: '', // 拼音
  585. // audio_file: '', // 字词生成的音频
  586. // cixing: '', // 词性
  587. // },
  588. // },
  589. ];
  590. this.previewIndex = 0;
  591. this.saveShow = false;
  592. this.showLeft = true;
  593. this.editCardflag = this.$route.query.id ? false : true;
  594. this.isPreview = false;
  595. if (this.$route.query.id) {
  596. // 需要请求详情接口
  597. this.getdetai();
  598. }
  599. }
  600. },
  601. };
  602. </script>
  603. <style lang="scss" scoped>
  604. /* @import url(); 引入css类 */
  605. .cread {
  606. min-height: 100%;
  607. position: relative;
  608. background: #f2f2f2;
  609. .go-back-box {
  610. width: 1200px;
  611. display: flex;
  612. border-radius: 8px;
  613. background: #fff;
  614. padding: 8px;
  615. margin: 20px auto;
  616. // position: fixed;
  617. // top: 83px;
  618. // left: 50%;
  619. // margin-left: -610px;
  620. // z-index: 1000;
  621. border: 1px solid rgba(0, 0, 0, 0.15);
  622. &-user {
  623. top: 19px;
  624. }
  625. h3 {
  626. font-size: 24px;
  627. font-weight: 500;
  628. line-height: 150%;
  629. flex: 1;
  630. text-align: center;
  631. }
  632. img {
  633. width: 20px;
  634. margin-right: 6px;
  635. }
  636. .el-button {
  637. padding: 8px 16px;
  638. height: 40px;
  639. line-height: 24px;
  640. }
  641. }
  642. .go-back {
  643. display: flex;
  644. color: #333;
  645. font-size: 24px;
  646. font-weight: 500;
  647. line-height: 36px;
  648. padding: 0 16px 0 0;
  649. align-items: center;
  650. cursor: pointer;
  651. &-preview {
  652. width: 300px;
  653. }
  654. .el-icon-arrow-left {
  655. font-size: 16px;
  656. margin-right: 8px;
  657. }
  658. }
  659. .name-box {
  660. flex: 1;
  661. display: flex;
  662. align-items: center;
  663. label {
  664. color: #4e5969;
  665. font-size: 14px;
  666. font-weight: 400;
  667. line-height: 22px;
  668. margin-right: 16px;
  669. }
  670. .el-input {
  671. width: 227px;
  672. border-radius: 2px;
  673. background: #f2f3f5;
  674. }
  675. }
  676. .btn-box {
  677. display: flex;
  678. i {
  679. margin-right: 8px;
  680. font-size: 16px;
  681. }
  682. .checked-number {
  683. margin-right: 8px;
  684. font-size: 14px;
  685. color: red;
  686. line-height: 40px;
  687. }
  688. }
  689. .content {
  690. // padding-top: 88px;
  691. &-flex {
  692. display: flex;
  693. width: 1470px;
  694. margin: 0 auto;
  695. flex-flow: wrap;
  696. gap: 50px 120px;
  697. justify-content: center;
  698. align-content: center;
  699. padding: 10px 0;
  700. &-3,
  701. &-4 {
  702. gap: 50px 80px;
  703. .item-flex {
  704. width: 350px !important;
  705. }
  706. }
  707. &-2,
  708. &-4,
  709. &-6 {
  710. justify-content: start;
  711. }
  712. &-1 {
  713. width: 500px;
  714. }
  715. &-2 {
  716. width: 920px;
  717. }
  718. &-4 {
  719. width: 780px;
  720. }
  721. &-6 {
  722. width: 1120px;
  723. gap: 50px 80px;
  724. .item-flex {
  725. width: 320px !important;
  726. }
  727. }
  728. }
  729. .item-flex {
  730. width: 400px;
  731. flex-shrink: 0;
  732. }
  733. }
  734. }
  735. .preview_dv {
  736. position: absolute;
  737. left: 0;
  738. top: 64px;
  739. width: 100%;
  740. min-height: calc(100% - 64px);
  741. background: #f2f2f2;
  742. > img {
  743. width: 40px;
  744. height: 40px;
  745. cursor: pointer;
  746. position: absolute;
  747. top: 24px;
  748. right: 31px;
  749. }
  750. .print-btn {
  751. cursor: pointer;
  752. position: absolute;
  753. top: 24px;
  754. left: 31px;
  755. }
  756. .preview_main {
  757. padding: 24px 0;
  758. width: 740px;
  759. display: flex;
  760. align-items: center;
  761. height: 450px;
  762. position: absolute;
  763. top: 50%;
  764. margin-top: -225px;
  765. left: 50%;
  766. margin-left: -370px;
  767. > div {
  768. margin: 0 24px;
  769. }
  770. img {
  771. width: 48px;
  772. height: 48px;
  773. cursor: pointer;
  774. }
  775. }
  776. }
  777. :deep .el-pagination {
  778. text-align: right;
  779. width: 1200px;
  780. margin: 0 auto;
  781. }
  782. :deep .el-dialog {
  783. background: transparent;
  784. }
  785. :deep .el-dialog__headerbtn {
  786. right: 200px;
  787. top: 0;
  788. }
  789. :deep .el-dialog__headerbtn .el-dialog__close {
  790. color: #f2f3f5;
  791. font-size: 30px;
  792. }
  793. .wordCard-dialog {
  794. display: flex;
  795. align-items: center;
  796. :deep .el-dialog {
  797. box-shadow: none;
  798. }
  799. .el-icon-arrow-left,
  800. .el-icon-arrow-right {
  801. color: #f2f2f2;
  802. font-size: 40px;
  803. position: fixed;
  804. top: 50%;
  805. margin-top: -20px;
  806. left: 200px;
  807. cursor: pointer;
  808. &.disabled {
  809. color: darkgrey;
  810. cursor: not-allowed;
  811. }
  812. }
  813. .el-icon-arrow-right {
  814. left: auto;
  815. right: 200px;
  816. }
  817. }
  818. </style>
  819. <style lang="scss">
  820. .cread {
  821. .name-box {
  822. .el-input__inner {
  823. border-radius: 2px;
  824. background: #f2f3f5;
  825. border: none;
  826. }
  827. }
  828. .btn-box {
  829. .el-button {
  830. span {
  831. display: flex;
  832. align-items: center;
  833. }
  834. }
  835. }
  836. }
  837. </style>