소스 검색

Merge remote-tracking branch 'origin/yuetuan' into 10/23-test

王新雷 4 년 전
부모
커밋
94bef2666d

+ 1 - 1
src/views/resetTeaming/components/resetPayList.vue

@@ -420,7 +420,7 @@ export default {
     },
     getList () {
       let musicGroupId = this.$route.query.id
-      musicGroupPaymentCalenderQueryPage({ page: this.rules.page, rows: this.rules.limit, musicGroupId,payUserType:this.searchForm.payUserType }).then(res => {
+      return musicGroupPaymentCalenderQueryPage({ page: this.rules.page, rows: this.rules.limit, musicGroupId, payUserType:this.searchForm.payUserType }).then(res => {
         if (res.code == 200) {
           this.rules.total = res.data.total
           this.tableList = res.data.rows;

+ 21 - 4
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -68,7 +68,7 @@
 import { getMusicCourseSettingsWithStudents, classGroupUpdate } from '@/api/buildTeam'
 import courseItem from "./classroom-setting-item";
 export default {
-  props: ["teacherList", "activeType", "courseTypeList", 'cooperationList', 'musicGroupId', 'detail'],
+  props: ["teacherList", "activeType", "courseTypeList", 'cooperationList', 'musicGroupId', 'detail', 'studentSubmitedData'],
   components: {
     courseItem,
   },
@@ -80,6 +80,7 @@ export default {
         classs: {}
       },
       collapses: [0],
+      courseTimes: {}
     };
   },
   created() {
@@ -92,12 +93,28 @@ export default {
     this.form.classs = classs
   },
   async mounted() {
-    console.log(this.detail)
     try {
-      await getMusicCourseSettingsWithStudents({
+      const studentIds = this.detail ? this.detail.subjectIdList : this.studentSubmitedData.seleched.join(',')
+      const res = await getMusicCourseSettingsWithStudents({
         musicGroupId: this.musicGroupId,
-        studentIds: this.detail.subjectIdList
+        studentIds: studentIds
       })
+      const classs = {}
+      const courseTimes = {}
+      for (const item of res.data) {
+        courseTimes[item.courseType] = item
+      }
+      for (const key in this.form.classs) {
+        if (this.form.classs.hasOwnProperty(key)) {
+          const item = this.form.classs[key]
+          if (courseTimes[key]) {
+            classs[key] = item
+          }
+        }
+      }
+      console.log(classs)
+      this.$set(this.form, 'classs', classs)
+      this.courseTimes = courseTimes
     } catch (error) {}
   },
   methods: {

+ 4 - 0
src/views/teamDetail/components/modals/select-student.vue

@@ -117,6 +117,10 @@ export default {
       }
       this.$refs.form.validate(valid => {
         if (valid) {
+          this.$listeners.submited({
+            seleched: this.seleched,
+            name: this.form.name
+          })
           this.$listeners.close()
         }
       })

+ 7 - 0
src/views/teamDetail/components/resetClass.vue

@@ -160,6 +160,7 @@
         :studentList="studentList"
         :soundList="soundList"
         :activeType="activeType"
+        @submited="studentSubmited"
         @close="studentVisible = false"
       />
     </el-dialog>
@@ -306,6 +307,7 @@
         :courseTypeList="courseTypeList"
         :cooperationList="cooperationList"
         :detail="infoDetail"
+        :studentSubmitedData="studentSubmitedData"
         @close="infoVisible = false"
       />
     </el-dialog>
@@ -773,6 +775,7 @@ export default {
       topForm: {
         classType: ""
       },
+      studentSubmitedData: null,
       infoDetail: null,
       classTimeList,
       tableList: [],
@@ -953,6 +956,10 @@ export default {
       // 获取分部所有老师
       // 助教是从员工表里选
     },
+    studentSubmited(data) {
+      this.studentSubmitedData = data
+      this.infoVisible = true
+    },
     recourse (row) {
       (this.weekList = [
         {