Browse Source

Merge branch 'beta'

SanHQin 13 hours ago
parent
commit
eb86e2a3d7

+ 1 - 1
dist/index.html

@@ -37,7 +37,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.37b23da2405638b40f02855369dd8bdd.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.4fe3039e3721320d6197.js></script><script type=text/javascript src=./static/js/app.be54a270ad4225a81177.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.e561cb9aa4c60da929d7ed9a723a2a46.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.4fe3039e3721320d6197.js></script><script type=text/javascript src=./static/js/app.df71c118ee9591b222d9.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.e561cb9aa4c60da929d7ed9a723a2a46.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.e561cb9aa4c60da929d7ed9a723a2a46.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/workPage.616b384009f755b79a05f47998125cb7.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/workPage.616b384009f755b79a05f47998125cb7.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/workPage.91a4a1baa0e76d9a14a8d9811829bb2f.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.df71c118ee9591b222d9.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.df71c118ee9591b222d9.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.23ea04dc469b57e2b4f8.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage-manifest.2ece51fa34be51c8610a.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.5b6d08096e47bdf3074f.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.5b6d08096e47bdf3074f.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.d5f28b0154bea83da9f5.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.d5f28b0154bea83da9f5.js.map


+ 1 - 1
dist/workPage.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>工作页面 - CocoFlow</title><link rel=icon href=../static/logo.ico><link href=./static/css/workPage.91a4a1baa0e76d9a14a8d9811829bb2f.css rel=stylesheet></head><body><noscript><strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script type=text/javascript src=./static/js/workPage-manifest.2ece51fa34be51c8610a.js></script><script type=text/javascript src=./static/js/workPage-vendor.7b6275e4cf468b42a92b.js></script><script type=text/javascript src=./static/js/workPage.d5f28b0154bea83da9f5.js></script></body></html><script>function stopSafari() {
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>工作页面 - CocoFlow</title><link rel=icon href=../static/logo.ico><link href=./static/css/workPage.616b384009f755b79a05f47998125cb7.css rel=stylesheet></head><body><noscript><strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script type=text/javascript src=./static/js/workPage-manifest.2ece51fa34be51c8610a.js></script><script type=text/javascript src=./static/js/workPage-vendor.7b6275e4cf468b42a92b.js></script><script type=text/javascript src=./static/js/workPage.5b6d08096e47bdf3074f.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

+ 37 - 14
src/components/pages/studentManageNew/component/addstu.vue

@@ -211,11 +211,11 @@
         :show-close="false"
       >
         <div class="msgCon">
-            <img v-if="deltypy == 0" style="width: 20px;" src="../../../../assets/stuImg/duil.svg" alt="">
+            <img v-if="deltypy == 0 || deltypy == 2" style="width: 20px;" src="../../../../assets/stuImg/duil.svg" alt="">
             <img v-if="deltypy == 1" style="width: 20px;" src="../../../../assets/stuImg/tishi.svg" alt="">
 
             <div class="msgContxt">
-              <div v-if="deltypy == 0">
+              <div v-if="deltypy == 0 || deltypy == 2">
                 {{ (impbox.length ? impbox[0].name : '') + lang.ssAddStuSucc.replace(/\*/g, impbox.length) }}
               </div>
               <div v-if="deltypy == 1">{{ lang.ssConfirmUpload }}?</div>
@@ -420,6 +420,10 @@ export default {
 
     // 上传Excel添加学生
     handleChange(file) {
+      if (this.uploadfileLoading) {
+        this.$message.warning(this.lang.ssUploading);
+        return;
+      }
       if (this.userSuffix == "") {
         this.$message.error(this.lang.ssGetSuffixReUp);
         this.getUser();
@@ -525,7 +529,7 @@ export default {
             return;
           }
 
-          
+          // 打开确认上传弹窗
           _this.deltypy = 1;
           _this.popBoxdia= true;
           _this.stuexcel = arr;
@@ -621,10 +625,10 @@ export default {
           class: classInfo.id,
         };
       });
-
-      this.accUpdate(box);
+      // 手动输入添加学生,打开弹框
+      this.accUpdate(box,0);
     },
-    async accUpdate(box) {
+    async accUpdate(box,index) {
       console.log(box, "box");
       this.uploadfileLoading = true;
       this.impbox = box;
@@ -672,8 +676,8 @@ export default {
           message: this.lang.ssAddOk,
           type: "success",
         });
-
-        this.deltypy = 0;
+        // excel与手动上传,上传完毕,打开弹框
+        this.deltypy = index;
         this.popBoxdia= true;
         // this.addStuVisible = false;
         console.log('this.selectedStuData',this.selectedStuData);
@@ -681,6 +685,12 @@ export default {
         // this.selectedStuData = [];
         this.$emit("getCascaderData");
         this.addOp3('1', "", { type: "student_add" }, "success")
+      } catch (err) {
+        console.error(err);
+        // 业务错误已在 uploadBatch / uploadBatchAccount 中提示
+        if (!err || !err.business) {
+          this.$message.error(this.lang.Additionfailed);
+        }
       } finally {
         this.uploadfileLoading = false;
       }
@@ -717,8 +727,10 @@ export default {
             }
             if (z == 2) {
               console.log("添加成功");
+              resolve(res);
+            } else {
+              reject({ business: true, res });
             }
-            resolve(res);
           })
           .catch((err) => {
             console.error(err);
@@ -758,8 +770,10 @@ export default {
             }
             if (z == 2) {
               console.log("添加成功");
+              resolve(res);
+            } else {
+              reject({ business: true, res });
             }
-            resolve(res);
           })
           .catch((err) => {
             console.error(err);
@@ -770,18 +784,27 @@ export default {
     },
     confirmDelStu(){
           // this.addStuVisible = false;
-          if (this.deltypy == 0) {
+          if (this.deltypy == 0 || this.deltypy == 2) {    //上传完毕,关闭弹窗
             this.impbox = []
             this.selectedStuData = [];
-          }else if (this.deltypy == 1) {
-            this.uploadfileLoading = true;
-            this.accUpdate(this.stuexcel);
+            // 关闭弹窗
+            if(this.deltypy == 2){    //excel上传,关闭弹窗
+              this.stuexcel = [];
+              this.addStuVisible = false;
+            }
+          }else if (this.deltypy == 1) {     //excel上传,提示是否继续上传
+            if (this.uploadfileLoading) {
+              this.$message.warning(this.lang.ssUploading);
+              return;
+            }
+            this.accUpdate(this.stuexcel,2);
           }
           this.popBoxdia= false;
     },
     closePop(){
       this.popBoxdia= false;
       if (this.deltypy == 1) {
+        // excel上传,清空数据
         this.stuexcel = []
       }
     },

+ 12 - 8
src/components/pages/workPage/components/kwlPage.vue

@@ -63,7 +63,9 @@
       </div>
     </el-dialog>
 
-    <!-- KWL 三列 -->
+    <!-- KWL 三列 
+            @keyup.enter="addItem('know')"
+     -->
     <div class="kwlColumns">
       <!-- K - 已知 -->
       <div class="kwlColumn kwlColKnow">
@@ -82,13 +84,14 @@
             v-model="newKnow"
             class="kwlInput"
             :placeholder="work.kplaceholder ? work.kplaceholder : lang.ssKWLAddPlaceholder"
-            @keyup.enter="addItem('know')"
           />
           <button class="kwlAddBtn kwlAddBtnKnow" @click="addItem('know')">+</button>
         </div>
       </div>
 
-      <!-- W - 想知 -->
+      <!-- W - 想知
+        @keyup.enter="addItem('want')"
+      -->
       <div class="kwlColumn kwlColWant">
         <div class="kwlColTitle kwlColTitleWant">{{ lang.ssKWLColWant }}</div>
         <div class="kwlColBody">
@@ -105,13 +108,14 @@
             v-model="newWant"
             class="kwlInput"
             :placeholder="work.wplaceholder ? work.wplaceholder : lang.ssKWLAddPlaceholder"
-            @keyup.enter="addItem('want')"
           />
           <button class="kwlAddBtn kwlAddBtnWant" @click="addItem('want')">+</button>
         </div>
       </div>
 
-      <!-- L - 已学 -->
+      <!-- L - 已学
+        @keyup.enter="addItem('learned')"
+      -->
       <div class="kwlColumn kwlColLearn">
         <div class="kwlColTitle kwlColTitleLearn">{{ lang.ssKWLColLearn }}</div>
         <div class="kwlColBody">
@@ -128,7 +132,6 @@
             v-model="newLearned"
             class="kwlInput"
             :placeholder="work.lplaceholder ? work.lplaceholder : lang.ssKWLAddPlaceholder"
-            @keyup.enter="addItem('learned')"
           />
           <button class="kwlAddBtn kwlAddBtnLearn" @click="addItem('learned')">+</button>
         </div>
@@ -818,10 +821,11 @@ export default {
 
 .kwlInput {
   flex: 1;
-  border: none;
+  border: 1px solid #eee;
+  border-radius: 5px;
   outline: none;
   font-size: .8125rem;
-  padding: .375rem 0;
+  padding: .375rem;
   background: transparent;
   color: #333;
 }

Some files were not shown because too many files changed in this diff