lex-xin пре 5 година
родитељ
комит
8f3a7f5c10

+ 36 - 0
src/api/specialSetting.js

@@ -135,3 +135,39 @@ export function queryOrganIdList(data) {
         params: data
     })
 }
+
+// 获取收费类型分部关联的默认课程费用添加
+export function chargeTypeOrganizationFeeAdd(data) {
+    return request({
+        url: api + `/chargeTypeOrganizationFee/add`,
+        method: 'post',
+        data: qs.stringify(data)
+    })
+}
+
+// 获取收费类型分部关联的默认课程费用删除
+export function chargeTypeOrganizationFeeDelete(data) {
+    return request({
+        url: api + `/chargeTypeOrganizationFee/delete`,
+        method: 'post',
+        data: qs.stringify(data)
+    })
+}
+
+// 获取收费类型分部关联的默认课程费用修改
+export function chargeTypeOrganizationFeeUpdate(data) {
+    return request({
+        url: api + `/chargeTypeOrganizationFee/update`,
+        method: 'post',
+        data: qs.stringify(data)
+    })
+}
+
+// 获取收费类型分部关联的默认课程费用列表
+export function chargeTypeOrganizationFee(data) {
+    return request({
+        url: api + `/chargeTypeOrganizationFee/queryPage`,
+        method: 'get',
+        params: data
+    })
+}

+ 1 - 0
src/main.js

@@ -13,6 +13,7 @@ import App from './App'
 import store from './store'
 import router from './router'
 import './utils/vueFilter'
+import './utils/directive'
 // Vue.use(vueFilter)
 import '@/icons' // icon
 import '@/permission' // permission control

+ 1 - 0
src/store/getters.js

