Browse Source

课堂助手

SanHQin 4 months ago
parent
commit
5f00c672f9

+ 158 - 30
src/components/classRoomHelper/component/countdown.vue

@@ -7,7 +7,7 @@
             <div
             <div
               class="c_t_i_card"
               class="c_t_i_card"
               v-if="!showCountDownInput1"
               v-if="!showCountDownInput1"
-              @click.stop="changeShowInput1(true)"
+              @click="changeShowInput1(true)"
             >
             >
               <div>
               <div>
                 <span class="c_t_i_btnTop" v-if="!isCountdown"
                 <span class="c_t_i_btnTop" v-if="!isCountdown"
@@ -54,7 +54,7 @@
             <div
             <div
               class="c_t_i_card"
               class="c_t_i_card"
               v-if="!showCountDownInput2"
               v-if="!showCountDownInput2"
-              @click.stop="changeShowInput2(true)"
+              @click="changeShowInput2(true)"
             >
             >
               <div>
               <div>
                 <span class="c_t_i_btnTop" v-if="!isCountdown"
                 <span class="c_t_i_btnTop" v-if="!isCountdown"
@@ -125,14 +125,14 @@
             <span>快捷设置</span>
             <span>快捷设置</span>
           </div>
           </div>
           <div class="c_ct_box">
           <div class="c_ct_box">
-            <span @click.stop="setCountdownTime(30)">30秒</span>
-            <span @click.stop="setCountdownTime(60)">1分钟</span>
-            <span @click.stop="setCountdownTime(120)">2分钟</span>
-            <span @click.stop="setCountdownTime(180)">3分钟</span>
-            <span @click.stop="setCountdownTime(300)">5分钟</span>
-            <span @click.stop="setCountdownTime(360)">6分钟</span>
-            <span @click.stop="setCountdownTime(480)">8分钟</span>
-            <span @click.stop="setCountdownTime(600)">10分钟</span>
+            <span @click="setCountdownTime(30)">30秒</span>
+            <span @click="setCountdownTime(60)">1分钟</span>
+            <span @click="setCountdownTime(120)">2分钟</span>
+            <span @click="setCountdownTime(180)">3分钟</span>
+            <span @click="setCountdownTime(300)">5分钟</span>
+            <span @click="setCountdownTime(360)">6分钟</span>
+            <span @click="setCountdownTime(480)">8分钟</span>
+            <span @click="setCountdownTime(600)">10分钟</span>
           </div>
           </div>
         </div>
         </div>
 
 
@@ -141,12 +141,12 @@
             <span>行为标签</span>
             <span>行为标签</span>
             <div class="c_t_btnArea">
             <div class="c_t_btnArea">
               <span
               <span
-                @click.stop="changeBehaviorTagType(0)"
+                @click="changeBehaviorTagType(0)"
                 :class="[behaviorTagType == 0 ? 'c_t_ba_active' : '']"
                 :class="[behaviorTagType == 0 ? 'c_t_ba_active' : '']"
                 >常用</span
                 >常用</span
               >
               >
               <span
               <span
-                @click.stop="changeBehaviorTagType(1)"
+                @click="changeBehaviorTagType(1)"
                 :class="[behaviorTagType == 1 ? 'c_t_ba_active' : '']"
                 :class="[behaviorTagType == 1 ? 'c_t_ba_active' : '']"
                 >更多</span
                 >更多</span
               >
               >
@@ -180,7 +180,7 @@
               v-if="behaviorTagType == 1"
               v-if="behaviorTagType == 1"
               :class="[choiceBehavior.includes(item) ? 'c_bt_b_active' : '']"
               :class="[choiceBehavior.includes(item) ? 'c_bt_b_active' : '']"
               v-for="(item, index) in behaviorTagMore"
               v-for="(item, index) in behaviorTagMore"
-              @click.stop="choiceBehaviorTag(item)"
+              @click="choiceBehaviorTag(item)"
               :key="behaviorTagType + '-' + index"
               :key="behaviorTagType + '-' + index"
               >{{ item }}</span
               >{{ item }}</span
             >
             >
