浏览代码

Merge branch '03/12permission' of http://git.dayaedu.com/molingzhide/dy-admin-manager into 03/12permission

mo 4 年之前
父节点
当前提交
679357d843

+ 23 - 2
src/views/teacherManager/teacherDetail/components/calendarList.vue

@@ -9,7 +9,28 @@
             {{scope.data.day.substring(8)}}
           </p>
           <div>
-            <span v-for="(item,index) in newList"
+            <template v-for="(item) in newList">
+              <span class='newDot'
+                  :key="item.id"
+                  v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='PRACTICE'">
+                网
+              </span>
+            </template>
+            <template v-for="(item) in vipList">
+              <span class='vipDot'
+                  :key="item.id"
+                  v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='VIP'">
+                vip
+              </span>
+            </template>
+            <template v-for="(item) in teamList">
+              <span class='teamDot'
+                  :key="item.id"
+                  v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='MUSIC'">
+                乐
+              </span>
+            </template>
+            <!-- <span v-for="(item,index) in newList"
                   class='newDot'
                   :key="item.id"
                   v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='PRACTICE'">
@@ -26,7 +47,7 @@
                   :key="item.id"
                   v-if="item.classDate.substring(0,10) === scope.data.day&&item.groupType==='MUSIC'">
-            </span>
+            </span> -->
 
           </div>
         </div>

+ 1 - 1
src/views/teacherManager/teacherDetail/components/courseInfo.vue

@@ -21,7 +21,7 @@
         <el-button type="danger" native-type="submit">搜索</el-button>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" @click="resetCourses" v-permission="'courseSchedule/classGroupTeacherAdjust'">课程移交</el-button>
+        <el-button type="primary" @click="resetCourses" v-permission="'courseSchedule/classGroupTeacherAdjust/batch'">课程移交</el-button>
       </el-form-item>
     </save-form>
     <div class="tableWrap">

+ 2 - 2
src/views/teacherManager/teacherDetail/components/courseInfo1.vue

@@ -9,8 +9,8 @@
           v-model.trim="searchList.search"
         ></el-input>
       </el-form-item>
-      <el-form-item label="课程状态">
-        <el-select v-model.trim="searchList.status" clearable>
+      <el-form-item >
+        <el-select v-model.trim="searchList.status" clearable placeholder="请选择课程状态">
           <el-option
             v-for="(item, index) in vipGroupStatus"
             :key="index"

+ 2 - 2
src/views/teacherManager/teacherDetail/components/outCourseList.vue

@@ -9,8 +9,8 @@
           v-model.trim="searchList.search"
         ></el-input>
       </el-form-item>
-      <el-form-item label="课程状态">
-        <el-select v-model.trim="searchList.status" clearable>
+      <el-form-item>
+        <el-select v-model.trim="searchList.status" clearable placeholder="请选择课程状态">
           <el-option
             v-for="(item, index) in commGroupStatus"
             :key="index"

+ 2 - 1
src/views/teacherManager/teacherDetail/components/resetComponent.vue

@@ -24,6 +24,7 @@
                            label="声部"></el-table-column>
           <el-table-column align="center"
                            prop="name"
+                           width="200px"
                            label="课程名称"></el-table-column>
           <el-table-column align="center"
                            width="150px"
@@ -94,7 +95,7 @@
                          type="text"
                          @click="resetClass(scope.row)">调整</el-button>
               <el-button type="text"
-                         v-if="!scope.row.isSettlement && permission('courseSchedule/practiceCourseAdjust')&&scope.row.groupType==='PRACTICE'"
+                         v-if="!scope.row.isSettlement && permission('courseSchedule/classStartDateAdjust')&&scope.row.groupType==='PRACTICE'"
                          @click="resetClass(scope.row)">调整</el-button>
               <el-button type="text"
                          v-if="scope.row.groupType==='PRACTICE'&&scope.row.status == 'NOT_START'&&(scope.row.practiceGroup && scope.row.practiceGroup['type']!='TRIAL')&& permission('courseSchedule/practiceCourseTeacherAdjust')"

+ 3 - 3
src/views/teacherManager/teacherDetail/components/serveStudentList.vue

@@ -2,7 +2,7 @@
   <div class='courseInfo'>
     <div class="newBand"
          @click="resetCourses"
-         v-permission="'studentManage/batchUpdateAdviser'">学员移交</div>
+         v-permission="'studentManage/batchUpdateAdviser/batch'">学员移交</div>
     <div class="tableWrap tableMargin">
       <!-- <h4>试听课</h4> -->
       <el-table :data='tableList'
