Bläddra i källkod

1204 10:20

111
mo 5 år sedan
förälder
incheckning
5459ece53e

+ 1 - 1
src/utils/vueFilter.js

@@ -302,7 +302,7 @@ Vue.filter('studentSign', value => {
 // 班级类型
 Vue.filter('classType', value => {
   let template = {
-    NORMAL: "普通班级",
+    NORMAL: "单技班",
     MIX: '合奏班',
     HIGH: '基础技能班',
     VIP: 'VIP',

+ 1 - 1
src/views/teacherManager/teacherDetail/components/courseInfo1.vue

@@ -111,7 +111,7 @@ export default {
       return result
     },
     formatterStatus (val) {
-      let arr = ["未开始", "报名中", "报名结束", '取消', '停止']
+      let arr = ["未开始", "报名中", "进行中", '取消', '已结束', '报名结束']
       return arr[val];
     }
   }

+ 25 - 12
src/views/teamBuild/teamSeting/components/coursePlan.vue

@@ -172,7 +172,8 @@
         <p style='margin-bottom:20px'>{{resetAllTitle}}</p>
 
         <div class="resetWrap">
-          <el-select v-model="chioseType">
+          <el-select v-model="chioseType"
+                     @change="changeCheckCard">
             <el-option v-for='(item,index) in courseTypeList'
                        :key="index"
                        :label="item.name"
@@ -383,6 +384,8 @@ export default {
 
   },
   methods: {
+    changeCheckCard (val) {
+    },
     changeTimer (item) {
       item.endTime = '';
     },
@@ -493,9 +496,8 @@ export default {
         }
       })
     },
-    // 修改
+    // 变更
     resetMixCourse (row) {
-      console.log(this.classCardList)
       this.resetAllClassVisible = true;
       this.resetAllTitle = `将${row.classDate} ,${row.week}修改`;
       this.buttonType = row.type;
@@ -504,6 +506,7 @@ export default {
       this.endClassTimeStr = row.endClassTimeStr;
       this.chioseType = row.type;
       this.tableActive = row;
+      console.log(this.classCardList)
     },
     resetClass () {
       this.signBtnActive = !this.signBtnActive;
@@ -570,6 +573,7 @@ export default {
 
     },
     multipleResetMix () {
+      console.log('批量调整')
       this.isMultiple = false;
       // 批量更变课程类型
       for (let i in this.activeList) {
@@ -578,7 +582,6 @@ export default {
     },
     resetMix (row) {
       // 当前行的课程类型
-      console.log(this.classCardList)
       this.activeTime = row.classDate; // 选中那一行的日期
       this.startClassTimeStr = row.startClassTimeStr
       this.endClassTimeStr = row.endClassTimeStr;
@@ -590,13 +593,12 @@ export default {
         // 删除真实课表里的所有相关单技课
         for (let i = 0; i < this.classCardList.length; i++) {
           if (row.classDate == this.classCardList[i].classDate && this.startClassTimeStr == this.classCardList[i].startClassTimeStr && this.endClassTimeStr == this.classCardList[i].endClassTimeStr) {
-
             this.classCardList.splice(i, 1);
             i--;
           }
         }
         // 修改提交表里的时间
-        // 单技改合奏
+        // 改合奏
 
         for (let i in this.tableList) {
           if (row.classDate == this.tableList[i].classDate && this.startClassTimeStr == this.tableList[i].startClassTimeStr && this.endClassTimeStr == this.tableList[i].endClassTimeStr) {
@@ -609,7 +611,7 @@ export default {
         }
         //
       } else if (this.chioseType.indexOf('SINGLE') != -1 || this.chioseType.indexOf('CLASSROOM') != -1) {
-        // 合奏改单技 
+        // 改单技 
         for (let i in this.tableList) {
           if (row.classDate == this.tableList[i].classDate && this.startClassTimeStr == this.tableList[i].startClassTimeStr && this.endClassTimeStr == this.tableList[i].endClassTimeStr) {
             this.tableList[i].type = this.chioseType;
@@ -621,14 +623,19 @@ export default {
         // 修改提交表里的状态
         for (let j = 0; j < this.classCardList.length; j++) {
           for (let i = 0; i < this.tableList.length; i++) {
+            if (row.classDate == this.tableList[i].classDate && this.startClassTimeStr == this.tableList[i].startClassTimeStr && this.endClassTimeStr == this.tableList[i].endClassTimeStr) {
+              activeTableItem = this.tableList[i];
+            }
             if (row.classDate == this.classCardList[j].classDate && this.startClassTimeStr == this.classCardList[j].startClassTimeStr && this.endClassTimeStr == this.classCardList[j].endClassTimeStr) {
               this.classCardList.splice(j, 1);
+
               j--;
               i--;
+              if (j < 0) j = 0;
+              if (i < 0) i = 0;
+
             }
-            if (row.classDate == this.tableList[i].classDate && this.startClassTimeStr == this.tableList[i].startClassTimeStr && this.endClassTimeStr == this.tableList[i].endClassTimeStr) {
-              activeTableItem = this.tableList[i];
-            }
+
           }
         }
         //添加单机班课
@@ -734,6 +741,7 @@ export default {
         date.setDate(date.getDate() + 7);
       }
       // 请求排课
+      console.log(this.classCardList)
     },
     resetaLL () {
       // Object.assign(this.$data, this.$options.data());
@@ -764,7 +772,7 @@ export default {
     },
     savecolumn (row) {
       // console.log(row);
-      row.option == 1 ? row.option = 2 : row.option = 1
+      row.option == 1 ? row.option = 2 : row.option = 1;
       // console.log(this.SignList);
     },
     // 重置单技课
@@ -878,7 +886,12 @@ export default {
         this.signBtnActive = false;
         this.skipBtnActive = false;
       }
-    }
+    },
+    // classCardList (val) {
+    //   console.log('warch-----改变')
+    //   console.log(val)
+    //   console.log('warch-----改变完成')
+    // }
   }
 
 }

+ 23 - 22
src/views/teamBuild/teamSeting/components/salarySet.vue

@@ -160,31 +160,32 @@ export default {
     getTeamDetail({ musicGroupId: this.teamid }).then(res => {
       if (res.code == 200) {
         this.searchForm.salary = res.data.settlementType;
+        this.changeSalary(this.searchForm.salary);
         if (!res.data.settlementType) {
           this.hasDate = true;
         }
-        if (this.searchForm.salary == 'TEACHER_DEFAULT') {
-          findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'TEACHER_DEFAULT' }).then(res => {
-            if (res.code == 200) {
-              this.defaultTableList = res.data;
-              this.changeSalary(this.searchForm.salary);
-            }
-          })
-        } else if (this.searchForm.salary == 'GRADIENT_SALARY') {
-          findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'GRADIENT_SALARY' }).then(res => {
-            if (res.code == 200) {
-              this.gradientTableList = res.data;
-              this.changeSalary(this.searchForm.salary);
-            }
-          })
-        } else if (this.searchForm.salary == 'CLASSROOM_SALARY') {
-          findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'CLASSROOM_SALARY' }).then(res => {
-            if (res.code == 200) {
-              this.defaultTableList = res.data;
-              this.changeSalary(this.searchForm.salary);
-            }
-          })
-        }
+        // if (this.searchForm.salary == 'TEACHER_DEFAULT') {
+        //   findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'TEACHER_DEFAULT' }).then(res => {
+        //     if (res.code == 200) {
+        //       this.defaultTableList = res.data;
+        //       this.changeSalary(this.searchForm.salary);
+        //     }
+        //   })
+        // } else if (this.searchForm.salary == 'GRADIENT_SALARY') {
+        //   findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'GRADIENT_SALARY' }).then(res => {
+        //     if (res.code == 200) {
+        //       this.gradientTableList = res.data;
+        //       this.changeSalary(this.searchForm.salary);
+        //     }
+        //   })
+        // } else if (this.searchForm.salary == 'CLASSROOM_SALARY') {
+        //   findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'CLASSROOM_SALARY' }).then(res => {
+        //     if (res.code == 200) {
+        //       this.defaultTableList = res.data;
+        //       this.changeSalary(this.searchForm.salary);
+        //     }
+        //   })
+        // }
       }
     })
     // 获取乐团收费类型

+ 203 - 9
src/views/teamDetail/components/resetClass.vue

@@ -20,15 +20,24 @@
         </el-form-item>
       </el-form>
       <div class="tableWrap"
-           style=" width: 800px;">
+           style="">
         <el-table :data='activeSingleList'
-                  style="width:800px;"
+                  style=""
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}">
           <el-table-column align='center'
                            prop="name"
                            label="班级名称">
           </el-table-column>
           <el-table-column align='center'
+                           prop="type"
+                           label="班级类型">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.type | classType }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align='center'
                            prop="studentNum"
                            label="班级人数">
           </el-table-column>
@@ -65,9 +74,17 @@
             </template>
           </el-table-column>
           <el-table-column align='center'
+                           width="400px"
                            label="操作">
             <template slot-scope="scope">
               <div>
+                <!-- v-if="scope.row.type !='MIX'" -->
+                <el-button type="text"
+                           @click="resetClass(scope.row)">修改</el-button>
+                <!-- <el-button type="text"
+                           @click="classAdjustment(scope.row)">班级调整</el-button>
+                <el-button type="text"
+                           @click="recourse(scope.row)">重新排课</el-button> -->
                 <el-popover placement="top"
                             width="160"
                             :ref="scope.$index">
@@ -84,9 +101,6 @@
                   <el-button type="text"
                              slot="reference">删除</el-button>
                 </el-popover>
-                <!-- v-if="scope.row.type !='MIX'" -->
-                <el-button type="text"
-                           @click="resetClass(scope.row)">修改</el-button>
               </div>
             </template>
           </el-table-column>
@@ -343,7 +357,8 @@
                             :picker-options="{
                               start: '08:30',
                               step: '00:05',
-                              end: '23:55'
+                              end: '23:55',
+                              minTime:item.startClassTime
             }">
             </el-time-select>
             <el-button type="danger"
@@ -351,7 +366,6 @@
                        icon="el-icon-delete"
                        circle></el-button>
           </div>
-
         </div>
 
       </div>
@@ -439,6 +453,143 @@
                    @click="setInfoMsg">确 定</el-button>
       </div>
     </el-dialog>
+    <!-- 班级调整 -->
+    <el-dialog title="班级调整"
+               width="500px"
+               :visible.sync="resetClassVisible"
+               :modal-append-to-body="false">
+      <el-form :model="resetClassForm"
+               class="resetClassForm">
+        <el-form-item label="主教老师">
+          <el-select v-model="resetClassForm.coreTeacher">
+            <el-option v-for="(item,index) in teacherList"
+                       :key="index"
+                       :label="item.realName"
+                       :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="助教老师">
+          <el-select v-model="resetClassForm.assistant"
+                     filterable
+                     @change="setAssistant"
+                     multiple>
+            <el-option v-for="(item,index) in cooperationList"
+                       :key="index"
+                       :label="item.realName"
+                       :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="开始时间">
+          <el-time-select placeholder="开始时间"
+                          v-model="resetClassForm.startTime"
+                          :picker-options="{
+                            start: '06:30',
+                            step: '00:05',
+                            end: '23:30'
+                            }">
+          </el-time-select>
+        </el-form-item>
+        <el-form-item label="结束时间">
+          <el-time-select placeholder="结束时间"
+                          v-model="resetClassForm.endTime"
+                          :picker-options="{
+                            start: '06:30',
+                            step: '00:05',
+                            end: '23:30',
+                            minTime:resetClassForm.startTime
+                            }">
+          </el-time-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="resetClassVisible = false">取 消</el-button>
+        <!-- 班级学员修改 -->
+        <el-button type="primary"
+                   @click="">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 重新排课 -->
+    <el-dialog title="重新排课"
+               width="700px"
+               :visible.sync="resetCourseVisible"
+               :modal-append-to-body="false">
+      <el-form :model="recourseForm"
+               label-width="120px"
+               label-position="right">
+        <p style="border-bottom:1px solid #ccc; padding-bottom:10px; font-size:16px; margin-bottom:30px;">上课时间设置</p>
+        <el-form-item label="课程类型">
+          <el-select v-model="recourseForm.courseType">
+            <el-option v-for="(item,index) in courseTypeList"
+                       :key="index"
+                       :value="item.value"
+                       :label="item.label"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="排课起始时间">
+          <el-date-picker v-model="recourseForm.courseTime"
+                          style="width:200px;"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择日期">
+          </el-date-picker>
+          <el-checkbox style='margin-left:10px;'
+                       v-model="recourseForm.checked">是否跳过节假日</el-checkbox>
+        </el-form-item>
+      </el-form>
+      <div class="WeekWrap">
+        <p style="border-bottom:1px solid #ccc; padding-bottom:10px; font-size:16px; margin-bottom:30px;">
+          循环次数 <el-button type="text"
+                     style='margin-left:10px;'
+                     @click="addWeek">添加</el-button>
+        </p>
+        <div class="countWrap"
+             style="margin-bottom:10px;">
+          <div class="countItem"
+               style="margin-bottom:20px;"
+               v-for="(item,index) in weekList"
+               :key="index">
+            <span>循环周期: </span>
+            <el-select v-model="item.dayOfWeek">
+              <el-option v-for="(item,index) in weekDateList"
+                         :key='index'
+                         :label="item.label"
+                         :value="item.value"></el-option>
+            </el-select>
+            <span>开始时间</span>
+            <el-time-select placeholder=""
+                            v-model="item.startClassTime"
+                            :picker-options="{
+                               start: '08:30',
+                               step: '00:05',
+                               end: '23:55'
+            }">
+            </el-time-select>
+            <span>结束时间</span>
+            <el-time-select placeholder=""
+                            v-model="item.endClassTime"
+                            :picker-options="{
+                              start: '08:30',
+                              step: '00:05',
+                              end: '23:55',
+                              minTime:item.startClassTime
+            }">
+            </el-time-select>
+            <el-button type="danger"
+                       @click="removeWeek(item)"
+                       icon="el-icon-delete"
+                       circle></el-button>
+          </div>
+        </div>
+      </div>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="resetCourseVisible = false">取 消</el-button>
+        <!-- 班级学员修改 -->
+        <el-button type="primary"
+                   @click="">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -456,6 +607,8 @@ export default {
       tableList: [],
       maxClassList: [],
       activeSingleList: [],
+      resetCourseVisible: false, // 重新排课弹窗
+      resetClassVisible: false, // 班级调整弹窗
       studentVisible: false,
       MixVisible: false,// 新增合奏班弹窗
       activeListStudent: [], // 当前选中的学生列表
@@ -499,7 +652,7 @@ export default {
         { value: 'MIX', label: '合奏课' },
         { value: 'TRAINING_SINGLE', label: '集训单技课' },
         { value: 'TRAINING_MIX', label: '集训合奏课' },
-        { value: 'HIGH', label: '基础技能' },
+        { value: 'HIGH', label: '基础技能' },
         { value: 'COMPREHENSIVE', label: '综合课' },
         { value: 'CLASSROOM', label: '课堂课' },
       ],
@@ -522,7 +675,19 @@ export default {
       cooperationList: [],
       singleList: [],
       activeSingleLists: [],
-      activeType: ''
+      activeType: '',
+      resetClassForm: { // 班级调整form对象
+        startTime: '',
+        endTime: '',
+        assistant: [],
+        coreTeacher: ''
+      },
+      recourseForm: {
+        courseType: '',
+        checked: false,
+        courseTime: '',
+        courseNum: ''
+      }
     }
   },
   created () {
@@ -581,6 +746,15 @@ export default {
     })
   },
   methods: {
+    recourse (row) {
+      this.weekList = [{
+        week: '',
+        startTime: '',
+        endTime: '',
+        id: new Date()
+      }],
+        this.resetCourseVisible = true;
+    },
     addMix () {
       this.MixVisible = true;
     },
@@ -700,6 +874,19 @@ export default {
       this.getNoClassStudent(row.type)
 
     },
+    // 班级调整
+    classAdjustment (row) {
+      this.resetClassForm.assistant = [];
+      for (let i in row.classGroupTeacherMapperList) {
+        if (row.classGroupTeacherMapperList[i].teacherRole == 'BISHOP') {
+          this.resetClassForm.coreTeacher = row.classGroupTeacherMapperList[i].userId;
+        }
+        if (row.classGroupTeacherMapperList[i].teacherRole == 'TEACHING') {
+          this.resetClassForm.assistant.push(row.classGroupTeacherMapperList[i].userId)
+        }
+      }
+      this.resetClassVisible = true;
+    },
     getNoClassStudent (type) {
       // 获取乐团内所有未分班的学生
       // if (type && type == 'SNAP') {
@@ -993,12 +1180,19 @@ export default {
     }
   }
   .right {
+    width: calc(100% - 200px);
     .tableList {
       max-height: 500px;
       overflow-y: auto;
     }
   }
 }