@@ -188,7 +188,7 @@
               v-if="behaviorTagType == 0"
               v-if="behaviorTagType == 0"
               :class="[choiceBehavior.includes(item) ? 'c_bt_b_active' : '']"
               :class="[choiceBehavior.includes(item) ? 'c_bt_b_active' : '']"
               v-for="(item, index) in behaviorTagCommon"
               v-for="(item, index) in behaviorTagCommon"
-              @click.stop="choiceBehaviorTag(item)"
+              @click="choiceBehaviorTag(item)"
               :key="behaviorTagType + '-' + index"
               :key="behaviorTagType + '-' + index"
               >{{ item }}</span
               >{{ item }}</span
             >
             >
@@ -196,7 +196,40 @@
         </div>
         </div>
 
 
         <div class="c_btnArea">
         <div class="c_btnArea">
-          <span @click.stop="music()">
+          <span>
+            <div class="c_b_musicListArea">
+              <el-tooltip
+                effect="light"
+								placement="top"
+                :content="showSourceList ? '隐藏音乐列表' : '显示音乐列表'"
+              >
+                <span @click.stop="()=>showSourceList = !showSourceList">
+                  <svg
+                    :style="
+                      `transform: rotate(${showSourceList ? '0deg' : '180deg'})`
+                    "
+                    t="1728975847364"
+                    class="icon"
+                    viewBox="0 0 1024 1024"
+                    version="1.1"
+                    xmlns="http://www.w3.org/2000/svg"
+                    p-id="4250"
+                    width="200"
+                    height="200"
+                  >
+                    <path
+                      d="M814.795 320.301c9.571 0 12.392 6.018 6.264 13.372l-297.761 357.392c-6.128 7.355-16.154 7.355-22.281 0l-297.761-357.392c-6.128-7.355-3.309-13.372 6.264-13.372l605.275 0z"
+                      p-id="4251"
+                    ></path>
+                  </svg>
+                </span>
+              </el-tooltip>
+              <div v-if="showSourceList" v-click-outside="()=>showSourceList = false">
+								<div :class="[sourceUrl==item.url?'c_b_musicListArea_active':'']" v-for="(item,index) in sourceUrlList" :key="index" @click="changeSourceUrl(item.url)">
+									<span>{{item.name}}</span>
+								</div>
+							</div>
+            </div>
             <el-tooltip
             <el-tooltip
               class="item"
               class="item"
               effect="light"
               effect="light"
@@ -208,6 +241,7 @@
                 height="24"
                 height="24"
                 viewBox="0 0 24 24"
                 viewBox="0 0 24 24"
                 fill="none"
                 fill="none"
+                @click="music()"
                 xmlns="http://www.w3.org/2000/svg"
                 xmlns="http://www.w3.org/2000/svg"
               >
               >
                 <path
                 <path
@@ -242,7 +276,7 @@
               ]"
               ]"
               v-if="type == 0"
               v-if="type == 0"
               style=""
               style=""
-              @click.stop="countdownTimeFn()"
+              @click="countdownTimeFn()"
             >
             >
               <svg
               <svg
                 v-if="!isCountdown"
                 v-if="!isCountdown"
@@ -280,7 +314,7 @@
             <div
             <div
               :class="[!isKeepTime ? 'c_ba_startType' : 'c_ba_startType2']"
               :class="[!isKeepTime ? 'c_ba_startType' : 'c_ba_startType2']"
               v-if="type == 1"
               v-if="type == 1"
-              @click.stop="keepTimeFn()"
+              @click="keepTimeFn()"
             >
             >
               <svg
               <svg
                 v-if="!isKeepTime"
                 v-if="!isKeepTime"
@@ -313,10 +347,9 @@
                   p-id="4267"
                   p-id="4267"
                 ></path>
                 ></path>
               </svg>
               </svg>