@@ -5,6 +5,7 @@ const getters = {
   avatar: state => state.user.avatar,
   name: state => state.user.name,
   permission_routes: state => state.permission.routes,
+  permission: state => state.permission.permission,
   organ: state => state.user.organ,
   organName: state => state.user.organName,
   topinfo: state => state.buildTeam.topinfo,

+ 8 - 8
src/store/modules/permission.js

@@ -64,16 +64,14 @@ function recursionRouter (arr) {
 }
 
 // 递归遍历数组
+let tempArr = []
 function recursionPerission(arr) {
-  let newArr = arr.map(item => {
-    let obj = []
-    obj.push(item.permission)
+  arr.map(item => {
+    tempArr.push(item.permission)
     if(item.sysMenus && item.sysMenus.length > 0) {
-      obj.push(recursionPerission(item.sysMenus))
+      recursionPerission(item.sysMenus)
     }
-    return obj
   })
-  return newArr
 }
 
 const actions = {
@@ -82,14 +80,16 @@ const actions = {
       // 获取接口返回的权限菜单
       getSilder().then(res => {
         if (res.code == 200) {
-          let aa = (recursionPerission(res.data)).flat(Infinity)
-          console.log(state.permission)
           let newData = recursionRouter(res.data);
+          recursionPerission(res.data)
           var accessedRoutes
           // 生成异步路由表
           accessedRoutes = generateAsyncRouter(asyncRoutes, newData)
           // var result = accessedRoutes.concat({ path: '*', redirect: '/404', hidden: true })
           commit('SET_ROUTES', accessedRoutes)
+          // commit('SET_PERMISSION', recursionPerission(res.data).flat(Infinity))
+          window.localStorage.removeItem('permission')
+          window.localStorage.setItem('permission', tempArr)
           resolve(accessedRoutes)
         }
       })

+ 27 - 0
src/utils/directive.js

@@ -0,0 +1,27 @@
+import Vue from 'vue'
+// import store from '@/store'
+
+// let permissionArr = store.getters.permission
+
+Vue.directive('permission', {
+    inserted(el, binding) {
+        let value = binding.value
+        let permission = window.localStorage.getItem('permission')
+        permission = permission.split(',')
+        // 如果一个权限判断不了则用两个
+        // 格式: v-permission="{child: 'child', parent: 'parent'}"
+        // 在特殊情况下才会用到两个参数,基本情况只会用到一个标识
+        if(typeof value == 'string') {
+            if(!permission.includes(value)) {
+                // el.style.display = 'none'
+                el.parentNode && el.parentNode.removeChild(el)
+            }
+        } else{
+            if(!permission.includes(value.parent) && !permission.includes(value.child)) {
+                el.parentNode && el.parentNode.removeChild(el)
+                // el.style.display = 'none'
+            }
+        }
+        
+    }
+})

+ 10 - 0
src/utils/directivePage.js

@@ -0,0 +1,10 @@
+
+export function permission(value) {
+    let permission = window.localStorage.getItem('permission')
+    permission = permission.split(',')
+    if(permission.includes(value)) {
+        return true
+    } else {
+        return false
+    }
+}

+ 1 - 1
src/utils/validate.js

@@ -21,6 +21,6 @@ export function validUsername(str) {
 
 // 手机号验证
 export function isvalidPhone(str) {
-  const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
+  const reg = /^1[3|4|5|7|8|9][0-9]\d{8}$/
   return reg.test(str)
 }

+ 14 - 14
src/views/categroyManager/globalConfig.vue

@@ -7,28 +7,29 @@
       <!-- navMenu -->
       <el-tabs v-model="activeIndex" type="card" @tab-click="handleClick">
         <el-tab-pane label="参数设置" name="0">
-            <overallManager v-if="activeStatus[0]" />
+            <overallManager v-if="activeIndex == 0" />
         </el-tab-pane>
         <el-tab-pane label="声部设置" name="1">
-            <musicalManager v-if="activeStatus[1]" />
+            <musicalManager v-if="activeIndex == 1" />
         </el-tab-pane>
         <el-tab-pane label="乐团收费类型" name="2">
-            <typesManager v-if="activeStatus[2]" />
+            <typesManager v-if="activeIndex == 2" />
         </el-tab-pane>
         <el-tab-pane label="乐团收费标准" name="3">
-          <charges v-if="activeStatus[3]" />
+          <!-- <charges v-if="activeIndex == 3" /> -->
+          <chargesList v-if="activeIndex == 3" />
         </el-tab-pane>
         <!-- <el-tab-pane label="VIP课程参数设置" name="3">
-          <vipParameterManager v-if="activeStatus[3]" />
+          <vipParameterManager v-if="activeIndex == 3" />
         </el-tab-pane> -->
         <el-tab-pane label="乐团作业模板" name="4">
-            <jobTemplateSetting v-if="activeStatus[4]" />
+            <jobTemplateSetting v-if="activeIndex == 4" />
         </el-tab-pane>
         <!-- <el-tab-pane label="梯度结算规则设置" name="5">
-            <gradientSet v-if="activeStatus[5]" />
+            <gradientSet v-if="activeIndex == 5" />
         </el-tab-pane> -->
         <el-tab-pane label="热词标签" name="5">
-          <errorManager v-if="activeStatus[5]" />
+          <errorManager v-if="activeIndex == 5" />
         </el-tab-pane>
        
       </el-tabs>
@@ -43,7 +44,8 @@ import typesManager from './specialSetup/typesManager'
 import jobTemplateSetting from './specialSetup/jobTemplateSetting'
 // import gradientSet from './insideSetting/gradientSet'
 import errorManager from './generalSettings/errorManager'
-import charges from './specialSetup/charges'
+// import charges from './specialSetup/charges'
+import chargesList from './specialSetup/chargesList'
 export default {
   components: {
     overallManager, 
@@ -53,20 +55,18 @@ export default {
     jobTemplateSetting, 
     // gradientSet,
     errorManager,
-    charges
+    chargesList
+    // charges
   },
   name: 'globalConfig',
   data () {
     return {
-      activeIndex: '0',
-      activeStatus: [true, false, false, false, false, false, false]
+      activeIndex: '0'
     }
   },
   methods: {
     handleClick (val) {
       this.activeIndex = val.name
-      this.activeStatus = [false, false, false, false, false, false, false]
-      this.activeStatus[val.name] = true
     }
   }
 }

+ 1 - 0
src/views/categroyManager/insideSetting/adminManager.vue

@@ -49,6 +49,7 @@ export default {
     }
   },
   mounted() {
+    // console.log(store.getters.permission)
     this.getList()
   },
   methods: {

+ 234 - 0
src/views/categroyManager/specialSetup/chargesList.vue

@@ -0,0 +1,234 @@
+<template>
+  <div class='m-container'>
+    <!-- <h2>收费类型设置</h2> -->
+    <div class="m-core">
+      <div @click="onChargeOperation('create')" class='newBand'>添加</div>
+      <div class="tableWrap">
+        <el-table :data="dataList"
+                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+          <el-table-column prop="organName" label="所属分部" >
+          </el-table-column>
+          <el-table-column prop="chargeTypeName" label="收费类型" >
+          </el-table-column>
+          <el-table-column prop="courseFee" label="收费标准" >
+          </el-table-column>
+          <el-table-column align='center'
+                          label="操作">
+            <template slot-scope="scope">
+              <el-button @click="onChargeOperation('update', scope.row)" type="text">修改</el-button>
+              <el-button @click="onChargeDelete(scope.row)" type="text">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination :total="pageInfo.total"
+                    :page.sync="pageInfo.page"
+                    :limit.sync="pageInfo.limit"
+                    :page-sizes="pageInfo.page_size"
+                    @pagination="getList" />
+      </div>
+
+      <el-dialog :title="formTitle[formActionTitle]" :visible.sync="chargeStatus" @close="onFormClose('ruleForm')" width="500px">
+        <el-form :model="form" :rules="rules" ref="ruleForm">
+          <el-form-item label="所属分部" prop="organId" :label-width="formLabelWidth">
+            <el-select v-model="form.organId">
+              <el-option
+                v-for="(item, index) in branchList"
+                :key="index"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="收费类型" prop="chargeTypeId" :label-width="formLabelWidth">
+            <el-select v-model="form.chargeTypeId">
+              <el-option
+                v-for="(item, index) in typesList"
+                :key="index"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="收费标准" prop="courseFee" :label-width="formLabelWidth">
+            <el-input type="number" v-model="form.courseFee" autocomplete="off"></el-input>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="chargeStatus = false">取 消</el-button>
+          <el-button @click="onTypesSubmit('ruleForm')" type="primary">确 定</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+import pagination from '@/components/Pagination/index'
+import store from '@/store'
+import { chargeTypeList, chargeTypeOrganizationFeeAdd, chargeTypeOrganizationFeeDelete, chargeTypeOrganizationFeeUpdate, chargeTypeOrganizationFee, branchQueryPage } from '@/api/specialSetting'
+export default {
+  components: { pagination },
+  name: 'charges',
+  data () {
+    return {
+      id: null,
+      dataList: [],
+      typesList: [], // 分部列表
+      branchList: [], // 分部列表
+      formActionTitle: 'create',
+      formTitle: {
+        create: '添加分部收费标准',
+        update: '修改分部收费标准'
+      },
+      chargeStatus: false,
+      formLabelWidth: '100px',
+      form: {
+        chargeTypeId: null,
+        courseFee: null,
+        organId: store.getters.organ
+      },
+      rules: {
+        courseFee: [{ required: true, message: '请输入收费标准', trigger: 'blur' }],
+        chargeTypeId: [{ required: true, message: '请选择收费类型', trigger: 'change' }],
+        organId: [{ required: true, message: '请选择所属分部', trigger: 'change' }]
+      },
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      }
+    }
+  },
+  mounted() {
+    this.getList()
+    
+    // 收费类型
+    chargeTypeList({
+      rows: 9999,
+      page: 1
+    }).then(res => {
+      if(res.code == 200) {
+        res.data.rows.forEach(item => {
+          this.typesList.push({
+            label: item.name,
+            value: item.id
+          })
+        })
+      }
+    })
+
+    // 分部列表
+    branchQueryPage({
+      rows: 9999,
+      page: 1
+    }).then(res => {
+      if(res.code == 200) {
+        res.data.rows.forEach(item => {
+          this.branchList.push({
+            label: item.name,
+            value: item.id
+          })
+        })
+      }
+    })
+  },
+  methods: {
+    onTypesSubmit (formName) { // 添加数据
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          if(this.formActionTitle == 'create') {
+            if(this.form.id) { // 判断有没有Id,如果有则删除
+              delete this.form.id
+            }
+            chargeTypeOrganizationFeeAdd(this.form).then(res => {
+              this.messageTips('添加', res)
+            })
+          } else if(this.formActionTitle == 'update') {
+            chargeTypeOrganizationFeeUpdate(this.form).then(res => {
+              this.messageTips('修改', res)
+            })
+          }
+        } else {
+          return false;
+        }
+      })
+    },
+    messageTips(title, res) {
+      if(res.code == 200) {
+        this.$message.success(title + '成功')
+        this.chargeStatus = false
+        this.getList()
+      } else {
+        this.$message.error(res.msg)
+      }
+    },
+    onChargeOperation(type, row) {
+      this.chargeStatus = true
+      this.formActionTitle = type
+
+      if(type == 'update') {
+        this.form = {
+          chargeTypeId: row.chargeTypeId,
+          courseFee: row.courseFee,
+          organId: row.organId,
+          id: row.id
+        }
+      }
+    },
+    onChargeDelete(row){ // 删除
+      this.$confirm('您确定删除该收费标准?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        chargeTypeOrganizationFeeDelete({ id: row.id }).then(res => {
+          this.messageTips('删除', res)
+        })
+      }).catch(() => { })
+      
+    },
+    getList () { 
+      chargeTypeOrganizationFee({
+        rows: this.pageInfo.limit,
+        page: this.pageInfo.page
+      }).then(res => {
+        if(res.code == 200) {
+          this.dataList = res.data.rows
+          this.pageInfo.total = res.data.total
+        }
+      })
+    },
+    onFormClose (formName) { // 关闭弹窗重置验证
+      this.form = {
+        courseFee: null, 
+        chargeTypeId: null,
+        organId: store.getters.organ
+      }
+      this.$refs[formName].resetFields()
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+.el-button--primary {
+  background: #14928a;
+  border-color: #14928a;
+  color: #fff;
+  &:hover, &:active, &:focus {
+    background: #14928a;
+    border-color: #14928a;
+    color: #FFF;
+  }
+}
+.el-date-editor.el-input{
+  width: 100% !important;
+}
+.el-select {
+  width: 98% !important;
+}
+
+/deep/.el-table {
+  display: inline-block;
+}
+</style>

+ 11 - 7
src/views/setSilder/addSilder.vue

@@ -10,21 +10,24 @@
       <el-table-column width="400px" prop="name"
                        label="菜单名称">
       </el-table-column>
-      <el-table-column prop="id"
+      <el-table-column prop="id" width="100px"
                        label="元素ID">
       </el-table-column>
-      <el-table-column label="菜单类型">
+      <el-table-column label="菜单类型" width="100px">
         <template slot-scope="scope">
           {{ scope.row.type == 1 ? '按钮' : '菜单' }}
         </template>
       </el-table-column>
+      <el-table-column prop="sort" width="100px"
+                       label="排序">
+      </el-table-column>
       <el-table-column prop="path"
                        label="文件路径">
       </el-table-column>
       <el-table-column prop="permission"
                        label="权限标识">
       </el-table-column>
-      <el-table-column prop="hid"
+      <el-table-column prop="hid" width="100px"
                        label="是否隐藏">
         <template slot-scope="scope">
           {{ scope.row.hid == 1 ? '隐藏' : '不隐藏' }}
@@ -42,6 +45,7 @@
     <el-dialog title="侧边栏管理"
                 :close-on-click-modal="false"
                :visible.sync="branchStatus"
+               default-expand-all
                @close="onFormClose('ruleForm')"
                width="500px">
       <el-form :model="form"
@@ -116,8 +120,8 @@ export default {
         parentId: null,
         sort: 1,
         component: null,
-        hid: 0,
-        type: 0
+        hid: 1,
+        type: 1
       }
     }
   },
@@ -232,8 +236,8 @@ export default {
         parentId: null,
         sort: 1,
         component: null,
-        hid: 0,
-        type: 0
+        hid: 1,
+        type: 1
       }
       this.$refs[formName].resetFields()
     }

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