+.resetClassForm {
+  .el-date-editor.el-input,
+  .el-date-editor.el-input__inner {
+    width: 180px;
+  }
+}
 .el-date-editor.el-input,
 .el-date-editor.el-input__inner {
   width: 100px;

+ 1 - 1
src/views/teamDetail/teamList.vue

@@ -187,7 +187,7 @@
                 <el-button type="text"
                            v-permission="'teamDetail/audit/update'"
                            v-if="scope.row.status == 'AUDIT'"
-                           @click="lookTeamDetail(scope.row)">编辑</el-button>
+                           @click="lookTeamDetail(scope.row)">审核确认</el-button>
                 <!-- 编辑中 编辑 -->
                 <el-button type="text"
                            v-permission="'teamDetail/draft/update'"

+ 1 - 1
src/views/vipClass/vipDetail/components/vipStudentList.vue

@@ -203,7 +203,7 @@ export default {
       addVipGroupStudents({ vipGroupId: this.id, studentIds: this.activeStudent }).then(res => {
         if (res.code == 200) {
           this.$message.success('添加成功')
-          this.getList();
+          this.getStudents()
         }
       })
     }

+ 1 - 1
src/views/vipClass/vipList.vue

@@ -308,7 +308,7 @@ export default {
       return result
     },
     formatterStatus (val) {
-      let arr = ["未开始", "报名中", "报名结束", '取消', '已结束']
+      let arr = ["未开始", "报名中", "进行中", '取消', '已结束', '报名结束']
       return arr[val];
     }
   }