-              <!-- <svg v-else t="1721117616634" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13970" width="64" height="64"><path d="M128 128m53.333333 0l661.333334 0q53.333333 0 53.333333 53.333333l0 661.333334q0 53.333333-53.333333 53.333333l-661.333334 0q-53.333333 0-53.333333-53.333333l0-661.333334q0-53.333333 53.333333-53.333333Z" p-id="13971"></path></svg> -->
             </div>
             </div>
           </div>
           </div>
-          <span @click.stop="reset()">
+          <span @click="reset()">
             <el-tooltip
             <el-tooltip
               class="item"
               class="item"
               effect="light"
               effect="light"
@@ -349,7 +382,7 @@
         </div>
         </div>
 
 
         <div class="ActivityMemo">
         <div class="ActivityMemo">
-          <span @click.stop="changeShowType(1)">
+          <span @click="changeShowType(1)">
             教学活动备忘
             教学活动备忘
             <svg
             <svg
               width="16"
               width="16"
@@ -376,7 +409,7 @@
       </div>
       </div>
 
 
       <div class="c_changeType">
       <div class="c_changeType">
-        <div class="c_ct_btn" @click.stop="changeType(0)">
+        <div class="c_ct_btn" @click="changeType(0)">
           <div>倒计时</div>
           <div>倒计时</div>
           <span v-if="type == 0"></span>
           <span v-if="type == 0"></span>
           <svg
           <svg
@@ -411,7 +444,7 @@
 
 
         <span></span>
         <span></span>
 
 
-        <div class="c_ct_btn" @click.stop="changeType(1)">
+        <div class="c_ct_btn" @click="changeType(1)">
           <div>计时器</div>
           <div>计时器</div>
           <span v-if="type == 1"></span>
           <span v-if="type == 1"></span>
           <svg
           <svg
@@ -465,7 +498,7 @@
 
 
     <div class="c_behavior" v-if="showType == 1">
     <div class="c_behavior" v-if="showType == 1">
       <div class="behaviorBack">
       <div class="behaviorBack">
-        <span @click.stop="changeShowType(0)">
+        <span @click="changeShowType(0)">
           <svg
           <svg
             width="16"
             width="16"
             height="16"
             height="16"
@@ -493,19 +526,19 @@
           <el-button
           <el-button
             :type="showBtnType == 0 ? 'primary' : ''"
             :type="showBtnType == 0 ? 'primary' : ''"
             size="small"
             size="small"
-            @click.stop="showBtnType = 0"
+            @click="showBtnType = 0"
             >所有事件</el-button
             >所有事件</el-button
           >
           >
           <el-button
           <el-button
             :type="showBtnType == 1 ? 'primary' : ''"
             :type="showBtnType == 1 ? 'primary' : ''"
             size="small"
             size="small"
-            @click.stop="showBtnType = 1"
+            @click="showBtnType = 1"
             >计时事件</el-button
             >计时事件</el-button
           >
           >
         </el-button-group>
         </el-button-group>
 
 
         <span
         <span
-          @click.stop="derive(showMemorandumList)"
+          @click="derive(showMemorandumList)"
           v-loading="exportLoading"
           v-loading="exportLoading"
         >
         >
           <el-tooltip class="item" effect="dark" content="导出" placement="top">
           <el-tooltip class="item" effect="dark" content="导出" placement="top">
