Browse Source

班级提示

1
mo 4 years ago
parent
commit
df57ef03af

+ 61 - 24
src/views/teamBuild/teamSeting/components/setClassV2.vue

@@ -1,27 +1,51 @@
 <!--  -->
 <template>
   <div class="m-core">
-    <el-form :inline="true" :model="searchForm">
-      <el-form-item>
-        <el-select
-          v-model.trim="searchForm.classType"
-          placeholder="班级类型"
-          clearable
-          filterable
-          @change="changeClassGetList"
-        >
-          <el-option
-            v-for="(item, index) in classTypeList"
-            :key="index"
-            :label="item.label"
-            :value="item.value"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-    </el-form>
     <div class="buttonWrap">
-      <div class="newBand" @click="newClass" v-permission="'classGroup/create'">
-        新建班级
+      <div class="left">
+        <el-form :inline="true" :model="searchForm">
+          <el-form-item>
+            <el-select
+              v-model.trim="searchForm.classType"
+              placeholder="班级类型"
+              clearable
+              filterable
+              @change="changeClassGetList"
+            >
+              <el-option
+                v-for="(item, index) in classTypeList"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+        <div
+          class="newBand"
+          @click="newClass"
+          v-permission="'classGroup/create'"
+        >
+          新建班级
+        </div>
+      </div>
+      <div class="right">
+        <el-popover placement="left" width="500" trigger="click">
+          <div class="popoverWrap">
+            <p>线上基础技能班规则:</p>
+            <p>班级数量:</p>
+            <p>
+              乐团可创建的线上基础技能班数量为各声部人数/6向上取整之和(上低音号与长号合并计算)
+            </p>
+            <p>
+              例:乐团有长笛13人、上低音号8人、长号7人,则该乐团可创建上线基础技能班数量为
+            </p>
+            <p>13/6向上取整+(8+7)/6向上取整=3+3=6个线上基础技能班</p>
+            <p>班级人数:</p>
+            <p>线上基础技能班人数为3至6人</p>
+          </div>
+          <div class="newBand" slot="reference">建班规则</div>
+        </el-popover>
       </div>
     </div>
     <div class="tableWrap">
@@ -205,7 +229,11 @@
         </el-form-item>
         <el-form-item
           label="助教老师"
-          v-if="newClassForm.type != 'HIGH_ONLINE' && newClassForm.type != 'HIGH'&&newClassForm.type"
+          v-if="
+            newClassForm.type != 'HIGH_ONLINE' &&
+            newClassForm.type != 'HIGH' &&
+            newClassForm.type
+          "
           prop="teaching"
         >
           <remote-search
@@ -1434,8 +1462,8 @@ export default {
           });
         }
       });
-         this.activeSoundList = this.soundList;
-        this.getNoClassStudent(row.type);
+      this.activeSoundList = this.soundList;
+      this.getNoClassStudent(row.type);
       // if (this.activeType == "HIGH" || this.activeType == "HIGH_ONLINE") {
       //   this.getNoClassStudent(row.type, row.memo);
       //   let arr = row.memo.split(",");
@@ -1809,9 +1837,13 @@ export default {
   box-sizing: border-box;
   padding: 30px 42px;
 }
+.popoverWrap {
+  p{line-height: 25px;}
+}
 .buttonWrap {
   display: flex;
-  justify-content: flex-start;
+  justify-content: space-between;
+  flex-direction: row;
   .newBand {
     margin-right: 20px;
   }
@@ -1821,6 +1853,11 @@ export default {
     line-height: 36px;
     font-size: 14px;
   }
+  .left {
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+  }
 }
 .studentMask {
   display: flex;

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

@@ -6,23 +6,42 @@
       班级调整
     </h2>-->
     <div class="m-core">
-      <el-form :inline="true" :model="topForm">
-        <el-form-item label="班级类型">
-          <el-select
-            v-model.trim="topForm.classType"
-            clearable
-            filterable
-            @change="changeMixClass"
-          >
-            <el-option
-              v-for="(item, index) in musicClassTypeList"
-              :key="index"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
+      <div class="topWrap">
+        <el-form :inline="true" :model="topForm">
+          <el-form-item label="班级类型">
+            <el-select
+              v-model.trim="topForm.classType"
+              clearable
+              filterable
+              @change="changeMixClass"
+            >
+              <el-option
+                v-for="(item, index) in musicClassTypeList"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+        <el-popover placement="left" width="500" trigger="click">
+          <div class="popoverWrap">
+            <p>线上基础技能班规则:</p>
+            <p>班级数量:</p>
+            <p>
+              乐团可创建的线上基础技能班数量为各声部人数/6向上取整之和(上低音号与长号合并计算)
+            </p>
+            <p>
+              例:乐团有长笛13人、上低音号8人、长号7人,则该乐团可创建上线基础技能班数量为
+            </p>
+            <p>13/6向上取整+(8+7)/6向上取整=3+3=6个线上基础技能班</p>
+            <p>班级人数:</p>
+            <p>线上基础技能班人数为3至6人</p>
+          </div>
+          <div class="newBand" slot="reference">建班规则</div>
+        </el-popover>
+      </div>
+
       <div class="tableWrap" style>
         <el-table
           :data="activeSingleList"
@@ -946,7 +965,7 @@ export default {
         }
       });
       this.activeSoundList = this.soundList;
