Quellcode durchsuchen

Merge branch 'beta'

lsc vor 4 Tagen
Ursprung
Commit
dd5b4868d5

+ 9 - 3
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.310198bcc8eb9ebf23d01e2de59e6a83.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.35ef00868b2326a28783.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.1db91885f9c15d2c94fdedde5008c927.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.bc838ed2f3f2ce5f0099.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {
@@ -62,12 +62,18 @@
     try{
       if(window.parent.U){
         topU = window.parent
-      }
+      }else if(window.parent.parent.U){
+        topU =  window.parent.parent
+      }else if(window.top.U){
+        topU = window.top
+      } 
     }catch(e){
       try {
         if(window.parent.parent.U){
           topU =  window.parent.parent
-        }
+        }else if(window.top.U){
+          topU = window.top
+        } 
       } catch (error) {
         if(window.top.U){
           topU = window.top

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/css/app.1db91885f9c15d2c94fdedde5008c927.css


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/css/app.1db91885f9c15d2c94fdedde5008c927.css.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.bc838ed2f3f2ce5f0099.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.bc838ed2f3f2ce5f0099.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 8 - 2
index.html

@@ -82,12 +82,18 @@
     try{
       if(window.parent.U){
         topU = window.parent
-      }
+      }else if(window.parent.parent.U){
+        topU =  window.parent.parent
+      }else if(window.top.U){
+        topU = window.top
+      } 
     }catch(e){
       try {
         if(window.parent.parent.U){
           topU =  window.parent.parent
-        }
+        }else if(window.top.U){
+          topU = window.top
+        } 
       } catch (error) {
         if(window.top.U){
           topU = window.top

Datei-Diff unterdrückt, da er zu groß ist
+ 136 - 130
src/components/pages/aiAddCourse/addCourse.vue


Datei-Diff unterdrückt, da er zu groß ist
+ 144 - 132
src/components/pages/aiEasy/addCourse.vue


+ 81 - 10
src/components/pages/classroomObservation/components/baseMessage.vue

@@ -42,7 +42,7 @@
 							@change="changeData()"
 							placeholder="请选择授课时间"
 						>
-						
+
 						</el-date-picker>
 						<i class="el-icon-date" style="position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none;"></i>
 					</div>
@@ -136,7 +136,7 @@
 
 							<div
 								class="m-m-fi-imageItem"
-								@click.stop="addImage()"
+								@click.stop="addImage2()"
 								style="max-width:32%;"
 								v-if="
 									imageList.fileList1 &&
@@ -171,9 +171,9 @@
 						<span></span>
 						<!-- <span>(建议视频比例16:9,最多上传1个)</span> -->
 					</div>
-  
+
 					<div class="m-m-formImage" v-loading="uploadVideoLoading">
-						
+
 								<div
 									class="m-m-fi-imageItem"
 									style="max-width:100%;"
@@ -298,9 +298,9 @@
 					</div>
 				<!-- </div> -->
 			</div>
-				
+
 			</div>
-			
+
 		</div>
 		<!-- <el-button @click="testFFmpeg">testFFmpeg</el-button> -->
 		<previewVideoDialog ref="previewVideoDialogRef" />
@@ -348,7 +348,7 @@ const getFile = (url) => {
           resolve({ data: 1 });
         }else {
           resolve({ data: data.Body });
-          console.log(data); 
+          console.log(data);
         }          // sxuccessful response
 
       });
@@ -526,6 +526,77 @@ export default {
 			// this.mainBtnStatus = 1;
 			// this.barNum = 4;
 		},
+    addImage2(){
+      if(!this.tid)return this.$message.error("请选择课堂")
+			// 上传录音
+			let input = document.createElement("input");
+			input.type = "file";
+			input.accept = "image/*";
+			input.multiple = true;
+			input.click();
+
+
+			input.onchange = () => {
+				this.uploadImageLoading = true;
+        let promise =[];
+        for(let i=0;i<input.files.length;i++){
+          promise.push(this.uploadFile(input.files[i]));
+        }
+        Promise.all(promise).then(res=>{
+          this.$emit("saveImage2",res);
+          this.uploadImageLoading = false;
+        })
+			};
+    },
+    uploadFile(file){
+      return new Promise(resolve=>{
+        var credentials = {
+					accessKeyId: "AKIATLPEDU37QV5CHLMH",
+					secretAccessKey: "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",
+				}; //秘钥形式的登录上传
+				window.AWS.config.update(credentials);
+				window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+				var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+				var _this = this;
+        if (file) {
+					var params = {
+						Key:
+							file.name.split(".")[0] +
+							new Date().getTime() +
+							"." +
+							file.name.split(".")[file.name.split(".").length - 1],
+						ContentType: file.type,
+						Body: file,
+						"Access-Control-Allow-Credentials": "*",
+						ACL: "public-read",
+					}; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+					var options = {
+						partSize: 2048 * 1024 * 1024,
+						queueSize: 2,
+						leavePartsOnError: true,
+					};
+					bucket
+						.upload(params, options)
+						.on("httpUploadProgress", function (evt) {
+							//这里可以写进度条
+							// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+						})
+						.send(function (err, data) {
+							if (err) {
+								resolve(0)
+							} else {
+                resolve({
+									name: data.key,
+									status: "success",
+									uid: "1",
+									url: data.Location,
+								})
+							}
+						});
+				}
+      })
+    },
 		// 添加视频
 		addVideo(){
 			if(!this.tid)return this.$message.error("请选择课堂")
@@ -579,7 +650,7 @@ export default {
 			// 			queueSize: 2,
 			// 			leavePartsOnError: true,
 			// 		};
-					
+
 			// 		bucket
 			// 			.upload(params, options)
 			// 			.on("httpUploadProgress", function (evt) {
@@ -717,9 +788,9 @@ Instruction: Based on the context, follow "Format example", write content.
 	{"value":4,"name":"饱和溶液","textStyle":{"color":"#e3adb9"}}
 ]
 
-## 课堂实录 
+## 课堂实录
 ${this.data.editorBarData?this.data.editorBarData.content:""}
-`;			
+`;
 				const _uuid = uuidv4();
 				let params = {
 					// model: "gpt-3.5-turbo",

+ 18 - 0
src/components/pages/classroomObservation/components/messageArea.vue

@@ -32,6 +32,7 @@
         :tid="tid"
         @saveData="saveBaseData"
         @saveImage="saveBaseImage"
+         @saveImage2="saveBaseImage2"
         @saveVideo="saveBaseVideo"
         @saveNephogram="saveBaseNephogram"
         @delImage="delBaseImageList"
@@ -925,6 +926,23 @@ export default {
       this.saveData(this.imageList);
       this.$forceUpdate();
     },
+    saveBaseImage2(newImageList) {
+      for(let i=0;i<newImageList.length;i++){
+        if (this.imageList.jsonData.fileList1.length == 0) {
+          this.imageList.jsonData.fileList1.push(newImageList[i]);
+        } else if (this.imageList.jsonData.fileList2.length == 0) {
+          this.imageList.jsonData.fileList2.push(newImageList[i]);
+        } else if (this.imageList.jsonData.fileList3.length == 0) {
+          this.imageList.jsonData.fileList3.push(newImageList[i]);
+        } else {
+          this.$message.error("最多只能上传3张图片");
+          break;
+        }
+      }
+      this.imageList.json_data = JSON.stringify(this.imageList.jsonData);
+      this.saveData(this.imageList);
+      this.$forceUpdate();
+    },
     saveBaseVideo(newVideo) {
       if (
         (this.imageList.jsonData.videoList &&

+ 33 - 10
src/components/pages/components/appDialog.vue

@@ -245,7 +245,7 @@
                   i => i.type == item2.id
                 )"
                 :key="item.id"
-                 @click="checkApp(item)" :class="{checkActive: appJson.id == item.id}"
+                 @click="checkApp(item)" :class="{checkActive: appJson.id == item.id || selectAppList.map(i=>i.id).includes(item.id)}"
               >
                 <div class="ac_c_i_top">
                   <div class="ac_c_i_t_left">
@@ -451,7 +451,9 @@ export default {
       bannerObj: null,
       userName: null,
       controlsObj: null,
-      region: "cn"
+      region: "cn",
+      type:0,//0 工具  1学习内容添加
+      selectAppList:[],
     };
   },
   watch: {
@@ -484,21 +486,28 @@ export default {
     handleClose(done) {
       done();
     },
-    async openG(appJson, unitIndex, itemTaskIndex, toolIndex) {
-      this.dialogVisible = true;
-      this.appJson = appJson;
-      this.itemTaskIndex = itemTaskIndex;
-      this.toolIndex = toolIndex;
-      this.unitIndex = unitIndex;
+    async openG(appJson, unitIndex, itemTaskIndex, toolIndex,type = 0) {
+      this.selectAppList = [];
+      this.appJson = {};
+      if(type == 0){
+        this.appJson = appJson;
+        this.itemTaskIndex = itemTaskIndex;
+        this.toolIndex = toolIndex;
+        this.unitIndex = unitIndex;
+      }
+      console.log(type)
+      this.type = type;
       const { data } = await this.ajax.get(this.$store.state.api + 'select_oidArea', { oid: this.oid });
       this.region = data[0][0].area;
       this.getAppStoreControl().then(_ => {
         this.getData();
         this.getTypeList();
       });
+      this.dialogVisible = true;
     },
     checkAppJson(){
-      if(!Object.keys(this.appJson).length){
+      if(this.type==0){
+        if(!Object.keys(this.appJson).length){
         this.$message({ type: 'warning', message: '请先选择应用!' });
         return
       }
@@ -510,6 +519,11 @@ export default {
       }
       this.dialogVisible = false
       this.$message.success("添加成功")
+      }else if(this.type==1){
+        this.$emit("success",{data:JSON.parse(JSON.stringify(this.selectAppList)),type:this.type})
+        this.dialogVisible = false
+        this.selectAppList = [];
+      }
     },
     changeType(newIndex) {
       let flag = this.showType === newIndex;
@@ -531,11 +545,20 @@ export default {
       window.open(item.url, "_blank");
     },
     checkApp(item) {
-      if(this.appJson.id == item.id){
+      if(this.type==0){
+        if(this.appJson.id == item.id){
         this.appJson = {}
       }else {
         this.appJson = item
       }
+      }else if(this.type==1){
+        if(this.selectAppList.map(i=>i.id).includes(item.id)){
+         this.selectAppList = this.selectAppList.filter(i => i.id != item.id)
+        }else{
+          this.selectAppList.push(item)
+        }
+      }
+
     },
     getTypeList() {
       let params = {

Datei-Diff unterdrückt, da er zu groß ist
+ 713 - 295
src/components/pages/easy/addCourse.vue


+ 46 - 20
src/components/pages/newCourse/addCourse.vue

@@ -1429,6 +1429,13 @@
                             >
                               资源
                             </button>
+
+                            <button
+                            class="c_pub_button_add pub_btn_add_img"
+                            @click="openAddApp(itemTaskIndex)"
+                          >
+                            Ai应用
+                          </button>
                           </div>
                           <div
                             v-if="
@@ -2351,26 +2358,26 @@
                                     <div class="whiteBIcon" @click.stop="
                                       openTools(itemTaskIndex, 72, toolIndex)
                                       ">
-                                          <img 
+                                          <img
                                           style="object-fit: cover;height: 80px;"
                                             :src="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson ?
                                             unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.json.icon :
                                             require('../../../assets/icon/firstToolList/appStore.png')"
                                           alt />
-                                       
+
                                         <div style="margin: 5px 0" >
-                                            <div 
+                                            <div
                                               v-if="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson"
                                               >
-                                              <el-tooltip class="item" effect="dark" 
-                                                :content="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name" 
+                                              <el-tooltip class="item" effect="dark"
+                                                :content="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name"
                                                 placement="top">
                                                   <div class="Ovh">
                                                     {{unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name}}
                                                   </div>
                                               </el-tooltip>
                                             </div>
-                                          
+
                                             <span v-else>
                                               应用中心
                                             </span>
@@ -5356,7 +5363,7 @@
               >
             </div>
           </div>
-          <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">            
+          <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
             <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
           </div> -->
           <el-checkbox-group
@@ -5461,9 +5468,9 @@
               </el-checkbox-group>
               <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
             </div>
-          
+
         </div>
-     
+
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisibleMember = false">取 消</el-button>
@@ -7396,7 +7403,7 @@
       :englishVoiceJson="englishVoiceJson"
       @setEnglishVoiceJson="setEnglishVoiceJson"
     ></EnglishVoice>
-    <appDialog ref="appDialog"></appDialog>
+    <appDialog ref="appDialog" @success="selectAppSuccess"></appDialog>
   </div>
 </template>
 
@@ -9904,9 +9911,9 @@ export default {
               _check2.push(_id);
             }
           }
-          
+
           if (_check2.length==0 && _check.length==0) {
-            
+
           }else{
             this.checkAll2 = _check2.length === _check.length;
           }
@@ -10817,8 +10824,8 @@ export default {
         _res = JSON.parse(res.chapters);
         this.updateCourseState(parseInt(res.state));
       }
-      if(_this.unitJson.length == 1 
-      && _this.unitJson[0].chapterInfo[0].taskJson.length == 1 
+      if(_this.unitJson.length == 1
+      && _this.unitJson[0].chapterInfo[0].taskJson.length == 1
       && !_this.unitJson[0].chapterInfo[0].taskJson[0].task
       && !_this.unitJson[0].chapterInfo[0].taskJson[0].taskDetail
       && !_this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.length){
@@ -10863,7 +10870,7 @@ export default {
           return;
         });
       }
-      
+
     },
     checkTemplate(res) {
       let _this = this;
@@ -11478,7 +11485,7 @@ export default {
                 ].toolChoose[toolIndex].englishVoiceJson
               )
             )
-          : { 
+          : {
             title:'',
             detail:'',
             array:[]
@@ -11510,13 +11517,13 @@ export default {
               ].toolChoose[toolIndex].appJson
             )
           )
-          : { 
+          : {
             url:'',
            };
         this.$forceUpdate();
         this.$refs.appDialog.openG(appJson,this.unitIndex,itemTaskIndex,toolIndex);
       }
-      if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72 
+      if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
           && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
             this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
       }
@@ -11800,7 +11807,7 @@ export default {
         ].toolChoose[toolIndex].tool.push(i);
       }
 
-      if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72 
+      if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
           && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
             this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
       }
@@ -14472,6 +14479,25 @@ export default {
           console.error(err);
         });
     },
+    openAddApp(i) {
+      this.lineCount = i;
+      this.$refs.appDialog.openG("", "", "", "", 1);
+    },
+    selectAppSuccess({ data, type }) {
+      console.log(data);
+      data.forEach(i => {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.lineCount
+        ].chapterData.push({
+          name: i.name,
+          title: i.name,
+          url: i.url,
+          type: 8
+        });
+        this.imgChange1(null, null, 8, this.lineCount);
+      });
+      this.dialogVisible7 = false;
+    }
   },
   beforeDestroy() {
     clearTimeout(this.timer);
@@ -18647,6 +18673,6 @@ ol {
   display: -webkit-box;
   -webkit-box-orient: vertical;
   overflow: hidden;
-  text-overflow: ellipsis;           
+  text-overflow: ellipsis;
 }
 </style>

+ 3 - 2
src/components/pages/studentManage/grade/index.vue

@@ -267,8 +267,8 @@
         <div class="people_top">
           <div class="people_top_right">
             <div class="people_search">
-              <el-input placeholder="搜索班级名称" v-model="searchTN" @keyup.enter.native="getClassStudent"></el-input>
-              <div class="search_img" @click="getClassStudent">
+              <el-input placeholder="搜索班级名称" v-model="searchTN" @keyup.enter.native="handleCurrentChange3(1)"></el-input>
+              <div class="search_img" @click="handleCurrentChange3(1)">
                 <img src="../../../../assets/icon/search.png" alt />
               </div>
             </div>
@@ -562,6 +562,7 @@ export default {
       // this.getClass2();
       this.dialogVisibleMember = true;
       this.searchTN = "";
+      this.page3 = 1
       this.getClassStudent();
     },
     //新增学生

+ 2 - 2
src/components/pages/sz/teacher.vue

@@ -78,7 +78,7 @@
           <el-table-column label="姓名" min-width="10" align="center">
             <template slot-scope="scope">
               <div class="userImg">
-                <div class="tx">
+                <!-- <div class="tx">
                   <img
                     :src="
                       scope.row.headportrait != null
@@ -87,7 +87,7 @@
                     "
                     alt
                   />
-                </div>
+                </div> -->
                 <div
                   style="
                     width: 150px;

+ 1 - 1
src/components/pages/testPerson/examine/index.vue

@@ -148,7 +148,7 @@
                   <div>
                     <div v-if="!k.testid.test.length">/</div>
                     <div v-else style="padding-top: 10px;">
-                      <!-- {{ reverseString(k.testid.test) }} -->
+                      <!-- {{ k.testid.test }} -->
                       <div
                         v-for="(item2, index) in k.testid.test"
                         :key="item2.courseId"

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.