lex-xin 4 年 前
コミット
a24b0f4262

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/index.html


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/chunk-061f3314.ea3ece09.css


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/chunk-614c3733.96b84cb2.css


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.0c8f49a1.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.caa07ad8.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-061f3314.3200a5d3.js


+ 4 - 5
src/views/teamDetail/componentCourse/addCompound.vue

@@ -253,13 +253,10 @@ export default {
         this.$message.error("请选择相同的课程时长");
         return
       }
-      let isclassGroup;
       let isNotStart = false;
-      let arr = [];
       let  idList =[];
       this.dataList.forEach((course) => {
         idList.push(course.id)
-        arr.push(course.musicGroupId);
         if (course.status != "NOT_START") {
           isNotStart = true;
         }
@@ -268,8 +265,10 @@ export default {
         this.$message.error("请选择未开始的课程");
         return;
       }
-
-      if ((arr = [...new Set(arr)].length != 1)) {
+      let isEqual = this.dataList.every(coures=>{
+        return coures.musicGroupId==this.dataList[0].musicGroupId&&coures.groupType==this.dataList[0].groupType
+      })
+      if (!isEqual) {
         this.$message.error("请选择相同的课程组");
         return;
       }

+ 43 - 33
src/views/teamDetail/teamCourseList.vue

@@ -52,9 +52,9 @@
         </el-form-item>
         <el-form-item>
           <remote-search
-              :commit="'setTeachers'"
-              v-model="searchForm.teacherIdList"
-            />
+            :commit="'setTeachers'"
+            v-model="searchForm.teacherIdList"
+          />
           <!-- <el-select
             v-model.trim="searchForm.teacherIdList"
             clearable
@@ -225,7 +225,7 @@
           ref="tableList"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           @selection-change="handleSelectionChange"
-           @select='onTableSelect'
+          @select="onTableSelect"
           row-key="id"
         >
           >
@@ -629,10 +629,10 @@
       />
     </el-dialog>
     <addCompound
-    ref='addCompound'
+      ref="addCompound"
       :compoundList="deleteList"
       v-if="permission('courseSchedule/courseMerge')"
-      v-show="deleteList.length>0"
+      v-show="deleteList.length > 0"
       @clearCom="clearCom"
       @getList="getList"
       @removeCourse="removeCourse"
@@ -816,19 +816,23 @@ export default {
 
       this.$confirm("是否确认删除此数据?", "提示", {
         type: "warning",
-      }).then(() => {
-        bathDelete({ courseScheduleIds: courseScheduleIds }).then((res) => {
-          if (res.code == 200) {
-            this.$message.success("删除成功");
-            this.getList();
-          this.clearCom()
-          }
-        }).catch((e)=>{
-            this.$refs.addCompound.isLook = true
+      })
+        .then(() => {
+          bathDelete({ courseScheduleIds: courseScheduleIds })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$message.success("删除成功");
+                this.getList();
+                this.clearCom();
+              }
+            })
+            .catch((e) => {
+              this.$refs.addCompound.isLook = true;
+            });
+        })
+        .catch((e) => {
+          this.$refs.addCompound.isLook = true;
         });
-      }).catch((e) => {
-        this.$refs.addCompound.isLook = true
-      });;
     },
     reset() {
       this.searchForm = { ...initSearch };
@@ -1037,20 +1041,20 @@ export default {
       if (indexNum + "") {
         this.deleteList.splice(indexNum, 1);
       }
-      this.tableList.forEach((course,index)=>{
-        if(course.id == row.id){
-           this.$refs.tableList.toggleRowSelection(course,false);
+      this.tableList.forEach((course, index) => {
+        if (course.id == row.id) {
+          this.$refs.tableList.toggleRowSelection(course, false);
         }
-      })
-      if(this.deleteList.length <=0){
-        this.clearCom()
+      });
+      if (this.deleteList.length <= 0) {
+        this.clearCom();
       }
     },
     clearCom() {
       // this.deleteList = [];
-      this.$set(this,'deleteList',[])
+      this.$set(this, "deleteList", []);
       this.$refs.tableList.clearSelection();
-      this.$refs.addCompound.isLook = false
+      this.$refs.addCompound.isLook = false;
     },
     resetCompound(row) {
       this.$confirm("您确定取消合并该课程?", "提示", {
@@ -1099,17 +1103,23 @@ export default {
               return tableIdList.indexOf(item.id) == -1;
             }
           );
+            if (this.deleteList.length <= 0) {
+          this.clearCom();
+        }
         });
       }
     },
-   onTableSelect(rows,row){
-       let idList = this.deleteList.map((course) => {
-          return course.id;
-        });
-        if(idList.indexOf(row.id)!= -1){
-          this.deleteList.splice(idList.indexOf(row.id),1)
+    onTableSelect(rows, row) {
+      let idList = this.deleteList.map((course) => {
+        return course.id;
+      });
+      if (idList.indexOf(row.id) != -1) {
+        this.deleteList.splice(idList.indexOf(row.id), 1);
+        if (this.deleteList.length <= 0) {
+          this.clearCom();
         }
-   }
+      }
+    },
   },
   filters: {
     isCall(val) {

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません