buttonConfig.js 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  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_exportImg:'smartReportManage: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. dataSource_account_add:'dataSourceAccount:add',//新增终端账号
  233. dataSource_account_edit:'dataSourceAccount:edit',//编辑
  234. dataSource_account_enable:'dataSourceAccount:enable',//禁用/启用
  235. }
  236. /*
  237. * ---------------------------------------------------------------------------ETA指标库------------------------------------------------
  238. */
  239. export const edbDataPermission = {
  240. /*-----------指标详情按钮--------- */
  241. edbData_refreshAll:'edbData:refreshAll',//全部刷新
  242. edbData_newestValue:'edbData:newestValue',//添加最新值
  243. edbData_enNameSetting:'edbData:enNameSetting',//设置英文名称
  244. edbData_edbSource:'edbData:edbSource',//指标溯源
  245. edbData_copyData:'edbData:copyData',//复制数据
  246. /* edbData_toImgs:'edbData:toImgs',//一键成图 */
  247. edbData_edit:'edbData:edit',//指标编辑,也包括列表项的编辑按钮
  248. edbData_update:'edbData:update',//更新指标
  249. edbData_saveEdb:'edbData:saveEdb',//保存
  250. edbData_deleteEdb:'edbData:deleteEdb',//删除
  251. edbData_showChartBasis:'edbData:showChartBasis',//展示/隐藏同比图
  252. edbData_switchSeason:'edbData:switchSeason',//切换季节性图
  253. edbData_editLimit:'edbData:editLimit',//编辑上下限
  254. edbData_calculateAgain:'edbData:calculateAgain',//重新计算
  255. /*------------页面按钮---------- */
  256. edbData_batchUpdate:'edbData:batchUpdate',//一键更新
  257. edbData_dataAdjust:'edbData:dataAdjust',//数据调整
  258. edbData_codeRun:'edbData:codeRun',//代码运算
  259. edbData_replaceEdb:'edbData:replaceEdb',//替换指标
  260. edbData_calcuEdb:'edbData:calcuEdb',//计算指标
  261. edbData_addEdb:'edbData:addEdb',//添加指标
  262. edbData_switchEn:'edbData:switchEn',//切换英文版
  263. edbData_classifyOpt_add:'edbData:classifyOpt:add',//添加/编辑分类
  264. edbData_classifyOpt_delete:'edbData:classifyOpt:delete',//删除分类
  265. edbData_classifyOpt_move:'edbData:classifyOpt:move',//移动分类
  266. edbData_checkRelatedChart:'edbData:checkRelatedChart',//查看关联图表
  267. edbData_checkRelatedEdb:'edbData:checkRelatedEdb',//查看关联指标
  268. edbData_checkCalcChart:'edbData:checkCalcChart',//查看计算指标
  269. }
  270. /*
  271. * ---------------------------------------------------------------------------ETA预测指标------------------------------------------------
  272. */
  273. export const predictEdbPermission = {
  274. /*-----------指标详情按钮--------- */
  275. edbPreData_switchSeason:'edbPreData:switchSeason',//切换季节性图
  276. /* edbPreData_viewData:'edbPreData:viewData',//查看数据 */
  277. edbPreData_copyData:'edbPreData:copyData',//复制数据
  278. edbPreData_del:'edbPreData:del',//删除
  279. edbPreData_recalcu:'edbPreData:recalcu',//重新计算
  280. edbPreData_save:'edbPreData:save',//保存
  281. edbPreData_edit:'edbPreData:edit',//编辑
  282. edbPreData_update:'edbPreData:update',//更新
  283. edbPreData_edbSource:'edbPreData:edbSource',//指标溯源
  284. edbPreData_enNameSetting:'edbPreData:enNameSetting',//设置英文名称
  285. edbPreData_editLimit:'edbPreData:editLimit',//编辑上下限
  286. /*------------页面按钮---------- */
  287. edbPreData_calcuEdb:'edbPreData:calcuEdb',//计算指标
  288. edbPreData_addEdb:'edbPreData:addEdb',//添加指标
  289. edbPreData_switchEn:'edbPreData:switchEn',//切换英文版
  290. edbPreData_isOnlyMine:'edbPreData:isOnlyMine',//只看我的
  291. edbPreData_classifyOpt_add:'edbPreData:classifyOpt:add',//添加/编辑分类
  292. edbPreData_classifyOpt_delete:'edbPreData:classifyOpt:delete',//删除分类
  293. edbPreData_classifyOpt_move:'edbPreData:classifyOpt:move',//移动分类
  294. edbPreData_checkRelatedChart:'edbPreData:checkRelatedChart',//查看关联图表
  295. edbPreData_checkRelatedEdb:'edbPreData:checkRelatedEdb',//查看关联指标
  296. edbPreData_checkPreRule:'edbPreData:checkPreRule',//查看预测规则
  297. }
  298. /*
  299. * ---------------------------------------------------------------------------ETA图库------------------------------------------------
  300. */
  301. export const chartLibPermission = {
  302. /*-----------图表详情按钮--------- */
  303. chartLib_viewData:'chartLib:viewData',//查看数据,图表详情的表格操作栏
  304. chartLib_copyData:'chartLib:copyData',//复制数据,图表详情的表格操作栏
  305. chartLib_del:'chartLib:del',
  306. chartLib_enNameSetting:'chartLib:enNameSetting',
  307. chartLib_copyWechat:'chartLib:copyWechat',
  308. chartLib_copyOffice:'chartLib:copyOffice',
  309. chartLib_edit:'chartLib:edit',
  310. chartLib_otherSave:'chartLib:otherSave',
  311. chartLib_save:'chartLib:save',
  312. chartLib_refresh:'chartLib:refresh',
  313. chartLib_addMy:'chartLib:addMy',//加入我的图库
  314. chartLib_share:'chartLib:share',
  315. chartLib_editLimit:'chartLib:editLimit',//编辑上下限
  316. /*------------页面按钮---------- */
  317. chartLib_add:'chartLib:add',
  318. chartLib_switchEn:'chartLib:switchEn',
  319. chartLib_isOnlyMine:'chartLib:isOnlyMine',//只看我的
  320. chartLib_classifyOpt_add:'chartLib:classifyOpt:add',//新增/编辑分类
  321. chartLib_classifyOpt_delete:'chartLib:classifyOpt:delete',//删除分类
  322. }
  323. /*
  324. * ---------------------------------------------------------------------------My ETA------------------------------------------------
  325. */
  326. export const myETAPermission = {
  327. /*-----------图表详情弹窗按钮--------- */
  328. myChart_del:'myChart:del',
  329. myChart_enNameSetting:'myChart:enNameSetting',
  330. myChart_copyWechat:'myChart:copyWechat',
  331. myChart_copyOffice:'myChart:copyOffice',
  332. myChart_otherSave:'myChart:otherSave',
  333. myChart_save:'myChart:save',
  334. myChart_edit:'myChart:edit',
  335. myChart_refresh:'myChart:refresh',
  336. myChart_copyTo:'myChart:copyTo',
  337. myChart_share:'myChart:share',
  338. myChart_move:'myChart:move',//移出,同时也控制列表项的移出
  339. myChart_copyData:'myChart:copyData',//复制数据
  340. myChart_checkData:'myChart:checkData',//查看数据
  341. myChart_editLimit:'myChart:editLimit',//编辑上下限
  342. /*-----------页面按钮--------- */
  343. myChart_selectChart:'myChart:selectChart',//选择图表
  344. myChart_classifyOpt_copy:'myChart:classifyOpt:copy',//复制
  345. myChart_classifyOpt_show:'myChart:classifyOpt:show',//可见权限
  346. myChart_classifyOpt_edit:'myChart:classifyOpt:edit',//添加我的分类
  347. myChart_classifyOpt_rename:'myChart:classifyOpt:rename',//重命名
  348. myChart_classifyOpt_delete:'myChart:classifyOpt:delete',//删除
  349. }
  350. //图库框架
  351. export const chartFramePermission={
  352. chartframe_public_copyImg:'chartframe:public:copyImg',//公共框架-复制图片
  353. chartframe_my_editNode:'chartframe:my:editNode',//我的框架-添加/编辑节点
  354. chartframe_my_saveFrame:'chartframe:my:saveFrame',//我的框架-保存框架
  355. chartframe_my_editFrame:'chartframe:my:editFrame',//我的框架-添加/编辑框架
  356. chartframe_my_delFrame:'chartframe:my:delFrame',//我的框架-删除框架
  357. chartframe_my_show:'chartframe:my:show',//我的框架-设置可见权限
  358. chartframe_my_rename:'chartframe:my:rename',//我的框架-重命名
  359. chartframe_my_copyImg:'chartframe:my:copyImg',//我的框架-复制图片
  360. chartframe_my_move:'chartframe:my:move',//我的框架-移动排序
  361. }
  362. /*
  363. * --------------------------------------------------------------------------ETA表格------------------------------------------------
  364. */
  365. export const etaTablePermission = {
  366. /*-----------页面按钮--------- */
  367. /*-----------自定义表格--------- */
  368. /* etaTable_customize_del:'etaTable:customize:del',
  369. etaTable_customize_download:'etaTable:customize:download',
  370. etaTable_customize_otherSave:'etaTable:customize:otherSave',
  371. etaTable_customize_refresh:'etaTable:customize:refresh',
  372. etaTable_customize_edit:'etaTable:customize:edit', */
  373. //混合表格页面
  374. etaTable_customize_mix_sheetAdd: 'etaTable:customize:mix:sheetAdd',//添加混合表格按钮
  375. etaTable_customize_mix_classifyOpt_edit: 'etaTable:customize:mix:classifyOpt:edit',//混合表格分类操作
  376. etaTable_customize_mix_classifyOpt_delete: 'etaTable:customize:mix:classifyOpt:delete',//混合表格分类删除
  377. etaTable_customize_mix_edit:'etaTable:customize:mix:edit',//编辑
  378. etaTable_customize_mix_refresh:'etaTable:customize:mix:refresh',//刷新
  379. etaTable_customize_mix_otherSave:'etaTable:customize:mix:otherSave',//另存为
  380. etaTable_customize_mix_download:'etaTable:customize:mix:download',//下载
  381. etaTable_customize_mix_save:'etaTable:customize:mix:save',//保存
  382. etaTable_customize_mix_del:'etaTable:customize:mix:del',//删除
  383. //数据表格页面
  384. etaTable_customize_data_sheetAdd: 'etaTable:customize:data:sheetAdd',//添加数据表格按钮
  385. etaTable_customize_data_classifyOpt_edit: 'etaTable:customize:data:classifyOpt:edit',//数据表格分类操作
  386. etaTable_customize_data_classifyOpt_delete: 'etaTable:customize:data:classifyOpt:delete',//数据表格分类删除
  387. etaTable_customize_data_edit:'etaTable:customize:data:edit',//编辑
  388. etaTable_customize_data_refresh:'etaTable:customize:data:refresh',//刷新
  389. etaTable_customize_data_otherSave:'etaTable:customize:data:otherSave',//另存为
  390. etaTable_customize_data_download:'etaTable:customize:data:download',//下载
  391. etaTable_customize_data_del:'etaTable:customize:data:del',//删除
  392. etaTable_customize_data_save:'etaTable:customize:data:save',//保存
  393. /*-----------excel表格页面--------- */
  394. etaTable_excel:'etaTable:excel',//添加Excel表格这个按钮显示不显示
  395. etaTable_excel_classifyOpt_edit:'etaTable:excel:classifyOpt:edit',//添加编辑表格
  396. etaTable_excel_classifyOpt_delete:'etaTable:excel:classifyOpt:delete',//删除表格
  397. etaTable_excel_del:'etaTable:excel:del',
  398. etaTable_excel_download:'etaTable:excel:download',
  399. etaTable_excel_save:'etaTable:excel:save',//保存
  400. etaTable_excel_edit:'etaTable:excel:edit',
  401. //自定义分析表格页面
  402. // etaTable_analysis_sheetAdd: 'etaTable:analysis:sheetAdd',//添加数据表格按钮
  403. etaTable_analysis_classifyOpt_edit: 'etaTable:analysis:classifyOpt:edit',//数据表格分类操作
  404. etaTable_analysis_classifyOpt_delete: 'etaTable:analysis:classifyOpt:delete',//数据表格分类删除
  405. etaTable_analysis_upload:'etaTable:analysis:upload',//上传文件
  406. etaTable_analysis_createedb:'etaTable:analysis:createedb',//生成指标
  407. etaTable_analysis_refresh:'etaTable:analysis:refresh',//刷新
  408. etaTable_analysis_otherSave:'etaTable:analysis:otherSave',//另存为
  409. etaTable_analysis_download:'etaTable:analysis:download',//下载
  410. etaTable_analysis_del:'etaTable:analysis:del',//删除
  411. etaTable_analysis_save:'etaTable:analysis:save',//保存
  412. etaTable_analysis_edit:'etaTable:analysis:edit',//编辑
  413. }
  414. /*
  415. * --------------------------------------------------------------------------ETA逻辑------------------------------------------------
  416. */
  417. export const sandboxPermission = {
  418. sandbox_variety:'sandbox:variety',//沙盘品种选择,添加目录的时候控制显示
  419. sandbox_addMy:'sandbox:addMy',//复制图片
  420. sandbox_del:'sandbox:del',//删除
  421. sandbox_saveView:'sandbox:saveView',//添加/编辑/查看
  422. sandbox_search:'sandbox:search',//搜索
  423. sandbox_classify_move:'sandbox:classify:move',//分类操作:移动
  424. sandbox_classify_del:'sandbox:classify:del',//分类操作:删除
  425. sandbox_classify_addEdit:'sandbox:classify:addEdit',//分类操作:添加/编辑
  426. }
  427. /*
  428. * --------------------------------------------------------------------------语义分析------------------------------------------------
  429. */
  430. export const semanticPermission = {
  431. /*-----------文档管理--------- */
  432. docPage_save:'docPage:save',//添加编辑文档
  433. docPage_delete:'docPage:delete',//删除文档
  434. docPage_classifyOpt_edit:'docPage:classifyOpt:edit',//添加编辑分类
  435. docPage_classifyOpt_delete:'docPage:classifyOpt:delete',//删除分类
  436. /*-----------文档对比--------- */
  437. saPage_save:'saPage:save',//添加编辑对比文档
  438. saPage_download:'saPage:download',//下载
  439. saPage_copyOffice:'saPage:copyOffice',//复制到Office
  440. saPage_copyWeixin:'saPage:copyWeixin',//复制到微信
  441. saPage_delete:'saPage:delete',//删除对比文档
  442. saPage_classifyOpt_edit:'saPage:classifyOpt:edit',//添加编辑分类
  443. saPage_classifyOpt_delete:'saPage:classifyOpt:delete',//删除分类
  444. /*-----------标签管理--------- */
  445. tagPage_del:'tagPage:del',
  446. tagPage_save:'tagPage:save',//添加编辑标签
  447. }
  448. /*
  449. * --------------------------------------------------------------------------统计分析------------------------------------------------
  450. */
  451. export const statisticPermission = {
  452. /*-----------相关性分析--------- */
  453. corrAnalysis_addChart:'corrAnalysis:addChart',//添加图表按钮
  454. corrAnalysis_viewData:'corrAnalysis:viewData',//查看表格数据
  455. corrAnalysis_copyData:'corrAnalysis:copyData',//复制表格数据
  456. corrAnalysis_onlyMine:'corrAnalysis:onlyMine',//只看我的
  457. corrAnalysis_classifyOpt_edit:'corrAnalysis:classifyOpt:edit',//添加/编辑分类
  458. corrAnalysis_classifyOpt_delete:'corrAnalysis:classifyOpt:delete',//删除分类
  459. /*---图表操作栏--- */
  460. corrAnalysis_del:'corrAnalysis:del',
  461. corrAnalysis_enNameSetting:'corrAnalysis:enNameSetting',
  462. corrAnalysis_copyWechat:'corrAnalysis:copyWechat',
  463. corrAnalysis_copyOffice:'corrAnalysis:copyOffice',
  464. corrAnalysis_edit:'corrAnalysis:edit',
  465. corrAnalysis_otherSave:'corrAnalysis:otherSave',
  466. corrAnalysis_refresh:'corrAnalysis:refresh',
  467. corrAnalysis_addMyChart:'corrAnalysis:addMyChart',
  468. corrAnalysis_share:'corrAnalysis:share',
  469. /*-----------统计特征--------- */
  470. statisticFeature_addChart:'statisticFeature:addChart',//添加图表按钮
  471. statisticFeature_onlyMine:'statisticFeature:onlyMine',//只看我的
  472. statisticFeature_classifyOpt_edit:'statisticFeature:classifyOpt:edit',//添加/编辑分类
  473. statisticFeature_classifyOpt_delete:'statisticFeature:classifyOpt:delete',//删除分类
  474. /*---图表操作栏--- */
  475. statisticFeature_del:'statisticFeature:del',
  476. statisticFeature_enNameSetting:'statisticFeature:enNameSetting',
  477. statisticFeature_copyWechat:'statisticFeature:copyWechat',
  478. statisticFeature_copyOffice:'statisticFeature:copyOffice',
  479. statisticFeature_edit:'statisticFeature:edit',
  480. statisticFeature_otherSave:'statisticFeature:otherSave',
  481. statisticFeature_refresh:'statisticFeature:refresh',
  482. statisticFeature_addMyChart:'statisticFeature:addMyChart',
  483. statisticFeature_share:'statisticFeature:share',
  484. /*-----------拟合方程曲线--------- */
  485. fittingEq_addChart:'fittingEq:addChart',//添加图表按钮
  486. fittingEq_onlyMine:'fittingEq:onlyMine',//只看我的
  487. fittingEq_classifyOpt_edit:'fittingEq:classifyOpt:edit',//添加编辑分类
  488. fittingEq_classifyOpt_delete:'fittingEq:classifyOpt:delete',//删除分类
  489. /*---图表操作栏--- */
  490. fittingEq_del:'fittingEq:del',
  491. fittingEq_enNameSetting:'fittingEq:enNameSetting',
  492. fittingEq_copyWechat:'fittingEq:copyWechat',
  493. fittingEq_copyOffice:'fittingEq:copyOffice',
  494. fittingEq_edit:'fittingEq:edit',
  495. fittingEq_otherSave:'fittingEq:otherSave',
  496. fittingEq_refresh:'fittingEq:refresh',
  497. fittingEq_addMyChart:'fittingEq:addMyChart',
  498. fittingEq_share:'fittingEq:share',
  499. /* 跨品种分析 */
  500. crossVariety_addChart:'crossVariety:addChart',//添加图表按钮
  501. crossVariety_onlyMine:'crossVariety:onlyMine',//只看我的
  502. crossVariety_classifyOpt_edit:'crossVariety:classifyOpt:edit',//添加编辑分类
  503. crossVariety_classifyOpt_delete:'crossVariety:classifyOpt:delete',//删除分类
  504. crossVariety_variety_edit: 'crossVariety:variety:edit',//品种管理
  505. crossVariety_tag_edit: 'crossVariety:tag:edit',//标签管理
  506. /*---图表操作栏--- */
  507. crossVariety_del:'crossVariety:del',
  508. crossVariety_enNameSetting:'crossVariety:enNameSetting',
  509. crossVariety_copyWechat:'crossVariety:copyWechat',
  510. crossVariety_copyOffice:'crossVariety:copyOffice',
  511. crossVariety_edit:'crossVariety:edit',
  512. crossVariety_otherSave:'crossVariety:otherSave',
  513. crossVariety_refresh:'crossVariety:refresh',
  514. crossVariety_addMyChart:'crossVariety:addMyChart',
  515. crossVariety_share:'crossVariety:share',
  516. }
  517. /*
  518. * --------------------------------------------------------------------------供应分析------------------------------------------------
  519. */
  520. export const stockPlantPermission = {
  521. stockPlant_del:'stockPlant:del',
  522. stockPlant_anlysisView:'stockPlant:anlysisView',//分析和查看,包括点击品种名称跳转详情
  523. stockPlant_saveVariety:'stockPlant:saveVariety',//添加编辑
  524. }
  525. /*
  526. * --------------------------------------------------------------------------商品价格曲线------------------------------------------------
  527. */
  528. export const productPricePermission = {
  529. /*-----------页面按钮--------- */
  530. goodsPrice_incomeLine:'goodsPrice:incomeLine',//添加利润曲线
  531. goodsPrice_priceLine:'goodsPrice:priceLine',//添加价格曲线
  532. goodsPrice_classifyOpt_edit:'goodsPrice:classifyOpt:edit',//添加/编辑分类
  533. goodsPrice_classifyOpt_delete:'goodsPrice:classifyOpt:delete',//删除分类
  534. goodsPrice_onlyMine:'goodsPrice:onlyMine',//只看我的
  535. goodsPrice_editLimit:'goodsPrice:editLimit',//编辑上下限
  536. /* 利润曲线 */
  537. goodsPrice_incomeLine_del:'goodsPrice:incomeLine:del',
  538. goodsPrice_incomeLine_enNameSetting:'goodsPrice:incomeLine:enNameSetting',
  539. goodsPrice_incomeLine_copyWechat:'goodsPrice:incomeLine:copyWechat',
  540. goodsPrice_incomeLine_copyOffice:'goodsPrice:incomeLine:copyOffice',
  541. goodsPrice_incomeLine_edit:'goodsPrice:incomeLine:edit',
  542. goodsPrice_incomeLine_otherSave:'goodsPrice:incomeLine:otherSave',
  543. goodsPrice_incomeLine_refresh:'goodsPrice:incomeLine:refresh',
  544. goodsPrice_incomeLine_addMyChart:'goodsPrice:incomeLine:addMyChart',
  545. goodsPrice_incomeLine_share:'goodsPrice:incomeLine:share',
  546. /* 价格曲线 */
  547. goodsPrice_priceLine_del:'goodsPrice:priceLine:del',
  548. goodsPrice_priceLine_enNameSetting:'goodsPrice:priceLine:enNameSetting',
  549. goodsPrice_priceLine_copyWechat:'goodsPrice:priceLine:copyWechat',
  550. goodsPrice_priceLine_copyOffice:'goodsPrice:priceLine:copyOffice',
  551. goodsPrice_priceLine_edit:'goodsPrice:priceLine:edit',
  552. goodsPrice_priceLine_otherSave:'goodsPrice:priceLine:otherSave',
  553. goodsPrice_priceLine_refresh:'goodsPrice:priceLine:refresh',
  554. goodsPrice_priceLine_addMyChart:'goodsPrice:priceLine:addMyChart',
  555. goodsPrice_priceLine_share:'goodsPrice:priceLine:share',
  556. }
  557. /*
  558. * --------------------------------------------------------------------------系统设置------------------------------------------------
  559. */
  560. export const sysDepartPermission = {
  561. /*-----------部门管理-------- */
  562. sysDepart_saveUser:'sysDepart:saveUser',//添加/编辑用户按钮
  563. sysDepart_resetPass:'sysDepart:resetPass',//重置密码
  564. sysDepart_moveGroup:'sysDepart:moveGroup',//移动分组
  565. sysDepart_enable:'sysDepart:enable',//启用禁用
  566. sysDepart_del:'sysDepart:del',//用户删除
  567. sysDepart_saveUser_researchGroup:'sysDepart:saveUser:researchGroup',//添加/编辑用户表单中,研究方向的按钮
  568. sysDepart_saveUser_LabelVal:'sysDepart:saveUser:LabelVal',//姓名角色的标签
  569. sysDepart_classifyOpt_edit:'sysDepart:classifyOpt:edit',//添加/编辑部门
  570. sysDepart_classifyOpt_delete:'sysDepart:classifyOpt:delete',//删除部门
  571. /*-----------角色管理-------- */
  572. sysRole_del:'sysRole:del',//删除角色
  573. sysRole_settingAuth:'sysRole:settingAuth',//设置/查看权限
  574. sysRole_addRole:'sysRole:addRole',//添加角色
  575. /*-----------英文权限配置-------- */
  576. enAuthManage_del:'enAuthManage:del',
  577. enAuthManage_settingAuth:'enAuthManage:settingAuth'
  578. }
  579. /*-----------数据操作权限-------- */
  580. export const operateAuthPermission = {
  581. /*---------图库-------- */
  582. operateAuth_chartLib:'operateAuth:chartLib',//图库tab
  583. operateAuth_chartLib_edit:'operateAuth:chartLib:edit',//图库的编辑,批量编辑按钮
  584. /*---------ETA预测指标库-------- */
  585. operateAuth_etaPredictLib:'operateAuth:etaPredictLib',
  586. operateAuth_etaPredictLib_authSetting:'operateAuth:etaPredictLib:authSetting',//权限设置/批量权限设置
  587. operateAuth_etaPredictLib_edit:'operateAuth:etaPredictLib:edit',
  588. /*---------ETA指标库-------- */
  589. operateAuth_etaLib:'operateAuth:etaLib',
  590. operateAuth_etaLib_authSetting:'operateAuth:etaLib:authSetting',
  591. operateAuth_etaLib_edit:'operateAuth:etaLib:edit',
  592. /*---------钢联化工数据库-------- */
  593. operateAuth_mysteel:'operateAuth:mysteel',
  594. operateAuth_mysteel_edit:'operateAuth:mysteel:edit',
  595. /*---------手工数据指标-------- */
  596. operateAuth_manual:'operateAuth:manual',
  597. operateAuth_manual_edit:'operateAuth:manual:edit',
  598. /*---------手工数据权限-------- */
  599. sysdataAuth_classify:'sysdataAuth:classify',//手工指标分类
  600. }
  601. /*-----------基本配置-------- */
  602. export const baseConfigPermission = {
  603. /*-------其他设置------- */
  604. sysJump_updateLog:'sysJump:updateLog',//更新日志
  605. sysJump_helpDoc:'sysJump:helpDoc',//帮助文档,如果两个都没权限,就隐藏按钮
  606. sysJump_crm:'sysJump:crm',//跳转CRM的按钮
  607. sysJump_hr:'sysJump:hr',//跳转HR系统的按钮
  608. sysJump_finance:'sysJump:finance',//跳转财务系统的按钮
  609. /*-------基本配置表格---*/
  610. etaBaseConfig_xunfei:'etaBaseConfig:xunfei',
  611. etaBaseConfig_pptEn:'etaBaseConfig:pptEn',
  612. etaBaseConfig_ppt:'etaBaseConfig:ppt',
  613. etaBaseConfig_watermark:'etaBaseConfig:watermark',
  614. etaBaseConfig_watermark_ybChart:'etaBaseConfig:watermark:ybChart',//如果没权限,表单不显示也不校验
  615. }
  616. /*-----------外部链接配置-------- */
  617. export const outlinkConfigPermission = {
  618. outlinkListConfig_list:'outlinkListConfig:list',//查看列表
  619. outlinkListConfig_add:'outlinkListConfig:add',//添加
  620. outlinkListConfig_edit:'outlinkListConfig:edit',//编辑
  621. outlinkListConfig_del:'outlinkListConfig:del',//删除
  622. }
  623. //创建了新的ManageBtn记得添加到这里
  624. const btnMap = {
  625. reportManageBtn,enReportManageBtn,
  626. classifyBtn,enClassifyBtn,authorManage,
  627. enChartPermission,cloudDisk,
  628. pptPermission,enPPTPermission,
  629. dataSourcePermission,
  630. edbDataPermission,predictEdbPermission,chartLibPermission,
  631. myETAPermission,chartFramePermission,etaTablePermission,
  632. sandboxPermission,semanticPermission,
  633. statisticPermission,stockPlantPermission,
  634. productPricePermission,sysDepartPermission,
  635. operateAuthPermission,baseConfigPermission,
  636. outlinkConfigPermission
  637. }
  638. /**
  639. *自定义指令使用示例:
  640. * <el-checkbox v-model="isOnlyMe"
  641. * v-permission="permissionBtn.chartLibPermission.chartLib_isOnlyMine"
  642. * >只看我的</el-checkbox>
  643. */
  644. /**
  645. * 函数使用示例:
  646. * <span v-if="data.Button.OpButton
  647. * &&permissionBtn.isShowBtn('chartLibPermission','chartLib_add')">
  648. * </span>
  649. * <el-input
  650. * :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib:editLimit')"
  651. * v-model="tableData[leftIndex].MaxData"/>
  652. * computed:{
  653. * //是否显示公共图库的下拉按钮
  654. isShowDropPublic(){
  655. return this.permissionBtn.isShowBtn('myETAPermission','myChart_classifyOpt_copy')
  656. },
  657. * }
  658. */
  659. /**
  660. * 根据权限判断按钮是否展示
  661. * 适用于dom本身就有v-if/show条件限制的情况,可以防止自定义指令冲突
  662. * 适用于限制表单,组件disabled的情况
  663. * @param {String} btnMapName 按钮所属的模块名
  664. * @param {String} btnKey 按钮对应的key
  665. * @returns Boolean
  666. */
  667. export const isShowBtn = (btnMapName,btnKey)=>{
  668. return btnMap[btnMapName]&&checkPermissionBtn(btnMap[btnMapName][btnKey])
  669. }
  670. /* export const getBtnCode = (btnMapName,btnKey)=>{
  671. return (btnMap[btnMapName]&&btnMap[btnMapName][btnKey])||''
  672. } */