Browse Source

Merge branch 'master' into wxl

lex-xin 4 years ago
parent
commit
0573b3a1da

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-880a4ce0.a1d5bf17.css → dist/static/css/chunk-13d62a96.f5c65a98.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.el-button--primary[data-v-1af381d1],.el-button--primary[data-v-1af381d1]:active,.el-button--primary[data-v-1af381d1]:focus,.el-button--primary[data-v-1af381d1]:hover{background:#14928a;border-color:#14928a;color:#fff}[data-v-1af381d1] .el-image-viewer__close{color:#fff;opacity:1}[data-v-1af381d1] .el-date-editor.el-input,[data-v-1af381d1] .el-select{width:100%!important}[data-v-1af381d1] .el-table .cell{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.el-button--primary[data-v-2bfb8f91],.el-button--primary[data-v-2bfb8f91]:active,.el-button--primary[data-v-2bfb8f91]:focus,.el-button--primary[data-v-2bfb8f91]:hover{background:#14928a;border-color:#14928a;color:#fff}[data-v-2bfb8f91] .el-image-viewer__close{color:#fff;opacity:1}[data-v-2bfb8f91] .el-date-editor.el-input,[data-v-2bfb8f91] .el-select{width:100%!important}[data-v-2bfb8f91] .el-table .cell{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}

+ 0 - 0
dist/static/css/chunk-20c5063f.ad6c378c.css → dist/static/css/chunk-20c5063f.f169f753.css


+ 1 - 0
dist/static/css/chunk-2b3a297e.c95edd47.css

@@ -0,0 +1 @@
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}[data-v-18cdeaa2] .el-calendar-day{-webkit-box-sizing:border-box;box-sizing:border-box;height:80px!important;min-width:118px}[data-v-18cdeaa2] .current.is-selected{border:2px solid #137f79}[data-v-18cdeaa2] .current.is-selected .el-calendar-day{height:76px!important}.vipDot[data-v-18cdeaa2]{background-color:#2aaea6}.teamDot[data-v-18cdeaa2],.vipDot[data-v-18cdeaa2]{width:30px;height:30px;margin-top:10px;display:inline-block;border-radius:50%;text-align:center;line-height:30px;color:#fff;font-size:14px}.teamDot[data-v-18cdeaa2]{background-color:#5a79f6}.newDot[data-v-18cdeaa2]{width:30px;height:30px;margin-top:10px;background-color:#34b1f6;display:inline-block;border-radius:50%;text-align:center;line-height:30px;color:#fff;font-size:14px}

+ 1 - 1
dist/static/css/chunk-0d0c4070.74157280.css → dist/static/css/chunk-39b5fb00.9fed7e93.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.vipwrap[data-v-2fa00474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vipwrap .newBand[data-v-2fa00474]{margin-right:20px}.resetClassForm[data-v-2fa00474] .el-date-editor.el-input,.resetClassForm[data-v-2fa00474] .el-date-editor.el-input__inner{width:180px!important}[data-v-2fa00474] .el-date-editor.el-input,[data-v-2fa00474] .el-date-editor.el-input__inner{width:100px!important}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.vipwrap[data-v-9b8d86ae]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vipwrap .newBand[data-v-9b8d86ae]{margin-right:20px}.resetClassForm[data-v-9b8d86ae] .el-date-editor.el-input,.resetClassForm[data-v-9b8d86ae] .el-date-editor.el-input__inner{width:180px!important}[data-v-9b8d86ae] .el-date-editor.el-input,[data-v-9b8d86ae] .el-date-editor.el-input__inner{width:100px!important}

+ 0 - 0
dist/static/css/chunk-4a8375df.9689cd1e.css → dist/static/css/chunk-4a8375df.ef7999b4.css


+ 0 - 1
dist/static/css/chunk-847ece5c.04613e62.css

@@ -1 +0,0 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.tr-cotainer{margin-top:20px}.teacherInfo .infoWrap[data-v-e8f005a4]{margin-top:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.teacherInfo .infoWrap .left[data-v-e8f005a4]{max-width:1000px;width:100%}.teacherInfo .infoWrap .left h4[data-v-e8f005a4]{margin-bottom:20px}.teacherInfo .infoWrap .right[data-v-e8f005a4]{margin-left:100px}.teacherInfo .infoWrap .right .teacherIcon[data-v-e8f005a4]{width:150px;height:150px;border-radius:50%;overflow:hidden}.teacherInfo .infoWrap .right .teacherIcon img[data-v-e8f005a4]{width:150px;height:150px}[data-v-e8f005a4] .el-form-item{width:100%}[data-v-e8f005a4] .el-date-editor.el-input,[data-v-e8f005a4] .el-select{width:100%!important}[data-v-e8f005a4] .el-form-item__content{font-size:14px!important;margin-right:5%}.wrap[data-v-300e27c7]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}[data-v-300e27c7] .el-textarea__inner{width:254px}.courseInfo h4{margin-bottom:20px}.courseInfo .tableMargin{margin-top:20px}

+ 1 - 0
dist/static/css/chunk-8f419356.5ce7ac71.css

@@ -0,0 +1 @@
+.tr-cotainer{margin-top:20px}.teacherInfo .infoWrap[data-v-e8f005a4]{margin-top:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.teacherInfo .infoWrap .left[data-v-e8f005a4]{max-width:1000px;width:100%}.teacherInfo .infoWrap .left h4[data-v-e8f005a4]{margin-bottom:20px}.teacherInfo .infoWrap .right[data-v-e8f005a4]{margin-left:100px}.teacherInfo .infoWrap .right .teacherIcon[data-v-e8f005a4]{width:150px;height:150px;border-radius:50%;overflow:hidden}.teacherInfo .infoWrap .right .teacherIcon img[data-v-e8f005a4]{width:150px;height:150px}[data-v-e8f005a4] .el-form-item{width:100%}[data-v-e8f005a4] .el-date-editor.el-input,[data-v-e8f005a4] .el-select{width:100%!important}[data-v-e8f005a4] .el-form-item__content{font-size:14px!important;margin-right:5%}.wrap[data-v-300e27c7]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}[data-v-300e27c7] .el-textarea__inner{width:254px}.courseInfo h4{margin-bottom:20px}.courseInfo .tableMargin{margin-top:20px}

+ 1 - 1
dist/static/css/chunk-41c36ae6.876138bb.css → dist/static/css/chunk-968fbaba.5ef04d49.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.titlewrap[data-v-43738fc3]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.titlewrap[data-v-43738fc3],.wrap[data-v-43738fc3]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.wrap div[data-v-43738fc3]{margin-right:20px}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.titlewrap[data-v-bef77492]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.titlewrap[data-v-bef77492],.wrap[data-v-bef77492]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.wrap div[data-v-bef77492]{margin-right:20px}

+ 0 - 0
dist/static/css/chunk-libs.5cf311f0.css → dist/static/css/chunk-libs.3dfb7769.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.69dc2025.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-0d0c4070.4378826a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-13d62a96.3b538c8f.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-2b3a297e.1ad643e5.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-39b5fb00.5d862f90.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-41c36ae6.856d3c31.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-847ece5c.7860f42d.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-880a4ce0.ad4956e0.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-8f419356.d6b2cd83.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-968fbaba.f16e458a.js


+ 3 - 0
src/router/index.js

@@ -82,6 +82,7 @@ export const constantRoutes = [
     component: () => import('@/views/login/index'),
     hidden: true
   },
+
   {
     path: '/',
     redirect: '/main/main'
@@ -308,5 +309,7 @@ export const asyncRoutes = {
   // 汇会账号管理
   adapayManager: () => import('@/views/adapayAccount/index'),
   adapayOperation: () => import('@/views/adapayAccount/form'),
+  // 日历课表
+  calendarList: () => import('@/views/teacherManager/teacherDetail/components/calendarList')
 }
 export default router

+ 21 - 0
src/utils/date.js

@@ -0,0 +1,21 @@
+export function setDate (date) {
+  let y = date.getFullYear();
+  let m = date.getMonth() + 1;
+  let d = date.getDate();
+  m = m < 10 ? "0" + m : m;
+  d = d < 10 ? "0" + d : d;
+  return y + "-" + m + "-" + d;
+}
+
+export function getCurrentMonthFirst (date) {
+  date.setDate(1);
+  return date;
+}
+
+export function getCurrentMonthLast (date) {
+  var currentMonth = date.getMonth();
+  var nextMonth = ++currentMonth;
+  var nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1);
+  var oneDay = 1000 * 60 * 60 * 24;
+  return new Date(nextMonthFirstDay - oneDay);
+}

+ 19 - 6
src/views/accompanyManager/accompanys.vue

@@ -106,7 +106,7 @@
           <template slot-scope="scope">
             <div>
               <el-button type="text"
-                         v-if="!scope.row.isSettlement && permission('courseSchedule/classStartDateAdjust')"
+                         v-if="!scope.row.isSettlement && permission('courseSchedule/practiceCourseAdjust')"
                          @click="resetClass(scope.row)">调整</el-button>
               <el-button type="text"
                          v-if="!scope.row.isSettlement && scope.row.status == 'NOT_START' && permission('accompanys/remove')"
@@ -259,7 +259,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="课程组调整"
+    <el-dialog :title="isMultiple?'课程组调整':'更换老师'"
                width="400px"
                :before-close="teacherClose"
                :visible.sync="teacherVisible">
@@ -286,7 +286,8 @@
                        :label="item.name"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="课程组老师">
+        <el-form-item label="课程组老师"
+                      v-if="isMultiple">
           <el-select v-model.trim="teacherForm.teacher"
                      filterable
                      clearable>
@@ -296,7 +297,19 @@
                        :label="item.realName"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="教务老师">
+        <el-form-item label="指导老师"
+                      v-else="isMultiple">
+          <el-select v-model.trim="teacherForm.teacher"
+                     filterable
+                     clearable>
+            <el-option v-for="(item,index) in teacherList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.realName"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="教务老师"
+                      v-show="isMultiple">
           <el-select v-model.trim="teacherForm.educationalTeacherId"
                      filterable
                      clearable>
@@ -306,7 +319,7 @@
                        :label="item.userName"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item v-show="isMultiple">
+        <el-form-item v-if="isMultiple">
           <p style="color:#FF5353">*更改课程组老师,将更换全部未开始课程的老师</p>
         </el-form-item>
       </el-form>
@@ -798,7 +811,7 @@ export default {
       });
     },
     teacherClose () {
-      this.isMultiple = true;
+      this.isMultiple = false;
       this.teacherForm.teacher = null;
       this.teacherVisible = false;
     },

