mo vor 2 Jahren
Ursprung
Commit
aff35caa7c

+ 43 - 43
src/views/teamDetail/components/courseTransModals/tranCourseItem.vue

@@ -44,33 +44,33 @@ import { diffTimerFormMinute } from "@/utils/date";
 import dayjs from "dayjs";
 export default {
   props: {
-    types: {
-      type: Object,
-      default: {},
-    },
+    // types: {
+    //   type: Object,
+    //   default: {},
+    // },
     details: {
       type: Array,
       default: [],
     },
-    courseTypeListByName: {
-      type: Object,
-      default: {},
-    },
-    teacherList: {
-      type: Array,
-      default: [],
-    },
-    cooperationList: {
-      type: Array,
-      default: [],
-    },
+    // courseTypeListByName: {
+    //   type: Object,
+    //   default: {},
+    // },
+    // teacherList: {
+    //   type: Array,
+    //   default: [],
+    // },
+    // cooperationList: {
+    //   type: Array,
+    //   default: [],
+    // },
     coreTeacher: {
       type: String,
     },
-    assistant: {
-      type: Array,
-      default: [],
-    },
+    // assistant: {
+    //   type: Array,
+    //   default: [],
+    // },
   },
   data() {
     return {
@@ -105,29 +105,29 @@ export default {
     //   }
     //   return names.join(" ");
     // },
-    typelist() {
-      const list = [];
-      for (const key in this.types) {
-        // if (Object.hasOwnProperty.call(this.types, key)) {
-        //   const item = this.types[key];
-        //   let surplusTime = 0;
-        //   let surplus = 0;
-        //   for (const ke of item.cycle) {
-        //     surplus += parseFloat(ke.expectCourseNum);
-        //     surplusTime += parseFloat(ke.expectCourseNum) * parseFloat(ke.time);
-        //   }
-        //   surplusTime = item.courseTotalMinuties - surplusTime;
-        //   list.push({
-        //     name: this.courseTypeListByName[key],
-        //     cycles: item.cycle.length,
-        //     courseTotalMinuties: item.courseTotalMinuties,
-        //     surplus,
-        //     surplusTime,
-        //   });
-        // }
-      }
-      return list;
-    },
+    // typelist() {
+    //   const list = [];
+    //   for (const key in this.types) {
+    //     // if (Object.hasOwnProperty.call(this.types, key)) {
+    //     //   const item = this.types[key];
+    //     //   let surplusTime = 0;
+    //     //   let surplus = 0;
+    //     //   for (const ke of item.cycle) {
+    //     //     surplus += parseFloat(ke.expectCourseNum);
+    //     //     surplusTime += parseFloat(ke.expectCourseNum) * parseFloat(ke.time);
+    //     //   }
+    //     //   surplusTime = item.courseTotalMinuties - surplusTime;
+    //     //   list.push({
+    //     //     name: this.courseTypeListByName[key],
+    //     //     cycles: item.cycle.length,
+    //     //     courseTotalMinuties: item.courseTotalMinuties,
+    //     //     surplus,
+    //     //     surplusTime,
+    //     //   });
+    //     // }
+    //   }
+    //   return list;
+    // },
   },
   mounted() {
     console.log(this);

+ 4 - 4
src/views/teamDetail/components/courseTransModals/tranPlanCourse.vue

@@ -35,7 +35,7 @@
 
           </el-collapse-item>
         </el-collapse>
-        <courseItem />
+        <courseItem v-if="activeRow"  :surplustime="form.courseConvertSum.courseMinute" :activeType="'HIGH_ONLINE'"   :teacherList="teacherList"  :cooperationList="teacherList" :coreid="activeRow.coreTeacher" :type='"HIGH_ONLINE"'/>
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="transClassVisible = false">取 消</el-button>
@@ -48,7 +48,7 @@
 import tranCourseItem from "./tranCourseItem";
 import courseItem from '../modals/classroom-setting-item.vue'
 export default {
-  props: ["form"],
+  props: ["form",'teacherList'],
   components: {
     tranCourseItem,
     courseItem
@@ -67,9 +67,9 @@ export default {
       this.transPlanVisible = true;
     },
     gotoNext() {},
-    gotoPlan(){
+    gotoPlan(item){
       // 判断一下 如果班级数大于1 就进入次数排课
-
+      this.activeRow = item;
     },
   },
 };

+ 19 - 14
src/views/teamDetail/components/courseTransModals/transClass.vue

@@ -165,7 +165,7 @@
           :activeListStudent="activeListStudent"
           activeType="HIGH_ONLINE"
         />
-        <tranPlanCourse ref='tranPlanCourse' :form="form"/>
+        <tranPlanCourse ref="tranPlanCourse" :teacherList="teacherList" :form="form" />
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="transClassVisible = false">取 消</el-button>
@@ -178,24 +178,29 @@
 import { getCourseScheduleConvert } from "../../api";
 import { findSound, getTeacher } from "@/api/buildTeam";
 import transStudent from "./transStudent";
-import tranPlanCourse from './tranPlanCourse.vue'
+import tranPlanCourse from "./tranPlanCourse.vue";
 export default {
   props: {
     students: {
       type: Array,
       default: [],
     },
-  },
-  provide(){
-    return {
-      form:this.form
-    }
+    courseConvertSum: {
+      type: Object,
+      default: {
+        courseMinute: 0,
+        courseNum: 0,
+        courseType: "",
+        studentNum: 0,
+      },
+    },
   },
   data() {
     return {
       transClassVisible: false,
       getStudentList: [],
       form: {
+        courseConvertSum:this.courseConvertSum,
         classList: [
           {
             expectStudentNum: 6,
@@ -205,7 +210,8 @@ export default {
             studentList: [],
             coreTeacher: "",
             type: "HIGH_ONLINE",
-            courseScheduleList:[]
+            courseScheduleList: [],
+            cycle: [],
           },
         ],
       },
@@ -221,7 +227,7 @@ export default {
   },
   components: {
     transStudent,
-    tranPlanCourse
+    tranPlanCourse,
   },
   mounted() {
     this.init();
@@ -234,7 +240,7 @@ export default {
     getList() {},
     gotoNext() {
       this.$refs.form.validate((flag) => {
-        this.$refs.tranPlanCourse.openDialog()
+        this.$refs.tranPlanCourse.openDialog();
       });
     },
     remove(index) {
@@ -267,7 +273,7 @@ export default {
         studentList: [],
         coreTeacher: "",
         type: "HIGH_ONLINE",
-        courseScheduleList:[]
+        courseScheduleList: [],
       });
     },
     setStudent(student) {
@@ -305,11 +311,10 @@ export default {
           chioseIdList.push(stu);
         });
       });
-      console.log(chioseIdList)
+      console.log(chioseIdList);
       let arr = this.students.filter((item) => {
-        console.log(chioseIdList.indexOf(item.userId) != -1)
+        console.log(chioseIdList.indexOf(item.userId) != -1);
         return chioseIdList.indexOf(item.userId) == -1;
-
       });
       return arr;
     },

+ 1 - 1
src/views/teamDetail/components/courseTransModals/transStart.vue

@@ -20,7 +20,7 @@
           label="学员声部"
         ></el-table-column>
       </el-table>
-      <transClass ref='transClass' :students="tableList"/>
+      <transClass ref='transClass' :students="tableList" :courseConvertSum='courseConvertSum'/>
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="transVisible = false">取 消</el-button>