permissions.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. const StringUtil = {
  2. permissions: function(arr) {
  3. var obj = {
  4. // 项目管理
  5. projectNew: false, // 新增项目 //
  6. projectView: false, // 查看全部项目 //
  7. projectManagement: false, // 管理全部项目 (编辑,完成,删除,子项目)(负责人编辑,完成)(创建人编辑 删除 完成,子项目) (负责人只能编辑参与人和审核人) //
  8. projectParticipator: false, //编辑可见项目参与人
  9. projectClassification: false, // 分类管理 //
  10. projectExport: false, // 导出项目 //
  11. projectImport: false, // 导入项目 //
  12. projectResources: false, // 查看资源分配 //
  13. projectCostOfItems: false, // 基线成本项管理 (基本成本项文字) //
  14. projectBaseline: false, // 查看成本基线 (项目里面的成本基线) //
  15. projectCorrection: false, // 校正成本基线 (项目里面的成本基线的编辑) //
  16. projectContract: false, // 查看合同金额 //
  17. projectAllocate: false, // 下拨成本预算 //
  18. projectPhase: false, // 项目阶段管理 //
  19. projectCodeAndName: false, // 编辑负责项目编码和名称 //
  20. projectEditDefaultFolder: false, // 修改默认文件夹 //
  21. // 合同管理
  22. contractNew: false, // 新增合同 //
  23. contractView: false, // 查看全部合同 //
  24. contractManagement: false, // 管理全部合同 //
  25. contractExport: false, // 导出合同 //
  26. contractImport: false, // 导入合同 //
  27. contractType: false, // 合同类型管理 //
  28. contractAudit: false, // 审核合同 //
  29. // 组织架构
  30. structurePersonnel: false, // 人员成本管理 (月成本,时薪,操作) //
  31. structureAdd: false, // 添加人员 //
  32. structureExport: false, // 导出人员 //
  33. structureImport: false, // 导入人员 //
  34. structureCertificate: false, // 管理专业证书 //
  35. structureCustomConfig: false, // 自定义配置 //
  36. // 工时报告
  37. reportsCompany: false, // 查看全公司工时 // 后台
  38. reportsPersonnel: false, // 查看相关人员工时 // 后台
  39. reportsFillOut: false, // 代填日报 //
  40. reportsDeleteAll: false, // 删除全公司日报
  41. importReport: false, //导入工时lij
  42. reportsDept: false, //查看本部门工时
  43. reportBatch: false, //批量填报
  44. reportExport: false, //日报导出
  45. reportPush: false, //手动推送工时
  46. // 财务核算成本
  47. financialCustom: false, // 自定义薪资项 //
  48. financialProportion: false, // 分摊比例设置 //
  49. financialUpload: false, // 薪资数据上传 //
  50. financialExport: false, // 薪资数据导出 //
  51. financialShare: false, // 导出分摊数据 //
  52. setFinanceAuditor: false, //设置财务审核人
  53. // 项目报表服务 //
  54. reportAllProject: false, // 全部项目报表 //
  55. reportProject: false, // 负责项目报表 //
  56. reportAllTask : false, // 全部项目任务报表 //
  57. reportTask : false, // 负责项目任务报表 //
  58. reportAllCostOf : false, // 全部项目成本报表 //
  59. reportCostOf : false, // 负责项目成本报表 //
  60. reportAllBalance : false, // 全部项目收支平衡表 //
  61. reportBalance : false, // 负责项目收支平衡表 //
  62. reportProfits : false, // 客户项目利润表 //
  63. reportAllPhase : false, // 全部项目阶段工时表 //
  64. reportPhase : false, // 负责项目阶段工时表 //
  65. reportAllOvertime : false, // 全公司加班情况 //
  66. reportOvertime : false, // 负责部门加班情况 //
  67. reportCost: false, // 查看加班成本 //
  68. reportCostWarning: false, // 工时成本预警表 //
  69. reportPhaseCost: false, // 查看阶段成本 //
  70. reportAllTimeDivide: false, // 全公司工时分配 //
  71. reportTimeDivide: false, // 负责部门工时分配 //
  72. reportAllTimely: false, // 全公司填报及时率 //
  73. reportTimely: false, // 负责部门填报及时率 //
  74. reportAuditRate: false, // 日报待审核统计 //
  75. reportPersonnel: false, // 全公司工时统计 //
  76. reportResponsible: false, // 负责部门工时统计 //
  77. reportAllGroup: false, // 全部任务分组工时 //
  78. reportGroup: false, // 负责项目任务分组工时 //
  79. reportAllOutputValue: false, // 全部项目成本基线表 //
  80. reportOutputValue: false, // 负责项目成本基线表 //
  81. reportMonthlyPersonnel: false, // 全部人员月度工时表 //
  82. reportResponsiblePersonnel: false, // 负责部门月度工时表 //
  83. reportAllDepartmentParticipation: false, // 全部部门参与项目情况表 //
  84. reportResponsibleDepartmentParticipation: false, // 负责部门参与项目情况表 //
  85. reportPhaseHours: false, // 全部分组阶段工时 //
  86. reportStageWorkingTime: false, // 负责项目分组阶段工时 //
  87. reportAllManhourCost: false, // 全部子项目工时成本 //
  88. reportResponsibleManhourCost: false, // 负责项目子项目工时成本 //
  89. reportFTEAll: false, // 全部部门FTE报表 //
  90. reportFTEPart: false, // 负责部门FTE报表 //
  91. reportEfficent: false, // 有效工时率 //
  92. // 请假模块
  93. leaveFil : false, // 请假填报 //
  94. leaveAudit : false, // 请假审核 //
  95. leaveAll : false, // 查看全部请假单 //
  96. leaveStatistical : false, // 请假统计 //
  97. leaveProcess : false, // 请假流程设置 //
  98. leaveAnnual : false, // 年假管理 //
  99. // 出差模块
  100. awayOfficeFil : false, // 出差填报 //
  101. awayOfficeAudit : false, // 出差审核 //
  102. awayOfficeAll : false, // 查看全部出差 //
  103. awayOfficeStatistical : false, // 出差统计 //
  104. awayOfficeProcess : false, // 出差流程设置 //
  105. awayOfficeDelete: false, // 删除出差 //
  106. // 费用报销
  107. costFil : false, // 费用填报 //
  108. costAudit : false, // 费用审核 //
  109. costAll : false, // 查看全部报销单 //
  110. costExpenseRelease: false, // 费用发放 //
  111. // 工时成本统计
  112. countHours: false, // 查看工时统计 //
  113. countCost: false, // 查看成本统计 //
  114. countPersonnel: false, // 查看人员数据 //
  115. // 项目报告审核
  116. projectReportReview: false, // 审核全员日报 //
  117. // 导入日报审核
  118. importAudit: false, // 查看导审记录 //
  119. customDataAll: false,// 查看全公司数值-自定义数值统计模块
  120. }
  121. // console.log(arr);
  122. for(var i in arr) {
  123. arr[i] == '导入工时' ? obj.importReport = true : ''
  124. arr[i] == '查看导审记录' ? obj.importAudit = true : ''
  125. arr[i] == '删除全公司日报' ? obj.reportsDeleteAll = true : ''
  126. arr[i] == '新增项目' ? obj.projectNew = true : ''
  127. arr[i] == '查看全部项目' ? obj.projectView = true : ''
  128. arr[i] == '管理全部项目' ? obj.projectManagement = true : ''
  129. arr[i] == '编辑项目参与人' ? obj.projectParticipator = true : ''
  130. arr[i] == '分类管理' ? obj.projectClassification = true : ''
  131. arr[i] == '导出项目' ? obj.projectExport = true : ''
  132. arr[i] == '导入项目' ? obj.projectImport = true : ''
  133. arr[i] == '查看资源分配' ? obj.projectResources = true : ''
  134. arr[i] == '基线成本项管理' ? obj.projectCostOfItems = true : ''
  135. arr[i] == '查看成本基线' ? obj.projectBaseline = true : ''
  136. arr[i] == '校正成本基线' ? obj.projectCorrection = true : ''
  137. arr[i] == '查看合同金额' ? obj.projectContract = true : ''
  138. arr[i] == '人员成本管理' ? obj.structurePersonnel = true : ''
  139. arr[i] == '添加人员' ? obj.structureAdd = true : ''
  140. arr[i] == '导出人员' ? obj.structureExport = true : ''
  141. arr[i] == '导入人员' ? obj.structureImport = true : ''
  142. arr[i] == '查看全公司工时' ? obj.reportsCompany = true : ''
  143. arr[i] == '查看本部门工时' ? obj.reportsDept = true : ''
  144. arr[i] == '查看相关人员工时' ? obj.reportsPersonnel = true : ''
  145. arr[i] == '代填日报' ? obj.reportsFillOut = true : ''
  146. arr[i] == '自定义薪资项' ? obj.financialCustom = true : ''
  147. arr[i] == '分摊比例设置' ? obj.financialProportion = true : ''
  148. arr[i] == '薪资数据上传' ? obj.financialUpload = true : ''
  149. arr[i] == '薪资数据导出' ? obj.financialExport = true : ''
  150. arr[i] == '导出分摊数据' ? obj.financialShare = true : ''
  151. arr[i] == '负责项目任务报表' ? obj.reportTask = true : ''
  152. arr[i] == '全部项目任务报表' ? obj.reportAllTask = true : ''
  153. arr[i] == '负责项目成本报表' ? obj.reportCostOf = true : ''
  154. arr[i] == '全部项目成本报表' ? obj.reportAllCostOf = true : ''
  155. arr[i] == '负责项目收支平衡表' ? obj.reportBalance = true : ''
  156. arr[i] == '全部项目收支平衡表' ? obj.reportAllBalance = true : ''
  157. arr[i] == '客户项目利润表' ? obj.reportProfits = true : ''
  158. arr[i] == '负责项目阶段工时表' ? obj.reportPhase = true : ''
  159. arr[i] == '全部项目阶段工时表' ? obj.reportAllPhase = true : ''
  160. arr[i] == '全公司加班情况' ? obj.reportAllOvertime = true : ''
  161. arr[i] == '负责部门加班情况' ? obj.reportOvertime = true : ''
  162. arr[i] == '请假填报' ? obj.leaveFil = true : ''
  163. arr[i] == '请假审核' ? obj.leaveAudit = true : ''
  164. arr[i] == '查看全部请假单' ? obj.leaveAll = true : ''
  165. arr[i] == '请假统计' ? obj.leaveStatistical = true : ''
  166. arr[i] == '请假流程设置' ? obj.leaveProcess = true : ''
  167. arr[i] == '年假管理' ? obj.leaveAnnual = true : ''
  168. arr[i] == '费用填报' ? obj.costFil = true : ''
  169. arr[i] == '费用审核' ? obj.costAudit = true : ''
  170. arr[i] == '查看全部报销单' ? obj.costAll = true : ''
  171. arr[i] == '审核全员日报' ? obj.projectReportReview = true : ''
  172. arr[i] == '设置财务审核人' ? obj.setFinanceAuditor = true : ''
  173. arr[i] == '出差填报' ? obj.awayOfficeFil = true : ''
  174. arr[i] == '出差审核' ? obj.awayOfficeAudit = true : ''
  175. arr[i] == '查看全部出差' ? obj.awayOfficeAll = true : ''
  176. arr[i] == '出差统计' ? obj.awayOfficeStatistical = true : ''
  177. arr[i] == '出差流程设置' ? obj.awayOfficeProcess = true : ''
  178. arr[i] == '管理专业证书' ? obj.structureCertificate = true : ''
  179. arr[i] == '查看加班成本' ? obj.reportCost = true : ''
  180. arr[i] == '下拨成本预算' ? obj.projectAllocate = true : ''
  181. arr[i] == '工时成本预警表' ? obj.reportCostWarning = true : ''
  182. arr[i] == '查看阶段成本' ? obj.reportPhaseCost = true : ''
  183. arr[i] == '全公司工时分配' ? obj.reportAllTimeDivide = true : ''
  184. arr[i] == '负责部门工时分配' ? obj.reportTimeDivide = true : ''
  185. arr[i] == '自定义配置' ? obj.structureCustomConfig = true : ''
  186. arr[i] == '全公司填报及时率' ? obj.reportAllTimely = true : ''
  187. arr[i] == '负责部门填报及时率' ? obj.reportTimely = true : ''
  188. arr[i] == '日报待审核统计' ? obj.reportAuditRate = true : ''
  189. arr[i] == '查看工时统计' ? obj.countHours = true : ''
  190. arr[i] == '查看成本统计' ? obj.countCost = true : ''
  191. arr[i] == '全部项目报表' ? obj.reportAllProject = true : ''
  192. arr[i] == '负责项目报表' ? obj.reportProject = true : ''
  193. arr[i] == '批量填报' ? obj.reportBatch = true : ''
  194. arr[i] == '项目阶段管理' ? obj.projectPhase = true : ''
  195. arr[i] == '全公司工时统计' ? obj.reportPersonnel = true : ''
  196. arr[i] == '负责部门工时统计' ? obj.reportResponsible = true : ''
  197. arr[i] == '查看人员数据' ? obj.countPersonnel = true : ''
  198. arr[i] == '全部任务分组工时' ? obj.reportAllGroup = true : ''
  199. arr[i] == '负责项目任务分组工时' ? obj.reportGroup = true : ''
  200. arr[i] == '全部项目成本基线表' ? obj.reportAllOutputValue = true : ''
  201. arr[i] == '负责项目成本基线表' ? obj.reportOutputValue = true : ''
  202. arr[i] == '编辑项目内任务' ? obj.editAnyTask = true : ''
  203. arr[i] == '日报导出' ? obj.reportExport = true : ''
  204. arr[i] == '手动推送工时' ? obj.reportPush = true : ''
  205. arr[i] == '查看全公司数值' ? obj.customDataAll = true : ''
  206. arr[i] == '查看全公司' ? obj.viewAllSummary = true : ''
  207. arr[i] == '查看负责部门' ? obj.viewMagDeptSummary = true : ''
  208. arr[i] == '删除出差' ? obj.awayOfficeDelete = true : ''
  209. arr[i] == '全部人员月度工时表' ? obj.reportMonthlyPersonnel = true : ''
  210. arr[i] == '负责部门月度工时表' ? obj.reportResponsiblePersonnel = true : ''
  211. arr[i] == '全部部门参与项目情况表' ? obj.reportAllDepartmentParticipation = true : ''
  212. arr[i] == '负责部门参与项目情况表' ? obj.reportResponsibleDepartmentParticipation = true : ''
  213. arr[i] == '编辑负责项目编码和名称' ? obj.projectCodeAndName = true : ''
  214. arr[i] == '全部分组阶段工时' ? obj.reportPhaseHours = true : ''
  215. arr[i] == '负责项目分组阶段工时' ? obj.reportStageWorkingTime = true : ''
  216. arr[i] == '全部部门FTE报表' ? obj.reportFTEAll = true : ''
  217. arr[i] == '负责部门FTE报表' ? obj.reportFTEPart = true : ''
  218. arr[i] == '有效工时率表' ? obj.reportEfficent = true : ''
  219. arr[i] == '新增合同' ? obj.contractNew = true : ''
  220. arr[i] == '查看全部合同' ? obj.contractView = true : ''
  221. arr[i] == '管理全部合同' ? obj.contractManagement = true : ''
  222. arr[i] == '导出合同' ? obj.contractExport = true : ''
  223. arr[i] == '导入合同' ? obj.contractImport = true : ''
  224. arr[i] == '合同类型管理' ? obj.contractType = true : ''
  225. arr[i] == '审核合同' ? obj.contractAudit = true : ''
  226. arr[i] == '全部子项目工时成本' ? obj.reportAllManhourCost = true : ''
  227. arr[i] == '负责项目子项目工时成本' ? obj.reportResponsibleManhourCost = true : ''
  228. arr[i] == '修改默认文件夹' ? obj.projectEditDefaultFolder = true : ''
  229. arr[i] == '费用发放' ? obj.costExpenseRelease = true : ''
  230. }
  231. return obj
  232. }
  233. };
  234. Vue.prototype.StringUtil = StringUtil;
  235. export default {};