lex-xin 4 年 前
コミット
2235edc68c

+ 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">

+ 5 - 6
src/views/teacherManager/teacherList.vue

@@ -437,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(
         {
@@ -449,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) {