permissionButton.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // 权限配置按钮
  2. const permissionButtons = {
  3. state:()=>({
  4. permissionButtons:[]
  5. }),
  6. mutations:{
  7. SET_PERMISSION_BUTTONS:(state,buttons)=>{
  8. state.permissionButtons = buttons
  9. }
  10. },
  11. actions:{
  12. getPermissionButtons({commit}){
  13. return new Promise((resolve,reject)=>{
  14. /* getPermissionButtons().then(res=>{
  15. commit('GET_PERMISSION_BUTTONS',res.data.list || [])
  16. // console.log(res);
  17. resolve('获取权限按钮成功')
  18. }) */
  19. const buttons = [
  20. {button_code: "system:menu:add"},
  21. {button_code: "system:user:add"},
  22. {button_code:'reportManage:reportList:sendTime'},
  23. {button_code:'reportManage:reportView'},
  24. {button_code:'reportManage_reportView_copyWechat'},
  25. {button_code:'enReport:reportView'},
  26. {button_code:'enReport:reportView:wechatShare'},
  27. //{button_code:'classifyList:enClassify'},
  28. {button_code:'classifyList:cnClassify'},
  29. {button_code:'classifyList:cnClassify:classifyAdd'},
  30. {button_code:'authorManage:add'},
  31. {button_code:'authorManage:cnReport'},
  32. {button_code:'authorManage:enReport'},
  33. {button_code:'authorManage:cnReport:edit'},
  34. //ppt test
  35. {button_code:'ppt:show'},
  36. {button_code:'pptEn:show'},
  37. //table test
  38. {button_code:'etaTable:excel:download'},
  39. //sandbox test
  40. {button_code:'sandbox:saveView'},
  41. //chartHandle test
  42. {button_code:'statisticFeature:share'},
  43. //stockPlant:anlysisView
  44. {button_code:'stockPlant:anlysisView'},
  45. //goodsPrice:incomeLine:refresh
  46. {button_code:'goodsPrice:incomeLine:refresh'},
  47. ]
  48. commit('SET_PERMISSION_BUTTONS',buttons)
  49. resolve('获取权限按钮成功')
  50. })
  51. }
  52. },
  53. getters:{}
  54. }
  55. export default permissionButtons;