lsc 2 سال پیش
والد
کامیت
215c096395

BIN
src/assets/icon/fourthToolList/file.png


BIN
src/assets/icon/fourthToolList/photo.png


BIN
src/assets/icon/fourthToolList/text.png


+ 2 - 2
src/components/components/vpdf.vue

@@ -61,7 +61,7 @@ export default {
     //   text: "加载中...",
     //   spinner: "",
     // });
-    this.loading = true;
+    this.loading = false;
     this.$refs.viframe.onload = function () {
       this.loading = false
     }
@@ -76,7 +76,7 @@ export default {
       //   text: "加载中...",
       //   spinner: "",
       // });
-      this.loading = true;
+      this.loading = false;
       this.$refs.viframe.onload = function () {
         this.loading = false
       }

+ 0 - 1
src/components/courseDetail.vue

@@ -904,7 +904,6 @@ export default {
           let _works = res.data[3];
           let _sCont = res.data[4];
           let _comment = res.data[5];
-
           let _chaptersJson = {
             chapterState: _chapters,
             state: {

+ 103 - 36
src/components/student/studyStudent.vue

@@ -474,9 +474,12 @@
                     <div class="toolPhoto_box">
                       <div class="photo_box" v-for="(photo, pIndex) in tool.toolPhoto" :key="pIndex">
                         <span>{{ photo.workContent }}</span>
-                        <div class="toolPhoto" :class="{ answerWidth: photo.type == 3 }">
+                        <!--  :class="{ answerWidth: photo.type == 3 }" -->
+                        <div class="toolPhoto answerWidth">
                           <img v-if="photo.type == 1" :src="photo.content" @click="previewImg(photo.content)">
                           <img v-if="photo.type == 10" :src="word" @click="openTable(photo.content)">
+                          <img v-if="photo.type == 4" :src="word" @click="openFile(photo.content)">
+                          <img v-if="photo.type == 12" :src="word" @click="openText(photo.content)">
                           <div class="answerBg" v-if="photo.type == 3">
                             <!-- <div>{{ w.sName }}</div> -->
                             <el-tooltip class="item" effect="light" :content="photo.content" placement="top">
@@ -724,6 +727,27 @@
         <el-button @click="dialogVisibleTable2 = false">关 闭</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="文件预览" :visible.sync="dialogVisible3" width="50%" :before-close="handleClose" class="dialog_diy"
+      :class="{ fullStyle: full }">
+      <div slot="title" class="header-title">
+        <div style="color: #fff">文件预览</div>
+        <div style="position: absolute; top: 19px; right: 50px">
+          <img src="../../assets/full.png" style="height: 16px; cursor: pointer" alt="" @click="fullTools" />
+        </div>
+      </div>
+      <pdf v-if="showPDF" :pdfUrl="pptImgUrl" style="width: 100%; height: 520px; overflow: auto"
+        :class="{ fullStyle: full }"></pdf>
+      <iframe v-else :src="pptImgUrl" frameborder="0" width="100%" height="600" :class="{ fullStyle: full }"></iframe>
+    </el-dialog>
+    <el-dialog title="查看文本" :visible.sync="dialogVisibleText2" :append-to-body="true" width="500px"
+      :before-close="handleClose" class="dialog_diy">
+      <el-form>
+        <div class="cont" v-html="tableJson.text"></div>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleText2 = false">关 闭</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -757,6 +781,7 @@ export default {
       dialogVisibleGroupWork: false,
       dialogVisibleUpdateGroup: false,
       dialogVisibleDeleteGroup: false,
+      dialogVisibleText2: false,
       sStudent: {},
       bzText: "",
       commentDetail: [],
@@ -987,7 +1012,9 @@ export default {
       checkDeleteGroup: [],
       ManAarray: [],
       chapterlist: [],
-      chapterIndex: 0
+      chapterIndex: 0,
+      courseUserid:'',
+      checkboxList3:[],
     };
   },
   methods: {
@@ -1377,6 +1404,10 @@ export default {
             var a = JSON.parse(res.data[0][0].chapters)[this.courseType]
               .chapterInfo[0].taskJson;
             this.courseDetail = res.data[0][0];
+            this.courseUserid = res.data[0][0].userid;
+            this.checkboxList3 = res.data[0][0].course_teacher
+                        ? res.data[0][0].course_teacher.split(",")
+                        : [];
             this.chapInfo = JSON.parse(this.courseDetail.chapters)[
               this.courseType
             ];
@@ -1436,15 +1467,21 @@ export default {
                     let _work = works[k]
                     if (_work.stage == i && _work.task == j && _work.tool == z && _work.atool == _tool.tool) {
                       if (_tool.tool == 1) {
-                        _work.workContent = `(${_work.username})使用(电子白板)提交了:`
+                        _work.workContent = `(${_work.username})使用(电子白板)提交了:`
                       } else if (_tool.tool == 3) {
-                        _work.workContent = `(${_work.username})使用(思维网格)提交了:`
+                        _work.workContent = `(${_work.username})使用(思维网格)提交了:`
                       } else if (_tool.tool == 6) {
-                        _work.workContent = `(${_work.username})使用(协同文档)提交了:`
+                        _work.workContent = `(${_work.username})使用(协同文档)提交了:`
                       } else if (_tool.tool == 15) {
-                        _work.workContent = `(${_work.username})使用(问答工具)提交了:`
+                        _work.workContent = `(${_work.username})使用(问答工具)提交了:`
                       } else if (_tool.tool == 48) {
-                        _work.workContent = `(${_work.username})使用(表格)提交了:`
+                        _work.workContent = `(${_work.username})使用(表格)提交了:`
+                      } else if (_tool.tool == 52) {
+                        _work.workContent = `(${_work.username})使用(文本)提交了:`
+                      } else if (_tool.tool == 53) {
+                        _work.workContent = `(${_work.username})使用(文档上传)提交了:`
+                      } else if (_tool.tool == 54) {
+                        _work.workContent = `(${_work.username})使用(拍照上传)提交了:`
                       }
                       _tool.toolPhoto.push(_work);
                     }
@@ -1475,15 +1512,21 @@ export default {
                     let _work = works[k]
                     if (_work.stage == i && _work.task == j && _work.tool == z && _work.atool == _tool.tool) {
                       if (_tool.tool == 1) {
-                        _work.workContent = `(${_work.username})使用(电子白板)提交了:`
+                        _work.workContent = `(${_work.username})使用(电子白板)提交了:`
                       } else if (_tool.tool == 3) {
-                        _work.workContent = `(${_work.username})使用(思维网格)提交了:`
+                        _work.workContent = `(${_work.username})使用(思维网格)提交了:`
                       } else if (_tool.tool == 6) {
-                        _work.workContent = `(${_work.username})使用(协同文档)提交了:`
+                        _work.workContent = `(${_work.username})使用(协同文档)提交了:`
                       } else if (_tool.tool == 15) {
-                        _work.workContent = `(${_work.username})使用(问答工具)提交了:`
+                        _work.workContent = `(${_work.username})使用(问答工具)提交了:`
                       } else if (_tool.tool == 48) {
-                        _work.workContent = `(${_work.username})使用(表格)提交了:`
+                        _work.workContent = `(${_work.username})使用(表格)提交了:`
+                      } else if (_tool.tool == 52) {
+                        _work.workContent = `(${_work.username})使用(文本)提交了:`
+                      } else if (_tool.tool == 53) {
+                        _work.workContent = `(${_work.username})使用(文档上传)提交了:`
+                      } else if (_tool.tool == 54) {
+                        _work.workContent = `(${_work.username})使用(拍照上传)提交了:`
                       }
                       _tool.toolPhoto.push(_work);
                     }
@@ -1644,28 +1687,26 @@ export default {
         });
     },
     getTeacher() {
-      let params = {
-        oid:
-          this.org && this.org != "undefined" && this.org != "null"
-            ? this.org
-            : this.oid,
-        cu: "",
-        cn: "",
-      };
-      this.ajax
-        .get(
-          this.$store.state.api +
-          (this.org && this.org != "undefined" && this.org != "null"
-            ? "selectUserAddOrg"
-            : "selectUserAdd"),
-          params
-        )
-        .then((res) => {
-          this.ManAarray = res.data[0]
-        })
-        .catch((err) => {
-          console.error(err);
-        });
+      this.ManAarray = []
+            if(this.checkboxList3.indexOf(this.courseUserid) == -1){
+                this.checkboxList3.push(this.courseUserid)
+            }
+            let params = {
+                uid: this.checkboxList3.join(","),
+            };
+            this.ajax
+                .get(
+                    this.$store.state.api + "getAllUserById",
+                    params
+                )
+                .then((res) => {
+                    let teacherJuri = res.data[0];
+                    this.ManAarray = teacherJuri;
+                    this.setMan();
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
     },
     addTools(t, i, index) {
       var a = 0;
@@ -2093,6 +2134,25 @@ export default {
     openLine(url) {
       window.open(url);
     },
+    openFile(f) {
+      this.pptImgUrl = "";
+      var a = ["PPT", "PPTX", "XLSX", "XLS", "DOC", "DOCX"];
+      if (
+        a.indexOf(f.split(".")[f.split(".").length - 1].toLocaleUpperCase()) !=
+        -1
+      ) {
+        this.pptImgUrl =
+          "https://view.officeapps.live.com/op/view.aspx?src=" + f;
+        this.showPDF = false;
+        this.dialogVisible3 = true;
+      } else if (
+        f.split(".")[f.split(".").length - 1].toLocaleUpperCase() == "PDF"
+      ) {
+        this.pptImgUrl = f;
+        this.showPDF = true;
+        this.dialogVisible3 = true;
+      }
+    },
     downloadFile(url) {
       let _url = "";
       if (
@@ -2129,6 +2189,10 @@ export default {
       };
       x.send();
     },
+    openText(f) {
+      this.tableJson.text = JSON.parse(f)
+      this.dialogVisibleText2 = true
+    },
     setChapterIndex2(tool, index, toolIndex) {
       tool.sourceIndex = index;
       this.$nextTick(function () {
@@ -3638,7 +3702,8 @@ export default {
 
 .answerWidth {
   width: 250px !important;
-  height: auto !important;
+  /* height: auto !important; */
+  height: 120px !important;
 }
 
 .answerBg {
@@ -5366,7 +5431,9 @@ ol {
 .toolPhoto img {
   height: 100%;
   width: 100%;
-  object-fit: contain;
+  /* object-fit: contain; */
+  object-fit: cover;
+  border-radius: 5px;
 }
 
 .task_box {

+ 5 - 3
src/components/studyStudent.vue

@@ -562,8 +562,9 @@
                   </div>
                 </div>
               </div>
-              <div
-                style="padding: 10px 30px 0"
+              <div style="width:81%">
+                <div
+                style="padding: 10px 0 0;width:95%;margin: 0 auto;"
                 v-if="showType == 2 || showType == 3"
               >
                 <el-button
@@ -584,11 +585,12 @@
                   >打开链接
                 </el-button>
               </div>
-              <div style="padding: 10px 30px 0" v-if="showType == 1">
+              <div style="padding: 10px 0 0" v-if="showType == 1">
                 <el-button type="primary" @click="checkFileFull(showType, text)"
                   >全屏查看</el-button
                 >
               </div>
+              </div>
             </div>
           </div>
 

+ 4 - 2
src/components/tools/heatmap.vue

@@ -62,7 +62,9 @@ export default {
   methods: {
     gettime() {
       var time = new Date();
-      time.setTime(time.getTime());
+      // time=time.setDate(time.getDate()+1);
+      // time = new Date(time);
+      // time.setTime(time.getTime());
       var s2 = time.getFullYear() + "-" + ((time.getMonth() + 1) < 10 ? '0' + (time.getMonth() + 1) : (time.getMonth() + 1)) + "-"
         + ((time.getDate()) < 10 ? '0' + (time.getDate()) : (time.getDate()));
       var monthNum = 6; //要减的月数(6)自己定义
@@ -115,7 +117,7 @@ export default {
       const end = +this.$echarts.time.parse(year[1]);
       const dayTime = 3600 * 24 * 1000;
       const data = [];
-      for (let time = date; time < end; time += dayTime) {
+      for (let time = date; time <= end; time += dayTime) {
         let a = this.$echarts.time.format(time, '{yyyy}-{MM}-{dd}', false)
         if (this.Josn[a]) {
           data.push([a, this.Josn[a]]);