123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- //权限按钮相关
- import {useAuthBtnStore} from '@/store/modules/authBtn'
- const authBtnStore = useAuthBtnStore()
- /*
- ---------------------------研报管理-----------------
- */
- export const reportManageBtn = {
- reportManage_sendMsg:'reportManage:sendMsg',//推送消息/已推送消息
- reportManage_reportView:'reportManage:reportView',//研报预览:即是否能点击研报名称跳转预览页面
- reportManage_reportDel:'reportManage:reportDel',//删除研报
- reportManage_reportEdit:'reportManage:reportEdit',//编辑研报
- reportManage_cancelPublish:'reportManage:cancelPublish',//取消发布
- reportManage_exportPdf:'reportManage:exportPdf',//下载pdf
- reportManage_exportImg:'reportManage:exportImg',//下载长图
- 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_sendEmail:'enReport:sendEmail',//群发邮件/群发日志
- enReport_reportDel:'enReport:reportDel',//删除研报
- enReport_reportEdit:'enReport:reportEdit',//编辑研报
- enReport_cancelPublish:'enReport:cancelPublish',//取消发布
- enReport_exportPdf:'enReport:exportPdf',//下载pdf
- enReport_exportImg:'enReport:exportImg',//下载长图
- enReport_publish:'enReport:publish',//发布研报
- enReport_reportAdd:'enReport:reportAdd',//添加研报
- }
- /*
- --------------------------智能PPT-----------------
- PS:由于移动端中英文PPT是一个页面,特地把按钮名称设置为一致的方便处理
- 与ETA后台不同,修改时请注意
- */
- export const pptBtn={
- ppt_del:'ppt:del',
- ppt_copy:'ppt:copy',
- ppt_download:'ppt:download',
- ppt_show:'ppt:show',//演示
- ppt_publish:'ppt:publish',
- ppt_visible:'ppt:visible',//可见权限
- ppt_save:'ppt:save',//添加PPT按钮,同时也控制目录重命名权限
- ppt_setShare:'ppt:setShare',//设置共享
- }
- export const enPPTBtn={
- ppt_del:'pptEn:del',
- ppt_copy:'pptEn:copy',
- ppt_download:'pptEn:download',
- ppt_show:'pptEn:show',
- ppt_publish:'pptEn:publish',
- ppt_visible:'pptEn:visible',
- ppt_save:'pptEn:save',//添加PPT按钮,同时也控制目录重命名权限
- ppt_setShare:'pptEn:setShare',//设置共享
- }
- /*
- --------------------------ETA指标库---------------
- */
- export const edbDataBtn={
- /*-----------指标详情按钮--------- */
- edbData_refreshAll:'edbData:refreshAll',//全部刷新
- edbData_newestValue:'edbData:newestValue',//添加最新值
- edbData_enNameSetting:'edbData:enNameSetting',//设置英文名称
- edbData_edbSource:'edbData:edbSource',//指标溯源
- edbData_copyData:'edbData:copyData',//复制数据
- edbData_edit:'edbData:edit',//指标编辑,也包括列表项的编辑按钮
- edbData_update:'edbData:update',//更新指标
- edbData_saveEdb:'edbData:saveEdb',//保存
- edbData_deleteEdb:'edbData:deleteEdb',//删除
- edbData_showChartBasis:'edbData:showChartBasis',//展示/隐藏同比图
- edbData_switchSeason:'edbData:switchSeason',//切换季节性图
- edbData_editLimit:'edbData:editLimit',//编辑上下限
- edbData_calculateAgain:'edbData:calculateAgain',//重新计算
- /*------------页面按钮---------- */
- edbData_replaceEdb:'edbData:replaceEdb',//替换指标
- edbData_calcuEdb:'edbData:calcuEdb',//计算指标
- edbData_addEdb:'edbData:addEdb',//添加指标
- edbData_switchEn:'edbData:switchEn',//切换英文版
- edbData_classifyOpt_add:'edbData:classifyOpt:add',//添加/编辑分类
- edbData_classifyOpt_delete:'edbData:classifyOpt:delete',//删除分类
- edbData_classifyOpt_move:'edbData:classifyOpt:move',//移动分类
- edbData_checkRelatedChart:'edbData:checkRelatedChart',//查看关联图表
- edbData_checkRelatedEdb:'edbData:checkRelatedEdb',//查看关联指标
- edbData_checkCalcChart:'edbData:checkCalcChart',//查看计算指标
- }
- /*
- -------------------------ETA图库------------------
- */
- export const chartLibBtn={
- /*-----------图表详情按钮--------- */
- chartLib_del:'chartLib:del',//删除
- chartLib_enNameSetting:'chartLib:enNameSetting',//设置英文名称
- chartLib_copyWechat:'chartLib:copyWechat',//保存图片(两个按钮控制)
- chartLib_copyOffice:'chartLib:copyOffice',//保存图片(两个按钮控制)
- chartLib_otherSave:'chartLib:otherSave',//另存为
- chartLib_save:'chartLib:save',//保存
- chartLib_refresh:'chartLib:refresh',//刷新
- chartLib_addMy:'chartLib:addMy',//加入我的图库
- chartLib_share:'chartLib:share',//分享
- chartLib_editLimit:'chartLib:editLimit',//编辑上下限
- /*------------页面按钮---------- */
- chartLib_switchEn:'chartLib:switchEn',//切换中英文
- chartLib_isOnlyMine:'chartLib:isOnlyMine',//只看我的
- chartLib_classifyOpt_add:'chartLib:classifyOpt:add',//新增/编辑分类
- chartLib_classifyOpt_delete:'chartLib:classifyOpt:delete',//删除分类
- }
- /*
- ------------------------MyETA--------------------
- */
- export const myETABtn={
- /*-----------图表详情弹窗按钮--------- */
- 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_refresh:'myChart:refresh',
- myChart_copyTo:'myChart:copyTo',
- myChart_share:'myChart:share',
- myChart_move:'myChart:move',//移出,同时也控制列表项的移出
- myChart_copyData:'myChart:copyData',//复制数据
- myChart_checkData:'myChart:checkData',//查看数据
- myChart_editLimit:'myChart:editLimit',//编辑上下限
- /*-----------页面按钮--------- */
- myChart_selectChart:'myChart:selectChart',//选择图表
- myChart_classifyOpt_copy:'myChart:classifyOpt:copy',//复制
- myChart_classifyOpt_show:'myChart:classifyOpt:show',//可见权限
- myChart_classifyOpt_edit:'myChart:classifyOpt:edit',//添加我的分类
- myChart_classifyOpt_rename:'myChart:classifyOpt:rename',//重命名
- myChart_classifyOpt_delete:'myChart:classifyOpt:delete',//删除
- }
- export function useAuthBtn(){
- const isShowBtn = ()=>{}
- const checkAuthBtn = (buttonCode)=>{
- const list = authBtnStore.authBtnList||[]
- return list.map(item=>item.ButtonCode).includes(buttonCode)
- }
- return {
- isShowBtn,
- checkAuthBtn
- }
- }
|