@@ -95,7 +95,8 @@ export default {
   },
   methods: {
     search () {
-      this.pageInfo.page = 1;
+      this.pageInfo.page = 1
+      this.getList()
     },
     getList () {
       let params = this.searchForm

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

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

+ 17 - 7
src/views/teacherManager/teacherDetail/index.vue

@@ -9,31 +9,31 @@
       <el-tabs v-model="activeName"
                type="card"
                @tab-click="handleClick">
-        <el-tab-pane label="基本信息"
+        <el-tab-pane label="基本信息" v-if="permissionList.teacherInfo"
                      name="0">
           <teacherInfo v-if="activeName == 0" />
         </el-tab-pane>
-        <el-tab-pane label="乐团课"
+        <el-tab-pane label="乐团课" v-if="permissionList.musicGroup"
                      name="1">
           <courseInfo v-if="activeName == 1" />
         </el-tab-pane>
-        <el-tab-pane label="VIP课"
+        <el-tab-pane label="VIP课" v-if="permissionList.VipCourse"
                      name="2">
           <courseInfo1 v-if="activeName == 2" />
         </el-tab-pane>
-        <el-tab-pane label="试听课"
+        <el-tab-pane label="试听课" v-if="permissionList.domeCourse"
                      name="3">
           <courseInfo2 v-if="activeName == 3" />
         </el-tab-pane>
-        <el-tab-pane label="上课记录"
+        <el-tab-pane label="课表详情" v-if="permissionList.teacherRecord"
                      name="4">
           <teacherRecord v-if="activeName == 4" />
         </el-tab-pane>
-        <el-tab-pane label="请假记录"
+        <el-tab-pane label="请假记录" v-if="permissionList.leaveRecord"
                      name="5">
           <leaveRecord v-if="activeName == 5" />
         </el-tab-pane>
-        <el-tab-pane label="上课结算列表"
+        <el-tab-pane label="上课结算列表" v-if="permissionList.settlement"
                      name="6">
           <settlement v-if="activeName == 6" />
         </el-tab-pane>
@@ -49,6 +49,7 @@ import courseInfo from '@/views/teacherManager/teacherDetail/components/courseIn
 import courseInfo1 from '@/views/teacherManager/teacherDetail/components/courseInfo1'
 import courseInfo2 from '@/views/teacherManager/teacherDetail/components/courseInfo2'
 import settlement from '@/views/teacherManager/teacherDetail/components/settlement'
+import { permission } from '@/utils/directivePage'
 export default {
   components: { teacherRecord, 
   leaveRecord, teacherInfo, 
@@ -59,6 +60,15 @@ export default {
       teacherName: this.$route.query.teacherName,
       activeName: "0",
       // activeStatus: [true, false, false, false, false, false, false]
+      permissionList: {
+        teacherInfo: permission('/teacherDetail/teacherInfo'),
+        musicGroup: permission('/teacherDetail/musicGroupCourse'),
+        VipCourse: permission('/teacherDetail/VIPCourse'),
+        domeCourse: permission('/teacherDetail/domeCourse'),
+        teacherRecord: permission('/teacherDetail/teacherRecord'),
+        leaveRecord: permission('/teacherDetail/leaveRecord'),
+        settlement: permission('/teacherDetail/settlement')
+      }
     }
   },
   methods: {

+ 4 - 4
src/views/teacherManager/teacherList.vue

@@ -2,7 +2,7 @@
   <div class="m-container">
     <h2><div class="squrt"></div>老师列表</h2>
     <div class="m-core">
-      <div class="newBand"
+      <div class="newBand" v-permission="'/teacherOperationAdd'"
            @click="onTeacher('create')">老师新增</div>
       <!-- 搜索标题 -->
       <el-form :inline="true"
@@ -124,11 +124,11 @@
           <el-table-column align='center'
                            label="操作">
             <template slot-scope="scope">
-              <router-link style="color:#409EFF"
+              <router-link style="color:#409EFF" v-permission="'/teacherDetail'"
                            :to="`/business/teacherDetail?teacherId=${scope.row.id}&teacherName=${scope.row.realName}`">查看</router-link>
-              <el-button @click="onTeacher('update', scope.row)"
+              <el-button v-permission="'/teacherIperationUpdate'" @click="onTeacher('update', scope.row)"
                          type="text">修改</el-button>
-              <el-button @click="onStaffOperation('LOCK_UNLOCK', scope.row)"
+              <el-button v-permission="'employee/employeeOperate'" @click="onStaffOperation('LOCK_UNLOCK', scope.row)"
                          type="text">{{ scope.row.lockFlag == 1 ? '解冻' : '冻结' }}</el-button>
             </template>
           </el-table-column>

+ 3 - 1
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -67,10 +67,11 @@
                 <template slot="append">元/45分钟</template>
               </el-input>
             </template>
+
           </el-table-column>
         </el-table>
 
-        <div style="padding-top: 10px;">
+        <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>
         </div>
       </div>
@@ -85,6 +86,7 @@ export default {
   props: ['teacherId'],
   data () {
     return {
+      pageType: this.$route.query.type, // 页面类型
       // teacherId: this.teacherId ? this.teacherId : this.$route.query.teacherId,
       teamTable: [{
         assistantTeacher30MinSalary: 0,

+ 8 - 1
src/views/teacherManager/teacherOperation/components/teacherOperation.vue

@@ -254,6 +254,7 @@
 import { branchQueryPage, subjectListTree } from '@/api/specialSetting'
 import { teacherAdd, teacherUpdate, teacherGet } from '@/api/teacherManager'
 import store from '@/store'
+import { permission } from '@/utils/directivePage'
 import { jobNature } from '@/utils/searchArray'
 import { isvalidPhone } from '@/utils/validate'
 let validPhone = (rule, value, callback) => {
@@ -402,7 +403,13 @@ export default {
             }
             teacherAdd(this.topForm).then(res => {
               if (res.code == 200) {
-                this.$emit('onTeacher', res.data)
+                // 权限判断,是否有课酬设置
+                if(permission('/teacherAdd/salarySeting')) {
+                  this.$router.push('/business/teacherList')
+                } else {
+                  this.$emit('onTeacher', res.data)
+                }
+                
               }
               this.messageTips('添加', res)
             })

+ 9 - 2
src/views/teacherManager/teacherOperation/index.vue

@@ -9,10 +9,11 @@
                      name="0">
           <teacherOperation @onTeacher="onTeacher" v-if="activeStatus[0]" />
         </el-tab-pane>
-        <el-tab-pane label="课酬设置"
-                     name="1" :disabled="isTeacher">
+        <el-tab-pane label="课酬设置" v-if="salaryStatus"
+                    name="1" :disabled="isTeacher">
           <salarySet :teacherId="teacherId" v-if="activeStatus[1]" />
         </el-tab-pane>
+        <!-- v-permission="pageType == 'create' ? '/teacherAdd/salarySeting' : '/teacherUpdate/saraySeting'" -->
       </el-tabs>
     </div>
   </div>
@@ -20,12 +21,15 @@
 <script>
 import teacherOperation from './components/teacherOperation'
 import salarySet from './components/salarySet'
+import { permission } from '@/utils/directivePage'
 export default {
   components: { teacherOperation, salarySet },
   name: 'vipDetail',
   data () {
     return {
         pageType: this.$route.query.type,
+        baseInfoStatus: true, // 权限显示,基本信息
+        salaryStatus: true, // 权限显示 课酬设置
         teacherId: this.$route.query.teacherId,
         activeName: '0',
         activeStatus: [true, false],
@@ -37,6 +41,9 @@ export default {
       if(this.teacherId) {
           this.isTeacher = false
       }
+
+      this.salaryStatus = permission(this.pageType == 'create' ? '/teacherAdd/salarySeting' : '/teacherUpdate/saraySeting')
+      this.baseInfoStatus = permission(this.pageType == 'create' ? '/teacherAdd/baseInfo' : '/teacherUpdate/baseInfo')
   },
   methods: {
     handleClick (val) {

+ 10 - 10
src/views/teamBuild/signupList.vue

@@ -9,15 +9,15 @@
           <!-- {{ teamName }}报名详情 -->
         </h2>
         <div class="btnList">
-          <div class='newBand close'
+          <div class='newBand close' v-permission="'musicGroup/cancelMusicGroup'"
                @click="onClose">停止乐团</div>
           <div class='newBand'
-               @click="payStart"
+               @click="payStart" v-permission="'musicGroup/openPay'"
                v-if="status=='APPLY'">开始缴费</div>
-          <div class='newBand'
+          <div class='newBand' v-permission="'musicGroup/found'"
                @click="onGoHome"
                v-if="status=='PAY'">确认开团</div>
-          <div class='newBand'
+          <div class='newBand' v-permission="'musicGroup/extensionPayment'"
                @click="extendPaymentStatus = true"
                v-if="status=='PAY'">延长缴费</div>
           <div class='newBand'
@@ -99,9 +99,9 @@
         </el-table>
         <div class="btnWrap"
              style="margin-right:20px;  margin-top:20px;">
-          <el-button v-if="!isEdit"
+          <el-button v-if="!isEdit" v-permission="'musicGroup/updateExpectedStudentNum'"
                      @click="isEdit = true">编辑</el-button>
-          <el-button v-if="isEdit"
+          <el-button v-if="isEdit" v-permission="'musicGroup/updateExpectedStudentNum'"
                      @click="saveIsEdit">保存</el-button>
         </div>
       </div>
@@ -173,7 +173,7 @@
                            align='center'>
             <template slot-scope="scope">
               <div>
-                <el-button type='text'
+                <el-button type='text' v-permission="'studentRegistration/batchUpdateSubject'"
                            v-if="scope.row.paymentStatus != 2"
                            @click='resetSubject(scope.row)'>修改专业</el-button>
                 <!-- APPLY -->
@@ -187,7 +187,7 @@
                              slot="reference">备注</el-button>
                 </el-popover>
                 <!-- PAY -->
-                <el-button type='text'
+                <el-button type='text' v-permission="'studentRegistration/queryFeeDetail'"
                            v-if='status == "PAY"&&scope.row.paymentStatus==1'
                            @click='lookdetail(scope.row)'>查看</el-button>
               </div>
@@ -198,7 +198,7 @@
              v-if="status=='APPLY'">
           <el-button @click="onSelectAll">全选/取消</el-button>
           <el-button style="background-color: #14928a;border: 1px solid #14928a;"
-                     @click="onPartPayment"
+                     @click="onPartPayment" v-permission="'studentRegistration/openPayment'"
                      type="primary">提前缴费</el-button>
           <!-- <div class='newBand' v-if="status=='APPLY'">允许缴费</div> -->
         </div>
@@ -360,7 +360,7 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { getTeamRecruit, getintoClass, getStudentList, findSound, musicGroupOpenPay, openPayment, musicGroupFound, extensionPayment, resetPlanNum, cancelMusicGroup } from '@/api/buildTeam'
+import { getintoClass, getStudentList, findSound, musicGroupOpenPay, openPayment, musicGroupFound, extensionPayment, resetPlanNum, cancelMusicGroup } from '@/api/buildTeam'
 import { resetStudentSubject, getStudentFeeDetail } from '@/api/studentManager'
 import QRCode from 'qrcodejs2'
 export default {

+ 7 - 6
src/views/teamBuild/teamSeting/components/setImprovement.vue

@@ -5,7 +5,7 @@
                       content="基础技能班报名详情"></el-page-header>
       <!-- <div class='squrt'></div>  -->
       <!-- <span @click="onCreateQRCode" style="font-size: 16px; padding-left: 20px; font-weight: 400;cursor: pointer; ">查看报名连接</span> -->
-      <span @click="onApply"
+      <span @click="onApply" v-permission="'musicGroup/pushMessage'"
             style="font-size: 16px; padding-left: 20px; font-weight: 400;cursor: pointer;">开启报名</span>
     </h2>
     <div class='m-core'>
@@ -27,9 +27,9 @@
           <el-table-column label="操作">
             <template slot-scope="scope">
               <div>
-                <el-button type="text"
+                <el-button type="text" v-permission="'classGroupStudent/findAllStudent'"
                            @click='lookDeatil(scope.row)'>查看</el-button>
-                <el-button type="text"
+                <el-button type="text" v-permission="'classGroupStudent/addStudents'"
                            @click="addstudentBtn(scope.row)">添加学员</el-button>
               </div>
             </template>
@@ -67,7 +67,7 @@
       </el-table>
       <div slot="footer"
            class="dialog-footer">
-        <el-button type="primary"
+        <el-button type="primary" v-permission="'classGroupStudent/addStudents'"
                    @click="addStudnt">确 定</el-button>
       </div>
     </el-dialog>
@@ -83,6 +83,7 @@
           <template slot-scope="scope">
             <div>
               <el-popover placement="top"
+                          v-permission="'classGroupStudent/del'"
                           width="160"
                           :ref="scope.$index">
                 <p>确定删除该学生?</p>
@@ -94,10 +95,10 @@
                              size="mini"
                              @click="removeStudent(scope)">确定</el-button>
                 </div>
-                <el-button type="text"
+                <el-button type="text" 
                            slot="reference">删除</el-button>
               </el-popover>
-              <el-button type="text"
+              <el-button type="text" v-permission="'classGroupStudent/adjustClassGroup'"
                          @click="resetClass(scope.row)">调整班级</el-button>
             </div>
           </template>

+ 1 - 1
src/views/teamDetail/teamDetailedList.vue

@@ -52,7 +52,7 @@
         </el-table>
       </div>
     </div>
-    <div class="btnWrap"
+    <div class="btnWrap" v-permission="'order/verifyMusicalList'"
          style="margin-top:20px;">
       <div class="okBtn"
            @click="okDetailList">确认</div>

+ 5 - 6
src/views/teamDetail/teamList.vue

@@ -141,25 +141,24 @@
                            v-if="scope.row.status == 'PREPARE'"
                            @click="gotoImprovement(scope.row)">基础技能班设置</el-button>
                 <el-button type="text"
-                           v-if="scope.row.status == 'PREPARE'"
+                           v-if="scope.row.status == 'PREPARE'" v-permission="'/teamDetailedList'"
                            @click="gotodetailList(scope.row)">发放清单</el-button>
-
                 <el-button type="text"
                            v-if="scope.row.status == 'PROGRESS' ||  scope.row.status == 'PAUSE'"
                            @click="lookTeamDetail(scope.row)">查看</el-button>
                 <el-button type="text"
                            v-if="scope.row.status != 'PROGRESS' && scope.row.status != 'CANCELED'  && scope.row.status != 'PAUSE'"
                            @click="lookTeamDetail(scope.row)">编辑</el-button>
-                <el-button v-if="scope.row.status == 'PREPARE'"
+                <el-button v-if="scope.row.status == 'PREPARE'" v-permission="'musicGroup/action'"
                            @click="startTeam(scope.row)"
                            type="text">确认成团</el-button>
-                <el-button type="text"
+                <el-button type="text" v-permission="'musicGroup/cancelMusicGroup'"
                            v-if="scope.row.status == 'AUDIT'"
                            @click="stopTeam(scope.row)">取消申请</el-button>
-                <el-button v-if="scope.row.status == 'PAUSE'"
+                <el-button v-if="scope.row.status == 'PAUSE'"  v-permission="'musicGroup/resumeMusicGroup'"
                            @click="onTeamOpeation('start', scope.row)"
                            type="text">启动</el-button>
-                <el-button v-if="scope.row.status == 'PROGRESS'"
+                <el-button v-if="scope.row.status == 'PROGRESS'"  v-permission="'musicGroup/pauseMusicGroup'"
                            @click="onTeamOpeation('pause', scope.row)"
                            type="text">暂停</el-button>
                 <el-button v-if="scope.row.status == 'PROGRESS'"