瀏覽代碼

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

lsc 3 小時之前
父節點
當前提交
c2f28280b5

+ 1 - 1
dist/index.html

@@ -37,7 +37,7 @@
       width: 100%;
       width: 100%;
       background: #e6eaf0;
       background: #e6eaf0;
       font-family: '黑体';
       font-family: '黑体';
-    }</style><link href=./static/css/app.c8a8fc5ed051f793f38f996562bd8e5c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.23ea04dc469b57e2b4f8.js></script><script type=text/javascript src=./static/js/vendor.714ff2bfc93f2f096b79.js></script><script type=text/javascript src=./static/js/app.122569db6ecde35f9959.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.2b8fdb5e888fc05d54e6c8c393d5f051.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.23ea04dc469b57e2b4f8.js></script><script type=text/javascript src=./static/js/vendor.714ff2bfc93f2f096b79.js></script><script type=text/javascript src=./static/js/app.50a0f011f92ccff0bbfe.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {
     document.documentElement.addEventListener("touchstart", function (event) {

文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.2b8fdb5e888fc05d54e6c8c393d5f051.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.2b8fdb5e888fc05d54e6c8c393d5f051.css.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.50a0f011f92ccff0bbfe.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.50a0f011f92ccff0bbfe.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/manifest.23ea04dc469b57e2b4f8.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/workPage-manifest.2ece51fa34be51c8610a.js.map


+ 45 - 38
src/components/pages/studentManageNew/component/addstu.vue

@@ -573,6 +573,10 @@ export default {
     },
     },
     // 手动输入添加学生
     // 手动输入添加学生
     addStu() {
     addStu() {
+      if (this.uploadfileLoading) {
+        this.$message.warning(this.lang.ssUploading);
+        return;
+      }
       this.selectedStuData = this.selectedStuData.filter((item) => item != "");
       this.selectedStuData = this.selectedStuData.filter((item) => item != "");
       if (this.selectedStuData.length == 0) {
       if (this.selectedStuData.length == 0) {
         this.$message.error(this.lang.ssEnterStu);
         this.$message.error(this.lang.ssEnterStu);
@@ -631,52 +635,55 @@ export default {
         e.mail = e.account;
         e.mail = e.account;
       });
       });
 
 
-      const batchSize = 50;
-      if (data1.length > 0) {
-        if (data1.length > batchSize) {
-          // 计算总批次数
-          const totalBatches = Math.ceil(data1.length / batchSize);
-          for (let i = 0; i < totalBatches; i++) {
-            const batch = data1.slice(i * batchSize, (i + 1) * batchSize);
-            await this.uploadBatch(batch); // 假设 uploadBatch 返回 Promise
-            console.log(`普通上传第 ${i + 1} 批上传完成`, batch);
+      try {
+        const batchSize = 50;
+        if (data1.length > 0) {
+          if (data1.length > batchSize) {
+            // 计算总批次数
+            const totalBatches = Math.ceil(data1.length / batchSize);
+            for (let i = 0; i < totalBatches; i++) {
+              const batch = data1.slice(i * batchSize, (i + 1) * batchSize);
+              await this.uploadBatch(batch); // 假设 uploadBatch 返回 Promise
+              console.log(`普通上传第 ${i + 1} 批上传完成`, batch);
+            }
+          } else {
+            // 长度不超过 10,直接上传整个数组
+            await this.uploadBatch(data1);
           }
           }
-        } else {
-          // 长度不超过 10,直接上传整个数组
-          await this.uploadBatch(data1);
         }
         }
-      }
 
 
-      if (data2.length > 0) {
-        if (data2.length > batchSize) {
-          // 计算总批次数
-          const totalBatches = Math.ceil(data2.length / batchSize);
-          for (let i = 0; i < totalBatches; i++) {
-            const batch = data2.slice(i * batchSize, (i + 1) * batchSize);
-            await this.uploadBatchAccount (batch); // 假设 uploadBatch 返回 Promise
-            console.log(`自定义账号上传第 ${i + 1} 批上传完成`, batch);
+        if (data2.length > 0) {
+          if (data2.length > batchSize) {
+            // 计算总批次数
+            const totalBatches = Math.ceil(data2.length / batchSize);
+            for (let i = 0; i < totalBatches; i++) {
+              const batch = data2.slice(i * batchSize, (i + 1) * batchSize);
+              await this.uploadBatchAccount (batch); // 假设 uploadBatch 返回 Promise
+              console.log(`自定义账号上传第 ${i + 1} 批上传完成`, batch);
+            }
+          } else {
+            // 长度不超过 10,直接上传整个数组
+            await this.uploadBatchAccount (data2);
           }
           }
-        } else {
-          // 长度不超过 10,直接上传整个数组
-          await this.uploadBatchAccount (data2);
         }
         }
-      }
 
 
 
 
-      this.$message({
-        message: this.lang.ssAddOk,
-        type: "success",
-      });
-      this.uploadfileLoading = false;
+        this.$message({
+          message: this.lang.ssAddOk,
+          type: "success",
+        });
 
 
-      this.deltypy = 0;
-      this.popBoxdia= true;
-      // this.addStuVisible = false;
-      console.log('this.selectedStuData',this.selectedStuData);
-      
-      // this.selectedStuData = [];
-      this.$emit("getCascaderData");
-      this.addOp3('1', "", { type: "student_add" }, "success")
+        this.deltypy = 0;
+        this.popBoxdia= true;
+        // this.addStuVisible = false;
+        console.log('this.selectedStuData',this.selectedStuData);
+        
+        // this.selectedStuData = [];
+        this.$emit("getCascaderData");
+        this.addOp3('1', "", { type: "student_add" }, "success")
+      } finally {
+        this.uploadfileLoading = false;
+      }
     },
     },
     async uploadBatch(box){
     async uploadBatch(box){
       return new Promise((resolve, reject) => {
       return new Promise((resolve, reject) => {

+ 9 - 0
src/components/pages/studentManageNew/component/allClaAddStu.vue

@@ -207,6 +207,7 @@ export default {
       boxLoading: false,
       boxLoading: false,
       tableLoading: false,
       tableLoading: false,
       editTabloading: false,
       editTabloading: false,
+      confirmLoading: false,
       cascaderDataPath: [],
       cascaderDataPath: [],
       cascaderData: [],
       cascaderData: [],
       searchStuName: "",
       searchStuName: "",
@@ -275,6 +276,10 @@ export default {
       this.$emit("closeAllClaAddStu");
       this.$emit("closeAllClaAddStu");
     },
     },
     confirmAllClaAddStu() {
     confirmAllClaAddStu() {
+      if (this.confirmLoading) {
+        this.$message.warning(this.lang.ssUploading);
+        return;
+      }
       if (this.selectedStuData.length === 0) {
       if (this.selectedStuData.length === 0) {
         this.$message({
         this.$message({
           message: this.lang.ssSelectStu,
           message: this.lang.ssSelectStu,
@@ -283,6 +288,7 @@ export default {
         return;
         return;
       }
       }
       console.log("上传学生数据");
       console.log("上传学生数据");
+      this.confirmLoading = true;
       const promises2 = this.selectedStuData.map((item) => {
       const promises2 = this.selectedStuData.map((item) => {
         let box = [...item.classid.split(","), this.classInfo.id];
         let box = [...item.classid.split(","), this.classInfo.id];
         box = box.filter((item) => item != "");
         box = box.filter((item) => item != "");
@@ -304,6 +310,9 @@ export default {
             type: "error",
             type: "error",
           });
           });
           this.addOp3('1', "", { type: "student_move" }, err)
           this.addOp3('1', "", { type: "student_move" }, err)
+        })
+        .finally(() => {
+          this.confirmLoading = false;
         });
         });
     },
     },
     moveClassStudentPromise(item, cid) {
     moveClassStudentPromise(item, cid) {

部分文件因文件數量過多而無法顯示