فهرست منبع

Merge branch 'ol_12_30' into online

wolyshaw 4 سال پیش
والد
کامیت
01a6527dc7

+ 12 - 1
src/components/remote-search/index.vue

@@ -49,6 +49,7 @@ export default {
     // this.getList();
     this.getOptions()
 
+
   },
   methods: {
     async getList() {
@@ -59,10 +60,13 @@ export default {
         data[item.userId] = item
       }
       this.listById = data
+
       this.options =
         this.list.length <= this.constant
           ? this.list
           : slice(this.list, 0, this.constant);
+
+            //  console.log(this.options)
     },
     remoteMethod(query) {
       // throttle
@@ -82,13 +86,20 @@ export default {
           }
         });
       } else {
-          await this.getList()
+          try{
+             await this.getList()
+             console.log(this.options)
           const optionids = this.options.map(item => item.userId)
+
           const valueItem = this.listById[this.value]
           if (!optionids.includes(this.value) && valueItem) {
             this.options.push(valueItem)
             this.options = uniqBy(this.options, 'userId')
           }
+          }catch(e){
+            console.log(e)
+          }
+
       }
     },
     changeValue(val) {

+ 2 - 0
src/views/teamBuild/components/merge-music.vue

@@ -43,6 +43,7 @@
       append-to-body
     >
       <mergedStudents
+        v-if="studentsVisible"
         @close="studentsVisible = false"
         @submited="submited"
       />
@@ -138,6 +139,7 @@ export default {
           registerIds: allId
         })
         this.$message.success('合并成功')
+        this.$emit('close')
         this.$emit('submited')
       } catch (error) {}
     },

+ 35 - 18
src/views/teamDetail/components/resetClass.vue

@@ -368,7 +368,7 @@
         </el-form-item>
         <el-form-item
           label="助教老师"
-          v-if="newClassForm.type != 'HIGH_ONLINE'"
+          v-if="newClassForm.type != 'HIGH_ONLINE' && newClassForm.type != 'HIGH'&&newClassForm.type"
           prop="teaching"
         >
           <remote-search
@@ -394,7 +394,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
+        <!-- <el-form-item
           label="可报名声部"
           prop="memo"
           :rules="[
@@ -418,7 +418,7 @@
               :value="item.id"
             ></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
           label="网络教室声部"
           prop="subjectId"
@@ -503,7 +503,7 @@ import { queryEmployByOrganId } from "@/api/systemManage";
 import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
 import dayjs from "dayjs";
 import axios from "axios";
-import { classTimeList,musicClassTypeList } from "@/utils/searchArray";
+import { classTimeList, musicClassTypeList } from "@/utils/searchArray";
 import viewStudentList from "./modals/view-student-list";
 import selectStudent from "./modals/select-student";
 import classroomSetting from "./modals/classroom-setting";
@@ -522,6 +522,7 @@ export default {
   },
   data() {
     return {
+      musicGroupInfos:this.musicGroupInfo,
       classType: 0,
       pickerOptions: {
         firstDayOfWeek: 1,
@@ -651,9 +652,9 @@ export default {
   created() {
     this.init();
   },
-  activated() {
-    this.init();
-  },
+  // activated() {
+  //   this.init();
+  // },
   mounted() {},
   methods: {
     permission(val) {
@@ -661,10 +662,20 @@ export default {
     },
     async init() {
       this.teamid = this.$route.query.id;
-      this.organId = this.musicGroupInfo.organId;
-      this.chargeTypeId = this.musicGroupInfo.chargeTypeId;
-      // 根据分部id和缴费类型获取 可选课程类型
-      try {
+      if (this.musicGroupInfo) {
+        this.organId = this.musicGroupInfos.organId;
+        this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
+      } else {
+        getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
+          if (res.code == 200) {
+            this.musicGroupInfos = res.data.musicGroup
+               this.organId = this.musicGroupInfos.organId;
+            this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
+          }
+        });
+      }
+    this.$nextTick( async res=>{
+            try {
         if (this.organId && this.chargeTypeId) {
           const res = await getOrganizationCourseUnitPriceSettings({
             chargeTypeId: this.chargeTypeId,
@@ -701,6 +712,10 @@ export default {
           this.soundList = res.data;
         }
       });
+
+    })
+      // 根据分部id和缴费类型获取 可选课程类型
+
     },
     studentSubmited(data) {
       if (!this.isOnlyChangeUser) {
@@ -772,7 +787,7 @@ export default {
     },
     setType(type) {
       this.courseTypeList = getCourseType(type);
-      this.activeSoundList = this.soundList
+      this.activeSoundList = this.soundList;
     },
     // 新增班级
     addNewClass(type) {
@@ -1312,9 +1327,11 @@ export default {
       this.changeMemo([]);
     },
     setAssistant1(val) {
-      for (let i in val) {
-        if (val[i] == this.newClassForm.bishop) {
-          val.splice(i, 1);
+      if (val) {
+        for (let i in val) {
+          if (val[i] == this.newClassForm.bishop) {
+            val.splice(i, 1);
+          }
         }
       }
     },
@@ -1368,14 +1385,14 @@ export default {
       }
     },
     chioseHightype(val) {
-     this.changeMemo([]);
+      this.changeMemo([]);
       if (val == "HIGH_ONLINE") {
         this.newClassForm.teaching = [];
       }
       this.newClassForm.subjectId = "";
       this.$set(this.newClassForm, "subjectIdList", []);
       this.$set(this.newClassForm, "memo", []);
-      },
+    },
     changeStartClassTime(item) {
       // item.endClassTime = ''
       this.$set(item, "endClassTime", "");
@@ -1514,7 +1531,7 @@ export default {
           teaching: null,
           memo: [],
         };
-        this.resetClassFrom()
+        this.resetClassFrom();
       }
     },
   },