Parcourir la source

Merge branch 'master' of http://git.dayaedu.com/molingzhide/dy-admin-manager

lex-xin il y a 5 ans
Parent
commit
24782be450

+ 10 - 0
src/api/buildTeam.js

@@ -124,4 +124,14 @@ export function getPayStatus (data) {
     params: data
 
   })
+}
+
+// 根据乐团id查询未分班的学生
+export function getNoClassStudent (data) {
+  return request({
+    url: '/web-server/studentRegistration/getNoClassStu',
+    method: 'get',
+    params: data
+
+  })
 }

+ 1 - 1
src/layout/components/Navbar.vue

@@ -67,7 +67,7 @@ export default {
     // 手动加入
     this.toggleSideBar();
     this.username = this.$store.getters.name;
-    console.log(this.$store.getters.name)
+    // console.log(this.$store.getters.name)
 
   },
   methods: {

+ 35 - 35
src/router/index.js

@@ -125,41 +125,41 @@ export const constantRoutes = [
       },
     ]
   },
-  {
-    path: '/vipBuild',
-    component: Layout,
-    meta: { title: 'vip申请' },
-    children: [{
-      path: 'baseVip',
-      component: () => import('@/views/buildVip/index'),
-      meta: { title: 'vip详情' }
-    }]
-  },
-  {
-    path: '/vipClass', // 小课
-    component: Layout,
-    meta: { title: 'vip管理' },
-    children: [
-      {
-        path: 'vipClass',
-        name: 'vipClass',
-        component: () => import('@/views/vipClass/vipList'),
-        meta: { title: 'vip课列表' }
-      },
-      {
-        path: 'vipDetail',
-        name: 'vipDetail',
-        component: () => import('@/views/vipClass/vipDetail/index'),
-        meta: { title: 'vip课详情' }
-      },
-      {
-        path: 'resetClass',
-        name: 'resetClass',
-        component: () => import('@/views/vipClass/resetClasss'),
-        meta: { title: '调整记录' }
-      }
-    ]
-  },
+  // {
+  //   path: '/vipBuild',
+  //   component: Layout,
+  //   meta: { title: 'vip申请' },
+  //   children: [{
+  //     path: 'baseVip',
+  //     component: () => import('@/views/buildVip/index'),
+  //     meta: { title: 'vip详情' }
+  //   }]
+  // },
+  // {
+  //   path: '/vipClass', // 小课
+  //   component: Layout,
+  //   meta: { title: 'vip管理' },
+  //   children: [
+  //     {
+  //       path: 'vipClass',
+  //       name: 'vipClass',
+  //       component: () => import('@/views/vipClass/vipList'),
+  //       meta: { title: 'vip课列表' }
+  //     },
+  //     {
+  //       path: 'vipDetail',
+  //       name: 'vipDetail',
+  //       component: () => import('@/views/vipClass/vipDetail/index'),
+  //       meta: { title: 'vip课详情' }
+  //     },
+  //     {
+  //       path: 'resetClass',
+  //       name: 'resetClass',
+  //       component: () => import('@/views/vipClass/resetClasss'),
+  //       meta: { title: '调整记录' }
+  //     }
+  //   ]
+  // },
   {
     path: '/teacher',
     component: Layout,

+ 2 - 1
src/views/teamBuild/components/teamSoundMoney.vue

@@ -479,7 +479,8 @@ export default {
       obj.musicGroupSubjectPlans = [];
       for (let i in this.activeSoundList) {
         let item = {};
-        item.applyStudentNum = this.activeSoundList[i].jihua;
+        // expectedStudentNum
+        item.expectedStudentNum = this.activeSoundList[i].jihua;
         item.fee = this.activeSoundList[i].yuji;
         item.kitGroupPurchaseType = this.activeSoundList[i].fangshi;
         item.subName = this.activeSoundList[i].sound;

+ 60 - 40
src/views/teamBuild/teamSeting/components/setClass.vue

@@ -37,7 +37,8 @@
       <div class="centerInfo">
         <p>当前班级总数(个):30</p>
         <div class="btnWrap">
-          <div class="setBtn">设置单技课班</div>
+          <div class="setBtn"
+               @click="setSingleClass">设置单技课班</div>
           <div class="okBtn">确定</div>
         </div>
       </div>
@@ -69,40 +70,29 @@
                :visible.sync="classVisible">
       <div class="classMaskWrap">
         <div class="maskLeft">
-          <h3>声部 已选XXX
+          <h3>声部 已选{{ soundSize }}
           </h3>
           <el-checkbox-group v-model="maskList.subjectCheckList"
-                             class='checkGroup'>
-            <el-checkbox :label="1">长笛</el-checkbox>
-            <el-checkbox :label="1">长笛</el-checkbox>
-            <el-checkbox :label="1">长笛</el-checkbox>
-            <el-checkbox :label="1">长笛</el-checkbox>
+                             class='checkGroup'
+                             @change="chioseSound">
+            <el-checkbox v-for="(item,index) in leftList"
+                         :key="index"
+                         :label="item.subjectId">{{ item.subName }}</el-checkbox>
           </el-checkbox-group>
         </div>
         <div class="maskRight">
-          <div class="rightGroup">
-            <h3>长笛的学员名单 <el-checkbox :indeterminate="maskList.isIndeterminate"
-                           v-model="maskList.checkAll"
-                           @change="handleCheckAllChange">全选</el-checkbox>
+          <div class="rightGroup"
+               v-for="(item,index) in studentsGroup"
+               :key='index'>
+            <h3>{{item.subjectName}}的学员名单 <el-checkbox v-model="maskList.studentsGroup[index]"
+                           @change="handleCheckAllChange(item.rows)">全选</el-checkbox>
             </h3>
-            <el-checkbox-group v-model="maskList.checkList"
+            <el-checkbox-group v-model="maskList.checkList[index]"
                                @change="handleCheckedCitiesChange"
                                class='checkGroup'>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
-              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox v-for="(stu,num) in item.rows"
+                           :key='num'
+                           :label="stu.id">{{ stu.name }}</el-checkbox>
             </el-checkbox-group>
           </div>
 
@@ -115,10 +105,10 @@
             <el-input></el-input>
           </el-form-item>
           <el-form-item label="已选声部">
-            <el-input disabled="true"></el-input>
+            <el-input :disabled="true"></el-input>
           </el-form-item>
           <el-form-item label="班级人数">
-            <el-input disabled="true"></el-input>
+            <el-input :disabled="true"></el-input>
           </el-form-item>
         </el-form>
       </div>
@@ -149,7 +139,7 @@
   </div>
 </template>
 <script>
-import { getTeamRecruit, getSingleClass } from "@/api/buildTeam"
+import { getTeamRecruit, getSingleClass, getNoClassStudent } from "@/api/buildTeam"
 export default {
   props: {
     teamid: {
@@ -160,7 +150,7 @@ export default {
   data () {
     return {
       classVisible: false, // 班级设置弹窗
-      allVisible: true, // 合奏班弹窗设置
+      allVisible: false, // 合奏班弹窗设置
       leftList: [],
       centertList: [],
       rightList: [],
@@ -169,31 +159,61 @@ export default {
         checkList: [],
         checkAll: false,
         isIndeterminate: false,
+        studentsGroup: []
       },
       allMaskList: {
         signClassList: []
-      }
+      },
+      soundSize: 0,
+      studentsGroup: {} // 存储所有声部 所有学生的集合表
     }
   },
   mounted () {
-    console.log(this.teamid)
     getTeamRecruit({ musicGroupId: this.teamid }).then(res => {
+      // 获取乐团声部集合
       console.log(res);
+      if (res.code == 200) {
+        this.leftList = res.data;
+      }
     })
     getSingleClass({ musicGroupId: this.teamid }).then(res => {
       if (res.code == 200) {
-        this.leftList = res.data;
+        // 单技班列表
+        this.centerList = res.data;
       }
     })
   }, methods: {
-    handleCheckAllChange () {
-      this.checkedCities = val ? cityOptions : [];
-      this.isIndeterminate = false;
+    handleCheckAllChange (val) {
+      console.log(val);
+
+      // this.checkedCities = val ? this.maskList.checkList : [];
+      // this.isIndeterminate = false;
     },
     handleCheckedCitiesChange (val) {
-      let checkedCount = value.length;
-      this.checkAll = checkedCount === this.cities.length;
-      this.maskList.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
+      // let checkedCount = value.length;
+      // this.checkAll = checkedCount === this.cities.length;
+      // this.maskList.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
+    },
+    setSingleClass () {
+      this.classVisible = true;
+    },
+    chioseSound (val) {
+      console.log(val);
+      this.soundSize = val.length;
+      // val 是一个数组
+      // 根据学生id和乐团id 查未报名的学生
+      //getNoClassStudent
+      // for (let i in val){
+      //   // 发请求分部获取
+      // }
+      getNoClassStudent({
+        musicGroupId: this.teamid,
+        actualSubjectId: val.join(',')
+      }).then(res => {
+        if (res.code == 200) {
+          this.studentsGroup = res.data
+        }
+      })
     }
   },
 

+ 1 - 1
src/views/teamBuild/teamSeting/index.vue

@@ -99,7 +99,7 @@ export default {
     }
   },
   created () {
-    this.id = this.$route.query.id || '191014165848001'
+    this.id = this.$route.query.id || '191015094822001'
   },
   mounted () {