Browse Source

学员调整筛选和删除班级

wolyshaw 4 years ago
parent
commit
431b117fe7

+ 11 - 4
src/views/teamDetail/components/modals/select-student.vue

@@ -23,8 +23,9 @@
               v-model="sound"
               style="width: 100%"
               clearable
+              multiple
+              collapse-tags
               filterable
-              @change="change"
               placeholder="请选择声部"
             >
               <el-option
@@ -77,7 +78,14 @@ export default {
   props: ["studentList", "soundList", "activeType", 'activeListStudent', 'isOnlyChangeUser', 'classGroupId', 'type'],
   computed: {
     data() {
-      return uniqBy([...this.studentList, ...this.activeListStudent], 'userId').map((item) => ({
+      return uniqBy([...this.studentList, ...this.activeListStudent], 'userId')
+        .filter(item => {
+          if (this.sound.length) {
+            return this.sound.includes(item.subjectId) || this.seleched.includes(item.userId)
+          }
+          return true
+        })
+        .map((item) => ({
         value: item.userId,
         key: item.userId,
         name: item.name,
@@ -128,7 +136,6 @@ export default {
       );
     },
     change(val) {
-      this.seleched = []
       this.$listeners.changeActiveChioseSound(val)
       this.$listeners.searchStudent()
     },
@@ -189,7 +196,7 @@ export default {
 }
 .hideReturn{
   /deep/ .el-transfer__buttons button:first-child{
-    display: none;
+    // display: none;
   }
 }
 /deep/ .el-checkbox-group{

+ 7 - 7
src/views/teamDetail/components/resetClass.vue

@@ -90,7 +90,7 @@
             </template>
           </el-table-column>
           <el-table-column align="center"
-                           width="200px"
+                           width="220px"
                            label="操作">
             <template slot-scope="scope">
               <div>
@@ -104,8 +104,8 @@
                            @click="classAdjustment(scope.row)">班级调整</el-button>
                 <!--<el-button type="text"
                 @click="recourse(scope.row)">重新排课</el-button>-->
-                <!-- <el-popover placement="top"
-                            width="160"
+                <el-popover placement="top"
+                            width="200"
                             :ref="`popover-${scope.$index}`">
                   <p>确定删除?</p>
                   <div style="text-align: right; margin: 0">
@@ -115,12 +115,12 @@
                     <el-button type="primary"
                                size="mini"
                                @click="removeClass(scope)">确定</el-button>
-                  </div> -->
+                  </div>
                   <!-- v-if="scope.row.type !='MIX'" -->
-                  <!-- <el-button type="text"
-                             v-if="scope.row.type != 'MUSIC_NETWORK'"
+                  <el-button type="text"
+                             v-if="scope.row.studentNum == '0' || scope.row.totalClassTimes == '0'"
                              slot="reference">删除班级</el-button>
-                </el-popover> -->
+                </el-popover>
 
                 <!-- <el-popover placement="top"
                             width="160"