lsc 2 rokov pred
rodič
commit
7a0ece798b

+ 31 - 26
src/components/GM/studyStudentGM.vue

@@ -2117,7 +2117,7 @@
               </div>
             </div>
           </div>-->
-          <div class="upload_send" @click="addCourseWorks(taskCount)">提交</div>
+          <div class="upload_send" @click="addCourseWorks(taskCount)" v-if="!proVisible">提交</div>
         </el-dialog>
       </div>
     </div>
@@ -3081,6 +3081,10 @@ export default {
       } else {
         typesql = 5;
       }
+      if(!this.studyJuri[0].cover[0].url){
+        this.$message.error("请上传文件")
+        return;
+      }
       if (this.workTypeA == true) {
         this.$confirm(
           "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
@@ -4106,6 +4110,8 @@ export default {
 
       var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
       var _this = this;
+      _this.progress = 0;
+      _this.proVisible = true;
       var b = [
         "DOC",
         "DOCX",
@@ -4137,29 +4143,29 @@ export default {
         "SVG",
         "APNG",
       ];
-      if (
-        b.indexOf(
-          file.name
-            .split(".")
-          [file.name.split(".").length - 1].toLocaleUpperCase()
-        ) != -1
-      ) {
-        if (file.size / 1024 / 1024 > 10) {
-          this.$message.error("上传文件大于10兆,请重新选择文件!");
-          return;
-        }
-      } else if (
-        excelA.indexOf(
-          file.name
-            .split(".")
-          [file.name.split(".").length - 1].toLocaleUpperCase()
-        ) != "-1"
-      ) {
-        if (file.size / 1024 / 1024 > 5) {
-          this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
-          return;
-        }
-      }
+      // if (
+      //   b.indexOf(
+      //     file.name
+      //       .split(".")
+      //     [file.name.split(".").length - 1].toLocaleUpperCase()
+      //   ) != -1
+      // ) {
+      //   if (file.size / 1024 / 1024 > 10) {
+      //     this.$message.error("上传文件大于10兆,请重新选择文件!");
+      //     return;
+      //   }
+      // } else if (
+      //   excelA.indexOf(
+      //     file.name
+      //       .split(".")
+      //     [file.name.split(".").length - 1].toLocaleUpperCase()
+      //   ) != "-1"
+      // ) {
+      //   if (file.size / 1024 / 1024 > 5) {
+      //     this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
+      //     return;
+      //   }
+      // }
 
       if (
         photoA.indexOf(
@@ -4175,8 +4181,7 @@ export default {
         // const blob = await imageConversion.compressAccurately(file, {type:file.type});
         file = new File([blob], file.name, { type: file.type });
       }
-      _this.progress = 0;
-      _this.proVisible = true;
+
 
       if (file) {
         var params = {

+ 16 - 7
src/components/studyStudent.vue

@@ -2390,7 +2390,7 @@
               </div>
             </div>
           </div>-->
-          <div class="upload_send" @click="addCourseWorks(taskCount)">提交</div>
+          <div class="upload_send" @click="addCourseWorks(taskCount)" v-if="!proVisible">提交</div>
         </el-dialog>
       </div>
     </div>
@@ -3178,7 +3178,7 @@
           </div>
         </div>
       </div>
-      <div class="upload_send" @click="addCourseWorksTeacher(taskCount)">提交</div>
+      <div class="upload_send" @click="addCourseWorksTeacher(taskCount)" v-if="!proVisible">提交</div>
     </el-dialog>
     <ImgDraw :drawShow="drawShow" @closeDraw="closeDraw" @addImgDraw="addImgDraw" :bg="bg"></ImgDraw>
     <el-dialog title="表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="800px"
@@ -3254,7 +3254,7 @@ export default {
       dialogVisibleSentence1: false,
       dialogVisibleWorks: false,
       dialogVisibleTable: false,
-      dialogVisibleTable2:false,
+      dialogVisibleTable2: false,
       sStudent: {},
       bzText: "",
       commentDetail: [],
@@ -3628,6 +3628,11 @@ export default {
       } else {
         typesql = 5;
       }
+
+      if(!this.studyJuri[0].cover[0].url){
+        this.$message.error("请上传文件")
+        return;
+      }
       if (this.workTypeA == true) {
         this.$confirm(
           "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
@@ -3705,7 +3710,10 @@ export default {
       } else {
         typesql = 5;
       }
-
+      if(!this.studyJuri[0].cover[0].url){
+        this.$message.error("请上传文件")
+        return;
+      }
       let params = [
         {
           uid: this.sStudent.userid,
@@ -4791,6 +4799,8 @@ export default {
 
       var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
       var _this = this;
+      _this.progress = 0;
+      _this.proVisible = true;
       var b = [
         "DOC",
         "DOCX",
@@ -4860,8 +4870,7 @@ export default {
         // const blob = await imageConversion.compressAccurately(file, {type:file.type});
         file = new File([blob], file.name, { type: file.type });
       }
-      _this.progress = 0;
-      _this.proVisible = true;
+
 
       if (file) {
         var params = {
@@ -5941,7 +5950,7 @@ export default {
         this.dialogVisible3 = true;
       }
     },
-    openTable(f){
+    openTable(f) {
       this.tableJson = JSON.parse(f.works)
       this.dialogVisibleTable2 = true;
     },