permissions.js 13 KB

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