record.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  1. <template>
  2. <div class="record_box">
  3. <div class="ca-b-o-main2" style="height: 25px;">
  4. <div class="select_box" v-if="audioUrlArray.length">
  5. <span>音频:</span>
  6. <el-select v-model="audioUrl">
  7. <el-option v-for="(item, index) in audioUrlArray" :key="index" :label="'音频'+(index+1)" :value="item">
  8. <div class="selectBox">
  9. <span>{{ '音频'+(index+1) }}</span>
  10. <div class="controlsBox">
  11. <span class="delSelect" @click.stop="delAudio(index)"></span>
  12. </div>
  13. </div>
  14. </el-option>
  15. </el-select>
  16. </div>
  17. <div class="select_box">
  18. <span>语言:</span>
  19. <el-select v-model="languageRadio">
  20. <el-option v-for="item in languageList"
  21. :key="item.label"
  22. :label="item.lang"
  23. :value="item.label">
  24. </el-option>
  25. </el-select>
  26. </div>
  27. </div>
  28. <div class="ca-b-o-main">
  29. <div
  30. class="ca-b-o-m-tape"
  31. v-show="controlsStatus == 0"
  32. @click.stop="onClickStartRecord()"
  33. v-loading="uploadFileLoading"
  34. >
  35. <span class="el-icon-microphone"></span>
  36. <div class="ca-b-o-m-t-text">点击开始录音</div>
  37. </div>
  38. <div
  39. class="ca-b-o-m-tapeTwo"
  40. v-show="controlsStatus == 2"
  41. v-loading="uploadFileLoading"
  42. >
  43. <mini-audio
  44. v-if="audioUrl"
  45. :audio-source="audioUrl"
  46. class="audio_class"
  47. ></mini-audio>
  48. <div
  49. style="
  50. width: 32px;
  51. height: 32px;
  52. margin-left: 20px;
  53. cursor: pointer;
  54. background-color: #3681fc;
  55. border-radius: 50%;
  56. display: flex;
  57. justify-content: center;
  58. align-items: center;
  59. "
  60. @click="onClickStartRecord()"
  61. >
  62. <img
  63. style="width: 10px; height: 16px"
  64. src="../../../assets/icon/classroomObservation/mai1.svg"
  65. alt=""
  66. />
  67. </div>
  68. </div>
  69. <div
  70. class="ca-b-o-m-TapeArea"
  71. v-show="controlsStatus == 1"
  72. v-loading="uploadFileLoading"
  73. >
  74. <div class="ca-b-o-m-i-left">
  75. <img
  76. style="height: 120%"
  77. src="@/assets/icon/classroomObservation/isTape.svg"
  78. alt=""
  79. />
  80. <div>
  81. <div v-if="recordedForm.status == 1" style="color: #ee3e3e">
  82. 录音中...
  83. </div>
  84. <div v-if="recordedForm.status == 2" style="color: #6b798e">
  85. 已暂停...
  86. </div>
  87. <span>{{ recordedForm.time }}</span>
  88. </div>
  89. </div>
  90. <div
  91. style="width: 100px; display: flex; justify-content: space-between"
  92. >
  93. <div
  94. class="lyStart"
  95. @click="onClickPauseOrContinueRecord()"
  96. v-loading="recordedForm.loading"
  97. >
  98. <img
  99. style="width: 12px; height: 12px"
  100. src="@/assets/icon/classroomObservation/lyStart.svg"
  101. alt=""
  102. v-if="recordedForm.status == 1"
  103. />
  104. <img
  105. style="width: 12px; height: 12px"
  106. src="@/assets/icon/classroomObservation/start.png"
  107. alt=""
  108. v-if="recordedForm.status == 2"
  109. />
  110. </div>
  111. <div
  112. class="lyStart"
  113. @click="onClickFinishRecord()"
  114. v-loading="recordedForm.loading"
  115. >
  116. <img
  117. style="width: 12px; height: 12px"
  118. src="@/assets/icon/classroomObservation/lyStop.svg"
  119. alt=""
  120. />
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="text_box">
  126. <textarea
  127. :disabled="recordedForm.status == 1"
  128. ref="videoTextTextarea"
  129. rows="2"
  130. class="binfo_input binfo_textarea"
  131. style="height: 100%;"
  132. cols
  133. v-model="videoText"
  134. placeholder="等待录音中..."
  135. ></textarea>
  136. </div>
  137. <iframe
  138. allow="camera *; microphone *;display-capture;midi;encrypted-media;"
  139. src="https://cloud.cocorobo.hk/browser/public/index.html"
  140. ref="iiframe"
  141. v-show="false"
  142. ></iframe>
  143. </div>
  144. </template>
  145. <script>
  146. export default {
  147. props: {
  148. videoText2: {
  149. type: String
  150. },
  151. audioUrl2: {
  152. type: String
  153. }
  154. },
  155. data() {
  156. return {
  157. videoText: this.videoText2,
  158. recorderProvider: "microsoft", //shengyang
  159. uploadFileLoading: false,
  160. controlsStatus: 0, //0--点击开始录音 1--录音中 2--录音完毕预览 3--文字输��
  161. audioUrl: this.audioUrl2,
  162. audioUrlArray: [],
  163. languageRadio: 2, //设置选择语言
  164. // 设置list
  165. languageList: [
  166. { label: 2, lang: "普通话" },
  167. { label: 3, lang: "粤语" },
  168. { label: 13, lang: "英语" }
  169. ],
  170. recordedForm: {
  171. time: "00:00:00", //时间
  172. status: 0, //0--未录音 1--正在录音 2--暂停 3--录音结束
  173. timer: null,
  174. timeDuration: 0,
  175. audioBlob: [],
  176. startTime: 0,
  177. endTime: 0,
  178. textList: [],
  179. loading: false
  180. },
  181. progressData: {
  182. uploadLoading: false,
  183. value: 0
  184. }
  185. };
  186. },
  187. watch: {
  188. videoText(newValue) {
  189. this.$emit("update:videoText2", newValue);
  190. },
  191. // audioUrl(newValue) {
  192. // this.$emit("update:audioUrl2", newValue);
  193. // },
  194. audioUrlArray(newValue) {
  195. this.$emit("update:audioUrl2", newValue.join(','));
  196. },
  197. videoText2(newValue) {
  198. this.videoText = newValue;
  199. },
  200. audioUrl2(newVal){
  201. if(newVal){
  202. this.audioUrlArray = newVal.split(",")
  203. if(!this.audioUrl){
  204. this.audioUrl = newVal.split(",")[0]
  205. }
  206. this.controlsStatus = 2
  207. }
  208. }
  209. },
  210. mounted() {
  211. this.videoText = this.videoText2;
  212. },
  213. methods: {
  214. delAudio(index){
  215. this.$confirm("是否确定删掉此音频?", "提醒", {
  216. confirmButtonText: "确定",
  217. cancelButtonText: "取消",
  218. type: "warning"
  219. })
  220. .then(() => {
  221. if(this.audioUrl == this.audioUrlArray[index] && this.audioUrlArray.length > 1){
  222. this.audioUrlArray.splice(index, 1)
  223. this.audioUrl = this.audioUrlArray[0]
  224. }else {
  225. this.audioUrlArray.splice(index, 1)
  226. }
  227. if(!this.audioUrlArray.length){
  228. this.audioUrl = ''
  229. this.controlsStatus = 0
  230. }
  231. })
  232. .catch(e => {
  233. console.log(e);
  234. console.log("不顶替");
  235. });
  236. },
  237. updateRecordedTime({ duration }) {
  238. // 更新currentTime,将秒数转换为时分秒格式
  239. let hours = Math.floor(duration / 3600);
  240. let minutes = Math.floor((duration % 3600) / 60);
  241. let seconds = Math.floor(duration % 60);
  242. // this.recordedForm.time = `${hours.toString().padStart(2, "0")}:${minutes
  243. // .toString()
  244. // .padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
  245. return `${hours
  246. .toString()
  247. .padStart(2, "0")}:${minutes
  248. .toString()
  249. .padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
  250. },
  251. onClickStartRecord() {
  252. if (this.uploadFileLoading) return this.$message.info("请稍等...");
  253. // 开始录音
  254. if (this.audioUrl) {
  255. // this.$confirm("是否删掉此音频并开始录音?", "提醒", {
  256. // confirmButtonText: "确定",
  257. // cancelButtonText: "取消",
  258. // type: "warning"
  259. // })
  260. // .then(() => {
  261. this.recordedForm.status = 0;
  262. this.audioUrl = "";
  263. this.onClickStartRecord();
  264. // })
  265. // .catch(e => {
  266. // console.log(e);
  267. // console.log("不顶替");
  268. // });
  269. } else if (this.controlsStatus != 1 && this.recordedForm.status == 0) {
  270. this.controlsStatus = 1;
  271. this.recordedForm.status = 1;
  272. this.$message.success("已开始录音");
  273. this.recordedForm.timer = setInterval(() => {
  274. this.recordedForm.timeDuration += 1;
  275. this.recordedForm.time = this.updateRecordedTime({
  276. duration: this.recordedForm.timeDuration
  277. });
  278. // console.log(this.recordedForm);
  279. }, 1000);
  280. this.recordedForm.textList = [];
  281. this.recordedForm.timeDuration = 0;
  282. this.recordedForm.startTime = 1;
  283. this.recordedForm.endTime = 0;
  284. // this.onStartRecordWithMicrosoft();
  285. switch (this.recorderProvider) {
  286. case "microsoft":
  287. this.onStartRecordWithMicrosoft();
  288. break;
  289. case "shengyang":
  290. // this.onStartRecordWithShengyang();
  291. break;
  292. default:
  293. break;
  294. }
  295. } else if ([1, 2].includes(this.recordedForm.status)) {
  296. this.controlsStatus = 1;
  297. this.$message.info("还在录音中");
  298. }
  299. },
  300. // ============ start 微软录音转译
  301. onStartRecordWithMicrosoft() {
  302. let iiframe = this.$refs["iiframe"];
  303. iiframe.contentWindow.window.document.getElementById(
  304. "languageOptions"
  305. ).selectedIndex = this.languageRadio;
  306. iiframe.contentWindow.testdoContinuousPronunciationAssessment();
  307. // 录音开始
  308. let flag = true;
  309. iiframe.contentWindow.onRecognizing = (e, recognitionEventArgs) => {
  310. var result = recognitionEventArgs.result;
  311. // let e = {
  312. // privText:"测试测试"
  313. // }
  314. this.recordedForm.endTime = this.recordedForm.timeDuration;
  315. if (flag) {
  316. this.controlsStatus = 1;
  317. flag = false;
  318. this.uploadFileLoading = false;
  319. }
  320. // let privText = e.privText;
  321. let privText = result.text;
  322. if (privText == undefined || privText == "undefined") return;
  323. console.log("👇转译对象👇");
  324. console.log(e);
  325. console.log("👇转译结果👇");
  326. console.log(privText);
  327. this.recordedForm.startTime = this.recordedForm.timeDuration + 1;
  328. // this.videoText += privText;
  329. this.videoText = this.videoText.replace(/(^|[\r\n]+).*?\[\.\.\.\][\r\n]+/, '$1') + `${result.text} [...]\r\n`;
  330. // 将textarea滚动到最底部
  331. this.$nextTick(() => {
  332. this.$refs.videoTextTextarea.scrollTop = this.$refs.videoTextTextarea.scrollHeight;
  333. });
  334. };
  335. iiframe.contentWindow.onRecognizedResult = result =>{
  336. this.$refs.videoTextTextarea.scrollTop = this.$refs.videoTextTextarea.scrollHeight;
  337. this.videoText = this.videoText.replace(/(^|[\r\n]+).*?\[\.\.\.\][\r\n]+$/, '$1');
  338. if (result.text) {
  339. this.videoText += `${result.text}\r\n`;
  340. }
  341. }
  342. },
  343. async onPauseRecordWithMicrosoft() {
  344. let _resolve;
  345. const p = new Promise(resolve => (_resolve = resolve));
  346. let iiframe = this.$refs["iiframe"];
  347. iiframe.contentWindow.window.document
  348. .getElementById("scenarioStopButton")
  349. .click();
  350. // 录音借宿
  351. iiframe.contentWindow.onSessionStopped = (s, e) => {
  352. this.recordedForm.status = 2;
  353. this.$message.success("已停止录音");
  354. console.log("停止录音👇");
  355. console.log("停止录音", e);
  356. this.recordedForm.audioBlob.push(e.preaudio);
  357. iiframe.contentWindow.onSessionStopped = null;
  358. iiframe.contentWindow.onRecognizing = null;
  359. iiframe.contentWindow.onRecognizedResult = null;
  360. _resolve();
  361. };
  362. return p;
  363. },
  364. onClickPauseOrContinueRecord() {
  365. if (this.recordedForm.loading) return this.$message.info("请稍等");
  366. if (this.recordedForm.status == 1) {
  367. //暂停
  368. this.recordedForm.loading = true;
  369. clearInterval(this.recordedForm.timer);
  370. switch (this.recorderProvider) {
  371. case "microsoft":
  372. this.onPauseRecordWithMicrosoft().then(() => {
  373. this.recordedForm.loading = false;
  374. });
  375. break;
  376. case "shengyang":
  377. // this.onPauseRecordWithShengyang().then(() => {
  378. // this.recordedForm.status = 2;
  379. // this.$message.success("已停止录音");
  380. // this.recordedForm.loading = false;
  381. // });
  382. break;
  383. default:
  384. break;
  385. }
  386. } else if (this.recordedForm.status == 2) {
  387. //开始
  388. this.recordedForm.loading = true;
  389. this.controlsStatus = 1;
  390. this.recordedForm.status = 1;
  391. this.$message.success("已开始录音");
  392. this.recordedForm.loading = false;
  393. this.recordedForm.timer = setInterval(() => {
  394. this.recordedForm.timeDuration += 1;
  395. this.recordedForm.time = this.updateRecordedTime({
  396. duration: this.recordedForm.timeDuration
  397. });
  398. }, 1000);
  399. switch (this.recorderProvider) {
  400. case "microsoft":
  401. this.onContinueRecordWithMicrosoft();
  402. break;
  403. case "shengyang":
  404. // this.onContinueRecordWithShengyang();
  405. break;
  406. default:
  407. break;
  408. }
  409. }
  410. },
  411. onClickFinishRecord() {
  412. clearInterval(this.recordedForm.timer);
  413. switch (this.recorderProvider) {
  414. case "microsoft":
  415. this.onFinishRecordWithMicrosoft();
  416. break;
  417. case "shengyang":
  418. // this.onFinishRecordWithShengyang();
  419. break;
  420. default:
  421. break;
  422. }
  423. },
  424. onFinishRecordWithMicrosoft() {
  425. if (this.recordedForm.status == 1) {
  426. //正在录音时
  427. let iiframe = this.$refs["iiframe"];
  428. iiframe.contentWindow.window.document
  429. .getElementById("scenarioStopButton")
  430. .click();
  431. // 录音借宿
  432. iiframe.contentWindow.onSessionStopped = (s, e) => {
  433. this.recordedForm.status = 3;
  434. this.controlsStatus = 2;
  435. this.showGetTextLoading = false;
  436. this.$message.success("已结束录音");
  437. console.log("结束录音👇");
  438. console.log("结束录音", e);
  439. this.recordedForm.audioBlob.push(e.preaudio);
  440. let blob = new Blob(this.recordedForm.audioBlob, {
  441. type: "audio/wav"
  442. });
  443. let file = new File([blob], "recordedFile.wav", {
  444. type: "audio/wav"
  445. });
  446. this.uploadFile(file, { changeText: false, flag: true });
  447. iiframe.contentWindow.onSessionStopped = null;
  448. iiframe.contentWindow.onRecognizing = null;
  449. iiframe.contentWindow.onRecognizedResult = null;
  450. };
  451. } else if (this.recordedForm.status == 2) {
  452. //暂停录音时
  453. this.recordedForm.status = 3;
  454. this.controlsStatus = 2;
  455. this.showGetTextLoading = false;
  456. let blob = new Blob(this.recordedForm.audioBlob, {
  457. type: "audio/wav"
  458. });
  459. let file = new File([blob], "recordedFile.wav", { type: "audio/wav" });
  460. this.uploadFile(file, { changeText: false, flag: true });
  461. }
  462. },
  463. uploadFile(file, { changeText = true, flag = true }) {
  464. var credentials = {
  465. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  466. secretAccessKey: "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"
  467. }; //秘钥形式的登录上传
  468. window.AWS.config.update(credentials);
  469. window.AWS.config.region = "cn-northwest-1"; //设置区域
  470. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  471. var _this = this;
  472. if (file) {
  473. // this.loading = true;
  474. this.progressData.uploadLoading = true;
  475. this.progressData.value = 0;
  476. var params = {
  477. Key:
  478. file.name.split(".")[0] +
  479. new Date().getTime() +
  480. "." +
  481. file.name.split(".")[file.name.split(".").length - 1],
  482. ContentType: file.type,
  483. Body: file,
  484. "Access-Control-Allow-Credentials": "*",
  485. ACL: "public-read"
  486. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  487. var options = {
  488. partSize: 2048 * 1024 * 1024,
  489. queueSize: 2,
  490. leavePartsOnError: true
  491. };
  492. bucket
  493. .upload(params, options)
  494. .on("httpUploadProgress", function(evt) {
  495. //这里可以写进度条
  496. _this.progressData.value = parseInt((evt.loaded * 100) / evt.total);
  497. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  498. })
  499. .send(function(err, data) {
  500. if (err) {
  501. _this.$message.error("上传失败");
  502. _this.uploadFileLoading = false;
  503. _this.loading = false;
  504. _this.progressData.uploadLoading = false;
  505. } else {
  506. // 判断是不是音频文件
  507. const audioRegex = /\.(mp3|wav|ogg|flac|m4a)$/i;
  508. const txtRegex = /\.(txt|csv)$/i;
  509. const otherRegex = /\.(pdf|xlsx|doc|docx)$/i;
  510. {
  511. console.log(data.Location);
  512. if (audioRegex.test(data.Location)) {
  513. _this.loading = false;
  514. _this.recordedForm.audioBlob = [];
  515. _this.recordedForm.time = "00:00:00";
  516. _this.recordedForm.timeDuration = 0;
  517. _this.progressData.uploadLoading = false;
  518. _this.recordedForm.textList = [];
  519. _this.changeAudioUrl(data.Location);
  520. }
  521. }
  522. }
  523. });
  524. }
  525. },
  526. changeAudioUrl(newValue) {
  527. if (!newValue) return;
  528. this.audioUrl = newValue;
  529. this.audioUrlArray.push(newValue)
  530. this.$forceUpdate()
  531. if (![1, 2].includes(this.pageStatus)) this.pageStatus = 1;
  532. this.controlsStatus = 2;
  533. },
  534. onContinueRecordWithMicrosoft() {
  535. let iiframe = this.$refs["iiframe"];
  536. iiframe.contentWindow.window.document.getElementById(
  537. "languageOptions"
  538. ).selectedIndex = this.languageRadio;
  539. iiframe.contentWindow.testdoContinuousPronunciationAssessment();
  540. // 录音开始
  541. let flag = true;
  542. // 录音开始
  543. iiframe.contentWindow.onRecognizing = (e, recognitionEventArgs) => {
  544. var result = recognitionEventArgs.result;
  545. this.recordedForm.endTime = this.recordedForm.timeDuration;
  546. if (flag) {
  547. this.controlsStatus = 1;
  548. flag = false;
  549. this.uploadFileLoading = false;
  550. }
  551. // let privText = e.privText;
  552. let privText = result.text;
  553. if (privText == undefined || privText == "undefined") return;
  554. console.log("👇转译对象👇");
  555. console.log(e);
  556. console.log("👇转译结果👇");
  557. console.log(privText);
  558. this.recordedForm.startTime = this.recordedForm.timeDuration + 1;
  559. // this.videoText += privText;
  560. this.videoText = this.videoText.replace(/(^|[\r\n]+).*?\[\.\.\.\][\r\n]+/, '$1') + `${result.text} [...]\r\n`;
  561. // 将textarea滚动到最底部
  562. this.$nextTick(() => {
  563. this.$refs.videoTextTextarea.scrollTop = this.$refs.videoTextTextarea.scrollHeight;
  564. });
  565. };
  566. iiframe.contentWindow.onRecognizedResult = result =>{
  567. this.$refs.videoTextTextarea.scrollTop = this.$refs.videoTextTextarea.scrollHeight;
  568. this.videoText = this.videoText.replace(/(^|[\r\n]+).*?\[\.\.\.\][\r\n]+$/, '$1');
  569. if (result.text) {
  570. this.videoText += `${result.text}\r\n`;
  571. }
  572. }
  573. }
  574. }
  575. };
  576. </script>
  577. <style scoped>
  578. .record_box {
  579. width: 100%;
  580. height: 500px;
  581. position: relative;
  582. }
  583. .ca-b-o-main {
  584. width: calc(100% - 20px);
  585. height: 50px;
  586. margin: 10px auto;
  587. border-radius: 5px;
  588. transition: 0.3s;
  589. position: relative;
  590. }
  591. .ca-b-o-main:hover {
  592. box-shadow: 0 5px 5px 5px #e1e8eb;
  593. }
  594. .ca-b-o-m-tape {
  595. width: 100%;
  596. height: 100%;
  597. cursor: pointer;
  598. display: flex;
  599. justify-content: center;
  600. align-items: center;
  601. font-size: 20px;
  602. color: #3681fc;
  603. border-radius: 16px;
  604. background-color: white;
  605. box-shadow: 0 5px 5px 5px #e6eaeb;
  606. transition: 0.3s;
  607. }
  608. .ca-b-o-m-tapeTwo {
  609. width: 100%;
  610. height: 100%;
  611. display: flex;
  612. justify-content: center;
  613. align-items: center;
  614. font-size: 20px;
  615. color: #3681fc;
  616. box-sizing: border-box;
  617. padding: 0 20px;
  618. border-radius: 16px;
  619. background-color: white;
  620. box-shadow: 0 5px 5px 5px #e6eaeb;
  621. transition: 0.3s;
  622. }
  623. .ca-b-o-m-tapeTwo >>> .vueAudioBetter {
  624. width: 90%;
  625. }
  626. .ca-b-o-m-tape > span {
  627. margin-right: 10px;
  628. font-size: 22px;
  629. }
  630. .ca-b-o-m-tape:hover {
  631. color: #1467ee;
  632. }
  633. .ca-b-o-m-inputAre {
  634. width: 100%;
  635. min-height: 100%;
  636. height: auto;
  637. display: flex;
  638. align-items: flex-end;
  639. border-radius: 16px;
  640. background-color: white;
  641. box-shadow: 0 5px 5px 5px #e6eaeb;
  642. transition: 0.3s;
  643. position: absolute;
  644. bottom: 0;
  645. }
  646. .ca-b-o-m-TapeArea {
  647. width: 100%;
  648. height: 100%;
  649. display: flex;
  650. justify-content: space-between;
  651. border-radius: 16px;
  652. background-color: #f0f2f5;
  653. box-shadow: 0 5px 5px 5px #e6eaeb;
  654. transition: 0.3s;
  655. align-items: center;
  656. padding-right: 20px;
  657. box-sizing: border-box;
  658. }
  659. .ca-b-o-m-i-left {
  660. display: flex;
  661. align-items: center;
  662. }
  663. .ca-b-o-m-i-left > div > div {
  664. color: #ee3e3e;
  665. font-weight: bold;
  666. }
  667. .ca-b-o-m-i-left > div > span {
  668. font-size: 14px;
  669. margin-top: 5px;
  670. }
  671. .ca-b-o-m-i-left > img {
  672. margin-left: 10px;
  673. border-radius: 50%;
  674. margin-right: 20px;
  675. }
  676. .ca-b-o-m-left {
  677. flex: 1;
  678. height: auto;
  679. min-height: 64px;
  680. display: flex;
  681. /* justify-content: center; */
  682. align-items: center;
  683. box-sizing: border-box;
  684. padding-left: 20px;
  685. }
  686. .ca-b-o-m-left > textarea {
  687. resize: none;
  688. min-height: 50px;
  689. margin: 7px 0;
  690. max-height: 500px;
  691. width: 100%;
  692. font-size: 18px;
  693. border: none;
  694. outline: none;
  695. resize: none;
  696. overflow: auto;
  697. }
  698. .ca-b-o-m-right {
  699. width: 100px;
  700. min-width: 80px;
  701. height: 64px;
  702. max-height: 64px;
  703. display: flex;
  704. justify-content: center;
  705. align-items: center;
  706. margin-right: 10px;
  707. }
  708. #myTextarea::-webkit-input-placeholder {
  709. /* Chrome, Opera, Safari */
  710. font-size: 14px;
  711. /* 修改placeholder字体大小 */
  712. color: grey;
  713. /* 修改placeholder文字颜色 */
  714. }
  715. #myTextarea:-moz-placeholder {
  716. /* Firefox 18- */
  717. font-size: 14px;
  718. /* 修改placeholder字体大小 */
  719. color: grey;
  720. /* 修改placeholder文字颜色 */
  721. opacity: 1;
  722. /* 修复Firefox的透明度问题 */
  723. }
  724. #myTextarea::-moz-placeholder {
  725. /* Firefox 19+ */
  726. font-size: 14px;
  727. /* 修改placeholder字体大小 */
  728. color: grey;
  729. /* 修改placeholder文字颜色 */
  730. opacity: 1;
  731. /* 修复Firefox的透明度问题 */
  732. }
  733. #myTextarea:-ms-input-placeholder {
  734. /* Internet Explorer 10-11 */
  735. font-size: 14px;
  736. /* 修改placeholder字体大小 */
  737. color: grey;
  738. /* 修改placeholder文字颜色 */
  739. }
  740. /* .ca-b-o-m-right > span {
  741. width: 24px;
  742. height: 24px;
  743. background: url("../../../../assets/icon/classroomObservation/tapeIng.png")
  744. no-repeat;
  745. background-size: 100% 100%;
  746. cursor: pointer;
  747. margin-right: 10px;
  748. } */
  749. .ca-b-o-m-right > div {
  750. width: 52px;
  751. height: 30px;
  752. display: flex;
  753. justify-content: center;
  754. align-items: center;
  755. color: white;
  756. font-size: 14px;
  757. border-radius: 5px;
  758. background-color: #1467ee;
  759. margin-right: 10px;
  760. cursor: pointer;
  761. }
  762. .ca-b-o-m-r-dsiableBtn {
  763. /* 禁止手势 */
  764. cursor: not-allowed !important;
  765. background-color: #aeccfe !important;
  766. }
  767. .lyStart {
  768. width: 38px;
  769. height: 32px;
  770. display: flex;
  771. align-items: center;
  772. justify-content: center;
  773. background-color: #fff;
  774. border-radius: 5px;
  775. cursor: pointer;
  776. }
  777. .ca_b_o_m_roleList {
  778. position: absolute;
  779. left: 0;
  780. width: 100%;
  781. height: auto;
  782. max-height: calc(100vh - 230px);
  783. margin-bottom: 70px;
  784. overflow: auto;
  785. background-color: white;
  786. border-radius: 10px;
  787. box-sizing: border-box;
  788. padding: 15px;
  789. }
  790. .ca_b_o_m_rl_item {
  791. width: 100%;
  792. height: auto;
  793. margin-bottom: 15px;
  794. background-color: #f3f7fd;
  795. border-radius: 10px;
  796. cursor: pointer;
  797. transition: 0.3s;
  798. box-sizing: border-box;
  799. padding: 10px;
  800. }
  801. .ca_b_o_m_rl_itemActive {
  802. background-color: #c3ddfa;
  803. }
  804. .ca_b_o_m_rl_i_left {
  805. width: 50px;
  806. height: 50px;
  807. border-radius: 50%;
  808. margin-right: 15px;
  809. }
  810. .ca_b-o_m_rl_i_top {
  811. display: flex;
  812. }
  813. .ca_b-o_m_rl_i_top > div {
  814. margin-left: 10px;
  815. }
  816. .ca_b-o_m_rl_i_top > div > span {
  817. font-size: 14px;
  818. margin-top: 5px;
  819. color: #6b798e;
  820. }
  821. .ca_b-o_m_rl_i_bottom {
  822. margin-top: 10px;
  823. width: 90%;
  824. overflow: hidden;
  825. display: block;
  826. white-space: nowrap;
  827. text-overflow: ellipsis;
  828. }
  829. .ca-top >>> .editorBar {
  830. height: 100%;
  831. position: relative;
  832. max-height: calc(100vh - 300px);
  833. }
  834. .ca-top >>> .editorBar .text {
  835. height: calc(100% - 42px);
  836. max-height: calc(100% - 42px);
  837. overflow: auto;
  838. }
  839. .chatAreaLoading {
  840. position: absolute;
  841. width: 100%;
  842. height: 100%;
  843. top: 0;
  844. left: 0;
  845. background-color: rgba(255, 255, 255, 0.7);
  846. display: flex;
  847. justify-content: center;
  848. align-items: center;
  849. }
  850. .cal_box {
  851. width: 300px;
  852. height: 150px;
  853. background-color: white;
  854. border-radius: 10px;
  855. box-shadow: 0 0 4px 4px #fff;
  856. display: flex;
  857. flex-direction: column;
  858. justify-content: center;
  859. align-items: center;
  860. box-sizing: border-box;
  861. padding: 20px;
  862. }
  863. .cal_box > div:nth-child(1) {
  864. margin-bottom: 10px;
  865. font-size: 18px;
  866. display: flex;
  867. align-items: center;
  868. }
  869. .cal_box > div:nth-child(1) > img {
  870. width: 30px;
  871. height: 30px;
  872. margin-right: 10px;
  873. }
  874. .cal_box >>> .el-progress-bar__innerText {
  875. color: #fff !important;
  876. }
  877. .text_box {
  878. width: calc(100% - 20px);
  879. margin: 0 auto;
  880. height: calc(100% - 105px);
  881. }
  882. .binfo_input {
  883. width: 100%;
  884. margin: 0;
  885. padding: 12px 14px;
  886. display: block;
  887. min-width: 0;
  888. outline: none;
  889. box-sizing: border-box;
  890. background: none;
  891. border: none;
  892. border-radius: 4px;
  893. background: #fff;
  894. font-size: 16px;
  895. resize: none;
  896. font-family: "Microsoft YaHei";
  897. min-height: 48px;
  898. /* border: 1px solid #3682fc00; */
  899. border: 1.5px solid #cad1dc;
  900. }
  901. .binfo_textarea {
  902. border: 1.5px solid #cad1dc;
  903. font-size: 16px;
  904. resize: none;
  905. /* background: #f6f6f6; */
  906. font-family: "Microsoft YaHei";
  907. }
  908. .binfo_input:focus-visible {
  909. border: 1.5px solid #3681fc !important;
  910. }
  911. .binfo_textarea::-webkit-scrollbar {
  912. /*滚动条整体样式*/
  913. width: 6px;
  914. /*高宽分别对应横竖滚动条的尺寸*/
  915. height: 6px;
  916. }
  917. /*定义滚动条轨道 内阴影+圆角*/
  918. .binfo_textarea::-webkit-scrollbar-track {
  919. border-radius: 10px;
  920. background-color: #eee;
  921. }
  922. /*定义滑块 内阴影+圆角*/
  923. .binfo_textarea::-webkit-scrollbar-thumb {
  924. border-radius: 10px;
  925. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  926. background-color: rgba(0, 0, 0, 0.1);
  927. }
  928. .audio_class {
  929. /* width: 100% !important; */
  930. /* height: 100% !important; */
  931. background: #ccc !important;
  932. margin: 0 !important;
  933. }
  934. .audio_class >>> .slider .process {
  935. background: #000;
  936. }
  937. .ca-b-o-main2 {
  938. width: calc(100% - 20px);
  939. height: 50px;
  940. margin: 10px auto;
  941. /* border-radius: 5px; */
  942. transition: 0.3s;
  943. position: relative;
  944. display: flex;
  945. align-items: center;
  946. justify-content: flex-end;
  947. }
  948. .select_box >>> .el-inpu__inner{
  949. border: none;
  950. }
  951. .select_box{
  952. width: 150px;
  953. display: flex;
  954. align-items: center;
  955. }
  956. .select_box > span{
  957. min-width: fit-content;
  958. }
  959. .select_box + .select_box{
  960. margin-left: 10px;
  961. }
  962. .selectBox {
  963. width: 100%;
  964. height: 100%;
  965. display: flex;
  966. align-items: center;
  967. justify-content: space-between;
  968. }
  969. .controlsBox {
  970. display: flex;
  971. align-items: center;
  972. width: auto;
  973. height: 100%;
  974. display: none;
  975. }
  976. .selectBox:hover > .controlsBox {
  977. display: flex;
  978. }
  979. .delSelect {
  980. width: 16px;
  981. height: 16px;
  982. /* display: none; */
  983. align-items: center;
  984. justify-content: center;
  985. background: url("../../../assets/icon/classroomObservation/del.svg") no-repeat;
  986. background-size: 100% 100%;
  987. box-sizing: border-box;
  988. /* transform: translateY(7px); */
  989. }
  990. </style>