permissions.js 17 KB

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