| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442 |
- <template>
- <div class="pptEasyClass">
- <div class="pec_main" v-loading="pageLoading">
- <!-- 录音转文字 -->
- <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="iframeSrcop" ref="iiframe"
- v-show="false"></iframe>
- <div class="pec_header">
- <div class="pec_h_left">
- <!-- || tType == 1 -->
- <div @click.stop="back" class="backBtn" v-if="screenType != 2 && noLogin != 2 ">
- <img src="../../assets/icon/newIcon/return.svg" alt="" />
- </div>
- <div @click.stop="gotoCourseManage" class="backBtn" v-if="screenType == 2 && tType == 1 && noLogin != 2">
- <img src="../../assets/icon/newIcon/return.svg" alt="" />
- </div>
- <div v-if="tcid" class="class-info-group">
- <span class="class-label">{{ lang.ssClass }}</span>
- <span class="class-value class-value2" @click="openSelectClass">
- {{ className }}
- <svg t="1776672009773" class="xia-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
- p-id="4735" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12">
- <path
- d="M562.5 771c-14.3 14.3-33.7 27.5-52 23.5-18.4 3.1-35.7-11.2-50-23.5L18.8 327.3c-22.4-22.4-22.4-59.2 0-81.6s59.2-22.4 81.6 0L511.5 668l412.1-422.3c22.4-22.4 59.2-22.4 81.6 0s22.4 59.2 0 81.6L562.5 771z"
- p-id="4736" fill="currentColor"></path>
- </svg>
- </span>
- </div>
- <div v-if="tcid" class="class-info-group">
- <span class="class-label" v-if="inviteCode">{{ lang.ssInviteCode }}</span>
- <span class="class-value" v-if="inviteCode">{{ inviteCode }}</span>
- </div>
- <div @click.stop="openShareDialog" class="shareBtn" v-if="tcid && tType == 1">
- <img src="../../assets/share.svg" alt="" />
- </div>
- </div>
- <div class="pec_h_center">
- <el-tooltip effect="dark" :content="lang.ssRefresh" placement="bottom">
- <div class="refresh_icon" @click="refreshCourse">
- <img src="../../assets/icon/course/refresh-2.svg" />
- </div>
- </el-tooltip>
- <el-tooltip class="item" effect="dark"
- :content="recordedForm.status == 1 ? lang.ssFinishClassRecording : lang.ssBeginClassRecording"
- placement="bottom"
- v-show="(jArray.includes(oid) || jArray.includes(org)) && courseDetail.userid == userid && tcid">
- <div class="pec_h_r_btn_refresh" :class="{ 'recording': recordedForm.status == 1 }"
- @click="toggleRecording">
- <svg t="1772588344140" viewBox="0 0 1024 1024" p-id="1693" width="200" height="200">
- <path
- d="M512 1024a512.568889 512.568889 0 0 1-512-512 512.625778 512.625778 0 0 1 512-512 512.568889 512.568889 0 0 1 512 512 512.568889 512.568889 0 0 1-512 512zM512 73.329778c-241.948444 0-438.670222 196.835556-438.670222 438.670222S270.051556 950.670222 512 950.670222s438.670222-196.835556 438.670222-438.670222S753.948444 73.329778 512 73.329778z m0 686.592a245.191111 245.191111 0 1 1 0-490.382222 245.191111 245.191111 0 0 1 0 490.382222z"
- p-id="1694"></path>
- </svg>
- <span>{{ recordedForm.status == 1 ? lang.ssStopRecording2 : lang.ssRecord }}</span>
- </div>
- </el-tooltip>
- <el-tooltip effect="dark" :content="courseDetail.title" placement="bottom">
- <div class="pec_h_l_title">
- <span>{{ courseDetail.title }}</span>
- </div>
- </el-tooltip>
- <div class="free-browse-switch" v-if="courseDetail.userid == userid">
- <el-switch v-model="freeBrowse" :active-value="false" :inactive-value="true" class="custom-switch"
- active-color="#03ae2b" inactive-color="#d8d8d8" @change="onFreeBrowseChange"></el-switch>
- <span class="switch-label" :class="{ active: freeBrowse }">{{ freeBrowse ? lang.ssFreeBrowse :
- lang.ssFollowMode }}</span>
- </div>
- <!-- <div class="free-browse-switch" v-if="courseDetail.userid == userid">
- <el-switch v-model="isCan" :active-value="true" :inactive-value="false" class="custom-switch"
- active-color="#03ae2b" inactive-color="#d8d8d8" @change="onIsCanChange"></el-switch>
- <span class="switch-label" :class="{ active: isCan }">{{ isCan ? lang.ssShowResult : lang.ssHideResult }}</span>
- </div> -->
- <div class="free-browse-switch" v-if="tType == 2">
- <span class="switch-label" :class="{ active: freeBrowse }">{{ freeBrowse ? lang.ssFreeBrowse :
- lang.ssFollowMode }}</span>
- </div>
- </div>
- <div class="pec_h_right">
- <div class="pec_h_r_btnArea">
- <!-- openObserveDialog -->
- <!-- toggleRecording -->
- <div class="pec_h_r_btn_uploadVoiceBtn" @click="uploadVoiceBtn" v-if="courseDetail.userid == userid"
- v-show="false">
- <span>{{ lang.ssUploadRecordingFile }}</span>
- </div>
- <div class="pec_h_r_btn_afterClass" @click="afterClass" v-if="courseDetail.userid == userid">
- <img src="../../assets/icon/newIcon/afterClass.svg" alt="" />
- <span>{{ lang.ssEndClass }}</span>
- </div>
- <div class="name_box" v-if="tType == 2">
- {{ userJson.username }}
- </div>
- <div class="pec_h_r_btn_afterClass" v-if="tType == 2" @click="afterClass2">
- {{ lang.ssExit }}
- </div>
- <!-- tType == 2 && courseDetail.userid == userid && object.keys(pptJSON).length > 0 -->
- <div class="pec_h_r_btn_analyze" v-show="courseDetail.userid == userid && Object.keys(pptJSON).length > 0 && tcid" @click="openDataBoard">
- {{ lang.ssAnalyze }}
- </div>
- </div>
- </div>
- </div>
- <div class="pec_content">
- <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;clipboard-write;clipboard-read"
- webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" frameborder="no" border="0" :src="iframeSrc"
- v-if="showIframe" style="width: 100%; height: 100%; border: none" ref="ppt"></iframe>
- </div>
- </div>
- <!-- 课堂观察弹窗 -->
- <el-dialog :visible.sync="showObserveDialog" :close-on-click-modal="false" :close-on-press-escape="false"
- :show-close="true" width="90%" top="5vh" class="observe-dialog">
- <iframe v-if="showObserveDialog" :src="observeDialogUrl" frameborder="0"
- style="width: 100%; height: 85vh; border: none;"></iframe>
- </el-dialog>
- <selectTeachingClassDialog :courseDetail="courseDetail" :userId="userid" ref="selectTeachingClassDialogRef" @success="selectClassSuccess" @changeClassList="changeClassList"/>
- <!-- 消息提示组件 -->
- <messageInstruction ref="messageInstructionRef"></messageInstruction>
- <!-- 确认提示组件 -->
- <confirmInstruction ref="confirmInstructionRef"></confirmInstruction>
- <!-- 分享弹窗 -->
- <shareDialog ref="shareDialogRef"></shareDialog>
-
- <!-- 数据看板 -->
- <dataBoard ref="dataBoardRef" :courseDetail="courseDetail" :classList="classList" :pptJSON="pptJSON"></dataBoard>
- </div>
- </template>
- <script>
- import { myMixin } from '../../mixins/mixin';
- import selectTeachingClassDialog from "../dialog/selectTeachingClassDialog2.vue";
- import messageInstruction from '../components/messageInstruction.vue';
- import confirmInstruction from '../components/confirmInstruction.vue';
- import shareDialog from './shareDialog.vue';
- import dataBoard from './dataBoard/teacher.vue';
- const getFile = (url) => {
- return new Promise((resolve, reject) => {
- var credentials = {
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
- secretAccessKey: "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",
- }; //秘钥形式的登录上传
- window.AWS.config.update(credentials);
- window.AWS.config.region = "cn-northwest-1"; //设置区域
- let url2 = url;
- let _url2 = "";
- if (
- url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
- ) {
- _url2 = url2.split(
- "https://view.officeapps.live.com/op/view.aspx?src="
- )[1];
- } else {
- _url2 = url2;
- }
- var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
- let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
- var params = {
- Bucket: "ccrb",
- Key: name
- };
- s3.getObject(params, function (err, data) {
- if (err) {
- console.log(err, err.stack)
- resolve({ data: 1 });
- }else {
- resolve({ data: data.Body });
- console.log(data);
- } // sxuccessful response
- });
- // axios({
- // method: "get",
- // url,
- // responseType: "blob",
- // })
- // .then((data) => {
- // resolve({ data: data.data });
- // })
- // .catch((error) => {
- // resolve({ data: 1 });
- // // reject(error.toString());
- // });
- });
- };
- export default {
- mixins: [myMixin],
- components: {
- messageInstruction,
- confirmInstruction,
- selectTeachingClassDialog,
- shareDialog,
- dataBoard
- },
- data() {
- return {
- id: this.$route.query.courseId,
- userid: this.$route.query.userid,
- classId: this.$route.query.cid,
- role: this.$route.query.role,
- oid: this.$route.query.oid,
- org: this.$route.query.org,
- tType: this.$route.query.tType,
- courseType: this.$route.query.type,
- screenType: this.$route.query.screenType,
- tcid2: this.$route.query.tcid,
- noLogin: this.$route.query.noLogin,
- classList: [],
- tcid: "",
- className: "",
- showIframe: false,
- iframeSrc: "",
- courseDetail: {},
- pageLoading: false,
- inviteCode: "",
- startTime: "",
- freeBrowse: true, // 默认自由浏览
- opertimer: null, // 定时器
- jArray: [],
- // 录音相关变量
- languageRadio: 2, // 语言选择
- recordedForm: {
- status: 0, // 0: 未开始, 1: 录音中, 2: 暂停, 3: 结束
- startTime: 0,
- endTime: 0,
- timeDuration: 0,
- textList: [],
- audioBlob: []
- },
- controlsStatus: 0, // 控制状态
- showIndexPage: true, // 显示索引页
- pageStatus: 1, // 页面状态
- editorBarData: {
- type: "0",
- content: ""
- },
- uploadFileLoading: false, // 上传文件加载状态
- transcriptionData: {
- content: ""
- },
- showGetTextLoading: false, // 显示获取文本加载状态
- // 弹窗相关
- showObserveDialog: false, // 显示课堂观察弹窗
- observeDialogUrl: "", // 课堂观察链接
- // 录音时间记录
- recordingStartTime: "", // 开始录音时间
- recordingEndTime: "", // 结束录音时间
- isResultArray: [],
- isCan: false,
- timeoutPan: null,
- dataBoardDebounce: null,
- isTimeOutPan: false,
- pptJSON: {},
- };
- },
- computed: {
- iframeSrcop() {
- if (this.$region == 'hk') {
- return `https://cloud.cocorobo.hk/browser/public/index.html`;
- } else if (this.$region == 'com') {
- return `https://cloud.cocorobo.com/browser/public/index.html`;
- } else {
- return `https://beta.cloud.cocorobo.cn/browser/public/index.html`;
- }
- }
- },
- methods: {
- openSelectClass(){
- this.$refs.selectTeachingClassDialogRef.open({classList:this.classList}, this.tcid2)
- },
- addInviteCodeOne(cid) {
- return new Promise((resolve)=>{
- let params = [
- {
- courseId: this.id,
- inviteCode: cid,
- },
- ];
- this.ajax
- .post(this.$store.state.api + "add_courseInviteCode2", params)
- .then((res) => {
- console.log(res.data)
- resolve(res.data)
- })
- .catch((err) => {
- resolve(err.messages)
- console.error(err);
- });
- })
- },
- async selectClassSuccess(classId){
- if(classId){
- let data = await this.addInviteCodeOne(classId)
- console.log("addInviteCodeOne",data)
- this.tcid2 = classId
- this.getClassName()
- this.getCourseDetail();
- }else if(this.tcid2){
- this.ticd2 = ''
- this.getCourseDetail();
- }
- // this.gotoCourse(classId);
- this.$refs.selectTeachingClassDialogRef.close();
- this.setoTime("1");
- },
- async changeClassList(data){
- this.classList = JSON.parse(JSON.stringify(data))
- let params = [{
- cid:this.id,
- juri:this.classList.map(i=>i.id).join(',')
- }]
- this.ajax.post(this.$store.state.api+"update_CourseJuriById",params).then(res=>{
- if(res.data==1){
- console.log(this.lang.ssModifySuccess)
- }
- })
- //this.inviteCodeFn();
- },
- goTo(path) {
- this.$router.push(path);
- },
- refreshCourse() {
- this.getCourseDetail();
- },
- audioStart() {
- this.onStartRecordWithMicrosoft();
- },
- async toggleRecording() {
- return new Promise(async resolve => {
- if (this.recordedForm.status == 1) {
- // 检查录音时间是否至少为5秒
- const now = new Date(await this.getServerTime());
- const duration = (now - new Date(this.recordingStartTime)) / 1000;
- if (duration < 5) {
- this.$message.warning(this.lang.ssRecordingTimeAtLeast5Seconds);
- return;
- }
- this.$refs.confirmInstructionRef.open({
- title: this.lang.ssStopRecordingConfirm,
- message: this.lang.ssStopRecordingNotice,
- cancelText: this.lang.ssCancel,
- submitText: this.lang.ssConfirm,
- submitCallback: () => {
- console.log("确定")
- this.onFinishRecordWithMicrosoft().then(() => {
- resolve(true)
- });
- },
- cancelCallback: () => {
- console.log("取消")
- resolve(false)
- },
- })
- // this.$confirm(this.lang.ssStopRecordingNotice, this.lang.ssStopRecordingConfirm, {
- // confirmButtonText: this.lang.ssConfirm,
- // cancelButtonText: this.lang.ssCancel,
- // confirmButtonClass: "pptEasyClassConfirmButtonText",
- // cancelButtonClass: "pptEasyClassCancelButtonText"
- // }).then(() => {
- // console.log("确定")
- // // this.$message({
- // // dangerouslyUseHTMLString: true,
- // // customClass:"pptEasyClassMessage",
- // // message: '已停止录制 <p style="color:#3AB855;text-decoration: underline;cursor: pointer;float:right;margin-left:10px" target="_blank">查看结果</p>'
- // // });
- // this.onFinishRecordWithMicrosoft().then(() => {
- // resolve(true)
- // });
- // }).catch(() => {
- // console.log("取消")
- // resolve(false)
- // });
- } else {
- console.log('recordingEndTime',this.recordingEndTime)
- const now = new Date(await this.getServerTime());
- console.log('now', now)
- const duration = (now - new Date(this.recordingEndTime)) / 1000;
- if (duration < 5) {
- this.$message.warning(this.lang.ssRecordingTimeAtLeast5Seconds);
- return;
- }
- this.onStartRecordWithMicrosoft();
- resolve(true)
- }
- })
- // })
- },
- // ============ start 微软录音转译
- async onStartRecordWithMicrosoft() {
- let iiframe = this.$refs["iiframe"];
- iiframe.contentWindow.window.document.getElementById(
- "languageOptions"
- ).selectedIndex = this.languageRadio;
- // 录音开始
- let flag = true;
- console.log("开始录音", iiframe);
- this.recordedForm.status = 1;
- // 记录开始录音时间
- this.recordingStartTime = await this.getServerTime();
- iiframe.contentWindow.window.onRecognizedResult = e => {
- console.log("onRecognizedResult", e);
- this.recordedForm.endTime = this.recordedForm.timeDuration;
- if (flag) {
- this.controlsStatus = 1;
- this.showIndexPage = false;
- this.pageStatus = 2;
- this.editorBarData.type = "0";
- flag = false;
- this.uploadFileLoading = false;
- this.transcriptionData.content = "";
- this.editorBarData.content = "";
- this.recordedForm.textList = [];
- }
- this.showGetTextLoading = true;
- let privText = e.privText;
- let privSpeakerId = e.privSpeakerId;
- let _copyPrivSpeakerId = privSpeakerId;
- console.log("👇转译对象👇");
- console.log(e);
- console.log("👇转译结果👇");
- console.log(privText);
- if (!privText || !privSpeakerId || privSpeakerId == "Unknown") {
- return;
- }
- const newItem = {
- value: privText,
- role: "",
- startTime: this.updateRecordedTime({
- duration: this.recordedForm.startTime
- }),
- endTime: this.updateRecordedTime({
- duration: this.recordedForm.endTime
- }),
- time: this.updateRecordedTime({
- duration: this.recordedForm.endTime - this.recordedForm.startTime
- })
- };
- this.recordedForm.textList.push(newItem);
- this.recordedForm.startTime = this.recordedForm.timeDuration + 1;
- this.transcriptionData.content +=
- _copyPrivSpeakerId + ":" + privText + "\n";
- this.onRecordAddLine(newItem);
- };
- iiframe.contentWindow.ConversationTranscriber();
- setTimeout(() => {
- navigator.permissions && navigator.permissions.query({ name: 'microphone' }).then(permissionStatus => {
- if (permissionStatus.state !== "granted") {
- // 没有开启录音权限,直接确定停止录音
- this.recordedForm.status = "0";
- let iframe = this.$refs["iiframe"];
- iframe.contentWindow.onSessionStopped = null;
- iframe.contentWindow.window.onRecognizedResult = null;
- this.$message.success(this.lang.ssNoPermStop);
- return;
- }
- })
- }, 10000)
- },
- async onFinishRecordWithMicrosoft() {
- return new Promise(resolve => {
- navigator.permissions && navigator.permissions.query({ name: 'microphone' }).then(async permissionStatus => {
- if (permissionStatus.state !== "granted") {
- // 没有开启录音权限,直接确定停止录音
- this.recordedForm.status = "0";
- let iframe = this.$refs["iiframe"];
- iframe.contentWindow.onSessionStopped = null;
- iframe.contentWindow.window.onRecognizedResult = null;
- this.$message.success(this.lang.ssNoPermStop);
- return;
- }
- if (this.recordedForm.status == 1) {
- //正在录音时
- let iiframe = this.$refs["iiframe"];
- iiframe.contentWindow.window.document
- .getElementById("scenarioStopButton")
- .click();
- // 录音借宿
- iiframe.contentWindow.onSessionStopped = async (s, e) => {
- this.recordedForm.status = 0;
- this.controlsStatus = 2;
- this.showGetTextLoading = false;
- // this.$message.success("已结束录音");
- console.log("结束录音👇");
- console.log("结束录音", e);
- this.recordedForm.audioBlob.push(e.preaudio);
- let blob = new Blob(this.recordedForm.audioBlob, {
- type: "audio/wav"
- });
- let file = new File([blob], "recordedFile.wav", {
- type: "audio/wav"
- });
- // 存储文件和文本到全局对象
- await this.storeRecordingData(file);
- // 记录结束录音时间
- this.recordingEndTime = await this.getServerTime()
- // 调用 addPPTClass 接口
- this.addPPTClass(file);
- iiframe.contentWindow.onSessionStopped = null;
- iiframe.contentWindow.window.onRecognizedResult = null;
- resolve(true)
- };
- } else if (this.recordedForm.status == 2) {
- //暂停录音时
- this.recordedForm.status = 0;
- this.controlsStatus = 2;
- this.showGetTextLoading = false;
- let blob = new Blob(this.recordedForm.audioBlob, {
- type: "audio/wav"
- });
- let file = new File([blob], "recordedFile.wav", { type: "audio/wav" });
- // 存储文件和文本到全局对象
- await this.storeRecordingData(file);
- // 记录结束录音时间
- this.recordingEndTime = await this.getServerTime()
- // 调用 addPPTClass 接口
- this.addPPTClass(file);
- resolve(true)
- }
- })
- })
- },
- storeRecordingData(file) {
- // 配置全局 window 对象存储录音数据
- return new Promise((resolve) => {
- if (!window.recordingData) {
- window.recordingData = {};
- }
- window.recordingData.file = file;
- window.recordingData.text = this.transcriptionData.content;
- window.recordingData.textList = this.recordedForm.textList;
- // 将录音文件转为base64并存入localStorage
- // const reader = new FileReader();
- // reader.onload = function(e) {
- // const base64data = e.target.result;
- // try {
- // localStorage.setItem("recordedFileBase64", base64data);
- // localStorage.setItem('recordedFileName', file.name);
- // localStorage.setItem('recordedFileType', file.type);
- resolve(true)
- // console.log("录音数据已存储到全局对象:", window.recordingData);
- // } catch (err) {
- // resolve(false)
- // console.error("localStorage存储base64文件失败:", err);
- // }
- // };
- // reader.readAsDataURL(file);
- })
- },
- openObserveDialog(pptid, file) {
- // this.observeDialogUrl = `https://observe.cocorobo.cn/#/newClassroom?userid=${this.userid}&oid=${this.oid}&org=${this.org}&pptid=${pptid}`;
- // this.showObserveDialog = true;
- const url = `https://observe.cocorobo.cn/#/newClassroom?userid=${this.userid}&oid=${this.oid}&org=${this.org}&pptid=${pptid}`;
- const _pageWindow = window.open(url, '_blank');
- // if(!_pageWindow){
- // alert('浏览器弹窗被拦截,请允许弹窗后重试');
- // return;
- // }
- const sendData = {
- type: 'fileData',
- file,
- }
- const sendMessageToVue3 = () => {
- _pageWindow.postMessage(
- sendData,
- '*' // targetOrigin:必须是Vue3的实际域名,不要用*(安全)
- );
- };
- const handleVue3Ready = (e) => {
- // 校验消息来源(安全:只处理Vue3域名的消息)
- // 校验消息类型(确认是Vue3的就绪通知)
- if (e.data.type === 'READY') {
- console.log('已就绪,开始发送数据');
- sendMessageToVue3();
- }
- // 校验Vue3的"接收成功"确认(可选,进一步确保送达)
- if (e.data.type === 'DATA_RECEIVED') {
- console.log('数据已被接收');
- // 收到确认后移除监听,避免内存泄漏
- window.removeEventListener('message', handleVue3Ready);
- }
- };
- window.addEventListener('message', handleVue3Ready);
- const timeoutTimer = setTimeout(() => {
- console.log('未收到就绪通知,主动发送数据');
- sendMessageToVue3();
- // 移除监听(兜底后清理)
- window.removeEventListener('message', handleVue3Ready);
- }, 5000);
- const checkWinClosed = setInterval(() => {
- if (_pageWindow.closed) {
- clearTimeout(timeoutTimer);
- clearInterval(checkWinClosed);
- window.removeEventListener('message', handleVue3Ready);
- }
- }, 1000);
- // 优化:仅通过轮询方式检查窗口是否加载完成并发送消息,被打开页面无需做任何处理
- // const sendFileData = () => {
- // if (_pageWindow && !_pageWindow.closed) {
- // _pageWindow.postMessage(
- // {
- // type: 'fileData',
- // file,
- // },
- // '*'
- // );
- // }
- // };
- // let checkCount = 0;
- // const checkLoadedInterval = setInterval(() => {
- // if (!_pageWindow || _pageWindow.closed) {
- // clearInterval(checkLoadedInterval);
- // return;
- // }
- // try {
- // if (_pageWindow.document && _pageWindow.document.readyState === 'complete') {
- // clearInterval(checkLoadedInterval);
- // sendFileData();
- // }
- // } catch (err) {
- // // 跨域下直接尝试发送
- // clearInterval(checkLoadedInterval);
- // sendFileData();
- // }
- // if (++checkCount > 20) {
- // // 最多检测2秒(20次)
- // clearInterval(checkLoadedInterval);
- // sendFileData();
- // }
- // }, 100);
- setTimeout(() => {
- window.focus()
- }, 100)
- function openPageWindow() {
- _pageWindow.focus()
- }
- this.$refs.messageInstructionRef.pptMessage(`${this.lang.ssStoppedRecording} <p style="color:#3AB855;text-decoration: underline;cursor: pointer;float:right;margin-left:10px" target="_blank" onClick="(${openPageWindow.toString()})()">${this.lang.ssViewRecordingResult}</p>`)
- },
- addPPTClass(file) {
- let params = {
- pptid: this.id,
- cid: this.tcid,
- st: this.recordingStartTime,
- et: this.recordingEndTime
- };
- this.ajax
- .post(this.$store.state.api + "addPPTClass", [params])
- .then(res => {
- console.log("addPPTClass", res);
- let id = res.data[0][0].id;
- this.openObserveDialog(id, file);
- })
- .catch(err => {
- console.error(err);
- this.$message.error("保存录音信息失败");
- });
- },
- updateRecordedTime({ duration }) {
- // 格式化录音时间
- const minutes = Math.floor(duration / 60);
- const seconds = Math.floor(duration % 60);
- return `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
- },
- onRecordAddLine(item) {
- // 添加录音文本行
- console.log("添加录音文本行:", item);
- // 这里可以根据需要添加更多处理逻辑
- },
- getCourseDetail() {
- this.pageLoading = true;
- let params = {
- courseId: this.id
- };
- this.ajax
- .get(this.$store.state.api + "selectCourseDetail3", params)
- .then(res => {
- console.log("getCourseDetail", res);
- this.courseDetail = res.data[0][0];
- this.courseDetail.chapters = JSON.parse(this.courseDetail.chapters);
- getFile(this.courseDetail.chapters.pptData).then(res => {
- let pptdata = res
- // pptdata.data 是 ArrayBuffer,需要先转成字符串再解析为 JSON
- let jsonStr = ''
- if (pptdata && pptdata.data) {
- // 先将 ArrayBuffer 转为字符串
- const uint8Array = new Uint8Array(pptdata.data)
- jsonStr = new TextDecoder('utf-8').decode(uint8Array)
- try {
- const jsonObj = JSON.parse(jsonStr)
- this.pptJSON = jsonObj
- console.log(this.pptJSON)
- } catch (error) {
- console.error('JSON 解析错误:', error);
- }
- }
- })
- if(this.tType == '2'){
- this.cid = this.$route.query.cid || ''
- }else {
- this.tcid = this.arrayToArray(
- this.courseDetail.juri ? this.courseDetail.juri.split(",") : [],
- this.tcid2 ? this.tcid2.split(",") : []
- )[0] || "";
- }
-
- console.log('tcid', this.tcid)
- console.log('tcid2', this.tcid2)
- if (this.tcid && res.data[1].length) {
- let _inviteA = [];
- for (var ik = 0; ik < res.data[1].length; ik++) {
- _inviteA.push({
- cid: res.data[1][ik].classid,
- ic: res.data[1][ik].code,
- });
- }
- for (var ik = 0; ik < _inviteA.length; ik++) {
- if (
- this.arrayToArray(
- _inviteA[ik].cid.split(","),
- this.tcid.split(",")
- ).length
- ) {
- this.inviteCode = _inviteA[ik].ic;
- break;
- }
- }
- }
- this.setPptIframe()
- this.classList = res.data[2]
- if(!this.tcid2 && this.tType == '1' && this.noLogin != 2 && this.noLogin != 3){
- this.$refs.selectTeachingClassDialogRef.open({classList:this.classList})
- }
- this.pageLoading = false;
- })
- .catch(err => {
- console.log(err);
- this.$message.error(this.lang.ssGetCourseDataFail);
- this.pageLoading = false;
- });
- },
- setPptIframe() {
- this.showIframe = false;
- this.$nextTick(() => {
- let api = 'https://beta.ppt.cocorobo.cn'
- if (this.$region == 'beta') {
- api = 'https://beta.ppt.cocorobo.cn'
- } else if (this.$region == 'hk') {
- api = 'https://ppt.cocorobo.hk'
- } else if (this.$region == 'com') {
- api = 'https://ppt.cocorobo.com'
- } else {
- api = 'https://ppt.cocorobo.cn'
- }
- let _url = api + `/?mode=student&courseid=${this.id}&userid=${this.userid}&oid=${this.oid}&org=${this.org}&cid=${this.tcid}&type=${this.tType}`;
- this.iframeSrc = _url;
- this.showIframe = true;
- });
- },
- arrayToArray(arrayo, arrayt) {
- let array1 = arrayo;
- let array2 = arrayt;
- let commonElements = [];
- for (let i = 0; i < array1.length; i++) {
- for (let j = 0; j < array2.length; j++) {
- if (array1[i] === array2[j]) {
- commonElements.push(array1[i]);
- }
- }
- }
- return commonElements;
- },
- async getClassName() {
- let courseGrade = await this.ajax.get(this.$store.state.api + "getClassById", { id: this.tcid2 });
- this.className = courseGrade.data[0][0].grade;
- },
- back() {
- // if (this.tType != 2) {
- // this.goTo(
- // '/courseDetail?userid=' +
- // this.userid +
- // '&oid=' +
- // this.oid +
- // '&org=' +
- // this.org +
- // '&cid=' +
- // this.classId +
- // '&courseId=' +
- // this.id +
- // '&tType=' +
- // this.tType +
- // '&screenType=' +
- // this.screenType
- // )
- // } else {
- this.goTo(
- '/index?userid=' +
- this.userid +
- '&oid=' +
- this.oid +
- '&org=' +
- this.org +
- '&cid=' +
- this.classId +
- '&tType=' +
- this.tType +
- '&screenType=' +
- this.screenType
- )
- // }
- },
- gotoCourseManage(){
- this.doSyncClassData(2);
- },
- afterClass() {
- if (this.recordedForm.status == 1) {
- this.toggleRecording().then((flag) => {
- if (flag) {
- this.$refs.confirmInstructionRef.open({
- title: this.lang.ssPrompt,
- message: this.lang.ssEndClassConfirm,
- cancelText: this.lang.ssCancel,
- submitText: this.lang.ssConfirm,
- submitCallback: () => {
- this.isTimeOutPan = false;
- this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
- this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
- setTimeout(() => {
- this.tcid2 = ""
- this.refreshCourse()
- if(this.screenType != 2){
- this.back()
- }else if(this.screenType == 2){
- this.gotoCourseManage()
- }
- }, 1000)
- },
- cancelCallback: () => {
- this.isTimeOutPan = false;
- console.log("取消")
- }
- })
- // this.$confirm(this.lang.ssEndClassConfirm, this.lang.ssPrompt, {
- // confirmButtonText: this.lang.ssConfirm,
- // cancelButtonText: this.lang.ssCancel,
- // type: 'warning'
- // }).then(() => {
- // this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
- // this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
- // setTimeout(() => {
- // this.tcid2 = ""
- // this.refreshCourse()
- // }, 1000)
- // }).catch(() => { });
- }
- })
- } else {
- // this.$confirm(this.lang.ssEndClassConfirm, this.lang.ssPrompt, {
- // confirmButtonText: this.lang.ssConfirm,
- // cancelButtonText: this.lang.ssCancel,
- // type: 'warning'
- // }).then(() => {
- // this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
- // this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
- // setTimeout(() => {
- // this.tcid2 = ""
- // this.refreshCourse()
- // }, 1000)
- // }).catch(() => { });
- this.$refs.confirmInstructionRef.open({
- title: this.lang.ssPrompt,
- message: this.lang.ssEndClassConfirm,
- cancelText: this.lang.ssCancel,
- submitText: this.lang.ssConfirm,
- submitCallback: () => {
- this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
- this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
- setTimeout(() => {
- this.tcid2 = ""
- this.refreshCourse()
- if(this.screenType != 2){
- this.back()
- }else if(this.screenType == 2){
- this.gotoCourseManage()
- }
- }, 1000)
- },
- cancelCallback: () => {
- console.log("取消")
- }
- })
- }
- },
- afterClass2(){
- this.$refs.confirmInstructionRef.open({
- title: this.lang.ssPrompt,
- message: this.lang.ssConfirmExit,
- cancelText: this.lang.ssCancel,
- submitText: this.lang.ssConfirm,
- submitCallback: () => {
- this.$refs.ppt.contentWindow.PPTistStudent.forceLogout2();
- this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
- },
- cancelCallback: () => {
- console.log("取消")
- }
- })
- },
- onFreeBrowseChange(value) {
- this.freeBrowse = value;
- console.log('自由浏览模式已切换为1:', this.freeBrowse);
- this.$refs.ppt.contentWindow.PPTistStudent.toggleFollowMode()
- },
- onIsCanChange(value) {
- this.isCan = value;
- for(var i = 0; i < this.isResultArray.length; i++){
- let item = this.isResultArray[i];
- if(value && item.isTool){
- item.can = true
- }else if(item.isTool){
- item.can = false
- item.like = false
- }
- }
- this.$refs.ppt.contentWindow.PPTistStudent.setCan(this.isResultArray)
- },
- setOperationTime() {
- let _this = this;
- if (_this.opertimer) {
- clearInterval(_this.opertimer);
- _this.opertimer = null;
- }
- _this.opertimer = setInterval(() => {
- _this.setoTime("600");
- }, 600000);
- },
- async setoTime(time) {
- this.startTime = await this.getServerTime()
- this.doSyncClassData();
- let params = [
- {
- uid: this.userid,
- cid: this.id + (this.tcid2 || ''),
- type: "2",
- time: time,
- },
- ];
- this.ajax
- .post(this.$store.state.api + "addOperationTimeT2", params)
- .then((res) => { })
- .catch((err) => {
- console.error(err);
- });
- },
- getAIJ() {
- this.ajax.get(this.$store.state.api + "getAIJ", "").then(res => {
- let a = res.data[4];
- console.log(a)
- let Array = [];
- a.forEach(i => Array.push(i.oid))
- this.jArray = Array;
- })
- },
- async doSyncClassData(type) {
- let userArray = ['6fbc6471-1d48-11ed-8c78-005056b86db5','333d0dfc-1cd9-11ef-bee5-005056b86db5','6fbce5ef-1d48-11ed-8c78-005056b86db5','66feffcc-ad35-11ed-b13d-005056b86db5']
- if (this.courseDetail.userid == this.userid && (this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840' || userArray.includes(this.userid))) {
- let endTime = await this.getServerTime()
- let courseTime = Math.max(1, Math.ceil((new Date(endTime) - new Date(this.startTime)) / (1000 * 60)))
- this.syncClassData({
- courseId: this.id,
- title: this.courseDetail.title,
- ctitle: this.courseDetail.copyTitle || this.courseDetail.title,
- courseGrade: this.tcid2 ? this.tcid2 : '',
- courseTime: courseTime,
- startTime: this.startTime,
- endTime: endTime,
- }, 'selectUser', ()=>{
- type == 2 ? parent.setCourseUrl() : '';
- })
- console.log('同步数据')
- } else {
- type == 2 ? parent.setCourseUrl() : '';
- }
- },
- // 直接上传录制音频/视频
- uploadVoiceBtn() {
- const input = document.createElement('input');
- input.type = 'file';
- input.accept = '.m4a,.mp4,.mov,.mp3,.wav';
- input.click();
- input.onchange = (e) => {
- const fileList = e.target.files;
- const file = fileList[0]
- this.recordingStartTime = new Date(window.recordingStartTime ? window.recordingStartTime : new Date()).toLocaleString("zh-CN", {
- hour12: false,
- timeZone: "Asia/Shanghai"
- }).replace(/\//g, "-");
- this.recordingEndTime = new Date(window.recordingEndTime ? window.recordingEndTime : new Date()).toLocaleString("zh-CN", {
- hour12: false,
- timeZone: "Asia/Shanghai"
- }).replace(/\//g, "-");
- this.addPPTClass(file)
- // 判断文件类型并获取音频或视频时长
- // if (file && (file.type.startsWith('audio/') || file.type.startsWith('video/'))) {
- // const url = URL.createObjectURL(file);
- // let media;
- // if (file.type.startsWith('audio/')) {
- // media = new Audio();
- // } else {
- // media = document.createElement('video');
- // }
- // media.preload = 'metadata';
- // media.src = url;
- // media.onloadedmetadata = () => {
- // const duration = media.duration;
- // console.log('文件时长(秒):', duration);
- // // 这里可以赋值或者进一步处理时长 duration
- // URL.revokeObjectURL(url);
- // };
- // media.onerror = () => {
- // console.error('无法读取文件时长');
- // URL.revokeObjectURL(url);
- // };
- // }
- }
- },
- // 打开分享弹窗
- openShareDialog() {
- let code = this.userJson.oidCode || this.userJson.orgCode
- this.$refs.shareDialogRef.open(code, this.inviteCode)
- },
- resetIdleOp(){
- if(this.courseDetail.userId == this.userid){
- this.isTimeOutPan = true;
- this.afterClass()
- setTimeout(() => {
- if(this.isTimeOutPan){
- this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
- this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
- setTimeout(() => {
- this.tcid2 = ""
- this.refreshCourse()
- }, 1000)
- }
- }, 5000);
- }
- // console.log('resetIdleOp','重置空闲定时器')
- },
- openDataBoard(){
- if (this.dataBoardDebounce) clearTimeout(this.dataBoardDebounce);
- this.dataBoardDebounce = setTimeout(async () => {
- let sec = Math.ceil((new Date(await this.getServerTime()) - new Date(this.startTime)) / (1000 * 60))
- this.setoTime(sec);
- this.setOperationTime()
- this.$refs.dataBoardRef.open(this.tcid2)
- }, 500);
- }
- },
- destroyed() {
- clearInterval(this.opertimer);
- this.opertimer = null;
- clearTimeout(this.timeoutPan);
- this.timeoutPan = null;
- clearTimeout(this.dataBoardDebounce);
- this.dataBoardDebounce = null;
- this.doSyncClassData();
- this.stopIdleDetection(this.resetIdleOp);
- },
- async mounted() {
- this.setoTime("1");
- this.startTime = await this.getServerTime()
- console.log('this.startTime', this.startTime)
- this.timeoutPan = setTimeout(() => {
- this.startIdleDetection(this.resetIdleOp);
- }, 40 * 60 * 1000)
- // this.startIdleDetection(this.resetIdleOp);
- this.getClassName()
- this.getAIJ();
- this.getCourseDetail();
- this.setOperationTime();
- window.onFreeBrowseChange = (value) => {
- this.freeBrowse = value;
- console.log('自由浏览模式已切换为:', this.freeBrowse);
- }
- window.setIsResultArray = (value) => {
- this.isResultArray = value;
- // 判断数组中isTool为true的项的can是否都为true
- const toolItems = value.filter(item => item.isTool);
- if (toolItems.length > 0) {
- const allCanTrue = toolItems.every(item => item.can === true);
- const allCanFalse = toolItems.every(item => item.can === false);
- if (allCanTrue) {
- this.isCan = true;
- } else if (allCanFalse) {
- this.isCan = false;
- }
- }
- }
- if (!this.userJson || !this.userJson.accountNumber) {
- let res = await this.ajax.get(this.$store.state.api + "selectUser2", {
- userid: this.$route.query.userid
- });
- this.userJson = res.data[0][0]
- }
- setTimeout(() => {
- this.doSyncClassData();
- }, 1000);
- }
- };
- </script>
- <style scoped>
- .pptEasyClass {
- width: 100vw;
- height: 100vh;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- box-sizing: border-box;
- background-color: #f2f2f2;
- min-height: unset;
- }
- .pec_main {
- width: 100%;
- height: 100%;
- background-color: #fff;
- }
- .pec_header {
- width: 100%;
- height: 60px;
- background: #FCCF00;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: space-between;
- position: relative;
- box-shadow: 0px 4px 12px 0px #3648601F;
- padding: 0 10px;
- box-sizing: border-box;
- }
- .pec_h_left {
- width: auto;
- height: 100%;
- display: flex;
- align-items: center;
- gap: 25px;
- /* 保持左侧靠左 */
- }
- .pec_h_center {
- position: absolute;
- left: 50%;
- top: 0;
- height: 100%;
- display: flex;
- align-items: center;
- transform: translateX(-50%);
- z-index: 1;
- }
- .pec_h_l_title {
- font-weight: bold;
- font-size: 20px;
- color: #0e1e33;
- overflow: hidden;
- white-space: nowrap;
- max-width: 500px;
- text-overflow: ellipsis;
- }
- .pec_h_right {
- width: auto;
- height: 100%;
- display: flex;
- align-items: center;
- }
- .pec_h_r_btnArea {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .pec_h_r_btnArea>div {
- width: auto;
- height: auto;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 10px 20px;
- background-color: #f0f4fa;
- border-radius: 4px;
- cursor: pointer;
- font-size: 14px;
- font-weight: 400;
- color: #000;
- border: 1px solid #cad1dc;
- }
- .pec_h_r_btnArea>div+div {
- margin-left: 10px;
- }
- .pec_h_r_btnArea>div>img {
- width: 15px;
- height: 15px;
- margin-right: 5px;
- }
- .pec_h_center>.pec_h_r_btn_refresh {
- color: #fff;
- /* background-color: #0061ff;
- border-color: #0061ff; */
- padding: 9px 10px;
- margin-right: 15px;
- border-radius: 26px;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 5px;
- background: #FFF7F5;
- color: #000000;
- font-weight: 400;
- cursor: pointer;
- fill: #666666;
- }
- .pec_h_center>.pec_h_r_btn_refresh>svg {
- width: 1rem;
- height: 1rem;
- }
- .pec_h_center>.pec_h_r_btn_refresh.recording {
- /* background-color: #F53F3F;
- border-color: #F53F3F; */
- background: #FFF7E8;
- fill: #FF9300;
- animation: pulse 1.5s infinite;
- }
- @keyframes pulse {
- 0% {
- box-shadow: 0 0 0 0 rgba(245, 63, 63, 0.4);
- }
- 70% {
- box-shadow: 0 0 0 10px rgba(245, 63, 63, 0);
- }
- 100% {
- box-shadow: 0 0 0 0 rgba(245, 63, 63, 0);
- }
- }
- .pec_h_r_btnArea>.pec_h_r_btn_afterClass {
- border-color: #F0E1DD;
- background-color: #FFF7F5;
- color: #F53F3F;
- }
- .pec_h_r_btnArea>.pec_h_r_btn_analyze {
- border-color: #C5D4EC;
- background-color: #E8F0FE;
- color: #3370FF;
- }
- .pec_h_r_btn_uploadVoiceBtn {
- border-color: #F0E1DD;
- background-color: #FFF7F5;
- color: #000;
- }
- .backBtn {
- width: 15px;
- height: 15px;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- }
- .backBtn img {
- width: 100%;
- height: 100%;
- }
- .shareBtn {
- width: 25px;
- height: 25px;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- }
- .shareBtn img {
- width: 100%;
- height: 100%;
- }
- .class-info-group {
- display: flex;
- align-items: center;
- gap: 10px;
- }
- .class-label {
- font-size: 18px;
- font-weight: bold;
- color: #222;
- margin-right: 5px;
- }
- .class-value {
- font-size: 16px;
- color: #222;
- background: #FFFFFF3D;
- border: 1px solid #00000080;
- border-radius: 5px;
- padding: 5px 18px;
- min-width: 60px;
- text-align: center;
- display: inline-block;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- }
- .class-value2 {
- cursor: pointer;
- background: #fff;
- }
- .class-value > svg{
- width: 13px;
- height: 13px;
- margin-left: 8px;
- }
- .pec_content {
- width: 100%;
- height: calc(100% - 60px);
- border-radius: 0 0 12px 12px;
- background-color: #fff;
- }
- .free-browse-switch {
- display: flex;
- align-items: center;
- padding: 9px 10px;
- background: #FFF7F5;
- border-radius: 26px;
- margin-left: 15px;
- gap: 5px;
- }
- .switch-label {
- /* background: linear-gradient(to right, #F53F3F, #FCCF00); */
- /* -webkit-background-clip: text; */
- color: #000;
- }
- .refresh_icon {
- width: 35px;
- height: 35px;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #fff7f5;
- border-radius: 45%;
- cursor: pointer;
- margin-right: 15px;
- padding: 0 3px;
- }
- .refresh_icon img {
- width: 16px;
- height: 16px;
- }
- .name_box {
- background: unset !important;
- border: none !important;
- cursor: unset !important;
- }
- .observe-dialog>>>.el-dialog__header {
- padding: 0;
- }
- .observe-dialog>>>.el-dialog__body {
- padding: 0;
- }
- .observe-dialog>>>.el-dialog__headerbtn {
- top: 22px;
- right: 20px;
- z-index: 100;
- }
- </style>
|