Browse Source

10/22

10:47
mo 5 years ago
parent
commit
13325b2492

+ 1 - 0
package.json

@@ -22,6 +22,7 @@
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
+    "qrcodejs2": "0.0.2",
     "qs": "^6.8.0",
     "vue": "2.6.10",
     "vue-amap": "^0.5.10",

+ 6 - 2
src/App.vue

@@ -249,8 +249,6 @@ input[type="number"] {
   flex-direction: row;
   justify-content: flex-end;
   div {
-    width: 120px;
-    height: 40px;
     line-height: 40px;
     text-align: center;
     color: #fff;
@@ -259,12 +257,18 @@ input[type="number"] {
     cursor: pointer;
   }
   .nextBtn {
+    width: 120px;
+    height: 40px;
     background-color: #444;
   }
   .okBtn {
+    width: 120px;
+    height: 40px;
     background-color: #f97215;
   }
   .closeBtn {
+    width: 120px;
+    height: 40px;
     background-color: #777;
   }
 }

+ 103 - 2
src/api/buildTeam.js

@@ -207,10 +207,10 @@ export function checkAllStudent (data) {
 }
 
 
-// 获取乐团所有班级
+// 获取乐团所有班级以及老师信息
 export function getEveryClass (data) {
   return request({
-    url: '/web-server/classGroup/findAllClassGroupByMusicGroup',
+    url: '/web-server/classGroup/findMusicGroupClassTeacher',
     method: 'get',
     params: data
   })
@@ -243,4 +243,105 @@ export function getAllSignClass (data) {
     method: 'get',
     params: data
   })
+}
+
+
+// 乐团课排课
+export function workOut (data) {
+  return request({
+    url: '/web-server/courseSchedule/batchAddCourseSchedule',
+    method: 'post',
+    data
+  })
+}
+
+// 根据乐团id获取乐团声部
+export function findSound (data) {
+  return request({
+    url: '/web-server/subject/querySubByMusicGroupId',
+    method: 'get',
+    params: data
+  })
+}
+
+// 根据乐团id获取乐团老师
+
+export function findMusicGroupClassTeacher (data) {
+  return request({
+    url: '/web-server/teacher/findMusicGoupTeachers',
+    method: 'get',
+    params: data
+  })
+}
+
+
+// 乐团所有班级都排课
+export function checkCourse (data) {
+  return request({
+    url: '/web-server/courseSchedule/checkMusicGroupClassCourse',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 根据乐团id查询乐团
+// /web-server/musicGroup/get/{id}
+export function getTeamDetail (data) {
+  return request({
+    url: `/web-server/musicGroup/get/${data}`,
+    method: 'get',
+  })
+}
+
+// 新增提高班
+export function addHighClass (data) {
+  return request({
+    url: `/web-server/classGroup/addHighClass`,
+    method: 'POST',
+    data
+  })
+}
+// 获取老师默认课酬表
+export function findMusicGroupClassTeacherSalary (data) {
+  return request({
+    url: `/web-server/classGroup/findMusicGroupClassTeacherSalary`,
+    method: 'GET',
+    params: data
+  })
+}
+
+// 老师课酬确认
+export function setClassGroupTeacherSalary (data) {
+  return request({
+    url: `/web-server/classGroup/setClassGroupTeacherSalary`,
+    method: 'post',
+    data
+  })
+}
+
+// 根据乐团id查询乐团详情
+export function getMusicGroup (data) {
+  return request({
+    url: `/web-server/musicGroup/get`,
+    method: 'get',
+    params: data
+  })
+}
+
+// 根据乐团id获取乐团流程
+export function getMusicGroupProcess (data) {
+  return request({
+    url: `/web-server/recharge/findAll`,
+    method: 'get',
+    params: data
+  })
+}
+
+// 乐团管理 老师列表
+export function getTeamTeacherList (data) {
+  return request({
+    url: `/web-server/teacher/queryMusicGroupTeachers`,
+    method: 'get',
+    params: data
+  })
 }

+ 4 - 4
src/api/silder.js

@@ -5,7 +5,7 @@ import qs from 'qs'
 // 增加菜单栏
 export function addSilder (data) {
   return request({
-    url: '/api-auth/menu/add',
+    url: '/auth-server/menu/add',
     method: 'put',
     data
   })
@@ -14,21 +14,21 @@ export function addSilder (data) {
 // 查询菜单栏
 export function getSilder () {
   return request({
-    url: '/api-auth/menu/findByUser',
+    url: '/auth-server/menu/findByUser',
     method: 'get'
   })
 }
 // 删除菜单
 export function deleteSilder (id) {
   return request({
-    url: `/api-auth/menu/del/${id}`,
+    url: `/auth-server/menu/del/${id}`,
     method: 'DELETE'
   })
 }
 // 修改菜单
 export function resetSilder (data) {
   return request({
-    url: `/api-auth//menu/update`,
+    url: `/auth-server//menu/update`,
     method: 'PUT',
     data
   })

+ 102 - 102
src/api/systemManage.js

@@ -4,156 +4,156 @@ import qs from 'qs'
 
 // 新增合作单位(教学点)
 export function cooperationOrganAdd (data) {
-    return request({
-      url: '/web-server/cooperationOrgan/add',
-      method: 'post',
-      data: qs.stringify(data)
-    })
+  return request({
+    url: '/web-server/cooperationOrgan/add',
+    method: 'post',
+    data: qs.stringify(data)
+  })
 }
 
 // 修改合作单位(教学点)
 export function cooperationOrganUpdate (data) {
-    return request({
-      url: '/web-server/cooperationOrgan/update',
-      method: 'put',
-      data: qs.stringify(data)
-    })
+  return request({
+    url: '/web-server/cooperationOrgan/update',
+    method: 'put',
+    data: qs.stringify(data)
+  })
 }
 
 // 分页查询合作单位(教学点)列表
 export function queryPage (data) {
-    return request({
-      url: '/web-server/cooperationOrgan/queryPage',
-      method: 'get',
-      params: data
-    })
+  return request({
+    url: '/web-server/cooperationOrgan/queryPage',
+    method: 'get',
+    params: data
+  })
 }
 
 // 根据机构编号获取合作单位(教学点)列表
 export function queryByOrganId (data) {
-    return request({
-      url: '/web-server/cooperationOrgan/queryByOrganId',
-      method: 'get',
-      params: data
-    })
+  return request({
+    url: '/web-server/cooperationOrgan/queryByOrganId',
+    method: 'get',
+    params: data
+  })
 }
 
 // 分页查询教学点
-export function schoolQueryPage(data) {
-    return request({
-        url: '/web-server/school/queryPage',
-        method: 'get',
-        params: data
-    })
+export function schoolQueryPage (data) {
+  return request({
+    url: '/web-server/school/queryPage',
+    method: 'get',
+    params: data
+  })
 }
 // 新增教学点
-export function schoolAdd(data) {
-    return request({
-        url: '/web-server/school/add',
-        method: 'post',
-        data: qs.stringify(data)
-    })
+export function schoolAdd (data) {
+  return request({
+    url: '/web-server/school/add',
+    method: 'post',
+    data: qs.stringify(data)
+  })
 }
 // 修改教学点
-export function schoolUpdate(data) {
-    return request({
-        url: '/web-server/school/update',
-        method: 'post',
-        data: qs.stringify(data)
-    })
+export function schoolUpdate (data) {
+  return request({
+    url: '/web-server/school/update',
+    method: 'post',
+    data: qs.stringify(data)
+  })
 }
 // 修改教学点
-export function schoolDel(data) {
-    return request({
-        url: `/web-server/school/del/${data.id}`,
-        method: 'post'
-    })
+export function schoolDel (data) {
+  return request({
+    url: `/web-server/school/del/${data.id}`,
+    method: 'post'
+  })
 }
 
 // 根据部门获取下面的员工
-export function queryEmployByOrganId(data) {
-    return request({
-        url: `/web-server/employee/queryEmployByOrganId`,
-        method: 'get',
-        params: data
-    })
+export function queryEmployByOrganId (data) {
+  return request({
+    url: `/web-server/employee/queryEmployByOrganId`,
+    method: 'get',
+    params: data
+  })
 }
 
 // 新增员工
-export function employeeAdd(data) {
-    return request({
-        url: `/web-server/employee/add`,
-        method: 'post',
-        data: data
-    })
+export function employeeAdd (data) {
+  return request({
+    url: `/web-server/employee/add`,
+    method: 'post',
+    data: data
+  })
 }
 // 修改员工
-export function employeeUpdate(data) {
-    return request({
-        url: `/web-server/employee/update`,
-        method: 'post',
-        data: data
-    })
+export function employeeUpdate (data) {
+  return request({
+    url: `/web-server/employee/update`,
+    method: 'post',
+    data: data
+  })
 }
 
 // 获取用户角色列表
-export function getUserRole(data) {
-    return request({
-        url: `/api-auth/role/queryPage`,
-        method: 'get',
-        params: data
-    })
+export function getUserRole (data) {
+  return request({
+    url: `/auth-server/role/queryPage`,
+    method: 'get',
+    params: data
+  })
 }
 
 // 员工操作
-export function employeeOperate(data) {
-    return request({
-        url: '/web-server/employee/employeeOperate',
-        method: 'post',
-        data: qs.stringify(data)
-    })
+export function employeeOperate (data) {
+  return request({
+    url: '/web-server/employee/employeeOperate',
+    method: 'post',
+    data: qs.stringify(data)
+  })
 }
 
 // 分页查询角色列表
-export function roleQueryPage(data) {
-    return request({
-        url: `/api-auth/role/queryPage`,
-        method: 'get',
-        params: data
-    })
+export function roleQueryPage (data) {
+  return request({
+    url: `/auth-server/role/queryPage`,
+    method: 'get',
+    params: data
+  })
 }
 
 // 根据角色编号查询拥有的菜单列表
-export function roleGetMenus(data) {
-    return request({
-        url: `/api-auth/role/getMenus`,
-        method: 'get',
-        params: data
-    })
+export function roleGetMenus (data) {
+  return request({
+    url: `/auth-server/role/getMenus`,
+    method: 'get',
+    params: data
+  })
 }
 
 // 根据权限id查询角色
-export function getRoleInfo(data) {
-    return request({
-        url: `/api-auth/role/${data.id}`,
-        method: 'get'
-    })
+export function getRoleInfo (data) {
+  return request({
+    url: `/auth-server/role/${data.id}`,
+    method: 'get'
+  })
 }
 
 // 修改角色
-export function roleUpdate(data) {
-    return request({
-        url: `/api-auth/role/update`,
-        method: 'post',
-        data: data
-    })
+export function roleUpdate (data) {
+  return request({
+    url: `/auth-server/role/update`,
+    method: 'post',
+    data: data
+  })
 }
 
 // 添加角色
-export function roleAdd(data) {
-    return request({
-        url: `/api-auth/role/add`,
-        method: 'post',
-        data: data
-    })
+export function roleAdd (data) {
+  return request({
+    url: `/auth-server/role/add`,
+    method: 'post',
+    data: data
+  })
 }

+ 3 - 3
src/api/user.js

@@ -3,7 +3,7 @@ import qs from 'qs'
 
 export function login (data) {
   return request({
-    url: '/api-auth/usernameLogin',
+    url: '/auth-server/usernameLogin',
     // url: '/user/login',
     method: 'post',
     data: qs.stringify(data)
@@ -12,14 +12,14 @@ export function login (data) {
 
 export function getInfo () {
   return request({
-    url: '/api-auth/api/queryUserInfo',
+    url: '/auth-server/api/queryUserInfo',
     method: 'get'
   })
 }
 // 登出
 export function logout (data) {
   return request({
-    url: '/api-auth/exit',
+    url: '/auth-server/exit',
     method: 'post',
     data: qs.stringify(data)
   })

+ 2 - 2
src/layout/components/Sidebar/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div :class="{'has-logo':showLogo}">
     <logo v-if="showLogo"
-          :collapse="isCollapse" />
+          :collapse="false" />
     <el-scrollbar wrap-class="scrollbar-wrapper">
       <el-menu :default-active="activeMenu"
-               :collapse="isCollapse"
+               :collapse="false"
                :background-color="variables.menuBg"
                :text-color="variables.menuText"
                :unique-opened="false"

+ 10 - 11
src/utils/request.js

@@ -74,23 +74,22 @@ service.interceptors.response.use(
   res => {
     //res.code !== 200
     let data = JSON.parse(JSON.stringify(res.data))
+    // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
+    if (res.code == 401 || res.code == 403) {
+      this.$message({
+        message: '登录超时请重新登录',
+        type: 'warning'
+      })
+      store.dispatch('user/resetToken').then(() => {
+        location.reload()
+      })
+    }
     if (data.code != 200) {
       Message({
         message: data.msg || `请求失败code码为${res.code}`,
         type: 'error',
         duration: 5 * 1000
       })
-      console.log(res)
-      // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
-      if (res.code == 401 || res.code == 403) {
-        this.$message({
-          message: '登录超时请重新登录',
-          type: 'warning'
-        })
-        store.dispatch('user/resetToken').then(() => {
-          location.reload()
-        })
-      }
       tryHideFullScreenLoading()
       return Promise.reject(new Error(res.msg || 'Error'))
     } else {

+ 91 - 75
src/utils/vueFilter.js

@@ -2,119 +2,135 @@ import Vue from 'vue'
 
 // 合并数组
 Vue.filter('joinArray', (value, type) => {
-    if (!type) {
-        type = ' '
-    }
-    if (typeof value == 'object' && value != null) {
-        return value.join(type)
-    } else {
-        return value
-    }
+  if (!type) {
+    type = ' '
+  }
+  if (typeof value == 'object' && value != null) {
+    return value.join(type)
+  } else {
+    return value
+  }
 })
 
 // 合并数组
 Vue.filter('jobNature', (value) => {
-    let template = {
-        PART_TIME: "兼职",
-        FULL_TIME: "全职",
-        TEMPORARY: "零时工"
-    }
-    return template[value]
+  let template = {
+    PART_TIME: "兼职",
+    FULL_TIME: "全职",
+    TEMPORARY: "零时工"
+  }
+  return template[value]
 })
 
 // 合作单位
 Vue.filter('branchType', (value) => {
-    let template = {
-        OWN: "自有",
-        COOPERATION: "合作",
-        LEASE: "租赁"
-    }
-    return template[value]
+  let template = {
+    OWN: "自有",
+    COOPERATION: "合作",
+    LEASE: "租赁"
+  }
+  return template[value]
 })
 
 // 商品类型
 Vue.filter('shopType', (value) => {
-    let template = {
-        "INSTRUMENT": "乐器",
-        "ACCESSORIES": "辅件",
-        "TEACHING": "教材",
-        "STAFF": "教谱",
-        "OTHER": "其它",
-    }
-    return template[value]
+  let template = {
+    "INSTRUMENT": "乐器",
+    "ACCESSORIES": "辅件",
+    "TEACHING": "教材",
+    "STAFF": "教谱",
+    "OTHER": "其它",
+  }
+  return template[value]
 })
 
 // 乐团状态
 Vue.filter('musicGroupType', (value) => {
-    let template = {
-        APPLY: '报名中',
-        PAY: '缴费中',
-        PREPARE: '筹备中',
-        UNDERWAY: '进行中',
-        CANCELED: '取消'
-    }
-    return template[value]
+  let template = {
+    APPLY: '报名中',
+    PAY: '缴费中',
+    PREPARE: '筹备中',
+    UNDERWAY: '进行中',
+    CANCELED: '取消'
+  }
+  return template[value]
 })
 
 // 乐团学员状态
 Vue.filter('musicGroupStudentType', (value) => {
-    let template = {
-        NORMAL: "在读", 
-        LEAVE: "请假", 
-        QUIT: "退团"
-    }
-    return template[value]
+  let template = {
+    NORMAL: "在读",
+    LEAVE: "请假",
+    QUIT: "退团"
+  }
+  return template[value]
 })
 
 // 乐团学员状态
 Vue.filter('instrumentType', (value) => {
-    let template = {
-        GROUP: "团购", 
-        OWNED: "自备", 
-        LEASE: "租赁"
-    }
-    return template[value]
+  let template = {
+    GROUP: "团购",
+    OWNED: "自备",
+    LEASE: "租赁"
+  }
+  return template[value]
 })
 
 // 课程类型
 Vue.filter('coursesType', (value) => {
-    let template = {
-        NORMAL: "单技课", 
-        MIX: "合奏课", 
-        HIGH: "小班课",
-        VIP: "VIP课",
-        DEMO: "试听课"
-    }
-    return template[value]
+  let template = {
+    NORMAL: "单技课",
+    MIX: "合奏课",
+    HIGH: "小班课",
+    VIP: "VIP课",
+    DEMO: "试听课",
+    SINGLE: "单技课",
+    COMPREHENSIVE: "综合课",
+    PRACTICE: "练习课",
+    ENLIGHTENMENT: "启蒙课",
+    TRAINING: '集训课'
+
+
+  }
+  return template[value]
 })
 
 // 课程状态
 Vue.filter('coursesStatus', (value) => {
-    let template = {
-        NOT_START: "未开始", 
-        UNDERWAY: "进行中", 
-        OVER: "已结束"
-    }
-    return template[value]
+  let template = {
+    NOT_START: "未开始",
+    UNDERWAY: "进行中",
+    OVER: "已结束"
+  }
+  return template[value]
 })
 
 // 考勤类型
 Vue.filter('clockingIn', value => {
-    let templateStatus = {
-        NORMAL: "正常",
-        TRUANT: "旷课",
-        LEAVE: "请假",
-        QUIT_SCHOOL: "休学",
-        DROP_OUT: "退学"
-    }
-    return templateStatus[value]
+  let templateStatus = {
+    NORMAL: "正常",
+    TRUANT: "旷课",
+    LEAVE: "请假",
+    QUIT_SCHOOL: "休学",
+    DROP_OUT: "退学"
+  }
+  return templateStatus[value]
 })
 
 // 时间处理
 Vue.filter('formatTimer', (value) => {
-    if (value) {
-        return value.split(' ')[0]
-    } else {
-        return value
-    }
+  if (value) {
+    return value.split(' ')[0]
+  } else {
+    return value
+  }
+})
+
+// 上课类型
+Vue.filter('workType', value => {
+  let template = {
+    TEACHING: "助教",
+    BISHOP: "主教"
+  }
+  return template[value]
 })

+ 4 - 4
src/views/buildVip/index.vue

@@ -656,8 +656,8 @@ export default {
           this.timeTable.push({
             'classDate': dataStr + ' 00:00:00',
             'actualTeacherId': this.leftForm.teacher,
-            'startClassTime': dataStr + ' ' + onlineList[i].date.startTime + ':00',
-            "endClassTime": dataStr + ' ' + onlineList[i].date.endTime + ':00',
+            'startClassTime': onlineList[i].date.startTime,
+            "endClassTime": onlineList[i].date.endTime,
             "teachMode": 'ONLINE'
           })
           online--;
@@ -677,8 +677,8 @@ export default {
           this.timeTable.push({
             'classDate': dataStr + ' 00:00:00',
             'actualTeacherId': this.leftForm.teacher,
-            'startClassTime': dataStr + ' ' + offlineList[i].date.startTime + ':00',
-            "endClassTime": dataStr + ' ' + offlineList[i].date.endTime + ':00',
+            'startClassTime': offlineList[i].date.startTime,
+            "endClassTime": offlineList[i].date.endTime,
             "teachMode": 'OFFNLINE'
           })
           offline--;

+ 408 - 72
src/views/teamBuild/teamSeting/components/coursePlan.vue

@@ -15,7 +15,7 @@
                        :label="item.name"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="排课起始时间"
+        <el-form-item label="排课时间"
                       prop="time">
           <!-- value-format="yyyy-MM-dd" -->
           <el-date-picker v-model="leftFrom.time"
@@ -50,7 +50,7 @@
             <el-time-select placeholder="结束"
                             v-model="item.endTime"
                             :picker-options="{
-                            start: '08:30',
+                            start: '06:30',
                             step: '00:15',
                             end: '23:30',
                             minTime: item.startTime
@@ -60,11 +60,14 @@
         </el-checkbox-group>
         <div class="holidayWrap">
           <el-checkbox v-model="isholiday">跳过节假日</el-checkbox>
+          <div class="quickBtn"
+               @click="classCard">一件排课</div>
         </div>
         <div class="btnWrap">
-          <div class="closeBtn">取消排课</div>
+          <div class="closeBtn"
+               @click='resetaLL'>取消排课</div>
           <div class="okBtn"
-               @click="classCard">一件排课</div>
+               @click="submitCardList">确定</div>
         </div>
       </div>
 
@@ -78,7 +81,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="dateString"
+        <el-table-column prop="classDate"
                          label="日期"
                          width="180">
         </el-table-column>
@@ -86,9 +89,13 @@
                          label="星期"
                          width="180">
         </el-table-column>
-        <el-table-column prop="type"
-                         label="课程类型"
+        <el-table-column label="课程类型"
                          width="180">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.type |coursesType }}
+            </div>
+          </template>
         </el-table-column>
         <el-table-column prop="name"
                          label="课程名称"
@@ -102,22 +109,96 @@
                          width="180">
           <template slot-scope="scope">
             <div>
-              <el-button type="text">展开</el-button>
-              <el-button type="text">修改</el-button>
+              <el-button type="text"
+                         @click="OpenSign(scope.row)">展开</el-button>
+              <el-button type="text"
+                         @click='resetMixCourse(scope.row)'>修改</el-button>
             </div>
           </template>
         </el-table-column>
       </el-table>
       <div class="btnWrap"
            style="margin-top:40px;">
-        <div class="nextBtn">下一步</div>
-        <div class="okBtn">确定</div>
+        <div class="nextBtn"
+             @click='gotoNext'>下一步</div>
+        <div class="okBtn">返回</div>
       </div>
     </div>
+    <el-dialog :visible.sync="resetAllClassVisible"
+               width="450px">
+      <p style='margin-bottom:20px'>{{resetAllTitle}}</p>
+      <div class="resetWrap">
+        <!-- signBtnActive: false,
+      skipBtnActive: false -->
+        <div class="restBtn"
+             :class="signBtnActive?'active':''"
+             v-if='buttonType == "SINGLE"'
+             @click="resetClass">修改为合奏课</div>
+        <!--  -->
+        <div class="restBtn"
+             v-if='buttonType == "MIX"'
+             :class="signBtnActive?'active':''"
+             @click="resetClass">修改为单技课</div>
+        <div class="restBtn"
+             @click='skipClass'
+             :class="skipBtnActive?'active':''">跳过此天</div>
+      </div>
+      <span slot="footer"
+            class="dialog-footer">
+        <div class="okBtns"
+             @click="resetMix">确定</div>
+      </span>
+    </el-dialog>
+    <el-dialog :visible.sync="openSignListVisible"
+               width="450px">
+      <el-table :data='SignList'>
+        <el-table-column prop="name"
+                         label="班级">
+        </el-table-column>
+        <el-table-column prop="startClassTime"
+                         label="开始时间">
+          <template slot-scope="scope">
+            <div>
+              <p v-if="scope.row.option == 1">{{scope.row.startClassTimeStr  }}</p>
+              <el-input v-if="scope.row.option == 2"
+                        v-model="scope.row.startClassTimeStr"></el-input>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="endClassTimeStr"
+                         label="结束时间">
+          <template slot-scope="scope">
+            <div>
+              <p v-if="scope.row.option == 1">{{scope.row.endClassTimeStr  }}</p>
+              <el-input v-if="scope.row.option == 2"
+                        v-model="scope.row.endClassTimeStr"></el-input>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="date"
+                         label="操作">
+          <template slot-scope="scope">
+            <div>
+              <el-button type="text"
+                         v-if="scope.row.option == 2"
+                         @click="savecolumn(scope.row)">保存</el-button>
+              <el-button type="text"
+                         v-if="scope.row.option == 1"
+                         @click="savecolumn(scope.row)">修改</el-button>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <span slot="footer"
+            class="dialog-footer">
+        <div class="okBtns"
+             @click="resetSiginClass">确定</div>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
-import { getAllClass, getAllSignClass } from '@/api/buildTeam'
+import { getAllClass, getAllSignClass, workOut, checkCourse } from '@/api/buildTeam'
 import axios from 'axios'
 import qs from 'qs'
 export default {
@@ -129,6 +210,9 @@ export default {
   },
   data () {
     return {
+      resetAllClassVisible: false, //修改合奏课弹窗
+      openSignListVisible: false, // 修改单个单技课的弹窗
+      first: true,
       leftFrom: {
         all: '',
         time: '',
@@ -192,7 +276,13 @@ export default {
         all: [{ required: true, message: '请输选择合奏班', trigger: 'blur' }],
         time: [{ required: true, message: '请选择排课时间', trigger: 'blur' }],
         num: [{ required: true, message: '请输入排课次数', trigger: 'blur' }]
-      }
+      },
+      resetAllTitle: '', // 弹窗名
+      buttonType: '',
+      activeTime: '', // 选中的当前时间课
+      signBtnActive: false,
+      skipBtnActive: false,
+      SignList: [] // 存储当前合奏课里当天的所有单机课
     }
   },
   mounted () {
@@ -202,14 +292,9 @@ export default {
         this.maxClassList = res.data;
       }
     })
-    // getHolidays({ d: '20191016' }).then(res => {
-
-    // })
     let year = new Date().getFullYear();
     axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
       this.holidayList = Object.keys(res.data[year])
-      // this.holidayList = res.data[year]
-      // console.log(this.holidayList)
     })
 
   },
@@ -228,55 +313,8 @@ export default {
 
       let classCount = parseInt(this.leftFrom.num);
       let date = this.leftFrom.time;
-      let startWeekday = this.leftFrom.time.getDay();
-      // 第一次循环把所有要排的时间记录下来 请求接口 判断是否节假日 
-      while (classCount && classCount > 0) {
 
-        for (let i in this.checkList) {
-          let num; // 下次上课上几天后
-          this.checkList[i] - date.getDay() >= 0 ? num = this.checkList[i] : num = this.checkList[i] - date.getDay() + 7
-          let dataStr = this.getThinkDate(date, num);
-          let monthDay = this.getThinkDate(date, num, 2)
-          if (this.isholiday) {
-            if (this.holidayList.indexOf(monthDay) != -1) {
-              // 这里说明有节假日
-              continue
-            }
-          }
-          let className;
-          this.maxClassList.map(item => {
-            if (item.id == this.leftFrom.all) {
-              className = item.name;
-              return item.name
-            }
-          })
-          // 排的是合奏班 
-          this.tableList.push({
-            'dateString': dataStr,
-            'week': this.week[this.checkList[i]].name,
-            'type': 'SINGLE',
-            'id': this.leftFrom.all,
-            date,
-            'name': className,
-            'classTime': this.week[this.checkList[i]].startTime + '-' + this.week[this.checkList[i]].endTime
-          })
-          // 这里我排单技课
-          for (let j in this.activeSingleList) {
-            this.classCardList.push({
-              'classDate': dataStr,
-              'classGroupId': this.activeSingleList[j].id,
-              'startClassTime': this.week[this.checkList[i]].startTime,
-              'endClassTime': this.week[this.checkList[i]].endTime,
-              'type': 'SINGLE',
-              'mixid': this.activeSingleList[j].mixid
-            })
-          }
-          classCount--
-          if (classCount == 0) break
-        }
-      }
-      // console.log(this.tableList)
-      // 清除现在所选的值
+      this.workOut(date, classCount, this.checkList, this.leftFrom.all);
       this.$refs['leftFrom'].resetFields();
       this.week = this.$options.data().week;
       this.checkList = [];
@@ -311,9 +349,21 @@ export default {
       }
 
     },
-
     changeMixClass (val) {
       // 根据合奏班id获取合奏班下的所有单技班
+      console.log(this.first);
+      let activeVal = val;
+      if (!this.first) {
+        Object.assign(this.$data, this.$options.data());
+        getAllClass({ musicGroupId: this.teamid }).then(res => {
+          if (res.code == 200) {
+            this.maxClassList = res.data;
+          }
+        })
+        this.leftFrom.all = activeVal
+
+      }
+      this.first = false;
       this.activeSingleList = [];
       getAllSignClass({ musicGroupId: this.teamid, mixClassGroupId: val }).then(res => {
         if (res.code == 200) {
@@ -323,8 +373,258 @@ export default {
           });
         }
       })
+    },
+    resetMixCourse (row) {
+      this.resetAllClassVisible = true;
+      this.resetAllTitle = `将${row.classDate} ,${row.week}修改`;
+      this.buttonType = row.type;
+      this.activeTime = row.classDate;
+
+      // console.log(row)
+    },
+    resetClass () {
+      this.signBtnActive = !this.signBtnActive;
+    },
+    skipClass () {
+      this.skipBtnActive = !this.skipBtnActive;
+      // 选中跳过此天
+    },
+    resetMix () {
+      // 修改
+      if (this.signBtnActive) {
+        // 点击了修改单技课或者合奏课
+        let startClassTime;
+        let endClassTime;
+        if (this.buttonType == 'SINGLE') {
+          // 单技改合奏 
+          for (let i = 0; i < this.classCardList.length; i++) {
+            if (this.activeTime == this.classCardList[i].classDate) {
+              this.classCardList.splice(i, 1);
+              i--;
+            }
+          }
+          // 修改提交表里的时间
+          // 单技改合奏
+          for (let i in this.tableList) {
+            if (this.activeTime == this.tableList[i].classDate) {
+
+              this.tableList[i].type = "MIX";
+              startClassTime = this.tableList[i].startClassTime;
+              endClassTime = this.tableList[i].endClassTime;
+              // this.tableList[i].classGroupId =  this.tableList[i].id;
+              this.classCardList.push(this.tableList[i]);
+            }
+          }
+
+        } else if (this.buttonType == 'MIX') {
+          // 合奏改单技
+          for (let i in this.tableList) {
+            // console.log(this.activeTime)
+            if (this.activeTime == this.tableList[i].classDate) {
+              // console.log(this.tableList[i])
+              this.tableList[i].type = "SINGLE";
+              startClassTime = this.tableList[i].startClassTime;
+              endClassTime = this.tableList[i].endClassTime;
+            }
+          }
+          let activeTableItem = {};
+          // 修改提交表里的状态
+          for (let j = 0; j < this.classCardList.length; j++) {
+            for (let i in this.tableList) {
+              console.log(this.classCardList[j].classDate, this.tableList[i].classDate)
+              if (this.activeTime == this.classCardList[j].classDate && this.activeTime == this.tableList[i].classDate) {
+                // this.classCardList[j].type = "SINGLE";
+                // this.classCardList[j].startClassTime = startClassTime;
+                // this.classCardList[j].endClassTime = endClassTime;
+                activeTableItem = this.tableList[i];
+                this.classCardList.splice(j, 1);
+                j--
+              }
+            }
+          }
+          //添加单机班课
+          for (let z in this.activeSingleList) {
+            let obj = {
+              'classDate': activeTableItem.classDate,
+              'week': activeTableItem.week,
+              'type': 'SINGLE',
+              'id': this.activeSingleList[z].id,
+              'date': activeTableItem.date,
+              'name': this.activeSingleList[z].name,
+              'classTime': activeTableItem.classTime,
+              'startClassTimeStr': activeTableItem.startClassTimeStr,
+              'endClassTimeStr': activeTableItem.endClassTimeStr,
+              'weekNum': activeTableItem.weekNum,
+              'classGroupId': this.activeSingleList[z].id,
+            }
+            this.classCardList.push(obj);
+          }
+          console.log(this.classCardList)
+        }
+
+      }
+      if (this.skipBtnActive) {
+        // 这里是跳过此天
+        let lastTime = this.tableList[this.tableList.length - 1].date;
+        let weekNum = this.tableList[this.tableList.length - 1].weekNum;
+        let id = this.tableList[this.tableList.length - 1].id;
+        let startClassTime = this.tableList[this.tableList.length - 1].startClassTimeStr;
+        let endClassTime = this.tableList[this.tableList.length - 1].endClassTimeStr;
+        for (let i in this.tableList) {
+          if (this.tableList[i].classDate == this.activeTime) {
+            this.tableList.splice(i, 1);
+          }
+        }
+        for (let j in this.classCardList) {
+          if (this.classCardList[j].classDate == this.activeTime) {
+            this.classCardList.splice(j, 1);
+          }
+        }
+        // console.log(lastTime, weekNum, id);
+        this.workOut(lastTime, 1, [weekNum], id, startClassTime, endClassTime);
+        this.$message.success('修改成功');
+      }
+      this.resetAllClassVisible = false;
+    },
+    // 排课逻辑
+    workOut (date, classCount, weekArr, id, startTime = '', endTime = '') {
+      let date1 = date;
+      while (classCount && classCount > 0) {
+        for (let i in weekArr) {
+          let num; // 下次上课上几天后
+          weekArr - date.getDay() >= 0 ? num = weekArr : num = weekArr - date.getDay() + 7
+          let dataStr = this.getThinkDate(date, num);
+          let monthDay = this.getThinkDate(date1, num, 2)
+
+          if (this.isholiday) {
+            if (this.holidayList.indexOf(monthDay) != -1) {
+              // 这里说明有节假日
+              continue
+            }
+          }
+          let className;
+          this.maxClassList.map(item => {
+            if (item.id == id) {
+              className = item.name;
+              return item.name
+            }
+          })
+          // 排的是合奏班 
+          if (!startTime) {
+            // 有这个说明是修改=> 没有说明是添加
+            if (!this.week[weekArr[i]].startTime || !this.week[weekArr[i]].endTime) {
+              // 提示 上课时间必填
+              // console.log('进入时间判断')
+              this.$message.error('勾选日期的上课时间段必填');
+              return;
+            }
+          }
+          let nowStartTime = this.week[weekArr[i]].startTime || startTime;
+          let nowEndTime = this.week[weekArr[i]].endTime || endTime;
+          this.tableList.push({
+            'classDate': dataStr,
+            'week': this.week[weekArr[i]].name,
+            'type': 'SINGLE',
+            'id': id,
+            date,
+            'name': className,
+            'classTime': nowStartTime + '-' + nowEndTime,
+            'startClassTimeStr': nowStartTime,
+            'endClassTimeStr': nowEndTime,
+            'weekNum': weekArr[i],
+            'classGroupId': id
+          })
+          // 这里我排单技课
+          for (let j in this.activeSingleList) {
+            this.classCardList.push({
+              'classDate': dataStr,
+              'classGroupId': this.activeSingleList[j].id,
+              'startClassTimeStr': nowStartTime,
+              'endClassTimeStr': nowEndTime,
+              'type': 'SINGLE',
+              'mixid': this.activeSingleList[j].mixid,
+              date,
+              'weekNum': weekArr[i],
+              'name': this.activeSingleList[j].name,
+              'option': 1
+            })
+          }
+          classCount--
+          if (classCount == 0) break
+        }
+      }
+    },
+    // 取消排课
+    resetaLL () {
+      Object.assign(this.$data, this.$options.data());
+      getAllClass({ musicGroupId: this.teamid }).then(res => {
+        if (res.code == 200) {
+          this.maxClassList = res.data;
+        }
+      })
+      let year = new Date().getFullYear();
+      axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
+        this.holidayList = Object.keys(res.data[year])
+      })
+    },
+    // 点击展开
+    OpenSign (row) {
+      let id = row.id;
+      this.SignList = [];
+      for (let i in this.classCardList) {
+        if (this.classCardList[i].mixid == row.id && this.classCardList[i].classDate == row.classDate) {
+          console.log(this.classCardList[i])
+          this.SignList.push(this.classCardList[i])
+        }
+      }
+      console.log(this.SignList);
+      this.openSignListVisible = true;
+    },
+    savecolumn (row) {
+      // console.log(row);
+      row.option == 1 ? row.option = 2 : row.option = 1
+      console.log(this.SignList);
+    },
+    // 重置单技课
+    resetSiginClass () {
+      for (let i in this.classCardList) {
+        for (let j in this.SignList) {
+          if (this.SignList[j].classDate == this.classCardList[i].classDate && this.SignList[j].classGroupId == this.classCardList[i].classGroupId) {
+            this.classCardList[i] = this.SignList[j];
+            this.$message.success('修改成功');
+            this.openSignListVisible = false;
+          }
+        }
+      }
+
+    },
+    submitCardList () {
+      console.log(this.classCardList);
+      return;
+      workOut({ musicGroupID: this.teamid, courseSchedules: this.classCardList }).then(res => {
+        if (res.code == 200) {
+          this.$message.success('恭喜您排课成功')
+        }
+      })
+    },
+    gotoNext () {
+      checkCourse({ musicGroupId: this.teamid }).then(res => {
+        if (res.code == 200) {
+          // ...跳转
+        }
+      }).catch(res => {
+        this.$message.error(res.msg)
+      })
     }
   },
+  watch: {
+    resetAllClassVisible (val) {
+      if (!val) {
+        this.signBtnActive = false;
+        this.skipBtnActive = false;
+      }
+    }
+  }
 
 }
 </script>
@@ -351,9 +651,16 @@ export default {
       margin-top: 34px;
       margin-bottom: 40px;
       display: flex;
-      flex-direction: column;
-      justify-items: center;
+      flex-direction: row;
+      justify-content: space-between;
       align-items: center;
+      .quickBtn {
+        font-size: 16px;
+        color: #f85043;
+        text-decoration: underline;
+        padding-right: 25px;
+        cursor: pointer;
+      }
     }
     .btnWrap {
       display: flex;
@@ -371,9 +678,6 @@ export default {
       .closeBtn {
         background-color: #777;
       }
-      .okBtn {
-        background-color: #14928a;
-      }
     }
   }
   .right {
@@ -405,5 +709,37 @@ export default {
       }
     }
   }
+  .resetWrap {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-around;
+    .restBtn {
+      width: 150px;
+      height: 50px;
+      background: rgba(255, 255, 255, 1);
+      border-radius: 5px;
+      border: 1px solid rgba(20, 146, 138, 1);
+      text-align: center;
+      cursor: pointer;
+      line-height: 50px;
+      color: #14928a;
+    }
+    .restBtn.active {
+      background-color: #14928a;
+      color: #fff;
+    }
+  }
+  .okBtns {
+    background-color: #f97215;
+    width: 120px;
+    height: 40px;
+    line-height: 40px;
+    text-align: center;
+    color: #fff;
+    border-radius: 4px;
+    margin-right: 20px;
+    cursor: pointer;
+    margin: 0 auto;
+  }
 }
 </style>

+ 331 - 0
src/views/teamBuild/teamSeting/components/improvementClass.vue

@@ -0,0 +1,331 @@
+<template>
+  <div class='imc'>
+    <el-form :inline="true"
+             :model="topForm"
+             ref='topForm'
+             :rules="topFormRules">
+      <el-form-item>
+        <div class="addBtn"
+             @click="addClass">添加班级</div>
+      </el-form-item>
+      <el-form-item label="提高班参考数量">
+        <el-input disabled
+                  v-model="topForm.improventClassesNum"></el-input>
+      </el-form-item>
+      <el-form-item label="排课数量"
+                    prop="count">
+        <el-input v-model="topForm.count"></el-input>
+      </el-form-item>
+      <el-form-item label="排课开始时间"
+                    prop="timer">
+        <el-date-picker v-model="topForm.timer"
+                        align="right"
+                        type="date"
+                        placeholder="选择日期"
+                        value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </el-form-item>
+    </el-form>
+    <div class="tableWrap">
+      <el-table :data="tableList">
+        <el-table-column prop="name"
+                         label="提高班名称">
+        </el-table-column>
+        <el-table-column prop="subjectIdList"
+                         label="声部">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.subjectIdList | fitterSound }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="userId"
+                         label="主教老师">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.userId | fitterTeacher }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="studentNum"
+                         label="班级人数">
+        </el-table-column>
+        <el-table-column prop="date"
+                         label="上课时间">
+          <template slot-scope="scope">
+            <div>
+              <p>{{scope.row.startClassTime+'-'+scope.row.endClassTime}}</p>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="date"
+                         label="操作">
+          <template slot-scope="scope">
+            <div>
+              <el-button type="text"
+                         @click="removeClass(scope.row)">删除</el-button>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 确认取消 -->
+    <div class="btnWrap"
+         style="margin-top:40px;">
+      <div class="nextBtn"
+           @click='gotoNext'>下一步</div>
+      <div class="okBtn">返回</div>
+    </div>
+    <el-dialog title="添加提高班"
+               :visible.sync="raiseVisible"
+               width="40%">
+      <el-form :model="maskForm"
+               ref='maskForm'
+               :rules="maskRules"
+               :label-position="labelPosition"
+               label-width="100px">
+        <el-form-item label="提高班名称"
+                      prop="name">
+          <el-input v-model="maskForm.name"
+                    style='width:180px;'></el-input>
+        </el-form-item>
+        <el-form-item label="提高班声部"
+                      prop="sound">
+          <el-select v-model="maskForm.sound">
+            <el-option v-for="(item,index) in soundList"
+                       :key='index'
+                       :label="item.name"
+                       :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="主教老师"
+                      prop="teacher">
+          <el-select v-model="maskForm.teacher">
+            <el-option v-for="(item,index) in teacherList"
+                       :key="index"
+                       :label="item.name"
+                       :value="item.userId"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="班级人数"
+                      prop="count">
+          <el-input v-model="maskForm.count"
+                    type="number"
+                    style='width:180px;'></el-input>
+        </el-form-item>
+        <el-form-item label="星期几"
+                      prop="week">
+          <el-select v-model="maskForm.week">
+            <el-option value="1"
+                       label="星期一"></el-option>
+            <el-option value="2"
+                       label="星期二"></el-option>
+            <el-option value="3"
+                       label="星期三"></el-option>
+            <el-option value="4"
+                       label="星期四"></el-option>
+            <el-option value="5"
+                       label="星期五"></el-option>
+            <el-option value="6"
+                       label="星期六"></el-option>
+            <el-option value="7"
+                       label="星期天"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="时间段"
+                      prop="startTime">
+          <el-time-select placeholder="起始时间"
+                          v-model="maskForm.startTime"
+                          :picker-options="{
+                            start: '06:30',
+                            step: '00:15',
+                            end: '23:30'
+                          }">
+          </el-time-select>
+          <el-time-select placeholder="结束时间"
+                          v-model="maskForm.endTime"
+                          :picker-options="{
+                            start: '06:30',
+                            step: '00:15',
+                            end: '23:30',
+                            minTime: maskForm.endTime
+                          }">
+          </el-time-select>
+        </el-form-item>
+      </el-form>
+      <span slot="footer"
+            class="dialog-footer">
+        <el-button @click="raiseVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="addraiseClass">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { findSound, findMusicGroupClassTeacher, getTeacher, getTeamDetail, addHighClass } from '@/api/buildTeam'
+let that;
+export default {
+  props: {
+    teamid: {
+      type: String,
+      required: true
+    }
+  },
+  beforeCreate () {
+    that = this;
+  },
+  data () {
+    return {
+      labelPosition: 'right',
+      topForm: {
+        count: '',
+        improventClassesNum: '',
+        timer: ''
+      },
+      maskForm: {
+        name: '',
+        sound: '',
+        count: '',
+        teacher: '',
+        startTime: '',
+        endTime: '',
+        week: ''
+      },
+      raiseVisible: false,
+      tableList: [],
+      soundList: [],
+      teacherList: [],
+      maskRules: {
+        name: [{ required: true, message: '请输入姓名', trigger: 'blur' },
+        { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }],
+        sound: [{ required: true, message: '请选择声部', trigger: 'blur' },],
+        count: [{ required: true, message: '请输入学生数', trigger: 'blur' }],
+        teacher: [{ required: true, message: '请选择老师', trigger: 'blur' }],
+        startTime: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
+        endTime: '',
+        week: [{ required: true, message: '请选择星期几', trigger: 'blur' }]
+      },
+      topFormRules: {
+        count: [{ required: true, message: '请输入排课数量', trigger: 'blur' }],
+        timer: [{ required: true, message: '请选择开课时间', trigger: 'blur' }]
+      }
+    }
+  },
+  mounted () {
+    // 获取乐团声部
+    findSound({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        this.soundList = res.data;
+      }
+    })
+    findMusicGroupClassTeacher({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        this.teacherList = res.data
+        console.log(res.data);
+      }
+    })
+    // 获取乐团老师
+    // findMusicGroupClassTeacher({ musicGroupId: this.teamid }).then()
+    getTeamDetail(this.teamid).then(res => {
+      if (res.code == 200) {
+        this.topForm.improventClassesNum = res.data.improventClassesNum;
+      }
+    });
+  },
+  methods: {
+    addraiseClass () {
+      this.$refs['maskForm'].validate(res => {
+        if (res) {
+          // 验证成功组成数组
+          let obj = {
+            'userId': this.maskForm.teacher, // 老师id
+            'dayOfWeek': this.maskForm.week, // 周几
+            'startClassTime': this.maskForm.startTime,
+            'endClassTime': this.maskForm.endTime,
+            'courseTimes': this.topForm.count,
+            'type': 'HIGH',
+            'expectStudentNum': this.maskForm.count,
+            'musicGroupId': this.teamid,
+            'teachMode': 'OFFLINE',
+            'name': this.maskForm.name,
+            'subjectIdList': this.maskForm.sound,
+            'moid': new Date().getTime(),
+            'startDate': this.topForm.timer
+          }
+          this.tableList.push(obj);
+          this.raiseVisible = false;
+          this.$refs['maskForm'].resetFields();
+          this.maskForm.endTime = '';
+        } else {
+          this.$message.error('请填写必要信息')
+        }
+      })
+    },
+    removeClass (row) {
+      for (let i in this.tableList) {
+        if (this.tableList[i].moid == row.moid) {
+          this.tableList.splice(i, 1);
+        }
+      }
+    },
+    addClass () {
+      this.$refs['topForm'].validate(res => {
+        if (res) {
+          this.raiseVisible = true;
+        } else {
+          // this.$message.error('请先输入排课数量')
+        }
+      })
+    },
+    gotoNext () {
+      addHighClass(this.tableList).then(res => {
+
+      })
+    }
+  },
+  filters: {
+    fitterSound (val) {
+      if (that.soundList) {
+        for (let i in that.soundList) {
+          if (that.soundList[i].id == val) {
+            return that.soundList[i].name
+          }
+        }
+      } else {
+        return ''
+      }
+    },
+    fitterTeacher (val) {
+      if (that.teacherList) {
+        for (let i in that.teacherList) {
+          if (that.teacherList[i].id == val) {
+            return that.teacherList[i].username
+          }
+        }
+      } else {
+        return ''
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.imc {
+  box-sizing: border-box;
+  padding: 30px 42px;
+  background-color: #fff;
+  min-height: 80vh;
+  .addBtn {
+    line-height: 40px;
+    text-align: center;
+    color: #fff;
+    border-radius: 4px;
+    margin-right: 20px;
+    cursor: pointer;
+    width: 120px;
+    height: 40px;
+    background-color: #4eada7;
+  }
+}
+</style>

+ 191 - 18
src/views/teamBuild/teamSeting/components/salarySet.vue

@@ -2,46 +2,219 @@
   <div class='salary-container'>
     <el-form :inline="true"
              :model="searchForm">
-      <el-form-item label="班级名称">
-        <el-select v-model="searchForm.class">
-          <el-option label="1"
-                     value="1"></el-option>
+      <el-form-item label="课酬结算标准">
+        <el-select v-model="searchForm.salary"
+                   @change="changeSalary">
+          <el-option label="课时默认结算"
+                     value="TEACHER_DEFAULT"></el-option>
+          <el-option label="课时梯度结算"
+                     value="GRADIENT_SALARY"></el-option>
         </el-select>
       </el-form-item>
     </el-form>
-    <div class="tableWrap">
-      <el-table :data="tableList"
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <el-table-column label="班级名称">
+    <div class="tableWrap"
+         v-if='searchForm.salary == "TEACHER_DEFAULT"'>
+      <el-table :data="defaultTableList"
+                :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+                row-key="id"
+                border
+                default-expand-all
+                :tree-props="{children: 'classGroupTeacherMapperList', hasChildren: 'hasChildren'}">
+        <el-table-column label="班级名称"
+                         width="180px"
+                         prop='name'>
         </el-table-column>
-        <el-table-column label="主教老师">
+        <el-table-column label="老师名称"
+                         width="180px"
+                         prop='userName'>
         </el-table-column>
-        <el-table-column label="老师课酬">
+        <el-table-column label="老师类型"
+                         width="180px"
+                         prop="teacherRole">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.teacherRole|workType}}
+            </div>
+          </template>
         </el-table-column>
-        <el-table-column label="助教老师">
+
+        <el-table-column label="金额">
+
+          <template slot-scope="scope">
+            <div v-if="scope.row.teacherDefaultMusicGroupSalaryList&&scope.row.teacherDefaultMusicGroupSalaryList[0]&&scope.row.teacherDefaultMusicGroupSalaryList[0]">
+              <span>课酬:</span>
+              <el-input style="width: 80px;margin-right:10px"
+                        v-if='scope.row.teacherDefaultMusicGroupSalaryList&&scope.row.teacherDefaultMusicGroupSalaryList[0]&&scope.row.teacherDefaultMusicGroupSalaryList[0].mainTeacherSalary&&scope.row.teacherRole =="TEACHING"'
+                        v-model="scope.row.teacherDefaultMusicGroupSalaryList[0].assistantTeacherSalary"></el-input>
+              <el-input style="width: 80px;margin-right:10px"
+                        v-if='scope.row.teacherDefaultMusicGroupSalaryList&&scope.row.teacherDefaultMusicGroupSalaryList[0]&&scope.row.teacherDefaultMusicGroupSalaryList[0].mainTeacherSalary&&scope.row.teacherRole =="BISHOP"'
+                        v-model="scope.row.teacherDefaultMusicGroupSalaryList[0].mainTeacherSalary"></el-input>
+            </div>
+          </template>
         </el-table-column>
-        <el-table-column label="老师课酬">
+      </el-table>
+    </div>
+    <div class="tableWrap"
+         v-if='searchForm.salary == "GRADIENT_SALARY"'>
+      <el-table :data="gradientTableList"
+                :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+                row-key="id"
+                border
+                default-expand-all
+                :tree-props="{children: 'classGroupTeacherMapperList', hasChildren: 'hasChildren'}">
+        <el-table-column label="班级名称"
+                         width="180px"
+                         prop='name'>
         </el-table-column>
-        <el-table-column label="助教老师">
+        <el-table-column label="老师名称"
+                         width="180px"
+                         prop='userName'>
         </el-table-column>
-        <el-table-column label="老师课酬">
+        <el-table-column label="老师类型"
+                         width="180px"
+                         prop="teacherRole">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.teacherRole|workType}}
+            </div>
+          </template>
         </el-table-column>
-        <el-table-column label="操作">
+
+        <el-table-column label="金额">
+
+          <template slot-scope="scope">
+            <div v-if='scope.row.teacherDefaultMusicGroupSalaryList'>
+              <div v-for="(item,index) in scope.row.teacherDefaultMusicGroupSalaryList"
+                   v-if="scope.row.teacherRole =='TEACHING'"
+                   style="display: table-cell;"
+                   :key='index'>
+                <span>梯度{{index+1}}:</span>
+                <el-input style="width: 80px;margin-right:10px"
+                          v-model="scope.row.teacherDefaultMusicGroupSalaryList[index].assistantTeacherSalary"></el-input>
+              </div>
+
+              <div v-for="(item,index) in scope.row.teacherDefaultMusicGroupSalaryList"
+                   v-if="scope.row.teacherRole =='BISHOP'"
+                   style="display: table-cell;"
+                   :key='index'>
+                <span>梯度{{index+1}}:</span>
+                <el-input style="width: 80px;margin-right:10px"
+                          v-model="scope.row.teacherDefaultMusicGroupSalaryList[index].mainTeacherSalary"></el-input>
+              </div>
+
+              <!-- <el-input v-if='scope.row.teacherDefaultMusicGroupSalaryList&&scope.row.teacherDefaultMusicGroupSalaryList[0]&&scope.row.teacherDefaultMusicGroupSalaryList[0].mainTeacherSalary&&scope.row.teacherRole =="TEACHING"'
+                        v-model="scope.row.teacherDefaultMusicGroupSalaryList[0].mainTeacherSalary"></el-input>
+              <el-input v-if='scope.row.teacherDefaultMusicGroupSalaryList&&scope.row.teacherDefaultMusicGroupSalaryList[0]&&scope.row.teacherDefaultMusicGroupSalaryList[0].mainTeacherSalary&&scope.row.teacherRole =="BISHOP"'
+                        v-model="scope.row.teacherDefaultMusicGroupSalaryList[0].assistantTeacherSalary"></el-input> -->
+            </div>
+          </template>
         </el-table-column>
       </el-table>
     </div>
+    <!-- 确认取消 -->
+    <div class="btnWrap"
+         style="margin-top:40px;">
+      <div class="nextBtn"
+           @click='gotoNext'>下一步</div>
+      <div class="okBtn">返回</div>
+    </div>
   </div>
 </template>
 <script>
+import { findMusicGroupClassTeacherSalary, setClassGroupTeacherSalary } from '@/api/buildTeam'
+import { format } from 'path'
 export default {
+  props: {
+    teamid: {
+      type: String,
+      required: true
+    }
+  },
   data () {
     return {
       searchForm: {
-        class: ''
+        salary: ''
       },
-      tableList: []
+      defaultTableList: [],
+      gradientTableList: [],
+      subList: []
+    }
+  },
+  mounted () {
+    // 获取默认老师列表 类型为默认
+    // GRADIENT_SALARY
+    findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'TEACHER_DEFAULT' }).then(res => {
+      if (res.code == 200) {
+        this.defaultTableList = res.data;
+      }
+    })
+    // 类型为梯度
+    findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'GRADIENT_SALARY' }).then(res => {
+      if (res.code == 200) {
+        this.gradientTableList = res.data;
+      }
+    })
+  }, methods: {
+    gotoNext () {
+      if (this.searchForm.salary == 'TEACHER_DEFAULT') {
+        // 组件默认课酬
+        for (let i in this.defaultTableList) {
+          for (let j in this.defaultTableList[i].classGroupTeacherMapperList) {
+            let obj = {}
+            obj.classGroupId = this.defaultTableList[i].id;
+            obj.userId = this.defaultTableList[i].classGroupTeacherMapperList[j].userId;
+            obj.teacherRole = this.defaultTableList[i].classGroupTeacherMapperList[j].teacherRole;
+            obj.teacherDefaultMusicGroupSalaryList = this.defaultTableList[i].classGroupTeacherMapperList[j].teacherDefaultMusicGroupSalaryList;
+            this.subList.push(obj);
+          }
+        }
+
+      } else if (this.searchForm.salary == 'GRADIENT_SALARY') {
+        // 组件梯度课酬
+        for (let i in this.defaultTableList) {
+          for (let j in this.defaultTableList[i].classGroupTeacherMapperList) {
+            let obj = {}
+            obj.classGroupId = this.defaultTableList[i].id;
+            obj.userId = this.defaultTableList[i].classGroupTeacherMapperList[j].userId;
+            obj.teacherRole = this.defaultTableList[i].classGroupTeacherMapperList[j].teacherRole;
+            obj.teacherDefaultMusicGroupSalaryList = this.defaultTableList[i].classGroupTeacherMapperList[j].teacherDefaultMusicGroupSalaryList;
+            this.subList.push(obj);
+          }
+        }
+      }
+      setClassGroupTeacherSalary(this.subList).then(res => {
+        if (res.code == 200) {
+          this.subList = [];
+        }
+      }).catch(res => {
+        this.$message.error('提交失败')
+        this.subList = [];
+      })
+    },
+    changeSalary (val) {
+
+      if (val == 'TEACHER_DEFAULT') {
+        for (let i in this.defaultTableList) {
+          for (let j in this.defaultTableList[i].classGroupTeacherMapperList) {
+            if (this.defaultTableList[i].classGroupTeacherMapperList[j].teacherDefaultMusicGroupSalaryList.length <= 0) {
+              this.$message.error('还有老师课酬未确认')
+              return
+            }
+          }
+        }
+
+      } else if (val == 'GRADIENT_SALARY') {
+        for (let i in this.gradientTableList) {
+          for (let j in this.gradientTableList[i].classGroupTeacherMapperList) {
+            if (!this.gradientTableList[i].classGroupTeacherMapperList[j].teacherDefaultMusicGroupSalaryList.length <= 0) {
+              this.$message.error('还有老师课酬未确认')
+              return
+            }
+          }
+        }
+      }
     }
-  }
+  },
 }
 </script>
 <style lang="scss">

+ 9 - 2
src/views/teamBuild/teamSeting/components/setClass.vue

@@ -77,7 +77,13 @@
         </el-table-column>
       </el-table>
       <div class="centerInfo">
+
         <div class="btnWrap">
+          <el-form :inline="true">
+            <el-form-item label="提高班数">
+              <el-input v-model="hightNum"></el-input>
+            </el-form-item>
+          </el-form>
           <div class="setBtn"
                @click="getNoclassSign">添加</div>
           <div class="okBtn"
@@ -253,7 +259,8 @@ export default {
       teacherList: [],
       teacherForm: {
         name: ''
-      }
+      },
+      hightNum: ''
 
     }
   },
@@ -444,7 +451,7 @@ export default {
         if (res) {
           // 发请求
 
-          checkAllStudent({ musicGroupId: this.teamid, teacherId: this.teacherForm.name }).then(res => {
+          checkAllStudent({ musicGroupId: this.teamid, teacherId: this.teacherForm.name, improventClassesNum: this.hightNum }).then(res => {
             if (res.code == 200) {
               this.$refs['teacherForm'].resetFields()
               this.teacherVisible = false;

+ 18 - 15
src/views/teamBuild/teamSeting/components/setTeacher.vue

@@ -20,12 +20,12 @@
                          width="200px">
           <template slot-scope="scope">
             <div>
-              <el-select v-model="scope.row.teacherList.coreTeacher"
-                         v-if='scope.row.teacherList'>
+              <el-select v-model="scope.row.coreTeacher"
+                         v-if='teacherList'>
                 <el-option v-for='(item,index) in teacherList'
                            :label="item.username"
                            :key='index'
-                           :value="item.id"></el-option>
+                           :value="item.userId"></el-option>
               </el-select>
             </div>
           </template>
@@ -35,9 +35,9 @@
           <template slot-scope="scope">
             <div>
               <el-select class='tableClass'
-                         v-if='scope.row.teacherList'
+                         v-if='teacherList'
                          multiple
-                         v-model="scope.row.teacherList.assistant">
+                         v-model="scope.row.assistant">
                 <el-option v-for='(item,index) in teacherList'
                            :label="item.username"
                            :key='index'
@@ -60,8 +60,8 @@
                          width="200px;">
           <template slot-scope="scope">
             <div>
-              <el-select v-model="scope.row.teacherList.coreTeacher"
-                         v-if='scope.row.teacherList'>
+              <el-select v-model="scope.row.coreTeacher"
+                         v-if='teacherList'>
                 <el-option v-for='(item,index) in teacherList'
                            :label="item.username"
                            :key='index'
@@ -74,10 +74,10 @@
                          助教老师">
           <template slot-scope="scope">
             <div>
+              <!-- v-if='scope.row.assistant' -->
               <el-select class='tableClass'
                          multiple
-                         v-if='scope.row.teacherList'
-                         v-model="scope.row.teacherList.assistant">
+                         v-model="scope.row.assistant">
                 <el-option v-for='(item,index) in teacherList'
                            :label="item.username"
                            :key='index'
@@ -131,17 +131,20 @@ export default {
         let singinList = [];
         let allList = [];
         res.data.map(item => {
-          item.teacherList = {
-            coreTeacher: '',
-            assistant: []
-          }
+          // item.teacherList = {
+          //   coreTeacher: '',
+          //   assistant:[]
+          // }
+          item.coreTeacher = ''
+          item.assistant = []
           if (item.classGroupTeacherMapperList && item.classGroupTeacherMapperList.length > 0) {
             //循环老师列表分配到不同的
             for (let i in item.classGroupTeacherMapperList) {
               if (item.classGroupTeacherMapperList[i].teacherRole == 'BISHOP') {
-                item.teacherList.coreTeacher = item.classGroupTeacherMapperList[i].userId
+                item.coreTeacher = item.classGroupTeacherMapperList[i].userId
+                console.log(item.coreTeacher);
               } else if (item.classGroupTeacherMapperList[i].teacherRole == 'TEACHING') {
-                item.teacherList.assistant.push(item.classGroupTeacherMapperList[i].userId)
+                item.assistant.push(item.classGroupTeacherMapperList[i].userId)
               }
             }
           }

+ 20 - 4
src/views/teamBuild/teamSeting/index.vue

@@ -42,13 +42,24 @@
               @click="activeIndex=3">
           <div class="step2 sptep"
                :class="activeIndex >= 3?'activestep':''">
-            课
+            小班
           </div>
           <img :src="activeIndex >= 3?stepImgs.nol:stepImgs.active"
                alt=""
                class="
                arrow">
         </span>
+        <span class='stepspan  stepspan2'
+              @click="activeIndex=4">
+          <div class="step2 sptep"
+               :class="activeIndex >= 4?'activestep':''">
+            课酬
+          </div>
+          <img :src="activeIndex >= 4?stepImgs.nol:stepImgs.active"
+               alt=""
+               class="
+               arrow">
+        </span>
       </div>
     </div>
 
@@ -65,7 +76,10 @@
         <coursePlan :teamid='id' />
       </div>
       <div v-if='activeIndex==3'>
-        <salarySet />
+        <improvement :teamid='id' />
+      </div>
+      <div v-if='activeIndex==4'>
+        <salarySet :teamid='id' />
       </div>
     </div>
   </div>
@@ -75,16 +89,18 @@ import classSeting from '@/views/teamBuild/teamSeting/components/setClass'
 import teacherSeting from '@/views/teamBuild/teamSeting/components/setTeacher'
 import coursePlan from '@/views/teamBuild/teamSeting/components/coursePlan'
 import salarySet from '@/views/teamBuild/teamSeting/components/salarySet'
+import improvement from '@/views/teamBuild/teamSeting/components/improvementClass'
 export default {
   components: {
     classSeting,
     teacherSeting,
     coursePlan,
-    salarySet
+    salarySet,
+    improvement
   },
   data () {
     return {
-      activeIndex: '2',
+      activeIndex: '3',
       stepImgs: {
         nol: require('@/assets/images/base/step-arrow-active.png'),
         active: require('@/assets/images/base/step-arrow.png')

+ 77 - 22
src/views/teamDetail/components/baseInfo.vue

@@ -9,65 +9,81 @@
                       disabled></el-input>
           </el-form-item>
           <el-form-item label="教务老师">
-            <el-select v-model="topForm.teacher">
+            <el-input v-model="topForm.teacher"
+                      disabled></el-input>
+            <!-- <el-select>
               <el-option label="啦啦啦"
                          value="1"></el-option>
-            </el-select>
+            </el-select> -->
           </el-form-item>
           <el-form-item label="所属分部">
-            <el-select v-model="topForm.section">
+            <el-input v-model="topForm.section"
+                      disabled></el-input>
+            <!-- <el-select v-model="topForm.section">
               <el-option label="啦啦啦"
                          value="1"></el-option>
-            </el-select>
+            </el-select> -->
           </el-form-item>
           <el-form-item label="教学主管">
-            <el-select v-model="topForm.boss">
+            <el-input v-model="topForm.boss"
+                      disabled></el-input>
+            <!-- <el-select v-model="topForm.boss">
               <el-option label="啦啦啦"
-                         value="1"></el-option>
+                         value="1"></el-option> -->
             </el-select>
           </el-form-item>
           <el-form-item label="合作单位">
-            <el-select v-model="topForm.cooperate">
+            <el-input v-model="topForm.cooperate"
+                      disabled></el-input>
+            <!-- <el-select v-model="topForm.cooperate">
               <el-option label="啦啦啦"
                          value="1"></el-option>
-            </el-select>
+            </el-select> -->
           </el-form-item>
           <el-form-item label="上课地点">
             <el-input v-model="topForm.add"
+                      disabled
                       style="width:370px;"></el-input>
           </el-form-item>
           <el-form-item label="收费类型">
-            <el-select v-model="topForm.type">
+            <el-input v-model="topForm.type"
+                      disabled></el-input>
+            <!-- <el-select v-model="topForm.type">
               <el-option label="啦啦啦"
                          value="1"></el-option>
-            </el-select>
+            </el-select> -->
           </el-form-item>
         </el-form>
       </div>
       <div class="right">
         <ul>
-          <li>2019-09-07 17:00 徐老师 建团申请</li>
-          <li>2019-09-07 17:00 徐老师 建团申请</li>
-          <li>2019-09-07 17:00 徐老师 建团申请</li>
-          <li>2019-09-07 17:00 徐老师 建团申请</li>
-          <li>2019-09-07 17:00 徐老师 建团申请</li>
+          <li v-for="(item,index) in processList"
+              :key='index'>{{ item.createTime}} {{ item.realName }} {{item.event}}</li>
+
         </ul>
       </div>
     </div>
     <div class="baseBottom">
-      <img src=""
-           alt=""
-           class='code'>
+      <div class="qrcode code"
+           ref="qrCodeUrl"></div>
       <a href="#">www.baidu.com</a>
-      <div class="btnList">
+      <!-- <div class="btnList">
         <div class="closeBtn">取消</div>
         <div class="okBtn">确定</div>
-      </div>
+      </div> -->
     </div>
   </div>
 </template>
 <script>
+import { getMusicGroup, getMusicGroupProcess } from '@/api/buildTeam'
+import QRCode from 'qrcodejs2'
 export default {
+  props: {
+    teamid: {
+      type: String,
+      required: true
+    },
+  },
   data () {
     return {
       topForm: {
@@ -78,9 +94,48 @@ export default {
         cooperate: '',
         add: '',
         type: ''
-      }
+      },
+      name: '',
+      processList: []
     }
-  }
+  },
+  mounted () {
+    // 获取乐团基本信息
+    // let teamid = '191014135135001';
+    // console.log(this.teamid);
+    this.creatQrCode();
+    getMusicGroup({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        // console.log(res.data.id)
+        this.topForm.num = res.data.id;
+        // this.topForm.teacher = res.data.teamTeacherName;
+        this.topForm.teacher = res.data.educationalTeacherName;
+        this.topForm.boss = res.data.directorUserName;
+        this.topForm.cooperate = res.data.schoolName;
+        this.topForm.type = res.data.chargeTypeName;
+        // 差上课地点
+        this.$emit('getname', res.data.name)
+      }
+    })
+
+    // 根据乐团id获取乐团流程
+    getMusicGroupProcess({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        this.processList = res.data;
+      }
+    })
+  }, methods: {
+    creatQrCode () {
+      var qrcode = new QRCode(this.$refs.qrCodeUrl, {
+        text: 'http://www.baidu.com',
+        width: 300,
+        height: 300,
+        colorDark: '#000000',
+        colorLight: '#ffffff',
+        correctLevel: QRCode.CorrectLevel.H
+      })
+    },
+  },
 }
 </script>
 <style lang="scss" scope>

+ 64 - 27
src/views/teamDetail/components/teacherList.vue

@@ -7,6 +7,10 @@
           <p>教学主管: <span> 张三,李四</span></p>
         </div>
       </div>
+      <div class="right newBand"
+           @click="gotoRecord">
+        上课记录
+      </div>
     </div>
 
     <!-- 搜索类型 -->
@@ -15,58 +19,56 @@
              v-model="searchForm">
       <el-form-item>
         <el-select v-model="searchForm.status"
-                   placeholder="工作类型">
-          <el-option label="哈哈哈"
-                     value="1"></el-option>
+                   placeholder="合奏班">
+          <el-option v-for='(item,index) in mixCourseList'
+                     :key="index"
+                     :value="item.id"
+                     :label="item.name"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-select v-model="searchForm.teachingClass"
-                   placeholder="执教班级">
-          <el-option label="哈哈哈"
-                     value="1"></el-option>
-        </el-select>
+        <el-input v-model="searchForm.search"></el-input>
       </el-form-item>
       <el-form-item>
-        <el-select v-model="searchForm.attendance"
-                   placeholder="出勤次数">
-          <el-option label="哈哈哈"
-                     value="1"></el-option>
-        </el-select>
+        <div class="searchBtn"
+             @click="getList">搜索</div>
       </el-form-item>
     </el-form>
-    <!-- 查询列表 -->
-    <div class="searchWrap">
-      <p>查询条件:</p>
-      <div class="searchItem"
-           @click="closeSearch(item)"
-           v-for="(item,index) in searchLsit">
-        {{ item.key }}
-        <i class="el-icon-close"></i>
-      </div>
-    </div>
+
     <!-- 列表 -->
     <div class="tableWrap">
       <el-table :data='tableList'>
         <el-table-column align='center'
+                         prop="teacherId"
                          label="老师编号">
         </el-table-column>
         <el-table-column align='center'
+                         prop="teacherName"
                          label="老师姓名">
         </el-table-column>
         <el-table-column align='center'
+                         prop="teacherPhone"
                          label="联系电话">
         </el-table-column>
         <el-table-column align='center'
+                         prop="jobNature"
                          label="工作类型">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.jobNature|jobNature}}
+            </div>
+          </template>
         </el-table-column>
         <el-table-column align='center'
-                         label="合奏团">
+                         prop="classGroupName"
+                         label="合奏班">
         </el-table-column>
         <el-table-column align='center'
+                         prop="courseScheduleName"
                          label="执教班级">
         </el-table-column>
         <el-table-column align='center'
+                         prop="num"
                          label="出勤次数">
         </el-table-column>
         <!-- <el-table-column align='center'
@@ -95,31 +97,66 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
+import { getTeamTeacherList, getAllClass } from '@/api/buildTeam'
 export default {
+  props: {
+    teamid: {
+      type: String,
+      required: true
+    },
+  },
   data () {
     return {
       searchForm: { // 搜索框
         status: '', // 工作类型
         teachingClass: '', // 合奏班
-        attendance: '' // 出勤次数
+        attendance: '', // 出勤次数
+        search: ''
       },
       searchLsit: [],
       tableList: [], //
+      mixCourseList: [],
       rules: {
         // 分页规则
-        limit: 10, // 限制显示条数
+        limit: 2, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [2, 4, 6, 8] // 选择限制显示条数
       },
     }
   },
   components: {
     pagination
   },
+  mounted () {
+    console.log(this.teamid)
+    this.getList();
+    getAllClass({ musicGroupId: this.teamid }).then(res => {      ;
+      if (res.code == 200) {
+        this.mixCourseList = res.data;
+      }
+    })
+  },
   methods: {
     getList () {
+      // this.teamid
+      getTeamTeacherList({
+        'classGroupName': '',
+        'jobNature': '',
+        'musicGroupId': this.teamid,
+        page: this.rules.page,
+        rows: this.rules.limit,
+        search: this.searchForm.search
 
+      }).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total;
+        }
+      })
+    },
+    gotoRecord () {
+      // this.$router.push({ path:})
     }
   }
 }

+ 37 - 11
src/views/teamDetail/index.vue

@@ -2,40 +2,46 @@
   <div class='m-container'>
     <h2>
       <div class='squrt'></div>
-      武汉小学乐团
-      <div class="term">第一学期</div>
-      <div class="term active">第二学期</div>
+      {{name}}
+      <!-- <div class="term">第一学期</div>
+      <div class="term active">第二学期</div> -->
     </h2>
     <div class="m-core">
-      <p class='msg'> <img src="@/assets/images/base/clock.png"
-             alt=""> 报名中</p>
+      <div class='newBand abs'>乐团调整</div>
+      <p class='msg'>
+        <img src="@/assets/images/base/clock.png"
+             alt=""> 报名中
+      </p>
       <!-- navMenu -->
       <el-tabs v-model="activeIndex"
                type="card"
                @tab-click="handleClick">
         <el-tab-pane label="基本信息"
                      name="1">
-          <baseinfo />
+          <baseinfo v-if="activeIndex == 1"
+                    :teamid='teamid'
+                    @getname='getname' />
         </el-tab-pane>
         <el-tab-pane label="老师列表"
                      name="2">
-          <teacherList />
+          <teacherList v-if="activeIndex == 2"
+                       :teamid='teamid' />
         </el-tab-pane>
         <el-tab-pane label="学员列表"
                      name="3">
-          <studentList />
+          <studentList v-if="activeIndex == 3" />
         </el-tab-pane>
         <el-tab-pane label="班级详情"
                      name="4">
-          <classList />
+          <classList v-if="activeIndex == 4" />
         </el-tab-pane>
         <el-tab-pane label="课表详情"
                      name="5">
-          <courseList />
+          <courseList v-if="activeIndex == 5" />
         </el-tab-pane>
         <el-tab-pane label="课程课酬"
                      name="6">
-          <salaryList />
+          <salaryList v-if="activeIndex == 6" />
         </el-tab-pane>
         <el-tab-pane label="课酬调整"
                      name="7">
@@ -51,15 +57,30 @@ import courseList from '@/views/teamDetail/components/courseList'
 import classList from '@/views/teamDetail/components/classList'
 import salaryList from '@/views/teamDetail/components/salaryList'
 import baseinfo from '@/views/teamDetail/components/baseInfo'
+import { getMusicGroup } from '@/api/buildTeam'
 export default {
   data () {
     return {
       activeIndex: '1',
+      teamid: '',
+      name: '',
     }
   },
+  created () {
+    // this.teamid = '191014135135001';
+    // 191015094822001
+    this.teamid = '191015094822001';
+  },
+  mounted () {
+
+  },
   methods: {
     handleClick (val) {
       this.activeIndex = val.name;
+    },
+    getname (name) {
+      // console.log(name);
+      this.name = name;
     }
   },
   components: {
@@ -91,6 +112,11 @@ export default {
         margin-right: 8px;
       }
     }
+    .abs {
+      position: absolute;
+      right: 240px;
+      top: -28px;
+    }
   }
   .term {
     height: 32px;

+ 6 - 5
vue.config.js

@@ -15,10 +15,11 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
 // port = 9528 npm run dev OR npm run dev --port = 9528
 // const port = process.env.port || process.env.npm_config_port || 9528 // dev port
 // http://47.99.212.176:8000
-// http://192.168.3.28:8000
-// let target = 'http://192.168.3.28:8000' //邹璇
+// 
+// let target = 'http://192.168.3.27:8000' // 箭河
+let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://47.99.212.176:8000' // 测试服
+// let target = 'http://47.99.212.176:8000' // 测试服
 // let target = 'http://192.168.3.48:8000' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -46,11 +47,11 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       // http://47.99.212.176:8000
       // http://192.168.3.28:8000
-      '/api-auth': {
+      '/auth-server': {
         target: target,
         changeOrigin: true,
         pathRewrite: {
-          '^api-auth': ''
+          '^auth-server': ''
         }
       },
       '/web-server': {