record.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  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://beta.cloud.cocorobo.cn/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]+/, `${privText} [...]\r\n`);
  330. // 将textarea滚动到最底部
  331. this.$nextTick(() => {
  332. this.$refs.videoTextTextarea.scrollTop = this.$refs.videoTextTextarea.scrollHeight;
  333. });
  334. };
  335. },
  336. async onPauseRecordWithMicrosoft() {
  337. let _resolve;
  338. const p = new Promise(resolve => (_resolve = resolve));
  339. let iiframe = this.$refs["iiframe"];
  340. iiframe.contentWindow.window.document
  341. .getElementById("scenarioStopButton")
  342. .click();
  343. // 录音借宿
  344. iiframe.contentWindow.onSessionStopped = (s, e) => {
  345. this.recordedForm.status = 2;
  346. this.$message.success("已停止录音");
  347. console.log("停止录音👇");
  348. console.log("停止录音", e);
  349. this.recordedForm.audioBlob.push(e.preaudio);
  350. iiframe.contentWindow.onSessionStopped = null;
  351. iiframe.contentWindow.onRecognizing = null;
  352. _resolve();
  353. };
  354. return p;
  355. },
  356. onClickPauseOrContinueRecord() {
  357. if (this.recordedForm.loading) return this.$message.info("请稍等");
  358. if (this.recordedForm.status == 1) {
  359. //暂停
  360. this.recordedForm.loading = true;
  361. clearInterval(this.recordedForm.timer);
  362. switch (this.recorderProvider) {
  363. case "microsoft":
  364. this.onPauseRecordWithMicrosoft().then(() => {
  365. this.recordedForm.loading = false;
  366. });
  367. break;
  368. case "shengyang":
  369. // this.onPauseRecordWithShengyang().then(() => {
  370. // this.recordedForm.status = 2;
  371. // this.$message.success("已停止录音");
  372. // this.recordedForm.loading = false;
  373. // });
  374. break;
  375. default:
  376. break;
  377. }
  378. } else if (this.recordedForm.status == 2) {
  379. //开始
  380. this.recordedForm.loading = true;
  381. this.controlsStatus = 1;
  382. this.recordedForm.status = 1;
  383. this.$message.success("已开始录音");
  384. this.recordedForm.loading = false;
  385. this.recordedForm.timer = setInterval(() => {
  386. this.recordedForm.timeDuration += 1;
  387. this.recordedForm.time = this.updateRecordedTime({
  388. duration: this.recordedForm.timeDuration
  389. });
  390. }, 1000);
  391. switch (this.recorderProvider) {
  392. case "microsoft":
  393. this.onContinueRecordWithMicrosoft();
  394. break;
  395. case "shengyang":
  396. // this.onContinueRecordWithShengyang();
  397. break;
  398. default:
  399. break;
  400. }
  401. }
  402. },
  403. onClickFinishRecord() {
  404. clearInterval(this.recordedForm.timer);
  405. switch (this.recorderProvider) {
  406. case "microsoft":
  407. this.onFinishRecordWithMicrosoft();
  408. break;
  409. case "shengyang":
  410. // this.onFinishRecordWithShengyang();
  411. break;
  412. default:
  413. break;
  414. }
  415. },
  416. onFinishRecordWithMicrosoft() {
  417. if (this.recordedForm.status == 1) {
  418. //正在录音时
  419. let iiframe = this.$refs["iiframe"];
  420. iiframe.contentWindow.window.document
  421. .getElementById("scenarioStopButton")
  422. .click();
  423. // 录音借宿
  424. iiframe.contentWindow.onSessionStopped = (s, e) => {
  425. this.recordedForm.status = 3;
  426. this.controlsStatus = 2;
  427. this.showGetTextLoading = false;
  428. this.$message.success("已结束录音");
  429. console.log("结束录音👇");
  430. console.log("结束录音", e);
  431. this.recordedForm.audioBlob.push(e.preaudio);
  432. let blob = new Blob(this.recordedForm.audioBlob, {
  433. type: "audio/wav"
  434. });
  435. let file = new File([blob], "recordedFile.wav", {
  436. type: "audio/wav"
  437. });
  438. this.uploadFile(file, { changeText: false, flag: true });
  439. iiframe.contentWindow.onSessionStopped = null;
  440. iiframe.contentWindow.onRecognizing = null;
  441. };
  442. } else if (this.recordedForm.status == 2) {
  443. //暂停录音时
  444. this.recordedForm.status = 3;
  445. this.controlsStatus = 2;
  446. this.showGetTextLoading = false;
  447. let blob = new Blob(this.recordedForm.audioBlob, {
  448. type: "audio/wav"
  449. });
  450. let file = new File([blob], "recordedFile.wav", { type: "audio/wav" });
  451. this.uploadFile(file, { changeText: false, flag: true });
  452. }
  453. },
  454. uploadFile(file, { changeText = true, flag = true }) {
  455. var credentials = {
  456. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  457. secretAccessKey: "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"
  458. }; //秘钥形式的登录上传
  459. window.AWS.config.update(credentials);
  460. window.AWS.config.region = "cn-northwest-1"; //设置区域
  461. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  462. var _this = this;
  463. if (file) {
  464. // this.loading = true;
  465. this.progressData.uploadLoading = true;
  466. this.progressData.value = 0;
  467. var params = {
  468. Key:
  469. file.name.split(".")[0] +
  470. new Date().getTime() +
  471. "." +
  472. file.name.split(".")[file.name.split(".").length - 1],
  473. ContentType: file.type,
  474. Body: file,
  475. "Access-Control-Allow-Credentials": "*",
  476. ACL: "public-read"
  477. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  478. var options = {
  479. partSize: 2048 * 1024 * 1024,
  480. queueSize: 2,
  481. leavePartsOnError: true
  482. };
  483. bucket
  484. .upload(params, options)
  485. .on("httpUploadProgress", function(evt) {
  486. //这里可以写进度条
  487. _this.progressData.value = parseInt((evt.loaded * 100) / evt.total);
  488. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  489. })
  490. .send(function(err, data) {
  491. if (err) {
  492. _this.$message.error("上传失败");
  493. _this.uploadFileLoading = false;
  494. _this.loading = false;
  495. _this.progressData.uploadLoading = false;
  496. } else {
  497. // 判断是不是音频文件
  498. const audioRegex = /\.(mp3|wav|ogg|flac|m4a)$/i;
  499. const txtRegex = /\.(txt|csv)$/i;
  500. const otherRegex = /\.(pdf|xlsx|doc|docx)$/i;
  501. {
  502. console.log(data.Location);
  503. if (audioRegex.test(data.Location)) {
  504. _this.loading = false;
  505. _this.recordedForm.audioBlob = [];
  506. _this.recordedForm.time = "00:00:00";
  507. _this.recordedForm.timeDuration = 0;
  508. _this.progressData.uploadLoading = false;
  509. _this.recordedForm.textList = [];
  510. _this.changeAudioUrl(data.Location);
  511. }
  512. }
  513. }
  514. });
  515. }
  516. },
  517. changeAudioUrl(newValue) {
  518. if (!newValue) return;
  519. this.audioUrl = newValue;
  520. this.audioUrlArray.push(newValue)
  521. this.$forceUpdate()
  522. if (![1, 2].includes(this.pageStatus)) this.pageStatus = 1;
  523. this.controlsStatus = 2;
  524. },
  525. onContinueRecordWithMicrosoft() {
  526. let iiframe = this.$refs["iiframe"];
  527. iiframe.contentWindow.window.document.getElementById(
  528. "languageOptions"
  529. ).selectedIndex = this.languageRadio;
  530. iiframe.contentWindow.testdoContinuousPronunciationAssessment();
  531. // 录音开始
  532. let flag = true;
  533. // 录音开始
  534. iiframe.contentWindow.onRecognizing = (e, recognitionEventArgs) => {
  535. var result = recognitionEventArgs.result;
  536. this.recordedForm.endTime = this.recordedForm.timeDuration;
  537. if (flag) {
  538. this.controlsStatus = 1;
  539. flag = false;
  540. this.uploadFileLoading = false;
  541. }
  542. // let privText = e.privText;
  543. let privText = result.text;
  544. if (privText == undefined || privText == "undefined") return;
  545. console.log("👇转译对象👇");
  546. console.log(e);
  547. console.log("👇转译结果👇");
  548. console.log(privText);
  549. this.recordedForm.startTime = this.recordedForm.timeDuration + 1;
  550. // this.videoText += privText;
  551. this.videoText = this.videoText.replace(/(^|[\r\n]+).*?\[\.\.\.\][\r\n]+/, `${privText} [...]\r\n`);
  552. // 将textarea滚动到最底部
  553. this.$nextTick(() => {
  554. this.$refs.videoTextTextarea.scrollTop = this.$refs.videoTextTextarea.scrollHeight;
  555. });
  556. };
  557. }
  558. }
  559. };
  560. </script>
  561. <style scoped>
  562. .record_box {
  563. width: 100%;
  564. height: 500px;
  565. position: relative;
  566. }
  567. .ca-b-o-main {
  568. width: calc(100% - 20px);
  569. height: 50px;
  570. margin: 10px auto;
  571. border-radius: 5px;
  572. transition: 0.3s;
  573. position: relative;
  574. }
  575. .ca-b-o-main:hover {
  576. box-shadow: 0 5px 5px 5px #e1e8eb;
  577. }
  578. .ca-b-o-m-tape {
  579. width: 100%;
  580. height: 100%;
  581. cursor: pointer;
  582. display: flex;
  583. justify-content: center;
  584. align-items: center;
  585. font-size: 20px;
  586. color: #3681fc;
  587. border-radius: 16px;
  588. background-color: white;
  589. box-shadow: 0 5px 5px 5px #e6eaeb;
  590. transition: 0.3s;
  591. }
  592. .ca-b-o-m-tapeTwo {
  593. width: 100%;
  594. height: 100%;
  595. display: flex;
  596. justify-content: center;
  597. align-items: center;
  598. font-size: 20px;
  599. color: #3681fc;
  600. box-sizing: border-box;
  601. padding: 0 20px;
  602. border-radius: 16px;
  603. background-color: white;
  604. box-shadow: 0 5px 5px 5px #e6eaeb;
  605. transition: 0.3s;
  606. }
  607. .ca-b-o-m-tapeTwo >>> .vueAudioBetter {
  608. width: 90%;
  609. }
  610. .ca-b-o-m-tape > span {
  611. margin-right: 10px;
  612. font-size: 22px;
  613. }
  614. .ca-b-o-m-tape:hover {
  615. color: #1467ee;
  616. }
  617. .ca-b-o-m-inputAre {
  618. width: 100%;
  619. min-height: 100%;
  620. height: auto;
  621. display: flex;
  622. align-items: flex-end;
  623. border-radius: 16px;
  624. background-color: white;
  625. box-shadow: 0 5px 5px 5px #e6eaeb;
  626. transition: 0.3s;
  627. position: absolute;
  628. bottom: 0;
  629. }
  630. .ca-b-o-m-TapeArea {
  631. width: 100%;
  632. height: 100%;
  633. display: flex;
  634. justify-content: space-between;
  635. border-radius: 16px;
  636. background-color: #f0f2f5;
  637. box-shadow: 0 5px 5px 5px #e6eaeb;
  638. transition: 0.3s;
  639. align-items: center;
  640. padding-right: 20px;
  641. box-sizing: border-box;
  642. }
  643. .ca-b-o-m-i-left {
  644. display: flex;
  645. align-items: center;
  646. }
  647. .ca-b-o-m-i-left > div > div {
  648. color: #ee3e3e;
  649. font-weight: bold;
  650. }
  651. .ca-b-o-m-i-left > div > span {
  652. font-size: 14px;
  653. margin-top: 5px;
  654. }
  655. .ca-b-o-m-i-left > img {
  656. margin-left: 10px;
  657. border-radius: 50%;
  658. margin-right: 20px;
  659. }
  660. .ca-b-o-m-left {
  661. flex: 1;
  662. height: auto;
  663. min-height: 64px;
  664. display: flex;
  665. /* justify-content: center; */
  666. align-items: center;
  667. box-sizing: border-box;
  668. padding-left: 20px;
  669. }
  670. .ca-b-o-m-left > textarea {
  671. resize: none;
  672. min-height: 50px;
  673. margin: 7px 0;
  674. max-height: 500px;
  675. width: 100%;
  676. font-size: 18px;
  677. border: none;
  678. outline: none;
  679. resize: none;
  680. overflow: auto;
  681. }
  682. .ca-b-o-m-right {
  683. width: 100px;
  684. min-width: 80px;
  685. height: 64px;
  686. max-height: 64px;
  687. display: flex;
  688. justify-content: center;
  689. align-items: center;
  690. margin-right: 10px;
  691. }
  692. #myTextarea::-webkit-input-placeholder {
  693. /* Chrome, Opera, Safari */
  694. font-size: 14px;
  695. /* 修改placeholder字体大小 */
  696. color: grey;
  697. /* 修改placeholder文字颜色 */
  698. }
  699. #myTextarea:-moz-placeholder {
  700. /* Firefox 18- */
  701. font-size: 14px;
  702. /* 修改placeholder字体大小 */
  703. color: grey;
  704. /* 修改placeholder文字颜色 */
  705. opacity: 1;
  706. /* 修复Firefox的透明度问题 */
  707. }
  708. #myTextarea::-moz-placeholder {
  709. /* Firefox 19+ */
  710. font-size: 14px;
  711. /* 修改placeholder字体大小 */
  712. color: grey;
  713. /* 修改placeholder文字颜色 */
  714. opacity: 1;
  715. /* 修复Firefox的透明度问题 */
  716. }
  717. #myTextarea:-ms-input-placeholder {
  718. /* Internet Explorer 10-11 */
  719. font-size: 14px;
  720. /* 修改placeholder字体大小 */
  721. color: grey;
  722. /* 修改placeholder文字颜色 */
  723. }
  724. /* .ca-b-o-m-right > span {
  725. width: 24px;
  726. height: 24px;
  727. background: url("../../../../assets/icon/classroomObservation/tapeIng.png")
  728. no-repeat;
  729. background-size: 100% 100%;
  730. cursor: pointer;
  731. margin-right: 10px;
  732. } */
  733. .ca-b-o-m-right > div {
  734. width: 52px;
  735. height: 30px;
  736. display: flex;
  737. justify-content: center;
  738. align-items: center;
  739. color: white;
  740. font-size: 14px;
  741. border-radius: 5px;
  742. background-color: #1467ee;
  743. margin-right: 10px;
  744. cursor: pointer;
  745. }
  746. .ca-b-o-m-r-dsiableBtn {
  747. /* 禁止手势 */
  748. cursor: not-allowed !important;
  749. background-color: #aeccfe !important;
  750. }
  751. .lyStart {
  752. width: 38px;
  753. height: 32px;
  754. display: flex;
  755. align-items: center;
  756. justify-content: center;
  757. background-color: #fff;
  758. border-radius: 5px;
  759. cursor: pointer;
  760. }
  761. .ca_b_o_m_roleList {
  762. position: absolute;
  763. left: 0;
  764. width: 100%;
  765. height: auto;
  766. max-height: calc(100vh - 230px);
  767. margin-bottom: 70px;
  768. overflow: auto;
  769. background-color: white;
  770. border-radius: 10px;
  771. box-sizing: border-box;
  772. padding: 15px;
  773. }
  774. .ca_b_o_m_rl_item {
  775. width: 100%;
  776. height: auto;
  777. margin-bottom: 15px;
  778. background-color: #f3f7fd;
  779. border-radius: 10px;
  780. cursor: pointer;
  781. transition: 0.3s;
  782. box-sizing: border-box;
  783. padding: 10px;
  784. }
  785. .ca_b_o_m_rl_itemActive {
  786. background-color: #c3ddfa;
  787. }
  788. .ca_b_o_m_rl_i_left {
  789. width: 50px;
  790. height: 50px;
  791. border-radius: 50%;
  792. margin-right: 15px;
  793. }
  794. .ca_b-o_m_rl_i_top {
  795. display: flex;
  796. }
  797. .ca_b-o_m_rl_i_top > div {
  798. margin-left: 10px;
  799. }
  800. .ca_b-o_m_rl_i_top > div > span {
  801. font-size: 14px;
  802. margin-top: 5px;
  803. color: #6b798e;
  804. }
  805. .ca_b-o_m_rl_i_bottom {
  806. margin-top: 10px;
  807. width: 90%;
  808. overflow: hidden;
  809. display: block;
  810. white-space: nowrap;
  811. text-overflow: ellipsis;
  812. }
  813. .ca-top >>> .editorBar {
  814. height: 100%;
  815. position: relative;
  816. max-height: calc(100vh - 300px);
  817. }
  818. .ca-top >>> .editorBar .text {
  819. height: calc(100% - 42px);
  820. max-height: calc(100% - 42px);
  821. overflow: auto;
  822. }
  823. .chatAreaLoading {
  824. position: absolute;
  825. width: 100%;
  826. height: 100%;
  827. top: 0;
  828. left: 0;
  829. background-color: rgba(255, 255, 255, 0.7);
  830. display: flex;
  831. justify-content: center;
  832. align-items: center;
  833. }
  834. .cal_box {
  835. width: 300px;
  836. height: 150px;
  837. background-color: white;
  838. border-radius: 10px;
  839. box-shadow: 0 0 4px 4px #fff;
  840. display: flex;
  841. flex-direction: column;
  842. justify-content: center;
  843. align-items: center;
  844. box-sizing: border-box;
  845. padding: 20px;
  846. }
  847. .cal_box > div:nth-child(1) {
  848. margin-bottom: 10px;
  849. font-size: 18px;
  850. display: flex;
  851. align-items: center;
  852. }
  853. .cal_box > div:nth-child(1) > img {
  854. width: 30px;
  855. height: 30px;
  856. margin-right: 10px;
  857. }
  858. .cal_box >>> .el-progress-bar__innerText {
  859. color: #fff !important;
  860. }
  861. .text_box {
  862. width: calc(100% - 20px);
  863. margin: 0 auto;
  864. height: calc(100% - 105px);
  865. }
  866. .binfo_input {
  867. width: 100%;
  868. margin: 0;
  869. padding: 12px 14px;
  870. display: block;
  871. min-width: 0;
  872. outline: none;
  873. box-sizing: border-box;
  874. background: none;
  875. border: none;
  876. border-radius: 4px;
  877. background: #fff;
  878. font-size: 16px;
  879. resize: none;
  880. font-family: "Microsoft YaHei";
  881. min-height: 48px;
  882. /* border: 1px solid #3682fc00; */
  883. border: 1.5px solid #cad1dc;
  884. }
  885. .binfo_textarea {
  886. border: 1.5px solid #cad1dc;
  887. font-size: 16px;
  888. resize: none;
  889. /* background: #f6f6f6; */
  890. font-family: "Microsoft YaHei";
  891. }
  892. .binfo_input:focus-visible {
  893. border: 1.5px solid #3681fc !important;
  894. }
  895. .binfo_textarea::-webkit-scrollbar {
  896. /*滚动条整体样式*/
  897. width: 6px;
  898. /*高宽分别对应横竖滚动条的尺寸*/
  899. height: 6px;
  900. }
  901. /*定义滚动条轨道 内阴影+圆角*/
  902. .binfo_textarea::-webkit-scrollbar-track {
  903. border-radius: 10px;
  904. background-color: #eee;
  905. }
  906. /*定义滑块 内阴影+圆角*/
  907. .binfo_textarea::-webkit-scrollbar-thumb {
  908. border-radius: 10px;
  909. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  910. background-color: rgba(0, 0, 0, 0.1);
  911. }
  912. .audio_class {
  913. /* width: 100% !important; */
  914. /* height: 100% !important; */
  915. background: #ccc !important;
  916. margin: 0 !important;
  917. }
  918. .audio_class >>> .slider .process {
  919. background: #000;
  920. }
  921. .ca-b-o-main2 {
  922. width: calc(100% - 20px);
  923. height: 50px;
  924. margin: 10px auto;
  925. /* border-radius: 5px; */
  926. transition: 0.3s;
  927. position: relative;
  928. display: flex;
  929. align-items: center;
  930. justify-content: flex-end;
  931. }
  932. .select_box >>> .el-inpu__inner{
  933. border: none;
  934. }
  935. .select_box{
  936. width: 150px;
  937. display: flex;
  938. align-items: center;
  939. }
  940. .select_box > span{
  941. min-width: fit-content;
  942. }
  943. .select_box + .select_box{
  944. margin-left: 10px;
  945. }
  946. .selectBox {
  947. width: 100%;
  948. height: 100%;
  949. display: flex;
  950. align-items: center;
  951. justify-content: space-between;
  952. }
  953. .controlsBox {
  954. display: flex;
  955. align-items: center;
  956. width: auto;
  957. height: 100%;
  958. display: none;
  959. }
  960. .selectBox:hover > .controlsBox {
  961. display: flex;
  962. }
  963. .delSelect {
  964. width: 16px;
  965. height: 16px;
  966. /* display: none; */
  967. align-items: center;
  968. justify-content: center;
  969. background: url("../../../assets/icon/classroomObservation/del.svg") no-repeat;
  970. background-size: 100% 100%;
  971. box-sizing: border-box;
  972. /* transform: translateY(7px); */
  973. }
  974. </style>