// 权限配置按钮
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'},
                    {button_code:'authorManage:add'},
                    {button_code:'authorManage:cnReport'},
                    {button_code:'authorManage:enReport'},
                    {button_code:'authorManage:cnReport:edit'},
                    //ppt test
                    {button_code:'ppt:show'},
                    {button_code:'pptEn:show'},
                ]
                commit('SET_PERMISSION_BUTTONS',buttons)
                resolve('获取权限按钮成功')
            })
        }
    },
    getters:{}
  }
  export default permissionButtons;