+ 7 - 11
src/views/levelManager/levelManager.vue

@@ -10,6 +10,10 @@
                class="searchForm"
                v-model.trim="searchForm">
         <el-form-item>
+          <el-input v-model.trim="searchForm.name"
+                    placeholder="请输入姓名"></el-input>
+        </el-form-item>
+        <el-form-item>
           <el-input v-model.trim="searchForm.orderNo"
                     placeholder="请输入订单编号"></el-input>
         </el-form-item>
@@ -183,6 +187,7 @@ export default {
     return {
       orderDate: null,
       searchForm: {
+        name: null,
         orderNo: null,
         transNo: null,
         city: null,
@@ -249,17 +254,8 @@ export default {
     getList () {
       let searchForm = this.searchForm;
       let params = cleandeep(searchForm)
-      // {
-      //   orderNo: searchForm.orderNo ? searchForm.orderNo : null,
-      //   transNo: searchForm.transNo ? searchForm.transNo : null,
-      //   city: searchForm.city ? searchForm.city : null,
-      //   status: searchForm.status ? searchForm.status : null,
-      //   startTime: searchForm.startTime ? searchForm.startTime : null,
-      //   endTime: searchForm.endTime ? searchForm.endTime : null,
-      //   organId: searchForm.organId ? searchForm.organId : null,
-      //   page: this.pageInfo.page,
-      //   rows: this.pageInfo.limit,
-      // };
+      params.page = this.pageInfo.page
+      params.rows = this.pageInfo.limit
       degreeQueryPage(params).then((res) => {
         let result = res.data;
         if (res.code == 200) {

+ 814 - 0
src/views/teacherManager/teacherDetail/components/calendarList.vue

@@ -0,0 +1,814 @@
+<template>
+  <div class="m-container">
+    <el-calendar style="minWidth:810px">
+      <template slot="dateCell"
+                slot-scope="scope">
+        <div @click="showDate(scope)"
+             style="height:100%">
+          <p>
+            {{scope.data.day.substring(8)}}
+          </p>
+          <div>
+            <span v-for="(item,index) in newList"
+                  class='newDot'
+                  :key="item.id"
+                  v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='PRACTICE'">
+              网
+            </span>
+            <span v-for="(item,index) in vipList"
+                  class='vipDot'
+                  :key="item.id"
+                  v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='VIP'">
+              vip
+            </span>
+            <span v-for="(item,index) in teamList"
+                  class='teamDot'
+                  :key="item.id"
+                  v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='MUSIC'">
+              乐
+            </span>
+
+          </div>
+        </div>
+
+      </template>
+    </el-calendar>
+    <div class="tableWrap"
+         v-if='tableList.length>0'>
+      <el-table :data="tableList"
+                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+        <el-table-column align="center"
+                         prop="organName"
+                         label="分部名称"></el-table-column>
+        <el-table-column align="center"
+                         width="130px"
+                         prop="musicGroupId"
+                         label="乐团/课程组编号"></el-table-column>
+        <el-table-column align="center"
+                         prop="id"
+                         label="课程编号"></el-table-column>
+        <el-table-column align="center"
+                         width="200px"
+                         label="时间">
+          <template slot-scope="scope">{{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 16) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(11,5) : ''}}</template>
+        </el-table-column>
+        <!-- <el-table-column align="center" prop="groupName" label="乐团/VIP名"></el-table-column> -->
+        <!-- <el-table-column align="center" prop="classGroupName" label="班级名称"></el-table-column> -->
+        <el-table-column align="center"
+                         prop="studentId"
+                         label="学生ID">
+          <template slot-scope="scope">
+            <div v-if="scope.row.groupType != 'MUSIC'">{{scope.row.studentId}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center"
+                         prop="subjectName"
+                         label="声部"></el-table-column>
+        <el-table-column align="center"
+                         prop="name"
+                         label="课程名称"></el-table-column>
+        <el-table-column align="center"
+                         label="课程类型">
+          <template slot-scope="scope">
+            <div>{{ scope.row.type | coursesType}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center"
+                         label="教学模式">
+          <template slot-scope="scope">
+            <div>{{ scope.row.teachMode | teachMode}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center"
+                         prop="schoolName"
+                         label="教学点">
+          <template slot-scope="scope">
+            <div>{{scope.row.schoolName?scope.row.schoolName:'网络教室'}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center"
+                         prop="courseScheduleStatus"
+                         label="课程状态">
+          <template slot-scope="scope">
+            <div>{{ scope.row.status | coursesStatus }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center"
+                         label="操作"
+                         fixed="right"
+                         width="180px">
+          <template slot-scope="scope">
+            <!-- v-if="permission('teamCourseList/details')" -->
+            <div>
+              <el-button v-if="!scope.row.isSettlement && permission('courseSchedule/classStartDateAdjust')&&scope.row.groupType ==='MUSIC'"
+                         type="text"
+                         @click="resetClass(scope.row)">调整</el-button>
+              <el-button v-if="!scope.row.isSettlement && permission('courseSchedule/classStartDateAdjust')&&scope.row.groupType ==='VIP'"
+                         type="text"
+                         @click="resetClass(scope.row)">调整</el-button>
+              <el-button type="text"
+                         v-if="!scope.row.isSettlement && permission('courseSchedule/practiceCourseAdjust')&&scope.row.groupType==='PRACTICE'"
+                         @click="resetClass(scope.row)">调整</el-button>
+              <el-button type="text"
+                         v-if="scope.row.groupType==='PRACTICE'&&scope.row.status == 'NOT_START'&&scope.row.practiceGroup['type']!='TRIAL'&& permission('courseSchedule/practiceCourseTeacherAdjust')"
+                         @click="resetTeacher(scope.row)">更换老师</el-button>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :total="rules.total"
+                  :page.sync="rules.page"
+                  :limit.sync="rules.limit"
+                  :page-sizes="rules.page_size"
+                  @pagination="getList" />
+    </div>
+
+    <!-- 乐团调整 -->
+    <el-dialog title="课程调整"
+               destroy-on-close
+               width="400px"
+               :visible.sync="musicVisible">
+      <el-form :model="musicForm"
+               ref="musicFormref"
+               :rules="musicRules"
+               label-position="right"
+               label-width="80px;">
+        <el-form-item label="指导老师"
+                      prop="teacher">
+          <el-select v-model.trim="musicForm.teacher"
+                     style="width:220px!important"
+                     clearable
+                     filterable>
+            <el-option v-for="(item,index) in teacherList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.realName"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="上课日期"
+                      prop="date">
+          <el-date-picker v-model.trim="musicForm.date"
+                          type="date"
+                          :picker-options="{
+                            firstDayOfWeek:1
+                          }"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择日期"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="开始时间"
+                      prop="startTime">
+          <el-time-select placeholder="起始时间"
+                          v-model="startCourseTime"
+                          @change="changeStartTime"
+                          :picker-options="{
+                            start: '04:30',
+                            step: '00:05',
+                            end: '23:30'
+                            }"></el-time-select>
+        </el-form-item>
+        <el-form-item label="结束时间"
+                      prop="endTime">
+          <el-time-select placeholder="结束时间"
+                          v-model="endCourseTime"
+                          :picker-options="{
+                            start: '04:30',
+                            step: '00:05',
+                            end: '23:30',
+                            minTime: startCourseTime
+                          }"></el-time-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="musicVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="submitResetClass">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- vip调整 -->
+    <el-dialog title="课程调整"
+               destroy-on-close
+               width="400px"
+               :visible.sync="vipVisible">
+      <el-form :model="vipForm"
+               ref="vipFormref"
+               :rules="vipRules"
+               label-position="right"
+               label-width="80px;"
+               :inline="true">
+        <el-form-item label="上课日期"
+                      prop="date">
+          <el-date-picker v-model.trim="vipForm.date"
+                          style="width:200px!important;"
+                          type="date"
+                          :picker-options="{
+                              firstDayOfWeek:1
+                            }"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择日期"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="开始时间"
+                      prop="startCourseTime"
+                      key="time2">
+          <el-time-select placeholder="起始时间"
+                          style="width:200px!important;"
+                          v-model="startCourseTime"
+                          :picker-options="{
+                            start: '04:30',
+                            step: '00:05',
+                            end: '23:30'
+                            }"></el-time-select>
+        </el-form-item>
+        <el-form-item label="课程类型"
+                      prop="courseType">
+          <el-select clearable
+                     v-model.trim="vipForm.teachMode">
+            <el-option label="线上课"
+                       value="ONLINE"></el-option>
+            <el-option label="线下课"
+                       value="OFFLINE"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="教学地点"
+                      v-if="vipForm.teachMode == 'OFFLINE'"
+                      prop="schoolId">
+          <el-select key='school'
+                     v-model="vipForm.schoolId"
+                     filterable
+                     clearable>
+            <el-option v-for="(item,index) in schoolList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.name"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="vipVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="submitResetVipClass">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 网管课调整 -->
+    <el-dialog title="课程调整"
+               destroy-on-close
+               width="400px"
+               :visible.sync="practiceVisible">
+      <el-form :model="practiceForm"
+               ref="practiceFormref"
+               :rules="practiceRules"
+               label-position="right"
+               label-width="80px;"
+               :inline="true">
+        <el-form-item label="上课日期"
+                      prop="date"
+                      v-if="practiceForm.courseType != 'TRIAL'">
+          <el-date-picker v-model.trim="practiceForm.date"
+                          style="width:200px!important;"
+                          type="date"
+                          :picker-options="courseOption"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择日期"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="上课日期"
+                      prop="date"
+                      v-else>
+          <el-date-picker v-model.trim="practiceForm.date"
+                          style="width:200px!important;"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :picker-options="{
+        firstDayOfWeek: 1
+    }"
+                          placeholder="选择日期"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="开始时间"
+                      key="time1"
+                      prop="startCourseTime">
+          <el-time-select placeholder="起始时间"
+                          style="width:200px!important;"
+                          v-model="startCourseTime"
+                          :picker-options="{
+                            start: '07:00',
+                            step: '00:05',
+                            end: '23:00'
+                            }"></el-time-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="practiceVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="submitPracticeResetClass">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 老师调整 -->
+    <el-dialog title="老师调整"
+               width="400px"
+               :visible.sync="teacherVisible">
+      <el-form :model="teacherForm"
+               ref="teacherForm"
+               :rules="teacherRules"
+               label-position="right"
+               label-width="80px;"
+               :inline="true">
+        <el-form-item label="指导老师">
+          <el-select v-model.trim="teacherForm.teacher"
+                     filterable
+                     clearable>
+            <el-option v-for="(item,index) in teacherList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.realName"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="teacherVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="subresetTeacher">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { superFindCourseSchedules, getTeacher, resetCourse, practiceCourseAdjus, practiceCourseTeacherAdjust } from "@/api/buildTeam";
+import { setDate, getCurrentMonthFirst, getCurrentMonthLast } from "@/utils/date"
+import { getTeachSchool } from "@/api/teacherManager";
+import pagination from "@/components/Pagination/index";
+import { permission } from "@/utils/directivePage";
+export default {
+  components: { pagination },
+  data () {
+    return {
+      startCourseTime: '',
+      endCourseTime: '',
+      dataList: [],
+      value: new Date(),
+      teacherIdList: '',
+      vipList: [],
+      teamList: [],
+      newList: [],
+      tableList: [],
+      teacherList: [],
+      schoolList: [],
+      educationList: [],
+      startTime: '',
+      endTime: '',
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      },
+      musicVisible: false,
+      vipVisible: false,
+      practiceVisible: false,
+      musicForm: {
+        teacher: "",
+        assistant: "",
+        date: "",
+        id: "",
+        startTime: "",
+        endTime: "",
+        type: "",
+      },
+      musicRules: {
+        teacher: [
+          { required: true, message: "请选择主教老师名称", trigger: "blur" }
+        ],
+        date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
+      },
+      vipForm: {
+        date: "",
+        id: "",
+        schoolId: '',
+        teachMode: ""
+      },
+      vipRules: {
+        date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
+      },
+      practiceRules: {
+        date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
+      },
+
+      practiceForm: {
+        id: '',
+        date: '',
+        courseType: '',
+        coursesExpireDate: ''
+      },
+      courseOption: null,
+      pickerOptions: {
+        firstDayOfWeek: 1,
+        disabledDate (time) {
+          return time.getTime() + 86400000 <= new Date().getTime();
+        }
+      },
+      teacherForm: {
+        teacher: null,
+        courseScheduleId: null
+      },
+      teacherRules: {
+        teacher: [{ required: true, message: "请选择老师", trigger: "blur" }],
+        educationalTeacherId: [{ required: true, message: "请选择教务老师", trigger: "blur" }]
+      },
+      teacherVisible: false
+    }
+  },
+  mounted () {
+    this.courseOption = this.coursesDate();
+    this.getCalendatList()
+    getTeacher().then(res => {
+      if (res.code == 200) {
+        this.teacherList = res.data;
+      }
+    });
+    getTeachSchool({
+      userId: this.teacherIdList
+    }).then(res => {
+      if (res.code == 200) {
+        this.schoolList = res.data;
+      }
+    })
+
+    this.$nextTick(() => {
+      // 点击上个月
+      let prevBtn1 = document.querySelector('.el-calendar__button-group .el-button-group>button:nth-child(1)');
+      prevBtn1.addEventListener('click', () => {
+        this.value = new Date(this.value.setMonth(this.value.getMonth() + -1, 1))
+        this.setCourseList(this.value)
+      })
+      // 点击今天
+      let prevBtn2 = document.querySelector('.el-calendar__button-group .el-button-group>button:nth-child(2)');
+      prevBtn2.addEventListener('click', () => {
+        this.value = new Date()
+        this.setCourseList(this.value)
+      })
+      // 点击下个月
+      let prevBtn3 = document.querySelector('.el-calendar__button-group .el-button-group>button:nth-child(3)');
+      prevBtn3.addEventListener('click', () => {
+
+        this.value = new Date(this.value.setMonth(this.value.getMonth() + 1, 1))
+        this.setCourseList(this.value)
+      })
+    })
+
+  },
+  activated () {
+
+  },
+  methods: {
+
+    getList () {
+      superFindCourseSchedules({
+        teacherIdList: this.teacherIdList, page: this.rules.page,
+        rows: this.rules.limit, startTime: this.startTime, endTime: this.endTime
+      }).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows
+          this.rules.total = res.data.total
+        }
+      })
+    },
+    getCalendatList () {
+      this.teacherIdList = this.$route.query.teacherId
+      // 获取当前月第一天和最后一天
+      let startTime = setDate(getCurrentMonthFirst(this.value))
+      let endTime = setDate(getCurrentMonthLast(this.value))
+      superFindCourseSchedules({ teacherIdList: this.teacherIdList, rows: 9999, page: 1, startTime, endTime }).then(res => {
+        if (res.code === 200) {
+          this.dataList = res.data.rows
+          // 过滤数据
+          this.vipList = []
+          this.teamList = []
+          this.newList = []
+          for (let i in this.dataList) {
+            if (this.dataList[i].groupType === 'VIP') {
+              this.vipList.push(this.dataList[i])
+            }
+            if (this.dataList[i].groupType === 'MUSIC') {
+              this.teamList.push(this.dataList[i])
+            }
+            if (this.dataList[i].groupType === 'PRACTICE') {
+              this.newList.push(this.dataList[i])
+            }
+          }
+
+          this.vipList = this.reduceArray(this.vipList, 'classDate')
+          this.teamList = this.reduceArray(this.teamList, 'classDate')
+          this.newList = this.reduceArray(this.newList, 'classDate')
+        }
+      })
+    },
+    showDate (scope) {
+      this.startTime = scope.data.day
+      this.endTime = scope.data.day
+      this.value = scope.date
+      if (scope.data.type === 'next-month' || scope.data.type === 'prev-month') {
+        this.getCalendatList()
+      }
+
+      this.getList()
+    },
+    reduceArray (array, str) {
+      let hash = {}
+      array = array.reduce(function (arr, current) {
+        hash[current[str]] ? '' : hash[current[str]] = true && arr.push(current);
+        return arr
+      }, [])
+      return array
+    },
+    setCourseList (val) {
+      this.startTime = setDate(val)
+      this.endTime = setDate(val)
+      this.getList()
+      this.getCalendatList()
+
+    },
+    permission (str, parent) {
+      return permission(str, parent);
+    },
+    resetClass (row) {
+
+      this.value = new Date(row.classDate.replace(/-/g, '/'))
+      switch (row.groupType) {
+        case 'MUSIC': {
+          this.$nextTick(() => {
+            this.musicForm.teacher = parseInt(row.actualTeacherId);
+            this.musicForm.date = row.classDate;
+            // this.startCourseTime = row.startClassTime.split(' ')[1].substring(0, 5);
+            let startClassTime = row.startClassTime.split(' ')[1].substring(0, 5)
+            this.$set(this, 'startCourseTime', startClassTime)
+            this.endCourseTime = row.endClassTime.split(' ')[1].substring(0, 5);
+            this.musicForm.id = row.id;
+            this.$forceUpdate()
+            this.musicVisible = true;
+
+          })
+          break
+        }
+        case 'VIP': {
+          this.$nextTick(() => {
+            this.vipForm.date = row.classDate;
+            this.vipForm.id = row.id;
+            this.vipForm.teachMode = row.teachMode
+            this.vipForm.schoolId = row.schoolId || ''
+            // this.startCourseTime = row.startClassTime.split(' ')[1].substring(0, 5);
+
+
+            let startClassTime = row.startClassTime.split(' ')[1].substring(0, 5)
+            this.startCourseTime = null;
+            this.$set(this, 'startCourseTime', startClassTime)
+            this.vipVisible = true;
+            this.$forceUpdate()
+          })
+          break
+        }
+        case 'PRACTICE': {
+          this.$nextTick(() => {
+            this.practiceForm.date = row.classDate;
+            // this.startCourseTime = row.startClassTime.split(' ')[1].substring(0, 5);
+            let startClassTime = row.startClassTime.split(' ')[1].substring(0, 5)
+            this.startCourseTime = null;
+            this.$set(this, 'startCourseTime', startClassTime)
+            console.log(this.startCourseTime)
+            this.practiceForm.id = row.id;
+            this.practiceForm.courseType = row.practiceGroup.type
+            this.practiceForm.coursesExpireDate = row.practiceGroup.coursesExpireDate
+
+            this.practiceVisible = true;
+            this.$forceUpdate()
+          })
+          break
+        }
+      }
+
+    },
+    changeStartTime () {
+      this.endCourseTime = '';
+    },
+    submitResetClass () {
+      if (!this.startCourseTime || !this.endCourseTime) {
+        this.$message.error("请填写开始时间或结束时间");
+        return;
+      }
+      this.$refs['musicFormref'].validate(res => {
+        if (res) {
+          let obj = {
+            actualTeacherId: this.musicForm.teacher,
+            startClassTimeStr: this.startCourseTime,
+            endClassTimeStr: this.endCourseTime,
+            id: this.musicForm.id,
+            classDate: this.musicForm.date,
+          };
+          resetCourse(obj).then(res => {
+            if (res.code == 200) {
+              this.$message.success("修改成功");
+              console.log(this.value)
+              this.setCourseList(this.value)
+              this.musicVisible = false;
+            }
+          });
+        }
+      })
+    },
+    submitResetVipClass () {
+      if (!this.startTime) {
+        this.$message.error("请填写修改时间");
+        return;
+      }
+      let classTime = this.vipForm.date
+        ? new Date(this.vipForm.date)
+        : new Date();
+      let ymd =
+        classTime.getFullYear() +
+        "-" +
+        (classTime.getMonth() + 1) +
+        "-" +
+        classTime.getDate();
+      let tempStartTime = this.startCourseTime
+      if (this.startCourseTime.length <= 5) {
+        tempStartTime = tempStartTime + ":00";
+      }
+      let obj = {
+        startClassTime: ymd + " " + tempStartTime,
+        // startClassTimeStr: this.startTime,
+        id: this.vipForm.id,
+        classDate: this.vipForm.date,
+        schoolId: this.vipForm.schoolId || null,
+        teachMode: this.vipForm.teachMode || null
+      };
+      resetCourse(obj).then(res => {
+        if (res.code == 200) {
+          this.$message.success("修改成功");
+          this.vipVisible = false;
+          this.setCourseList(this.value)
+        } //else {
+        //   this.$message.error(res.msg)
+        // }
+      });
+    },
+    submitPracticeResetClass () {
+      if (!this.startCourseTime) {
+        this.$message.error("请填写修改时间");
+        return;
+      }
+      let obj = {
+        startClassTimeStr: this.startCourseTime,
+        id: this.practiceForm.id,
+        classDate: this.practiceForm.date
+      };
+      practiceCourseAdjus(obj).then(res => {
+        if (res.code == 200) {
+          this.$message.success("修改成功");
+          this.practiceVisible = false;
+          this.setCourseList(this.value)
+        } //else {
+        //     this.$message.error(res.msg)
+        //   }
+      });
+    },
+    coursesDate () {
+      let self = this;
+      return {
+        firstDayOfWeek: 1,
+        disabledDate: time => {
+          // if (self.leftForm.courseStart) {
+          // let date = new Date(self.leftForm.courseStart.replace(/-/, "/"));
+          // coursesExpireDate
+          let date = new Date(this.practiceForm.coursesExpireDate.replace(/-/, "/"));
+          return time.getTime() > date.getTime();
+          // }
+          // return;
+        }
+      };
+    },
+    resetTeacher (row) {
+      this.teacherForm.teacher = row.actualTeacherId;
+      this.teacherForm.courseScheduleId = row.id;
+      this.teacherVisible = true;
+    },
+    subresetTeacher () {
+      this.$refs.teacherForm.validate(some => {
+        if (some) {
+          // 修改单节课老师
+          practiceCourseTeacherAdjust({
+            courseScheduleId: this.teacherForm.courseScheduleId,
+            teacherId: this.teacherForm.teacher
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message.success("修改成功");
+              this.teacherVisible = false;
+              this.setCourseList(this.value)
+            }
+          })
+        } else {
+          return;
+        }
+      });
+    }
+  },
+  watch: {
+    musicVisible (val) {
+      if (!val) {
+        this.musicForm = {
+          teacher: "",
+          assistant: "",
+          date: "",
+          id: "",
+          type: "",
+        }
+        this.startCourseTime = ""
+        this.endCourseTime = ""
+        this.$refs['musicFormref'].resetFields()
+      }
+    },
+    vipVisible (val) {
+      if (!val) {
+        this.startCourseTime = ""
+        this.vipForm = {
+          date: "",
+          id: "",
+          schoolId: "",
+          teachMode: ""
+        }
+        this.$refs['vipFormref'].resetFields()
+      }
+    },
+    practiceVisible (val) {
+      if (!val) {
+        this.startCourseTime = ""
+        this.practiceForm = {
+          id: '',
+          date: '',
+          courseType: '',
+          coursesExpireDate: ''
+        }
+        this.$refs['practiceFormref'].resetFields()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+// /deep/.el-input__inner {
+//   width: 220px !important;
+// }
+/deep/ .el-calendar-day {
+  box-sizing: border-box;
+  height: 80px !important;
+  min-width: 118px;
+}
+/deep/.current.is-selected {
+  border: 2px solid #137f79;
+
+  .el-calendar-day {
+    height: 76px !important;
+  }
+}
+// /deep/.current {
+//   border-bottom: 2px solid #ebeef5;
+//   border-right: 2px solid #ebeef5;
+// }
+
+.vipDot {
+  width: 30px;
+  height: 30px;
+  margin-top: 10px;
+  background-color: #2aaea6;
+  display: inline-block;
+  border-radius: 50%;
+  text-align: center;
+  line-height: 30px;
+  color: #fff;
+  font-size: 14px;
+}
+.teamDot {
+  width: 30px;
+  height: 30px;
+  margin-top: 10px;
+  background-color: #5a79f6;
+  display: inline-block;
+  border-radius: 50%;
+  text-align: center;
+  line-height: 30px;
+  color: #fff;
+  font-size: 14px;
+}
+.newDot {
+  width: 30px;
+  height: 30px;
+  margin-top: 10px;
+  background-color: #34b1f6;
+  display: inline-block;
+  border-radius: 50%;
+  text-align: center;
+  line-height: 30px;
+  color: #fff;
+  font-size: 14px;
+}
+</style>

+ 9 - 2
src/views/teacherManager/teacherDetail/index.vue

@@ -59,6 +59,11 @@
                      name="9">
           <serveStudentList v-if="activeName == 9" />
         </el-tab-pane>
+        <el-tab-pane label="月历课表"
+                     v-if="permissionList.calendarList"
+                     name="10">
+          <calendarList v-if="activeName == 10" />
+        </el-tab-pane>
       </el-tabs>
     </div>
   </div>
@@ -75,6 +80,7 @@ import timerList from "@/views/teacherManager/teacherDetail/components/timerList
 import outCourseList from "@/views/teacherManager/teacherDetail/components/outCourseList";
 import teacherNetwork from "@/views/teacherManager/teacherDetail/components/teacherNetwork";
 import serveStudentList from "@/views/teacherManager/teacherDetail/components/serveStudentList";
+import calendarList from '@/views/teacherManager/teacherDetail/components/calendarList'
 import { permission } from "@/utils/directivePage";
 export default {
   components: {
@@ -88,7 +94,8 @@ export default {
     timerList,
     outCourseList,
     teacherNetwork,
-    serveStudentList
+    serveStudentList,
+    calendarList
   },
   name: "teacherDetail",
   data () {
@@ -108,7 +115,7 @@ export default {
         outCourseList: permission("/teacherDetail/outCourseList"), // 
         teacherNetwork: permission("/teacherDetail/teacherNetwork"),
         serveStudentList: permission("/teacherDetail/serveStudentList"),
-
+        calendarList: permission("/teacherDetail/calendarList"),
       },
       Fsearch: null,
       Frules: null

+ 0 - 1
src/views/vipClass/vipReset.vue

@@ -459,7 +459,6 @@ export default {
       pickerOptions: {
         firstDayOfWeek: 1,
         disabledDate (time) {
-
           return time.getTime() + 86400000 <= new Date().getTime();
         }
       },

Some files were not shown because too many files changed in this diff