瀏覽代碼

修改权限

lex-xin 4 年之前
父節點
當前提交
2a76272ac6
共有 1 個文件被更改,包括 31 次插入26 次删除
  1. 31 26
      src/views/teacherManager/teacherList.vue

+ 31 - 26
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>