PinyinBasePreview.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <!-- eslint-disable vue/no-v-html -->
  2. <template>
  3. <div class="pinyin-preview" :style="getAreaStyle()">
  4. <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
  5. <div class="main">
  6. <div
  7. class="content-box"
  8. :class="[data.property.arrange_type === 'horizontal' ? 'content-box-flex' : 'content-box-vertical']"
  9. >
  10. <div class="first-con">
  11. <AudioPlay
  12. v-if="data.audio_file_id && data.property.audio_position === 'front'"
  13. :file-id="data.audio_file_id"
  14. />
  15. <div
  16. class="option-content"
  17. :class="[isJudgingRightWrong ? (con_preview[0].all_right ? 'all-right' : 'has-error') : '']"
  18. >
  19. <span v-if="data.content_hz" class="items-hz">{{ data.content_hz }}</span>
  20. <!-- 拼音输入 -->
  21. <template v-if="data.property.fun_type === 'input'">
  22. <span
  23. v-for="(itemc, indexc) in con_preview"
  24. :key="indexc"
  25. :class="[
  26. 'item-con',
  27. isJudgingRightWrong && itemc.type === 'input' && item.answer && item.con !== item.answer
  28. ? 'error'
  29. : '',
  30. ]"
  31. >
  32. <el-input
  33. v-if="itemc.type === 'input'"
  34. v-model="itemc.con"
  35. :disabled="disabled"
  36. :style="[{ width: Math.max(20, itemc.con.length * 10) + 'px' }]"
  37. class="item-input"
  38. @blur="onInputChange(itemc)"
  39. />
  40. <span v-else>{{ itemc.con }}</span>
  41. </span>
  42. </template>
  43. <template v-else-if="data.property.answer_mode === 'select'">
  44. <template v-if="data.property.fun_type === 'show'">
  45. <span v-for="(itemc, indexc) in data.matically_pinyin_str[data.mark]" :key="indexc" class="items-box">
  46. <span v-for="(itemi, indexi) in itemc" :key="indexi" :class="['items-con']">{{ itemi }}</span>
  47. </span>
  48. </template>
  49. <template v-else>
  50. <span
  51. v-for="(itemc, indexc) in con_preview[0].item_con"
  52. :key="indexc"
  53. :class="[
  54. 'item-con',
  55. active_index_str === 0 + '-' + indexc ? 'active' : '',
  56. isJudgingRightWrong && !con_preview[0].user_answer[indexc].is_right ? 'error' : '',
  57. data.property.fun_type === 'show' ? 'item-con-in' : '',
  58. ]"
  59. @click="
  60. if (data.property.fun_type === 'show') return;
  61. con_preview[0].item_active_index = indexc;
  62. active_index_str = 0 + '-' + indexc;
  63. "
  64. >
  65. {{ itemc }}
  66. </span>
  67. </template>
  68. </template>
  69. <template v-else>
  70. <span v-for="(itemc, indexc) in con_preview[0].item_con" :key="indexc" class="items-box">
  71. <span
  72. v-for="(itemi, indexi) in itemc"
  73. :key="indexi"
  74. :class="[
  75. 'items-con',
  76. active_index_str === 0 + '-' + indexc + '-' + indexi ? 'active' : '',
  77. isJudgingRightWrong &&
  78. !con_preview[0].user_answer[indexc].is_right &&
  79. con_preview[0].user_answer[indexc].select_index_submit === indexi
  80. ? 'error'
  81. : '',
  82. isJudgingRightWrong &&
  83. !con_preview[0].user_answer[indexc].is_right &&
  84. con_preview[0].user_answer[indexc].right_index === indexi
  85. ? 'right'
  86. : '',
  87. ]"
  88. @click="handleSelectItemTone(0, indexc, indexi, con_preview[0].item_con_yuan[indexc][indexi])"
  89. >{{ itemi }}</span
  90. >
  91. </span>
  92. </template>
  93. </div>
  94. <AudioPlay
  95. v-if="data.audio_file_id && data.property.audio_position === 'back'"
  96. :file-id="data.audio_file_id"
  97. />
  98. </div>
  99. <div v-if="data.property.fun_type === 'mark'" class="tone-box">
  100. <span
  101. v-for="({ img, value }, j) in toneList"
  102. :key="j"
  103. :class="[
  104. 'tone',
  105. data.property.answer_mode === 'select' &&
  106. con_preview[0].user_answer[con_preview[0].item_active_index] &&
  107. con_preview[0].user_answer[con_preview[0].item_active_index].select_tone === value
  108. ? 'active'
  109. : data.property.answer_mode === 'label' &&
  110. con_preview[0].user_answer[con_preview[0].item_active_index] &&
  111. con_preview[0].user_answer[con_preview[0].item_active_index].select_tone === value &&
  112. con_preview[0].user_answer[con_preview[0].item_active_index].select_letter === active_letter &&
  113. select_item_index === 0
  114. ? 'active'
  115. : '',
  116. (isJudgingRightWrong &&
  117. con_preview[0].user_answer[con_preview[0].item_active_index].right_answer === value &&
  118. con_preview[0].user_answer[con_preview[0].item_active_index].select_index_submit !==
  119. con_preview[0].user_answer[con_preview[0].item_active_index].right_answer &&
  120. data.property.answer_mode === 'select') ||
  121. (isJudgingRightWrong &&
  122. data.property.answer_mode === 'label' &&
  123. con_preview[0].user_answer[con_preview[0].item_active_index].right_answer === value &&
  124. con_preview[0].user_answer[con_preview[0].item_active_index].right_index ===
  125. con_preview[0].user_answer[con_preview[0].item_active_index].select_index &&
  126. select_item_index === 0)
  127. ? 'right'
  128. : '',
  129. ]"
  130. @click="chooseTone(con_preview[0], value)"
  131. >
  132. <SvgIcon :icon-class="img" />
  133. </span>
  134. </div>
  135. <template v-else-if="data.property.fun_type !== 'mark' && isEnable(data.property.is_enable_voice_answer)">
  136. <SoundRecord
  137. ref="record"
  138. type="normal"
  139. class="record-box"
  140. :answer-record-list="data.record_list"
  141. :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
  142. @handleWav="handleWav"
  143. />
  144. </template>
  145. </div>
  146. </div>
  147. </div>
  148. </template>
  149. <script>
  150. import { getPinyinBaseData, arrangeTypeList, audioPositionList } from '@/views/book/courseware/data/pinyinBase';
  151. import PreviewMixin from '../common/PreviewMixin';
  152. import AudioPlay from '../character_base/components/AudioPlay.vue';
  153. import SoundRecord from '../../common/SoundRecord.vue';
  154. import { addTone, handleToneValue } from '@/utils/common';
  155. export default {
  156. name: 'PinyinBasePreview',
  157. components: {
  158. AudioPlay,
  159. SoundRecord,
  160. },
  161. mixins: [PreviewMixin],
  162. data() {
  163. return {
  164. data: getPinyinBaseData(),
  165. arrangeTypeList,
  166. audioPositionList,
  167. toneList: [
  168. { value: '1', label: '一声', img: 'first-tone' },
  169. { value: '2', label: '二声', img: 'second-tone' },
  170. { value: '3', label: '三声', img: 'third-tone' },
  171. { value: '4', label: '四声', img: 'fourth-tone' },
  172. // { value: '0', label: '轻声', img: 'neutral-tone' },
  173. ],
  174. con_preview: [],
  175. tone_data: [
  176. ['ā', 'á', 'ǎ', 'à', 'a'],
  177. ['ō', 'ó', 'ǒ', 'ò', 'o'],
  178. ['ē', 'é', 'ě', 'è', 'e'],
  179. ['ī', 'í', 'ǐ', 'ì', 'i'],
  180. ['ū', 'ú', 'ǔ', 'ù', 'u'],
  181. ['ǖ', 'ǘ', 'ǚ', 'ǜ', 'ü'],
  182. ['ǖ', 'ǘ', 'ǚ', 'ǜ', 'ü'],
  183. ['Ā', 'Á', 'Â', 'À', 'A'],
  184. ['Ō', 'Ó', 'Ô', 'Ò', 'O'],
  185. ['Ē', 'É', 'Ê', 'È', 'E'],
  186. ['Ī', 'Í', 'Î', 'Ì', 'I'],
  187. ['Ū', 'Ú', 'Û', 'Ù', 'U'],
  188. ['n', 'ń', 'ň', 'ǹ', 'n'],
  189. ['m̄', 'ḿ', 'm', 'm̀', 'n'],
  190. ],
  191. final_con: '',
  192. active_index_str: '', // 高亮索引的字符串
  193. active_letter: '', // 选中字母的值
  194. active_letter_index: 0, // 选择字母索引
  195. select_item_index: 0, // 小题索引
  196. };
  197. },
  198. watch: {
  199. data: {
  200. handler(val) {
  201. // if (!val || this.data.type !== 'choose_tone') return;
  202. this.handleData();
  203. },
  204. deep: true,
  205. immediate: true,
  206. },
  207. isJudgingRightWrong: {
  208. handler(val) {
  209. if (!val) return;
  210. this.judgeRight();
  211. },
  212. immediate: true,
  213. },
  214. 'data.record_list'(val) {
  215. this.data.record_list = val;
  216. },
  217. },
  218. created() {
  219. // console.log(this.data);
  220. },
  221. methods: {
  222. chooseTone(item, value) {
  223. if (this.disabled) return;
  224. if (!this.active_letter && this.data.property.answer_mode === 'label') return;
  225. if (
  226. item.user_answer[item.item_active_index].select_tone &&
  227. item.user_answer[item.item_active_index].select_tone === value &&
  228. this.data.property.answer_mode === 'label' &&
  229. item.user_answer[item.item_active_index].select_letter === this.active_letter
  230. ) {
  231. item.user_answer[item.item_active_index].select_tone = '';
  232. this.handleReplaceTone(this.active_letter + 0);
  233. setTimeout(() => {
  234. let new_con = item.item_con_yuan[item.item_active_index].split(this.active_letter);
  235. item.item_con[item.item_active_index] = new_con[0] + this.final_con + new_con[1];
  236. this.$forceUpdate();
  237. this.answer.answer_list[0].value[item.item_active_index] = new_con[0] + this.active_letter + new_con[1];
  238. }, 100);
  239. } else if (
  240. item.user_answer[item.item_active_index].select_tone &&
  241. item.user_answer[item.item_active_index].select_tone === value &&
  242. this.data.property.answer_mode === 'select'
  243. ) {
  244. item.user_answer[item.item_active_index].select_tone = '';
  245. this.handleReplaceTone(item.item_con_yuan[item.item_active_index] + 0);
  246. setTimeout(() => {
  247. item.item_con[item.item_active_index] = this.final_con;
  248. this.$forceUpdate();
  249. }, 100);
  250. this.answer.answer_list[0].value[item.item_active_index] = '';
  251. } else {
  252. item.user_answer[item.item_active_index].select_tone = value;
  253. if (this.data.property.answer_mode === 'label') {
  254. item.user_answer[item.item_active_index].select_letter = this.active_letter;
  255. this.active_index_str = `${0}-${item.item_active_index}-${this.active_letter_index}`;
  256. this.handleReplaceTone(this.active_letter + value);
  257. setTimeout(() => {
  258. let new_con = item.item_con_yuan[item.item_active_index].split(this.active_letter);
  259. item.item_con[item.item_active_index] = new_con[0] + this.final_con + new_con[1];
  260. this.$forceUpdate();
  261. this.answer.answer_list[0].value[item.item_active_index] =
  262. new_con[0] + this.active_letter + value + new_con[1];
  263. }, 100);
  264. } else {
  265. this.active_index_str = `${0}-${item.item_active_index}`;
  266. this.handleReplaceTone(item.item_con_yuan[item.item_active_index] + value);
  267. setTimeout(() => {
  268. item.item_con[item.item_active_index] = this.final_con;
  269. this.$forceUpdate();
  270. }, 100);
  271. this.answer.answer_list[0].value[item.item_active_index] = value;
  272. }
  273. }
  274. },
  275. // 处理数据
  276. handleData() {
  277. this.con_preview = [];
  278. this.show_preview = false;
  279. if (!this.isJudgingRightWrong) {
  280. this.answer.answer_list = [];
  281. }
  282. if (this.data.property.fun_type === 'input') {
  283. let arr = this.data.content.split(/_{3,}/g);
  284. let inputIndex = 0;
  285. arr.forEach((item, index) => {
  286. let obj = {
  287. con: item,
  288. type: 'text',
  289. };
  290. this.con_preview.push(obj);
  291. if (index !== arr.length - 1) {
  292. let objs = {
  293. con: '',
  294. type: 'input',
  295. inputIndex,
  296. answer: this.data.answer.answer_list[inputIndex] ? this.data.answer.answer_list[inputIndex].con : '',
  297. };
  298. this.con_preview.push(JSON.parse(JSON.stringify(objs)));
  299. inputIndex++;
  300. }
  301. });
  302. } else {
  303. // this.data.option_list.forEach((item) => {
  304. let con_arr = JSON.parse(JSON.stringify(this.data.content_view));
  305. let user_answer = [];
  306. let user_submit = []; // 用户提交答案
  307. con_arr.forEach((items) => {
  308. user_answer.push({
  309. select_tone: null,
  310. select_letter: '',
  311. select_index: '',
  312. });
  313. user_submit.push(this.data.property.answer_mode === 'label' ? items : '');
  314. });
  315. let obj = {
  316. item_con: con_arr,
  317. item_con_yuan: JSON.parse(JSON.stringify(con_arr)),
  318. mark: this.data.mark,
  319. user_answer,
  320. item_active_index: 0,
  321. active_letter: '',
  322. };
  323. if (!this.isJudgingRightWrong) {
  324. let obj = {
  325. mark: this.data.mark,
  326. value: user_submit,
  327. };
  328. this.answer.answer_list.push(obj);
  329. }
  330. this.con_preview.push(obj);
  331. // });
  332. }
  333. this.show_preview = true;
  334. },
  335. handleReplaceTone(e, arr, index, resArr) {
  336. this.$nextTick(() => {
  337. let value = e;
  338. this.resArr = [];
  339. if (value) {
  340. let reg = /\s+/g;
  341. let valueArr = value.split(reg);
  342. valueArr.forEach((item) => {
  343. this.handleValue(item, resArr);
  344. });
  345. let str = '';
  346. setTimeout(() => {
  347. if (resArr) {
  348. resArr.forEach((item) => {
  349. str += ' ';
  350. item.forEach((sItem) => {
  351. if (sItem.number && sItem.con) {
  352. let number = Number(sItem.number);
  353. let con = sItem.con;
  354. let word = this.addTone(number, con);
  355. str += word;
  356. } else if (sItem.number) {
  357. str += sItem.number;
  358. } else if (sItem.con) {
  359. str += ` ${sItem.con} `;
  360. }
  361. });
  362. });
  363. if (this.data.property.answer_mode === 'label') {
  364. let number_index = e.search(/0|1|2|3|4/) + 1;
  365. arr[index] = str.trim() + (number_index === 0 ? '' : e.substring(number_index));
  366. } else {
  367. arr[index] = str.trim();
  368. }
  369. } else {
  370. this.resArr.forEach((item) => {
  371. str += ' ';
  372. item.forEach((sItem) => {
  373. if (sItem.number && sItem.con) {
  374. let number = Number(sItem.number);
  375. let con = sItem.con;
  376. let word = this.addTone(number, con);
  377. str += word;
  378. } else if (sItem.number) {
  379. str += sItem.number;
  380. } else if (sItem.con) {
  381. str += ` ${sItem.con} `;
  382. }
  383. });
  384. });
  385. this.final_con = str.trim();
  386. }
  387. }, 10);
  388. }
  389. });
  390. },
  391. handleValue(valItem, resArr) {
  392. let reg = /\d/;
  393. let reg2 = /[A-Za-zü]+\d/g;
  394. let numList = [];
  395. let valArr = valItem.split('');
  396. if (reg2.test(valItem)) {
  397. for (let i = 0; i < valArr.length; i++) {
  398. let item = valItem[i];
  399. if (reg.test(item)) {
  400. let numIndex = numList.length === 0 ? 0 : numList[numList.length - 1].index;
  401. let con = valItem.substring(numIndex, i);
  402. con = con.replace(/\d/g, '');
  403. let obj = {
  404. index: i,
  405. number: item,
  406. con,
  407. isTran: true,
  408. };
  409. numList.push(obj);
  410. }
  411. }
  412. } else {
  413. numList = [];
  414. }
  415. if (resArr) {
  416. if (numList.length === 0) {
  417. resArr.push([{ con: valItem }]);
  418. } else {
  419. resArr.push(numList);
  420. }
  421. } else if (numList.length === 0) {
  422. this.resArr.push([{ con: valItem }]);
  423. } else {
  424. this.resArr.push(numList);
  425. }
  426. },
  427. addTone(number, con) {
  428. let zmList = ['a', 'o', 'e', 'i', 'u', 'v', 'ü', 'A', 'O', 'E', 'I', 'U', 'n', 'm'];
  429. let cons = con;
  430. if (number) {
  431. for (let i = 0; i < zmList.length; i++) {
  432. let zm = zmList[i];
  433. if (con.indexOf(zm) > -1) {
  434. let zm2 = this.tone_data[i][number - 1];
  435. if (con.indexOf('iu') > -1) {
  436. zm2 = this.tone_data[4][number - 1];
  437. cons = con.replace('u', zm2);
  438. } else if (con.indexOf('ui') > -1) {
  439. zm2 = this.tone_data[3][number - 1];
  440. cons = con.replace('i', zm2);
  441. } else if (
  442. con.indexOf('yv') > -1 ||
  443. con.indexOf('jv') > -1 ||
  444. con.indexOf('qv') > -1 ||
  445. con.indexOf('xv') > -1
  446. ) {
  447. zm2 = this.tone_data[4][number - 1];
  448. cons = con.replace('v', zm2);
  449. } else {
  450. cons = con.replace(zm, zm2);
  451. }
  452. break;
  453. }
  454. }
  455. }
  456. return cons;
  457. },
  458. handleSelectItemTone(i, indexc, indexi, itemi) {
  459. if (this.data.property.fun_type === 'show') {
  460. return;
  461. }
  462. this.con_preview[0].item_active_index = indexc;
  463. this.con_preview[0].user_answer[indexc].select_index = indexi;
  464. this.active_index_str = `${i}-${indexc}-${indexi}`;
  465. this.active_letter = itemi;
  466. this.active_letter_index = indexi;
  467. this.select_item_index = i;
  468. },
  469. // 判断对错
  470. judgeRight() {
  471. this.con_preview = [];
  472. this.show_preview = false;
  473. // this.data.option_list.forEach((item, index) => {
  474. let con_arr = JSON.parse(JSON.stringify(this.data.content_view));
  475. let user_answer = [];
  476. let user_select = [];
  477. let user_res_arr = [];
  478. let answer_list_item = this.answer.answer_list.filter((items) => this.data.mark === items.mark);
  479. con_arr.forEach((items, indexs) => {
  480. user_answer.push({
  481. select_tone: answer_list_item[0].value[indexs],
  482. select_letter: '',
  483. select_index: '',
  484. is_right: answer_list_item[0].value[indexs] === this.data.answer.answer_list[0].value[indexs],
  485. right_answer: this.data.answer.answer_list[0].value[indexs],
  486. });
  487. user_res_arr.push([]);
  488. user_select.push('');
  489. if (this.data.property.answer_mode === 'label') {
  490. this.handleReplaceTone(answer_list_item[0].value[indexs], user_select, indexs, user_res_arr[indexs]);
  491. if (
  492. answer_list_item[0].value[indexs].match(/\d+/g) &&
  493. answer_list_item[0].value[indexs].match(/\d+/g).length > 0
  494. ) {
  495. user_answer[indexs].select_tone = answer_list_item[0].value[indexs].match(/\d+/g)[0];
  496. let letter_number = answer_list_item[0].value[indexs].match(/\d+/g)[0];
  497. let letter_index = answer_list_item[0].value[indexs].indexOf(letter_number) - 1;
  498. user_answer[indexs].select_letter = answer_list_item[0].value[indexs].substring(
  499. letter_index,
  500. letter_index + 1,
  501. );
  502. user_answer[indexs].select_index_submit = letter_index;
  503. } else {
  504. user_select[indexs] = items;
  505. }
  506. user_answer[indexs].right_answer = this.data.answer.answer_list[0].value[indexs].match(/0|1|2|3|4/)
  507. ? this.data.answer.answer_list[index].value[indexs].match(/0|1|2|3|4/)[0]
  508. : '';
  509. user_answer[indexs].right_index = this.data.answer.answer_list[0].value[indexs].search(/0|1|2|3|4/) - 1;
  510. } else {
  511. this.handleReplaceTone(items + answer_list_item[0].value[indexs], user_select, indexs, user_res_arr[indexs]);
  512. }
  513. });
  514. let obj = {
  515. item_con: user_select,
  516. item_con_yuan: JSON.parse(JSON.stringify(con_arr)),
  517. mark: this.data.mark,
  518. user_answer,
  519. item_active_index: 0,
  520. active_letter: '',
  521. user_res_arr,
  522. all_right: JSON.stringify(answer_list_item[0].value) === JSON.stringify(this.data.answer.answer_list[0].value),
  523. };
  524. this.con_preview.push(obj);
  525. // });
  526. setTimeout(() => {
  527. this.show_preview = true;
  528. }, 100);
  529. },
  530. handleWav(data) {
  531. this.data.record_list = data;
  532. },
  533. onInputChange(item) {
  534. let answer = item.con;
  535. answer = answer
  536. .trim()
  537. .split(/\s+/)
  538. .map((item) => {
  539. return handleToneValue(item);
  540. })
  541. .map((item) =>
  542. item.map(({ number, con }) => (number && con ? addTone(Number(number), con) : number || con || '')),
  543. )
  544. .filter((item) => item.length > 0)
  545. .join(' ');
  546. item.con = answer;
  547. },
  548. },
  549. };
  550. </script>
  551. <style lang="scss" scoped>
  552. @use '@/styles/mixin.scss' as *;
  553. .pinyin-preview {
  554. @include preview-base;
  555. .content-box {
  556. &-flex {
  557. display: flex;
  558. flex-wrap: wrap;
  559. column-gap: 8px;
  560. align-items: center;
  561. }
  562. &-vertical {
  563. .tone-box,
  564. .record-box {
  565. margin-top: 8px;
  566. }
  567. }
  568. }
  569. .first-con {
  570. display: flex;
  571. column-gap: 8px;
  572. align-items: center;
  573. }
  574. .option-content {
  575. padding: 10px 22px;
  576. color: #706f78;
  577. background-color: $content-color;
  578. border: 1px solid $content-color;
  579. border-radius: 40px;
  580. &.all-right {
  581. background-color: $right-bc-color;
  582. border-color: $right-bc-color;
  583. }
  584. &.has-error {
  585. border-color: $error-color;
  586. }
  587. }
  588. .items-hz {
  589. margin-right: 4px;
  590. font-size: 16px;
  591. font-weight: 500;
  592. line-height: 24px;
  593. color: #000;
  594. }
  595. .item-con,
  596. .items-con {
  597. font-family: 'League';
  598. font-weight: 500;
  599. color: #000;
  600. cursor: pointer;
  601. &.right {
  602. color: $right-color;
  603. }
  604. &.error {
  605. color: $error-color;
  606. }
  607. &.active {
  608. color: #2f6fec;
  609. }
  610. }
  611. .item-con-in {
  612. cursor: initial;
  613. }
  614. .tone-box {
  615. display: flex;
  616. column-gap: 8px;
  617. }
  618. .tone {
  619. width: 32px;
  620. height: 32px;
  621. padding: 8px;
  622. font-size: 0;
  623. color: #9f9f9f;
  624. text-align: center;
  625. cursor: pointer;
  626. &.right {
  627. color: $right-color;
  628. background-color: $right-bc-color;
  629. border-radius: 16px;
  630. }
  631. &.active {
  632. color: #2f6fec;
  633. background: #dfe9fd;
  634. border-radius: 16px;
  635. }
  636. }
  637. .record-box {
  638. padding: 7px 12px;
  639. background: #f2f3f5;
  640. border-radius: 2px;
  641. }
  642. .item-input {
  643. :deep .el-input__inner {
  644. padding: 0;
  645. font-family: 'League';
  646. font-size: 16px;
  647. color: #1d2129;
  648. text-align: center;
  649. background-color: transparent;
  650. border-width: 0;
  651. border-bottom: 1px solid #1d2129;
  652. border-radius: 0;
  653. }
  654. }
  655. }
  656. </style>