1234567891011121314151617181920212223242526272829303132333435363738 |
- // 权限配置按钮
- const permissionButtons = {
- state:()=>({
- permissionButtons:[]
- }),
- mutations:{
- SET_PERMISSION_BUTTONS:(state,buttons)=>{
- state.permissionButtons = buttons
- }
- },
- actions:{
- getPermissionButtons({commit}){
- return new Promise((resolve,reject)=>{
- /* getPermissionButtons().then(res=>{
- commit('GET_PERMISSION_BUTTONS',res.data.list || [])
- // console.log(res);
- resolve('获取权限按钮成功')
- }) */
- const buttons = [
- {button_code: "system:menu:add"},
- {button_code: "system:user:add"},
- {button_code:'reportManage:reportList:sendTime'},
- {button_code:'reportManage:reportView'},
- {button_code:'reportManage_reportView_copyWechat'},
- {button_code:'enReport:reportView'},
- {button_code:'enReport:reportView:wechatShare'},
- //{button_code:'classifyList:enClassify'},
- {button_code:'classifyList:cnClassify'},
- {button_code:'classifyList:cnClassify:classifyAdd'}
- ]
- commit('SET_PERMISSION_BUTTONS',buttons)
- resolve('获取权限按钮成功')
- })
- }
- },
- getters:{}
- }
- export default permissionButtons;
|