Преглед на файлове

乐团权限添加完毕

mo преди 4 години
родител
ревизия
e491395e71

+ 0 - 1
src/api/buildTeam.js

@@ -150,7 +150,6 @@ export function createClass (data) {
     url: api + '/classGroup/create',
     method: 'post',
     data: data
-
   })
 }
 // 新增声部课班

+ 2 - 2
src/views/resetTeaming/index.vue

@@ -52,7 +52,7 @@
             :isedit="team_status == 'PRE_APPLY'"
           />
         </el-tab-pane>
-        <el-tab-pane lazy label="乐器清单" name="10" :disabled="!teamid">
+        <el-tab-pane lazy label="乐器清单" name="10" :disabled="!teamid" v-if="permission('/teamMusicList')" >
           <musicOrder />
         </el-tab-pane>
         <el-tab-pane
@@ -75,7 +75,7 @@
         <el-tab-pane
           label="班级列表"
           lazy
-          v-if="permission('/resetTeaming/resetClass')"
+          v-if="permission('/teamClassListInfo')"
           name="5"
           :disabled="!teamid"
         >

+ 11 - 12
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -102,13 +102,11 @@ import { formatData } from "@/utils/utils";
 import {
   getSubject,
   getDefaultSubject,
-  getGoods,
-  createTeam,
+
   getSoundTree,
   findMusicGroupSubjectInfo,
   updateSubjectInfo,
-  auditSuccess,
-  auditFailed,
+
   getSubjectGoods,
 } from "@/api/buildTeam";
 import dayjs from "dayjs";
@@ -565,16 +563,17 @@ export default {
         }else{
            updateSubjectInfo(obj).then((res) => {
           if (res.code == 200) {
+            this.$message.success('保存成功')
             // this.$emit("chiosetab", 2);
             // 创建乐团,只会到声部了
-            let query = this.$route.query;
-            this.$store.dispatch("delVisitedViews", this.$route);
-            this.$router.push({
-              path: "/business/teamDetail",
-              query: {
-                ...query,
-              },
-            });
+            // let query = this.$route.query;
+            // this.$store.dispatch("delVisitedViews", this.$route);
+            // this.$router.push({
+            //   path: "/business/teamDetail",
+            //   query: {
+            //     ...query,
+            //   },
+            // });
           }
         });
         }

+ 6 - 8
src/views/teamBuild/components/teamSoundSet.vue

@@ -49,18 +49,16 @@
         }"
         >驳回</el-button
       >
-      <!--  v-if="teamStatus != 'teamAudit'" -->
-      <!-- <div
+      <div
         class="submitBtn"
-        v-if="teamStatus == 'newTeam'"
-        v-permission="{
-          child: 'musicGroup/createGroup',
-          parent: '/teamBuild/soundMoney',
-        }"
+        v-if="teamStatus == 'resetTeam'"
+        v-permission="'musicGroup/updateSubjectInfo'"
         @click="submitInfo()"
       >
-        提交
+        保存
       </div>
+      <!--  v-if="teamStatus != 'teamAudit'" -->
+      <!--
       <div
         class="submitBtn"
         @click="submitAudit(1)"

+ 1 - 1
src/views/teamBuild/forecastName.vue

@@ -161,7 +161,7 @@
                     >
                     <!-- :router="['/business/forecastName']" -->
                         <template slot-scope="scope">
-                            <auth :auths="['visit/add']" >
+                            <auth :auths="['visit/add/teamForecastName']" >
                                 <el-button
 
                                 type="text"

+ 0 - 2
src/views/teamBuild/teamSeting/components/setClassV2.vue

