Bladeren bron

提交作业

11wqe1 3 maanden geleden
bovenliggende
commit
c26d845a66

+ 10 - 6
src/components/components/appStoreC.vue

@@ -33,40 +33,44 @@
         data() {
         data() {
             return {
             return {
                 urlData:"",
                 urlData:"",
-                userId: this.$route.query.userid,
+                userId: '',
                 appDialogVisible: false,
                 appDialogVisible: false,
-                id: this.$route.query.courseId
+                id: this.$route.query.courseId,
             }
             }
         },
         },
         methods: {
         methods: {
-            getData(val){
+            getData(val,uid){
                 this.urlData = val
                 this.urlData = val
+                this.userId = uid
                 this.appDialogVisible = true
                 this.appDialogVisible = true
             },
             },
             handleClose() {
             handleClose() {
                 this.urlData = ''
                 this.urlData = ''
+                this.userId = ''
                 this.appDialogVisible = false
                 this.appDialogVisible = false
             },
             },
             uploadWork(){
             uploadWork(){
                 // console.log('window.exposed_outputs',window.exposed_outputs);
                 // console.log('window.exposed_outputs',window.exposed_outputs);
                 let _iframe = this.$refs.appStore;
                 let _iframe = this.$refs.appStore;
+                console.log('sStudent',this.userId);
                 
                 
                 // window.exposed_outputs
                 // window.exposed_outputs
                 let Cow = JSON.stringify(_iframe.contentWindow.exposed_outputs)
                 let Cow = JSON.stringify(_iframe.contentWindow.exposed_outputs)
 
 
                 let params = [
                 let params = [
                     {
                     {
-                    uid: this.sStudent.userid,
+                    uid: this.userId,
                     cid: this.id,
                     cid: this.id,
                     stage: this.courseType,
                     stage: this.courseType,
                     task: this.taskCount,
                     task: this.taskCount,
                     tool: this.toolindex,
                     tool: this.toolindex,
                     content: Cow,
                     content: Cow,
-                    type: 20
+                    type: 20,
+                    atool:72
                     }
                     }
                 ];
                 ];
                 this.ajax
                 this.ajax
-                    .post(this.$store.state.api + "addCourseWorks", params)
+                    .post(this.$store.state.api + "addCourseWorks3-2", params)
                     .then(res => {
                     .then(res => {
                     this.$message({
                     this.$message({
                         message: "提交成功",
                         message: "提交成功",

+ 14 - 7
src/components/components/choseWorksDetailDialog.vue

@@ -1154,7 +1154,7 @@
                   >
                   >
                     <div
                     <div
                       class="s_b_b_i_ws_b_i_s_i_t_top"
                       class="s_b_b_i_ws_b_i_s_i_t_top"
-                      :style="`cursor: ${[45,7,52,48].includes(toolType)?'pointer':'default'};padding: ${[7,52,48].includes(toolType)?'0px':'10px'};`"
+                      :style="`cursor: ${[45,7,52,48].includes(toolType)?'pointer':'default'};padding: ${[7,52,48,72].includes(toolType)?'0px':'10px'};`"
                       @click="StudentWork(item)"
                       @click="StudentWork(item)"
                       >
                       >
 
 
@@ -1222,13 +1222,11 @@
 														<img :src="item.works" alt="" @click.stop="$hevueImgPreview(item.works)">
 														<img :src="item.works" alt="" @click.stop="$hevueImgPreview(item.works)">
 												</div> -->
 												</div> -->
 
 
-												<div class="imageWorks" v-if="[52,48].includes(toolType)">
+												<div class="imageWorks" v-if="[52,48,72].includes(toolType)">
 													<img :src="require('../../assets/icon/isWord.png')" alt="">
 													<img :src="require('../../assets/icon/isWord.png')" alt="">
 													<!-- <img v-if="[48].includes(toolType)" :src="require('../../assets/icon/isTxt.png')" alt=""> -->
 													<!-- <img v-if="[48].includes(toolType)" :src="require('../../assets/icon/isTxt.png')" alt=""> -->
 												</div>
 												</div>
-                        <div class="imageWorks" v-if="[72].includes(toolType)">
-													<img :src="require('../../assets/icon/isWord.png')" alt="">
-												</div>
+                    
 												<!-- <span>{{ worksCheckAnswer(item) }}</span> -->
 												<!-- <span>{{ worksCheckAnswer(item) }}</span> -->
 											</div>
 											</div>
                     </div>
                     </div>
@@ -1847,6 +1845,14 @@ export default {
         // window.exposed_outputs
         // window.exposed_outputs
         let Cow = JSON.stringify(_iframe.contentWindow.exposed_outputs)
         let Cow = JSON.stringify(_iframe.contentWindow.exposed_outputs)
       
       
+        // uid: this.userId,
+        //       cid: this.id,
+        //       stage: this.courseType,
+        //       task: this.taskCount,
+        //       tool: this.toolIndex,
+        //       content: answerData,
+        //       type: answerType,
+        //       atool: 52
         let params = [
         let params = [
             {
             {
             uid: this.userId,
             uid: this.userId,
@@ -1855,11 +1861,12 @@ export default {
             task: this.taskCount,
             task: this.taskCount,
             tool: this.toolIndex,
             tool: this.toolIndex,
             content: Cow,
             content: Cow,
-            type: 20
+            type: 20,
+            atool: 72
             }
             }
         ];
         ];
         this.ajax
         this.ajax
-            .post(this.$store.state.api + "addCourseWorks", params)
+            .post(this.$store.state.api + "addCourseWorks3-2", params)
             .then(res => {
             .then(res => {
             this.$message({
             this.$message({
                 message: "提交成功",
                 message: "提交成功",

+ 43 - 1
src/components/components/studentWorkPreviewDialog.vue

@@ -17,7 +17,7 @@
           </div>
           </div>
           <div
           <div
             class="s_b_m_content"
             class="s_b_m_content"
-            v-if="[45, 48, 52, 15, 41, 47,40,4].includes(tool)"
+            v-if="[45, 48, 52, 15, 41, 47,40,4,72].includes(tool)"
           >
           >
             <div class="s_b_m_tool45" v-if="[45].includes(tool)">
             <div class="s_b_m_tool45" v-if="[45].includes(tool)">
               <div class="s_b_m_toolItem" v-for="(item, index) in testJson">
               <div class="s_b_m_toolItem" v-for="(item, index) in testJson">
@@ -265,6 +265,28 @@
                 {{ userAnswer.eBzText }}
                 {{ userAnswer.eBzText }}
               </div>
               </div>
             </div>
             </div>
+            <div class="s_b_m_tool40" v-if="[72].includes(tool)">
+              666
+              <div  style="margin-bottom: 20px;" v-for="(item,index) in JSON.parse(studentWork.works)" :key="index">
+                <div style="margin-bottom: 15px;font-size: x-large;">第{{ index + 1}}阶段</div>
+                <div v-for="po in item.messages" :key="item">
+                    <div class="left" v-if="po.role == 'assistant'">
+                        <div>
+                            <div class="TName">小可ai助手:</div>
+                            <div class="con" v-html="po.content"></div>
+                        </div>
+                      
+                    </div>
+
+                    <div class="right" v-if="po.role == 'user'">
+                        <div>
+                            <div class="TName">:{{ po.sender }}</div>
+                            <div class="con" v-html="po.content"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            </div>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -774,4 +796,24 @@ export default {
 .redioStyle >>> .el-checkbox__label {
 .redioStyle >>> .el-checkbox__label {
   font-size: 18px;
   font-size: 18px;
 }
 }
+.TName{
+        font-size: large;
+        color: #4472C4;
+        margin-bottom: 5px;
+        font-weight: 600;
+    }
+    .con{
+        font-size: 14px;
+        color: #000;
+    }
+    .left{
+        display: flex;
+        justify-content: flex-start;
+        margin-bottom: 15px;
+    }
+    .right{
+        display: flex;
+        justify-content: flex-end;
+        margin-bottom: 15px;
+    }
 </style>
 </style>

+ 45 - 2
src/components/easy2/studyStudent.vue

@@ -19846,6 +19846,49 @@ export default {
                   }
                   }
                   _worksStudent2[i].push(_works);
                   _worksStudent2[i].push(_works);
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
+                } else if (b[j].type == 20 && a[i].tool[0] == 72) {
+                  let _works = {
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name,
+                    type: 2,
+                    ttype: b[j].ttype,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                    likeJson: likeJson
+                  };
+                  if (this.isGroup) {
+                    let isGw = 1;
+                    for (
+                      var groupI = 0;
+                      groupI < this.courseGroup.group.length;
+                      groupI++
+                    ) {
+                      let gid = this.courseGroup.group[groupI].id;
+                      if (
+                        this.courseGroupStudentUid[gid].indexOf(b[j].userid) !=
+                        -1
+                      ) {
+                        isGw = 2;
+                        this.courseGroup.group[groupI].works[i].push(_works);
+                        break;
+                      }
+                    }
+                    if (isGw == 1) {
+                      _worksStudent[i].push(_works);
+                    }
+                  } else {
+                    _worksStudent[i].push(_works);
+                  }
+                  _worksStudent2[i].push(_works);
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                   //问卷
                   //问卷
                   let _work = {
                   let _work = {
@@ -23264,7 +23307,7 @@ export default {
           this.$message.error("应用连接为空, 请到课程管理中添加");
           this.$message.error("应用连接为空, 请到课程管理中添加");
           return;
           return;
         }
         }
-        this.$refs.appStoreC.getData(item.url) 
+        this.$refs.appStoreC.getData(item.url,this.userid) 
 
 
         // window.parent.postMessage({ tools: "72", data: item }, "*");
         // window.parent.postMessage({ tools: "72", data: item }, "*");
         // window.open(item.url, "_blank");
         // window.open(item.url, "_blank");
@@ -23706,7 +23749,7 @@ export default {
         );
         );
       }else if (t == 72) {
       }else if (t == 72) {
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
-        this.$refs.appStoreC.getData(url) 
+        this.$refs.appStoreC.getData(url,this.sStudent.userid) 
       }
       }
     },
     },
     openCocoPi(tool, i, uid, uname) {
     openCocoPi(tool, i, uid, uname) {

+ 46 - 2
src/components/easy3/studyStudent.vue

@@ -14494,6 +14494,49 @@ export default {
                     userid: b[j].userid,
                     userid: b[j].userid,
                     wid: b[j].id,
                     wid: b[j].id,
                   });
                   });
+                } else if (b[j].type == 20 && a[i].tool[0] == 72) {
+                  let _works = {
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name,
+                    type: 2,
+                    ttype: b[j].ttype,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                    likeJson: likeJson
+                  };
+                  if (this.isGroup) {
+                    let isGw = 1;
+                    for (
+                      var groupI = 0;
+                      groupI < this.courseGroup.group.length;
+                      groupI++
+                    ) {
+                      let gid = this.courseGroup.group[groupI].id;
+                      if (
+                        this.courseGroupStudentUid[gid].indexOf(b[j].userid) !=
+                        -1
+                      ) {
+                        isGw = 2;
+                        this.courseGroup.group[groupI].works[i].push(_works);
+                        break;
+                      }
+                    }
+                    if (isGw == 1) {
+                      _worksStudent[i].push(_works);
+                    }
+                  } else {
+                    _worksStudent[i].push(_works);
+                  }
+                  _worksStudent2[i].push(_works);
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                   //问卷
                   //问卷
                   this.workStudent[i].push({
                   this.workStudent[i].push({
@@ -18934,7 +18977,8 @@ export default {
           this.$message.error("应用连接为空, 请到课程管理中添加");
           this.$message.error("应用连接为空, 请到课程管理中添加");
           return;
           return;
         }
         }
-        this.$refs.appStoreC.getData(item.url) 
+        this.$refs.appStoreC.getData(item.url,this.userid) 
+
 
 
         // window.parent.postMessage({ tools: "72", data: item }, "*");
         // window.parent.postMessage({ tools: "72", data: item }, "*");
         // window.open(item.url, "_blank");
         // window.open(item.url, "_blank");
@@ -19377,7 +19421,7 @@ export default {
         );
         );
       }else if (t == 72) {
       }else if (t == 72) {
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
-        this.$refs.appStoreC.getData(url) 
+        this.$refs.appStoreC.getData(url,this.sStudent.userid) 
       }
       }
     },
     },
     openCocoPi(tool, i, uid, uname) {
     openCocoPi(tool, i, uid, uname) {

+ 46 - 2
src/components/studyStudent.vue

@@ -14624,6 +14624,49 @@ export default {
                     userid: b[j].userid,
                     userid: b[j].userid,
                     wid: b[j].id,
                     wid: b[j].id,
                   });
                   });
+                } else if (b[j].type == 20 && a[i].tool[0] == 72) {
+                  let _works = {
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name,
+                    type: 2,
+                    ttype: b[j].ttype,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                    likeJson: likeJson
+                  };
+                  if (this.isGroup) {
+                    let isGw = 1;
+                    for (
+                      var groupI = 0;
+                      groupI < this.courseGroup.group.length;
+                      groupI++
+                    ) {
+                      let gid = this.courseGroup.group[groupI].id;
+                      if (
+                        this.courseGroupStudentUid[gid].indexOf(b[j].userid) !=
+                        -1
+                      ) {
+                        isGw = 2;
+                        this.courseGroup.group[groupI].works[i].push(_works);
+                        break;
+                      }
+                    }
+                    if (isGw == 1) {
+                      _worksStudent[i].push(_works);
+                    }
+                  } else {
+                    _worksStudent[i].push(_works);
+                  }
+                  _worksStudent2[i].push(_works);
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                   //问卷
                   //问卷
                   this.workStudent[i].push({
                   this.workStudent[i].push({
@@ -19079,7 +19122,8 @@ export default {
           this.$message.error("应用连接为空, 请到课程管理中添加");
           this.$message.error("应用连接为空, 请到课程管理中添加");
           return;
           return;
         }
         }
-        this.$refs.appStoreC.getData(item.url) 
+        this.$refs.appStoreC.getData(item.url,this.userid) 
+
         // window.open(item.url, "_blank");
         // window.open(item.url, "_blank");
         // window.parent.postMessage({ tools: "72", data: item }, "*");
         // window.parent.postMessage({ tools: "72", data: item }, "*");
       } else if (t == 69) {
       } else if (t == 69) {
@@ -19521,7 +19565,7 @@ export default {
         );
         );
       }else if (t == 72) {
       }else if (t == 72) {
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
-        this.$refs.appStoreC.getData(url) 
+        this.$refs.appStoreC.getData(url,this.sStudent.userid) 
       }
       }
     },
     },
     openCocoPi(tool, i, uid, uname) {
     openCocoPi(tool, i, uid, uname) {

+ 46 - 2
src/components/studySutdentClass/studyStudent.vue

@@ -18106,6 +18106,49 @@ export default {
                     userid: b[j].userid,
                     userid: b[j].userid,
                     wid: b[j].id,
                     wid: b[j].id,
                   });
                   });
+                } else if (b[j].type == 20 && a[i].tool[0] == 72) {
+                  let _works = {
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name,
+                    type: 2,
+                    ttype: b[j].ttype,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                    likeJson: likeJson
+                  };
+                  if (this.isGroup) {
+                    let isGw = 1;
+                    for (
+                      var groupI = 0;
+                      groupI < this.courseGroup.group.length;
+                      groupI++
+                    ) {
+                      let gid = this.courseGroup.group[groupI].id;
+                      if (
+                        this.courseGroupStudentUid[gid].indexOf(b[j].userid) !=
+                        -1
+                      ) {
+                        isGw = 2;
+                        this.courseGroup.group[groupI].works[i].push(_works);
+                        break;
+                      }
+                    }
+                    if (isGw == 1) {
+                      _worksStudent[i].push(_works);
+                    }
+                  } else {
+                    _worksStudent[i].push(_works);
+                  }
+                  _worksStudent2[i].push(_works);
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                 } else if (b[j].type == 2 && a[i].tool[0] == 4) {
                   //问卷
                   //问卷
                   this.workStudent[i].push({
                   this.workStudent[i].push({
@@ -22666,7 +22709,8 @@ export default {
           this.$message.error("应用连接为空, 请到课程管理中添加");
           this.$message.error("应用连接为空, 请到课程管理中添加");
           return;
           return;
         }
         }
-        this.$refs.appStoreC.getData(item.url) 
+        this.$refs.appStoreC.getData(item.url,this.userid) 
+
 
 
         // window.parent.postMessage({ tools: "72", data: item }, "*");
         // window.parent.postMessage({ tools: "72", data: item }, "*");
         // window.open(item.url, "_blank");
         // window.open(item.url, "_blank");
@@ -23109,7 +23153,7 @@ export default {
         );
         );
       }else if (t == 72) {
       }else if (t == 72) {
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
         let url = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index].toolChoose[i].appJson.url
-        this.$refs.appStoreC.getData(url) 
+        this.$refs.appStoreC.getData(url,this.sStudent.userid) 
       }
       }
     },
     },
     openCocoPi(tool, i, uid, uname) {
     openCocoPi(tool, i, uid, uname) {