buttonConfig.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. //维护 按钮列表 已加载在全局
  2. //通过 this.permissionBtn 调用
  3. import {store} from "../main";
  4. /**
  5. * 判断按钮在不在用户的权限内
  6. * @param {String} button_code
  7. * @returns Boolean
  8. */
  9. export const checkPermissionBtn = (button_code)=>{
  10. const buttonCodes = store.state.permissionButton.permissionButtons.map(item=>item.ButtonCode)
  11. return buttonCodes.includes(button_code)
  12. }
  13. /*
  14. * -----------------------------------------------------------------------------研报管理------------------------------------------------
  15. */
  16. /*
  17. *--------中文研报列表-----------
  18. */
  19. export const reportManageBtn={
  20. reportManage_sendMsg:'reportManage:sendMsg',//推送消息/已推送消息
  21. reportManage_reportView:'reportManage:reportView',//研报预览:即是否能点击研报名称跳转预览页面
  22. reportManage_reportView_wechartShare:'reportManage:reportView:wechartShare',//研报预览页面-微信分享
  23. reportManage_reportView_copyWechat:'reportManage:reportView:copyWechat',//研报预览页面-复制链接
  24. reportManage_audioDownload:'reportManage:audioDownload',//音频下载
  25. reportManage_audioUpload:'reportManage:audioUpload',//音频上传
  26. reportManage_reportDel:'reportManage:reportDel',//删除研报
  27. reportManage_reportEdit:'reportManage:reportEdit',//编辑研报
  28. reportManage_cancelPublish:'reportManage:cancelPublish',//取消发布
  29. reportManage_publish:'reportManage:publish',//发布研报
  30. reportManage_reportList:'reportManage:reportList',//研报列表的选项
  31. reportManage_reportList_uv:'reportManage:reportList:uv',//研报列表-PV/UV
  32. reportManage_reportList_sendTime:'reportManage:reportList:sendTime',//研报列表-报告推送时间
  33. reportManage_dayWeekReportAdd:'reportManage:dayWeekReportAdd',//添加晨报周报
  34. reportManage_reportAdd:'reportManage:reportAdd',//添加研报
  35. }
  36. /*
  37. *--------智能研报列表-----------
  38. */
  39. export const smartReportManageBtn={
  40. reportManage_sendMsg:'smartReportManage:sendMsg',//推送消息/已推送消息
  41. reportManage_reportView:'smartReportManage:reportView',//研报预览:即是否能点击研报名称跳转预览页面
  42. reportManage_reportView_wechartShare:'smartReportManage:reportView:wechartShare',//研报预览页面-微信分享
  43. reportManage_reportView_copyWechat:'smartReportManage:reportView:copyWechat',//研报预览页面-复制链接
  44. reportManage_reportView_exportImg:'smartReportManage:reportView:exportImg',//研报预览页面-导出图片
  45. reportManage_audioDownload:'smartReportManage:audioDownload',//音频下载
  46. reportManage_audioUpload:'smartReportManage:audioUpload',//音频上传
  47. reportManage_reportDel:'smartReportManage:reportDel',//删除研报
  48. reportManage_reportEdit:'smartReportManage:reportEdit',//编辑研报
  49. reportManage_cancelPublish:'smartReportManage:cancelPublish',//取消发布
  50. reportManage_publish:'smartReportManage:publish',//发布研报
  51. reportManage_reportList:'smartReportManage:reportList',//研报列表的选项
  52. reportManage_reportList_uv:'smartReportManage:reportList:uv',//研报列表-PV/UV
  53. reportManage_reportList_sendTime:'smartReportManage:reportList:sendTime',//研报列表-报告推送时间
  54. reportManage_reportAdd:'smartReportManage:reportAdd',//添加研报
  55. }
  56. /*
  57. *--------英文研报列表-----------
  58. */
  59. export const enReportManageBtn = {
  60. enReport_reportView:'enReport:reportView',//研报预览:即是否能点击研报名称跳转预览页面
  61. enReport_reportView_wechatShare:'enReport:reportView:wechatShare',//研报预览页面-微信分享
  62. enReport_reportView_copyWechat:'enReport:reportView:copyWechat',//研报预览页面-复制链接
  63. enReport_sendEmail:'enReport:sendEmail',//群发邮件/群发日志
  64. enReport_reportDel:'enReport:reportDel',//删除研报
  65. enReport_reportEdit:'enReport:reportEdit',//编辑研报
  66. enReport_cancelPublish:'enReport:cancelPublish',//取消发布
  67. enReport_publish:'enReport:publish',//发布研报
  68. enReport_syncPolicy:'enReport:syncPolicy',//同步策略报告
  69. enReport_reportAdd:'enReport:reportAdd',//添加研报
  70. }
  71. /*
  72. *--------中文分类-----------
  73. */
  74. export const classifyBtn={
  75. classifyList_cnClassify:'classifyList:cnClassify',//中文分类这个选项卡是否显示
  76. classifyList_cnClassify_classifyDel:'classifyList:cnClassify:classifyDel',//一二级分类删除
  77. classifyList_cnClassify_authSetting:'classifyList:cnClassify:authSetting',//二级分类权限配置
  78. classifyList_cnClassify_chapterSetting:'classifyList:cnClassify:chapterSetting',//晨周报章节设置
  79. /*---------添加编辑分类------------- */
  80. classifyList_cnClassify_classifyAdd:'classifyList:cnClassify:classifyAdd',//一二级添加编辑分类
  81. classifyList_cnClassify_relateSetting:'classifyList:cnClassify:relateSetting',//表单项:关联设置
  82. classifyList_cnClassify_miniHidden:'classifyList:cnClassify:miniHidden',//表单项:小程序隐藏
  83. classifyList_cnClassify_pcBackColor:'classifyList:cnClassify:pcBackColor',//表单项:PC端背景颜色
  84. classifyList_cnClassify_shareImgs:'classifyList:cnClassify:shareImgs',//表单项:分享链接配图
  85. classifyList_cnClassify_reportImgs:'classifyList:cnClassify:reportImgs',//表单项:报告合集配图
  86. classifyList_cnClassify_ficcIcon:'classifyList:cnClassify:ficcIcon',//表单项:FICCicon
  87. classifyList_cnClassify_ficcSort:'classifyList:cnClassify:ficcSort',//表单项:FICC页排序
  88. classifyList_cnClassify_backSort:'classifyList:cnClassify:backSort',//表单项:后台排序
  89. classifyList_cnClassify_showType:'classifyList:cnClassify:showType',//表单项:展示形式
  90. classifyList_cnClassify_childMenu:'classifyList:cnClassify:childMenu',//表单项:子目录
  91. }
  92. /*
  93. *--------英文分类----------- ETA_1.1.7 不区分英文研报和线上路演 统一使用英文研报的标识
  94. */
  95. export const enClassifyBtn = {
  96. classifyList_enClassify:'classifyList:enClassify',//英文分类这个选项卡是否展示
  97. /* -------------线上路演------------- */
  98. classifyList_enClassify_roadshow:'classifyList:enClassify:roadshow',//线上路演这个选项卡是否展示
  99. classifyList_enClassify_rsDel:'classifyList:enClassify:rsDel',//线上路演一二级分类删除
  100. classifyList_enClassify_rsAuthSetting:'classifyList:enClassify:rsAuthSetting',//线上路演二级分类权限设置
  101. classifyList_enClassify_rsEdit:'classifyList:enClassify:rsEdit',//线上路演一二级分类编辑
  102. classifyList_enClassify_rsAddClassify:'classifyList:enClassify:rsAddClassify',//线上路演添加分类按钮
  103. /* -------------英文研报------------- */
  104. classifyList_enClassify_report:'classifyList:enClassify:report',//英文研报这个选项卡是否展示
  105. classifyList_enClassify_rpDel:'classifyList:enClassify:rpDel',//英文研报一二级删除
  106. classifyList_enClassify_rpAuthSetting:'classifyList:enClassify:rpAuthSetting',//英文研报二级分类权限配置
  107. classifyList_enClassify_rpEdit:'classifyList:enClassify:rpEdit',//英文研报一二级编辑
  108. classifyList_enClassify_rpAddClassify:'classifyList:enClassify:rpAddClassify',//英文研报添加分类
  109. }
  110. /*
  111. *--------作者管理-----------
  112. */
  113. export const authorManage = {
  114. /*------------------英文研报作者管理------------ */
  115. authorManage_enReport:'authorManage:enReport',//英文研报选项卡是否展示
  116. authorManage_enReport_enable:'authorManage:enReport:enable',//英文研报作者启用/禁用
  117. authorManage_enReport_del:'authorManage:enReport:del',//英文研报作者删除
  118. authorManage_enReport_edit:'authorManage:enReport:edit',//英文研报作者编辑
  119. /*------------------中文研报作者管理------------ */
  120. authorManage_cnReport:'authorManage:cnReport',//中文研报选项卡是否展示
  121. authorManage_cnReport_enable:'authorManage:cnReport:enable',//中文研报作者启用/禁用
  122. authorManage_cnReport_del:'authorManage:cnReport:del',//中文研报作者删除
  123. authorManage_cnReport_edit:'authorManage:cnReport:edit',//中文研报作者编辑
  124. authorManage_add:'authorManage:add',//添加作者按钮
  125. }
  126. /*
  127. *--------英文品种配置-----------
  128. */
  129. export const enChartPermission = {
  130. enChartPermission_del:'enChartPermission:del',
  131. enChartPermission_save:'enChartPermission:save',
  132. }
  133. /*
  134. *--------云盘-----------
  135. */
  136. export const cloudDisk = {
  137. cloudDisk_del:'cloudDisk:del',
  138. cloudDisk_download:'cloudDisk:download',
  139. cloudDisk_rename:'cloudDisk:rename',
  140. cloudDisk_uploadFile:'cloudDisk:uploadFile',
  141. cloudDisk_newDir:'cloudDisk:newDir'
  142. }
  143. /*
  144. * -----------------------------------------------------------------------------智能PPT------------------------------------------------
  145. */
  146. /*
  147. *--------中文PPT-----------
  148. */
  149. export const pptPermission ={
  150. /*---------对PPT操作--------- */
  151. ppt_del:'ppt:del',
  152. ppt_copy:'ppt:copy',
  153. ppt_toEn:'ppt:toEn',//转英文PPT
  154. ppt_toReport:'ppt:toReport',//转报告
  155. ppt_download:'ppt:download',
  156. ppt_show:'ppt:show',//演示
  157. ppt_publish:'ppt:publish',
  158. /*--------页面按钮操作-------- */
  159. ppt_save:'ppt:save',//添加PPT按钮,同时也控制编辑权限
  160. ppt_merge:'ppt:merge',//合并PPT
  161. ppt_addCatalog:'ppt:addCatalog',//添加我的目录
  162. ppt_setShare:'ppt:setShare',//设置共享
  163. ppt_visible:'ppt:visible',//可见权限
  164. }
  165. /*
  166. *--------英文PPT----------
  167. */
  168. export const enPPTPermission={
  169. /*---------对PPT操作--------- */
  170. pptEn_del:'pptEn:del',
  171. pptEn_copy:'pptEn:copy',
  172. pptEn_toReport:'pptEn:toReport',//转报告
  173. pptEn_download:'pptEn:download',
  174. pptEn_show:'pptEn:show',//演示
  175. pptEn_publish:'pptEn:publish',
  176. /*--------页面按钮操作-------- */
  177. pptEn_save:'pptEn:save',//添加PPT按钮,同时也控制编辑权限
  178. pptEn_merge:'pptEn:merge',//合并PPT
  179. pptEn_addCatalog:'pptEn:addCatalog',
  180. pptEn_setShare:'pptEn:setShare',
  181. pptEn_visible:'pptEn:visible',
  182. }
  183. /*
  184. * ---------------------------------------------------------------------------数据源------------------------------------------------
  185. */
  186. export const dataSourcePermission = {
  187. /*--------手工指标列表---- */
  188. manualData_del:'manualData:del',
  189. manualData_add:'manualData:add',//新增编辑
  190. manualData_add_updateRemind:'manualData:add:updateRemind',//新增编辑-更新提醒
  191. /*--------手工数据录入---- */
  192. manualDataWrite_edit:'manualDataWrite:edit',//编辑按钮,直接编辑没有禁
  193. manualDataWrite_export:'manualDataWrite:export',//导出
  194. manualDataWrite_import:'manualDataWrite:import',//导入
  195. manualDataWrite_copy:'manualDataWrite:copy',//复制
  196. /*--------期货数据库没有要控制的东西---- */
  197. /*--------隆众原始数据库---- */
  198. longzhongData_export:'longzhongData:export',
  199. /*--------钢联原始数据库---- */
  200. glData_export:'glData:export',
  201. /*--------钢联化工数据库---- */
  202. mysteelData_refresh:'mysteelData:refresh',//一键刷新
  203. mysteelData_export:'mysteelData:export',
  204. mysteelData_add:'mysteelData:add',//新增指标
  205. mysteelData_classifyOpt_add:'mysteelData:classifyOpt:add',//添加目录和子项
  206. mysteelData_classifyOpt_edit:'mysteelData:classifyOpt:edit',//编辑
  207. mysteelData_classifyOpt_delete:'mysteelData:classifyOpt:delete',//删除
  208. /*--------SMM原始数据库---- */
  209. smmData_export:'smmData:export',
  210. smmData_classifyOpt_add:'smmData:classifyOpt:add',//添加目录和子项
  211. smmData_classifyOpt_edit:'smmData:classifyOpt:edit',//编辑
  212. smmData_classifyOpt_delete:'smmData:classifyOpt:delete',//删除
  213. /*--------百川盈孚---- */
  214. bcyfData_edit:'bcyfData:edit',//编辑指标按钮
  215. bcyfData_export:'bcyfData:export',
  216. bcyfData_classifyOpt_add:'bcyfData:classifyOpt:add',//添加目录和子项
  217. bcyfData_classifyOpt_edit:'bcyfData:classifyOpt:edit',//编辑
  218. bcyfData_classifyOpt_delete:'bcyfData:classifyOpt:delete',//删除
  219. /*--------卓创数据(红桃3)---- */
  220. hongtao3Data_export:'hongtao3Data:export',
  221. hongtao3Data_classifyOpt_add:'hongtao3Data:classifyOpt:add',
  222. hongtao3Data_classifyOpt_edit:'hongtao3Data:classifyOpt:edit',
  223. hongtao3Data_classifyOpt_delete:'hongtao3Data:classifyOpt:delete',
  224. /*--------中国煤炭市场网)---- */
  225. zgmtData_export:'zgmtData:export',
  226. /*--------EIA STEO报告---- */
  227. eiaData_export:'eiaData:export',
  228. /*--------国家统计局---- */
  229. gjtjjData_export:'gjtjjData:export'
  230. }
  231. /*
  232. * ---------------------------------------------------------------------------ETA指标库------------------------------------------------
  233. */
  234. export const edbDataPermission = {
  235. /*-----------指标详情按钮--------- */
  236. edbData_refreshAll:'edbData:refreshAll',//全部刷新
  237. edbData_newestValue:'edbData:newestValue',//添加最新值
  238. edbData_enNameSetting:'edbData:enNameSetting',//设置英文名称
  239. edbData_edbSource:'edbData:edbSource',//指标溯源
  240. edbData_copyData:'edbData:copyData',//复制数据
  241. /* edbData_toImgs:'edbData:toImgs',//一键成图 */
  242. edbData_edit:'edbData:edit',//指标编辑,也包括列表项的编辑按钮
  243. edbData_update:'edbData:update',//更新指标
  244. edbData_saveEdb:'edbData:saveEdb',//保存
  245. edbData_deleteEdb:'edbData:deleteEdb',//删除
  246. edbData_showChartBasis:'edbData:showChartBasis',//展示/隐藏同比图
  247. edbData_switchSeason:'edbData:switchSeason',//切换季节性图
  248. edbData_editLimit:'edbData:editLimit',//编辑上下限
  249. edbData_calculateAgain:'edbData:calculateAgain',//重新计算
  250. /*------------页面按钮---------- */
  251. edbData_batchUpdate:'edbData:batchUpdate',//一键更新
  252. edbData_dataAdjust:'edbData:dataAdjust',//数据调整
  253. edbData_codeRun:'edbData:codeRun',//代码运算
  254. edbData_replaceEdb:'edbData:replaceEdb',//替换指标
  255. edbData_calcuEdb:'edbData:calcuEdb',//计算指标
  256. edbData_addEdb:'edbData:addEdb',//添加指标
  257. edbData_switchEn:'edbData:switchEn',//切换英文版
  258. edbData_classifyOpt_add:'edbData:classifyOpt:add',//添加/编辑分类
  259. edbData_classifyOpt_delete:'edbData:classifyOpt:delete',//删除分类
  260. edbData_classifyOpt_move:'edbData:classifyOpt:move',//移动分类
  261. edbData_checkRelatedChart:'edbData:checkRelatedChart',//查看关联图表
  262. edbData_checkRelatedEdb:'edbData:checkRelatedEdb',//查看关联指标
  263. edbData_checkCalcChart:'edbData:checkCalcChart',//查看计算指标
  264. }
  265. /*
  266. * ---------------------------------------------------------------------------ETA预测指标------------------------------------------------
  267. */
  268. export const predictEdbPermission = {
  269. /*-----------指标详情按钮--------- */
  270. edbPreData_switchSeason:'edbPreData:switchSeason',//切换季节性图
  271. /* edbPreData_viewData:'edbPreData:viewData',//查看数据 */
  272. edbPreData_copyData:'edbPreData:copyData',//复制数据
  273. edbPreData_del:'edbPreData:del',//删除
  274. edbPreData_recalcu:'edbPreData:recalcu',//重新计算
  275. edbPreData_save:'edbPreData:save',//保存
  276. edbPreData_edit:'edbPreData:edit',//编辑
  277. edbPreData_update:'edbPreData:update',//更新
  278. edbPreData_edbSource:'edbPreData:edbSource',//指标溯源
  279. edbPreData_enNameSetting:'edbPreData:enNameSetting',//设置英文名称
  280. edbPreData_editLimit:'edbPreData:editLimit',//编辑上下限
  281. /*------------页面按钮---------- */
  282. edbPreData_calcuEdb:'edbPreData:calcuEdb',//计算指标
  283. edbPreData_addEdb:'edbPreData:addEdb',//添加指标
  284. edbPreData_switchEn:'edbPreData:switchEn',//切换英文版
  285. edbPreData_isOnlyMine:'edbPreData:isOnlyMine',//只看我的
  286. edbPreData_classifyOpt_add:'edbPreData:classifyOpt:add',//添加/编辑分类
  287. edbPreData_classifyOpt_delete:'edbPreData:classifyOpt:delete',//删除分类
  288. edbPreData_classifyOpt_move:'edbPreData:classifyOpt:move',//移动分类
  289. edbPreData_checkRelatedChart:'edbPreData:checkRelatedChart',//查看关联图表
  290. edbPreData_checkRelatedEdb:'edbPreData:checkRelatedEdb',//查看关联指标
  291. edbPreData_checkPreRule:'edbPreData:checkPreRule',//查看预测规则
  292. }
  293. /*
  294. * ---------------------------------------------------------------------------ETA图库------------------------------------------------
  295. */
  296. export const chartLibPermission = {
  297. /*-----------图表详情按钮--------- */
  298. chartLib_viewData:'chartLib:viewData',//查看数据,图表详情的表格操作栏
  299. chartLib_copyData:'chartLib:copyData',//复制数据,图表详情的表格操作栏
  300. chartLib_del:'chartLib:del',
  301. chartLib_enNameSetting:'chartLib:enNameSetting',
  302. chartLib_copyWechat:'chartLib:copyWechat',
  303. chartLib_copyOffice:'chartLib:copyOffice',
  304. chartLib_edit:'chartLib:edit',
  305. chartLib_otherSave:'chartLib:otherSave',
  306. chartLib_save:'chartLib:save',
  307. chartLib_refresh:'chartLib:refresh',
  308. chartLib_addMy:'chartLib:addMy',//加入我的图库
  309. chartLib_share:'chartLib:share',
  310. chartLib_editLimit:'chartLib:editLimit',//编辑上下限
  311. /*------------页面按钮---------- */
  312. chartLib_add:'chartLib:add',
  313. chartLib_switchEn:'chartLib:switchEn',
  314. chartLib_isOnlyMine:'chartLib:isOnlyMine',//只看我的
  315. chartLib_classifyOpt_add:'chartLib:classifyOpt:add',//新增/编辑分类
  316. chartLib_classifyOpt_delete:'chartLib:classifyOpt:delete',//删除分类
  317. }
  318. /*
  319. * ---------------------------------------------------------------------------My ETA------------------------------------------------
  320. */
  321. export const myETAPermission = {
  322. /*-----------图表详情弹窗按钮--------- */
  323. myChart_del:'myChart:del',
  324. myChart_enNameSetting:'myChart:enNameSetting',
  325. myChart_copyWechat:'myChart:copyWechat',
  326. myChart_copyOffice:'myChart:copyOffice',
  327. myChart_otherSave:'myChart:otherSave',
  328. myChart_save:'myChart:save',
  329. myChart_edit:'myChart:edit',
  330. myChart_refresh:'myChart:refresh',
  331. myChart_copyTo:'myChart:copyTo',
  332. myChart_share:'myChart:share',
  333. myChart_move:'myChart:move',//移出,同时也控制列表项的移出
  334. myChart_copyData:'myChart:copyData',//复制数据
  335. myChart_checkData:'myChart:checkData',//查看数据
  336. myChart_editLimit:'myChart:editLimit',//编辑上下限
  337. /*-----------页面按钮--------- */
  338. myChart_selectChart:'myChart:selectChart',//选择图表
  339. myChart_classifyOpt_copy:'myChart:classifyOpt:copy',//复制
  340. myChart_classifyOpt_show:'myChart:classifyOpt:show',//可见权限
  341. myChart_classifyOpt_edit:'myChart:classifyOpt:edit',//添加我的分类
  342. myChart_classifyOpt_rename:'myChart:classifyOpt:rename',//重命名
  343. myChart_classifyOpt_delete:'myChart:classifyOpt:delete',//删除
  344. }
  345. //图库框架
  346. export const chartFramePermission={
  347. chartframe_public_copyImg:'chartframe:public:copyImg',//公共框架-复制图片
  348. chartframe_my_editNode:'chartframe:my:editNode',//我的框架-添加/编辑节点
  349. chartframe_my_saveFrame:'chartframe:my:saveFrame',//我的框架-保存框架
  350. chartframe_my_editFrame:'chartframe:my:editFrame',//我的框架-添加/编辑框架
  351. chartframe_my_delFrame:'chartframe:my:delFrame',//我的框架-删除框架
  352. chartframe_my_show:'chartframe:my:show',//我的框架-设置可见权限
  353. chartframe_my_rename:'chartframe:my:rename',//我的框架-重命名
  354. chartframe_my_copyImg:'chartframe:my:copyImg',//我的框架-复制图片
  355. chartframe_my_move:'chartframe:my:move',//我的框架-移动排序
  356. }
  357. /*
  358. * --------------------------------------------------------------------------ETA表格------------------------------------------------
  359. */
  360. export const etaTablePermission = {
  361. /*-----------页面按钮--------- */
  362. /*-----------自定义表格--------- */
  363. /* etaTable_customize_del:'etaTable:customize:del',
  364. etaTable_customize_download:'etaTable:customize:download',
  365. etaTable_customize_otherSave:'etaTable:customize:otherSave',
  366. etaTable_customize_refresh:'etaTable:customize:refresh',
  367. etaTable_customize_edit:'etaTable:customize:edit', */
  368. //混合表格页面
  369. etaTable_customize_mix_sheetAdd: 'etaTable:customize:mix:sheetAdd',//添加混合表格按钮
  370. etaTable_customize_mix_classifyOpt_edit: 'etaTable:customize:mix:classifyOpt:edit',//混合表格分类操作
  371. etaTable_customize_mix_classifyOpt_delete: 'etaTable:customize:mix:classifyOpt:delete',//混合表格分类删除
  372. etaTable_customize_mix_edit:'etaTable:customize:mix:edit',//编辑
  373. etaTable_customize_mix_refresh:'etaTable:customize:mix:refresh',//刷新
  374. etaTable_customize_mix_otherSave:'etaTable:customize:mix:otherSave',//另存为
  375. etaTable_customize_mix_download:'etaTable:customize:mix:download',//下载
  376. etaTable_customize_mix_save:'etaTable:customize:mix:save',//保存
  377. etaTable_customize_mix_del:'etaTable:customize:mix:del',//删除
  378. //数据表格页面
  379. etaTable_customize_data_sheetAdd: 'etaTable:customize:data:sheetAdd',//添加数据表格按钮
  380. etaTable_customize_data_classifyOpt_edit: 'etaTable:customize:data:classifyOpt:edit',//数据表格分类操作
  381. etaTable_customize_data_classifyOpt_delete: 'etaTable:customize:data:classifyOpt:delete',//数据表格分类删除
  382. etaTable_customize_data_edit:'etaTable:customize:data:edit',//编辑
  383. etaTable_customize_data_refresh:'etaTable:customize:data:refresh',//刷新
  384. etaTable_customize_data_otherSave:'etaTable:customize:data:otherSave',//另存为
  385. etaTable_customize_data_download:'etaTable:customize:data:download',//下载
  386. etaTable_customize_data_del:'etaTable:customize:data:del',//删除
  387. etaTable_customize_data_save:'etaTable:customize:data:save',//保存
  388. /*-----------excel表格页面--------- */
  389. etaTable_excel:'etaTable:excel',//添加Excel表格这个按钮显示不显示
  390. etaTable_excel_classifyOpt_edit:'etaTable:excel:classifyOpt:edit',//添加编辑表格
  391. etaTable_excel_classifyOpt_delete:'etaTable:excel:classifyOpt:delete',//删除表格
  392. etaTable_excel_del:'etaTable:excel:del',
  393. etaTable_excel_download:'etaTable:excel:download',
  394. etaTable_excel_save:'etaTable:excel:save',//保存
  395. etaTable_excel_edit:'etaTable:excel:edit',
  396. //自定义分析表格页面
  397. // etaTable_analysis_sheetAdd: 'etaTable:analysis:sheetAdd',//添加数据表格按钮
  398. etaTable_analysis_classifyOpt_edit: 'etaTable:analysis:classifyOpt:edit',//数据表格分类操作
  399. etaTable_analysis_classifyOpt_delete: 'etaTable:analysis:classifyOpt:delete',//数据表格分类删除
  400. etaTable_analysis_upload:'etaTable:analysis:upload',//上传文件
  401. etaTable_analysis_createedb:'etaTable:analysis:createedb',//生成指标
  402. etaTable_analysis_refresh:'etaTable:analysis:refresh',//刷新
  403. etaTable_analysis_otherSave:'etaTable:analysis:otherSave',//另存为
  404. etaTable_analysis_download:'etaTable:analysis:download',//下载
  405. etaTable_analysis_del:'etaTable:analysis:del',//删除
  406. etaTable_analysis_save:'etaTable:analysis:save',//保存
  407. etaTable_analysis_edit:'etaTable:analysis:edit',//编辑
  408. }
  409. /*
  410. * --------------------------------------------------------------------------ETA逻辑------------------------------------------------
  411. */
  412. export const sandboxPermission = {
  413. sandbox_variety:'sandbox:variety',//沙盘品种选择,控制筛选项和列表项
  414. sandbox_addMy:'sandbox:addMy',//复制图片
  415. sandbox_del:'sandbox:del',//删除
  416. sandbox_saveView:'sandbox:saveView',//添加/编辑/查看
  417. }
  418. /*
  419. * --------------------------------------------------------------------------语义分析------------------------------------------------
  420. */
  421. export const semanticPermission = {
  422. /*-----------文档管理--------- */
  423. docPage_save:'docPage:save',//添加编辑文档
  424. docPage_delete:'docPage:delete',//删除文档
  425. docPage_classifyOpt_edit:'docPage:classifyOpt:edit',//添加编辑分类
  426. docPage_classifyOpt_delete:'docPage:classifyOpt:delete',//删除分类
  427. /*-----------文档对比--------- */
  428. saPage_save:'saPage:save',//添加编辑对比文档
  429. saPage_download:'saPage:download',//下载
  430. saPage_copyOffice:'saPage:copyOffice',//复制到Office
  431. saPage_copyWeixin:'saPage:copyWeixin',//复制到微信
  432. saPage_delete:'saPage:delete',//删除对比文档
  433. saPage_classifyOpt_edit:'saPage:classifyOpt:edit',//添加编辑分类
  434. saPage_classifyOpt_delete:'saPage:classifyOpt:delete',//删除分类
  435. /*-----------标签管理--------- */
  436. tagPage_del:'tagPage:del',
  437. tagPage_save:'tagPage:save',//添加编辑标签
  438. }
  439. /*
  440. * --------------------------------------------------------------------------统计分析------------------------------------------------
  441. */
  442. export const statisticPermission = {
  443. /*-----------相关性分析--------- */
  444. corrAnalysis_addChart:'corrAnalysis:addChart',//添加图表按钮
  445. corrAnalysis_viewData:'corrAnalysis:viewData',//查看表格数据
  446. corrAnalysis_copyData:'corrAnalysis:copyData',//复制表格数据
  447. corrAnalysis_onlyMine:'corrAnalysis:onlyMine',//只看我的
  448. corrAnalysis_classifyOpt_edit:'corrAnalysis:classifyOpt:edit',//添加/编辑分类
  449. corrAnalysis_classifyOpt_delete:'corrAnalysis:classifyOpt:delete',//删除分类
  450. /*---图表操作栏--- */
  451. corrAnalysis_del:'corrAnalysis:del',
  452. corrAnalysis_enNameSetting:'corrAnalysis:enNameSetting',
  453. corrAnalysis_copyWechat:'corrAnalysis:copyWechat',
  454. corrAnalysis_copyOffice:'corrAnalysis:copyOffice',
  455. corrAnalysis_edit:'corrAnalysis:edit',
  456. corrAnalysis_otherSave:'corrAnalysis:otherSave',
  457. corrAnalysis_refresh:'corrAnalysis:refresh',
  458. corrAnalysis_addMyChart:'corrAnalysis:addMyChart',
  459. corrAnalysis_share:'corrAnalysis:share',
  460. /*-----------统计特征--------- */
  461. statisticFeature_addChart:'statisticFeature:addChart',//添加图表按钮
  462. statisticFeature_onlyMine:'statisticFeature:onlyMine',//只看我的
  463. statisticFeature_classifyOpt_edit:'statisticFeature:classifyOpt:edit',//添加/编辑分类
  464. statisticFeature_classifyOpt_delete:'statisticFeature:classifyOpt:delete',//删除分类
  465. /*---图表操作栏--- */
  466. statisticFeature_del:'statisticFeature:del',
  467. statisticFeature_enNameSetting:'statisticFeature:enNameSetting',
  468. statisticFeature_copyWechat:'statisticFeature:copyWechat',
  469. statisticFeature_copyOffice:'statisticFeature:copyOffice',
  470. statisticFeature_edit:'statisticFeature:edit',
  471. statisticFeature_otherSave:'statisticFeature:otherSave',
  472. statisticFeature_refresh:'statisticFeature:refresh',
  473. statisticFeature_addMyChart:'statisticFeature:addMyChart',
  474. statisticFeature_share:'statisticFeature:share',
  475. /*-----------拟合方程曲线--------- */
  476. fittingEq_addChart:'fittingEq:addChart',//添加图表按钮
  477. fittingEq_onlyMine:'fittingEq:onlyMine',//只看我的
  478. fittingEq_classifyOpt_edit:'fittingEq:classifyOpt:edit',//添加编辑分类
  479. fittingEq_classifyOpt_delete:'fittingEq:classifyOpt:delete',//删除分类
  480. /*---图表操作栏--- */
  481. fittingEq_del:'fittingEq:del',
  482. fittingEq_enNameSetting:'fittingEq:enNameSetting',
  483. fittingEq_copyWechat:'fittingEq:copyWechat',
  484. fittingEq_copyOffice:'fittingEq:copyOffice',
  485. fittingEq_edit:'fittingEq:edit',
  486. fittingEq_otherSave:'fittingEq:otherSave',
  487. fittingEq_refresh:'fittingEq:refresh',
  488. fittingEq_addMyChart:'fittingEq:addMyChart',
  489. fittingEq_share:'fittingEq:share',
  490. }
  491. /*
  492. * --------------------------------------------------------------------------供应分析------------------------------------------------
  493. */
  494. export const stockPlantPermission = {
  495. stockPlant_del:'stockPlant:del',
  496. stockPlant_anlysisView:'stockPlant:anlysisView',//分析和查看,包括点击品种名称跳转详情
  497. stockPlant_saveVariety:'stockPlant:saveVariety',//添加编辑
  498. }
  499. /*
  500. * --------------------------------------------------------------------------商品价格曲线------------------------------------------------
  501. */
  502. export const productPricePermission = {
  503. /*-----------页面按钮--------- */
  504. goodsPrice_incomeLine:'goodsPrice:incomeLine',//添加利润曲线
  505. goodsPrice_priceLine:'goodsPrice:priceLine',//添加价格曲线
  506. goodsPrice_classifyOpt_edit:'goodsPrice:classifyOpt:edit',//添加/编辑分类
  507. goodsPrice_classifyOpt_delete:'goodsPrice:classifyOpt:delete',//删除分类
  508. goodsPrice_onlyMine:'goodsPrice:onlyMine',//只看我的
  509. goodsPrice_editLimit:'goodsPrice:editLimit',//编辑上下限
  510. /* 利润曲线 */
  511. goodsPrice_incomeLine_del:'goodsPrice:incomeLine:del',
  512. goodsPrice_incomeLine_enNameSetting:'goodsPrice:incomeLine:enNameSetting',
  513. goodsPrice_incomeLine_copyWechat:'goodsPrice:incomeLine:copyWechat',
  514. goodsPrice_incomeLine_copyOffice:'goodsPrice:incomeLine:copyOffice',
  515. goodsPrice_incomeLine_edit:'goodsPrice:incomeLine:edit',
  516. goodsPrice_incomeLine_otherSave:'goodsPrice:incomeLine:otherSave',
  517. goodsPrice_incomeLine_refresh:'goodsPrice:incomeLine:refresh',
  518. goodsPrice_incomeLine_addMyChart:'goodsPrice:incomeLine:addMyChart',
  519. goodsPrice_incomeLine_share:'goodsPrice:incomeLine:share',
  520. /* 价格曲线 */
  521. goodsPrice_priceLine_del:'goodsPrice:priceLine:del',
  522. goodsPrice_priceLine_enNameSetting:'goodsPrice:priceLine:enNameSetting',
  523. goodsPrice_priceLine_copyWechat:'goodsPrice:priceLine:copyWechat',
  524. goodsPrice_priceLine_copyOffice:'goodsPrice:priceLine:copyOffice',
  525. goodsPrice_priceLine_edit:'goodsPrice:priceLine:edit',
  526. goodsPrice_priceLine_otherSave:'goodsPrice:priceLine:otherSave',
  527. goodsPrice_priceLine_refresh:'goodsPrice:priceLine:refresh',
  528. goodsPrice_priceLine_addMyChart:'goodsPrice:priceLine:addMyChart',
  529. goodsPrice_priceLine_share:'goodsPrice:priceLine:share',
  530. }
  531. /*
  532. * --------------------------------------------------------------------------系统设置------------------------------------------------
  533. */
  534. export const sysDepartPermission = {
  535. /*-----------部门管理-------- */
  536. sysDepart_saveUser:'sysDepart:saveUser',//添加/编辑用户按钮
  537. sysDepart_resetPass:'sysDepart:resetPass',//重置密码
  538. sysDepart_moveGroup:'sysDepart:moveGroup',//移动分组
  539. sysDepart_enable:'sysDepart:enable',//启用禁用
  540. sysDepart_del:'sysDepart:del',//用户删除
  541. sysDepart_saveUser_researchGroup:'sysDepart:saveUser:researchGroup',//添加/编辑用户表单中,研究方向的按钮
  542. sysDepart_saveUser_LabelVal:'sysDepart:saveUser:LabelVal',//姓名角色的标签
  543. sysDepart_classifyOpt_edit:'sysDepart:classifyOpt:edit',//添加/编辑部门
  544. sysDepart_classifyOpt_delete:'sysDepart:classifyOpt:delete',//删除部门
  545. /*-----------角色管理-------- */
  546. sysRole_del:'sysRole:del',//删除角色
  547. sysRole_settingAuth:'sysRole:settingAuth',//设置/查看权限
  548. sysRole_addRole:'sysRole:addRole',//添加角色
  549. /*-----------英文权限配置-------- */
  550. enAuthManage_del:'enAuthManage:del',
  551. enAuthManage_settingAuth:'enAuthManage:settingAuth'
  552. }
  553. /*-----------数据操作权限-------- */
  554. export const operateAuthPermission = {
  555. /*---------图库-------- */
  556. operateAuth_chartLib:'operateAuth:chartLib',//图库tab
  557. operateAuth_chartLib_edit:'operateAuth:chartLib:edit',//图库的编辑,批量编辑按钮
  558. /*---------ETA预测指标库-------- */
  559. operateAuth_etaPredictLib:'operateAuth:etaPredictLib',
  560. operateAuth_etaPredictLib_authSetting:'operateAuth:etaPredictLib:authSetting',//权限设置/批量权限设置
  561. operateAuth_etaPredictLib_edit:'operateAuth:etaPredictLib:edit',
  562. /*---------ETA指标库-------- */
  563. operateAuth_etaLib:'operateAuth:etaLib',
  564. operateAuth_etaLib_authSetting:'operateAuth:etaLib:authSetting',
  565. operateAuth_etaLib_edit:'operateAuth:etaLib:edit',
  566. /*---------钢联化工数据库-------- */
  567. operateAuth_mysteel:'operateAuth:mysteel',
  568. operateAuth_mysteel_edit:'operateAuth:mysteel:edit',
  569. /*---------手工数据指标-------- */
  570. operateAuth_manual:'operateAuth:manual',
  571. operateAuth_manual_edit:'operateAuth:manual:edit',
  572. /*---------手工数据权限-------- */
  573. sysdataAuth_classify:'sysdataAuth:classify',//手工指标分类
  574. }
  575. /*-----------基本配置-------- */
  576. export const baseConfigPermission = {
  577. /*-------其他设置------- */
  578. sysJump_updateLog:'sysJump:updateLog',//更新日志
  579. sysJump_helpDoc:'sysJump:helpDoc',//帮助文档,如果两个都没权限,就隐藏按钮
  580. sysJump_crm:'sysJump:crm',//跳转CRM的按钮
  581. sysJump_hr:'sysJump:hr',//跳转HR系统的按钮
  582. sysJump_finance:'sysJump:finance',//跳转财务系统的按钮
  583. /*-------基本配置表格---*/
  584. etaBaseConfig_xunfei:'etaBaseConfig:xunfei',
  585. etaBaseConfig_pptEn:'etaBaseConfig:pptEn',
  586. etaBaseConfig_ppt:'etaBaseConfig:ppt',
  587. etaBaseConfig_watermark:'etaBaseConfig:watermark',
  588. etaBaseConfig_watermark_ybChart:'etaBaseConfig:watermark:ybChart',//如果没权限,表单不显示也不校验
  589. }
  590. /*-----------外部链接配置-------- */
  591. export const outlinkConfigPermission = {
  592. outlinkListConfig_list:'outlinkListConfig:list',//查看列表
  593. outlinkListConfig_add:'outlinkListConfig:add',//添加
  594. outlinkListConfig_edit:'outlinkListConfig:edit',//编辑
  595. outlinkListConfig_del:'outlinkListConfig:del',//删除
  596. }
  597. //创建了新的ManageBtn记得添加到这里
  598. const btnMap = {
  599. reportManageBtn,enReportManageBtn,
  600. classifyBtn,enClassifyBtn,authorManage,
  601. enChartPermission,cloudDisk,
  602. pptPermission,enPPTPermission,
  603. dataSourcePermission,
  604. edbDataPermission,predictEdbPermission,chartLibPermission,
  605. myETAPermission,chartFramePermission,etaTablePermission,
  606. sandboxPermission,semanticPermission,
  607. statisticPermission,stockPlantPermission,
  608. productPricePermission,sysDepartPermission,
  609. operateAuthPermission,baseConfigPermission,
  610. outlinkConfigPermission
  611. }
  612. /**
  613. *自定义指令使用示例:
  614. * <el-checkbox v-model="isOnlyMe"
  615. * v-permission="permissionBtn.chartLibPermission.chartLib_isOnlyMine"
  616. * >只看我的</el-checkbox>
  617. */
  618. /**
  619. * 函数使用示例:
  620. * <span v-if="data.Button.OpButton
  621. * &&permissionBtn.isShowBtn('chartLibPermission','chartLib_add')">
  622. * </span>
  623. * <el-input
  624. * :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib:editLimit')"
  625. * v-model="tableData[leftIndex].MaxData"/>
  626. * computed:{
  627. * //是否显示公共图库的下拉按钮
  628. isShowDropPublic(){
  629. return this.permissionBtn.isShowBtn('myETAPermission','myChart_classifyOpt_copy')
  630. },
  631. * }
  632. */
  633. /**
  634. * 根据权限判断按钮是否展示
  635. * 适用于dom本身就有v-if/show条件限制的情况,可以防止自定义指令冲突
  636. * 适用于限制表单,组件disabled的情况
  637. * @param {String} btnMapName 按钮所属的模块名
  638. * @param {String} btnKey 按钮对应的key
  639. * @returns Boolean
  640. */
  641. export const isShowBtn = (btnMapName,btnKey)=>{
  642. return btnMap[btnMapName]&&checkPermissionBtn(btnMap[btnMapName][btnKey])
  643. }
  644. /* export const getBtnCode = (btnMapName,btnKey)=>{
  645. return (btnMap[btnMapName]&&btnMap[btnMapName][btnKey])||''
  646. } */