@@ -724,8 +724,6 @@ import load from "@/utils/loading";
 import selectStudent from "../../../teamDetail/components/modals/select-student";
 import { updateClassGroupStudents } from "../../../teamDetail/api";
 import {
-  getTeacher,
-  getEmployeeOrgan,
   getMusicGroupClass,
   createClass,
   findSound,

+ 2 - 7
src/views/teamDetail/components/courseList.vue

@@ -99,7 +99,6 @@
                          prop="courseScheduleName"
                          label="课程名称"></el-table-column>
 
-        </el-table-column>
         <el-table-column align="center"
                          prop="courseScheduleType"
                          label="课程类型">
@@ -165,7 +164,7 @@
                 type="text"
                 @click="resetClass(scope.row)"
               >调整</el-button>-->
-              <el-button v-if="!scope.row.settlementTime && permission('courseSchedule/classStartDateAdjust')"
+              <el-button v-if="!scope.row.settlementTime && permission('courseSchedule/classStartDateAdjust/teamCourseListInfo')"
                          type="text"
                          @click="resetClass(scope.row)">调整</el-button>
               <!-- <el-button v-if="scope.row.courseScheduleStatus == 'NOT_START' && permission('courseSchedule/batchDelete')"
@@ -176,7 +175,7 @@
                          @click="resetType(scope.row)"
                          v-if="permission('teamDetail/resetTpye')&&scope.row.courseScheduleType!='HIGH_ONLINE'&&scope.row.courseScheduleType!='MUSIC_NETWORK'">类型调整</el-button> -->
               <el-button type="text"
-                         v-if="scope.row.courseScheduleStatus == 'OVER' && !scope.row.settlementTime &&permission('courseSchedule/cleanAttendance')"
+                         v-if="scope.row.courseScheduleStatus == 'OVER' && !scope.row.settlementTime &&permission('courseSchedule/cleanAttendancecourseSchedule/classStartDateAdjust/teamCourseListInfo')"
                          @click="clearAttend(scope.row)">清除考勤</el-button>
             </div>
           </template>
@@ -374,13 +373,9 @@ import dayjs from "dayjs";
 import pagination from "@/components/Pagination/index";
 import { bathDelete } from "@/api/vipSeting";
 import {
-  getCourseList,
-  findMusicGroupClassTeacher,
   resetCourse,
-  getTeacher,
   getMusicGroupAllClass,
   getCourseSchedule,
-  batchAdjustment,
   updateTeacherAttendance,
   findAttendanceStudentByCourseWithPage,
   updateStudentAttendances,

+ 135 - 135
src/views/teamDetail/components/resetClass.vue

@@ -139,8 +139,8 @@
                 <el-button
                   type="text"
                   v-if="
-                    scope.row.studentNum == '0' ||
-                    scope.row.totalClassTimes == '0'
+                    (scope.row.studentNum == '0' ||
+                    scope.row.totalClassTimes == '0')&& permission('classGroup/delSingle')
                   "
                   @click="removeClass(scope)"
                   >删除</el-button
@@ -863,11 +863,11 @@ export default {
             this.teacherList = res.data;
           }
         });
-        getAllClass({ musicGroupId: this.teamid }).then((res) => {
-          if (res.code == 200) {
-            this.maxClassList = res.data;
-          }
-        });
+        // getAllClass({ musicGroupId: this.teamid }).then((res) => {
+        //   if (res.code == 200) {
+        //     this.maxClassList = res.data;
+        //   }
+        // });
 
         // 获取默认乐团内的所有班
         this.changeMixClass();
@@ -1355,138 +1355,138 @@ export default {
       }
     },
     // 提交临时班的信息