-      this.getNoClassStudent(row.type);// 基础技能班能获取所有
+      this.getNoClassStudent(row.type); // 基础技能班能获取所有
       // if (this.activeType == "HIGH" || this.activeType == "HIGH_ONLINE") {
       //   this.getNoClassStudent(row.type, row.memo);
       //   let arr = row.memo.split(",");
@@ -1572,6 +1591,11 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+.topWrap {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
 .floor {
   padding-right: 20px;
   display: flex;

+ 41 - 19
src/views/teamDetail/teamClassList.vue

@@ -18,7 +18,7 @@
             v-model.trim="searchForm.search"
             clearable
             @keyup.enter.native="search"
-            placeholder="请输入乐团编号"
+            placeholder="请输入课班级编号"
           ></el-input>
         </el-form-item>
         <el-form-item prop="organIdList">
@@ -39,6 +39,21 @@
             ></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model.trim="searchForm.groupType"
+            clearable
+            filterable
+            placeholder="课程组类型"
+          >
+            <el-option
+              v-for="(item, index) in courseListType"
+              :key="index"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <!-- musicClassTypeList -->
         <el-form-item prop="type">
           <el-select v-model.trim="searchForm.type" clearable filterable>
@@ -61,7 +76,7 @@
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="tableList"
         >
-          <el-table-column align="center" prop="musicGroupId" label="乐团编号">
+          <el-table-column align="center" prop="musicGroupId" label="乐团&课程组编号">
             <template slot-scope="scope">
               <copy-text>{{ scope.row.musicGroupId }}</copy-text>
             </template>
@@ -180,6 +195,7 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
+import { courseListType } from "@/utils/searchArray";
 import { musicClassTypeList } from "@/utils/searchArray";
 import { getClassGroupPage } from "@/api/buildTeam";
 import { permission } from "@/utils/directivePage";
@@ -192,7 +208,9 @@ export default {
         search: null,
         organIdList: [],
         type: "",
+        groupType: "MUSIC",
       },
+      courseListType: courseListType,
       musicClassTypeList,
       tableList: [],
       compoundList: [],
@@ -242,6 +260,7 @@ export default {
     },
     onReSet() {
       this.$refs.searchForm.resetFields();
+      this.searchForm.groupType = 'MUSIC'
       this.search();
     },
     addCompound(row) {
@@ -251,25 +270,28 @@ export default {
       this.compoundList.push(row);
       this.compoundList = [...new Set(this.compoundList)];
 
-        this.compoundList.forEach((classes) => {
-          if (classes.type == "HIGH") {
-            this.hightCount++;
-          }
-          if (classes.type == "HIGH_ONLINE") {
-            this.hightOnlineCount++;
-          }
-        });
-      if(this.hightOnlineCount&&this.hightOnlineCount != this.compoundList.length){
+      this.compoundList.forEach((classes) => {
+        if (classes.type == "HIGH") {
+          this.hightCount++;
+        }
+        if (classes.type == "HIGH_ONLINE") {
+          this.hightOnlineCount++;
+        }
+      });
+      if (
+        this.hightOnlineCount &&
+        this.hightOnlineCount != this.compoundList.length
+      ) {
         this.$message.error("线上基础技能班仅能和线上基础技能班合并");
-          this.hightOnlineCount = 0;
-          this.hightCount = 0;
-          this.compoundList = [];
+        this.hightOnlineCount = 0;
+        this.hightCount = 0;
+        this.compoundList = [];
       }
-      if(this.hightCount&&this.hightCount != this.compoundList.length){
-           this.$message.error("基础技能班仅能和基础技能班合并");
-          this.hightOnlineCount = 0;
-          this.hightCount = 0;
-          this.compoundList = [];
+      if (this.hightCount && this.hightCount != this.compoundList.length) {
+        this.$message.error("基础技能班仅能和基础技能班合并");
+        this.hightOnlineCount = 0;
+        this.hightCount = 0;
+        this.compoundList = [];
       }
     },
     isAddCom(row) {