|
@@ -1,12 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-form
|
|
|
- :model="form"
|
|
|
- inline
|
|
|
- ref="form"
|
|
|
- label-suffix=": "
|
|
|
- label-width="130px"
|
|
|
- >
|
|
|
+ <el-form :model="form" inline ref="form" label-suffix=": " label-width="130px">
|
|
|
<el-row v-if="classType == 5">
|
|
|
<el-form-item
|
|
|
label="班级名称"
|
|
@@ -90,9 +84,7 @@
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer" v-if="classType != 5">
|
|
|
<el-button @click="$listeners.close">取 消</el-button>
|
|
|
- <el-button type="primary" v-if="!isEmpty" @click="submit"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" v-if="!isEmpty" @click="submit">确 定</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -107,8 +99,8 @@ import {
|
|
|
} from "@/api/buildTeam";
|
|
|
import courseItem from "./classroom-setting-item";
|
|
|
import { classTimeList } from "@/utils/searchArray";
|
|
|
-import MusicStore from '@/views/resetTeaming/store'
|
|
|
-import { queryByOrganIdAndCourseType } from '@/views/resetTeaming/api'
|
|
|
+import MusicStore from "@/views/resetTeaming/store";
|
|
|
+import { queryByOrganIdAndCourseType } from "@/views/resetTeaming/api";
|
|
|
import { isEmpty } from "lodash";
|
|
|
|
|
|
const classTimeListByType = {};
|
|
@@ -150,7 +142,7 @@ export default {
|
|
|
"musicGroupPaymentCalenderDtos",
|
|
|
"classIdList",
|
|
|
"classGroupStudents",
|
|
|
- "selectPrices"
|
|
|
+ "selectPrices",
|
|
|
],
|
|
|
components: {
|
|
|
courseItem,
|
|
@@ -196,27 +188,21 @@ export default {
|
|
|
return isEmpty(this.form.classs);
|
|
|
},
|
|
|
musicGroup() {
|
|
|
- return MusicStore.state.musicGroup
|
|
|
+ return MusicStore.state.musicGroup;
|
|
|
},
|
|
|
},
|
|
|
async mounted() {
|
|
|
try {
|
|
|
- await MusicStore.dispatch('getBaseInfo', {
|
|
|
- data: { musicGroupId: this.musicGroupId }
|
|
|
- })
|
|
|
+ await MusicStore.dispatch("getBaseInfo", {
|
|
|
+ data: { musicGroupId: this.musicGroupId },
|
|
|
+ });
|
|
|
const res = await queryByOrganIdAndCourseType({
|
|
|
- organId: this.musicGroup.organId
|
|
|
- })
|
|
|
- this.prices = res.data
|
|
|
+ organId: this.musicGroup.organId,
|
|
|
+ });
|
|
|
+ this.prices = res.data;
|
|
|
} catch (error) {}
|
|
|
this.setCourseTypeListByName();
|
|
|
this.formatClasss();
|
|
|
- // console.log("activeType", this.activeType);
|
|
|
- // console.log("courseTypeList", this.courseTypeList);
|
|
|
- // console.log("detail", this.detail);
|
|
|
- // console.log("studentSubmitedData", this.studentSubmitedData);
|
|
|
- // console.log("classType", this.classType);
|
|
|
- // console.log("cooperationList", this.cooperationList);
|
|
|
},
|
|
|
methods: {
|
|
|
setCourseTypeListByName() {
|
|
@@ -227,6 +213,7 @@ export default {
|
|
|
this.courseTypeListByName = courseTypeListByName;
|
|
|
},
|
|
|
async formatClasss() {
|
|
|
+
|
|
|
if (this.detail) {
|
|
|
let coreid = "";
|
|
|
const assistant = [];
|
|
@@ -250,31 +237,35 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- try {
|
|
|
- let res;
|
|
|
- if (this.classType == 5) {
|
|
|
- res = await findClassCourseMinute(this.classIdList);
|
|
|
- } else {
|
|
|
+ let res = {};
|
|
|
+ if (this.classType == 5) {
|
|
|
+ // res = await findClassCourseMinute(this.classIdList);
|
|
|
+ res.data = this.selectPrices;
|
|
|
+
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
res = await getMusicCourseSettingsWithStudents({
|
|
|
musicGroupId: this.musicGroupId,
|
|
|
studentIds,
|
|
|
classGroupId,
|
|
|
});
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
}
|
|
|
-
|
|
|
- if (!res) return;
|
|
|
+ }
|
|
|
+ console.log(res);
|
|
|
+ if (Object.keys(res).length <= 0) return;
|
|
|
this.musicCourseSettings = res.data;
|
|
|
|
|
|
const classs = {};
|
|
|
for (const item of this.courseTypeList) {
|
|
|
const key = item.value;
|
|
|
if (res.data[key]) {
|
|
|
- console.log(this.selectPrices)
|
|
|
classs[key] = {
|
|
|
courseTotalMinuties: res.data[key],
|
|
|
cycle: [
|
|
|
{
|
|
|
- time: (this.selectPrices ? this.selectPrices[key] : undefined),
|
|
|
+ time: this.selectPrices ? this.selectPrices[key] : undefined,
|
|
|
},
|
|
|
],
|
|
|
};
|
|
@@ -282,9 +273,7 @@ export default {
|
|
|
}
|
|
|
this.$set(this.form, "classs", classs);
|
|
|
// this.courseTimes = courseTimes
|
|
|
- } catch (error) {
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
submit() {
|
|
|
this.$refs.form.validate(async (valid) => {
|
|
@@ -342,11 +331,10 @@ export default {
|
|
|
obj.classGroup4MixDtos = list;
|
|
|
obj.classGroupIds = this.classIdList;
|
|
|
obj.studentIds = this.studentSubmitedData.seleched;
|
|
|
- obj.classGroupStudents = this.classGroupStudents
|
|
|
- // console.log(obj);
|
|
|
+ obj.classGroupStudents = this.classGroupStudents;
|
|
|
+ obj.classCourseMinuteMap = this.selectPrices
|
|
|
await mergeClassSplitClassAffirm(obj);
|
|
|
- let grend = this.$parent.$parent.$parent.$parent.$parent.$parent
|
|
|
- .$parent;
|
|
|
+ let grend = this.$parent.$parent.$parent.$parent.$parent.$parent.$parent;
|
|
|
grend.closeStudentReset();
|
|
|
grend.getList();
|
|
|
return;
|