@@ -621,6 +654,34 @@ export default {
         "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%80%92%E8%AE%A1%E6%97%B6%E9%9F%B3%E4%B9%901721355956636.mp3",
         "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%80%92%E8%AE%A1%E6%97%B6%E9%9F%B3%E4%B9%901721355956636.mp3",
       endSourceUrl:
       endSourceUrl:
         "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%80%92%E6%95%B010%E7%A7%92%E5%8F%A0%E5%8A%A0%E9%9F%B3%E6%95%881721638403882.MP3",
         "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%80%92%E6%95%B010%E7%A7%92%E5%8F%A0%E5%8A%A0%E9%9F%B3%E6%95%881721638403882.MP3",
+      sourceUrlList: [
+        {
+          name: "音乐1",
+          url:
+            "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%80%92%E8%AE%A1%E6%97%B6%E9%9F%B3%E4%B9%901721355956636.mp3"
+        },
+        {
+          name: "音乐2",
+          url:
+            "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E9%9F%B3%E4%B9%9021728975233277.mp3"
+        },
+        {
+          name: "音乐3",
+          url:
+            "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E9%9F%B3%E4%B9%9031728975268412.mp3"
+        },
+        {
+          name: "音乐4",
+          url:
+            "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E9%9F%B3%E4%B9%9041728975432067.mp3"
+        },
+        {
+          name: "音乐5",
+          url:
+            "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E9%9F%B3%E4%B9%9051728975447857.mp3"
+        }
+      ],
+      showSourceList: false,
       sourceActive: false,
       sourceActive: false,
       type: 0, //0:倒计时   1:计时器
       type: 0, //0:倒计时   1:计时器
       isCountdown: false,
       isCountdown: false,
@@ -956,13 +1017,13 @@ export default {
         //设置每一列的宽度
         //设置每一列的宽度
         { wch: 25 },
         { wch: 25 },
         { wch: 50 },
         { wch: 50 },
-        { wch: 25 },
+        { wch: 25 }
       ];
       ];
       XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
       XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
       XLSX.writeFile(workbook, "事件.xlsx");
       XLSX.writeFile(workbook, "事件.xlsx");
 
 
       this.exportLoading = false;
       this.exportLoading = false;
-			this.$message.success("导出成功")
+      this.$message.success("导出成功");
     },
     },
     lookWork(data) {
     lookWork(data) {
       const taskTypes = {
       const taskTypes = {
@@ -1634,10 +1695,22 @@ ${_textData}
 
 
       return {
       return {
         h: hours != 0 ? formatTimeUnit(hours) : null,
         h: hours != 0 ? formatTimeUnit(hours) : null,
-        m: minutes != 0 ? formatTimeUnit(minutes) : hours > 0 ? formatTimeUnit(minutes):null,
+        m:
+          minutes != 0
+            ? formatTimeUnit(minutes)
+            : hours > 0
+            ? formatTimeUnit(minutes)
+            : null,
         s: formatTimeUnit(seconds)
         s: formatTimeUnit(seconds)
       };
       };
-    }
+    },
+		changeSourceUrl(url){
+			if(this.isCountdown || this.isKeepTime)return this.$message.error("请先停止计时再设置");
+			if(this.sourceUrl == url)return this.showSourceList = false;
+			this.sourceUrl = url;
+
+			this.showSourceList = false;
+		}
   }
   }
 };
 };
 </script>
 </script>
@@ -1978,6 +2051,61 @@ ${_textData}
   /* border-radius: 20px; */
   /* border-radius: 20px; */
   cursor: pointer;
   cursor: pointer;
   transition: 0.2s;
   transition: 0.2s;
