Browse Source

修复合并乐团问题

wolyshaw 4 years ago
parent
commit
b1b96f6b94

+ 4 - 0
src/views/teamBuild/components/merge-music.vue

@@ -121,6 +121,10 @@ export default {
           allId = allId.concat(item)
         }
       }
+      if (!allId.length) {
+        this.$message.error('请至少选择一个需要合并的学生')
+        return
+      }
       try {
         await this.$confirm('是否确认合并乐团?', '提示', {
           type: 'warning'

+ 1 - 1
src/views/teamBuild/components/select-msic.vue

@@ -129,7 +129,7 @@ export default {
           page: this.rules.page,
           ...this.search
         })
-        this.tableData = res.data.rows
+        this.tableData = res.data.rows.filter(item => item.id !== this.$route.query.id)
           this.rules.total = res.data.total
       } catch (error) {}
     },

+ 5 - 1
src/views/teamBuild/components/teamSoundSet.vue

@@ -33,7 +33,7 @@
         创建缴费
         <el-dropdown-menu slot="dropdown">
           <el-dropdown-item>
-            <el-button @click="$emit('chiosetab', 3)" type="text">选择乐团</el-button>
+            <el-button @click="selectMusic" type="text">选择乐团</el-button>
           </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
@@ -117,6 +117,10 @@ export default {
     submitAudit (val) {
       this.$refs.soundSetCore.submitInfo(val);
     },
+    selectMusic() {
+      this.$refs.soundSetCore.submitInfo()
+      this.$emit('chiosetab', 3)
+    },
     getNumber (chioseSoundNum, PlannedCount) {
       this.chioseSoundNum = chioseSoundNum;
       this.PlannedCount = PlannedCount;