buttonConfig.js 38 KB

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