From f842befed0884473e96142d3d0afb9ec5b17b11e Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Thu, 27 Jul 2023 11:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4backstage/hrmComsPublic/apis/common.js | 24 + .../components/AdvanceSearchFormInfo.js | 65 + .../hrmComsPublic/components/Calendar.js | 221 ++ .../hrmComsPublic/components/FormInfo.js | 144 ++ .../components/OrganizationTree.js | 47 + pc4backstage/hrmComsPublic/components/Tabs.js | 224 ++ .../hrmComsPublic/components/index.js | 13 + pc4backstage/hrmComsPublic/index.js | 13 + pc4backstage/hrmComsPublic/public/i18n.js | 63 + pc4backstage/hrmComsPublic/public/logType.js | 16 + .../hrmComsPublic/stores/baseStore.js | 377 +++ .../hrmComsPublic/style/calendar.less | 289 +++ pc4backstage/hrmengine/apis/adareaset.js | 125 + .../hrmengine/apis/adminAreaDisplaySetting.js | 15 + .../hrmengine/apis/adminDecentralization.js | 15 + pc4backstage/hrmengine/apis/annual.js | 42 + pc4backstage/hrmengine/apis/appDetach.js | 20 + pc4backstage/hrmengine/apis/archiveLogView.js | 35 + pc4backstage/hrmengine/apis/assImple.js | 27 + pc4backstage/hrmengine/apis/assItem.js | 35 + pc4backstage/hrmengine/apis/assType.js | 35 + pc4backstage/hrmengine/apis/attendance.js | 10 + .../hrmengine/apis/attendanceSetting.js | 27 + pc4backstage/hrmengine/apis/authAdjust.js | 24 + pc4backstage/hrmengine/apis/authSearch.js | 18 + .../hrmengine/apis/authorizationSetting.js | 107 + pc4backstage/hrmengine/apis/avatarSetting.js | 8 + pc4backstage/hrmengine/apis/basicImport.js | 7 + pc4backstage/hrmengine/apis/batchAdjust.js | 25 + pc4backstage/hrmengine/apis/batchEdit.js | 25 + .../hrmengine/apis/batchMaintenance.js | 21 + pc4backstage/hrmengine/apis/batchUpload.js | 18 + pc4backstage/hrmengine/apis/birthdayRemind.js | 55 + .../hrmengine/apis/browserDisplayField.js | 9 + pc4backstage/hrmengine/apis/cardItemSet.js | 23 + pc4backstage/hrmengine/apis/city.js | 11 + pc4backstage/hrmengine/apis/common.js | 25 + .../hrmengine/apis/contractExpireWarning.js | 31 + .../hrmengine/apis/contractMaintain.js | 35 + .../hrmengine/apis/contractTemplate.js | 31 + pc4backstage/hrmengine/apis/contractType.js | 35 + pc4backstage/hrmengine/apis/country.js | 11 + pc4backstage/hrmengine/apis/county.js | 11 + .../apis/decentralizationAdminSet.js | 47 + pc4backstage/hrmengine/apis/dismiss.js | 15 + pc4backstage/hrmengine/apis/duty.js | 11 + pc4backstage/hrmengine/apis/dutyType.js | 11 + pc4backstage/hrmengine/apis/edu.js | 11 + pc4backstage/hrmengine/apis/education.js | 31 + pc4backstage/hrmengine/apis/edulevel.js | 13 + pc4backstage/hrmengine/apis/elseSetting.js | 9 + pc4backstage/hrmengine/apis/employDemand.js | 35 + pc4backstage/hrmengine/apis/enginegroup.js | 47 + .../hrmengine/apis/entryMaintenance.js | 15 + pc4backstage/hrmengine/apis/formal.js | 15 + .../hrmengine/apis/funcManageDecent.js | 31 + pc4backstage/hrmengine/apis/importorg.js | 29 + pc4backstage/hrmengine/apis/importresource.js | 29 + pc4backstage/hrmengine/apis/leaveType.js | 9 + .../hrmengine/apis/levelProtection.js | 36 + .../hrmengine/apis/limitedAnalysis.js | 23 + pc4backstage/hrmengine/apis/loginFailLog.js | 19 + pc4backstage/hrmengine/apis/loginLog.js | 19 + pc4backstage/hrmengine/apis/majorset.js | 55 + pc4backstage/hrmengine/apis/matrix.js | 67 + pc4backstage/hrmengine/apis/moduleManage.js | 27 + pc4backstage/hrmengine/apis/normalLog.js | 35 + pc4backstage/hrmengine/apis/officeLocation.js | 15 + pc4backstage/hrmengine/apis/officeaddress.js | 71 + pc4backstage/hrmengine/apis/onlineAnalysis.js | 23 + .../hrmengine/apis/onlineAttendance.js | 6 + pc4backstage/hrmengine/apis/orgChart.js | 15 + .../hrmengine/apis/orgFieldDisplaySetting.js | 19 + pc4backstage/hrmengine/apis/organization.js | 146 ++ .../hrmengine/apis/organizationvirtual.js | 154 ++ pc4backstage/hrmengine/apis/otherSetting.js | 19 + pc4backstage/hrmengine/apis/paidLeave.js | 8 + .../hrmengine/apis/paidLeaveManager.js | 44 + .../hrmengine/apis/payrollManagement.js | 63 + pc4backstage/hrmengine/apis/payrollSending.js | 76 + .../apis/personalSalaryAdjustment.js | 27 + pc4backstage/hrmengine/apis/post.js | 110 + pc4backstage/hrmengine/apis/posts.js | 15 + pc4backstage/hrmengine/apis/privacySetting.js | 17 + pc4backstage/hrmengine/apis/province.js | 11 + pc4backstage/hrmengine/apis/quit.js | 15 + pc4backstage/hrmengine/apis/recruitInfo.js | 51 + pc4backstage/hrmengine/apis/recruitLibrary.js | 131 + pc4backstage/hrmengine/apis/recruitPlan.js | 79 + pc4backstage/hrmengine/apis/rehire.js | 19 + pc4backstage/hrmengine/apis/renew.js | 15 + pc4backstage/hrmengine/apis/resourceIndex.js | 5 + pc4backstage/hrmengine/apis/retire.js | 15 + pc4backstage/hrmengine/apis/roleSetting.js | 63 + pc4backstage/hrmengine/apis/rpManage.js | 35 + pc4backstage/hrmengine/apis/rpType.js | 35 + pc4backstage/hrmengine/apis/salaryApplySet.js | 19 + pc4backstage/hrmengine/apis/salaryBank.js | 35 + .../hrmengine/apis/salaryIndexMaintenance.js | 55 + .../hrmengine/apis/salaryIndexSetting.js | 35 + pc4backstage/hrmengine/apis/salaryItemsSet.js | 55 + pc4backstage/hrmengine/apis/sanyuan.js | 111 + pc4backstage/hrmengine/apis/schedule.js | 46 + pc4backstage/hrmengine/apis/secAdminLog.js | 35 + pc4backstage/hrmengine/apis/secAuditorLog.js | 35 + .../hrmengine/apis/securitySetting.js | 70 + pc4backstage/hrmengine/apis/sensitiveWord.js | 130 + pc4backstage/hrmengine/apis/serialNumber.js | 45 + .../hrmengine/apis/signatureManagement.js | 31 + pc4backstage/hrmengine/apis/specialty.js | 11 + .../hrmengine/apis/staffCareReminder.js | 66 + .../hrmengine/apis/subCompanyFieldDef.js | 43 + pc4backstage/hrmengine/apis/systemAdminLog.js | 35 + pc4backstage/hrmengine/apis/test.js | 34 + pc4backstage/hrmengine/apis/title.js | 11 + pc4backstage/hrmengine/apis/titleset.js | 31 + pc4backstage/hrmengine/apis/trainActivity.js | 125 + pc4backstage/hrmengine/apis/trainArrange.js | 87 + pc4backstage/hrmengine/apis/trainPlan.js | 59 + pc4backstage/hrmengine/apis/trainResource.js | 35 + pc4backstage/hrmengine/apis/trainTypes.js | 35 + pc4backstage/hrmengine/apis/transfer.js | 15 + pc4backstage/hrmengine/apis/trial.js | 15 + pc4backstage/hrmengine/apis/unitSet.js | 27 + pc4backstage/hrmengine/apis/workHour.js | 39 + .../hrmengine/apis/workNatureExcerpt.js | 11 + pc4backstage/hrmengine/apis/workflow.js | 41 + .../hrmengine/apis/workingDayAdjust.js | 19 + pc4backstage/hrmengine/apis/worknature.js | 31 + pc4backstage/hrmengine/components/EduLevel.js | 162 ++ pc4backstage/hrmengine/components/Home.js | 78 + pc4backstage/hrmengine/components/HrmTest.js | 186 ++ .../hrmengine/components/ResourceIndex.js | 165 ++ .../adminAreaDisplaySetting/index.js | 57 + .../components/adminDecentralization/index.js | 428 ++++ .../components/annualLeave/period/DataList.js | 77 + .../components/annualLeave/period/index.js | 97 + .../components/annualLeave/rule/DataList.js | 76 + .../components/annualLeave/rule/index.js | 97 + .../annualLeave/setting/DataList.js | 59 + .../components/annualLeave/setting/Import.js | 64 + .../components/annualLeave/setting/TabPane.js | 79 + .../components/annualLeave/setting/index.js | 109 + .../components/appDetach/DetachEdit.js | 168 ++ .../components/appDetach/DetachList.js | 144 ++ .../components/appDetach/GlobalSetting.js | 57 + .../hrmengine/components/appDetach/index.js | 131 + .../components/archiveLogView/index.js | 116 + .../hrmengine/components/area/Area.js | 1209 +++++++++ .../hrmengine/components/area/AreaTable.js | 134 + .../hrmengine/components/area/BriefInfo.js | 44 + .../hrmengine/components/area/LeftTree.js | 93 + .../components/area/NewAndEditDialog.js | 133 + .../components/area/OfficeAddress.js | 486 ++++ .../hrmengine/components/area/TabInfo.js | 121 + .../hrmengine/components/assImple/Header.js | 103 + .../components/assImple/MainDialog.js | 69 + .../components/assImple/MainTable.js | 71 + .../components/assImple/SubDialog.js | 74 + .../hrmengine/components/assImple/SubTable.js | 163 ++ .../hrmengine/components/assImple/Tab.js | 231 ++ .../components/assImple/ThirdTable.js | 92 + .../hrmengine/components/assImple/index.js | 102 + .../hrmengine/components/assItem/FormInfo.js | 119 + .../hrmengine/components/assItem/Header.js | 202 ++ .../components/assItem/MainDialog.js | 79 + .../hrmengine/components/assItem/MainTable.js | 103 + .../hrmengine/components/assItem/Tab.js | 277 ++ .../hrmengine/components/assItem/index.js | 98 + .../hrmengine/components/assType/FormInfo.js | 112 + .../hrmengine/components/assType/Group.js | 297 +++ .../hrmengine/components/assType/Header.js | 202 ++ .../components/assType/MainDialog.js | 78 + .../hrmengine/components/assType/MainTable.js | 103 + .../hrmengine/components/assType/Tab.js | 275 ++ .../hrmengine/components/assType/index.js | 98 + .../components/attendanceSetting/Content.js | 162 ++ .../components/attendanceSetting/Header.js | 106 + .../attendanceSetting/MainDialog.js | 76 + .../attendanceSetting/PageFormInfo.js | 89 + .../attendanceSetting/SubFormInfo.js | 163 ++ .../components/attendanceSetting/TableEdit.js | 40 + .../components/attendanceSetting/index.js | 101 + .../attendanceSyncSetting/FieldSetting.js | 41 + .../FieldSettingExplain.js | 45 + .../attendanceSyncSetting/SyncSetting.js | 84 + .../components/attendanceSyncSetting/index.js | 99 + .../components/authAdjust/Content.js | 178 ++ .../components/authAdjust/Dashboard.js | 96 + .../hrmengine/components/authAdjust/Result.js | 111 + .../hrmengine/components/authAdjust/Timer.js | 58 + .../hrmengine/components/authAdjust/index.js | 112 + .../components/authSearch/Content.js | 131 + .../components/authSearch/Dashboard.js | 52 + .../hrmengine/components/authSearch/index.js | 94 + .../AuthorizationGroupEditTab.js | 94 + .../authorizationSetting/AuthorizationList.js | 127 + .../components/authorizationSetting/Group.js | 160 ++ .../authorizationSetting/RoleRefs.js | 240 ++ .../components/authorizationSetting/index.js | 123 + .../components/avatarSetting/AvatarSetting.js | 135 + .../components/batchMaintenance/Dashboard.js | 67 + .../adjust/AdjustDepartment.js | 150 ++ .../adjust/AdjustLeftContainer.js | 52 + .../batchMaintenance/adjust/AdjustResource.js | 150 ++ .../adjust/AdjustRightContainer.js | 53 + .../adjust/AdjustSubCompany.js | 150 ++ .../batchMaintenance/adjust/CheckContent.js | 58 + .../batchMaintenance/adjust/index.js | 52 + .../batchMaintenance/edit/EditDepartment.js | 84 + .../edit/EditLeftContainer.js | 48 + .../batchMaintenance/edit/EditResource.js | 84 + .../edit/EditRightContainer.js | 139 ++ .../batchMaintenance/edit/EditSubCompany.js | 84 + .../batchMaintenance/edit/NeedRender.js | 29 + .../components/batchMaintenance/edit/index.js | 52 + .../components/batchMaintenance/index.js | 180 ++ .../batchMaintenance/upload/LeftContainer.js | 37 + .../batchMaintenance/upload/RightContainer.js | 143 ++ .../batchMaintenance/upload/UploadForm.js | 29 + .../batchMaintenance/upload/index.js | 68 + .../components/birthEditor/apis/index.js | 30 + .../components/body/card/Background.js | 26 + .../components/body/card/Congratulations.js | 33 + .../components/body/card/DateField.js | 39 + .../components/body/card/Header.js | 32 + .../birthEditor/components/body/card/Image.js | 28 + .../components/body/card/Personlist.js | 80 + .../birthEditor/components/body/card/index.js | 28 + .../birthEditor/components/body/index.js | 43 + .../components/body/slide/BgImg.js | 53 + .../components/body/slide/BgSet.js | 94 + .../body/slide/CongratulationSet.js | 52 + .../components/body/slide/DateSet.js | 53 + .../components/body/slide/HeadSet.js | 50 + .../components/body/slide/ImgSet.js | 73 + .../components/body/slide/PersonSet.js | 53 + .../components/body/slide/Upload.js | 43 + .../components/body/slide/index.js | 99 + .../birthEditor/components/form/Group.js | 63 + .../birthEditor/components/form/Item.js | 107 + .../birthEditor/components/form/index.js | 17 + .../birthEditor/components/head/Basic.js | 65 + .../birthEditor/components/head/Buttons.js | 42 + .../birthEditor/components/head/Fields.js | 97 + .../birthEditor/components/head/Lock.js | 42 + .../birthEditor/components/head/Revoke.js | 48 + .../birthEditor/components/head/index.js | 50 + .../birthEditor/components/index.js | 36 + .../components/birthEditor/mock/index.js | 140 ++ .../components/birthEditor/stores/index.js | 923 +++++++ .../components/birthEditor/style/body.less | 270 ++ .../components/birthEditor/style/form.less | 101 + .../components/birthEditor/style/head.less | 123 + .../components/birthEditor/util/abandon.js | 113 + .../birthEditor/util/formFactory.js | 399 +++ .../components/birthEditor/util/index.js | 39 + .../birthEditor/util/paramsToStyle.js | 121 + .../components/birthEditor/util/undoRedo.js | 75 + .../components/birthdayRemind/Add.js | 76 + .../components/birthdayRemind/AdminRemind.js | 204 ++ .../components/birthdayRemind/Birthday.js | 48 + .../birthdayRemind/EmployeeRemind.js | 218 ++ .../components/birthdayRemind/EntryRemind.js | 132 + .../components/birthdayRemind/PictureSet.js | 287 +++ .../birthdayRemind/PictureSetCopy.js | 274 ++ .../components/birthdayRemind/index.js | 242 ++ .../components/browseBoxLinkPage/Base.js | 127 + .../components/browseBoxLinkPage/City.js | 56 + .../components/browseBoxLinkPage/Country.js | 60 + .../components/browseBoxLinkPage/County.js | 56 + .../components/browseBoxLinkPage/Duty.js | 59 + .../components/browseBoxLinkPage/DutyType.js | 56 + .../components/browseBoxLinkPage/Edu.js | 56 + .../browseBoxLinkPage/OfficeLocation.js | 56 + .../components/browseBoxLinkPage/Post.js | 65 + .../components/browseBoxLinkPage/Province.js | 56 + .../components/browseBoxLinkPage/Specialty.js | 55 + .../components/browseBoxLinkPage/Title.js | 56 + .../browseBoxLinkPage/WorkNature.js | 56 + .../browserDisplayFieldSetting/Department.js | 57 + .../browserDisplayFieldSetting/EnableComs.js | 74 + .../browserDisplayFieldSetting/FieldList.js | 31 + .../browserDisplayFieldSetting/Hrm.js | 54 + .../browserDisplayFieldSetting/Subcompany.js | 57 + .../browserDisplayFieldSetting/index.js | 86 + .../components/cardItemSet/DefineShowItems.js | 99 + .../components/cardItemSet/SysShowItems.js | 270 ++ .../hrmengine/components/cardItemSet/index.js | 202 ++ .../components/contractExpireWarning/Add.js | 63 + .../contractExpireWarning/Content.js | 111 + .../contractExpireWarning/Header.js | 132 + .../contractExpireWarning/MainForm.js | 91 + .../components/contractExpireWarning/Table.js | 39 + .../components/contractExpireWarning/index.js | 91 + .../contractMaintain/DialogContent.js | 101 + .../components/contractMaintain/FormInfo.js | 145 ++ .../components/contractMaintain/Header.js | 211 ++ .../components/contractMaintain/LeftTree.js | 63 + .../components/contractMaintain/MainDialog.js | 79 + .../components/contractMaintain/MainTable.js | 136 + .../components/contractMaintain/RichText.js | 107 + .../components/contractMaintain/Tab.js | 277 ++ .../components/contractMaintain/index.js | 112 + .../components/contractTemplate/Header.js | 173 ++ .../components/contractTemplate/LeftTree.js | 63 + .../components/contractTemplate/MainDialog.js | 69 + .../components/contractTemplate/MainTable.js | 117 + .../components/contractTemplate/Tab.js | 195 ++ .../components/contractTemplate/index.js | 112 + .../components/contractType/FormInfo.js | 137 + .../components/contractType/Header.js | 199 ++ .../components/contractType/LeftTree.js | 63 + .../components/contractType/MainDialog.js | 79 + .../components/contractType/MainTable.js | 120 + .../hrmengine/components/contractType/Tab.js | 279 +++ .../components/contractType/index.js | 112 + .../decentralizationAdminSet/HocFactory.js | 20 + .../decentralizationAdminSet/SecuritySet.js | 290 +++ .../decentralizationAdminSet/index.js | 555 ++++ .../components/education/Education.js | 486 ++++ .../components/education/HocFactory.js | 22 + .../hrmengine/components/elseSetting/index.js | 115 + .../components/employmentDemand/FormInfo.js | 122 + .../components/employmentDemand/Header.js | 208 ++ .../components/employmentDemand/MainDialog.js | 78 + .../components/employmentDemand/MainTable.js | 126 + .../components/employmentDemand/Tab.js | 182 ++ .../components/employmentDemand/index.js | 93 + .../components/enginegroup/AddGpMember.js | 64 + .../components/enginegroup/GroupSetting.js | 224 ++ .../components/enginegroup/NeForm.js | 51 + .../components/enginegroup/NewEngineGroup.js | 98 + .../hrmengine/components/enginegroup/index.js | 481 ++++ .../components/entryMaintenance/index.js | 249 ++ .../components/external/outSignAppSetting.js | 103 + .../components/funcManageDecent/FormInfo.js | 171 ++ .../components/funcManageDecent/Header.js | 188 ++ .../components/funcManageDecent/MainDialog.js | 80 + .../components/funcManageDecent/MainTable.js | 100 + .../components/funcManageDecent/Tab.js | 263 ++ .../components/funcManageDecent/index.js | 118 + .../generalWorkingHours/BasicSet.js | 101 + .../generalWorkingHours/FormInfo.js | 114 + .../components/generalWorkingHours/Header.js | 210 ++ .../generalWorkingHours/LeftTree.js | 63 + .../generalWorkingHours/MainDialog.js | 121 + .../generalWorkingHours/MainTableInfo.js | 226 ++ .../components/generalWorkingHours/Search.js | 151 ++ .../generalWorkingHours/SpecialForm.js | 107 + .../generalWorkingHours/StaticFormInfo.js | 124 + .../generalWorkingHours/SubDialog.js | 77 + .../generalWorkingHours/TableEdit.js | 94 + .../generalWorkingHours/WorkHourTab.js | 95 + .../components/generalWorkingHours/index.js | 129 + .../components/humanStatusChange/Dismiss.js | 228 ++ .../components/humanStatusChange/Formal.js | 228 ++ .../humanStatusChange/HocFactory.js | 21 + .../components/humanStatusChange/Info.js | 49 + .../components/humanStatusChange/Quit.js | 228 ++ .../components/humanStatusChange/Rehire.js | 228 ++ .../components/humanStatusChange/Renew.js | 228 ++ .../components/humanStatusChange/Retire.js | 228 ++ .../components/humanStatusChange/Transfer.js | 228 ++ .../components/humanStatusChange/Trial.js | 228 ++ .../hrmengine/components/import/index.js | 204 ++ .../importExternalAttendanceData/index.js | 112 + .../importRelatedComponet/ImportHistory.js | 119 + .../importRelatedComponet/ImportLog.js | 172 ++ .../importRelatedComponet/ImportResult.js | 227 ++ .../components/importRelatedComponet/index.js | 278 +++ .../hrmengine/components/importorg/Import.js | 235 ++ .../components/importorg/ImportHistory.js | 100 + .../components/importorg/ImportLog.js | 137 + .../components/importorg/ImportResult.js | 131 + .../components/importresource/Import.js | 356 +++ .../importresource/ImportHistory.js | 137 + .../components/importresource/ImportLog.js | 175 ++ .../components/importresource/ImportResult.js | 185 ++ .../hrmengine/components/leaveType/index.js | 93 + .../components/levelProtection/BasicInfo.js | 106 + .../components/levelProtection/Tab.js | 43 + .../components/levelProtection/Table.js | 42 + .../components/levelProtection/Top.js | 45 + .../components/levelProtection/index.js | 61 + .../components/limitedAnalysis/Echarts.js | 78 + .../components/limitedAnalysis/RadioGroup.js | 42 + .../components/limitedAnalysis/index.js | 196 ++ .../components/loginFailLog/index.js | 437 ++++ .../hrmengine/components/loginLog/index.js | 483 ++++ .../hrmengine/components/major/HocFactory.js | 20 + .../hrmengine/components/major/Major.js | 520 ++++ .../hrmengine/components/matrix/Dashboard.js | 94 + .../hrmengine/components/matrix/DataList.js | 101 + .../components/matrix/DataListPagination.js | 33 + .../hrmengine/components/matrix/FieldItem.js | 225 ++ .../components/matrix/HiddenTable.js | 32 + .../hrmengine/components/matrix/MatrixCard.js | 88 + .../matrix/MatrixDataMaintenance.js | 90 + .../matrix/MatrixDataMaintenanceView.js | 171 ++ .../hrmengine/components/matrix/MatrixEdit.js | 146 ++ .../components/matrix/MatrixFieldSetting.js | 79 + .../components/matrix/MatrixMaintenance.js | 17 + .../hrmengine/components/matrix/Screen.js | 157 ++ .../matrix/SubCompanyDisplaySetting.js | 118 + .../hrmengine/components/matrix/index.js | 150 ++ .../matrix/maintenance/ColumnSetting.js | 55 + .../matrix/maintenance/ConditionSetting.js | 54 + .../matrix/maintenance/MaintenanceLevel.js | 22 + .../matrix/maintenance/MaintenanceListView.js | 120 + .../maintenance/MaintenanceSettingView.js | 49 + .../matrix/maintenance/Maintenancer.js | 54 + .../matrix/maintenance/MatrixMaintenance.js | 20 + .../components/matrixAdjust/Content.js | 44 + .../components/matrixAdjust/Dashboard.js | 70 + .../components/matrixAdjust/Result.js | 62 + .../components/matrixAdjust/Timer.js | 58 + .../components/matrixAdjust/index.js | 100 + .../components/moduleManage/Editor.js | 182 ++ .../components/moduleManage/index.js | 465 ++++ .../hrmengine/components/newPost/AsyncTree.js | 99 + .../hrmengine/components/newPost/BriefInfo.js | 42 + .../hrmengine/components/newPost/Content.js | 59 + .../hrmengine/components/newPost/Dialog.js | 67 + .../hrmengine/components/newPost/OrgTree.js | 61 + .../hrmengine/components/newPost/Tab.js | 47 + .../hrmengine/components/newPost/Table.js | 110 + .../hrmengine/components/newPost/Top.js | 46 + .../hrmengine/components/newPost/index.js | 76 + .../hrmengine/components/normalLog/index.js | 116 + .../components/onlinAttendance/index.js | 102 + .../components/onlineAnalysis/Echarts.js | 78 + .../components/onlineAnalysis/RadioGroup.js | 47 + .../components/onlineAnalysis/index.js | 194 ++ .../hrmengine/components/orgChart/Chart.js | 32 + .../hrmengine/components/orgChart/index.js | 122 + .../components/orgFieldDisplaySetting/Form.js | 27 + .../orgFieldDisplaySetting/Header.js | 43 + .../orgFieldDisplaySetting/index.js | 95 + .../organization/NewAndEditDialog.js | 183 ++ .../components/organization/Organization.js | 608 +++++ .../organization/OrganizationInfo.js | 85 + .../organization/OrganizationList.js | 328 +++ .../organization/OrganizationTabInfo.js | 146 ++ .../organization/OrganizationTree.js | 122 + .../organization/ResourceAddToVirtual.js | 127 + .../organization/ResourceSetManagerVirtual.js | 122 + .../components/otherSetting/FormInfo.js | 129 + .../components/otherSetting/index.js | 82 + .../hrmengine/components/paidLeave/index.js | 109 + .../paidLeaveManager/period/DataList.js | 76 + .../paidLeaveManager/period/index.js | 113 + .../paidLeaveManager/rule/DataList.js | 76 + .../components/paidLeaveManager/rule/index.js | 113 + .../paidLeaveManager/setting/DataList.js | 57 + .../paidLeaveManager/setting/Import.js | 64 + .../paidLeaveManager/setting/TabPane.js | 79 + .../paidLeaveManager/setting/index.js | 126 + .../paidLeaveTimeSetting/DataList.js | 48 + .../components/paidLeaveTimeSetting/index.js | 123 + .../components/payrollManagement/Editor.js | 140 ++ .../components/payrollManagement/LeftTree.js | 64 + .../components/payrollManagement/index.js | 647 +++++ .../components/payrollSending/DatasProcess.js | 31 + .../components/payrollSending/DispatchImg.js | 56 + .../components/payrollSending/ImportFail.js | 66 + .../components/payrollSending/ImportResult.js | 105 + .../components/payrollSending/index.js | 149 ++ .../personalSalaryAdjustment/Editor.js | 79 + .../personalSalaryAdjustment/Table.js | 35 + .../personalSalaryAdjustment/index.js | 325 +++ .../hrmengine/components/post/AreaTable.js | 105 + .../hrmengine/components/post/BriefInfo.js | 47 + .../hrmengine/components/post/HocFactory.js | 40 + .../hrmengine/components/post/LeftTree.js | 55 + .../components/post/NewAndEditDialog.js | 104 + .../hrmengine/components/post/Post.js | 801 ++++++ .../hrmengine/components/post/TabInfo.js | 130 + .../components/privacySetting/Info.js | 28 + .../components/privacySetting/Item.js | 35 + .../components/privacySetting/Setting.js | 39 + .../components/privacySetting/ShowSetCol.js | 93 + .../components/privacySetting/index.js | 109 + .../components/recruitInfo/FormInfo.js | 97 + .../components/recruitInfo/MainDialog.js | 86 + .../components/recruitInfo/MainTab.js | 54 + .../components/recruitInfo/MainTable.js | 83 + .../components/recruitInfo/Schedule.js | 65 + .../components/recruitInfo/SubTab.js | 66 + .../components/recruitInfo/TableEdit.js | 66 + .../hrmengine/components/recruitInfo/Top.js | 68 + .../hrmengine/components/recruitInfo/index.js | 100 + .../components/recruitLibrary/FormInfo.js | 141 ++ .../recruitLibrary/FormInfoWithTable.js | 43 + .../components/recruitLibrary/MainDialog.js | 96 + .../components/recruitLibrary/MainTab.js | 68 + .../components/recruitLibrary/MainTable.js | 81 + .../components/recruitLibrary/Print.js | 157 ++ .../components/recruitLibrary/SubDialog.js | 56 + .../components/recruitLibrary/SubTab.js | 45 + .../components/recruitLibrary/SubTable.js | 49 + .../components/recruitLibrary/TableEdit.js | 68 + .../components/recruitLibrary/Top.js | 80 + .../components/recruitLibrary/index.js | 113 + .../components/recruitPlan/FormInfo.js | 95 + .../components/recruitPlan/MainDialog.js | 86 + .../components/recruitPlan/MainTab.js | 63 + .../components/recruitPlan/MainTable.js | 67 + .../components/recruitPlan/SubDialog.js | 52 + .../components/recruitPlan/SubTab.js | 67 + .../components/recruitPlan/TableEdit.js | 62 + .../hrmengine/components/recruitPlan/Top.js | 75 + .../hrmengine/components/recruitPlan/index.js | 101 + .../hrmengine/components/role/AddRole.js | 70 + .../hrmengine/components/role/RoleEdit.js | 255 ++ .../components/role/RoleEditDialog.js | 84 + .../hrmengine/components/role/RoleInfo.js | 335 +++ .../components/role/RoleInfoSingle.js | 299 +++ .../hrmengine/components/role/RoleList.js | 193 ++ .../hrmengine/components/role/index.js | 128 + .../hrmengine/components/rpManage/FormInfo.js | 119 + .../hrmengine/components/rpManage/Header.js | 202 ++ .../components/rpManage/MainDialog.js | 79 + .../components/rpManage/MainTable.js | 132 + .../hrmengine/components/rpManage/Tab.js | 265 ++ .../hrmengine/components/rpManage/index.js | 98 + .../hrmengine/components/rpType/FormInfo.js | 119 + .../hrmengine/components/rpType/Header.js | 202 ++ .../hrmengine/components/rpType/MainDialog.js | 79 + .../hrmengine/components/rpType/MainTable.js | 103 + .../hrmengine/components/rpType/Tab.js | 279 +++ .../hrmengine/components/rpType/index.js | 98 + .../components/salaryApplySet/index.js | 49 + .../hrmengine/components/salaryBank/Editor.js | 121 + .../hrmengine/components/salaryBank/index.js | 442 ++++ .../salaryIndexMaintenance/Editor.js | 359 +++ .../salaryIndexMaintenance/ImportResult.js | 121 + .../salaryIndexMaintenance/LeftTree.js | 64 + .../salaryIndexMaintenance/index.js | 458 ++++ .../components/salaryIndexSetting/Editor.js | 142 ++ .../components/salaryIndexSetting/LeftTree.js | 63 + .../components/salaryIndexSetting/index.js | 474 ++++ .../components/salaryItemsSet/Calculator.js | 187 ++ .../salaryItemsSet/CalculatorCopy.js | 147 ++ .../components/salaryItemsSet/FormInfo.js | 240 ++ .../components/salaryItemsSet/FormulaSet.js | 289 +++ .../components/salaryItemsSet/Header.js | 205 ++ .../components/salaryItemsSet/ItemsSet.js | 321 +++ .../components/salaryItemsSet/LeftTree.js | 63 + .../components/salaryItemsSet/LevelSet.js | 139 ++ .../components/salaryItemsSet/MainDialog.js | 110 + .../salaryItemsSet/MainTableInfo.js | 206 ++ .../components/salaryItemsSet/Search.js | 172 ++ .../components/salaryItemsSet/StandardSet.js | 70 + .../components/salaryItemsSet/SubDialog.js | 144 ++ .../components/salaryItemsSet/TaxRateSet.js | 314 +++ .../components/salaryItemsSet/TextArea.js | 27 + .../components/salaryItemsSet/TextAreaCopy.js | 27 + .../components/salaryItemsSet/index.js | 121 + .../components/sanyuan/Processing.js | 30 + .../hrmengine/components/sanyuan/index.js | 194 ++ .../schedulingSetting/CalendarScheduling.js | 61 + .../schedule/schedulingSetting/DataList.js | 90 + .../schedulingSetting/ScheduleList.js | 47 + .../schedulingSetting/SchedulingInfo.js | 174 ++ .../schedulingSetting/SchedulingMember.js | 128 + .../schedule/schedulingSetting/Setting.js | 189 ++ .../schedule/schedulingSetting/index.js | 145 ++ .../schedule/shiftsSetting/DataList.js | 130 + .../schedule/shiftsSetting/DetailSetting.js | 155 ++ .../schedule/shiftsSetting/Setting.js | 112 + .../shiftsSetting/ShiftsSettingInfo.js | 176 ++ .../schedule/shiftsSetting/index.js | 119 + .../components/schedule/workTime/DataList.js | 108 + .../components/schedule/workTime/index.js | 106 + .../hrmengine/components/secAdminLog/index.js | 116 + .../components/secAuditorLog/index.js | 116 + .../securitySetting/AdvanceSetting.js | 39 + .../securitySetting/BasicSetting.js | 39 + .../components/securitySetting/ButtonIcons.js | 40 + .../components/securitySetting/DbSetting.js | 39 + .../components/securitySetting/Dialog.js | 33 + .../securitySetting/DialogContent.js | 43 + .../securitySetting/NetworkSetting.js | 144 ++ .../components/securitySetting/Table.js | 30 + .../components/securitySetting/index.js | 225 ++ .../components/sensitiveWord/List.js | 115 + .../components/sensitiveWord/Setting.js | 34 + .../components/serialNumber/DeptNumberSet.js | 68 + .../serialNumber/NumberComposition.js | 101 + .../components/serialNumber/NumberFlowRule.js | 55 + .../components/serialNumber/PostNumberSet.js | 69 + .../serialNumber/ResourceNumberSet.js | 68 + .../serialNumber/StartReservedNumberSet.js | 235 ++ .../components/serialNumber/SubNumberSet.js | 68 + .../components/signatureManagement/Editor.js | 212 ++ .../signatureManagement/LeftTree.js | 74 + .../components/signatureManagement/index.js | 475 ++++ .../staffCareReminder/AdminRemind.js | 110 + .../components/staffCareReminder/AuthForm.js | 47 + .../staffCareReminder/BirthdayRemind.js | 53 + .../staffCareReminder/DispatchImgDialog.js | 41 + .../staffCareReminder/EmployeeRemind.js | 52 + .../staffCareReminder/EmployeeRemindNew.js | 15 + .../staffCareReminder/EntryRemind.js | 53 + .../staffCareReminder/GreetingSetDialog.js | 15 + .../components/staffCareReminder/Picture.js | 122 + .../components/staffCareReminder/PreView.js | 161 ++ .../components/staffCareReminder/Tab.js | 39 + .../components/staffCareReminder/Table.js | 30 + .../components/staffCareReminder/Top.js | 62 + .../components/staffCareReminder/Upload.js | 65 + .../components/staffCareReminder/index.js | 69 + .../subCompanyFieldDef/EncryptSetting.js | 26 + .../components/subCompanyFieldDef/FieldDef.js | 178 ++ .../components/subCompanyFieldDef/Tip.js | 13 + .../subCompanyFieldDef/ViewRangeForm.js | 16 + .../subCompanyFieldDef/ViewRangeSetting.js | 21 + .../components/subCompanyFieldDef/index.js | 210 ++ .../components/systemAdminLog/index.js | 116 + .../hrmengine/components/title/HocFactory.js | 20 + .../hrmengine/components/title/Title.js | 494 ++++ .../components/trainActivity/ActivityTab.js | 187 ++ .../components/trainActivity/FormInfo.js | 122 + .../components/trainActivity/Header.js | 234 ++ .../components/trainActivity/MainDialog.js | 123 + .../components/trainActivity/MainTable.js | 146 ++ .../components/trainActivity/SubDialog.js | 135 + .../components/trainActivity/SubTab.js | 199 ++ .../components/trainActivity/SubTable.js | 171 ++ .../components/trainActivity/ThirdTab.js | 93 + .../components/trainActivity/ThirdTable.js | 114 + .../components/trainActivity/index.js | 106 + .../components/trainArrange/FormInfo.js | 147 ++ .../components/trainArrange/Header.js | 247 ++ .../components/trainArrange/MainDialog.js | 194 ++ .../components/trainArrange/MainTableInfo.js | 177 ++ .../components/trainArrange/Search.js | 167 ++ .../components/trainArrange/SingleArrange.js | 231 ++ .../components/trainArrange/SpecialForm.js | 182 ++ .../components/trainArrange/SubDialog.js | 78 + .../components/trainArrange/SubTableInfo.js | 223 ++ .../trainArrange/TrainArrangeTabInfo.js | 165 ++ .../components/trainArrange/TrainSchedule.js | 100 + .../components/trainArrange/index.js | 104 + .../components/trainPlan/AddTestForm.js | 151 ++ .../hrmengine/components/trainPlan/Editor.js | 175 ++ .../hrmengine/components/trainPlan/Test.js | 155 ++ .../hrmengine/components/trainPlan/index.js | 525 ++++ .../components/trainResource/Editor.js | 153 ++ .../components/trainResource/index.js | 472 ++++ .../hrmengine/components/trainTypes/Editor.js | 153 ++ .../hrmengine/components/trainTypes/index.js | 496 ++++ .../components/unitSet/HocFactory.js | 20 + .../hrmengine/components/unitSet/index.js | 349 +++ .../components/workflowSetting/ActionList.js | 50 + .../components/workflowSetting/DataList.js | 215 ++ .../components/workflowSetting/EntrySelect.js | 69 + .../components/workflowSetting/FieldList.js | 193 ++ .../components/workflowSetting/index.js | 139 ++ .../components/workingDayAdjust/AddData.js | 39 + .../workingDayAdjust/ConditionBar.js | 114 + .../components/workingDayAdjust/Content.js | 88 + .../components/workingDayAdjust/DateSwitch.js | 63 + .../components/workingDayAdjust/index.js | 97 + .../components/worknature/HocFactory.js | 20 + .../components/worknature/WorkNature.js | 494 ++++ .../hrmengine/coms/AdvanceSearchFormInfo.js | 143 ++ pc4backstage/hrmengine/coms/Calendar.js | 227 ++ pc4backstage/hrmengine/coms/Editor.js | 134 + pc4backstage/hrmengine/coms/EditorDialog.js | 88 + pc4backstage/hrmengine/coms/FormInfo.js | 151 ++ pc4backstage/hrmengine/coms/FormInfo_old.js | 191 ++ .../hrmengine/coms/NewAndEditDialog.js | 162 ++ .../hrmengine/coms/OrganizationTree.js | 48 + pc4backstage/hrmengine/coms/Tabs.js | 220 ++ pc4backstage/hrmengine/debug.js | 45 + pc4backstage/hrmengine/index.js | 348 +++ pc4backstage/hrmengine/jsconfig.json | 5 + .../hrmengine/public/ConfigurableForm.js | 318 +++ .../hrmengine/public/coms/Authority.js | 53 + pc4backstage/hrmengine/public/coms/Form.js | 40 + pc4backstage/hrmengine/public/coms/Table.js | 24 + pc4backstage/hrmengine/public/coms/Top.js | 36 + pc4backstage/hrmengine/public/coms/index.js | 11 + pc4backstage/hrmengine/public/constant.js | 77 + pc4backstage/hrmengine/public/i18n.js | 1030 ++++++++ pc4backstage/hrmengine/public/learn.js | 228 ++ pc4backstage/hrmengine/public/logType.js | 158 ++ pc4backstage/hrmengine/public/pulic-func.js | 371 +++ pc4backstage/hrmengine/public/sweet-form.js | 304 +++ .../public/valhalla/components/AccountIcon.js | 45 + .../public/valhalla/components/AddButton.js | 19 + .../public/valhalla/components/Authority.js | 54 + .../public/valhalla/components/CenterSpin.js | 39 + .../valhalla/components/DeleteButton.js | 15 + .../public/valhalla/components/Dialog.js | 41 + .../public/valhalla/components/MagicForm.js | 295 +++ .../public/valhalla/components/OrgTree.js | 49 + .../public/valhalla/components/RadioGroup.js | 39 + .../public/valhalla/components/Search.js | 53 + .../public/valhalla/components/Table.js | 39 + .../public/valhalla/components/Top.js | 36 + .../importRelatedComponet/ImportHistory.js | 118 + .../importRelatedComponet/ImportLog.js | 174 ++ .../importRelatedComponet/ImportResult.js | 226 ++ .../components/importRelatedComponet/index.js | 260 ++ .../public/valhalla/components/index.js | 27 + .../public/valhalla/stores/authority.js | 34 + .../public/valhalla/stores/dialog.js | 67 + .../hrmengine/public/valhalla/stores/form.js | 137 + .../public/valhalla/stores/importCommon.js | 430 ++++ .../hrmengine/public/valhalla/stores/index.js | 21 + .../public/valhalla/stores/orgTree.js | 50 + .../public/valhalla/stores/radioGroup.js | 56 + .../public/valhalla/stores/search.js | 208 ++ .../hrmengine/public/valhalla/stores/table.js | 99 + .../hrmengine/public/valhalla/stores/top.js | 149 ++ .../public/valhalla/style/addButton.less | 14 + .../public/valhalla/style/deleteButton.less | 12 + .../public/valhalla/style/magicForm.less | 22 + pc4backstage/hrmengine/reportSensitiveWord.js | 94 + pc4backstage/hrmengine/single.js | 42 + pc4backstage/hrmengine/stores/adareaset.js | 1257 ++++++++++ .../stores/adminAreaDisplaySetting.js | 92 + .../hrmengine/stores/adminDecentralization.js | 301 +++ pc4backstage/hrmengine/stores/annualPeriod.js | 279 +++ pc4backstage/hrmengine/stores/annualRule.js | 272 ++ .../hrmengine/stores/annualSetting.js | 473 ++++ pc4backstage/hrmengine/stores/appDetach.js | 621 +++++ .../hrmengine/stores/archiveLogView.js | 384 +++ pc4backstage/hrmengine/stores/assImple.js | 230 ++ pc4backstage/hrmengine/stores/assItem.js | 291 +++ pc4backstage/hrmengine/stores/assType.js | 351 +++ .../hrmengine/stores/attendanceSetting.js | 311 +++ .../hrmengine/stores/attendanceSyncSetting.js | 208 ++ pc4backstage/hrmengine/stores/authAdjust.js | 995 ++++++++ pc4backstage/hrmengine/stores/authSearch.js | 470 ++++ .../hrmengine/stores/authorizationSetting.js | 813 ++++++ .../hrmengine/stores/avatarSetting.js | 76 + pc4backstage/hrmengine/stores/baseStore.js | 619 +++++ pc4backstage/hrmengine/stores/batchAdjust.js | 577 +++++ pc4backstage/hrmengine/stores/batchEdit.js | 697 ++++++ .../hrmengine/stores/batchMaintenance.js | 466 ++++ .../hrmengine/stores/batchUploadPhoto.js | 253 ++ .../hrmengine/stores/birthdayRemind.js | 698 ++++++ .../hrmengine/stores/browseBoxLinkPage.js | 254 ++ .../stores/browserDisplayFieldSetting.js | 238 ++ pc4backstage/hrmengine/stores/cardItemSet.js | 349 +++ .../hrmengine/stores/contractExpireWarning.js | 264 ++ .../hrmengine/stores/contractMaintain.js | 464 ++++ .../hrmengine/stores/contractTemplate.js | 290 +++ pc4backstage/hrmengine/stores/contractType.js | 356 +++ pc4backstage/hrmengine/stores/datas.js | 16 + .../stores/decentralizationAdminSet.js | 769 ++++++ pc4backstage/hrmengine/stores/dismiss.js | 158 ++ .../hrmengine/stores/domain/Search.js | 116 + .../hrmengine/stores/domain/authority.js | 26 + .../hrmengine/stores/domain/dialog.js | 40 + pc4backstage/hrmengine/stores/domain/form.js | 50 + pc4backstage/hrmengine/stores/domain/index.js | 17 + .../hrmengine/stores/domain/orgTree.js | 52 + pc4backstage/hrmengine/stores/domain/table.js | 47 + pc4backstage/hrmengine/stores/domain/top.js | 118 + pc4backstage/hrmengine/stores/education.js | 388 +++ pc4backstage/hrmengine/stores/edulevel.js | 54 + .../hrmengine/stores/elseSettingStore.js | 45 + pc4backstage/hrmengine/stores/employDemand.js | 318 +++ pc4backstage/hrmengine/stores/enginegroup.js | 628 +++++ .../hrmengine/stores/entryMaintenance.js | 156 ++ .../stores/external/outSignAppSetting.js | 71 + pc4backstage/hrmengine/stores/formal.js | 167 ++ .../hrmengine/stores/funcManageDecent.js | 408 +++ .../hrmengine/stores/generalWorkingHours.js | 1075 ++++++++ pc4backstage/hrmengine/stores/import.js | 56 + pc4backstage/hrmengine/stores/importCommon.js | 458 ++++ .../stores/importExternalAttendance.js | 103 + pc4backstage/hrmengine/stores/importorg.js | 186 ++ .../hrmengine/stores/importresource.js | 370 +++ pc4backstage/hrmengine/stores/index.js | 585 +++++ pc4backstage/hrmengine/stores/leaveType.js | 270 ++ .../hrmengine/stores/levelProtection.js | 499 ++++ .../hrmengine/stores/limitedAnalysis.js | 267 ++ pc4backstage/hrmengine/stores/loginFailLog.js | 223 ++ pc4backstage/hrmengine/stores/loginLog.js | 265 ++ pc4backstage/hrmengine/stores/majorset.js | 386 +++ pc4backstage/hrmengine/stores/matirx.js | 474 ++++ .../hrmengine/stores/matirxDataMaintenance.js | 759 ++++++ .../hrmengine/stores/matirxFieldSetting.js | 304 +++ pc4backstage/hrmengine/stores/matrixAdjust.js | 662 +++++ .../hrmengine/stores/matrixMaintenance.js | 689 +++++ pc4backstage/hrmengine/stores/moduleManage.js | 434 ++++ pc4backstage/hrmengine/stores/newPost.js | 1115 +++++++++ pc4backstage/hrmengine/stores/normalLog.js | 385 +++ .../hrmengine/stores/officeaddress.js | 383 +++ .../hrmengine/stores/onlineAnalysis.js | 324 +++ .../hrmengine/stores/onlineAttendance.js | 148 ++ pc4backstage/hrmengine/stores/orgChart.js | 263 ++ .../stores/orgFieldDisplaySetting.js | 167 ++ pc4backstage/hrmengine/stores/organization.js | 1177 +++++++++ pc4backstage/hrmengine/stores/otherSetting.js | 152 ++ pc4backstage/hrmengine/stores/paidLeave.js | 171 ++ .../hrmengine/stores/paidLeavePeriod.js | 329 +++ .../hrmengine/stores/paidLeaveRule.js | 337 +++ .../hrmengine/stores/paidLeaveSetting.js | 463 ++++ .../hrmengine/stores/paidLeaveTimeSetting.js | 245 ++ .../hrmengine/stores/payrollManagement.js | 985 ++++++++ .../hrmengine/stores/payrollSending.js | 963 +++++++ .../stores/personalSalaryAdjustment.js | 312 +++ pc4backstage/hrmengine/stores/postset.js | 817 ++++++ .../hrmengine/stores/privacySetting.js | 358 +++ pc4backstage/hrmengine/stores/quit.js | 147 ++ pc4backstage/hrmengine/stores/recruitInfo.js | 953 +++++++ .../hrmengine/stores/recruitLibrary.js | 1528 +++++++++++ pc4backstage/hrmengine/stores/recruitPlan.js | 1076 ++++++++ pc4backstage/hrmengine/stores/rehire.js | 201 ++ pc4backstage/hrmengine/stores/renew.js | 178 ++ .../hrmengine/stores/resourceIndex.js | 58 + pc4backstage/hrmengine/stores/retire.js | 167 ++ pc4backstage/hrmengine/stores/roleSetting.js | 1329 ++++++++++ pc4backstage/hrmengine/stores/rpManage.js | 302 +++ pc4backstage/hrmengine/stores/rpType.js | 291 +++ .../hrmengine/stores/salaryApplySet.js | 127 + pc4backstage/hrmengine/stores/salaryBank.js | 325 +++ .../stores/salaryIndexMaintenance.js | 860 +++++++ .../hrmengine/stores/salaryIndexSetting.js | 427 ++++ .../hrmengine/stores/salaryItemsSet.js | 1696 +++++++++++++ pc4backstage/hrmengine/stores/sanyuan.js | 1260 ++++++++++ .../hrmengine/stores/scheduleShiftsSetting.js | 503 ++++ .../hrmengine/stores/scheduleWorkTime.js | 307 +++ .../hrmengine/stores/schedulingSetting.js | 776 ++++++ pc4backstage/hrmengine/stores/secAdminLog.js | 385 +++ .../hrmengine/stores/secAuditorLog.js | 385 +++ .../hrmengine/stores/securitySetting.js | 2219 ++++++++++++++++ .../hrmengine/stores/sensitiveWord/list.js | 831 ++++++ .../hrmengine/stores/sensitiveWord/setting.js | 105 + .../stores/serialNumber/deptNumberSetting.js | 220 ++ .../stores/serialNumber/numberComposition.js | 302 +++ .../stores/serialNumber/numberFlowRule.js | 133 + .../stores/serialNumber/postNumberSetting.js | 206 ++ .../serialNumber/resourceNumberSetting.js | 239 ++ .../serialNumber/startReservedNumberSet.js | 685 +++++ .../stores/serialNumber/subNumberSetting.js | 207 ++ .../hrmengine/stores/signatureManagement.js | 395 +++ .../hrmengine/stores/staffCareReminder.js | 865 +++++++ .../hrmengine/stores/subCompanyFieldDef.js | 2223 +++++++++++++++++ .../hrmengine/stores/systemAdminLog.js | 385 +++ pc4backstage/hrmengine/stores/test.js | 56 + pc4backstage/hrmengine/stores/titleset.js | 388 +++ .../hrmengine/stores/trainActivity.js | 936 +++++++ pc4backstage/hrmengine/stores/trainArrange.js | 875 +++++++ pc4backstage/hrmengine/stores/trainPlan.js | 549 ++++ .../hrmengine/stores/trainResource.js | 333 +++ pc4backstage/hrmengine/stores/trainTypes.js | 333 +++ pc4backstage/hrmengine/stores/transfer.js | 170 ++ pc4backstage/hrmengine/stores/trial.js | 166 ++ pc4backstage/hrmengine/stores/unitSet.js | 273 ++ .../hrmengine/stores/workflowSetting.js | 1368 ++++++++++ .../hrmengine/stores/workingDayAdjust.js | 577 +++++ pc4backstage/hrmengine/stores/worknature.js | 388 +++ .../style/adminAreaDisplaySetting.less | 42 + pc4backstage/hrmengine/style/annual.less | 4 + pc4backstage/hrmengine/style/appDetach.less | 8 + pc4backstage/hrmengine/style/area.css | 73 + pc4backstage/hrmengine/style/assType.css | 31 + .../hrmengine/style/attendanceSetting.css | 14 + .../hrmengine/style/attendanceSynSetting.less | 39 + pc4backstage/hrmengine/style/authAdjust.less | 163 ++ pc4backstage/hrmengine/style/authSearch.less | 24 + .../hrmengine/style/batchMaintenance.less | 192 ++ pc4backstage/hrmengine/style/birthday.css | 91 + .../style/browserDisplayFieldSetting.less | 45 + pc4backstage/hrmengine/style/calendar.less | 289 +++ pc4backstage/hrmengine/style/cardItemSet.less | 10 + .../hrmengine/style/checkContent.less | 67 + pc4backstage/hrmengine/style/common.less | 333 +++ pc4backstage/hrmengine/style/fieldDef.less | 15 + pc4backstage/hrmengine/style/funcDecent.css | 42 + pc4backstage/hrmengine/style/icon.less | 139 ++ pc4backstage/hrmengine/style/import.css | 86 + pc4backstage/hrmengine/style/index.js | 2 + pc4backstage/hrmengine/style/leaveType.less | 5 + .../hrmengine/style/levelProtection.less | 49 + pc4backstage/hrmengine/style/matrix.less | 176 ++ .../hrmengine/style/matrixAdjust.less | 243 ++ .../style/matrixDataMaintenance.less | 175 ++ .../hrmengine/style/matrixFieldSetting.less | 125 + pc4backstage/hrmengine/style/moduleManage.css | 15 + pc4backstage/hrmengine/style/newPost.less | 43 + .../hrmengine/style/onlineAnalysis.css | 7 + .../hrmengine/style/onlineAttendance.less | 6 + pc4backstage/hrmengine/style/orgChart.less | 22 + .../hrmengine/style/paidLeaveSetting.less | 13 + pc4backstage/hrmengine/style/paidLevel.less | 29 + .../hrmengine/style/payrollManagement.css | 3 + .../hrmengine/style/payrollManagement.less | 10 + .../hrmengine/style/payrollSending.less | 174 ++ .../style/personalSalaryAdjustment.css | 10 + .../style/personalSalaryAdjustment.less | 11 + .../hrmengine/style/privacySetting.less | 40 + .../hrmengine/style/resourceIndex.less | 113 + pc4backstage/hrmengine/style/roleSetting.less | 5 + pc4backstage/hrmengine/style/rpManage.css | 3 + .../style/salaryIndexMaintenance.css | 38 + .../hrmengine/style/salaryItemsSet.css | 134 + pc4backstage/hrmengine/style/sanyuan.less | 142 ++ pc4backstage/hrmengine/style/sanyuanLog.less | 53 + .../hrmengine/style/schedulingSetting.less | 229 ++ .../hrmengine/style/searchGroupRelated.css | 7 + .../hrmengine/style/securitySetting.less | 129 + .../hrmengine/style/serialNumber.less | 164 ++ .../hrmengine/style/shitfsSetting.less | 188 ++ .../hrmengine/style/staffCareReminder.less | 81 + .../hrmengine/style/trainActivity.css | 7 + pc4backstage/hrmengine/style/trainArrange.css | 15 + pc4backstage/hrmengine/style/trainPlan.css | 3 + pc4backstage/hrmengine/style/workHour.css | 28 + .../hrmengine/style/workflowSetting.less | 45 + .../hrmengine/style/workingDayAdjust.less | 83 + pc4backstage/hrmengine/style/worktime.less | 18 + pc4backstage/hrmengine/util/PASSUtil.js | 127 + pc4backstage/hrmengine/util/RSAUtil.js | 30 + pc4backstage/hrmengine/util/index.js | 372 +++ .../hrmengine/util/organization-func.js | 34 + pc4backstage/hrmengine/util/pulic-func.js | 311 +++ pc4backstage/hrmengine/util/pure-util.js | 37 + pc4backstage/hrmengine/util/save-time-util.js | 364 +++ 927 files changed, 151825 insertions(+) create mode 100644 pc4backstage/hrmComsPublic/apis/common.js create mode 100644 pc4backstage/hrmComsPublic/components/AdvanceSearchFormInfo.js create mode 100644 pc4backstage/hrmComsPublic/components/Calendar.js create mode 100644 pc4backstage/hrmComsPublic/components/FormInfo.js create mode 100644 pc4backstage/hrmComsPublic/components/OrganizationTree.js create mode 100644 pc4backstage/hrmComsPublic/components/Tabs.js create mode 100644 pc4backstage/hrmComsPublic/components/index.js create mode 100644 pc4backstage/hrmComsPublic/index.js create mode 100644 pc4backstage/hrmComsPublic/public/i18n.js create mode 100644 pc4backstage/hrmComsPublic/public/logType.js create mode 100644 pc4backstage/hrmComsPublic/stores/baseStore.js create mode 100644 pc4backstage/hrmComsPublic/style/calendar.less create mode 100644 pc4backstage/hrmengine/apis/adareaset.js create mode 100644 pc4backstage/hrmengine/apis/adminAreaDisplaySetting.js create mode 100644 pc4backstage/hrmengine/apis/adminDecentralization.js create mode 100644 pc4backstage/hrmengine/apis/annual.js create mode 100644 pc4backstage/hrmengine/apis/appDetach.js create mode 100644 pc4backstage/hrmengine/apis/archiveLogView.js create mode 100644 pc4backstage/hrmengine/apis/assImple.js create mode 100644 pc4backstage/hrmengine/apis/assItem.js create mode 100644 pc4backstage/hrmengine/apis/assType.js create mode 100644 pc4backstage/hrmengine/apis/attendance.js create mode 100644 pc4backstage/hrmengine/apis/attendanceSetting.js create mode 100644 pc4backstage/hrmengine/apis/authAdjust.js create mode 100644 pc4backstage/hrmengine/apis/authSearch.js create mode 100644 pc4backstage/hrmengine/apis/authorizationSetting.js create mode 100644 pc4backstage/hrmengine/apis/avatarSetting.js create mode 100644 pc4backstage/hrmengine/apis/basicImport.js create mode 100644 pc4backstage/hrmengine/apis/batchAdjust.js create mode 100644 pc4backstage/hrmengine/apis/batchEdit.js create mode 100644 pc4backstage/hrmengine/apis/batchMaintenance.js create mode 100644 pc4backstage/hrmengine/apis/batchUpload.js create mode 100644 pc4backstage/hrmengine/apis/birthdayRemind.js create mode 100644 pc4backstage/hrmengine/apis/browserDisplayField.js create mode 100644 pc4backstage/hrmengine/apis/cardItemSet.js create mode 100644 pc4backstage/hrmengine/apis/city.js create mode 100644 pc4backstage/hrmengine/apis/common.js create mode 100644 pc4backstage/hrmengine/apis/contractExpireWarning.js create mode 100644 pc4backstage/hrmengine/apis/contractMaintain.js create mode 100644 pc4backstage/hrmengine/apis/contractTemplate.js create mode 100644 pc4backstage/hrmengine/apis/contractType.js create mode 100644 pc4backstage/hrmengine/apis/country.js create mode 100644 pc4backstage/hrmengine/apis/county.js create mode 100644 pc4backstage/hrmengine/apis/decentralizationAdminSet.js create mode 100644 pc4backstage/hrmengine/apis/dismiss.js create mode 100644 pc4backstage/hrmengine/apis/duty.js create mode 100644 pc4backstage/hrmengine/apis/dutyType.js create mode 100644 pc4backstage/hrmengine/apis/edu.js create mode 100644 pc4backstage/hrmengine/apis/education.js create mode 100644 pc4backstage/hrmengine/apis/edulevel.js create mode 100644 pc4backstage/hrmengine/apis/elseSetting.js create mode 100644 pc4backstage/hrmengine/apis/employDemand.js create mode 100644 pc4backstage/hrmengine/apis/enginegroup.js create mode 100644 pc4backstage/hrmengine/apis/entryMaintenance.js create mode 100644 pc4backstage/hrmengine/apis/formal.js create mode 100644 pc4backstage/hrmengine/apis/funcManageDecent.js create mode 100644 pc4backstage/hrmengine/apis/importorg.js create mode 100644 pc4backstage/hrmengine/apis/importresource.js create mode 100644 pc4backstage/hrmengine/apis/leaveType.js create mode 100644 pc4backstage/hrmengine/apis/levelProtection.js create mode 100644 pc4backstage/hrmengine/apis/limitedAnalysis.js create mode 100644 pc4backstage/hrmengine/apis/loginFailLog.js create mode 100644 pc4backstage/hrmengine/apis/loginLog.js create mode 100644 pc4backstage/hrmengine/apis/majorset.js create mode 100644 pc4backstage/hrmengine/apis/matrix.js create mode 100644 pc4backstage/hrmengine/apis/moduleManage.js create mode 100644 pc4backstage/hrmengine/apis/normalLog.js create mode 100644 pc4backstage/hrmengine/apis/officeLocation.js create mode 100644 pc4backstage/hrmengine/apis/officeaddress.js create mode 100644 pc4backstage/hrmengine/apis/onlineAnalysis.js create mode 100644 pc4backstage/hrmengine/apis/onlineAttendance.js create mode 100644 pc4backstage/hrmengine/apis/orgChart.js create mode 100644 pc4backstage/hrmengine/apis/orgFieldDisplaySetting.js create mode 100644 pc4backstage/hrmengine/apis/organization.js create mode 100644 pc4backstage/hrmengine/apis/organizationvirtual.js create mode 100644 pc4backstage/hrmengine/apis/otherSetting.js create mode 100644 pc4backstage/hrmengine/apis/paidLeave.js create mode 100644 pc4backstage/hrmengine/apis/paidLeaveManager.js create mode 100644 pc4backstage/hrmengine/apis/payrollManagement.js create mode 100644 pc4backstage/hrmengine/apis/payrollSending.js create mode 100644 pc4backstage/hrmengine/apis/personalSalaryAdjustment.js create mode 100644 pc4backstage/hrmengine/apis/post.js create mode 100644 pc4backstage/hrmengine/apis/posts.js create mode 100644 pc4backstage/hrmengine/apis/privacySetting.js create mode 100644 pc4backstage/hrmengine/apis/province.js create mode 100644 pc4backstage/hrmengine/apis/quit.js create mode 100644 pc4backstage/hrmengine/apis/recruitInfo.js create mode 100644 pc4backstage/hrmengine/apis/recruitLibrary.js create mode 100644 pc4backstage/hrmengine/apis/recruitPlan.js create mode 100644 pc4backstage/hrmengine/apis/rehire.js create mode 100644 pc4backstage/hrmengine/apis/renew.js create mode 100644 pc4backstage/hrmengine/apis/resourceIndex.js create mode 100644 pc4backstage/hrmengine/apis/retire.js create mode 100644 pc4backstage/hrmengine/apis/roleSetting.js create mode 100644 pc4backstage/hrmengine/apis/rpManage.js create mode 100644 pc4backstage/hrmengine/apis/rpType.js create mode 100644 pc4backstage/hrmengine/apis/salaryApplySet.js create mode 100644 pc4backstage/hrmengine/apis/salaryBank.js create mode 100644 pc4backstage/hrmengine/apis/salaryIndexMaintenance.js create mode 100644 pc4backstage/hrmengine/apis/salaryIndexSetting.js create mode 100644 pc4backstage/hrmengine/apis/salaryItemsSet.js create mode 100644 pc4backstage/hrmengine/apis/sanyuan.js create mode 100644 pc4backstage/hrmengine/apis/schedule.js create mode 100644 pc4backstage/hrmengine/apis/secAdminLog.js create mode 100644 pc4backstage/hrmengine/apis/secAuditorLog.js create mode 100644 pc4backstage/hrmengine/apis/securitySetting.js create mode 100644 pc4backstage/hrmengine/apis/sensitiveWord.js create mode 100644 pc4backstage/hrmengine/apis/serialNumber.js create mode 100644 pc4backstage/hrmengine/apis/signatureManagement.js create mode 100644 pc4backstage/hrmengine/apis/specialty.js create mode 100644 pc4backstage/hrmengine/apis/staffCareReminder.js create mode 100644 pc4backstage/hrmengine/apis/subCompanyFieldDef.js create mode 100644 pc4backstage/hrmengine/apis/systemAdminLog.js create mode 100644 pc4backstage/hrmengine/apis/test.js create mode 100644 pc4backstage/hrmengine/apis/title.js create mode 100644 pc4backstage/hrmengine/apis/titleset.js create mode 100644 pc4backstage/hrmengine/apis/trainActivity.js create mode 100644 pc4backstage/hrmengine/apis/trainArrange.js create mode 100644 pc4backstage/hrmengine/apis/trainPlan.js create mode 100644 pc4backstage/hrmengine/apis/trainResource.js create mode 100644 pc4backstage/hrmengine/apis/trainTypes.js create mode 100644 pc4backstage/hrmengine/apis/transfer.js create mode 100644 pc4backstage/hrmengine/apis/trial.js create mode 100644 pc4backstage/hrmengine/apis/unitSet.js create mode 100644 pc4backstage/hrmengine/apis/workHour.js create mode 100644 pc4backstage/hrmengine/apis/workNatureExcerpt.js create mode 100644 pc4backstage/hrmengine/apis/workflow.js create mode 100644 pc4backstage/hrmengine/apis/workingDayAdjust.js create mode 100644 pc4backstage/hrmengine/apis/worknature.js create mode 100644 pc4backstage/hrmengine/components/EduLevel.js create mode 100644 pc4backstage/hrmengine/components/Home.js create mode 100644 pc4backstage/hrmengine/components/HrmTest.js create mode 100644 pc4backstage/hrmengine/components/ResourceIndex.js create mode 100644 pc4backstage/hrmengine/components/adminAreaDisplaySetting/index.js create mode 100644 pc4backstage/hrmengine/components/adminDecentralization/index.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/period/DataList.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/period/index.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/rule/DataList.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/rule/index.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/DataList.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/Import.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/TabPane.js create mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/index.js create mode 100644 pc4backstage/hrmengine/components/appDetach/DetachEdit.js create mode 100644 pc4backstage/hrmengine/components/appDetach/DetachList.js create mode 100644 pc4backstage/hrmengine/components/appDetach/GlobalSetting.js create mode 100644 pc4backstage/hrmengine/components/appDetach/index.js create mode 100644 pc4backstage/hrmengine/components/archiveLogView/index.js create mode 100644 pc4backstage/hrmengine/components/area/Area.js create mode 100644 pc4backstage/hrmengine/components/area/AreaTable.js create mode 100644 pc4backstage/hrmengine/components/area/BriefInfo.js create mode 100644 pc4backstage/hrmengine/components/area/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/area/NewAndEditDialog.js create mode 100644 pc4backstage/hrmengine/components/area/OfficeAddress.js create mode 100644 pc4backstage/hrmengine/components/area/TabInfo.js create mode 100644 pc4backstage/hrmengine/components/assImple/Header.js create mode 100644 pc4backstage/hrmengine/components/assImple/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/assImple/MainTable.js create mode 100644 pc4backstage/hrmengine/components/assImple/SubDialog.js create mode 100644 pc4backstage/hrmengine/components/assImple/SubTable.js create mode 100644 pc4backstage/hrmengine/components/assImple/Tab.js create mode 100644 pc4backstage/hrmengine/components/assImple/ThirdTable.js create mode 100644 pc4backstage/hrmengine/components/assImple/index.js create mode 100644 pc4backstage/hrmengine/components/assItem/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/assItem/Header.js create mode 100644 pc4backstage/hrmengine/components/assItem/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/assItem/MainTable.js create mode 100644 pc4backstage/hrmengine/components/assItem/Tab.js create mode 100644 pc4backstage/hrmengine/components/assItem/index.js create mode 100644 pc4backstage/hrmengine/components/assType/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/assType/Group.js create mode 100644 pc4backstage/hrmengine/components/assType/Header.js create mode 100644 pc4backstage/hrmengine/components/assType/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/assType/MainTable.js create mode 100644 pc4backstage/hrmengine/components/assType/Tab.js create mode 100644 pc4backstage/hrmengine/components/assType/index.js create mode 100644 pc4backstage/hrmengine/components/attendanceSetting/Content.js create mode 100644 pc4backstage/hrmengine/components/attendanceSetting/Header.js create mode 100644 pc4backstage/hrmengine/components/attendanceSetting/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/attendanceSetting/PageFormInfo.js create mode 100644 pc4backstage/hrmengine/components/attendanceSetting/SubFormInfo.js create mode 100644 pc4backstage/hrmengine/components/attendanceSetting/TableEdit.js create mode 100644 pc4backstage/hrmengine/components/attendanceSetting/index.js create mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSetting.js create mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSettingExplain.js create mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/SyncSetting.js create mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/index.js create mode 100644 pc4backstage/hrmengine/components/authAdjust/Content.js create mode 100644 pc4backstage/hrmengine/components/authAdjust/Dashboard.js create mode 100644 pc4backstage/hrmengine/components/authAdjust/Result.js create mode 100644 pc4backstage/hrmengine/components/authAdjust/Timer.js create mode 100644 pc4backstage/hrmengine/components/authAdjust/index.js create mode 100644 pc4backstage/hrmengine/components/authSearch/Content.js create mode 100644 pc4backstage/hrmengine/components/authSearch/Dashboard.js create mode 100644 pc4backstage/hrmengine/components/authSearch/index.js create mode 100644 pc4backstage/hrmengine/components/authorizationSetting/AuthorizationGroupEditTab.js create mode 100644 pc4backstage/hrmengine/components/authorizationSetting/AuthorizationList.js create mode 100644 pc4backstage/hrmengine/components/authorizationSetting/Group.js create mode 100644 pc4backstage/hrmengine/components/authorizationSetting/RoleRefs.js create mode 100644 pc4backstage/hrmengine/components/authorizationSetting/index.js create mode 100644 pc4backstage/hrmengine/components/avatarSetting/AvatarSetting.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/Dashboard.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustDepartment.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustLeftContainer.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustResource.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustRightContainer.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustSubCompany.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/CheckContent.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/index.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditDepartment.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditLeftContainer.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditResource.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditRightContainer.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditSubCompany.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/NeedRender.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/index.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/index.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/LeftContainer.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/RightContainer.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/UploadForm.js create mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/apis/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Background.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Congratulations.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/DateField.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Header.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Image.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Personlist.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/BgImg.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/BgSet.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/CongratulationSet.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/DateSet.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/HeadSet.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/ImgSet.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/PersonSet.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/Upload.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/form/Group.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/form/Item.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/form/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Basic.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Buttons.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Fields.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Lock.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Revoke.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/components/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/mock/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/stores/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/style/body.less create mode 100644 pc4backstage/hrmengine/components/birthEditor/style/form.less create mode 100644 pc4backstage/hrmengine/components/birthEditor/style/head.less create mode 100644 pc4backstage/hrmengine/components/birthEditor/util/abandon.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/util/formFactory.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/util/index.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/util/paramsToStyle.js create mode 100644 pc4backstage/hrmengine/components/birthEditor/util/undoRedo.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/Add.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/AdminRemind.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/Birthday.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/EmployeeRemind.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/EntryRemind.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/PictureSet.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/PictureSetCopy.js create mode 100644 pc4backstage/hrmengine/components/birthdayRemind/index.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Base.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/City.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Country.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/County.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Duty.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/DutyType.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Edu.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/OfficeLocation.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Post.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Province.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Specialty.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Title.js create mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/WorkNature.js create mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/Department.js create mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/EnableComs.js create mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/FieldList.js create mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/Hrm.js create mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/Subcompany.js create mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/index.js create mode 100644 pc4backstage/hrmengine/components/cardItemSet/DefineShowItems.js create mode 100644 pc4backstage/hrmengine/components/cardItemSet/SysShowItems.js create mode 100644 pc4backstage/hrmengine/components/cardItemSet/index.js create mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Add.js create mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Content.js create mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Header.js create mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/MainForm.js create mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Table.js create mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/index.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/DialogContent.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/Header.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/MainTable.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/RichText.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/Tab.js create mode 100644 pc4backstage/hrmengine/components/contractMaintain/index.js create mode 100644 pc4backstage/hrmengine/components/contractTemplate/Header.js create mode 100644 pc4backstage/hrmengine/components/contractTemplate/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/contractTemplate/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/contractTemplate/MainTable.js create mode 100644 pc4backstage/hrmengine/components/contractTemplate/Tab.js create mode 100644 pc4backstage/hrmengine/components/contractTemplate/index.js create mode 100644 pc4backstage/hrmengine/components/contractType/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/contractType/Header.js create mode 100644 pc4backstage/hrmengine/components/contractType/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/contractType/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/contractType/MainTable.js create mode 100644 pc4backstage/hrmengine/components/contractType/Tab.js create mode 100644 pc4backstage/hrmengine/components/contractType/index.js create mode 100644 pc4backstage/hrmengine/components/decentralizationAdminSet/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/decentralizationAdminSet/SecuritySet.js create mode 100644 pc4backstage/hrmengine/components/decentralizationAdminSet/index.js create mode 100644 pc4backstage/hrmengine/components/education/Education.js create mode 100644 pc4backstage/hrmengine/components/education/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/elseSetting/index.js create mode 100644 pc4backstage/hrmengine/components/employmentDemand/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/employmentDemand/Header.js create mode 100644 pc4backstage/hrmengine/components/employmentDemand/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/employmentDemand/MainTable.js create mode 100644 pc4backstage/hrmengine/components/employmentDemand/Tab.js create mode 100644 pc4backstage/hrmengine/components/employmentDemand/index.js create mode 100644 pc4backstage/hrmengine/components/enginegroup/AddGpMember.js create mode 100644 pc4backstage/hrmengine/components/enginegroup/GroupSetting.js create mode 100644 pc4backstage/hrmengine/components/enginegroup/NeForm.js create mode 100644 pc4backstage/hrmengine/components/enginegroup/NewEngineGroup.js create mode 100644 pc4backstage/hrmengine/components/enginegroup/index.js create mode 100644 pc4backstage/hrmengine/components/entryMaintenance/index.js create mode 100644 pc4backstage/hrmengine/components/external/outSignAppSetting.js create mode 100644 pc4backstage/hrmengine/components/funcManageDecent/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/funcManageDecent/Header.js create mode 100644 pc4backstage/hrmengine/components/funcManageDecent/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/funcManageDecent/MainTable.js create mode 100644 pc4backstage/hrmengine/components/funcManageDecent/Tab.js create mode 100644 pc4backstage/hrmengine/components/funcManageDecent/index.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/BasicSet.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/Header.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/MainTableInfo.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/Search.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/SpecialForm.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/StaticFormInfo.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/SubDialog.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/TableEdit.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/WorkHourTab.js create mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/index.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Dismiss.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Formal.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Info.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Quit.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Rehire.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Renew.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Retire.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Transfer.js create mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Trial.js create mode 100644 pc4backstage/hrmengine/components/import/index.js create mode 100644 pc4backstage/hrmengine/components/importExternalAttendanceData/index.js create mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/ImportHistory.js create mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/ImportLog.js create mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/ImportResult.js create mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/index.js create mode 100644 pc4backstage/hrmengine/components/importorg/Import.js create mode 100644 pc4backstage/hrmengine/components/importorg/ImportHistory.js create mode 100644 pc4backstage/hrmengine/components/importorg/ImportLog.js create mode 100644 pc4backstage/hrmengine/components/importorg/ImportResult.js create mode 100644 pc4backstage/hrmengine/components/importresource/Import.js create mode 100644 pc4backstage/hrmengine/components/importresource/ImportHistory.js create mode 100644 pc4backstage/hrmengine/components/importresource/ImportLog.js create mode 100644 pc4backstage/hrmengine/components/importresource/ImportResult.js create mode 100644 pc4backstage/hrmengine/components/leaveType/index.js create mode 100644 pc4backstage/hrmengine/components/levelProtection/BasicInfo.js create mode 100644 pc4backstage/hrmengine/components/levelProtection/Tab.js create mode 100644 pc4backstage/hrmengine/components/levelProtection/Table.js create mode 100644 pc4backstage/hrmengine/components/levelProtection/Top.js create mode 100644 pc4backstage/hrmengine/components/levelProtection/index.js create mode 100644 pc4backstage/hrmengine/components/limitedAnalysis/Echarts.js create mode 100644 pc4backstage/hrmengine/components/limitedAnalysis/RadioGroup.js create mode 100644 pc4backstage/hrmengine/components/limitedAnalysis/index.js create mode 100644 pc4backstage/hrmengine/components/loginFailLog/index.js create mode 100644 pc4backstage/hrmengine/components/loginLog/index.js create mode 100644 pc4backstage/hrmengine/components/major/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/major/Major.js create mode 100644 pc4backstage/hrmengine/components/matrix/Dashboard.js create mode 100644 pc4backstage/hrmengine/components/matrix/DataList.js create mode 100644 pc4backstage/hrmengine/components/matrix/DataListPagination.js create mode 100644 pc4backstage/hrmengine/components/matrix/FieldItem.js create mode 100644 pc4backstage/hrmengine/components/matrix/HiddenTable.js create mode 100644 pc4backstage/hrmengine/components/matrix/MatrixCard.js create mode 100644 pc4backstage/hrmengine/components/matrix/MatrixDataMaintenance.js create mode 100644 pc4backstage/hrmengine/components/matrix/MatrixDataMaintenanceView.js create mode 100644 pc4backstage/hrmengine/components/matrix/MatrixEdit.js create mode 100644 pc4backstage/hrmengine/components/matrix/MatrixFieldSetting.js create mode 100644 pc4backstage/hrmengine/components/matrix/MatrixMaintenance.js create mode 100644 pc4backstage/hrmengine/components/matrix/Screen.js create mode 100644 pc4backstage/hrmengine/components/matrix/SubCompanyDisplaySetting.js create mode 100644 pc4backstage/hrmengine/components/matrix/index.js create mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/ColumnSetting.js create mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/ConditionSetting.js create mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceLevel.js create mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceListView.js create mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceSettingView.js create mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/Maintenancer.js create mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MatrixMaintenance.js create mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Content.js create mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Dashboard.js create mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Result.js create mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Timer.js create mode 100644 pc4backstage/hrmengine/components/matrixAdjust/index.js create mode 100644 pc4backstage/hrmengine/components/moduleManage/Editor.js create mode 100644 pc4backstage/hrmengine/components/moduleManage/index.js create mode 100644 pc4backstage/hrmengine/components/newPost/AsyncTree.js create mode 100644 pc4backstage/hrmengine/components/newPost/BriefInfo.js create mode 100644 pc4backstage/hrmengine/components/newPost/Content.js create mode 100644 pc4backstage/hrmengine/components/newPost/Dialog.js create mode 100644 pc4backstage/hrmengine/components/newPost/OrgTree.js create mode 100644 pc4backstage/hrmengine/components/newPost/Tab.js create mode 100644 pc4backstage/hrmengine/components/newPost/Table.js create mode 100644 pc4backstage/hrmengine/components/newPost/Top.js create mode 100644 pc4backstage/hrmengine/components/newPost/index.js create mode 100644 pc4backstage/hrmengine/components/normalLog/index.js create mode 100644 pc4backstage/hrmengine/components/onlinAttendance/index.js create mode 100644 pc4backstage/hrmengine/components/onlineAnalysis/Echarts.js create mode 100644 pc4backstage/hrmengine/components/onlineAnalysis/RadioGroup.js create mode 100644 pc4backstage/hrmengine/components/onlineAnalysis/index.js create mode 100644 pc4backstage/hrmengine/components/orgChart/Chart.js create mode 100644 pc4backstage/hrmengine/components/orgChart/index.js create mode 100644 pc4backstage/hrmengine/components/orgFieldDisplaySetting/Form.js create mode 100644 pc4backstage/hrmengine/components/orgFieldDisplaySetting/Header.js create mode 100644 pc4backstage/hrmengine/components/orgFieldDisplaySetting/index.js create mode 100644 pc4backstage/hrmengine/components/organization/NewAndEditDialog.js create mode 100644 pc4backstage/hrmengine/components/organization/Organization.js create mode 100644 pc4backstage/hrmengine/components/organization/OrganizationInfo.js create mode 100644 pc4backstage/hrmengine/components/organization/OrganizationList.js create mode 100644 pc4backstage/hrmengine/components/organization/OrganizationTabInfo.js create mode 100644 pc4backstage/hrmengine/components/organization/OrganizationTree.js create mode 100644 pc4backstage/hrmengine/components/organization/ResourceAddToVirtual.js create mode 100644 pc4backstage/hrmengine/components/organization/ResourceSetManagerVirtual.js create mode 100644 pc4backstage/hrmengine/components/otherSetting/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/otherSetting/index.js create mode 100644 pc4backstage/hrmengine/components/paidLeave/index.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/period/DataList.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/period/index.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/rule/DataList.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/rule/index.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/DataList.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/Import.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/TabPane.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/index.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveTimeSetting/DataList.js create mode 100644 pc4backstage/hrmengine/components/paidLeaveTimeSetting/index.js create mode 100644 pc4backstage/hrmengine/components/payrollManagement/Editor.js create mode 100644 pc4backstage/hrmengine/components/payrollManagement/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/payrollManagement/index.js create mode 100644 pc4backstage/hrmengine/components/payrollSending/DatasProcess.js create mode 100644 pc4backstage/hrmengine/components/payrollSending/DispatchImg.js create mode 100644 pc4backstage/hrmengine/components/payrollSending/ImportFail.js create mode 100644 pc4backstage/hrmengine/components/payrollSending/ImportResult.js create mode 100644 pc4backstage/hrmengine/components/payrollSending/index.js create mode 100644 pc4backstage/hrmengine/components/personalSalaryAdjustment/Editor.js create mode 100644 pc4backstage/hrmengine/components/personalSalaryAdjustment/Table.js create mode 100644 pc4backstage/hrmengine/components/personalSalaryAdjustment/index.js create mode 100644 pc4backstage/hrmengine/components/post/AreaTable.js create mode 100644 pc4backstage/hrmengine/components/post/BriefInfo.js create mode 100644 pc4backstage/hrmengine/components/post/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/post/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/post/NewAndEditDialog.js create mode 100644 pc4backstage/hrmengine/components/post/Post.js create mode 100644 pc4backstage/hrmengine/components/post/TabInfo.js create mode 100644 pc4backstage/hrmengine/components/privacySetting/Info.js create mode 100644 pc4backstage/hrmengine/components/privacySetting/Item.js create mode 100644 pc4backstage/hrmengine/components/privacySetting/Setting.js create mode 100644 pc4backstage/hrmengine/components/privacySetting/ShowSetCol.js create mode 100644 pc4backstage/hrmengine/components/privacySetting/index.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/MainTab.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/MainTable.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/Schedule.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/SubTab.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/TableEdit.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/Top.js create mode 100644 pc4backstage/hrmengine/components/recruitInfo/index.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/FormInfoWithTable.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/MainTab.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/MainTable.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/Print.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/SubDialog.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/SubTab.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/SubTable.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/TableEdit.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/Top.js create mode 100644 pc4backstage/hrmengine/components/recruitLibrary/index.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/MainTab.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/MainTable.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/SubDialog.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/SubTab.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/TableEdit.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/Top.js create mode 100644 pc4backstage/hrmengine/components/recruitPlan/index.js create mode 100644 pc4backstage/hrmengine/components/role/AddRole.js create mode 100644 pc4backstage/hrmengine/components/role/RoleEdit.js create mode 100644 pc4backstage/hrmengine/components/role/RoleEditDialog.js create mode 100644 pc4backstage/hrmengine/components/role/RoleInfo.js create mode 100644 pc4backstage/hrmengine/components/role/RoleInfoSingle.js create mode 100644 pc4backstage/hrmengine/components/role/RoleList.js create mode 100644 pc4backstage/hrmengine/components/role/index.js create mode 100644 pc4backstage/hrmengine/components/rpManage/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/rpManage/Header.js create mode 100644 pc4backstage/hrmengine/components/rpManage/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/rpManage/MainTable.js create mode 100644 pc4backstage/hrmengine/components/rpManage/Tab.js create mode 100644 pc4backstage/hrmengine/components/rpManage/index.js create mode 100644 pc4backstage/hrmengine/components/rpType/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/rpType/Header.js create mode 100644 pc4backstage/hrmengine/components/rpType/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/rpType/MainTable.js create mode 100644 pc4backstage/hrmengine/components/rpType/Tab.js create mode 100644 pc4backstage/hrmengine/components/rpType/index.js create mode 100644 pc4backstage/hrmengine/components/salaryApplySet/index.js create mode 100644 pc4backstage/hrmengine/components/salaryBank/Editor.js create mode 100644 pc4backstage/hrmengine/components/salaryBank/index.js create mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/Editor.js create mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/ImportResult.js create mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/index.js create mode 100644 pc4backstage/hrmengine/components/salaryIndexSetting/Editor.js create mode 100644 pc4backstage/hrmengine/components/salaryIndexSetting/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/salaryIndexSetting/index.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/Calculator.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/CalculatorCopy.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/FormulaSet.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/Header.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/ItemsSet.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/LevelSet.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/MainTableInfo.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/Search.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/StandardSet.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/SubDialog.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/TaxRateSet.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/TextArea.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/TextAreaCopy.js create mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/index.js create mode 100644 pc4backstage/hrmengine/components/sanyuan/Processing.js create mode 100644 pc4backstage/hrmengine/components/sanyuan/index.js create mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/CalendarScheduling.js create mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/DataList.js create mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/ScheduleList.js create mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/SchedulingInfo.js create mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/SchedulingMember.js create mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/Setting.js create mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/index.js create mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/DataList.js create mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/DetailSetting.js create mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/Setting.js create mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/ShiftsSettingInfo.js create mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/index.js create mode 100644 pc4backstage/hrmengine/components/schedule/workTime/DataList.js create mode 100644 pc4backstage/hrmengine/components/schedule/workTime/index.js create mode 100644 pc4backstage/hrmengine/components/secAdminLog/index.js create mode 100644 pc4backstage/hrmengine/components/secAuditorLog/index.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/AdvanceSetting.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/BasicSetting.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/ButtonIcons.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/DbSetting.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/Dialog.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/DialogContent.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/NetworkSetting.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/Table.js create mode 100644 pc4backstage/hrmengine/components/securitySetting/index.js create mode 100644 pc4backstage/hrmengine/components/sensitiveWord/List.js create mode 100644 pc4backstage/hrmengine/components/sensitiveWord/Setting.js create mode 100644 pc4backstage/hrmengine/components/serialNumber/DeptNumberSet.js create mode 100644 pc4backstage/hrmengine/components/serialNumber/NumberComposition.js create mode 100644 pc4backstage/hrmengine/components/serialNumber/NumberFlowRule.js create mode 100644 pc4backstage/hrmengine/components/serialNumber/PostNumberSet.js create mode 100644 pc4backstage/hrmengine/components/serialNumber/ResourceNumberSet.js create mode 100644 pc4backstage/hrmengine/components/serialNumber/StartReservedNumberSet.js create mode 100644 pc4backstage/hrmengine/components/serialNumber/SubNumberSet.js create mode 100644 pc4backstage/hrmengine/components/signatureManagement/Editor.js create mode 100644 pc4backstage/hrmengine/components/signatureManagement/LeftTree.js create mode 100644 pc4backstage/hrmengine/components/signatureManagement/index.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/AdminRemind.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/AuthForm.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/BirthdayRemind.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/DispatchImgDialog.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/EmployeeRemind.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/EmployeeRemindNew.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/EntryRemind.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/GreetingSetDialog.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Picture.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/PreView.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Tab.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Table.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Top.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Upload.js create mode 100644 pc4backstage/hrmengine/components/staffCareReminder/index.js create mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/EncryptSetting.js create mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/FieldDef.js create mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/Tip.js create mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/ViewRangeForm.js create mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/ViewRangeSetting.js create mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/index.js create mode 100644 pc4backstage/hrmengine/components/systemAdminLog/index.js create mode 100644 pc4backstage/hrmengine/components/title/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/title/Title.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/ActivityTab.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/Header.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/MainTable.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/SubDialog.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/SubTab.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/SubTable.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/ThirdTab.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/ThirdTable.js create mode 100644 pc4backstage/hrmengine/components/trainActivity/index.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/FormInfo.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/Header.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/MainDialog.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/MainTableInfo.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/Search.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/SingleArrange.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/SpecialForm.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/SubDialog.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/SubTableInfo.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/TrainArrangeTabInfo.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/TrainSchedule.js create mode 100644 pc4backstage/hrmengine/components/trainArrange/index.js create mode 100644 pc4backstage/hrmengine/components/trainPlan/AddTestForm.js create mode 100644 pc4backstage/hrmengine/components/trainPlan/Editor.js create mode 100644 pc4backstage/hrmengine/components/trainPlan/Test.js create mode 100644 pc4backstage/hrmengine/components/trainPlan/index.js create mode 100644 pc4backstage/hrmengine/components/trainResource/Editor.js create mode 100644 pc4backstage/hrmengine/components/trainResource/index.js create mode 100644 pc4backstage/hrmengine/components/trainTypes/Editor.js create mode 100644 pc4backstage/hrmengine/components/trainTypes/index.js create mode 100644 pc4backstage/hrmengine/components/unitSet/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/unitSet/index.js create mode 100644 pc4backstage/hrmengine/components/workflowSetting/ActionList.js create mode 100644 pc4backstage/hrmengine/components/workflowSetting/DataList.js create mode 100644 pc4backstage/hrmengine/components/workflowSetting/EntrySelect.js create mode 100644 pc4backstage/hrmengine/components/workflowSetting/FieldList.js create mode 100644 pc4backstage/hrmengine/components/workflowSetting/index.js create mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/AddData.js create mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/ConditionBar.js create mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/Content.js create mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/DateSwitch.js create mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/index.js create mode 100644 pc4backstage/hrmengine/components/worknature/HocFactory.js create mode 100644 pc4backstage/hrmengine/components/worknature/WorkNature.js create mode 100644 pc4backstage/hrmengine/coms/AdvanceSearchFormInfo.js create mode 100644 pc4backstage/hrmengine/coms/Calendar.js create mode 100644 pc4backstage/hrmengine/coms/Editor.js create mode 100644 pc4backstage/hrmengine/coms/EditorDialog.js create mode 100644 pc4backstage/hrmengine/coms/FormInfo.js create mode 100644 pc4backstage/hrmengine/coms/FormInfo_old.js create mode 100644 pc4backstage/hrmengine/coms/NewAndEditDialog.js create mode 100644 pc4backstage/hrmengine/coms/OrganizationTree.js create mode 100644 pc4backstage/hrmengine/coms/Tabs.js create mode 100644 pc4backstage/hrmengine/debug.js create mode 100644 pc4backstage/hrmengine/index.js create mode 100644 pc4backstage/hrmengine/jsconfig.json create mode 100644 pc4backstage/hrmengine/public/ConfigurableForm.js create mode 100644 pc4backstage/hrmengine/public/coms/Authority.js create mode 100644 pc4backstage/hrmengine/public/coms/Form.js create mode 100644 pc4backstage/hrmengine/public/coms/Table.js create mode 100644 pc4backstage/hrmengine/public/coms/Top.js create mode 100644 pc4backstage/hrmengine/public/coms/index.js create mode 100644 pc4backstage/hrmengine/public/constant.js create mode 100644 pc4backstage/hrmengine/public/i18n.js create mode 100644 pc4backstage/hrmengine/public/learn.js create mode 100644 pc4backstage/hrmengine/public/logType.js create mode 100644 pc4backstage/hrmengine/public/pulic-func.js create mode 100644 pc4backstage/hrmengine/public/sweet-form.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/AccountIcon.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/AddButton.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/Authority.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/CenterSpin.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/DeleteButton.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/Dialog.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/MagicForm.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/OrgTree.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/RadioGroup.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/Search.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/Table.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/Top.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/ImportHistory.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/ImportLog.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/ImportResult.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/index.js create mode 100644 pc4backstage/hrmengine/public/valhalla/components/index.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/authority.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/dialog.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/form.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/importCommon.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/index.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/orgTree.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/radioGroup.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/search.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/table.js create mode 100644 pc4backstage/hrmengine/public/valhalla/stores/top.js create mode 100644 pc4backstage/hrmengine/public/valhalla/style/addButton.less create mode 100644 pc4backstage/hrmengine/public/valhalla/style/deleteButton.less create mode 100644 pc4backstage/hrmengine/public/valhalla/style/magicForm.less create mode 100644 pc4backstage/hrmengine/reportSensitiveWord.js create mode 100644 pc4backstage/hrmengine/single.js create mode 100644 pc4backstage/hrmengine/stores/adareaset.js create mode 100644 pc4backstage/hrmengine/stores/adminAreaDisplaySetting.js create mode 100644 pc4backstage/hrmengine/stores/adminDecentralization.js create mode 100644 pc4backstage/hrmengine/stores/annualPeriod.js create mode 100644 pc4backstage/hrmengine/stores/annualRule.js create mode 100644 pc4backstage/hrmengine/stores/annualSetting.js create mode 100644 pc4backstage/hrmengine/stores/appDetach.js create mode 100644 pc4backstage/hrmengine/stores/archiveLogView.js create mode 100644 pc4backstage/hrmengine/stores/assImple.js create mode 100644 pc4backstage/hrmengine/stores/assItem.js create mode 100644 pc4backstage/hrmengine/stores/assType.js create mode 100644 pc4backstage/hrmengine/stores/attendanceSetting.js create mode 100644 pc4backstage/hrmengine/stores/attendanceSyncSetting.js create mode 100644 pc4backstage/hrmengine/stores/authAdjust.js create mode 100644 pc4backstage/hrmengine/stores/authSearch.js create mode 100644 pc4backstage/hrmengine/stores/authorizationSetting.js create mode 100644 pc4backstage/hrmengine/stores/avatarSetting.js create mode 100644 pc4backstage/hrmengine/stores/baseStore.js create mode 100644 pc4backstage/hrmengine/stores/batchAdjust.js create mode 100644 pc4backstage/hrmengine/stores/batchEdit.js create mode 100644 pc4backstage/hrmengine/stores/batchMaintenance.js create mode 100644 pc4backstage/hrmengine/stores/batchUploadPhoto.js create mode 100644 pc4backstage/hrmengine/stores/birthdayRemind.js create mode 100644 pc4backstage/hrmengine/stores/browseBoxLinkPage.js create mode 100644 pc4backstage/hrmengine/stores/browserDisplayFieldSetting.js create mode 100644 pc4backstage/hrmengine/stores/cardItemSet.js create mode 100644 pc4backstage/hrmengine/stores/contractExpireWarning.js create mode 100644 pc4backstage/hrmengine/stores/contractMaintain.js create mode 100644 pc4backstage/hrmengine/stores/contractTemplate.js create mode 100644 pc4backstage/hrmengine/stores/contractType.js create mode 100644 pc4backstage/hrmengine/stores/datas.js create mode 100644 pc4backstage/hrmengine/stores/decentralizationAdminSet.js create mode 100644 pc4backstage/hrmengine/stores/dismiss.js create mode 100644 pc4backstage/hrmengine/stores/domain/Search.js create mode 100644 pc4backstage/hrmengine/stores/domain/authority.js create mode 100644 pc4backstage/hrmengine/stores/domain/dialog.js create mode 100644 pc4backstage/hrmengine/stores/domain/form.js create mode 100644 pc4backstage/hrmengine/stores/domain/index.js create mode 100644 pc4backstage/hrmengine/stores/domain/orgTree.js create mode 100644 pc4backstage/hrmengine/stores/domain/table.js create mode 100644 pc4backstage/hrmengine/stores/domain/top.js create mode 100644 pc4backstage/hrmengine/stores/education.js create mode 100644 pc4backstage/hrmengine/stores/edulevel.js create mode 100644 pc4backstage/hrmengine/stores/elseSettingStore.js create mode 100644 pc4backstage/hrmengine/stores/employDemand.js create mode 100644 pc4backstage/hrmengine/stores/enginegroup.js create mode 100644 pc4backstage/hrmengine/stores/entryMaintenance.js create mode 100644 pc4backstage/hrmengine/stores/external/outSignAppSetting.js create mode 100644 pc4backstage/hrmengine/stores/formal.js create mode 100644 pc4backstage/hrmengine/stores/funcManageDecent.js create mode 100644 pc4backstage/hrmengine/stores/generalWorkingHours.js create mode 100644 pc4backstage/hrmengine/stores/import.js create mode 100644 pc4backstage/hrmengine/stores/importCommon.js create mode 100644 pc4backstage/hrmengine/stores/importExternalAttendance.js create mode 100644 pc4backstage/hrmengine/stores/importorg.js create mode 100644 pc4backstage/hrmengine/stores/importresource.js create mode 100644 pc4backstage/hrmengine/stores/index.js create mode 100644 pc4backstage/hrmengine/stores/leaveType.js create mode 100644 pc4backstage/hrmengine/stores/levelProtection.js create mode 100644 pc4backstage/hrmengine/stores/limitedAnalysis.js create mode 100644 pc4backstage/hrmengine/stores/loginFailLog.js create mode 100644 pc4backstage/hrmengine/stores/loginLog.js create mode 100644 pc4backstage/hrmengine/stores/majorset.js create mode 100644 pc4backstage/hrmengine/stores/matirx.js create mode 100644 pc4backstage/hrmengine/stores/matirxDataMaintenance.js create mode 100644 pc4backstage/hrmengine/stores/matirxFieldSetting.js create mode 100644 pc4backstage/hrmengine/stores/matrixAdjust.js create mode 100644 pc4backstage/hrmengine/stores/matrixMaintenance.js create mode 100644 pc4backstage/hrmengine/stores/moduleManage.js create mode 100644 pc4backstage/hrmengine/stores/newPost.js create mode 100644 pc4backstage/hrmengine/stores/normalLog.js create mode 100644 pc4backstage/hrmengine/stores/officeaddress.js create mode 100644 pc4backstage/hrmengine/stores/onlineAnalysis.js create mode 100644 pc4backstage/hrmengine/stores/onlineAttendance.js create mode 100644 pc4backstage/hrmengine/stores/orgChart.js create mode 100644 pc4backstage/hrmengine/stores/orgFieldDisplaySetting.js create mode 100644 pc4backstage/hrmengine/stores/organization.js create mode 100644 pc4backstage/hrmengine/stores/otherSetting.js create mode 100644 pc4backstage/hrmengine/stores/paidLeave.js create mode 100644 pc4backstage/hrmengine/stores/paidLeavePeriod.js create mode 100644 pc4backstage/hrmengine/stores/paidLeaveRule.js create mode 100644 pc4backstage/hrmengine/stores/paidLeaveSetting.js create mode 100644 pc4backstage/hrmengine/stores/paidLeaveTimeSetting.js create mode 100644 pc4backstage/hrmengine/stores/payrollManagement.js create mode 100644 pc4backstage/hrmengine/stores/payrollSending.js create mode 100644 pc4backstage/hrmengine/stores/personalSalaryAdjustment.js create mode 100644 pc4backstage/hrmengine/stores/postset.js create mode 100644 pc4backstage/hrmengine/stores/privacySetting.js create mode 100644 pc4backstage/hrmengine/stores/quit.js create mode 100644 pc4backstage/hrmengine/stores/recruitInfo.js create mode 100644 pc4backstage/hrmengine/stores/recruitLibrary.js create mode 100644 pc4backstage/hrmengine/stores/recruitPlan.js create mode 100644 pc4backstage/hrmengine/stores/rehire.js create mode 100644 pc4backstage/hrmengine/stores/renew.js create mode 100644 pc4backstage/hrmengine/stores/resourceIndex.js create mode 100644 pc4backstage/hrmengine/stores/retire.js create mode 100644 pc4backstage/hrmengine/stores/roleSetting.js create mode 100644 pc4backstage/hrmengine/stores/rpManage.js create mode 100644 pc4backstage/hrmengine/stores/rpType.js create mode 100644 pc4backstage/hrmengine/stores/salaryApplySet.js create mode 100644 pc4backstage/hrmengine/stores/salaryBank.js create mode 100644 pc4backstage/hrmengine/stores/salaryIndexMaintenance.js create mode 100644 pc4backstage/hrmengine/stores/salaryIndexSetting.js create mode 100644 pc4backstage/hrmengine/stores/salaryItemsSet.js create mode 100644 pc4backstage/hrmengine/stores/sanyuan.js create mode 100644 pc4backstage/hrmengine/stores/scheduleShiftsSetting.js create mode 100644 pc4backstage/hrmengine/stores/scheduleWorkTime.js create mode 100644 pc4backstage/hrmengine/stores/schedulingSetting.js create mode 100644 pc4backstage/hrmengine/stores/secAdminLog.js create mode 100644 pc4backstage/hrmengine/stores/secAuditorLog.js create mode 100644 pc4backstage/hrmengine/stores/securitySetting.js create mode 100644 pc4backstage/hrmengine/stores/sensitiveWord/list.js create mode 100644 pc4backstage/hrmengine/stores/sensitiveWord/setting.js create mode 100644 pc4backstage/hrmengine/stores/serialNumber/deptNumberSetting.js create mode 100644 pc4backstage/hrmengine/stores/serialNumber/numberComposition.js create mode 100644 pc4backstage/hrmengine/stores/serialNumber/numberFlowRule.js create mode 100644 pc4backstage/hrmengine/stores/serialNumber/postNumberSetting.js create mode 100644 pc4backstage/hrmengine/stores/serialNumber/resourceNumberSetting.js create mode 100644 pc4backstage/hrmengine/stores/serialNumber/startReservedNumberSet.js create mode 100644 pc4backstage/hrmengine/stores/serialNumber/subNumberSetting.js create mode 100644 pc4backstage/hrmengine/stores/signatureManagement.js create mode 100644 pc4backstage/hrmengine/stores/staffCareReminder.js create mode 100644 pc4backstage/hrmengine/stores/subCompanyFieldDef.js create mode 100644 pc4backstage/hrmengine/stores/systemAdminLog.js create mode 100644 pc4backstage/hrmengine/stores/test.js create mode 100644 pc4backstage/hrmengine/stores/titleset.js create mode 100644 pc4backstage/hrmengine/stores/trainActivity.js create mode 100644 pc4backstage/hrmengine/stores/trainArrange.js create mode 100644 pc4backstage/hrmengine/stores/trainPlan.js create mode 100644 pc4backstage/hrmengine/stores/trainResource.js create mode 100644 pc4backstage/hrmengine/stores/trainTypes.js create mode 100644 pc4backstage/hrmengine/stores/transfer.js create mode 100644 pc4backstage/hrmengine/stores/trial.js create mode 100644 pc4backstage/hrmengine/stores/unitSet.js create mode 100644 pc4backstage/hrmengine/stores/workflowSetting.js create mode 100644 pc4backstage/hrmengine/stores/workingDayAdjust.js create mode 100644 pc4backstage/hrmengine/stores/worknature.js create mode 100644 pc4backstage/hrmengine/style/adminAreaDisplaySetting.less create mode 100644 pc4backstage/hrmengine/style/annual.less create mode 100644 pc4backstage/hrmengine/style/appDetach.less create mode 100644 pc4backstage/hrmengine/style/area.css create mode 100644 pc4backstage/hrmengine/style/assType.css create mode 100644 pc4backstage/hrmengine/style/attendanceSetting.css create mode 100644 pc4backstage/hrmengine/style/attendanceSynSetting.less create mode 100644 pc4backstage/hrmengine/style/authAdjust.less create mode 100644 pc4backstage/hrmengine/style/authSearch.less create mode 100644 pc4backstage/hrmengine/style/batchMaintenance.less create mode 100644 pc4backstage/hrmengine/style/birthday.css create mode 100644 pc4backstage/hrmengine/style/browserDisplayFieldSetting.less create mode 100644 pc4backstage/hrmengine/style/calendar.less create mode 100644 pc4backstage/hrmengine/style/cardItemSet.less create mode 100644 pc4backstage/hrmengine/style/checkContent.less create mode 100644 pc4backstage/hrmengine/style/common.less create mode 100644 pc4backstage/hrmengine/style/fieldDef.less create mode 100644 pc4backstage/hrmengine/style/funcDecent.css create mode 100644 pc4backstage/hrmengine/style/icon.less create mode 100644 pc4backstage/hrmengine/style/import.css create mode 100644 pc4backstage/hrmengine/style/index.js create mode 100644 pc4backstage/hrmengine/style/leaveType.less create mode 100644 pc4backstage/hrmengine/style/levelProtection.less create mode 100644 pc4backstage/hrmengine/style/matrix.less create mode 100644 pc4backstage/hrmengine/style/matrixAdjust.less create mode 100644 pc4backstage/hrmengine/style/matrixDataMaintenance.less create mode 100644 pc4backstage/hrmengine/style/matrixFieldSetting.less create mode 100644 pc4backstage/hrmengine/style/moduleManage.css create mode 100644 pc4backstage/hrmengine/style/newPost.less create mode 100644 pc4backstage/hrmengine/style/onlineAnalysis.css create mode 100644 pc4backstage/hrmengine/style/onlineAttendance.less create mode 100644 pc4backstage/hrmengine/style/orgChart.less create mode 100644 pc4backstage/hrmengine/style/paidLeaveSetting.less create mode 100644 pc4backstage/hrmengine/style/paidLevel.less create mode 100644 pc4backstage/hrmengine/style/payrollManagement.css create mode 100644 pc4backstage/hrmengine/style/payrollManagement.less create mode 100644 pc4backstage/hrmengine/style/payrollSending.less create mode 100644 pc4backstage/hrmengine/style/personalSalaryAdjustment.css create mode 100644 pc4backstage/hrmengine/style/personalSalaryAdjustment.less create mode 100644 pc4backstage/hrmengine/style/privacySetting.less create mode 100644 pc4backstage/hrmengine/style/resourceIndex.less create mode 100644 pc4backstage/hrmengine/style/roleSetting.less create mode 100644 pc4backstage/hrmengine/style/rpManage.css create mode 100644 pc4backstage/hrmengine/style/salaryIndexMaintenance.css create mode 100644 pc4backstage/hrmengine/style/salaryItemsSet.css create mode 100644 pc4backstage/hrmengine/style/sanyuan.less create mode 100644 pc4backstage/hrmengine/style/sanyuanLog.less create mode 100644 pc4backstage/hrmengine/style/schedulingSetting.less create mode 100644 pc4backstage/hrmengine/style/searchGroupRelated.css create mode 100644 pc4backstage/hrmengine/style/securitySetting.less create mode 100644 pc4backstage/hrmengine/style/serialNumber.less create mode 100644 pc4backstage/hrmengine/style/shitfsSetting.less create mode 100644 pc4backstage/hrmengine/style/staffCareReminder.less create mode 100644 pc4backstage/hrmengine/style/trainActivity.css create mode 100644 pc4backstage/hrmengine/style/trainArrange.css create mode 100644 pc4backstage/hrmengine/style/trainPlan.css create mode 100644 pc4backstage/hrmengine/style/workHour.css create mode 100644 pc4backstage/hrmengine/style/workflowSetting.less create mode 100644 pc4backstage/hrmengine/style/workingDayAdjust.less create mode 100644 pc4backstage/hrmengine/style/worktime.less create mode 100644 pc4backstage/hrmengine/util/PASSUtil.js create mode 100644 pc4backstage/hrmengine/util/RSAUtil.js create mode 100644 pc4backstage/hrmengine/util/index.js create mode 100644 pc4backstage/hrmengine/util/organization-func.js create mode 100644 pc4backstage/hrmengine/util/pulic-func.js create mode 100644 pc4backstage/hrmengine/util/pure-util.js create mode 100644 pc4backstage/hrmengine/util/save-time-util.js diff --git a/pc4backstage/hrmComsPublic/apis/common.js b/pc4backstage/hrmComsPublic/apis/common.js new file mode 100644 index 0000000..2ef767c --- /dev/null +++ b/pc4backstage/hrmComsPublic/apis/common.js @@ -0,0 +1,24 @@ +import { + WeaTools +} from 'ecCom' + +/** + * 获取权限 + * @param {[type]} moduleName [模块名] + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const authorized = (moduleName, params = {}, apiMethod = 'getHasRight') => WeaTools.callApi(`/api/hrm/${moduleName}/${apiMethod || 'getHasRight'}`, 'POST', params); + +/** + * 应用分权 + */ +export const detachable = (params = {}) => WeaTools.callApi('/api/hrm/common/getDetachable', 'GET', params); + +export const checkAuthAndDetach = (moduleName, params = {}, apiMethod = 'getHasRight') => Promise.all([authorized(moduleName, params, apiMethod || 'getHasRight'), detachable()]) + +export const exportExcel = (params = {}) => WeaTools.callApi('/api/ec/dev/table/export', 'POST', params) + +export const isEnableMultiLang = (params = {}) => WeaTools.callApi('/api/hrm/common/isEnableMultiLang', 'GET', params) + +export const getPinYin = (params = {}) => WeaTools.callApi('/api/workflow/formSetting/fieldSet/getPinYin', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/components/AdvanceSearchFormInfo.js b/pc4backstage/hrmComsPublic/components/AdvanceSearchFormInfo.js new file mode 100644 index 0000000..0564eda --- /dev/null +++ b/pc4backstage/hrmComsPublic/components/AdvanceSearchFormInfo.js @@ -0,0 +1,65 @@ +import React, { + Component +} from 'react'; +import { + WeaFormItem, + WeaNewScroll, + WeaSearchGroup, +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; + +export default class AdvanceSearchFormInfo extends Component { + renderGroupForm = () => { + const { + form, + formFields, + itemRender + } = this.props; + let formParams = form.getFormParams(); + let arr = []; + formFields.map((c, i) => { + let _arr = []; + c.items.map((field, index) => { + const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null; + const itemProps = { + ratio1to2: true, + label: field.label, + labelCol: { + span: `${window.HrmEngineLabelCol}` + }, + error: form.getError(field), + tipPosition: 'bottom', + wrapperCol: { + span: `${window.HrmEngineWrapperCol}` + } + } + let coms; + if (customerRender == null) { + coms = ; + } else { + coms = customerRender(field, form, formParams); + } + coms != null && _arr.push({ + com: ( + + {coms} + + ), + col: field.colSpan || 2 + }) + }) + arr.push(); + }) + return arr; + } + + render() { + return ( + + {this.renderGroupForm()} + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/components/Calendar.js b/pc4backstage/hrmComsPublic/components/Calendar.js new file mode 100644 index 0000000..7864f22 --- /dev/null +++ b/pc4backstage/hrmComsPublic/components/Calendar.js @@ -0,0 +1,221 @@ +import '../style/calendar.less'; +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaYear, + WeaNewScroll +} from 'ecCom'; +import { + Row, + Col, + Calendar +} from 'antd'; +import classnames from 'classnames'; +import indexOf from 'lodash/indexOf'; +import has from 'lodash/has'; +import { + WeaLocaleProvider +} from 'ecCom'; +import moment from 'moment'; +const getLabel = WeaLocaleProvider.getLabel; + +@observer +export default class CustomerCalendar extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + getLocale() { + return { + firstDayOfWeek: 0, + lang: { + format: { + eras: [getLabel(383357, "公元前"), getLabel(383358, "公元")], + months: [getLabel(1492, "一月"), getLabel(1493, "二月"), getLabel(383385, "三月"), getLabel(383387, "四月"), getLabel(1496, "五月"), getLabel(383392, "六月"), + getLabel(383393, "七月"), getLabel(383394, "八月"), getLabel(383395, "九月"), getLabel(383396, "十月"), getLabel(383397, "十一月"), getLabel(383398, "十二月") + ], + shortMonths: [getLabel(1492, "一月"), getLabel(1493, "二月"), getLabel(383385, "三月"), getLabel(383387, "四月"), getLabel(1496, "五月"), getLabel(383392, "六月"), + getLabel(383393, "七月"), getLabel(383394, "八月"), getLabel(383395, "九月"), getLabel(383396, "十月"), getLabel(383397, "十一月"), getLabel(383398, "十二月") + ], + weekdays: [getLabel(24626, "星期天"), getLabel(383399, "星期一"), getLabel(383400, "星期二"), getLabel(383402, "星期三"), getLabel(383403, "星期四"), + getLabel(383404, "星期五"), getLabel(383405, "星期六") + ], + shortWeekdays: [getLabel(16106, "周日"), getLabel(16100, "周一"), getLabel(16101, "周二"), getLabel(16102, "周三"), getLabel(16103, "周四"), getLabel(16104, "周五"), + getLabel(16105, "周六") + ], + veryShortWeekdays: [getLabel(82920, "日"), getLabel(82914, "一"), getLabel(82915, "二"), getLabel(82916, "三"), getLabel(82917, "四"), getLabel(82918, "五"), getLabel(82919, "六")], + ampms: [getLabel(383408, "上午"), getLabel(383409, "下午")], + datePatterns: [`yyyy'${getLabel(383372,"年")}'M'${getLabel(383373,"月")}'d'${getLabel(383374,"日")}' EEEE`, `yyyy'${getLabel(383372,"年")}'M'${getLabel(383373,"月")}'d'${getLabel(383374,"日")}'`, "yyyy-M-d", "yy-M-d"], + timePatterns: [`ahh'${getLabel(383411,"时")}'mm'${getLabel(383412,"分")}'ss'${getLabel(383414,"秒")}' 'GMT'Z`, `ahh'${getLabel(383411,"时")}'mm'${getLabel(383412,"分")}'ss'${getLabel(383414,"秒")}'`, "H:mm:ss", "ah:mm"], + dateTimePattern: '{date} {time}' + } + }, + } + } + + //dateCellRender={this.monthDateCellRender.bind(this)} + // locale={this.getLocale()} + // onSelect={this.onMonthSelect.bind(this)} + // + generateWeekView = () => { + const { + store + } = this.props; + const { + calendarData, + editFormInfo, + getFormInfo + } = store; + return ( +
+
+
{getLabel(16106, "周日")}
+
{getLabel(16100, "周一")}
+
{getLabel(16101, "周二")}
+
{getLabel(16102, "周三")}
+
{getLabel(16103, "周四")}
+
{getLabel(16104, "周五")}
+
{getLabel(16105, "周六")}
+
+
+ { + store.toJS(calendarData).map((data, i) => { + const rest = indexOf([0, 6], moment(data.date).day()) >= 0; + const currDate = store.moment(data.date); + const formatDate = currDate.format('YYYY-MM-DD'); + const className = classnames({ + ['date']: true, + ['rest']: rest, + ['working']: !rest, + ['today']: moment().day() === moment(data.date).day() + }) + return ( +
+
+ {currDate.date()} +
+
+ + { + data.datas && data.datas.length > 0 ? data.datas.map(d => { + return ( +
editFormInfo({id: d.id, startDate: d.date, endDate: d.date, schedule: d.tips})} + style={{backgroundColor: d.bgColor}}> + {d.title} +
+ ) + }) + : +
getFormInfo(true, {startDate: formatDate, endDate: formatDate})}>
+ } +
+
+
+ ) + }) + } +
+
+ ) + } + + generateDayView = () => { + const { + store + } = this.props; + const { + calendarData, + editFormInfo + } = store; + let th = []; + for (let i = 0; i < 24; i++) th.push({i}); + let start = 0, + colSpan = 1; + return ( +
+ + {th} + + + { + calendarData.map(data => { + if(has(data, 'cols')){ + colSpan = data.cols; + start = 0; + }else if(colSpan != null){ + if(colSpan === (start + 1)){ + colSpan = 1; + start = 0; + }else{ + start++; + } + } + if(start === 0) + return ( + editFormInfo({id: data.id, startDate: data.date, endDate: data.date, schedule: data.tips})} + style={{backgroundColor: data.bgColor}}> + {data.title} + + ) + }) + } + +
+ ) + } + + render() { + const { + store + } = this.props; + const { + calendarType, + currentDay, + calendarData, + yearDateCellRender, + monthDateCellRender, + changeView + } = store; + return ( +
+ { + calendarType === 'year' && + + } + { + calendarType === 'month' && +
+ +
+ } + { + calendarType === 'week' && + this.generateWeekView() + } + { + calendarType === 'day' && + this.generateDayView() + } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/components/FormInfo.js b/pc4backstage/hrmComsPublic/components/FormInfo.js new file mode 100644 index 0000000..295abc9 --- /dev/null +++ b/pc4backstage/hrmComsPublic/components/FormInfo.js @@ -0,0 +1,144 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaFormItem, + WeaSearchGroup, + WeaCheckbox +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; +import findIndex from 'lodash/findIndex'; + +@observer +export default class FormInfo extends Component { + renderForm = () => { + const { + formFields, + form, + colCount, + itemRender, + onSelectedChangeHandle, + showLabel, + multiColumn, + custLabelCol, + childrenComponents + } = this.props; + + let groupArr = []; + const formParams = form.getFormParams(); + const labelVisible = showLabel == null || showLabel == true; + const col = colCount ? colCount : 1; + const labelCol = labelVisible ? (custLabelCol || `${window.HrmEngineLabelCol}`) : 0; + const itemProps = { + ratio1to2: labelVisible && custLabelCol == null, + style: { + marginLeft: 0 //labelVisible ? -30 : 0 + }, + tipPosition: 'bottom', + labelCol: { + span: labelCol + }, + wrapperCol: { + span: 24 - labelCol + } + } + + const textAreaProps = { + minRows: 4, + maxRows: 4 + } + + formFields.map((fields, i) => { + let formItems = []; + fields.items.map((field, j) => { + const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null; + const showCheckbox = field.checkbox || false; + let label = field.label; + if (showCheckbox) + label = {field.checkboxValue = v === '1'; onSelectedChangeHandle && onSelectedChangeHandle(field, v)}}/> + + let coms; + if (customerRender == null) { + coms = ; + } else { + coms = customerRender(field, textAreaProps, form, formParams); + } + Object.assign(itemProps, {label, error: form.getError(field)}) + let col = 1; + if(multiColumn != null){//检查有哪些字段需要一行显示多个 + const idx = findIndex(multiColumn, item => item.key === field.domkey[0]); + if(idx > -1){ + col = field.colSpan || 1; + if(multiColumn[idx].labelCol != null)//检查字段是否有配置标题宽度 + Object.assign(itemProps,{ + labelCol: { + span: multiColumn[idx].labelCol + }, + wrapperCol: { + span: 24 - multiColumn[idx].labelCol + } + }) + }else{ + Object.assign(itemProps,{ + labelCol: { + span: labelCol + }, + wrapperCol: { + span: 24 - labelCol + } + }) + } + } + + coms != null && formItems.push({ + com: ( + + {coms} + + ), + col + }) + + if(childrenComponents && childrenComponents[field.domkey[0]]){ + childrenComponents[field.domkey[0]]().map(child => formItems.push(child)); + } + }) + + groupArr.push( + ( + + ) + ) + }); + + return groupArr; + } + + render() { + const { + formFields, + className, + showError + } = this.props; + if (formFields == null) + return (
) + + return ( +
+ {this.renderForm()} +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/components/OrganizationTree.js b/pc4backstage/hrmComsPublic/components/OrganizationTree.js new file mode 100644 index 0000000..3118983 --- /dev/null +++ b/pc4backstage/hrmComsPublic/components/OrganizationTree.js @@ -0,0 +1,47 @@ +import React, { + Component +} from 'react'; +import { + WeaOrgTree, + WeaLocaleProvider +} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +export default class OrganizationTree extends Component { + constructor(props) { + super(props); + this.state = { + checkStrictlyTitle: (this.props.showCheckStrictly ? this.getTitle(this.props.checkStrictly) : ''), + checkStrictly: this.props.checkStrictly || false + } + } + + getTitle = (val) => { + if(this.props.checkStrictlyTitles != null){ + if(val) + return this.props.checkStrictlyTitles[1]; + return this.props.checkStrictlyTitles[0]; + }else{ + + } + } + + onCheckStrictlyChange = (val) => { + this.setState({checkStrictlyTitle: this.getTitle(val), checkStrictly: val}); + this.props.onCheckStrictlyChangeCallback && this.props.onCheckStrictlyChangeCallback(val); + } + + render() { + let checkableTypes = null; + if(this.props.getCheckableTypes) + checkableTypes = this.props.getCheckableTypes(); + return ( + ${getLabel(25332, '组织结构')}`} + checkStrictlyTitle={this.state.checkStrictlyTitle} + onCheckStrictlyChange={this.onCheckStrictlyChange} + checkStrictly={this.state.checkStrictly} + ref='tree'/> + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/components/Tabs.js b/pc4backstage/hrmComsPublic/components/Tabs.js new file mode 100644 index 0000000..325b800 --- /dev/null +++ b/pc4backstage/hrmComsPublic/components/Tabs.js @@ -0,0 +1,224 @@ +import React, { + Component +} from 'react'; +import { + WeaTab, + WeaLocaleProvider +} from 'ecCom'; +import { + observer +} from 'mobx-react'; +import { + Button +} from 'antd'; +import AdvanceSearchFormInfo from './AdvanceSearchFormInfo'; +import cloneDeep from 'lodash/cloneDeep'; +const getLabel = WeaLocaleProvider.getLabel; + +const calFormHeight = (groupLength, children) => { + let childrenLength = 0; + children.map(c => { + if (c.colSpan != null) { + childrenLength += c.colSpan == 2 ? 1 : 2; + } else + childrenLength += 1; + }) + let height = (childrenLength / 2 + childrenLength % 2) * 52 + 10; + if (groupLength > 1) + height += groupLength * 45; + if (height > 300) + return 300; + return height; +} + +@observer +export default class Tabs extends Component { + constructor(props) { + super(props); + this.state = { + showSearchAd: false, + }; + } + + componentWillReceiveProps(nextProps) { + this.setState({ + showSearchAd: false, + }) + } + + doSearch = () => { + const { + conditionForm, + tabConfig, + activeTabInfo, + } = this.props; + + let tabInfo = tabConfig.tabs[activeTabInfo.activeTabIndex]; + tabInfo.doSearch(conditionForm.getFormParams()); + this.setState({ + showSearchAd: false + }); + } + + doReset = () => { + const { + conditionForm + } = this.props; + conditionForm.resetConditionValue(); + } + + doCancel = () => { + this.setState({ + showSearchAd: false, + }); + } + + getTabButtonsAd() { + return [ + (), + (), + () + ] + } + + renderForm = () => { + const { + conditionForm, + conditionFormFields, + itemRender + } = this.props; + const { + isFormInit + } = conditionForm; + if (isFormInit) + return + else + return ''; + } + + initTab = (props) => { + return React.cloneElement(, { + ...props + }); + } + + renderTabNav = () => { + //data + const { + activeTabInfo, + tabConfig, + tabChangeHandle, + tabBtnDef, + conditionForm, + conditionFormFields, + advanceHeight, + store + } = this.props; + + let tabInfo = tabConfig.tabs[activeTabInfo.activeTabIndex]; + let tabsData = cloneDeep(tabConfig.tabs) || []; + tabsData != null && tabsData.map(tab => { + if (typeof(tab.title) == 'function') + tab.title = tab.title(); + delete tab.topButtonDef; + delete tab.tabButtonDef; + }); + let tabProps = { + type: 'editable-inline', + datas: tabsData, + keyParam: tabConfig.keyParam, + selectedKey: tabConfig.activeTabKey, + onChange: tabChangeHandle + } + tabBtnDef && Object.assign(tabProps, { + buttons: tabBtnDef + }); + const searchType = tabInfo.searchType || []; + if (searchType.length > 0) { + Object.assign(tabProps, { + searchType: searchType, + onSearch: (value) => { + if (searchType.indexOf('advanced') >= 0) { + tabInfo.doSearch(conditionForm.getFormParams()); + } else { + tabInfo.doSearch({ + [tabInfo.searchKey]: value + }); + } + } + }); + if (searchType.indexOf('advanced') >= 0 && conditionForm != null && conditionForm.isFormInit) { + const formParams = conditionForm.getFormParams(); + Object.assign(tabProps, { + searchsBaseValue: formParams[tabInfo.searchKey] || '', + showSearchAd: this.state.showSearchAd, + setShowSearchAd: (bool) => { + this.setState({ + showSearchAd: bool + }) + }, + onSearchChange: (value) => conditionForm.updateFields({ + [tabInfo.searchKey]: { + value + } + }, false), + buttonsAd: this.getTabButtonsAd(), + searchsAd:
{ + if (e.keyCode == 13 && e.target.tagName === "INPUT") { + tabInfo.doSearch(conditionForm.getFormParams()); + this.setState({ + showSearchAd: false + }) + } + }} + >{this.renderForm()}
+ }); + + Object.assign(tabProps, { + //advanceHeight: calFormHeight(conditionFormFields.length, _.keys(formParams).length) + advanceHeight: advanceHeight ? advanceHeight : calFormHeight(conditionFormFields.length, conditionForm.fieldArr) + }); + } + } + tabConfig.onTabEdit && Object.assign(tabProps, { + onEdit: tabConfig.onTabEdit + }); + + return this.initTab(tabProps); + } + + renderTabContent = () => { + const { + children, + activeTabInfo, + rightMenu, + store + } = this.props; + if (Array.isArray(children)) { + return React.cloneElement(children[activeTabInfo.activeTabIndex], { + rightMenu, + activeTabIndex: activeTabInfo.activeTabIndex, + store + }); + } else { + return React.cloneElement(children, { + rightMenu, + activeTabIndex: activeTabInfo.activeTabIndex, + store + }); + } + } + + render() { + const { + tabConfig + } = this.props; + return ( +
+ {tabConfig.tabs.length > 0 && this.renderTabNav()} + {tabConfig.tabs.length > 0 && this.renderTabContent()} +
+ ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/components/index.js b/pc4backstage/hrmComsPublic/components/index.js new file mode 100644 index 0000000..b73a118 --- /dev/null +++ b/pc4backstage/hrmComsPublic/components/index.js @@ -0,0 +1,13 @@ +import AdvanceSearchFormInfo from './AdvanceSearchFormInfo'; +import Calendar from './Calendar'; +import FormInfo from './FormInfo'; +import OrganizationTree from './OrganizationTree'; +import Tabs from './Tabs'; + +module.exports = { + AdvanceSearchFormInfo, + Calendar, + FormInfo, + OrganizationTree, + Tabs, +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/index.js b/pc4backstage/hrmComsPublic/index.js new file mode 100644 index 0000000..fdd4edf --- /dev/null +++ b/pc4backstage/hrmComsPublic/index.js @@ -0,0 +1,13 @@ +import AdvanceSearchFormInfo from './components/AdvanceSearchFormInfo'; +import Calendar from './components/Calendar'; +import FormInfo from './components/FormInfo'; +import OrganizationTree from './components/OrganizationTree'; +import Tabs from './components/Tabs'; + +module.exports = { + AdvanceSearchFormInfo, + Calendar, + FormInfo, + OrganizationTree, + Tabs, +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/public/i18n.js b/pc4backstage/hrmComsPublic/public/i18n.js new file mode 100644 index 0000000..4f8948b --- /dev/null +++ b/pc4backstage/hrmComsPublic/public/i18n.js @@ -0,0 +1,63 @@ +import { + WeaLocaleProvider +} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +export const i18n = { + label: { + pathSetting: () => getLabel(16483, '路径设置'), + showAllType: () => getLabel(385346, '显示全部类型'), + basicSetting: () => getLabel(130187, '基本设置'), + organization: () => getLabel(25332, '组织结构'), + collect: () => getLabel(28111, '收藏'), + helper: () => getLabel(275, '帮助'), + search: () => getLabel(82529, '搜索'), + reset: () => getLabel(27088, '重置'), + ok: () => getLabel(33703, '确定'), + cancel: () => getLabel(32694, '取消'), + create: () => getLabel(365, '新建'), + remove: () => getLabel(20230, '移除'), + delete: () => getLabel(131966, '删除'), + modify: () => getLabel(93, '编辑'), + transfer: () => getLabel(80, '转移'), + multiRemove: () => getLabel(383696, '批量移除'), + multiDelete: () => getLabel(32136, '批量删除'), + save: () => getLabel(30986, '保存'), + saveAndSetting: () => getLabel(32159, '保存并进入详细设置'), + add: () => getLabel(131201, '添加'), + copy: () => getLabel(77, '复制'), + log: () => getLabel(83, '日志'), + replace: () => getLabel(84563, '替换'), + columnVisibleSetting: () => getLabel(32535, '显示列定制'), + multiModify: () => getLabel(383518, '批量编辑'), + import: () => getLabel(18596, '导入'), + export: () => getLabel(28343, '导出Excel'), + }, + confirm: { + defaultTitle: () => getLabel(131329, '信息确认'), + removeSelected: () => getLabel(385639, '确定要移除选择的记录吗?'), + deleteSelected: () => getLabel(385625, '确定要删除选择的记录吗?'), + selectedEmpty: () => getLabel(84093, '请至少选择一条记录!'), + cancelSelected: () => getLabel(384051, '确定要封存选中的记录吗?'), + doISCancelSelected: () => getLabel(384050, '确定要解封选中的记录吗?'), + remove: () => getLabel(83449, '确定要移除吗?'), + delete: () => getLabel(83877, '确定要删除吗?'), + cancel: () => getLabel(384052, '确定要封存吗?'), + doISCancel: () => getLabel(384053, '确定要解封吗?'), + forbidden: () => getLabel(385359, '确定要禁用吗?'), + active: () => getLabel(385033, '确认要启用吗?'), + checkGenForm: () => getLabel(84793, '将生成{param}表单,是否继续?'), + }, + message: { + authFailed: () => getLabel(2012, '对不起,您暂时没有权限!'), + actionError: () => getLabel(132200, '操作失败!'), + opSuccess: () => getLabel(30700, '操作成功'), + saveSuccess: () => getLabel(83551, '保存成功!'), + saveFailed: () => getLabel(84544, '保存失败!'), + removeSuccess: () => getLabel(385950, '移除成功!'), + deleteSuccess: () => getLabel(83472, '删除成功!'), + uploadSuccess: () => getLabel('25388',"上传成功"), + autoGenFormFaild: () => getLabel(83398, '类型表单不支持自动生成,请选择已有表单!'), + plsSelect: () => getLabel(125389, '请先选择'), + } +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/public/logType.js b/pc4backstage/hrmComsPublic/public/logType.js new file mode 100644 index 0000000..34add10 --- /dev/null +++ b/pc4backstage/hrmComsPublic/public/logType.js @@ -0,0 +1,16 @@ +export const logTypeDef = { + /** + * definition of log type + * key-value mode + */ + //simple + HRM_ENGINE_HRM_SCHEDULESIGN_IMPORT :20052,//外部集成考勤 + HRM_ENGINE_SCHEDULECODE: 20068,//考勤编号维护 + HRM_ENGINE_SCHEDULEDEVICE: 20069,//考勤机维护 + HRM_ENGINE_SHIFTMANAGER: 20067,//班次设置 + HRM_ENGINE_KQGROUP :20070,//考勤组管理 + HRM_ENGINE_KQREPORT_DEFINED: 20075,//考勤汇总报表展示列定制 + HRM_ENGINE_KQREPORT_DEFINED_GROUP: 20076,//考勤汇总报表展示列定制分组维护 + HRM_ENGINE_KQREPORT_DEFINED_FIELD: 20078,//考勤汇总报表展示列定制字段维护 + HRM_KQ_WORKFLOW: 20041,//考勤流程设置 +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/stores/baseStore.js b/pc4backstage/hrmComsPublic/stores/baseStore.js new file mode 100644 index 0000000..e388906 --- /dev/null +++ b/pc4backstage/hrmComsPublic/stores/baseStore.js @@ -0,0 +1,377 @@ +import { + observable, + action +} from 'mobx'; +import { + Button, + message, + Modal +} from 'antd'; +import { + WeaForm, + WeaLogView +} from 'comsMobx'; +import { + WeaLocaleProvider, + WeaLoadingGlobal +} from 'ecCom'; +import classnames from 'classnames'; +import * as mobx from 'mobx'; +import { + authorized, + detachable, + checkAuthAndDetach, + getPinYin +} from '../apis/common'; +import { + i18n +} from '../public/i18n'; +import { + logTypeDef +} from '../public/logType'; +import {findIndex} from 'lodash'; +import moment from 'moment'; +const getLabel = WeaLocaleProvider.getLabel; + +const confirm = Modal.confirm; +const info = Modal.confirm; +const { + LogStore +} = WeaLogView; + +export default class HrmBaseStore { + constructor(){ + } + /********************* unobservable list *********************/ + logTypeDef = logTypeDef; + getPinYin = getPinYin; + toJS = mobx.toJS; + moment = moment; + basicDialogParams = { + moduleName: 'hrm', + style: { + width: 520, + height: 300 + }, + visible: false, + title: '', + } + menuIconCollection = { + save: 'icon-coms-Preservation', + create: 'icon-coms-New-Flow', + modify: 'icon-coms-edit', + remove: 'icon-coms-Batch-delete', + copy: 'icon-coms-form-copy', + entry: 'icon-coms-edit', + setting: 'icon-coms-Flow-setting', + log: 'icon-coms-Print-log', + multiModify: 'icon-coms-BatchEditing', + import: ' icon-coms-leading-in', + export: 'icon-coms-export', + search: 'icon-coms-search', + sync: 'icon-coms-Update-synchronization', + done: 'icon-coms-Upload-successfully', + selectAll: 'icon-coms-batch', + add: "icon-coms-Add-to-o" + } + getBasicMenus = (logTypeKey, targetId = null) => { + let arr = []; + if(logTypeKey){ + arr.push({ + key: '99', + content: i18n.label.log(), + icon: , + onClick: () => this.showLog({logSmallType: this.logTypeDef[logTypeKey], targetId}) + }); + } + return arr; + } + + dialogPropsDef = { + moduleName: 'hrm', + visible: false, + title: '', + moreBtn: { + datas: [] + }, + // hasScroll: true + } + refsDialogPropsDef = { + moduleName: 'hrm', + visible: false, + title: '', + } + dateSwitchTypeList = ['year', 'month', 'week', 'day']; + formTarget = {}; //form collection + opId = null; //数据操作对象主键ID + authorizationInfo = {}; + + /** + * 权限验证 + * @param {String} moduleName [模块名] + * @param {Object} params [restful request url params] + * @param {Function} callback [验证通过后的callback function] + * @return {null} + */ + checkAuthorized = (moduleName, params, callback, apiMethod, needCheckDetachable = false) => { + if (needCheckDetachable) { + checkAuthAndDetach(moduleName, params, apiMethod).then(rs => { + rs.map((result, index) => { + if (result.status === '1') { + switch (index) { + case 0: + const init = !result.hasRight; + this.authorizationInfo = result; + this.containerInitFinished = { + ...this.containerInitFinished, + init, + authorized: result.hasRight, + userId: result.userId + } + this.containerInitFinished.authorized && callback && callback(); + break; + case 1: + this.containerInitFinished.detachable = result.detachable === '0' ? false : true + break; + } + } + }) + }) + } else { + authorized(moduleName, params, apiMethod).then((data) => { + if (data.status === '1') { + const init = !data.hasRight; + this.authorizationInfo = data; + this.containerInitFinished = { + init, + authorized: data.hasRight + } + this.containerInitFinished.authorized && callback && callback(); + } + }, error => { + this.containerInitFinished = { + init: true, + authorized: false + } + }); + } + } + + /** + * 获取激活的tab页下标 + * @param {Array} tabs [tabData数组] + * @param {String} key [tabKey] + * @return {Integer} [tab下标] + */ + getTabIndex(tabs, key) { + if (tabs != null && tabs.length > 0) { + return findIndex(tabs, { + viewCondition: key + }) + } + return -1; + } + + convertToMenus = (buttons) => { + let menus = []; + buttons.map((btn, index) => { + const { + props + } = btn; + menus.push({ + key: index.toString(), + content: props.children, + icon: , + onClick: props.onClick, + disabled: props.disabled || false + }); + }) + return menus; + } + + /** + * 获取WeaTop按钮、WeaTab按钮以及右键菜单列表 + * @param {Object} tabConfig [description] + * @return {Object} [description] + */ + btnsAndMenus = (tabConfig) => { + let topBtnDef = [], //WeaTop按钮 + menuDef = [], //右键菜单 + tabBtnDef = []; //WeaTab按钮 + + const activeTabIndex = this.getTabIndex(tabConfig.tabs, tabConfig.activeTabKey); + if (tabConfig.activeTabKey === '' || activeTabIndex < 0) { + return { + btns: topBtnDef, + menus: menuDef, + tabBtnDef: tabBtnDef + } + } + const tab = tabConfig.tabs[activeTabIndex]; + const { + topButtonDef, + tabButtonDef + } = tab; + topButtonDef && topButtonDef.map((def, idx) => { //组织WeaTop按钮 + const lbl = (typeof(def.label) == 'function' ? def.label() : def.label); + switch (def.comType) { + case 'button': + let disabled = false; + if (def.checkAction) + disabled = this[def.checkAction]; + topBtnDef.push(); + menuDef.push({ //组织右键菜单 + key: `$top-btn-${idx}`, + content: lbl, + icon: , + onClick: def.onClickHandle, + disabled: disabled || def.disabled || false + }) + break; + default: + break; + } + }); + tabButtonDef && tabButtonDef.map((def, idx) => { //组织WeaTab按钮 + const lab = (typeof(def.label) == 'function' ? def.label() : def.label); + switch (def.comType) { + case 'button': + let disabled = false; + if (def.checkAction) + disabled = this[def.checkAction]; + const classes = classnames({ + [def.icon]: true, + 'tabBtn': true, + 'tabBtn-active': !disabled, + 'tabBtn-disable': disabled + }); + tabBtnDef.push( + + ); + break; + default: + break; + } + }); + return { + btns: topBtnDef, + menus: menuDef, + tabBtnDef: tabBtnDef + } + } + + confirmInfo = (props) => { + confirm({ ...props, + title: props.title || i18n.confirm.defaultTitle(), + okText: i18n.label.ok(), + cancelText: i18n.label.cancel() + }); + } + + hint = (props) => { + info({ ...props, + title: i18n.confirm.defaultTitle(), + okText: i18n.label.ok(), + }); + } + + /** + * 初始化formStore + * @param {String} formName [form's name] + * @param {Array} fields [form field definition] + * @return {null} + */ + setFormData = (formName, fields) => { + this.formTarget[`${formName}Fields`] = fields; + this.formTarget[formName] = new WeaForm(); + this.formTarget[formName].initFormFields(fields); + } + + /** + * 获取表格数据的通用方法 + * @param {String} tableStore [tableStore's name] + * @param {Function} api [restful api function] + * @param {Object} params [restful request url params] + * @return {null} + */ + requestTableData = (tableStore, api, params = {}, callback) => { + api(params).then(data => { + if (data.status === '1') { + tableStore.getDatas(data.sessionkey, 1); + callback && callback(); + } else + message.error(data.message); + }, error => { + message.error(i18n.message.actionError()); + }); + } + + showLog = (logTypeParams) => { + window.setLogViewProps({ + ...logTypeParams + }); + } + /********************* unobservable list *********************/ + + /********************* observable list *********************/ + @observable containerInitFinished = { //模块初始化状态 + init: false, + authorized: false, + detachable: false + } + @observable showError = new Date().getTime(); //状态刷新,组件引用该值监听变化重新render + @observable dialogParams = {}; //模态框参数 + + // monitorI18n = () => { + // this.i18nLoaded; + // } + + // monitor = autorun(this.monitorI18n) + /********************* observable list *********************/ + + /********************* action list *********************/ + @action definedColumn = (table) => {//显示列定义 + table.setColSetVisible(true); + table.tableColSet(true); + } + + @action showWeaLoadingGlobal = (tip = '') => WeaLoadingGlobal.start({tip}); + @action hideWeaLoadingGlobal = () => { + WeaLoadingGlobal.end(); // 停止遮罩loading + WeaLoadingGlobal.destroy(); // 销毁遮罩loading + } + /********************* action list *********************/ + + getLocale() { + return { + firstDayOfWeek: 0, + lang: { + format: { + eras: [getLabel(383357, "公元前"), getLabel(383358, "公元")], + months: [getLabel(1492, "一月"), getLabel(1493, "二月"), getLabel(383385, "三月"), getLabel(383387, "四月"), getLabel(1496, "五月"), getLabel(383392, "六月"), + getLabel(383393, "七月"), getLabel(383394, "八月"), getLabel(383395, "九月"), getLabel(383396, "十月"), getLabel(383397, "十一月"), getLabel(383398, "十二月") + ], + shortMonths: [getLabel(1492, "一月"), getLabel(1493, "二月"), getLabel(383385, "三月"), getLabel(383387, "四月"), getLabel(1496, "五月"), getLabel(383392, "六月"), + getLabel(383393, "七月"), getLabel(383394, "八月"), getLabel(383395, "九月"), getLabel(383396, "十月"), getLabel(383397, "十一月"), getLabel(383398, "十二月") + ], + weekdays: [getLabel(398, "星期天"), getLabel(392, "星期一"), getLabel(393, "星期二"), getLabel(394, "星期三"), getLabel(395, "星期四"), + getLabel(396, "星期五"), getLabel(397, "星期六") + ], + shortWeekdays: [getLabel(16106, "周日"), getLabel(16100, "周一"), getLabel(16101, "周二"), getLabel(16102, "周三"), getLabel(16103, "周四"), getLabel(16104, "周五"), + getLabel(16105, "周六") + ], + veryShortWeekdays: [getLabel(82920, "日"), getLabel(82914, "一"), getLabel(82915, "二"), getLabel(82916, "三"), getLabel(82917, "四"), getLabel(82918, "五"), getLabel(82919, "六")], + ampms: [getLabel(383408, "上午"), getLabel(383409, "下午")], + datePatterns: [`yyyy'${getLabel(383372,"年")}'M'${getLabel(383373,"月")}'d'${getLabel(383374,"日")}' EEEE`, `yyyy'${getLabel(383372,"年")}'M'${getLabel(383373,"月")}'d'${getLabel(383374,"日")}'`, "yyyy-M-d", "yy-M-d"], + timePatterns: [`ahh'${getLabel(383411,"时")}'mm'${getLabel(383412,"分")}'ss'${getLabel(383414,"秒")}' 'GMT'Z`, `ahh'${getLabel(383411,"时")}'mm'${getLabel(383412,"分")}'ss'${getLabel(383414,"秒")}'`, "H:mm:ss", "ah:mm"], + dateTimePattern: '{date} {time}' + } + }, + } + } + /********************* tableEdit props & functions *********************/ +} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/style/calendar.less b/pc4backstage/hrmComsPublic/style/calendar.less new file mode 100644 index 0000000..6b76017 --- /dev/null +++ b/pc4backstage/hrmComsPublic/style/calendar.less @@ -0,0 +1,289 @@ +.calendar-wrapper { + width: 100%; + height: 100%; + //padding-right: 10px; + + .ant-fullcalendar-header{ + display:none; + } + .ant-fullcalendar-fullscreen { + .ant-fullcalendar-today{ + .ant-fullcalendar-date{ + background-color:#fefce9 !important; + // border-top:1px solid #eee !important; + } + } + + .ant-fullcalendar-calendar-body{ + padding:0; + table{ + td{ + border: 1px solid #eee; + } + tr>:first-child{ + border-left: none !important; + + } + thead{ + .ant-fullcalendar-column-header{ + border-left: 1px solid #eee; + border-right: 1px solid #eee; + border-bottom: 1px solid #eee; + padding-right: 0; + text-align: center; + padding-bottom: 0; + color:#333333; + } + tr{ + height: 40px; + th{ + background-color: #f5f5f5; + } + } + } + tbody{ + tr{ + height: 100px; + + td{ + height: 100px; + box-sizing: content-box; + } + } + .ant-fullcalendar-date{ + padding:0; + padding-top: 5px; + margin: 0; + border-collapse:collapse; + border: 0; + height: 122px; + .ant-fullcalendar-value{ + margin:0 16px 0 0; + } + .ant-fullcalendar-content{ + overflow:hidden; + // height:100px; + } + } + .ant-fullcalendar-date:hover{ + background-color:#ffffff; + } + } + } + } + } + + .workTips{ + position: absolute; + top: 7px; + left: 5px; + } + + .list { + position: absolute; + top: 30px; + bottom: 5px; + left: 5px; + right: 5px; + .empty{ + width: 100%; + height: 100%; + } + .schedul{ + margin-bottom: 3px; + padding-left: 5px; + color: #fff; + + &:last-child{ + margin-bottom: 0px; + } + } + } + } + + .wea-year { + .date-item { + .tip { + position: absolute; + top: -2px; + right: -5px; + font-size: 6px; + line-height: 1; + } + + i { + font-size: 15px; + } + } + + .year-cell-bottom { + position: absolute; + bottom: -2px; + width: 18px; + height: 4px; + } + + .bottomTag{ + position: absolute; + bottom: 0; + width: 100%; + height: 3px; + } + + .workTips { + position: absolute; + top: -8px; + right: -8px; + } + } + + .calendar-item { + .icon-wrapper { + position: absolute; + font-size: 14px; + top: 9px; + left: 10px; + + i { + font-size: 17px; + } + } + + .tip { + position: absolute; + font-size: 10px; + top: -1px; + right: 4px; + } + + .workflow-item { + padding-left: 10px; + margin-top: 3px; + height: 24px; + line-height: 24px; + a { + color: inherit; + } + } + + .workflow-item.shift-item { + color: #333; + filter:alpha(opacity=1000); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; + } + } + + .weekView{ + display: table; + table-layout: fixed; + width: 100%; + + .th{ + font-size: 12px; + display: table-row; + height: 30px; + line-height: 30px; + + &>div{ + display: table-cell; + text-align: center; + border-bottom: 1px solid #59b0f2; + } + } + .tb{ + display: table-row; + height: 135px; + + &>div{ + display: table-cell; + border-bottom: 1px solid #ccc; + border-right: 1px solid #ccc; + + .date{ + height: 30px; + } + .rest{ + color: #ccc; + } + .working{ + color: #000; + } + .today{ + color: #39f; + } + + .list{ + height: 105px; + padding-left: 5px; + padding-right: 5px; + cursor: pointer; + .empty{ + width: 100%; + height: 100%; + } + .schedul{ + margin-bottom: 3px; + padding-left: 5px; + width: 100%; + text-align: center; + color: #fff; + + &:last-child{ + margin-bottom: 0px; + } + } + } + + &:last-child{ + border-right: none; + } + } + } + } + + .dayView{ + .th{ + font-size: 12px; + height: 30px; + line-height: 30px; + text-align: center; + border-bottom: 1px solid #59b0f2; + + &>div{ + border-right: 1px solid #ccc; + + &:last-child{ + border-right: none; + } + } + } + .list{ + font-size: 12px; + height: 30px; + line-height: 30px; + cursor: pointer; + + .schedul{ + color: #fff; + height: 100%; + border-right: 1px solid #ccc; + padding-left: 5px; + padding-right: 5px; + text-align: center; + white-space: nowrap; + word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + border-bottom: 1px solid #ccc; + + &:last-child{ + border-right: none; + } + } + } + } \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/adareaset.js b/pc4backstage/hrmengine/apis/adareaset.js new file mode 100644 index 0000000..b79b37b --- /dev/null +++ b/pc4backstage/hrmengine/apis/adareaset.js @@ -0,0 +1,125 @@ +import { + WeaTools +} from 'ecCom' + +//新建国家 +export const getCountryForm = (params) => { + return WeaTools.callApi('/api/hrm/area/getCountryForm?is_multilang_set=true', 'GET', params); +} +//新建省份 +export const getProvinceForm = (params) => { + return WeaTools.callApi('/api/hrm/area/getProvinceForm?is_multilang_set=true', 'GET', params); +} +//新建城市 +export const getCityForm = (params) => { + return WeaTools.callApi('/api/hrm/area/getCityForm?is_multilang_set=true', 'GET', params); +} +//新建区县 +export const getCityTwoForm = (params) => { + return WeaTools.callApi('/api/hrm/area/getCityTwoForm?is_multilang_set=true', 'GET', params); +} +//国家新建保存 +export const addCountry = (params) => { + return WeaTools.callApi('/api/hrm/area/addCountry', 'POST', params); +} +//国家编辑保存 +export const editCountry = (params) => { + return WeaTools.callApi('/api/hrm/area/editCountry', 'POST', params); +} +//省份新建保存 +export const addProvince = (params) => { + return WeaTools.callApi('/api/hrm/area/addProvince', 'POST', params); +} +//省份编辑保存 +export const editProvince = (params) => { + return WeaTools.callApi('/api/hrm/area/editProvince', 'POST', params); +} +//城市新建保存 +export const addCity = (params) => { + return WeaTools.callApi('/api/hrm/area/addCity', 'POST', params); +} +//城市编辑保存 +export const editCity = (params) => { + return WeaTools.callApi('/api/hrm/area/editCity', 'POST', params); +} +//城市新建保存 +export const addCityTwo = (params) => { + return WeaTools.callApi('/api/hrm/area/addCityTwo', 'POST', params); +} +//城市编辑保存 +export const editCityTwo = (params) => { + return WeaTools.callApi('/api/hrm/area/editCityTwo', 'POST', params); +} + +//获取国家表格数据 +export const getCountryList = (params) => { + return WeaTools.callApi('/api/hrm/area/getCountryList', 'GET', params); +} +//获取省份表格数据 +export const getProvinceList = (params) => { + return WeaTools.callApi('/api/hrm/area/getProvinceList', 'GET', params); +} +//获取城市表格数据 +export const getCityList = (params) => { + return WeaTools.callApi('/api/hrm/area/getCityList', 'GET', params); +} +//获取区县表格数据 +export const getCityTwoList = (params) => { + return WeaTools.callApi('/api/hrm/area/getCityTwoList', 'GET', params); +} +//获取高级搜索条件 +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/area/getSearchCondition', 'GET', params); +} +//国家省份城市区县封存和解封 +export const doblock = (params) => { + return WeaTools.callApi('/api/hrm/area/doblock', 'POST', params); +} +//国家删除(批量删除) +export const deleteCountry = (params) => { + return WeaTools.callApi('/api/hrm/area/deleteCountry', 'POST', params); +} +//省份删除(批量删除) +export const deleteProvince = (params) => { + return WeaTools.callApi('/api/hrm/area/deleteProvince', 'POST', params); +} +//城市删除(批量删除) +export const deleteCity = (params) => { + return WeaTools.callApi('/api/hrm/area/deleteCity', 'POST', params); +} +//区县删除(批量删除) +export const deleteCityTwo = (params) => { + return WeaTools.callApi('/api/hrm/area/deleteCityTwo', 'POST', params); +} +//国家、省份、城市和区县信息 +export const getAreaDetail = (params) => { + return WeaTools.callApi('/api/hrm/area/getAreaDetail', 'GET', params); +} +//获取导入表单 +export const getAreaImportForm = (params) => { + return WeaTools.callApi('/api/hrm/area/getAreaImportForm?is_multilang_set=true', 'GET', params); +} +//导入文件提交 +export const saveAreaImport = (params) => { + return WeaTools.callApi('/api/hrm/area/saveAreaImport', 'POST', params); +} +//历史导入信息查询 +export const getImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/area/getImportHistory', 'GET', params); +} +//功能按钮权限 +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/area/getHasRight', 'GET', params); +} +//导入结果 +export const getImportResultDetail = (params) => { + return WeaTools.callApi('/api/hrm/area/getImportRowResultLog', 'GET', params); +} +//导入日志 +export const getImportLogDetail = (params) => { + return WeaTools.callApi('/api/hrm/area/getImportColResultLog', 'GET', params); +} +//导入日志 - 高级搜索 +export const getImportLogSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/area/getHistorySearchCondition', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/adminAreaDisplaySetting.js b/pc4backstage/hrmengine/apis/adminAreaDisplaySetting.js new file mode 100644 index 0000000..99c8df1 --- /dev/null +++ b/pc4backstage/hrmengine/apis/adminAreaDisplaySetting.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from "ecCom"; + +export const getRegionSettingHasRight = (params) => { + return WeaTools.callApi('/api/hrm/browserDisplayField/getRegionSettingHasRight', 'POST', params); +} + +export const getRegionDisplaySetting = (params) => { + return WeaTools.callApi('/api/hrm/browserDisplayField/getRegionDisplaySetting', 'GET', params); +} + +export const saveRegionDisplaySetting = (params) => { + return WeaTools.callApi('/api/hrm/browserDisplayField/saveRegionDisplaySetting', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/adminDecentralization.js b/pc4backstage/hrmengine/apis/adminDecentralization.js new file mode 100644 index 0000000..8062891 --- /dev/null +++ b/pc4backstage/hrmengine/apis/adminDecentralization.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/detachmanagerset/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/detachmanagerset/getSettingForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/detachmanagerset/save', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/annual.js b/pc4backstage/hrmengine/apis/annual.js new file mode 100644 index 0000000..4621367 --- /dev/null +++ b/pc4backstage/hrmengine/apis/annual.js @@ -0,0 +1,42 @@ +import { + WeaTools +} from 'ecCom'; + +export const getCondition = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/getPLSManagerSetCondition', 'GET', params) + +//有效期设置 +export const getAnnualManagerSetList = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/getAnnualManagerSetList', 'POST', params) + +export const getAnnualManagerSetForm = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/getAnnualManagerSetForm', 'GET', params) + +export const saveAnnualManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/saveAnnualManagerSet', 'POST', params) + +export const deleteAnnualManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/deleteAnnualManagerSet', 'POST', params) + +export const synAnnualManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/synAnnualManagerSet', 'POST', params) + +//批量规则 +export const getAnnualManagerBatchList = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/getAnnualManagerBatchList', 'POST', params) + +export const getAnnualManagerBatchForm = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/getAnnualManagerBatchForm', 'GET', params) + +export const saveAnnualManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/saveAnnualManagerBatch', 'POST', params) + +export const deleteAnnualManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/deleteAnnualManagerBatch', 'POST', params) + +export const synAnnualManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/synAnnualManagerBatch', 'POST', params) + +//设置 +export const getAnnualManagerList = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/getAnnualManagerList', 'POST', params) + +export const saveAnnualManager = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/saveAnnualManager', 'POST', params) + +export const processAnnualManager = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/processAnnualManager', 'POST', params) + +export const getImportForm = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/getImportForm', 'GET', params) + +export const saveImport = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/saveImport?is_multilang_set=true', 'POST', params) + +export const exportData = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/exportAnnualManagerExcel', 'POST', params) + +export const addeddayssetting = (params = {}) => WeaTools.callApi('/api/hrm/annualmanager/addeddayssetting', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/appDetach.js b/pc4backstage/hrmengine/apis/appDetach.js new file mode 100644 index 0000000..0106d24 --- /dev/null +++ b/pc4backstage/hrmengine/apis/appDetach.js @@ -0,0 +1,20 @@ +import { + WeaTools +} from 'ecCom'; + +export const getGlobalSettingForm = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachSetForm', 'GET', params) +export const saveGlobalSetting = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/saveAppDetachSet', 'POST', params) +export const getAppDetachForm = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachForm?is_multilang_set=true', 'GET', params) +export const saveAppDetach = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/saveAppDetach', 'POST', params) +export const removeAppDetach = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/delAppDetach', 'POST', params) +export const getAppDetachCondition = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachCondition', 'GET', params) +export const getAppDetachList = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachList', 'POST', params) +export const getDetachDetailCondition = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachDetialCondition', 'GET', params) +export const getDetachDetail = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachDetialList', 'POST', params) +export const getAppDetachDetialForm = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachDetialForm', 'GET', params) +export const saveAppDetachDetial = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/saveAppDetachDetial', 'POST', params) +export const delAppDetachDetial = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/delAppDetachDetial', 'POST', params) + +export const initAppDetachListData = () => Promise.all([getAppDetachCondition(), getAppDetachList()]) +export const initTargetListData = (params = {}) => Promise.all([getDetachDetailCondition(), getDetachDetail(params)]) +export const initRangeListData = (params = {}) => Promise.all([getDetachDetailCondition(), getDetachDetail(params)]) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/archiveLogView.js b/pc4backstage/hrmengine/apis/archiveLogView.js new file mode 100644 index 0000000..b869e3c --- /dev/null +++ b/pc4backstage/hrmengine/apis/archiveLogView.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom'; + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/archiveLogView/getHasRight', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/archiveLogView/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/archiveLogView/getSearchCondition', 'GET', params); +} + +export const getLoginLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/archiveLogView/getLoginLogList', 'GET', params); +} + +export const getOperateLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/archiveLogView/getOperateLogList', 'GET', params); +} + +export const exportExcelLog = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/archiveLogView/exportExcelLog', 'POST', params); +} + +export const viewdetail = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/viewDetail', 'GET', params); +} + +export const trans = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/transLog', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/assImple.js b/pc4backstage/hrmengine/apis/assImple.js new file mode 100644 index 0000000..3186ff3 --- /dev/null +++ b/pc4backstage/hrmengine/apis/assImple.js @@ -0,0 +1,27 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/checkinfo/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/checkinfo/getRightMenu', 'GET', params); +} + +export const getMainTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/checkinfo/getSearchList', 'GET', params); +} + +export const getSubTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/checkinfo/getCheckBasicInfoList', 'GET', params); +} + +export const getThirdTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/checkinfo/getCheckResourceInfoList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/checkinfo/getSearchCondition', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/assItem.js b/pc4backstage/hrmengine/apis/assItem.js new file mode 100644 index 0000000..16e2a2b --- /dev/null +++ b/pc4backstage/hrmengine/apis/assItem.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/getSearchCondition', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/getCheckItemForm?is_multilang_set=true', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/delete', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/checkitem/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/assType.js b/pc4backstage/hrmengine/apis/assType.js new file mode 100644 index 0000000..193bbc0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/assType.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/checktype/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/checktype/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/checktype/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/checktype/getSearchCondition', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/checktype/getCheckTypeForm?is_multilang_set=true', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/checktype/delete', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/checktype/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/checktype/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/attendance.js b/pc4backstage/hrmengine/apis/attendance.js new file mode 100644 index 0000000..d3a08aa --- /dev/null +++ b/pc4backstage/hrmengine/apis/attendance.js @@ -0,0 +1,10 @@ +import { + WeaTools +} from 'ecCom'; + +export const getImportForm = (params = {}) => WeaTools.callApi('/api/hrm/schedulesignimport/getImportForm?is_multilang_set=true', 'GET', params) +export const importExternalData = (params = {}) => WeaTools.callApi('/api/hrm/schedulesignimport/saveImport', 'POST', params) + +export const getImportFormSet = (params = {}) => WeaTools.callApi('/api/hrm/schedulesignimport/getImportSetForm', 'GET', params) +export const syncData = (params = {}) => WeaTools.callApi('/api/hrm/schedulesignimport/synData', 'POST', params) +export const saveImportSet = (params = {}) => WeaTools.callApi('/api/hrm/schedulesignimport/saveImportSet', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/attendanceSetting.js b/pc4backstage/hrmengine/apis/attendanceSetting.js new file mode 100644 index 0000000..0521ee0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/attendanceSetting.js @@ -0,0 +1,27 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/schedule/applicationSetting/getHasRight', 'GET', params); +} + +export const getContentInfo = (params) => { + return WeaTools.callApi('/api/hrm/schedule/applicationSetting/getScheduleApplicationSettingForm', 'POST', params); +} + +export const getSubFormInfo = (params) => { + return WeaTools.callApi('/api/hrm/schedule/applicationSetting/getScheduleApplicationRuleForm?is_multilang_set=true', 'POST', params); +} + +export const saveMainForm = (params) => { + return WeaTools.callApi('/api/hrm/schedule/applicationSetting/saveScheduleApplicationSetting', 'POST', params); +} + +export const saveSubForm = (params) => { + return WeaTools.callApi('/api/hrm/schedule/applicationSetting/saveScheduleApplicationRule', 'POST', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/schedule/applicationSetting/delScheduleApplicationRule', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/authAdjust.js b/pc4backstage/hrmengine/apis/authAdjust.js new file mode 100644 index 0000000..529aaa7 --- /dev/null +++ b/pc4backstage/hrmengine/apis/authAdjust.js @@ -0,0 +1,24 @@ +import { + WeaTools +} from 'ecCom'; + +/** + * 获取tab数据 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getFormInfo = (params = {}) => WeaTools.callApi('/api/hrm/permissiontoadjust/getPermissionToAdjustForm', 'GET', params) + +export const getTableData = (params = {}) => WeaTools.callApi('/api/hrm/permissiontoadjust/getPermissionToAdjustList', 'POST', params) + +export const processData = (params = {}) => WeaTools.callApi('/api/hrm/permissiontoadjust/processData', 'POST', params) + +export const getCondition = (urlParams, params) => WeaTools.callApi(`/api/hrm/permissiontoadjustbrowser/condition/${urlParams}`, 'GET', params) + +export const getList = (urlParams, params) => WeaTools.callApi(`/api/hrm/permissiontoadjustbrowser/list/${urlParams}`, 'GET', params) + +export const getProcessLog = (params) => WeaTools.callApi('/api/hrm/permissiontoadjust/getProcessLog', 'GET', params) + +export const checkFromId = (params) => WeaTools.callApi('/api/hrm/permissiontoadjust/checkFromId', 'GET', params) + +export const initModuleData = (urlParams, params) => Promise.all([getCondition(urlParams), getList(urlParams, params)]) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/authSearch.js b/pc4backstage/hrmengine/apis/authSearch.js new file mode 100644 index 0000000..8c5fd8a --- /dev/null +++ b/pc4backstage/hrmengine/apis/authSearch.js @@ -0,0 +1,18 @@ +import { + WeaTools +} from 'ecCom'; + +/** + * 获取tab数据 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getFormInfo = (params = {}) => WeaTools.callApi('/api/hrm/permissionsearch/getPermissionSearchForm', 'GET', params) + +export const getTableData = (params = {}) => WeaTools.callApi('/api/hrm/permissionsearch/getPermissionSearchResult', 'POST', params) + +export const getCondition = (urlParams, params) => WeaTools.callApi(`/api/hrm/permissiontoadjustbrowser/condition/${urlParams}`, 'GET', params) + +export const getList = (urlParams, params) => WeaTools.callApi(`/api/hrm/permissiontoadjustbrowser/list/${urlParams}`, 'GET', params) + +export const initModuleData = (urlParams, params) => Promise.all([getCondition(urlParams), getList(urlParams, params)]) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/authorizationSetting.js b/pc4backstage/hrmengine/apis/authorizationSetting.js new file mode 100644 index 0000000..52f1189 --- /dev/null +++ b/pc4backstage/hrmengine/apis/authorizationSetting.js @@ -0,0 +1,107 @@ +import { + WeaTools +} from 'ecCom'; + +/** + * 获取tab数据 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getTabInfo = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightGroupTabInfo', 'GET', params) + + +/********************* group api *********************/ +/** + * 获取权限组查询条件 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getAuthorizationGroupCondition = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightGroupCondition', 'GET', params) + +/** + * 获取权限组设置表单 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getAuthorizationGroupForm = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightGroupForm?is_multilang_set=true', 'GET', params) + +/** + * 获取权限组数据 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getAuthorizationGroupList = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightGroupList', 'POST', params) + +/** + * 保存权限组 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const saveAuthorizationGroup = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/saveSystemRightGroup', 'POST', params) + +/** + * 删除权限组 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const removeAuthorizationGroup = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/delSystemRightGroup', 'POST', params) +/********************* group api *********************/ + +/********************* authorization api *********************/ +/** + * 获取权限组查询条件 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getAuthorizationListCondition = (params = {}) => WeaTools.callApi('/api/hrm/systemrightauthority/getSystemRightAuthorityCondition', 'GET', params) + +/** + * 获取全部权限数据 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getAuthorizationList = (params = {}) => WeaTools.callApi('/api/hrm/systemrightauthority/getSystemRightAuthorityList', 'POST', params) + +/** + * 保存权限组权限明细 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const saveGroupAuthorizatioRela = (params = {}) => WeaTools.callApi('/api/hrm/systemrightauthority/saveSystemRightAuthority', 'POST', params) + +/** + * 移除权限组权限明细 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const removeGroupAuthorizatioRela = (params = {}) => WeaTools.callApi('/api/hrm/systemrightauthority/delSystemRightAuthority', 'POST', params) +/********************* authorization api *********************/ + +/********************* promise api *********************/ +/** + * 初始权限设置化模块数据 + * @return {[type]} [description] + */ +export const initData = () => Promise.all([getTabInfo(), getAuthorizationGroupCondition()]) + +/** + * 初始化权限组tab页数据 + * @return {[type]} [description] + */ +export const initAuthorizationGroupData = () => Promise.all([getAuthorizationGroupCondition(), getAuthorizationGroupList()]) + +/** + * 初始化权限明细tab页数据 + * @return {[type]} [description] + */ +export const initAuthorizationListData = () => Promise.all([getAuthorizationListCondition(), getAuthorizationList()]) + +export const initAuthorizationEditDialog = (params = {}) => Promise.all([getAuthorizationGroupForm(params), getAuthorizationListCondition(), getAuthorizationList(params)]) +/********************* promise api *********************/ + +export const getSystemRightRolesCondition = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightRolesCondition', 'GET', params) +export const getSystemRightRolesList = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightRolesList', 'POST', params) +export const getSystemRightRolesForm = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightRolesForm', 'GET', params) +export const addSystemRightRoles = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/addSystemRightRoles', 'POST', params) +export const editSystemRightRoles = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/editSystemRightRoles', 'POST', params) +export const delSystemRightRoles = (params = {}) => WeaTools.callApi('/api/hrm/systemrightgroup/delSystemRightRoles', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/avatarSetting.js b/pc4backstage/hrmengine/apis/avatarSetting.js new file mode 100644 index 0000000..ae77f68 --- /dev/null +++ b/pc4backstage/hrmengine/apis/avatarSetting.js @@ -0,0 +1,8 @@ +import { + WeaTools +} from 'ecCom'; + +export const getAvatarSettingForm = (params = {}) => WeaTools.callApi('/api/hrm/systemAvatarSetting/getStyleSettingForm', 'GET', params) + +// 保存 +export const saveForm = (params = {}) => WeaTools.callApi('/api/hrm/systemAvatarSetting/saveStyleSetting', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/basicImport.js b/pc4backstage/hrmengine/apis/basicImport.js new file mode 100644 index 0000000..930d757 --- /dev/null +++ b/pc4backstage/hrmengine/apis/basicImport.js @@ -0,0 +1,7 @@ +import { + WeaTools +} from 'ecCom' + +export const getBasicDataImportHasRight = (params) => { + return WeaTools.callApi('/api/hrm/import/resource/getBasicDataImportHasRight', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/batchAdjust.js b/pc4backstage/hrmengine/apis/batchAdjust.js new file mode 100644 index 0000000..3a02318 --- /dev/null +++ b/pc4backstage/hrmengine/apis/batchAdjust.js @@ -0,0 +1,25 @@ +import { + WeaTools +} from 'ecCom'; + +export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/getRightMenu', 'POST', params) + +export const batchSubCompany = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/batchSubcompany?is_multilang_set=true', 'POST', params) + +export const batchDepartment = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/batchDepartment?is_multilang_set=true', 'POST', params) + +export const batchResource = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/batchResource?is_multilang_set=true', 'POST', params) + +export const saveBatchSubCompany = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/saveBatchSubcompany', 'POST', params) + +export const saveBatchDepartment = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/saveBatchDepartment', 'POST', params) + +export const saveBatchResource = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/saveBatchResource', 'POST', params) + +export const getSubCompanyInfo = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/getSubcompanyInfo', 'POST', params) + +export const checkSubDeptAvailable = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/checkSubDeptAvailable', 'POST', params) + +export const getTabInfo = (params = {}, type) => WeaTools.callApi(`/api/hrm/batchMaintenanceAdjust/get${type}Tab`, 'POST', params) + +export const getConfirmInfo = (params = {}, type) => WeaTools.callApi(`/api/hrm/batchMaintenanceAdjust/${type}/getConfirmInfo`, 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/batchEdit.js b/pc4backstage/hrmengine/apis/batchEdit.js new file mode 100644 index 0000000..88ee59e --- /dev/null +++ b/pc4backstage/hrmengine/apis/batchEdit.js @@ -0,0 +1,25 @@ +import { + WeaTools +} from 'ecCom'; + +export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjustEdit/getRightMenu', 'POST', params) + +export const getCondition = (params = {}, type) => WeaTools.callApi(`/api/hrm/batchMaintenanceAdjustEdit/${type}/batchCondition`, 'POST', params) + +export const batch = (params = {}, type) => WeaTools.callApi(`/api/hrm/batchMaintenanceAdjustEdit/${type}/batch?is_multilang_set=true`, 'POST', params) + +export const saveBatch = (params = {}, type) => WeaTools.callApi(`/api/hrm/batchMaintenanceAdjustEdit/${type}/saveBatch`, 'POST', params) + +export const getForm = (params = {}, type) => WeaTools.callApi(`/api/hrm/batchMaintenanceAdjustEdit/getBatch${type}?is_multilang_set=true`, 'POST', params) + +export const saveForm = (params = {}, type) => WeaTools.callApi(`/api/hrm/batchMaintenanceAdjustEdit/saveBatch${type}`, 'POST', params) + +export const getSubCompanyInfo = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/getSubcompanyInfo', 'POST', params) + +export const checkSubDeptAvailable = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/checkSubDeptAvailable', 'POST', params) + +export const hrmOffline = (params = {}) => WeaTools.callApi('/api/hrm/common/hrmOffline', 'POST', params) + +export const saveBatchDefaultPwd = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjustEdit/saveBatchDefaultPwd', 'POST', params) + +export const isWeakPassword = (params = {}) => WeaTools.callApi('/api/hrm/password/isWeakPassword', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/batchMaintenance.js b/pc4backstage/hrmengine/apis/batchMaintenance.js new file mode 100644 index 0000000..3b2d9a0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/batchMaintenance.js @@ -0,0 +1,21 @@ +import { + WeaTools +} from 'ecCom'; + +export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/getRightMenu', 'POST', params) + +export const batchSubCompany = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/batchSubcompany', 'POST', params) + +export const batchDepartment = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/batchDepartment', 'POST', params) + +export const batchResource = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/batchResource', 'POST', params) + +export const saveBatchSubCompany = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/saveBatchSubcompany', 'POST', params) + +export const saveBatchDepartment = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/saveBatchDepartment', 'POST', params) + +export const saveBatchResource = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/saveBatchResource', 'POST', params) + +export const getSubCompanyInfo = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/getSubcompanyInfo', 'POST', params) + +export const getResourceTab = (params = {}) => WeaTools.callApi('/api/hrm/batchMaintenanceAdjust/getResourceTab', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/batchUpload.js b/pc4backstage/hrmengine/apis/batchUpload.js new file mode 100644 index 0000000..9303903 --- /dev/null +++ b/pc4backstage/hrmengine/apis/batchUpload.js @@ -0,0 +1,18 @@ +import { + WeaTools +} from 'ecCom'; + +export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/batchResourcePhoto/getRightMenu', 'POST', params) + +export const getCondition = (params = {}) => WeaTools.callApi('/api/hrm/batchResourcePhoto/batchResourcePhotoSearchCondition', 'POST', params) + +export const getList = (params = {}) => WeaTools.callApi('/api/hrm/batchResourcePhoto/batchResourcePhotoList', 'POST', params) + +export const getForm = (params = {}) => WeaTools.callApi('/api/hrm/batchResourcePhoto/getPhotoImportForm', 'POST', params) + +export const saveForm = (params = {}) => WeaTools.callApi('/api/hrm/batchResourcePhoto/savePhotoImport', 'POST', params) + +export const deletePhoto = (params = {}) => WeaTools.callApi('/api/hrm/batchResourcePhoto/delPhoto', 'POST', params) + +export const changePhoto = (params = {}) => WeaTools.callApi('/api/hrm/batchResourcePhoto/changePhoto', 'POST', params) + diff --git a/pc4backstage/hrmengine/apis/birthdayRemind.js b/pc4backstage/hrmengine/apis/birthdayRemind.js new file mode 100644 index 0000000..4d82482 --- /dev/null +++ b/pc4backstage/hrmengine/apis/birthdayRemind.js @@ -0,0 +1,55 @@ +import { + WeaTools +} from 'ecCom' + +export const getTabOneDatas = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getSysRemindForm', 'GET', params); +} + +export const getAuthForm = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getSysRemindAddForm?is_multilang_set=true', 'GET', params); +} + +export const getTabTwoForm = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getEpRemindForm?is_multilang_set=true', 'GET', params); +} + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getHasRight', 'GET', params); +} + +export const tabTwoFormSave = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveStaffRemind', 'POST', params); +} + +export const saveImg = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveImg', 'POST', params); +} + +export const saveEntryRemind = (params) => { + return WeaTools.callApi('/api/hrm/entryremind/savePicChange', 'POST', params); +} + +export const authSave = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveSysMember', 'POST', params); +} + +export const tabOneSave = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveSysRemind', 'POST', params); +} + +export const entryRemindSave = (params) => { + return WeaTools.callApi('/api/hrm/entryremind/save', 'POST', params); +} + +export const delRows = (params) => { + return WeaTools.callApi('/api/hrm/birthday/deleteSysMember', 'POST', params); +} + +export const getTable = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getSysMemberList', 'GET', params); +} + +export const getEntryDatas = (params) => { + return WeaTools.callApi('/api/hrm/entryremind/getEntryRemindForm', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/browserDisplayField.js b/pc4backstage/hrmengine/apis/browserDisplayField.js new file mode 100644 index 0000000..11a5e8b --- /dev/null +++ b/pc4backstage/hrmengine/apis/browserDisplayField.js @@ -0,0 +1,9 @@ + + +import {WeaTools} from 'ecCom'; + +export const getTabs = params => WeaTools.callApi('/api/hrm/browserDisplayField/getTabs', 'POST', params); + +export const getFields = params => WeaTools.callApi('/api/hrm/browserDisplayField/getFields', 'POST', params); + +export const save = params => WeaTools.callApi('/api/hrm/browserDisplayField/save', 'POST', params); \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/cardItemSet.js b/pc4backstage/hrmengine/apis/cardItemSet.js new file mode 100644 index 0000000..84f9662 --- /dev/null +++ b/pc4backstage/hrmengine/apis/cardItemSet.js @@ -0,0 +1,23 @@ +import { + WeaTools +} from 'ecCom' + +export const getCardItemsData = (params) => { + return WeaTools.callApi('/api/hrm/carddisplay/getNodeList', 'GET', params); +} + +export const cardItemsSettingSave = (params) => { + return WeaTools.callApi('/api/hrm/carddisplay/saveSystemCard', 'POST', params); +} + +export const userDefineCardItemSave = (params) => { + return WeaTools.callApi('/api/hrm/carddisplay/saveCustomCard', 'POST', params); +} + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/carddisplay/getHasRight', 'GET', params); +} + +export const getTableEdit = (params) => { + return WeaTools.callApi('/api/hrm/carddisplay/getCustomCardTable', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/city.js b/pc4backstage/hrmengine/apis/city.js new file mode 100644 index 0000000..8e43b59 --- /dev/null +++ b/pc4backstage/hrmengine/apis/city.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/area/getCityForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/area/editCity', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/common.js b/pc4backstage/hrmengine/apis/common.js new file mode 100644 index 0000000..34af337 --- /dev/null +++ b/pc4backstage/hrmengine/apis/common.js @@ -0,0 +1,25 @@ +import { + WeaTools +} from 'ecCom' + +/** + * 获取权限 + * @param {[type]} moduleName [模块名] + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const authorized = (moduleName, params = {}, apiMethod = 'getHasRight') => WeaTools.callApi(`/api/hrm/${moduleName}/${apiMethod}`, 'POST', params); + +/** + * 应用分权 + */ +export const detachable = (params = {}) => WeaTools.callApi('/api/hrm/common/getDetachable', 'GET', params); +export const getDetachableAll = (params = {}) => WeaTools.callApi('/api/hrm/common/getDetachableAll', 'GET', params); + +export const checkAuthAndDetach = (moduleName, params = {}, apiMethod = 'getHasRight') => Promise.all([authorized(moduleName, params = {}, apiMethod || 'getHasRight'), detachable()]) + +export const exportExcel = (params = {}) => WeaTools.callApi('/api/ec/dev/table/export', 'POST', params) + +export const isEnableMultiLang = (params = {}) => WeaTools.callApi('/api/hrm/common/isEnableMultiLang', 'GET', params) + +export const getPinYin = (params = {}) => WeaTools.callApi('/api/workflow/formSetting/fieldSet/getPinYin', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/contractExpireWarning.js b/pc4backstage/hrmengine/apis/contractExpireWarning.js new file mode 100644 index 0000000..c9e82ee --- /dev/null +++ b/pc4backstage/hrmengine/apis/contractExpireWarning.js @@ -0,0 +1,31 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/contractsetting/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/contractsetting/getRightMenu', 'GET', params); +} + +export const getContentInfo = (params) => { + return WeaTools.callApi('/api/hrm/contractsetting/getSysRemindForm?is_multilang_set=true', 'GET', params); +} + +export const getFormInfo = (params) => { + return WeaTools.callApi('/api/hrm/contractsetting/getSysMemberAddForm?is_multilang_set=true', 'GET', params); +} + +export const saveMainForm = (params) => { + return WeaTools.callApi('/api/hrm/contractsetting/saveSysRemind', 'POST', params); +} + +export const saveSubForm = (params) => { + return WeaTools.callApi('/api/hrm/contractsetting/addSysMember', 'POST', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/contractsetting/deleteSysMember', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/contractMaintain.js b/pc4backstage/hrmengine/apis/contractMaintain.js new file mode 100644 index 0000000..df65a98 --- /dev/null +++ b/pc4backstage/hrmengine/apis/contractMaintain.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/contract/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/contract/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/contract/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/contract/getSearchCondition', 'GET', params); +} + +export const getFormInfo = (params) => { + return WeaTools.callApi('/api/hrm/contract/getContractForm', 'GET', params); +} + +export const getContractTypeInfo = (params) => { + return WeaTools.callApi('/api/hrm/contract/getContractTypeInfo', 'POST', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/contract/deleteContract', 'POST', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/contract/saveContract', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/contractTemplate.js b/pc4backstage/hrmengine/apis/contractTemplate.js new file mode 100644 index 0000000..739e292 --- /dev/null +++ b/pc4backstage/hrmengine/apis/contractTemplate.js @@ -0,0 +1,31 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/contractmodule/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/contractmodule/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/contractmodule/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/contractmodule/getSearchCondition', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/contractmodule/delete', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/contractmodule/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/contractmodule/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/contractType.js b/pc4backstage/hrmengine/apis/contractType.js new file mode 100644 index 0000000..1551e17 --- /dev/null +++ b/pc4backstage/hrmengine/apis/contractType.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/getSearchCondition', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/getContractTypeForm?is_multilang_set=true', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/delete', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/contracttype/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/country.js b/pc4backstage/hrmengine/apis/country.js new file mode 100644 index 0000000..8f1a145 --- /dev/null +++ b/pc4backstage/hrmengine/apis/country.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/area/getCountryForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/area/editCountry', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/county.js b/pc4backstage/hrmengine/apis/county.js new file mode 100644 index 0000000..f83a778 --- /dev/null +++ b/pc4backstage/hrmengine/apis/county.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/area/getCityTwoForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/area/editCityTwo', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/decentralizationAdminSet.js b/pc4backstage/hrmengine/apis/decentralizationAdminSet.js new file mode 100644 index 0000000..31366d1 --- /dev/null +++ b/pc4backstage/hrmengine/apis/decentralizationAdminSet.js @@ -0,0 +1,47 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/getHasRight', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/getAdminSearchList', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/getSearchCondition', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/getAddorEditForm?is_multilang_set=true', 'GET', params); +} + +export const getSecuritySetForm = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/getSecForm?is_multilang_set=true', 'GET', params); +} + +export const addAdminInfo = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/add', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/delete', 'POST', params); +} + +export const editAdminInfo = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/edit', 'POST', params); +} + +export const securitySave = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/saveSec', 'POST', params); +} + +export const isUseSecondaryPwd = (params) => { + return WeaTools.callApi('/api/hrm/secondarypwd/isUseSecondaryPwd', 'GET', params); +} + +export const saveUseSecondaryPwd = (params) => { + return WeaTools.callApi('/api/hrm/secondarypwd/saveUseSecondaryPwd', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/dismiss.js b/pc4backstage/hrmengine/apis/dismiss.js new file mode 100644 index 0000000..447262d --- /dev/null +++ b/pc4backstage/hrmengine/apis/dismiss.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmFireForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmFire', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/duty.js b/pc4backstage/hrmengine/apis/duty.js new file mode 100644 index 0000000..7c5b16c --- /dev/null +++ b/pc4backstage/hrmengine/apis/duty.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobActivityForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/job/editeJobActivity', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/dutyType.js b/pc4backstage/hrmengine/apis/dutyType.js new file mode 100644 index 0000000..a2909c4 --- /dev/null +++ b/pc4backstage/hrmengine/apis/dutyType.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobGroupForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/job/editeJobGroup', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/edu.js b/pc4backstage/hrmengine/apis/edu.js new file mode 100644 index 0000000..514dac0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/edu.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/getEduForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/education.js b/pc4backstage/hrmengine/apis/education.js new file mode 100644 index 0000000..46b0d94 --- /dev/null +++ b/pc4backstage/hrmengine/apis/education.js @@ -0,0 +1,31 @@ +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/getHasRight', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/edit', 'POST', params); +} + +export const deleteRows = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/delete', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/getSearchCondition', 'GET', params); +} + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/getSearchList', 'GET', params); +} + +export const getNeForm = (params) => { + return WeaTools.callApi('/api/hrm/edulevel/getEduForm?is_multilang_set=true', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/edulevel.js b/pc4backstage/hrmengine/apis/edulevel.js new file mode 100644 index 0000000..1676767 --- /dev/null +++ b/pc4backstage/hrmengine/apis/edulevel.js @@ -0,0 +1,13 @@ +import { WeaTools } from 'ecCom' + +export const getHasRight = params => { + return WeaTools.callApi('/api/hrm/edulevel/getHasRight', 'GET', params); +} + +export const getSearchCondition = params => { + return WeaTools.callApi('/api/hrm/edulevel/getSearchCondition', 'GET', params); +} + +export const getSearchList = params => { + return WeaTools.callApi('/api/hrm/edulevel/getSearchList', 'POST', params); +} diff --git a/pc4backstage/hrmengine/apis/elseSetting.js b/pc4backstage/hrmengine/apis/elseSetting.js new file mode 100644 index 0000000..7cb3817 --- /dev/null +++ b/pc4backstage/hrmengine/apis/elseSetting.js @@ -0,0 +1,9 @@ +//gai +import { WeaTools } from 'ecCom' + +export const getelseSettingForm = params => { + return WeaTools.callApi('/api/hrm/accountcenter/othersettings/getOtherSettingForm', 'GET', params); +} +export const save = (params) => { + return WeaTools.callApi('/api/hrm/accountcenter/othersettings/save', 'POST', params); +} diff --git a/pc4backstage/hrmengine/apis/employDemand.js b/pc4backstage/hrmengine/apis/employDemand.js new file mode 100644 index 0000000..4de23ed --- /dev/null +++ b/pc4backstage/hrmengine/apis/employDemand.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/getRightMenu', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/getSearchCondition', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/delete', 'POST', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/getSearchList', 'GET', params); +} + +export const getFormInfo = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/getUseDemandForm', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/usedemand/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/enginegroup.js b/pc4backstage/hrmengine/apis/enginegroup.js new file mode 100644 index 0000000..cdefee2 --- /dev/null +++ b/pc4backstage/hrmengine/apis/enginegroup.js @@ -0,0 +1,47 @@ +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/getHasRight', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/edit', 'POST', params); +} + +export const deleteRows = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/delete', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/getSearchCondition', 'GET', params); +} + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/getSearchList', 'GET', params); +} + +export const getNeForm = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/getOrgGroupForm?is_multilang_set=true', 'GET', params); +} + +export const getAddGpMemForm = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/getOrgRelatedForm?is_multilang_set=true', 'GET', params); +} + +export const memberSave = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/addRelated', 'POST', params); +} + +export const getMemTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/getRelatedSearchList', 'GET', params); +} + +export const memTableRowDel = (params) => { + return WeaTools.callApi('/api/hrm/orggroups/deleteRelated', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/entryMaintenance.js b/pc4backstage/hrmengine/apis/entryMaintenance.js new file mode 100644 index 0000000..a5f7f33 --- /dev/null +++ b/pc4backstage/hrmengine/apis/entryMaintenance.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/entrymaintaince/getSettingTable?is_multilang_set=true', 'GET', params); +} + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/entrymaintaince/getHasRight', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/entrymaintaince/save', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/formal.js b/pc4backstage/hrmengine/apis/formal.js new file mode 100644 index 0000000..1c8ab8b --- /dev/null +++ b/pc4backstage/hrmengine/apis/formal.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmHireForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmHire', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/funcManageDecent.js b/pc4backstage/hrmengine/apis/funcManageDecent.js new file mode 100644 index 0000000..a12d800 --- /dev/null +++ b/pc4backstage/hrmengine/apis/funcManageDecent.js @@ -0,0 +1,31 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/effectmanage/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/effectmanage/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/effectmanage/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/effectmanage/getSearchCondition', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/effectmanage/getFormInfo?is_multilang_set=true', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/effectmanage/delete', 'POST', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/effectmanage/save', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/importorg.js b/pc4backstage/hrmengine/apis/importorg.js new file mode 100644 index 0000000..5c44ba0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/importorg.js @@ -0,0 +1,29 @@ +import { WeaTools } from 'ecCom' +//获取导入表单 +export const getImportForm = (params) => { + return WeaTools.callApi('/api/hrm/importorg/getImportForm', 'GET', params); +} +//导入文件提交 +export const saveImport = (params) => { + return WeaTools.callApi('/api/hrm/importorg/saveImport', 'POST', params); +} +//获取导入结果回调数据 +export const getImportProcessLog = (params) => { + return WeaTools.callApi('/api/hrm/importorg/getImportProcessLog', 'GET', params); +} +//获取导入结果 +export const getImportResult = (params) => { + return WeaTools.callApi('/api/hrm/importorg/getImportResult', 'GET', params); +} +//历史导入信息查询 +export const getImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/importorg/getImportHistory', 'GET', params); +} +//导入日志 +export const getImportLogDetail = (params) => { + return WeaTools.callApi('/api/hrm/importorg/getImportColResultLog', 'GET', params); +} +//导入日志 - 高级搜索 +export const getImportLogSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/importorg/getHistorySearchCondition', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/importresource.js b/pc4backstage/hrmengine/apis/importresource.js new file mode 100644 index 0000000..ea33906 --- /dev/null +++ b/pc4backstage/hrmengine/apis/importresource.js @@ -0,0 +1,29 @@ +import { WeaTools } from 'ecCom' +//获取导入表单 +export const getImportForm = (params) => { + return WeaTools.callApi(`/api/hrm/import/resource/getImportForm`, 'GET', params); +} +//导入文件提交 +export const saveImport = (params) => { + return WeaTools.callApi(`/api/hrm/import/resource/saveImport`, 'POST', params); +} +//获取导入结果回调数据 +export const getImportProcessLog = (params) => { + return WeaTools.callApi(`/api/hrm/importlog/getImportProcessLog`, 'GET', params); +} +//获取导入结果 +export const getImportResult = (params) => { + return WeaTools.callApi(`/api/hrm/importlog/getImportResult`, 'GET', params); +} +//历史导入信息查询 +export const getImportHistory = (params) => { + return WeaTools.callApi(`/api/hrm/importlog/getImportHistory`, 'GET', params); +} +//导入日志 +export const getImportLogDetail = (params) => { + return WeaTools.callApi(`/api/hrm/importlog/getImportColResultLog`, 'GET', params); +} +//导入日志 - 高级搜索 +export const getImportLogSearchCondition = (params) => { + return WeaTools.callApi(`/api/hrm/importlog/getHistorySearchCondition`, 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/leaveType.js b/pc4backstage/hrmengine/apis/leaveType.js new file mode 100644 index 0000000..a562da9 --- /dev/null +++ b/pc4backstage/hrmengine/apis/leaveType.js @@ -0,0 +1,9 @@ +import { + WeaTools +} from 'ecCom' + +export const getList = (params = {}) => WeaTools.callApi('/api/hrm/schedule/leaveType/getLeaveTypeColorFrom?is_multilang_set=true', 'POST', params); + +export const save = (params = {}) => WeaTools.callApi('/api/hrm/schedule/leaveType/saveLeaveTypeColorFrom', 'POST', params); + +export const remove = (params = {}) => WeaTools.callApi('/api/hrm/schedule/leaveType/delLeaveTypeColorFrom', 'POST', params); \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/levelProtection.js b/pc4backstage/hrmengine/apis/levelProtection.js new file mode 100644 index 0000000..7055c71 --- /dev/null +++ b/pc4backstage/hrmengine/apis/levelProtection.js @@ -0,0 +1,36 @@ +import { + WeaTools +} from 'ecCom' + + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/getHasRight', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/getRightMenu', 'GET', params); +} + +export const getBasicInfo = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/getBasicInfo', 'GET', params); +} + +export const getUserClassification = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/getUserClassification', 'GET', params); +} + +export const getResourceClassification = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/getResourceClassification', 'GET', params); +} + +export const saveBasicInfo = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/saveBasicInfo', 'POST', params); +} + +export const saveUserClassification = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/saveUserClassification', 'POST', params); +} + +export const saveResourceClassification = (params) => { + return WeaTools.callApi('/api/hrm/classifiedProtection/saveResourceClassification', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/limitedAnalysis.js b/pc4backstage/hrmengine/apis/limitedAnalysis.js new file mode 100644 index 0000000..b81dd9e --- /dev/null +++ b/pc4backstage/hrmengine/apis/limitedAnalysis.js @@ -0,0 +1,23 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/refuserp/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/refuserp/getRightMenu', 'GET', params); +} + +export const getScope = (params) => { + return WeaTools.callApi('/api/hrm/refuserp/getSearchCondition', 'GET', params); +} + +export const getMaxOnlineNumber = (params) => { + return WeaTools.callApi('/api/hrm/refuserp/getMaxNum', 'GET', params); +} + +export const getEchartsDatas = (params) => { + return WeaTools.callApi('/api/hrm/refuserp/getSearchResult', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/loginFailLog.js b/pc4backstage/hrmengine/apis/loginFailLog.js new file mode 100644 index 0000000..8508948 --- /dev/null +++ b/pc4backstage/hrmengine/apis/loginFailLog.js @@ -0,0 +1,19 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/loginfailedlog/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/loginfailedlog/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/loginfailedlog/getSearchList', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/loginfailedlog/getSearchCondition', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/loginLog.js b/pc4backstage/hrmengine/apis/loginLog.js new file mode 100644 index 0000000..12c90ad --- /dev/null +++ b/pc4backstage/hrmengine/apis/loginLog.js @@ -0,0 +1,19 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/loginlog/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/loginlog/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/loginlog/getSearchList', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/loginlog/getAdvanceCondition', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/majorset.js b/pc4backstage/hrmengine/apis/majorset.js new file mode 100644 index 0000000..fabd1d4 --- /dev/null +++ b/pc4backstage/hrmengine/apis/majorset.js @@ -0,0 +1,55 @@ +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getHasRight', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/speciality/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/speciality/edit', 'POST', params); +} + +export const deleteRows = (params) => { + return WeaTools.callApi('/api/hrm/speciality/delete', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getSearchCondition', 'GET', params); +} + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getSearchList', 'GET', params); +} + +export const getNeForm = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getSpecialityForm?is_multilang_set=true', 'GET', params); +} + +export const getImportForm = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getImportForm?is_multilang_set=true', 'GET', params); +} + +export const saveImport = (params) => { + return WeaTools.callApi('/api/hrm/speciality/saveImport', 'POST', params); +} + +export const getImportResultDetail = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getImportRowResultLog', 'GET', params); +} + +export const getImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getImportHistory', 'GET', params); +} + +export const getImportLogDetail = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getImportColResultLog', 'GET', params); +} + +export const getImportLogSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getHistorySearchCondition', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/matrix.js b/pc4backstage/hrmengine/apis/matrix.js new file mode 100644 index 0000000..e973f11 --- /dev/null +++ b/pc4backstage/hrmengine/apis/matrix.js @@ -0,0 +1,67 @@ +/* + * @Author: sunjsh + * @Date: 2020-11-04 13:35:25 + * @LastEditTime: 2020-11-19 14:50:02 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /hrmengine/apis/matrix.js + */ +import { + WeaTools +} from 'ecCom'; + +//矩阵设置 +export const getMatrixList = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixListSearchList', 'POST', params) +export const getMatrixListConditionList = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixListConditionList', 'POST', params) + +export const getMatrixInfoForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixListSetForm?is_multilang_set=true', 'POST', params) +export const saveMatrixInfo = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/addMatrixList', 'POST', params) +export const removeMatrixInfo = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/delMatrixList', 'POST', params) +export const getMaintenanceForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintSetForm?is_multilang_set=true', 'POST', params) +export const getMaintenanceList = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintSearchList', 'POST', params) +export const saveMatrixMaintenance = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/addMatrixMaint', 'POST', params) +export const removeMatrixMaintenance = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/delMatrixMaint', 'POST', params) +export const getMatrixMaintRightLevelForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintRightLevelForm', 'POST', params) +export const saveMatrixMaintRightLevel = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/saveMatrixMaintRightLevel', 'POST', params) +export const getFieldForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixDesignSetForm?is_multilang_set=true', 'POST', params) +export const saveField = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/addMatrixDesign', 'POST', params) +export const getMatrixData = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixTableSetForm', 'POST', params) +export const saveMatrixData = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/addMatrixTable', 'POST', params) +export const removeMatrixData = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/delMatrixTable', 'POST', params) +export const matrixExport = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/matrixExport', 'POST', params) +export const getMatrixFile = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixFile', 'POST', params) +export const getMatrixTableStringForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixTableStringForm', 'POST', params) +export const getMatrixShowNameSetForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixShowNameSetForm', 'POST', params) +export const saveMatrixShowNameSetForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/saveMatrixShowNameSetForm', 'POST', params) +export const clearDimission = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/clearDimission', 'POST', params) + +//矩阵分权 +export const getMatrixMaintInfoListCondition = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintInfoListCondition', 'POST', params) +export const getMatrixMaintInfoList = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintInfoList', 'POST', params) +export const delMatrixMaintInfo = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/delMatrixMaintInfo', 'POST', params) +export const getMatrixMaintTab = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintTab', 'POST', params) +export const getMatrixMaintSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintSearchCondition', 'POST', params) +export const getMatrixMaintConditionForm = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintConditionForm', 'POST', params) +export const getMatrixMaintConditionList = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintConditionList', 'POST', params) +export const saveMatrixMaintCondition = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/saveMatrixMaintCondition', 'POST', params) +export const delMatrixMaintCondition = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/delMatrixMaintCondition', 'POST', params) +export const getMatrixMaintColList = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/getMatrixMaintColList', 'POST', params) +export const saveMatrixMaintCol = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/saveMatrixMaintCol', 'POST', params) +export const delMatrixMaintCol = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixList/delMatrixMaintCol', 'POST', params) + +//old version +//export const initMaintenanceData = (params = {}) => Promise.all([getMaintenanceForm(params), getMaintenanceList(params)]) +//new version +export const initMaintenanceData = (params = {}) => Promise.all([getMatrixMaintInfoListCondition(params), getMatrixMaintInfoList(params)]) +export const initMaintenanceSettingData = (params = {}) => Promise.all([getMatrixMaintTab(params), getMatrixMaintSearchCondition(params), getMaintenanceForm()]) +export const initConditionData = (params = {}) => Promise.all([getMatrixMaintConditionForm(params), getMatrixMaintConditionList(params)]) +// export const initColumnData = (params = {}) => Promise.all([getMatrixMaintConditionForm(params), getMatrixMaintColList(params)]) +export const initColumnData = (params = {}) => Promise.all([getMatrixMaintColList(params)]) + +export const initFieldData = (params = {}) => Promise.all([getFieldForm(), getFieldForm(params)]) +export const initMatrixData = (params = {}) => Promise.all([getMatrixTableStringForm(params), getMatrixShowNameSetForm(params)]) + +//矩阵批量调整 +export const getFormInfo = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixMassMaint/getMatrixListMassMaintForm', 'GET', params) + +export const processData = (params = {}) => WeaTools.callApi('/api/hrm/matrix/pages/matrixMassMaint/addMatrixListMassMaintForm', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/moduleManage.js b/pc4backstage/hrmengine/apis/moduleManage.js new file mode 100644 index 0000000..cedd3f3 --- /dev/null +++ b/pc4backstage/hrmengine/apis/moduleManage.js @@ -0,0 +1,27 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/modulemanagerdetach/getHasRight', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/modulemanagerdetach/getAdminSearchList', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/modulemanagerdetach/getSearchCondition', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/modulemanagerdetach/getAddorEditForm?is_multilang_set=true', 'GET', params); +} + +export const addModuleManageInfo = (params) => { + return WeaTools.callApi('/api/hrm/modulemanagerdetach/save', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/modulemanagerdetach/delete', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/normalLog.js b/pc4backstage/hrmengine/apis/normalLog.js new file mode 100644 index 0000000..d7b76f1 --- /dev/null +++ b/pc4backstage/hrmengine/apis/normalLog.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom'; + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/normalLog/getHasRight', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/normalLog/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/normalLog/getSearchCondition', 'GET', params); +} + +export const getLoginLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/normalLog/getLoginLogList', 'GET', params); +} + +export const getOperateLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/normalLog/getOperateLogList', 'GET', params); +} + +export const exportExcelLog = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/normalLog/exportExcelLog', 'POST', params); +} + +export const viewdetail = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/viewDetail', 'GET', params); +} + +export const trans = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/transLog', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/officeLocation.js b/pc4backstage/hrmengine/apis/officeLocation.js new file mode 100644 index 0000000..f825178 --- /dev/null +++ b/pc4backstage/hrmengine/apis/officeLocation.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/location/getLocationForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/location/edit', 'POST', params); +} + +export const getCountryDetail = (params) => { + return WeaTools.callApi('/api/hrm/location/getCountryDetail', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/officeaddress.js b/pc4backstage/hrmengine/apis/officeaddress.js new file mode 100644 index 0000000..d400ade --- /dev/null +++ b/pc4backstage/hrmengine/apis/officeaddress.js @@ -0,0 +1,71 @@ +import { + WeaTools +} from 'ecCom' + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/location/getSearchList', 'POST', params); +} + +export const getAdvanceSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/location/getAdvanceSearchCondition', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/location/add', 'POST', params); +} + +export const getLocationForm = (params) => { + return WeaTools.callApi('/api/hrm/location/getLocationForm?is_multilang_set=true', 'GET', params); +} + +export const deleteTableData = (params) => { + return WeaTools.callApi('/api/hrm/location/delete', 'POST', params); +} + +export const getImportForm = (params) => { + return WeaTools.callApi('/api/hrm/location/getImportForm?is_multilang_set=true', 'GET', params); +} + +export const saveImport = (params) => { + return WeaTools.callApi('/api/hrm/location/saveImport', 'POST', params); +} + +export const getImportLogList = (params) => { + return WeaTools.callApi('/api/hrm/location/getImportLogList', 'GET', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/location/edit', 'POST', params); +} + +export const getImportResult = (params) => { + return WeaTools.callApi('/api/hrm/location/getImportResult', 'GET', params); +} + +export const getCountryDetail = (params) => { + return WeaTools.callApi('/api/hrm/location/getCountryDetail', 'GET', params); +} + +export const deleteImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/location/deleteImportHistory', 'POST', params); +} + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/location/getHasRight', 'GET', params); +} + +export const getImportResultDetail = (params) => { + return WeaTools.callApi('/api/hrm/location/getImportRowResultLog', 'GET', params); +} + +export const getImportLogDetail = (params) => { + return WeaTools.callApi('/api/hrm/location/getImportColResultLog', 'GET', params); +} + +export const getImportLogSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/location/getHistorySearchCondition', 'GET', params); +} + +export const getImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/location/getImportHistory', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/onlineAnalysis.js b/pc4backstage/hrmengine/apis/onlineAnalysis.js new file mode 100644 index 0000000..99f8dd7 --- /dev/null +++ b/pc4backstage/hrmengine/apis/onlineAnalysis.js @@ -0,0 +1,23 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/onlinerp/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/onlinerp/getRightMenu', 'GET', params); +} + +export const getScope = (params) => { + return WeaTools.callApi('/api/hrm/onlinerp/getSearchCondition', 'GET', params); +} + +export const getMaxOnlineNumber = (params) => { + return WeaTools.callApi('/api/hrm/onlinerp/getMaxOnlineNum', 'GET', params); +} + +export const getEchartsDatas = (params) => { + return WeaTools.callApi('/api/hrm/onlinerp/getSearchResult', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/onlineAttendance.js b/pc4backstage/hrmengine/apis/onlineAttendance.js new file mode 100644 index 0000000..868c04b --- /dev/null +++ b/pc4backstage/hrmengine/apis/onlineAttendance.js @@ -0,0 +1,6 @@ +import { + WeaTools +} from 'ecCom'; + +export const getForm = (params = {}) => WeaTools.callApi('/api/hrm/onlinekqsystemset/getOnlineKqSystemSetForm', 'GET', params) +export const save = (params = {}) => WeaTools.callApi('/api/hrm/onlinekqsystemset/saveOnlineKqSystemSet', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/orgChart.js b/pc4backstage/hrmengine/apis/orgChart.js new file mode 100644 index 0000000..ca2d8e0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/orgChart.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getOrgVirtualData = (params) => WeaTools.callApi('/api/hrm/orgchart/getOrgVirtualData', 'POST', params) + +export const getOrgChartSet = (params) => WeaTools.callApi('/api/hrm/orgchart/getOrgChartSet', 'POST', params) + +export const saveOrgChartSet = (params) => WeaTools.callApi('/api/hrm/orgchart/saveOrgChartSet', 'POST', params) + +export const getOrgChartData = (params) => WeaTools.callApi('/api/hrm/orgchart/getOrgChartData', 'POST', params) + +export const getOrgChartDataAjax = (params) => WeaTools.callApi('/api/hrm/orgchart/getOrgChartDataAjax', 'POST', params) + +export const initData = (params = {}) => Promise.all([getOrgVirtualData(), getOrgChartSet()]) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/orgFieldDisplaySetting.js b/pc4backstage/hrmengine/apis/orgFieldDisplaySetting.js new file mode 100644 index 0000000..d922ccf --- /dev/null +++ b/pc4backstage/hrmengine/apis/orgFieldDisplaySetting.js @@ -0,0 +1,19 @@ +import { + WeaTools +} from 'ecCom'; + +export const getHasRight = params => { + return WeaTools.callApi('/api/hrm/organizationShowSet/getHasRight', 'GET', params); +} + +export const getRightMenu = params => { + return WeaTools.callApi('/api/hrm/organizationShowSet/getRightMenu', 'GET', params); +} + +export const getOrganizationShowSetForm = params => { + return WeaTools.callApi('/api/hrm/organizationShowSet/getOrganizationShowSetForm', 'GET', params); +} + +export const saveOrganizationShowSet = params => { + return WeaTools.callApi('/api/hrm/organizationShowSet/saveOrganizationShowSet', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/organization.js b/pc4backstage/hrmengine/apis/organization.js new file mode 100644 index 0000000..b1b2743 --- /dev/null +++ b/pc4backstage/hrmengine/apis/organization.js @@ -0,0 +1,146 @@ +import { WeaTools } from 'ecCom' + +export const getHasRight = params => { + return WeaTools.callApi('/api/hrm/organization/getHasRight', 'POST', params); +} + +export const getRightMenu = params => { + return WeaTools.callApi('/api/hrm/organization/getRightMenu', 'POST', params); +} + +export const getTabs = params => { + return WeaTools.callApi('/api/hrm/organization/getTabs', 'POST', params); +} + +export const getCompanyFormField = params => { + return WeaTools.callApi('/api/hrm/organization/getCompanyFormField?is_multilang_set=true', 'GET', params); +} + +export const getSubCompanyFormField = params => { + return WeaTools.callApi('/api/hrm/organization/getSubCompanyFormField?is_multilang_set=true', 'GET', params); +} + +export const getDepartmentFormField = params => { + return WeaTools.callApi('/api/hrm/organization/getDepartmentFormField?is_multilang_set=true', 'GET', params); +} + +export const getSubCompanyFormFieldView = params => { + return WeaTools.callApi('/api/hrm/organization/getSubCompanyFormFieldView', 'GET', params); +} + +export const getDepartmentFormFieldView = params => { + return WeaTools.callApi('/api/hrm/organization/getDepartmentFormFieldView', 'GET', params); +} + +export const addSubCompany = params => { + return WeaTools.callApi('/api/hrm/organization/addSubCompany', 'POST', params); +} + +export const addDepartment = params => { + return WeaTools.callApi('/api/hrm/organization/addDepartment', 'POST', params); +} + +export const editCompany = params => { + return WeaTools.callApi('/api/hrm/organization/editCompany', 'POST', params); +} + +export const editSubCompany = params => { + return WeaTools.callApi('/api/hrm/organization/editSubCompany', 'POST', params); +} + +export const editDepartment = params => { + return WeaTools.callApi('/api/hrm/organization/editDepartment', 'POST', params); +} + +export const delSubCompany = params => { + return WeaTools.callApi('/api/hrm/organization/delSubCompany', 'POST', params); +} + +export const delDepartment = params => { + return WeaTools.callApi('/api/hrm/organization/delDepartment', 'POST', params); +} + +export const getSubCompanySearchCondition = params => { + return WeaTools.callApi('/api/hrm/organization/getSubCompanySearchCondition', 'GET', params); +} + +export const getDepartmentSearchCondition = params => { + return WeaTools.callApi('/api/hrm/organization/getDepartmentSearchCondition', 'GET', params); +} + +export const getResourceSearchCondition = params => { + return WeaTools.callApi('/api/hrm/organization/getResourceSearchCondition', 'GET', params); +} + +export const getSubCompanySearchList = params => { + return WeaTools.callApi('/api/hrm/organization/getSubCompanySearchList', 'POST', params); +} + +export const getDepartmentSearchList = params => { + return WeaTools.callApi('/api/hrm/organization/getDepartmentSearchList', 'POST', params); +} + +export const getResourceSearchList = params => { + return WeaTools.callApi('/api/hrm/organization/getResourceSearchList', 'POST', params); +} + +export const doSubCompanyCancel = params => { + return WeaTools.callApi('/api/hrm/organization/doSubCompanyCancel', 'POST', params); +} + +export const doDepartmentCancel = params => { + return WeaTools.callApi('/api/hrm/organization/doDepartmentCancel', 'POST', params); +} + +export const doSubCompanyISCanceled = params => { + return WeaTools.callApi('/api/hrm/organization/doSubCompanyISCanceled', 'POST', params); +} + +export const doDepartmentISCanceled = params => { + return WeaTools.callApi('/api/hrm/organization/doDepartmentISCanceled', 'POST', params); +} + +export const saveBatchEdit = params => { + return WeaTools.callApi('/api/hrm/organization/saveBatchEdit', 'POST', params); +} + +export const getResourceVirtualDepartmentSetFormField = params => { + return WeaTools.callApi('/api/hrm/organization/getResourceVirtualDepartmentSetFormField', 'POST', params); +} + +export const saveResourceVirtualDepartmentSet = params => { + return WeaTools.callApi('/api/hrm/organization/saveResourceVirtualDepartmentSet', 'POST', params); +} + +export const saveAddToGroup = params => { + return WeaTools.callApi('/api/hrm/organization/saveAddToGroup', 'POST', params); +} + +//获取导入表单 +export const getHrmResourceImportForm = (params) => { + return WeaTools.callApi('/api/hrm/organization/getHrmResourceImportForm', 'GET', params); +} +//导入文件提交 +export const saveHrmResourceImport = (params) => { + return WeaTools.callApi('/api/hrm/organization/saveHrmResourceImport', 'POST', params); +} +//获取导入结果信息 +export const getHrmResourceImportResult = (params) => { + return WeaTools.callApi('/api/hrm/organization/getHrmResourceImportResult', 'GET', params); +} +//历史导入信息查询 +export const getHrmResourceImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/organization/getHrmResourceImportHistory', 'GET', params); +} +//下载历史导入信息 +export const downloadHrmResourceImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/organization/downloadHrmResourceImportHistory', 'GET', params); +} +//删除历史导入日志 +export const delHrmResourceImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/organization/delHrmResourceImportHistory', 'POST', params); +} + +export const saveBatchDefaultPwd = (params) => { + return WeaTools.callApi('/api/hrm/organization/saveBatchDefaultPwd', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/organizationvirtual.js b/pc4backstage/hrmengine/apis/organizationvirtual.js new file mode 100644 index 0000000..9570b2b --- /dev/null +++ b/pc4backstage/hrmengine/apis/organizationvirtual.js @@ -0,0 +1,154 @@ +import { WeaTools } from 'ecCom' + +export const getHasRight = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getHasRight', 'POST', params); +} + +export const getRightMenu = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getRightMenu', 'POST', params); +} + +export const getTabs = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getTabs', 'POST', params); +} + +export const getCompanyFormField = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getCompanyFormField?is_multilang_set=true', 'GET', params); +} + +export const getSubCompanyFormField = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanyFormField?is_multilang_set=true', 'GET', params); +} + +export const getDepartmentFormField = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentFormField?is_multilang_set=true', 'GET', params); +} + +export const getSubCompanyFormFieldView = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanyFormFieldView', 'GET', params); +} + +export const getDepartmentFormFieldView = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentFormFieldView', 'GET', params); +} + +export const addCompany = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/addCompany', 'POST', params); +} + +export const addSubCompany = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/addSubCompany', 'POST', params); +} + +export const addDepartment = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/addDepartment', 'POST', params); +} + +export const editCompany = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/editCompany', 'POST', params); +} + +export const editSubCompany = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/editSubCompany', 'POST', params); +} + +export const editDepartment = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/editDepartment', 'POST', params); +} + +export const delCompany = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/delCompany', 'POST', params); +} + +export const delSubCompany = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/delSubCompany', 'POST', params); +} + +export const delDepartment = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/delDepartment', 'POST', params); +} + +export const delResource = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/delResource', 'POST', params); +} + +export const getSubCompanySearchCondition = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanySearchCondition', 'GET', params); +} + +export const getDepartmentSearchCondition = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentSearchCondition', 'GET', params); +} + +export const getResourceSearchCondition = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getResourceSearchCondition', 'GET', params); +} + +export const getSubCompanySearchList = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanySearchList', 'POST', params); +} + +export const getDepartmentSearchList = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentSearchList', 'POST', params); +} + +export const getResourceSearchList = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getResourceSearchList', 'POST', params); +} + +export const doSubCompanyCancel = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/doSubCompanyCancel', 'POST', params); +} + +export const doDepartmentCancel = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/doDepartmentCancel', 'POST', params); +} + +export const doSubCompanyISCanceled = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/doSubCompanyISCanceled', 'POST', params); +} + +export const doDepartmentISCanceled = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/doDepartmentISCanceled', 'POST', params); +} + +export const saveBatchEdit = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/saveBatchEdit', 'POST', params); +} + +export const addResourceToVirtual = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/addResourceToVirtual', 'POST', params); +} + +export const getBatchSetManagerFormField = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getBatchSetManagerFormField', 'POST', params); +} + +export const saveBatchSetManager = params => { + return WeaTools.callApi('/api/hrm/organizationvirtual/saveBatchSetManager', 'POST', params); +} + +//获取导入表单 +export const getHrmResourceImportForm = (params) => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getHrmResourceImportForm', 'GET', params); +} +//导入文件提交 +export const saveHrmResourceImport = (params) => { + return WeaTools.callApi('/api/hrm/organizationvirtual/saveHrmResourceImport', 'POST', params); +} +//获取导入结果信息 +export const getHrmResourceImportResult = (params) => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getHrmResourceImportResult', 'GET', params); +} +//历史导入信息查询 +export const getHrmResourceImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/organizationvirtual/getHrmResourceImportHistory', 'GET', params); +} +//下载历史导入信息 +export const downloadHrmResourceImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/organizationvirtual/downloadHrmResourceImportHistory', 'GET', params); +} +//删除历史导入日志 +export const delHrmResourceImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/organizationvirtual/delHrmResourceImportHistory', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/otherSetting.js b/pc4backstage/hrmengine/apis/otherSetting.js new file mode 100644 index 0000000..ca8ae6e --- /dev/null +++ b/pc4backstage/hrmengine/apis/otherSetting.js @@ -0,0 +1,19 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/othersetting/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/othersetting/getRightMenu', 'GET', params); +} + +export const getFormInfo = (params) => { + return WeaTools.callApi('/api/hrm/othersetting/getOtherSettingForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/othersetting/save', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/paidLeave.js b/pc4backstage/hrmengine/apis/paidLeave.js new file mode 100644 index 0000000..48492b4 --- /dev/null +++ b/pc4backstage/hrmengine/apis/paidLeave.js @@ -0,0 +1,8 @@ +import { + WeaTools +} from 'ecCom'; + +export const getForm = (params = {}) => WeaTools.callApi('/api/hrm/paidleave/getForm', 'GET', params) +export const save = (params = {}) => WeaTools.callApi('/api/hrm/paidleave/save', 'POST', params) +export const sync = (params = {}) => WeaTools.callApi('/api/hrm/paidleave/synChildSubCompany', 'POST', params) +export const getList = (params = {}) => WeaTools.callApi('/api/hrm/paidleave/getSearchList', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/paidLeaveManager.js b/pc4backstage/hrmengine/apis/paidLeaveManager.js new file mode 100644 index 0000000..55aebd6 --- /dev/null +++ b/pc4backstage/hrmengine/apis/paidLeaveManager.js @@ -0,0 +1,44 @@ +import { + WeaTools +} from 'ecCom'; + +export const getCondition = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerSetCondition', 'GET', params) + +//有效期设置 +export const getPLSManagerSetList = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerSetList', 'POST', params) + +export const getPLSManagerSetForm = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerSetForm', 'GET', params) + +export const savePLSManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/savePLSManagerSet', 'POST', params) + +export const deletePLSManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/deletePLSManagerSet', 'POST', params) + +export const synPLSManagerSet = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/synPLSManagerSet', 'POST', params) + +export const initPeriod = (params = {}) => Promise.all([getPLSManagerSetForm(), getCondition(params)]) + +//批量规则 +export const getPLSManagerBatchList = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerBatchList', 'POST', params) + +export const getPLSManagerBatchForm = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerBatchForm', 'GET', params) + +export const savePLSManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/savePLSManagerBatch', 'POST', params) + +export const deletePLSManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/deletePLSManagerBatch', 'POST', params) + +export const synPLSManagerBatch = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/synPLSManagerBatch', 'POST', params) + +export const initRule = (params = {}) => Promise.all([getPLSManagerBatchForm(), getCondition(params)]) + +//设置 +export const getPLSManagerList = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getPLSManagerList', 'POST', params) + +export const savePLSManager = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/savePLSManager', 'POST', params) + +export const processPLSManager = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/processPLSManager', 'POST', params) + +export const getImportForm = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/getImportForm?is_multilang_set=true', 'GET', params) + +export const saveImport = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/saveImport', 'POST', params) + +export const exportData = (params = {}) => WeaTools.callApi('/api/hrm/plsmanager/exportPLSManagerExcel', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/payrollManagement.js b/pc4backstage/hrmengine/apis/payrollManagement.js new file mode 100644 index 0000000..e6f9241 --- /dev/null +++ b/pc4backstage/hrmengine/apis/payrollManagement.js @@ -0,0 +1,63 @@ +import { + WeaTools +} from 'ecCom' + +export const getPageAuth = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getHasRight', 'GET', params); +} + +export const getAllSubButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getListButtonMenu', 'GET', params); +} + +export const getDeptButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getFormButtonMenu', 'POST', params); +} + +export const getAllSubPayrollInfoTable = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageList', 'POST', params); +} + +export const getDeptPayrollInfoTable = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageViewForm', 'POST', params); +} + +export const getEditableDeptPayrollTable = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageEditForm', 'POST', params); +} + +export const getAllSubSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageListCondition', 'POST', params); +} + +export const getDeptSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageFormCondition', 'POST', params); +} + +export const createPayroll = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/createSalaryManage', 'POST', params); +} + +export const getSalaryManageTime = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/getSalaryManageTime', 'POST', params); +} + +export const sendPayroll = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/sendSalaryManage', 'POST', params); +} + +export const closePayroll = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/closeSalaryManage', 'POST', params); +} + +export const adjustSalarySetting = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/changeSalaryManage', 'POST', params); +} + +export const saveDeptPayrollInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/editSalaryManage', 'POST', params); +} + +export const exportExcel = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarymanage/exportExcel', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/payrollSending.js b/pc4backstage/hrmengine/apis/payrollSending.js new file mode 100644 index 0000000..8c6d191 --- /dev/null +++ b/pc4backstage/hrmengine/apis/payrollSending.js @@ -0,0 +1,76 @@ +import { + WeaTools +} from 'ecCom'; + + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getHasRight', 'POST', params); +} + +export const getTemplateCondition = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getTemplateCondition', 'GET', params); +} + +export const getTabs = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getTabs', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getRightMenu', 'GET', params); +} + +export const getDispatchForm = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getDispatchForm', 'GET', params); +} + +export const dispatch = (params) => { + return WeaTools.callApi('/api/hrm/payroll/dispatch', 'POST', params); +} + +export const getTemplateList = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getTemplateList', 'GET', params); +} + +export const getTemplateForm = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getTemplateForm', 'GET', params); +} + +export const saveTemplateForm = (params) => { + return WeaTools.callApi('/api/hrm/payroll/saveTemplateForm', 'POST', params); +} + +export const saveDefaultTemplate = (params) => { + return WeaTools.callApi('/api/hrm/payroll/saveDefaultTemplate', 'POST', params); +} + +export const deleteTemplate = (params) => { + return WeaTools.callApi('/api/hrm/payroll/deleteTemplate', 'POST', params); +} + +export const getRecordCondition = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getRecordCondition', 'GET', params); +} + +export const getRecordList = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getRecordList', 'GET', params); +} + +export const getRecordDetailCondition = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getRecordDetailCondition', 'GET', params); +} + +export const getRecordDetailList = (params) => { + return WeaTools.callApi('/api/hrm/payroll/getRecordDetailList', 'GET', params); +} + +export const getImportProcessLog = (params) => { + return WeaTools.callApi('/api/hrm/importlog/getImportProcessLog', 'GET', params); +} + +export const getImportResult = (params) => { + return WeaTools.callApi('/api/hrm/importlog/getImportResult', 'GET', params); +} + +export const delRecordList = (params) => { + return WeaTools.callApi('/api/hrm/payroll/delRecordList', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/personalSalaryAdjustment.js b/pc4backstage/hrmengine/apis/personalSalaryAdjustment.js new file mode 100644 index 0000000..3ee01cc --- /dev/null +++ b/pc4backstage/hrmengine/apis/personalSalaryAdjustment.js @@ -0,0 +1,27 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarychange/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarychange/getButtonMenu', 'POST', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarychange/getSalaryChangeLogList', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarychange/getSalaryChangeLogCondition', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarychange/getSalaryChangeForm?is_multilang_set=true', 'POST', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarychange/saveSalaryChange', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/post.js b/pc4backstage/hrmengine/apis/post.js new file mode 100644 index 0000000..e54c105 --- /dev/null +++ b/pc4backstage/hrmengine/apis/post.js @@ -0,0 +1,110 @@ +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/job/getHasRight', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/job/getSearchCondition', 'GET', params); +} + +export const getJobGroupList = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobGroupList', 'GET', params); +} + +export const getJobActivityList = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobActivityList', 'GET', params); +} + +export const getJobTitleList = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobTitleList', 'GET', params); +} + +export const getJobGroupForm = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobGroupForm?is_multilang_set=true', 'GET', params); +} + +export const getJobForm = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobActivityForm?is_multilang_set=true', 'GET', params); +} + +export const getPostForm = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobTitleForm?is_multilang_set=true', 'GET', params); +} + +export const addJobGroup = (params) => { + return WeaTools.callApi('/api/hrm/job/addJobGroup', 'POST', params); +} + +export const addJob = (params) => { + return WeaTools.callApi('/api/hrm/job/addJobActivity', 'POST', params); +} + +export const addPost = (params) => { + return WeaTools.callApi('/api/hrm/job/addJobTitle', 'POST', params); +} + +export const editJobGroup = (params) => { + return WeaTools.callApi('/api/hrm/job/editeJobGroup', 'POST', params); +} + +export const editJob = (params) => { + return WeaTools.callApi('/api/hrm/job/editeJobActivity', 'POST', params); +} + +export const editPost = (params) => { + return WeaTools.callApi('/api/hrm/job/editeJobTitle', 'POST', params); +} + +export const deleteJobGroup = (params) => { + return WeaTools.callApi('/api/hrm/job/deleteJobGroup', 'POST', params); +} + +export const deleteJob = (params) => { + return WeaTools.callApi('/api/hrm/job/deleteJobActivity', 'POST', params); +} + +export const deletePost = (params) => { + return WeaTools.callApi('/api/hrm/job/deleteJobTitle', 'POST', params); +} + +export const getImportForm = (params) => { + return WeaTools.callApi('/api/hrm/job/getImportForm?is_multilang_set=true', 'GET', params); +} + +export const saveImport = (params) => { + return WeaTools.callApi('/api/hrm/job/saveImport', 'POST', params); +} + +export const getJobDetail = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobDetail', 'GET', params); +} + +export const getImportResultDetail = (params) => { + return WeaTools.callApi('/api/hrm/job/getImportRowResultLog', 'GET', params); +} + +export const getImportHistory = (params) => { + return WeaTools.callApi('/api/hrm/job/getImportHistory', 'GET', params); +} + +export const getImportLogDetail = (params) => { + return WeaTools.callApi('/api/hrm/job/getImportColResultLog', 'GET', params); +} + +export const getImportLogSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/job/getHistorySearchCondition', 'GET', params); +} + +export const doCanceled = (params) => { + return WeaTools.callApi('/api/hrm/job/doCanceled', 'POST', params); +} +export const getJobTree = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobTree', 'GET', params); +} + +export const doISCanceled = (params) => { + return WeaTools.callApi('/api/hrm/job/doISCanceled', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/posts.js b/pc4backstage/hrmengine/apis/posts.js new file mode 100644 index 0000000..f644030 --- /dev/null +++ b/pc4backstage/hrmengine/apis/posts.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/job/getJobTitleForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/job/editeJobTitle', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/job/addJobTitle', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/privacySetting.js b/pc4backstage/hrmengine/apis/privacySetting.js new file mode 100644 index 0000000..9d68a6a --- /dev/null +++ b/pc4backstage/hrmengine/apis/privacySetting.js @@ -0,0 +1,17 @@ +import { + WeaTools +} from 'ecCom' + +export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/privacySetting/getRightMenu', 'POST', params); + +export const getPrivacySettingList = (params = {}) => WeaTools.callApi('/api/hrm/privacySetting/getPrivacySettingList', 'POST', params); + +export const savePrivacySetting = (params = {}) => WeaTools.callApi('/api/hrm/privacySetting/savePrivacySetting', 'POST', params); + +export const batchPrivacySetting = (params = {}) => WeaTools.callApi('/api/hrm/privacySetting/batchPrivacySetting', 'POST', params); + +export const saveBatchPrivacySetting = (params = {}) => WeaTools.callApi('/api/hrm/privacySetting/saveBatchPrivacySetting', 'POST', params); + +export const syncPrivacySetting = (params = {}) => WeaTools.callApi('/api/hrm/privacySetting/syncPrivacySetting', 'POST', params); + +export const initData = (params = {}) => Promise.all([getRightMenu(), getPrivacySettingList()]); \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/province.js b/pc4backstage/hrmengine/apis/province.js new file mode 100644 index 0000000..72cecc2 --- /dev/null +++ b/pc4backstage/hrmengine/apis/province.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/area/getProvinceForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/area/editProvince', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/quit.js b/pc4backstage/hrmengine/apis/quit.js new file mode 100644 index 0000000..52fefcd --- /dev/null +++ b/pc4backstage/hrmengine/apis/quit.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmDismissForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmDismiss', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/recruitInfo.js b/pc4backstage/hrmengine/apis/recruitInfo.js new file mode 100644 index 0000000..a0fc47a --- /dev/null +++ b/pc4backstage/hrmengine/apis/recruitInfo.js @@ -0,0 +1,51 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getSearchCondition', 'GET', params); +} + +export const getSearchConditionSub = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getSearchCondition', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/delete', 'POST', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getSearchList', 'GET', params); +} + +export const getFormConditions = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getInviteInfoForm', 'GET', params); +} + +export const getTableEditDatas = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getInviteSchedule', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/edit', 'POST', params); +} + +export const saveInviteSchedule = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/saveInviteSchedule', 'POST', params); +} + +export const getUseDemandInfo = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getUseDemandInfo', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/recruitLibrary.js b/pc4backstage/hrmengine/apis/recruitLibrary.js new file mode 100644 index 0000000..0b64322 --- /dev/null +++ b/pc4backstage/hrmengine/apis/recruitLibrary.js @@ -0,0 +1,131 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getSearchCondition', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/delete', 'POST', params); +} + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getSearchList', 'GET', params); +} + +export const getHrmShareList = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getHrmShareList', 'GET', params); +} + +export const getApplyInfoForm = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getApplyInfoForm', 'GET', params); +} + +export const getHrmShareForm = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getHrmShareForm', 'GET', params); +} + +export const getEmailInfoForm = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getEmailInfoForm', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/edit', 'POST', params); +} + +export const sendEmail = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/sendEmail', 'POST', params); +} + +export const getPersonalInfo = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getPersonalInfo', 'GET', params); +} + +export const getWorkInfo = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getWorkInfo', 'GET', params); +} + +export const addPersonalInfo = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/addPersonalInfo', 'POST', params); +} + +export const addWorkInfo = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/addWorkInfo', 'POST', params); +} + +export const getHrmResourceAddForm = (params) => { + return WeaTools.callApi('/api/hrm/resource/add/getHrmResourceAddForm', 'GET', params); +} + +export const addEmploymentInfo = (params) => { + return WeaTools.callApi('/api/hrm/resource/add/save', 'POST', params); +} + +export const printApplyInfo = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/printApplyInfo', 'GET', params); +} + +export const deleteHrmShare = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/deleteHrmShare', 'POST', params); +} + +export const addHrmShare = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/addHrmShare', 'POST', params); +} + +export const getEmploymentInfo = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getEmploymentInfo', 'GET', params); +} + +export const getInterviewPlanForm = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getInterviewPlanForm', 'GET', params); +} + +export const saveInterviewPlan = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/saveInterviewPlan', 'POST', params); +} + +export const getInterviewResultForm = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getInterviewResultForm', 'GET', params); +} + +export const getInterviewAssessList = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getInterviewAssessList', 'GET', params); +} + +export const getInterviewTestList = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getInterviewTestList', 'GET', params); +} + +export const saveInterviewResult = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/saveInterviewResult', 'POST', params); +} + +export const getInterviewAssessForm = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getInterviewAssessForm', 'GET', params); +} + +export const saveInterviewAssess = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/saveInterviewAssess', 'POST', params); +} + +export const saveApplyInfoToResource = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/saveApplyInfoToResource', 'POST', params); +} + +export const hrmResourceCheck = (params) => { + return WeaTools.callApi('/api/hrm/resource/hrmResourceCheck', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/recruitPlan.js b/pc4backstage/hrmengine/apis/recruitPlan.js new file mode 100644 index 0000000..aaf9eeb --- /dev/null +++ b/pc4backstage/hrmengine/apis/recruitPlan.js @@ -0,0 +1,79 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getSearchCondition', 'GET', params); +} + +export const getSearchConditionSub = (params) => { + return WeaTools.callApi('/api/hrm/inviteinfo/getSearchCondition', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/delete', 'POST', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getSearchList', 'GET', params); +} + +export const getApplyInfoListByPlanId = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getApplyInfoListByPlanId', 'GET', params); +} + +export const getFormConditions = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getCareerPlanForm', 'GET', params); +} + +export const getFinishForm = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getFinishForm', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/edit', 'POST', params); +} + +export const finish = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/finish', 'POST', params); +} + +export const inform = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/inform', 'POST', params); +} + +export const getTableEditDatas = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/getCareerStepForm', 'GET', params); +} + +export const saveTableEditDatas = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/addCareerStep', 'POST', params); +} + +export const addInviteInfo = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/addInviteInfo', 'POST', params); +} + +export const getEmailInfoForm = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/getEmailInfoForm', 'GET', params); +} + +export const sendEmail = (params) => { + return WeaTools.callApi('/api/hrm/applyinfo/sendEmail', 'POST', params); +} + +export const updateApplyInfoIsInform = (params) => { + return WeaTools.callApi('/api/hrm/careerplan/updateApplyInfoIsInform', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/rehire.js b/pc4backstage/hrmengine/apis/rehire.js new file mode 100644 index 0000000..68db45e --- /dev/null +++ b/pc4backstage/hrmengine/apis/rehire.js @@ -0,0 +1,19 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmReHireForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmReHire', 'POST', params); +} + +export const getReHireSource = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getReHireSource', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/renew.js b/pc4backstage/hrmengine/apis/renew.js new file mode 100644 index 0000000..88e8f63 --- /dev/null +++ b/pc4backstage/hrmengine/apis/renew.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmExtendForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmExtend', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/resourceIndex.js b/pc4backstage/hrmengine/apis/resourceIndex.js new file mode 100644 index 0000000..3d92348 --- /dev/null +++ b/pc4backstage/hrmengine/apis/resourceIndex.js @@ -0,0 +1,5 @@ +import { + WeaTools +} from 'ecCom' + +export const getIndexInfo = (params) => WeaTools.callApi('/api/hrm/common/getIndexInfo', 'GET', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/retire.js b/pc4backstage/hrmengine/apis/retire.js new file mode 100644 index 0000000..e8341a4 --- /dev/null +++ b/pc4backstage/hrmengine/apis/retire.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmRetireForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmRetire', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/roleSetting.js b/pc4backstage/hrmengine/apis/roleSetting.js new file mode 100644 index 0000000..ead3a68 --- /dev/null +++ b/pc4backstage/hrmengine/apis/roleSetting.js @@ -0,0 +1,63 @@ +import { + WeaTools +} from 'ecCom'; + +export const getDetachable = (params = {}) => WeaTools.callApi('/api/hrm/common/getDetachableAll', 'GET', params) + +export const getRoleCondition = (params = {}) => WeaTools.callApi('/api/hrm/role/getRoleSetCondition', 'GET', params) + +export const getRoleList = (params = {}) => WeaTools.callApi('/api/hrm/role/getRoleSetList', 'POST', params) + +export const getTabInfo = (params = {}) => WeaTools.callApi('/api/hrm/role/getRoleSetTabInfo', 'GET', params) + +export const getRoleInfo = (params = {}) => WeaTools.callApi('/api/hrm/role/getRoleSetForm', 'GET', params) + +export const saveRoleInfo = (params = {}) => WeaTools.callApi('/api/hrm/role/saveRoleSet', 'POST', params) + +export const removeRoleInfo = (params = {}) => WeaTools.callApi('/api/hrm/role/delRoleSet', 'POST', params) + +export const getAuthCondition = (params = {}) => WeaTools.callApi('/api/hrm/rolefucrightset/getRolesFucRightSetCondition', 'GET', params) + +export const getAuthInfoForm = (params = {}) => WeaTools.callApi('/api/hrm/rolefucrightset/getRolesFucRightSetForm', 'GET', params) + +export const getAuthList = (params = {}) => WeaTools.callApi('/api/hrm/rolefucrightset/getRolesFucRightSetList', 'POST', params) + +export const saveAuth = (params = {}) => WeaTools.callApi('/api/hrm/rolefucrightset/saveRolesFucRightSet', 'POST', params) + +export const removeAuth = (params = {}) => WeaTools.callApi('/api/hrm/rolefucrightset/delRolesFucRightSet', 'POST', params) + +export const getDetachCondition = (params = {}) => WeaTools.callApi('/api/hrm/rolesstrrightset/getRolesStrRightSetCondition', 'GET', params) + +export const getDetachInfoForm = (params = {}) => WeaTools.callApi('/api/hrm/rolesstrrightset/getRolesStrRightSetForm', 'GET', params) + +export const getDetachList = (params = {}) => WeaTools.callApi('/api/hrm/rolesstrrightset/getRolesStrRightSetList', 'POST', params) + +export const saveDetachAuth = (params = {}) => WeaTools.callApi('/api/hrm/rolesstrrightset/saveRolesStrRightSet', 'POST', params) + +export const removeDetachAuth = (params = {}) => WeaTools.callApi('/api/hrm/rolesstrrightset/delRolesStrRightSet', 'POST', params) + +export const getMemberCondition = (params = {}) => WeaTools.callApi('/api/hrm/rolesmembers/getRolesMembersCondition', 'GET', params) + +export const getMemberInfoForm = (params = {}) => WeaTools.callApi('/api/hrm/rolesmembers/getRolesMembersForm', 'GET', params) + +export const getMemberList = (params = {}) => WeaTools.callApi('/api/hrm/rolesmembers/getRolesMembersList', 'POST', params) + +export const saveMemberAuth = (params = {}) => WeaTools.callApi('/api/hrm/rolesmembers/saveRolesMembers', 'POST', params) + +export const removeMemberAuth = (params = {}) => WeaTools.callApi('/api/hrm/rolesmembers/delRolesMembers', 'POST', params) + +export const saveAs = (params = {}) => WeaTools.callApi('/api/hrm/role/saveAsRoleSet', 'POST', params) + +/********************* promise api *********************/ +/** + * 初始权限设置化模块数据 + * @return {[type]} [description] + */ +export const initData = () => Promise.all([getDetachable(), getRoleCondition(), getRoleList(), getRoleInfo()]) + +export const initAuthData = (params = {}) => Promise.all([getAuthCondition(), getAuthInfoForm(params), getAuthList(params)]) + +export const initDetachData = (params = {}) => Promise.all([getDetachCondition(), getDetachInfoForm(params), getDetachList(params)]) + +export const initMemberData = (params = {}) => Promise.all([getMemberCondition(), getMemberInfoForm(params), getMemberList(params)]) +/********************* promise api *********************/ \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/rpManage.js b/pc4backstage/hrmengine/apis/rpManage.js new file mode 100644 index 0000000..4060ada --- /dev/null +++ b/pc4backstage/hrmengine/apis/rpManage.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/award/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/award/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/award/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/award/getSearchCondition', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/award/getAwardForm?is_multilang_set=true', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/award/delete', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/award/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/award/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/rpType.js b/pc4backstage/hrmengine/apis/rpType.js new file mode 100644 index 0000000..c9d821c --- /dev/null +++ b/pc4backstage/hrmengine/apis/rpType.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/getRightMenu', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/getSearchList', 'GET', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/getSearchCondition', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/getAwardTypeForm?is_multilang_set=true', 'GET', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/delete', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/awardtype/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/salaryApplySet.js b/pc4backstage/hrmengine/apis/salaryApplySet.js new file mode 100644 index 0000000..285a450 --- /dev/null +++ b/pc4backstage/hrmengine/apis/salaryApplySet.js @@ -0,0 +1,19 @@ +import { + WeaTools +} from 'ecCom'; + +export const fetchAuthority = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryappsetting/getHasRight', 'GET', params); +} + +export const fetchRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryappsetting/getButtonMenu', 'GET', params); +} + +export const fetchForm = (params) => { + return WeaTools.callApi('/api/encrypt/secondauthhrmsetting/getSetting', 'GET', {...params, itemcode: 'SALARY'}); +} + +export const save = (params) => { + return WeaTools.callApi('/api/encrypt/secondauthhrmsetting/saveSetting', 'POST', {...params, itemcode: 'SALARY'}); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/salaryBank.js b/pc4backstage/hrmengine/apis/salaryBank.js new file mode 100644 index 0000000..96af22f --- /dev/null +++ b/pc4backstage/hrmengine/apis/salaryBank.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/getButtonMenu', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/getSalaryBankCondition', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/getSalaryBankList', 'POST', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/getSalaryBankForm?is_multilang_set=true', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/delSalaryBank', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/addSalaryBank', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/finance/salarybank/editSalaryBank', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/salaryIndexMaintenance.js b/pc4backstage/hrmengine/apis/salaryIndexMaintenance.js new file mode 100644 index 0000000..9569500 --- /dev/null +++ b/pc4backstage/hrmengine/apis/salaryIndexMaintenance.js @@ -0,0 +1,55 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getButtonMenu', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getCompensationTargetMaintCondition', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getCompensationTargetMaintList', 'POST', params); +} + +export const getSubordinateTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getCompensationTargetMaint', 'POST', params); +} + +export const getTableEditDatas = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getCompensationTargetMaintForm?is_multilang_set=true', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/addCompensationTargetMaint', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/editCompensationTargetMaint', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/delCompensationTargetMaint', 'POST', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getCompensationTargetMaintObj?is_multilang_set=true', 'POST', params); +} + +export const getEditorAuth = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getTargetMaintButtonMenu', 'POST', params); +} + +export const submit = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/importCompensationTargetMaint', 'POST', params); +} + +export const getImportTemplate = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensationmaint/getImportTemplate', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/salaryIndexSetting.js b/pc4backstage/hrmengine/apis/salaryIndexSetting.js new file mode 100644 index 0000000..58c6cb9 --- /dev/null +++ b/pc4backstage/hrmengine/apis/salaryIndexSetting.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/getButtonMenu', 'POST', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/getCompensationTargetSetList', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/getCompensationTargetSetCondition', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/getCompensationTargetSetForm?is_multilang_set=true', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/delCompensationTargetSet', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/addCompensationTargetSet', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/finance/compensation/editCompensationTargetSet', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/salaryItemsSet.js b/pc4backstage/hrmengine/apis/salaryItemsSet.js new file mode 100644 index 0000000..be1f6b1 --- /dev/null +++ b/pc4backstage/hrmengine/apis/salaryItemsSet.js @@ -0,0 +1,55 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getHasRight', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getButtonMenu', 'POST', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getSalaryItemList', 'POST', params); +} + +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getSalaryItemListCondition', 'GET', params); +} + +export const getSalaryForm = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getSalaryItemForm?is_multilang_set=true', 'POST', params); +} + +export const getTableEditDatas = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getSalaryItemDetailForm', 'POST', params); +} + +export const deleteTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/delSalaryItem', 'POST', params); +} + +export const batchHandle = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/processSalaryItem', 'POST', params); +} + +export const getConditionCascader = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getConditions', 'POST', params); +} + +export const getFormulaCascader = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getFormula', 'POST', params); +} + +export const getFormulaSpCascader = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/getOtherFormula', 'POST', params); +} + +export const addSalaryItems = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/addSalaryItem', 'POST', params); +} + +export const editSalaryItems = (params) => { + return WeaTools.callApi('/api/hrm/finance/salaryitem/editSalaryItem', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/sanyuan.js b/pc4backstage/hrmengine/apis/sanyuan.js new file mode 100644 index 0000000..16787f5 --- /dev/null +++ b/pc4backstage/hrmengine/apis/sanyuan.js @@ -0,0 +1,111 @@ +import { + WeaTools +} from 'ecCom'; + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/getHasRight', 'GET', params); +} + +export const isInitialized = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/isInitialized', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/getSearchCondition', 'GET', params); +} + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/getSearchList', 'GET', params); +} + +export const getInitForm = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/getInitForm', 'GET', params); +} + +export const initAdmin = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/initAdmin', 'POST', params); +} + +export const getAdminForm = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/getAdminForm', 'GET', params); +} + +export const addAdmin = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/addAdmin', 'POST', params); +} + +export const editAdmin = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/editAdmin', 'POST', params); +} + +export const deleteAdmin = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/deleteAdmin', 'POST', params); +} + +export const isLoginIdRepeat = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/isLoginIdRepeat', 'GET', params); +} + +export const addFuncRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/funcRight/addFuncRight', 'POST', params); +} + +export const addSubComRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/subComRight/addSubComRight', 'POST', params); +} + +export const deleteFuncRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/funcRight/deleteFuncRight', 'POST', params); +} + +export const deleteSubComRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/subComRight/deleteSubComRight', 'POST', params); +} + +export const getFuncRightList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/funcRight/getFuncRightList', 'GET', params); +} + +export const getSubComRightList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/subComRight/getSubComRightList', 'GET', params); +} + +export const getFuncSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/funcRight/getSearchCondition', 'GET', params); +} + +export const getSubComSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/subComRight/getSearchCondition', 'GET', params); +} + +export const getFuncRightForm = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/funcRight/getFuncRightForm', 'GET', params); +} + +export const getSubComRightForm = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/subComRight/getSubComRightForm', 'GET', params); +} + +export const getTab = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/admin/getTab', 'GET', params); +} + +export const getSecForm = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/getSecForm', 'GET', params); +} + +export const saveSec = (params) => { + return WeaTools.callApi('/api/hrm/detachsysadmin/saveSec', 'POST', params); +} + +export const isUseSecondaryPwd = (params) => { + return WeaTools.callApi('/api/hrm/secondarypwd/isUseSecondaryPwd', 'GET', params); +} + +export const saveUseSecondaryPwd = (params) => { + return WeaTools.callApi('/api/hrm/secondarypwd/saveUseSecondaryPwd', 'POST', params); +} diff --git a/pc4backstage/hrmengine/apis/schedule.js b/pc4backstage/hrmengine/apis/schedule.js new file mode 100644 index 0000000..8f12d81 --- /dev/null +++ b/pc4backstage/hrmengine/apis/schedule.js @@ -0,0 +1,46 @@ +import { + WeaTools +} from 'ecCom' + +//工作时段 +export const getFormInfo = (params) => WeaTools.callApi('/api/hrm/scheduleworktime/getForm?is_multilang_set=true', 'GET', params); +export const getList = (params) => WeaTools.callApi('/api/hrm/scheduleworktime/getSearchList', 'GET', params); +export const save = (params) => WeaTools.callApi('/api/hrm/scheduleworktime/save', 'POST', params); + +export const initData = (params = {}) => Promise.all([getFormInfo(params), getList(params)]) + +//班次设置 +export const getShiftsSettingCondition = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/getSearchCondition', 'GET', params); +export const getShiftsSettingFormInfo = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/getForm?is_multilang_set=true', 'GET', params); +export const getShiftsSettingList = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/getSearchList', 'POST', params); +export const saveShiftsSetting = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/save', 'POST', params); +export const getShiftsSettingDetialForm = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/getDetialForm', 'GET', params); +export const getShiftsSettingDetialList = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/getDetialSearchList', 'POST', params); +export const saveShiftsSettingDetial = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/saveDetial', 'POST', params); +export const checkDetailWorkTime = (params) => WeaTools.callApi('/api/hrm/scheduleshiftsset/checkDetailWorkTime', 'POST', params); + +export const initShiftsSettingData = (params = {}) => Promise.all([ + getShiftsSettingCondition(params), + getShiftsSettingFormInfo(params) +]) + +export const initShiftsSettingFormData = (params = {}) => Promise.all([ + getShiftsSettingFormInfo(params) +]) + +//排班设置 +export const getSchedulingSettingCondition = (params) => WeaTools.callApi('/api/hrm/scheduleset/getSearchCondition', 'GET', params); +export const getSchedulingSettingFormInfo = (params) => WeaTools.callApi('/api/hrm/scheduleset/getForm', 'GET', params); +export const getSchedulingSettingList = (params) => WeaTools.callApi('/api/hrm/scheduleset/getSearchList', 'POST', params); +export const saveSchedulingSetting = (params) => WeaTools.callApi('/api/hrm/scheduleset/save', 'POST', params); +export const getSchedulingSettingDetialList = (params) => WeaTools.callApi('/api/hrm/scheduleset/getDetialSearchList', 'POST', params); +export const getSchedulingSettingPersonDetialList = (params) => WeaTools.callApi('/api/hrm/scheduleset/getPersonSearchList', 'POST', params); +export const saveSchedulingSettingDetial = (params) => WeaTools.callApi('/api/hrm/scheduleset/saveDetial', 'POST', params); +export const saveSchedulingSettingPersonDetial = (params) => WeaTools.callApi('/api/hrm/scheduleset/savePerson', 'POST', params); +export const getCalendarData = (params) => WeaTools.callApi('/api/hrm/scheduleset/getCalendar', 'POST', params); +export const getCancelForm = (params) => WeaTools.callApi('/api/hrm/scheduleset/getCancelForm', 'GET', params); + +export const initSchedulingSettingFormData = (params = {}) => Promise.all([ + getSchedulingSettingFormInfo(params), + getSchedulingSettingDetialList(params) +]) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/secAdminLog.js b/pc4backstage/hrmengine/apis/secAdminLog.js new file mode 100644 index 0000000..7a8ee8b --- /dev/null +++ b/pc4backstage/hrmengine/apis/secAdminLog.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom'; + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAdminLog/getHasRight', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAdminLog/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAdminLog/getSearchCondition', 'GET', params); +} + +export const getLoginLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAdminLog/getLoginLogList', 'GET', params); +} + +export const getOperateLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAdminLog/getOperateLogList', 'GET', params); +} + +export const exportExcelLog = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAdminLog/exportExcelLog', 'POST', params); +} + +export const viewdetail = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/viewDetail', 'GET', params); +} + +export const trans = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/transLog', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/secAuditorLog.js b/pc4backstage/hrmengine/apis/secAuditorLog.js new file mode 100644 index 0000000..2a097f1 --- /dev/null +++ b/pc4backstage/hrmengine/apis/secAuditorLog.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom'; + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAuditorLog/getHasRight', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAuditorLog/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAuditorLog/getSearchCondition', 'GET', params); +} + +export const getLoginLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAuditorLog/getLoginLogList', 'GET', params); +} + +export const getOperateLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAuditorLog/getOperateLogList', 'GET', params); +} + +export const exportExcelLog = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/secAuditorLog/exportExcelLog', 'POST', params); +} + +export const viewdetail = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/viewDetail', 'GET', params); +} + +export const trans = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/transLog', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/securitySetting.js b/pc4backstage/hrmengine/apis/securitySetting.js new file mode 100644 index 0000000..062194b --- /dev/null +++ b/pc4backstage/hrmengine/apis/securitySetting.js @@ -0,0 +1,70 @@ +import { + WeaTools +} from 'ecCom' + +// export const authorized = (params = {}) => { +// return WeaTools.callApi('/api/hrm/securitysetting/getHasRight', 'POST', params); +// } + +export const getBasicSetting = (params = {}) => { + return WeaTools.callApi('/api/hrm/securitysetting/getSecuritySettingForm', 'GET', params); +} + +export const saveBasicSetting = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/save', 'POST', params); +} + + +export const getAdvanceSetting = (params = {}) => { + return WeaTools.callApi('/api/hrm/securitysetting/getSecuritySettingAdvancedForm', 'GET', params); +} + +export const saveAdvanceSetting = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/saveAdvanced', 'POST', params); +} + +export const getNetworkSegmentStrategyCondition = (params = {}) => { + return WeaTools.callApi('/api/hrm/securitysetting/getNetworkSegmentStrategyCondition', 'GET', params); +} + +export const getNetworkSegmentStrategyList = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/getNetworkSegmentStrategyList', 'POST', params); +} + +export const getNetworkSegmentStrategyForm = (params = {}) => { + return WeaTools.callApi('/api/hrm/securitysetting/getNetworkSegmentStrategyForm', 'POST', params); +} + +export const saveNetworkSegmentStrategy = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/saveNetworkSegmentStrategy', 'POST', params); +} + +export const removeNetworkSegmentStrategy = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/delNetworkSegmentStrategy', 'POST', params); +} + +export const syncSecuritySetting = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/synSecuritySettingDefault', 'POST', params); +} + +export const getDBPasswordAlterForm = (params = {}) => WeaTools.callApi('/api/hrm/securitysetting/getDBPasswordAlterForm', 'POST', params); + +export const saveDBPasswordAlter = (params = {}) => WeaTools.callApi('/api/hrm/securitysetting/saveDBPasswordAlter', 'POST', params); + +export const getWhiteList = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/getWhiteList', 'GET', params); +} + +export const getWhiteListForm = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/getWhiteListForm', 'GET', params); +} + +export const addWhiteList = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/addWhiteList', 'POST', params); +} + +export const deleteWhiteList = (params) => { + return WeaTools.callApi('/api/hrm/securitysetting/deleteWhiteList', 'POST', params); +} + +export const isWeakPassword = (params = {}) => WeaTools.callApi('/api/hrm/password/isWeakPassword', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/sensitiveWord.js b/pc4backstage/hrmengine/apis/sensitiveWord.js new file mode 100644 index 0000000..f106a98 --- /dev/null +++ b/pc4backstage/hrmengine/apis/sensitiveWord.js @@ -0,0 +1,130 @@ +import { + WeaTools +} from 'ecCom'; + +export const getSettingInfo = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSettingInfo', 'GET', params); +} + +export const saveSettingInfo = (params = {}) => { + return WeaTools.callApi('/api/sensitive/saveSettingInfo', 'POST', params); +} + +export const delSensitiveWord = (params = {}) => { + return WeaTools.callApi('/api/sensitive/delSensitiveWord', 'POST', params); +} + +export const getSensitiveWordCondition = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordCondition', 'GET', params); +} + +export const getSensitiveWordList = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordList', 'GET', params); +} + +export const getSensitiveWordForm = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordForm', 'GET', params); +} + +export const saveSensitiveWord = (params = {}) => { + return WeaTools.callApi('/api/sensitive/saveSensitiveWord', 'POST', params); +} + +export const getSensitiveWordTypeCondition = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordTypeCondition', 'GET', params); +} + +export const getSensitiveWordTypeList = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordTypeList', 'GET', params); +} + +export const getSensitiveWordTypeForm = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordTypeForm', 'GET', params); +} + +export const saveSensitiveWordType = (params = {}) => { + return WeaTools.callApi('/api/sensitive/saveSensitiveWordType', 'POST', params); +} + +export const delSensitiveWordType = (params = {}) => { + return WeaTools.callApi('/api/sensitive/delSensitiveWordType', 'POST', params); +} + + +export const getSensitiveWordLogCondition = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordLogCondition', 'GET', params); +} + +export const getSensitiveWordLogList = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordLogList', 'GET', params); +} + +export const getSensitiveWordLogTab = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordLogTab', 'GET', params); +} + +export const processSensitiveWordLog = (params = {}) => { + return WeaTools.callApi('/api/sensitive/processSensitiveWordLog', 'POST', params); +} + + +export const getSensitiveWordApproveCondition = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordApproveCondition', 'GET', params); +} + +export const getSensitiveWordApproveList = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordApproveList', 'GET', params); +} + +export const processSensitiveWordApprove = (params = {}) => { + return WeaTools.callApi('/api/sensitive/processSensitiveWordApprove', 'POST', params); +} + +export const getSensitiveWordDefaultHandleWayForm = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordDefaultHandleWayForm', 'POST', params); +} + +export const saveSensitiveWordDefaultHandleWay = (params = {}) => { + return WeaTools.callApi('/api/sensitive/saveSensitiveWordDefaultHandleWay', 'POST', params); +} + +export const getSensitiveWordTypeScopeList = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordTypeScopeList', 'GET', params); +} + +export const getSensitiveWordTypeScopeForm = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordTypeScopeForm', 'GET', params); +} + +export const delSensitiveWordTypeScope = (params = {}) => { + return WeaTools.callApi('/api/sensitive/delSensitiveWordTypeScope', 'POST', params); +} + +export const saveSensitiveWordTypeScope = (params = {}) => { + return WeaTools.callApi('/api/sensitive/saveSensitiveWordTypeScope', 'POST', params); +} + +export const getSensitiveWordLogForm = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordLogForm', 'GET', params); +} + +export const saveSensitiveWordApprove = (params = {}) => { + return WeaTools.callApi('/api/sensitive/saveSensitiveWordApprove', 'POST', params); +} + +export const getSensitiveWordApprovalForm = (params = {}) => { + return WeaTools.callApi('/api/sensitive/getSensitiveWordApproveForm', 'GET', params); +} + +export const delSensitiveWordApprove = (params = {}) => { + return WeaTools.callApi('/api/sensitive/delSensitiveWordApprove', 'POST', params); +} + +export const getDetachable = (params = {}) => { + return WeaTools.callApi('/api/hrm/common/getDetachable', 'GET', params); +} + +export const hasRight = (params = {}) => { + return WeaTools.callApi('/api/sensitive/hasRight', 'GET', params); +} + diff --git a/pc4backstage/hrmengine/apis/serialNumber.js b/pc4backstage/hrmengine/apis/serialNumber.js new file mode 100644 index 0000000..e64dcd6 --- /dev/null +++ b/pc4backstage/hrmengine/apis/serialNumber.js @@ -0,0 +1,45 @@ +import {WeaTools} from 'ecCom' + +export const getStartNumForm = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/getStartNumForm', 'GET', params); +} + +export const getCodeSetting = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/getCodeSetting', 'GET', params); +} + +export const saveStartNum = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/saveStartNum', 'POST', params); +} + +export const saveOrUpdateCodeSetting = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/saveOrUpdateCodeSetting', 'POST', params); +} + +export const getSearchReservedCodeList = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/getSearchReservedCodeList', 'POST', params); +} + +export const getAdvanceSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/getAdvanceSearchCondition', 'GET', params); +} + +export const getReservedCodeFrom = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/getReservedCodeFrom', 'GET', params); +} + +export const saveReservedCode = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/saveReservedCode', 'POST', params); +} + +export const deleteReservedCodeById = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/deleteReservedCodeById', 'POST', params); +} + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/getHasRight', 'GET', params); +} + +export const getCodeByType = (params) => { + return WeaTools.callApi('/api/hrm/codeSetting/getCodeByType', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/signatureManagement.js b/pc4backstage/hrmengine/apis/signatureManagement.js new file mode 100644 index 0000000..3502db8 --- /dev/null +++ b/pc4backstage/hrmengine/apis/signatureManagement.js @@ -0,0 +1,31 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/signature/getHasRight', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/signature/getSearchList', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/signature/getSearchCondition', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/signature/getSignatureForm', 'GET', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/signature/delete', 'POST', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/signature/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/signature/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/specialty.js b/pc4backstage/hrmengine/apis/specialty.js new file mode 100644 index 0000000..22171fa --- /dev/null +++ b/pc4backstage/hrmengine/apis/specialty.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom' + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/speciality/getSpecialityForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/speciality/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/staffCareReminder.js b/pc4backstage/hrmengine/apis/staffCareReminder.js new file mode 100644 index 0000000..716d77d --- /dev/null +++ b/pc4backstage/hrmengine/apis/staffCareReminder.js @@ -0,0 +1,66 @@ +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getHasRight', 'GET', params); +} + +export const getSysRemindForm = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getSysRemindForm', 'GET', params); +} + +export const getSysRemindAddForm = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getSysRemindAddForm', 'GET', params); +} + +export const getEpRemindForm = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getEpRemindForm', 'GET', params); +} + +export const saveStaffRemind = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveStaffRemind', 'POST', params); +} + +export const saveImg = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveImg', 'POST', params); +} + +export const saveSysRemind = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveSysRemind', 'POST', params); +} + +export const saveSysMember = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveSysMember', 'POST', params); +} + +export const deleteSysMember = (params) => { + return WeaTools.callApi('/api/hrm/birthday/deleteSysMember', 'POST', params); +} + +export const getSysMemberList = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getSysMemberList', 'GET', params); +} + +export const getEntryRemindForm = (params) => { + return WeaTools.callApi('/api/hrm/entryremind/getEntryRemindForm', 'GET', params); +} + +export const savePicChange = (params) => { + return WeaTools.callApi('/api/hrm/entryremind/savePicChange', 'POST', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/entryremind/save', 'POST', params); +} + + + +export const getStaffRemindForm = (params) => { + return WeaTools.callApi('/api/hrm/birthday/getStaffRemindForm', 'GET', params); +} + +export const saveStaffRemindForm = (params) => { + return WeaTools.callApi('/api/hrm/birthday/saveStaffRemindForm', 'POST', params); +} + diff --git a/pc4backstage/hrmengine/apis/subCompanyFieldDef.js b/pc4backstage/hrmengine/apis/subCompanyFieldDef.js new file mode 100644 index 0000000..5a5a66a --- /dev/null +++ b/pc4backstage/hrmengine/apis/subCompanyFieldDef.js @@ -0,0 +1,43 @@ +import { + WeaTools +} from 'ecCom'; + +/** + * 获取tab数据 + * @param {Object} params [description] + * @return {[type]} [description] + */ +export const getTabInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/getTabInfo?is_multilang_set=true`, 'GET', params) + +export const getFieldDefinedInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/getFieldDefinedInfo?is_multilang_set=true`, 'GET', params) + +export const saveFieldDefinedInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/save`, 'POST', params) + +export const removeFieldDefinedInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/del`, 'POST', params) + +export const saveGroupInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/saveGroup`, 'POST', params) + +export const removeGroupInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/delGroup`, 'POST', params) + +export const getTree = (params = {}) => WeaTools.callApi(`/api/hrm/resourcefielddefined/getTree`, 'GET', params) + +export const saveTree = (params = {}) => WeaTools.callApi(`/api/hrm/resourcefielddefined/saveTree`, 'POST', params) + +export const changeGroup = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/changeGroup`, 'POST', params) + +export const getEncryptFieldSettingForm = (params = {}) => WeaTools.callApi(`/api/encrypt/fieldsetting/getEncryptFieldSettingForm`, 'GET', params) + +export const saveEncryptFieldSettingForm = (params = {}) => WeaTools.callApi(`/api/encrypt/fieldsetting/saveEncryptFieldSettingForm`, 'POST', params) + +//获取字段可查看范围列表 +export const getEncryptFieldScopeList = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/getEncryptFieldScopeList', 'POST', params); + +//获取字段可查看范围表单 +export const getEncryptFieldScopeForm = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/getEncryptFieldScopeForm', 'GET', params); + +//保存字段可查看范围 +export const saveEncryptFieldScopeSetting = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/saveEncryptFieldScopeSetting', 'POST', params); + +//删除字段可查看范围 +export const delEncryptFieldScopeSetting = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/delEncryptFieldScopeSetting', 'POST', params); + diff --git a/pc4backstage/hrmengine/apis/systemAdminLog.js b/pc4backstage/hrmengine/apis/systemAdminLog.js new file mode 100644 index 0000000..dbe8538 --- /dev/null +++ b/pc4backstage/hrmengine/apis/systemAdminLog.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom'; + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/systemAdminLog/getHasRight', 'GET', params); +} + +export const getRightMenu = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/systemAdminLog/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/systemAdminLog/getSearchCondition', 'GET', params); +} + +export const getLoginLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/systemAdminLog/getLoginLogList', 'GET', params); +} + +export const getOperateLogList = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/systemAdminLog/getOperateLogList', 'GET', params); +} + +export const exportExcelLog = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/systemAdminLog/exportExcelLog', 'POST', params); +} + +export const viewdetail = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/viewDetail', 'GET', params); +} + +export const trans = (params) => { + return WeaTools.callApi('/api/hrm/sanyuan/transLog/transLog', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/test.js b/pc4backstage/hrmengine/apis/test.js new file mode 100644 index 0000000..b87da97 --- /dev/null +++ b/pc4backstage/hrmengine/apis/test.js @@ -0,0 +1,34 @@ +import { WeaTools } from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/test/getHasRight', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/test/getSearchCondition', 'GET', params); +} + +export const getSearchList = (params) => { + //return WeaTools.callApi('/api/hrm/test/getSearchList', 'GET', params); + return WeaTools.callApi('/api/hrm/systemrightgroup/getSystemRightRolesList', 'POST', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/test/getForm', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/test/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/test/edit', 'POST', params); +} + +export const del = (params) => { + return WeaTools.callApi('/api/hrm/test/del', 'POST', params); +} + + + + diff --git a/pc4backstage/hrmengine/apis/title.js b/pc4backstage/hrmengine/apis/title.js new file mode 100644 index 0000000..b45be4a --- /dev/null +++ b/pc4backstage/hrmengine/apis/title.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/getJobCallForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/titleset.js b/pc4backstage/hrmengine/apis/titleset.js new file mode 100644 index 0000000..0b2d42d --- /dev/null +++ b/pc4backstage/hrmengine/apis/titleset.js @@ -0,0 +1,31 @@ +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/getHasRight', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/edit', 'POST', params); +} + +export const deleteRows = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/delete', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/getSearchCondition', 'GET', params); +} + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/getSearchList', 'GET', params); +} + +export const getNeForm = (params) => { + return WeaTools.callApi('/api/hrm/jobcall/getJobCallForm?is_multilang_set=true', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/trainActivity.js b/pc4backstage/hrmengine/apis/trainActivity.js new file mode 100644 index 0000000..7f54b09 --- /dev/null +++ b/pc4backstage/hrmengine/apis/trainActivity.js @@ -0,0 +1,125 @@ +import { + WeaTools +} from 'ecCom' + +//------------------------------权限---------------------------------------- +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/getHasRight', 'GET', params); +} +export const getTraineeAuth = (params) => { + return WeaTools.callApi('/api/hrm/trainactor/getHasRight', 'GET', params); +} +export const getTestAuth = (params) => { + return WeaTools.callApi('/api/hrm/traintest/getHasRight', 'GET', params); +} +export const getReviewAuth = (params) => { + return WeaTools.callApi('/api/hrm/trainassess/getHasRight', 'GET', params); +} +export const getScheduleAuth = (params) => { + return WeaTools.callApi('/api/hrm/trainday/getHasRight', 'GET', params); +} + +//------------------------------页面功能按钮-------------------------------- +export const getMainButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/train/getRightMenu', 'GET', params); +} +export const getScheduleButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/trainday/getRightMenu', 'GET', params); +} +export const getTestButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/traintest/getRightMenu', 'GET', params); +} +export const getReviewButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/trainassess/getRightMenu', 'GET', params); +} +export const getAttendButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/trainactor/getRightMenu', 'GET', params); +} + +//------------------------------高级搜索------------------------------------ +export const getSearchItems = (params) => { + return WeaTools.callApi('/api/hrm/train/getSearchCondition', 'GET', params); +} +//-------------------------------删除活动----------------------------------- +export const deleteActivity = (params) => { + return WeaTools.callApi('/api/hrm/train/delete', 'POST', params); +} +export const deleteSchedule = (params) => { + return WeaTools.callApi('/api/hrm/trainday/delete', 'POST', params); +} +//-------------------------------培训浏览框联动----------------------------------- +export const getTrainArrangeContent = (params) => { + return WeaTools.callApi('/api/hrm/train/getTrainPlanInfo', 'GET', params); +} + +//-------------------------------获取列表信息------------------------------ +export const getActivityTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/train/getSearchList', 'GET', params); +} +export const getTestTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/traintest/getSearchList', 'GET', params); +} +export const getReviewTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainassess/getSearchList', 'GET', params); +} +export const getScheduleTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainday/getSearchList', 'GET', params); +} +export const getAttendTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainactor/getSearchList', 'GET', params); +} + +//--------------------------------获取表单信息------------------------------- +export const getActivityForm = (params) => { + return WeaTools.callApi('/api/hrm/train/getTrainForm?is_multilang_set=true', 'GET', params); +} +export const getTraineeForm = (params) => { + return WeaTools.callApi('/api/hrm/trainactor/getTrainActorForm?is_multilang_set=true', 'GET', params); +} +export const getTestForm = (params) => { + return WeaTools.callApi('/api/hrm/traintest/getTrainTestForm?is_multilang_set=true', 'GET', params); +} +export const getReviewForm = (params) => { + return WeaTools.callApi('/api/hrm/trainassess/getTrainAssessForm?is_multilang_set=true', 'GET', params); +} +export const getScheduleForm = (params) => { + return WeaTools.callApi('/api/hrm/trainday/getTrainDayForm?is_multilang_set=true', 'GET', params); +} +export const getActivityEndForm = (params) => { + return WeaTools.callApi('/api/hrm/train/getFinishEventForm?is_multilang_set=true', 'GET', params); +} + +//-------------------------------新建、编辑保存-------------------------------- +export const addActivity = (params) => { + return WeaTools.callApi('/api/hrm/train/add', 'POST', params); +} +export const editActivity = (params) => { + return WeaTools.callApi('/api/hrm/train/edit', 'POST', params); +} +export const addTest = (params) => { + return WeaTools.callApi('/api/hrm/traintest/add', 'POST', params); +} +export const editTest = (params) => { + return WeaTools.callApi('/api/hrm/traintest/edit', 'POST', params); +} +export const addReview = (params) => { + return WeaTools.callApi('/api/hrm/trainassess/add', 'POST', params); +} +export const editReview = (params) => { + return WeaTools.callApi('/api/hrm/trainassess/edit', 'POST', params); +} +export const addSchedule = (params) => { + return WeaTools.callApi('/api/hrm/trainday/add', 'POST', params); +} +export const editSchedule = (params) => { + return WeaTools.callApi('/api/hrm/trainday/edit', 'POST', params); +} +export const addEndActivity = (params) => { + return WeaTools.callApi('/api/hrm/train/saveFinishEvent', 'POST', params); +} +export const addTrainee = (params) => { + return WeaTools.callApi('/api/hrm/trainactor/add', 'POST', params); +} +export const editAttendance = (params) => { + return WeaTools.callApi('/api/hrm/trainactor/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/trainArrange.js b/pc4backstage/hrmengine/apis/trainArrange.js new file mode 100644 index 0000000..693d357 --- /dev/null +++ b/pc4backstage/hrmengine/apis/trainArrange.js @@ -0,0 +1,87 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getHasRight', 'GET', params); +} + +export const getMainTable = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getSearchList', 'GET', params); +} + +export const getSubTable = (params) => { + return WeaTools.callApi('/api/hrm/trainplanrange/getSearchList', 'GET', params); +} + + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getRightMenu', 'GET', params); +} + +export const getSearchInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getSearchCondition', 'GET', params); +} + + +export const deleteMainTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/delete', 'POST', params); +} + +export const deleteSubTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainplanrange/delete', 'POST', params); +} + + +export const notify = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/inform', 'GET', params); +} + + +export const getMainForm = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getTrainPlanForm?is_multilang_set=true', 'GET', params); +} + +export const getSubForm = (params) => { + return WeaTools.callApi('/api/hrm/trainplanrange/getTrainPlanRangeForm?is_multilang_set=true', 'GET', params); +} + +export const saveMainForm = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/add', 'POST', params); +} + +export const saveSubForm = (params) => { + return WeaTools.callApi('/api/hrm/trainplanrange/add', 'POST', params); +} + +export const saveEditMainForm = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/edit', 'POST', params); +} + +export const saveEditSubForm = (params) => { + return WeaTools.callApi('/api/hrm/trainplanrange/edit', 'POST', params); +} + +export const saveSchedule = (params) => { + return WeaTools.callApi('/api/hrm/trainplanday/add', 'POST', params); +} + +export const getTrainSchedule = (params) => { + return WeaTools.callApi('/api/hrm/trainplanday/getTrainPlanDayForm?is_multilang_set=true', 'GET', params); +} + +export const getTrainLayoutInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getTrainLayoutInfo', 'GET', params); +} + +export const getWorkFlowId = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getRequestInfo', 'GET', params); +} + +export const getSingleArrangeInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getTrainPlanForm?is_multilang_set=true', 'GET', params); +} + +export const getSinglePageButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/trainplan/getViewRightMenu', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/trainPlan.js b/pc4backstage/hrmengine/apis/trainPlan.js new file mode 100644 index 0000000..1806f46 --- /dev/null +++ b/pc4backstage/hrmengine/apis/trainPlan.js @@ -0,0 +1,59 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/getHasRight', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/getSearchList', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/getSearchCondition', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/getTrainLayoutForm?is_multilang_set=true', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/edit', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/delete', 'POST', params); +} + +export const inform = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/inform', 'GET', params); +} + +export const getTestDialogTable = (params) => { + return WeaTools.callApi('/api/hrm/trainlayoutassess/getSearchList', 'GET', params); +} + +export const getTestDialogRight = (params) => { + return WeaTools.callApi('/api/hrm/trainlayoutassess/getHasRight', 'GET', params); +} + +export const getTestForm = (params) => { + return WeaTools.callApi('/api/hrm/trainlayoutassess/getTrainLayoutAssessForm?is_multilang_set=true', 'GET', params); +} + +export const saveTestEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/trainlayoutassess/add', 'POST', params); +} + +export const getTrainTypeContent = (params) => { + return WeaTools.callApi('/api/hrm/trainlayout/getTrainTypeInfo', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/trainResource.js b/pc4backstage/hrmengine/apis/trainResource.js new file mode 100644 index 0000000..fc5eb4f --- /dev/null +++ b/pc4backstage/hrmengine/apis/trainResource.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/getHasRight', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/getSearchList', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/getSearchCondition', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/getTrainResourceForm?is_multilang_set=true', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/edit', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/trainresource/delete', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/trainTypes.js b/pc4backstage/hrmengine/apis/trainTypes.js new file mode 100644 index 0000000..dae7144 --- /dev/null +++ b/pc4backstage/hrmengine/apis/trainTypes.js @@ -0,0 +1,35 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/traintype/getHasRight', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/traintype/getSearchList', 'GET', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/traintype/getRightMenu', 'GET', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/traintype/getSearchCondition', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/traintype/getTrainTypeForm?is_multilang_set=true', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/traintype/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/traintype/edit', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/traintype/delete', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/transfer.js b/pc4backstage/hrmengine/apis/transfer.js new file mode 100644 index 0000000..6a8b978 --- /dev/null +++ b/pc4backstage/hrmengine/apis/transfer.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmRedeployForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmRedeploy', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/trial.js b/pc4backstage/hrmengine/apis/trial.js new file mode 100644 index 0000000..37d49d0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/trial.js @@ -0,0 +1,15 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHasRight', 'GET', params); +} + +export const getForm = (params) => { + return WeaTools.callApi('/api/hrm/statechange/getHrmTryForm?is_multilang_set=true', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/statechange/saveHrmTry', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/unitSet.js b/pc4backstage/hrmengine/apis/unitSet.js new file mode 100644 index 0000000..3d2d5fa --- /dev/null +++ b/pc4backstage/hrmengine/apis/unitSet.js @@ -0,0 +1,27 @@ +import { + WeaTools +} from 'ecCom' + +export const getRight = (params) => { + return WeaTools.callApi('/api/hrm/unitseting/getHasRight', 'GET', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/unitseting/getSearchList', 'GET', params); +} + +export const getEditorForm = (params) => { + return WeaTools.callApi('/api/hrm/unitseting/getUnitSetingForm?is_multilang_set=true', 'GET', params); +} + +export const addEditorInfo = (params) => { + return WeaTools.callApi('/api/hrm/unitseting/add', 'POST', params); +} + +export const editEditorInfo = (params) => { + return WeaTools.callApi('/api/hrm/unitseting/edit', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/unitseting/delete', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/workHour.js b/pc4backstage/hrmengine/apis/workHour.js new file mode 100644 index 0000000..63a5eb9 --- /dev/null +++ b/pc4backstage/hrmengine/apis/workHour.js @@ -0,0 +1,39 @@ +import { + WeaTools +} from 'ecCom' + +export const getAuth = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/getHasRight', 'POST', params); +} + +export const getButtonsMenu = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/getRightMenu', 'POST', params); +} + +export const getTableInfo = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/getSettingListSearchList', 'POST', params); +} + +export const getSearchInfo = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/getSettingListSearchCondition', 'GET', params); +} + +export const getSettingListSetForm = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/getSettingListSetForm?is_multilang_set=true', 'POST', params); +} + +export const getOnlineKqSystemSetForm = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/getOnlineKqSystemSetForm?is_multilang_set=true', 'POST', params); +} + +export const deleteTableRows = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/delSettingListSetForm', 'POST', params); +} + +export const saveSettingListSetForm = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/saveSettingListSetForm', 'POST', params); +} + +export const saveOnlineKqSystemSetForm = (params) => { + return WeaTools.callApi('/api/hrm/schedule/defaultScheduleSetting/saveOnlineKqSystemSetForm', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/workNatureExcerpt.js b/pc4backstage/hrmengine/apis/workNatureExcerpt.js new file mode 100644 index 0000000..9c4ff18 --- /dev/null +++ b/pc4backstage/hrmengine/apis/workNatureExcerpt.js @@ -0,0 +1,11 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormElements = (params) => { + return WeaTools.callApi('/api/hrm/usekind/getUseKindForm', 'GET', params); +} + +export const save = (params) => { + return WeaTools.callApi('/api/hrm/usekind/edit', 'POST', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/workflow.js b/pc4backstage/hrmengine/apis/workflow.js new file mode 100644 index 0000000..36750b0 --- /dev/null +++ b/pc4backstage/hrmengine/apis/workflow.js @@ -0,0 +1,41 @@ +import { + WeaTools +} from 'ecCom'; + +export const getFormInfo = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetFlowForm`, 'POST', params) + +export const getFormInfoByWorkflow = (params = {}) => WeaTools.callApi('/api/hrm/stateset/getFormInfo', 'POST', params) + +export const getCondition = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetListSearchCondition`, 'GET', params) + +export const multiRemove = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/statechange/getPermissionToAdjustList`, 'POST', params) + +export const getWorkflowList = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetListSearchList`, 'POST', params) + +export const saveWf = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetFlow`, 'POST', params) + +export const getTab = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetTabInfo`, 'POST', params) + +export const createForm = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetCreateForm`, 'POST', params) + +export const getField = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetFlowWfFields`, 'POST', params) + +export const saveField = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetFlowWfFields`, 'POST', params) + +export const getActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetFlowWfSet`, 'POST', params) + +export const saveActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetFlowWfSet`, 'POST', params) + +export const changeStatus = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/changeStateProcSetStatus`, 'POST', params) + +export const removeWf = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/delStateProcSet`, 'POST', params) + +export const getHrmFieldTabs = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/getHrmFieldTabs`, 'GET', params) + +export const getHrmFieldByScope = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/getHrmFieldByScope`, 'GET', params) + +export const saveEntryField = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/saveEntryField`, 'POST', params) + +export const delEntryField = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/delEntryField`, 'POST', params) + +export const initModuleData = (urlParams, params) => Promise.all([getFormInfo(urlParams), getCondition(urlParams)]) \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/workingDayAdjust.js b/pc4backstage/hrmengine/apis/workingDayAdjust.js new file mode 100644 index 0000000..fa2e16f --- /dev/null +++ b/pc4backstage/hrmengine/apis/workingDayAdjust.js @@ -0,0 +1,19 @@ +import { + WeaTools +} from 'ecCom' + +export const getCondition = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/getPubHolidayListSearchCondition', 'GET', params); + +export const getCalendar = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/getPubHolidayListSearchCalendar', 'POST', params); + +export const getDataList = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/getPubHolidayListSearchList', 'POST', params); + +export const getForm = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/getPubHolidayListSetForm?is_multilang_set=true', 'POST', params); + +export const saveForm = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/savePubHolidayListSetForm', 'POST', params); + +export const getCopyForm = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/getPubHolidayCopySetForm?is_multilang_set=true', 'POST', params); + +export const saveCopyForm = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/savecopyPubHolidayListSetForm', 'POST', params); + +export const remove = (params = {}) => WeaTools.callApi('/api/hrm/schedule/hrmPubHoliday/delPubHolidayListSetForm', 'POST', params); \ No newline at end of file diff --git a/pc4backstage/hrmengine/apis/worknature.js b/pc4backstage/hrmengine/apis/worknature.js new file mode 100644 index 0000000..d22c7c1 --- /dev/null +++ b/pc4backstage/hrmengine/apis/worknature.js @@ -0,0 +1,31 @@ +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/hrm/usekind/getHasRight', 'GET', params); +} + +export const add = (params) => { + return WeaTools.callApi('/api/hrm/usekind/add', 'POST', params); +} + +export const edit = (params) => { + return WeaTools.callApi('/api/hrm/usekind/edit', 'POST', params); +} + +export const deleteRows = (params) => { + return WeaTools.callApi('/api/hrm/usekind/delete', 'POST', params); +} + +export const getSearchCondition = (params) => { + return WeaTools.callApi('/api/hrm/usekind/getSearchCondition', 'GET', params); +} + +export const getSearchList = (params) => { + return WeaTools.callApi('/api/hrm/usekind/getSearchList', 'GET', params); +} + +export const getNeForm = (params) => { + return WeaTools.callApi('/api/hrm/usekind/getUseKindForm?is_multilang_set=true', 'GET', params); +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/EduLevel.js b/pc4backstage/hrmengine/components/EduLevel.js new file mode 100644 index 0000000..847aefa --- /dev/null +++ b/pc4backstage/hrmengine/components/EduLevel.js @@ -0,0 +1,162 @@ +import React from 'react'; +import { inject, observer} from 'mobx-react'; +import {WeaTop, WeaTab,WeaRightMenu,WeaErrorPage,WeaSearchGroup,WeaFormItem,WeaSelect,WeaAlertPage,} from 'ecCom'; +import {Row,Form,Col,Button, Spin} from 'antd'; +import * as mobx from 'mobx'; +import isEmpty from 'lodash/isEmpty'; +const toJS = mobx.toJS; +import {WeaTableNew,WeaSwitch} from 'comsMobx'; +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmEduLevel') + +@observer +class EduLevel extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { hrmEduLevel } = this.props; + hrmEduLevel.getHasRight(); + } + + render(){ + const { hrmEduLevel } = this.props; + const {title,form,table,showSearchAd,searchParamsAd,verified,hasRight} = hrmEduLevel; + + if (verified && hasRight) { + const formParams = form.getFormParams(); + let loadingTable = table.loading; + return ( +
+ + } + iconBgcolor='#217346' + buttons={[]} + buttonSpace={10} + showDropIcon={false} + > + {hrmEduLevel.setShowSearchAd(bool)}} + hideSearchAd={() => hrmEduLevel.setShowSearchAd(false)} + searchsAd={
{this.getSearchs()}
} + showSearchAd={showSearchAd} + onSearch={v => {hrmEduLevel.doSearch()}} + advanceHeight={110} + onSearchChange={v => { + form.updateFields({ + name:{name:'name',value:v}, + }); + }} + /> + + + +
+
+
+ ); + } + if (verified && !hasRight) { + return ( +
+ 对不起,您暂时没有权限! +
+
+ ) + } + return ( +
+ ) + } + + getSearchs() { + const { hrmEduLevel } = this.props; + const { form,condition } = hrmEduLevel; + const {isFormInit} = form; + let group = []; + + const formParams = form.getFormParams(); + isFormInit && toJS(condition).map((c, i) =>{ + let items = []; + c.items.map((fields, j) => { + let hide = false; + let dom = ; + items.push({ + com:( + {dom} + ), + colSpan:1, + hide: hide + }) + }); + group.push(( e.keyCode == 13 && e.target.tagName === "INPUT" ) && hrmEduLevel.doSearch()}/>) + }); + return group; + } + + getRightMenu(){ + const keys = this.getSelectedRowKeys(); + const arr = [{ + icon: , + content:'搜索' + }, { + icon: , + content:'显示定制列' + } + ]; + return arr; + } + + onRightMenuClick(key){ + const { hrmEduLevel } = this.props; + switch(key){ + case '0': + hrmEduLevel.doSearch(); + break; + case '1': + this.definedColumn(); + break; + } + } + + getSelectedRowKeys(){ + const { hrmEduLevel } = this.props; + const { table} = hrmEduLevel; + const selectedRowKeys = table.selectedRowKeys; + return selectedRowKeys; + } + + definedColumn() { + const { hrmEduLevel } = this.props; + const { table} = hrmEduLevel; + table.setColSetVisible(true); + table.tableColSet(true); + } + + getTabButtonsAd() { + const { hrmEduLevel } = this.props; + const { form,searchParamsAd } = hrmEduLevel; + return [ + (), + (), + () + ] + } +} + +export default EduLevel diff --git a/pc4backstage/hrmengine/components/Home.js b/pc4backstage/hrmengine/components/Home.js new file mode 100644 index 0000000..e505926 --- /dev/null +++ b/pc4backstage/hrmengine/components/Home.js @@ -0,0 +1,78 @@ +import { + WeaPopoverHrm, + WeaLocaleProvider +} from 'ecCom'; +import { + WeaLogView +} from 'comsMobx'; +import { + isEnableMultiLang +} from '../apis/common'; +const WeaLogViewComp = WeaLogView.Component; +const { + LogStore +} = WeaLogView; + +class Home extends React.Component { + constructor(props) { + super(props); + this.state = { + key: new Date().getTime(), + visible: false, + logStore: new LogStore(), + logType: '4', + logSmallType: '' + } + window.setLogViewProps = this.setLogViewProps; + } + + componentDidMount(){ + isEnableMultiLang().then(data => { + window.inputType = { + inputType: 'NORMAL' + } + if (data.status === '1') { + if (data.isEnableMultiLang) { + window.inputType = { + inputType: 'MULTILANG', + isBase64: true + } + } + } + }, error => { + window.inputType = { + inputType: 'NORMAL' + } + }); + } + + setLogViewProps = (props) => { + this.setState({ + key: new Date().getTime(), + targetId: '', + visible: true, + logType: '4', + logStore: new LogStore(), + ...props + }); + } + onCancel = () => { + this.setState({ + visible: false + }) + } + render() { + const isSingle = window.location.pathname.indexOf('/spa/hrm/engine') > -1; + return ( +
+ + + + {this.props.children} + +
+ ) + } +} + +export default Home \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/HrmTest.js b/pc4backstage/hrmengine/components/HrmTest.js new file mode 100644 index 0000000..5d8a661 --- /dev/null +++ b/pc4backstage/hrmengine/components/HrmTest.js @@ -0,0 +1,186 @@ +import React from 'react'; +import { inject, observer} from 'mobx-react'; +import {WeaTop, WeaTab,WeaRightMenu,WeaErrorPage,WeaSearchGroup,WeaFormItem,WeaSelect,WeaAlertPage,} from 'ecCom'; +import {Row,Form,Col,Button, Spin} from 'antd'; +import * as mobx from 'mobx'; +import isEmpty from 'lodash/isEmpty'; +const toJS = mobx.toJS; +import {WeaTableNew,WeaSwitch} from 'comsMobx'; +const WeaTable = WeaTableNew.WeaTable; +import {WeaLocaleProvider} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +@inject('hrmTest') +@observer +class HrmTest extends React.Component { + onClickHandle = verifyType => { + window.doSecondaryVerify(verifyType, d => alert(d)); + } + + render(){ + return ( + + + + + + + + + + + + + + + ) + + } + // constructor(props) { + // super(props); + // } + + // componentDidMount() { + // const { hrmTest } = this.props; + // hrmTest.getHasRight(); + // } + + // render(){ + // const { hrmTest } = this.props; + // const {title,form,table,showSearchAd,searchParamsAd,verified,hasRight} = hrmTest; + + // if (verified && hasRight) { + // const formParams = form.getFormParams(); + // let loadingTable = table.loading; + // return ( + //
+ // + // } + // iconBgcolor='#217346' + // buttons={[]} + // buttonSpace={10} + // showDropIcon={false} + // > + // {hrmTest.setShowSearchAd(bool)}} + // hideSearchAd={() => hrmTest.setShowSearchAd(false)} + // searchsAd={
{this.getSearchs()}
} + // showSearchAd={showSearchAd} + // onSearch={v => {hrmTest.doSearch()}} + // advanceHeight={410} + // onSearchChange={v => { + // form.updateFields({ + // lastname:{lastname:'lastname',value:v}, + // }); + // }} + // /> + // + // + // + //
+ //
+ //
+ // ); + // } + // if (verified && !hasRight) { + // return ( + //
+ // 对不起,您暂时没有权限! + //
+ //
+ // ) + // } + // return ( + //
+ // ) + // } + + // getSearchs() { + // const { hrmTest } = this.props; + // const { form,condition } = hrmTest; + // const {isFormInit} = form; + // let group = []; + + // const formParams = form.getFormParams(); + // isFormInit && toJS(condition).map(c =>{ + // let items = []; + // c.items.map(fields => { + // let hide = false; + // let dom = ; + // items.push({ + // com:( + // {dom} + // ), + // colSpan:1, + // hide: hide + // }) + // }); + // group.push() + // }); + // return group; + // } + + // getRightMenu(){ + // const keys = this.getSelectedRowKeys(); + // const arr = [{ + // icon: , + // content:'搜索' + // }, { + // icon: , + // content:'显示定制列' + // } + // ]; + // return arr; + // } + + // onRightMenuClick(key){ + // const { hrmTest } = this.props; + // switch(key){ + // case '0': + // hrmTest.doSearch(); + // break; + // case '1': + // this.definedColumn(); + // break; + // } + // } + + // getSelectedRowKeys(){ + // const { hrmTest } = this.props; + // const { table} = hrmTest; + // const selectedRowKeys = table.selectedRowKeys; + // return selectedRowKeys; + // } + + // definedColumn() { + // const { hrmTest } = this.props; + // const { table} = hrmTest; + // table.setColSetVisible(true); + // table.tableColSet(true); + // } + + // getTabButtonsAd() { + // const { hrmTest } = this.props; + // const { form,searchParamsAd } = hrmTest; + // return [ + // (), + // (), + // () + // ] + // } +} + +export default HrmTest diff --git a/pc4backstage/hrmengine/components/ResourceIndex.js b/pc4backstage/hrmengine/components/ResourceIndex.js new file mode 100644 index 0000000..99f886f --- /dev/null +++ b/pc4backstage/hrmengine/components/ResourceIndex.js @@ -0,0 +1,165 @@ +import '../style/resourceIndex.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaNewScroll +} from 'ecCom'; +import {Row, Col} from 'antd'; +import { + i18n +} from '../public/i18n'; + +@inject('hrmResourceIndex') + +@observer +export default class ResourceIndex extends Component { + constructor(props) { + super(props); + this.state = { + bgColor: [ + '#4CA0DC', + '#67B3E2', + '#88C6E4', + '#AED8F0', + '#D6EBF7' + ] + } + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmResourceIndex: store + } = this.props; + const { + initData + } = store; + initData(); + } + + renderOrgAndAuthAnalysis = (rs) => { + let children = []; + rs.map((r, i) => { + children.push( + + +
+
{r.title}
+
+ + { + r.items.map((item, i) => { + return ( + +
+
{item.name}
+
{item.value}
+
+ + ) + }) + } +
+ + ) + }) + return ( +
+ + {children} + +
+ ) + } + + renderAdjustAnalysis = (rs) => { + let children = []; + rs.map((r, i) => { + children.push( + + + {r.title} + + +
+ { + r.items.map((item, i) => { + return ( + +
+
{item.opdate}
+
+ { + item.value === 0 + ? +
{i18n.message.recordNotFound()}
+ : +
 
+ } +
+
+ ) + }) + } + + + ) + }) + return ( +
+ + {children} + +
+ ) + } + + render() { + const { + hrmResourceIndex: store + } = this.props; + const { + result, + i18nLoaded + } = store; + const topProps = { + title: i18n.module.orgAndAuthCenter(), + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + dropMenuDatas: [] + } + return ( +
+ + { + result.length > 0 + && + + { + result.map((rs, i) => { + return i == 0 ? this.renderOrgAndAuthAnalysis(rs) : this.renderAdjustAnalysis(rs); + }) + } + + } + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/adminAreaDisplaySetting/index.js b/pc4backstage/hrmengine/components/adminAreaDisplaySetting/index.js new file mode 100644 index 0000000..c366c91 --- /dev/null +++ b/pc4backstage/hrmengine/components/adminAreaDisplaySetting/index.js @@ -0,0 +1,57 @@ +import React, { Component } from "react"; +import { inject, observer } from 'mobx-react'; +import { WeaBrowser, WeaFormItem, WeaLocaleProvider } from 'ecCom'; +import { Authority, Top, MagicForm } from "../../public/valhalla/components/index.js"; +import '../../style/adminAreaDisplaySetting.less'; +const getLabel = WeaLocaleProvider.getLabel; + +@inject("adminAreaDisplaySettingStore") +@observer +export default class AdminDecentralization extends Component { + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init = () => { + const { adminAreaDisplaySettingStore: { init } } = this.props; + init(); + } + + render() { + const { adminAreaDisplaySettingStore: { authorityStore, topStore, formStore, browserConf ,setRef} } = this.props; + return ( + + +
+
+ +
+
+
+
{getLabel(221, '预览')}
+ { browserConf.map((conf, i) => { + const {type, name} = conf; + return ( + + setRef(ref, type)}/> + + ) + }) } +

{getLabel(522416,"说明:显示设置保存后可通过上方浏览框预览选择后的显示效果。")}

+
+
+
+
+
+ ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/adminDecentralization/index.js b/pc4backstage/hrmengine/components/adminDecentralization/index.js new file mode 100644 index 0000000..39207b3 --- /dev/null +++ b/pc4backstage/hrmengine/components/adminDecentralization/index.js @@ -0,0 +1,428 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, + WeaSearchGroup, +} from 'ecCom' + +import { + WeaSwitch +} from 'comsMobx' + +import { cloneDeep } from "lodash"; + +import { + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +const toJS = mobx.toJS; + +@inject('hrmAdminDecentralizationSet') +@observer +export default class AdminDecentralization extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.managementDecent(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmAdminDecentralizationSet + } = this.props, { + mobxDataReset, + getRight + } = hrmAdminDecentralizationSet; + + mobxDataReset(); + getRight(); + } + + getDropMenuDatas = () => { + const { + hrmAdminDecentralizationSet + } = this.props, { + menu + } = hrmAdminDecentralizationSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + this[key] && this[key](); + } + + getTopMenuBtns = () => { + const { + hrmAdminDecentralizationSet + } = this.props, { + menu + } = hrmAdminDecentralizationSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, i) => { + btns.push(); + }); + return btns; + } + + handleClick = (item) => { + this[item.menuFun] && this[item.menuFun](); + } + + + log = () => { + window.setLogViewProps({ + logSmallType: '3021', + }); + } + + save = () => { + const { + hrmAdminDecentralizationSet + } = this.props, { + save + } = hrmAdminDecentralizationSet; + save(); + } + + getForm = () => { + let { + hrmAdminDecentralizationSet + } = this.props, { + content, + formKeys, + } = hrmAdminDecentralizationSet, { + form, + condition, + } = content, { + isFormInit + } = form, { + detachable, + hrmdetachable, + wfdetachable, + docdetachable, + portaldetachable, + cptdetachable, + mtidetachable, + wcdetachable, + fmdetachable, + mmdetachable, + carsdetachable, + votingdetachable, + blogdetachable, + executiondetachable, + odocdetachable = '0' + } = form.getFormParams(); + + hrmdetachable=hrmdetachable||'0'; + wfdetachable=wfdetachable||'0'; + docdetachable=docdetachable||'0'; + portaldetachable=portaldetachable||'0'; + cptdetachable=cptdetachable||'0'; + mtidetachable=mtidetachable||'0'; + wcdetachable=wcdetachable||'0'; + fmdetachable=fmdetachable||'0'; + mmdetachable=mmdetachable||'0'; + carsdetachable=carsdetachable||'0'; + votingdetachable=votingdetachable||'0'; + blogdetachable=blogdetachable||'0'; + executiondetachable=executiondetachable||'0'; + + const { + couple + } = formKeys; + + let arr = []; + isFormInit && condition.map((c, index) => { + let _arr = []; + c.items.map((field, i) => { + let key = field.domkey[0]; + + if (key === "sanyuanable") {//启用三员分立管理 + if ( detachable === "1") { + _arr.push({ + com: ( + + this.handleChange(e)}/> + + ), + colSpan: 1 + }) + return ; + }else{ + return null; + } + } + + const broKey = couple[key]; + //broKey存在,说明正在渲染的是浏览框 + //当浏览框前面的开关关闭时,隐藏浏览框 + if (broKey && ( form.getFormParams()[broKey] !=="1")) { + _arr.push({ + com: + , + colSpan: 1 + }) + }else{ + _arr.push({ + com: ( + + this.handleChange(e)}/> + + ), + colSpan: 1 + }) + } + + + + }) + arr.push( this.handleTrigger(e, index)} needTigger={true} title={c.title} showGroup={c.defaultshow} items={_arr} col={2} />) + }) + + return
{arr}
; + } + + handleTrigger = (bool, index) => { + const { + hrmAdminDecentralizationSet + } = this.props, { + setBtnStatus + } = hrmAdminDecentralizationSet; + + index == 0 && setBtnStatus(bool); + } + + handleChange = (e) => { + const { + hrmAdminDecentralizationSet + } = this.props, { + handleClickOfCheckbox, + setBrowserData, + changeReplaceDatas, + deleteRules, + addRules, + content + } = hrmAdminDecentralizationSet; + + let key = Object.keys(e)[0], + len = Object.keys(e[key]).length; + + if (key === "detachable" && e.detachable.value !== '1') {//重置三员分立管理 + content.form.updateFields({ + sanyuanable:'0' + }) + } + + if (key === "sanyuanable") { + return; + } + + if (len == 1) { //所有checkbox相关操作 + let val = e[key].value; + handleClickOfCheckbox(key, val); + if (key == 'detachable') return; + if (val == '0') { + deleteRules(key); //关闭checkbox时,删除掉condition中的校验参数: rules(目前表单组件不支持选择性校验)。 + } else { + addRules(key); //打开checkbox时,添加参数rules。 + } + + } else if (len > 1 && key == 'dftsubcomid') { //第一个Group内的浏览按钮相关操作 + let obj = e[key].valueObj; + setBrowserData(obj) + } else { //第二个Group内的所有浏览按钮相关操作 + let obj = e[key].valueObj; + changeReplaceDatas(key, obj); + } + } + + click = () => { + const { + hrmAdminDecentralizationSet + } = this.props, { + content, + setPageStatus, + changeBrowserReplaceDatas, + formKeys, + } = hrmAdminDecentralizationSet, { + data, + form + } = content; + + setPageStatus(true); + let d = toJS(data), + obj = d[0]; + let indexs = this.getUncheckedIndex(form.getFormParams()); + let fields = this.getShouldUpdateFields(indexs, d, obj,formKeys.browserKeysExceptDftsubcom); + form.updateFields(fields); //只更新开关开启的默认机构 + changeBrowserReplaceDatas(obj); //更新condition中的参数:replaceDatas + setTimeout(() => setPageStatus(false), 500); //点击同步按钮时,会造成页面抖动,所以这里加一个loading + } + + getUncheckedIndex = (params) => { + const obj = cloneDeep(params); + delete obj.sanyuanable; + + let arr = [], + closedCheckboxs = []; + Object.keys(obj).map(key => { + arr.push({ + key: obj[key] + }); + }); + let f = arr.filter((item, index) => index % 2 == 0); + f.map((item, index) => { + if (item.key == '0') { + closedCheckboxs.push(index); + } + }); + return closedCheckboxs; + } + + getShouldUpdateFields = (indexs, d, obj,keys) => { + // const keys = ['hrmdftsubcomid', 'wfdftsubcomid', 'docdftsubcomid', 'portaldftsubcomid', 'cptdftsubcomid', + // 'mtidftsubcomid', 'wcdftsubcomid', 'fmdftsubcomid', 'mmdftsubcomid', 'carsdftsubcomid','votingdftsubcomid','blogdftsubcomid','executiondftsubcomid' + // ]; + let o = {}; + + keys.map(key => { + o[key] = { + value: obj.id, + valueSpan: obj.name, + valueObj: d + } + }) + + let needUpdateFields = {}; + Object.keys(o).map((key, index) => { + let result = indexs.findIndex(i => i - 1 == index); + if (result == -1) { + needUpdateFields[key] = o[key]; + } + }); + + return needUpdateFields; + } + + render() { + const { + hrmAdminDecentralizationSet + } = this.props, { + loading, + weaTopTitle, + authorized, + content, + btnShow, + date + } = hrmAdminDecentralizationSet, { + cLoading + } = content; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+ this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + /> +
+ {!cLoading &&
{this.getForm()}
} + {!cLoading && btnShow &&
} +
+
+
+ ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/period/DataList.js b/pc4backstage/hrmengine/components/annualLeave/period/DataList.js new file mode 100644 index 0000000..94cd445 --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/period/DataList.js @@ -0,0 +1,77 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu, + WeaDialog +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import { i18n } from '../../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; + +@observer +export default class DataList extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + openDialog = (id) => { + const { + store + } = this.props; + store.create(false, { + id + }); + } + + doDel = (id) => { + const { + store + } = this.props; + store.remove({ + ids: id + }); + } + + onOperatesClick = (record, index, operate) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + this[func] && this[func](id); + } + + render() { + const { + store, + rightMenu + } = this.props; + const { + table, + dialogParams, + getDialogOpButtons + } = store; + const dProps = { + ...dialogParams, + buttons: getDialogOpButtons() + } + return ( +
+ + this.onOperatesClick(record, index, operate)}/> + + + {dProps.coms} + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/period/index.js b/pc4backstage/hrmengine/components/annualLeave/period/index.js new file mode 100644 index 0000000..f8632f6 --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/period/index.js @@ -0,0 +1,97 @@ +import '../../../style/annual.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu, + WeaLeftRightLayout +} from 'ecCom'; +import OrganizationTree from '../../../coms/OrganizationTree'; +import DataList from './DataList'; +import { + i18n +} from '../../../public/i18n'; + +@inject('hrmAnnualPeriod') + +@observer +export default class AnnualPeriod extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + this.refs.orgTree && this.refs.orgTree.refs.tree.fetchData(); + } + } + + init = () => { + const { + hrmAnnualPeriod: store + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('annualmanager', { + type: 'AnnualPeriod' + }, initData); + } + + render() { + const { + hrmAnnualPeriod: store + } = this.props; + const { + containerInitFinished, + topBtnAndMenu, + orgTreeProps, + selectedSubCompany + } = store; + const { + btns, + menus + } = topBtnAndMenu(); + let title = i18n.module.annualPeriod(); + if (selectedSubCompany != null && selectedSubCompany.name) + title = `${title} - ${selectedSubCompany.name}`; + const topProps = { + title, + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + buttons: btns, + dropMenuDatas: menus + } + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + + }> + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/rule/DataList.js b/pc4backstage/hrmengine/components/annualLeave/rule/DataList.js new file mode 100644 index 0000000..0a19917 --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/rule/DataList.js @@ -0,0 +1,76 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu, + WeaDialog +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +const WeaTable = WeaTableNew.WeaTable; + +@observer +export default class DataList extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + openDialog = (id) => { + const { + store + } = this.props; + store.create(false, { + id + }); + } + + doDel = (id) => { + const { + store + } = this.props; + store.remove({ + ids: id + }); + } + + onOperatesClick = (record, index, operate) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + this[func] && this[func](id); + } + + render() { + const { + store, + rightMenu + } = this.props; + const { + table, + dialogParams, + getDialogOpButtons + } = store; + const dProps = { + ...dialogParams, + buttons: getDialogOpButtons() + } + return ( +
+ + this.onOperatesClick(record, index, operate)}/> + + + {dProps.coms} + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/rule/index.js b/pc4backstage/hrmengine/components/annualLeave/rule/index.js new file mode 100644 index 0000000..4d26eb2 --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/rule/index.js @@ -0,0 +1,97 @@ +import '../../../style/annual.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu, + WeaLeftRightLayout +} from 'ecCom'; +import OrganizationTree from '../../../coms/OrganizationTree'; +import DataList from './DataList'; +import { + i18n +} from '../../../public/i18n'; + +@inject('hrmAnnualRule') + +@observer +export default class AnnualRule extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + this.refs.orgTree && this.refs.orgTree.refs.tree.fetchData(); + } + } + + init = () => { + const { + hrmAnnualRule: store + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('annualmanager', { + type: 'AnnualBatch' + }, initData); + } + + render() { + const { + hrmAnnualRule: store + } = this.props; + const { + containerInitFinished, + topBtnAndMenu, + orgTreeProps, + selectedSubCompany + } = store; + const { + btns, + menus + } = topBtnAndMenu(); + let title = i18n.module.annualRule(); + if (selectedSubCompany != null && selectedSubCompany.name) + title = `${title} - ${selectedSubCompany.name}`; + const topProps = { + title, + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + buttons: btns, + dropMenuDatas: menus + } + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + + }> + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/setting/DataList.js b/pc4backstage/hrmengine/components/annualLeave/setting/DataList.js new file mode 100644 index 0000000..5c896aa --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/setting/DataList.js @@ -0,0 +1,59 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaInput +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import { + message +} from 'antd'; +import findIndex from 'lodash/findIndex'; +const WeaTable = WeaTableNew.WeaTable; + +@observer +export default class DataList extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + renderCol = (cols) => { + const { + store + } = this.props; + const { + onAnnualDayBlur, + filter, + renderKeys + } = store; + renderKeys.map((key, i) => { + let idx = findIndex(cols, item => item.dataIndex === key); + idx != -1 && (cols[idx].render = (text, record) => { + return onAnnualDayBlur(record.id, {[key]: val}) } /> + }); + }) + } + + render() { + const { + store + } = this.props; + const { + table + } = store; + return ( + this.renderCol(cols)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}/> + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/setting/Import.js b/pc4backstage/hrmengine/components/annualLeave/setting/Import.js new file mode 100644 index 0000000..598148c --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/setting/Import.js @@ -0,0 +1,64 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaDialog, + WeaSearchGroup, + WeaRightMenu, + WeaNewScroll +} from 'ecCom'; +import ImportResource from '../../importresource/Import'; +import { + i18n +} from '../../../public/i18n'; + +@observer +export default class Import extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + dialogParams, + getDialogOpButtons, + editorDialogRightMenu, + message + } = store; + const dProps = { + ...dialogParams, + buttons: getDialogOpButtons() + } + + let children = []; + if (message.length > 0) { + message.map(m => { + children.push(
{m}
) + }) + } + const msgCom =
{children}
; + return ( + + + + + { + message.length > 0 && + + } + + + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/setting/TabPane.js b/pc4backstage/hrmengine/components/annualLeave/setting/TabPane.js new file mode 100644 index 0000000..80a092b --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/setting/TabPane.js @@ -0,0 +1,79 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu, + WeaRadioGroup +} from 'ecCom'; +import DataList from './DataList'; +import Import from './Import'; +import { + i18n +} from '../../../public/i18n'; + +@observer +export default class TabPane extends Component { + constructor(props) { + super(props); + this.state = { + radioGroupConfig: [], + refreshTab: 0 + } + } + + componentDidMount() { + const { + store + } = this.props; + const { + getRadioGroupConfig + } = store; + this.setState({ + radioGroupConfig: getRadioGroupConfig(), + refreshTab: store.refreshTab + }) + } + + componentWillReceiveProps(nextProps) { + const newV = nextProps.store.refreshTab, + oldV = this.state.refreshTab; + const { + store + } = this.props; + if (newV != oldV) { + this.setState({ + radioGroupConfig: store.getRadioGroupConfig(), + refreshTab: newV + }) + } + } + + render() { + const { + store, + rightMenu + } = this.props; + const { + onRadioGroupChange + } = store; + const { + radioGroupConfig + } = this.state; + return ( +
+ +
+ +
+
+ +
+
+ +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/annualLeave/setting/index.js b/pc4backstage/hrmengine/components/annualLeave/setting/index.js new file mode 100644 index 0000000..c3825b5 --- /dev/null +++ b/pc4backstage/hrmengine/components/annualLeave/setting/index.js @@ -0,0 +1,109 @@ +import '../../../style/paidLeaveSetting.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu, + WeaLeftRightLayout +} from 'ecCom'; +import { + Spin +} from 'antd'; +import OrganizationTree from '../../../coms/OrganizationTree'; +import Tabs from '../../../coms/Tabs'; +import TabPane from './TabPane'; +import { + i18n +} from '../../../public/i18n'; + +@inject('hrmAnnualSetting') +@inject('hrmImportResource') + +@observer +export default class AnnualSetting extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + this.refs.orgTree && this.refs.orgTree.refs.tree.fetchData(); + } + } + + init = () => { + const { + hrmAnnualSetting: store, + hrmImportResource + } = this.props; + const { + checkAuthorized, + initData, + setImportStore + } = store; + setImportStore(hrmImportResource); + checkAuthorized('annualmanager', { + type: 'AnnualLeave' + }, initData); + } + + render() { + const { + hrmAnnualSetting: store + } = this.props; + const { + containerInitFinished, + topBtnAndMenu, + orgTreeProps, + selectedSubCompany, + spinning, + refreshTopBtn + } = store; + const { + btns, + menus + } = topBtnAndMenu(); + let title = i18n.module.annualSetting(); + if (selectedSubCompany != null && selectedSubCompany.name) + title = `${title} - ${selectedSubCompany.name}`; + const topProps = { + title, + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + buttons: btns, + dropMenuDatas: menus + } + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + + + }> + + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/appDetach/DetachEdit.js b/pc4backstage/hrmengine/components/appDetach/DetachEdit.js new file mode 100644 index 0000000..9797d99 --- /dev/null +++ b/pc4backstage/hrmengine/components/appDetach/DetachEdit.js @@ -0,0 +1,168 @@ +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTableNew +} from 'comsMobx'; +import { + WeaRightMenu, + WeaDialog, + WeaAuth +} from 'ecCom'; +import classnames from 'classnames'; +import Tabs from '../../coms/Tabs'; +import FormInfo from '../../coms/FormInfo'; +import { + findIndex +} from 'lodash'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class DetachEdit extends Component { + constructor(props) { + super(props); + } + + tabChangeHandle = (key) => { + const { + store + } = this.props, { + editDetachTabConfig + } = store; + store.setActiveTab(editDetachTabConfig, key); + } + + doAction = (op, record) => { + const { + store + } = this.props; + const { + doAction + } = store; + doAction(op, record); + } + + doDel = (id) => { + const { + store + } = this.props; + const { + removeDetachDetail + } = store; + removeDetachDetail({ + id + }); + } + + doEdit = (id) => { + const { + store + } = this.props; + const { + modifyDetachDetail + } = store; + modifyDetachDetail({ + id + }); + } + + onOperatesClick = (record, index, operate) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + this[func] && this[func](id); + } + + render() { + const { + store + } = this.props; + const { + editDetachTabConfig, + conditionItemRender, + getTabIndex, + btnsAndMenus, + formTarget, + editorDialogRightMenu, + refreshEditTabComponent, + targetListTable, + rangeListTable, + detachDetailParams, + showError + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(editDetachTabConfig); + const { + dialogConditionForm: form, + dialogConditionFormFields: fields, + detachForm, + detachFormFields, + } = formTarget; + const tabProps = { + tabConfig: editDetachTabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: editDetachTabConfig.activeTabKey, + activeTabIndex: getTabIndex(editDetachTabConfig.tabs, editDetachTabConfig.activeTabKey) + }, + rightMenu: [], + store: store, + conditionForm: form, + conditionFormFields: fields, + tabBtnDef: tabBtnDef, + itemRender: conditionItemRender, + advanceHeight: 45 + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: true + }); + + const tableProps = { + scroll: { + y: 510 + } + } + + tabProps.advanceHeight = 80; + + return ( +
+ + + this.onOperatesClick(record, index, operate)} + /> + this.onOperatesClick(record, index, operate)} + /> + + { + detachDetailParams.visible && + } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/appDetach/DetachList.js b/pc4backstage/hrmengine/components/appDetach/DetachList.js new file mode 100644 index 0000000..3b5fb77 --- /dev/null +++ b/pc4backstage/hrmengine/components/appDetach/DetachList.js @@ -0,0 +1,144 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu, + WeaDialog +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import { + Row, + Col, + Button +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import FormInfo from '../../coms/FormInfo'; +import classnames from 'classnames'; +import { + findIndex, + findLastIndex +} from 'lodash'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class DetachList extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + openDialog = (id, key = '1') => { + const { + store + } = this.props; + const { + showEditDialog + } = store; + showEditDialog({ + id + }, key); + } + + doEdit = (id, key) => { + this.openDialog(id, key); + } + + doDel = (id) => { + const { + store + } = this.props; + const { + removeAppDetach + } = store; + removeAppDetach({ + id + }); + } + + onOperatesClick = (record, index, operate) => { + const { + store + } = this.props; + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + func === 'doEdit' && this[func] && this[func](id, '1'); //编辑 + func === 'doDel' && this[func] && this[func](id); //删除 + func === 'showLog' && store.showLog({logSmallType: store.logTypeDef.HRM_ENGINE_APPDETACH, targetId: id}); //日志 + } + + renderCol = (cols) => { + const colKey1 = 'name', + colKey2 = 'id', + colKey3 = 'id1'; + let idx = findIndex(cols, item => item.dataIndex === colKey1); + idx != -1 && (cols[idx].render = (text, record) => { + return this.openDialog(record.id, '1')}>{record.name} + }) + idx = findIndex(cols, item => item.dataIndex === colKey2); + idx != -1 && (cols[idx].render = (text, record) => { + return this.openDialog(record.id, '2')}>{record.idspan} + }) + idx = findIndex(cols, item => item.dataIndex === colKey3); + idx != -1 && (cols[idx].render = (text, record) => { + return this.openDialog(record.id, '3')}>{record.id1span} + }) + } + + render() { + const { + store, + rightMenu + } = this.props, { + appDetachListTable: table, + dialogParams, + formTarget, + getDialogOpButtons, + refreshDialog + } = store; + const classes = classnames({ + ['tabPane']: true, + }); + const { + detachForm: form, + detachFormFields: fields + } = formTarget; + const dProps = { + ...dialogParams, + buttons: getDialogOpButtons(), + style: { + width: dialogParams.isEdit ? 800 : 600, + height: dialogParams.isEdit ? 650 : 135 + } + } + const rMenu = [...rightMenu, ...store.getBasicMenus('HRM_ENGINE_APPDETACH')] + + return ( +
+ + this.onOperatesClick(record, index, operate)} + getColumns={cols => this.renderCol(cols)} + /> + + + {dProps.coms} + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/appDetach/GlobalSetting.js b/pc4backstage/hrmengine/components/appDetach/GlobalSetting.js new file mode 100644 index 0000000..ced811b --- /dev/null +++ b/pc4backstage/hrmengine/components/appDetach/GlobalSetting.js @@ -0,0 +1,57 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu +} from 'ecCom'; +import { + Row, + Col, + Button +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import FormInfo from '../../coms/FormInfo'; + +@observer +export default class Dashboard extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store, + rightMenu + } = this.props; + const { + refreshForm, + formTarget, + globalSettingFormItemRender, + showError + } = store; + const { + globalSettingForm, + globalSettingFormFields + } = formTarget; + + const rMenu = [...rightMenu, ...store.getBasicMenus('HRM_ENGINE_APPDETACH_SET')] + return ( +
+ +
+ +
+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/appDetach/index.js b/pc4backstage/hrmengine/components/appDetach/index.js new file mode 100644 index 0000000..3fda9b6 --- /dev/null +++ b/pc4backstage/hrmengine/components/appDetach/index.js @@ -0,0 +1,131 @@ +import '../../style/appDetach.less'; +import React, { + Component +} from 'react'; +import { + WeaTop, + WeaAlertPage +} from 'ecCom'; +import { + inject, + observer +} from 'mobx-react'; +import Tabs from '../../coms/Tabs'; +import GlobalSetting from './GlobalSetting'; +import DetachList from './DetachList'; +import { + i18n +} from '../../public/i18n'; +import { + indexOf, + has +} from 'lodash'; + +@inject("hrmAppDetach") + +@observer +export default class AppDetach extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmAppDetach: store, + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('appdetach', null, initData); + } + + tabChangeHandle = (key) => { + const { + hrmAppDetach: store + } = this.props, { + tabConfig + } = store; + store.setActiveTab(tabConfig, key); + } + + render() { + const { + hrmAppDetach: store + } = this.props; + //state + const { + containerInitFinished, + refreshMainTabComponent + } = store; + //data + const { + tabConfig, + btnsAndMenus, + formTarget, + getTabIndex, + conditionItemRender + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(tabConfig); + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + const topProps = { + title: i18n.module.appDetach(), + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + buttons: btns, + dropMenuDatas: menus + } + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + rightMenu: menus, + store: store, + conditionForm: form, + conditionFormFields: fields, + itemRender: conditionItemRender, + advanceHeight: 130 + } + + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + + + + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/archiveLogView/index.js b/pc4backstage/hrmengine/components/archiveLogView/index.js new file mode 100644 index 0000000..f07dd0f --- /dev/null +++ b/pc4backstage/hrmengine/components/archiveLogView/index.js @@ -0,0 +1,116 @@ +import React, { + Component +} from 'react'; +import { + observer, + inject +} from 'mobx-react'; +import { + toJS +} from 'mobx'; +import { + Authority, + Top, + Search, + RadioGroup, + Table, + Dialog, +} from '../../public/valhalla/components/index.js'; +import {WeaTable } from "ecCom"; +import "../../style/sanyuanLog.less"; + +@inject('archiveLogViewStore') +@observer +export default class ArchiveLogView extends Component { + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.initPage(); + } + } + + componentDidMount() { + this.initPage(); + } + + initPage = () => { + this.props.archiveLogViewStore.initPage(); + } + + getDialogContent = () => { + const { + archiveLogViewStore + } = this.props, { + logDetail, + isLogDetail, + originParams, + columns, + datas, + } = archiveLogViewStore; + + return ( + + { + isLogDetail ?( logDetail && logDetail.map(detail => { + return ( +
+ {detail} +
+ ) + }) ) : originParams.map(param => { + return ( +
+ {param} +
+ ) + }) + } + { + datas.map( (data,index) => { + if (data.length > 0) { + return ( +
+ +
+ ) + } + }) + } +
+ ) + } + + render() { + const { + archiveLogViewStore + } = this.props, { + authorityStore, + topStore, + searchStore, + radioGroupStore, + tableListStore, + dialogStore, + } = archiveLogViewStore; + + return ( +
+ + + + + + + {dialogStore.visible && ( + + {this.getDialogContent()} + + )} + + + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/area/Area.js b/pc4backstage/hrmengine/components/area/Area.js new file mode 100644 index 0000000..4686a7c --- /dev/null +++ b/pc4backstage/hrmengine/components/area/Area.js @@ -0,0 +1,1209 @@ +import React from 'react' +import * as mobx from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaDropdown, + WeaRightMenu, + WeaLeftRightLayout, +} from 'ecCom' +import { + Row, + Col, + Spin, + Modal, + Button, + message, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +import '../../style/area.css' +const toJS = mobx.toJS; +const confirm = Modal.confirm; +const { + ButtonSelect +} = WeaDropdown; + +import LeftTree from './LeftTree' +import NewAndEditDialog from './NewAndEditDialog' +import AreaTable from './AreaTable' +import TabInfo from './TabInfo' +import BriefInfo from './BriefInfo' + +import Import from '../importRelatedComponet/index'; +import { + HrmImportCommon +} from '../../stores/importCommon'; +const hrmImportCommon = new HrmImportCommon(); + +@inject('hrmImportCommon') +@inject('hrmAdAreaSet') +@observer +export default class Main extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.areaSet(); + } + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + const { + hrmAdAreaSet + } = this.props; + + if (this.props.location.key !== nextProps.location.key) { + hrmAdAreaSet.orgTreeShValueReset(); + hrmAdAreaSet.setOrgTreeStatus(); + hrmAdAreaSet.formTwoReset(); + hrmAdAreaSet.countrynameReset(); + hrmAdAreaSet.dpIconStatusReset(); + this.handleTreeNodeClick('all', 'tag'); //第二个参数没有实际意义,只是为了不让左侧树刷新 + } + } + + componentWillUnmount() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.orgTreeShValueReset(); + hrmAdAreaSet.setOrgTreeStatus(); + hrmAdAreaSet.formTwoReset(); + hrmAdAreaSet.countrynameReset(); + hrmAdAreaSet.dpIconStatusReset(); + this.handleTreeNodeClick('all', 'tag'); //第二个参数没有实际意义,只是为了不让左侧树刷新 + } + + + init() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setOperation('getTable'); //设置接下来操作的类型 + hrmAdAreaSet.setFuncName('getCountryList'); + hrmAdAreaSet.getTable(); + } + + //列表中的编辑按钮 + getEditForm(id) { + const { + hrmAdAreaSet + } = this.props, { + type + } = hrmAdAreaSet; + + hrmAdAreaSet.setFormType('edit'); + hrmAdAreaSet.setVisible(true); + + if (type == 'all') { + hrmAdAreaSet.setDialogTitle(i18n.label.editCountry()); + hrmAdAreaSet.setCountryId(id); + hrmAdAreaSet.setOperation('edit'); + hrmAdAreaSet.setFuncName('getCountryForm'); + hrmAdAreaSet.getForm(); + } + if (type == 'country') { + hrmAdAreaSet.setDialogTitle(i18n.label.editProvince()); + hrmAdAreaSet.setProvinceId(id); + hrmAdAreaSet.setOperation('edit'); + hrmAdAreaSet.setFuncName('getProvinceForm'); + hrmAdAreaSet.getForm(); + } + if (type == 'province') { + hrmAdAreaSet.setDialogTitle(i18n.label.editCity()); + hrmAdAreaSet.setCityId(id); + hrmAdAreaSet.setOperation('edit'); + hrmAdAreaSet.setFuncName('getCityForm'); + hrmAdAreaSet.getForm(); + } + if (type == 'city') { + hrmAdAreaSet.setDialogTitle(i18n.label.editCityTwo()); + hrmAdAreaSet.setCountyId(id); + hrmAdAreaSet.setOperation('edit'); + hrmAdAreaSet.setFuncName('getCityTwoForm'); + hrmAdAreaSet.getForm(); + } + } + + //封存 + seal(id) { + const { + hrmAdAreaSet + } = this.props, { + type, + selectedKey, + selectedRows, + isDisplayBlock + } = hrmAdAreaSet; + + hrmAdAreaSet.setCancelFlag(0); + + if (id) { + type == 'all' && hrmAdAreaSet.setCountryId(id); + type == 'country' && hrmAdAreaSet.setProvinceId(id); + type == 'province' && hrmAdAreaSet.setCityId(id); + type == 'city' && hrmAdAreaSet.setCountyId(id); + } else { + if (!selectedRows && (type == 'all' || selectedKey == '1')) { + this.getSealOrUnsealTip(); + return; + } + } + this.showConfirm('seal', id); + } + + //解封 + unseal(id) { + const { + hrmAdAreaSet + } = this.props, { + type, + selectedKey, + selectedRows + } = hrmAdAreaSet; + + if (id) { + type == 'all' && hrmAdAreaSet.setCountryId(id); + type == 'country' && hrmAdAreaSet.setProvinceId(id); + type == 'province' && hrmAdAreaSet.setCityId(id); + type == 'city' && hrmAdAreaSet.setCountyId(id); + } else { + if (!selectedRows && (type == 'all' || selectedKey == '1')) { + this.getSealOrUnsealTip(); + return; + } + } + + hrmAdAreaSet.setCancelFlag(1); + hrmAdAreaSet.setOperation('sealOrUnseal'); + hrmAdAreaSet.sealOrUnseal(); + } + + getSealOrUnsealTip() { + const { + hrmAdAreaSet + } = this.props, { + type, + selectedKey, + isBatchSeal + } = hrmAdAreaSet; + + if (type == 'all') { + isBatchSeal ? message.warning('请选择要封存的国家!') : message.warning('请选择要解封的国家!'); + } + if (type == 'country' && selectedKey == '1') { + isBatchSeal ? message.warning('请选择要封存的省份!') : message.warning('请选择要解封的省份!'); + } + if ((type == 'province' && selectedKey == '1')) { + isBatchSeal ? message.warning('请选择要封存的城市!') : message.warning('请选择要解封的城市!'); + } + if ((type == 'city' && selectedKey == '1')) { + isBatchSeal ? message.warning('请选择要封存的区县!') : message.warning('请选择要解封的区县!'); + } + } + //删除表格的一行或者多行数据 + deleteRows(id) { + const { + hrmAdAreaSet + } = this.props, { + type, + selectedRows, + selectedKey + } = hrmAdAreaSet; + + //删除单行(删除多行的ids,通过setSelectedRow()方法设置) + if (id) { + type == 'all' && hrmAdAreaSet.setCountryId(id); + type == 'country' && hrmAdAreaSet.setProvinceId(id); + type == 'province' && hrmAdAreaSet.setCityId(id); + type == 'city' && hrmAdAreaSet.setCountyId(id); + hrmAdAreaSet.setOperation('delete'); + } else { + if (selectedKey == '0') { + if (type !== 'all') { + hrmAdAreaSet.setOperation('delete'); + } else { + if (!selectedRows) { + this.getDeleteTip(); + return; + } else { + hrmAdAreaSet.setOperation('batch_delete'); + } + } + } else { + if (!selectedRows) { + this.getDeleteTip(); + return; + } else { + hrmAdAreaSet.setOperation('batch_delete'); + } + } + } + let v = id ? 'del' : 'batchDel'; + this.showConfirm(v); + } + + getDeleteTip() { + const { + hrmAdAreaSet + } = this.props, { + type, + countryId, + provinceId, + cityId, + countyId + } = hrmAdAreaSet; + + type == 'all' && message.warning('请选择要删除的国家!'); + type == 'country' && message.warning('请选择要删除的省份!'); + type == 'province' && message.warning('请选择要删除的城市!'); + type == 'city' && message.warning('请选择要删除的区县!'); + } + + //删除确认框 + showConfirm(type, id) { + let _this = this; + let obj = { + title: i18n.confirm.defaultTitle(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk(type, id); + }, + onCancel() { + return false; + }, + } + let func = (type == 'del') ? 'delete' : (type == 'batchDel') ? 'batchDeleteConfirm' : 'cancelSelected'; + obj.content = i18n.confirm[func](); + confirm(obj); + } + + onOk(_type, id) { + const { + hrmAdAreaSet + } = this.props, { + type, + selectedKey, + isDisplayBlock + } = hrmAdAreaSet; + + if (_type == 'del' || _type == 'batchDel') { + if (type == 'all' || (type == 'country' && selectedKey == '0')) { + hrmAdAreaSet.setFuncName('deleteCountry'); + hrmAdAreaSet.delete(); + type == 'country' && this.handleTreeNodeClick('all'); + } + if ((type == 'country' && selectedKey == '1') || (type == 'province' && selectedKey == '0')) { + hrmAdAreaSet.setFuncName('deleteProvince'); + hrmAdAreaSet.delete(); + type == 'province' && this.handleTreeNodeClick('country'); + } + if ((type == 'province' && selectedKey == '1') || (type == 'city' && selectedKey == '0')) { + hrmAdAreaSet.setFuncName('deleteCity'); + hrmAdAreaSet.delete(); + type == 'city' && this.handleTreeNodeClick('province'); + } + if ((type == 'city' && selectedKey == '1') || type == 'citytwo') { + hrmAdAreaSet.setFuncName('deleteCityTwo'); + hrmAdAreaSet.delete(); + type == 'citytwo' && this.handleTreeNodeClick('city'); + } + + } + if (_type == 'seal') { + hrmAdAreaSet.setOperation('sealOrUnseal'); + hrmAdAreaSet.sealOrUnseal(); + !id && selectedKey == '0' && isDisplayBlock == '0' && this.handleTreeNodeClick('all'); + } + } + + //"高级搜索"中的搜索按钮、显示封存和不显示封存数据按钮 + search(arg) { + const { + hrmAdAreaSet + } = this.props, { + type, + isPanelShow + } = hrmAdAreaSet; + + if (arg == 'dpIcon') { + hrmAdAreaSet.setDisplayBlockStatus(); + hrmAdAreaSet.setTableLinkToTreeStatus(true); + hrmAdAreaSet.setDpIconNeedResetStatus(false); + this.handleTreeNodeClick('all'); //封存后跳转到初始页面 + } + + hrmAdAreaSet.setOperation('getTable'); //设置操作的类型 + this.getTable(); + + isPanelShow && hrmAdAreaSet.setPanelStatus(false); + + type == 'citytwo' && hrmAdAreaSet.setTreeRefresh(); + } + + onSearchChange(val) { + const { + hrmAdAreaSet + } = this.props, { + type, + form2 + } = hrmAdAreaSet; + + (type == 'all' || type == 'country') && !this.isEmptyObject(form2.getFormParams()) && hrmAdAreaSet.updateFields(val); + type == 'all' && hrmAdAreaSet.setCountryName(val); + type == 'country' && hrmAdAreaSet.setProvinceName(val); + type == 'province' && hrmAdAreaSet.setCityName(val); + type == 'city' && hrmAdAreaSet.setCityTwoName(val); + } + + isEmptyObject(obj) { + for (let key in obj) { + if (!obj[key]) return true; + return false; + } + return true; + } + + + //获取到表格中选中行id值的集合 + setSelectedRow() { + const { + hrmAdAreaSet + } = this.props, { + tableStore, + type + } = hrmAdAreaSet; + + let keys = toJS(tableStore.selectedRowKeys).toString(); + hrmAdAreaSet.setSelectRows(keys); + } + //处理左侧树点击事件 + handleTreeNodeClick(type, id) { + const { + hrmAdAreaSet + } = this.props, { + countryId, + provinceId, + cityId, + countyId, + isDpIconNeedReset + } = hrmAdAreaSet; + + isDpIconNeedReset && hrmAdAreaSet.dpIconStatusReset(); //是否需要重置封存、解封图标状态 + hrmAdAreaSet.setType(type); //设置当前点击节点的类型 + hrmAdAreaSet.selectedKeyReset(); //重置tab页签 + hrmAdAreaSet.batchKeyReset(); //重置batchKey + hrmAdAreaSet.setPanelStatus(false); //关闭高级搜索下拉面板 + hrmAdAreaSet.formTwoReset(); + hrmAdAreaSet.countrynameReset(); + + //设置对应的ID + type == 'all' && this.init(); + type == 'country' && id && hrmAdAreaSet.setCountryId(id); + type == 'province' && id && hrmAdAreaSet.setProvinceId(id); + type == 'city' && id && hrmAdAreaSet.setCityId(id); + type == 'citytwo' && id && hrmAdAreaSet.setCountyId(id); + + //获取左侧树节点的基本信息 + if (type !== 'all') { + hrmAdAreaSet.setOperation('getBriefInfo'); + hrmAdAreaSet.getBriefInfo(); + } + //点击面包屑时,刷新左侧树 + !id && hrmAdAreaSet.setTreeRefresh(); + } + + //新建国家 + newCountry() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setDialogTitle(i18n.label.newCountry()); + hrmAdAreaSet.setFormType('new'); //设置保存的类型:新建 + hrmAdAreaSet.setNewType('country'); //设置新建的种类:国家 + hrmAdAreaSet.setOperation('new'); //设置这次操作的类型:新建。 + hrmAdAreaSet.setFuncName('getCountryForm'); + hrmAdAreaSet.getForm(); + hrmAdAreaSet.setVisible(true); + } + //新建省份 + newProvince() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setDialogTitle(i18n.label.newProvince()); + hrmAdAreaSet.setFormType('new'); + hrmAdAreaSet.setNewType('province'); + hrmAdAreaSet.setOperation('new'); + hrmAdAreaSet.setFuncName('getProvinceForm'); + hrmAdAreaSet.getForm(); + hrmAdAreaSet.setVisible(true); + } + //新建城市 + newCity() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setDialogTitle(i18n.label.newCity()); + hrmAdAreaSet.setFormType('new'); + hrmAdAreaSet.setNewType('city'); + hrmAdAreaSet.setOperation('new'); + hrmAdAreaSet.setFuncName('getCityForm'); + hrmAdAreaSet.getForm(); + hrmAdAreaSet.setVisible(true); + } + //新建区县 + newCounty() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setDialogTitle(i18n.label.newCityTwo()); + hrmAdAreaSet.setFormType('new'); + hrmAdAreaSet.setNewType('citytwo'); + hrmAdAreaSet.setOperation('new'); + hrmAdAreaSet.setFuncName('getCityTwoForm'); + hrmAdAreaSet.getForm(); + hrmAdAreaSet.setVisible(true); + } + //"编辑"按钮 + edit() { + const { + hrmAdAreaSet + } = this.props, { + type + } = hrmAdAreaSet; + + hrmAdAreaSet.setFormType('edit'); + hrmAdAreaSet.setOperation('edit'); + + let dialogTitle; + if (type == 'country') { + dialogTitle=i18n.label.editCountry(); + hrmAdAreaSet.setFuncName('getCountryForm'); + hrmAdAreaSet.getForm(); + } + if (type == 'province') { + dialogTitle=i18n.label.editProvince(); + hrmAdAreaSet.setFuncName('getProvinceForm'); + hrmAdAreaSet.getForm(); + } + if (type == 'city') { + dialogTitle=i18n.label.editCity(); + hrmAdAreaSet.setFuncName('getCityForm'); + hrmAdAreaSet.getForm(); + } + if (type == 'citytwo') { + dialogTitle=i18n.label.editCityTwo(); + hrmAdAreaSet.setFuncName('getCityTwoForm'); + hrmAdAreaSet.getForm(); + } + hrmAdAreaSet.setDialogTitle(dialogTitle); + hrmAdAreaSet.setVisible(true); + + + } + + //保存 + save() { + const { + hrmAdAreaSet + } = this.props, { + type, + formType, + newType, + selectedKey + } = hrmAdAreaSet; + + formType == 'new' && hrmAdAreaSet.setOperation('save_new'); //新建保存 + formType == 'edit' && hrmAdAreaSet.setOperation('save_edit'); //编辑保存 + if (type == 'all') { + if (formType == 'new') { + hrmAdAreaSet.setFuncName('addCountry'); + hrmAdAreaSet.add(); + } else { + hrmAdAreaSet.setFuncName('editCountry'); + hrmAdAreaSet.edit(); + } + } + if (type == 'country') { + if (selectedKey == '0') { + if (formType == 'new' && newType == 'country') { + hrmAdAreaSet.setFuncName('addCountry'); + hrmAdAreaSet.add(); + } + if (formType == 'new' && newType == 'province') { + hrmAdAreaSet.setFuncName('addProvince'); + hrmAdAreaSet.add(); + } + if (formType == 'edit') { + hrmAdAreaSet.setFuncName('editCountry'); + hrmAdAreaSet.edit(); + } + } else { + if (formType == 'new') { + hrmAdAreaSet.setFuncName('addProvince'); + hrmAdAreaSet.add(); + } else { + hrmAdAreaSet.setFuncName('editProvince'); + hrmAdAreaSet.edit(); + } + } + } + if (type == 'province') { + if (selectedKey == '0') { + if (formType == 'new' && newType == 'province') { + hrmAdAreaSet.setFuncName('addProvince'); + hrmAdAreaSet.add(); + } + if (formType == 'new' && newType == 'city') { + hrmAdAreaSet.setFuncName('addCity'); + hrmAdAreaSet.add(); + } + if (formType == 'edit') { + hrmAdAreaSet.setFuncName('editProvince'); + hrmAdAreaSet.edit(); + } + } else { + if (formType == 'new') { + hrmAdAreaSet.setFuncName('addCity'); + hrmAdAreaSet.add(); + } else { + hrmAdAreaSet.setFuncName('editCity'); + hrmAdAreaSet.edit(); + } + } + } + if (type == 'city') { + if (selectedKey == '0') { + if (formType == 'new' && newType == 'city') { + hrmAdAreaSet.setFuncName('addCity'); + hrmAdAreaSet.add(); + } + if (formType == 'new' && newType == 'citytwo') { + hrmAdAreaSet.setFuncName('addCityTwo'); + hrmAdAreaSet.add(); + } + if (formType == 'edit') { + hrmAdAreaSet.setFuncName('editCity'); + hrmAdAreaSet.edit(); + } + } else { + if (formType == 'new') { + hrmAdAreaSet.setFuncName('addCityTwo'); + hrmAdAreaSet.add(); + } else { + hrmAdAreaSet.setFuncName('editCityTwo'); + hrmAdAreaSet.edit(); + } + } + } + if (type == 'citytwo') { + if (formType == 'new') { + hrmAdAreaSet.setFuncName('addCityTwo'); + hrmAdAreaSet.add(); + } else { + hrmAdAreaSet.setFuncName('editCityTwo'); + hrmAdAreaSet.edit(); + } + } + } + + //导入 + import () { + const { + hrmImportCommon, + } = this.props, { + setTempletName, + setImportDialogTitle, + setImportType, + setImportDialogVisible, + setImportPage, + } = hrmImportCommon; + + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.areaInfoImport()); + setImportType('area'); + setImportDialogVisible(true); + //设置标识,标识当前是那个页面在导入 + setImportPage(this.props.location.pathname.split('/').pop()); + } + + //导入文件提交 + submit() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setOperation('import_submit'); + hrmAdAreaSet.importInfoSubmit(); + } + //获取WeaTop组件的按钮 + getTopMenuBtns() { + const { + hrmAdAreaSet + } = this.props, { + topMenu + } = hrmAdAreaSet; + + let btns = []; + topMenu.map((item, i) => { + btns.push(); + }); + + return btns; + } + + handleClick(item) { + const { + hrmAdAreaSet + } = this.props, { + isPanelShow + } = hrmAdAreaSet; + + isPanelShow && hrmAdAreaSet.setPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + handleBtnSelectClick(key) { + const { + hrmAdAreaSet + } = this.props, { + isPanelShow + } = hrmAdAreaSet; + + isPanelShow && hrmAdAreaSet.setPanelStatus(false); + if (key == '0') { + hrmAdAreaSet.setIsBatchSealStatus(true); + this.setSelectedRow(); + this.seal(''); + } + if (key == '1') { + hrmAdAreaSet.setIsBatchSealStatus(false); + this.setSelectedRow(); + this.unseal(''); + } + if (key == '2') { + this.setSelectedRow(); + this.deleteRows(); + } + } + + getSearchsBaseValue() { + const { + hrmAdAreaSet + } = this.props, { + type, + form2, + countryname, + provincename + } = hrmAdAreaSet; + + let val; + if (type == 'all') { + if (this.isEmptyObject(form2.getFormParams())) { + val = countryname; + } else { + val = form2.getFormParams().countryname; + } + } + if (type == 'country') { + if (this.isEmptyObject(form2.getFormParams())) { + val = provincename; + } else { + val = form2.getFormParams().provincename + } + } + + return val; + } + + //点击表格中的td(效果和点击左侧树节点效果一样) + //isTabSwitch参数控制跳转后的当前tab页 + tdClick(params) { + const { + hrmAdAreaSet + } = this.props; + let type = params.indexTo; + let id = params.id; + this.handleTreeNodeClick(type, id); + params.isTabSwitch && hrmAdAreaSet.setSelectedKey('1'); + } + + //历史导入记录查询 + importHistoryQuery() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setOperation('import_info_query'); + hrmAdAreaSet.getImportHistory(); + } + + getLeftCom() { + const { + hrmAdAreaSet + } = this.props, { + isDisplayBlock, + treeRefresh, + orgTreeShValue, + isOrgTreeShow + } = hrmAdAreaSet; + + return ( + this.ltSearchChange(val)} + treeNodeClick={(type, id) => this.handleTreeNodeClick(type, id)} + /> + ) + } + + ltSearchChange(val) { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setOrgTreeShValue(val); + } + + //获取WeaTop组件的Breadcrumb + getBreadcrumb() { + const { + hrmAdAreaSet + } = this.props, { + type, + curCountry, + curProvince, + curCity, + curCounty + } = hrmAdAreaSet; + + let breadcrumb; + + if (type == 'all') breadcrumb = [{ + name: i18n.module.areaSet() + }]; + if (type == 'country') { + breadcrumb = [{ + name: i18n.module.areaSet(), + onClick: () => this.handleTreeNodeClick('all') + }, { + name: curCountry + }]; + } + if (type == 'province') { + breadcrumb = [{ + name: curCountry, + onClick: () => this.handleTreeNodeClick('country') + }, { + name: curProvince + }]; + } + if (type == 'city') { + breadcrumb = [{ + name: curProvince, + onClick: () => this.handleTreeNodeClick('province') + }, { + name: curCity + }]; + } + if (type == 'citytwo') { + breadcrumb = [{ + name: curCity, + onClick: () => this.handleTreeNodeClick('city') + }, { + name: curCounty + }]; + } + return breadcrumb; + } + + getDropMenuDatas() { + const { + hrmAdAreaSet + } = this.props, { + rightMenu + } = hrmAdAreaSet; + + let menus = []; + toJS(rightMenu).map((item, index) => { + if (item.menuFun === "batchDelete") return; + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + log = () => { + const { + hrmAdAreaSet + } = this.props, { + type + } = hrmAdAreaSet; + + window.setLogViewProps({ + logSmallType: (type == 'all') ? '3006' : (type == 'country') ? '3007' : (type == 'province') ? '3008' : '3009', + }); + } + + custom = () => { + const { + hrmAdAreaSet + } = this.props, { + tableStore, + } = hrmAdAreaSet; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + getButtonSelect() { + const { + hrmAdAreaSet + } = this.props, { + buttonSelect, + tableStore, + batchKey + } = hrmAdAreaSet; + + if (buttonSelect.length > 0) { + return ( 0 ? false : true}} + btnOnClick={key => this.handleBtnSelectClick(key)} + menuOnClick={key => this.handleMenuOnClick(key)} + />) + } else { + return [] + } + + } + + handleMenuOnClick(key) { + const { + hrmAdAreaSet + } = this.props, { + type, + isPanelShow + } = hrmAdAreaSet; + + isPanelShow && hrmAdAreaSet.setPanelStatus(false); + hrmAdAreaSet.setBatchKey(key); + hrmAdAreaSet.setOperation('getTable'); + + this.getTable(); + } + + getTable() { + const { + hrmAdAreaSet + } = this.props, { + type + } = hrmAdAreaSet; + + if (type == 'all') { + hrmAdAreaSet.setFuncName('getCountryList'); + hrmAdAreaSet.getTable(); + } + if (type == 'country') { + hrmAdAreaSet.setFuncName('getProvinceList'); + hrmAdAreaSet.getTable(); + } + if (type == 'province') { + hrmAdAreaSet.setFuncName('getCityList'); + hrmAdAreaSet.getTable(); + } + if (type == 'city') { + hrmAdAreaSet.setFuncName('getCityTwoList'); + hrmAdAreaSet.getTable(); + } + } + + getIconBtn() { + const { + hrmAdAreaSet + } = this.props, { + hasDpIcon, + isDisplayBlock + } = hrmAdAreaSet; + + if (hasDpIcon) { + return () + } else { + return []; + } + } + + //右键菜单点击事件 + handleMenuClick(key) { + const { + hrmAdAreaSet + } = this.props, { + isPanelShow + } = hrmAdAreaSet; + + isPanelShow && hrmAdAreaSet.setPanelStatus(false); + this[key] && this[key](); + } + + //获取tab项的名称 + getTabName() { + const { + hrmAdAreaSet + } = this.props, { + type + } = hrmAdAreaSet; + + let tabName; + + if (type == 'country') { + tabName = [{ + key: '0', + title: i18n.label.countryInfo() + }, { + key: '1', + title: i18n.label.lowerProvince() + }, ] + } + if (type == 'province') { + tabName = [{ + key: '0', + title: i18n.label.provinceInfo() + }, { + key: '1', + title: i18n.label.lowerCity() + }, ] + } + if (type == 'city') { + tabName = [{ + key: '0', + title: i18n.label.cityInfo() + }, { + key: '1', + title: i18n.label.lowerCityTwo() + }, ] + } + + return tabName; + } + + getSearchType() { + const { + hrmAdAreaSet + } = this.props, { + type, + selectedKey + } = hrmAdAreaSet; + + if (type == 'all' || (type == 'country' && selectedKey == '1')) { + return ['base', 'advanced']; + } + if ((type == 'province' || type == 'city') && selectedKey == '1') { + return ['base']; + } + } + + handleAdSearchClick(bool) { + const { + hrmAdAreaSet + } = this.props; + + if (bool) { + hrmAdAreaSet.setPanelStatus(true); + hrmAdAreaSet.setOperation('search'); + hrmAdAreaSet.getSearchCondition(); + } else { + hrmAdAreaSet.setPanelStatus(false); + } + } + + getWeaTopButtons() { + return this.getTopMenuBtns().concat(this.getButtonSelect()).concat(this.getIconBtn()) + } + + jumpToImportResult(id) { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setPid(id); + hrmAdAreaSet.setOperation('import_info'); + hrmAdAreaSet.getImportResult(); + } + + queryImportLog() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setOperation('import_log'); + hrmAdAreaSet.getImportLogDetail(); + hrmAdAreaSet.setOperation('import_log_searchCondition'); + hrmAdAreaSet.getImportLogSearchCondition(); + } + + importLogSearch() { + const { + hrmAdAreaSet + } = this.props; + + hrmAdAreaSet.setOperation('import_log'); + hrmAdAreaSet.getImportLogDetail(); + } + + batchDelete = () => { + this.setSelectedRow(); + this.deleteRows(); + } + + render() { + const { + hrmAdAreaSet + } = this.props; + const { + dialogTitle, + visible, + form, + form2, + condition, + tableStore, + type, + isPanelShow, + selectedKey, + briefInfo, + buttonSelect, + newEditDialogLoading, + searchConditionLoading, + date, + mpLoading, + isDisplayBlock, + treeRefresh, + orgTreeShValue, + isOrgTreeShow + } = hrmAdAreaSet; + + const { + hrmImportCommon + } = this.props, { + importDialog + } = hrmImportCommon; + + const len = condition.length > 0 && condition[0].items.length; + + return ( +
+ this.handleMenuClick(key)} + collectParams={{favname:i18n.module.areaSet(),favouritetype:5}} + > + + } + iconBgcolor='#217346' + loading={true} + buttons={this.getWeaTopButtons()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(key) => this.handleMenuClick(key)} + > + this.ltSearchChange(val)} + treeNodeClick={(type, id) => this.handleTreeNodeClick(type, id)} + />} + > + { type !== 'citytwo' ? +
+ this.search()} + onSearchChange={(val) => this.onSearchChange(val)} + setPanelStatus={ b => this.handleAdSearchClick(b)} + setSelectedKey={(key) => hrmAdAreaSet.setSelectedKey(key)} + /> + + : ''} + { type !== 'all' && selectedKey == '0' ? : + + this.seal(id)} + unseal={ id => this.unseal(id)} + getEditForm={(id) => this.getEditForm(id)} + deleteRows={(id) => this.deleteRows(id)} + tdClick={ params => this.tdClick(params)} + /> + + } + + + + + this.save()} + onCancel={() => hrmAdAreaSet.setVisible(false)} + /> + {importDialog.visible && } + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/area/AreaTable.js b/pc4backstage/hrmengine/components/area/AreaTable.js new file mode 100644 index 0000000..7566bc1 --- /dev/null +++ b/pc4backstage/hrmengine/components/area/AreaTable.js @@ -0,0 +1,134 @@ +import { + message +} from 'antd' + +import { + WeaTableNew +} from 'comsMobx'; + +import { + i18n +} from '../../public/i18n'; + +const WeaTable = WeaTableNew.WeaTable; + +export default class AreaTable extends React.Component { + constructor(props) { + super(props); + } + + onOperatesClick(record, index, operate) { + const { + getEditForm, + deleteRows, + seal, + unseal, + type, + } = this.props; + + let i = operate.index; + let id = record.id || record.randomFieldId; + + i == '0' && getEditForm(id); + i == '1' && deleteRows(id); + i == '2' && seal(id); + i == '3' && unseal(id); + i == '4' && window.setLogViewProps({ + logSmallType: (type == 'all') ? '3006' : (type == 'country') ? '3007' : (type == 'province') ? '3008' : '3009', + targetId: id, + });; + } + + reRenderColumns(columns) { + const { + tdClick, + type + } = this.props; + let _this = this; + + columns.forEach((c, index) => { + if (c.dataIndex == 'countryname' && type == 'all') { //点击'国家简称' + c.render = function(text, record) { + let params = { + indexTo: 'country', + id: record.id + } + return tdClick(params)} >{record.countryname}{record.countrynamespan.indexOf('已封存') > -1 ? '(已封存)' : ''} + } + } + if (c.dataIndex == 'result' && type == 'all') { //点击'省份数量' + c.render = function(text, record) { + let params = { + indexTo: 'country', + id: record.id, + isTabSwitch: true + } + return tdClick(params)} >{record.result} + } + } + if (c.dataIndex == 'provincename' && type == 'country') { //点击'省份简称' + c.render = function(text, record) { + let params = { + indexTo: 'province', + id: record.id + } + return tdClick(params) }>{record.provincename}{record.provincenamespan.indexOf('已封存') > -1 ? '(已封存)' : ''} + } + } + if (c.dataIndex == 'result' && type == 'country') { //点击'省份数量' + c.render = function(text, record) { + let params = { + indexTo: 'province', + id: record.id, + isTabSwitch: true + } + return tdClick(params)} >{record.result} + } + } + if (c.dataIndex == 'cityname' && type == 'province') { //点击'城市简称' + c.render = function(text, record) { + let params = { + indexTo: 'city', + id: record.id + } + return tdClick(params)} >{record.cityname}{record.citynamespan.indexOf('已封存') > -1 ? '(已封存)' : ''} + } + } + if (c.dataIndex == 'result1' && type == 'province') { //点击'城市数量' + c.render = function(text, record) { + let params = { + indexTo: 'city', + id: record.id, + isTabSwitch: true + } + return tdClick(params)} >{record.result1} + } + } + if (c.dataIndex == 'citytwoname' && type == 'city') { //点击'区县简称' + c.render = function(text, record) { + let params = { + indexTo: 'citytwo', + id: record.id + } + return tdClick(params)} >{record.citytwoname}{record.citytwonamespan.indexOf('已封存') > -1 ? '(已封存)' : ''} + } + } + }) + } + + render() { + const { + tableStore + } = this.props; + + return ( + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/area/BriefInfo.js b/pc4backstage/hrmengine/components/area/BriefInfo.js new file mode 100644 index 0000000..0eaaa60 --- /dev/null +++ b/pc4backstage/hrmengine/components/area/BriefInfo.js @@ -0,0 +1,44 @@ +import React from 'react' + +import { + Row, + Col, +} from 'antd' + +export default class BriefInfo extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() {} + + getInfo() { + const { + datas + } = this.props; + + let arr = []; //存放Row + datas.map((data, i) => { + let _arr = []; //存放Col + for (let key in data) { + if (key == 'label') { + _arr[0] = ({data[key]}:); + } + if (key == 'value') { + _arr[1] = ({data[key]}); + } + } + arr.push(
{_arr}
); + }); + + return arr; + } + + render() { + return ( +
+ {this.getInfo()} +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/area/LeftTree.js b/pc4backstage/hrmengine/components/area/LeftTree.js new file mode 100644 index 0000000..6bbb5d5 --- /dev/null +++ b/pc4backstage/hrmengine/components/area/LeftTree.js @@ -0,0 +1,93 @@ +import { + WeaOrgTree +} from 'ecCom' + +import { + i18n +} from '../../public/i18n'; + +export default class LeftTree extends React.Component { + constructor(props) { + super(props); + this.tree = null; + + this.setRef = element => { + this.tree = element; + } + } + + shouldComponentUpdate(nextProps, nextState) { + if (this.props.treeRefresh !== nextProps.treeRefresh || this.props.isOrgTreeShow !== nextProps.isOrgTreeShow) { + return true + } + return false + } + + componentWillReceiveProps(nextProps) { + if (this.props.treeRefresh !== nextProps.treeRefresh || this.props.isOrgTreeShow !== nextProps.isOrgTreeShow) { + if (this.tree) this.tree.reset(() => this.tree.fetchData()); + } + } + + + renderItem(item) { + if (this.hasSpeacialWord(item)) { + let name = item.name, + index = name.indexOf(i18n.label.canceled()); + return
+ {name.slice(0, index)} + {name.slice(index, index+3)} + {name.slice(index+3)} +
+ } else { + return
{item.name}
+ } + } + + hasSpeacialWord(item) { + return item.name && item.name.includes(i18n.label.canceled()) ? true : false; + } + + treeNodeClick(e) { + const { + treeNodeClick + } = this.props; + + let type = e.selectedNodes[0].props.type, + id = e.selectedNodes[0].props.id, + name = e.selectedNodes[0].props.name, + pid = this.getParentId(e.selectedNodes[0].key); + + treeNodeClick(type, id, name, pid); + } + + getParentId(key) { + return key.split('-').slice(-2, -1); + } + + render() { + const { + ltSearchChange, + isDisplayBlock, + orgTreeShValue + } = this.props; + + return ( +
+ ${i18n.label.administrativeDivision()}`} + isLoadAllSub={false} + dataUrl={'/api/hrm/area/getTreeDatas?isDisplayBlock='+isDisplayBlock+'&keywordtwo='+orgTreeShValue} + treeNodeClick={e => this.treeNodeClick(e)} + renderNode={ item => this.renderItem(item)} + onSearchChange={val => ltSearchChange(val)} + /> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/area/NewAndEditDialog.js b/pc4backstage/hrmengine/components/area/NewAndEditDialog.js new file mode 100644 index 0000000..577c7f9 --- /dev/null +++ b/pc4backstage/hrmengine/components/area/NewAndEditDialog.js @@ -0,0 +1,133 @@ +import { + WeaDialog, + WeaFormItem, + WeaNewScroll, + WeaSearchGroup, + WeaMoreButton, +} from 'ecCom' + +import { + Spin, + Button, +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; + +export default class NewAndEditDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 700, + } + } + + + getForm() { + const { + condition, + form, + isFormInit, + } = this.props; + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + arr.push( + {} + ) + }) + }) + return
{arr}
+ } + + getSearchGroupForm() { + const { + condition, + form, + isFormInit, + domkey, + handleLinkage, + isEdit + } = this.props; + + let arr = []; + isFormInit && condition.map((c, i) => { + let _arr = []; + c.items.map((field, index) => { + _arr.push({ + com: ( + + (domkey in e) && handleLinkage(e.locationcity.value) }/> + + ), + colSpan: 1 + }) + }) + arr.push() + }) + + return arr; + } + + render() { + const { + title, + visible, + save, + onCancel, + loading, + isEdit, + height, + conditionLen, + date, + } = this.props, { + width, + } = this.state; + + const buttons = [ + (), + () + ]; + + return ( + onCancel() } + buttons={isEdit?buttons:buttons.slice(1,2)} + style={{width: width, height: height}} + > + { + loading ?
+ +
+ :
1 ? '' : 'hrm-dialog-form'}> + {conditionLen > 1 ? this.getSearchGroupForm() : this.getForm()} +
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/area/OfficeAddress.js b/pc4backstage/hrmengine/components/area/OfficeAddress.js new file mode 100644 index 0000000..f17bd26 --- /dev/null +++ b/pc4backstage/hrmengine/components/area/OfficeAddress.js @@ -0,0 +1,486 @@ +import React from 'react' +import * as mobx from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + Row, + Col, + Spin, + Modal, + Button, + message, +} from 'antd' +import { + WeaSwitch, + WeaTableNew +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; +import '../../style/common.less' + +import NewAndEditDialog from './NewAndEditDialog'; +import Import from '../importRelatedComponet/index'; +import { + HrmImportCommon +} from '../../stores/importCommon'; +const hrmImportCommon = new HrmImportCommon(); + +const toJS = mobx.toJS; +const confirm = Modal.confirm; +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmImportCommon') +@inject('hrmOfficeAddress') +@observer +export default class OfficeAddress extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.label.workingPlace(); + } + } + componentDidMount() { + this.init(); + } + componentWillReceiveProps(nextProps) { + const { + hrmOfficeAddress + } = this.props; + + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + init() { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.mobxDatasReset(); + hrmOfficeAddress.getTableInfo(); + hrmOfficeAddress.getHasRight(); + } + getTopMenuBtns() { + const { + hrmOfficeAddress + } = this.props; + const { + topMenu, + tableStore + } = hrmOfficeAddress; + + let btns = []; + topMenu.map((item, i) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + + }); + + return btns; + } + handleClick(item) { + const { + hrmOfficeAddress + } = this.props; + const { + isPanelShow + } = hrmOfficeAddress; + + isPanelShow && hrmOfficeAddress.setPanelStatus(false); + this[item.menuFun] && this[item.menuFun](); + } + new() { + const { + hrmOfficeAddress + } = this.props; + + hrmOfficeAddress.setNeDialogTitle(i18n.label.newWorkPlace()); + hrmOfficeAddress.setIsNew(true); + hrmOfficeAddress.setVisible(true); + hrmOfficeAddress.getForm(); + } + handleLinkage(id) { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.setCityId(id); + hrmOfficeAddress.getCountryDetail(); + } + handleSave() { + const { + hrmOfficeAddress + } = this.props; + const { + isNew + } = hrmOfficeAddress; + + isNew && hrmOfficeAddress.save(); + !isNew && hrmOfficeAddress.edit(); + } + onCancel() { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.setVisible(false); + hrmOfficeAddress.conditionReset(); + } + import () { + const { + hrmImportCommon, + } = this.props, { + setTempletName, + setImportDialogTitle, + setImportType, + setImportDialogVisible, + setImportPage, + } = hrmImportCommon; + + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.workingPlaceImport()); + setImportType('location'); + setImportDialogVisible(true); + //设置标识,标识当前是那个页面在导入 + setImportPage(this.props.location.pathname.split('/').pop()); + } + batchDelete() { + const { + hrmOfficeAddress + } = this.props; + const { + tableStore + } = hrmOfficeAddress; + + let keys = toJS(tableStore.selectedRowKeys).toString(); + hrmOfficeAddress.setIds(keys); + this.showConfirm('batchDel'); + } + showConfirm(v) { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk(); + }, + onCancel() { + return false; + }, + }); + } + onOk() { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.delete(); + } + getDropMenuDatas() { + const { + hrmOfficeAddress + } = this.props; + const { + rightMenu + } = hrmOfficeAddress; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + return menus; + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3010', + }); + } + + custom = () => { + const { + hrmOfficeAddress + } = this.props, { + tableStore, + } = hrmOfficeAddress; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + handleMenuClick(key) { + const { + hrmOfficeAddress + } = this.props; + const { + isPanelShow + } = hrmOfficeAddress; + + isPanelShow && hrmOfficeAddress.setPanelStatus(false); + this[key] && this[key](); + } + getPanelComponents() { + const { + hrmOfficeAddress + } = this.props; + const { + searchCondition, + form2, + searchConditionLoading + } = hrmOfficeAddress; + + let arr = []; + let formParams = form2.getFormParams(); + const { + isFormInit + } = form2; + + isFormInit && searchCondition.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + if (searchConditionLoading) { + return ( +
+ +
+ ) + } else { + return { + if ( e.keyCode == 13 && e.target.tagName === "INPUT") { + hrmOfficeAddress.getTableInfo(); + hrmOfficeAddress.setPanelStatus(false) + } + }}>{arr} + } + + } + getTabBtn() { + const { + hrmOfficeAddress + } = this.props; + const { + form2 + } = hrmOfficeAddress; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + onSearchChange(val) { + const { + hrmOfficeAddress + } = this.props; + const { + form2 + } = hrmOfficeAddress; + + hrmOfficeAddress.setLocationName(val); + !this.isEmptyObject(form2.getFormParams()) && hrmOfficeAddress.updateFields(val); + } + isEmptyObject(obj) { + for (let key in obj) { + return false; + } + return true; + } + reRenderColumns(columns) { + let _this = this; + columns.forEach((c, index) => { + if (c.dataIndex == 'locationname') { + c.render = function(text, record) { + return _this.doEdit(record.randomFieldId)} >{record.locationname} + } + }; + }) + } + onOperatesClick(record, rowIndex, operate) { + const { + index + } = operate; + + (index == '0') && this.doEdit(record.randomFieldId); + (index == '1') && this.doDel(record.randomFieldId); + (index == '2') && this.deLog(record.randomFieldId); + } + doEdit(id) { + const { + hrmOfficeAddress + } = this.props; + + hrmOfficeAddress.setNeDialogTitle(i18n.label.editWorkPlace()); + hrmOfficeAddress.setLocationId(id); + hrmOfficeAddress.setIsNew(false); + hrmOfficeAddress.setVisible(true); + hrmOfficeAddress.getForm(); + } + doDel(id) { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.setIds(id); + this.showConfirm('del'); + } + deLog(id) { + window.setLogViewProps({ + logSmallType: '3010', + targetId: id, + }); + } + submit() { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.importInfoSubmit(); + } + importHistoryQuery() { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.getImportHistory(); + } + jumpToImportResult(id) { + const { + hrmOfficeAddress + } = this.props; + + hrmOfficeAddress.setPid(id); + hrmOfficeAddress.getImportResult(); + } + queryImportLog() { + const { + hrmOfficeAddress + } = this.props; + + hrmOfficeAddress.getImportLogDetail(); + hrmOfficeAddress.getImportLogSearchCondition(); + } + importLogSearch() { + const { + hrmOfficeAddress + } = this.props; + hrmOfficeAddress.getImportLogDetail(); + } + + render() { + const { + hrmOfficeAddress + } = this.props; + const { + nEdialogTitle, + isPanelShow, + condition, + conditionNum, + form, + tableStore, + visible, + isNew, + dialogLoading, + form1, + form2, + date, + locationName, + isEdit + } = hrmOfficeAddress; + + const { + hrmImportCommon + } = this.props, { + importDialog + } = hrmImportCommon; + + return ( +
+ this.handleMenuClick(key)} + collectParams={{favname:i18n.label.workingPlace(),favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + hrmOfficeAddress.setPanelStatus(bool) } + hideSearchAd={ () => hrmOfficeAddress.setPanelStatus(false) } + searchsAd= {isPanelShow ? this.getPanelComponents() :
} + advanceHeight={ Math.ceil(conditionNum / 2) * 52 + 20} + hasMask={false} + buttonsAd={this.getTabBtn()} + onSearch={() => hrmOfficeAddress.getTableInfo()} + onSearchChange={ val => this.onSearchChange(val)} + /> + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
+
+ this.handleSave()} + handleLinkage={(id) => this.handleLinkage(id)} + onCancel={() => hrmOfficeAddress.setVisible(false)} + /> + {importDialog.visible && } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/area/TabInfo.js b/pc4backstage/hrmengine/components/area/TabInfo.js new file mode 100644 index 0000000..5973128 --- /dev/null +++ b/pc4backstage/hrmengine/components/area/TabInfo.js @@ -0,0 +1,121 @@ +import { + WeaTab, + WeaFormItem, +} from 'ecCom' + +import { + Row, + Col, + Spin, + Button, +} from 'antd'; + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; + +export default class TabInfo extends React.Component { + constructor(props) { + super(props); + this.state = { + conditionNum: 2, //高级搜索中condition的数量,用于设置下拉面板的高度 + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.condition !== nextProps.condition) { + let condition = nextProps.condition; + if (condition.length > 0) this.setState({ + conditionNum: condition[0].items.length + }); + } + } + + //获取高级搜索中的表单元素 + getPanelComponents() { + const { + condition, + form, + loading, + isFormInit + } = this.props; + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + arr.push( +
+
+ + {} + +
+ + ) + }) + }) + + if (loading) { + return ( +
+ +
+ ) + } else { + return ( e.keyCode == 13&& e.target.tagName === "INPUT" ) && this.props.search()}>{arr} + } + + } + + render() { + const { + form, + search, + onSearchChange, + searchsBaseValue, + selectedKey, + setPanelStatus, + isPanelShow, + tabName, + searchType, + setSelectedKey + } = this.props, { + conditionNum + } = this.state; + + const btn = [ + (), + (), + (), + ]; + + return ( +
+ setSelectedKey(key)} + searchType={searchType} + showSearchAd={isPanelShow} + searchsBaseValue={searchsBaseValue} + setShowSearchAd={ bool => setPanelStatus(bool) } + hideSearchAd={ () => setPanelStatus(false) } + searchsAd= {isPanelShow ? this.getPanelComponents() :
} + advanceHeight={ Math.ceil(conditionNum / 2) * 52 + 20} + hasMask={false} + buttonsAd={btn} + onSearch={() => search()} + onSearchChange={ (val) => onSearchChange(val)} + /> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/Header.js b/pc4backstage/hrmengine/components/assImple/Header.js new file mode 100644 index 0000000..70e1be1 --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/Header.js @@ -0,0 +1,103 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmAssImple') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssImple.getButtonsMenu(); + } + + getDropMenuDatas = () => { + const { + hrmAssImple + } = this.props, { + menu + } = hrmAssImple, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmAssImple + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmAssImple, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + custom = () => { + const { + hrmAssImple + } = this.props, { + mainTable, + } = hrmAssImple, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + render() { + const { + hrmAssImple + } = this.props, { + main + } = hrmAssImple, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={[]} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/MainDialog.js b/pc4backstage/hrmengine/components/assImple/MainDialog.js new file mode 100644 index 0000000..f74a0e4 --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/MainDialog.js @@ -0,0 +1,69 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import SubTable from './SubTable'; + +@inject('hrmAssImple') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 800, + height: 450, + } + } + + getButtons = () => { + const btns = () + return btns; + } + + render() { + const { + hrmAssImple + } = this.props, { + closeDialog, + mainDialog, + } = hrmAssImple, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/MainTable.js b/pc4backstage/hrmengine/components/assImple/MainTable.js new file mode 100644 index 0000000..cfdc5fa --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/MainTable.js @@ -0,0 +1,71 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +import { + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmAssImple') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssImple.getTableInfo(); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmAssImple + } = this.props, { + setSelectRowKeys, + openDialog, + } = hrmAssImple, { + randomFieldId + } = record, { + index + } = operate; + + setSelectRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + } + + } + + render() { + const { + hrmAssImple, + } = this.props, { + mainTable, + } = hrmAssImple, { + tableStore + } = mainTable; + + return ( + this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/SubDialog.js b/pc4backstage/hrmengine/components/assImple/SubDialog.js new file mode 100644 index 0000000..be05197 --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/SubDialog.js @@ -0,0 +1,74 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import ThirdTable from './ThirdTable'; + +@inject('hrmAssImple') +@observer +export default class SubDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 800, + height: 450, + } + } + + componentDidMount() { + this.props.hrmAssImple.getTableInfo(); + } + + getButtons = () => { + const btns = () + return btns; + } + + + render() { + const { + hrmAssImple + } = this.props, { + closeDialog, + subDialog, + } = hrmAssImple, { + title, + visible, + } = subDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/SubTable.js b/pc4backstage/hrmengine/components/assImple/SubTable.js new file mode 100644 index 0000000..41dcc8c --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/SubTable.js @@ -0,0 +1,163 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaRightMenu, + WeaPopoverHrm, +} from 'ecCom' +import { + WeaTableNew +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; +import { + jumpToHrmDept, + jumpToHrmPost, +} from '../../public/pulic-func'; +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmAssImple') +@observer +export default class SubTable extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssImple.getTableInfo(); + } + + getDropMenuDatas = () => { + const { + hrmAssImple, + } = this.props, { + menu, + } = hrmAssImple, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + this[key] && this[key](); + } + + custom = () => { + const { + hrmAssImple + } = this.props, { + subTable, + } = hrmAssImple, { + tableStore + } = subTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmAssImple + } = this.props, { + setSelectRowKeys, + openDialog, + } = hrmAssImple, { + randomFieldId + } = record, { + index + } = operate; + + setSelectRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + } + } + + reRenderColumns = (c) => { + const { + hrmAssImple + } = this.props, { + openDialog, + setSelectRowKeys, + } = hrmAssImple; + + c.map(cs => { + if (cs.dataIndex == 'departmentid') { + cs.render = (t, r) => { + return jumpToHrmDept(r.departmentid)}>{r.departmentidspan} + } + } + if (cs.dataIndex == 'jobtitle') { + cs.render = (t, r) => { + return jumpToHrmPost(r.jobtitle)}>{r.jobtitlespan} + } + } + if (cs.dataIndex == 'resourceid') { + cs.render = (t, r) => { + return () + } + } + if (cs.dataIndex == 'aCount') { + cs.render = (t, r) => { + return {setSelectRowKeys(r.randomFieldId);openDialog()}}>{r.aCountspan} + } + } + if (cs.dataIndex == 'bCount') { + cs.render = (t, r) => { + return {setSelectRowKeys(r.randomFieldId);openDialog()}}>{r.bCountspan} + } + } + }) + } + + render() { + const { + hrmAssImple, + } = this.props, { + subTable, + } = hrmAssImple, { + tableStore + } = subTable; + + return ( + this.handleMenuClick(key)} + > + this.reRenderColumns(c)} + onOperatesClick={(record, rowIndex, operate) => this.onOperatesClick(record, rowIndex, operate)} + /> + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/Tab.js b/pc4backstage/hrmengine/components/assImple/Tab.js new file mode 100644 index 0000000..e1c2367 --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/Tab.js @@ -0,0 +1,231 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import MainTable from './MainTable'; + +@inject('hrmAssImple') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssImple.getFormInfo(); + } + + getTab = () => { + const tabs = [{ + key: '0', + title: i18n.label.curAss(), + }, { + key: '1', + title: i18n.label.completedAss(), + }] + + return tabs + } + + getSearchPanelButtons = () => { + const { + hrmAssImple + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmAssImple, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + const { + hrmAssImple + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + mainTab, + } = hrmAssImple, { + isPanelShow + } = mainTab + + getTableInfo(); + isPanelShow && changeSearchPanelStatus(false); + } + + getPanelComponents = () => { + const { + hrmAssImple + } = this.props, { + mainTab, + } = hrmAssImple, { + conditions, + form, + loading + } = mainTab, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + const com = ( + ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()} >{arr} + ) + return com + } + + handleSearchChange = (val) => { + const { + hrmAssImple + } = this.props, { + mainTab, + } = hrmAssImple, { + form + } = mainTab; + + form.updateFields({ + checkInfoName: { + value: val + } + }); + } + + getDropMenuDatas = () => { + const { + hrmAssImple, + } = this.props, { + menu, + mainTable, + } = hrmAssImple, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmAssImple, + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmAssImple, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + custom = () => { + const { + hrmAssImple + } = this.props, { + mainTable, + } = hrmAssImple, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + render() { + const { + hrmAssImple + } = this.props, { + clickTab, + mainTab, + changeSearchPanelStatus + } = hrmAssImple, { + curKey, + isPanelShow, + conditionCount, + form, + } = mainTab; + + return ( + this.handleMenuClick(key)} + collectParams={{favname: i18n.module.assImple(),favouritetype:5}} + > + clickTab(key,'main')} + searchType={['base','advanced']} + showSearchAd={isPanelShow} + hasMask={false} + advanceHeight={Math.ceil(conditionCount / 2)*52+20} + buttonsAd={this.getSearchPanelButtons()} + searchsBaseValue={form.getFormParams().checkInfoName} + setShowSearchAd={ b => changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
} + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/ThirdTable.js b/pc4backstage/hrmengine/components/assImple/ThirdTable.js new file mode 100644 index 0000000..d5cbb3b --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/ThirdTable.js @@ -0,0 +1,92 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaRightMenu, +} from 'ecCom' +import { + WeaTableNew +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmAssImple') +@observer +export default class ThirdTable extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssImple.getTableInfo(); + } + + getDropMenuDatas = () => { + const { + hrmAssImple, + } = this.props, { + menu, + } = hrmAssImple, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + this[key] && this[key](); + } + + custom = () => { + const { + hrmAssImple + } = this.props, { + thirdTable, + } = hrmAssImple, { + tableStore + } = thirdTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + render() { + const { + hrmAssImple, + } = this.props, { + thirdTable, + } = hrmAssImple, { + tableStore + } = thirdTable; + + return ( + this.handleMenuClick(key)}> + + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assImple/index.js b/pc4backstage/hrmengine/components/assImple/index.js new file mode 100644 index 0000000..ac1a7be --- /dev/null +++ b/pc4backstage/hrmengine/components/assImple/index.js @@ -0,0 +1,102 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import '../../style/trainActivity.css' + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; +import SubDialog from './SubDialog'; + +@inject('hrmAssImple') +@observer +export default class AssImple extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.assImple(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmAssImple.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmAssImple + } = this.props, { + getAuth, + refreshPage, + } = hrmAssImple; + + getAuth(); + refreshPage(); + } + + render() { + const { + hrmAssImple + } = this.props, { + main, + } = hrmAssImple, { + authorized, + loading + } = main; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ +
+ + +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assItem/FormInfo.js b/pc4backstage/hrmengine/components/assItem/FormInfo.js new file mode 100644 index 0000000..4aae9fe --- /dev/null +++ b/pc4backstage/hrmengine/components/assItem/FormInfo.js @@ -0,0 +1,119 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmAssItem') +@observer +export default class FormInfo extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssItem.getFormInfo(); + } + + componentWillUnmount() { + this.props.hrmAssItem.refreshFormInfo(); + } + + getForm = () => { + const { + hrmAssItem + } = this.props, { + formInfo, + } = hrmAssItem, { + form, + conditions, + } = formInfo, { + isFormInit, + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push( + this.handleChange(cb)}/> + ) + }) + }) + return
{arr}
+ } + + handleChange = (cb) => {} + + getDropMenuDatas = () => { + const { + hrmAssItem + } = this.props, { + formInfo + } = hrmAssItem, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmAssItem, + } = this.props, { + save, + } = hrmAssItem; + + key == '0' && save(); + } + + render() { + const { + hrmAssItem, + } = this.props, { + formInfo, + } = hrmAssItem, { + date, + loading, + } = formInfo; + + return (
+ {loading ?
+ +
+ : this.handleMenuClick(key)}> +
+ {this.getForm()} +
+
+ } +
) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assItem/Header.js b/pc4backstage/hrmengine/components/assItem/Header.js new file mode 100644 index 0000000..23316f9 --- /dev/null +++ b/pc4backstage/hrmengine/components/assItem/Header.js @@ -0,0 +1,202 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmAssItem') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssItem.getButtonsMenu(); + } + + getTopMenuBtns = () => { + const { + hrmAssItem + } = this.props, { + menu, + mainTable, + } = hrmAssItem, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmAssItem + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmAssItem, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmAssItem + } = this.props, { + menu, + mainTable, + } = hrmAssItem, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmAssItem + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmAssItem, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + new = () => { + const { + hrmAssItem + } = this.props, { + openDialog, + } = hrmAssItem + + openDialog(); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3041', + }); + } + + batchDelete() { + const { + hrmAssItem + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmAssItem; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmAssItem + } = this.props, { + mainTable, + } = hrmAssItem, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmAssItem.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmAssItem.deleteTableInfo(); + } + + render() { + const { + hrmAssItem + } = this.props, { + main + } = hrmAssItem, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assItem/MainDialog.js b/pc4backstage/hrmengine/components/assItem/MainDialog.js new file mode 100644 index 0000000..436e1be --- /dev/null +++ b/pc4backstage/hrmengine/components/assItem/MainDialog.js @@ -0,0 +1,79 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import FormInfo from './FormInfo'; + +@inject('hrmAssItem') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 750, + height: 160, + } + } + + getButtons = () => { + const { + hrmAssItem + } = this.props, { + formInfo, + save + } = hrmAssItem; + + const sv = (); + const mr = (); + const btns = [sv, mr]; + + return btns; + } + + render() { + const { + hrmAssItem + } = this.props, { + closeDialog, + mainDialog, + } = hrmAssItem, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assItem/MainTable.js b/pc4backstage/hrmengine/components/assItem/MainTable.js new file mode 100644 index 0000000..b155725 --- /dev/null +++ b/pc4backstage/hrmengine/components/assItem/MainTable.js @@ -0,0 +1,103 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +import { + Modal, + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmAssItem') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssItem.getTableInfo(); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.delete(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmAssItem.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmAssItem.deleteTableInfo(); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmAssItem + } = this.props, { + setSelectedRowKeys, + openDialog, + } = hrmAssItem, { + randomFieldId + } = record, { + index + } = operate; + + if (index == '0' || index == '1') setSelectedRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + case '1': + this.showConfirm(); + break; + case '2': + window.setLogViewProps({ + logSmallType: '3041', + targetId: randomFieldId, + }); + break; + } + + } + + render() { + const { + hrmAssItem, + } = this.props, { + mainTable, + } = hrmAssItem, { + tableStore + } = mainTable; + + return ( + this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assItem/Tab.js b/pc4backstage/hrmengine/components/assItem/Tab.js new file mode 100644 index 0000000..5968154 --- /dev/null +++ b/pc4backstage/hrmengine/components/assItem/Tab.js @@ -0,0 +1,277 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +import MainTable from './MainTable'; + +@inject('hrmAssItem') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssItem.getFormInfo(); + } + + componentWillUnmount() { + this.props.hrmAssItem.resetSearch(); + } + + + getSearchPanelButtons = () => { + const { + hrmAssItem + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmAssItem, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + const { + hrmAssItem + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + mainTab, + } = hrmAssItem, { + isPanelShow + } = mainTab + + getTableInfo(); + isPanelShow && changeSearchPanelStatus(false); + } + + getPanelComponents = () => { + const { + hrmAssItem + } = this.props, { + mainTab, + } = hrmAssItem, { + conditions, + form, + loading + } = mainTab, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + const com = ( + ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + ) + return com + } + + handleSearchChange = (val) => { + const { + hrmAssItem + } = this.props, { + mainTab, + } = hrmAssItem, { + form + } = mainTab; + + form.updateFields({ + checkItemName: { + value: val + } + }); + } + + getDropMenuDatas = () => { + const { + hrmAssItem, + } = this.props, { + menu, + mainTable, + } = hrmAssItem, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmAssItem, + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmAssItem, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3041', + }); + } + + new = () => { + const { + hrmAssItem + } = this.props, { + openDialog + } = hrmAssItem; + + openDialog(); + } + + batchDelete = () => { + const { + hrmAssItem + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmAssItem; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmAssItem + } = this.props, { + mainTable, + } = hrmAssItem, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmAssItem.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmAssItem.deleteTableInfo(); + } + + render() { + const { + hrmAssItem + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmAssItem, { + isPanelShow, + conditionCount, + form, + } = mainTab; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.assItem(),favouritetype:5}} + > + changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
} + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + {form.isFormInit && } +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assItem/index.js b/pc4backstage/hrmengine/components/assItem/index.js new file mode 100644 index 0000000..b0d8b8f --- /dev/null +++ b/pc4backstage/hrmengine/components/assItem/index.js @@ -0,0 +1,98 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; + +@inject('hrmAssItem') +@observer +export default class AssItem extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.assItem(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmAssItem.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmAssItem + } = this.props, { + getAuth, + refreshPage, + } = hrmAssItem; + + getAuth(); + refreshPage(); + } + + render() { + const { + hrmAssItem + } = this.props, { + main, + } = hrmAssItem, { + authorized, + loading + } = main; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ +
+ +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assType/FormInfo.js b/pc4backstage/hrmengine/components/assType/FormInfo.js new file mode 100644 index 0000000..097b32f --- /dev/null +++ b/pc4backstage/hrmengine/components/assType/FormInfo.js @@ -0,0 +1,112 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmAssType') +@observer +export default class FormInfo extends React.Component { + constructor(props) { + super(props); + } + + getForm = () => { + const { + hrmAssType + } = this.props, { + formInfo, + } = hrmAssType, { + form, + conditions, + } = formInfo, { + isFormInit, + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push( + this.handleChange(cb)}/> + {index == 2 && {i18n.label.day()}} + ) + }) + }) + return
{arr}
+ } + + handleChange = (cb) => {} + + getDropMenuDatas = () => { + const { + hrmAssType + } = this.props, { + formInfo + } = hrmAssType, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmAssType, + } = this.props, { + save, + } = hrmAssType; + + key == '0' && save(); + } + + render() { + const { + hrmAssType, + } = this.props, { + formInfo, + } = hrmAssType, { + date, + loading, + } = formInfo; + + return (
+ {loading ?
+ +
+ : this.handleMenuClick(key)}> +
+ {this.getForm()} +
+
+ } +
) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assType/Group.js b/pc4backstage/hrmengine/components/assType/Group.js new file mode 100644 index 0000000..66a3954 --- /dev/null +++ b/pc4backstage/hrmengine/components/assType/Group.js @@ -0,0 +1,297 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx'; +import { + WeaRightMenu, + WeaSearchGroup, + WeaTableEdit, +} from 'ecCom' +import { + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import FormInfo from './FormInfo'; + +@inject('hrmAssType') +@observer +export default class Group extends React.Component { + constructor(props) { + super(props); + this.assedPostColumns = [{ + title: i18n.label.post(), + dataIndex: 'post', + com: [{ + label: '', + type: 'BROWSER', + editType: '1', + key: 'jobtitleId', + browserConditionParam: { + type: 24, + icon: 'icon-coms-hrm', + iconBgcolor: '#217346', + title: i18n.label.post(), + }, + }], + }]; + this.assItemColumns = [{ + title: i18n.label.assItem(), + dataIndex: 'item', + com: [{ + label: '', + type: 'BROWSER', + editType: '1', + key: 'checkItemId', + browserConditionParam: { + type: 305, + icon: 'icon-coms-hrm', + iconBgcolor: '#217346', + title: i18n.label.assItem(), + }, + }, ], + colSpan: 1, + }, { + title: i18n.label.weight(), + dataIndex: 'weight', + com: [{ + label: '', + type: 'INPUTNUMBER', + editType: '1', + key: 'checkItemProportion', + }, ({'%'})], + colSpan: 1, + }]; + this.assPersonColumns = [{ + title: i18n.label.type(), + dataIndex: 'type', + com: [{ + type: 'CASCADER', + key: 'cascader', + compDef: { + type: 'SELECT', + options: [{ + key: '1', + selected: true, + showname: i18n.label.oneself(), + }, { + key: '2', + selected: false, + showname: i18n.label.directSuperior(), + }, { + key: '3', + selected: false, + showname: i18n.label.allSuperiors(), + }, { + key: '4', + selected: false, + showname: i18n.label.directSubordinates(), + }, { + key: '5', + selected: false, + showname: i18n.label.allLowerLevels(), + }, { + key: '6', + selected: false, + showname: i18n.label.anotherDeptPerson(), + }, { + key: '7', + selected: false, + showname: i18n.label.humanResource(), + }], + parent: { + type: 'div', + style: { + width: 100, + display: 'inline-block', + float: 'left' + } + }, + subChildren: { + '7': { + type: 'BROWSER', + propType: '1', + key: 'resourceId', + icon: 'icon-coms-hrm', + iconBgcolor: '#217346', + title: i18n.label.humanResource(), + }, + } + } + }], + width: '60%', + colSpan: 1, + }, { + title: i18n.label.weight(), + dataIndex: 'weight', + com: [{ + label: '', + type: 'INPUTNUMBER', + editType: '1', + key: 'checkProportion', + }, ({'%'})], + width: '40%', + colSpan: 1, + }]; + } + + componentDidMount() { + this.props.hrmAssType.getFormInfo(); + } + + componentWillUnmount() { + const { + hrmAssType + } = this.props, { + refreshFormInfo, + resetTableEdit + } = hrmAssType; + + refreshFormInfo(); + resetTableEdit(); + } + + getDropMenuDatas = () => { + const { + hrmAssType + } = this.props, { + formInfo + } = hrmAssType, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmAssType, + } = this.props, { + save, + } = hrmAssType; + + key == '0' && save(); + } + + getAssedPostCom = () => { + const { + hrmAssType + } = this.props, { + tableEdit, + setTableEditDatas, + } = hrmAssType, { + postDatas, + } = tableEdit; + + return ( + setTableEditDatas(cb,'post')} + /> + ) + } + + getAssItemCom = () => { + const { + hrmAssType + } = this.props, { + tableEdit, + setTableEditDatas, + } = hrmAssType, { + itemDatas, + } = tableEdit; + + return ( + setTableEditDatas(cb,'item')} + /> + ) + } + + getAssPersonCom = () => { + const { + hrmAssType + } = this.props, { + tableEdit, + setTableEditDatas, + } = hrmAssType, { + personDatas, + } = tableEdit; + + return ( + setTableEditDatas(cb,'person')} + /> + ) + } + + render() { + const { + hrmAssType + } = this.props, { + formInfo + } = hrmAssType, { + loading + } = formInfo; + + return ( +
+ {loading ?
+ +
+ : this.handleMenuClick(key)}> + } + showGroup={true} /> + {/* + + */} +
+
+ {this.getAssedPostCom()} +
+
+ {this.getAssItemCom()} +
+
+ {this.getAssPersonCom()} +
+
+
+ } +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assType/Header.js b/pc4backstage/hrmengine/components/assType/Header.js new file mode 100644 index 0000000..1ac6759 --- /dev/null +++ b/pc4backstage/hrmengine/components/assType/Header.js @@ -0,0 +1,202 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmAssType') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssType.getButtonsMenu(); + } + + getTopMenuBtns = () => { + const { + hrmAssType + } = this.props, { + menu, + mainTable, + } = hrmAssType, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmAssType + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmAssType, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmAssType + } = this.props, { + menu, + mainTable, + } = hrmAssType, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmAssType + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmAssType, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + new = () => { + const { + hrmAssType + } = this.props, { + openDialog, + } = hrmAssType + + openDialog(); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3040', + }); + } + + batchDelete() { + const { + hrmAssType + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmAssType; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmAssType + } = this.props, { + mainTable, + } = hrmAssType, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmAssType.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmAssType.deleteTableInfo(); + } + + render() { + const { + hrmAssType + } = this.props, { + main + } = hrmAssType, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assType/MainDialog.js b/pc4backstage/hrmengine/components/assType/MainDialog.js new file mode 100644 index 0000000..011900c --- /dev/null +++ b/pc4backstage/hrmengine/components/assType/MainDialog.js @@ -0,0 +1,78 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import Group from './Group'; + +@inject('hrmAssType') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 750, + height: 500, + } + } + + getButtons = () => { + const { + hrmAssType + } = this.props, { + formInfo, + save + } = hrmAssType; + + const sv = (); + const mr = (); + const btns = [sv, mr]; + + return btns; + } + + render() { + const { + hrmAssType + } = this.props, { + closeDialog, + mainDialog, + } = hrmAssType, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assType/MainTable.js b/pc4backstage/hrmengine/components/assType/MainTable.js new file mode 100644 index 0000000..97aad12 --- /dev/null +++ b/pc4backstage/hrmengine/components/assType/MainTable.js @@ -0,0 +1,103 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +import { + Modal, + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmAssType') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssType.getTableInfo(); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.delete(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmAssType.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmAssType.deleteTableInfo(); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmAssType + } = this.props, { + setSelectedRowKeys, + openDialog, + } = hrmAssType, { + randomFieldId + } = record, { + index + } = operate; + + if (index == '0' || index == '1') setSelectedRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + case '1': + this.showConfirm(); + break; + case '2': + window.setLogViewProps({ + logSmallType: '3040', + targetId: randomFieldId, + }); + break; + } + + } + + render() { + const { + hrmAssType, + } = this.props, { + mainTable, + } = hrmAssType, { + tableStore + } = mainTable; + + return ( + this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assType/Tab.js b/pc4backstage/hrmengine/components/assType/Tab.js new file mode 100644 index 0000000..6fcb1df --- /dev/null +++ b/pc4backstage/hrmengine/components/assType/Tab.js @@ -0,0 +1,275 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import MainTable from './MainTable'; + +@inject('hrmAssType') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmAssType.getFormInfo(); + } + + componentWillUnmount() { + this.props.hrmAssType.resetSearch(); + } + + + getSearchPanelButtons = () => { + const { + hrmAssType + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmAssType, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + const { + hrmAssType + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + mainTab, + } = hrmAssType, { + isPanelShow + } = mainTab + + getTableInfo(); + isPanelShow && changeSearchPanelStatus(false); + } + + getPanelComponents = () => { + const { + hrmAssType + } = this.props, { + mainTab, + } = hrmAssType, { + conditions, + form, + loading + } = mainTab, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + const com = ( + ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + ) + return com + } + + handleSearchChange = (val) => { + const { + hrmAssType + } = this.props, { + mainTab, + } = hrmAssType, { + form + } = mainTab; + + form.updateFields({ + checkTypeName: { + value: val + } + }); + } + + getDropMenuDatas = () => { + const { + hrmAssType, + } = this.props, { + menu, + mainTable, + } = hrmAssType, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmAssType, + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmAssType, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3040', + }); + } + + new = () => { + const { + hrmAssType + } = this.props, { + openDialog + } = hrmAssType; + + openDialog(); + } + + batchDelete = () => { + const { + hrmAssType + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmAssType; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmAssType + } = this.props, { + mainTable, + } = hrmAssType, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmAssType.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmAssType.deleteTableInfo(); + } + + render() { + const { + hrmAssType + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmAssType, { + isPanelShow, + conditionCount, + form, + } = mainTab; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.assType(),favouritetype:5}} + > + changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
} + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + {form.isFormInit && } +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/assType/index.js b/pc4backstage/hrmengine/components/assType/index.js new file mode 100644 index 0000000..d080fd0 --- /dev/null +++ b/pc4backstage/hrmengine/components/assType/index.js @@ -0,0 +1,98 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; + +@inject('hrmAssType') +@observer +export default class AssType extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.assType(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmAssType.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmAssType + } = this.props, { + getAuth, + refreshPage, + } = hrmAssType; + + getAuth(); + refreshPage(); + } + + render() { + const { + hrmAssType + } = this.props, { + main, + } = hrmAssType, { + authorized, + loading + } = main; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ +
+ +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSetting/Content.js b/pc4backstage/hrmengine/components/attendanceSetting/Content.js new file mode 100644 index 0000000..507ac52 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSetting/Content.js @@ -0,0 +1,162 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaRightMenu, + WeaSearchGroup, +} from 'ecCom' +import { + Spin, + Modal, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +import PageFormInfo from './PageFormInfo'; +import TableEdit from './TableEdit'; + +@inject('hrmAttendanceSetting') +@observer +export default class Content extends React.Component { + constructor(props) { + super(props); + } + + getDropMenuDatas = () => { + const { + hrmAttendanceSetting + } = this.props, { + pageFormInfo + } = hrmAttendanceSetting, { + loading + } = pageFormInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }, { + key: '3', + icon: , + content: i18n.button.log(), + }, { + key: '1', + icon: , + content: i18n.button.collect(), + disabled: true, + }, { + key: '2', + icon: , + content: i18n.button.helper(), + disabled: true, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmAttendanceSetting, + } = this.props, { + save, + } = hrmAttendanceSetting; + + key == '0' && save('main'); + + key == '3' && window.setLogViewProps({ + logSmallType: '20039' + }); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.removeSelected(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk = () => { + const { + hrmAttendanceSetting, + } = this.props, { + deleteTableInfo, + } = hrmAttendanceSetting; + + deleteTableInfo() + } + + getCustomComponent = () => { + const { + hrmAttendanceSetting + } = this.props, { + openDialog, + tableEdit, + } = hrmAttendanceSetting, { + tableStore + } = tableEdit; + + const len = tableStore.selectedRowKeys.length; + + return (
+ openDialog()} + /> + 0 ? {backgroundColor: '#2DB7F5'} : {backgroundColor: '#D9D9D9'}} + onClick={() => (len > 0) && this.showConfirm() } + /> +
) + } + + render() { + const { + hrmAttendanceSetting + } = this.props, { + pageFormInfo + } = hrmAttendanceSetting, { + loading + } = pageFormInfo; + + return ( +
+ {loading ?
+ +
+ : this.handleMenuClick(key)} + collectParams={{favname:i18n.module.attendanceSetting(),favouritetype:5}} + > + } + showGroup={true} + /> + {window.WeaHrm4Formal && } + showGroup={true} + customComponent={this.getCustomComponent()} + />} + + } +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSetting/Header.js b/pc4backstage/hrmengine/components/attendanceSetting/Header.js new file mode 100644 index 0000000..34cf1f8 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSetting/Header.js @@ -0,0 +1,106 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmAttendanceSetting') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + getTopMenuBtns = () => { + const { + hrmAttendanceSetting + } = this.props, { + save, + pageFormInfo + } = hrmAttendanceSetting, { + loading + } = pageFormInfo; + + const btns = [ + () + ] + + return btns + } + + + getDropMenuDatas = () => { + const { + hrmAttendanceSetting + } = this.props, { + pageFormInfo + } = hrmAttendanceSetting, { + loading + } = pageFormInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }, { + key: '3', + icon: , + content: i18n.button.log(), + }, ]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmAttendanceSetting + } = this.props, { + save + } = hrmAttendanceSetting; + + key == '0' && save('main'); + + key == '3' && window.setLogViewProps({ + logSmallType: '20039' + }); + + } + + render() { + const { + hrmAttendanceSetting + } = this.props, { + main + } = hrmAttendanceSetting, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSetting/MainDialog.js b/pc4backstage/hrmengine/components/attendanceSetting/MainDialog.js new file mode 100644 index 0000000..89ddb86 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSetting/MainDialog.js @@ -0,0 +1,76 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import SubFormInfo from './SubFormInfo'; + +@inject('hrmAttendanceSetting') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 700, + height: 245, + } + } + + getButtons = () => { + const { + hrmAttendanceSetting, + } = this.props, { + save, + } = hrmAttendanceSetting; + + let buttons = [ + (), + () + ]; + + return buttons; + } + + render() { + const { + hrmAttendanceSetting, + } = this.props, { + mainDialog, + closeDialog, + } = hrmAttendanceSetting, { + visible, + title, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSetting/PageFormInfo.js b/pc4backstage/hrmengine/components/attendanceSetting/PageFormInfo.js new file mode 100644 index 0000000..584d02e --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSetting/PageFormInfo.js @@ -0,0 +1,89 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx'; +import { + WeaFormItem, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmAttendanceSetting') +@observer +export default class PageFormInfo extends React.Component { + constructor(props) { + super(props); + } + + getForm = () => { + const { + hrmAttendanceSetting + } = this.props, { + pageFormInfo, + } = hrmAttendanceSetting, { + form, + conditions, + } = pageFormInfo, { + isFormInit, + } = form; + + const arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push( + + ) + }) + }) + + arr.push(this.getInstruction()); + + return
{arr}
+ } + + getInstruction = () => { + const { + hrmAttendanceSetting + } = this.props, { + pageFormInfo + } = hrmAttendanceSetting, { + prompts + } = pageFormInfo; + + const arr = [] + toJS(prompts).map((ps, index) => { + arr.push(

{ps}

); + }); + + return ( + + {arr} + + ) + + } + + render() { + return ( +
+ {this.getForm()} +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSetting/SubFormInfo.js b/pc4backstage/hrmengine/components/attendanceSetting/SubFormInfo.js new file mode 100644 index 0000000..ce5938e --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSetting/SubFormInfo.js @@ -0,0 +1,163 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx'; +import { + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Spin +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmAttendanceSetting') +@observer +export default class SubFormInfo extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmAttendanceSetting + } = this.props, { + getSubFormInfo + } = hrmAttendanceSetting; + + getSubFormInfo(); + } + + componentWillUnmount() { + const { + hrmAttendanceSetting + } = this.props, { + refreshSubFormInfo + } = hrmAttendanceSetting; + + refreshSubFormInfo(); + } + + getDropMenuDatas = () => { + const { + hrmAttendanceSetting + } = this.props, { + subFormInfo + } = hrmAttendanceSetting, { + loading + } = subFormInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmAttendanceSetting, + } = this.props, { + save, + } = hrmAttendanceSetting; + + key == '0' && save('sub'); + } + + getForm = () => { + const { + hrmAttendanceSetting + } = this.props, { + subFormInfo, + } = hrmAttendanceSetting, { + form, + conditions, + date, + } = subFormInfo, { + isFormInit, + } = form; + + const { + showseclevel, + showseclevelto + } = form.getFormParams(); + + const arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push( + + ) + }) + }) + + arr.push(this.getInstruction()); + + return
{arr}
+ } + + getInstruction = () => { + const { + hrmAttendanceSetting + } = this.props, { + subFormInfo + } = hrmAttendanceSetting, { + prompts + } = subFormInfo; + + const arr = [] + toJS(prompts).map(ps => { + arr.push(

{ps}

); + }); + + return ( + + {arr} + + ) + + } + + render() { + const { + hrmAttendanceSetting + } = this.props, { + subFormInfo + } = hrmAttendanceSetting, { + loading + } = subFormInfo; + + return (
+ {loading ?
+ +
+ : this.handleMenuClick(key)}> +
+ {this.getForm()} +
+
+ } +
) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSetting/TableEdit.js b/pc4backstage/hrmengine/components/attendanceSetting/TableEdit.js new file mode 100644 index 0000000..c9ce672 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSetting/TableEdit.js @@ -0,0 +1,40 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmAttendanceSetting') +@observer +export default class TableEdit extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + hrmAttendanceSetting + } = this.props, { + tableEdit, + } = hrmAttendanceSetting, { + tableStore + } = tableEdit; + + return ( + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSetting/index.js b/pc4backstage/hrmengine/components/attendanceSetting/index.js new file mode 100644 index 0000000..99765c6 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSetting/index.js @@ -0,0 +1,101 @@ +import React from 'react' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import Header from './Header'; +import Content from './Content'; +import MainDialog from './MainDialog'; + +import '../../style/attendanceSetting.css' + +@inject('hrmAttendanceSetting') +@observer +export default class AttendanceSetting extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.attendanceSetting(); + } + } + + componentWillReceiveProps(nextProps) { + const { + hrmAttendanceSetting + } = this.props, { + refreshPage + } = hrmAttendanceSetting; + + if (this.props.location.key !== nextProps.location.key) { + refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmAttendanceSetting + } = this.props, { + getAuth, + } = hrmAttendanceSetting; + + getAuth(); + } + + render() { + const { + hrmAttendanceSetting + } = this.props, { + main, + } = hrmAttendanceSetting, { + authorized, + loading + } = main; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ +
+ +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSetting.js b/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSetting.js new file mode 100644 index 0000000..5891e6d --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSetting.js @@ -0,0 +1,41 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaSearchGroup, + WeaTableEdit +} from 'ecCom'; +import { + i18n +} from '../../public/i18n'; + +@observer +export default class FieldSetting extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + fieldSettingFormCondition, + tableEditConfig, + refreshTableData, + setEditTable + } = store; + return ( + + setEditTable(editTable, 'fieldDef')}/> + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSettingExplain.js b/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSettingExplain.js new file mode 100644 index 0000000..d92c2b9 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSettingExplain.js @@ -0,0 +1,45 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaSearchGroup, + WeaTableEdit +} from 'ecCom'; +import { + i18n +} from '../../public/i18n'; + +@observer +export default class FieldSettingExplain extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + fieldSettingExplainConditon + } = store; + let items = [], + children = []; + items.push({ + com:
{children}
+ }) + fieldSettingExplainConditon.items.map((item, index) => { + children.push(
{`${item.index}. ${item.value}`}
) + }) + + return ( + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSyncSetting/SyncSetting.js b/pc4backstage/hrmengine/components/attendanceSyncSetting/SyncSetting.js new file mode 100644 index 0000000..79c20f8 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSyncSetting/SyncSetting.js @@ -0,0 +1,84 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaSearchGroup, + WeaFormItem, + WeaCheckbox, + WeaRangePicker, + WeaHelpfulTip, + WeaError +} from 'ecCom'; +import { + Button +} from 'antd'; +import { + i18n +} from '../../public/i18n'; + +@observer +export default class SyncSetting extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + sync, + syncSettingFormCondition, + setValid, + setSyncDate, + setErrorRef + } = store; + let items = [], + children = []; + items.push({ + com:
{children}
+ }) + Object.keys(syncSettingFormCondition).length > 0 && syncSettingFormCondition.items.map((item, index) => { + switch (index) { + case 0: + children.push( + ( + + + + + ) + ); + break; + case 1: + children.push( + ( + +
+ setErrorRef(dom)} tipPosition={'bottom'}> + + +
+ +
+
+
+
+ ) + ); + break; + } + }) + + return ( + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/attendanceSyncSetting/index.js b/pc4backstage/hrmengine/components/attendanceSyncSetting/index.js new file mode 100644 index 0000000..f3f88a2 --- /dev/null +++ b/pc4backstage/hrmengine/components/attendanceSyncSetting/index.js @@ -0,0 +1,99 @@ +import '../../style/attendanceSynSetting.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import {Spin} from 'antd'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu, + WeaSearchGroup, + WeaTableEdit +} from 'ecCom'; +import SyncSetting from './SyncSetting'; +import FieldSetting from './FieldSetting'; +import FieldSettingExplain from './FieldSettingExplain'; +import { + i18n +} from '../../public/i18n'; + +@inject('hrmAttendanceSyncSetting') +@observer +export default class AttendanceSyncSetting extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmAttendanceSyncSetting: store, + hrmImportResource + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('schedulesignimport', null, initData); + } + + render() { + const { + hrmAttendanceSyncSetting: store + } = this.props; + const { + containerInitFinished, + topBtnAndMenu, + searchGroupList, + spinning + // editTableConfig + } = store; + const { + btns, + menus + } = topBtnAndMenu(); + + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + + } + iconBgcolor='#217346' + showDropIcon={true} + buttons={btns} + dropMenuDatas={menus} + > + + + + + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authAdjust/Content.js b/pc4backstage/hrmengine/components/authAdjust/Content.js new file mode 100644 index 0000000..c108329 --- /dev/null +++ b/pc4backstage/hrmengine/components/authAdjust/Content.js @@ -0,0 +1,178 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col, + Spin +} from 'antd'; +import { + WeaSearchGroup, + WeaTableEdit, + WeaDialog, + WeaTree, + WeaProgress, + WeaRightMenu +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import Tabs from '../../coms/Tabs'; +import has from 'lodash/has'; +import Result from './Result'; +import { + i18n +} from '../../public/i18n'; +import findIndex from 'lodash/findIndex'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class Content extends Component { + constructor(props) { + super(props); + this.state = {dh: 0} + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + renderCol = (cols) => { + let idx = findIndex(cols, item => item.dataIndex === 'finish'); + idx != -1 && (cols[idx].render = (text, record) => { + return + }) + } + + isCheckableHandle = object => { + if(has(object, 'canClick')) + return object.canClick; + return true; + } + + render() { + const { + store + } = this.props; + const { + refreshTable, + refreshDialog, + tabConfig, + formTarget, + tableConfig, + dialogParams, + showResult, + resultMessage, + transferInfo, + refreshForm, + loading, + treeProps, + setTreeCheckedKeys, + getTabIndex + } = store; + let title = ''; + switch (transferInfo.authorityTag) { + case 'transfer': + title = i18n.label.transferObject(); + break; + case 'copy': + title = i18n.label.copyObject(); + break; + case 'delete': + title = i18n.label.removeObject(); + break; + } + const searchGroupProps = { + title, + showGroup: true + } + const tableProps = { + rowSelection: { + selections: false + } + } + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: tabConfig.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store, + conditionForm: form, + conditionFormFields: fields, + tabBtnDef: tabConfig.buttons + } + + const scrollProps = { + scroll: { + y: this.state.dh - 140 + } + } + return ( +
+ { + !showResult + && + + + { + tableConfig.datas.length > 0 ? + + : +
+ } +
+
+ } + { + showResult + && +
+ + +
+ } + this.setState({dh: v})}> + + + { + dialogParams.cType === 'table' + ? + + : + dialogParams.errorMsg != null ? +
{i18n.message.dataNone()}
+ : + } +
+
+
+
+ // + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authAdjust/Dashboard.js b/pc4backstage/hrmengine/components/authAdjust/Dashboard.js new file mode 100644 index 0000000..3231b1b --- /dev/null +++ b/pc4backstage/hrmengine/components/authAdjust/Dashboard.js @@ -0,0 +1,96 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col, + Button +} from 'antd'; +import { + WeaSearchGroup +} from 'ecCom'; +import { + i18n +} from '../../public/i18n'; +import FormInfo from '../../coms/FormInfo'; +import FormInfoOld from '../../coms/FormInfo_old'; +import {addContentPath} from '../../util/index.js' + +@observer +export default class Dashboard extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + doExcute, + formTarget, + fromFormItemRender, + toFormItemRender, + refreshForm, + fromCount, + toCount, + showError, + resetData, + showResult, + opImg + } = store; + const { + fromForm, + fromFormFields, + toForm, + toFormFields + } = formTarget; + + const searchGroupProps = { + title: i18n.label.selectObject(), + showGroup: true + } + + return ( + + +
+
+

{fromCount}

+
+
+ +
+
+
+ +
+
+
+

{toCount}

+
+
+ +
+
+
+ { + showResult + ? + + : + + } +
+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authAdjust/Result.js b/pc4backstage/hrmengine/components/authAdjust/Result.js new file mode 100644 index 0000000..a671824 --- /dev/null +++ b/pc4backstage/hrmengine/components/authAdjust/Result.js @@ -0,0 +1,111 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col, + Button +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import isEmpty from 'lodash/isEmpty'; + +@observer +export default class Result extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + resultMessage, + refreshResult + } = store; + + const beginInInfo = i18n.label.authTransferBeginIn(), + finishedInfo = i18n.label.authTransferFinished(), + transferInfo = i18n.label.transferTarget(), + deleteInfo = i18n.label.deleteTarget(), + copyTo = i18n.label.copyTo(), + transferTo = i18n.label.transferTo(), + authTransferTotalCount = i18n.label.authTransferTotalCount(), + authTransferDeleteFinished = i18n.label.authTransferDeleteFinished(), + authTransferCopyFinished = i18n.label.authTransferCopyFinished(), + authTransferTransFinished = i18n.label.authTransferTransFinished(); + + let processInfoStr = '', + transferInfoStr = '', + transferAnalysis = ''; + if (resultMessage.isFinished) { + processInfoStr = finishedInfo.replace('{beginTime}', `${resultMessage.beginTime}`) + .replace('{endTime}', `${resultMessage.endTime}`) + .replace('{processTime}', `${resultMessage.processTime}`); + switch (resultMessage.authorityTag) { + case 'transfer': + transferAnalysis = authTransferTransFinished.replace('{param}', `${resultMessage.succCount || resultMessage.totalCount}`); + break; + case 'copy': + transferAnalysis = authTransferCopyFinished.replace('{param}', `${resultMessage.succCount || resultMessage.totalCount}`); + break; + case 'delete': + transferAnalysis = authTransferDeleteFinished.replace('{param}', `${resultMessage.succCount || resultMessage.totalCount}`); + break; + } + } else { + processInfoStr = beginInInfo.replace('{beginTime}', `${resultMessage.beginTime}`); + transferAnalysis = authTransferTotalCount.replace('{param}', `${resultMessage.succCount || resultMessage.totalCount}`); + } + if (resultMessage.authorityTag != 'delete') { + transferInfoStr = transferInfo.replace('{param}', resultMessage.from) + .replace('{op}', `${resultMessage.authorityTag === 'copy' ? copyTo : transferTo}`); + transferInfoStr = `${transferInfoStr}${resultMessage.to}`; + } else { + transferInfoStr = `${deleteInfo}${resultMessage.from}` + } + + return ( +
+
+
+
+ { + resultMessage.processDataList && resultMessage.processDataList.length > 0 + ? + resultMessage.processDataList.map((item, index) => { + const {title, value, tips} = item; + let itemValue = value; + if(!isEmpty(tips)){ + itemValue = ( + + {value} + ({tips}) + + ) + } + return ( + +
{title}: + {itemValue} + + ) + }) + : + {i18n.message.dataNone()} + } + +
+ + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authAdjust/Timer.js b/pc4backstage/hrmengine/components/authAdjust/Timer.js new file mode 100644 index 0000000..f1b3ad5 --- /dev/null +++ b/pc4backstage/hrmengine/components/authAdjust/Timer.js @@ -0,0 +1,58 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col, + Button +} from 'antd'; +import { + i18n +} from '../../public/i18n'; + +@observer +export default class Timer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + timer, + resetData + } = store; + if (timer === 0) + return (
); + + let countDownLabelStr = i18n.label.countDown(); + const str = countDownLabelStr.replace('{seconds}', `${timer}`) + const alarmCom = ( + + ) + + return ( +
+ { + timer != 0 + && +
+
+ {alarmCom} +
+
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authAdjust/index.js b/pc4backstage/hrmengine/components/authAdjust/index.js new file mode 100644 index 0000000..4066656 --- /dev/null +++ b/pc4backstage/hrmengine/components/authAdjust/index.js @@ -0,0 +1,112 @@ +import '../../style/authAdjust.less'; +import React, { + Component +} from 'react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu +} from 'ecCom'; +import { + Spin +} from 'antd'; +import { + inject, + observer +} from 'mobx-react'; +import Dashboard from './Dashboard'; +import Content from './Content'; +import { + i18n +} from '../../public/i18n'; +import { + indexOf, + has +} from 'lodash'; + +@inject("hrmAuthAdjust") + +@observer +export default class AuthAdjust extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmAuthAdjust: store, + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('permissiontoadjust', null, initData); + } + + render() { + const { + hrmAuthAdjust: store, + hideTop + } = this.props; + const { + containerInitFinished, + getMenu, + showSpin + } = store; + const menus = getMenu(); + const topProps = { + title: i18n.module.authAdjust(), + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + dropMenuDatas: menus + } + + const { + location + } = this.props; + + let comp; + if(hideTop){ + comp = + + + + + + }else{ + comp = + + + + + + + + } + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + comp + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authSearch/Content.js b/pc4backstage/hrmengine/components/authSearch/Content.js new file mode 100644 index 0000000..c6b9101 --- /dev/null +++ b/pc4backstage/hrmengine/components/authSearch/Content.js @@ -0,0 +1,131 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col +} from 'antd'; +import { + WeaSearchGroup, + WeaTableEdit, + WeaDialog, + WeaTree, + WeaProgress +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import Tabs from '../../coms/Tabs'; +import { + i18n +} from '../../public/i18n'; +import findIndex from 'lodash/findIndex'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class Content extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + renderCol = (cols) => { + let idx = findIndex(cols, item => item.dataIndex === 'finish'); + idx != -1 && (cols[idx].render = (text, record) => { + return + }) + } + + onChangeHeight = (h) => { + this.props.store.height = h; + + } + + render() { + const { + store + } = this.props; + const { + refreshTable, + tabConfig, + formTarget, + tableConfig, + dialogParams, + showTable, + getTabIndex, + refreshDialog, + height, + } = store; + const searchGroupProps = { + title: i18n.label.authorizationDetail(), + showGroup: true + } + const tableProps = { + rowSelection: { + selections: false + } + } + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: tabConfig.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store, + conditionForm: form, + conditionFormFields: fields, + tabBtnDef: tabConfig.buttons + } + + const scrollProps = { + scroll: { + y: height - 100 + } + } + + return ( +
+ { + showTable + && + + + + } + + + { + dialogParams.cType === 'table' + ? + this.renderCol(cols)} + {...scrollProps} + /> + : + + } + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authSearch/Dashboard.js b/pc4backstage/hrmengine/components/authSearch/Dashboard.js new file mode 100644 index 0000000..beba5f7 --- /dev/null +++ b/pc4backstage/hrmengine/components/authSearch/Dashboard.js @@ -0,0 +1,52 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col, + Button +} from 'antd'; +import { + WeaSearchGroup +} from 'ecCom'; +import FormInfo from '../../coms/FormInfo'; +import { + i18n +} from '../../public/i18n'; + +@observer +export default class Dashboard extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + refreshForm, + getSearchGroupItem + } = store; + + const searchGroupProps = { + title: i18n.label.selectObject(), + showGroup: true, + items: getSearchGroupItem(), + col: 2 + } + + return ( +
+ +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authSearch/index.js b/pc4backstage/hrmengine/components/authSearch/index.js new file mode 100644 index 0000000..468302a --- /dev/null +++ b/pc4backstage/hrmengine/components/authSearch/index.js @@ -0,0 +1,94 @@ +import '../../style/authSearch.less'; +import React, { + Component +} from 'react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu +} from 'ecCom'; +import { + inject, + observer +} from 'mobx-react'; +import {Spin} from 'antd'; +import Dashboard from './Dashboard'; +import Content from './Content'; +import { + i18n +}from '../../public/i18n'; +import { + indexOf, + has +} from 'lodash'; + +@inject("hrmAuthSearch") + +@observer +export default class AuthSearch extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmAuthSearch: store, + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('permissionsearch', null, initData); + } + + render() { + const { + hrmAuthSearch: store + } = this.props; + const { + containerInitFinished, + getMenu, + spinning + } = store; + let menus = getMenu(); + const topProps = { + title: i18n.module.authSearch(), + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + dropMenuDatas: menus + } + + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + + + + + + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationGroupEditTab.js b/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationGroupEditTab.js new file mode 100644 index 0000000..7bc6b36 --- /dev/null +++ b/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationGroupEditTab.js @@ -0,0 +1,94 @@ +import React, { + Component +} from 'react'; +import { + WeaNewScroll +} from 'ecCom'; +import Tabs from '../../coms/Tabs'; +import FormInfo from '../../coms/FormInfo'; +import AuthorizationList from './AuthorizationList'; +import { + inject, + observer +} from 'mobx-react'; +import { + i18n +} from '../../public/i18n'; + +export default class AuthorizationGroupEditTab extends Component { + constructor(props) { + super(props); + } + + tabChangeHandle = (key) => { + const { + store + } = this.props, { + editGroupTabConfig + } = store; + store.setActiveTab(editGroupTabConfig, key); + } + + render() { + const { + store + } = this.props, { + editGroupTabConfig, + getTabIndex, + btnsAndMenus, + formTarget, + dialogParams, + menuIconCollection, + saveAuthorizationGroup + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(editGroupTabConfig); + const activeTabInfo = { + activeTabKey: editGroupTabConfig.activeTabKey, + activeTabIndex: getTabIndex(editGroupTabConfig.tabs, editGroupTabConfig.activeTabKey) + } + const { + authorizationGroupForm, + authorizationGroupFormFields, + authorizationListConditionForm: conditionForm, + authorizationListConditionFormFields: conditionFormFields + } = formTarget; + + const tabProps = { + tabConfig: editGroupTabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: editGroupTabConfig.activeTabKey, + activeTabIndex: getTabIndex(editGroupTabConfig.tabs, editGroupTabConfig.activeTabKey) + }, + rightMenu: menus, + store: store, + conditionForm: conditionForm, + conditionFormFields: conditionFormFields, + tabBtnDef: tabBtnDef + } + + const formInfoRightMenu = [{ //组织右键菜单 + key: '1', + content: i18n.button.save(), + icon: , + onClick: () => saveAuthorizationGroup(false, false) + }] + + return ( +
+ + + + +
+ ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationList.js b/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationList.js new file mode 100644 index 0000000..c8ce8bd --- /dev/null +++ b/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationList.js @@ -0,0 +1,127 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaNewScroll, + WeaRightMenu, + WeaDialog +} from 'ecCom'; +import { + Form, + Button, + message +} from 'antd'; +import { + WeaTableNew +} from 'comsMobx'; +import classnames from 'classnames'; +import { + findIndex +} from 'lodash'; +import { + showAuthorizationRefs +} from '../../util/pulic-func'; +import RoleEditDialog from '../role/RoleEditDialog'; + +const { + WeaTable +} = WeaTableNew; + +@observer +export default class AuthorizationList extends Component { + constructor(props){ + super(props); + } + + componentDidMount = () => {} + + doShow = (id, record) => { + const { + store + } = this.props; + const { + showRoleEditDialog, + showRefs + } = store; + //TODO + //showAuthorizationRefs(store.opId, 0, id); + + // showRoleEditDialog({ + // roleId: 1782 + // }, '2'); + showRefs(id, record.rightnamespan, this.props.height || $(document).height()); + } + + doDel = (id) => { + const { + store + } = this.props, { + removeGroupAuthorizatioRela, + opId + } = store; + removeGroupAuthorizatioRela({ + id, + groupID: opId + }); + } + + onOperatesClick = (record, index, operate) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + this[func] && this[func](id, record); + } + + renderCol = (cols) => { + let idx = findIndex(cols, item => item.dataIndex === 'rightname'); + idx != -1 && (cols[idx].render = (text, record) => { + return this.doShow(record.id, record)}>{record.rightnamespan} + }) + } + + render() { + const { + store, + rightMenu + } = this.props, { + authorizationListTable: table, + save, + dialogParams, + roleEditDialogParams, + refreshDialog, + roleRefsDialogParams + } = store; + const { + editGroupInfo + } = dialogParams; + const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: editGroupInfo.visible + }); + + let scrollProps = {}; + editGroupInfo.visible && Object.assign(scrollProps, { + scroll: { + y: (this.props.height != null ? (this.props.height - 140) : 510) + } + }) + + return ( +
+ + this.onOperatesClick(record, index, operate)} + getColumns={cols => this.renderCol(cols)} + /> + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authorizationSetting/Group.js b/pc4backstage/hrmengine/components/authorizationSetting/Group.js new file mode 100644 index 0000000..66cce5b --- /dev/null +++ b/pc4backstage/hrmengine/components/authorizationSetting/Group.js @@ -0,0 +1,160 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaNewScroll, + WeaRightMenu, + WeaDialog +} from 'ecCom'; +import { + Form, + Button, + message +} from 'antd'; +import { + WeaTableNew +} from 'comsMobx'; +import classnames from 'classnames'; +import * as mobx from 'mobx'; +import EditorDialog from '../../coms/EditorDialog'; +import AuthorizationGroupEditTab from './AuthorizationGroupEditTab'; +import {findIndex} from 'lodash'; + +const { + WeaTable +} = WeaTableNew; +const toJS = mobx.toJS; + +@observer +export default class Group extends Component { + constructor(props){ + super(props); + this.state = {height: 650} + } + doEdit = (id, dataIndex) => { + const { + store + } = this.props; + const { + initAuthorizationEditDialog + } = store; + initAuthorizationEditDialog({ + id + }, dataIndex); + } + + doDel = (id) => { + const { + store + } = this.props, { + multiRemoveAuthorizationGroup + } = store; + multiRemoveAuthorizationGroup({ + id + }); + } + + onOperatesClick = (record, index, operate) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + func === 'doEdit' && this[func] && this[func](id, 'rightgroupname'); + func === 'doDel' && this[func] && this[func](id); + func === 'doShowDetail' && this['doEdit'] && this['doEdit'](id, 'result'); + } + + renderCol = (cols) => { + const colKey1 = 'rightgroupname', + colKey2 = 'result'; + let idx = findIndex(cols, item => item.dataIndex === colKey1); + idx != -1 && (cols[idx].render = (text, record) => { + return + }) + idx = findIndex(cols, item => item.dataIndex === colKey2); + idx != -1 && (cols[idx].render = (text, record) => { + return + }) + } + + render() { + const { + store, + rightMenu + } = this.props; + //state + const { + refreshEditGroupTabComponent, + dialogParams, + showError + } = store; + //data + const { + editGroupTabConfig, + groupTable: table, + btnsAndMenus, + formTarget, + setDialogVisible, + saveAuthorizationGroup, + reloadGroupCurrentData, + getDialogOpButtons, + editorDialogRightMenu + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(editGroupTabConfig); + const classes = classnames({ + ['tabPane']: true + }); + const { + authorizationGroupForm, + authorizationGroupFormFields + } = formTarget; + + const { + addGroupInfo, + editGroupInfo + } = dialogParams; + + const rMenu = [...rightMenu, ...store.getBasicMenus('HRM_ENGINE_AUTHORIZATION')] + return ( +
+ + this.onOperatesClick(record, index, operate)} + getColumns={cols => this.renderCol(cols)} + /> + + setDialogVisible('addGroupInfo', false)} + opButtons={getDialogOpButtons()} + moreBtn={{datas: editorDialogRightMenu}} + /> + setDialogVisible('editGroupInfo', false, '', reloadGroupCurrentData)} + buttons={getDialogOpButtons()} + moreBtn={{datas: editorDialogRightMenu}} + onChangeHeight={height => this.setState({height})} + > + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authorizationSetting/RoleRefs.js b/pc4backstage/hrmengine/components/authorizationSetting/RoleRefs.js new file mode 100644 index 0000000..1f52a22 --- /dev/null +++ b/pc4backstage/hrmengine/components/authorizationSetting/RoleRefs.js @@ -0,0 +1,240 @@ +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaDialog, + WeaTop, + WeaDialogFooter, + WeaAlertPage +} +from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import classnames from 'classnames'; +import Tabs from '../../coms/Tabs'; +import { + findIndex +} from 'lodash'; +import { + i18n +} from '../../public/i18n'; +const { + WeaTable +} = WeaTableNew; + +@inject('hrmAuthorizationSetting') +@observer +export default class RoleInfoSingle extends Component { + constructor(props) { + super(props); + this.state ={ + isSingle: false, + height: 650 + } + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + this.init(); + } + + init = () => { + const { + hrmAuthorizationSetting: store, + location + } = this.props + const {id, isSingle, tab, height} = location.query; + this.setState({ + isSingle: (isSingle === '1' ? true : false), + height: height || 650 + }) + const { + checkAuthorized, + initRefsData + } = store; + checkAuthorized('systemrightgroup', null, () => initRefsData(id), null, true); + } + + renderCol = (cols, tableName) => { + let idx = findIndex(cols, item => item.dataIndex === 'rolesmark'); + idx != -1 && (cols[idx].render = (text, record) => { + return this.doEditRole(record)}>{record.rolesmark} + }); + idx = findIndex(cols, item => item.dataIndex === 'cnt'); + idx != -1 && (cols[idx].render = (text, record) => { + return this.doEditRoleMember(record)}>{i18n.label.view()} + }) + + } + + onOperatesClick = (record, index, operate, tableName) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + this[func] && this[func](record); + } + + doEditRole = (record, tab) => { + const { + hrmAuthorizationSetting: store + } = this.props; + const { + showRoleInfo + } = store; + showRoleInfo(record.roleid, tab || '1'); + } + + doEditRoleMember = (record) => { + this.doEditRole(record, '4'); + } + + doEditRoleRightLevel = (record) => { + const { + hrmAuthorizationSetting: store + } = this.props; + const { + modifyRefs + } = store; + modifyRefs(record); + } + + doDel = (record) => { + const { + hrmAuthorizationSetting: store + } = this.props; + const { + deleteRefs + } = store; + deleteRefs({id: record.id}); + } + + render() { + const { + hrmAuthorizationSetting: store, + params + } = this.props + const { + containerInitFinished, + refsTabConfig, + refsTable, + formTarget, + btnsAndMenus, + refreshTab, + refsDialogParams, + getDialogOpButtons, + editorDialogRightMenu, + roleInfoDialogParams + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(refsTabConfig); + const { + refsConditionForm: form, + refsConditionFormFields: fields, + } = formTarget; + const tabProps = { + tabConfig: refsTabConfig, + activeTabInfo: { + activeTabKey: '1', + activeTabIndex: 0 + }, + rightMenu: [], + store: store, + conditionForm: form, + conditionFormFields: fields, + tabBtnDef: tabBtnDef + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: this.state.isSingle ? true : false + }); + + const dProps = { + ...refsDialogParams, + buttons: getDialogOpButtons(), + moreBtn: { + datas: editorDialogRightMenu + } + } + + const tableProps = { + scroll: { + y: this.state.isSingle ? (this.state.height - 190) : 0 + } + } + let title = ''; + + const getComp = () => { + if(this.state.isSingle){ + return ( + + this.renderCol(cols, 'member')} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate, 'member')} + /> + + ) + } + return ( + } + iconBgcolor='#217346' + showDropIcon={true} + dropMenuDatas={[]} + > + + this.renderCol(cols, 'member')} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate, 'member')} + /> + + + ) + } + + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + getComp() + } + { + this.state.isSingle && containerInitFinished.init && containerInitFinished.authorized && + + } + + {dProps.coms} + + + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/authorizationSetting/index.js b/pc4backstage/hrmengine/components/authorizationSetting/index.js new file mode 100644 index 0000000..65cc8d4 --- /dev/null +++ b/pc4backstage/hrmengine/components/authorizationSetting/index.js @@ -0,0 +1,123 @@ +import React, { + Component +} from 'react'; +import { + WeaTop, + WeaAlertPage +} from 'ecCom'; +import Tabs from '../../coms/Tabs'; +import Group from './Group'; +import AuthorizationList from './AuthorizationList'; +import { + inject, + observer +} from 'mobx-react'; +import { + i18n +} from '../../public/i18n'; + +@inject("hrmAuthorizationSetting") + +@observer +export default class AuthorizationSetting extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmAuthorizationSetting: store + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('systemrightgroup', null, initData); + } + + tabChangeHandle = (key) => { + const { + hrmAuthorizationSetting: store + } = this.props, { + tabConfig + } = store; + store.setActiveTab(tabConfig, key); + } + + render() { + const { + hrmAuthorizationSetting: store + } = this.props; + //state + const { + containerInitFinished, + refreshMainTabComponent + } = store; + //data + const { + tabConfig, + btnsAndMenus, + formTarget, + getTabIndex + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(tabConfig); + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + rightMenu: menus, + store: store, + conditionForm: form, + conditionFormFields: fields, + } + + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized && + } + iconBgcolor='#217346' + showDropIcon={true} + buttons={btns} + dropMenuDatas={menus} + > + + + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/avatarSetting/AvatarSetting.js b/pc4backstage/hrmengine/components/avatarSetting/AvatarSetting.js new file mode 100644 index 0000000..928fb37 --- /dev/null +++ b/pc4backstage/hrmengine/components/avatarSetting/AvatarSetting.js @@ -0,0 +1,135 @@ +import React, { Component } from 'react' +import {observer,inject} from 'mobx-react' +import {toJS} from 'mobx' +import { WeaSwitch} from 'comsMobx'; +import { WeaSearchGroup, WeaFormItem,WeaTools,WeaDialogFooter,WeaLocaleProvider ,WeaHelpfulTip , WeaNewScroll} from 'ecCom'; +import UploadAvatar from '../../../../pc4public/hrm/uploadAvatar' + +@inject('hrmAvatarSetting') +@observer +export default class AvatarSetting extends Component { + componentDidMount() { + const {hrmAvatarSetting} = this.props; + const {getForm} = hrmAvatarSetting; + getForm(); + } + + // 渲染表单 + getWriteForm = (form, condition) => { + const {hrmAvatarSetting} = this.props; + let {onChange,resetColor,testParams} = hrmAvatarSetting; + condition = toJS(condition); + const { isFormInit } = form; + const formParams = form.getFormParams(); + let group = []; + isFormInit && condition && condition.map((c,index) => { + let items = []; + c.items.map((fields, j) => { + if(fields.domkey[0] == "mfixedimageid"){ + items.push({ + com:( + , + ]} // label 标签的文本 + colon={false} + labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例 + wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例 + error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验 + tipPosition="bottom" // 错误提示的显示位置: top/bottom + > + + ), + colSpan:1, + }) + }else if(fields.domkey[0] == "ffixedimageid"){ + items.push({ + com:( + , + ]} // label 标签的文本 + colon={false} + labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例 + wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例 + error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验 + tipPosition="bottom" // 错误提示的显示位置: top/bottom + > + + ), + colSpan:1, + }) + } + else{ + const fieldKey = fields.domkey[0]; + const value = formParams[fields.domkey[0]]; + const isColorPicker = fields.conditionType == 'COLORPICKER'; + const showReset = isColorPicker ? (value != testParams[fieldKey]) : false; + + items.push({ + com:( + + + { + showReset + && + resetColor(fields.domkey[0])}/> + } + ), + colSpan:1, + }) + } + + + + }); + group.push( + ) + }) + return group; + } + + + + render() { + const {hrmAvatarSetting} = this.props; + const {avatarStyleCondition,avatarSettingForm,getBtns} = hrmAvatarSetting; + const btns = getBtns(); + return ( +
+ + { + this.getWriteForm(avatarSettingForm,avatarStyleCondition) + + } + + { + + } +
+ ) + } +} diff --git a/pc4backstage/hrmengine/components/batchMaintenance/Dashboard.js b/pc4backstage/hrmengine/components/batchMaintenance/Dashboard.js new file mode 100644 index 0000000..0ac4660 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/Dashboard.js @@ -0,0 +1,67 @@ +import React, { + Component +} from 'react'; +import { + Row, + Col +} from 'antd'; +import {WeaRightMenu} from 'ecCom'; +import { + Link +} from 'react-router'; +import {addContentPath} from '../../util/index.js' + +export default class Dashboard extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render(){ + const { + store + } = this.props; + const { + groupDef, + routeProps + } = store; + return ( + +
+ { + groupDef.map(group => { + return ( +
+
+
+ +
{group.label()}
+
+
+ { + group.btns.map((btn, index) => { + return ( +
+
+
{btn.label()}
+
+ {btn.label()} +
+
{btn.tips()}
+
+
+ ) + }) + } +
+ ) + }) + } +
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustDepartment.js b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustDepartment.js new file mode 100644 index 0000000..062a947 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustDepartment.js @@ -0,0 +1,150 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaFormItem, + WeaCheckbox, + WeaNewScroll, + WeaSearchGroup +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; +import classnames from 'classnames'; +import Tabs from '../../../coms/Tabs'; +import { i18n } from '../../../public/i18n'; + +@observer +export default class AdjustDepartment extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + store, + routeProps + } = this.props; + store.loadFormInfo(routeProps.params); + } + + componentWillReceiveProps(nextProps) {} + + tabChangeHandle = (key) => { + const { + store + } = this.props; + store.setActiveTab(key); + } + + renderGroupForm = () => { + const { + store + } = this.props; + const { + formTarget, + onSelectedChangeHandle, + itemRender + } = store; + const { + departmentForm: form, + departmentFormFields: formFields + } = formTarget; + if(form == null) + return [] + let formParams = form.getFormParams(); + let arr = []; + formFields.map((c, i) => { + let _arr = []; + c.items.map((field, index) => { + const showCheckbox = field.checkbox || false; + const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null; + let label = field.label; + if (showCheckbox) + label = {onSelectedChangeHandle && onSelectedChangeHandle(field, v)}}/> + + const itemProps = { + ratio1to2: true, + label, + labelCol: { + span: `${window.HrmEngineLabelCol}` + }, + error: form.getError(field), + tipPosition: 'bottom', + wrapperCol: { + span: `${window.HrmEngineWrapperCol}` + } + } + let coms; + if (customerRender == null) { + coms = ; + } else { + coms = customerRender(field, form, formParams); + } + coms != null && _arr.push({ + com: ( + + {coms} + + ), + col: field.colSpan || 1 + }) + }) + if(_arr.length == 0){ + arr.push( +
{i18n.message.dataNone()}
+
) + }else + arr.push(); + }) + return arr; + } + + render(){ + const { + store + } = this.props; + const { + tabConfig, + getTabIndex, + isSelectedAll, + selectedAllFormFields, + onSelectedChangeHandle, + refreshData, + refreshTab + } = store; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store + } + const className = classnames({ + ['form']: true, + ['tabPane']: true, + ['tabPane-include']: true//store.rootStore == null ? false : store.rootStore.containerInitFinished.detachable + }) + + return ( + +
+
+ selectedAllFormFields('departmentForm', v)}/> +
+
+ store.setScrollRef(ref)}> + {this.renderGroupForm()} + +
+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustLeftContainer.js b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustLeftContainer.js new file mode 100644 index 0000000..fd23da3 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustLeftContainer.js @@ -0,0 +1,52 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import OrganizationTree from '../../../coms/OrganizationTree'; +import Tabs from '../../../coms/Tabs'; +import { + cloneDeep +} from 'lodash'; + +@observer +export default class AdjustLeftContainer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render(){ + const { + store, + routeProps + } = this.props; + + let orgTreeProps = cloneDeep(store.toJS(store.orgTreeProps)); + orgTreeProps.isMult = true; + + switch (routeProps.params) { + case 'subCompany': + break; + case 'department': + orgTreeProps.isLoadSubDepartment = true; + break; + case 'resource': + orgTreeProps.isLoadUser = true; + break; + } + + return ( +
+ store.setTreeRef(dom)}/> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustResource.js b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustResource.js new file mode 100644 index 0000000..6538a02 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustResource.js @@ -0,0 +1,150 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaFormItem, + WeaCheckbox, + WeaNewScroll, + WeaSearchGroup +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; +import classnames from 'classnames'; +import Tabs from '../../../coms/Tabs'; +import { i18n } from '../../../public/i18n'; + +@observer +export default class AdjustResource extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + store, + routeProps + } = this.props; + store.loadFormInfo(routeProps.params); + } + + componentWillReceiveProps(nextProps) {} + + tabChangeHandle = (key) => { + const { + store + } = this.props; + store.setActiveTab(key); + } + + renderGroupForm = () => { + const { + store + } = this.props; + const { + formTarget, + onSelectedChangeHandle, + itemRender + } = store; + const { + resourceForm: form, + resourceFormFields: formFields + } = formTarget; + if(form == null) + return [] + let formParams = form.getFormParams(); + let arr = []; + formFields.map((c, i) => { + let _arr = []; + c.items.map((field, index) => { + const showCheckbox = field.checkbox || false; + const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null; + let label = field.label; + if (showCheckbox) + label = {onSelectedChangeHandle && onSelectedChangeHandle(field, v)}}/> + + const itemProps = { + ratio1to2: true, + label, + labelCol: { + span: `${window.HrmEngineLabelCol}` + }, + error: form.getError(field), + tipPosition: 'bottom', + wrapperCol: { + span: `${window.HrmEngineWrapperCol}` + } + } + let coms; + if (customerRender == null) { + coms = ; + } else { + coms = customerRender(field, form, formParams); + } + coms != null && _arr.push({ + com: ( + + {coms} + + ), + col: field.colSpan || 1 + }) + }) + if(_arr.length == 0){ + arr.push( +
{i18n.message.dataNone()}
+
) + }else + arr.push(); + }) + return arr; + } + + render(){ + const { + store + } = this.props; + const { + tabConfig, + getTabIndex, + isSelectedAll, + selectedAllFormFields, + onSelectedChangeHandle, + refreshData, + refreshTab + } = store; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store + } + const className = classnames({ + ['form']: true, + ['tabPane']: true, + ['tabPane-include']: true//store.rootStore == null ? false : store.rootStore.containerInitFinished.detachable + }) + + return ( + +
+
+ selectedAllFormFields('resourceForm', v)}/> +
+
+ store.setScrollRef(ref)}> + {this.renderGroupForm()} + +
+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustRightContainer.js b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustRightContainer.js new file mode 100644 index 0000000..813b811 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustRightContainer.js @@ -0,0 +1,53 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu +} from 'ecCom'; +import AdjustSubCompany from './AdjustSubCompany'; +import AdjustDepartment from './AdjustDepartment'; +import AdjustResource from './AdjustResource'; + +@observer +export default class AdjustLeftContainer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render(){ + const { + store, + routeProps + } = this.props; + const menus = store.menus; + + let com = ''; + // com = + switch (routeProps.params) { + case 'subCompany': + com = + break; + case 'department': + com = + break; + case 'resource': + com = + break; + } + + return ( +
+ + {com} + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustSubCompany.js b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustSubCompany.js new file mode 100644 index 0000000..e6a99cb --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustSubCompany.js @@ -0,0 +1,150 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaFormItem, + WeaCheckbox, + WeaNewScroll, + WeaSearchGroup +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; +import classnames from 'classnames'; +import Tabs from '../../../coms/Tabs'; +import { i18n } from '../../../public/i18n'; + +@observer +export default class AdjustSubCompany extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + store, + routeProps + } = this.props; + store.loadFormInfo(routeProps.params); + } + + componentWillReceiveProps(nextProps) {} + + tabChangeHandle = (key) => { + const { + store + } = this.props; + store.setActiveTab(key); + } + + renderGroupForm = () => { + const { + store + } = this.props; + const { + formTarget, + onSelectedChangeHandle, + itemRender + } = store; + const { + subCompanyForm: form, + subCompanyFormFields: formFields + } = formTarget; + if(form == null) + return [] + let formParams = form.getFormParams(); + let arr = []; + formFields.map((c, i) => { + let _arr = []; + c.items.map((field, index) => { + const showCheckbox = field.checkbox || false; + const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null; + let label = field.label; + if (showCheckbox) + label = {onSelectedChangeHandle && onSelectedChangeHandle(field, v)}}/> + + const itemProps = { + ratio1to2: true, + label, + labelCol: { + span: `${window.HrmEngineLabelCol}` + }, + error: form.getError(field), + tipPosition: 'bottom', + wrapperCol: { + span: `${window.HrmEngineWrapperCol}` + } + } + let coms; + if (customerRender == null) { + coms = ; + } else { + coms = customerRender(field, form, formParams); + } + coms != null && _arr.push({ + com: ( + + {coms} + + ), + col: field.colSpan || 1 + }) + }) + if(_arr.length == 0){ + arr.push( +
{i18n.message.dataNone()}
+
) + }else + arr.push(); + }) + return arr; + } + + render(){ + const { + store + } = this.props; + const { + tabConfig, + getTabIndex, + isSelectedAll, + selectedAllFormFields, + onSelectedChangeHandle, + refreshData, + refreshTab + } = store; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store + } + const className = classnames({ + ['form']: true, + ['tabPane']: true, + ['tabPane-include']: true//store.rootStore == null ? false : store.rootStore.containerInitFinished.detachable + }) + + return ( + +
+
+ selectedAllFormFields('subCompanyForm', v)}/> +
+
+ store.setScrollRef(ref)}> + {this.renderGroupForm()} + +
+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/adjust/CheckContent.js b/pc4backstage/hrmengine/components/batchMaintenance/adjust/CheckContent.js new file mode 100644 index 0000000..befe1a6 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/adjust/CheckContent.js @@ -0,0 +1,58 @@ +import React, { + Component +} from 'react'; +import { + WeaFormItem, + WeaNewScroll, + WeaLocaleProvider +} from 'ecCom'; +import {Row, Col} from 'antd'; +import { i18n } from '../../../public/i18n'; +import '../../../style/checkContent.less'; +import map from 'lodash/map'; + +export default class CheckContent extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + $('.ant-confirm-content').css('padding', '0px'); + } + + componentWillReceiveProps(nextProps) {} + + render(){ + const {orgTreeSelectedDatas, selectedFields, type} = this.props; + let rs = i18n.label.adjustResult().replace('{param1}', `${orgTreeSelectedDatas.count}`); + rs = rs.replace('{param2}', i18n.label[type]()); + rs = rs.replace('{param3}', `${selectedFields.length}`); + return ( + +
+ {i18n.confirm.checkAdjust()} + {i18n.label.adjustTarget()} + + {i18n.label.adjustObject()} + { + selectedFields.map((item, index) => { + const v = WeaLocaleProvider.formatMultiLang(item.value); + + return ( + + +
+
+
+ ) + }) + } + +
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/adjust/index.js b/pc4backstage/hrmengine/components/batchMaintenance/adjust/index.js new file mode 100644 index 0000000..ef5fbd1 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/adjust/index.js @@ -0,0 +1,52 @@ +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaLeftRightLayout +} from 'ecCom'; +import LeftContainer from './AdjustLeftContainer'; +import RightContainer from './AdjustRightContainer'; +import { + i18n +} from '../../../public/i18n'; + +@inject('hrmBatchAdjust') +@observer +export default class Adjust extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmBatchAdjust, + rootStore, + router + } = this.props; + rootStore && hrmBatchAdjust.setRootStore(rootStore, router); + } + + componentWillReceiveProps(nextProps) {} + + render(){ + const comProps = { + store: this.props.hrmBatchAdjust, + routeProps: this.props.routeProps + } + const { + rootStore + } = this.props; + + return ( +
+ )}> + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditDepartment.js b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditDepartment.js new file mode 100644 index 0000000..97b61ff --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditDepartment.js @@ -0,0 +1,84 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaTableNew +} from 'comsMobx'; +import Tabs from '../../../coms/Tabs'; +import classnames from 'classnames'; +import filter from 'lodash/filter'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class EditDepartment extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + store, + routeProps + } = this.props; + store.init(routeProps.params); + } + + componentWillReceiveProps(nextProps) {} + + render(){ + const { + store + } = this.props; + const { + tabConfig, + getTabIndex, + formTarget, + table, + renderCol + } = store; + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store, + conditionForm: form, + conditionFormFields: fields, + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-include']: true + }); + const tableProps = { + scroll: { + x: filter(table.columns, {display: 'true'}).length * 120, + y: $('.tabPane-include').height() - 140 + } + } + + return ( + +
+ renderCol(cols)} + {...tableProps} + /> +
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditLeftContainer.js b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditLeftContainer.js new file mode 100644 index 0000000..f0a8862 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditLeftContainer.js @@ -0,0 +1,48 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import OrganizationTree from '../../../coms/OrganizationTree'; +import Tabs from '../../../coms/Tabs'; +import { + cloneDeep +} from 'lodash'; + +@observer +export default class EditLeftContainer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render(){ + const { + store, + routeProps + } = this.props; + + let orgTreeProps = cloneDeep(store.orgTreeProps); + + switch (routeProps.params) { + case 'subCompany': + break; + case 'department': + orgTreeProps.isLoadSubDepartment = true; + break; + case 'resource': + orgTreeProps.isLoadSubDepartment = true; + break; + } + + return ( +
+ store.setTreeRef(dom)}/> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditResource.js b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditResource.js new file mode 100644 index 0000000..8c3ebd9 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditResource.js @@ -0,0 +1,84 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaTableNew +} from 'comsMobx'; +import Tabs from '../../../coms/Tabs'; +import classnames from 'classnames'; +import filter from 'lodash/filter'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class EditResource extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + store, + routeProps + } = this.props; + store.init(routeProps.params); + } + + componentWillReceiveProps(nextProps) {} + + render(){ + const { + store + } = this.props; + const { + tabConfig, + getTabIndex, + formTarget, + table, + renderCol + } = store; + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store, + conditionForm: form, + conditionFormFields: fields, + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-include']: true + }); + const tableProps = { + scroll: { + x: filter(table.columns, {display: 'true'}).length * 120, + y: $('.tabPane-include').height() - 140 + } + } + + return ( + +
+ renderCol(cols)} + {...tableProps} + /> +
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditRightContainer.js b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditRightContainer.js new file mode 100644 index 0000000..0ed94dc --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditRightContainer.js @@ -0,0 +1,139 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu, + WeaDialog, + WeaSearchGroup, + WeaFormItem +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; +import {Button,Modal} from 'antd'; +import EditSubCompany from './EditSubCompany'; +import EditDepartment from './EditDepartment'; +import EditResource from './EditResource'; +import { i18n } from '../../../public/i18n'; +import {addContentPath} from '../../../util/index.js' + +@observer +export default class EditRightContainer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + getForm = () => { + const { + store + } = this.props; + const {formTarget, verificationCode, refreshVerificationCode} = store; + const {form, formFields} = formTarget; + if(form == null) + return []; + let formParams = form.getFormParams(); + let arr = []; + formFields.map((c, i) => { + let _arr = []; + c.items.map((field, index) => { + if(field.domkey[0] != 'belongto' || (field.domkey[0] === 'belongto' && formParams.accounttype == '1')){ + window.e9HideFormFieldKeys = []; + const itemProps = { + ratio1to2: true, + label: field.label, + labelCol: { + span: `${window.HrmEngineLabelCol}` + }, + error: form.getError(field), + tipPosition: 'bottom', + wrapperCol: { + span: `${window.HrmEngineWrapperCol}` + } + } + if(field.domkey[0] != 'validatecode'){ + _arr.push({ + com: ( + + + + ), + col: 1 + }) + }else{ + _arr.push({ + com: ( + +
+
+ +
+ +
+
+ ), + col: 1 + }) + } + }else{ + window.e9HideFormFieldKeys = ['belongto']; + } + }) + arr.push(); + }) + return arr; + } + + render(){ + const { + store, + routeProps + } = this.props; + const {refreshMenu, multFiOp, dialogParams, saveForm, showError,modalVisible,changeModalState} = store; + const menus = store.rootStore == null ? [] : store.rootStore.topMenuDef().edit[store.rootStore.routeProps.params].menus; + + let com = ''; + switch (routeProps.params) { + case 'subCompany': + com = + break; + case 'department': + com = + break; + case 'resource': + com = + break; + } + + return ( +
+ + {com} + + {i18n.button.save()}]} + moreBtn={{datas: [{key: '1', content: i18n.button.save(), icon: , onClick: saveForm}]}} + > + {this.getForm()} + + changeModalState(false)} + style={{width:380,height:100}} + buttons={[]} + > +

该密码比较容易被猜到,为了您的系统安全,请重新修改密码。

+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditSubCompany.js b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditSubCompany.js new file mode 100644 index 0000000..f5d4d6e --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/edit/EditSubCompany.js @@ -0,0 +1,84 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaTableNew +} from 'comsMobx'; +import Tabs from '../../../coms/Tabs'; +import classnames from 'classnames'; +import filter from 'lodash/filter'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class EditSbuCompany extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + store, + routeProps + } = this.props; + store.init(routeProps.params); + } + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + tabConfig, + getTabIndex, + formTarget, + table, + renderCol + } = store; + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store, + conditionForm: form, + conditionFormFields: fields, + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-include']: true + }); + const tableProps = { + scroll: { + x: filter(table.columns, {display: 'true'}).length * 120, + y: $('.tabPane-include').height() - 140 + } + } + + return ( + +
+ renderCol(cols)} + {...tableProps} + /> +
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/edit/NeedRender.js b/pc4backstage/hrmengine/components/batchMaintenance/edit/NeedRender.js new file mode 100644 index 0000000..685dbde --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/edit/NeedRender.js @@ -0,0 +1,29 @@ +import React, { Component } from 'react' + +export default class NeedRender extends Component { + + constructor (props) { + super(props) + } + + shouldComponentUpdate(nextProps, nextState){ + if(this.props.data instanceof Array){ + if(this.props.data.length == nextProps.data.length){ + return false; + } + } + else if(this.props.data == nextProps.data){ + return false; + } + return true; + } + render() { + const {children} = this.props; + return ( +
+ {children} +
+ ) + } +} + diff --git a/pc4backstage/hrmengine/components/batchMaintenance/edit/index.js b/pc4backstage/hrmengine/components/batchMaintenance/edit/index.js new file mode 100644 index 0000000..ca0fb59 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/edit/index.js @@ -0,0 +1,52 @@ +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaLeftRightLayout +} from 'ecCom'; +import LeftContainer from './EditLeftContainer'; +import RightContainer from './EditRightContainer'; +import { + i18n +} from '../../../public/i18n'; + +@inject('hrmBatchEdit') +@observer +export default class Edit extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmBatchEdit, + rootStore, + router + } = this.props; + rootStore && hrmBatchEdit.setRootStore(rootStore, router); + } + + componentWillReceiveProps(nextProps) {} + + render() { + const comProps = { + store: this.props.hrmBatchEdit, + routeProps: this.props.routeProps + } + const { + rootStore + } = this.props; + + return ( +
+ )}> + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/index.js b/pc4backstage/hrmengine/components/batchMaintenance/index.js new file mode 100644 index 0000000..ad6e224 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/index.js @@ -0,0 +1,180 @@ +import '../../style/batchMaintenance.less'; +import React, { + Component +} from 'react'; +import { + WeaTop, + WeaAlertPage +} from 'ecCom'; +import { + inject, + observer +} from 'mobx-react'; +import {Spin} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import Dashboard from './Dashboard'; +import { + indexOf, + has +} from 'lodash'; + +@inject("hrmBatchMaintenance") + +@observer +export default class BatchMaintenance extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(this.setLocationInfo(this.props.location, this.props.params)); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(this.setLocationInfo(nextProps.location, nextProps.params)); + } + } + + setLocationInfo = (location, params) => { + const { + hrmBatchMaintenance: store, + } = this.props; + const { + onRouteChange + } = store; + const { + pathname + } = location; + + const getPath = () => { + const arr = pathname.split('/'); + if(arr.indexOf('adjust') >= 0) + return 'adjust'; + else if(arr.indexOf('edit') >= 0) + return 'edit'; + else if(arr.indexOf('uploadPhoto') >= 0) + return 'uploadPhoto'; + else + return 'batchMaintenance'; + } + + const routeObject = { + location: getPath(), + params: has(params, 'type') ? params.type : '' + } + onRouteChange(routeObject); + return routeObject; + } + + init = (routeObject) => { + const { + hrmBatchMaintenance: store, + } = this.props; + const { + checkAuthorized, + initData + } = store; + let authKey = ''; + switch(routeObject.location){ + case 'batchMaintenance': + authKey = 'batchMaintenance'; + break; + case 'adjust': + authKey = 'batchMaintenanceAdjust'; + break; + case 'edit': + authKey = 'batchMaintenanceAdjustEdit'; + break; + case 'uploadPhoto': + authKey = 'batchResourcePhoto'; + break; + } + checkAuthorized(authKey, null, initData, null, true); + } + + render() { + const { + hrmBatchMaintenance: store + } = this.props; + const { + containerInitFinished, + groupDef, + topMenuDef, + routeProps, + routeChanged, + translateLocation, + spinning + } = store; + let topButtons = {} + const topProps = { + icon: , + iconBgcolor: '#217346', + showDropIcon: true + } + if (routeProps.location != null) { + topButtons = topMenuDef()[routeProps.location]; + routeProps.location === 'batchMaintenance' && Object.assign(topProps, { + dropMenuDatas: [] + }) + routeProps.location === 'adjust' && has(topButtons, 'buttons') && Object.assign(topProps, { + buttons: topButtons.buttons, + dropMenuDatas: topButtons.menus + }) + routeProps.location === 'edit' && has(topButtons, routeProps.params) && Object.assign(topProps, { + buttons: topButtons[routeProps.params].buttons, + dropMenuDatas: topButtons[routeProps.params].menus + }) + routeProps.location === 'uploadPhoto' && Object.assign(topProps, { + buttons: topButtons.buttons, + dropMenuDatas: topButtons.menus + }) + } + if (indexOf(['batchMaintenance', 'dashboard'], routeProps.location) >= 0) { + Object.assign(topProps, { + title: i18n.module.batchMaintenance() + }) + } else { + Object.assign(topProps, { + breadcrumb: [{ + name: i18n.module.batchMaintenance(), + onClick: () => { + this.props.router.push('hrmengine/batchMaintenance') + } + }, { + name: translateLocation() + }] + }) + } + + return ( +
+ + { + containerInitFinished.init && containerInitFinished.authorized && + + { + this.props.children && React.cloneElement(this.props.children, { + routeProps, + rootStore: store, + route: this.props.router + }) + } + { + this.props.children == null && + } + + } + + { + containerInitFinished.init && !containerInitFinished.authorized && + +
{i18n.message.authFailed()}
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/upload/LeftContainer.js b/pc4backstage/hrmengine/components/batchMaintenance/upload/LeftContainer.js new file mode 100644 index 0000000..0632644 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/upload/LeftContainer.js @@ -0,0 +1,37 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import OrganizationTree from '../../../coms/OrganizationTree'; +import Tabs from '../../../coms/Tabs'; +import { + cloneDeep +} from 'lodash'; + +@observer +export default class LeftContainer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store, + routeProps + } = this.props; + + let orgTreeProps = cloneDeep(store.orgTreeProps); + + return ( +
+ store.setTreeRef(dom)}/> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/upload/RightContainer.js b/pc4backstage/hrmengine/components/batchMaintenance/upload/RightContainer.js new file mode 100644 index 0000000..30debc2 --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/upload/RightContainer.js @@ -0,0 +1,143 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaRightMenu, + WeaDialog, + WeaUpload +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import { + WeaSwitch +} from 'comsMobx'; +import Tabs from '../../../coms/Tabs'; +import classnames from 'classnames'; +import {Button} from 'antd'; +import { i18n } from '../../../public/i18n'; +import findIndex from 'lodash/findIndex'; +import {addContentPath} from '../../../util/index.js' +const { + WeaTable +} = WeaTableNew; + +@observer +export default class EditRightContainer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + changePhoto = (id) => { + if(this.refs.uploadComp != null){ + const containerId = this.refs.uploadComp.uploader.settings.browse_button[0].id; + $(`#${containerId}`)[0].click(); + this.props.store.setTargetId(id); + } + } + + delPhoto = (id) => { + this.props.store.multiDelete({id}); + } + + onOperatesClick = (record, index, operate) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + this[func] && this[func](id); + } + + renderCol = (cols) => { + let idx = findIndex(cols, item => item.dataIndex === 'resourceimageid'); + idx != -1 && (cols[idx].render = (text, record) => { + if(record.resourceimageid != '' && record.resourceimageid != '0') + return {i18n.label.view()}; + else + return
{i18n.label.noPhoto()}
+ }); + idx = findIndex(cols, item => item.dataIndex === 'lastname'); + idx != -1 && (cols[idx].render = (text, record) => { + return window.pointerXY(e)} title={record.lastnamespan} >{record.lastnamespan} + }) + } + + render() { + const { + store, + routeProps + } = this.props; + + const {refreshMenu, multFiOp, dialogParams, saveForm, showError, onUploadChange, onUploading} = store; + const menus = store.rootStore == null ? [] : store.rootStore.topMenuDef().uploadPhoto.menus; + + const { + tabConfig, + getTabIndex, + formTarget, + table, + } = store; + const { + conditionForm: form, + conditionFormFields: fields + } = formTarget; + const tabProps = { + tabConfig: tabConfig, + tabChangeHandle: this.tabChangeHandle, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) + }, + store: store, + conditionForm: form, + conditionFormFields: fields, + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-include']: true + }); + + return ( +
+ + +
+ this.renderCol(cols)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
+
+
+ {i18n.button.save()}]} + moreBtn={{datas: [{key: '1', content: i18n.button.save(), icon: , onClick: saveForm}]}} + > + +
+ +
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/upload/UploadForm.js b/pc4backstage/hrmengine/components/batchMaintenance/upload/UploadForm.js new file mode 100644 index 0000000..c739f6c --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/upload/UploadForm.js @@ -0,0 +1,29 @@ +import React, { + Component +} from 'react'; +import { + WeaRightMenu, + WeaDialog, + WeaUpload +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; +import {Button} from 'antd'; +import { i18n } from '../../../public/i18n'; + +export default class UploadForm extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + return ( +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/batchMaintenance/upload/index.js b/pc4backstage/hrmengine/components/batchMaintenance/upload/index.js new file mode 100644 index 0000000..174606a --- /dev/null +++ b/pc4backstage/hrmengine/components/batchMaintenance/upload/index.js @@ -0,0 +1,68 @@ +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import {WeaLeftRightLayout} from 'ecCom'; +import LeftContainer from './LeftContainer'; +import RightContainer from './RightContainer'; +import { + i18n +} from '../../../public/i18n'; +import ImportResource from '../../importresource/Import'; + +@inject('hrmBatchUploadPhoto') +@inject('hrmImportResource') +@observer +export default class UploadPhoto extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmBatchUploadPhoto, + hrmImportResource, + rootStore, + router + } = this.props; + rootStore && hrmBatchUploadPhoto.setRootStore(rootStore, router); + hrmBatchUploadPhoto.setImportResource(hrmImportResource); + } + + componentWillReceiveProps(nextProps) {} + + onClick = () => { + if(this.refs.uploadComp != null){ + const containerId = this.refs.uploadComp.uploader.settings.browse_button[0].id; + $(`#${containerId}`)[0].click() + } + } + + render() { + const comProps = { + store: this.props.hrmBatchUploadPhoto, + routeProps: this.props.routeProps + } + const { + rootStore + } = this.props; + const importProps = { + mainTitle: i18n.label.batchUpload(), + importLog: i18n.label.historyUploadRecord(), + viewLog: i18n.label.viewUploadLogs(), + viewLogTitle: i18n.label.uploadLogs(), + } + + return ( +
+ )}> + + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/birthEditor/apis/index.js b/pc4backstage/hrmengine/components/birthEditor/apis/index.js new file mode 100644 index 0000000..d521d79 --- /dev/null +++ b/pc4backstage/hrmengine/components/birthEditor/apis/index.js @@ -0,0 +1,30 @@ +import { WeaTools } from 'ecCom'; + +export const deletePicResource = (params) => { + return WeaTools.callApi('/api/hrm/birthday/deletePicResource', 'POST', params); +} + +export const savePicResource = (params) => { + return WeaTools.callApi('/api/hrm/birthday/savePicResource', 'POST', params); +} + +export const getStaffRemindSettingPc = (params) => { + return WeaTools.callApi('/api/hrm/birthday/pc/getStaffRemindSetting', 'GET', params); +} + +export const getStaffRemindSettingMobile = (params) => { + return WeaTools.callApi('/api/hrm/birthday/mobile/getStaffRemindSetting', 'GET', params); +} + +export const savePcStaffRemindSetting = (params) => { + return WeaTools.callApi('/api/hrm/birthday/pc/saveStaffRemindSetting', 'POST', params); +} + +export const saveMobileStaffRemindSetting = (params) => { + return WeaTools.callApi('/api/hrm/birthday/mobile/saveStaffRemindSetting', 'POST', params); +} + +export const resetSetting = (params) => { + return WeaTools.callApi('/api/hrm/birthday/resetSetting', 'POST', params); +} + diff --git a/pc4backstage/hrmengine/components/birthEditor/components/body/card/Background.js b/pc4backstage/hrmengine/components/birthEditor/components/body/card/Background.js new file mode 100644 index 0000000..618fdb7 --- /dev/null +++ b/pc4backstage/hrmengine/components/birthEditor/components/body/card/Background.js @@ -0,0 +1,26 @@ +import { + observer, +} from 'mobx-react'; + +@observer +export default class Background extends React.Component{ + render() { + const { + bg_style, + is_bg_selected, + handleCardItemClick, + staffRemindStore:{cardType} + } = this.props.store; + + return ( +
handleCardItemClick(e, "bg")} + > + {this.props.children} +
+ ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/birthEditor/components/body/card/Congratulations.js b/pc4backstage/hrmengine/components/birthEditor/components/body/card/Congratulations.js new file mode 100644 index 0000000..69b0d8c --- /dev/null +++ b/pc4backstage/hrmengine/components/birthEditor/components/body/card/Congratulations.js @@ -0,0 +1,33 @@ +import { + observer, +} from 'mobx-react'; + +@observer +export default class Congratulations extends React.Component { + render() { + const { + store + } = this.props, { + is_congratulation_show, + is_congratulation_selected, + body_congratulation_style, + congratulation_datas, + handleCardItemClick, + } = store, { + paragraph + } = congratulation_datas; + + if (!is_congratulation_show) return null; + + return ( +
handleCardItemClick(e, "congratulation")} + dangerouslySetInnerHTML = {{ __html: paragraph }} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/birthEditor/components/body/card/DateField.js b/pc4backstage/hrmengine/components/birthEditor/components/body/card/DateField.js new file mode 100644 index 0000000..e35da59 --- /dev/null +++ b/pc4backstage/hrmengine/components/birthEditor/components/body/card/DateField.js @@ -0,0 +1,39 @@ +import { + observer, +} from 'mobx-react'; +import { i18n } from '../../../../../public/i18n'; + +@observer +export default class DateField extends React.Component { + render() { + const { + store + } = this.props, { + is_date_selected, + body_date_style, + head_bar_datas, + handleCardItemClick, + } = store, { + form_params, + } = head_bar_datas; + + const content = form_params.content; + + if ( content && content.includes("2")) { + return ( +
handleCardItemClick(e, "date")} + > + {i18n.label.date()} +
+ ) + }else{ + return null; + } + + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/birthEditor/components/body/card/Header.js b/pc4backstage/hrmengine/components/birthEditor/components/body/card/Header.js new file mode 100644 index 0000000..5d1ed45 --- /dev/null +++ b/pc4backstage/hrmengine/components/birthEditor/components/body/card/Header.js @@ -0,0 +1,32 @@ +import { + observer, +} from 'mobx-react'; + +@observer +export default class Header extends React.Component { + render() { + const { + store + } = this.props, { + is_head_show, + is_head_selected, + body_head_style, + head_datas, + handleCardItemClick, + } = store, { + title + } = head_datas; + + if (!is_head_show) return null; + + return ( +
{i18n.label.matrixDesc()} + + this.selectedAll(e)} + > + {i18n.label.show()} + + + {i18n.label.childItems()} + + + ) + + for (let i = 0; i < data.length; i++) { + arr.push( + + +
+ {data[i].label} +
+ +
+
+ this.onChangeHandle(e, i)} + indeterminate={data[i].indeterminate} + /> +
+ +
+ { + data[i].children.map((data, j) => ( +
+ this.onChangeHandle(e, i, j)} + indeterminate={data.indeterminate} + > + {data.label} + +
+ )) + } + +
+ { + data[i].children.map((data, j) => ( + data.children.map((data, k) => ( +
+ this.onChangeHandle(e, i, j, k)} + indeterminate={data.indeterminate} + > + {data.label} + +
+ )) + )) + } + + + ); + } + return arr; + } + + renderItem = (data) => { + let arr = []; + if (Array.isArray(data)) { + data.map((d, index) => { + arr.push( + + this.onChangeHandle(d)}> + {d.label} + + + ) + }) + } else { + arr.push( + + this.onChangeHandle(data)}> + {data.label} + + + ) + } + return arr; + } + + render() { + const { + hrmCardItemSet + } = this.props, { + tabOneRelatedData + } = hrmCardItemSet, { + data, + loading, + } = tabOneRelatedData; + + return ( +
+ {toJS(data).length > 0 && this.renderRow()} +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/cardItemSet/index.js b/pc4backstage/hrmengine/components/cardItemSet/index.js new file mode 100644 index 0000000..8c24945 --- /dev/null +++ b/pc4backstage/hrmengine/components/cardItemSet/index.js @@ -0,0 +1,202 @@ +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, +} from 'ecCom' + +import { + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import React from 'react' +import * as mobx from 'mobx' +import SysShowItems from './SysShowItems' +import DefineShowItems from './DefineShowItems' +import '../../style/area.css'; +import "../../style/cardItemSet.less"; +const toJS = mobx.toJS; + +@inject('hrmCardItemSet') +@observer +export default class CardItemSet extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.staffCardDisplay(); + } + } + + componentWillReceiveProps(nextProps) { + const { + hrmCardItemSet + } = this.props; + + if (this.props.location.key !== nextProps.location.key) { + hrmCardItemSet.mobxDataReset(); + } + } + + componentDidMount() { + const { + hrmCardItemSet + } = this.props; + + hrmCardItemSet.mobxDataReset(); + hrmCardItemSet.getRight(); + } + + getDropMenuDatas() { + const { + hrmCardItemSet + } = this.props, { + menu + } = hrmCardItemSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + getTopMenuBtns() { + const { + hrmCardItemSet + } = this.props, { + menu + } = hrmCardItemSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + log = () => { + const { + hrmCardItemSet + } = this.props, { + selectedKey + } = hrmCardItemSet; + + window.setLogViewProps({ + logSmallType: (selectedKey == '0') ? '1028' : '1029', + }); + } + + save() { + const { + hrmCardItemSet + } = this.props, { + selectedKey + } = hrmCardItemSet; + + selectedKey == '0' ? hrmCardItemSet.cardItemsSettingSave() : hrmCardItemSet.userDefineCardItemSave(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.label.sysShowItems() + }, { + key: '1', + title: i18n.label.defineShowItems() + }, ] + return tabName; + } + + render() { + const { + hrmCardItemSet + } = this.props, { + loading, + weaTopTitle, + selectedKey, + authorized, + } = hrmCardItemSet; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + buttons={this.getTopMenuBtns()} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > +
+ hrmCardItemSet.setSelectedKey(key)} + /> + {selectedKey=='0' ? : } +
+
+
+ ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractExpireWarning/Add.js b/pc4backstage/hrmengine/components/contractExpireWarning/Add.js new file mode 100644 index 0000000..442a622 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractExpireWarning/Add.js @@ -0,0 +1,63 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaAuth +} from 'ecCom' +import { + Spin +} from 'antd' + +@inject('hrmConExWarning') +@observer +export default class Add extends React.Component { + constructor(props) { + super(props); + } + + handleOk = (datas) => { + const { + hrmConExWarning + } = this.props, { + save, + setParams + } = hrmConExWarning; + + setParams(datas); //设置参数 + save(); + } + + render() { + const { + hrmConExWarning + } = this.props, { + mainDialog, + subForm, + closeDialog, + } = hrmConExWarning, { + visible, + title, + } = mainDialog, { + conditions, + } = subForm; + + return ( + this.handleOk(datas)} + onCancel={() => closeDialog(false)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractExpireWarning/Content.js b/pc4backstage/hrmengine/components/contractExpireWarning/Content.js new file mode 100644 index 0000000..62fdbe4 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractExpireWarning/Content.js @@ -0,0 +1,111 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaSearchGroup, +} from 'ecCom' +import { + Spin, + Modal, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +import MainForm from './MainForm'; +import Table from './Table'; + +@inject('hrmConExWarning') +@observer +export default class Content extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmConExWarning.getContentInfo(); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk = () => { + this.props.hrmConExWarning.deleteTableInfo(); + } + + getCustomComponent = () => { + const { + hrmConExWarning + } = this.props, { + openDialog, + table, + } = hrmConExWarning, { + tableStore + } = table; + + const len = tableStore.selectedRowKeys.length; + + return (
+ openDialog()} + /> + 0 ? {backgroundColor: '#2DB7F5'} : {backgroundColor: '#D9D9D9'}} + onClick={() => (len > 0) && this.showConfirm() } + /> +
) + } + + + render() { + const { + hrmConExWarning + } = this.props, { + mainForm + } = hrmConExWarning, { + loading + } = mainForm; + + return ( +
+ {loading ?
+ +
+ : + (
+ } + showGroup={true} + /> + } + showGroup={true} + customComponent={this.getCustomComponent()} + /> +
) + + } +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractExpireWarning/Header.js b/pc4backstage/hrmengine/components/contractExpireWarning/Header.js new file mode 100644 index 0000000..6ab2ed0 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractExpireWarning/Header.js @@ -0,0 +1,132 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaRightMenu, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmConExWarning') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmConExWarning.getButtonsMenu(); + } + + getTopMenuBtns = () => { + const { + hrmConExWarning + } = this.props, { + menu, + table, + } = hrmConExWarning, { + tableStore + } = table; + + let btns = []; + + menu.topMenu.map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick = (item) => { + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmConExWarning + } = this.props, { + menu + } = hrmConExWarning, { + rightMenu + } = menu; + + let menus = []; + rightMenu.map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + this[key] && this[key](); + } + + save = () => { + this.props.hrmConExWarning.save(); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3048', + }); + } + + custom = () => { + const { + hrmConExWarning + } = this.props, { + table, + } = hrmConExWarning, { + tableStore + } = table; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + render() { + const { + hrmConExWarning + } = this.props, { + main + } = hrmConExWarning, { + title, + } = main; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.contractExpireWarning(),favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractExpireWarning/MainForm.js b/pc4backstage/hrmengine/components/contractExpireWarning/MainForm.js new file mode 100644 index 0000000..c4ce767 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractExpireWarning/MainForm.js @@ -0,0 +1,91 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx'; +import { + WeaFormItem, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmConExWarning') +@observer +export default class MainForm extends React.Component { + constructor(props) { + super(props); + } + + getForm = () => { + const { + hrmConExWarning + } = this.props, { + mainForm, + } = hrmConExWarning, { + form, + conditions, + } = mainForm, { + isFormInit, + } = form; + + const arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push( + + ) + }) + }) + + arr.push(this.getInstruction()); + + return
{arr}
+ } + + getInstruction = () => { + const { + hrmConExWarning + } = this.props, { + mainForm + } = hrmConExWarning, { + explain + } = mainForm; + + const arr = (explain.includes(';')) ? explain.split(';') : explain.split(';'); + + return ( + + {arr.map((ps, index) => + (

) + )} + + ) + + } + + render() { + return ( +

+ {this.getForm()} +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractExpireWarning/Table.js b/pc4backstage/hrmengine/components/contractExpireWarning/Table.js new file mode 100644 index 0000000..26a566a --- /dev/null +++ b/pc4backstage/hrmengine/components/contractExpireWarning/Table.js @@ -0,0 +1,39 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmConExWarning') +@observer +export default class Table extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + hrmConExWarning + } = this.props, { + table, + } = hrmConExWarning, { + tableStore + } = table; + + return ( + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractExpireWarning/index.js b/pc4backstage/hrmengine/components/contractExpireWarning/index.js new file mode 100644 index 0000000..b445d8f --- /dev/null +++ b/pc4backstage/hrmengine/components/contractExpireWarning/index.js @@ -0,0 +1,91 @@ +import React from 'react' +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx'; +import { + WeaAlertPage, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import '../../style/searchGroupRelated.css' + +import Header from './Header'; +import Content from './Content'; +import Add from './Add'; + +@inject('hrmConExWarning') +@observer +export default class ConExWarning extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.contractExpireWarning(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmConExWarning.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + this.props.hrmConExWarning.getAuth(); + } + + render() { + const { + hrmConExWarning + } = this.props, { + main, + } = hrmConExWarning, { + authorized, + loading, + } = main; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ +
+ +
+ ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/DialogContent.js b/pc4backstage/hrmengine/components/contractMaintain/DialogContent.js new file mode 100644 index 0000000..b5565e4 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/DialogContent.js @@ -0,0 +1,101 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaRightMenu, + WeaSearchGroup, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import FormInfo from './FormInfo'; +import RichText from './RichText'; + +@inject('hrmContractMaintain') +@observer +export default class DialogContent extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmContractMaintain.getFormInfo(); + } + + + getDropMenuDatas = () => { + const { + hrmContractMaintain + } = this.props, { + formInfo + } = hrmContractMaintain, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + this[key] && this[key](); + } + + save = () => { + const { + hrmContractMaintain + } = this.props, { + save + } = hrmContractMaintain; + + save(); + } + + render() { + const { + hrmContractMaintain + } = this.props, { + formInfo + } = hrmContractMaintain, { + loading + } = formInfo; + + if (loading) { + return ( +
+ +
+ ) + } else { + return ( + this.handleMenuClick(key)}> +
+ } + showGroup={true} + /> +
+ } + showGroup={true} + /> +
+ ) + } + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/FormInfo.js b/pc4backstage/hrmengine/components/contractMaintain/FormInfo.js new file mode 100644 index 0000000..7c835b5 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/FormInfo.js @@ -0,0 +1,145 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaFormItem, + WeaLocaleProvider +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Button +} from 'antd' +const getLabel = WeaLocaleProvider.getLabel; + +@inject('hrmContractMaintain') +@observer +export default class FormInfo extends React.Component { + constructor(props) { + super(props); + } + + componentWillUnmount() { + this.props.hrmContractMaintain.refreshFormInfo(); + } + + getForm = () => { + const { + hrmContractMaintain + } = this.props, { + formInfo, + } = hrmContractMaintain, { + form, + conditions, + isHireContract, + } = formInfo, { + isFormInit, + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + const key = field.domkey[0]; + + if (key == 'proEndDate' && !isHireContract) return + + arr.push( + this.handleChange(cb)}/> + ) + }) + }) + arr = [...arr, this.getAttach()]; + return
{arr}
+ } + + handleChange = (cb) => { + if (Object.keys(cb)[0] == 'contractTypeId') { + this.props.hrmContractMaintain.getContractTypeInfo(cb.contractTypeId.value) + } + } + + getAttach = () => { + const { + hrmContractMaintain + } = this.props, { + formInfo, + delAttach, + } = hrmContractMaintain, { + ids, + names, + } = formInfo; + + if (names.length > 0) { + return ( + + { + names.map((name, index) =>{ + return
+ this.downloadFile(`/weaver/weaver.file.FileDownload?fileid=${ids[index]}`)}>{name.length > 17 ? `${name.slice(0, 17)}...` : name} + +
+ }) + } +
+ ) + } else { + return + } + } + + // {name.length > 17 ? `${name.slice(0, 17)}...` : name} + + downloadFile = (sUrl) => { + + //iOS devices do not support downloading. We have to inform user about this. + if (/(iP)/g.test(navigator.userAgent)) { + alert('Your device does not support files downloading. Please try again in desktop browser.'); + return false; + } + + //If in Chrome or Safari - download via virtual link click + if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) { + //Creating new link node. + var link = document.createElement('a'); + link.href = sUrl; + + if (link.download !== undefined) { + //Set HTML5 download attribute. This will prevent file from opening if supported. + var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length); + link.download = fileName; + } + + //Dispatching click event. + if (document.createEvent) { + var e = document.createEvent('MouseEvents'); + e.initEvent('click', true, true); + link.dispatchEvent(e); + return true; + } + } + + // Force file download (whether supported by server). + if (sUrl.indexOf('?') === -1) { + sUrl += '?download'; + } + + window.open(sUrl, '_self'); + return true; + } + + render() { + return this.getForm() + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/Header.js b/pc4backstage/hrmengine/components/contractMaintain/Header.js new file mode 100644 index 0000000..5248ce3 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/Header.js @@ -0,0 +1,211 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmContractMaintain') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmContractMaintain + } = this.props, { + getButtonsMenu, + getFormInfo + } = hrmContractMaintain; + + getButtonsMenu(); + getFormInfo(); + } + + getTopMenuBtns = () => { + const { + hrmContractMaintain + } = this.props, { + menu, + mainTable, + } = hrmContractMaintain, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmContractMaintain + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmContractMaintain, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmContractMaintain + } = this.props, { + menu, + mainTable, + } = hrmContractMaintain, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmContractMaintain + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmContractMaintain, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + new = () => { + const { + hrmContractMaintain + } = this.props, { + openDialog, + } = hrmContractMaintain + + openDialog(); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3043', + }); + } + + batchDelete() { + const { + hrmContractMaintain + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmContractMaintain; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmContractMaintain + } = this.props, { + mainTable, + } = hrmContractMaintain, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractMaintain.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractMaintain.deleteTableInfo(); + } + + render() { + const { + hrmContractMaintain + } = this.props, { + main + } = hrmContractMaintain, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/LeftTree.js b/pc4backstage/hrmengine/components/contractMaintain/LeftTree.js new file mode 100644 index 0000000..08a90b7 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/LeftTree.js @@ -0,0 +1,63 @@ +import { + WeaOrgTree +} from 'ecCom' +import { + inject, + observer, +} from 'mobx-react' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmContractMaintain') +@observer +export default class LeftTree extends React.Component { + constructor(props) { + super(props); + this.tree = null; + this.setRef = element => { + this.tree = element; + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.triggerRefresh !== nextProps.triggerRefresh) { + this.init(); + } + } + + componentDidMount() { + this.init() + } + + init = () => { + if (this.tree) this.tree.reset(() => this.tree.fetchData()); + } + + clickTreeNode = (event, ids, nodeids, nodes) => { + const { + hrmContractMaintain + } = this.props, { + clickTreeNode + } = hrmContractMaintain; + + clickTreeNode(ids[0], nodes[0].type, nodes[0].name); + } + + render() { + return ( +
+ ${i18n.label.companyInfo()}`} + params={{rightStr:'HrmContractAdd:Add'}} + treeNodeClick = {(event, ids, nodeids, nodes) => this.clickTreeNode(event, ids, nodeids, nodes)} + /> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/MainDialog.js b/pc4backstage/hrmengine/components/contractMaintain/MainDialog.js new file mode 100644 index 0000000..d42da9e --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/MainDialog.js @@ -0,0 +1,79 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import DialogContent from './DialogContent'; + +@inject('hrmContractMaintain') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 900, + height: 720, + } + } + + getButtons = () => { + const { + hrmContractMaintain + } = this.props, { + formInfo, + save + } = hrmContractMaintain; + + const sv = (); + + const btns = [sv, ]; + + return btns; + } + + render() { + const { + hrmContractMaintain + } = this.props, { + closeDialog, + mainDialog, + } = hrmContractMaintain, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/MainTable.js b/pc4backstage/hrmengine/components/contractMaintain/MainTable.js new file mode 100644 index 0000000..4032a61 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/MainTable.js @@ -0,0 +1,136 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaPopoverHrm +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx' +import { + Modal, + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmContractMaintain') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.delete(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractMaintain.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractMaintain.deleteTableInfo(); + } + + reRenderColumns = (cs) => { + const { + hrmContractMaintain + } = this.props, { + openDialog, + setSelectedRowKeys, + openContractType, + } = hrmContractMaintain; + + cs.map(c => { + if (c.dataIndex) { + if (c.dataIndex == 'contractname') { + c.render = (t, r) => { + return {setSelectedRowKeys(r.randomFieldId);openDialog()}} >{r.contractnamespan} + } + } + if (c.dataIndex == 'contractman') { + c.render = (t, r) => { + return () + } + } + if (c.dataIndex == 'contracttypeid') { + c.render = (t, r) => { + return openContractType(r.contracttypeid)} >{r.contracttypeidspan} + } + } + } + + + }); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmContractMaintain + } = this.props, { + setSelectedRowKeys, + openDialog, + } = hrmContractMaintain, { + randomFieldId + } = record, { + index + } = operate; + + if (index == '0' || index == '1') setSelectedRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + case '1': + this.showConfirm(); + break; + case '2': + + window.setLogViewProps({ + logSmallType: '3043', + targetId: randomFieldId, + }); + break; + } + + } + + render() { + const { + hrmContractMaintain, + } = this.props, { + mainTable, + } = hrmContractMaintain, { + tableStore + } = mainTable; + + return ( + this.reRenderColumns(cs)} + onOperatesClick={(record, rowIndex, operate) => this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/RichText.js b/pc4backstage/hrmengine/components/contractMaintain/RichText.js new file mode 100644 index 0000000..5af27a6 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/RichText.js @@ -0,0 +1,107 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaRichText, + WeaLocaleProvider, +} from 'ecCom' +import { + Icon, +} from 'antd' +import {addContentPath} from '../../util/index.js' +const getLabel = WeaLocaleProvider.getLabel; + +@inject('hrmContractMaintain') +@observer +export default class RichText extends React.Component { + constructor(props) { + super(props); + } + + componentWillUnmount() { + this.props.hrmContractMaintain.refreshRichText(); + } + + handleToolsChange = (name, ids, list, type) => { + return this.transfStr(name, ids, list, type); + } + + transfStr = (name = '', ids = '', list = [], type = '') => { + let str = ''; + list.forEach(item => { + if (name === 'Upload' && type === 'image') { + str += ``; + } + if (name === 'Upload' && type === 'file') { + str += `${item.filename}${item.showLoad ? " 下载(" + item.filesize + ")" : ""}
`; + } + if (name === 'Browser') { + str += `${item.name || item.showname}   `; + } + }); + return str; + }; + + render() { + const { + hrmContractMaintain + } = this.props, { + richText, + handleRichTextChange, + setRichTextStatus, + exportAttachId, + } = hrmContractMaintain, { + value + } = richText; + + const extentsConfig = [{ + name: 'Upload', // 上传组件 + type: 'image', // 上传组件类型 + show: , // 使用 antd 图标 + uploadUrl: '/api/doc/upload/uploadFile', // 上传地址 + category: 'string' // 文档目录 + }, ]; + + const bottomBarConfig = [{ + name: 'Upload', // 上传组件 + type: 'list', // 上传组件类型 + show: + {getLabel('156',"附件")}, // 使用 antd 图标 + uploadUrl: '/api/doc/upload/uploadFile?model=reply', // 上传地址 + category: '/api/doc/upload/uploadFile?model=reply', // 文档目录 + onListChange: (ids, list) => exportAttachId(ids, list) + + }]; + + const basicToolBar = { + toolbar: [ + ['Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates', + 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo', + 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt', + 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', + 'Select', 'Button', 'ImageButton', 'HiddenField', + 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', + '-', 'CopyFormatting', 'RemoveFormat', + 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', + 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', + '-', 'BidiLtr', 'BidiRtl', 'Language', + 'Link', 'Unlink', 'Anchor', + 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe', + 'Styles', 'Format', 'Font', 'FontSize', + 'TextColor', 'BGColor', 'Maximize', 'ShowBlocks' + ], + ], + }; + + return handleRichTextChange(val)} + onStatusChange={status => setRichTextStatus(status)} + onToolsChange={(name, ids, list, type) => this.handleToolsChange(name, ids, list, type)} + /> + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/Tab.js b/pc4backstage/hrmengine/components/contractMaintain/Tab.js new file mode 100644 index 0000000..b89d99d --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/Tab.js @@ -0,0 +1,277 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +import MainTable from './MainTable'; + +@inject('hrmContractMaintain') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentWillUnmount() { + this.props.hrmContractMaintain.refreshSearch(); + } + + getSearchPanelButtons = () => { + const { + hrmContractMaintain + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractMaintain, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + const { + hrmContractMaintain + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + mainTab, + } = hrmContractMaintain, { + isPanelShow + } = mainTab + + getTableInfo(); + isPanelShow && changeSearchPanelStatus(false); + } + + getPanelComponents = () => { + const { + hrmContractMaintain + } = this.props, { + mainTab, + } = hrmContractMaintain, { + conditions, + form, + loading + } = mainTab, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + if (loading) { + return ( +
+ +
+ ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + } + } + + handleSearchChange = (val) => { + const { + hrmContractMaintain + } = this.props, { + mainTab, + } = hrmContractMaintain, { + form + } = mainTab; + + form.updateFields({ + contractName: { + value: val + } + }); + } + + getDropMenuDatas = () => { + const { + hrmContractMaintain, + } = this.props, { + menu, + mainTable, + } = hrmContractMaintain, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmContractMaintain, + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractMaintain, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3043', + }); + } + + new = () => { + const { + hrmContractMaintain + } = this.props, { + openDialog + } = hrmContractMaintain; + + openDialog(); + } + + batchDelete = () => { + const { + hrmContractMaintain + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmContractMaintain; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmContractMaintain + } = this.props, { + mainTable, + } = hrmContractMaintain, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractMaintain.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractMaintain.deleteTableInfo(); + } + + render() { + const { + hrmContractMaintain + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractMaintain, { + isPanelShow, + conditionCount, + form, + } = mainTab; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.contractMaintain(),favouritetype:5}} + > + changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
} + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractMaintain/index.js b/pc4backstage/hrmengine/components/contractMaintain/index.js new file mode 100644 index 0000000..86ac01b --- /dev/null +++ b/pc4backstage/hrmengine/components/contractMaintain/index.js @@ -0,0 +1,112 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, + WeaLeftRightLayout, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import '../../style/assType.css' + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; +import LeftTree from './LeftTree'; + +@inject('hrmContractMaintain') +@observer +export default class ContractMaintain extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.contractMaintain(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmContractMaintain.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init = () => { + const { + hrmContractMaintain + } = this.props, { + getAuth, + forceLeftTreeRefresh, + } = hrmContractMaintain; + + getAuth(); + forceLeftTreeRefresh(); + } + + render() { + const { + hrmContractMaintain + } = this.props, { + main, + leftTree, + } = hrmContractMaintain, { + authorized, + loading, + hasTree + } = main, { + triggerRefresh + } = leftTree; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ {hasTree ? (}> + + ) + : + } +
+ +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractTemplate/Header.js b/pc4backstage/hrmengine/components/contractTemplate/Header.js new file mode 100644 index 0000000..6c308bc --- /dev/null +++ b/pc4backstage/hrmengine/components/contractTemplate/Header.js @@ -0,0 +1,173 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmContractTemplate') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + getTopMenuBtns = () => { + const { + hrmContractTemplate + } = this.props, { + menu, + mainTable, + } = hrmContractTemplate, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmContractTemplate + } = this.props, { + menu, + mainTable, + } = hrmContractTemplate, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + this[key] && this[key](); + } + + new = () => { + const { + hrmContractTemplate + } = this.props, { + openDialog, + } = hrmContractTemplate + + openDialog(); + } + + batchDelete() { + const { + hrmContractTemplate + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmContractTemplate; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmContractTemplate + } = this.props, { + mainTable, + } = hrmContractTemplate, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractTemplate.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractTemplate.deleteTableInfo(); + } + + render() { + const { + hrmContractTemplate + } = this.props, { + main + } = hrmContractTemplate, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractTemplate/LeftTree.js b/pc4backstage/hrmengine/components/contractTemplate/LeftTree.js new file mode 100644 index 0000000..1ac1e1d --- /dev/null +++ b/pc4backstage/hrmengine/components/contractTemplate/LeftTree.js @@ -0,0 +1,63 @@ +import { + WeaOrgTree +} from 'ecCom' +import { + inject, + observer, +} from 'mobx-react' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmContractTemplate') +@observer +export default class LeftTree extends React.Component { + constructor(props) { + super(props); + this.tree = null; + this.setRef = element => { + this.tree = element; + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.triggerRefresh !== nextProps.triggerRefresh) { + this.init(); + } + } + + componentDidMount() { + this.init() + } + + init = () => { + if (this.tree) this.tree.reset(() => this.tree.fetchData()); + } + + clickTreeNode = (event, ids, nodeids, nodes) => { + const { + hrmContractTemplate + } = this.props, { + clickTreeNode + } = hrmContractTemplate; + + clickTreeNode(ids[0], nodes[0].type, nodes[0].name); + } + + render() { + return ( +
+ ${i18n.label.companyInfo()}`} + params={{rightStr:'HrmContractTypeAdd:Add'}} + treeNodeClick = {(event, ids, nodeids, nodes) => this.clickTreeNode(event, ids, nodeids, nodes)} + /> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractTemplate/MainDialog.js b/pc4backstage/hrmengine/components/contractTemplate/MainDialog.js new file mode 100644 index 0000000..4b76421 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractTemplate/MainDialog.js @@ -0,0 +1,69 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmContractTemplate') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 750, + height: 300, + } + } + + getButtons = () => { + const sv = (); + + const btns = [sv, ]; + + return btns; + } + + render() { + const { + hrmContractTemplate + } = this.props, { + closeDialog, + mainDialog, + } = hrmContractTemplate, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractTemplate/MainTable.js b/pc4backstage/hrmengine/components/contractTemplate/MainTable.js new file mode 100644 index 0000000..e74fbde --- /dev/null +++ b/pc4backstage/hrmengine/components/contractTemplate/MainTable.js @@ -0,0 +1,117 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +import { + Modal, + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmContractTemplate') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.delete(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractTemplate.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractTemplate.deleteTableInfo(); + } + + reRenderColumns = (cs) => { + const { + hrmContractTemplate + } = this.props, { + openDialog + } = hrmContractTemplate; + + cs.map(c => { + if (c.dataIndex) { + if (c.dataIndex == 'typename') { + c.render = (t, r) => { + return openDialog(r.randomFieldId)} >{r.typename} + } + } + } + + + }); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmContractTemplate + } = this.props, { + setSelectedRowKeys, + openDialog, + } = hrmContractTemplate, { + randomFieldId + } = record, { + index + } = operate; + + if (index == '0' || index == '1') setSelectedRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + case '1': + this.showConfirm(); + break; + case '2': + message.info(i18n.message.implementation()); + break; + } + + } + + render() { + const { + hrmContractTemplate, + } = this.props, { + mainTable, + } = hrmContractTemplate, { + tableStore + } = mainTable; + + return ( + this.reRenderColumns(cs)} + onOperatesClick={(record, rowIndex, operate) => this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractTemplate/Tab.js b/pc4backstage/hrmengine/components/contractTemplate/Tab.js new file mode 100644 index 0000000..da30f0c --- /dev/null +++ b/pc4backstage/hrmengine/components/contractTemplate/Tab.js @@ -0,0 +1,195 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +import MainTable from './MainTable'; + +@inject('hrmContractTemplate') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentWillUnmount() { + this.props.hrmContractTemplate.refreshSearch(); + } + + getSearchPanelButtons = () => { + const { + hrmContractTemplate + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractTemplate, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + this.props.hrmContractTemplate.getTableInfo(); + } + + getDropMenuDatas = () => { + const { + hrmContractTemplate, + } = this.props, { + menu, + mainTable, + } = hrmContractTemplate, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmContractTemplate, + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractTemplate, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + new = () => { + const { + hrmContractTemplate + } = this.props, { + openDialog + } = hrmContractTemplate; + + openDialog(); + } + + batchDelete = () => { + const { + hrmContractTemplate + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmContractTemplate; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmContractTemplate + } = this.props, { + mainTable, + } = hrmContractTemplate, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractTemplate.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractTemplate.deleteTableInfo(); + } + + render() { + const { + hrmContractTemplate + } = this.props, { + mainTab, + } = hrmContractTemplate, { + baseSearchValue, + } = mainTab; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.contractTemplate(),favouritetype:5}} + > + this.handleSearch()} + onSearchChange={val => setSearchBaseValue(val)} + /> + + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractTemplate/index.js b/pc4backstage/hrmengine/components/contractTemplate/index.js new file mode 100644 index 0000000..0f76b06 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractTemplate/index.js @@ -0,0 +1,112 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, + WeaLeftRightLayout, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import '../../style/assType.css' + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; +import LeftTree from './LeftTree'; + +@inject('hrmContractTemplate') +@observer +export default class ContractTemplate extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.contractTemplate(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmContractTemplate.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init = () => { + const { + hrmContractTemplate + } = this.props, { + getAuth, + forceLeftTreeRefresh, + } = hrmContractTemplate; + + getAuth(); + forceLeftTreeRefresh(); + } + + render() { + const { + hrmContractTemplate + } = this.props, { + main, + leftTree, + } = hrmContractTemplate, { + authorized, + loading, + hasTree + } = main, { + triggerRefresh + } = leftTree; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ {hasTree ? (}> + + ) + : + } +
+ +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractType/FormInfo.js b/pc4backstage/hrmengine/components/contractType/FormInfo.js new file mode 100644 index 0000000..9ad7a82 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractType/FormInfo.js @@ -0,0 +1,137 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmContractType') +@observer +export default class FormInfo extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmContractType + } = this.props, { + setSelectedRowKeys, + getFormInfo + } = hrmContractType; + + if (this.props && this.props.location && this.props.location.query.id) { + setSelectedRowKeys(this.props.location.query.id); + getFormInfo({ + isView: true + }); + } else { + getFormInfo(); + } + + } + + componentWillUnmount() { + this.props.hrmContractType.refreshFormInfo(); + } + + getForm = () => { + const { + hrmContractType + } = this.props, { + formInfo, + } = hrmContractType, { + form, + conditions, + } = formInfo, { + isFormInit, + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + const key = field.domkey[0]; + + arr.push( + this.handleChange(cb)}/> + {key == 'remindAheadDate' && {i18n.label.day()}} + ) + }) + }) + return
{arr}
+ } + + handleChange = (cb) => {} + + getDropMenuDatas = () => { + const { + hrmContractType + } = this.props, { + formInfo + } = hrmContractType, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmContractType, + } = this.props, { + save, + } = hrmContractType; + + key == '0' && save(); + } + + render() { + const { + hrmContractType, + } = this.props, { + formInfo, + } = hrmContractType, { + date, + loading, + } = formInfo; + + return (
+ {loading ?
+ +
+ : this.handleMenuClick(key)}> +
+ {this.getForm()} +
+
+ } +
) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractType/Header.js b/pc4backstage/hrmengine/components/contractType/Header.js new file mode 100644 index 0000000..04c5686 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractType/Header.js @@ -0,0 +1,199 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmContractType') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + getTopMenuBtns = () => { + const { + hrmContractType + } = this.props, { + menu, + mainTable, + } = hrmContractType, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmContractType + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmContractType, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmContractType + } = this.props, { + menu, + mainTable, + } = hrmContractType, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmContractType + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmContractType, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + new = () => { + const { + hrmContractType + } = this.props, { + openDialog, + } = hrmContractType + + openDialog(); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3042', + }); + } + + batchDelete() { + const { + hrmContractType + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmContractType; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmContractType + } = this.props, { + mainTable, + } = hrmContractType, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractType.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractType.deleteTableInfo(); + } + + render() { + const { + hrmContractType + } = this.props, { + main + } = hrmContractType, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractType/LeftTree.js b/pc4backstage/hrmengine/components/contractType/LeftTree.js new file mode 100644 index 0000000..4fc02b0 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractType/LeftTree.js @@ -0,0 +1,63 @@ +import { + WeaOrgTree +} from 'ecCom' +import { + inject, + observer, +} from 'mobx-react' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmContractType') +@observer +export default class LeftTree extends React.Component { + constructor(props) { + super(props); + this.tree = null; + this.setRef = element => { + this.tree = element; + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.triggerRefresh !== nextProps.triggerRefresh) { + this.init(); + } + } + + componentDidMount() { + this.init() + } + + init = () => { + if (this.tree) this.tree.reset(() => this.tree.fetchData()); + } + + clickTreeNode = (event, ids, nodeids, nodes) => { + const { + hrmContractType + } = this.props, { + clickTreeNode + } = hrmContractType; + + clickTreeNode(ids[0], nodes[0].type, nodes[0].name); + } + + render() { + return ( +
+ ${i18n.label.companyInfo()}`} + params={{rightStr:'HrmContractTypeAdd:Add'}} + treeNodeClick = {(event, ids, nodeids, nodes) => this.clickTreeNode(event, ids, nodeids, nodes)} + /> +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractType/MainDialog.js b/pc4backstage/hrmengine/components/contractType/MainDialog.js new file mode 100644 index 0000000..18cedea --- /dev/null +++ b/pc4backstage/hrmengine/components/contractType/MainDialog.js @@ -0,0 +1,79 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import FormInfo from './FormInfo'; + +@inject('hrmContractType') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 750, + height: 300, + } + } + + getButtons = () => { + const { + hrmContractType + } = this.props, { + formInfo, + save + } = hrmContractType; + + const sv = (); + + const btns = [sv, ]; + + return btns; + } + + render() { + const { + hrmContractType + } = this.props, { + closeDialog, + mainDialog, + } = hrmContractType, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractType/MainTable.js b/pc4backstage/hrmengine/components/contractType/MainTable.js new file mode 100644 index 0000000..8c8389f --- /dev/null +++ b/pc4backstage/hrmengine/components/contractType/MainTable.js @@ -0,0 +1,120 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +import { + Modal, + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmContractType') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.delete(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractType.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractType.deleteTableInfo(); + } + + reRenderColumns = (cs) => { + const { + hrmContractType + } = this.props, { + openDialog + } = hrmContractType; + + cs.map(c => { + if (c.dataIndex) { + if (c.dataIndex == 'typename') { + c.render = (t, r) => { + return openDialog(r.randomFieldId)} >{r.typename} + } + } + } + + + }); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmContractType + } = this.props, { + setSelectedRowKeys, + openDialog, + } = hrmContractType, { + randomFieldId + } = record, { + index + } = operate; + + if (index == '0' || index == '1') setSelectedRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + case '1': + this.showConfirm(); + break; + case '2': + window.setLogViewProps({ + logSmallType: '3042', + targetId: randomFieldId, + }); + break; + } + + } + + render() { + const { + hrmContractType, + } = this.props, { + mainTable, + } = hrmContractType, { + tableStore + } = mainTable; + + return ( + this.reRenderColumns(cs)} + onOperatesClick={(record, rowIndex, operate) => this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractType/Tab.js b/pc4backstage/hrmengine/components/contractType/Tab.js new file mode 100644 index 0000000..f20bc69 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractType/Tab.js @@ -0,0 +1,279 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +import MainTable from './MainTable'; + +@inject('hrmContractType') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentWillUnmount() { + this.props.hrmContractType.refreshSearch(); + } + + getSearchPanelButtons = () => { + const { + hrmContractType + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractType, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + const { + hrmContractType + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + mainTab, + } = hrmContractType, { + isPanelShow + } = mainTab + + getTableInfo(); + isPanelShow && changeSearchPanelStatus(false); + } + + getPanelComponents = () => { + const { + hrmContractType + } = this.props, { + mainTab, + } = hrmContractType, { + conditions, + form, + loading + } = mainTab, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + if (loading) { + return ( +
+ +
+ ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + } + } + + handleSearchChange = (val) => { + const { + hrmContractType + } = this.props, { + mainTab, + } = hrmContractType, { + form + } = mainTab; + + form.updateFields({ + typeName: { + value: val + } + }); + } + + getDropMenuDatas = () => { + const { + hrmContractType, + } = this.props, { + menu, + mainTable, + } = hrmContractType, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmContractType, + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractType, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3042', + }); + } + + new = () => { + const { + hrmContractType + } = this.props, { + openDialog + } = hrmContractType; + + openDialog(); + } + + batchDelete = () => { + const { + hrmContractType + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmContractType; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmContractType + } = this.props, { + mainTable, + } = hrmContractType, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmContractType.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmContractType.deleteTableInfo(); + } + + + + render() { + const { + hrmContractType + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmContractType, { + isPanelShow, + conditionCount, + form, + } = mainTab; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.contractType(),favouritetype:5}} + > + changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
} + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/contractType/index.js b/pc4backstage/hrmengine/components/contractType/index.js new file mode 100644 index 0000000..64de1e6 --- /dev/null +++ b/pc4backstage/hrmengine/components/contractType/index.js @@ -0,0 +1,112 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, + WeaLeftRightLayout, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import '../../style/assType.css' + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; +import LeftTree from './LeftTree'; + +@inject('hrmContractType') +@observer +export default class ContractType extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.contractType(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmContractType.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init = () => { + const { + hrmContractType + } = this.props, { + getAuth, + forceLeftTreeRefresh, + } = hrmContractType; + + getAuth(); + forceLeftTreeRefresh(); + } + + render() { + const { + hrmContractType + } = this.props, { + main, + leftTree, + } = hrmContractType, { + authorized, + loading, + hasTree + } = main, { + triggerRefresh + } = leftTree; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ {hasTree ? (}> + + ) + : + } +
+ +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/decentralizationAdminSet/HocFactory.js b/pc4backstage/hrmengine/components/decentralizationAdminSet/HocFactory.js new file mode 100644 index 0000000..af5a467 --- /dev/null +++ b/pc4backstage/hrmengine/components/decentralizationAdminSet/HocFactory.js @@ -0,0 +1,20 @@ +const HocFactory = (WrappedComponent) => { + return class Hoc extends React.Component { + constructor(props) { + super(props); + } + + render() { + let config = { + width: 600, + height: 215, + } + + return + } + } +} + +export { + HocFactory +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/decentralizationAdminSet/SecuritySet.js b/pc4backstage/hrmengine/components/decentralizationAdminSet/SecuritySet.js new file mode 100644 index 0000000..ab4c5a5 --- /dev/null +++ b/pc4backstage/hrmengine/components/decentralizationAdminSet/SecuritySet.js @@ -0,0 +1,290 @@ +import { + WeaDialog, + WeaFormItem, + WeaNewScroll, + WeaMoreButton, + WeaLocaleProvider, +} from 'ecCom' + +import { + Spin, + Modal, + Button, +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + getUserName, + bindTokenKey +} from '../../util/pulic-func' + +import { + i18n +} from '../../public/i18n'; + +import * as mobx from 'mobx' +import {addContentPath} from '../../util/index.js' +const toJS = mobx.toJS; +const getLabel = WeaLocaleProvider.getLabel; +const confirm = Modal.confirm; + +export default class SecuritySet extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 700, + height: 430, + } + } + + getButtons = () => { + const { + loading, + save + } = this.props; + + let buttons = [ + (), + () + ]; + + return buttons; + } + + getForm = () => { + const { + form, + condition, + isFormInit, + verifyTypeSelectedValue, + useTypeSelectedValue, + checkboxValue, + } = this.props; + + const {userUsbType,usbstate,needauto} = form.getFormParams(); + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + let key = field.domkey[0]; + + + if (userUsbType == '6' && !['userUsbType','usbstate'].includes(key)) { + return + } + + if (userUsbType == '901' && usbstate=='0' &&['selectdateselect' ].includes(key)) return; + + if (needauto=='0' &&['selectdateselect' ].includes(key)) return; + + + if (userUsbType == '901' && [ 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial'].includes(key)) return; + + + if(userUsbType === '7' && [ 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial'].includes(key)) return; + + if(userUsbType === '7' && [ 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial'].includes(key)) return; + + + if (!verifyTypeSelectedValue && key !== 'userUsbType') { + return; + } + if (verifyTypeSelectedValue == '4' && (useTypeSelectedValue == '0' || useTypeSelectedValue == '2') && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'mobile')) { + return; + } + if (verifyTypeSelectedValue == '4' && useTypeSelectedValue == '1' && checkboxValue == '0' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'mobile' && key !== 'needauto')) { + return; + } + if (verifyTypeSelectedValue == '4' && useTypeSelectedValue == '1' && checkboxValue == '1' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'mobile' && key !== 'needauto' && key !== 'selectdate' && key !== 'enableUsbType')) { + return; + } + if (verifyTypeSelectedValue == '2' && (useTypeSelectedValue == '0' || useTypeSelectedValue == '2') && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'serial')) { + return; + } + if (verifyTypeSelectedValue == '2' && useTypeSelectedValue == '1' && checkboxValue == '0' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'serial' && key !== 'needauto')) { + return; + } + if (verifyTypeSelectedValue == '2' && useTypeSelectedValue == '1' && checkboxValue == '1' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'serial' && key !== 'needauto' && key !== 'selectdate' && key !== 'enableUsbType')) { + return; + } + if (verifyTypeSelectedValue == '3' && (useTypeSelectedValue == '0' || useTypeSelectedValue == '2') && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'tokenKey')) { + return; + } + if (verifyTypeSelectedValue == '3' && useTypeSelectedValue == '1' && checkboxValue == '0' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'tokenKey' && key !== 'needauto')) { + return; + } + if (verifyTypeSelectedValue == '3' && useTypeSelectedValue == '1' && checkboxValue == '1' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'tokenKey' && key !== 'needauto' && key !== 'selectdate' && key !== 'enableUsbType')) { + return; + } + if (verifyTypeSelectedValue == '901' && checkboxValue == '0' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'needauto' && key !== 'enableUsbType')) { + return; + } + if (verifyTypeSelectedValue == '901' && useTypeSelectedValue == '0' &&key == 'needauto' ) { + return; + } + if (verifyTypeSelectedValue == '901'&& useTypeSelectedValue == '0' && key=='selectdate' && (key !== 'userUsbType' && key !== 'usbstate' && key !== 'needauto' && key !== 'enableUsbType')) { + return; + } + if(key == 'usbstate'){ + if(verifyTypeSelectedValue=='901'){ + field.options.splice(2,1) + }} + + arr.push( + this.handleChange(e)}/> + ) + }) + }) + + return
{arr}
+ } + + showConfirm = () => { + const { + saveSecondaryPasswordSetting + } = this.props; + + confirm({ + title: getLabel(131329, '信息确认'), + content: (
+ {i18n.label['530915']()}
+ {i18n.label['530916']()} +
), + okText: getLabel(33703, '确定'), + cancelText: getLabel(32694, '取消'), + onOk() { + saveSecondaryPasswordSetting(false); + }, + onCancel() { + return false + }, + }); + } + + handleChange = (e) => { + const { + setVerifyTypeSelectedValue, + setUseTypeSelectedValue, + setCheckboxValue, + handleCondition, + } = this.props; + + let key = Object.keys(e)[0], + val = e[key].value; + + switch (key) { + case 'userUsbType': + setVerifyTypeSelectedValue(key, val); + if (val == '2') this.updateKey(val); + handleCondition(); + break; + case 'usbstate': + setUseTypeSelectedValue(val, key); + break; + case 'needauto': + setCheckboxValue(val, key); + break; + } + } + + handleClick = () => { + const { + verifyTypeSelectedValue, + } = this.props; + + this.updateKey(verifyTypeSelectedValue) + } + + updateKey = (needusb) => { + const { + setLoginId, + hrmId + } = this.props; + + if (needusb == "2") { + let returnstr = getUserName() || ''; + returnstr && setLoginId(returnstr); + } else if (needusb == "3") { + bindTokenKey(hrmId); + } + } + + render() { + const { + title, + visible, + loading, + onCancel, + verifyTypeSelectedValue, + useTypeSelectedValue, + checkboxValue, + } = this.props, { + width, + height, + } = this.state; + + const { + isSecondaryVerifySetted, + isSecondaryVerifyUsed, + saveSecondaryPasswordSetting, + hasValidateType, + } = this.props; + + return ( + onCancel() } + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + + +
+ { (verifyTypeSelectedValue == '2' || verifyTypeSelectedValue == '3') && +
+ +
+ } + {this.getForm()} + { !loading && !hasValidateType &&
{i18n.message.noVerifyMethod()}{i18n.button.clickToSet()}
} + +
+ +
+ + {isSecondaryVerifySetted ? getLabel('514132',"已设置") :i18n.label['514133']()} + + { isSecondaryVerifySetted && + + } +
+
+
+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/decentralizationAdminSet/index.js b/pc4backstage/hrmengine/components/decentralizationAdminSet/index.js new file mode 100644 index 0000000..6ccce30 --- /dev/null +++ b/pc4backstage/hrmengine/components/decentralizationAdminSet/index.js @@ -0,0 +1,555 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, +} from 'ecCom' + +import { + Row, + Col, + Spin, + Modal, + Button, + message, +} from 'antd' + +import { + WeaSwitch, + WeaTableNew, +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +import Editor from '../../coms/Editor' +import SecuritySet from './SecuritySet' +import { + HocFactory +} from './HocFactory' + +const WrappedEditor = HocFactory(Editor); +const toJS = mobx.toJS; +const confirm = Modal.confirm; +const WeaTable = WeaTableNew.WeaTable; + +import '../../style/area.css' + +@inject('hrmDecentralizationAdminSet') +@observer +export default class DecentralizationAdminSet extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.decentAdminSetting(); + } + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init() { + const { + hrmDecentralizationAdminSet + } = this.props, { + getRight, + mobxDatasReset + } = hrmDecentralizationAdminSet + + mobxDatasReset(); + getRight(); + } + + getDropMenuDatas = () => { + const { + hrmDecentralizationAdminSet + } = this.props, { + menu + } = hrmDecentralizationAdminSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3022', + }); + } + + custom = () => { + const { + hrmDecentralizationAdminSet + } = this.props, { + tableStore, + } = hrmDecentralizationAdminSet; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + handleMenuClick = (key) => { + const { + hrmDecentralizationAdminSet + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmDecentralizationAdminSet; + + isPanelShow && setPanelStatus(false); + this[key] && this[key](); + } + + getTopMenuBtns = () => { + const { + hrmDecentralizationAdminSet + } = this.props, { + menu, + tableStore + } = hrmDecentralizationAdminSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + + handleClick = (item) => { + const { + hrmDecentralizationAdminSet + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmDecentralizationAdminSet; + + isPanelShow && setPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + new() { + const { + hrmDecentralizationAdminSet + } = this.props, { + setEditorDialogVisible + } = hrmDecentralizationAdminSet + + setEditorDialogVisible(true, 'new'); + } + + + batchDelete() { + const { + hrmDecentralizationAdminSet + } = this.props, { + tableStore, + setSelectedRowsKeys + } = hrmDecentralizationAdminSet; + + let keys = toJS(tableStore.selectedRowKeys).toString(); + setSelectedRowsKeys(keys); + this.deleteRows(); + } + + deleteRows(id) { + const { + hrmDecentralizationAdminSet + } = this.props, { + setSelectedRowsKeys + } = hrmDecentralizationAdminSet; + + id && setSelectedRowsKeys(id); + let v = id ? 'del' : 'batchDel'; + this.showConfirm(v); + } + + showConfirm(v) { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk() { + const { + hrmDecentralizationAdminSet + } = this.props, { + deleteTableRows + } = hrmDecentralizationAdminSet; + + deleteTableRows(); + } + + editorSave() { + const { + hrmDecentralizationAdminSet + } = this.props, { + editor, + addAdminInfo, + editAdminInfo + } = hrmDecentralizationAdminSet, { + formType + } = editor; + + formType == 'new' && addAdminInfo(); + formType == 'edit' && editAdminInfo() + } + + getDropPanelButtons() { + const { + hrmDecentralizationAdminSet + } = this.props, { + searchPanel, + setPanelStatus + } = hrmDecentralizationAdminSet, { + form + } = searchPanel; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + + getBaseValueOfSearch() { + const { + hrmDecentralizationAdminSet + } = this.props, { + searchPanel + } = hrmDecentralizationAdminSet, { + form, + value + } = searchPanel; + + let val; + if (form.isFormInit) { + val = form.getFormParams().lastname; + } else { + val = value; + } + return val; + } + + handleSearchChange(val) { + const { + hrmDecentralizationAdminSet + } = this.props, { + searchPanel, + updateFields, + setBaseValueOfSearch + } = hrmDecentralizationAdminSet, { + form + } = searchPanel + + if (form.isFormInit) { + updateFields(val); + } + setBaseValueOfSearch(val); + } + + handlePanelStatus(bool) { + const { + hrmDecentralizationAdminSet + } = this.props, { + searchPanel, + setPanelStatus, + getSearchCondition + } = hrmDecentralizationAdminSet, { + condition + } = searchPanel; + + if (bool) { + setPanelStatus(true); + condition.length == 0 && getSearchCondition(); //第一次打开面板时加载数据 + } else { + setPanelStatus(false); + } + } + + handleSearch() { + const { + hrmDecentralizationAdminSet + } = this.props, { + isPanelShow, + setPanelStatus, + getTableInfo + } = hrmDecentralizationAdminSet; + + getTableInfo(); + isPanelShow && setPanelStatus(false); + } + + getPanelComponents() { + const { + hrmDecentralizationAdminSet + } = this.props, { + searchPanel + } = hrmDecentralizationAdminSet, { + condition, + form, + loading + } = searchPanel, { + isFormInit + } = form; + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + if (loading) { + return ( +
+ +
+ ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + } + } + + reRenderColumns(columns) { + let _this = this; + columns.forEach((c, index) => { + if (c.dataIndex == 'lastname') { + c.render = function(text, record) { + return _this.doEdit(record.randomFieldId)} >{record.lastname} + } + }; + }) + } + + onOperatesClick(record, index, operate) { + const { + hrmDecentralizationAdminSet + } = this.props, { + setSecuritySetDialogVisible, + setEditorDialogVisible, + setSelectedRowsKeys + } = hrmDecentralizationAdminSet; + + let i = operate.index, + id = record.randomFieldId; + + switch (i) { + case '0': //安全设置 + setSelectedRowsKeys(id); + setSecuritySetDialogVisible(true); + break; + case '1': //编辑 + this.doEdit(id) + break; + case '2': //删除 + this.deleteRows(id) + break; + case '3': + window.setLogViewProps({ + logSmallType: '3022', + targetId: id + }); + break; + } + } + + doEdit = (id) => { + const { + hrmDecentralizationAdminSet + } = this.props, { + setSelectedRowsKeys, + setEditorDialogVisible, + } = hrmDecentralizationAdminSet; + + setSelectedRowsKeys(id); + setEditorDialogVisible(true, 'edit'); + } + + securitySetSave = () => { + const { + hrmDecentralizationAdminSet + } = this.props, { + securitySave, + } = hrmDecentralizationAdminSet; + + securitySave(); + } + + + render() { + const { + hrmDecentralizationAdminSet + } = this.props, { + loading, + title, + isPanelShow, + authorized, + setPanelStatus, + tableStore, + searchPanel, + editor, + securitySet, + setVerifyTypeSelectedValue, + setUseTypeSelectedValue, + setCheckboxValue, + setEditorDialogVisible, + setSecuritySetDialogVisible, + setLoginId, + date, + + isSecondaryVerifySetted, + isSecondaryVerifyUsed, + saveSecondaryPasswordSetting, + + hasValidateType, + handleCondition, + } = hrmDecentralizationAdminSet, { + conditionCount + } = searchPanel; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+ this.handleMenuClick(key)} + collectParams={{favname:title,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + this.handlePanelStatus(b)} + hideSearchAd={ () => setPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
} + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
+
+ this.editorSave()} + loading={editor.loading} + onCancel={() => setEditorDialogVisible(false)} + /> + this.securitySetSave()} + onCancel={() => setSecuritySetDialogVisible(false)} + setVerifyTypeSelectedValue={(key, val) => setVerifyTypeSelectedValue(key, val, 'change')} + setUseTypeSelectedValue={(val, key) => setUseTypeSelectedValue(val, key, 'change')} + setCheckboxValue={(val, key) => setCheckboxValue(val, key, 'change')} + setLoginId={id => setLoginId(id)} + isSecondaryVerifySetted={isSecondaryVerifySetted} + isSecondaryVerifyUsed={isSecondaryVerifyUsed} + hasValidateType={hasValidateType} + handleCondition={handleCondition} + saveSecondaryPasswordSetting={cb => saveSecondaryPasswordSetting(cb)} + /> +
+ ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/education/Education.js b/pc4backstage/hrmengine/components/education/Education.js new file mode 100644 index 0000000..b150e4c --- /dev/null +++ b/pc4backstage/hrmengine/components/education/Education.js @@ -0,0 +1,486 @@ +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaDialog, + WeaFormItem, + WeaRightMenu, + WeaSearchGroup, +} from 'ecCom' + +import { + Row, + Col, + Spin, + Modal, + Button, + message, +} from 'antd' + +import React from 'react' +import * as mobx from 'mobx' + +import { + WeaSwitch +} from 'comsMobx' +import { + WeaTableNew +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +import Editor from '../../coms/Editor' +import { + HocFactory +} from './HocFactory' +const WrappedEditor = HocFactory(Editor); + +const toJS = mobx.toJS; +const confirm = Modal.confirm; +const WeaTable = WeaTableNew.WeaTable; + +import '../../style/area.css' + +@inject('hrmEducationSet') +@observer +class Education extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.educationSet(); + } + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init() { + const { + hrmEducationSet + } = this.props; + + hrmEducationSet.mobxDatasReset(); + hrmEducationSet.setOperation('getTableInfo'); + hrmEducationSet.getTableInfo(); + } + + //WeaRightMenu + getDropMenuDatas() { + const { + hrmEducationSet + } = this.props, { + rightMenu + } = hrmEducationSet; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + handleMenuClick(key) { + const { + hrmEducationSet + } = this.props, { + isMpPanelShow + } = hrmEducationSet; + + isMpPanelShow && hrmEducationSet.setMpPanelStatus(false); + this[key] && this[key](); + } + //WeaTop + getTopMenuBtns() { + const { + hrmEducationSet + } = this.props, { + topMenu, + mpTableStore, + type + } = hrmEducationSet; + + let btns = []; + toJS(topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + handleClick(item) { + const { + hrmEducationSet + } = this.props, { + isMpPanelShow + } = hrmEducationSet; + + isMpPanelShow && hrmEducationSet.setMpPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + new() { + const { + hrmEducationSet + } = this.props; + + hrmEducationSet.setNeTitle(i18n.label.newEducation()); + hrmEducationSet.setNeVisible(true); + hrmEducationSet.newSet('new', 'addForm'); + hrmEducationSet.getNeForm(); + } + import () { + const { + hrmEducationSet + } = this.props; + + hrmEducationSet.setItVisible(true); + hrmEducationSet.setOperation('import'); + hrmEducationSet.getImportForm(); + } + batchDelete() { + const { + hrmEducationSet + } = this.props, { + mpTableStore + } = hrmEducationSet; + + let keys = toJS(mpTableStore.selectedRowKeys).toString(); + hrmEducationSet.setSelectedRowsKeys(keys); + this.deleteRows(); + } + + custom = () => { + const { + hrmEducationSet + } = this.props, { + mpTableStore, + } = hrmEducationSet; + + mpTableStore.setColSetVisible(true); + mpTableStore.tableColSet(true); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3017', + }); + } + + deleteRows(id) { + const { + hrmEducationSet + } = this.props; + + if (id) { + hrmEducationSet.deleteSet(id, 'delete'); + } else { + hrmEducationSet.setOperation('batchDelete'); + } + + let v = id ? 'del' : 'batchDel'; + this.showConfirm(v); + } + showConfirm(v) { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + onOk() { + const { + hrmEducationSet + } = this.props; + hrmEducationSet.delete(); + } + save() { + const { + hrmEducationSet + } = this.props, { + formType + } = hrmEducationSet; + + if (formType == 'new') { + hrmEducationSet.setOperation('save_new'); + hrmEducationSet.add(); + } else if (formType == 'edit') { + hrmEducationSet.setOperation('save_edit'); + hrmEducationSet.edit(); + } + } + //WeaTab + getTabBtn() { + const { + hrmEducationSet + } = this.props, { + mpShForm + } = hrmEducationSet; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + getMpShBaseValue() { + const { + hrmEducationSet + } = this.props, { + mpShForm, + eduName + } = hrmEducationSet; + + let val; + if (mpShForm.isFormInit) { + val = mpShForm.getFormParams().name; + } else { + val = eduName; + } + return val; + } + handleMpShChange(val) { + const { + hrmEducationSet + } = this.props, { + mpShForm + } = hrmEducationSet; + + if (mpShForm.isFormInit) { + hrmEducationSet.updateFields(val); + } + hrmEducationSet.setSearchName(val); + } + handleMpPanelStatus(bool) { + const { + hrmEducationSet + } = this.props, { + mpShCondition + } = hrmEducationSet; + + if (bool) { //打开面板 + hrmEducationSet.setMpPanelStatus(true); + if (mpShCondition.length == 0) { //第一次打开面板时加载高级搜索数据 + hrmEducationSet.setOperation('mpSearch'); + hrmEducationSet.getMpSearchCondition(); + } + } else { //关闭面板 + hrmEducationSet.setMpPanelStatus(false); + hrmEducationSet.mpSearchReset(); + } + } + handleMpSearch() { + const { + hrmEducationSet + } = this.props, { + isMpPanelShow + } = hrmEducationSet; + + hrmEducationSet.setOperation('getTableInfo'); + hrmEducationSet.getTableInfo(); //获取表格信息 + isMpPanelShow && hrmEducationSet.setMpPanelStatus(false); //关闭面板 + } + getPanelComponents() { + const { + hrmEducationSet + } = this.props, { + mpShCondition, + mpShForm, + mpShLoading + } = hrmEducationSet, { + isFormInit + } = mpShForm; + + let arr = []; + isFormInit && mpShCondition.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + if (mpShLoading) { + return ( +
+ +
+ ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleMpSearch()}>{arr} + } + } + //WeaTable + reRenderColumns(columns) { + let _this = this; + columns.forEach((c, index) => { + if (c.dataIndex == 'name') { + c.render = function(text, record) { + return _this.doEdit(record.randomFieldId)} >{record.name} + } + }; + }) + } + onOperatesClick(record, index, operate) { + let i = operate.index; + + i == '0' && this.doEdit(record.randomFieldId); + i == '1' && this.doDel(record.randomFieldId); + i == '2' && this.deLog(record.randomFieldId); + } + doEdit(id) { + const { + hrmEducationSet + } = this.props; + + hrmEducationSet.setNeTitle(i18n.label.editEducation()); + hrmEducationSet.setNeVisible(true); + hrmEducationSet.editSet(id, 'edit', 'editFrom'); + hrmEducationSet.getNeForm(); + } + doDel(id) { + const { + hrmEducationSet + } = this.props; + this.deleteRows(id); + } + + deLog(id) { + window.setLogViewProps({ + logSmallType: '3017', + targetId: id, + }); + } + + //NewAndEditDialog + handleNeCancel() { + const { + hrmEducationSet + } = this.props; + hrmEducationSet.setNeVisible(false); + hrmEducationSet.neReset(); + } + + render() { + const { + hrmEducationSet + } = this.props; + const { + wtpLoading, + isEdit, + date + } = hrmEducationSet; //common + const { + mpTitle + } = hrmEducationSet; //WeaTop + const { + isMpPanelShow, + conditionNum + } = hrmEducationSet; //WeaTab + const { + mpTableStore + } = hrmEducationSet; //WeaTable + const { + neTitle, + neVisible, + neCondition, + neForm, + neLoading + } = hrmEducationSet; //NewAndEditDialog + + return ( +
+ this.handleMenuClick(key)} + collectParams={{favname:mpTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + this.handleMpPanelStatus(b)} + hideSearchAd={ ()=>hrmEducationSet.setMpPanelStatus(false)} + searchsAd= {isMpPanelShow?this.getPanelComponents():
} + onSearch={()=>this.handleMpSearch()} + onSearchChange={val=>this.handleMpShChange(val)} + /> + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
+
+ this.save()} + onCancel={() => this.handleNeCancel()} + /> +
+ ) + } +} + +export default Education \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/education/HocFactory.js b/pc4backstage/hrmengine/components/education/HocFactory.js new file mode 100644 index 0000000..9ab9b98 --- /dev/null +++ b/pc4backstage/hrmengine/components/education/HocFactory.js @@ -0,0 +1,22 @@ +import React from 'react' + +const HocFactory = (WrappedComponent) => { + return class Hoc extends React.Component { + constructor(props) { + super(props); + } + + render() { + let config = { + width: 600, + height: 132, + } + + return + } + } +} + +export { + HocFactory +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/elseSetting/index.js b/pc4backstage/hrmengine/components/elseSetting/index.js new file mode 100644 index 0000000..465cfe9 --- /dev/null +++ b/pc4backstage/hrmengine/components/elseSetting/index.js @@ -0,0 +1,115 @@ +//gai +import React from 'react'; +import { + i18n +} from '../../public/i18n'; +import { + inject, + observer, +} from 'mobx-react'; +import { + Button +} from 'antd'; +import { + WeaTop, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, +} from 'ecCom'; +import { WeaSwitch } from 'comsMobx' + +@inject('elseSettingStore') +@observer +export default class ElseSettiing extends React.Component { + constructor(props) { + super(props) + const { elseSettingStore: store } = this.props + const { save } = store; + this.state = { + btns: [ + , + ], + dropMenuDatas: [ + { + key: "1", + disabled: false, + icon: , + content: `${i18n.button.save()}`, + onClick: save + }, + ] + } + } + + componentDidMount () { + const { elseSettingStore: store } = this.props + const { init } = store; + init() + } + + getForm = () => { + const { elseSettingStore: store } = this.props; + const { Form, FormField } = store; + const { isFormInit } = Form; + let arr = []; + isFormInit && FormField.map((item => { + item.items.map((field) => { + arr.push( + + + + ) + }) + })) + return arr; + } + + render () { + const { containerInitFinished } = this.props.elseSettingStore; + return ( +
+ { + containerInitFinished.init && containerInitFinished.authorized ? + +
+ } + iconBgcolor='#217346' + buttons={this.state.btns} + showDropIcon={true} + dropMenuDatas={this.state.dropMenuDatas} + /> +
+ {this.getForm()} +
+
+
: +
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/employmentDemand/FormInfo.js b/pc4backstage/hrmengine/components/employmentDemand/FormInfo.js new file mode 100644 index 0000000..8d91c08 --- /dev/null +++ b/pc4backstage/hrmengine/components/employmentDemand/FormInfo.js @@ -0,0 +1,122 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmEmployDemand') +@observer +export default class FormInfo extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmEmployDemand.getFormInfo(); + } + + componentWillUnmount() { + this.props.hrmEmployDemand.refreshFormInfo(); + } + + getForm = () => { + const { + hrmEmployDemand + } = this.props, { + formInfo, + } = hrmEmployDemand, { + form, + conditions, + } = formInfo, { + isFormInit, + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push( + this.handleChange(cb)}/> + ) + }) + }) + return
{arr}
+ } + + handleChange = (cb) => {} + + + getDropMenuDatas = () => { + const { + hrmEmployDemand + } = this.props, { + formInfo + } = hrmEmployDemand, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmEmployDemand, + } = this.props, { + save, + } = hrmEmployDemand; + + key == '0' && save(); + } + + render() { + const { + hrmEmployDemand, + } = this.props, { + formInfo, + } = hrmEmployDemand, { + date, + loading, + } = formInfo; + + if (loading) { + return ( +
+ +
+ ) + } else { + return ( + this.handleMenuClick(key)}> +
+ {this.getForm()} +
+
+ ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/employmentDemand/Header.js b/pc4backstage/hrmengine/components/employmentDemand/Header.js new file mode 100644 index 0000000..b2a87d0 --- /dev/null +++ b/pc4backstage/hrmengine/components/employmentDemand/Header.js @@ -0,0 +1,208 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, + WeaRightMenu, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmEmployDemand') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmEmployDemand.getButtonsMenu(); + } + + getTopMenuBtns = () => { + const { + hrmEmployDemand + } = this.props, { + menu, + mainTable, + } = hrmEmployDemand, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmEmployDemand + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmEmployDemand, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmEmployDemand + } = this.props, { + menu, + mainTable, + } = hrmEmployDemand, { + rightMenu + } = menu, { + tableStore + } = mainTable; + + const len = tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = (len > 0) ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmEmployDemand + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmEmployDemand, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3044', + }); + } + + new = () => { + const { + hrmEmployDemand + } = this.props, { + openDialog, + } = hrmEmployDemand + + openDialog(); + } + + custom = () => { + const { + hrmEmployDemand + } = this.props, { + mainTable, + } = hrmEmployDemand, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + batchDelete() { + this.showConfirm(); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk = () => { + const { + hrmEmployDemand + } = this.props, { + mainTable, + setSelectedRowKeys, + deleteTableInfo, + } = hrmEmployDemand; + + setSelectedRowKeys(mainTable.tableStore.selectedRowKeys); + deleteTableInfo(); + } + + render() { + const { + hrmEmployDemand + } = this.props, { + main + } = hrmEmployDemand, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + this.handleMenuClick(key)} + collectParams={{favname:title,favouritetype:5}} + > + {this.props.children} + + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/employmentDemand/MainDialog.js b/pc4backstage/hrmengine/components/employmentDemand/MainDialog.js new file mode 100644 index 0000000..4f16540 --- /dev/null +++ b/pc4backstage/hrmengine/components/employmentDemand/MainDialog.js @@ -0,0 +1,78 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import FormInfo from './FormInfo'; + +@inject('hrmEmployDemand') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 750, + height: 400, + } + } + + getButtons = () => { + const { + hrmEmployDemand + } = this.props, { + formInfo, + save, + } = hrmEmployDemand; + + const btns = [ + (), + () + ]; + + return btns; + } + + + render() { + const { + hrmEmployDemand + } = this.props, { + closeDialog, + mainDialog, + } = hrmEmployDemand, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/employmentDemand/MainTable.js b/pc4backstage/hrmengine/components/employmentDemand/MainTable.js new file mode 100644 index 0000000..01d268c --- /dev/null +++ b/pc4backstage/hrmengine/components/employmentDemand/MainTable.js @@ -0,0 +1,126 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTableNew +} from 'comsMobx' +import { + Modal, + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmEmployDemand') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + showConfirm = () => { + const { + hrmEmployDemand + } = this.props, { + resetSelectedRowKeys + } = hrmEmployDemand; + + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.delete(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + const { + hrmEmployDemand + } = this.props, { + deleteTableInfo + } = hrmEmployDemand; + + deleteTableInfo(); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmEmployDemand + } = this.props, { + setSelectedRowKeys, + openDialog, + } = hrmEmployDemand, { + randomFieldId + } = record, { + index + } = operate; + + setSelectedRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog() + break; + case '1': + this.showConfirm(); + break; + case '2': + window.setLogViewProps({ + logSmallType: '3044', + targetId: randomFieldId, + }); + break; + + } + + } + reRenderColumns = (columns) => { + const { + hrmEmployDemand + } = this.props, { + openDialog, + setSelectedRowKeys + } = hrmEmployDemand; + + columns.map(c => { + if (c.dataIndex == 'jobtitlename') { //TODO + c.render = (t, r) => { + return {setSelectedRowKeys(r.randomFieldId);openDialog()}}>{r.jobtitlenamespan} + } + } + }) + } + + render() { + const { + hrmEmployDemand, + } = this.props, { + mainTable, + } = hrmEmployDemand, { + tableStore + } = mainTable; + + return ( + this.reRenderColumns(columns)} + onOperatesClick={(record, rowIndex, operate) => this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/employmentDemand/Tab.js b/pc4backstage/hrmengine/components/employmentDemand/Tab.js new file mode 100644 index 0000000..302086b --- /dev/null +++ b/pc4backstage/hrmengine/components/employmentDemand/Tab.js @@ -0,0 +1,182 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTab, + WeaFormItem, + WeaLocaleProvider, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const getLabel = WeaLocaleProvider.getLabel; + +import MainTable from './MainTable'; + +@inject('hrmEmployDemand') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmEmployDemand + } = this.props, { + clickTab, + getFormInfo, + } = hrmEmployDemand; + + clickTab('1'); + getFormInfo(); + } + + + getTab = () => { + const tabs = [{ + key: '0', + title: i18n.label.all(), + }, { + key: '1', + title: i18n.label.untreated(), + }, { + key: '2', + title: i18n.label.recruiting(), + }, { + key: '3', + title: getLabel('391173', "已满足"), + }, { + key: '4', + title: getLabel('391174', "无用"), + }] + + return tabs + } + + getSearchPanelButtons = () => { + const { + hrmEmployDemand + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmEmployDemand, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + const { + hrmEmployDemand + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + mainTab, + } = hrmEmployDemand, { + isPanelShow + } = mainTab + + isPanelShow && changeSearchPanelStatus(false); + getTableInfo(); + } + + getPanelComponents = () => { + const { + hrmEmployDemand + } = this.props, { + mainTab, + } = hrmEmployDemand, { + conditions, + form, + loading + } = mainTab, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + if (loading) { + return ( +
+ +
+ ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + } + + } + + render() { + const { + hrmEmployDemand + } = this.props, { + clickTab, + mainTab, + changeSearchPanelStatus, + setBaseSearchValue, + } = hrmEmployDemand, { + curKey, + isPanelShow, + conditionCount, + form, + qname, + } = mainTab; + + return ( +
+ clickTab(key)} + searchType={['base','advanced']} + showSearchAd={isPanelShow} + hasMask={false} + advanceHeight={Math.ceil(conditionCount / 2)*52+20} + buttonsAd={this.getSearchPanelButtons()} + searchsBaseValue={qname} + setShowSearchAd={ b => changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
} + onSearch={() => this.handleSearch()} + onSearchChange={val => setBaseSearchValue(val)} + /> + +
+ ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/employmentDemand/index.js b/pc4backstage/hrmengine/components/employmentDemand/index.js new file mode 100644 index 0000000..202a6d3 --- /dev/null +++ b/pc4backstage/hrmengine/components/employmentDemand/index.js @@ -0,0 +1,93 @@ +import React from 'react' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; + +@inject('hrmEmployDemand') +@observer +export default class EmployDemand extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.employDemand(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmEmployDemand.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmEmployDemand + } = this.props, { + getAuth + } = hrmEmployDemand; + + getAuth(); + } + + render() { + const { + hrmEmployDemand + } = this.props, { + main, + } = hrmEmployDemand, { + authorized, + loading + } = main; + + if (!authorized) { + return ( +
+ {loading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + return ( +
+
+ +
+ +
+ ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/enginegroup/AddGpMember.js b/pc4backstage/hrmengine/components/enginegroup/AddGpMember.js new file mode 100644 index 0000000..8267a32 --- /dev/null +++ b/pc4backstage/hrmengine/components/enginegroup/AddGpMember.js @@ -0,0 +1,64 @@ +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaAuth +} from 'ecCom' + +import { + Spin +} from 'antd' + +import React from 'react' +const toJS = mobx.toJS; + +@inject('hrmEngineGroup') +@observer +export default class AddGpMember extends React.Component { + constructor(props) { + super(props); + } + + handleOk(data) { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.setGpMemParams(data); //设置参数 + hrmEngineGroup.setOperation('addGpMemSave'); + hrmEngineGroup.memberSave(); + } + + render() { + const { + hrmEngineGroup + } = this.props, { + addGpMemTitle, + addGpMemDialogVisible, + addGpMemLoading, + addGpMemCondition, + } = hrmEngineGroup; + + if (addGpMemLoading) { + return
+ +
+ } else { + return ( + this.handleOk(data)} + onCancel={()=>hrmEngineGroup.setAddGpMemDialogVisible(false)} + /> + ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/enginegroup/GroupSetting.js b/pc4backstage/hrmengine/components/enginegroup/GroupSetting.js new file mode 100644 index 0000000..01abefd --- /dev/null +++ b/pc4backstage/hrmengine/components/enginegroup/GroupSetting.js @@ -0,0 +1,224 @@ +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTab, + WeaDialog, + WeaMoreButton, + WeaButtonIcon, +} from 'ecCom' + +import { + Spin, + Modal, + Button, + message, +} from 'antd' + +import { + i18n +} from '../../public/i18n'; + +import React from 'react' +import NeForm from './NeForm' +import AddGpMember from './AddGpMember' +import { + WeaTableNew +} from 'comsMobx'; + +const WeaTable = WeaTableNew.WeaTable; +const toJS = mobx.toJS; +const confirm = Modal.confirm; + +@inject('hrmEngineGroup') +@observer +export default class GroupSetting extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 700, + height: 400, + } + } + + getButtons() { + const { + hrmEngineGroup + } = this.props, { + settingLoading, + canAdd + } = hrmEngineGroup; + + const datas = [{ + key: '0', + icon: , + content: i18n.button.log(), + onClick: () => this.log(), + }] + const def = canAdd ? [ + (), + ] : []; + const btn = [ + ...def, + (), + ]; + return btn; + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3050', + }); + } + + handleSave() { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.setOperation('save_edit'); + hrmEngineGroup.edit(); + } + + getIconBtns() { + const { + hrmEngineGroup + } = this.props, { + memTableStore, + canCreateMember, + canDelMember + } = hrmEngineGroup, { + selectedRowKeys + } = memTableStore; + + const iconBtns = [] + + canCreateMember && iconBtns.push(hrmEngineGroup.setAddGpMemDialogVisible(true) }/>); + canDelMember && iconBtns.push( this.handleBatchDelete()}/>); + return iconBtns; + } + + handleBatchDelete() { + const { + hrmEngineGroup + } = this.props, { + memTableStore + } = hrmEngineGroup; + + const keys = memTableStore.selectedRowKeys.toString(); + hrmEngineGroup.setRowId(keys); + hrmEngineGroup.setOperation('memTableRowDel'); + this.showConfirm('batchDel'); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.label.basicInfo() + }, { + key: '1', + title: i18n.label.groupMember() + }, ] + return tabName; + } + + onOperatesClick(record, index, operate) { + let i = operate.index; + let id = record.id || record.randomFieldId; + i == '0' && this.doDel(id); + } + + doDel(id) { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.setRowId(id); + hrmEngineGroup.setOperation('memTableRowDel'); + this.showConfirm('del'); + } + + showConfirm(v) { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk(); + }, + onCancel() { + return false; + }, + }); + } + + onOk() { + const { + hrmEngineGroup + } = this.props; + hrmEngineGroup.memTableRowDel(); + } + + render() { + const { + hrmEngineGroup + } = this.props, { + settingTitle, + settingDialogVisible, + settingLoading, + isPanelShow, + selectedKey, + neLoading, + neCondition, + neForm, + memTableStore, + addGpMemDialogVisible, + } = hrmEngineGroup, { + width, + height + } = this.state; + + return ( +
+ hrmEngineGroup.setSettingDialogVisible(false)} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + hrmEngineGroup.setSelectedKey(key)} + buttons={selectedKey=='1'&&this.getIconBtns()} + /> + {selectedKey=='0' ? + + : this.onOperatesClick(record, index, operate)} + />} + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/enginegroup/NeForm.js b/pc4backstage/hrmengine/components/enginegroup/NeForm.js new file mode 100644 index 0000000..cd4d749 --- /dev/null +++ b/pc4backstage/hrmengine/components/enginegroup/NeForm.js @@ -0,0 +1,51 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaFormItem, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' + +@inject('hrmEngineGroup') +@observer +export default class NeForm extends React.Component { + constructor(props) { + super(props); + } + + getForm() { + const { + hrmEngineGroup + } = this.props, { + neCondition, + neForm, + } = hrmEngineGroup, { + isFormInit + } = neForm; + + let arr = []; + isFormInit && neCondition.map(c => { + c.items.map((field, index) => { + arr.push(
+ + {} + +
) + }) + }) + return
{arr}
+ } + + render() { + return this.getForm(); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/enginegroup/NewEngineGroup.js b/pc4backstage/hrmengine/components/enginegroup/NewEngineGroup.js new file mode 100644 index 0000000..da85c75 --- /dev/null +++ b/pc4backstage/hrmengine/components/enginegroup/NewEngineGroup.js @@ -0,0 +1,98 @@ +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' + +import { + Spin, + Button, +} from 'antd' + +import { + i18n +} from '../../public/i18n'; + +import React from 'react' +import NeForm from './NeForm' +import GroupSetting from './GroupSetting' + +@inject('hrmEngineGroup') +@observer +export default class NewEngineGroup extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 600, + height: 200, + } + } + + getButtons() { + const { + hrmEngineGroup + } = this.props; + const { + neLoading, canAdd + } = hrmEngineGroup; + const def = canAdd ? [ + (), + (), + ] : []; + const btn = [ + ...def, + (), + ]; + return btn; + } + + handleSave(bool) { //参数bool区分两个保存按钮 + const { + hrmEngineGroup + } = this.props; + + bool ? hrmEngineGroup.isOpenSettingDialog(true) : hrmEngineGroup.isOpenSettingDialog(false); + hrmEngineGroup.setOperation('save_new'); + hrmEngineGroup.add(); + } + + render() { + const { + hrmEngineGroup + } = this.props, { + neTitle, + newDialogVisible, + neLoading, + isOpenSetting, + } = hrmEngineGroup, { + width, + height + } = this.state; + + return ( +
+ hrmEngineGroup.setNewDialogVisible(false)} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + + + + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/enginegroup/index.js b/pc4backstage/hrmengine/components/enginegroup/index.js new file mode 100644 index 0000000..05202d5 --- /dev/null +++ b/pc4backstage/hrmengine/components/enginegroup/index.js @@ -0,0 +1,481 @@ +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, + WeaLeftRightLayout +} from 'ecCom' + +import { + Row, + Col, + Spin, + Modal, + Button, + message, +} from 'antd' + +import React from 'react' +import * as mobx from 'mobx' + +import { + WeaSwitch +} from 'comsMobx' +import { + WeaTableNew +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; +import NewEngineGroup from './NewEngineGroup' +import GroupSetting from './GroupSetting' +import OrganizationTree from '../../coms/OrganizationTree'; + + +const toJS = mobx.toJS; +const confirm = Modal.confirm; +const WeaTable = WeaTableNew.WeaTable; + +import '../../style/area.css' + +@inject('hrmEngineGroup') + +@observer +export default class EngineGroup extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.groupSet(); + } + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init() { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.mobxDatasReset(); + hrmEngineGroup.setOperation('getRight'); + hrmEngineGroup.getRight(); + hrmEngineGroup.setOperation('getTableInfo'); + hrmEngineGroup.getTableInfo(); + } + + //WeaRightMenu + getDropMenuDatas() { + const { + hrmEngineGroup + } = this.props, { + rightMenu + } = hrmEngineGroup; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + handleMenuClick(key) { + const { + hrmEngineGroup + } = this.props, { + isMpPanelShow + } = hrmEngineGroup; + + isMpPanelShow && hrmEngineGroup.setMpPanelStatus(false); + this[key] && this[key](); + } + //WeaTop + getTopMenuBtns() { + const { + hrmEngineGroup + } = this.props, { + topMenu, + mpTableStore, + type + } = hrmEngineGroup; + + let btns = []; + toJS(topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + handleClick(item) { + const { + hrmEngineGroup + } = this.props, { + isMpPanelShow + } = hrmEngineGroup; + + isMpPanelShow && hrmEngineGroup.setMpPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3052', + }); + } + + new() { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.setNewDialogVisible(true); + } + batchDelete() { + const { + hrmEngineGroup + } = this.props, { + mpTableStore + } = hrmEngineGroup; + + let keys = toJS(mpTableStore.selectedRowKeys).toString(); + hrmEngineGroup.setSelectedRowKey(keys); + this.deleteRows(); + } + + custom = () => { + const { + hrmEngineGroup + } = this.props, { + mpTableStore, + } = hrmEngineGroup; + + mpTableStore.setColSetVisible(true); + mpTableStore.tableColSet(true); + } + + deleteRows(id) { + const { + hrmEngineGroup + } = this.props; + + if (id) { + hrmEngineGroup.deleteSet(id, 'delete'); + } else { + hrmEngineGroup.setOperation('delete'); + } + + let v = id ? 'del' : 'batchDel'; + this.showConfirm(v); + } + showConfirm(v) { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + onOk() { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.delete(); + } + //WeaTab + getTabBtn() { + const { + hrmEngineGroup + } = this.props, { + mpShForm + } = hrmEngineGroup; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + getMpShBaseValue() { + const { + hrmEngineGroup + } = this.props, { + mpShForm, + groupName + } = hrmEngineGroup; + + let val; + if (mpShForm.isFormInit) { + val = mpShForm.getFormParams().orgGroupName; + } else { + val = groupName; + } + return val; + } + handleMpShChange(val) { + const { + hrmEngineGroup + } = this.props, { + mpShForm + } = hrmEngineGroup; + if (mpShForm.isFormInit) { + hrmEngineGroup.updateFields(val); + } + hrmEngineGroup.setSearchName(val); + } + handleMpPanelStatus(bool) { + const { + hrmEngineGroup + } = this.props, { + mpShCondition + } = hrmEngineGroup; + + if (bool) { //打开面板 + hrmEngineGroup.setMpPanelStatus(true); + if (mpShCondition.length == 0) { //第一次打开面板时加载高级搜索数据 + hrmEngineGroup.setOperation('mpSearch'); + hrmEngineGroup.getMpSearchCondition(); + } + } else { //关闭面板 + hrmEngineGroup.setMpPanelStatus(false); + hrmEngineGroup.mpSearchReset(); + } + } + handleMpSearch() { + const { + hrmEngineGroup + } = this.props, { + isMpPanelShow + } = hrmEngineGroup; + + hrmEngineGroup.setOperation('getTableInfo'); + hrmEngineGroup.getTableInfo(); //获取表格信息 + isMpPanelShow && hrmEngineGroup.setMpPanelStatus(false); //关闭面板 + } + getPanelComponents() { + const { + hrmEngineGroup + } = this.props, { + mpShCondition, + mpShForm, + mpShLoading + } = hrmEngineGroup; + + let arr = []; + let formParams = mpShForm.getFormParams(); + const { + isFormInit + } = mpShForm; + isFormInit && mpShCondition.map(c => { + c.items.map((field, index) => { + arr.push(
+
+ + {} + +
+ ) + }) + }) + + if (mpShLoading) { + return ( +
+ +
+ ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleMpSearch()}>{arr} + } + } + //WeaTable + reRenderColumns(columns) { + let _this = this; + columns.forEach((c, index) => { + if (c.dataIndex == 'orgGroupName') { + c.render = function(text, record) { + return _this.doEdit(record.randomFieldId)} >{record.orgGroupName} + } + }; + }) + } + onOperatesClick(record, index, operate) { + let i = operate.index; + const { + randomFieldId + } = record; + + i == '0' && this.doEdit(randomFieldId); + i == '1' && this.doOpenMem(randomFieldId); + i == '2' && this.doDel(randomFieldId); + i == '3' && window.setLogViewProps({ + logSmallType: '3052', + targetId: randomFieldId + }); + } + doEdit(id) { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.setGroupId(id); + hrmEngineGroup.setSelectedKey('0'); + hrmEngineGroup.setSettingDialogVisible(true); + } + doDel(id) { + const { + hrmEngineGroup + } = this.props; + + this.deleteRows(id); + } + doOpenMem(id) { + const { + hrmEngineGroup + } = this.props; + + hrmEngineGroup.setGroupId(id); + hrmEngineGroup.setSelectedKey('1'); + hrmEngineGroup.setSettingDialogVisible(true); + } + + render() { + const { + hrmEngineGroup + } = this.props, { + wtpLoading, + isEdit, + date, + authorized, + detachable, + orgTreeProps + } = hrmEngineGroup, { + mpTitle + } = hrmEngineGroup, { + isMpPanelShow, + conditionNum + } = hrmEngineGroup, { + mpTableStore + } = hrmEngineGroup, { + newDialogVisible + } = hrmEngineGroup, { + settingDialogVisible + } = hrmEngineGroup; + + if (!authorized) { + return ( +
+ {wtpLoading ?
+ +
+ :
+ +
+ {i18n.message.authFailed()} +
+
+
+ } +
+ ) + } else { + const coms = [ + this.handleMpPanelStatus(b)} + hideSearchAd={ ()=>hrmEngineGroup.setMpPanelStatus(false)} + searchsAd= {isMpPanelShow?this.getPanelComponents():
} + onSearch={()=>this.handleMpSearch()} + onSearchChange={val=>this.handleMpShChange(val)} + />, + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> + ]; + let children; + if(detachable){ + children = ( + }> + {coms} + + ) + }else{ + children = coms; + } + + return ( +
+ this.handleMenuClick(key)} + collectParams={{favname:mpTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + {children} + + + {newDialogVisible && } + {settingDialogVisible && } +
+ ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/entryMaintenance/index.js b/pc4backstage/hrmengine/components/entryMaintenance/index.js new file mode 100644 index 0000000..eb06c0d --- /dev/null +++ b/pc4backstage/hrmengine/components/entryMaintenance/index.js @@ -0,0 +1,249 @@ +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, + WeaSearchGroup, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button, +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; + +import React from 'react' +import * as mobx from 'mobx' +const toJS = mobx.toJS; + +@inject('hrmEntryMaintenanceSet') +@observer +export default class EntryMaintenance extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.entryMaintenanceSettings(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmEntryMaintenanceSet + } = this.props, { + mobxDataReset, + getRight + } = hrmEntryMaintenanceSet; + + mobxDataReset(); + getRight(); + } + + getDropMenuDatas() { + const { + hrmEntryMaintenanceSet + } = this.props, { + menu + } = hrmEntryMaintenanceSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + getTopMenuBtns() { + const { + hrmEntryMaintenanceSet + } = this.props, { + menu + } = hrmEntryMaintenanceSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + save() { + const { + hrmEntryMaintenanceSet + } = this.props, { + save + } = hrmEntryMaintenanceSet; + save(); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3024', + }); + } + + getForm() { + const { + hrmEntryMaintenanceSet + } = this.props, { + content + } = hrmEntryMaintenanceSet, { + form, + condition, + explanation + } = content, { + isFormInit + } = form; + + let arr = []; + let formParams = form.getFormParams(); + + isFormInit && condition.map((c, index) => { + let _arr = []; + c.items.map((field, index) => { + _arr.push({ + com: ( + + + + ), + colSpan: 1 + }) + }) + _arr.push({ + com: ( + +
    + {this.getExplanation(explanation[index].showvalues)} +
+
+ ), + colSpan: 1 + }); + arr.push() + }) + + return arr; + } + + getExplanation(explanations = []) { + let arr = []; + explanations.map(item => { + arr.push(
  • {item}
  • ) + }); + return arr + } + + render() { + const { + hrmEntryMaintenanceSet + } = this.props, { + loading, + weaTopTitle, + authorized, + content, + date + } = hrmEntryMaintenanceSet, { + cLoading + } = content; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + /> + + {!cLoading &&
    {this.getForm()}
    } +
    + ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/external/outSignAppSetting.js b/pc4backstage/hrmengine/components/external/outSignAppSetting.js new file mode 100644 index 0000000..ebce4b5 --- /dev/null +++ b/pc4backstage/hrmengine/components/external/outSignAppSetting.js @@ -0,0 +1,103 @@ +import {WeaFormItem,WeaLocaleProvider, WeaDialog, WeaCheckbox, WeaSearchGroup} from 'ecCom'; +import { inject, observer } from 'mobx-react'; +import { toJS } from 'mobx'; +import {Button, Spin} from 'antd'; +import { + i18n +} from '../../public/i18n'; +const getLabel = WeaLocaleProvider.getLabel; + +@inject('outSignAppSetting') +@observer +export default class OutSignAppSetting extends React.Component { + + componentDidMount () { + const {outSignAppSetting, scope, onCancel} = this.props; + outSignAppSetting.init(scope,onCancel); + } + + getForm = () => { + const {outSignAppSetting} = this.props; + const {photo,remark,nearly,onChange} = outSignAppSetting; + let items = [ + {com: + onChange(value,'remark')} + style={{display: 'block', marginTop:6}} + /> + }, + { + com: + onChange(value,'photo')} + style={{display: 'block', marginTop:6}} + /> + + }, + { + com: + onChange(value,'nearly')} + style={{display: 'block', marginTop:6}} + /> + + } + ] + return ( + + + ) + + + } + + render() { + const {outSignAppSetting} = this.props; + const {visible,loading, cancel} = outSignAppSetting; + let buttons = [ + , + ]; + const iconInfo = ecCom.WeaTools.getIconBGC('hrm')//图标 + + return ( +
    + + + {this.getForm()} + + +
    + ); + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/funcManageDecent/FormInfo.js b/pc4backstage/hrmengine/components/funcManageDecent/FormInfo.js new file mode 100644 index 0000000..2c56ef5 --- /dev/null +++ b/pc4backstage/hrmengine/components/funcManageDecent/FormInfo.js @@ -0,0 +1,171 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaFormItem, + WeaRightMenu, + WeaSearchGroup, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmFuncManageDecent') +@observer +export default class FormInfo extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmFuncManageDecent.getFormInfo(); + } + + componentWillUnmount() { + this.props.hrmFuncManageDecent.refreshFormInfo(); + } + + getItem(field, comProps) { + const { hrmFuncManageDecent } = this.props; + const { formInfo, roleField, resourceField } = hrmFuncManageDecent; + const { form } = formInfo; + const { permissionType } = form.getFormParams(); + + const key = field.domkey[0]; + + const broField = (permissionType == "2") ? roleField : resourceField; + + return { + com: ( + + + { (key == "permissionType") && ( + + + + ) } + + ), + hide:["roleId","resourceId"].includes(key) ? true : false + }; + } + + getForm = () => { + const { + hrmFuncManageDecent + } = this.props, { + formInfo, + } = hrmFuncManageDecent, { + form + } = formInfo; + + return ( +
    { form.render({},{},true, + (c, idx) => { + let items = []; + c.items.map(field => { + items.push(this.getItem(field)); + }); + + return ( + + ) + } )}
    + ) + } + + handleChange = (cb) => { + const { + hrmFuncManageDecent + } = this.props, { + exportSelectedValue + } = hrmFuncManageDecent; + + const key = Object.keys(cb)[0]; + if (key == 'permissionType') exportSelectedValue(cb.permissionType.value); + } + + getDropMenuDatas = () => { + const { + hrmFuncManageDecent + } = this.props, { + formInfo + } = hrmFuncManageDecent, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmFuncManageDecent, + } = this.props, { + save, + } = hrmFuncManageDecent; + + key == '0' && save(); + } + + render() { + const { + hrmFuncManageDecent, + } = this.props, { + formInfo, + } = hrmFuncManageDecent, { + date, + loading, + fconditions, + sconditions, + } = formInfo; + + return (
    + {loading ?
    + +
    + : this.handleMenuClick(key)}> + {this.getForm()} + + } +
    ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/funcManageDecent/Header.js b/pc4backstage/hrmengine/components/funcManageDecent/Header.js new file mode 100644 index 0000000..822600f --- /dev/null +++ b/pc4backstage/hrmengine/components/funcManageDecent/Header.js @@ -0,0 +1,188 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmFuncManageDecent') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount () { + this.props.hrmFuncManageDecent.getButtonsMenu(); + } + + getTopMenuBtns = () => { + const { + hrmFuncManageDecent + } = this.props, { + menu, + mainTable, + } = hrmFuncManageDecent, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmFuncManageDecent + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmFuncManageDecent, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmFuncManageDecent + } = this.props, { + menu, + mainTable, + } = hrmFuncManageDecent, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmFuncManageDecent + } = this.props, { + mainTab, + changeSearchPanelStatus + } = hrmFuncManageDecent, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + new = () => { + const { + hrmFuncManageDecent + } = this.props, { + openDialog, + } = hrmFuncManageDecent + + openDialog(); + } + + batchDelete () { + const { + hrmFuncManageDecent + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmFuncManageDecent; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmFuncManageDecent + } = this.props, { + mainTable, + } = hrmFuncManageDecent, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk () { + _this.onOk() + }, + onCancel () { + _this.props.hrmFuncManageDecent.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmFuncManageDecent.deleteTableInfo(); + } + + render () { + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/funcManageDecent/MainDialog.js b/pc4backstage/hrmengine/components/funcManageDecent/MainDialog.js new file mode 100644 index 0000000..2301f6f --- /dev/null +++ b/pc4backstage/hrmengine/components/funcManageDecent/MainDialog.js @@ -0,0 +1,80 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import FormInfo from './FormInfo'; + +@inject('hrmFuncManageDecent') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 750, + height: 450, + } + } + + getButtons = () => { + const { + hrmFuncManageDecent + } = this.props, { + formInfo, + save, + canAdd + } = hrmFuncManageDecent; + + const sv = (); + const mr = (); + const btns = canAdd ? [sv, mr] : [mr]; + + return btns; + } + + render() { + const { + hrmFuncManageDecent + } = this.props, { + closeDialog, + mainDialog, + } = hrmFuncManageDecent, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog()} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/funcManageDecent/MainTable.js b/pc4backstage/hrmengine/components/funcManageDecent/MainTable.js new file mode 100644 index 0000000..58f0ac7 --- /dev/null +++ b/pc4backstage/hrmengine/components/funcManageDecent/MainTable.js @@ -0,0 +1,100 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableNew +} from 'comsMobx' +import { + Modal, + message +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmFuncManageDecent') +@observer +export default class MainTable extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmFuncManageDecent.getTableInfo(); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.delete(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmFuncManageDecent.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmFuncManageDecent.deleteTableInfo(); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmFuncManageDecent + } = this.props, { + setSelectedRowKeys, + openDialog, + } = hrmFuncManageDecent, { + randomFieldId + } = record, { + index + } = operate; + + if (index == '0' || index == '1') setSelectedRowKeys(randomFieldId); + + switch (index) { + case '0': + openDialog(); + break; + case '1': + this.showConfirm(); + break; + case '2': + message.info(i18n.message.implementation()); + break; + } + + } + + render() { + const { + hrmFuncManageDecent, + } = this.props, { + mainTable, + } = hrmFuncManageDecent, { + tableStore + } = mainTable; + + return ( + this.onOperatesClick(record, rowIndex, operate)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/funcManageDecent/Tab.js b/pc4backstage/hrmengine/components/funcManageDecent/Tab.js new file mode 100644 index 0000000..107eafa --- /dev/null +++ b/pc4backstage/hrmengine/components/funcManageDecent/Tab.js @@ -0,0 +1,263 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx' +import { + Row, + Col, + Spin, + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +import MainTable from './MainTable'; + +@inject('hrmFuncManageDecent') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmFuncManageDecent.getFormInfo(); + } + + componentWillUnmount() { + this.props.hrmFuncManageDecent.resetSearch(); + } + + + getSearchPanelButtons = () => { + const { + hrmFuncManageDecent + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmFuncManageDecent, { + form + } = mainTab; + + const btn = [ + (), + (), + (), + ]; + + return btn; + } + + handleSearch = () => { + const { + hrmFuncManageDecent + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + mainTab, + } = hrmFuncManageDecent, { + isPanelShow + } = mainTab + + getTableInfo(); + isPanelShow && changeSearchPanelStatus(false); + } + + getPanelComponents = () => { + const { + hrmFuncManageDecent + } = this.props, { + mainTab, + } = hrmFuncManageDecent, { + conditions, + form, + loading + } = mainTab, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
    +
    + + {} + +
    + ) + }) + }) + + const com = ( + ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + ) + return com + } + + getDropMenuDatas = () => { + const { + hrmFuncManageDecent, + } = this.props, { + menu, + mainTable, + } = hrmFuncManageDecent, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'batchDelete') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmFuncManageDecent, + } = this.props, { + mainTab, + changeSearchPanelStatus, + } = hrmFuncManageDecent, { + isPanelShow + } = mainTab; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3020', + }); + } + + new = () => { + const { + hrmFuncManageDecent + } = this.props, { + openDialog + } = hrmFuncManageDecent; + + openDialog(); + } + + batchDelete = () => { + const { + hrmFuncManageDecent + } = this.props, { + mainTable, + setSelectedRowKeys, + } = hrmFuncManageDecent; + + const keys = toJS(mainTable.tableStore.selectedRowKeys).toString(); + + setSelectedRowKeys(keys); + + this.showConfirm(); + } + + custom = () => { + const { + hrmFuncManageDecent + } = this.props, { + mainTable, + } = hrmFuncManageDecent, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + _this.props.hrmFuncManageDecent.resetSelectedRowKeys(); + return false + }, + }); + } + + onOk = () => { + this.props.hrmFuncManageDecent.deleteTableInfo(); + } + + render() { + const { + hrmFuncManageDecent + } = this.props, { + mainTab, + changeSearchPanelStatus, + setSearchBaseValue, + } = hrmFuncManageDecent, { + isPanelShow, + conditionCount, + form, + baseSearchValue, + } = mainTab; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.funcManageDecent(),favouritetype:5}} + > + changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
    } + onSearch={() => this.handleSearch()} + onSearchChange={val => setSearchBaseValue(val)} + /> + {form.isFormInit && } +
    + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/funcManageDecent/index.js b/pc4backstage/hrmengine/components/funcManageDecent/index.js new file mode 100644 index 0000000..a2a6497 --- /dev/null +++ b/pc4backstage/hrmengine/components/funcManageDecent/index.js @@ -0,0 +1,118 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, + WeaLeftRightLayout +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import '../../style/funcDecent.css' + +import Header from './Header'; +import Tab from './Tab'; +import MainDialog from './MainDialog'; +import OrganizationTree from '../../coms/OrganizationTree'; + +@inject('hrmFuncManageDecent') +@observer +export default class FuncManageDecent extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.funcManageDecent(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmFuncManageDecent.refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmFuncManageDecent + } = this.props, { + getAuth, + refreshPage, + } = hrmFuncManageDecent; + + getAuth(); + refreshPage(); + } + + render() { + const { + hrmFuncManageDecent + } = this.props, { + main, + detachable, + orgTreeProps + } = hrmFuncManageDecent, { + authorized, + loading + } = main; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + const coms = [ + + ]; + let children; + if(detachable){ + children = ( + }> + {coms} + + ) + }else{ + children = coms; + } + + return ( +
    +
    + {children} +
    + +
    + ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/BasicSet.js b/pc4backstage/hrmengine/components/generalWorkingHours/BasicSet.js new file mode 100644 index 0000000..a1479ee --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/BasicSet.js @@ -0,0 +1,101 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaRightMenu, + WeaSearchGroup, +} from 'ecCom' +import { + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import SpecialForm from './SpecialForm'; +import TableEdit from './TableEdit'; + +@inject('hrmWorkHour') +@observer +export default class BasicSet extends React.Component { + constructor(props) { + super(props); + } + + getDropMenuDatas = () => { + const { + hrmWorkHour + } = this.props, { + formInfo + } = hrmWorkHour, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmWorkHour, + } = this.props, { + save, + } = hrmWorkHour; + + key == '0' && save(); + } + + getCustomComponent = () => { + const { + hrmWorkHour + } = this.props, { + openDialog, + tableEdit + } = hrmWorkHour, { + selectedIndexs + } = tableEdit; + + const buttons = [ + (), + ]; + + return buttons + } + + render() { + const { + hrmWorkHour + } = this.props, { + formInfo + } = hrmWorkHour, { + loading + } = formInfo; + + return ( +
    + {loading ?
    + +
    + : this.handleMenuClick(key)}> + } showGroup={true} /> + } + showGroup={true} + customComponent={this.getCustomComponent()} + /> + + } +
    + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/FormInfo.js b/pc4backstage/hrmengine/components/generalWorkingHours/FormInfo.js new file mode 100644 index 0000000..c267922 --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/FormInfo.js @@ -0,0 +1,114 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaFormItem, + WeaRightMenu, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmWorkHour') +@observer +export default class SpecialForm extends React.Component { + constructor(props) { + super(props); + } + + getForm() { + const { + hrmWorkHour + } = this.props, { + signFormInfo, + } = hrmWorkHour, { + form, + conditions, + } = signFormInfo, { + isFormInit, + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push( + + {index == 2 &&

    {`${i18n.label.format()}08:00-12:00 ${i18n.label.defalutSignTime()}`}

    } + {index == 3 &&

    {`${i18n.label.format()}10.*.*.*;10.16.0.12;10.16.0.13-10.16.0.18`}

    } +
    ) + }) + }) + return
    {arr}
    + } + + getDropMenuDatas = () => { + const { + hrmWorkHour + } = this.props, { + signFormInfo + } = hrmWorkHour, { + loading + } = signFormInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmWorkHour, + } = this.props, { + save, + } = hrmWorkHour; + + key == '0' && save(); + } + + render() { + const { + hrmWorkHour + } = this.props, { + signFormInfo, + date, + } = hrmWorkHour, { + loading, + } = signFormInfo; + + return ( +
    + {loading ?
    + +
    + : this.handleMenuClick(key)}> +
    + {this.getForm()} +
    +
    + } +
    + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/Header.js b/pc4backstage/hrmengine/components/generalWorkingHours/Header.js new file mode 100644 index 0000000..926d34b --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/Header.js @@ -0,0 +1,210 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTop, +} from 'ecCom' +import { + Modal, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; +const confirm = Modal.confirm; + +@inject('hrmWorkHour') +@observer +export default class Header extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmWorkHour + } = this.props, { + getButtonsMenu, + } = hrmWorkHour; + + getButtonsMenu(); + } + + getTopMenuBtns = () => { + const { + hrmWorkHour + } = this.props, { + menu, + mainTable, + } = hrmWorkHour, { + tableStore + } = mainTable; + + let btns = []; + const len = tableStore.selectedRowKeys.length; + toJS(menu.topMenu).map((item, index) => { + if (item.menuFun !== 'batchDel') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmWorkHour + } = this.props, { + searchPanel, + changeSearchPanelStatus + } = hrmWorkHour, { + isPanelShow + } = searchPanel; + + isPanelShow && changeSearchPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + getDropMenuDatas = () => { + const { + hrmWorkHour + } = this.props, { + menu, + mainTable, + } = hrmWorkHour, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection') { + obj.disabled = true; + } + + if (item.menuFun == 'batchDel') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmWorkHour + } = this.props, { + searchPanel, + changeSearchPanelStatus + } = hrmWorkHour, { + isPanelShow + } = searchPanel; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + addnew = () => { + const { + hrmWorkHour + } = this.props, { + openDialog, + } = hrmWorkHour; + + openDialog('main', 'new'); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20038', + }) + } + + batchDel() { + const { + hrmWorkHour + } = this.props, { + mainTable, + setSelectedRowsKeys, + } = hrmWorkHour, { + tableStore, + } = mainTable, { + selectedRowKeys + } = tableStore; + + const keys = toJS(selectedRowKeys).toString(); + + if (!keys) { + message.warning(i18n.message.pleaseConfirmDelRows()); + return; + } + + setSelectedRowsKeys(keys, 'main'); + + this.showConfirm(); + } + + showConfirm = () => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk = () => { + const { + hrmWorkHour + } = this.props, { + deleteTableInfo, + } = hrmWorkHour; + + deleteTableInfo('main'); + } + + render() { + const { + hrmWorkHour + } = this.props, { + main + } = hrmWorkHour, { + title, + } = main; + + return ( + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {this.props.children} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/LeftTree.js b/pc4backstage/hrmengine/components/generalWorkingHours/LeftTree.js new file mode 100644 index 0000000..e9557da --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/LeftTree.js @@ -0,0 +1,63 @@ +import { + WeaOrgTree +} from 'ecCom' +import { + inject, + observer, +} from 'mobx-react' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmWorkHour') +@observer +export default class LeftTree extends React.Component { + constructor(props) { + super(props); + this.tree = null; + this.setRef = element => { + this.tree = element; + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.triggerRefresh !== nextProps.triggerRefresh) { + this.init(); + } + } + + componentDidMount() { + this.init() + } + + init = () => { + if (this.tree) this.tree.reset(() => this.tree.fetchData()); + } + + clickTreeNode = (event, ids, nodeids, nodes) => { + const { + hrmWorkHour + } = this.props, { + clickTreeNode + } = hrmWorkHour; + + clickTreeNode(ids[0], nodes[0].type, nodes[0].name); + } + + render() { + return ( +
    + ${i18n.label.companyInfo()}`} + params={{rightStr:'HrmDefaultScheduleAdd:Add'}} + treeNodeClick = {(event, ids, nodeids, nodes) => this.clickTreeNode(event, ids, nodeids, nodes)} + /> +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/MainDialog.js b/pc4backstage/hrmengine/components/generalWorkingHours/MainDialog.js new file mode 100644 index 0000000..628d6b3 --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/MainDialog.js @@ -0,0 +1,121 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import WorkHourTab from './WorkHourTab'; +import BasicSet from './BasicSet'; + +@inject('hrmWorkHour') +@observer +export default class MainDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 700, + height: 570, + } + } + + getButtons = () => { + const { + hrmWorkHour, + } = this.props, { + save, + tabInfo, + resetBasicSet, + formInfo, + signFormInfo, + } = hrmWorkHour, { + selectedKey + } = tabInfo; + + const datas = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: formInfo.loading, + onClick: () => save(), + }, { + key: '1', + icon: , + content: i18n.button.resetSetting(), + disabled: formInfo.loading, + onClick: () => resetBasicSet(), + }] + + const buttons = [ + (), + (), + () + ]; + + return (selectedKey == '0') ? buttons : buttons.slice(0, 1).concat(buttons.slice(2, 3)); + } + + getComponent = () => { + const { + hrmWorkHour + } = this.props, { + mainDialog, + mainTable, + } = hrmWorkHour, { + contentType, + visible + } = mainDialog; + + return (contentType == 'new') ? visible && : visible && ; + } + + render() { + const { + hrmWorkHour + } = this.props, { + closeDialog, + mainDialog, + } = hrmWorkHour, { + title, + visible, + } = mainDialog, { + width, + height, + } = this.state; + + return ( + closeDialog('main')} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {this.getComponent()} + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/MainTableInfo.js b/pc4backstage/hrmengine/components/generalWorkingHours/MainTableInfo.js new file mode 100644 index 0000000..4fa1f3b --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/MainTableInfo.js @@ -0,0 +1,226 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaRightMenu, +} from 'ecCom' +import { + Modal, + message +} from 'antd' +import { + WeaTableNew +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; +const confirm = Modal.confirm; + +@inject('hrmWorkHour') +@observer +export default class MainTableInfo extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmWorkHour, + } = this.props, { + getTableInfo, + } = hrmWorkHour; + + getTableInfo(); + } + + getDropMenuDatas = () => { + const { + hrmWorkHour, + } = this.props, { + menu, + mainTable, + } = hrmWorkHour, { + rightMenu + } = menu; + + const len = mainTable.tableStore.selectedRowKeys.length; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection') { + obj.disabled = true; + } + if (item.menuFun == 'batchDel') { + obj.disabled = len > 0 ? false : true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmWorkHour, + } = this.props, { + searchPanel, + changeSearchPanelStatus, + } = hrmWorkHour, { + isPanelShow + } = searchPanel; + + isPanelShow && changeSearchPanelStatus(false); + this[key] && this[key](); + } + + addnew = () => { + const { + hrmWorkHour + } = this.props, { + openDialog, + } = hrmWorkHour; + + openDialog('main', 'new'); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20038', + }) + } + + batchDel() { + const { + hrmWorkHour + } = this.props, { + mainTable, + setSelectedRowsKeys, + } = hrmWorkHour, { + tableStore, + } = mainTable, { + selectedRowKeys + } = tableStore; + + const keys = toJS(selectedRowKeys).toString(); + + setSelectedRowsKeys(keys, 'main'); + + this.showConfirm('batchDel'); + } + + custom = () => { + const { + hrmWorkHour + } = this.props, { + mainTable, + } = hrmWorkHour, { + tableStore + } = mainTable; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + showConfirm = (type) => { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: type == 'singleDel' ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk = () => { + const { + hrmWorkHour, + } = this.props, { + deleteTableInfo, + } = hrmWorkHour; + + deleteTableInfo(); + } + + onOperatesClick = (record, rowIndex, operate) => { + const { + hrmWorkHour, + } = this.props, { + setSelectedRowsKeys, + setCurScope, + openDialog, + openLogDialog, + clickTab, + } = hrmWorkHour, { + randomFieldId, + scheduleType + } = record, { + index + } = operate; + + setSelectedRowsKeys(randomFieldId, 'main'); + + setCurScope(scheduleType); + + switch (index) { + case '0': + openDialog('main', 'edit') + break; + case '3': + openDialog('main', 'edit'); + clickTab('1'); + break; + case '1': + this.showConfirm('singleDel') + break; + case '2': + window.setLogViewProps({ + logSmallType: '20038', + targetId: randomFieldId + }) + break; + } + + } + + render() { + const { + hrmWorkHour, + } = this.props, { + mainTable, + } = hrmWorkHour, { + tableStore + } = mainTable; + + return ( + this.handleMenuClick(key)} + collectParams={{favname:i18n.module.generalWorkingHours(),favouritetype:5}} + > + this.onOperatesClick(record, rowIndex, operate)} + /> + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/Search.js b/pc4backstage/hrmengine/components/generalWorkingHours/Search.js new file mode 100644 index 0000000..1211dd8 --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/Search.js @@ -0,0 +1,151 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, + WeaFormItem, +} from 'ecCom' +import { + WeaSwitch, +} from 'comsMobx' +import { + Row, + Col, + Spin, + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmWorkHour') +@observer +export default class Search extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmWorkHour + } = this.props, { + getFormInfo + } = hrmWorkHour; + + getFormInfo('search'); + } + + componentWillUnmount() { + const { + hrmWorkHour + } = this.props, { + resetSearchInfo + } = hrmWorkHour; + + resetSearchInfo(); + } + + getSearchPanelButtons = () => { + const { + hrmWorkHour + } = this.props, { + searchPanel, + changeSearchPanelStatus, + } = hrmWorkHour, { + form + } = searchPanel; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + + getPanelComponents = () => { + const { + hrmWorkHour + } = this.props, { + searchPanel, + } = hrmWorkHour, { + conditions, + form, + loading + } = searchPanel, { + isFormInit + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + arr.push(
    +
    + + {} + +
    + ) + }) + }) + + const com = ( + ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()}>{arr} + ) + return com + } + + handleSearch = () => { + const { + hrmWorkHour + } = this.props, { + changeSearchPanelStatus, + getTableInfo, + searchPanel, + } = hrmWorkHour, { + isPanelShow + } = searchPanel + + getTableInfo(); + isPanelShow && changeSearchPanelStatus(false); + } + + render() { + const { + hrmWorkHour + } = this.props, { + searchPanel, + changeSearchPanelStatus, + setBaseSearchValue + } = hrmWorkHour, { + form, + isPanelShow, + conditionCount, + baseSearchValue, + } = searchPanel; + + return ( + changeSearchPanelStatus(b)} + hideSearchAd={ () => changeSearchPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
    } + onSearch={() => this.handleSearch()} + onSearchChange={val => setBaseSearchValue(val)} + /> + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/SpecialForm.js b/pc4backstage/hrmengine/components/generalWorkingHours/SpecialForm.js new file mode 100644 index 0000000..0732c8e --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/SpecialForm.js @@ -0,0 +1,107 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaFormItem, +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + WeaSwitch +} from 'comsMobx' + +@inject('hrmWorkHour') +@observer +export default class SpecialForm extends React.Component { + constructor(props) { + super(props); + } + + getForm() { + const { + hrmWorkHour + } = this.props, { + formInfo, + } = hrmWorkHour, { + form, + conditions, + selectedScopeValue, + selectedNumberValue, + } = formInfo, { + isFormInit, + } = form; + + let arr = []; + isFormInit && conditions.map(c => { + c.items.map((field, index) => { + const key = field.domkey[0]; + if (selectedScopeValue == '3' && key == 'relatedId') { + return + } + if (selectedNumberValue == '1' && key == 'signStartTime') { + return + } + arr.push( + this.handleChange(callbackInfo)}/> + ) + }) + }) + return
    {arr}
    + } + + handleChange = (callbackInfo) => { + const { + hrmWorkHour + } = this.props, { + exportSelectedValue, + changeSignForm, + mainDialog, + formInfo, + } = hrmWorkHour, { + contentType + } = mainDialog; + + if (Object.keys(callbackInfo)[0] == 'scheduleType') { + const val = callbackInfo.scheduleType.value; + exportSelectedValue(val, 'scope'); + contentType == 'edit' && changeSignForm(); + + val == '3' && formInfo.form.updateFields({ + relatedId: { + value: '', + } + }); + } + if (Object.keys(callbackInfo)[0] == 'signType') { + exportSelectedValue(callbackInfo.signType.value, 'number') + } + if (Object.keys(callbackInfo)[0] == 'signStartTime') { + exportSelectedValue(callbackInfo.signStartTime.value, 'time') + } + } + + render() { + const { + hrmWorkHour + } = this.props, { + formInfo, + date, + } = hrmWorkHour, { + loading, + } = formInfo; + + return this.getForm() + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/StaticFormInfo.js b/pc4backstage/hrmengine/components/generalWorkingHours/StaticFormInfo.js new file mode 100644 index 0000000..7636db9 --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/StaticFormInfo.js @@ -0,0 +1,124 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaFormItem, + WeaRightMenu, + WeaSelect, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmWorkHour') +@observer +export default class FormInfo extends React.Component { + constructor(props) { + super(props); + } + + componentWillUnmount() { + const { + hrmWorkHour + } = this.props, { + resetSelectInfo + } = hrmWorkHour; + + resetSelectInfo(); + } + + getDropMenuDatas = () => { + const { + hrmWorkHour + } = this.props, { + formInfo + } = hrmWorkHour, { + loading + } = formInfo; + + const menu = [{ + key: '0', + icon: , + content: i18n.button.save(), + disabled: loading, + }]; + + return menu + } + + handleMenuClick = (key) => { + const { + hrmWorkHour, + } = this.props, { + closeDialog, + synchro, + } = hrmWorkHour; + + if (key == '0') { + closeDialog(); + synchro(); + } + } + + getForm = () => { + const { + hrmWorkHour + } = this.props, { + selectCom, + setSelectDateIndex + } = hrmWorkHour, { + selectedValue + } = selectCom; + + const options = [{ + key: "0", + selected: false, + showname: i18n.label.monday(), + }, { + key: "1", + selected: false, + showname: i18n.label.tuesday(), + }, { + key: "2", + selected: false, + showname: i18n.label.wednesday(), + }, { + key: "3", + selected: false, + showname: i18n.label.thursday(), + }, { + key: "4", + selected: false, + showname: i18n.label.friday(), + }, { + key: "5", + selected: false, + showname: i18n.label.saturday(), + }, { + key: "6", + selected: false, + showname: i18n.label.sunday(), + }] + return ( + + setSelectDateIndex(key)}/> + + ) + } + + render() { + return ( + this.handleMenuClick(key)}> +
    + {this.getForm()} +
    +
    + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/SubDialog.js b/pc4backstage/hrmengine/components/generalWorkingHours/SubDialog.js new file mode 100644 index 0000000..c0ad7de --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/SubDialog.js @@ -0,0 +1,77 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import StaticFormInfo from './StaticFormInfo'; + +@inject('hrmWorkHour') +@observer +export default class SubDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 700, + height: 90, + } + } + + getButtons = () => { + const { + hrmWorkHour, + } = this.props, { + closeDialog, + synchro, + } = hrmWorkHour; + + let buttons = [ + (), + () + ]; + + return buttons; + } + + render() { + const { + hrmWorkHour, + } = this.props, { + subDialog, + closeDialog, + } = hrmWorkHour, { + visible, + title, + } = subDialog, { + width, + height, + } = this.state; + + return ( + closeDialog('sub')} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + {visible && } + + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/TableEdit.js b/pc4backstage/hrmengine/components/generalWorkingHours/TableEdit.js new file mode 100644 index 0000000..f151600 --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/TableEdit.js @@ -0,0 +1,94 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTableEdit, + WeaTimeRangePicker, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmWorkHour') +@observer +export default class TableEdit extends React.Component { + constructor(props) { + super(props); + } + + getColumns = () => { + const { + hrmWorkHour + } = this.props, { + changeAm, + changePm + } = hrmWorkHour; + + const columns = [{ + title: i18n.label.daytime(), + dataIndex: 'day', + key: 'day', + render: (text) => ( + {text} + ) + }, { + title: i18n.label.am(), + key: 'am', + render: (text, record) => ( + changeAm(cb,record.key)}/> + ), + }, { + title: i18n.label.pm(), + key: 'pm', + render: (text, record) => ( + changePm(cb,record.key)}/> + ), + }] + + return columns; + } + + render() { + const { + hrmWorkHour + } = this.props, { + tableEdit, + setTableEditDatas, + setSelectedIndex, + setRef, + mainDialog, + } = hrmWorkHour, { + datas, + selectedIndexs, + totalTime, + } = tableEdit; + + return ( +
    + setRef(com)} + columns={this.getColumns()} + datas={toJS(datas)} + showAdd={false} + showCopy={false} + showDelete={false} + showTitle={false} + selectedRowKeys={toJS(selectedIndexs)} + onRowSelect={indexs => setSelectedIndex(indexs)} + onChange={datas => setTableEditDatas(datas)} + /> + {mainDialog.contentType == 'edit' ?

    + {i18n.label.workingTime()} + {totalTime} +

    + :
    + } +
    + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/WorkHourTab.js b/pc4backstage/hrmengine/components/generalWorkingHours/WorkHourTab.js new file mode 100644 index 0000000..e8f7a93 --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/WorkHourTab.js @@ -0,0 +1,95 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaTab, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +import FormInfo from './FormInfo'; +import BasicSet from './BasicSet'; + +@inject('hrmWorkHour') +@observer +export default class WorkHourTab extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmWorkHour, + params + } = this.props, { + setSelectedRowsKeys + } = hrmWorkHour, { + id + } = params; + + setSelectedRowsKeys(id); + } + + componentWillUnmount() { + const { + hrmWorkHour + } = this.props, { + clickTab + } = hrmWorkHour; + + clickTab('0'); + } + + getTab = () => { + const tabs = [{ + key: '0', + title: i18n.label.basicSetting(), + }, { + key: '1', + title: i18n.label.onlineAttendanceSet(), + }] + + return tabs + } + + getComponent = () => { + const { + hrmWorkHour + } = this.props, { + tabInfo + } = hrmWorkHour, { + selectedKey + } = tabInfo; + + return (selectedKey == '0') ? : ; + } + + render() { + const { + hrmWorkHour + } = this.props, { + clickTab, + tabInfo + } = hrmWorkHour, { + selectedKey + } = tabInfo; + + return ( +
    + clickTab(key)} + /> + {this.getComponent()} +
    + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/generalWorkingHours/index.js b/pc4backstage/hrmengine/components/generalWorkingHours/index.js new file mode 100644 index 0000000..bc8262a --- /dev/null +++ b/pc4backstage/hrmengine/components/generalWorkingHours/index.js @@ -0,0 +1,129 @@ +import React from 'react' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaAlertPage, + WeaLeftRightLayout +} from 'ecCom' +import { + Spin, +} from 'antd' +import { + i18n +} from '../../public/i18n'; + +import '../../style/workHour.css' + +import Header from './Header'; +import Search from './Search'; +import LeftTree from './LeftTree'; +import MainTableInfo from './MainTableInfo'; +import MainDialog from './MainDialog'; +import SubDialog from './SubDialog'; + +@inject('hrmWorkHour') +@observer +export default class WorkHour extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.generalWorkingHours(); + } + } + + componentWillReceiveProps(nextProps) { + const { + hrmWorkHour + } = this.props, { + refreshPage + } = hrmWorkHour; + + if (this.props.location.key !== nextProps.location.key) { + refreshPage(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmWorkHour + } = this.props, { + getAuth, + forceLeftTreeRefresh, + } = hrmWorkHour; + + getAuth(); + forceLeftTreeRefresh() + } + + componentWillUnmount() { + const { + hrmWorkHour + } = this.props, { + closeAuth, + clickTreeNode, + } = hrmWorkHour; + + closeAuth(); + clickTreeNode('0', '0', i18n.module.generalWorkingHours()) + } + + render() { + const { + hrmWorkHour + } = this.props, { + main, + leftTree, + } = hrmWorkHour, { + authorized, + loading + } = main, { + triggerRefresh + } = leftTree; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( +
    +
    + } + > + + + +
    + + +
    + ) + } + } + + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Dismiss.js b/pc4backstage/hrmengine/components/humanStatusChange/Dismiss.js new file mode 100644 index 0000000..b8ffa7b --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Dismiss.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +import AuthAdjust from '../authAdjust/index' +import {addContentPath} from '../../util/index.js' + +const WrappedForm = HocFactory(Info); + +@inject('hrmDismissSet') +@observer +export default class Dismiss extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.dismiss(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmDismissSet + } = this.props, { + mobxDataReset, + getRight + } = hrmDismissSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmDismissSet + } = this.props, { + menu, + saveLoading, + } = hrmDismissSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmDismissSet + } = this.props, { + menu, + saveLoading, + } = hrmDismissSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + + log = () => { + window.setLogViewProps({ + logSmallType: '20045', + }); + } + + save() { + const { + hrmDismissSet + } = this.props, { + save + } = hrmDismissSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.dismiss() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // }, + { + key: '2', + title: i18n.module.authAdjust() + } + ] + + return tabName; + } + + render() { + const { + hrmDismissSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmDismissSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={(selectedKey == '0') ? this.getTopMenuBtns() : []} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && } + {selectedKey == '1' &&
    } + {selectedKey == '2' &&
    } +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Formal.js b/pc4backstage/hrmengine/components/humanStatusChange/Formal.js new file mode 100644 index 0000000..8552a63 --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Formal.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; +import {addContentPath} from '../../util/index.js' + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +import AuthAdjust from '../authAdjust/index' + +const WrappedForm = HocFactory(Info); + +@inject('hrmFormalSet') +@observer +export default class Formal extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.formal(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmFormalSet + } = this.props, { + mobxDataReset, + getRight + } = hrmFormalSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmFormalSet + } = this.props, { + menu, + saveLoading, + } = hrmFormalSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmFormalSet + } = this.props, { + menu, + saveLoading, + } = hrmFormalSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20046', + }); + } + + save() { + const { + hrmFormalSet + } = this.props, { + save + } = hrmFormalSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.formal() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // }, + { + key: '2', + title: i18n.module.authAdjust() + } + ] + + return tabName; + } + + render() { + const { + hrmFormalSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmFormalSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={(selectedKey == '0') ? this.getTopMenuBtns() : []} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && } + {selectedKey == '1' &&
    } + {selectedKey == '2' &&
    } +
    +
    + ) + } + + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/HocFactory.js b/pc4backstage/hrmengine/components/humanStatusChange/HocFactory.js new file mode 100644 index 0000000..6ee8f16 --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/HocFactory.js @@ -0,0 +1,21 @@ +const HocFactory = (WrappedComponent) => { + return class Hoc extends React.Component { + constructor(props) { + super(props); + } + + render() { + let style = { + width: '46%', + marginLeft: '26%', + marginTop: 30, + } + + return + } + } +} + +export { + HocFactory +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Info.js b/pc4backstage/hrmengine/components/humanStatusChange/Info.js new file mode 100644 index 0000000..c13ea61 --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Info.js @@ -0,0 +1,49 @@ +import { + WeaFormItem +} from 'ecCom' + +import { + WeaSwitch +} from 'comsMobx' + +export default class Info extends React.Component { + constructor(props) { + super(props); + } + + getForm() { + const { + form, + condition, + isFormInit, + wholeFormStyle, + onFormChange, + } = this.props; + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + arr.push( + onFormChange ? onFormChange(cb) : {} }/> + ) + }) + }); + + return
    {arr}
    + } + + render() { + const { + loading + } = this.props; + + return (!loading && this.getForm()) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Quit.js b/pc4backstage/hrmengine/components/humanStatusChange/Quit.js new file mode 100644 index 0000000..b1f2ae9 --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Quit.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; +import {addContentPath} from '../../util/index.js' + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +import AuthAdjust from '../authAdjust/index' + +const WrappedForm = HocFactory(Info); + +@inject('hrmQuitSet') +@observer +export default class Quit extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.quit(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmQuitSet + } = this.props, { + mobxDataReset, + getRight + } = hrmQuitSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmQuitSet + } = this.props, { + menu, + saveLoading, + } = hrmQuitSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmQuitSet + } = this.props, { + menu, + saveLoading, + } = hrmQuitSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20043', + }); + } + + save() { + const { + hrmQuitSet + } = this.props, { + save + } = hrmQuitSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.quit() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // }, + { + key: '2', + title: i18n.module.authAdjust() + } + ] + + return tabName; + } + + render() { + const { + hrmQuitSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmQuitSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={(selectedKey == '0') ? this.getTopMenuBtns() : []} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && } + {selectedKey == '1' &&
    } + {selectedKey == '2' &&
    } +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Rehire.js b/pc4backstage/hrmengine/components/humanStatusChange/Rehire.js new file mode 100644 index 0000000..abb28c2 --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Rehire.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; +import {addContentPath} from '../../util/index.js' + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +const WrappedForm = HocFactory(Info); + +@inject('hrmRehireSet') +@observer +export default class Rehire extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.rehire(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmRehireSet + } = this.props, { + mobxDataReset, + getRight + } = hrmRehireSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmRehireSet + } = this.props, { + menu, + saveLoading, + } = hrmRehireSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmRehireSet + } = this.props, { + menu, + saveLoading, + } = hrmRehireSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + + log = () => { + window.setLogViewProps({ + logSmallType: '20048', + }); + } + + save() { + const { + hrmRehireSet + } = this.props, { + save + } = hrmRehireSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.rehire() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // } + ] + + return tabName; + } + + handleFormChange = (cb) => { + if (Object.keys(cb)[0] === 'tempresourceid') { + this.props.hrmRehireSet.getReHireSource(cb.tempresourceid.value); + } + } + + render() { + const { + hrmRehireSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmRehireSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={(selectedKey == '0') ? this.getDropMenuDatas() : []} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && this.handleFormChange(cb)}/>} + {selectedKey == '1' &&
    } +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Renew.js b/pc4backstage/hrmengine/components/humanStatusChange/Renew.js new file mode 100644 index 0000000..bfa47cf --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Renew.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; +import {addContentPath} from '../../util/index.js' + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +import AuthAdjust from '../authAdjust/index' + +const WrappedForm = HocFactory(Info); + +@inject('hrmRenewSet') +@observer +export default class Renew extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.renew(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmRenewSet + } = this.props, { + mobxDataReset, + getRight + } = hrmRenewSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmRenewSet + } = this.props, { + menu, + saveLoading, + } = hrmRenewSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmRenewSet + } = this.props, { + menu, + saveLoading, + } = hrmRenewSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20044', + }); + } + + save() { + const { + hrmRenewSet + } = this.props, { + save + } = hrmRenewSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.renew() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // }, + { + key: '2', + title: i18n.module.authAdjust() + } + ] + + return tabName; + } + + render() { + const { + hrmRenewSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmRenewSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={(selectedKey == '0') ? this.getTopMenuBtns() : []} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && } + {selectedKey == '1' &&
    } + {selectedKey == '2' &&
    } +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Retire.js b/pc4backstage/hrmengine/components/humanStatusChange/Retire.js new file mode 100644 index 0000000..444976e --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Retire.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +import AuthAdjust from '../authAdjust/index' +import {addContentPath} from '../../util/index.js' + +const WrappedForm = HocFactory(Info); + +@inject('hrmRetireSet') +@observer +export default class Retire extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.retire(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmRetireSet + } = this.props, { + mobxDataReset, + getRight + } = hrmRetireSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmRetireSet + } = this.props, { + menu, + saveLoading, + } = hrmRetireSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmRetireSet + } = this.props, { + menu, + saveLoading, + } = hrmRetireSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20049', + }); + } + + save() { + const { + hrmRetireSet + } = this.props, { + save + } = hrmRetireSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.retire() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // }, + { + key: '2', + title: i18n.module.authAdjust() + } + ] + + return tabName; + } + + render() { + const { + hrmRetireSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmRetireSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={(selectedKey == '0') ? this.getTopMenuBtns() : []} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && } + {selectedKey == '1' &&
    } + {selectedKey == '2' &&
    } +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Transfer.js b/pc4backstage/hrmengine/components/humanStatusChange/Transfer.js new file mode 100644 index 0000000..066f063 --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Transfer.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +import AuthAdjust from '../authAdjust/index' +import {addContentPath} from '../../util/index.js' + +const WrappedForm = HocFactory(Info); + +@inject('hrmTransferSet') +@observer +export default class Transfer extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.personTransfer(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmTransferSet + } = this.props, { + mobxDataReset, + getRight + } = hrmTransferSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmTransferSet + } = this.props, { + menu, + saveLoading, + } = hrmTransferSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmTransferSet + } = this.props, { + menu, + saveLoading, + } = hrmTransferSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20047', + }); + } + + save() { + const { + hrmTransferSet + } = this.props, { + save + } = hrmTransferSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.personTransfer() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // }, + { + key: '2', + title: i18n.module.authAdjust() + } + ] + + return tabName; + } + + render() { + const { + hrmTransferSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmTransferSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={(selectedKey == '0') ? this.getTopMenuBtns() : []} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && } + {selectedKey == '1' &&
    } + {selectedKey == '2' &&
    } +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/humanStatusChange/Trial.js b/pc4backstage/hrmengine/components/humanStatusChange/Trial.js new file mode 100644 index 0000000..ac111c8 --- /dev/null +++ b/pc4backstage/hrmengine/components/humanStatusChange/Trial.js @@ -0,0 +1,228 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaPopoverHrm, +} from 'ecCom' + +import { + Spin, + Button +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; + +const toJS = mobx.toJS; + +import Info from './Info' +import { + HocFactory +} from './HocFactory' + +import AuthAdjust from '../authAdjust/index' +import {addContentPath} from '../../util/index.js' + +const WrappedForm = HocFactory(Info); + +@inject('hrmTrialSet') +@observer +export default class Trial extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.trial(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmTrialSet + } = this.props, { + mobxDataReset, + getRight + } = hrmTrialSet; + + mobxDataReset(); + getRight(); + } + + getTopMenuBtns() { + const { + hrmTrialSet + } = this.props, { + menu, + saveLoading, + } = hrmTrialSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + btns.push(); + }); + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + getDropMenuDatas() { + const { + hrmTrialSet + } = this.props, { + menu, + saveLoading, + } = hrmTrialSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + if (item.menuFun == 'save') { + obj.disabled = saveLoading; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '20050', + }); + } + + save() { + const { + hrmTrialSet + } = this.props, { + save + } = hrmTrialSet; + + save(); + } + + getTabName() { + const tabName = [{ + key: '0', + title: i18n.module.trial() + }, + // { + // key: '1', + // title: i18n.label.untreatedMatters() + // }, + { + key: '2', + title: i18n.module.authAdjust() + } + ] + + return tabName; + } + + render() { + const { + hrmTrialSet + } = this.props, { + date, + weaTopTitle, + selectedKey, + authorized, + setSelectedKey, + tabOne, + loading, + } = hrmTrialSet; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:weaTopTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={(selectedKey == '0') ? this.getTopMenuBtns() : []} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + setSelectedKey(key)} + /> + + {selectedKey == '0' && } + {selectedKey == '1' &&
    } + {selectedKey == '2' &&
    } +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/import/index.js b/pc4backstage/hrmengine/components/import/index.js new file mode 100644 index 0000000..2848bfc --- /dev/null +++ b/pc4backstage/hrmengine/components/import/index.js @@ -0,0 +1,204 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaAlertPage, +} from 'ecCom' +import { + Spin, +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import ImportResource from '../importresource/Import'; +import Import from '../importRelatedComponet/index' +import {addContentPath} from '../../util/index.js' +import '../../style/import.css' + +@inject('hrmBasicDataImport') +@inject('hrmImportResource') +@inject('hrmImportCommon') +@observer +export default class BasicInfoImport extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.basicInfoImport(); + } + } + + componentDidMount() { + const { + hrmBasicDataImport + } = this.props, { + getRight + } = hrmBasicDataImport; + + getRight(); + } + + getImportCard = () => { + const { + hrmBasicDataImport + } = this.props, { + isMouseOver, + curIndex, + cardConfig, + setMouseStatus, + } = hrmBasicDataImport; + + let arr = []; + + cardConfig.map((c, index) => { + arr.push(
    setMouseStatus(index, true)} onMouseLeave={() => setMouseStatus(index, false)}> +
    + { curIndex == index && isMouseOver ? this.getLinkName(c.linkName,index) : this.getIcon(c.icon)} + { curIndex == index && isMouseOver ? this.getSubTitle(c.subTitle,c.url) : this.getTitle(c.title)} +
    +
    ) + }); + return arr; + } + + getIcon = (icon) => { + return (
    + +
    ) + } + + getTitle = (title) => { + return (
    {title}
    ) + } + + getLinkName = (linkName, index) => { + return () + } + + getSubTitle = (subTitle, url) => { + return () + } + + handleClick = (index) => { + const { + hrmImportResource, + hrmImportCommon, + } = this.props, { + setTempletName, + setImportDialogTitle, + setImportType, + setImportDialogVisible + } = hrmImportCommon; + + switch (index) { + case 0: //@lvyi + hrmImportResource.visible = true; + hrmImportResource.title = i18n.button.importOrg(); + hrmImportResource.importType = 'company'; + hrmImportResource.getImportForm(); + break; + case 1: + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.postSystemImport()); + setImportType('jobtitle'); + setImportDialogVisible(true); + break; + case 2: //@lvyi + hrmImportResource.visible = true; + hrmImportResource.title = i18n.button.importResource(); + hrmImportResource.importType = 'resource'; + hrmImportResource.getImportForm(); + break; + case 3: + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.groupInfoImport()); + setImportType('group'); + setImportDialogVisible(true); + break; + case 4: + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.personalAndWorkInfoImport()); + setImportType('resourcedetial'); + setImportDialogVisible(true); + break; + case 5: + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.areaInfoImport()); + setImportType('area'); + setImportDialogVisible(true); + break; + case 6: + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.workingPlaceImport()); + setImportType('location'); + setImportDialogVisible(true); + break; + case 7: + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.majorImport()); + setImportType('special'); + setImportDialogVisible(true); + break; + } + + } + + render() { + const { + hrmBasicDataImport, + hrmImportResource, + hrmImportCommon, + } = this.props, { + title, + isMouseOver, + loading, + authorized, + } = hrmBasicDataImport; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + } + iconBgcolor='#217346' + loading={true} + showDropIcon={true} + > +
    {this.getImportCard()}
    + {hrmImportResource.visible && } + {hrmImportCommon.importDialog.visible && } +
    + ) + } + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importExternalAttendanceData/index.js b/pc4backstage/hrmengine/components/importExternalAttendanceData/index.js new file mode 100644 index 0000000..289fd10 --- /dev/null +++ b/pc4backstage/hrmengine/components/importExternalAttendanceData/index.js @@ -0,0 +1,112 @@ +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu, + WeaSearchGroup, + WeaNewScroll +} from 'ecCom'; +import FormInfo from '../../coms/FormInfo'; +import ImportResource from '../importresource/Import'; +import { + i18n +} from '../../public/i18n'; + +@inject('hrmImportExternalAttendance') +@inject('hrmImportResource') +@observer +export default class ImportExtenalAttendanceData extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentWillUnmount() { + const { + hrmImportExternalAttendance: store, + } = this.props; + store.resetImportResource(); + } + + init = () => { + const { + hrmImportExternalAttendance: store, + hrmImportResource + } = this.props; + const { + checkAuthorized, + initData + } = store; + store.setImportResource(hrmImportResource); + checkAuthorized('schedulesignimport', null, initData); + } + + render() { + const { + hrmImportExternalAttendance: store + } = this.props; + const { + containerInitFinished, + topBtnAndMenu, + message + } = store; + const { + btns, + menus + } = topBtnAndMenu(); + let children = []; + if (message.length > 0) { + message.map(m => { + children.push(
    {m}
    ) + }) + } + const msgCom =
    {children}
    ; + + return ( +
    + { + containerInitFinished.init && containerInitFinished.authorized && + } + iconBgcolor='#217346' + showDropIcon={true} + buttons={btns} + dropMenuDatas={menus} + > + + + + { + message.length > 0 && + + } + + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
    {i18n.message.authFailed()}
    +
    + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importRelatedComponet/ImportHistory.js b/pc4backstage/hrmengine/components/importRelatedComponet/ImportHistory.js new file mode 100644 index 0000000..763fa16 --- /dev/null +++ b/pc4backstage/hrmengine/components/importRelatedComponet/ImportHistory.js @@ -0,0 +1,119 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaDialog, + WeaMoreButton, +} from 'ecCom' +import { + Button, +} from 'antd' +import { + WeaTableNew +} from 'comsMobx'; +import { + jumpToHrmCard +} from '../../public/pulic-func' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; + +import ImportLog from './ImportLog' +import ImportResult from './ImportResult' + +@inject('hrmImportCommon') +@observer +export default class ImportHistory extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 870, + height: 510, + } + } + + reRenderColumns(c) { + const { + hrmImportCommon + } = this.props, { + jumpToImportResult + } = hrmImportCommon; + + + c.forEach(item => { + if (item.dataIndex == 'operator') { + item.render = function(text, record) { + return jumpToHrmCard(record.operator)}>{record.operatorspan} + } + } + if (item.dataIndex == 'allnum') { + item.render = function(text, record) { + return jumpToImportResult(record.randomFieldId)}>{record.allnumspan} + } + } + }); + } + + getButtons() { + const { + hrmImportCommon + } = this.props, { + recordDialog, + queryLog, + } = hrmImportCommon, { + loading + } = recordDialog; + + return [ + (), + () + ]; + } + + render() { + const { + hrmImportCommon + } = this.props, { + recordDialog, + logDialog, + resultDialog, + setRecordDialogVisible + } = hrmImportCommon, { + title, + visible, + tableStore + } = recordDialog, { + width, + height + } = this.state; + + return ( +
    + setRecordDialogVisible(false)} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + index} + getColumns={c => this.reRenderColumns(c)} + /> + + {logDialog.visible && } + {resultDialog.visible && } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importRelatedComponet/ImportLog.js b/pc4backstage/hrmengine/components/importRelatedComponet/ImportLog.js new file mode 100644 index 0000000..690674a --- /dev/null +++ b/pc4backstage/hrmengine/components/importRelatedComponet/ImportLog.js @@ -0,0 +1,172 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTab, + WeaDialog, + WeaFormItem, + WeaMoreButton, +} from 'ecCom' +import { + Row, + Col, + Spin, + Button, +} from 'antd' +import { + WeaSwitch, + WeaTableNew +} from 'comsMobx' +import { + jumpToHrmCard +} from '../../public/pulic-func' +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmImportCommon') +@observer +export default class ImportLog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 870, + height: 510, + isPanelShow: false, + num: 5, + } + } + + getPanelComponents() { + const { + hrmImportCommon + } = this.props, { + logDialog + } = hrmImportCommon, { + form, + condition, + loading + } = logDialog, { + isFormInit + } = form; + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + arr.push( +
    +
    + + {} + +
    + + ) + }) + }) + + return { + if (e.keyCode == 13 && e.target.tagName === "INPUT") { + hrmImportCommon.searchLogInfo(); + hrmImportCommon.setLogPanelStatus(false) + } + }}>{arr} + } + + reRenderColumns(c) { + c.forEach(item => { + if (item.dataIndex == 'operator') { + item.render = function(text, record) { + return jumpToHrmCard(record.operator)}>{record.operatorspan} + } + } + if (item.dataIndex == 'status') { + item.render = function(text, record) { + return {record.status == '1' ? {i18n.label.success()} : {i18n.label.fail()}} + } + } + }); + } + + getDialogButtons = () => { + const buttons = [ + () + ]; + return buttons + } + + getSearchPanelButtons = () => { + const { + hrmImportCommon + } = this.props, { + searchLogInfo, + setLogPanelStatus, + logDialog, + } = hrmImportCommon, { + form + } = logDialog; + + return [ + (), + (), + (), + ]; + } + + render() { + const { + hrmImportCommon + } = this.props, { + logDialog, + setLogDialogVisible, + setLogPanelStatus, + } = hrmImportCommon, { + title, + visible, + isPanelShow, + tableStore, + } = logDialog, { + width, + height, + num + } = this.state; + + return ( + setLogDialogVisible(false)} + buttons={this.getDialogButtons()} + style={{width: width, height: height}} + onChangeHeight={h => this.setState({height: h})} + > + setLogPanelStatus(bool) } + hideSearchAd={ () => setLogPanelStatus(false) } + searchsAd= {this.getPanelComponents()} + advanceHeight={ Math.ceil(num / 2) * 42 + 10} + hasMask={false} + buttonsAd={this.getSearchPanelButtons()} + /> + index} + getColumns={c => this.reRenderColumns(c)} + /> + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importRelatedComponet/ImportResult.js b/pc4backstage/hrmengine/components/importRelatedComponet/ImportResult.js new file mode 100644 index 0000000..c7cefb2 --- /dev/null +++ b/pc4backstage/hrmengine/components/importRelatedComponet/ImportResult.js @@ -0,0 +1,227 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaDialog, + WeaNewScroll, + WeaMoreButton, +} from 'ecCom' +import { + Row, + Col, + Icon, + Spin, + Modal, + Table, + Button, +} from 'antd' +import { + WeaTableNew +} from 'comsMobx'; +import { + toJS +} from 'mobx'; +import { + i18n +} from '../../public/i18n'; +const WeaTable = WeaTableNew.WeaTable; + +import ImportLog from './ImportLog' + +@inject('hrmImportCommon') +@observer +export default class ImportResult extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 740, + height: 450, + } + } + + getButtons = () => { + const { + hrmImportCommon + } = this.props, { + resultDialog, + setLogDialogVisible, + } = hrmImportCommon, { + failnum, + succnum, + importStatus + } = resultDialog; + + const buttons = []; + + if (importStatus == 'over' || importStatus == 'error') { + // if (failnum > 0 && succnum > 0) { + // buttons.push(); + // } + // buttons.push(); + buttons.push(); + } + buttons.push(); + + return buttons; + } + + reRenderColumns = (c) => { + c.forEach(item => { + if (item.dataIndex == 'operatedetail') { + item.render = function(text, record) { + return {text} + } + } + }); + } + + getErrorInfo = () => { + const { + hrmImportCommon + } = this.props, { + resultDialog + } = hrmImportCommon, { + errorTip, + errorInfo + } = resultDialog + + const columns = [{ + "title": i18n.label.confirmInfo(), + "width": "100%", + "dataIndex": "message", + render: (text, record, index) => { + return {text} + } + }]; + + const elements =
    +
    +
    + +
    + {errorTip} +
    +
    + ; + return elements; + } + + getResultInfo = () => { + const { + hrmImportCommon + } = this.props, { + resultDialog + } = hrmImportCommon, { + succnum, + failnum, + tableStore, + } = resultDialog, { + height + } = this.state; + + const icon =
    0 ? '#54D3A2' : '#FF0000',marginLeft: 270 }} className='hrm-import-error-tip'> + 0 ? 'check' : 'cross'} style={{ color: '#fff',fontSize: 18 }} /> +
    ; + const tip = 0 ? '#54D3A2' : '#FF0000'}}>{(succnum > 0 && failnum == 0) ? i18n.label.importResourceResultInfo1().replace('{rownum}',`${succnum+failnum}`) : i18n.label.importResourceResultInfo().replace('{rownum}',`${succnum+failnum}`).replace('{succnum}',`${succnum}`)} + + const resultTable = ((succnum + failnum > 0) && failnum > 0) && index} + getColumns={c => this.reRenderColumns(c)} + /> + return
    +
    0) && failnum > 0) ? {marginTop: 20} : {marginTop: height/2 -30}}>{icon}{tip}
    +
    {resultTable}
    +
    + } + + getImportProcessInfo = () => { + const { + hrmImportCommon + } = this.props, { + resultDialog + } = hrmImportCommon, { + datas, + importStatus + } = resultDialog; + + const columns = [{ + "title": i18n.label.row(), + "width": "15%", + "dataIndex": "rownum" + }, { + "title": i18n.label.status(), + "width": "15%", + "dataIndex": "status", + render: (text, record, index) => { + return {text=='1'?i18n.label.success():i18n.label.fail()} + } + }, { + "title": i18n.label.confirmInfo(), + "width": "70%", + "dataIndex": "message", + render: (text, record, index) => { + return {text} + } + }]; + + const loadingTip = (importStatus !== 'over' || importStatus !== 'error') && ; + + const processTable =
    + + return
    +
    {loadingTip}
    +
    {processTable}
    +
    + } + + render() { + const { + hrmImportCommon + } = this.props, { + resultDialog, + logDialog, + setResultInfoDialogVisible, + hasErrorInfo, + setScoll + } = hrmImportCommon, { + title, + visible, + importStatus, + errorInfo, + loading + } = resultDialog, { + width, + height + } = this.state; + + return ( +
    + setResultInfoDialogVisible(false)} + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + + setScoll(com)}> + { + !loading && (hasErrorInfo(errorInfo) ? this.getErrorInfo(errorInfo) : + (importStatus == 'over' || importStatus == 'error' ) ? this.getResultInfo() : this.getImportProcessInfo() ) + } + + + + {logDialog.visible && } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importRelatedComponet/index.js b/pc4backstage/hrmengine/components/importRelatedComponet/index.js new file mode 100644 index 0000000..07b47fb --- /dev/null +++ b/pc4backstage/hrmengine/components/importRelatedComponet/index.js @@ -0,0 +1,278 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaUpload, + WeaDialog, + WeaSelect, + WeaNewScroll, + WeaMoreButton, + WeaSearchGroup, +} from 'ecCom' +import { + WeaSwitch +} from 'comsMobx'; +import { + Row, + Col, + Spin, + Button, +} from 'antd' +import { + IEVersion +} from '../../public/pulic-func' +import { + i18n +} from '../../public/i18n'; +import {addContentPath} from '../../util/index.js' +import {AlertPage} from '../../public/learn.js'; +import ImportResult from './ImportResult' +import ImportHistory from './ImportHistory' + +@inject('hrmImportCommon') +@observer +export default class Import extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 870, + height: 510, + list: [], + upStatus: '', + } + } + + getForm = () => { + const { + hrmImportCommon + } = this.props, { + importDialog + } = hrmImportCommon, { + condition, + form, + } = importDialog, { + isFormInit + } = form; + + let _arr = []; + isFormInit && condition.map((c, i) => { + let arr = []; + if (i == 0) { //基本信息 + c.items.map((field, index) => { + let key = field.domkey[0]; + let url = field.value ? field.value : ''; + arr.push({ + com: ( + +
    +
    +
    {index + 1}
    +
    + +
    + + {field.label.length > 14 ? `${field.label.slice(0, 14)}...` : field.label}: + + {this.getElements(key, url, field)} + + + + + ), + colSpan: 1, + }) + }) + } + if (i == 1) { //导入说明 + c.items.map((field, index) => { + let p = field.value; + let url = field.link ? field.link : ''; + arr.push({ + com: ( + + +
    8) ? 3 : 6}}> +
    {index + 1}
    +
    + +
    + {this.getImportInstructions(p, url, index)} + + + ), + colSpan: 1 + }) + }) + } + _arr.push(
    ) + }); + return _arr; + } + + getElements = (key, url, field) => { + const { + hrmImportCommon + } = this.props, { + setExcelFileNo, + importDialog, + setSelectedValue + } = hrmImportCommon, { + templetName, + selectedValue, + form, + } = importDialog, { + upStatus, + list + } = this.state; + + let dom; + if (key == 'templet') { + dom = this.getTempletElement(url, selectedValue, templetName); + } else if (key == 'excelfile') { + dom = (
    +
    + {this.setState({list:list}); setExcelFileNo(id)}} + onUploading={status => this.handleUploading(status)} + > + + +
    +
    + { list.length == 0 ?

    {i18n.label.noFileSelected()}

    : list.map(file =>

    {file.filename}

    ) } +
    +
    ) + } else { + dom = + } + return dom; + } + + getImportInstructions = (val, url, index) => { + const { + hrmImportCommon + } = this.props, { + importDialog + } = hrmImportCommon, { + templetName, + selectedValue, + form, + } = importDialog; + + let p; + if (index == 0) { + let dom = this.getTempletElement(url, selectedValue, templetName); + p = (

    {i18n.label.downloadTemplateFirst()}:{dom}

    ); + } else { + p = (

    {val}

    ); + } + return p; + } + + getTempletElement = (url, selectedValue, templetName) => { + const { + hrmImportCommon + } = this.props, { + importDialog + } = hrmImportCommon, { + form, + } = importDialog; + + const keyField = form.getFormParams().keyField; + + let dom; + let urlArr = url.split(';'); + if (urlArr.length > 1) { + if (keyField === 'workcode') { + dom = {templetName}; + } else { + dom = {templetName}; + } + } else { + dom = {templetName}; + } + return dom + } + + handleUploading = (status) => { + this.setState({ + upStatus: status + }); + + if (status == 'uploading') { + this.setState({ + list: [] + }); + } + } + + getButtons = () => { + const { + hrmImportCommon + } = this.props, { + submitExcel, + queryRecord, + importDialog, + } = hrmImportCommon, { + upStatus + } = this.state; + const{condition} = importDialog; + + const btns= [ + (), + (), + () + ]; + return condition.length ? btns : btns.slice(-1); + } + + render() { + const { + hrmImportCommon + } = this.props, { + importDialog, + resultDialog, + recordDialog, + setImportDialogVisible + } = hrmImportCommon, { + visible, + title, + loading, + condition, + } = importDialog, { + width, + height, + } = this.state; + + return ( +
    + setImportDialogVisible(false) } + buttons={ this.getButtons() } + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + { condition.length ? ( + + + {this.getForm()} + + + ) : } + + {resultDialog.visible && } + {recordDialog.visible && } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importorg/Import.js b/pc4backstage/hrmengine/components/importorg/Import.js new file mode 100644 index 0000000..52ed170 --- /dev/null +++ b/pc4backstage/hrmengine/components/importorg/Import.js @@ -0,0 +1,235 @@ +import { inject, observer } from 'mobx-react'; +import { + WeaUpload, + WeaDialog, + WeaFormItem, + WeaSearchGroup, + WeaNewScroll, + WeaSelect, +} from 'ecCom' + +import { + Row, + Col, + Button, +} from 'antd' + +import { WeaSwitch } from 'comsMobx' +import React from 'react' +import ImportResult from './ImportResult' +import ImportHistory from './ImportHistory' +import {WeaLocaleProvider} from 'ecCom'; +import {addContentPath} from '../../util/index.js'; +import {AlertPage} from '../../public/learn.js'; +const getLabel = WeaLocaleProvider.getLabel; + +@inject('hrmImportOrg') +@observer +class ImportOrg extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { hrmImportOrg } = this.props; + hrmImportOrg.list = []; + } + + getCircle() { + let style = { + width: 20, + height: 20, + backgroundColor: '#D8D8D8', + webkitBorderRadius: 10, + mozBorderRadius: 10, + msBorderRadius: 10, + oBorderRadius: 10, + borderRadius: 10, + paddingLeft: 6, + } + return style; + } + + getForm() { + const { hrmImportOrg } = this.props; + const { condition } = hrmImportOrg; + let _arr = []; + + condition.map((c, i) => { + let arr = []; + if (i == 0) {//基本信息 + c.items.map((field, index) => { + arr.push({ + com: ( +
    + +
    +
    +
    {index + 1}
    +
    + +
    +
    + +
    {field.label}: + + {this.getDom(field)} + + + + + + + ), + colSpan: 1, + }) + }) + } + if (i == 1) {//导入说明 + c.items.map((field, index) => { + arr.push({ + com: ( +
    + +
    +
    +
    {index + 1}
    +
    + +
    + {this.getIllustration(field.value, field.link, index)} + + + + ), + colSpan: 1 + }) + }) + } + _arr.push(
    ) + + }); + return _arr; + } + + getDom(field) { + const { hrmImportOrg } = this.props; + const { templetName, filelist } = hrmImportOrg; + let dom; + let domkey = field.domkey; + if (domkey[0] == 'templet') { + dom = {templetName}; + } else if (domkey[0] == 'excelfile') { + dom = (
    +
    + { this.setFileId(ids, list) }} + > + + +
    +
    + {filelist.length == 0 ?

    未选择任何文件

    : filelist.map(file =>

    {file.filename}

    )} +
    +
    ) + } else if (domkey[0] == 'keyField') { + dom = { hrmImportOrg.keyField = v }} + vw + /> + } else if (domkey[0] == 'importType') { + dom = { hrmImportOrg.importType = v }} + /> + } + return dom; + } + + getIllustration(val, url, index) { + const { hrmImportOrg } = this.props; + const { templetName } = hrmImportOrg; + let p; + if (index == 0) { + p = (

    请先下载模板:{templetName}

    ); + } else { + p = (

    ); + } + return p; + } + + setFileId(ids, list) { + const { hrmImportOrg } = this.props; + hrmImportOrg.excelfile = ids; + hrmImportOrg.filelist = list; + } + + onUploading(s) { + const { hrmImportOrg } = this.props; + hrmImportOrg.status = s; + } + + submit() { + const { hrmImportOrg } = this.props; + hrmImportOrg.saveImport(); + } + + cancel() { + const { hrmImportOrg } = this.props; + hrmImportOrg.filelist = []; + hrmImportOrg.visible = false + } + + importHistoryQuery() { + const { hrmImportOrg } = this.props; + hrmImportOrg.visibleHistory = true; + hrmImportOrg.getImportHistory(); + } + + render() { + const { hrmImportOrg } = this.props; + const { title, visible ,condition} = hrmImportOrg; + + const buttons = [ + (), + (), + () + ]; + + let dialogHeight = window.innerHeight-250; + if(dialogHeight>560)dialogHeight = 560; + + return ( +
    + this.cancel()} + buttons={buttons} + style={{ width: 870, height: dialogHeight }} + > + { condition.length ? ( + + {this.getForm()} + + ) : } + + + +
    + ) + } +} + +export default ImportOrg \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importorg/ImportHistory.js b/pc4backstage/hrmengine/components/importorg/ImportHistory.js new file mode 100644 index 0000000..06c0c79 --- /dev/null +++ b/pc4backstage/hrmengine/components/importorg/ImportHistory.js @@ -0,0 +1,100 @@ +import { inject, observer } from 'mobx-react'; +import { + WeaDialog, +} from 'ecCom' + +import { + Modal, + Table, + Button, +} from 'antd' + +import React from 'react' +import { WeaTableNew } from 'comsMobx'; +import ImportLog from './ImportLog' + +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmImportOrg') +@observer +class ImportHistory extends React.Component { + constructor(props) { + super(props); + } + + reRenderColumns(c) { + let _this = this; + c.forEach(item => { + if (item.dataIndex == 'operator') { + item.render = function (text, record) { + return _this.jumpToHrmCard(record.operator)}>{record.operatorspan} + } + } + if (item.dataIndex == 'allnum') { + item.render = function (text, record) { + return _this.jumpToImportResult(record.randomFieldId)}>{record.allnumspan} + } + } + }); + } + + jumpToHrmCard(id) { + window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${id}`); + } + + jumpToImportResult(pId) { + const { hrmImportOrg } = this.props; + hrmImportOrg.visibleResult = true; + hrmImportOrg.getImportResult({ pId }); + } + + queryImportLog() { + const { hrmImportOrg } = this.props; + hrmImportOrg.getImportLogDetail(); + hrmImportOrg.getImportLogSearchCondition(); + hrmImportOrg.visibleImportLog = true; + } + + cancel() { + const { hrmImportOrg } = this.props; + hrmImportOrg.visibleHistory = false; + } + + render() { + const { hrmImportOrg } = this.props; + const { titleHistory, visibleHistory, onCancel, importHistoryStore } = hrmImportOrg; + const buttons = [ + (), + () + ]; + return ( +
    + + { + visibleHistory && + this.cancel()} + buttons={buttons} + style={{ width: 870, height: 510 }} + > + index} + getColumns={c => this.reRenderColumns(c)} + /> + + } +
    + ) + } +} + +export default ImportHistory \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importorg/ImportLog.js b/pc4backstage/hrmengine/components/importorg/ImportLog.js new file mode 100644 index 0000000..bdffeae --- /dev/null +++ b/pc4backstage/hrmengine/components/importorg/ImportLog.js @@ -0,0 +1,137 @@ +import { inject, observer} from 'mobx-react'; +import { + WeaTab, + WeaDialog, + WeaFormItem, + WeaSearchGroup, +}from 'ecCom' + +import { + Row, + Col, + Button, +} from 'antd' +import * as mobx from 'mobx'; +const toJS = mobx.toJS; +import {WeaSwitch} from 'comsMobx' +import { WeaTableNew } from 'comsMobx'; +import React from 'react' + +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmImportOrg') +@observer +class ImportLog extends React.Component{ + constructor(props){ + super(props); + } + + componentWillReceiveProps (nextProps){ + + } + + getSearchs() { + const { hrmImportOrg } = this.props; + const { form,searchCondition } = hrmImportOrg; + + const {isFormInit} = form; + let group = []; + + const formParams = form.getFormParams(); + isFormInit && toJS(searchCondition).map(c =>{ + let items = []; + c.items.map(fields => { + let hide = false; + let dom = ; + items.push({ + com:( + {dom} + ), + colSpan:1, + hide: hide + }) + }); + group.push() + }); + return group; + } + + jumpToHrmCard(id) { + window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${id}`); + } + + reRenderColumns(c){ + let _this = this; + c.forEach( item => { + if(item.dataIndex == 'operator'){ + item.render = function(text, record){ + return _this.jumpToHrmCard(record.operator)}>{record.operatorspan} + } + } + }); + } + + cancel(){ + const { hrmImportOrg } = this.props; + hrmImportOrg.visibleImportLog=false; + } + + render(){ + const { hrmImportOrg } = this.props; + const { form,titleImportLog, visibleImportLog, importLogStore, showSearchAd } = hrmImportOrg; + const btn = [ + (), + (), + () + ] + const buttons = [ + () + ]; + return ( +
    + { + visibleImportLog && + { this.cancel()} } + buttons={buttons} + style={{width: 870, height: 510}} + > + { + if (e.keyCode == 13&& e.target.tagName === "INPUT") + { + hrmImportOrg.doSearch(); + hrmImportOrg.showSearchAd=false} + } + } }>{this.getSearchs()}
    } + setShowSearchAd={bool => {hrmImportOrg.showSearchAd = bool}} + hideSearchAd={() => hrmImportOrg.showSearchAd = false} + advanceHeight={190} + hasMask={false} + buttonsAd={btn} + /> + index} + getColumns={c => this.reRenderColumns(c)} + /> + + } +
    + ) + } +} + +export default ImportLog \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importorg/ImportResult.js b/pc4backstage/hrmengine/components/importorg/ImportResult.js new file mode 100644 index 0000000..b4d4eae --- /dev/null +++ b/pc4backstage/hrmengine/components/importorg/ImportResult.js @@ -0,0 +1,131 @@ +import { inject, observer} from 'mobx-react'; +import { + WeaDialog, + WeaNewScroll, +}from 'ecCom' + +import { + Row, + Col, + Icon, + Spin, + Modal, + Table, + Button, +} from 'antd' +import isEmpty from 'lodash/isEmpty'; +import React from 'react' +import { WeaTableNew } from 'comsMobx'; +import { toJS } from 'mobx'; + +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmImportOrg') +@observer +class ImportResult extends React.Component{ + constructor(props){ + super(props); + } + + componentDidMount(){ + const { hrmImportOrg } = this.props; + hrmImportOrg.errorInfo = ''; + //hrmImportOrg.ref=this.refs["scroll"]; + } + + getButtons(){ + const { hrmImportOrg } = this.props; + const { failnum,importStatus} = hrmImportOrg; + const buttons = []; + if(importStatus == 'over'){ + if(failnum>0){ + buttons.push(); + } + buttons.push(); + buttons.push(); + } + buttons.push(); + + return buttons; + } + + reRenderColumns(c){ + c.forEach( item => { + if(item.dataIndex == 'operatedetail'){ + item.render = function(text, record){ + return {text} + } + } + }); + } + + cancel(){ + const { hrmImportOrg } = this.props; + hrmImportOrg.visibleResult = false; + } + + getImportLog(){ + const { hrmImportOrg } = this.props; + hrmImportOrg.visibleImportLog = true; + hrmImportOrg.getImportLogSearchCondition(); + hrmImportOrg.getImportLogDetail(); + } + + render(){ + const { hrmImportOrg } = this.props; + const { titleResult, visibleResult, importResultColumns, importProcessLogDatas,failnum, succnum, importResultTip,importResultStore, importStatus,errorInfo } = hrmImportOrg; + return ( +
    + { + visibleResult && + this.cancel()} + buttons={this.getButtons()} + style={{width: 720, height: 340}} + > +
    + { + importStatus!='over' || importStatus == 'error'?
    + { + errorInfo!=''?
    : +
    + } +
    + +
    + + + :
    +
    +
    0? '#54D3A2' : '#FF0000' }}> + 0?'check':'cross'} style={{color: '#fff' }} /> +
    {importResultTip} +
    + { + failnum>0&& + index} + getColumns={c => this.reRenderColumns(c)} + /> + } +
    + } + + + } + + ) + } +} + +export default ImportResult \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importresource/Import.js b/pc4backstage/hrmengine/components/importresource/Import.js new file mode 100644 index 0000000..303ae01 --- /dev/null +++ b/pc4backstage/hrmengine/components/importresource/Import.js @@ -0,0 +1,356 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaUpload, + WeaDialog, + WeaFormItem, + WeaSearchGroup, + WeaNewScroll, + WeaSelect, + WeaInput +} from 'ecCom' + +import { + Row, + Col, + Button, + Spin +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' +import React from 'react' +import ImportResult from './ImportResult' +import ImportHistory from './ImportHistory' +import { + WeaLocaleProvider +} from 'ecCom'; +import { + i18n +} from '../../public/i18n'; +import {addContentPath} from '../../util/index.js' +import {AlertPage} from '../../public/learn.js'; +import '../../style/common.less' + +@inject('hrmImportResource') +@observer +class ImportResource extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmImportResource + } = this.props; + hrmImportResource.list = []; + } + + getCircle() { + let style = { + width: 20, + height: 20, + backgroundColor: '#D8D8D8', + webkitBorderRadius: 10, + mozBorderRadius: 10, + msBorderRadius: 10, + oBorderRadius: 10, + borderRadius: 10, + //paddingLeft: 6, + textAlign: 'center', + } + return style; + } + + getForm() { + const { + hrmImportResource + } = this.props; + const { + condition + } = hrmImportResource; + let _arr = []; + + condition.map((c, i) => { + let arr = []; + if (i == 0) { //基本信息 + c.items.map((field, index) => { + arr.push({ + com: ( +
    + +
    +
    +
    {index + 1}
    +
    + +
    +
    + +
    {field.label}: + + {this.getDom(field)} + + + + + + + ), + colSpan: 1, + }) + }) + } + if (i == 1) { //导入说明 + c.items.map((field, index) => { + arr.push({ + com: ( +
    + +
    +
    +
    {index + 1}
    +
    + +
    + {this.getIllustration(field.value, field.link, index, field)} + + + + ), + colSpan: 1 + }) + }) + } + _arr.push(
    ) + + }); + return _arr; + } + + getDom(field) { + const { + hrmImportResource + } = this.props; + const { + templetName, + filelist, + getTemplateUrl, + importParams + } = hrmImportResource; + let dom; + let domkey = field.domkey; + if (domkey[0] == 'templet') { + dom = {i18n.label.importTemplate()}; + } else if (domkey[0] === 'exportData') { + const href = hrmImportResource.operateType === 'add' ? field.otherParams.fileVal[0].add : field.otherParams.fileVal[0].update; + if(hrmImportResource.importType === 'matrix'){ + dom = {getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType, importParams)}}>{i18n.label.importTemplate()} + }else + dom = {i18n.label.importTemplate()}; + } else if (domkey[0] == 'excelfile' || domkey[0] == 'importfile') { + dom = (
    +
    + { + this.setFileId(ids, list) + } + } > + + +
    +
    + {filelist.length == 0 ?

    {i18n.label.noFileSelected()}

    : filelist.map(file =>

    {file.filename}

    )} +
    +
    ) + } else if (domkey[0].indexOf('keyField') > -1) { + const vals = field.options.filter(v => v.selected == true); + let val = ''; + vals.length>0 && (val = vals[0].key); + dom = { hrmImportResource.setParam(domkey[0], v)}} + /> + } else if (domkey[0] == 'importType') { + dom = { hrmImportResource.operateType = v }} + /> + } else { + dom = + } + return dom; + } + + getIllustration(val, url, index, link) { + const { + hrmImportResource + } = this.props; + const { + templetName, + getTemplateUrl, + importParams + } = hrmImportResource; + let p; + if (index == 0) { + if (url instanceof Object) { + const href = hrmImportResource.operateType === 'add' ? url.add : url.update; + let dom; + if(hrmImportResource.importType === 'matrix'){ + dom = {getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType, importParams)}}>{i18n.label.importTemplate()} + }else + dom = {i18n.label.importTemplate()}; + p = (

    {i18n.label.downLoadTemplete()}:{dom}

    ); + } else if (url != null) { + if(hrmImportResource.importType === 'matrix'){ + p = (

    {i18n.label.downLoadTemplete()}: {getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType)}}>{i18n.label.importTemplate()}

    ); + }else + p = (

    {i18n.label.downLoadTemplete()}:{i18n.label.importTemplate()}

    ); + } else { + p = (

    ); + } + } else { + p = (

    ); + } + return p; + } + + setFileId(ids, list) { + const { + hrmImportResource + } = this.props; + hrmImportResource.excelfile = ids; + hrmImportResource.filelist = list; + } + + onUploading(s) { + const { + hrmImportResource + } = this.props; + hrmImportResource.status = s; + } + + submit() { + const { + hrmImportResource + } = this.props; + hrmImportResource.saveImport({}, () => { + this.refs.scroll && this.refs.scroll.scrollToLast() + }); + } + + cancel() { + const { + hrmImportResource, + onClose + } = this.props; + hrmImportResource.visible = false + hrmImportResource.init(); + onClose && onClose(); + } + + importHistoryQuery() { + const { + hrmImportResource + } = this.props; + hrmImportResource.visibleHistory = true; + hrmImportResource.getImportHistory(); + } + + render() { + const { + hrmImportResource, + mainTitle, + importLog, + viewLog, + viewLogTitle, + } = this.props; + const { + title, + visible, + titleResult, + visibleResult, + importResultColumns, + importProcessLogDatas, + failnum, + succnum, + importResultTip, + importResultStore, + importStatus, + errorInfo, + setScrollRef, + single, + showLoadingSpin, + condition + } = hrmImportResource; + const buttons = condition.length ? [ + (), + (), + ] : []; + + let dialogHeight = window.innerHeight - 150; + if (dialogHeight > 560) dialogHeight = 560; + + return ( +
    + { + single && visible ? + + {this.getForm()} + + : + this.cancel()} + buttons={buttons} + style={{ width: 870, height: dialogHeight }} + moreBtn={{datas:condition ? [{ + key: '1', + content: i18n.button.submit(), + icon: , + onClick: () => this.submit(), + }, + { + key: '2', + content: importLog || i18n.button.importHistoryQuery(), + icon: , + onClick: () => this.importHistoryQuery(), + } + ]: []}} + > + { condition.length ? ( + + + {this.getForm()} + + + ): } + + } + + + +
    + ) + } +} + +export default ImportResource \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importresource/ImportHistory.js b/pc4backstage/hrmengine/components/importresource/ImportHistory.js new file mode 100644 index 0000000..d13699c --- /dev/null +++ b/pc4backstage/hrmengine/components/importresource/ImportHistory.js @@ -0,0 +1,137 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaDialog, +} from 'ecCom' + +import { + Modal, + Table, + Button, +} from 'antd' + +import React from 'react' +import { + WeaTableNew +} from 'comsMobx'; +import ImportLog from './ImportLog' +import { + i18n +} from '../../public/i18n'; + +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmImportResource') +@observer +class ImportHistory extends React.Component { + constructor(props) { + super(props); + } + + reRenderColumns(c) { + let _this = this; + c.forEach(item => { + if (item.dataIndex == 'operator') { + item.render = function(text, record) { + return _this.jumpToHrmCard(record.operator)}>{record.operatorspan} + } + } + if (item.dataIndex == 'allnum') { + item.render = function(text, record) { + return _this.jumpToImportResult(record.randomFieldId)}>{record.allnumspan} + } + } + }); + } + + jumpToHrmCard(id) { + window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${id}`); + } + + jumpToImportResult(pId) { + const { + hrmImportResource + } = this.props; + hrmImportResource.dialogKey = new Date().getTime(); + hrmImportResource.visibleResult = true; + hrmImportResource.getImportResult({ + pId, + importType: 'resource' + }); + } + + queryImportLog() { + const { + hrmImportResource + } = this.props; + let params = {}; + params.importType = 'resource'; + hrmImportResource.pId = ''; + hrmImportResource.getImportLogDetail(params); + hrmImportResource.getImportLogSearchCondition(params); + hrmImportResource.visibleImportLog = true; + } + + cancel() { + const { + hrmImportResource + } = this.props; + hrmImportResource.visibleHistory = false; + } + + render() { + const { + hrmImportResource, + importLog, + viewLog, + } = this.props; + const { + titleHistory, + visibleHistory, + onCancel, + importHistoryStore + } = hrmImportResource; + const buttons = [ + (), + ]; + let dialogHeight = window.innerHeight - 150; + if (dialogHeight > 510) dialogHeight = 510; + return ( +
    + + {visibleHistory && + this.cancel()} + buttons={buttons} + style={{ width: 870, height: dialogHeight }} + moreBtn={{datas:[{ + key: '1', + content: viewLog || i18n.button.queryImportLog(), + icon: , + onClick: () => this.queryImportLog(), + } + ]}} + > + index} + getColumns={c => this.reRenderColumns(c)} + /> + + } +
    + ) + } +} + +export default ImportHistory \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importresource/ImportLog.js b/pc4backstage/hrmengine/components/importresource/ImportLog.js new file mode 100644 index 0000000..38a6484 --- /dev/null +++ b/pc4backstage/hrmengine/components/importresource/ImportLog.js @@ -0,0 +1,175 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTab, + WeaDialog, + WeaFormItem, + WeaSearchGroup, +} from 'ecCom' + +import { + Row, + Col, + Button, +} from 'antd' +import * as mobx from 'mobx'; +const toJS = mobx.toJS; +import { + WeaSwitch +} from 'comsMobx' +import { + WeaTableNew +} from 'comsMobx'; +import React from 'react' + +const WeaTable = WeaTableNew.WeaTable; +import { + i18n +} from '../../public/i18n'; + +@inject('hrmImportResource') +@observer +class ImportLog extends React.Component { + constructor(props) { + super(props); + } + + componentWillReceiveProps(nextProps) { + + } + + getSearchs() { + const { + hrmImportResource + } = this.props; + const { + form, + searchCondition + } = hrmImportResource; + + const { + isFormInit + } = form; + let group = []; + + const formParams = form.getFormParams(); + isFormInit && toJS(searchCondition).map((c, i) => { + let items = []; + c.items.map((fields, index) => { + let hide = false; + let dom = ; + items.push({ + com: ( + {dom} + ), + colSpan: 1, + hide: hide + }) + }); + group.push() + }); + return group; + } + + jumpToHrmCard(id) { + window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${id}`); + } + + reRenderColumns(c) { + let _this = this; + let status = ""; + c.forEach(item => { + if (item.dataIndex == 'operator') { + item.render = function(text, record) { + return _this.jumpToHrmCard(record.operator)}>{record.operatorspan} + } + } else if (item.dataIndex == 'status') { + item.render = function(text, record) { + status = text; + return {text=='1'?i18n.label.success():i18n.label.fail()} + } + } else if (item.dataIndex == 'operatedetail') { + item.render = function(text, record) { + return {status=="1"?"":text} + } + } + }); + } + + cancel() { + const { + hrmImportResource + } = this.props; + hrmImportResource.visibleImportLog = false; + } + + render() { + const { + hrmImportResource, + viewLogTitle + } = this.props; + const { + form, + titleImportLog, + visibleImportLog, + importLogStore, + showSearchAd + } = hrmImportResource; + const btn = [ + (), + (), + () + ] + return ( +
    + { + visibleImportLog && + { this.cancel()} } + //buttons={buttons} + style={{width: 970, height: 510}} + > + { + if (e.keyCode == 13 && e.target.tagName === "INPUT") { + hrmImportResource.doSearch(); + hrmImportResource.showSearchAd=false + } + } + } + >{this.getSearchs()}
    } + setShowSearchAd={bool => {hrmImportResource.showSearchAd = bool}} + hideSearchAd={() => hrmImportResource.showSearchAd = false} + advanceHeight={200} + hasMask={false} + buttonsAd={btn} + /> + index} + getColumns={c => this.reRenderColumns(c)} + /> + + } +
    + ) + } +} + +export default ImportLog \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/importresource/ImportResult.js b/pc4backstage/hrmengine/components/importresource/ImportResult.js new file mode 100644 index 0000000..e3e1ed2 --- /dev/null +++ b/pc4backstage/hrmengine/components/importresource/ImportResult.js @@ -0,0 +1,185 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaDialog, + WeaNewScroll, +} from 'ecCom' + +import { + Row, + Col, + Icon, + Spin, + Modal, + Table, + Button, +} from 'antd' +import isEmpty from 'lodash/isEmpty'; +import React from 'react' +import { + WeaTableNew +} from 'comsMobx'; +import { + toJS +} from 'mobx'; + +const WeaTable = WeaTableNew.WeaTable; +import { + i18n +} from '../../public/i18n'; + +@inject('hrmImportResource') +@observer +class ImportResult extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmImportResource + } = this.props; + hrmImportResource.errorInfo = ''; + } + + getButtons() { + const { + hrmImportResource + } = this.props; + const { + failnum, + importStatus + } = hrmImportResource; + const buttons = []; + if (importStatus == 'over') { + // if (failnum > 0) { + // buttons.push(); + // } + // buttons.push(); + buttons.push(); + } + + return buttons; + } + + reRenderColumns(c) { + c.forEach(item => { + if (item.dataIndex == 'operatedetail') { + item.render = function(text, record) { + return {text} + } + } + }); + } + + cancel() { + const { + hrmImportResource + } = this.props; + this.dialogKey = new Date().getTime(); + hrmImportResource.visibleResult = false; + } + + getImportLog() { + const { + hrmImportResource + } = this.props; + hrmImportResource.visibleImportLog = true; + let params = {}; + params.importType = 'resource'; + hrmImportResource.getImportLogSearchCondition(params); + hrmImportResource.getImportLogDetail(params); + } + + render() { + const { + hrmImportResource + } = this.props; + const { + titleResult, + visibleResult, + importResultColumns, + importProcessLogDatas, + failnum, + succnum, + importResultTip, + importResultStore, + importStatus, + errorInfo, + setScrollRef, + dialogKey + } = hrmImportResource; + const buttons = []; + if (importStatus == 'over') { + buttons.push( + { + key: '1', + content: i18n.button.getImportLog(), + icon: , + onClick: () => this.getImportLog(), + } + ); + } + return ( +
    + { + visibleResult && + this.cancel()} + buttons={this.getButtons()} + style={{ width: 720, height: 480 }} + moreBtn={{datas:buttons}} + > +
    + { + importStatus == '' || importStatus == 'importing' || importStatus == 'error'?
    + { + importStatus == 'error'?
    +
    + +
    {importResultTip} +
    : +
    + } +
    + {hrmImportResource.setScrollTarget(scroll)}}> +
    + + + :
    +
    +
    0 ? '#54D3A2' : '#FF0000' }}> + 0 ? 'check' : 'cross'} style={{ color: '#fff' }} /> +
    {importResultTip} +
    + { + failnum > 0 && + index} + getColumns={c => this.reRenderColumns(c)} + /> + } +
    + } + + + } + + ) + } +} + +export default ImportResult \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/leaveType/index.js b/pc4backstage/hrmengine/components/leaveType/index.js new file mode 100644 index 0000000..676e536 --- /dev/null +++ b/pc4backstage/hrmengine/components/leaveType/index.js @@ -0,0 +1,93 @@ +import '../../style/leaveType.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu, + WeaNewScroll, + WeaTableEdit +} from 'ecCom'; +import { + i18n +} from '../../public/i18n'; + +@inject('hrmLeaveType') + +@observer +export default class LeaveType extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmLeaveType: store + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('schedule/leaveType', null, initData); + } + + render() { + const { + hrmLeaveType: store + } = this.props; + const { + containerInitFinished, + topBtnAndMenu, + tableConfig, + setTableRef, + onRowSelect, + getRowSelection, + onDelete + } = store; + const { + btns, + menus + } = topBtnAndMenu(); + const topProps = { + title: i18n.module.leaveType(), + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + buttons: btns, + dropMenuDatas: menus + } + return ( +
    + { + containerInitFinished.init && containerInitFinished.authorized && + + + setTableRef(ref)} onRowSelect={onRowSelect} getRowSelection={getRowSelection} onDelete={onDelete}/> + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
    {i18n.message.authFailed()}
    +
    + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/levelProtection/BasicInfo.js b/pc4backstage/hrmengine/components/levelProtection/BasicInfo.js new file mode 100644 index 0000000..53da078 --- /dev/null +++ b/pc4backstage/hrmengine/components/levelProtection/BasicInfo.js @@ -0,0 +1,106 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaLocaleProvider, +} from 'ecCom'; +import { + Button +} from 'antd'; +import {addContentPath} from '../../util/index.js' +import {i18n} from '../../public/i18n.js' +const getLabel = WeaLocaleProvider.getLabel; + +const Status = props => { + const { + isOpen, + handleClick + } = props; + + return ( +
    + + {`${getLabel('507093','分级保护')} : `} + + + { + isOpen ? getLabel('387099','已启用'): getLabel('32386','未启用') + } + + { + !isOpen && + } +
    + ) +} + +const Description = props => { + const { + description + } = props; + + return ( +
    { + description.map((desc,index) =>

    {(index > 0) ? `${index}. ${desc}` : `${desc.replace("?","•")}`}

    ) + }
    + ) +} + +@inject('hrmLevelProtection') +@observer +export default class BasicInfo extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmLevelProtection: store + } = this.props; + + store.getBasicInfo(); + } + + render() { + const { + hrmLevelProtection: store + } = this.props; + const { + basicInfo, + IMGURL, + handleOpenBtnClick, + isCrc, + crcDescription, + handleTamper, + } = store, { + description, + isOpenClassification, + } = basicInfo; + + return ( +
    +
    + +
    +
    + handleOpenBtnClick()} + /> + + {isOpenClassification && ( +
    + {`${i18n.label['529914']()}: `} + {isCrc ? i18n.label['387099']() : i18n.label['32386']()} + { !isCrc && } + {crcDescription.map(d =>

    {d}

    )} +
    + )} +
    +
    + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/levelProtection/Tab.js b/pc4backstage/hrmengine/components/levelProtection/Tab.js new file mode 100644 index 0000000..6a0891b --- /dev/null +++ b/pc4backstage/hrmengine/components/levelProtection/Tab.js @@ -0,0 +1,43 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTab +} from 'ecCom'; + +import BasicInfo from './BasicInfo'; +import Table from './Table'; + +@inject('hrmLevelProtection') +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + hrmLevelProtection: store + } = this.props; + + const { + TABCONFIG, + tab + } = store, { + selectedKey + } = tab; + + return ( +
    + + { + (selectedKey === '0') ? :
    + } + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/levelProtection/Table.js b/pc4backstage/hrmengine/components/levelProtection/Table.js new file mode 100644 index 0000000..91efa1a --- /dev/null +++ b/pc4backstage/hrmengine/components/levelProtection/Table.js @@ -0,0 +1,42 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + toJS, +} from 'mobx'; +import { + WeaTableEditable +} from 'ecCom'; + +@inject('hrmLevelProtection') +@observer +export default class Table extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + hrmLevelProtection: store + } = this.props; + + const { + table, + TABLECONFIG, + cells, + validator, + setTableRef + } = store; + + return ( + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/levelProtection/Top.js b/pc4backstage/hrmengine/components/levelProtection/Top.js new file mode 100644 index 0000000..8863fe3 --- /dev/null +++ b/pc4backstage/hrmengine/components/levelProtection/Top.js @@ -0,0 +1,45 @@ +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaRightMenu, +} from 'ecCom'; + +import Tab from './Tab'; + +@inject('hrmLevelProtection') +@observer +export default class Top extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.hrmLevelProtection.getRightMenu(); + } + + render() { + const { + topProps, + toploading, + topButtons, + dropMenuDatas, + } = this.props.hrmLevelProtection; + + return ( + + + + + + ); + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/levelProtection/index.js b/pc4backstage/hrmengine/components/levelProtection/index.js new file mode 100644 index 0000000..7367675 --- /dev/null +++ b/pc4backstage/hrmengine/components/levelProtection/index.js @@ -0,0 +1,61 @@ +import React from 'react'; +import { + observer, + inject +} from 'mobx-react'; +import { + AlertPage, + Loading, +} from '../../public/learn'; +import '../../style/levelProtection.less'; + +import Top from './Top'; + +@inject('hrmLevelProtection') +@observer +export default class LevelProtection extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + const { + hrmLevelProtection: store + } = this.props; + + store.reset(); + } + + componentDidMount() { + this.props.hrmLevelProtection.getPermissionInfo(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + const { + hrmLevelProtection: store + } = this.props; + + store.refresh(); + } + } + + render() { + const { + hrmLevelProtection, + } = this.props, { + pageAccessPermission + } = hrmLevelProtection, { + hasRight, + loading + } = pageAccessPermission; + + if (!hasRight) { + return loading ? : + } else { + return ( + + ) + } + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/limitedAnalysis/Echarts.js b/pc4backstage/hrmengine/components/limitedAnalysis/Echarts.js new file mode 100644 index 0000000..92b6c89 --- /dev/null +++ b/pc4backstage/hrmengine/components/limitedAnalysis/Echarts.js @@ -0,0 +1,78 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaEchart, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmLimitedAnalysis') +@observer +export default class Echarts extends React.Component { + constructor(props) { + super(props); + this.lineChart = null; + this.barChart = null; + this.setLineChartRef = element => { + this.lineChart = element; + } + this.setBarChartRef = element => { + this.barChart = element; + } + const _this = this; + window.onresize = function() { + _this.lineChart && _this.lineChart.chart.resize(); + _this.barChart && _this.barChart.chart.resize(); + } + } + + componentWillReceiveProps(nextProps) { + let preChart = toJS(this.props.hrmLimitedAnalysis.echart), + changedChart = toJS(nextProps.hrmLimitedAnalysis.echart), + + preLineOption = preChart.lineOption, + changedLineOption = changedChart.lineOption, + + preBarOption = preChart.barOption, + changedBarOption = changedChart.barOption; + + if (preLineOption !== changedLineOption) { + this.lineChart && this.lineChart.paint(); + } + if (preBarOption !== changedBarOption) { + this.barChart && this.barChart.paint(); + } + } + + render() { + const { + hrmLimitedAnalysis + } = this.props, { + key, + echart, + isEmptyObject + } = hrmLimitedAnalysis, { + lineOption, + barOption, + } = echart; + + return ( +
    + {!isEmptyObject(lineOption) &&
    + +
    } + {!isEmptyObject(barOption) &&
    + +
    } +
    + + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/limitedAnalysis/RadioGroup.js b/pc4backstage/hrmengine/components/limitedAnalysis/RadioGroup.js new file mode 100644 index 0000000..79ab35e --- /dev/null +++ b/pc4backstage/hrmengine/components/limitedAnalysis/RadioGroup.js @@ -0,0 +1,42 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaRadioGroup, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmLimitedAnalysis') +@observer +export default class RadioGroup extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + hrmLimitedAnalysis + } = this.props, { + radioGroup, + setTimeScopeParams + } = hrmLimitedAnalysis, { + maxConfig, + timeScopeConfig, + } = radioGroup; + + return ( +
    +
    + {toJS(timeScopeConfig).length > 0 && setTimeScopeParams(params)} />} +
    + +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/limitedAnalysis/index.js b/pc4backstage/hrmengine/components/limitedAnalysis/index.js new file mode 100644 index 0000000..dbb470c --- /dev/null +++ b/pc4backstage/hrmengine/components/limitedAnalysis/index.js @@ -0,0 +1,196 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaLeftRightLayout, +} from 'ecCom' +import { + Spin, +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import '../../style/onlineAnalysis.css' +import OrganizationTree from '../../coms/OrganizationTree'; +import RadioGroup from './RadioGroup' +import Echarts from './Echarts' + +@inject('hrmLimitedAnalysis') +@observer +export default class LimitedLoginAnalysis extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.limitedLoginAnalysis(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmLimitedAnalysis + } = this.props, { + getRight, + mobxDatasReset, + } = hrmLimitedAnalysis + + mobxDatasReset(); + getRight(); + } + + getDropMenuDatas = () => { + const { + hrmLimitedAnalysis + } = this.props, { + menu + } = hrmLimitedAnalysis, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmLimitedAnalysis + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmLimitedAnalysis; + + isPanelShow && setPanelStatus(false); + this[key] && this[key](); + } + + getTabName = () => { + const tabDatas = [{ + key: '0', + title: i18n.label.today() + }, { + key: '1', + title: i18n.label.tswk() + }, { + key: '2', + title: i18n.label.tsmth() + }, { + key: '3', + title: i18n.label.tssn() + }, { + key: '4', + title: i18n.label.tsyr() + }, { + key: '5', + title: i18n.label.customTimeSegment() + }] + + return tabDatas; + } + + render() { + const { + hrmLimitedAnalysis + } = this.props, { + authorized, + loading, + title, + key, + switchKey, + detachable, + orgTreeProps + } = hrmLimitedAnalysis; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + const coms = [ + switchKey(key)} + datas={this.getTabName()} + />, + , + + ]; + let children; + // if(detachable){ + // children = ( + // }> + // {coms} + // + // ) + // }else{ + children = coms; + // } + return ( + this.handleMenuClick(key)} + collectParams={{favname:title,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={[]} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {children} + + + ) + } + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/loginFailLog/index.js b/pc4backstage/hrmengine/components/loginFailLog/index.js new file mode 100644 index 0000000..2380c98 --- /dev/null +++ b/pc4backstage/hrmengine/components/loginFailLog/index.js @@ -0,0 +1,437 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, + WeaDateGroup, + WeaLocaleProvider, +} from 'ecCom' +import { + WeaSwitch, + WeaTableNew, +} from 'comsMobx' +import { + Row, + Col, + Spin, + Button, + message, +} from 'antd'; +const WeaTable = WeaTableNew.WeaTable; +const getLabel = WeaLocaleProvider.getLabel; + +import { + i18n +} from '../../public/i18n'; + +@inject('hrmLoginFailLog') +@observer +export default class LoginFailLog extends React.Component { + constructor(props) { + super(props); + this.state = { + datas: [{ + name: i18n.label.all(), + value: '0' + }, { + name: i18n.label.today(), + value: '1' + }, { + name: i18n.label.tswk(), + value: '2' + }, { + name: i18n.label.tsmth(), + value: '3' + }, { + name: i18n.label.tssn(), + value: '4' + }, { + name: i18n.label.tsyr(), + value: '5' + }, { + name: i18n.label.preMonth(), + value: '7' + }, { + name: i18n.label.preYear(), + value: '8' + }, { + name: i18n.label.dateRange(), + value: '6' + }] + } + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.loginFailLog(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmLoginFailLog + } = this.props, { + getRight, + mobxDatasReset, + } = hrmLoginFailLog + + mobxDatasReset(); + getRight(); + } + + getDropMenuDatas = () => { + const { + hrmLoginFailLog + } = this.props, { + menu + } = hrmLoginFailLog, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + custom = () => { + const { + hrmLoginFailLog + } = this.props, { + tableStore, + } = hrmLoginFailLog; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + handleMenuClick = (key) => { + const { + hrmLoginFailLog + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmLoginFailLog; + + isPanelShow && setPanelStatus(false); + this[key] && this[key](); + } + + getTopMenuBtns = () => { + const { + hrmLoginFailLog + } = this.props, { + menu, + tableStore + } = hrmLoginFailLog, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmLoginFailLog + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmLoginFailLog; + + isPanelShow && setPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + exportExcel = () => { //导出的excel有乱码现象,等待后期解决。 + const { + hrmLoginFailLog + } = this.props, { + tableStore + } = hrmLoginFailLog; + + tableStore.exportAll(); + } + + getDropPanelButtons() { + const { + hrmLoginFailLog + } = this.props, { + searchPanel, + setPanelStatus + } = hrmLoginFailLog, { + form + } = searchPanel; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + + getTabName() { + const tabDatas = [{ + key: '0', + title: i18n.label.all() + }, { + key: '1', + title: i18n.label.today() + }, { + key: '2', + title: i18n.label.tswk() + }, { + key: '3', + title: i18n.label.tsmth() + }, { + key: '4', + title: i18n.label.tssn() + }, { + key: '5', + title: i18n.label.tsyr() + }] + + return tabDatas; + } + + getBaseValueOfSearch() { + const { + hrmLoginFailLog + } = this.props, { + searchPanel + } = hrmLoginFailLog, { + form, + value + } = searchPanel; + + let val; + if (form.isFormInit) { + val = form.getFormParams().name; + } else { + val = value; + } + return val; + } + + getPanelComponents() { + const { + hrmLoginFailLog + } = this.props, { + searchPanel + } = hrmLoginFailLog, { + condition, + form, + loading + } = searchPanel, { + isFormInit + } = form; + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + if (field.domkey[0] == 'selectDate') { + arr.push(this.getWeaDateGroup(1, field.label)); + } else { + arr.push(
    +
    + + {} + +
    + ) + } + }) + }) + + if (loading) { + return ( +
    + +
    + ) + } else { + return ( e.keyCode == 13&& e.target.tagName === "INPUT" ) && this.handleSearch()} + >{arr} + } + } + + getWeaDateGroup = (index, label) => { + const { + hrmLoginFailLog + } = this.props, { + searchPanel, + setSelectedValue, + } = hrmLoginFailLog, { + selectedValue + } = searchPanel, { + datas + } = this.state; + + return (
    +
    + + setSelectedValue(v)} + /> + +
    + ) + } + + handleSearch() { + const { + hrmLoginFailLog + } = this.props, { + isPanelShow, + setPanelStatus, + getTableInfo + } = hrmLoginFailLog; + + getTableInfo(); + isPanelShow && setPanelStatus(false); + } + + handleSearchChange(val) { + const { + hrmLoginFailLog + } = this.props, { + setBaseValueOfSearch, + updateFields, + searchPanel + } = hrmLoginFailLog, { + form + } = searchPanel; + + setBaseValueOfSearch(val); + form.isFormInit && updateFields(val); + } + + render() { + const { + hrmLoginFailLog + } = this.props, { + title, + tableStore, + loading, + authorized, + isPanelShow, + key, + searchPanel, + setPanelStatus, + switchKey, + } = hrmLoginFailLog, { + conditionCount, + value, + form, + } = searchPanel; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( + this.handleMenuClick(key)} + collectParams={{favname:title,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + switchKey(key)} + datas={this.getTabName()} + buttonsAd={this.getDropPanelButtons()} + searchsBaseValue={form.isFormInit ? form.getFormParams().loginId : value} + setShowSearchAd={ b => setPanelStatus(b)} + hideSearchAd={ () => setPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
    } + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + +
    +
    + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/loginLog/index.js b/pc4backstage/hrmengine/components/loginLog/index.js new file mode 100644 index 0000000..41fcd8d --- /dev/null +++ b/pc4backstage/hrmengine/components/loginLog/index.js @@ -0,0 +1,483 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, + WeaDateGroup, + WeaLeftRightLayout, + WeaLocaleProvider, +} from 'ecCom' +import { + WeaSwitch, + WeaTableNew, +} from 'comsMobx' +import { + Row, + Col, + Spin, + Button, + message, +} from 'antd'; +import OrganizationTree from '../../coms/OrganizationTree'; +const WeaTable = WeaTableNew.WeaTable; +const getLabel = WeaLocaleProvider.getLabel; + +import { + i18n +} from '../../public/i18n'; + +@inject('hrmLoginLog') +@observer +export default class LoginLog extends React.Component { + constructor(props) { + super(props); + this.state = { + datas: [{ + name: i18n.label.all(), + value: '0' + }, { + name: i18n.label.today(), + value: '1' + }, { + name: i18n.label.tswk(), + value: '2' + }, { + name: i18n.label.tsmth(), + value: '3' + }, { + name: i18n.label.tssn(), + value: '4' + }, { + name: i18n.label.tsyr(), + value: '5' + }, { + name: i18n.label.preMonth(), + value: '7' + }, { + name: i18n.label.preYear(), + value: '8' + }, { + name: i18n.label.dateRange(), + value: '6' + }] + } + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.enterLog(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + const { + hrmLoginLog + } = this.props, { + getRight, + mobxDatasReset, + } = hrmLoginLog + + mobxDatasReset(); + getRight(); + } + + getDropMenuDatas = () => { + const { + hrmLoginLog + } = this.props, { + menu + } = hrmLoginLog, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + custom = () => { + const { + hrmLoginLog + } = this.props, { + tableStore, + } = hrmLoginLog; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + handleMenuClick = (key) => { + const { + hrmLoginLog + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmLoginLog; + + isPanelShow && setPanelStatus(false); + this[key] && this[key](); + } + + getTopMenuBtns = () => { + const { + hrmLoginLog + } = this.props, { + menu, + tableStore + } = hrmLoginLog, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmLoginLog + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmLoginLog; + + isPanelShow && setPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + exportExcel = () => { //导出的excel有乱码现象,等待后期解决。 + const { + hrmLoginLog + } = this.props, { + tableStore + } = hrmLoginLog; + + tableStore.exportAll(); + } + + getDropPanelButtons() { + const { + hrmLoginLog + } = this.props, { + searchPanel, + setPanelStatus, + conditionForm + } = hrmLoginLog, { + form + } = searchPanel; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + + resetConditionValue = () => { + const { + hrmLoginLog + } = this.props, { + setSelectedValue, + conditionForm + } = hrmLoginLog + conditionForm.resetConditionValue(); + setSelectedValue(['1', null, null]); + } + + getTabName() { + const tabDatas = [{ + key: '0', + title: i18n.label.all() + }, { + key: '1', + title: i18n.label.today() + }, { + key: '2', + title: i18n.label.tswk() + }, { + key: '3', + title: i18n.label.tsmth() + }, { + key: '4', + title: i18n.label.tssn() + }, { + key: '5', + title: i18n.label.tsyr() + }] + + return tabDatas; + } + + getBaseValueOfSearch() { + const { + hrmLoginLog + } = this.props, { + searchPanel, + conditionForm + } = hrmLoginLog, { + form, + value + } = searchPanel; + + let val; + if (conditionForm.isFormInit) { + val = conditionForm.getFormParams().name; + } else { + val = value; + } + return val; + } + + getPanelComponents() { + const { + hrmLoginLog + } = this.props, { + searchPanel, + conditionForm, + } = hrmLoginLog, { + condition, + form, + loading + } = searchPanel, { + isFormInit + } = conditionForm; + + let arr = []; + isFormInit && condition.map(c => { + c.items.map((field, index) => { + if (field.domkey[0] == 'selectDate') { + arr.push(this.getWeaDateGroup(1, field.label)); + } else { + arr.push(
    +
    + + {} + +
    + ) + } + }) + }) + + if (loading) { + return ( +
    + +
    + ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()} + >{arr} + } + } + + getWeaDateGroup = (index, label) => { + const { + hrmLoginLog + } = this.props, { + searchPanel, + setSelectedValue, + } = hrmLoginLog, { + selectedValue + } = searchPanel, { + datas + } = this.state; + + return (
    +
    + + setSelectedValue(v)} + /> + +
    + ) + } + + handleSearch() { + const { + hrmLoginLog + } = this.props, { + isPanelShow, + setPanelStatus, + getTableInfo + } = hrmLoginLog; + + getTableInfo(); + isPanelShow && setPanelStatus(false); + } + + handleSearchChange(val) { + const { + hrmLoginLog + } = this.props, { + setBaseValueOfSearch + } = hrmLoginLog; + + setBaseValueOfSearch(val); + } + + render() { + const { + hrmLoginLog + } = this.props, { + title, + tableStore, + loading, + authorized, + isPanelShow, + key, + searchPanel, + setPanelStatus, + switchKey, + setBaseValueOfSearch, + detachable, + orgTreeProps + } = hrmLoginLog, { + conditionCount, + value + } = searchPanel; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + const coms = [ + ( + switchKey(key)} + datas={this.getTabName()} + buttonsAd={this.getDropPanelButtons()} + searchsBaseValue={value} + setShowSearchAd={ b => setPanelStatus(b)} + hideSearchAd={ () => setPanelStatus(false)} + searchsAd= {isPanelShow ? this.getPanelComponents():
    } + onSearch={() => this.handleSearch()} + onSearchChange={val => setBaseValueOfSearch(val)} + /> + ), + ( + { + columns.map(c =>{ + if (c.dataIndex === "operateUserId") { + c.render = (text, record) => { + const { + operateUserId, + operateUserIdspan + } = record; + + return ( + window.pointerXY(e)} title={operateUserIdspan}>
    + ) + } + } + }) + }} + /> + ) + ]; + let children; + if(detachable){ + children = ( + }> + {coms} + + ) + }else{ + children = coms; + } + return ( + this.handleMenuClick(key)} + collectParams={{favname:title,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {children} + + + ) + } + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/major/HocFactory.js b/pc4backstage/hrmengine/components/major/HocFactory.js new file mode 100644 index 0000000..a51198e --- /dev/null +++ b/pc4backstage/hrmengine/components/major/HocFactory.js @@ -0,0 +1,20 @@ +const HocFactory = (WrappedComponent) => { + return class Hoc extends React.Component { + constructor(props) { + super(props); + } + + render() { + let config = { + width: 600, + height: 132, + } + + return + } + } +} + +export { + HocFactory +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/major/Major.js b/pc4backstage/hrmengine/components/major/Major.js new file mode 100644 index 0000000..a8b7069 --- /dev/null +++ b/pc4backstage/hrmengine/components/major/Major.js @@ -0,0 +1,520 @@ +import React from 'react' +import * as mobx from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, +} from 'ecCom' + +import { + Row, + Col, + Spin, + Modal, + Button, + message, +} from 'antd' + +import { + WeaSwitch, + WeaTableNew, +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; +import '../../style/area.css' + +import Editor from '../../coms/Editor' +import { + HocFactory +} from './HocFactory' + +import Import from '../importRelatedComponet/index'; +import { + HrmImportCommon +} from '../../stores/importCommon'; +const hrmImportCommon = new HrmImportCommon(); + +const WrappedEditor = HocFactory(Editor); +const toJS = mobx.toJS; +const confirm = Modal.confirm; +const WeaTable = WeaTableNew.WeaTable; + +@inject('hrmImportCommon') +@inject('hrmMajorSet') +@observer +export default class Major extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.label.majorSetting(); + } + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init() { + const { + hrmMajorSet + } = this.props; + + hrmMajorSet.mobxDatasReset(); + hrmMajorSet.setOperation('getTableInfo'); + hrmMajorSet.getTableInfo(); + } + + //WeaRightMenu + getDropMenuDatas() { + const { + hrmMajorSet + } = this.props, { + rightMenu + } = hrmMajorSet; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3016', + }); + } + + handleMenuClick(key) { + const { + hrmMajorSet + } = this.props, { + isMpPanelShow + } = hrmMajorSet; + + isMpPanelShow && hrmMajorSet.setMpPanelStatus(false); + this[key] && this[key](); + } + + //WeaTop + getTopMenuBtns() { + const { + hrmMajorSet + } = this.props, { + topMenu, + mpTableStore, + type + } = hrmMajorSet; + + let btns = []; + toJS(topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick(item) { + const { + hrmMajorSet + } = this.props, { + isMpPanelShow + } = hrmMajorSet; + + isMpPanelShow && hrmMajorSet.setMpPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + new() { + const { + hrmMajorSet + } = this.props; + + hrmMajorSet.setNeTitle(i18n.label.newMajor()); + hrmMajorSet.setNeVisible(true); + hrmMajorSet.newSet('new', 'addForm'); + hrmMajorSet.getNeForm(); + } + + import () { + const { + hrmImportCommon, + } = this.props, { + setTempletName, + setImportDialogTitle, + setImportType, + setImportDialogVisible, + setImportPage, + } = hrmImportCommon; + + setTempletName(i18n.label.importTemplate()); + setImportDialogTitle(i18n.button.majorImport()); + setImportType('special'); + setImportDialogVisible(true); + //设置标识,标识当前是那个页面在导入 + setImportPage(this.props.location.pathname.split('/').pop()); + } + + batchDelete() { + const { + hrmMajorSet + } = this.props, { + mpTableStore + } = hrmMajorSet; + + let keys = toJS(mpTableStore.selectedRowKeys).toString(); + hrmMajorSet.setSelectedRowsKeys(keys); + this.deleteRows(); + } + + custom = () => { + const { + hrmMajorSet + } = this.props, { + mpTableStore, + } = hrmMajorSet; + + mpTableStore.setColSetVisible(true); + mpTableStore.tableColSet(true); + } + + deleteRows(id) { + const { + hrmMajorSet + } = this.props; + + if (id) { + hrmMajorSet.deleteSet(id, 'delete'); + } else { + hrmMajorSet.setOperation('batchDelete'); + } + + let v = id ? 'del' : 'batchDel'; + this.showConfirm(v); + } + + showConfirm(v) { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk() { + const { + hrmMajorSet + } = this.props; + hrmMajorSet.delete(); + } + + save() { + const { + hrmMajorSet + } = this.props, { + formType + } = hrmMajorSet; + + if (formType == 'new') { + hrmMajorSet.setOperation('save_new'); + hrmMajorSet.add(); + } else if (formType == 'edit') { + hrmMajorSet.setOperation('save_edit'); + hrmMajorSet.edit(); + } + } + + //WeaTab + getTabBtn() { + const { + hrmMajorSet + } = this.props, { + mpShForm + } = hrmMajorSet; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + + getMpShBaseValue() { + const { + hrmMajorSet + } = this.props, { + mpShForm, + majorName + } = hrmMajorSet; + + let val; + if (mpShForm.isFormInit) { + val = mpShForm.getFormParams().name; + } else { + val = majorName; + } + return val; + } + + handleMpShChange(val) { + const { + hrmMajorSet + } = this.props, { + mpShForm + } = hrmMajorSet; + + if (mpShForm.isFormInit) { + hrmMajorSet.updateFields(val); + } + hrmMajorSet.setSearchName(val); + } + + handleMpPanelStatus(bool) { + const { + hrmMajorSet + } = this.props, { + mpShCondition + } = hrmMajorSet; + + if (bool) { //打开面板 + hrmMajorSet.setMpPanelStatus(true); + if (mpShCondition.length == 0) { //第一次打开面板时加载高级搜索数据 + hrmMajorSet.setOperation('mpSearch'); + hrmMajorSet.getMpSearchCondition(); + } + } else { //关闭面板 + hrmMajorSet.setMpPanelStatus(false); + hrmMajorSet.mpSearchReset(); + } + } + handleMpSearch() { + const { + hrmMajorSet + } = this.props, { + isMpPanelShow + } = hrmMajorSet; + + hrmMajorSet.setOperation('getTableInfo'); + hrmMajorSet.getTableInfo(); //获取表格信息 + isMpPanelShow && hrmMajorSet.setMpPanelStatus(false); //关闭面板 + } + getPanelComponents() { + const { + hrmMajorSet + } = this.props, { + mpShCondition, + mpShForm, + mpShLoading + } = hrmMajorSet, { + isFormInit + } = mpShForm; + + let arr = []; + isFormInit && mpShCondition.map(c => { + c.items.map((field, index) => { + arr.push(
    +
    + + {} + +
    + ) + }) + }) + + if (mpShLoading) { + return ( +
    + +
    + ) + } else { + return ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleMpSearch()} + >{arr} + } + } + + //WeaTable + reRenderColumns(columns) { + let _this = this; + columns.forEach((c, index) => { + if (c.dataIndex == 'name') { + c.render = function(text, record) { + return _this.doEdit(record.randomFieldId)} >{record.name} + } + }; + }) + } + + onOperatesClick(record, rowIndex, operate) { + const { + index + } = operate; + + index == '0' && this.doEdit(record.randomFieldId); + index == '1' && this.doDel(record.randomFieldId); + index == '2' && this.deLog(record.randomFieldId); + } + + doEdit(id) { + const { + hrmMajorSet + } = this.props; + + hrmMajorSet.setNeTitle(i18n.label.editMajor()); + hrmMajorSet.setNeVisible(true); + hrmMajorSet.editSet(id, 'edit', 'editFrom'); + hrmMajorSet.getNeForm(); + } + + doDel(id) { + const { + hrmMajorSet + } = this.props; + this.deleteRows(id); + } + + deLog(id) { + window.setLogViewProps({ + logSmallType: '3016', + targetId: id, + }); + } + + //NewAndEditDialog + handleNeCancel() { + const { + hrmMajorSet + } = this.props; + + hrmMajorSet.setNeVisible(false); + hrmMajorSet.neReset(); + } + + render() { + const { + hrmMajorSet + } = this.props, { + wtpLoading, + isEdit, + date + } = hrmMajorSet, { + mpTitle + } = hrmMajorSet, { + isMpPanelShow, + conditionNum + } = hrmMajorSet, { + mpTableStore + } = hrmMajorSet, { + neTitle, + neVisible, + neCondition, + neForm, + neLoading + } = hrmMajorSet; + + const { + hrmImportCommon + } = this.props, { + importDialog + } = hrmImportCommon; + + return ( +
    + this.handleMenuClick(key)} + collectParams={{favname:mpTitle,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + this.handleMpPanelStatus(b)} + hideSearchAd={ ()=>hrmMajorSet.setMpPanelStatus(false)} + searchsAd= {isMpPanelShow?this.getPanelComponents():
    } + onSearch={()=>this.handleMpSearch()} + onSearchChange={val=>this.handleMpShChange(val)} + /> + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
    +
    + this.save()} + onCancel={() => this.handleNeCancel()} + /> + {importDialog.visible && } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/Dashboard.js b/pc4backstage/hrmengine/components/matrix/Dashboard.js new file mode 100644 index 0000000..e6f3d60 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/Dashboard.js @@ -0,0 +1,94 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaNewScroll, + WeaRightMenu, + WeaDialog, + WeaAlertPage +} from 'ecCom'; +import { + Row, + Col +} from 'antd'; +import MatrixCard from './MatrixCard'; +import { + Link +} from 'react-router'; +import classnames from 'classnames'; +import { + i18n +} from '../../public/i18n'; +import MatrixMaintenance from './maintenance/MatrixMaintenance'; + +@observer +export default class Dashboard extends Component { + constructor(props) { + super(props); + } + + render() { + const { + store, + rightMenu + } = this.props; + const { + createable, + matrixList, + dialogParams, + getDialogOpButtons, + authorizationInfo, + editorDialogRightMenu + } = store; + const dProps = { + ...dialogParams, + scalable: dialogParams.opType == 'dataMaintenance' ? true : false, + onChangeHeight: height => store.dialogHeight = height, + hasScroll: false, + buttons: getDialogOpButtons(), + moreBtn: { + datas: editorDialogRightMenu + }, + className: "hrmDialog" + } + + const classes = classnames({ + ['tabPane']: true + }); + + return ( +
    + + +
    + { + createable && + + } + { + matrixList.map((matrixGroup, i) => { + let childrens = []; + matrixGroup.map((matrix, j) => { + childrens.push( + ( + + ) + ) + }) + return childrens; + }) + } +
    +
    +
    + + {dProps.coms} + + +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/DataList.js b/pc4backstage/hrmengine/components/matrix/DataList.js new file mode 100644 index 0000000..e38471a --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/DataList.js @@ -0,0 +1,101 @@ +import '../../style/matrixDataMaintenance.less'; +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaTableEdit, +} from 'ecCom'; +import { + Pagination, +} from 'antd'; +import Tabs from '../../coms/Tabs'; +import ImportResource from '../importresource/Import'; +import DataListPagination from './DataListPagination'; +import * as mobx from 'mobx'; +const { + toJS +} = mobx; + +@observer +export default class DataList extends Component { + constructor(props){ + super(props); + this.state = { + resize: new Date().getTime() + } + } + + componentDidMount() { + window.addEventListener('resize', this.resizeHandle); + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resizeHandle); + } + + resizeHandle = (e) => { + this.timer && clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.setState({ + resize: new Date().getTime() + }) + }, 1000); + } + + render() { + const {resize} = this.state; + const { + store, + rootStore + } = this.props; + const {dialogHeight} = rootStore; + const { + tabConfig, + btnsAndMenus, + tableEditConfig, + setTableRef, + refreshTab, + refreshCurrentData, + onTableEditChange, + onRowSelect, + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(tabConfig); + const tabProps = { + tabConfig: tabConfig, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: 0 + }, + rightMenu: [], + store: store, + tabBtnDef: tabBtnDef + } + let tableConfig = toJS(tableEditConfig); + if(rootStore.dialogHeight) + tableConfig.tableProps.scroll.y = rootStore.dialogHeight -135; + else{ + tableConfig.tableProps.scroll.y = $('.matrixDataMaintenance').innerHeight() -135; + } + + return ( +
    + +
    +
    + {setTableRef(dom)}}/> +
    + +
    +
    + +
    + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/DataListPagination.js b/pc4backstage/hrmengine/components/matrix/DataListPagination.js new file mode 100644 index 0000000..5c63b26 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/DataListPagination.js @@ -0,0 +1,33 @@ +import '../../style/matrixDataMaintenance.less'; +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Pagination, +} from 'antd'; +import * as mobx from 'mobx'; +const { + toJS +} = mobx; + +@observer +export default class DataList extends Component { + render() { + const { + store, + } = this.props; + const { + pagination, + currentPage, + defaultPageSize, + } = store; + return ( +
    + +
    + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/FieldItem.js b/pc4backstage/hrmengine/components/matrix/FieldItem.js new file mode 100644 index 0000000..c594ae5 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/FieldItem.js @@ -0,0 +1,225 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + toJS +} from 'mobx'; +import { + WeaFormItem, + WeaLocaleProvider +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx'; +import classnames from 'classnames'; +import { + i18n +} from '../../public/i18n'; +import { + has, + indexOf, + remove, + find +} +from 'lodash'; +import { + getColumIndex, + validDBKeys +} from '../../util/index'; +import {addContentPath} from '../../util/index.js' + +@observer +export default class FieldItem extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + // this.getPinYin({labelName: WeaLocaleProvider.formatMultiLang(datas[0].fieldlabel)}).then(data => { + // const {pinyin} = data; + // oldRecord.fieldname = pinyin; + // const arr = filter(this.tableEditConfig.fieldDef.datas, {fieldname: pinyin}); + // if(arr.length > 1 && pinyin != ''){ + // oldRecord.fieldname = pinyin + '1'; + // } + // this.refreshFeildDef = new Date().getTime(); + // }); + + renderForm = () => { + const { + store, + record + } = this.props; + const {getPinYin} = store; + const { + form, + fields + } = record; + const itemProps = { + labelCol: { + span: 0 + }, + tipPosition: 'bottom', + wrapperCol: { + span: 24 + } + } + const formParams = form.getFormParams(); + let children = []; + fields.map(f => { + f.items.map((i, index) => { + let hasVal = false, + fieldName = i.domkey[0], + show = true, + props = {}; + if (has(formParams, fieldName) && formParams[fieldName] != '') { + hasVal = true; + } + const classes = classnames({ + ['require']: !hasVal, + }); + if (fieldName === 'fieldname') { + Object.assign(i.otherParams, { + length: 25, + regExp: /^[a-zA-Z][a-zA-Z0-9]*$/, + filter: (val) => { + const { + isValid, + value + } = validDBKeys(val); + return value; + } + }) + } + switch (fieldName) { + case 'labelname': + props.onChange = (v) => { + const items = toJS(f.items); + const fieldnameField = find(items, {domkey: ['fieldname']}); + if(fieldnameField != null && fieldnameField.otherParams && fieldnameField.otherParams.disabled != true){ + const labelname = v.labelname.value; + getPinYin({labelName: WeaLocaleProvider.formatMultiLang(labelname)}).then(data => { + const {pinyin} = data; + form.updateFields({ + fieldname: { + value: pinyin + } + }) + }); + } + }; + break; + case 'fieldname': + Object.assign(i.otherParams, { + length: 25, + regExp: /^[a-zA-Z][a-zA-Z0-9]*$/, + filter: (val) => { + const { + isValid, + value + } = validDBKeys(val); + return value; + } + }); + break; + case 'cusb': + if (formParams.type === '161') { + show = true; + } else { + show = false; + } + break; + case 'cusbmulti': + if (formParams.type === '162') { + show = true; + } else { + show = false; + } + break; + } + show && children.push( + + { + this.getSwitch(i, form, props) + } + + ) + }) + }) + return children; + } + + getSwitch = (field, form, props) => + + renderCreateField = (condition) => { + const { + store + } = this.props; + const { + addField + } = store; + const conditionTips = i18n.label.addConditionField(), + valTips = i18n.label.addValField(), + imgSrc = `/hrm/hrm_e9/image/matrix/${condition ? 'addCondition' : 'addVal'}.png`; + return ( +
    + addField(condition)} /> +
    + {condition ? conditionTips : valTips} +
    +
    + ) + + } + + render() { + const { + store, + record + } = this.props; + const { + removeField + } = store; + const { + index, + colIndex, + form, + fields, + data + } = record; + const coms = form != null ? this.renderForm() : this.renderCreateField(data.condition); + + const headerClasses = classnames({ + ['header']: true, + ['createHeader']: form == null, + }); + const contentClasses = classnames({ + ['conditionContent']: data.type === 0, + ['valContent']: data.type === 1 + }); + + return ( +
    +
    {colIndex}
    +
    + { + coms + } + { + data.editable === '1' + && +
    removeField(data.type === 0, colIndex)}> + +
    + } +
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/HiddenTable.js b/pc4backstage/hrmengine/components/matrix/HiddenTable.js new file mode 100644 index 0000000..07ae2c8 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/HiddenTable.js @@ -0,0 +1,32 @@ +import '../../style/matrixDataMaintenance.less'; +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaTableNew +} from 'comsMobx'; +import * as mobx from 'mobx'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class HiddenTable extends Component { + render() { + const { + store, + } = this.props; + const { + tableStore, + setShowCols + } = store; + return ( +
    + setShowCols(keys)}/> +
    + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/MatrixCard.js b/pc4backstage/hrmengine/components/matrix/MatrixCard.js new file mode 100644 index 0000000..aec28c5 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/MatrixCard.js @@ -0,0 +1,88 @@ +import React, { + Component +} from 'react'; +import { + WeaFormItem, + WeaInput +} from 'ecCom'; +import { + Row +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import classnames from 'classnames'; + +export default class className extends Component { + renderCardInfo = (matrix) => { + const { + store + } = this.props; + const { + getMatrixInfoForm, + removeMatrixInfo, + showDataMaintenance, + showFieldSetting, + stores: { + matrixMaintenanceStore + } + } = store; + const {showMaintenance} = matrixMaintenanceStore; + const params = { + matrixid: matrix.id, + name: matrix.name, + issystem: matrix.issystem + }; + + let coms = []; + matrix.canDel && coms.push(
    removeMatrixInfo(params)}>
    ); + matrix.can_field_edit && matrix.issystem === '' && coms.push(
    showFieldSetting(params)}>
    ); + matrix.can_manage && coms.push(
    showMaintenance(params)}>
    ); + matrix.issystem === '' && matrix.canedit && coms.push(
    getMatrixInfoForm(params)}>
    ); + return ( +
    + +
    + {coms} +
    +
    + +
    {i18n.label.matrixName()}:
    + showDataMaintenance(params)}>{matrix.name} +
    + +
    {i18n.label.matrixDesc()}:
    +
    {matrix.descr}
    +
    +
    {matrix.matrixcount}
    +
    + ) + } + + render() { + const { + store, + matrix + } = this.props; + const { + getMatrixInfoForm + } = store; + const hasMatrix = matrix != null; + const classes = classnames({ + ['viewCard']: hasMatrix, + ['createCard']: !hasMatrix, + ['static']: hasMatrix && matrix.issystem != '' + }); + let coms; + if (!hasMatrix) + coms = (
    getMatrixInfoForm()}>
    ); + else + coms = this.renderCardInfo(matrix) + + return ( +
    + {coms} +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenance.js b/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenance.js new file mode 100644 index 0000000..fbd9a7d --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenance.js @@ -0,0 +1,90 @@ +import '../../style/matrixDataMaintenance.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaRightMenu, + WeaTableEdit, + WeaDialog, +} from 'ecCom'; +import { + WeaTableNew +} from 'comsMobx'; +import { + Pagination, + Spin +} from 'antd'; +import Tabs from '../../coms/Tabs'; +import ImportResource from '../importresource/Import'; +import { + i18n +} from '../../public/i18n'; +import * as mobx from 'mobx'; +import { + getColumIndex +} from '../../util/index'; +import DataList from './DataList'; +import HiddenTable from './HiddenTable'; + +const { + toJS +} = mobx; +const { + WeaTable +} = WeaTableNew; + +@inject("hrmMatrixDataMaintenance") +@inject('hrmImportResource') +@observer +export default class MatrixDataMaintenance extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmMatrixDataMaintenance: store, + hrmImportResource, + matrix, + rootStore + } = this.props; + store.setRootStore(rootStore); + store.setImportStore(hrmImportResource) + rootStore.dialogParams.visible && store.initData(matrix); + } + + componentWillReceiveProps(nextProps) { + const { + hrmMatrixDataMaintenance: store, + hrmImportResource, + matrix, + rootStore + } = nextProps; + store.setRootStore(rootStore); + store.setImportStore(hrmImportResource) + rootStore.dialogParams.visible && store.initData(matrix); + } + + render() { + const { + hrmMatrixDataMaintenance: store, + rootStore + } = this.props; + const { + matrixInfo, + loading, + } = store; + if (matrixInfo == null) + return
    + return ( + + + + + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenanceView.js b/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenanceView.js new file mode 100644 index 0000000..81540be --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenanceView.js @@ -0,0 +1,171 @@ +import '../../style/matrixDataMaintenance.less'; +import React, { + Component,Fragment +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaRightMenu, + WeaAlertPage +} from 'ecCom'; +import { + Button, + Spin +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import DataList from './DataList'; +import HiddenTable from './HiddenTable'; + +@inject("hrmMatrix") +@inject("hrmMatrixDataMaintenance") +@inject('hrmImportResource') +@observer +export default class MatrixDataMaintenanceView extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmMatrixDataMaintenance: store, + hrmImportResource, + params, + hrmMatrix + } = this.props; + store.setRootStore(hrmMatrix); + store.setImportStore(hrmImportResource) + store.initData(params, true); + } + + componentWillReceiveProps(nextProps) { + const { + hrmMatrixDataMaintenance: store, + hrmImportResource, + params, + hrmMatrix + } = nextProps; + store.setRootStore(hrmMatrix); + store.setImportStore(hrmImportResource) + store.initData(params, true); + } + + getTopButtons = () => { + const {hrmMatrix,hrmMatrixDataMaintenance: store} = this.props; + const {hassaveright, saveMatrixData, exportMatrix, importMatrix, clearDimission, showOpLog} = hrmMatrix; + const {matrixInfo, dataOpBtnsVisible, menuIconCollection, logTypeDef, canClear} = store; + let buttons = [], rightMenu = []; + let logSmallType; + if(hassaveright){ + buttons.push(); + } + buttons.push(); + if(dataOpBtnsVisible){ + buttons.push(); + } + if(canClear) + buttons.push(); + logSmallType = logTypeDef.HRM_ENGINE_Matrix_Table; + + buttons.map((btn, index) => { + const { + props + } = btn; + rightMenu.push({ + key: index.toString(), + content: props.children, + icon: , + onClick: props.onClick + }); + }); + rightMenu.push({ + key: '99', + content: i18n.button.log(), + icon: , + onClick: () => showOpLog(logSmallType, matrixInfo.matrixid) + }); + rightMenu.push({ + icon: , + content:i18n.button.columnVisibleSetting(), + key: 'definedColumn', + onClick: key =>{ + this.definedColumn(); + } + }); + + return [buttons, rightMenu]; + } + + render() { + const { + hrmMatrixDataMaintenance: store, + hrmMatrix + } = this.props; + const { + hasData, + dataOpBtnsVisible, + loading, + initDataFinished, + hasRight, + viewData + } = store; + + if(!hasRight){ + return ( + +
    {i18n.message.authFailed()}
    +
    + ) + } + + const [buttons, rightMenu] = this.getTopButtons(); + const topProps = { + icon: , + iconBgcolor: '#217346', + title: i18n.module.matrixSetting(), + showDropIcon: true, + buttons, + dropMenuDatas: rightMenu + } + + let coms; + if(!viewData){ + coms = ( + +
    {i18n.message.authFailed()}
    +
    + ) + }else if(!hasData){ + coms = ( + } iconSize={120} paddingTop={'15%'}> +
    {i18n.message.dataNone()}
    +
    + ) + }else { + coms = ( + + + + + ) + } + + return ( +
    + + + + { + initDataFinished && coms + } + + + +
    + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/MatrixEdit.js b/pc4backstage/hrmengine/components/matrix/MatrixEdit.js new file mode 100644 index 0000000..9b24b22 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/MatrixEdit.js @@ -0,0 +1,146 @@ +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTableNew +} from 'comsMobx'; +import { + WeaAuth, + WeaHelpfulTip +} from 'ecCom'; +import classnames from 'classnames'; +import Tabs from '../../coms/Tabs'; +import { + findIndex +} from 'lodash'; +import { + i18n +} from '../../public/i18n'; +const { + WeaTable +} = WeaTableNew; + +@observer +export default class MatrixEdit extends Component { + constructor(props) { + super(props); + } + + doAction = (op, record) => { + const { + store + } = this.props; + const { + doAction + } = store; + doAction(op, record); + } + + doDel = (id) => { + const { + store + } = this.props; + const { + removeDetachDetail + } = store; + removeDetachDetail({ + id + }); + } + + doEdit = (id) => { + const { + store + } = this.props; + const { + modifyDetachDetail + } = store; + modifyDetachDetail({ + id + }); + } + + renderCol = (cols) => { + const {columnHelpful} = this.props; + columnHelpful && columnHelpful.length > 0 && cols.map((col, i) => { + if(i < columnHelpful.length && columnHelpful[i] != null && columnHelpful[i] != ''){ + col.title = ( + {col.title} + ) + } + }) + } + + onOperatesClick = (record, index, operate) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + const id = record.id ? record.id : ''; + this[func] && this[func](id); + } + + render() { + const { + store + } = this.props; + const { + maintenanceTabConfig, + btnsAndMenus, + maintenanceParams, + maintenanceList, + formTarget + } = store; + const { + btns, + menus, + tabBtnDef + } = btnsAndMenus(maintenanceTabConfig); + const { + matrixMatrixConditionForm: form, + matrixMatrixConditionFormFields: fields + } = formTarget; + const tabProps = { + tabConfig: maintenanceTabConfig, + activeTabInfo: { + activeTabKey: maintenanceTabConfig.activeTabKey, + activeTabIndex: 0 + }, + rightMenu: [], + store: store, + tabBtnDef: tabBtnDef, + conditionForm: form, + conditionFormFields: fields + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: true + }); + + const tableProps = { + scroll: { + y: 310 + } + } + + return ( +
    + + this.renderCol(cols)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> + + {/* { + maintenanceParams.visible && + } */} +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/MatrixFieldSetting.js b/pc4backstage/hrmengine/components/matrix/MatrixFieldSetting.js new file mode 100644 index 0000000..d59a38e --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/MatrixFieldSetting.js @@ -0,0 +1,79 @@ +import '../../style/matrixFieldSetting.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + Spin +} from 'antd'; +import FieldItem from './FieldItem'; +import { + i18n +} from '../../public/i18n'; +import * as mobx from 'mobx'; +import { + getColumIndex +} from '../../util/index'; + +@inject("hrmMatrixFieldSetting") +@observer +export default class MatrixFieldSetting extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const { + hrmMatrixFieldSetting: store, + matrix, + rootStore + } = this.props; + store.setRootStore(rootStore); + rootStore.dialogParams.visible && store.initData(matrix); + } + + componentWillReceiveProps(nextProps) { + const { + hrmMatrixFieldSetting: store, + matrix, + rootStore + } = nextProps; + store.setRootStore(rootStore); + rootStore.dialogParams.visible && store.initData(matrix); + } + + render() { + const { + hrmMatrixFieldSetting: store, + } = this.props; + const { + refreshData, + dataList, + loading + } = store; + const { + condition, + val + } = dataList; + + return ( + +
    + { + condition.map((record, index) => { + return + }) + } + { + val.map((record, index) => { + return + }) + } +
    +
    + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/MatrixMaintenance.js b/pc4backstage/hrmengine/components/matrix/MatrixMaintenance.js new file mode 100644 index 0000000..b97e425 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/MatrixMaintenance.js @@ -0,0 +1,17 @@ +import { WeaDialog } from 'ecCom'; +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import {i18n} from '../../public/i18n'; + +@observer +export default class MatrixMaintenance extends Component{ + render(){ + const {store} = this.props; + + return ( + +
    1
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/Screen.js b/pc4backstage/hrmengine/components/matrix/Screen.js new file mode 100644 index 0000000..8889291 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/Screen.js @@ -0,0 +1,157 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaBrowser +} from 'ecCom'; +import { + Row, + Popover, + Button +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import { + has +} from 'lodash'; +import classnames from 'classnames'; + +export default class Screen extends Component { + constructor(props) { + super(props); + this.state = { + visible: false, + screen: false, + screenObj: null, + replaceDatas: [] + } + } + + componentDidMount() { + const { + replaceDatas, + col + } = this.props; + if (replaceDatas != null) { + this.setState({ + screen: true, + replaceDatas + }) + } + } + + componentWillReceiveProps(nextProps) { + const { + replaceDatas, + col + } = nextProps; + this.setState({ + screen: replaceDatas != null, + replaceDatas + }) + } + + handleVisibleChange = (visible) => { + setTimeout(() => { + if(this.state.onBrowserChanged){ + this.setState({onBrowserChanged: false}); + }else{ + this.setState({visible, onBrowserChanged: false}) + } + }, 300); + + // if(!this.state.visible || this.state.onBrowserChanged) + // this.setState({visible, onBrowserChanged: false}) + // else{ + // // this.setState({onBrowserChanged: false}); + // } + // this.setState({ + // visible + // }) + } + + resetScreen = () => { + this.setState({ + screen: false, + visible: false, + screenObj: null, + replaceDatas: [] + }) + this.props.resetScreen && this.props.resetScreen(this.props.col.dataIndex); + } + + onBrowserChange = (ids, names, datas) => { + this.setState({ + screen: ids.length != 0 && ids != '', + screenObj: { + [this.props.col.dataIndex]: { + id: ids + } + }, + replaceDatas: (ids.length == 0 ? null : datas), + visible: true, + onBrowserChanged: true + }) + } + + doScreen = () => { + this.setState({ + visible: false + }) + this.props.doScreen && this.props.doScreen(this.props.col.dataIndex, this.state); + } + + setBrowserRef = ref => { + if(ref){ + const monitor = setInterval(() => { + const {browser} = ref; + const {state} = browser || {}; + const {visible} = state || {}; + if(visible){ + this.setState({visible: false}); + clearInterval(monitor); + } + }, 50) + } + } + + render() { + const { + col + } = this.props; + + const browserCom = col.screencoms || col.coms; + const browserConditionParam = browserCom.browserConditionParam; + + const content = ( +
    +
    {i18n.label.screenInfo()}
    + this.setBrowserRef(ref)} replaceDatas={this.state.replaceDatas} onChange={this.onBrowserChange}/> +
    + +
    +
    + ) + const title = ( +
    + {i18n.button.clearScreen()} +
    + ) + const classname = classnames({ + ['screen']: true, + ['icon-coms-screen']: !this.state.screen, + ['icon-coms-screen2']: this.state.screen + }) + return ( + + + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/SubCompanyDisplaySetting.js b/pc4backstage/hrmengine/components/matrix/SubCompanyDisplaySetting.js new file mode 100644 index 0000000..a359abe --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/SubCompanyDisplaySetting.js @@ -0,0 +1,118 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaSelect, +} from 'ecCom'; +import { + Row, + Popover, + Button, + Radio +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import { + has +} from 'lodash'; +import classnames from 'classnames'; + +const {Group: RadioGroup} = Radio; +const radioStyle = { + display: 'block', + height: '30px', + lineHeight: '30px' +} + +@observer +export default class DisplaySetting extends Component { + constructor(props) { + super(props); + this.state = { + visible: false, + onSubComanyFullPathChanged: false, + radioValue: props.radioGroupProps.value, + fullPathValue: props.subCompanyFullPathProps.value + } + } + + handleVisibleChange = (visible) => { + setTimeout(() => { + if(this.state.onSubComanyFullPathChanged){ + this.setState({onSubComanyFullPathChanged: false}); + }else{ + this.setState({visible, onSubComanyFullPathChanged: false}) + } + }, 300); + } + + onChange = (value) => { + this.setState({ + visible: true, + onSubComanyFullPathChanged: true, + fullPathValue: value + }); + } + + onRadioChange = value => { + this.setState({ + visible: true, + onSubComanyFullPathChanged: true, + radioValue: value + }); + } + + doSetting = () => { + const { + save + } = this.props; + const {radioValue, fullPathValue} = this.state; + save({radioValue, fullPathValue}); + this.setState({ + visible: false, + }); + } + + render() { + const { + radioGroupProps, subCompanyFullPathProps + } = this.props; + const {radioValue, fullPathValue} = this.state; + const content = ( +
    +
    {i18n.label.displaySetting()}
    +
    + this.onRadioChange(e.target.value)}> + { + radioGroupProps && radioGroupProps.options && radioGroupProps.options.map((op, i) => { + return ( + {op.showname} + ) + }) + } + +
    + { + radioValue == '2' && +
    + this.onChange(v)}/> +
    + } +
    + +
    +
    + ) + return ( + + + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/index.js b/pc4backstage/hrmengine/components/matrix/index.js new file mode 100644 index 0000000..bb3d73f --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/index.js @@ -0,0 +1,150 @@ +import '../../style/matrix.less'; +import React, { + Component +} from 'react'; +import { + WeaTop, + WeaAlertPage, + WeaLeftRightLayout +} from 'ecCom'; +import { + inject, + observer +} from 'mobx-react'; +import OrganizationTree from '../../coms/OrganizationTree'; +import Tabs from '../../coms/Tabs'; +import Dashboard from './Dashboard'; +import { + i18n +} from '../../public/i18n'; +import { + flattenDeep +} from 'lodash'; + +@inject("hrmMatrix") + +@observer +export default class Matrix extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmMatrix: store, + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('matrix/pages/matrixList', null, initData, null, true); + } + + render() { + const { + hrmMatrix: store + } = this.props; + const { + containerInitFinished, + tabConfig, + topMenusDef, + matrixList, + orgTreeProps, + authorizationInfo, + formTarget + } = store; + + const menus = topMenusDef(); + + const topProps = { + icon: , + iconBgcolor: '#217346', + title: i18n.module.matrixSetting(), + showDropIcon: true, + dropMenuDatas: menus + } + + const {conditionForm: form, conditionFormFields: fields} = formTarget; + const tabProps = { + tabConfig: tabConfig, + activeTabInfo: { + activeTabKey: tabConfig.activeTabKey, + activeTabIndex: 0 + }, + rightMenu: menus, + store: store, + conditionForm: form, + conditionFormFields: fields, + } + + let coms; + if(containerInitFinished.detachable){ + coms = ( + }> + { + flattenDeep(store.toJS(matrixList)).length === 0 + ? + + } iconSize={120} paddingTop={'15%'}> +
    {i18n.message.dataNone()}
    +
    +
    + : + + + + } +
    + ) + }else if(!authorizationInfo.hasMenuRight && flattenDeep(store.toJS(matrixList)).length === 0){ + coms = ( + + } iconSize={120} paddingTop={'15%'}> +
    {i18n.message.dataNone()}
    +
    +
    + ) + }else{ + coms= ( + + + + ) + } + + return ( +
    + { + containerInitFinished.init && containerInitFinished.authorized && + + { + // (!authorizationInfo.hasMenuRight && flattenDeep(store.toJS(matrixList)).length === 0) + // ? + // } iconSize={120} paddingTop={'15%'}> + //
    {i18n.message.dataNone()}
    + //
    + // : + coms + } +
    + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
    {i18n.message.authFailed()}
    +
    + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/maintenance/ColumnSetting.js b/pc4backstage/hrmengine/components/matrix/maintenance/ColumnSetting.js new file mode 100644 index 0000000..5455dd4 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/maintenance/ColumnSetting.js @@ -0,0 +1,55 @@ +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import { WeaDialog } from 'ecCom'; +import Tabs from '../../../coms/Tabs'; +import classnames from 'classnames'; +import {WeaTableNew} from 'comsMobx'; +import {i18n} from '../../../public/i18n'; + +const {WeaTable} = WeaTableNew; + +const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: true +}); + +@observer +export default class ColumnSetting extends Component{ + onOperatesClick = (record, index, operate, tableName) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + func === 'doDelete' && this.doDelete(record); + } + + doDelete = record => { + const {store: {deleteColumn}} = this.props; + deleteColumn(record.id); + } + + render(){ + const {store} = this.props; + const {columnList, mSettingDialogHeight, createMaintenanceForm} = store; + + const tableProps = { + scroll: { + y: mSettingDialogHeight - 140 + } + } + + return ( +
    + this.renderCol(cols)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> + { + createMaintenanceForm.visible && + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/maintenance/ConditionSetting.js b/pc4backstage/hrmengine/components/matrix/maintenance/ConditionSetting.js new file mode 100644 index 0000000..ca7dde4 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/maintenance/ConditionSetting.js @@ -0,0 +1,54 @@ +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import { WeaAuth, WeaLocaleProvider } from 'ecCom'; +import classnames from 'classnames'; +import {WeaTableNew} from 'comsMobx'; +const getLabel = WeaLocaleProvider.getLabel; + +const {WeaTable} = WeaTableNew; + +const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: true +}); + +@observer +export default class ConditionSetting extends Component{ + onOperatesClick = (record, index, operate, tableName) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + func === 'doDelete' && this.doDelete(record); + } + + doDelete = record => { + const {store: {deleteCondition}} = this.props; + deleteCondition(record.id); + } + + render(){ + const {store} = this.props; + const {conditionList, mSettingDialogHeight, conditionSettingForm} = store; + + const tableProps = { + scroll: { + y: mSettingDialogHeight - 140 + } + } + + return ( +
    + this.renderCol(cols)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> + { + conditionSettingForm.visible && + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceLevel.js b/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceLevel.js new file mode 100644 index 0000000..ffd7355 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceLevel.js @@ -0,0 +1,22 @@ +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import { WeaDialog } from 'ecCom'; +import FormInfo from '../../../coms/FormInfo'; + +@observer +export default class MaintenanceLevel extends Component{ + render(){ + const {store} = this.props; + const {rightLevelDialogProps, formTarget} = store; + const { + rightLevelForm: form, + rightLevelFormFields: fields, + } = formTarget; + + return ( + + + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceListView.js b/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceListView.js new file mode 100644 index 0000000..0979194 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceListView.js @@ -0,0 +1,120 @@ +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import {WeaTableNew} from 'comsMobx'; +import Tabs from '../../../coms/Tabs'; +import classnames from 'classnames'; +import { WeaDialog, WeaHelpfulTip } from 'ecCom'; +import isEmpty from 'lodash/isEmpty'; +import get from 'lodash/get'; +const {WeaTable} = WeaTableNew; + +@observer +export default class MaintenanceListView extends Component{ + constructor(props){ + super(props); + this.state = { + tableHeight: 0 + } + } + + getHelpfulCom = dataIndex => { + const {store} = this.props; + const {columnHelpful} = store; + if(!isEmpty(columnHelpful)) + return get(columnHelpful, dataIndex) || null; + return null; + } + + renderCol = (cols) => { + const {store} = this.props; + const {createMaintenance} = store; + cols.map((col, i) => { + const helpfulStr = this.getHelpfulCom(col.dataIndex); + col.title = ( + {col.title} {helpfulStr != null && } + ) + col.render = (text, record, dataIndex) => { + if(col.dataIndex == 'rightLevel'){ + return ( + this.doAction('doEditRightLevel', record)} title={record[`${col.dataIndex}span`]}>{record[`${col.dataIndex}span`]} + ) + }else{ + const tabIndex = (col.dataIndex == 'mainterid' ? '1' : (col.dataIndex == 'conditionid' ? '2' : '3')); + return ( + createMaintenance(record.maintid, tabIndex)} title={record[`${col.dataIndex}span`]}>{record[`${col.dataIndex}span`]} + ) + } + } + }) + } + + onOperatesClick = (record, index, operate, tableName) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + func === 'doEdit' && this.doAction('modify', record); + func === 'doEditRightLevel' && this.doAction('doEditRightLevel', record); + func === 'doDelete' && this.doAction('remove', record); + } + + doAction = (op, record) => { + const { + store + } = this.props; + const { + doAction + } = store; + doAction(op, record); + } + + render(){ + const {store} = this.props; + const { + mListDialog, + mListTab, + mListTabBtn, + maintenanceList, + formTarget: { + mListConditionForm: form, + mListConditionFormFields: fields + }, + } = store; + const tabProps = { + tabConfig: mListTab, + activeTabInfo: { + activeTabKey: mListTab.activeTabKey, + activeTabIndex: 0 + }, + rightMenu: [], + store: store, + tabBtnDef: mListTabBtn, + conditionForm: form, + conditionFormFields: fields + } + const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: true + }); + const tableProps = { + scroll: { + y: this.state.tableHeight - 140 + } + } + + return ( + this.setState({tableHeight: v})}> + +
    + this.renderCol(cols)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
    +
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceSettingView.js b/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceSettingView.js new file mode 100644 index 0000000..e84fad2 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceSettingView.js @@ -0,0 +1,49 @@ +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import { WeaDialog } from 'ecCom'; +import Tabs from '../../../coms/Tabs'; +import Maintenancer from './Maintenancer'; +import ConditionSetting from './ConditionSetting'; +import ColumnSetting from './ColumnSetting'; + +@observer +export default class MaintenanceSettingView extends Component{ + render(){ + const {store} = this.props; + const { + mSettingDialog, + settingTab, + settingTabBtn, + getTabIndex, + tabChangeHandle + } = store; + const { + formTarget: { + mSettingListConditionForm: form, + mSettingListConditionFormFields: fields + }, + } = store; + const tabProps = { + tabConfig: settingTab, + tabChangeHandle: tabChangeHandle, + activeTabInfo: { + activeTabKey: settingTab.activeTabKey, + activeTabIndex: getTabIndex(settingTab.tabs, settingTab.activeTabKey) + }, + rightMenu: [], + store: store, + tabBtnDef: settingTabBtn, + conditionForm: form, + conditionFormFields: fields + } + return ( + store.mSettingDialogHeight = v}> + + + + + + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/maintenance/Maintenancer.js b/pc4backstage/hrmengine/components/matrix/maintenance/Maintenancer.js new file mode 100644 index 0000000..8f74cf0 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/maintenance/Maintenancer.js @@ -0,0 +1,54 @@ +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import { WeaAuth } from 'ecCom'; +import Tabs from '../../../coms/Tabs'; +import classnames from 'classnames'; +import {WeaTableNew} from 'comsMobx'; +import {i18n} from '../../../public/i18n'; + +const {WeaTable} = WeaTableNew; +const classes = classnames({ + ['tabPane']: true, + ['tabPane-dialog']: true +}); + +@observer +export default class Maintenancer extends Component{ + onOperatesClick = (record, index, operate, tableName) => { + const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; + func === 'doDelete' && this.doDelete(record); + } + + doDelete = record => { + const {store: {deleteMaintanence}} = this.props; + deleteMaintanence(record.id); + } + + render(){ + const {store} = this.props; + const {mList, mSettingDialogHeight, createMaintenanceForm} = store; + + const tableProps = { + scroll: { + y: mSettingDialogHeight - 140 + } + } + + return ( +
    + this.renderCol(cols)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> + { + createMaintenanceForm.visible && + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrix/maintenance/MatrixMaintenance.js b/pc4backstage/hrmengine/components/matrix/maintenance/MatrixMaintenance.js new file mode 100644 index 0000000..03d0be6 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrix/maintenance/MatrixMaintenance.js @@ -0,0 +1,20 @@ +import { observer } from 'mobx-react'; +import React, {Component} from 'react'; +import MaintenanceListView from './MaintenanceListView'; +import MaintenanceSettingView from './MaintenanceSettingView'; +import MaintenanceLevel from './MaintenanceLevel'; + +@observer +export default class MatrixMaintenance extends Component{ + render(){ + const {store} = this.props; + + return ( +
    + + + +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrixAdjust/Content.js b/pc4backstage/hrmengine/components/matrixAdjust/Content.js new file mode 100644 index 0000000..571564c --- /dev/null +++ b/pc4backstage/hrmengine/components/matrixAdjust/Content.js @@ -0,0 +1,44 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + WeaSearchGroup, + WeaTableEditable +} from 'ecCom'; +import { + i18n +} from '../../public/i18n'; + +@observer +export default class Content extends Component { + render() { + const { + store + } = this.props; + const { + tableConfig, + setTableRef, + } = store; + const searchGroupProps = { + title: i18n.label.adjustObject(), + showGroup: true + } + + return ( +
    + + { + tableConfig.datas.length > 0 + && +
    + {setTableRef(dom)}}/> +
    + } +
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrixAdjust/Dashboard.js b/pc4backstage/hrmengine/components/matrixAdjust/Dashboard.js new file mode 100644 index 0000000..b5c8792 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrixAdjust/Dashboard.js @@ -0,0 +1,70 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col, + Button +} from 'antd'; +import { + WeaSearchGroup +} from 'ecCom'; +import { + i18n +} from '../../public/i18n'; +import FormInfo from '../../coms/FormInfo'; +import {addContentPath} from '../../util/index.js' + +@observer +export default class Dashboard extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + formTarget, + formItemRender, + childrenComponents, + refreshForm, + transferCount, + } = store; + const { + fromForm, + fromFormFields, + toForm, + toFormFields + } = formTarget; + + const searchGroupProps = { + title: i18n.label.selectObject(), + showGroup: true + } + + return ( + + +
    + +
    +
    +

    {transferCount}

    +
    +
    + +
    +
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrixAdjust/Result.js b/pc4backstage/hrmengine/components/matrixAdjust/Result.js new file mode 100644 index 0000000..12d7b6f --- /dev/null +++ b/pc4backstage/hrmengine/components/matrixAdjust/Result.js @@ -0,0 +1,62 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Button +} from 'antd'; +import {WeaLocaleProvider} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +@observer +export default class Result extends Component { + render(){ + const {store: {onBreak, resultMessage, transferCount, toTargetParam, selectedMatrixInfo, selectedTargetInfo, selectedToInfo}} = this.props; + const {fromtime = '', totime = '', timecount = ''} = resultMessage || {}; + const {valueSpan: matrixName} = selectedMatrixInfo || {}; + const {valueSpan: fromName} = selectedTargetInfo || {}; + const {valueSpan: toName} = selectedToInfo || {}; + const {optflag = 0} = toTargetParam || {}; + let finishedInfo = getLabel(383951, '从{beginTime}开始至{endTime}结束,共用时:{processTime}').replace('{beginTime}', ` ${fromtime} `) + .replace('{endTime}', ` ${totime} `) + .replace('{processTime}', ` ${timecount}${getLabel('501531','秒')} `); + let analysisInfo = getLabel('509528','共计{param}个单元格的值受影响!').replace('{param}', ` ${transferCount || 0} `) + return ( +
    +
    +
    +
    +
    {getLabel('509527','调整完成!')}
    +
    +
    + + + {getLabel('34066','矩阵')}: + {matrixName || ''} + { + optflag == 0 ? + [ + {fromName || ''}, + {getLabel('83020','替换为')}, + {toName || ''} + ] + : + [ + {getLabel(131966, '删除')}, + {fromName || ''}, + ] + } + + +
    +
    + +
    +
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrixAdjust/Timer.js b/pc4backstage/hrmengine/components/matrixAdjust/Timer.js new file mode 100644 index 0000000..9089f0b --- /dev/null +++ b/pc4backstage/hrmengine/components/matrixAdjust/Timer.js @@ -0,0 +1,58 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import { + Row, + Col, + Button +} from 'antd'; +import { + i18n +} from '../../public/i18n'; + +@observer +export default class Timer extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + timer, + resetData + } = store; + if (timer === 0) + return (
    ); + + let countDownLabelStr = i18n.label.countDown(); + const str = countDownLabelStr.replace('{seconds}', `${timer}`) + const alarmCom = ( + + ) + + return ( +
    + { + timer != 0 + && +
    +
    + {alarmCom} +
    +
    +
    + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/matrixAdjust/index.js b/pc4backstage/hrmengine/components/matrixAdjust/index.js new file mode 100644 index 0000000..392ba34 --- /dev/null +++ b/pc4backstage/hrmengine/components/matrixAdjust/index.js @@ -0,0 +1,100 @@ +import '../../style/matrixAdjust.less'; +import React, { + Component +} from 'react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu +} from 'ecCom'; +import { + Spin +} from 'antd'; +import { + inject, + observer +} from 'mobx-react'; +import Dashboard from './Dashboard'; +import Content from './Content'; +import Result from './Result'; +import { + i18n +} from '../../public/i18n'; + +@inject("hrmMatrixAdjust") + +@observer +export default class MatrixAdjust extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmMatrixAdjust: store, + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('matrix/pages/matrixMassMaint', null, () => initData(this.props.location.query)); + } + + render() { + const { + hrmMatrixAdjust: store + } = this.props; + const { + containerInitFinished, + getMenu, + showSpin, + showResult + } = store; + const menus = getMenu(); + const topProps = { + title: i18n.module.matrixAdjust(), + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + dropMenuDatas: menus + } + + return ( +
    + { + containerInitFinished.init && containerInitFinished.authorized && + + + { + showResult + ? + + : + + + + + } + + + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
    {i18n.message.authFailed()}
    +
    + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/moduleManage/Editor.js b/pc4backstage/hrmengine/components/moduleManage/Editor.js new file mode 100644 index 0000000..8868350 --- /dev/null +++ b/pc4backstage/hrmengine/components/moduleManage/Editor.js @@ -0,0 +1,182 @@ +import { + WeaDialog, + WeaFormItem, + WeaNewScroll, + WeaMoreButton, +} from 'ecCom' + +import { + Spin, + Button, +} from 'antd' + +import { + WeaSwitch +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; +import {addContentPath} from '../../util/index.js' + +export default class Editor extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 700, + height: 355, + } + } + + getButtons = () => { + const { + loading, + save, + isSaveButtonShow + } = this.props; + + let buttons = [ + (), + () + ]; + + return buttons; + } + + getForm() { + const { + form, + condition, + isFormInit, + selectedValue, + formType, + } = this.props; + + let arr = []; + isFormInit && condition.map((c, i) => { + c.items.map((field, index) => { + if (formType == 'new') { + let key = field.domkey[0] + if (selectedValue == '1' && key == 'hrmid') { + return + } + if (selectedValue == '2' && key == 'roleid') { + return + } + } + arr.push( + this.handleChange(e)}/> + ) + }) + arr.push( +
    {this.getCheckboxs()}
    +

    {`${i18n.label.onlySelectedAdmin()}${i18n.label.decentralizationLink()}`}{i18n.label.decentralizationSet()}

    +
    ) + }) + return
    {arr}
    + } + + getCheckboxs = () => { + const { + checkboxCondition, + checkboxForm, + isCheckboxFormInit + } = this.props; + + let arr = []; + isCheckboxFormInit && checkboxCondition.map(c => { + c.items.map((field, index) => { + arr.push( + this.handleCheckboxClick(e)}/> + ) + }) + }) + + return {arr} + } + + handleChange = (e) => { + const { + setSelectedValue + } = this.props; + + if (Object.keys(e)[0] == 'roleIdType') { + setSelectedValue(e.roleIdType.value); + } + + } + + handleCheckboxClick = (e) => { + const { + setDialogSaveButtonStatus, + checkboxForm, + } = this.props; + + let params = checkboxForm.getFormParams(); + if (this.isCheckboxSelected(params)) { + setDialogSaveButtonStatus(true); + } else { + setDialogSaveButtonStatus(false); + } + } + + isCheckboxSelected = (params) => { + let values = Object.values(params); + let index = values.findIndex(value => value == '1'); + if (index > -1) { + return true; + } else { + return false; + } + } + + render() { + const { + title, + visible, + loading, + onCancel, + } = this.props, { + width, + height, + } = this.state; + + return ( + onCancel() } + buttons={this.getButtons()} + style={{width: width, height: height}} + onChangeHeight={(h) => this.setState({height: h})} + > + { + loading ?
    + +
    + :
    + {this.getForm()} +
    + } +
    + ) + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/moduleManage/index.js b/pc4backstage/hrmengine/components/moduleManage/index.js new file mode 100644 index 0000000..100f6a3 --- /dev/null +++ b/pc4backstage/hrmengine/components/moduleManage/index.js @@ -0,0 +1,465 @@ +import React from 'react' +import { + toJS +} from 'mobx' + +import { + inject, + observer, +} from 'mobx-react' + +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, + WeaAlertPage, +} from 'ecCom' + +import { + Row, + Col, + Spin, + Modal, + Button, + message, +} from 'antd' + +import { + WeaSwitch, + WeaTableNew, +} from 'comsMobx' + +import { + i18n +} from '../../public/i18n'; + +import Editor from './Editor' + +const confirm = Modal.confirm; +const WeaTable = WeaTableNew.WeaTable; + +import '../../style/moduleManage.css' + +@inject('hrmModuleManageSet') +@observer +export default class ModuleManage extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.moduleManagementDecent(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + + init() { + const { + hrmModuleManageSet + } = this.props, { + getRight, + mobxDatasReset + } = hrmModuleManageSet + + mobxDatasReset(); + getRight(); + } + + getDropMenuDatas = () => { + const { + hrmModuleManageSet + } = this.props, { + menu + } = hrmModuleManageSet, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmModuleManageSet + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmModuleManageSet; + + isPanelShow && setPanelStatus(false); + this[key] && this[key](); + } + + getTopMenuBtns = () => { + const { + hrmModuleManageSet + } = this.props, { + menu, + tableStore + } = hrmModuleManageSet, { + topMenu + } = menu; + + let btns = []; + toJS(topMenu).map((item, index) => { + if (item.menuFun !== 'batchDelete') { + btns.push(); + } else { + btns.push(); + } + }); + return btns; + } + + handleClick = (item) => { + const { + hrmModuleManageSet + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmModuleManageSet; + + isPanelShow && setPanelStatus(false); + this[item.menuFun] && this[item.menuFun]() + } + + new() { + const { + hrmModuleManageSet + } = this.props, { + setEditorDialogVisible + } = hrmModuleManageSet + + setEditorDialogVisible(true, 'new'); + } + + batchDelete() { + const { + hrmModuleManageSet + } = this.props, { + tableStore, + setSelectedRowsKeys + } = hrmModuleManageSet; + + let keys = toJS(tableStore.selectedRowKeys).toString(); + setSelectedRowsKeys(keys); + this.deleteRows(); + } + + deleteRows(id) { + const { + hrmModuleManageSet + } = this.props, { + setSelectedRowsKeys + } = hrmModuleManageSet; + + id && setSelectedRowsKeys(id); + let v = id ? 'del' : 'batchDel'; + this.showConfirm(v); + } + + showConfirm(v) { + let _this = this; + confirm({ + title: i18n.confirm.defaultTitle(), + content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + _this.onOk() + }, + onCancel() { + return false + }, + }); + } + + onOk() { + const { + hrmModuleManageSet + } = this.props, { + deleteTableRows + } = hrmModuleManageSet; + + deleteTableRows(); + } + + custom = () => { + const { + hrmModuleManageSet + } = this.props, { + tableStore + } = hrmModuleManageSet; + + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + + log = () => { + window.setLogViewProps({ + logSmallType: '3051', + }); + } + + editorSave() { + const { + hrmModuleManageSet + } = this.props, { + editor, + addModuleManageInfo, + } = hrmModuleManageSet; + + addModuleManageInfo(); + } + + getDropPanelButtons() { + const { + hrmModuleManageSet + } = this.props, { + searchPanel, + setPanelStatus + } = hrmModuleManageSet, { + form + } = searchPanel; + + const btn = [ + (), + (), + (), + ]; + return btn; + } + + getBaseValueOfSearch() { + const { + hrmModuleManageSet + } = this.props, { + searchPanel + } = hrmModuleManageSet, { + form, + value + } = searchPanel; + + let val; + if (form.isFormInit) { + val = form.getFormParams().name; + } else { + val = value; + } + return val; + } + + handleSearchChange(val) { + const { + hrmModuleManageSet + } = this.props, { + searchPanel, + updateFields, + setBaseValueOfSearch + } = hrmModuleManageSet, { + form + } = searchPanel + + if (form.isFormInit) { + updateFields(val); + } + setBaseValueOfSearch(val); + } + + handlePanelStatus(bool) { + const { + hrmModuleManageSet + } = this.props, { + searchPanel, + setPanelStatus, + getSearchCondition + } = hrmModuleManageSet, { + condition + } = searchPanel; + + if (bool) { + setPanelStatus(true); + condition.length == 0 && getSearchCondition(); //第一次打开面板时加载数据 + } else { + setPanelStatus(false); + } + } + + handleSearch() { + const { + hrmModuleManageSet + } = this.props, { + isPanelShow, + setPanelStatus, + getTableInfo + } = hrmModuleManageSet; + + getTableInfo(); + isPanelShow && setPanelStatus(false); + } + + reRenderColumns(columns) { + let _this = this; + columns.forEach((c, index) => { + if (c.dataIndex == 'roleid') { + c.render = function(text, record) { + return _this.doEdit(record.randomFieldId)} >{record.roleidspan} + } + }; + }) + } + + onOperatesClick(record, index, operate) { + const { + hrmModuleManageSet + } = this.props, { + setEditorDialogVisible, + setSelectedRowsKeys + } = hrmModuleManageSet; + + let i = operate.index, + id = record.randomFieldId; + + switch (i) { + case '0': //编辑 + this.doEdit(id) + break; + case '1': //删除 + this.deleteRows(id) + break; + } + } + + doEdit = (id) => { + const { + hrmModuleManageSet + } = this.props, { + setSelectedRowsKeys, + setEditorDialogVisible, + } = hrmModuleManageSet; + + setSelectedRowsKeys(id); + setEditorDialogVisible(true, 'edit'); + } + + render() { + const { + hrmModuleManageSet + } = this.props, { + loading, + title, + isPanelShow, + setPanelStatus, + tableStore, + searchPanel, + editor, + setEditorDialogVisible, + setSelectedValue, + setDialogSaveButtonStatus, + authorized, + date, + } = hrmModuleManageSet, { + conditionCount, + form + } = searchPanel; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + return ( +
    + this.handleMenuClick(key)} + collectParams={{favname:title,favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + this.handlePanelStatus(b)} + hideSearchAd={ () => setPanelStatus(false)} + searchsAd= {
    ( e.keyCode == 13 && e.target.tagName === "INPUT") && this.handleSearch()} + >{form.render()}
    } + onSearch={() => this.handleSearch()} + onSearchChange={val => this.handleSearchChange(val)} + /> + this.reRenderColumns(c)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + /> +
    +
    + this.editorSave()} + onCancel={() => setEditorDialogVisible(false)} + setSelectedValue={val => setSelectedValue(val, false)} + setDialogSaveButtonStatus={bool => setDialogSaveButtonStatus(bool)} + /> +
    + ) + } + + + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/AsyncTree.js b/pc4backstage/hrmengine/components/newPost/AsyncTree.js new file mode 100644 index 0000000..7fd3bb7 --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/AsyncTree.js @@ -0,0 +1,99 @@ +import React, { Component } from "react"; +import { + observer, + inject +} from 'mobx-react' +import { WeaTree, WeaTreeTest, WeaLocaleProvider, WeaInputSearch } from "ecCom"; +import { toJS } from 'mobx' +import random from "lodash/random"; +import { getJobTree } from '../../apis/post.js' +const getLabel = WeaLocaleProvider.getLabel; + +const getTrees = ( + props, + style = { + position: 'absolute', + height: '100%', + width: '100%', + overflow: 'auto', + overflowX: 'hidden' + } +) => ( +
    +
    +
    + {getLabel('82664', "岗位体系")} + +
    + +
    +
    + ); +@inject('hrmNewPost') +@observer +export default class Main extends Component { + constructor(props) { + super(props); + this.state = { + expandedKeys: ['0'] // 默认展开父节点 + }; + } + + componentDidMount () { + const { asyncTreeInit } = this.props.hrmNewPost; + asyncTreeInit() + } + loadDataHandle = (item) => { + let asyncTreeSubData = {} + const { handleOrgTreeNodeClick, orgTree } = this.props.hrmNewPost + handleOrgTreeNodeClick(item.id, item) + return ( + // 模拟异步加载 + getJobTree(orgTree).then(data => { + asyncTreeSubData = {} + asyncTreeSubData = data.datas; + return data = { + datas: asyncTreeSubData + }; + })) + + } + onSelectHandle = (event, ids, nodeids, nodes) => { + const { handleOrgTreeNodeClick } = this.props.hrmNewPost; + if (!nodeids[0].isParent) { + handleOrgTreeNodeClick(nodeids[0].id, nodeids[0]) + } else { + this.loadDataHandle(nodeids[0]) + } + + } + onSearchHandle = (value) => { + const { onSearchHandleMobx } = this.props.hrmNewPost; + onSearchHandleMobx(value) + } + SearchValueChange = (value) => { + const { onSearchHandleMobx } = this.props.hrmNewPost; + onSearchHandleMobx(value) + } + + render = () => { + const { expandedKeys } = this.state; + const { asyncTreeData, handleOrgTreeNodeClick, searchData, searchFlag, searchvalue } = this.props.hrmNewPost; + const Datasource = (searchFlag == 0 ? toJS(asyncTreeData) : toJS(searchData)); + return getTrees({ + searchvalue: searchvalue, + checkStrictly: false, + datas: Datasource, + expandedKeys, + loadData: this.loadDataHandle, + onSelect: this.onSelectHandle, + onSearch: this.onSearchHandle, + SearchValueChange: this.SearchValueChange, + }); + }; +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/BriefInfo.js b/pc4backstage/hrmengine/components/newPost/BriefInfo.js new file mode 100644 index 0000000..4b371ff --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/BriefInfo.js @@ -0,0 +1,42 @@ +import { + observer +} from 'mobx-react'; +import { + Row, + Col +} from 'antd'; + +@observer +export default class BriefInfo extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + store + } = this.props, { + briefInfo + } = store; + + return ( +
    + { + briefInfo.map((data, index) => { + const { + label, + value + } = data; + + return ( + +
    {`${label} :`} + + + ) + }) + } + + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/Content.js b/pc4backstage/hrmengine/components/newPost/Content.js new file mode 100644 index 0000000..774dbaa --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/Content.js @@ -0,0 +1,59 @@ +import { + observer, +} from 'mobx-react' +import { + WeaLeftRightLayout, +} from 'ecCom' +// import OrgTree from './OrgTree' +import Table from './Table' +import Tab from './Tab' +import BriefInfo from './BriefInfo' +import WeaTree from './AsyncTree' + +@observer +export default class Content extends React.Component { + constructor(props) { + super(props); + } + + render () { + const { + store + } = this.props, { + date, + selectedKey, + orgTree, + isTreeShow, + } = store, { + type + } = orgTree; + + // const tree = ; + const tree = + const rightLayout = ( +
    + {type !== 'JobTitle' && } + { + (type !== 'all' && selectedKey === '0') ? :
    + } + + ); + + if (isTreeShow) { + return ( + + {rightLayout} + + ); + } else { + return rightLayout; + } + + + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/Dialog.js b/pc4backstage/hrmengine/components/newPost/Dialog.js new file mode 100644 index 0000000..f2defa9 --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/Dialog.js @@ -0,0 +1,67 @@ +import { + observer +} from 'mobx-react'; +import { + WeaDialog, + WeaFormItem, +} from 'ecCom'; +import { + WeaSwitch +} from 'comsMobx' +import {AttachToNumberField} from '../../util/index.js' + +@observer +export default class Dialog extends React.Component { + constructor(props) { + super(props); + } + + customRender = (c, form) => { + const {store:{isEdit}} = this.props; + return c.items.map((item, index) => { + const { + label, + labelcol, + fieldcol, + } = item; + + return ( + + + {item.domkey[0] == 'jobtitlecode' && } + + ) + }); + } + + render() { + const { + store, + dialogSpecial, + } = this.props, { + dialogCommon, + dialogStyle, + } = store, { + form + } = dialogSpecial; + + return ( + +
    + { form.render({},{},true,(c) => this.customRender(c,form))} +
    +
    + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/OrgTree.js b/pc4backstage/hrmengine/components/newPost/OrgTree.js new file mode 100644 index 0000000..6b6bf22 --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/OrgTree.js @@ -0,0 +1,61 @@ +// import { +// WeaOrgTree +// } from 'ecCom' +// import { +// observer, +// } from 'mobx-react' + +// @observer +// export default class OrgTree extends React.Component { +// constructor(props) { +// super(props); +// this.tree = null; +// this.setRef = element => { +// this.tree = element; +// } +// } + +// componentWillReceiveProps(nextProps) { +// if (this.props.date !== nextProps.date) { +// this.init(); +// } +// } + +// componentDidMount() { +// this.init() +// } + +// init = () => { +// if (this.tree) this.tree.reset(() => this.tree.fetchData()); +// } + +// renderNode = (node) => { +// const { canCanceled,name } = node; +// if (canCanceled) { +// return {name}(已封存) +// }else{ +// return {name} +// } +// } + +// render() { +// const { +// store +// } = this.props, { +// tree +// } = store; + +// return ( +//
    +// this.renderNode(node)} +// /> +//
    +// ); +// } +// } \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/Tab.js b/pc4backstage/hrmengine/components/newPost/Tab.js new file mode 100644 index 0000000..ccf5bd0 --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/Tab.js @@ -0,0 +1,47 @@ +import { + observer +} from 'mobx-react'; +import { + WeaTab +} from 'ecCom'; + +@observer +export default class Tab extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.store.getSearchForm(); + } + + render() { + const { + store + } = this.props, { + tab, + tabDatas, + selectedKey, + searchsBaseValue, + showSearchAd, + search, + searchType, + } = store, { + form + } = search; + + return ( + ( e.keyCode == 13 && e.target.tagName === "INPUT") && tab.onSearch()} + >{form.render()}} + /> + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/Table.js b/pc4backstage/hrmengine/components/newPost/Table.js new file mode 100644 index 0000000..c320cbd --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/Table.js @@ -0,0 +1,110 @@ +import { + observer +} from 'mobx-react'; +import { + WeaTableNew +} from 'comsMobx'; +const WeaTable = WeaTableNew.WeaTable; + +@observer +export default class Table extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.store.getTable(); + } + + reRenderColumns = (columns, store) => { + const { + onTableTdClick, + orgTree, + } = store, { + type + } = orgTree; + + columns.map(c => { + let bool; + if (type === 'all') { + bool = ['jobgroupremark', 'result'].includes(c.dataIndex) ? true : false; + } + if (type === 'JobGroup') { + bool = ['jobactivitymark'].includes(c.dataIndex) ? true : false; + } + if (type === 'JobActivity') { + bool = ['jobtitlemark'].includes(c.dataIndex) ? true : false; + } + if (bool) { + c.render = function(text, record) { + const { + randomFieldId, + jobtitlemarkspan + } = record; + + if (type === 'JobActivity') { + return onTableTdClick(randomFieldId)} dangerouslySetInnerHTML={{__html:jobtitlemarkspan}}> + }else{ + return onTableTdClick(randomFieldId)}>{text} + } + + } + } + }); + } + + onOperatesClick = (record, rIndex, operate, store) => { + const { + randomFieldId + } = record, { + index + } = operate; + + const { + orgTree, + edit, + del, + doUndo, + showConfirm, + } = store, { + type + } = orgTree; + + if (index === '0') { + edit(randomFieldId); + } else if (index === '1') { + del(randomFieldId); + } else if(index == "3" ){ + showConfirm().then(() => { + doUndo(randomFieldId,index); + }) + } else if( index == "4"){ + doUndo(randomFieldId,index); + } else { + window.setLogViewProps({ + logSmallType: (type == 'all') ? '3012' : (type == 'JobGroup') ? '3013' : '3014', + targetId: randomFieldId, + }); + } + + } + + render() { + const { + store + } = this.props, { + tableStore, + onTableTdClick, + } = store; + + return ( + this.reRenderColumns(columns,store)} + onOperatesClick={(record, index, operate) => this.onOperatesClick(record,index, operate,store)} + /> + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/Top.js b/pc4backstage/hrmengine/components/newPost/Top.js new file mode 100644 index 0000000..20643a3 --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/Top.js @@ -0,0 +1,46 @@ +import { + observer +} from 'mobx-react'; +import { + WeaTop, + WeaRightMenu, + WeaLocaleProvider, +} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +@observer +export default class Top extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.props.store.getRightMenu(); + } + + render() { + const { + store + } = this.props, { + top, + topLoading, + topButtons, + breadcrumb, + dropMenuDatas, + } = store; + + return ( + + + {this.props.children} + + + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/newPost/index.js b/pc4backstage/hrmengine/components/newPost/index.js new file mode 100644 index 0000000..7552ed2 --- /dev/null +++ b/pc4backstage/hrmengine/components/newPost/index.js @@ -0,0 +1,76 @@ +import React from 'react'; +import { + inject, + observer, +} from 'mobx-react'; +import Top from './Top'; +import Content from './Content'; +import Dialog from './Dialog'; +import Import from '../importRelatedComponet/index'; +import '../../style/newPost.less'; + +@inject('hrmImportCommon') +@inject('hrmNewPost') +@observer +export default class NewPost extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount () { + const { + hrmNewPost: store, + hrmImportCommon + } = this.props; + + store.exportStore(hrmImportCommon, store); + } + + componentWillReceiveProps (nextProps) { + const { hrmNewPost } = this.props + if (this.props.location.key !== nextProps.location.key) { + this.init(); + hrmNewPost.onSearchHandleMobx() + } + } + + componentDidMount () { + const { hrmNewPost } = this.props + this.init(); + hrmNewPost.onSearchHandleMobx() + } + + init = () => { + const { + hrmNewPost: store + } = this.props; + + store.refresh(); + } + + render () { + const { + hrmImportCommon, + hrmNewPost: store, + } = this.props, { + dialog, + } = store, { + importDialog + } = hrmImportCommon; + + return ( +
    + + + + { + dialog.visible && + } + {importDialog.visible && } +
    + ); + } + +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/normalLog/index.js b/pc4backstage/hrmengine/components/normalLog/index.js new file mode 100644 index 0000000..3544109 --- /dev/null +++ b/pc4backstage/hrmengine/components/normalLog/index.js @@ -0,0 +1,116 @@ +import React, { + Component +} from 'react'; +import { + observer, + inject +} from 'mobx-react'; +import { + toJS +} from 'mobx'; +import { + Authority, + Top, + Search, + RadioGroup, + Table, + Dialog, +} from '../../public/valhalla/components/index.js'; +import {WeaTable } from "ecCom"; +import "../../style/sanyuanLog.less"; + +@inject('normalLogStore') +@observer +export default class NormalLog extends Component { + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.initPage(); + } + } + + componentDidMount() { + this.initPage(); + } + + initPage = () => { + this.props.normalLogStore.initPage(); + } + + getDialogContent = () => { + const { + normalLogStore + } = this.props, { + logDetail, + isLogDetail, + originParams, + columns, + datas, + } = normalLogStore; + + return ( + + { + isLogDetail ?( logDetail && logDetail.map(detail => { + return ( +
    + {detail} +
    + ) + }) ) : originParams.map(param => { + return ( +
    + {param} +
    + ) + }) + } + { + datas.map( (data,index) => { + if (data.length > 0) { + return ( +
    + +
    + ) + } + }) + } +
    + ) + } + + render() { + const { + normalLogStore + } = this.props, { + authorityStore, + topStore, + searchStore, + radioGroupStore, + tableListStore, + dialogStore, + } = normalLogStore; + + return ( +
    + + + + +
    + + {dialogStore.visible && ( + + {this.getDialogContent()} + + )} + + + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/onlinAttendance/index.js b/pc4backstage/hrmengine/components/onlinAttendance/index.js new file mode 100644 index 0000000..b947a1b --- /dev/null +++ b/pc4backstage/hrmengine/components/onlinAttendance/index.js @@ -0,0 +1,102 @@ +import '../../style/onlineAttendance.less'; +import React, { + Component +} from 'react'; +import { + inject, + observer +} from 'mobx-react'; +import { + WeaTop, + WeaAlertPage, + WeaRightMenu +} from 'ecCom'; +import FormInfo from '../../coms/FormInfo'; +import { + i18n +} from '../../public/i18n'; + +@inject('hrmOnlineAttendance') + +@observer +export default class OnlineAttendance extends Component { + constructor(props) { + super(props); + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init = () => { + const { + hrmOnlineAttendance: store + } = this.props; + const { + checkAuthorized, + initData + } = store; + checkAuthorized('onlinekqsystemset', null, initData); + } + + render() { + const { + hrmOnlineAttendance: store + } = this.props; + const { + containerInitFinished, + topBtnAndMenu, + formTarget, + refreshForm, + itemRender + } = store; + const { + btns, + menus + } = topBtnAndMenu(); + const { + dataForm: form, + dataFormFields: fields + } = formTarget; + const topProps = { + title: i18n.module.onlineAttendance(), + icon: , + iconBgcolor: '#217346', + showDropIcon: true, + buttons: btns, + dropMenuDatas: menus + } + return ( +
    + { + containerInitFinished.init && containerInitFinished.authorized && + + { + form && form.isFormInit && + +
    + +
    +
    + } +
    + } + { + containerInitFinished.init && !containerInitFinished.authorized && + +
    {i18n.message.authFailed()}
    +
    + } +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/onlineAnalysis/Echarts.js b/pc4backstage/hrmengine/components/onlineAnalysis/Echarts.js new file mode 100644 index 0000000..23031ff --- /dev/null +++ b/pc4backstage/hrmengine/components/onlineAnalysis/Echarts.js @@ -0,0 +1,78 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaEchart, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmOnlineAnalysis') +@observer +export default class Echarts extends React.Component { + constructor(props) { + super(props); + this.lineChart = null; + this.barChart = null; + this.setLineChartRef = element => { + this.lineChart = element; + } + this.setBarChartRef = element => { + this.barChart = element; + } + const _this = this; + window.onresize = function() { + _this.lineChart && _this.lineChart.chart.resize(); + _this.barChart && _this.barChart.chart.resize(); + } + } + + componentWillReceiveProps(nextProps) { + let preChart = toJS(this.props.hrmOnlineAnalysis.echart), + changedChart = toJS(nextProps.hrmOnlineAnalysis.echart), + + preLineOption = preChart.lineOption, + changedLineOption = changedChart.lineOption, + + preBarOption = preChart.barOption, + changedBarOption = changedChart.barOption; + + if (preLineOption !== changedLineOption) { + this.lineChart && this.lineChart.paint(); + } + if (preBarOption !== changedBarOption) { + this.barChart && this.barChart.paint(); + } + } + + render() { + const { + hrmOnlineAnalysis + } = this.props, { + key, + echart, + isEmptyObject + } = hrmOnlineAnalysis, { + lineOption, + barOption, + } = echart; + + return ( +
    + {!isEmptyObject(lineOption) &&
    + +
    } + {!isEmptyObject(barOption) &&
    + +
    } +
    + + + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/onlineAnalysis/RadioGroup.js b/pc4backstage/hrmengine/components/onlineAnalysis/RadioGroup.js new file mode 100644 index 0000000..d2da2d3 --- /dev/null +++ b/pc4backstage/hrmengine/components/onlineAnalysis/RadioGroup.js @@ -0,0 +1,47 @@ +import { + inject, + observer, +} from 'mobx-react' +import { + toJS +} from 'mobx' +import { + WeaRadioGroup, +} from 'ecCom' +import { + i18n +} from '../../public/i18n'; + +@inject('hrmOnlineAnalysis') +@observer +export default class RadioGroup extends React.Component { + constructor(props) { + super(props); + } + + render() { + const { + hrmOnlineAnalysis + } = this.props, { + radioGroup, + setTimeScopeParams, + clusterConfig, + } = hrmOnlineAnalysis, { + maxConfig, + timeScopeConfig, + hasSelect, + } = radioGroup; + + return ( +
    +
    + {toJS(timeScopeConfig).length > 0 && setTimeScopeParams(params)} />} +
    +
    + {hasSelect && } +
    + +
    + ) + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/onlineAnalysis/index.js b/pc4backstage/hrmengine/components/onlineAnalysis/index.js new file mode 100644 index 0000000..a17189d --- /dev/null +++ b/pc4backstage/hrmengine/components/onlineAnalysis/index.js @@ -0,0 +1,194 @@ +import React from 'react' +import { + toJS +} from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaTab, + WeaRightMenu, + WeaAlertPage, + WeaLeftRightLayout, +} from 'ecCom' +import { + Spin, +} from 'antd'; +import { + i18n +} from '../../public/i18n'; +import '../../style/onlineAnalysis.css' +import OrganizationTree from '../../coms/OrganizationTree'; +import RadioGroup from './RadioGroup' +import Echarts from './Echarts' + +@inject('hrmOnlineAnalysis') +@observer +export default class OnlineAnalysis extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + let bool = window.location.href.indexOf('/spa/hrm/engine.html') > -1; + if (bool) { + document.title = i18n.module.onlineAnalysis(); + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.location.key !== nextProps.location.key) { + this.props.hrmOnlineAnalysis.mobxDatasReset(); + this.init(); + } + } + + componentDidMount() { + this.init(); + } + + init() { + this.props.hrmOnlineAnalysis.getRight(); + } + + componentWillUnmount() { + this.props.hrmOnlineAnalysis.mobxDatasReset(); + } + + getDropMenuDatas = () => { + const { + hrmOnlineAnalysis + } = this.props, { + menu + } = hrmOnlineAnalysis, { + rightMenu + } = menu; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'log' || item.menuFun == 'custom' || item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + + return menus; + } + + handleMenuClick = (key) => { + const { + hrmOnlineAnalysis + } = this.props, { + isPanelShow, + setPanelStatus + } = hrmOnlineAnalysis; + + isPanelShow && setPanelStatus(false); + this[key] && this[key](); + } + + getTabName = () => { + const tabDatas = [{ + key: '0', + title: i18n.label.today() + }, { + key: '1', + title: i18n.label.tswk() + }, { + key: '2', + title: i18n.label.tsmth() + }, { + key: '3', + title: i18n.label.tssn() + }, { + key: '4', + title: i18n.label.tsyr() + }, { + key: '5', + title: i18n.label.customTimeSegment() + }] + + return tabDatas; + } + + render() { + const { + hrmOnlineAnalysis + } = this.props, { + authorized, + loading, + title, + key, + switchKey, + detachable, + orgTreeProps, + loading1, + } = hrmOnlineAnalysis; + + if (!authorized) { + return ( +
    + {loading ?
    + +
    + :
    + +
    + {i18n.message.authFailed()} +
    +
    +
    + } +
    + ) + } else { + const coms = [ + switchKey(key)} + datas={this.getTabName()} + />, + , + + ]; + let children; + // if(detachable){ + // children = ( + // }> + // {coms} + // + // ) + // }else{ + children = coms; + // } + return ( + this.handleMenuClick(key)} + collectParams={{favname:title(),favouritetype:5}} + > + } + iconBgcolor='#217346' + loading={true} + buttons={[]} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={e => this.handleMenuClick(e)} + > + {children} + + + ) + } + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/components/orgChart/Chart.js b/pc4backstage/hrmengine/components/orgChart/Chart.js new file mode 100644 index 0000000..adaa430 --- /dev/null +++ b/pc4backstage/hrmengine/components/orgChart/Chart.js @@ -0,0 +1,32 @@ +import React, { + Component +} from 'react'; +import { + observer +} from 'mobx-react'; +import {addContentPath} from '../../util/index.js' + +@observer +export default class Chart extends Component { + constructor(props) { + super(props); + } + + componentDidMount() {} + + componentWillReceiveProps(nextProps) {} + + render() { + const { + store + } = this.props; + const { + setIframe + } = store; + return ( +
    +