-    submitTemporary(type) {
-      // 参数是一样  type为1 新增临时班
-      // type为2  新增声部班
-      // type为3 修改班级信息
+    // submitTemporary(type) {
+    //   // 参数是一样  type为1 新增临时班
+    //   // type为2  新增声部班
+    //   // type为3 修改班级信息
 
-      if (type == 1) {
-        this.isTemporary = true;
-      } else {
-        this.isTemporary = false;
-      }
+    //   if (type == 1) {
+    //     this.isTemporary = true;
+    //   } else {
+    //     this.isTemporary = false;
+    //   }
 
-      this.$refs["teacherForm"].validate((item) => {
-        if (item) {
-          let week = this.weekList;
-          if (this.teacherForm.isAdd != "onlyUpdateTeacher") {
-            if (
-              !week[0] ||
-              !week[0].startClassTime ||
-              !week[0].endClassTime ||
-              !week[0].dayOfWeek
-            ) {
-              this.$message.error("至少排一节课");
-              return;
-            }
-          }
+    //   this.$refs["teacherForm"].validate((item) => {
+    //     if (item) {
+    //       let week = this.weekList;
+    //       if (this.teacherForm.isAdd != "onlyUpdateTeacher") {
+    //         if (
+    //           !week[0] ||
+    //           !week[0].startClassTime ||
+    //           !week[0].endClassTime ||
+    //           !week[0].dayOfWeek
+    //         ) {
+    //           this.$message.error("至少排一节课");
+    //           return;
+    //         }
+    //       }
 
-          // 这里代表排课成功  发请求  新增临时班
-          let classGroupName = this.className;
-          let classGroupTeacherMapperList = [
-            { userId: this.teacherForm.coreTeacher, teacherRole: "BISHOP" },
-          ];
-          for (let i in this.teacherForm.assistant) {
-            classGroupTeacherMapperList.push({
-              userId: this.teacherForm.assistant[i],
-              teacherRole: "TEACHING",
-            });
-          }
-          // let mixClassGroupId = this.teacherForm.mixClassGroupId;
-          let musicGroupId = this.teamid;
-          let startDate = this.teacherForm.courseTime;
-          let courseType = this.teacherForm.courseType;
-          let courseTimes = this.teacherForm.courseNum;
+    //       // 这里代表排课成功  发请求  新增临时班
+    //       let classGroupName = this.className;
+    //       let classGroupTeacherMapperList = [
+    //         { userId: this.teacherForm.coreTeacher, teacherRole: "BISHOP" },
+    //       ];
+    //       for (let i in this.teacherForm.assistant) {
+    //         classGroupTeacherMapperList.push({
+    //           userId: this.teacherForm.assistant[i],
+    //           teacherRole: "TEACHING",
+    //         });
+    //       }
+    //       // let mixClassGroupId = this.teacherForm.mixClassGroupId;
+    //       let musicGroupId = this.teamid;
+    //       let startDate = this.teacherForm.courseTime;
+    //       let courseType = this.teacherForm.courseType;
+    //       let courseTimes = this.teacherForm.courseNum;
 
-          if (
-            courseTimes <= 0 &&
-            this.teacherForm.isAdd != "onlyUpdateTeacher"
-          ) {
-            this.$message.error("请至少排一节课");
-            return;
-          } else if (courseTimes > this.maxMun) {
-            this.$message.error(`一次最多排${this.maxMun}节课`);
-            return;
-          }
-          let students = this.activeListStudent.map((item) => {
-            return item.userId;
-          });
-          let holiday = this.teacherForm.checked;
-          let courseList = [];
-          for (let i in this.weekList) {
-            courseList.push(this.weekList[i]);
-          }
-          if (
-            courseList.length <= 0 &&
-            this.teacherForm.isAdd != "onlyUpdateTeacher"
-          ) {
-            this.$message.error("新增班级至少排一节课");
-            return;
-          }
-          if (this.teacherForm.isAdd == "onlyUpdateTeacher") {
-            startDate = null;
-            courseType = null;
-            students = null;
-            holiday = null;
-            courseTimes = null;
-            (courseList = null), (mineType = null);
-          }
-          //       mixClassGroupId,
-          let mineType = this.activeType;
-          let obj = {
-            classGroupName,
-            classGroupTeacherMapperList,
-            musicGroupId,
-            startDate,
-            courseType,
-            students,
-            holiday,
-            courseTimes,
-            courseTimeDtoList: courseList,
-            type: mineType,
-            courseAddType: this.teacherForm.isAdd,
-          };
-          if (type == 1) {
-            // 新增临时班级
-            revisionClassGroup(obj).then((res) => {
-              if (res.code == 200) {
-                // 提示修改成功
-                this.$message.success("修改成功");
-                this.infoVisible = false;
-                this.studentVisible = false;
-                this.getList();
-              }
-            });
-          } else if (type == 2) {
-            (obj.subjectId = this.teacherForm.sound),
-              (obj.expectStudentNum = this.teacherForm.expectStudentNum);
-            // 新增声部班
-            revisionAddClassGroup(obj).then((res) => {
-              if (res.code == 200) {
-                // 修改成功
-                this.$message.success("修改成功");
-                this.infoVisible = false;
-                this.studentVisible = false;
-                this.getList();
-              }
-            });
-          } else if (type == 3) {
-            // 乐团修改
-            obj.classGroupId = this.activeClass;
-            classGroupUpdate(obj).then((res) => {
-              if (res.code == 200) {
-                this.$message.success("修改成功");
-                this.infoVisible = false;
-                this.getList();
-              }
-            });
-          }
-        } else {
-          this.$message.error("请填写必要信息");
-          return;
-        }
-      });
-    },
+    //       if (
+    //         courseTimes <= 0 &&
+    //         this.teacherForm.isAdd != "onlyUpdateTeacher"
+    //       ) {
+    //         this.$message.error("请至少排一节课");
+    //         return;
+    //       } else if (courseTimes > this.maxMun) {
+    //         this.$message.error(`一次最多排${this.maxMun}节课`);
+    //         return;
+    //       }
+    //       let students = this.activeListStudent.map((item) => {
+    //         return item.userId;
+    //       });
+    //       let holiday = this.teacherForm.checked;
+    //       let courseList = [];
+    //       for (let i in this.weekList) {
+    //         courseList.push(this.weekList[i]);
+    //       }
+    //       if (
+    //         courseList.length <= 0 &&
+    //         this.teacherForm.isAdd != "onlyUpdateTeacher"
+    //       ) {
+    //         this.$message.error("新增班级至少排一节课");
+    //         return;
+    //       }
+    //       if (this.teacherForm.isAdd == "onlyUpdateTeacher") {
+    //         startDate = null;
+    //         courseType = null;
+    //         students = null;
+    //         holiday = null;
+    //         courseTimes = null;
+    //         (courseList = null), (mineType = null);
+    //       }
+    //       //       mixClassGroupId,
+    //       let mineType = this.activeType;
+    //       let obj = {
+    //         classGroupName,
+    //         classGroupTeacherMapperList,
+    //         musicGroupId,
+    //         startDate,
+    //         courseType,
+    //         students,
+    //         holiday,
+    //         courseTimes,
+    //         courseTimeDtoList: courseList,
+    //         type: mineType,
+    //         courseAddType: this.teacherForm.isAdd,
+    //       };
+    //       if (type == 1) {
+    //         // 新增临时班级
+    //         revisionClassGroup(obj).then((res) => {
+    //           if (res.code == 200) {
+    //             // 提示修改成功
+    //             this.$message.success("修改成功");
+    //             this.infoVisible = false;
+    //             this.studentVisible = false;
+    //             this.getList();
+    //           }
+    //         });
+    //       } else if (type == 2) {
+    //         (obj.subjectId = this.teacherForm.sound),
+    //           (obj.expectStudentNum = this.teacherForm.expectStudentNum);
+    //         // 新增声部班
+    //         revisionAddClassGroup(obj).then((res) => {
+    //           if (res.code == 200) {
+    //             // 修改成功
+    //             this.$message.success("修改成功");
+    //             this.infoVisible = false;
+    //             this.studentVisible = false;
+    //             this.getList();
+    //           }
+    //         });
+    //       } else if (type == 3) {
+    //         // 乐团修改
+    //         obj.classGroupId = this.activeClass;
+    //         classGroupUpdate(obj).then((res) => {
+    //           if (res.code == 200) {
+    //             this.$message.success("修改成功");
+    //             this.infoVisible = false;
+    //             this.getList();
+    //           }
+    //         });
+    //       }
+    //     } else {
+    //       this.$message.error("请填写必要信息");
+    //       return;
+    //     }
+    //   });
+    // },
     // 新建基础技能班
     newClassHight() {
       this.$refs["newClassForm"].validate((res) => {