소스 검색

Merge branch '01/06_classMerge' into ol_12_30

mo 4 년 전
부모
커밋
30d2d08d46

+ 29 - 0
src/api/buildTeam.js

@@ -1450,4 +1450,33 @@ export function getOrganCourseDurationSettings (data) {
   })
 }
 
+// 获取分部所有乐团班级
+export function getClassGroupPage(data) {
+  return request2({
+    url: api + `/classGroup/queryClassGroupPage`,
+    method: 'get',
+    params:data,
+    data:{}
+  })
+}
+
+// 获取合班学员缴费金额
+export function getStudentPaymentCalenders(data) {
+  return request2({
+    url: api + `/classGroup/queryStudentPaymentCalenders`,
+    method: 'post',
+    params:{},
+    data:data
+  })
+}
 
+// 跨团合并班级
+
+export function spanGroupMergeClassSplitClassAffirm(data) {
+  return request2({
+    url: api + `/classGroup/spanGroupMergeClassSplitClassAffirm`,
+    method: 'post',
+    params:{},
+    data:data
+  })
+}

+ 3 - 1
src/constant/index.js

@@ -82,6 +82,7 @@ export const userPaymentType = {
   ADD_COURSE: '临时加课',
   MUSIC_APPLY: '乐团报名',
   MUSIC_RENEW: '乐团续费',
+  SPAN_GROUP_CLASS_ADJUST: '跨团合班',
 }
 
 export const payStatus = {
@@ -111,7 +112,8 @@ export const auditPaymentType = {
   ADD_STUDENT: '新增学员',
   ADD_COURSE: '临时加课',
   MUSIC_APPLY: '乐团报名',
-  MUSIC_RENEW: '乐团续费'
+  MUSIC_RENEW: '乐团续费',
+  SPAN_GROUP_CLASS_ADJUST: '跨团合班',
 }
 
 export const orderServerType = {

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

@@ -129,7 +129,7 @@
                          v-permission="'musicGroupPaymentCalender/auditListDetail'">查看</el-button> -->
               <el-button type="text"
                          @click="openChioseStudent(scope.row)"
-                         v-if="scope.row.status != 'REJECT' && scope.row.status != 'AUDITING'&&teamStatus && scope.row.paymentType != 'MUSIC_APPLY' && scope.row.paymentType != 'ADD_STUDENT'"
+                         v-if="scope.row.status != 'REJECT' && scope.row.status != 'AUDITING'&&teamStatus && scope.row.paymentType != 'MUSIC_APPLY' && scope.row.paymentType != 'ADD_STUDENT' && scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'"
                          v-permission="'musicGroupPaymentCalenderDetail/batchAdd'">添加学员</el-button>
               <el-button type="text"
                          v-if="teamStatus && scope.row.auditStatus === 'REJECT'"

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

@@ -177,7 +177,7 @@
         <div
           class="newBand"
           @click="delStudentBtn"
-          v-if="info.paymentStatus == 'NO'"
+          v-if="info.paymentStatus == 'NO' && titleForm.paymentType != 'SPAN_GROUP_CLASS_ADJUST'"
           v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
         >
           删除学员

+ 154 - 0
src/views/resetTeaming/modals/extra-class-user.vue

@@ -0,0 +1,154 @@
+<template>
+  <el-form
+    ref="form"
+    :model="list"
+  >
+    <el-table
+      :data="form"
+      style="width: 100%;text-alogn: center;"
+    >
+      <el-table-column
+        label="学员姓名"
+        prop="username"></el-table-column>
+      <el-table-column
+        label="手机号码"
+        prop="phone"></el-table-column>
+      <el-table-column
+        label="课程类型"
+        prop="courseType"
+        key="courseType"
+        width="150">
+        <template slot-scope="scope">
+          {{courseType[list.form[scope.$index].courseType]}}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="课程时长(分钟)"
+        prop="courseTime"
+        width="130"></el-table-column>
+      <el-table-column
+        label="现价(元)"
+        prop="courseCurrentPrice"
+        key="courseCurrentPrice"
+        width="140">
+        <template slot-scope="scope">
+          <el-form-item
+            :prop="'form.' + scope.$index + '.courseCurrentPrice'"
+            :rules="{ required: true, message: '请输入现价', trigger: 'blur' }"
+          >
+            <!-- $listeners.moneyChange -->
+            <el-input-number
+              size="small"
+              style="width: 90%!important;"
+              class="number-input"
+              v-model="list.form[scope.$index].courseCurrentPrice"
+              :controls="false"
+              :precision="0"
+              :min="0"
+              placeholder="请输入现价"
+            />
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="courseOriginalPrice"
+        key="courseOriginalPrice"
+        label="原价(元)"
+        width="140">
+        <template slot-scope="scope">
+          <el-form-item
+            :prop="'form.' + scope.$index + '.courseOriginalPrice'"
+            :rules="{ required: true, message: '请输入原价', trigger: 'blur' }"
+          >
+            <el-input-number
+              size="small"
+              style="width: 90%!important;"
+              class="number-input"
+              v-model="list.form[scope.$index].courseOriginalPrice"
+              :controls="false"
+              :precision="0"
+              :min="0"
+              placeholder="请输入原价"
+            />
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        v-if="clearable && $listeners.remove"
+        prop="close"
+        key="close"
+        width="60">
+        <template slot-scope="scope">
+          <i
+            v-if="form.length > 1"
+            @click="$listeners.remove && $listeners.remove(scope.$index)"
+            class="el-icon-circle-close"
+            style="margin-bottom: 24px;cursor: pointer;"
+          ></i>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-button
+      icon="el-icon-circle-plus-outline"
+      plain
+      v-if="!isCommon && $listeners.create"
+      type="info"
+      size="small"
+      style="width: 100%;margin: 20px 0;"
+      @click="$listeners.create"
+    >新增课程类型</el-button>
+  </el-form>
+</template>
+<script>
+import { courseType, boolOptions } from '@/constant'
+import { objectToOptions } from '@/utils'
+import { classTimeList, array2object } from '@/utils/searchArray'
+import numeral from 'numeral'
+import MusicStore from '@/views/resetTeaming/store'
+export default {
+  props: ['form', 'isCommon', 'isDisabled', 'isUserType', 'courseUnitPriceSettingsByType', 'clearable'],
+  data() {
+    return {
+      courseType,
+      courseTypeOptions: this.courseUnitPriceSettingsByType,
+      boolOptionsOptions: objectToOptions(boolOptions),
+    }
+  },
+  computed: {
+    list() {
+      return {
+        form: this.form
+      }
+    },
+    classTimeList() {
+      return array2object(classTimeList)
+    },
+  },
+  methods: {
+    isOptionDisabled(key) {
+      const selected = this.form.map(item => item.courseType)
+      return selected.includes(key)
+    },
+    getOldMoney(index) {
+      return numeral(this.list.form[index].courseTotalMinuties * this.list.form[index].unitPrice).format('0,0.00')
+    },
+    validatorCourseTotalMinuties(index) {
+      return (rule, value, callback) => {
+        const { courseType } = this.list.form[index]
+        if (courseType && value > 1 && this.classTimeList[courseType] &&  value < this.classTimeList[courseType]) {
+          callback(new Error(`单节课不得少于${this.classTimeList[courseType]}分钟`))
+          return
+        }
+        callback()
+      }
+    }
+  },
+}
+</script>
+<style lang="less" scoped>
+.number-input{
+  /deep/ .el-input__inner {
+    text-align: left;
+  }
+}
+</style>

+ 2 - 1
src/views/resetTeaming/modals/payment-cycle.vue

@@ -7,6 +7,7 @@
     label-suffix=": "
   >
     <el-form-item
+    v-if="!hideMoney"
       label="缴费金额(元)"
       prop="paymentAmount"
       :rules="[{required: true, message: '请输入缴费金额', trigger: 'blur'}]"
@@ -72,7 +73,7 @@
 import { paymentPatternType } from '@/constant'
 import { objectToOptions } from '@/utils'
 export default {
-  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon', 'hidePaymentPattern'],
+  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon', 'hidePaymentPattern','hideMoney'],
   data() {
     return {
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),

+ 34 - 0
src/views/resetTeaming/modals/review-detail.vue

@@ -37,6 +37,7 @@
     </descriptions>
     <el-table :data="musicGroupPaymentCalenderCourseSettings"
               stripe
+              v-if="musicGroupPaymentCalenderCourseSettings.length"
               style="width: 100%; margin-top: 10px">
       <el-table-column prop="courseType"
                        label="课程类型"
@@ -60,6 +61,38 @@
                        label="原价(元)">
       </el-table-column>
     </el-table>
+    <el-table :data="musicGroupPaymentCalenderStudentDetails"
+              stripe
+              v-if="musicGroupPaymentCalenderStudentDetails.length"
+              style="width: 100%; margin-top: 10px">
+      <el-table-column prop="username"
+                       label="学员姓名">
+      </el-table-column>
+      <el-table-column prop="phone"
+                       label="手机号">
+      </el-table-column>
+      <el-table-column prop="courseType"
+                       label="课程类型"
+                       width="120">
+        <template slot-scope="scope">
+          {{ scope.row.courseType | courseTypeFormat }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="isStudentOptional"
+                       label="是否可选"
+                       width="100px">
+                       <template slot-scope="scope">{{scope.row.isStudentOptional ? '是' : '否'}}</template>
+      </el-table-column>
+      <el-table-column prop="courseTime"
+                       label="课程总时长(分钟)">
+      </el-table-column>
+      <el-table-column prop="courseCurrentPrice"
+                       label="现价(元)">
+      </el-table-column>
+      <el-table-column prop="courseOriginalPrice"
+                       label="原价(元)">
+      </el-table-column>
+    </el-table>
     <el-alert title="缴费周期"
               :closable="false"
               class="alert"
@@ -114,6 +147,7 @@ Vue.use(descriptions);
 const initData = {
   auditDto: {},
   musicGroupPaymentCalenderCourseSettings: [],
+  musicGroupPaymentCalenderStudentDetails: [],
   simpleUserDto: [],
   musicGroupPaymentCalenders: [],
   studentNum: 0,

+ 40 - 5
src/views/resetTeaming/modals/user-pay-form.vue

@@ -3,10 +3,12 @@
     <el-alert title="课程信息设置"
               :closable="false"
               class="alert"
+              v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
               type="info">
     </el-alert>
     <userBaseinfo :form.sync="form"
                   :isCommon="isCommon"
+                  v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
                   :isUserType="isUserType"
                   @getCharges="getCharges"
                   @changeActive="changeActive"
@@ -16,7 +18,21 @@
                   :chargeTypeName="chargeTypeName"
                   :paymentType="paymentType"
                   ref="base" />
-    <template v-if="!isCommon">
+    <template v-if="paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST'">
+      <el-alert title="加课信息设置"
+                :closable="false"
+                class="alert"
+                type="info">
+      </el-alert>
+      <extraClassUser :form.sync="eclassuser"
+                  ref="eclass"
+                  :isUserType="isUserType"
+                  :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
+                  @priceChange="priceChange"
+                  :clearable="true"
+                  @moneyChange="syncAllMoney" />
+    </template>
+    <template v-else-if="!isCommon">
       <el-alert title="加课信息设置"
                 :closable="false"
                 class="alert"
@@ -65,7 +81,7 @@
           </el-select>
         </el-form-item>
       </el-form>
-      <template v-if="isMulticycle">
+      <template v-if="isMulticycle && paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'">
         <el-collapse :value="collapse" @change="collapseChange" >
           <el-collapse-item
             v-for="(item, index) in cycles"
@@ -145,6 +161,7 @@ import { getTimes, objectToOptions } from "@/utils";
 import userBaseinfo from "./user-baseinfo";
 import paymentCycle from "./payment-cycle";
 import extraClass from "./extra-class";
+import extraClassUser from "./extra-class-user";
 import classrooms from "./classrooms";
 import otherform from "./other";
 import baseInfoVue from '../../teamDetail/components/baseInfo.vue';
@@ -156,6 +173,7 @@ const paymentTypeFormat = {
   1: "MUSIC_RENEW",
   2: "ADD_COURSE",
   3: "ADD_STUDENT",
+  4: "SPAN_GROUP_CLASS_ADJUST",
 };
 
 export default {
@@ -164,6 +182,7 @@ export default {
     userBaseinfo,
     paymentCycle,
     extraClass,
+    extraClassUser,
     classrooms,
     otherform,
   },
@@ -180,6 +199,7 @@ export default {
       cycles: [{}],
       cycle: {},
       eclass: [],
+      eclassuser: [],
       collapse: [0],
       nextVisible: false,
       typeList: [],
@@ -235,6 +255,14 @@ export default {
         }
       }
       return (this.payment.paymentPattern == 0 && this.form.leixing !== '2' && paymentType !== 'ADD_COURSE') || (this.payment.paymentPattern == 0 && editMulticycle)
+    },
+    paymentTypeString() {
+      let paymentType = ''
+      if (this.viewDetail) {
+        const { musicGroupPaymentCalenders } = this.viewDetail
+        paymentType = musicGroupPaymentCalenders[0]?.paymentType
+      }
+      return paymentType
     }
   },
   watch: {
@@ -317,6 +345,7 @@ export default {
           this.eclass = (res.data.musicGroupPaymentCalenderCourseSettings || []).filter(item => {
             return !item.isStudentOptional || this.paymentType !== undefined
           })
+          this.eclassuser = res.data.musicGroupPaymentCalenderStudentDetails
           const firstPayment = res.data.musicGroupPaymentCalenders[0] || {}
           this.$set(this.payment, 'paymentPattern', String(this.viewDetail.auditDto?.paymentPattern))
           if (this.$refs.cycle) {
@@ -362,10 +391,16 @@ export default {
       this.syncAllMoney()
     },
     syncAllMoney () {
+      if (this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST') {
+        const money = this.viewDetail?.musicGroupPaymentCalenders[0].paymentAmount
+        this.$set(this.cycle, "paymentAmount", money);
+        return money
+      }
       let money = 0;
       let first = 0
       let other = 0
-      for (const item of this.eclass) {
+      let classs = this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST' ? this.eclassuser : this.eclass
+      for (const item of classs) {
         money += item.courseCurrentPrice;
         if (this.cycles && this.cycles.length) {
           if (item.isStudentOptional) {
@@ -373,7 +408,6 @@ export default {
           } else {
             const floorMoney = Math.floor(item.courseCurrentPrice / this.cycles.length)
             const remainder = item.courseCurrentPrice % this.cycles.length
-            console.log(remainder)
             first += floorMoney + remainder
             other += floorMoney
           }
@@ -469,7 +503,7 @@ export default {
           }
         });
       }
-      if (this.eclass.length < 1) {
+      if (this.eclass.length < 1 && this.eclassuser.length < 1) {
         return this.$message.error('请至少选择一条加课信息')
       }
       if (valided.length === forms.length) {
@@ -489,6 +523,7 @@ export default {
             }
           })],
           musicGroupPaymentCalenderCourseSettingsList: this.eclass,
+          musicGroupPaymentCalenderStudentDetails: this.eclassuser,
         };
         if (this.$refs.cycle) {
           const { paymentDate, paymentValid, ...other } = this.cycle

+ 220 - 0
src/views/teamDetail/componentClass/calenderStudentList.vue

@@ -0,0 +1,220 @@
+<template>
+  <div>
+    <paymentCycle
+      ref="cycle"
+      :form="cycle"
+      :isUserType="true"
+      :isCommon="true"
+      :isDisabled="true"
+      :hideMoney="true"
+    />
+    <otherform :form="other" ref="other" />
+    <el-table
+      :data="mergeInfoList"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      max-height="300px"
+    >
+      <el-table-column
+        prop="userId"
+        align="center"
+        width="120"
+        label="学员编号"
+      ></el-table-column>
+      <el-table-column
+        prop="username"
+        align="center"
+        width="120"
+        label="学员姓名"
+      ></el-table-column>
+      <el-table-column prop="phone" align="center" width="120" label="课程类型">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.courseType | coursesType }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="subjectNames" align="center" label="原价">
+        <template slot-scope="scope">
+          <div>
+            <el-input v-model="scope.row.courseOriginalPrice"></el-input>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="现价">
+        <template slot-scope="scope">
+          <div>
+            <el-input v-model="scope.row.courseCurrentPrice"></el-input>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+<script>
+import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
+import otherform from "@/views/resetTeaming/modals/other";
+import { getTimes } from "@/utils";
+import { spanGroupMergeClassSplitClassAffirm } from "@/api/buildTeam";
+export default {
+  props: [
+    "studentIds",
+    "masterClassGroupId",
+    "classGroupStudents",
+    "classList",
+    "mergeInfo",
+  ],
+  components: {
+    paymentCycle,
+    otherform,
+  },
+  data() {
+    return {
+      activeNames: [],
+      mergeInfoList: [],
+      cycle: {
+        paymentAmount: null,
+        paymentPattern: null,
+      },
+      other: {},
+    };
+  },
+  mounted() {
+    // console.log(this.studentIds, this.masterClassGroupId, this.classGroupStudents)
+    // for (let item in this.mergeInfo) {
+    //   this.activeNames.push(item);
+    // }
+    this.mergeInfoList = [];
+    for (let merge in this.mergeInfo) {
+      this.mergeInfoList = this.mergeInfoList.concat(this.mergeInfo[merge]);
+    }
+  },
+  methods: {
+    getCLassName(key) {
+      let str = "";
+      this.classList.forEach((classes) => {
+        if (classes.id == key) {
+          str = classes.name;
+        }
+      });
+      return str;
+    },
+    async submit() {
+      let obj = {};
+      let some = this.getData()
+      if(some){
+        obj.musicGroupPaymentCalenderDtos = [some];
+
+      }else{
+        return
+      }
+
+      obj.classGroupIds = this.classList.map((classes) => {
+        return classes.id;
+      });
+      obj.masterClassGroupId = this.masterClassGroupId;
+      obj.classGroupStudents = this.classGroupStudents;
+      obj.studentIds = this.studentIds
+      // console.log(obj);
+      try {
+        const reset = await spanGroupMergeClassSplitClassAffirm(obj);
+        this.$message.success("合并成功");
+        // 1.关闭弹窗
+        // 2.清空合并班
+        // 3.刷新列表
+        this.$emit('refresh')
+        console.log(reset);
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    getForms() {
+      const { $refs: refs } = this;
+      // [refs.base, refs.eclass, refs.cycle, ...(refs.cycles || []), refs.other, refs.payment]
+      return [refs.cycle, refs.other]
+        .filter((item) => !!item)
+        .map((item) => item.$refs.form || item);
+    },
+    getData() {
+      const forms = this.getForms();
+      const valided = [];
+      for (const form of forms) {
+        form.validate((valid) => {
+          if (valid) {
+            valided.push(form);
+          }
+        });
+      }
+      if (valided.length === forms.length) {
+        const { leixing, ...rest } = {
+          ...this.form,
+          ...this.other,
+        };
+
+        if (this.$refs.cycle) {
+          const {
+            paymentDate,
+            paymentValid,
+            paymentPattern,
+            ...other
+          } = this.cycle;
+          rest.paymentPattern = paymentPattern;
+          rest.payUserType = "STUDENT";
+          rest.paymentType = "SPAN_GROUP_CLASS_ADJUST";
+          rest.musicGroupPaymentCalenderStudentDetails = this.mergeInfoList;
+          rest.musicGroupPaymentDateRangeList = [
+            {
+              ...other,
+              ...getTimes(paymentDate, [
+                "startPaymentDate",
+                "deadlinePaymentDate",
+              ]),
+              ...getTimes(paymentValid, [
+                "paymentValidStartDate",
+                "paymentValidEndDate",
+              ]),
+            },
+          ];
+        }
+        const data = {
+          ...rest,
+        };
+        return data;
+
+        // 说明验证通过
+      } else {
+        this.$message.error("请填写必要信息");
+        return "error";
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+/deep/ .header {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  justify-content: space-between;
+  // margin-bottom: 10px;
+  > span:first-child {
+    display: flex;
+    &::before {
+      content: "";
+      display: block;
+      width: 5px;
+      background-color: #14928a;
+      margin-right: 10px;
+      border-radius: 2px;
+      height: 48px;
+    }
+  }
+  .icon {
+    font-size: 18px;
+    font-weight: normal;
+    margin-right: 20px;
+  }
+  /deep/.el-collapse-item__wrap {
+    border-bottom: none !important;
+  }
+}
+</style>

+ 337 - 0
src/views/teamDetail/componentClass/classCompound.vue

@@ -0,0 +1,337 @@
+<template>
+  <div class="fixedBox">
+    <el-card>
+      <div class="boxWrap">
+        <p>
+          班级合并<span style="color: red"> {{ compoundList.length }} </span>
+        </p>
+        <el-popover placement="top" v-model="isLook" trigger="manual">
+          <div>
+            <p class="title">
+              班级合并列表
+              <i class="el-icon-minus minus" @click="isLook = false"></i>
+            </p>
+
+            <el-divider></el-divider>
+          </div>
+          <el-button type="text" style="float: right" @click="clearCom"
+            >清空列表</el-button
+          >
+          <div>
+            <el-radio-group v-model="radio" @change="changeMasterClass">
+              <el-table
+                :data="dataList"
+                height="300px"
+                :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+              >
+                <el-table-column align="center" label="主班" width="110">
+                  <template slot-scope="scope">
+                    <el-radio :label="scope.row.id"></el-radio>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  align="center"
+                  width="180px"
+                  label="班级名称"
+                  prop="name"
+                ></el-table-column>
+                <el-table-column align="center" label="班级类型">
+                  <template slot-scope="scope">
+                    <div>{{ scope.row.type | coursesType }}</div>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  align="center"
+                  width="180px"
+                  prop="teacherName"
+                  label="已选学生数"
+                >
+                  <!--    -->
+                  <template slot-scope="scope">
+                    <div>
+                      {{
+                        scope.row.studentList ? scope.row.studentList.length : 0
+                      }}
+                    </div>
+                  </template>
+                </el-table-column>
+
+                <el-table-column align="center" label="操作" width="200px">
+                  <template slot-scope="scope">
+                    <el-button type="text" @click="cancleCom(scope.row)"
+                      >取消</el-button
+                    >
+                    <el-button
+                      type="text"
+                      @click="showStudentList(scope.row)"
+                      :disabled="scope.row.id == radio"
+                      >添加学生</el-button
+                    >
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-radio-group>
+          </div>
+          <el-button
+            type="primary"
+            size="mini"
+            style="float: right; margin-top: 20px"
+            @click="submitClass"
+            >确定</el-button
+          >
+          <i
+            class="el-icon-copy-document"
+            slot="reference"
+            @click="isLook = true"
+          ></i>
+        </el-popover>
+      </div>
+    </el-card>
+    <el-dialog
+      :visible.sync="studentListModalVisible"
+      title="学员列表"
+      append-to-body
+      width="800px"
+    >
+      <viewStudentList
+        :classId="activeRow.id"
+        :disabledList="allStudentList"
+        :list="studentList"
+        :chioseList="activeRow.studentList"
+        v-if="studentListModalVisible"
+        :showOk="true"
+        :isChiose="true"
+        @close="closeStudentView"
+      />
+    </el-dialog>
+
+    <el-dialog
+      :visible.sync="calenderStudentVisible"
+      title="学员缴费列表"
+      append-to-body
+      width="800px"
+    >
+      <!--   studentIds:[],
+      masterClassGroupId:'',
+      classGroupStudents:[] -->
+      <calenderStudentList
+      ref='calenderStudentList'
+        v-if="calenderStudentVisible"
+        :classList="dataList"
+        :studentIds="studentIds"
+        :masterClassGroupId="masterClassGroupId"
+        :classGroupStudents="classGroupStudents"
+        :mergeInfo="mergeInfo"
+        @refresh='refresh'
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="calenderStudentVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitInfo"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+// import compoundClass from './compoundClass' compoundClass
+import viewStudentList from "./student-list";
+import calenderStudentList from "./calenderStudentList";
+import { getClassAllStudent } from "@/api/studentManager";
+import { getStudentPaymentCalenders } from "@/api/buildTeam";
+let that;
+export default {
+  props: ["compoundList"],
+  components: { viewStudentList, calenderStudentList },
+  data() {
+    return {
+      radio: "",
+      dataList: this.compoundList,
+      isLook: false,
+      show: false,
+      idList: "",
+      studentList: [],
+      studentListModalVisible: false,
+      activeRow: null,
+      calenderStudentVisible: false,
+      studentIds: [],
+      masterClassGroupId: "",
+      classGroupStudents: [],
+      mergeInfo: {},
+    };
+  },
+  created() {
+    that = this;
+  },
+  methods: {
+    cancleCom(row) {
+      this.$emit("cancleCompound", row);
+    },
+    clearCom() {
+      this.$emit("clearCom");
+
+    },
+    async submitClass() {
+      if (!this.radio) {
+        this.$message.error("请选择一个主班");
+        return;
+      }
+      // let arr = []
+      // 主班id
+      // 第一个是所有学员 this.radio
+      // 班级和学生id的键值对
+      // 第三个是主班编号 this.radio
+      let idList = []; // 所有的班级id
+      this.classGroupStudents = [];
+      let flag = false;
+      this.dataList.forEach((com) => {
+        // arr.push(com.type)
+        if (
+          (!com.studentList && com.id != this.radio) ||
+          (com.studentList?.length <= 0 && com.id != this.radio)
+        ) {
+          flag = true;
+        }
+
+        if (com.id != this.radio&&com.studentList?.length>0) {
+          this.classGroupStudents.push({
+            [com.id]: com.studentList.map((stu) => stu.userId).join(","),
+          });
+        }
+        idList.push(com.id);
+      });
+      if (this.dataList.length <= 1) {
+        this.$message.error("请至少选择2个班级");
+        return;
+      }
+      if (flag) {
+        this.$message.error("请保证每个班至少勾选一名学员");
+        return;
+      }
+      // 做判断
+      this.show = true;
+      this.isLook = false;
+      this.masterClassGroupId = this.radio;
+      this.studentIds = this.allStudentList.map((stu) => {
+        return stu.userId;
+      });
+
+      try {
+        const rest = await getStudentPaymentCalenders({
+          studentIds: this.studentIds,
+          masterClassGroupId: this.masterClassGroupId,
+          classGroupStudents: this.classGroupStudents,
+        });
+        this.mergeInfo = rest.data;
+        this.calenderStudentVisible = true;
+      } catch (e) {
+        console.log(e);
+      }
+
+      // 试着请求
+    },
+    getList() {
+       this.$emit("getList");
+    },
+    refresh(){
+      this.calenderStudentVisible = false;
+      this.clearCom()
+      this.getList()
+    },
+    closeReset() {
+      this.clearCom();
+      this.show = false;
+      this.$emit("getList");
+    },
+    showStudentList(row) {
+      // row.id
+      this.activeRow = row;
+      getClassAllStudent({ classGroupId: row.id }).then((res) => {
+        if (res.code == 200) {
+          this.studentList = res.data.map((item) => {
+            return {
+              userId: item.userId,
+              nickName: item.name,
+              gender: item.gender,
+              phone: item.parentsPhone,
+              subjectNames: item.subjectName,
+            };
+          });
+          this.studentListModalVisible = true;
+        }
+      });
+    },
+    closeStudentView(list) {
+      this.activeRow.studentList = list;
+      this.dataList.splice(1, 0);
+      this.studentListModalVisible = false;
+    },
+    changeMasterClass(val) {
+      this.dataList.forEach((classes) => {
+        if (classes.id == val) {
+          classes.studentList = null;
+          this.dataList.splice(1, 0);
+        }
+      });
+    },
+    submitInfo(){
+      this.$refs.calenderStudentList.submit()
+    }
+  },
+  watch: {
+    compoundList(val) {
+      this.dataList = val;
+    },
+  },
+  computed: {
+    allStudentList() {
+      let arr = [];
+      that.dataList.forEach((classes) => {
+        if (classes.studentList) {
+          arr = arr.concat(
+            classes.studentList.map((stu) => {
+              stu.classId = classes.id;
+              return stu;
+            })
+          );
+        }
+      });
+      return arr;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.title {
+  line-height: 44px;
+}
+.fixedBox {
+  position: fixed;
+  bottom: 20px;
+  right: 10px;
+  z-index: 100;
+  width: 200px;
+  background-color: #fff;
+  font-size: 14px;
+
+  .boxWrap {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    i {
+      font-size: 18px;
+      cursor: pointer;
+    }
+  }
+}
+/deep/.el-divider--horizontal {
+  margin: 0 !important;
+}
+.minus {
+  float: right;
+  line-height: 44px;
+  padding-right: 20px;
+  font-size: 20px;
+  cursor: pointer;
+}
+</style>

+ 106 - 0
src/views/teamDetail/componentClass/student-list.vue

@@ -0,0 +1,106 @@
+<template>
+  <div>
+    <el-table
+      :data="list"
+      ref='studentTable'
+      style
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      tooltip-effect="dark"
+
+       @selection-change="handleSelectionChange"
+       max-height='300px'
+    >
+     <el-table-column v-if="isChiose"
+      type="selection"
+      :selectable="checkSelectable"
+      width="55">
+    </el-table-column>
+      <el-table-column
+        prop="userId"
+        align="center"
+        width="120"
+        label="学员编号"
+      ></el-table-column>
+      <el-table-column
+        prop="nickName"
+        align="center"
+        width="120"
+        label="学员姓名"
+      ></el-table-column>
+      <el-table-column
+        prop="name"
+        align="center"
+        width="120"
+        label="性别"
+      >
+      <template slot-scope="scope">
+        <div>
+          {{scope.row.gender| sex}}
+        </div>
+      </template>
+      </el-table-column>
+      <el-table-column
+        prop="phone"
+        align="center"
+        width="120"
+        label="联系电话"
+      ></el-table-column>
+      <el-table-column
+        prop="subjectNames"
+        align="center"
+        label="专业"
+      ></el-table-column>
+    </el-table>
+    <div slot="footer" class="dialog-footer" v-if="showOk">
+      <el-button type="primary" @click="$listeners.close(selectList)">确 定</el-button>
+    </div>
+    <div style="clear: both;" v-if="showOk"></div>
+  </div>
+</template>
+<script>
+export default {
+  props: ['list','isChiose','chioseList','showOk','disabledList','classId'],
+  data(){
+    return{
+      selectList:this.chioseList
+    }
+  },mounted(){
+    if(this.chioseList){
+          let idList = this.chioseList.map((item,index)=>{
+      return item.userId
+    })
+    this.list.forEach((item,index)=>{
+      if(idList.indexOf(item.userId)!= -1){
+        this.$refs.studentTable.toggleRowSelection(item,true);
+      }
+    })
+    }
+  },
+  methods:{
+    handleSelectionChange(val){
+      this.selectList = val
+    },
+    checkSelectable(row){
+      let flag = true
+      if(this.disabledList&&this.disabledList.length >0){
+        this.disabledList.forEach(stu=>{
+          if(stu.userId == row.userId &&stu.classId!=this.classId){
+            flag = false
+          }
+        })
+      }
+      return flag
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+/deep/.dialog-footer{
+  margin-top: 10px;
+}
+  .dialog-footer {
+  float: right;
+
+}
+
+</style>

+ 16 - 18
src/views/teamDetail/components/modals/class-pay-list.vue

@@ -5,7 +5,7 @@
     type="info" :closable='false'>
   </el-alert>
     <el-form :model='courseTimeForm' ref='courseTimeForms' :inline='true' style="margin-top:20px;">
-      <el-form-item v-for="(item,index) in courseTimeForm.timeList" :key="index" :label="item.label"  
+      <el-form-item v-for="(item,index) in courseTimeForm.timeList" :key="index" :label="item.label"
        :prop="'timeList.' + index + '.value'" :rules="[{required: true, message: '请选择课程时长', trigger: 'blur'}]" label-width="100px">
         <el-select clearable v-model="item.value" placeholder="请选择课程时长" @change="(val)=>setCourseTime(item,val)">
           <el-option v-for="(time,index) in item.list" :key='index' :value='time' :label="time"></el-option>
@@ -15,7 +15,7 @@
     <classPayListItem
       :payInfo="payInfo"
       ref="base"
-      :courseTypesByType="courseTypesByType" 
+      :courseTypesByType="courseTypesByType"
       v-for="(item, index) in form.classList"
       :key="index"
       :item="item"
@@ -37,11 +37,9 @@
       ref="classSetting"
         :musicGroupPaymentCalenderDtos="musicGroupPaymentCalenderDtos"
         :classType="5"
-        :teacherList="selects.teachers"
         :musicGroupId="teamid"
         :activeType="activeType"
         :courseTypeList="courseTypeList"
-        :cooperationList="selects.teachers"
         :studentSubmitedData="studentSubmitedData"
         :classIdList="classIdList"
         :classGroupStudents="classGroupStudents"
@@ -55,7 +53,7 @@
         <el-button @click="showLastVisable = false">上一步</el-button>
         <el-button type="primary" @click="submitResetClass">确 定</el-button>
       </div>
-          
+
     </el-dialog>
   </div>
 </template>
@@ -97,25 +95,25 @@ export default {
     // 1.查询该分部下得所有课程时长
     // 2.组成select需要得选项并且指定
 
-  
+
          this.teamid = this.$route.query.id;
         MusicStore.dispatch('getBaseInfo', {
           data: { musicGroupId: this.teamid }
         }).then(async (res) => {
           this.organId =res.data.musicGroup.organId
-        
+
           try{
            const res = await getOrganCourseDurationSettings({organId:this.organId})
            this.organCourseTime = res.data;
-             
+
            this.setTimeList(res.data)
-           
+
           }catch{}
         })
   },
   methods: {
     init(){
-       this.$store.dispatch('setTeachers')
+      //  this.$store.dispatch('setTeachers')
       this.studentList = []
       let classGroupStudents = []
       this.form.classList.forEach(classes=>{
@@ -129,7 +127,7 @@ export default {
       this.classGroupStudents = classGroupStudents
       this.teamid = this.$route.query.id
       this.activeType = this.form.classList[0].type
-      this.courseTypeList = getCourseType(this.activeType) 
+      this.courseTypeList = getCourseType(this.activeType)
       this.studentSubmitedData = {
         name:'',
         seleched:this.studentList.map(stu=> {return stu.userId})
@@ -159,7 +157,7 @@ export default {
        this.$refs.courseTimeForms.validate(_=>{
         if(_){
       const forms = this.getForms();
-      
+
       let musicGroupPaymentCalenderDtos = []
       // 判断有没有缴费项目(因为又可能没有)
       // let flag = false
@@ -176,14 +174,14 @@ export default {
       if(arr.length>0){
         return
       }
-     
+
            this.musicGroupPaymentCalenderDtos = musicGroupPaymentCalenderDtos
       this.init()
         }
       })
       // 弹出最后一页
-     
-           
+
+
     },
     submitResetClass(){
       this.$refs.classSetting.submit()
@@ -196,7 +194,7 @@ export default {
          arr =organCourseTime[course].split(',')
       }else {
         arr = [classTime[course]]
-      } 
+      }
         this.courseTimeForm.timeList.push({type:course,value:'',label:courseType[course],list:arr})
       })
     },
@@ -211,7 +209,7 @@ export default {
         }
       }
       this.payInfo = obj;
-    
+
     }
   },
 
@@ -228,4 +226,4 @@ export default {
   text-align: right;
 }
 
-</style>
+</style>

+ 8 - 8
src/views/teamDetail/components/modals/classList-group.vue

@@ -12,16 +12,16 @@
         @filterClassList="filterClassList"
       />
     </el-form>
-    <el-button
+    <!-- <el-button
       icon="el-icon-circle-plus-outline"
       plain
       type="info"
       size="small"
       style="width: 100%; margin: 20px 0"
       @click="addClass"
-      :disabled="form.classList.length >= classList.length" 
+      :disabled="form.classList.length >= classList.length"
       >添加班级</el-button
-    >
+    > -->
     <el-dialog
       :visible.sync="showSecondVisable"
       title="缴费信息设置"
@@ -159,19 +159,19 @@ export default {
        console.log(this.payInfo)
        let obj = {...this.payInfo}
       for(let k in obj){
-        
+
         if( obj[k][key]){
 
          obj[k][key].courseCurrentPrice=value
          obj[k][key].courseOriginalPrice=value
-        obj[k][key].courseTotalMinuties= parseInt(time) 
+        obj[k][key].courseTotalMinuties= parseInt(time)
         }
       }
       this.payInfo = obj
-   
-     
+
+
     }
-    
+
   },
 };
 </script>

+ 1 - 1
src/views/teamDetail/components/modals/classList-item.vue

@@ -91,7 +91,7 @@ export default {
     return {
       studentList: [],
       studentListModalVisible: false,
-      organizationCourseUnitPriceSettingsByType: [], 
+      organizationCourseUnitPriceSettingsByType: [],
       eclass: [],
       isNoCourse: false,
       activeClassList: [],

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

@@ -21,7 +21,7 @@
         label-width="88px"
         :rules="[{ required: true, message: '请选择主教老师' }]"
       >
-        <el-select
+        <!-- <el-select
           v-model.trim="form.coreTeacher"
           placeholder="请选择主教老师"
           clearable
@@ -34,10 +34,12 @@
             :label="item.realName"
             :value="String(item.id)"
           ></el-option>
-        </el-select>
+        </el-select> -->
+         <remote-search :commit="'setTeachers'" v-model="form.coreTeacher"  />
       </el-form-item>
       <el-form-item label="助教老师" prop="assistant">
-        <el-select
+         <remote-search :commit="'setTeachers'" v-model="form.assistant"  :multiple='true'/>
+        <!-- <el-select
           v-model.trim="form.assistant"
           placeholder="请选择助教老师"
           filterable
@@ -50,7 +52,7 @@
             :label="item.realName"
             :value="item.id"
           ></el-option>
-        </el-select>
+        </el-select> -->
       </el-form-item>
       <el-alert
         v-if="isEmpty"
@@ -131,10 +133,8 @@ const plusNum = (items = [], key) => {
 
 export default {
   props: [
-    "teacherList",
     "activeType",
     "courseTypeList",
-    "cooperationList",
     "musicGroupId",
     "detail",
     "studentSubmitedData",
@@ -214,7 +214,7 @@ export default {
       this.courseTypeListByName = courseTypeListByName;
     },
     async formatClasss() {
-     
+
       if (this.detail) {
         let coreid = "";
         const assistant = [];
@@ -242,7 +242,7 @@ export default {
       if (this.classType == 5) {
         // res = await findClassCourseMinute(this.classIdList);
         res.data = this.classCouresTimeList;
-        
+
       } else {
         try {
           res = await getMusicCourseSettingsWithStudents({
@@ -274,7 +274,7 @@ export default {
         }
         this.$set(this.form, "classs", classs);
         // this.courseTimes = courseTimes
-      
+
     },
     submit() {
       this.$refs.form.validate(async (valid) => {

+ 18 - 4
src/views/teamDetail/components/modals/view-student-list.vue

@@ -6,11 +6,13 @@
       style
       :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
       tooltip-effect="dark"
-      
+
        @selection-change="handleSelectionChange"
+       max-height='300px'
     >
      <el-table-column v-if="isChiose"
       type="selection"
+      :selectable="checkSelectable"
       width="55">
     </el-table-column>
       <el-table-column
@@ -45,7 +47,7 @@
       ></el-table-column>
       <el-table-column
         prop="subjectNames"
-        align="center"       
+        align="center"
         label="专业"
       ></el-table-column>
     </el-table>
@@ -57,7 +59,7 @@
 </template>
 <script>
 export default {
-  props: ['list','isChiose','chioseList','showOk'],
+  props: ['list','isChiose','chioseList','showOk','disabledList'],
   data(){
     return{
       selectList:this.chioseList
@@ -77,6 +79,17 @@ export default {
   methods:{
     handleSelectionChange(val){
       this.selectList = val
+    },
+    checkSelectable(row){
+      let flag = true
+      if(this.disabledList&&this.disabledList.length >0){
+        this.disabledList.forEach(stu=>{
+          if(stu.userId == row.userId){
+            flag = false
+          }
+        })
+      }
+      return flag
     }
   }
 };
@@ -87,6 +100,7 @@ export default {
 }
   .dialog-footer {
   float: right;
- 
+
 }
+
 </style>

+ 2 - 1
src/views/teamDetail/components/resetClass.vue

@@ -157,7 +157,7 @@
               @click="studentResetVisiable = true"
               v-if="permission('classGroup/mergeClassSplitClassAffirm')"
             >
-              学员班级调整
+              拆分班级
             </div>
           </div>
           <div class="right">
@@ -717,6 +717,7 @@ export default {
             d[item.courseType] = item;
           }
           this.courseTypesByType = d;
+          console.log(this.courseTypesByType)
         }
       } catch (error) {}
       // 根据乐团id获取乐团所属分部

+ 163 - 18
src/views/teamDetail/teamClassList.vue

@@ -7,12 +7,13 @@
     </h2>
     <div class="m-core">
       <save-form
+      ref="searchForm"
         :inline="true"
         :model="searchForm"
         @submit="search"
         @reset="onReSet"
       >
-        <el-form-item>
+        <el-form-item prop="search">
           <el-input
             v-model.trim="searchForm.search"
             clearable
@@ -20,10 +21,11 @@
             placeholder="请输入乐团编号"
           ></el-input>
         </el-form-item>
-        <el-form-item>
+        <el-form-item prop="organIdList">
           <el-select
             class="multiple"
             filterable
+            multiple
             style="width: 180px !important"
             v-model.trim="searchForm.organIdList"
             clearable
@@ -38,13 +40,8 @@
           </el-select>
         </el-form-item>
         <!-- musicClassTypeList -->
-         <el-form-item >
-          <el-select
-            v-model.trim="searchForm.type"
-            clearable
-            filterable
-            @change="changeMixClass"
-          >
+        <el-form-item prop="type">
+          <el-select v-model.trim="searchForm.type" clearable filterable>
             <el-option
               v-for="(item, index) in musicClassTypeList"
               :key="index"
@@ -64,11 +61,100 @@
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="tableList"
         >
+          <el-table-column align="center" prop="musicGroupId" label="乐团编号">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.musicGroupId }}</copy-text>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
-            prop="studentId"
-            label="分部"
+            prop="musicGroupName"
+            label="乐团名称"
           ></el-table-column>
+          <el-table-column align="center" prop="organName" label="分部名称">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.organName }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="name"
+            label="班级名称"
+          ></el-table-column>
+          <el-table-column align="center" prop="type" label="班级类型">
+            <template slot-scope="scope">
+              <div>{{ scope.row.type | classType }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="studentNum"
+            label="当前班级人数"
+          >
+            <template slot-scope="scope">
+              <div>{{ scope.row.studentNum }}人</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop label="主教老师">
+            <template slot-scope="scope">
+              <div v-if="scope.row.classGroupTeacherMapperList">
+                <p
+                  v-for="(item, index) in scope.row.classGroupTeacherMapperList"
+                  v-if="item.teacherRole == 'BISHOP'"
+                  :key="index"
+                >
+                  {{ item.userName }}
+                </p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="助教老师">
+            <template slot-scope="scope">
+              <div v-if="scope.row.classGroupTeacherMapperList">
+                <p
+                  v-for="(item, index) in scope.row.classGroupTeacherMapperList"
+                  v-if="item.teacherRole == 'TEACHING'"
+                  :key="index"
+                >
+                  {{ item.userName }}
+                </p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="已上课时">
+            <template slot-scope="scope">
+              <div>{{ scope.row.currentClassTimes }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="总课数">
+            <template slot-scope="scope">
+              <div>{{ scope.row.totalClassTimes }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="操作">
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                @click="addCompound(scope.row)"
+                v-if="
+                  scope.row.type != 'MUSIC_NETWORK' &&
+                  scope.row.type != 'HIGH_ONLINE' &&
+                  !isAddCom(scope.row) &&
+                  permission('classGroup/spanGroupMergeClassSplitClassAffirm')
+                "
+                >添加合班</el-button
+              >
+              <el-button
+                type="text"
+                v-if="
+                  isAddCom(scope.row) &&
+                  permission('classGroup/spanGroupMergeClassSplitClassAffirm')
+                "
+                @click="cancleCompound(scope.row)"
+                >取消合班</el-button
+              >
+            </template>
+          </el-table-column>
         </el-table>
         <pagination
           sync
@@ -80,6 +166,10 @@
         />
       </div>
     </div>
+    <classCompound :compoundList='compoundList' v-if="permission('classGroup/spanGroupMergeClassSplitClassAffirm')"
+                 @clearCom='clearCom'
+                 @getList='getList'
+                 @cancleCompound='cancleCompound'/>
   </div>
 </template>
 
@@ -89,17 +179,21 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { musicClassTypeList } from "@/utils/searchArray";
+import { getClassGroupPage } from "@/api/buildTeam";
+import { permission } from "@/utils/directivePage";
+import classCompound from "./componentClass/classCompound"
 export default {
-  components: { pagination },
+  components: { pagination,classCompound },
   data() {
     return {
       searchForm: {
         search: null,
-        organIdList:'',
-        type:''
+        organIdList: [],
+        type: "",
       },
       musicClassTypeList,
       tableList: [],
+      compoundList:[],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -114,17 +208,68 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     // 获取分部
-
+    this.$store.dispatch("setBranchs");
     this.init();
   },
   methods: {
-    init() {},
-    getList() {},
+    init() {
+      this.getList();
+    },
+    async getList() {
+      try {
+        let { organIdList, ...result } = this.searchForm;
+        console.log(result)
+        let obj = {
+          ...result,
+          organIdList: this.searchForm.organIdList.join(","),
+          page: this.rules.page,
+          rows: this.rules.limit,
+        };
+        const res = await getClassGroupPage(obj);
+        this.rules.total = res.data.total;
+        this.tableList = res.data.rows;
+      } catch (err) {
+        console.log(err);
+      }
+    },
     search() {
       this.rules.page = 1;
       this.getList();
     },
-    onReSet() {},
+    onReSet() {
+      this.$refs.searchForm.resetFields()
+      this.search()
+    },
+       addCompound (row) {
+      this.compoundList.push(row)
+      this.compoundList = [...new Set(this.compoundList)]
+    },
+    isAddCom (row) {
+      let flag = false
+      this.compoundList.forEach(com => {
+        if (com.id == row.id) {
+          flag = true
+        }
+      })
+      return flag
+    },
+    cancleCompound (row) {
+      let indexNum = null
+      this.compoundList.forEach((com, index) => {
+        if (com.id == row.id) {
+          indexNum = index
+        }
+      })
+      if (indexNum + '') {
+        this.compoundList.splice(indexNum, 1)
+      }
+    },
+    clearCom () {
+      this.compoundList = []
+    },
+    permission(str, parent) {
+      return permission(str, parent);
+    },
   },
 };
 </script>