permissions.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. const StringUtil = {
  2. permissions: function(arr) {
  3. var obj = {
  4. // 项目管理
  5. projectNew: false, // 新增项目 //
  6. projectView: false, // 查看全部项目 //
  7. projectManagement: false, // 管理全部项目 (编辑,完成,删除,子项目)(负责人编辑,完成)(创建人编辑 删除 完成,子项目) (负责人只能编辑参与人和审核人) //
  8. projectClassification: false, // 分类管理 //
  9. projectExport: false, // 导出项目 //
  10. projectImport: false, // 导入项目 //
  11. projectResources: false, // 查看资源分配 //
  12. projectCostOfItems: false, // 基线成本项管理 (基本成本项文字) //
  13. projectBaseline: false, // 查看成本基线 (项目里面的成本基线) //
  14. projectCorrection: false, // 校正成本基线 (项目里面的成本基线的编辑) //
  15. projectContract: false, // 查看合同金额 //
  16. projectAllocate: false, // 下拨成本预算 //
  17. projectPhase: false, // 项目阶段管理 //
  18. // 组织架构
  19. structurePersonnel: false, // 人员成本管理 (月成本,时薪,操作) //
  20. structureAdd: false, // 添加人员 //
  21. structureExport: false, // 导出人员 //
  22. structureImport: false, // 导入人员 //
  23. structureCertificate: false, // 管理专业证书 //
  24. structureCustomConfig: false, // 自定义配置 //
  25. // 工时报告
  26. reportsCompany: false, // 查看全公司工时 // 后台
  27. reportsPersonnel: false, // 查看相关人员工时 // 后台
  28. reportsFillOut: false, // 代填日报 //
  29. reportsDeleteAll: false, // 删除全公司日报
  30. importReport: false, //导入工时lij
  31. reportsDept: false, //查看本部门工时
  32. reportBatch: false, //批量填报
  33. // 财务核算成本
  34. financialCustom: false, // 自定义薪资项 //
  35. financialProportion: false, // 分摊比例设置 //
  36. financialUpload: false, // 薪资数据上传 //
  37. financialExport: false, // 薪资数据导出 //
  38. financialShare: false, // 导出分摊数据 //
  39. setFinanceAuditor: false, //设置财务审核人
  40. // 项目报表服务 //
  41. reportAllProject: false, // 全部项目报表 //
  42. reportProject: false, // 负责项目报表 //
  43. reportAllTask : false, // 全部项目任务报表 //
  44. reportTask : false, // 负责项目任务报表 //
  45. reportAllCostOf : false, // 全部项目成本报表 //
  46. reportCostOf : false, // 负责项目成本报表 //
  47. reportAllBalance : false, // 全部项目收支平衡表 //
  48. reportBalance : false, // 负责项目收支平衡表 //
  49. reportProfits : false, // 客户项目利润表 //
  50. reportAllPhase : false, // 全部项目阶段工时表 //
  51. reportPhase : false, // 负责项目阶段工时表 //
  52. reportAllOvertime : false, // 全公司加班情况 //
  53. reportOvertime : false, // 负责部门加班情况 //
  54. reportCost: false, // 查看加班成本 //
  55. reportCostWarning: false, // 工时成本预警表 //
  56. reportPhaseCost: false, // 查看阶段成本 //
  57. reportAllTimeDivide: false, // 全公司工时分配 //
  58. reportTimeDivide: false, // 负责部门工时分配 //
  59. reportAllTimely: false, // 全公司填报及时率 //
  60. reportTimely: false, // 负责部门填报及时率 //
  61. reportAuditRate: false, // 日报待审核统计 //
  62. reportPersonnel: false, // 全公司工时统计 //
  63. reportResponsible: false, // 负责部门工时统计 //
  64. reportAllGroup: false, // 全部任务分组工时 //
  65. reportGroup: false, // 负责项目任务分组工时 //
  66. reportAllOutputValue: false, // 全部项目成本基线表 //
  67. reportOutputValue: false, // 负责项目成本基线表 //
  68. // 请假模块
  69. leaveFil : false, // 请假填报 //
  70. leaveAudit : false, // 请假审核 //
  71. leaveAll : false, // 查看全部请假单 //
  72. leaveStatistical : false, // 请假统计 //
  73. leaveProcess : false, // 请假流程设置 //
  74. leaveAnnual : false, // 年假管理 //
  75. // 出差模块
  76. awayOfficeFil : false, // 出差填报 //
  77. awayOfficeAudit : false, // 出差审核 //
  78. awayOfficeAll : false, // 查看全部出差 //
  79. awayOfficeStatistical : false, // 出差统计 //
  80. awayOfficeProcess : false, // 出差流程设置 //
  81. // 费用报销
  82. costFil : false, // 费用填报 //
  83. costAudit : false, // 费用审核 //
  84. costAll : false, // 查看全部报销单 //
  85. // 工时成本统计
  86. countHours: false, // 查看工时统计 //
  87. countCost: false, // 查看成本统计 //
  88. countPersonnel: false, // 查看人员数据 //
  89. // 项目报告审核
  90. projectReportReview: false, // 审核全员日报 //
  91. // 导入日报审核
  92. importAudit: false, // 查看导审记录 //
  93. }
  94. // console.log(arr);
  95. for(var i in arr) {
  96. arr[i] == '导入工时' ? obj.importReport = true : ''
  97. arr[i] == '查看导审记录' ? obj.importAudit = true : ''
  98. arr[i] == '删除全公司日报' ? obj.reportsDeleteAll = true : ''
  99. arr[i] == '新增项目' ? obj.projectNew = true : ''
  100. arr[i] == '查看全部项目' ? obj.projectView = true : ''
  101. arr[i] == '管理全部项目' ? obj.projectManagement = true : ''
  102. arr[i] == '分类管理' ? obj.projectClassification = true : ''
  103. arr[i] == '导出项目' ? obj.projectExport = true : ''
  104. arr[i] == '导入项目' ? obj.projectImport = true : ''
  105. arr[i] == '查看资源分配' ? obj.projectResources = true : ''
  106. arr[i] == '基线成本项管理' ? obj.projectCostOfItems = true : ''
  107. arr[i] == '查看成本基线' ? obj.projectBaseline = true : ''
  108. arr[i] == '校正成本基线' ? obj.projectCorrection = true : ''
  109. arr[i] == '查看合同金额' ? obj.projectContract = true : ''
  110. arr[i] == '人员成本管理' ? obj.structurePersonnel = true : ''
  111. arr[i] == '添加人员' ? obj.structureAdd = true : ''
  112. arr[i] == '导出人员' ? obj.structureExport = true : ''
  113. arr[i] == '导入人员' ? obj.structureImport = true : ''
  114. arr[i] == '查看全公司工时' ? obj.reportsCompany = true : ''
  115. arr[i] == '查看本部门工时' ? obj.reportsDept = true : ''
  116. arr[i] == '查看相关人员工时' ? obj.reportsPersonnel = true : ''
  117. arr[i] == '代填日报' ? obj.reportsFillOut = true : ''
  118. arr[i] == '自定义薪资项' ? obj.financialCustom = true : ''
  119. arr[i] == '分摊比例设置' ? obj.financialProportion = true : ''
  120. arr[i] == '薪资数据上传' ? obj.financialUpload = true : ''
  121. arr[i] == '薪资数据导出' ? obj.financialExport = true : ''
  122. arr[i] == '导出分摊数据' ? obj.financialShare = true : ''
  123. arr[i] == '负责项目任务报表' ? obj.reportTask = true : ''
  124. arr[i] == '全部项目任务报表' ? obj.reportAllTask = true : ''
  125. arr[i] == '负责项目成本报表' ? obj.reportCostOf = true : ''
  126. arr[i] == '全部项目成本报表' ? obj.reportAllCostOf = true : ''
  127. arr[i] == '负责项目收支平衡表' ? obj.reportBalance = true : ''
  128. arr[i] == '全部项目收支平衡表' ? obj.reportAllBalance = true : ''
  129. arr[i] == '客户项目利润表' ? obj.reportProfits = true : ''
  130. arr[i] == '负责项目阶段工时表' ? obj.reportPhase = true : ''
  131. arr[i] == '全部项目阶段工时表' ? obj.reportAllPhase = true : ''
  132. arr[i] == '全公司加班情况' ? obj.reportAllOvertime = true : ''
  133. arr[i] == '负责部门加班情况' ? obj.reportOvertime = true : ''
  134. arr[i] == '请假填报' ? obj.leaveFil = true : ''
  135. arr[i] == '请假审核' ? obj.leaveAudit = true : ''
  136. arr[i] == '查看全部请假单' ? obj.leaveAll = true : ''
  137. arr[i] == '请假统计' ? obj.leaveStatistical = true : ''
  138. arr[i] == '请假流程设置' ? obj.leaveProcess = true : ''
  139. arr[i] == '年假管理' ? obj.leaveAnnual = true : ''
  140. arr[i] == '费用填报' ? obj.costFil = true : ''
  141. arr[i] == '费用审核' ? obj.costAudit = true : ''
  142. arr[i] == '查看全部报销单' ? obj.costAll = true : ''
  143. arr[i] == '审核全员日报' ? obj.projectReportReview = true : ''
  144. arr[i] == '设置财务审核人' ? obj.setFinanceAuditor = true : ''
  145. arr[i] == '出差填报' ? obj.awayOfficeFil = true : ''
  146. arr[i] == '出差审核' ? obj.awayOfficeAudit = true : ''
  147. arr[i] == '查看全部出差' ? obj.awayOfficeAll = true : ''
  148. arr[i] == '出差统计' ? obj.awayOfficeStatistical = true : ''
  149. arr[i] == '出差流程设置' ? obj.awayOfficeProcess = true : ''
  150. arr[i] == '管理专业证书' ? obj.structureCertificate = true : ''
  151. arr[i] == '查看加班成本' ? obj.reportCost = true : ''
  152. arr[i] == '下拨成本预算' ? obj.projectAllocate = true : ''
  153. arr[i] == '工时成本预警表' ? obj.reportCostWarning = true : ''
  154. arr[i] == '查看阶段成本' ? obj.reportPhaseCost = true : ''
  155. arr[i] == '全公司工时分配' ? obj.reportAllTimeDivide = true : ''
  156. arr[i] == '负责部门工时分配' ? obj.reportTimeDivide = true : ''
  157. arr[i] == '自定义配置' ? obj.structureCustomConfig = true : ''
  158. arr[i] == '全公司填报及时率' ? obj.reportAllTimely = true : ''
  159. arr[i] == '负责部门填报及时率' ? obj.reportTimely = true : ''
  160. arr[i] == '日报待审核统计' ? obj.reportAuditRate = true : ''
  161. arr[i] == '查看工时统计' ? obj.countHours = true : ''
  162. arr[i] == '查看成本统计' ? obj.countCost = true : ''
  163. arr[i] == '全部项目报表' ? obj.reportAllProject = true : ''
  164. arr[i] == '负责项目报表' ? obj.reportProject = true : ''
  165. arr[i] == '批量填报' ? obj.reportBatch = true : ''
  166. arr[i] == '项目阶段管理' ? obj.projectPhase = true : ''
  167. arr[i] == '全公司工时统计' ? obj.reportPersonnel = true : ''
  168. arr[i] == '负责部门工时统计' ? obj.reportResponsible = true : ''
  169. arr[i] == '查看人员数据' ? obj.countPersonnel = true : ''
  170. arr[i] == '全部任务分组工时' ? obj.reportAllGroup = true : ''
  171. arr[i] == '负责项目任务分组工时' ? obj.reportGroup = true : ''
  172. arr[i] == '全部项目成本基线表' ? obj.reportAllOutputValue = true : ''
  173. arr[i] == '负责项目成本基线表' ? obj.reportOutputValue = true : ''
  174. }
  175. return obj
  176. }
  177. };
  178. Vue.prototype.StringUtil = StringUtil;
  179. export default {};