@@ -26,7 +26,7 @@
             <div>
               <el-button type="text"
                          v-permission="'studentManage/batchUpdateAdviser'"
-                         @click="resetCourse(scope.row)">操作</el-button>
+                         @click="resetCourse(scope.row)">学员移交</el-button>
             </div>
           </template>
 
@@ -143,7 +143,7 @@ export default {
     },
     resetCourses () {
       if (this.chioseList.length <= 0) {
-        this.$message.error('请至少选择一个乐团')
+        this.$message.error('请至少选择一个学员')
         return
       }
       this.isMultiple = true

+ 3 - 4
src/views/teacherManager/teacherDetail/components/settlement.vue

@@ -125,10 +125,9 @@
         <el-table-column label="操作">
           <template slot-scope="scope"
                     v-if="scope.row.courseScheduleType != 'VIP' && !scope.row.settlementTime">
-            <el-button v-if="scope.row.courseScheduleType != 'DEMO'"
-                       v-permission="{child: 'courseSchedule/updateTeacherCoursesSalary', parent: 'settlement/updateTeacherCoursesSalary'}"
-                       @click="onUpdate(scope.row)"
-                       type="text">课酬调整</el-button>
+            <auth auths="courseSchedule/updateTeacherCoursesSalary/settlement" v-if="scope.row.courseScheduleType != 'DEMO'">
+              <el-button @click="onUpdate(scope.row)" type="text">课酬调整</el-button>
+            </auth>
           </template>
         </el-table-column>
       </el-table>

+ 2 - 2
src/views/teacherManager/teacherDetail/components/teacherNetwork.vue

@@ -3,7 +3,7 @@
   <div class>
     <div class="newBand"
          @click="resetCourses"
-         v-permission="'courseSchedule/batchPracticeGroupTeacherAdjust?t=819'">课程移交</div>
+         v-permission="'courseSchedule/batchPracticeGroupTeacherAdjust/batch'">课程移交</div>
     <div class="m-core">
       <div class="tableWrap">
         <el-table style="width: 100%"
@@ -69,7 +69,7 @@
               <div>
                 <el-button type="text"
                            v-if="(scope.row.totalClassTimes-scope.row.currentClassTimes)>0"
-                           v-permission="'courseSchedule/batchPracticeGroupTeacherAdjust?t=819'"
+                           v-permission="'courseSchedule/batchPracticeGroupTeacherAdjust/single'"
                            @click="resetCourse(scope.row)">课程移交</el-button>
               </div>
             </template>

+ 2 - 2
src/views/teacherManager/teacherDetail/index.vue

@@ -5,8 +5,8 @@
                       :content="teacherName"></el-page-header>
       <div>
         <!-- 服务指标:本周 运营指标: -->
-        <el-button v-if="teacherInfos" type="text" @click="gotoOperating">运营指标:<span style="color:red">{{teacherInfos.operatingIndex}}%</span></el-button>
-        <el-button v-if="teacherInfos" type="text" @click="gotoAfterSchool">服务指标(每周):<span style="color:red">{{teacherInfos.serviceIndex}}%</span></el-button>
+        <el-button v-if="teacherInfos && permission('/operateStudent')" type="text" @click="gotoOperating">运营指标:<span style="color:red">{{teacherInfos.operatingIndex}}%</span></el-button>
+        <el-button v-if="teacherInfos && permission('/serverIndexList')" type="text" @click="gotoAfterSchool">服务指标(每周):<span style="color:red">{{teacherInfos.serviceIndex}}%</span></el-button>
       </div>
     </h2>
     <div class="m-core">

+ 36 - 32
src/views/teacherManager/teacherList.vue

@@ -255,33 +255,38 @@
             <template slot-scope="scope">
               <!--   let search = JSON.stringify(this.searchForm)
               let rules = JSON.stringify(this.pageInfo)-->
-              <router-link
-                v-permission="'/teacherDetail'"
-                class="el-button--text"
-                :to="{
-                  path: `/business/teacherDetail?teacherId=${scope.row.id}&teacherName=${scope.row.realName}`,
-                }"
-                >查看</router-link
-              >
-              <el-button
-                v-permission="'/teacherIperationUpdate'"
-                @click="onTeacher('update', scope.row)"
-                type="text"
-                >修改</el-button
-              >
-              <el-button
-                v-permission="'employee/employeeOperate'"
-                @click="onStaffOperation('LOCK_UNLOCK', scope.row)"
-                type="text"
-                >{{ scope.row.lockFlag == 1 ? "解冻" : "冻结" }}</el-button
-              >
+              <auth auths="/teacherDetail">
+                <router-link
+                  class="el-button--text"
+                  :to="{
+                    path: `/business/teacherDetail?teacherId=${scope.row.id}&teacherName=${scope.row.realName}`,
+                  }"
+                  >查看</router-link>
+              </auth>
+              <auth auths="/teacherIperationUpdate">
+                <el-button
+                  @click="onTeacher('update', scope.row)"
+                  type="text"
+                  >修改</el-button
+                >
+              </auth>
+
+              <auth :auths="scope.row.lockFlag == 1 ? 'employee/employeeOperate/UNLOCK' : 'employee/employeeOperate/LOCK'">
+                <el-button
+                  @click="onStaffOperation('LOCK_UNLOCK', scope.row)"
+                  type="text"
+                  >{{ scope.row.lockFlag == 1 ? "解冻" : "冻结" }}</el-button
+                >
+              </auth>
+
+              <auth auths="user/updatePassword2">
+                <el-button
+                  @click="resetPassWrod(scope.row)"
+                  type="text"
+                  >修改密码</el-button
+                >
+              </auth>
               <!--  -->
