Browse Source

1030

11:12
mo 5 years ago
parent
commit
8b31aac57c

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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-00de8e4e.c031b532.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-1228c85e.8e050da8.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-1228c85e.be7162e6.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-1e7593f4.d4b9ac67.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-1e7593f4.e6fcf6ae.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-21a5b3d9.ca41e0c8.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-21a5b3d9.f374ffa1.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-641dba2d.a7d8692a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-641dba2d.c24c98bb.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6e008f87.3d5342c2.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6e008f87.83dcd7a4.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-b18c1384.29e7ebce.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-b18c1384.5927d2e3.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-f7b8967e.0fbd3a94.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-f7b8967e.5093e948.js


+ 2 - 2
src/api/buildTeam.js

@@ -229,8 +229,8 @@ export function getEveryClass (data) {
 export function setTeamTeacher (data) {
   return request({
     url: '/web-server/classGroup/addClassGroupTeacher',
-    method: 'get',
-    params: data
+    method: 'post',
+    data
   })
 }
 

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

@@ -360,7 +360,7 @@ export default {
       let id = row.id;
       // console.log(row.id);
       // 'subjectId': id, ' type'='INSTRUMENT'
-      getGoods({ 'subjectId': 3, 'type': 'INSTRUMENT' }).then(res => {
+      getGoods({ 'subjectId': id, 'type': 'INSTRUMENT' }).then(res => {
         if (res.code == 200) {
           row.goodsList = res.data;
           // console.log(row);
@@ -375,7 +375,7 @@ export default {
     chioseMark (row) {
       row.markVisible = true
       let id = row.id;
-      getGoods({ 'subjectId': 3, 'type': 'ACCESSORIES' }).then(res => {
+      getGoods({ 'subjectId': id, 'type': 'ACCESSORIES' }).then(res => {
         if (res.code == 200) {
           console.log(res);
           row.markChioseList = res.data;

+ 22 - 8
src/views/teamBuild/teamSeting/components/coursePlan.vue

@@ -294,7 +294,10 @@ export default {
     })
     let year = new Date().getFullYear();
     axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
-      this.holidayList = Object.keys(res.data[year])
+      if (res) {
+        this.holidayList = Object.keys(res.data[year])
+      }
+
     })
 
   },
@@ -313,7 +316,7 @@ export default {
 
       let classCount = parseInt(this.leftFrom.num);
       let date = this.leftFrom.time;
-
+      console.log(date);
       this.workOut(date, classCount, this.checkList, this.leftFrom.all);
       this.$refs['leftFrom'].resetFields();
       this.week = this.$options.data().week;
@@ -323,10 +326,11 @@ export default {
     },
     getThinkDate (date, num, type = 1) {
 
-      let Stamp = date;
-      Stamp.setDate(date.getDate() + num) // 获取当前月数的第几天
-      // console.log(date.getMonth() + 1)
-      // console.log(Stamp.getMonth() + 1)
+      let Stamp = new Date(date.getTime());
+      console.log(num);
+      // console.log(Stamp.getDate() + parseInt(num))
+      Stamp.setDate(Stamp.getDate() + parseInt(num)) // 获取当前月数的第几天
+
       var year = Stamp.getFullYear(); //获取完整的年份(4位,1970-????)
       var month = Stamp.getMonth() + 1; //获取当前月份(0-11,0代表1月)
       var mvar = '';
@@ -345,6 +349,7 @@ export default {
       if (type == 2) {
         return mvar + dvar;
       } else {
+
         return year + "-" + mvar + '-' + dvar;
       }
 
@@ -488,14 +493,20 @@ export default {
     },
     // 排课逻辑
     workOut (date, classCount, weekArr, id, startTime = '', endTime = '') {
-      let date1 = date;
+
+
       while (classCount && classCount > 0) {
         for (let i in weekArr) {
+          let date1 = new Date(date.getTime());
           let num; // 下次上课上几天后
-          weekArr - date.getDay() >= 0 ? num = weekArr : num = weekArr - date.getDay() + 7
+
+          weekArr[i] - date.getDay() >= 0 ? num = weekArr[i] : num = weekArr[i] - date.getDay() + 7
+          // console.log(num);
+          // return
           let dataStr = this.getThinkDate(date, num);
           let monthDay = this.getThinkDate(date1, num, 2)
 
+
           if (this.isholiday) {
             if (this.holidayList.indexOf(monthDay) != -1) {
               // 这里说明有节假日
@@ -552,6 +563,9 @@ export default {
           classCount--
           if (classCount == 0) break
         }
+        date.setDate(date.getDate() + 7);
+
+
       }
     },
     // 取消排课

+ 11 - 9
src/views/teamBuild/teamSeting/components/setTeacher.vue

@@ -21,11 +21,12 @@
           <template slot-scope="scope">
             <div>
               <el-select v-model="scope.row.coreTeacher"
+                         @change="setCoreTeacher"
                          v-if='teacherList'>
                 <el-option v-for='(item,index) in teacherList'
                            :label="item.username"
                            :key='index'
-                           :value="item.userId"></el-option>
+                           :value="item.id"></el-option>
               </el-select>
             </div>
           </template>
@@ -161,18 +162,17 @@ export default {
     },
     gotoNext () {
       // 点击下一步
-
+      console.log(this.singinList)
       let isTeacher = true;
       let isTeachers = []
       // 验证单技班主教老师是否指认
       for (let i in this.singinList) {
-
-        if (this.singinList[i].teacherList.coreTeacher == '') {
+        if (this.singinList[i].coreTeacher == '') {
           isTeachers.push(false)
         }
       }
       for (let j in this.allList) {
-        if (this.allList[j].teacherList.coreTeacher == '') {
+        if (this.allList[j].coreTeacher == '') {
           isTeachers.push(false)
         }
       }
@@ -187,7 +187,6 @@ export default {
       // 开始拼接数据
       this.addDate(this.singinList);
       this.addDate(this.allList);
-      console.log(this.classGroupTeacherMapperList);
       setTeamTeacher(this.classGroupTeacherMapperList).then(res => {
         if (res.code == 200) {
           this.classGroupTeacherMapperList = [];
@@ -200,17 +199,20 @@ export default {
         obj.classGroupId = arr[i].id;
         obj.musicGroupId = this.teamid;
         obj.teacherRole = 'BISHOP';
-        obj.userId = arr[i].teacherList.coreTeacher;
+        obj.userId = arr[i].coreTeacher;
         this.classGroupTeacherMapperList.push(obj)
-        for (let j in arr[i].teacherList.assistant) {
+        for (let j in arr[i].assistant) {
           let obj = {}
           obj.classGroupId = arr[i].id;
           obj.musicGroupId = this.teamid;
           obj.teacherRole = 'TEACHING';
-          obj.userId = arr[i].teacherList.assistant[j];
+          obj.userId = arr[i].assistant[j];
           this.classGroupTeacherMapperList.push(obj)
         }
       }
+    },
+    setCoreTeacher (val) {
+      console.log(this.teacherList)
     }
   },
 

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