const StringUtil = { permissions: function(arr) { var obj = { // 项目管理 projectNew: false, // 新增项目 // projectView: false, // 查看全部项目 // projectManagement: false, // 管理全部项目 (编辑,完成,删除,子项目)(负责人编辑,完成)(创建人编辑 删除 完成,子项目) (负责人只能编辑参与人和审核人) // projectParticipator: false, //编辑可见项目参与人 projectClassification: false, // 分类管理 // projectExport: false, // 导出项目 // projectImport: false, // 导入项目 // projectResources: false, // 查看资源分配 // projectCostOfItems: false, // 基线成本项管理 (基本成本项文字) // projectBaseline: false, // 查看成本基线 (项目里面的成本基线) // projectCorrection: false, // 校正成本基线 (项目里面的成本基线的编辑) // projectContract: false, // 查看合同金额 // projectAllocate: false, // 下拨成本预算 // projectPhase: false, // 项目阶段管理 // projectCodeAndName: false, // 编辑负责项目编码和名称 // projectEditDefaultFolder: false, // 修改默认文件夹 // projectViewAllTasks: false, // 查看全部任务 // //立项管理 projectApprovalNew:false, //新增立项 projectApprovalView:false, //查看全部立项 projectApprovalExport:false, //导出立项 projectApprovalImport:false, //导入立项 projectApprovalCheck:false, //审核立项 projectApprovalEdit:false, //管理全部立项 // 合同管理 contractNew: false, // 新增合同 // contractView: false, // 查看全部合同 // contractManagement: false, // 管理全部合同 // contractExport: false, // 导出合同 // contractImport: false, // 导入合同 // contractType: false, // 合同类型管理 // contractAudit: false, // 审核合同 // // 组织架构 structurePersonnel: false, // 人员成本管理 (月成本,时薪,操作) // structureAdd: false, // 添加人员 // structureExport: false, // 导出人员 // structureImport: false, // 导入人员 // structureCertificate: false, // 管理专业证书 // structureCustomConfig: false, // 自定义配置 // // 工时报告 reportsCompany: false, // 查看全公司工时 // 后台 reportsPersonnel: false, // 查看相关人员工时 // 后台 reportsFillOut: false, // 代填日报 // reportsDeleteAll: false, // 删除全公司日报 importReport: false, //导入工时lij reportsDept: false, //查看本部门工时 reportBatch: false, //批量填报 reportExport: false, //日报导出 reportPush: false, //手动推送工时 // 财务核算成本 financialCustom: false, // 自定义薪资项 // financialProportion: false, // 分摊比例设置 // financialUpload: false, // 薪资数据上传 // financialExport: false, // 薪资数据导出 // financialShare: false, // 导出分摊数据 // setFinanceAuditor: false, //设置财务审核人 financialBonusDetails: false, // 奖金明细 // // 项目报表服务 // reportAllProject: false, // 全部项目报表 // reportProject: false, // 负责项目报表 // reportAllTask : false, // 全部项目任务报表 // reportTask : false, // 负责项目任务报表 // reportAllCostOf : false, // 全部项目成本报表 // reportCostOf : false, // 负责项目成本报表 // reportAllBalance : false, // 全部项目收支平衡表 // reportBalance : false, // 负责项目收支平衡表 // reportProfits : false, // 客户项目利润表 // reportAllPhase : false, // 全部项目阶段工时表 // reportPhase : false, // 负责项目阶段工时表 // reportAllOvertime : false, // 全公司加班情况 // reportOvertime : false, // 负责部门加班情况 // reportCost: false, // 查看加班成本 // reportCostWarning: false, // 工时成本预警表 // reportPhaseCost: false, // 查看阶段成本 // reportAllTimeDivide: false, // 全公司工时分配 // reportTimeDivide: false, // 负责部门工时分配 // reportAllTimely: false, // 全公司填报及时率 // reportTimely: false, // 负责部门填报及时率 // reportAuditRate: false, // 日报待审核统计 // reportPersonnel: false, // 全公司工时统计 // reportResponsible: false, // 负责部门工时统计 // reportAllGroup: false, // 全部任务分组工时 // reportGroup: false, // 负责项目任务分组工时 // reportAllOutputValue: false, // 全部项目成本基线表 // reportOutputValue: false, // 负责项目成本基线表 // reportMonthlyPersonnel: false, // 全部人员月度工时表 // reportResponsiblePersonnel: false, // 负责部门月度工时表 // reportAllDepartmentParticipation: false, // 全部部门参与项目情况表 // reportResponsibleDepartmentParticipation: false, // 负责部门参与项目情况表 // reportPhaseHours: false, // 全部分组阶段工时 // reportStageWorkingTime: false, // 负责项目分组阶段工时 // reportAllManhourCost: false, // 全部子项目工时成本 // reportResponsibleManhourCost: false, // 负责项目子项目工时成本 // reportFTEAll: false, // 全部部门FTE报表 // reportFTEPart: false, // 负责部门FTE报表 // reportFTEPlanAll: false, // 全部部门FTE计划报表 // reportFTEPlanPart: false, // 负责部门FTE计划报表 // reportEfficent: false, // 有效工时率 // reportSortScaleTable: false, // 项目分类工时占比表 // reportSortDetailTable: false, // 分类全部工时明细表 // reportSortSectionDetailTable: false, // 分类负责部门工时明细表 // reportStaffProject: false, // 员工项目进度表 // reportProjectConsumptionFirst: false, // 分组耗用进度表 // reportProjectConsumptionTwo: false, // 项目耗用进度表 // reportStaffTaskAccomplished: false, // 员工任务完成表 // // 请假模块 leaveFil : false, // 请假填报 // leaveAudit : false, // 请假审核 // leaveAll : false, // 查看全部请假单 // leaveStatistical : false, // 请假统计 // leaveProcess : false, // 请假流程设置 // leaveAnnual : false, // 年假管理 // // 出差模块 awayOfficeFil : false, // 出差填报 // awayOfficeAudit : false, // 出差审核 // awayOfficeAll : false, // 查看全部出差 // awayOfficeStatistical : false, // 出差统计 // awayOfficeProcess : false, // 出差流程设置 // awayOfficeDelete: false, // 删除出差 // // 费用报销 costFil : false, // 费用填报 // costAudit : false, // 费用审核 // costAll : false, // 查看全部报销单 // costExpenseRelease: false, // 费用发放 // // 工时成本统计 countHours: false, // 查看工时统计 // countCost: false, // 查看成本统计 // countPersonnel: false, // 查看人员数据 // // 项目报告审核 projectReportReview: false, // 审核全员日报 // // 导入日报审核 importAudit: false, // 查看导审记录 // customDataAll: false,// 查看全公司数值-自定义数值统计模块 // 用户分组管理 userGroupManage: false, // 设备管理 equipmentInformationManagement: false, equipmentCostManagement: false, // 任务 tasksReviewTaskFile: false, viewFilesReviewedByOthers: false } // console.log(arr); for(var i in arr) { arr[i] == '导入工时' ? obj.importReport = true : '' arr[i] == '查看导审记录' ? obj.importAudit = true : '' arr[i] == '删除全公司日报' ? obj.reportsDeleteAll = true : '' arr[i] == '新增项目' ? obj.projectNew = true : '' arr[i] == '查看全部项目' ? obj.projectView = true : '' arr[i] == '管理全部项目' ? obj.projectManagement = true : '' arr[i] == '编辑项目参与人' ? obj.projectParticipator = true : '' arr[i] == '分类管理' ? obj.projectClassification = true : '' arr[i] == '导出项目' ? obj.projectExport = true : '' arr[i] == '导入项目' ? obj.projectImport = true : '' arr[i] == '查看资源分配' ? obj.projectResources = true : '' arr[i] == '基线成本项管理' ? obj.projectCostOfItems = true : '' arr[i] == '查看成本基线' ? obj.projectBaseline = true : '' arr[i] == '校正成本基线' ? obj.projectCorrection = true : '' arr[i] == '查看合同金额' ? obj.projectContract = true : '' arr[i] == '人员成本管理' ? obj.structurePersonnel = true : '' arr[i] == '添加人员' ? obj.structureAdd = true : '' arr[i] == '导出人员' ? obj.structureExport = true : '' arr[i] == '导入人员' ? obj.structureImport = true : '' arr[i] == '查看全公司工时' ? obj.reportsCompany = true : '' arr[i] == '查看本部门工时' ? obj.reportsDept = true : '' arr[i] == '查看相关人员工时' ? obj.reportsPersonnel = true : '' arr[i] == '代填日报' ? obj.reportsFillOut = true : '' arr[i] == '自定义薪资项' ? obj.financialCustom = true : '' arr[i] == '分摊比例设置' ? obj.financialProportion = true : '' arr[i] == '薪资数据上传' ? obj.financialUpload = true : '' arr[i] == '薪资数据导出' ? obj.financialExport = true : '' arr[i] == '导出分摊数据' ? obj.financialShare = true : '' arr[i] == '负责项目任务报表' ? obj.reportTask = true : '' arr[i] == '全部项目任务报表' ? obj.reportAllTask = true : '' arr[i] == '负责项目成本报表' ? obj.reportCostOf = true : '' arr[i] == '全部项目成本报表' ? obj.reportAllCostOf = true : '' arr[i] == '负责项目收支平衡表' ? obj.reportBalance = true : '' arr[i] == '全部项目收支平衡表' ? obj.reportAllBalance = true : '' arr[i] == '客户项目利润表' ? obj.reportProfits = true : '' arr[i] == '负责项目阶段工时表' ? obj.reportPhase = true : '' arr[i] == '全部项目阶段工时表' ? obj.reportAllPhase = true : '' arr[i] == '全公司加班情况' ? obj.reportAllOvertime = true : '' arr[i] == '负责部门加班情况' ? obj.reportOvertime = true : '' arr[i] == '请假填报' ? obj.leaveFil = true : '' arr[i] == '请假审核' ? obj.leaveAudit = true : '' arr[i] == '查看全部请假单' ? obj.leaveAll = true : '' arr[i] == '请假统计' ? obj.leaveStatistical = true : '' arr[i] == '请假流程设置' ? obj.leaveProcess = true : '' arr[i] == '年假管理' ? obj.leaveAnnual = true : '' arr[i] == '费用填报' ? obj.costFil = true : '' arr[i] == '费用审核' ? obj.costAudit = true : '' arr[i] == '查看全部报销单' ? obj.costAll = true : '' arr[i] == '审核全员日报' ? obj.projectReportReview = true : '' arr[i] == '设置财务审核人' ? obj.setFinanceAuditor = true : '' arr[i] == '出差填报' ? obj.awayOfficeFil = true : '' arr[i] == '出差审核' ? obj.awayOfficeAudit = true : '' arr[i] == '查看全部出差' ? obj.awayOfficeAll = true : '' arr[i] == '出差统计' ? obj.awayOfficeStatistical = true : '' arr[i] == '出差流程设置' ? obj.awayOfficeProcess = true : '' arr[i] == '管理专业证书' ? obj.structureCertificate = true : '' arr[i] == '查看加班成本' ? obj.reportCost = true : '' arr[i] == '下拨成本预算' ? obj.projectAllocate = true : '' arr[i] == '全部工时成本预警表' || arr[i] == '负责项目工时成本预警表' ? obj.reportCostWarning = true : '' arr[i] == '查看阶段成本' ? obj.reportPhaseCost = true : '' arr[i] == '全公司工时分配' ? obj.reportAllTimeDivide = true : '' arr[i] == '负责部门工时分配' ? obj.reportTimeDivide = true : '' arr[i] == '自定义配置' ? obj.structureCustomConfig = true : '' arr[i] == '全公司填报及时率' ? obj.reportAllTimely = true : '' arr[i] == '负责部门填报及时率' ? obj.reportTimely = true : '' arr[i] == '日报待审核统计' ? obj.reportAuditRate = true : '' arr[i] == '查看工时统计' ? obj.countHours = true : '' arr[i] == '查看成本统计' ? obj.countCost = true : '' arr[i] == '全部项目报表' ? obj.reportAllProject = true : '' arr[i] == '负责项目报表' ? obj.reportProject = true : '' arr[i] == '批量填报' ? obj.reportBatch = true : '' arr[i] == '项目阶段管理' ? obj.projectPhase = true : '' arr[i] == '全公司工时统计' ? obj.reportPersonnel = true : '' arr[i] == '负责部门工时统计' ? obj.reportResponsible = true : '' arr[i] == '查看人员数据' ? obj.countPersonnel = true : '' arr[i] == '全部任务分组工时' ? obj.reportAllGroup = true : '' arr[i] == '负责项目任务分组工时' ? obj.reportGroup = true : '' arr[i] == '全部项目成本基线表' ? obj.reportAllOutputValue = true : '' arr[i] == '负责项目成本基线表' ? obj.reportOutputValue = true : '' arr[i] == '编辑项目内任务' ? obj.editAnyTask = true : '' arr[i] == '日报导出' ? obj.reportExport = true : '' arr[i] == '手动推送工时' ? obj.reportPush = true : '' arr[i] == '查看全公司数值' ? obj.customDataAll = true : '' arr[i] == '查看全公司' ? obj.viewAllSummary = true : '' arr[i] == '查看负责部门' ? obj.viewMagDeptSummary = true : '' arr[i] == '删除出差' ? obj.awayOfficeDelete = true : '' arr[i] == '全部人员月度工时表' ? obj.reportMonthlyPersonnel = true : '' arr[i] == '负责部门月度工时表' ? obj.reportResponsiblePersonnel = true : '' arr[i] == '全部部门参与项目情况表' ? obj.reportAllDepartmentParticipation = true : '' arr[i] == '负责部门参与项目情况表' ? obj.reportResponsibleDepartmentParticipation = true : '' arr[i] == '编辑负责项目编码和名称' ? obj.projectCodeAndName = true : '' arr[i] == '全部分组阶段工时' ? obj.reportPhaseHours = true : '' arr[i] == '负责项目分组阶段工时' ? obj.reportStageWorkingTime = true : '' arr[i] == '全部部门FTE报表' ? obj.reportFTEAll = true : '' arr[i] == '负责部门FTE报表' ? obj.reportFTEPart = true : '' arr[i] == '全部部门FTE计划报表' ? obj.reportFTEPlanAll = true : '' arr[i] == '负责部门FTE计划报表' ? obj.reportFTEPlanPart = true : '' arr[i] == '有效工时率表' ? obj.reportEfficent = true : '' arr[i] == '项目预估工时表' ? obj.reportProjectEstimated = true : '' arr[i] == '任务研发报表' ? obj.taskPlanCost = true : '' arr[i] == '新增合同' ? obj.contractNew = true : '' arr[i] == '查看全部合同' ? obj.contractView = true : '' arr[i] == '管理全部合同' ? obj.contractManagement = true : '' arr[i] == '导出合同' ? obj.contractExport = true : '' arr[i] == '导入合同' ? obj.contractImport = true : '' arr[i] == '合同类型管理' ? obj.contractType = true : '' arr[i] == '审核合同' ? obj.contractAudit = true : '' arr[i] == '全部子项目工时成本' ? obj.reportAllManhourCost = true : '' arr[i] == '负责项目子项目工时成本' ? obj.reportResponsibleManhourCost = true : '' arr[i] == '修改默认文件夹' ? obj.projectEditDefaultFolder = true : '' arr[i] == '费用发放' ? obj.costExpenseRelease = true : '' arr[i] == '查看全部任务' ? obj.projectViewAllTasks = true : '' arr[i] == '项目分类工时占比表' ? obj.reportSortScaleTable = true : '' arr[i] == '分类全部工时明细表' ? obj.reportSortDetailTable = true : '' arr[i] == '分类负责部门工时明细表' ? obj.reportSortSectionDetailTable = true : '' arr[i] == '全部员工项目进度表' || arr[i] == '负责部门员工项目进度表' ? obj.reportStaffProject = true : '' arr[i] == '全部分组耗用进度表' || arr[i] == '负责部门分组耗用进度表' ? obj.reportProjectConsumptionFirst = true : '' arr[i] == '全部项目耗用进度表' || arr[i] == '负责部门项目耗用进度表' ? obj.reportProjectConsumptionTwo = true : '' arr[i] == '全部员工任务进度表' || arr[i] == '负责部门员工任务进度表' ? obj.reportStaffTaskAccomplished = true : '' arr[i] == '全部员工任务完成情况表' || arr[i] == '负责部门员工任务完成情况表' ? obj.takCompletedStatus = true : '' arr[i] == '新增立项申请' ? obj.projectApprovalNew = true : '' arr[i] == '导入立项申请' ? obj.projectApprovalImport = true : '' arr[i] == '导出立项申请' ? obj.projectApprovalExport = true : '' arr[i] == '查看全部立项申请' ? obj.projectApprovalView = true : '' arr[i] == '管理全部立项申请' ? obj.projectApprovalEdit = true : '' arr[i] == '审核立项申请' ? obj.projectApprovalCheck = true : '' arr[i] == '用户分组管理' ? obj.userGroupManage = true : '' arr[i] == '设备信息管理' ? obj.equipmentInformationManagement = true : '' arr[i] == '设备成本管理' ? obj.equipmentCostManagement = true : '' arr[i] == '奖金明细' ? obj.financialBonusDetails = true : '' arr[i] == '审核任务文件' ? obj.tasksReviewTaskFile = true : '' arr[i] == '查看他人审核文件' ? obj.viewFilesReviewedByOthers = true : '' } return obj } }; Vue.prototype.StringUtil = StringUtil; export default {};