-              <el-button
-                v-permission="'api-auth/user/updatePassword2'"
-                @click="resetPassWrod(scope.row)"
-                type="text"
-                >修改密码</el-button
-              >
             </template>
           </el-table-column>
         </el-table>
@@ -432,11 +437,8 @@ export default {
         params.teacherId = row.id;
         params.teacherName = row.realName;
       }
-      let path = "/business/teacherOperation";
-      if (type == "update") {
-        path = "/business/teacherOperationUpdate";
-      }
-      console.log(params)
+      let path = "/teacherManager/teacherOperation";
+      // console.log(params)
       //  teacherId=${scope.row.id}&teacherName=${scope.row.realName}
       this.$router.push(
         {
@@ -444,7 +446,9 @@ export default {
           query: params,
         },
         (router) => {
-          if (type != "update") {
+          if (type == "update") {
+            router.meta.title = "老师修改";
+          } else {
             router.meta.title = "老师新增";
           }
         }

+ 7 - 4
src/views/teacherManager/teacherOperation/components/accompanySet.vue

@@ -104,7 +104,9 @@
       </div>
     </el-dialog>
     <div class="btnWrap">
-      <el-button type="primary" v-permission="'teacherFreeTime/updateSet'" @click="submitOk">确定</el-button>
+      <auth :auths="pageType == 'create' ? ['/teacherOperationAdd', 'teacherFreeTime/updateSet'] : ['/teacherOperationUpdate', 'teacherFreeTime/updateSet']" mulit>
+        <el-button type="primary" @click="submitOk">确定</el-button>
+      </auth>
       <el-button type="primary" @click="resetTime">重置</el-button>
       <!-- <div class="newBand"
            @click="submitOk"
@@ -120,6 +122,7 @@ export default {
   props: ["teacherId"],
   data () {
     return {
+      pageType: this.$route.query.type, // 页面类型
       accompanyForm: {
         count: null,
         week: null
@@ -173,9 +176,9 @@ export default {
   created () {
     this.init();
   },
-  activated () {
-    this.init();
-  },
+  // activated () {
+  //   this.init();
+  // },
   methods: {
     init () {
       //  this.teacherId = this.$route.query.teacherId ;

+ 10 - 9
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -191,10 +191,11 @@
 
         </el-form>
 
-        <div style="padding-top: 10px;"
-             v-permission="pageType == 'create' ? {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherAdd/batchUpset'} : {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherUpdate/batchUpset'}">
-          <el-button @click="onSave()"
-                     type="primary">保存</el-button>
+        <!--  v-permission="pageType == 'create' ? {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherAdd/batchUpset'} : {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherUpdate/batchUpset'}" -->
+        <div style="padding-top: 10px;">
+          <auth :auths="pageType == 'create' ? ['/teacherOperationAdd', 'teacherDefaultCreateSave'] : ['/teacherOperationUpdate', 'teacherDefaultUpdateSave']" mulit>
+            <el-button @click="onSave()" type="primary">保存</el-button>
+          </auth>
         </div>
       </div>
     </div>
@@ -338,13 +339,13 @@ export default {
   },
   created () { },
   mounted () {
-    this.pageType = this.$route.query.type;
-    this.__init();
-  },
-  activated () {
-    this.pageType = this.$route.query.type;
+    // this.pageType = this.$route.query.type;
     this.__init();
   },
+  // activated () {
+  //   this.pageType = this.$route.query.type;
+  //   this.__init();
+  // },
   methods: {
     __init () {
       if (this.$route.query.search) {