+  position: relative;
+}
+
+.c_b_musicListArea {
+  position: absolute;
+  left: -20px;
+  top: 10px;
+  width: 20px;
+  height: 20px;
+}
+
+.c_b_musicListArea > span {
+  width: 20px;
+  height: 20px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  cursor: pointer;
+}
+
+.c_b_musicListArea > div {
+  width: 150px;
+  height: 200px;
+  position: absolute;
+  bottom: 40px;
+  left: -20px;
+  cursor: default;
+  border-radius: 5px;
+	box-sizing: border-box;
+	padding: 5px;
+	overflow: auto;
+	background-color: #fff;
+	box-shadow: 0px 0px 5px 2px #1d398314;
+}
+
+.c_b_musicListArea>div>div{
+	width: 100%;
+	height: 30px;
+	border-radius: 5px;
+	display: flex;
+	align-items: center;
+	box-sizing: border-box;
+	padding-left: 10px;
+	cursor: pointer;
+	transition: 0.2s;
+	margin-bottom: 5px;
+}
+
+.c_b_musicListArea>div>div:hover{
+	background-color: #f0f2f5;
+}
+
+.c_b_musicListArea_active{
+	background-color: #409eff !important;
+	color: #fff;
 }
 }
 
 
 .c_btnArea > span > svg {
 .c_btnArea > span > svg {

+ 21 - 5
src/components/classRoomHelper/component/levitatedSphere.vue

@@ -52,6 +52,13 @@
       ref="iiframe2"
       ref="iiframe2"
       v-show="false"
       v-show="false"
     ></iframe>
     ></iframe>
+
+		<mini-audio
+      v-show="false"
+      ref="audioRef"
+      :loop="false"
+      :audio-source="wozaiAudioUrl"
+    ></mini-audio>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -73,7 +80,9 @@ export default {
       chatLoading: false,
       chatLoading: false,
       talkLoading: false,
       talkLoading: false,
       source: null,
       source: null,
-      talkTextList: []
+      talkTextList: [],
+			wozaiAudioUrl:"https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E4%B8%AD%E6%96%87%E7%89%88%E6%88%91%E5%9C%A81728961654002.wav",
+			wozaiAudioEnglishUrl:"https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E8%8B%B1%E6%96%87%E7%89%88what%27sup1728961667376.wav",
     };
     };
   },
   },
   computed: {
   computed: {
@@ -123,8 +132,10 @@ export default {
         "languageOptions"
         "languageOptions"
       ).selectedIndex = 2; //普通话
       ).selectedIndex = 2; //普通话
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
-			this.talkTextList.push("我在");
-			this.talkText();
+			//this.talkTextList.push("我在");
+			//this.talkText();
+			// console.log("打开")
+			this.$refs.audioRef.play();
 			// return;
 			// return;
       // this.$message.success("已开启语音助手,请说“可可同学”来唤醒");
       // this.$message.success("已开启语音助手,请说“可可同学”来唤醒");
       this.$parent.changeRecordType(1);
       this.$parent.changeRecordType(1);
@@ -136,7 +147,6 @@ export default {
 			this.chatLoading = false;
 			this.chatLoading = false;
 			this.talkLoading == false;
 			this.talkLoading == false;
       this.show = true;
       this.show = true;
-      console.log("已唤醒");
       iiframe.contentWindow.onRecognizedResult = e => {
       iiframe.contentWindow.onRecognizedResult = e => {
         let _msg = converter(e.privText);
         let _msg = converter(e.privText);
         // let _msg2 = e.privText;
         // let _msg2 = e.privText;
@@ -219,12 +229,18 @@ export default {
                 }, 3000);
                 }, 3000);
                 // }, 2000);
                 // }, 2000);
               } else {
               } else {
+								let msgList = [];
+
+								msgList.push({
+									type:"text",
+									text: `请在150字以内回答以下问题:\n${this.userText}`
+								})
                 this.chatLoading = true;
                 this.chatLoading = true;
                 const _uuid = uuidv4();
                 const _uuid = uuidv4();
                 let params = {
                 let params = {
                   assistant_id: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
                   assistant_id: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
                   userId: this.userId,
                   userId: this.userId,
-                  message: this.userText,
+                  message: msgList,
                   session_name: _uuid + "-qgt",
                   session_name: _uuid + "-qgt",
                   uid: _uuid,
                   uid: _uuid,
                   file_ids: [],
                   file_ids: [],

+ 5 - 1
src/components/classRoomHelper/component/searchArea.vue

@@ -3733,7 +3733,7 @@ ${_wordData}
   padding: 10px;
   padding: 10px;
   background-color: #f6f8ff;
   background-color: #f6f8ff;
   border-radius: 2px 8px 8px 8px;
   border-radius: 2px 8px 8px 8px;
-  white-space: pre-line;
+  /* white-space: pre-line; */
   word-break: break-all;
   word-break: break-all;
 }
 }
 
 
@@ -3741,6 +3741,10 @@ ${_wordData}
   margin-left: 20px;
   margin-left: 20px;
 }
 }
 
 
+.s_t_c_a_r_content >>> li{
+	margin: 1.5em 0;
+}
+
 /* .s_t_c_a_r_content>>> ol{
 /* .s_t_c_a_r_content>>> ol{
 	margin-left: 20px;
 	margin-left: 20px;
 } */
 } */