//维护 按钮列表 已加载在全局 //通过 this.permissionBtn 调用 import {store} from "../main"; /** * 判断按钮在不在用户的权限内 * @param {String} button_code * @returns Boolean */ export const checkPermissionBtn = (button_code)=>{ const buttonCodes = store.state.permissionButton.permissionButtons.map(item=>item.ButtonCode) return buttonCodes.includes(button_code) } /* * -----------------------------------------------------------------------------研报管理------------------------------------------------ */ /* *--------中文研报列表----------- */ export const reportManageBtn={ reportManage_sendMsg:'reportManage:sendMsg',//推送消息/已推送消息 reportManage_reportView:'reportManage:reportView',//研报预览:即是否能点击研报名称跳转预览页面 reportManage_reportView_wechartShare:'reportManage:reportView:wechartShare',//研报预览页面-微信分享 reportManage_reportView_copyWechat:'reportManage:reportView:copyWechat',//研报预览页面-复制链接 reportManage_audioDownload:'reportManage:audioDownload',//音频下载 reportManage_audioUpload:'reportManage:audioUpload',//音频上传 reportManage_reportDel:'reportManage:reportDel',//删除研报 reportManage_reportEdit:'reportManage:reportEdit',//编辑研报 reportManage_cancelPublish:'reportManage:cancelPublish',//取消发布 reportManage_publish:'reportManage:publish',//发布研报 reportManage_reportList:'reportManage:reportList',//研报列表的选项 reportManage_reportList_uv:'reportManage:reportList:uv',//研报列表-PV/UV reportManage_reportList_sendTime:'reportManage:reportList:sendTime',//研报列表-报告推送时间 reportManage_dayWeekReportAdd:'reportManage:dayWeekReportAdd',//添加晨报周报 reportManage_reportAdd:'reportManage:reportAdd',//添加研报 } /* *--------英文研报列表----------- */ export const enReportManageBtn = { enReport_reportView:'enReport:reportView',//研报预览:即是否能点击研报名称跳转预览页面 enReport_reportView_wechatShare:'enReport:reportView:wechatShare',//研报预览页面-微信分享 enReport_reportView_copyWechat:'enReport:reportView:copyWechat',//研报预览页面-复制链接 enReport_sendEmail:'enReport:sendEmail',//群发邮件/群发日志 enReport_reportDel:'enReport:reportDel',//删除研报 enReport_reportEdit:'enReport:reportEdit',//编辑研报 enReport_cancelPublish:'enReport:cancelPublish',//取消发布 enReport_publish:'enReport:publish',//发布研报 enReport_syncPolicy:'enReport:syncPolicy',//同步策略报告 enReport_reportAdd:'enReport:reportAdd',//添加研报 } /* *--------中文分类----------- */ export const classifyBtn={ classifyList_cnClassify:'classifyList:cnClassify',//中文分类这个选项卡是否显示 classifyList_cnClassify_classifyDel:'classifyList:cnClassify:classifyDel',//一二级分类删除 classifyList_cnClassify_authSetting:'classifyList:cnClassify:authSetting',//二级分类权限配置 classifyList_cnClassify_chapterSetting:'classifyList:cnClassify:chapterSetting',//晨周报章节设置 /*---------添加编辑分类------------- */ classifyList_cnClassify_classifyAdd:'classifyList:cnClassify:classifyAdd',//一二级添加编辑分类 classifyList_cnClassify_relateSetting:'classifyList:cnClassify:relateSetting',//表单项:关联设置 classifyList_cnClassify_miniHidden:'classifyList:cnClassify:miniHidden',//表单项:小程序隐藏 classifyList_cnClassify_pcBackColor:'classifyList:cnClassify:pcBackColor',//表单项:PC端背景颜色 classifyList_cnClassify_shareImgs:'classifyList:cnClassify:shareImgs',//表单项:分享链接配图 classifyList_cnClassify_reportImgs:'classifyList:cnClassify:reportImgs',//表单项:报告合集配图 classifyList_cnClassify_ficcIcon:'classifyList:cnClassify:ficcIcon',//表单项:FICCicon classifyList_cnClassify_ficcSort:'classifyList:cnClassify:ficcSort',//表单项:FICC页排序 classifyList_cnClassify_backSort:'classifyList:cnClassify:backSort',//表单项:后台排序 classifyList_cnClassify_showType:'classifyList:cnClassify:showType',//表单项:展示形式 classifyList_cnClassify_childMenu:'classifyList:cnClassify:childMenu',//表单项:子目录 } /* *--------英文分类----------- */ export const enClassifyBtn = { classifyList_enClassify:'classifyList:enClassify',//英文分类这个选项卡是否展示 /* -------------线上路演------------- */ classifyList_enClassify_roadshow:'classifyList:enClassify:roadshow',//线上路演这个选项卡是否展示 classifyList_enClassify_rsDel:'classifyList:enClassify:rsDel',//线上路演一二级分类删除 classifyList_enClassify_rsAuthSetting:'classifyList:enClassify:rsAuthSetting',//线上路演二级分类权限设置 classifyList_enClassify_rsEdit:'classifyList:enClassify:rsEdit',//线上路演一二级分类编辑 classifyList_enClassify_rsAddClassify:'classifyList:enClassify:rsAddClassify',//线上路演添加分类按钮 /* -------------英文研报------------- */ classifyList_enClassify_report:'classifyList:enClassify:report',//英文研报这个选项卡是否展示 classifyList_enClassify_rpDel:'classifyList:enClassify:rpDel',//英文研报一二级删除 classifyList_enClassify_rpAuthSetting:'classifyList:enClassify:rpAuthSetting',//英文研报二级分类权限配置 classifyList_enClassify_rpEdit:'classifyList:enClassify:rpEdit',//英文研报一二级编辑 classifyList_enClassify_rpAddClassify:'classifyList:enClassify:rpAddClassify',//英文研报添加分类 } /* *--------作者管理----------- */ export const authorManage = { /*------------------英文研报作者管理------------ */ authorManage_enReport:'authorManage:enReport',//英文研报选项卡是否展示 authorManage_enReport_enable:'authorManage:enReport:enable',//英文研报作者启用/禁用 authorManage_enReport_del:'authorManage:enReport:del',//英文研报作者删除 authorManage_enReport_edit:'authorManage:enReport:edit',//英文研报作者编辑 /*------------------中文研报作者管理------------ */ authorManage_cnReport:'authorManage:cnReport',//中文研报选项卡是否展示 authorManage_cnReport_enable:'authorManage:cnReport:enable',//中文研报作者启用/禁用 authorManage_cnReport_del:'authorManage:cnReport:del',//中文研报作者删除 authorManage_cnReport_edit:'authorManage:cnReport:edit',//中文研报作者编辑 authorManage_add:'authorManage:add',//添加作者按钮 } /* *--------英文品种配置----------- */ export const enChartPermission = { enChartPermission_del:'enChartPermission:del', enChartPermission_save:'enChartPermission:save', } /* *--------云盘----------- */ export const cloudDisk = { cloudDisk_del:'cloudDisk:del', cloudDisk_download:'cloudDisk:download', cloudDisk_rename:'cloudDisk:rename', cloudDisk_uploadFile:'cloudDisk:uploadFile', cloudDisk_newDir:'cloudDisk:newDir' } /* * -----------------------------------------------------------------------------智能PPT------------------------------------------------ */ /* *--------中文PPT----------- */ export const pptPermission ={ /*---------对PPT操作--------- */ ppt_del:'ppt:del', ppt_copy:'ppt:copy', ppt_toEn:'ppt:toEn',//转英文PPT ppt_toReport:'ppt:toReport',//转报告 ppt_download:'ppt:download', ppt_show:'ppt:show',//演示 ppt_publish:'ppt:publish', /*--------页面按钮操作-------- */ ppt_save:'ppt:save',//添加PPT按钮,同时也控制编辑权限 ppt_merge:'ppt:merge',//合并PPT } /* *--------英文PPT---------- */ export const enPPTPermission={ /*---------对PPT操作--------- */ pptEn_del:'pptEn:del', pptEn_copy:'pptEn:copy', pptEn_toReport:'pptEn:toReport',//转报告 pptEn_download:'pptEn:download', pptEn_show:'pptEn:show',//演示 pptEn_publish:'pptEn:publish', /*--------页面按钮操作-------- */ pptEn_save:'pptEn:save',//添加PPT按钮,同时也控制编辑权限 pptEn_merge:'pptEn:merge',//合并PPT } /* * ---------------------------------------------------------------------------数据源------------------------------------------------ */ export const dataSourcePermission = { /*--------手工指标列表---- */ manualData_del:'manualData:del', manualData_add:'manualData:add',//新增编辑 manualData_add_updateRemind:'manualData:add:updateRemind',//新增编辑-更新提醒 /*--------手工数据录入---- */ manualDataWrite_edit:'manualDataWrite:edit',//编辑按钮,直接编辑没有禁 manualDataWrite_export:'manualDataWrite:export',//导出 manualDataWrite_import:'manualDataWrite:import',//导入 manualDataWrite_copy:'manualDataWrite:copy',//复制 /*--------期货数据库没有要控制的东西---- */ /*--------隆众原始数据库---- */ longzhongData_export:'longzhongData:export', /*--------钢联原始数据库---- */ glData_export:'glData:export', /*--------钢联化工数据库---- */ mysteelData_refresh:'mysteelData:refresh',//一键刷新 mysteelData_export:'mysteelData:export', mysteelData_add:'mysteelData:add', /*--------SMM原始数据库---- */ smmData_export:'smmData:export', /*--------百川盈孚---- */ bcyfData_edit:'bcyfData:edit',//编辑指标按钮 bcyfData_export:'bcyfData:export', /*--------卓创数据(红桃3)---- */ hongtao3Data_export:'hongtao3Data:export', /*--------中国煤炭市场网)---- */ zgmtData_export:'zgmtData:export', /*--------EIA STEO报告---- */ eiaData_export:'eiaData:export', /*--------国家统计局---- */ gjtjjData_export:'gjtjjData:export' } /* * ---------------------------------------------------------------------------ETA指标库------------------------------------------------ */ export const edbDataPermission = { /*-----------指标详情按钮--------- */ edbData_refreshAll:'edbData:refreshAll',//全部刷新 edbData_newestValue:'edbData:newestValue',//添加最新值 edbData_enNameSetting:'edbData:enNameSetting',//设置英文名称 edbData_edbSource:'edbData:edbSource',//指标溯源 edbData_copyData:'edbData:copyData',//复制数据 edbData_toImgs:'edbData:toImgs',//一键成图 edbData_edit:'edbData:edit',//指标编辑,也包括列表项的编辑按钮 edbData_update:'edbData:update',//更新指标 /*------------页面按钮---------- */ edbData_batchUpdate:'edbData:batchUpdate',//一键更新 edbData_dataAdjust:'edbData:dataAdjust',//数据调整 edbData_codeRun:'edbData:codeRun',//代码运算 edbData_replaceEdb:'edbData:replaceEdb',//替换指标 edbData_calcuEdb:'edbData:calcuEdb',//计算指标 edbData_addEdb:'edbData:addEdb',//添加指标 edbData_switchEn:'edbData:switchEn',//切换英文版 } /* * ---------------------------------------------------------------------------ETA预测指标------------------------------------------------ */ export const predictEdbPermission = { /*-----------指标详情按钮--------- */ edbPreData_switchSeason:'edbPreData:switchSeason',//切换季节性图 edbPreData_viewData:'edbPreData:viewData',//查看数据 edbPreData_copyData:'edbPreData:copyData',//复制数据 edbPreData_del:'edbPreData:del',//删除 edbPreData_recalcu:'edbPreData:recalcu',//重新计算 edbPreData_save:'edbPreData:save',//保存 edbPreData_edit:'edbPreData:edit',//编辑 edbPreData_update:'edbPreData:update',//更新 edbPreData_edbSource:'edbPreData:edbSource',//指标溯源 edbPreData_enNameSetting:'edbPreData:enNameSetting',//设置英文名称 /*------------页面按钮---------- */ edbPreData_calcuEdb:'edbPreData:calcuEdb',//计算指标 edbPreData_addEdb:'edbPreData:addEdb',//添加指标 edbPreData_switchEn:'edbPreData:switchEn',//切换英文版 } /* * ---------------------------------------------------------------------------ETA图库------------------------------------------------ */ export const chartLibPermission = { /*-----------图表详情按钮--------- */ chartLib_viewData:'chartLib:viewData',//查看数据,图表详情的表格操作栏 chartLib_copyData:'chartLib:copyData',//复制数据,图表详情的表格操作栏 chartLib_del:'chartLib:del', chartLib_enNameSetting:'chartLib:enNameSetting', chartLib_copyWechat:'chartLib:copyWechat', chartLib_copyOffice:'chartLib:copyOffice', chartLib_edit:'chartLib:edit', chartLib_otherSave:'chartLib:otherSave', chartLib_save:'chartLib:save', chartLib_refresh:'chartLib:refresh', chartLib_addMy:'chartLib:addMy',//加入我的图库 chartLib_share:'chartLib:share', /*------------页面按钮---------- */ chartLib_add:'chartLib:add', chartLib_switchEn:'chartLib:switchEn', } /* * ---------------------------------------------------------------------------My ETA------------------------------------------------ */ export const myETAPermission = { /*-----------图表详情弹窗按钮--------- */ myChart_del:'myChart:del', myChart_enNameSetting:'myChart:enNameSetting', myChart_copyWechat:'myChart:copyWechat', myChart_copyOffice:'myChart:copyOffice', myChart_otherSave:'myChart:otherSave', myChart_save:'myChart:save', myChart_edit:'myChart:edit', myChart_refresh:'myChart:refresh', myChart_copyTo:'myChart:copyTo', myChart_share:'myChart:share', myChart_move:'myChart:move',//移出,同时也控制列表项的移出 /*-----------页面按钮--------- */ myChart_selectChart:'myChart:selectChart',//选择图表 } /* * --------------------------------------------------------------------------ETA表格------------------------------------------------ */ export const etaTablePermission = { /*-----------页面按钮--------- */ etaTable_customize:'etaTable:customize',//自定义表格这个按钮显示不显示 etaTable_excel:'etaTable:excel',//添加Excel表格这个按钮显示不显示 /*-----------自定义表格--------- */ etaTable_customize_del:'etaTable:customize:del', etaTable_customize_download:'etaTable:customize:download', etaTable_customize_otherSave:'etaTable:customize:otherSave', etaTable_customize_refresh:'etaTable:customize:refresh', etaTable_customize_edit:'etaTable:customize:edit', /*-----------常规表格--------- */ etaTable_excel_del:'etaTable:excel:del', etaTable_excel_download:'etaTable:excel:download', etaTable_excel_save:'etaTable:excel:save' } /* * --------------------------------------------------------------------------ETA逻辑------------------------------------------------ */ export const sandboxPermission = { sandbox_variety:'sandbox:variety',//沙盘品种选择,控制筛选项和列表项 sandbox_addMy:'sandbox:addMy',//复制图片 sandbox_del:'sandbox:del',//删除 sandbox_saveView:'sandbox:saveView',//添加/编辑/查看 } /* * --------------------------------------------------------------------------语义分析------------------------------------------------ */ export const semanticPermission = { /*-----------文档管理--------- */ docPage_save:'docPage:save',//添加编辑文档 /*-----------文档对比--------- */ saPage_save:'saPage:save',//添加编辑对比文档 /*-----------标签管理--------- */ tagPage_del:'tagPage:del', tagPage_save:'tagPage:save',//添加编辑标签 } /* * --------------------------------------------------------------------------统计分析------------------------------------------------ */ export const statisticPermission = { /*-----------相关性分析--------- */ corrAnalysis_addChart:'corrAnalysis:addChart',//添加图表按钮 corrAnalysis_viewData:'corrAnalysis:viewData',//查看表格数据 corrAnalysis_copyData:'corrAnalysis:copyData',//复制表格数据 /*---图表操作栏--- */ corrAnalysis_del:'corrAnalysis:del', corrAnalysis_enNameSetting:'corrAnalysis:enNameSetting', corrAnalysis_copyWechat:'corrAnalysis:copyWechat', corrAnalysis_copyOffice:'corrAnalysis:copyOffice', corrAnalysis_edit:'corrAnalysis:edit', corrAnalysis_otherSave:'corrAnalysis:otherSave', corrAnalysis_refresh:'corrAnalysis:refresh', corrAnalysis_addMyChart:'corrAnalysis:addMyChart', corrAnalysis_share:'corrAnalysis:share', /*-----------统计特征--------- */ statisticFeature_addChart:'statisticFeature:addChart',//添加图表按钮 /*---图表操作栏--- */ statisticFeature_del:'statisticFeature:del', statisticFeature_enNameSetting:'statisticFeature:enNameSetting', statisticFeature_copyWechat:'statisticFeature:copyWechat', statisticFeature_copyOffice:'statisticFeature:copyOffice', statisticFeature_edit:'statisticFeature:edit', statisticFeature_otherSave:'statisticFeature:otherSave', statisticFeature_refresh:'statisticFeature:refresh', statisticFeature_addMyChart:'statisticFeature:addMyChart', statisticFeature_share:'statisticFeature:share', /*-----------拟合方程曲线--------- */ fittingEq_addChart:'fittingEq:addChart',//添加图表按钮 /*---图表操作栏--- */ fittingEq_del:'fittingEq:del', fittingEq_enNameSetting:'fittingEq:enNameSetting', fittingEq_copyWechat:'fittingEq:copyWechat', fittingEq_copyOffice:'fittingEq:copyOffice', fittingEq_edit:'fittingEq:edit', fittingEq_otherSave:'fittingEq:otherSave', fittingEq_refresh:'fittingEq:refresh', fittingEq_addMyChart:'fittingEq:addMyChart', fittingEq_share:'fittingEq:share', } /* * --------------------------------------------------------------------------供应分析------------------------------------------------ */ export const stockPlantPermission = { stockPlant_del:'stockPlant:del', stockPlant_anlysisView:'stockPlant:anlysisView',//分析和查看,包括点击品种名称跳转详情 stockPlant_saveVariety:'stockPlant:saveVariety',//添加编辑 } /* * --------------------------------------------------------------------------商品价格曲线------------------------------------------------ */ export const productPricePermission = { /*-----------页面按钮--------- */ goodsPrice_incomeLine:'goodsPrice:incomeLine',//添加利润曲线 goodsPrice_priceLine:'goodsPrice:priceLine',//添加价格曲线 /* 利润曲线 */ goodsPrice_incomeLine_del:'goodsPrice:incomeLine:del', goodsPrice_incomeLine_enNameSetting:'goodsPrice:incomeLine:enNameSetting', goodsPrice_incomeLine_copyWechat:'goodsPrice:incomeLine:copyWechat', goodsPrice_incomeLine_copyOffice:'goodsPrice:incomeLine:copyOffice', goodsPrice_incomeLine_edit:'goodsPrice:incomeLine:edit', goodsPrice_incomeLine_otherSave:'goodsPrice:incomeLine:otherSave', goodsPrice_incomeLine_refresh:'goodsPrice:incomeLine:refresh', goodsPrice_incomeLine_addMyChart:'goodsPrice:incomeLine:addMyChart', goodsPrice_incomeLine_share:'goodsPrice:incomeLine:share', /* 价格曲线 */ goodsPrice_priceLine_del:'goodsPrice:priceLine:del', goodsPrice_priceLine_enNameSetting:'goodsPrice:priceLine:enNameSetting', goodsPrice_priceLine_copyWechat:'goodsPrice:priceLine:copyWechat', goodsPrice_priceLine_copyOffice:'goodsPrice:priceLine:copyOffice', goodsPrice_priceLine_edit:'goodsPrice:priceLine:edit', goodsPrice_priceLine_otherSave:'goodsPrice:priceLine:otherSave', goodsPrice_priceLine_refresh:'goodsPrice:priceLine:refresh', goodsPrice_priceLine_addMyChart:'goodsPrice:priceLine:addMyChart', goodsPrice_priceLine_share:'goodsPrice:priceLine:share', } /* * --------------------------------------------------------------------------系统设置------------------------------------------------ */ export const sysDepartPermission = { /*-----------部门管理-------- */ sysDepart_saveUser:'sysDepart:saveUser',//添加/编辑用户按钮 sysDepart_resetPass:'sysDepart:resetPass',//重置密码 sysDepart_moveGroup:'sysDepart:moveGroup',//移动分组 sysDepart_enable:'sysDepart:enable',//启用禁用 sysDepart_del:'sysDepart:del',//用户删除 sysDepart_saveUser_researchGroup:'sysDepart:saveUser:researchGroup',//添加/编辑用户表单中,研究方向的按钮 sysDepart_saveUser_LabelVal:'sysDepart:saveUser:LabelVal',//姓名角色的标签 /*-----------角色管理-------- */ sysRole_del:'sysRole:del',//删除角色 sysRole_settingAuth:'sysRole:settingAuth',//设置/查看权限 sysRole_addRole:'sysRole:addRole',//添加角色 /*-----------英文权限配置-------- */ enAuthManage_del:'enAuthManage:del', enAuthManage_settingAuth:'enAuthManage:settingAuth' } /*-----------数据操作权限-------- */ export const operateAuthPermission = { /*---------图库-------- */ operateAuth_chartLib:'operateAuth:chartLib',//图库tab operateAuth_chartLib_edit:'operateAuth:chartLib:edit',//图库的编辑,批量编辑按钮 /*---------ETA预测指标库-------- */ operateAuth_etaPredictLib:'operateAuth:etaPredictLib', operateAuth_etaPredictLib_authSetting:'operateAuth:etaPredictLib:authSetting',//权限设置/批量权限设置 operateAuth_etaPredictLib_edit:'operateAuth:etaPredictLib:edit', /*---------ETA指标库-------- */ operateAuth_etaLib:'operateAuth:etaLib', operateAuth_etaLib_authSetting:'operateAuth:etaLib:authSetting', operateAuth_etaLib_edit:'operateAuth:etaLib:edit', /*---------钢联化工数据库-------- */ operateAuth_mysteel:'operateAuth:mysteel', operateAuth_mysteel_edit:'operateAuth:mysteel:edit', /*---------手工数据指标-------- */ operateAuth_manual:'operateAuth:manual', operateAuth_manual_edit:'operateAuth:manual:edit', } /*-----------基本配置-------- */ export const baseConfigPermission = { /*-------其他设置------- */ sysJump_updateLog:'sysJump:updateLog',//更新日志 sysJump_helpDoc:'sysJump:helpDoc',//帮助文档,如果两个都没权限,就隐藏按钮 sysJump_crm:'sysJump:crm',//跳转CRM的按钮 sysJump_hr:'sysJump:hr',//跳转HR系统的按钮 sysJump_finance:'sysJump:finance',//跳转财务系统的按钮 /*-------基本配置表格---*/ etaBaseConfig_xunfei:'etaBaseConfig:xunfei', etaBaseConfig_pptEn:'etaBaseConfig:pptEn', etaBaseConfig_ppt:'etaBaseConfig:ppt', etaBaseConfig_watermark:'etaBaseConfig:watermark', etaBaseConfig_watermark_ybChart:'etaBaseConfig:watermark:ybChart',//如果没权限,表单不显示也不校验 }