zengyicheng 1 年之前
父節點
當前提交
d5fbaf7341

+ 7 - 3
src/components/pages/addCourse.vue

@@ -3802,7 +3802,7 @@
     </el-dialog>
     </el-dialog>
     <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px"
     <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px"
       :before-close="(done) => { closePan(69) }" class="dialog_diy fullStyle fullStyle1">
       :before-close="(done) => { closePan(69) }" class="dialog_diy fullStyle fullStyle1">
-      <englishRight :englishList="englishList" :oid="oid" ref="engJson"></englishRight>
+      <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="englishDialogVisible = false">取 消</el-button>
         <el-button @click="englishDialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="addEnglish">确 定</el-button>
         <el-button type="primary" @click="addEnglish">确 定</el-button>
@@ -4597,7 +4597,7 @@ export default {
           }
           }
         });
         });
     },
     },
-    addEnglish(){
+    addEnglish(jsonType){
       this.englishList.engTitle = this.$refs['engJson'].engList.engTitle;
       this.englishList.engTitle = this.$refs['engJson'].engList.engTitle;
       this.englishList.englishText = this.$refs['engJson'].engList.englishText;
       this.englishList.englishText = this.$refs['engJson'].engList.englishText;
       this.englishList.textJson = this.$refs['engJson'].engList.textJson;
       this.englishList.textJson = this.$refs['engJson'].engList.textJson;
@@ -4609,7 +4609,11 @@ export default {
         this.taskCount
         this.taskCount
       ].toolChoose[this.toolIndex].englishList = this.englishList;
       ].toolChoose[this.toolIndex].englishList = this.englishList;
       this.englishList = {};
       this.englishList = {};
-      this.englishDialogVisible = false;
+      if(jsonType && jsonType == 1){
+        this.englishDialogVisible = true;
+      }else{
+        this.englishDialogVisible = false;
+      }
       if (
       if (
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
           .toolChoose[this.toolIndex].tool != 69
           .toolChoose[this.toolIndex].tool != 69

+ 20 - 6
src/components/pages/components/englishRight.vue

@@ -51,10 +51,10 @@
                 "
                 "
                 >{{ e.title }}</span
                 >{{ e.title }}</span
               >
               >
-              <span
+              <span style="position: absolute; right: 20px; top: 3px"
                 ><img
                 ><img
-                  style="width: 20px; height: 20px; cursor: pointer"
-                  @click="deleteTemplate(e.id)"
+                  style="width: 17px; height: 17px; cursor: pointer"
+                  @click.stop="deleteTemplate(e.id)"
                   src="../../../assets/icon/deleteN.png"
                   src="../../../assets/icon/deleteN.png"
                   alt=""
                   alt=""
               /></span>
               /></span>
@@ -95,9 +95,11 @@
               <el-input v-model="item.detile"></el-input>
               <el-input v-model="item.detile"></el-input>
             </div>
             </div>
           </div>
           </div>
-
-          <div class="addeEvaItem" @click="addStartItem">
-            <img src="../../../assets/icon/addEva.png" alt="" />
+          <div class="bottomCss">
+            <el-button type="primary" @click="setJson">保 存</el-button>
+            <div class="addeEvaItem" @click="addStartItem">
+              <img src="../../../assets/icon/addEva.png" alt="" />
+            </div>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -140,12 +142,16 @@ export default {
       engEvaId: "",
       engEvaId: "",
       englishTitle: "",
       englishTitle: "",
       engEvadialogVisible: false,
       engEvadialogVisible: false,
+      jsonType: 1,
     };
     };
   },
   },
   methods: {
   methods: {
     handleClose(done) {
     handleClose(done) {
       done();
       done();
     },
     },
+    setJson() {
+      this.$emit("setJson", this.jsonType);
+    },
     selectEnglishEva() {
     selectEnglishEva() {
       this.englistEva = [];
       this.englistEva = [];
       let params = {
       let params = {
@@ -402,5 +408,13 @@ export default {
   flex-wrap: nowrap;
   flex-wrap: nowrap;
   align-items: baseline;
   align-items: baseline;
   justify-content: space-between;
   justify-content: space-between;
+  position: relative;
+}
+.bottomCss {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  justify-content: flex-end;
+  align-items: center;
 }
 }
 </style>
 </style>

+ 58 - 16
src/components/pages/components/worksDetail2.vue

@@ -338,7 +338,9 @@
                             <el-button
                             <el-button
                               type="primary"
                               type="primary"
                               size="small"
                               size="small"
-                              @click="openFile(worksDetail[sIndex].wpptInfo[0])"
+                              @click="
+                                openFile2(worksDetail[sIndex].wpptInfo[0])
+                              "
                             >
                             >
                               查看文档</el-button
                               查看文档</el-button
                             >
                             >
@@ -1396,14 +1398,11 @@
                           </div>
                           </div>
                         </div>
                         </div>
                         <div class="allRightBox">
                         <div class="allRightBox">
-                          <span>全部题的正确率:</span
-                          >
+                          <span>全部题的正确率:</span>
                           <span>{{ checkJson[sIndex].allRight + "%" }}</span>
                           <span>{{ checkJson[sIndex].allRight + "%" }}</span>
                         </div>
                         </div>
                       </div>
                       </div>
-                      <div v-if="
-                            worksDetail[sIndex].eList.length
-                          ">
+                      <div v-if="worksDetail[sIndex].eList.length">
                         <div class="ech" style="margin-left: 23px">
                         <div class="ech" style="margin-left: 23px">
                           <img src="../../../assets/icon/pj/score.png" alt="" />
                           <img src="../../../assets/icon/pj/score.png" alt="" />
                         </div>
                         </div>
@@ -1799,7 +1798,7 @@ export default {
   watch: {
   watch: {
     typeCheck(newValue, oldValue) {
     typeCheck(newValue, oldValue) {
       this.loading = true;
       this.loading = true;
-      this.isLoading = true
+      this.isLoading = true;
       this.tableData = [];
       this.tableData = [];
       if (newValue) {
       if (newValue) {
         this.getWorks1();
         this.getWorks1();
@@ -1917,7 +1916,7 @@ export default {
           var wordInfo = res.data[12]; //文档作业
           var wordInfo = res.data[12]; //文档作业
           var workEvaList = res.data[13];
           var workEvaList = res.data[13];
           var workJson = {};
           var workJson = {};
-          let checkJson = {}
+          let checkJson = {};
 
 
           for (var k = 0; k < res.data[0].length; k++) {
           for (var k = 0; k < res.data[0].length; k++) {
             this.allWorks = res.data[0][k];
             this.allWorks = res.data[0][k];
@@ -1977,7 +1976,7 @@ export default {
               };
               };
               checkJson[stagetask] = {
               checkJson[stagetask] = {
                 stagetask: stagetask,
                 stagetask: stagetask,
-              }
+              };
             }
             }
             workJson[stagetask].time = res.data[0][k].time;
             workJson[stagetask].time = res.data[0][k].time;
             // for (var i = 0; i < askInfo.length; i++) {
             // for (var i = 0; i < askInfo.length; i++) {
@@ -2132,14 +2131,18 @@ export default {
                       isCount += 0;
                       isCount += 0;
                     }
                     }
                     for (var q = 0; q < t.radio[p].length; q++) {
                     for (var q = 0; q < t.radio[p].length; q++) {
-                      checkJson[stagetask][p].checkPerson[parseInt(t.radio[p][q])]
+                      checkJson[stagetask][p].checkPerson[
+                        parseInt(t.radio[p][q])
+                      ]
                         ? checkJson[stagetask][p].checkPerson[
                         ? checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                             parseInt(t.radio[p][q])
                           ].push(res.data[0][k].sName)
                           ].push(res.data[0][k].sName)
                         : (checkJson[stagetask][p].checkPerson[
                         : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p][q])
                             parseInt(t.radio[p][q])
                           ] = [res.data[0][k].sName]);
                           ] = [res.data[0][k].sName]);
-                          checkJson[stagetask][p].checkCount[parseInt(t.radio[p][q])]
+                      checkJson[stagetask][p].checkCount[
+                        parseInt(t.radio[p][q])
+                      ]
                         ? checkJson[stagetask][p].checkCount[
                         ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p][q])
                             parseInt(t.radio[p][q])
                           ]++
                           ]++
@@ -2163,7 +2166,7 @@ export default {
                         : (checkJson[stagetask][p].checkPerson[
                         : (checkJson[stagetask][p].checkPerson[
                             parseInt(t.radio[p])
                             parseInt(t.radio[p])
                           ] = [res.data[0][k].sName]);
                           ] = [res.data[0][k].sName]);
-                          checkJson[stagetask][p].checkCount[parseInt(t.radio[p])]
+                      checkJson[stagetask][p].checkCount[parseInt(t.radio[p])]
                         ? checkJson[stagetask][p].checkCount[
                         ? checkJson[stagetask][p].checkCount[
                             parseInt(t.radio[p])
                             parseInt(t.radio[p])
                           ]++
                           ]++
@@ -2393,10 +2396,10 @@ export default {
           //   );
           //   );
           // });
           // });
           let result = [];
           let result = [];
-          let checkJsonArray = []
+          let checkJsonArray = [];
           for (var wi = 0; wi < Object.keys(workJson).length; wi++) {
           for (var wi = 0; wi < Object.keys(workJson).length; wi++) {
             result.push(workJson[Object.keys(workJson)[wi]]);
             result.push(workJson[Object.keys(workJson)[wi]]);
-            checkJsonArray.push(checkJson[Object.keys(checkJson)[wi]])
+            checkJsonArray.push(checkJson[Object.keys(checkJson)[wi]]);
           }
           }
           var resultNewArray = result.sort(function (x, y) {
           var resultNewArray = result.sort(function (x, y) {
             // 以stagetask字段为排序依据
             // 以stagetask字段为排序依据
@@ -2426,7 +2429,7 @@ export default {
           });
           });
           result = resultNewArray;
           result = resultNewArray;
           checkJsonArray = checkJsonNewArray;
           checkJsonArray = checkJsonNewArray;
-          this.checkJson = checkJsonArray
+          this.checkJson = checkJsonArray;
           for (var l = 0; l < b.length; l++) {
           for (var l = 0; l < b.length; l++) {
             if (workEvaList.length > 0) {
             if (workEvaList.length > 0) {
               for (var p = 0; p < workEvaList.length; p++) {
               for (var p = 0; p < workEvaList.length; p++) {
@@ -2652,6 +2655,45 @@ export default {
       }
       }
       this.dialogVisible6 = true;
       this.dialogVisible6 = true;
     },
     },
+    openFile2(f) {
+      this.pptImgUrl = f.wpptInfo;
+      var fileA = [
+        "DOC",
+        "DOCX",
+        "DOCM",
+        "DOTM",
+        "DOTX",
+        "PPTX",
+        "PPSX",
+        "PPT",
+        "PPS",
+        "PPTM",
+        "POTM",
+        "PPAM",
+        "POTX",
+        "PPSM",
+        "XLSX",
+        "XLS",
+      ];
+      if (
+        fileA.indexOf(
+          this.pptImgUrl
+            .split(".")
+            [this.pptImgUrl.split(".").length - 1].toLocaleUpperCase()
+        ) != -1
+      ) {
+        this.showPDF = false; //word 文件
+      } else if (
+        "pdf".indexOf(
+          this.pptImgUrl
+            .split(".")
+            [this.pptImgUrl.split(".").length - 1].toLocaleLowerCase()
+        ) != -1
+      ) {
+        this.showPDF = true; //pdf
+      }
+      this.dialogVisible6 = true;
+    },
     //获取班级列表
     //获取班级列表
     getClass() {
     getClass() {
       let params = {
       let params = {
@@ -3570,7 +3612,7 @@ export default {
   },
   },
   created() {
   created() {
     this.page = 1;
     this.page = 1;
-    this.isLoading = true
+    this.isLoading = true;
     this.getCourseDetail();
     this.getCourseDetail();
     this.getClass();
     this.getClass();
     this.getGroup();
     this.getGroup();