From 623ec36c652d7673267bc3c5aea1ebab6673afef Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 15 May 2024 16:50:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E5=A7=94=E4=BC=9A=E5=BE=AE=E6=90=9C?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E6=98=BE=E7=A4=BAtab=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmAttendance/apis/applicationSettings.js | 19 - pc4backstage/hrmAttendance/apis/attendance.js | 10 - .../apis/attendanceRpSharingSetting.js | 31 - pc4backstage/hrmAttendance/apis/common.js | 24 - .../hrmAttendance/apis/groupSetting.js | 69 - .../hrmAttendance/apis/holidayRule.js | 51 - .../hrmAttendance/apis/holidaySetting.js | 59 - .../hrmAttendance/apis/holidayType.js | 43 - .../hrmAttendance/apis/importScheduleCode.js | 43 - .../hrmAttendance/apis/importresource.js | 48 - .../hrmAttendance/apis/initSetting.js | 23 - .../apis/kqMonthReportSetting.js | 24 - .../hrmAttendance/apis/newHolidayRule.js | 55 - .../hrmAttendance/apis/overtimeRule.js | 43 - .../hrmAttendance/apis/scheduleCode.js | 13 - .../hrmAttendance/apis/scheduleSetting.js | 25 - .../hrmAttendance/apis/shiftManager.js | 33 - .../hrmAttendance/apis/timeSelection.js | 11 - pc4backstage/hrmAttendance/apis/travelRule.js | 19 - pc4backstage/hrmAttendance/apis/upgrade.js | 13 - .../hrmAttendance/apis/vacationBalance.js | 35 - .../hrmAttendance/apis/vacationRemain.js | 51 - .../hrmAttendance/apis/vacationRule.js | 43 - .../hrmAttendance/apis/vacationType.js | 43 - pc4backstage/hrmAttendance/apis/workflow.js | 45 - pc4backstage/hrmAttendance/components/Home.js | 82 - .../components/applicationSettings/index.js | 61 - .../attendanceReportSharingSetting/Dialog.js | 61 - .../attendanceReportSharingSetting/Tab.js | 49 - .../attendanceReportSharingSetting/Table.js | 33 - .../attendanceReportSharingSetting/Top.js | 49 - .../attendanceReportSharingSetting/index.js | 56 - .../attendanceSyncSetting/FieldSetting.js | 41 - .../FieldSettingExplain.js | 45 - .../attendanceSyncSetting/SyncSetting.js | 84 - .../components/attendanceSyncSetting/index.js | 99 - .../components/groupSetting/AddToGroup.js | 52 - .../components/groupSetting/Content.js | 68 - .../components/groupSetting/Edit.js | 59 - .../components/groupSetting/GroupInfo4Coms.js | 68 - .../components/groupSetting/GroupSearch.js | 75 - .../components/groupSetting/Info.js | 49 - .../components/groupSetting/InfoSingle.js | 94 - .../components/groupSetting/Map.js | 183 -- .../components/groupSetting/SearchRadio.js | 18 - .../groupSetting/illustrateDialog.js | 64 - .../components/groupSetting/index.js | 127 - .../groupSetting/info/AttendanceType.js | 54 - .../components/groupSetting/info/BaseInfo.js | 52 - .../groupSetting/info/LocationEdit.js | 57 - .../components/groupSetting/info/Member.js | 55 - .../groupSetting/info/SerialSetting.js | 51 - .../groupSetting/info/SerialTableList.js | 81 - .../components/groupSetting/info/WifiEdit.js | 54 - .../holidayRule/BalanceConversionRules.js | 325 -- .../components/holidayRule/Dialog.js | 323 -- .../components/holidayRule/Search.js | 59 - .../components/holidayRule/Table.js | 143 - .../components/holidayRule/Top.js | 66 - .../components/holidayRule/index.js | 70 - .../holidaySettingNew/Annotation.js | 69 - .../holidaySettingNew/ConditionGroup.js | 74 - .../components/holidaySettingNew/Dialog.js | 68 - .../components/holidaySettingNew/Tab.js | 58 - .../components/holidaySettingNew/Table.js | 57 - .../components/holidaySettingNew/Top.js | 101 - .../components/holidaySettingNew/Year.js | 123 - .../components/holidaySettingNew/index.js | 77 - .../components/holidayType/Dialog.js | 39 - .../components/holidayType/DialogForm.js | 62 - .../components/holidayType/Search.js | 41 - .../components/holidayType/Table.js | 90 - .../components/holidayType/Top.js | 41 - .../components/holidayType/index.js | 71 - .../importExternalAttendanceData/index.js | 117 - .../importRelatedComponet/ImportHistory.js | 118 - .../importRelatedComponet/ImportLog.js | 174 - .../importRelatedComponet/ImportResult.js | 227 -- .../components/importRelatedComponet/index.js | 273 -- .../ImportHistory.js | 118 - .../importScheduleCodeComponet/ImportLog.js | 174 - .../ImportResult.js | 227 -- .../importScheduleCodeComponet/index.js | 273 -- .../components/init/AnalysisResult.js | 202 -- .../hrmAttendance/components/init/InitForm.js | 299 -- .../hrmAttendance/components/init/Top.js | 51 - .../components/init/confirmUtil.js | 102 - .../hrmAttendance/components/init/index.js | 53 - .../kqMonthReportSetting/CreateFieldDefine.js | 32 - .../kqMonthReportSetting/CreateGroup.js | 31 - .../kqMonthReportSetting/FieldDataList.js | 53 - .../kqMonthReportSetting/FieldTabs.js | 22 - .../kqMonthReportSetting/GroupList.js | 0 .../kqMonthReportSetting/GroupListSetting.js | 19 - .../components/kqMonthReportSetting/index.js | 64 - .../newHolidayRule/BalanceConversionRules.js | 364 --- .../components/newHolidayRule/Dialog.js | 39 - .../components/newHolidayRule/DialogForm.js | 227 -- .../components/newHolidayRule/Search.js | 40 - .../components/newHolidayRule/Table.js | 74 - .../components/newHolidayRule/Top.js | 41 - .../components/newHolidayRule/index.js | 64 - .../components/overtimeRule/Dialog.js | 403 --- .../components/overtimeRule/DirtyComponent.js | 73 - .../components/overtimeRule/Form.js | 27 - .../components/overtimeRule/OvertimeRule.js | 93 - .../components/overtimeRule/RestTime.js | 86 - .../components/overtimeRule/Table.js | 135 - .../components/overtimeRule/Top.js | 116 - .../components/overtimeRule/index.js | 85 - .../components/scheduleSetting/Analysis.js | 47 - .../components/scheduleSetting/Bar.js | 53 - .../scheduleSetting/CycleSetting.js | 103 - .../components/scheduleSetting/DaySetting.js | 64 - .../scheduleSetting/DropdownOverlay.js | 56 - .../components/scheduleSetting/GroupEdit.js | 15 - .../scheduleSetting/HolidaySetting.js | 12 - .../components/scheduleSetting/Info.js | 43 - .../components/scheduleSetting/ListCell.js | 117 - .../components/scheduleSetting/ListHeader.js | 83 - .../scheduleSetting/ScheduleList.js | 81 - .../components/scheduleSetting/Setting.js | 19 - .../components/scheduleSetting/index.js | 100 - .../components/schedulecode/Content.js | 87 - .../components/schedulecode/DeviceEdit.js | 47 - .../components/schedulecode/DeviceList.js | 107 - .../components/schedulecode/Edit.js | 58 - .../components/schedulecode/index.js | 113 - .../components/shiftManager/Content.js | 61 - .../components/shiftManager/Edit.js | 106 - .../components/shiftManager/LinkComs.js | 52 - .../components/shiftManager/Msg.js | 22 - .../shiftManager/WorkTimeAnalysis.js | 19 - .../components/shiftManager/index.js | 125 - .../shiftManager/reminder/ReminderContent.js | 71 - .../shiftManager/reminder/ReminderSetting.js | 41 - .../shiftManager/reminder/ReminderTable.js | 38 - .../hrmAttendance/components/test/index.js | 66 - .../components/timeSelection/index.js | 22 - .../components/travelRule/Top.js | 128 - .../components/travelRule/index.js | 64 - .../components/upgrade/Content.js | 16 - .../hrmAttendance/components/upgrade/Left.js | 26 - .../hrmAttendance/components/upgrade/Right.js | 63 - .../components/upgrade/UpgradeResult.js | 29 - .../hrmAttendance/components/upgrade/index.js | 60 - .../components/vacationBalance/RadioGroup.js | 32 - .../components/vacationBalance/Tab.js | 37 - .../components/vacationBalance/Table.js | 121 - .../components/vacationBalance/Top.js | 93 - .../components/vacationBalance/index.js | 61 - .../components/vacationRemain/index.js | 134 - .../components/vacationRule/Rule23th.js | 54 - .../components/vacationRule/Rule6th.js | 106 - .../components/vacationRule/Rules23th.js | 53 - .../components/vacationRule/Rules6th.js | 68 - .../components/vacationRule/Rules6thPanel.js | 52 - .../components/vacationRule/Section.js | 36 - .../components/vacationRule/index.js | 78 - .../components/vacationType/index.js | 83 - .../components/workflowSetting/ActionList.js | 50 - .../workflowSetting/CheckRuleList.js | 95 - .../components/workflowSetting/DataList.js | 231 -- .../components/workflowSetting/FieldList.js | 175 - .../components/workflowSetting/index.js | 140 - pc4backstage/hrmAttendance/debug.js | 45 - pc4backstage/hrmAttendance/index.js | 112 - .../hrmAttendance/public/ConfigurableForm.js | 221 -- pc4backstage/hrmAttendance/public/EasyForm.js | 182 -- pc4backstage/hrmAttendance/public/i18n.js | 255 -- pc4backstage/hrmAttendance/public/learn.js | 262 -- pc4backstage/hrmAttendance/public/logType.js | 9 - .../hrmAttendance/public/sweet-form.js | 317 -- .../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 | 37 - .../public/valhalla/components/MagicForm.js | 226 -- .../public/valhalla/components/OrgTree.js | 49 - .../public/valhalla/components/RadioGroup.js | 30 - .../public/valhalla/components/Search.js | 45 - .../public/valhalla/components/Table.js | 30 - .../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 | 25 - .../public/valhalla/stores/authority.js | 30 - .../public/valhalla/stores/dialog.js | 67 - .../public/valhalla/stores/form.js | 138 - .../public/valhalla/stores/importCommon.js | 431 --- .../public/valhalla/stores/index.js | 21 - .../public/valhalla/stores/orgTree.js | 50 - .../public/valhalla/stores/radioGroup.js | 56 - .../public/valhalla/stores/search.js | 183 -- .../public/valhalla/stores/table.js | 91 - .../public/valhalla/stores/top.js | 136 - .../public/valhalla/style/addButton.less | 14 - .../public/valhalla/style/deleteButton.less | 12 - pc4backstage/hrmAttendance/single.js | 42 - .../hrmAttendance/stores/ReminderSetting.js | 3 - .../stores/applicationSettings.js | 85 - .../stores/attendanceRpSharingSetting.js | 497 --- .../stores/attendanceSyncSetting.js | 230 -- .../hrmAttendance/stores/baseStore.js | 369 --- .../hrmAttendance/stores/commonStore.js | 839 ----- .../hrmAttendance/stores/groupSetting.js | 2672 ---------------- .../hrmAttendance/stores/holidayRule.js | 637 ---- .../hrmAttendance/stores/holidaySettingNew.js | 960 ------ .../hrmAttendance/stores/holidayType.js | 566 ---- .../hrmAttendance/stores/importCommon.js | 440 --- .../stores/importExternalAttendance.js | 117 - .../stores/importScheduleCode.js | 423 --- pc4backstage/hrmAttendance/stores/index.js | 111 - pc4backstage/hrmAttendance/stores/init.js | 539 ---- .../stores/kqMonthReportSetting.js | 705 ---- .../hrmAttendance/stores/newHolidayRule.js | 807 ----- .../hrmAttendance/stores/overtimeRule.js | 845 ----- .../hrmAttendance/stores/overtimeRuleForm.js | 1177 ------- .../hrmAttendance/stores/scheduleCode.js | 489 --- .../hrmAttendance/stores/scheduleSetting.js | 825 ----- .../hrmAttendance/stores/shiftManager.js | 2849 ----------------- pc4backstage/hrmAttendance/stores/test.js | 100 - .../hrmAttendance/stores/travelRule.js | 339 -- pc4backstage/hrmAttendance/stores/upgrade.js | 252 -- .../hrmAttendance/stores/vacationBalance.js | 639 ---- .../hrmAttendance/stores/vacationRemain.js | 743 ----- .../hrmAttendance/stores/vacationRule.js | 1067 ------ .../hrmAttendance/stores/vacationType.js | 656 ---- .../hrmAttendance/stores/workflowSetting.js | 1302 -------- .../style/applicationSettings.less | 11 - .../style/attendanceSynSetting.less | 40 - pc4backstage/hrmAttendance/style/common.css | 95 - pc4backstage/hrmAttendance/style/common.less | 217 -- .../hrmAttendance/style/groupSetting.css | 78 - .../hrmAttendance/style/groupSetting.less | 459 --- .../hrmAttendance/style/holidaySetting.css | 77 - pc4backstage/hrmAttendance/style/icon.less | 139 - pc4backstage/hrmAttendance/style/import.css | 62 - pc4backstage/hrmAttendance/style/index.js | 2 - pc4backstage/hrmAttendance/style/init.less | 165 - .../style/kqMonthReportSetting.less | 8 - .../hrmAttendance/style/overtimeRule.less | 215 -- .../hrmAttendance/style/scheduleSetting.less | 226 -- .../hrmAttendance/style/shiftManager.css | 78 - .../hrmAttendance/style/shiftManager.less | 278 -- pc4backstage/hrmAttendance/style/test.less | 20 - pc4backstage/hrmAttendance/style/upgrade.less | 217 -- .../hrmAttendance/style/vacationRemain.less | 45 - .../hrmAttendance/style/vacationRule.less | 130 - .../hrmAttendance/style/vacationType.less | 43 - .../hrmAttendance/style/workflowSetting.less | 138 - pc4backstage/hrmAttendance/util/index.js | 467 --- pc4backstage/hrmAttendance/util/pulic-func.js | 311 -- pc4backstage/hrmAttendance/util/pure-util.js | 37 - .../hrmAttendance/util/save-time-util.js | 369 --- 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 | 264 -- .../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/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/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 | 762 ----- pc4backstage/hrmengine/stores/dismiss.js | 147 - .../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 | 135 - .../stores/external/outSignAppSetting.js | 71 - pc4backstage/hrmengine/stores/formal.js | 147 - .../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 | 658 ---- .../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 | 181 -- pc4backstage/hrmengine/stores/renew.js | 158 - .../hrmengine/stores/resourceIndex.js | 58 - pc4backstage/hrmengine/stores/retire.js | 147 - 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 | 1248 -------- .../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 | 2218 ------------- .../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 | 150 - pc4backstage/hrmengine/stores/trial.js | 146 - 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 --- pc4mobx/esearch/apis/apiSet.js | 11 + pc4mobx/esearch/apis/robot.js | 41 + pc4mobx/esearch/apis/searchSet.js | 57 + pc4mobx/esearch/apis/weeso.js | 36 + pc4mobx/esearch/components/ApiSet.js | 191 ++ pc4mobx/esearch/components/Weeso.js | 98 + pc4mobx/esearch/components/WeesoResult.js | 265 ++ pc4mobx/esearch/components/WessoRecords.js | 495 +++ .../components/childComponents/Adlink.js | 50 + .../childComponents/CommonContent.js | 312 ++ .../childComponents/ImagesContent.js | 49 + .../components/childComponents/SearchTools.js | 518 +++ .../components/childComponents/WeesoInput.js | 565 ++++ .../components/childComponents/WeesoTop.js | 288 ++ .../childComponents/aboutBrowser2.js | 45 + .../childComponents/aboutSelect2.js | 40 + .../components/childComponents/aboutTime2.js | 32 + .../esearch/components/robot/RobotDialog.js | 140 + pc4mobx/esearch/components/robot/index.js | 203 ++ pc4mobx/esearch/components/weesoSearchSet.js | 1273 ++++++++ .../hrmengine => pc4mobx/esearch}/debug.js | 10 +- pc4mobx/esearch/index.js | 40 + .../wea-zmage/components/Background/index.js | 28 + .../components/Background/index.less | 20 + .../wea-zmage/components/Control/index.js | 165 + .../wea-zmage/components/Control/index.less | 158 + .../wea-zmage/components/Image/index.js | 166 + .../wea-zmage/components/Image/index.less | 66 + .../wea-zmage/components/Position/index.js | 146 + .../wea-zmage/components/Position/index.less | 27 + .../wea-zmage/components/Wrapper/index.js | 216 ++ .../wea-zmage/components/Wrapper/index.less | 9 + .../esearch/public/wea-zmage/config/index.js | 18 + pc4mobx/esearch/public/wea-zmage/index.js | 102 + .../esearch/public/wea-zmage/utils/index.js | 43 + .../esearch/public/wea-zmage/utils/lerp.js | 111 + .../hrmengine => pc4mobx/esearch}/single.js | 33 +- pc4mobx/esearch/stores/apiSet.js | 74 + pc4mobx/esearch/stores/index.js | 12 + pc4mobx/esearch/stores/index.js.bak | 10 + pc4mobx/esearch/stores/robot.js | 147 + pc4mobx/esearch/stores/weeso.js | 661 ++++ pc4mobx/esearch/stores/weesoSeachSetStore.js | 376 +++ pc4mobx/esearch/style/apiSet.less | 14 + pc4mobx/esearch/style/index.js | 6 + pc4mobx/esearch/style/result.less | 467 +++ pc4mobx/esearch/style/robot.less | 9 + pc4mobx/esearch/style/searchSet.less | 226 ++ pc4mobx/esearch/style/weeso.less | 531 +++ pc4mobx/esearch/style/wessoRecords.less | 103 + pc4mobx/esearch/util/EsearchUtil.js | 63 + pc4mobx/esearch/util/NoRight.js | 14 + pc4mobx/esearch/util/img/nodata.png | Bin 0 -> 3407 bytes pc4mobx/esearch/util/img/page_descStr.png | Bin 0 -> 11964 bytes pc4mobx/esearch/util/img/weaverlogo.png | Bin 0 -> 7990 bytes 1239 files changed, 8758 insertions(+), 194030 deletions(-) delete mode 100644 pc4backstage/hrmAttendance/apis/applicationSettings.js delete mode 100644 pc4backstage/hrmAttendance/apis/attendance.js delete mode 100644 pc4backstage/hrmAttendance/apis/attendanceRpSharingSetting.js delete mode 100644 pc4backstage/hrmAttendance/apis/common.js delete mode 100644 pc4backstage/hrmAttendance/apis/groupSetting.js delete mode 100644 pc4backstage/hrmAttendance/apis/holidayRule.js delete mode 100644 pc4backstage/hrmAttendance/apis/holidaySetting.js delete mode 100644 pc4backstage/hrmAttendance/apis/holidayType.js delete mode 100644 pc4backstage/hrmAttendance/apis/importScheduleCode.js delete mode 100644 pc4backstage/hrmAttendance/apis/importresource.js delete mode 100644 pc4backstage/hrmAttendance/apis/initSetting.js delete mode 100644 pc4backstage/hrmAttendance/apis/kqMonthReportSetting.js delete mode 100644 pc4backstage/hrmAttendance/apis/newHolidayRule.js delete mode 100644 pc4backstage/hrmAttendance/apis/overtimeRule.js delete mode 100644 pc4backstage/hrmAttendance/apis/scheduleCode.js delete mode 100644 pc4backstage/hrmAttendance/apis/scheduleSetting.js delete mode 100644 pc4backstage/hrmAttendance/apis/shiftManager.js delete mode 100644 pc4backstage/hrmAttendance/apis/timeSelection.js delete mode 100644 pc4backstage/hrmAttendance/apis/travelRule.js delete mode 100644 pc4backstage/hrmAttendance/apis/upgrade.js delete mode 100644 pc4backstage/hrmAttendance/apis/vacationBalance.js delete mode 100644 pc4backstage/hrmAttendance/apis/vacationRemain.js delete mode 100644 pc4backstage/hrmAttendance/apis/vacationRule.js delete mode 100644 pc4backstage/hrmAttendance/apis/vacationType.js delete mode 100644 pc4backstage/hrmAttendance/apis/workflow.js delete mode 100644 pc4backstage/hrmAttendance/components/Home.js delete mode 100644 pc4backstage/hrmAttendance/components/applicationSettings/index.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Dialog.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Tab.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Table.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/index.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceSyncSetting/FieldSetting.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceSyncSetting/FieldSettingExplain.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceSyncSetting/SyncSetting.js delete mode 100644 pc4backstage/hrmAttendance/components/attendanceSyncSetting/index.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/AddToGroup.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/Content.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/Edit.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/GroupInfo4Coms.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/GroupSearch.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/Info.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/InfoSingle.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/Map.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/SearchRadio.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/illustrateDialog.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/index.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/info/AttendanceType.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/info/BaseInfo.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/info/LocationEdit.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/info/Member.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/info/SerialSetting.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/info/SerialTableList.js delete mode 100644 pc4backstage/hrmAttendance/components/groupSetting/info/WifiEdit.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayRule/BalanceConversionRules.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayRule/Dialog.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayRule/Search.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayRule/Table.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayRule/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayRule/index.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/Annotation.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/ConditionGroup.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/Dialog.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/Tab.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/Table.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/Year.js delete mode 100644 pc4backstage/hrmAttendance/components/holidaySettingNew/index.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayType/Dialog.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayType/DialogForm.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayType/Search.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayType/Table.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayType/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/holidayType/index.js delete mode 100644 pc4backstage/hrmAttendance/components/importExternalAttendanceData/index.js delete mode 100644 pc4backstage/hrmAttendance/components/importRelatedComponet/ImportHistory.js delete mode 100644 pc4backstage/hrmAttendance/components/importRelatedComponet/ImportLog.js delete mode 100644 pc4backstage/hrmAttendance/components/importRelatedComponet/ImportResult.js delete mode 100644 pc4backstage/hrmAttendance/components/importRelatedComponet/index.js delete mode 100644 pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportHistory.js delete mode 100644 pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportLog.js delete mode 100644 pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportResult.js delete mode 100644 pc4backstage/hrmAttendance/components/importScheduleCodeComponet/index.js delete mode 100644 pc4backstage/hrmAttendance/components/init/AnalysisResult.js delete mode 100644 pc4backstage/hrmAttendance/components/init/InitForm.js delete mode 100644 pc4backstage/hrmAttendance/components/init/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/init/confirmUtil.js delete mode 100644 pc4backstage/hrmAttendance/components/init/index.js delete mode 100644 pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateFieldDefine.js delete mode 100644 pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateGroup.js delete mode 100644 pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldDataList.js delete mode 100644 pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldTabs.js delete mode 100644 pc4backstage/hrmAttendance/components/kqMonthReportSetting/GroupList.js delete mode 100644 pc4backstage/hrmAttendance/components/kqMonthReportSetting/GroupListSetting.js delete mode 100644 pc4backstage/hrmAttendance/components/kqMonthReportSetting/index.js delete mode 100644 pc4backstage/hrmAttendance/components/newHolidayRule/BalanceConversionRules.js delete mode 100644 pc4backstage/hrmAttendance/components/newHolidayRule/Dialog.js delete mode 100644 pc4backstage/hrmAttendance/components/newHolidayRule/DialogForm.js delete mode 100644 pc4backstage/hrmAttendance/components/newHolidayRule/Search.js delete mode 100644 pc4backstage/hrmAttendance/components/newHolidayRule/Table.js delete mode 100644 pc4backstage/hrmAttendance/components/newHolidayRule/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/newHolidayRule/index.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/Dialog.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/DirtyComponent.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/Form.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/OvertimeRule.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/RestTime.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/Table.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/overtimeRule/index.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/Analysis.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/Bar.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/CycleSetting.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/DaySetting.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/DropdownOverlay.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/GroupEdit.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/HolidaySetting.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/Info.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/ListCell.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/ListHeader.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/ScheduleList.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/Setting.js delete mode 100644 pc4backstage/hrmAttendance/components/scheduleSetting/index.js delete mode 100644 pc4backstage/hrmAttendance/components/schedulecode/Content.js delete mode 100644 pc4backstage/hrmAttendance/components/schedulecode/DeviceEdit.js delete mode 100644 pc4backstage/hrmAttendance/components/schedulecode/DeviceList.js delete mode 100644 pc4backstage/hrmAttendance/components/schedulecode/Edit.js delete mode 100644 pc4backstage/hrmAttendance/components/schedulecode/index.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/Content.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/Edit.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/LinkComs.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/Msg.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/WorkTimeAnalysis.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/index.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderContent.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderSetting.js delete mode 100644 pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderTable.js delete mode 100644 pc4backstage/hrmAttendance/components/test/index.js delete mode 100644 pc4backstage/hrmAttendance/components/timeSelection/index.js delete mode 100644 pc4backstage/hrmAttendance/components/travelRule/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/travelRule/index.js delete mode 100644 pc4backstage/hrmAttendance/components/upgrade/Content.js delete mode 100644 pc4backstage/hrmAttendance/components/upgrade/Left.js delete mode 100644 pc4backstage/hrmAttendance/components/upgrade/Right.js delete mode 100644 pc4backstage/hrmAttendance/components/upgrade/UpgradeResult.js delete mode 100644 pc4backstage/hrmAttendance/components/upgrade/index.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationBalance/RadioGroup.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationBalance/Tab.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationBalance/Table.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationBalance/Top.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationBalance/index.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRemain/index.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRule/Rule23th.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRule/Rule6th.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRule/Rules23th.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRule/Rules6th.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRule/Rules6thPanel.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRule/Section.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationRule/index.js delete mode 100644 pc4backstage/hrmAttendance/components/vacationType/index.js delete mode 100644 pc4backstage/hrmAttendance/components/workflowSetting/ActionList.js delete mode 100644 pc4backstage/hrmAttendance/components/workflowSetting/CheckRuleList.js delete mode 100644 pc4backstage/hrmAttendance/components/workflowSetting/DataList.js delete mode 100644 pc4backstage/hrmAttendance/components/workflowSetting/FieldList.js delete mode 100644 pc4backstage/hrmAttendance/components/workflowSetting/index.js delete mode 100644 pc4backstage/hrmAttendance/debug.js delete mode 100644 pc4backstage/hrmAttendance/index.js delete mode 100644 pc4backstage/hrmAttendance/public/ConfigurableForm.js delete mode 100644 pc4backstage/hrmAttendance/public/EasyForm.js delete mode 100644 pc4backstage/hrmAttendance/public/i18n.js delete mode 100644 pc4backstage/hrmAttendance/public/learn.js delete mode 100644 pc4backstage/hrmAttendance/public/logType.js delete mode 100644 pc4backstage/hrmAttendance/public/sweet-form.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/AccountIcon.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/AddButton.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/Authority.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/CenterSpin.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/DeleteButton.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/Dialog.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/MagicForm.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/OrgTree.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/RadioGroup.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/Search.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/Table.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/Top.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportHistory.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportLog.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportResult.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/index.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/components/index.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/authority.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/dialog.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/form.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/importCommon.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/index.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/orgTree.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/radioGroup.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/search.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/table.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/stores/top.js delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/style/addButton.less delete mode 100644 pc4backstage/hrmAttendance/public/valhalla/style/deleteButton.less delete mode 100644 pc4backstage/hrmAttendance/single.js delete mode 100644 pc4backstage/hrmAttendance/stores/ReminderSetting.js delete mode 100644 pc4backstage/hrmAttendance/stores/applicationSettings.js delete mode 100644 pc4backstage/hrmAttendance/stores/attendanceRpSharingSetting.js delete mode 100644 pc4backstage/hrmAttendance/stores/attendanceSyncSetting.js delete mode 100644 pc4backstage/hrmAttendance/stores/baseStore.js delete mode 100644 pc4backstage/hrmAttendance/stores/commonStore.js delete mode 100644 pc4backstage/hrmAttendance/stores/groupSetting.js delete mode 100644 pc4backstage/hrmAttendance/stores/holidayRule.js delete mode 100644 pc4backstage/hrmAttendance/stores/holidaySettingNew.js delete mode 100644 pc4backstage/hrmAttendance/stores/holidayType.js delete mode 100644 pc4backstage/hrmAttendance/stores/importCommon.js delete mode 100644 pc4backstage/hrmAttendance/stores/importExternalAttendance.js delete mode 100644 pc4backstage/hrmAttendance/stores/importScheduleCode.js delete mode 100644 pc4backstage/hrmAttendance/stores/index.js delete mode 100644 pc4backstage/hrmAttendance/stores/init.js delete mode 100644 pc4backstage/hrmAttendance/stores/kqMonthReportSetting.js delete mode 100644 pc4backstage/hrmAttendance/stores/newHolidayRule.js delete mode 100644 pc4backstage/hrmAttendance/stores/overtimeRule.js delete mode 100644 pc4backstage/hrmAttendance/stores/overtimeRuleForm.js delete mode 100644 pc4backstage/hrmAttendance/stores/scheduleCode.js delete mode 100644 pc4backstage/hrmAttendance/stores/scheduleSetting.js delete mode 100644 pc4backstage/hrmAttendance/stores/shiftManager.js delete mode 100644 pc4backstage/hrmAttendance/stores/test.js delete mode 100644 pc4backstage/hrmAttendance/stores/travelRule.js delete mode 100644 pc4backstage/hrmAttendance/stores/upgrade.js delete mode 100644 pc4backstage/hrmAttendance/stores/vacationBalance.js delete mode 100644 pc4backstage/hrmAttendance/stores/vacationRemain.js delete mode 100644 pc4backstage/hrmAttendance/stores/vacationRule.js delete mode 100644 pc4backstage/hrmAttendance/stores/vacationType.js delete mode 100644 pc4backstage/hrmAttendance/stores/workflowSetting.js delete mode 100644 pc4backstage/hrmAttendance/style/applicationSettings.less delete mode 100644 pc4backstage/hrmAttendance/style/attendanceSynSetting.less delete mode 100644 pc4backstage/hrmAttendance/style/common.css delete mode 100644 pc4backstage/hrmAttendance/style/common.less delete mode 100644 pc4backstage/hrmAttendance/style/groupSetting.css delete mode 100644 pc4backstage/hrmAttendance/style/groupSetting.less delete mode 100644 pc4backstage/hrmAttendance/style/holidaySetting.css delete mode 100644 pc4backstage/hrmAttendance/style/icon.less delete mode 100644 pc4backstage/hrmAttendance/style/import.css delete mode 100644 pc4backstage/hrmAttendance/style/index.js delete mode 100644 pc4backstage/hrmAttendance/style/init.less delete mode 100644 pc4backstage/hrmAttendance/style/kqMonthReportSetting.less delete mode 100644 pc4backstage/hrmAttendance/style/overtimeRule.less delete mode 100644 pc4backstage/hrmAttendance/style/scheduleSetting.less delete mode 100644 pc4backstage/hrmAttendance/style/shiftManager.css delete mode 100644 pc4backstage/hrmAttendance/style/shiftManager.less delete mode 100644 pc4backstage/hrmAttendance/style/test.less delete mode 100644 pc4backstage/hrmAttendance/style/upgrade.less delete mode 100644 pc4backstage/hrmAttendance/style/vacationRemain.less delete mode 100644 pc4backstage/hrmAttendance/style/vacationRule.less delete mode 100644 pc4backstage/hrmAttendance/style/vacationType.less delete mode 100644 pc4backstage/hrmAttendance/style/workflowSetting.less delete mode 100644 pc4backstage/hrmAttendance/util/index.js delete mode 100644 pc4backstage/hrmAttendance/util/pulic-func.js delete mode 100644 pc4backstage/hrmAttendance/util/pure-util.js delete mode 100644 pc4backstage/hrmAttendance/util/save-time-util.js delete mode 100644 pc4backstage/hrmComsPublic/apis/common.js delete mode 100644 pc4backstage/hrmComsPublic/components/AdvanceSearchFormInfo.js delete mode 100644 pc4backstage/hrmComsPublic/components/Calendar.js delete mode 100644 pc4backstage/hrmComsPublic/components/FormInfo.js delete mode 100644 pc4backstage/hrmComsPublic/components/OrganizationTree.js delete mode 100644 pc4backstage/hrmComsPublic/components/Tabs.js delete mode 100644 pc4backstage/hrmComsPublic/components/index.js delete mode 100644 pc4backstage/hrmComsPublic/index.js delete mode 100644 pc4backstage/hrmComsPublic/public/i18n.js delete mode 100644 pc4backstage/hrmComsPublic/public/logType.js delete mode 100644 pc4backstage/hrmComsPublic/stores/baseStore.js delete mode 100644 pc4backstage/hrmComsPublic/style/calendar.less delete mode 100644 pc4backstage/hrmengine/apis/adareaset.js delete mode 100644 pc4backstage/hrmengine/apis/adminAreaDisplaySetting.js delete mode 100644 pc4backstage/hrmengine/apis/adminDecentralization.js delete mode 100644 pc4backstage/hrmengine/apis/annual.js delete mode 100644 pc4backstage/hrmengine/apis/appDetach.js delete mode 100644 pc4backstage/hrmengine/apis/archiveLogView.js delete mode 100644 pc4backstage/hrmengine/apis/assImple.js delete mode 100644 pc4backstage/hrmengine/apis/assItem.js delete mode 100644 pc4backstage/hrmengine/apis/assType.js delete mode 100644 pc4backstage/hrmengine/apis/attendance.js delete mode 100644 pc4backstage/hrmengine/apis/attendanceSetting.js delete mode 100644 pc4backstage/hrmengine/apis/authAdjust.js delete mode 100644 pc4backstage/hrmengine/apis/authSearch.js delete mode 100644 pc4backstage/hrmengine/apis/authorizationSetting.js delete mode 100644 pc4backstage/hrmengine/apis/avatarSetting.js delete mode 100644 pc4backstage/hrmengine/apis/basicImport.js delete mode 100644 pc4backstage/hrmengine/apis/batchAdjust.js delete mode 100644 pc4backstage/hrmengine/apis/batchEdit.js delete mode 100644 pc4backstage/hrmengine/apis/batchMaintenance.js delete mode 100644 pc4backstage/hrmengine/apis/batchUpload.js delete mode 100644 pc4backstage/hrmengine/apis/birthdayRemind.js delete mode 100644 pc4backstage/hrmengine/apis/browserDisplayField.js delete mode 100644 pc4backstage/hrmengine/apis/cardItemSet.js delete mode 100644 pc4backstage/hrmengine/apis/city.js delete mode 100644 pc4backstage/hrmengine/apis/common.js delete mode 100644 pc4backstage/hrmengine/apis/contractExpireWarning.js delete mode 100644 pc4backstage/hrmengine/apis/contractMaintain.js delete mode 100644 pc4backstage/hrmengine/apis/contractTemplate.js delete mode 100644 pc4backstage/hrmengine/apis/contractType.js delete mode 100644 pc4backstage/hrmengine/apis/country.js delete mode 100644 pc4backstage/hrmengine/apis/county.js delete mode 100644 pc4backstage/hrmengine/apis/decentralizationAdminSet.js delete mode 100644 pc4backstage/hrmengine/apis/dismiss.js delete mode 100644 pc4backstage/hrmengine/apis/duty.js delete mode 100644 pc4backstage/hrmengine/apis/dutyType.js delete mode 100644 pc4backstage/hrmengine/apis/edu.js delete mode 100644 pc4backstage/hrmengine/apis/education.js delete mode 100644 pc4backstage/hrmengine/apis/edulevel.js delete mode 100644 pc4backstage/hrmengine/apis/elseSetting.js delete mode 100644 pc4backstage/hrmengine/apis/employDemand.js delete mode 100644 pc4backstage/hrmengine/apis/enginegroup.js delete mode 100644 pc4backstage/hrmengine/apis/entryMaintenance.js delete mode 100644 pc4backstage/hrmengine/apis/formal.js delete mode 100644 pc4backstage/hrmengine/apis/funcManageDecent.js delete mode 100644 pc4backstage/hrmengine/apis/importorg.js delete mode 100644 pc4backstage/hrmengine/apis/importresource.js delete mode 100644 pc4backstage/hrmengine/apis/leaveType.js delete mode 100644 pc4backstage/hrmengine/apis/levelProtection.js delete mode 100644 pc4backstage/hrmengine/apis/limitedAnalysis.js delete mode 100644 pc4backstage/hrmengine/apis/loginFailLog.js delete mode 100644 pc4backstage/hrmengine/apis/loginLog.js delete mode 100644 pc4backstage/hrmengine/apis/majorset.js delete mode 100644 pc4backstage/hrmengine/apis/matrix.js delete mode 100644 pc4backstage/hrmengine/apis/moduleManage.js delete mode 100644 pc4backstage/hrmengine/apis/normalLog.js delete mode 100644 pc4backstage/hrmengine/apis/officeLocation.js delete mode 100644 pc4backstage/hrmengine/apis/officeaddress.js delete mode 100644 pc4backstage/hrmengine/apis/onlineAnalysis.js delete mode 100644 pc4backstage/hrmengine/apis/onlineAttendance.js delete mode 100644 pc4backstage/hrmengine/apis/orgChart.js delete mode 100644 pc4backstage/hrmengine/apis/orgFieldDisplaySetting.js delete mode 100644 pc4backstage/hrmengine/apis/organization.js delete mode 100644 pc4backstage/hrmengine/apis/organizationvirtual.js delete mode 100644 pc4backstage/hrmengine/apis/otherSetting.js delete mode 100644 pc4backstage/hrmengine/apis/paidLeave.js delete mode 100644 pc4backstage/hrmengine/apis/paidLeaveManager.js delete mode 100644 pc4backstage/hrmengine/apis/payrollManagement.js delete mode 100644 pc4backstage/hrmengine/apis/payrollSending.js delete mode 100644 pc4backstage/hrmengine/apis/personalSalaryAdjustment.js delete mode 100644 pc4backstage/hrmengine/apis/post.js delete mode 100644 pc4backstage/hrmengine/apis/posts.js delete mode 100644 pc4backstage/hrmengine/apis/privacySetting.js delete mode 100644 pc4backstage/hrmengine/apis/province.js delete mode 100644 pc4backstage/hrmengine/apis/quit.js delete mode 100644 pc4backstage/hrmengine/apis/recruitInfo.js delete mode 100644 pc4backstage/hrmengine/apis/recruitLibrary.js delete mode 100644 pc4backstage/hrmengine/apis/recruitPlan.js delete mode 100644 pc4backstage/hrmengine/apis/rehire.js delete mode 100644 pc4backstage/hrmengine/apis/renew.js delete mode 100644 pc4backstage/hrmengine/apis/resourceIndex.js delete mode 100644 pc4backstage/hrmengine/apis/retire.js delete mode 100644 pc4backstage/hrmengine/apis/roleSetting.js delete mode 100644 pc4backstage/hrmengine/apis/rpManage.js delete mode 100644 pc4backstage/hrmengine/apis/rpType.js delete mode 100644 pc4backstage/hrmengine/apis/salaryApplySet.js delete mode 100644 pc4backstage/hrmengine/apis/salaryBank.js delete mode 100644 pc4backstage/hrmengine/apis/salaryIndexMaintenance.js delete mode 100644 pc4backstage/hrmengine/apis/salaryIndexSetting.js delete mode 100644 pc4backstage/hrmengine/apis/salaryItemsSet.js delete mode 100644 pc4backstage/hrmengine/apis/sanyuan.js delete mode 100644 pc4backstage/hrmengine/apis/schedule.js delete mode 100644 pc4backstage/hrmengine/apis/secAdminLog.js delete mode 100644 pc4backstage/hrmengine/apis/secAuditorLog.js delete mode 100644 pc4backstage/hrmengine/apis/securitySetting.js delete mode 100644 pc4backstage/hrmengine/apis/sensitiveWord.js delete mode 100644 pc4backstage/hrmengine/apis/serialNumber.js delete mode 100644 pc4backstage/hrmengine/apis/signatureManagement.js delete mode 100644 pc4backstage/hrmengine/apis/specialty.js delete mode 100644 pc4backstage/hrmengine/apis/staffCareReminder.js delete mode 100644 pc4backstage/hrmengine/apis/subCompanyFieldDef.js delete mode 100644 pc4backstage/hrmengine/apis/systemAdminLog.js delete mode 100644 pc4backstage/hrmengine/apis/test.js delete mode 100644 pc4backstage/hrmengine/apis/title.js delete mode 100644 pc4backstage/hrmengine/apis/titleset.js delete mode 100644 pc4backstage/hrmengine/apis/trainActivity.js delete mode 100644 pc4backstage/hrmengine/apis/trainArrange.js delete mode 100644 pc4backstage/hrmengine/apis/trainPlan.js delete mode 100644 pc4backstage/hrmengine/apis/trainResource.js delete mode 100644 pc4backstage/hrmengine/apis/trainTypes.js delete mode 100644 pc4backstage/hrmengine/apis/transfer.js delete mode 100644 pc4backstage/hrmengine/apis/trial.js delete mode 100644 pc4backstage/hrmengine/apis/unitSet.js delete mode 100644 pc4backstage/hrmengine/apis/workHour.js delete mode 100644 pc4backstage/hrmengine/apis/workNatureExcerpt.js delete mode 100644 pc4backstage/hrmengine/apis/workflow.js delete mode 100644 pc4backstage/hrmengine/apis/workingDayAdjust.js delete mode 100644 pc4backstage/hrmengine/apis/worknature.js delete mode 100644 pc4backstage/hrmengine/components/EduLevel.js delete mode 100644 pc4backstage/hrmengine/components/Home.js delete mode 100644 pc4backstage/hrmengine/components/HrmTest.js delete mode 100644 pc4backstage/hrmengine/components/ResourceIndex.js delete mode 100644 pc4backstage/hrmengine/components/adminAreaDisplaySetting/index.js delete mode 100644 pc4backstage/hrmengine/components/adminDecentralization/index.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/period/DataList.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/period/index.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/rule/DataList.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/rule/index.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/DataList.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/Import.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/TabPane.js delete mode 100644 pc4backstage/hrmengine/components/annualLeave/setting/index.js delete mode 100644 pc4backstage/hrmengine/components/appDetach/DetachEdit.js delete mode 100644 pc4backstage/hrmengine/components/appDetach/DetachList.js delete mode 100644 pc4backstage/hrmengine/components/appDetach/GlobalSetting.js delete mode 100644 pc4backstage/hrmengine/components/appDetach/index.js delete mode 100644 pc4backstage/hrmengine/components/archiveLogView/index.js delete mode 100644 pc4backstage/hrmengine/components/area/Area.js delete mode 100644 pc4backstage/hrmengine/components/area/AreaTable.js delete mode 100644 pc4backstage/hrmengine/components/area/BriefInfo.js delete mode 100644 pc4backstage/hrmengine/components/area/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/area/NewAndEditDialog.js delete mode 100644 pc4backstage/hrmengine/components/area/OfficeAddress.js delete mode 100644 pc4backstage/hrmengine/components/area/TabInfo.js delete mode 100644 pc4backstage/hrmengine/components/assImple/Header.js delete mode 100644 pc4backstage/hrmengine/components/assImple/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/assImple/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/assImple/SubDialog.js delete mode 100644 pc4backstage/hrmengine/components/assImple/SubTable.js delete mode 100644 pc4backstage/hrmengine/components/assImple/Tab.js delete mode 100644 pc4backstage/hrmengine/components/assImple/ThirdTable.js delete mode 100644 pc4backstage/hrmengine/components/assImple/index.js delete mode 100644 pc4backstage/hrmengine/components/assItem/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/assItem/Header.js delete mode 100644 pc4backstage/hrmengine/components/assItem/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/assItem/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/assItem/Tab.js delete mode 100644 pc4backstage/hrmengine/components/assItem/index.js delete mode 100644 pc4backstage/hrmengine/components/assType/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/assType/Group.js delete mode 100644 pc4backstage/hrmengine/components/assType/Header.js delete mode 100644 pc4backstage/hrmengine/components/assType/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/assType/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/assType/Tab.js delete mode 100644 pc4backstage/hrmengine/components/assType/index.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSetting/Content.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSetting/Header.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSetting/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSetting/PageFormInfo.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSetting/SubFormInfo.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSetting/TableEdit.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSetting.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSettingExplain.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/SyncSetting.js delete mode 100644 pc4backstage/hrmengine/components/attendanceSyncSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/authAdjust/Content.js delete mode 100644 pc4backstage/hrmengine/components/authAdjust/Dashboard.js delete mode 100644 pc4backstage/hrmengine/components/authAdjust/Result.js delete mode 100644 pc4backstage/hrmengine/components/authAdjust/Timer.js delete mode 100644 pc4backstage/hrmengine/components/authAdjust/index.js delete mode 100644 pc4backstage/hrmengine/components/authSearch/Content.js delete mode 100644 pc4backstage/hrmengine/components/authSearch/Dashboard.js delete mode 100644 pc4backstage/hrmengine/components/authSearch/index.js delete mode 100644 pc4backstage/hrmengine/components/authorizationSetting/AuthorizationGroupEditTab.js delete mode 100644 pc4backstage/hrmengine/components/authorizationSetting/AuthorizationList.js delete mode 100644 pc4backstage/hrmengine/components/authorizationSetting/Group.js delete mode 100644 pc4backstage/hrmengine/components/authorizationSetting/RoleRefs.js delete mode 100644 pc4backstage/hrmengine/components/authorizationSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/avatarSetting/AvatarSetting.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/Dashboard.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustDepartment.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustLeftContainer.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustResource.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustRightContainer.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustSubCompany.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/CheckContent.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/adjust/index.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditDepartment.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditLeftContainer.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditResource.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditRightContainer.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/EditSubCompany.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/NeedRender.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/edit/index.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/index.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/LeftContainer.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/RightContainer.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/UploadForm.js delete mode 100644 pc4backstage/hrmengine/components/batchMaintenance/upload/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/apis/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Background.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Congratulations.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/DateField.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Header.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Image.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/Personlist.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/card/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/BgImg.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/BgSet.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/CongratulationSet.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/DateSet.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/HeadSet.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/ImgSet.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/PersonSet.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/Upload.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/body/slide/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/form/Group.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/form/Item.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/form/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Basic.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Buttons.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Fields.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Lock.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/Revoke.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/head/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/components/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/mock/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/stores/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/style/body.less delete mode 100644 pc4backstage/hrmengine/components/birthEditor/style/form.less delete mode 100644 pc4backstage/hrmengine/components/birthEditor/style/head.less delete mode 100644 pc4backstage/hrmengine/components/birthEditor/util/abandon.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/util/formFactory.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/util/index.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/util/paramsToStyle.js delete mode 100644 pc4backstage/hrmengine/components/birthEditor/util/undoRedo.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/Add.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/AdminRemind.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/Birthday.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/EmployeeRemind.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/EntryRemind.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/PictureSet.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/PictureSetCopy.js delete mode 100644 pc4backstage/hrmengine/components/birthdayRemind/index.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Base.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/City.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Country.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/County.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Duty.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/DutyType.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Edu.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/OfficeLocation.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Post.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Province.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Specialty.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/Title.js delete mode 100644 pc4backstage/hrmengine/components/browseBoxLinkPage/WorkNature.js delete mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/Department.js delete mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/EnableComs.js delete mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/FieldList.js delete mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/Hrm.js delete mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/Subcompany.js delete mode 100644 pc4backstage/hrmengine/components/browserDisplayFieldSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/cardItemSet/DefineShowItems.js delete mode 100644 pc4backstage/hrmengine/components/cardItemSet/SysShowItems.js delete mode 100644 pc4backstage/hrmengine/components/cardItemSet/index.js delete mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Add.js delete mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Content.js delete mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Header.js delete mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/MainForm.js delete mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/Table.js delete mode 100644 pc4backstage/hrmengine/components/contractExpireWarning/index.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/DialogContent.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/Header.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/RichText.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/Tab.js delete mode 100644 pc4backstage/hrmengine/components/contractMaintain/index.js delete mode 100644 pc4backstage/hrmengine/components/contractTemplate/Header.js delete mode 100644 pc4backstage/hrmengine/components/contractTemplate/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/contractTemplate/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/contractTemplate/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/contractTemplate/Tab.js delete mode 100644 pc4backstage/hrmengine/components/contractTemplate/index.js delete mode 100644 pc4backstage/hrmengine/components/contractType/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/contractType/Header.js delete mode 100644 pc4backstage/hrmengine/components/contractType/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/contractType/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/contractType/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/contractType/Tab.js delete mode 100644 pc4backstage/hrmengine/components/contractType/index.js delete mode 100644 pc4backstage/hrmengine/components/decentralizationAdminSet/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/decentralizationAdminSet/SecuritySet.js delete mode 100644 pc4backstage/hrmengine/components/decentralizationAdminSet/index.js delete mode 100644 pc4backstage/hrmengine/components/education/Education.js delete mode 100644 pc4backstage/hrmengine/components/education/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/elseSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/employmentDemand/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/employmentDemand/Header.js delete mode 100644 pc4backstage/hrmengine/components/employmentDemand/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/employmentDemand/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/employmentDemand/Tab.js delete mode 100644 pc4backstage/hrmengine/components/employmentDemand/index.js delete mode 100644 pc4backstage/hrmengine/components/enginegroup/AddGpMember.js delete mode 100644 pc4backstage/hrmengine/components/enginegroup/GroupSetting.js delete mode 100644 pc4backstage/hrmengine/components/enginegroup/NeForm.js delete mode 100644 pc4backstage/hrmengine/components/enginegroup/NewEngineGroup.js delete mode 100644 pc4backstage/hrmengine/components/enginegroup/index.js delete mode 100644 pc4backstage/hrmengine/components/entryMaintenance/index.js delete mode 100644 pc4backstage/hrmengine/components/external/outSignAppSetting.js delete mode 100644 pc4backstage/hrmengine/components/funcManageDecent/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/funcManageDecent/Header.js delete mode 100644 pc4backstage/hrmengine/components/funcManageDecent/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/funcManageDecent/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/funcManageDecent/Tab.js delete mode 100644 pc4backstage/hrmengine/components/funcManageDecent/index.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/BasicSet.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/Header.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/MainTableInfo.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/Search.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/SpecialForm.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/StaticFormInfo.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/SubDialog.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/TableEdit.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/WorkHourTab.js delete mode 100644 pc4backstage/hrmengine/components/generalWorkingHours/index.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Dismiss.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Formal.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Info.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Quit.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Rehire.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Renew.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Retire.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Transfer.js delete mode 100644 pc4backstage/hrmengine/components/humanStatusChange/Trial.js delete mode 100644 pc4backstage/hrmengine/components/import/index.js delete mode 100644 pc4backstage/hrmengine/components/importExternalAttendanceData/index.js delete mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/ImportHistory.js delete mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/ImportLog.js delete mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/ImportResult.js delete mode 100644 pc4backstage/hrmengine/components/importRelatedComponet/index.js delete mode 100644 pc4backstage/hrmengine/components/importorg/Import.js delete mode 100644 pc4backstage/hrmengine/components/importorg/ImportHistory.js delete mode 100644 pc4backstage/hrmengine/components/importorg/ImportLog.js delete mode 100644 pc4backstage/hrmengine/components/importorg/ImportResult.js delete mode 100644 pc4backstage/hrmengine/components/importresource/Import.js delete mode 100644 pc4backstage/hrmengine/components/importresource/ImportHistory.js delete mode 100644 pc4backstage/hrmengine/components/importresource/ImportLog.js delete mode 100644 pc4backstage/hrmengine/components/importresource/ImportResult.js delete mode 100644 pc4backstage/hrmengine/components/leaveType/index.js delete mode 100644 pc4backstage/hrmengine/components/levelProtection/BasicInfo.js delete mode 100644 pc4backstage/hrmengine/components/levelProtection/Tab.js delete mode 100644 pc4backstage/hrmengine/components/levelProtection/Table.js delete mode 100644 pc4backstage/hrmengine/components/levelProtection/Top.js delete mode 100644 pc4backstage/hrmengine/components/levelProtection/index.js delete mode 100644 pc4backstage/hrmengine/components/limitedAnalysis/Echarts.js delete mode 100644 pc4backstage/hrmengine/components/limitedAnalysis/RadioGroup.js delete mode 100644 pc4backstage/hrmengine/components/limitedAnalysis/index.js delete mode 100644 pc4backstage/hrmengine/components/loginFailLog/index.js delete mode 100644 pc4backstage/hrmengine/components/loginLog/index.js delete mode 100644 pc4backstage/hrmengine/components/major/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/major/Major.js delete mode 100644 pc4backstage/hrmengine/components/matrix/Dashboard.js delete mode 100644 pc4backstage/hrmengine/components/matrix/DataList.js delete mode 100644 pc4backstage/hrmengine/components/matrix/DataListPagination.js delete mode 100644 pc4backstage/hrmengine/components/matrix/FieldItem.js delete mode 100644 pc4backstage/hrmengine/components/matrix/HiddenTable.js delete mode 100644 pc4backstage/hrmengine/components/matrix/MatrixCard.js delete mode 100644 pc4backstage/hrmengine/components/matrix/MatrixDataMaintenance.js delete mode 100644 pc4backstage/hrmengine/components/matrix/MatrixDataMaintenanceView.js delete mode 100644 pc4backstage/hrmengine/components/matrix/MatrixEdit.js delete mode 100644 pc4backstage/hrmengine/components/matrix/MatrixFieldSetting.js delete mode 100644 pc4backstage/hrmengine/components/matrix/MatrixMaintenance.js delete mode 100644 pc4backstage/hrmengine/components/matrix/Screen.js delete mode 100644 pc4backstage/hrmengine/components/matrix/SubCompanyDisplaySetting.js delete mode 100644 pc4backstage/hrmengine/components/matrix/index.js delete mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/ColumnSetting.js delete mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/ConditionSetting.js delete mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceLevel.js delete mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceListView.js delete mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceSettingView.js delete mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/Maintenancer.js delete mode 100644 pc4backstage/hrmengine/components/matrix/maintenance/MatrixMaintenance.js delete mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Content.js delete mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Dashboard.js delete mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Result.js delete mode 100644 pc4backstage/hrmengine/components/matrixAdjust/Timer.js delete mode 100644 pc4backstage/hrmengine/components/matrixAdjust/index.js delete mode 100644 pc4backstage/hrmengine/components/moduleManage/Editor.js delete mode 100644 pc4backstage/hrmengine/components/moduleManage/index.js delete mode 100644 pc4backstage/hrmengine/components/newPost/AsyncTree.js delete mode 100644 pc4backstage/hrmengine/components/newPost/BriefInfo.js delete mode 100644 pc4backstage/hrmengine/components/newPost/Content.js delete mode 100644 pc4backstage/hrmengine/components/newPost/Dialog.js delete mode 100644 pc4backstage/hrmengine/components/newPost/OrgTree.js delete mode 100644 pc4backstage/hrmengine/components/newPost/Tab.js delete mode 100644 pc4backstage/hrmengine/components/newPost/Table.js delete mode 100644 pc4backstage/hrmengine/components/newPost/Top.js delete mode 100644 pc4backstage/hrmengine/components/newPost/index.js delete mode 100644 pc4backstage/hrmengine/components/normalLog/index.js delete mode 100644 pc4backstage/hrmengine/components/onlinAttendance/index.js delete mode 100644 pc4backstage/hrmengine/components/onlineAnalysis/Echarts.js delete mode 100644 pc4backstage/hrmengine/components/onlineAnalysis/RadioGroup.js delete mode 100644 pc4backstage/hrmengine/components/onlineAnalysis/index.js delete mode 100644 pc4backstage/hrmengine/components/orgChart/Chart.js delete mode 100644 pc4backstage/hrmengine/components/orgChart/index.js delete mode 100644 pc4backstage/hrmengine/components/orgFieldDisplaySetting/Form.js delete mode 100644 pc4backstage/hrmengine/components/orgFieldDisplaySetting/Header.js delete mode 100644 pc4backstage/hrmengine/components/orgFieldDisplaySetting/index.js delete mode 100644 pc4backstage/hrmengine/components/organization/NewAndEditDialog.js delete mode 100644 pc4backstage/hrmengine/components/organization/Organization.js delete mode 100644 pc4backstage/hrmengine/components/organization/OrganizationInfo.js delete mode 100644 pc4backstage/hrmengine/components/organization/OrganizationList.js delete mode 100644 pc4backstage/hrmengine/components/organization/OrganizationTabInfo.js delete mode 100644 pc4backstage/hrmengine/components/organization/OrganizationTree.js delete mode 100644 pc4backstage/hrmengine/components/organization/ResourceAddToVirtual.js delete mode 100644 pc4backstage/hrmengine/components/organization/ResourceSetManagerVirtual.js delete mode 100644 pc4backstage/hrmengine/components/otherSetting/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/otherSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/paidLeave/index.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/period/DataList.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/period/index.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/rule/DataList.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/rule/index.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/DataList.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/Import.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/TabPane.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveManager/setting/index.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveTimeSetting/DataList.js delete mode 100644 pc4backstage/hrmengine/components/paidLeaveTimeSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/payrollManagement/Editor.js delete mode 100644 pc4backstage/hrmengine/components/payrollManagement/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/payrollManagement/index.js delete mode 100644 pc4backstage/hrmengine/components/payrollSending/DatasProcess.js delete mode 100644 pc4backstage/hrmengine/components/payrollSending/DispatchImg.js delete mode 100644 pc4backstage/hrmengine/components/payrollSending/ImportFail.js delete mode 100644 pc4backstage/hrmengine/components/payrollSending/ImportResult.js delete mode 100644 pc4backstage/hrmengine/components/payrollSending/index.js delete mode 100644 pc4backstage/hrmengine/components/personalSalaryAdjustment/Editor.js delete mode 100644 pc4backstage/hrmengine/components/personalSalaryAdjustment/Table.js delete mode 100644 pc4backstage/hrmengine/components/personalSalaryAdjustment/index.js delete mode 100644 pc4backstage/hrmengine/components/post/AreaTable.js delete mode 100644 pc4backstage/hrmengine/components/post/BriefInfo.js delete mode 100644 pc4backstage/hrmengine/components/post/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/post/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/post/NewAndEditDialog.js delete mode 100644 pc4backstage/hrmengine/components/post/Post.js delete mode 100644 pc4backstage/hrmengine/components/post/TabInfo.js delete mode 100644 pc4backstage/hrmengine/components/privacySetting/Info.js delete mode 100644 pc4backstage/hrmengine/components/privacySetting/Item.js delete mode 100644 pc4backstage/hrmengine/components/privacySetting/Setting.js delete mode 100644 pc4backstage/hrmengine/components/privacySetting/ShowSetCol.js delete mode 100644 pc4backstage/hrmengine/components/privacySetting/index.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/MainTab.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/Schedule.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/SubTab.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/TableEdit.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/Top.js delete mode 100644 pc4backstage/hrmengine/components/recruitInfo/index.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/FormInfoWithTable.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/MainTab.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/Print.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/SubDialog.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/SubTab.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/SubTable.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/TableEdit.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/Top.js delete mode 100644 pc4backstage/hrmengine/components/recruitLibrary/index.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/MainTab.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/SubDialog.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/SubTab.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/TableEdit.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/Top.js delete mode 100644 pc4backstage/hrmengine/components/recruitPlan/index.js delete mode 100644 pc4backstage/hrmengine/components/role/AddRole.js delete mode 100644 pc4backstage/hrmengine/components/role/RoleEdit.js delete mode 100644 pc4backstage/hrmengine/components/role/RoleEditDialog.js delete mode 100644 pc4backstage/hrmengine/components/role/RoleInfo.js delete mode 100644 pc4backstage/hrmengine/components/role/RoleInfoSingle.js delete mode 100644 pc4backstage/hrmengine/components/role/RoleList.js delete mode 100644 pc4backstage/hrmengine/components/role/index.js delete mode 100644 pc4backstage/hrmengine/components/rpManage/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/rpManage/Header.js delete mode 100644 pc4backstage/hrmengine/components/rpManage/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/rpManage/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/rpManage/Tab.js delete mode 100644 pc4backstage/hrmengine/components/rpManage/index.js delete mode 100644 pc4backstage/hrmengine/components/rpType/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/rpType/Header.js delete mode 100644 pc4backstage/hrmengine/components/rpType/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/rpType/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/rpType/Tab.js delete mode 100644 pc4backstage/hrmengine/components/rpType/index.js delete mode 100644 pc4backstage/hrmengine/components/salaryApplySet/index.js delete mode 100644 pc4backstage/hrmengine/components/salaryBank/Editor.js delete mode 100644 pc4backstage/hrmengine/components/salaryBank/index.js delete mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/Editor.js delete mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/ImportResult.js delete mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/salaryIndexMaintenance/index.js delete mode 100644 pc4backstage/hrmengine/components/salaryIndexSetting/Editor.js delete mode 100644 pc4backstage/hrmengine/components/salaryIndexSetting/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/salaryIndexSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/Calculator.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/CalculatorCopy.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/FormulaSet.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/Header.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/ItemsSet.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/LevelSet.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/MainTableInfo.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/Search.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/StandardSet.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/SubDialog.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/TaxRateSet.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/TextArea.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/TextAreaCopy.js delete mode 100644 pc4backstage/hrmengine/components/salaryItemsSet/index.js delete mode 100644 pc4backstage/hrmengine/components/sanyuan/Processing.js delete mode 100644 pc4backstage/hrmengine/components/sanyuan/index.js delete mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/CalendarScheduling.js delete mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/DataList.js delete mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/ScheduleList.js delete mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/SchedulingInfo.js delete mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/SchedulingMember.js delete mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/Setting.js delete mode 100644 pc4backstage/hrmengine/components/schedule/schedulingSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/DataList.js delete mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/DetailSetting.js delete mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/Setting.js delete mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/ShiftsSettingInfo.js delete mode 100644 pc4backstage/hrmengine/components/schedule/shiftsSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/schedule/workTime/DataList.js delete mode 100644 pc4backstage/hrmengine/components/schedule/workTime/index.js delete mode 100644 pc4backstage/hrmengine/components/secAdminLog/index.js delete mode 100644 pc4backstage/hrmengine/components/secAuditorLog/index.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/AdvanceSetting.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/BasicSetting.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/ButtonIcons.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/DbSetting.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/Dialog.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/DialogContent.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/NetworkSetting.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/Table.js delete mode 100644 pc4backstage/hrmengine/components/securitySetting/index.js delete mode 100644 pc4backstage/hrmengine/components/sensitiveWord/List.js delete mode 100644 pc4backstage/hrmengine/components/sensitiveWord/Setting.js delete mode 100644 pc4backstage/hrmengine/components/serialNumber/DeptNumberSet.js delete mode 100644 pc4backstage/hrmengine/components/serialNumber/NumberComposition.js delete mode 100644 pc4backstage/hrmengine/components/serialNumber/NumberFlowRule.js delete mode 100644 pc4backstage/hrmengine/components/serialNumber/PostNumberSet.js delete mode 100644 pc4backstage/hrmengine/components/serialNumber/ResourceNumberSet.js delete mode 100644 pc4backstage/hrmengine/components/serialNumber/StartReservedNumberSet.js delete mode 100644 pc4backstage/hrmengine/components/serialNumber/SubNumberSet.js delete mode 100644 pc4backstage/hrmengine/components/signatureManagement/Editor.js delete mode 100644 pc4backstage/hrmengine/components/signatureManagement/LeftTree.js delete mode 100644 pc4backstage/hrmengine/components/signatureManagement/index.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/AdminRemind.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/AuthForm.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/BirthdayRemind.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/DispatchImgDialog.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/EmployeeRemind.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/EmployeeRemindNew.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/EntryRemind.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/GreetingSetDialog.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Picture.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/PreView.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Tab.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Table.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Top.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/Upload.js delete mode 100644 pc4backstage/hrmengine/components/staffCareReminder/index.js delete mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/EncryptSetting.js delete mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/FieldDef.js delete mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/Tip.js delete mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/ViewRangeForm.js delete mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/ViewRangeSetting.js delete mode 100644 pc4backstage/hrmengine/components/subCompanyFieldDef/index.js delete mode 100644 pc4backstage/hrmengine/components/systemAdminLog/index.js delete mode 100644 pc4backstage/hrmengine/components/title/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/title/Title.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/ActivityTab.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/Header.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/MainTable.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/SubDialog.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/SubTab.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/SubTable.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/ThirdTab.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/ThirdTable.js delete mode 100644 pc4backstage/hrmengine/components/trainActivity/index.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/FormInfo.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/Header.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/MainDialog.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/MainTableInfo.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/Search.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/SingleArrange.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/SpecialForm.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/SubDialog.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/SubTableInfo.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/TrainArrangeTabInfo.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/TrainSchedule.js delete mode 100644 pc4backstage/hrmengine/components/trainArrange/index.js delete mode 100644 pc4backstage/hrmengine/components/trainPlan/AddTestForm.js delete mode 100644 pc4backstage/hrmengine/components/trainPlan/Editor.js delete mode 100644 pc4backstage/hrmengine/components/trainPlan/Test.js delete mode 100644 pc4backstage/hrmengine/components/trainPlan/index.js delete mode 100644 pc4backstage/hrmengine/components/trainResource/Editor.js delete mode 100644 pc4backstage/hrmengine/components/trainResource/index.js delete mode 100644 pc4backstage/hrmengine/components/trainTypes/Editor.js delete mode 100644 pc4backstage/hrmengine/components/trainTypes/index.js delete mode 100644 pc4backstage/hrmengine/components/unitSet/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/unitSet/index.js delete mode 100644 pc4backstage/hrmengine/components/workflowSetting/ActionList.js delete mode 100644 pc4backstage/hrmengine/components/workflowSetting/DataList.js delete mode 100644 pc4backstage/hrmengine/components/workflowSetting/EntrySelect.js delete mode 100644 pc4backstage/hrmengine/components/workflowSetting/FieldList.js delete mode 100644 pc4backstage/hrmengine/components/workflowSetting/index.js delete mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/AddData.js delete mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/ConditionBar.js delete mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/Content.js delete mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/DateSwitch.js delete mode 100644 pc4backstage/hrmengine/components/workingDayAdjust/index.js delete mode 100644 pc4backstage/hrmengine/components/worknature/HocFactory.js delete mode 100644 pc4backstage/hrmengine/components/worknature/WorkNature.js delete mode 100644 pc4backstage/hrmengine/coms/AdvanceSearchFormInfo.js delete mode 100644 pc4backstage/hrmengine/coms/Calendar.js delete mode 100644 pc4backstage/hrmengine/coms/Editor.js delete mode 100644 pc4backstage/hrmengine/coms/EditorDialog.js delete mode 100644 pc4backstage/hrmengine/coms/FormInfo.js delete mode 100644 pc4backstage/hrmengine/coms/FormInfo_old.js delete mode 100644 pc4backstage/hrmengine/coms/NewAndEditDialog.js delete mode 100644 pc4backstage/hrmengine/coms/OrganizationTree.js delete mode 100644 pc4backstage/hrmengine/coms/Tabs.js delete mode 100644 pc4backstage/hrmengine/index.js delete mode 100644 pc4backstage/hrmengine/jsconfig.json delete mode 100644 pc4backstage/hrmengine/public/ConfigurableForm.js delete mode 100644 pc4backstage/hrmengine/public/coms/Authority.js delete mode 100644 pc4backstage/hrmengine/public/coms/Form.js delete mode 100644 pc4backstage/hrmengine/public/coms/Table.js delete mode 100644 pc4backstage/hrmengine/public/coms/Top.js delete mode 100644 pc4backstage/hrmengine/public/coms/index.js delete mode 100644 pc4backstage/hrmengine/public/constant.js delete mode 100644 pc4backstage/hrmengine/public/i18n.js delete mode 100644 pc4backstage/hrmengine/public/learn.js delete mode 100644 pc4backstage/hrmengine/public/logType.js delete mode 100644 pc4backstage/hrmengine/public/pulic-func.js delete mode 100644 pc4backstage/hrmengine/public/sweet-form.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/AccountIcon.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/AddButton.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/Authority.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/CenterSpin.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/DeleteButton.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/Dialog.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/MagicForm.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/OrgTree.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/RadioGroup.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/Search.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/Table.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/Top.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/ImportHistory.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/ImportLog.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/ImportResult.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/importRelatedComponet/index.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/components/index.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/authority.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/dialog.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/form.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/importCommon.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/index.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/orgTree.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/radioGroup.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/search.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/table.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/stores/top.js delete mode 100644 pc4backstage/hrmengine/public/valhalla/style/addButton.less delete mode 100644 pc4backstage/hrmengine/public/valhalla/style/deleteButton.less delete mode 100644 pc4backstage/hrmengine/public/valhalla/style/magicForm.less delete mode 100644 pc4backstage/hrmengine/reportSensitiveWord.js delete mode 100644 pc4backstage/hrmengine/stores/adareaset.js delete mode 100644 pc4backstage/hrmengine/stores/adminAreaDisplaySetting.js delete mode 100644 pc4backstage/hrmengine/stores/adminDecentralization.js delete mode 100644 pc4backstage/hrmengine/stores/annualPeriod.js delete mode 100644 pc4backstage/hrmengine/stores/annualRule.js delete mode 100644 pc4backstage/hrmengine/stores/annualSetting.js delete mode 100644 pc4backstage/hrmengine/stores/appDetach.js delete mode 100644 pc4backstage/hrmengine/stores/archiveLogView.js delete mode 100644 pc4backstage/hrmengine/stores/assImple.js delete mode 100644 pc4backstage/hrmengine/stores/assItem.js delete mode 100644 pc4backstage/hrmengine/stores/assType.js delete mode 100644 pc4backstage/hrmengine/stores/attendanceSetting.js delete mode 100644 pc4backstage/hrmengine/stores/attendanceSyncSetting.js delete mode 100644 pc4backstage/hrmengine/stores/authAdjust.js delete mode 100644 pc4backstage/hrmengine/stores/authSearch.js delete mode 100644 pc4backstage/hrmengine/stores/authorizationSetting.js delete mode 100644 pc4backstage/hrmengine/stores/avatarSetting.js delete mode 100644 pc4backstage/hrmengine/stores/baseStore.js delete mode 100644 pc4backstage/hrmengine/stores/batchAdjust.js delete mode 100644 pc4backstage/hrmengine/stores/batchEdit.js delete mode 100644 pc4backstage/hrmengine/stores/batchMaintenance.js delete mode 100644 pc4backstage/hrmengine/stores/batchUploadPhoto.js delete mode 100644 pc4backstage/hrmengine/stores/birthdayRemind.js delete mode 100644 pc4backstage/hrmengine/stores/browseBoxLinkPage.js delete mode 100644 pc4backstage/hrmengine/stores/browserDisplayFieldSetting.js delete mode 100644 pc4backstage/hrmengine/stores/cardItemSet.js delete mode 100644 pc4backstage/hrmengine/stores/contractExpireWarning.js delete mode 100644 pc4backstage/hrmengine/stores/contractMaintain.js delete mode 100644 pc4backstage/hrmengine/stores/contractTemplate.js delete mode 100644 pc4backstage/hrmengine/stores/contractType.js delete mode 100644 pc4backstage/hrmengine/stores/datas.js delete mode 100644 pc4backstage/hrmengine/stores/decentralizationAdminSet.js delete mode 100644 pc4backstage/hrmengine/stores/dismiss.js delete mode 100644 pc4backstage/hrmengine/stores/domain/Search.js delete mode 100644 pc4backstage/hrmengine/stores/domain/authority.js delete mode 100644 pc4backstage/hrmengine/stores/domain/dialog.js delete mode 100644 pc4backstage/hrmengine/stores/domain/form.js delete mode 100644 pc4backstage/hrmengine/stores/domain/index.js delete mode 100644 pc4backstage/hrmengine/stores/domain/orgTree.js delete mode 100644 pc4backstage/hrmengine/stores/domain/table.js delete mode 100644 pc4backstage/hrmengine/stores/domain/top.js delete mode 100644 pc4backstage/hrmengine/stores/education.js delete mode 100644 pc4backstage/hrmengine/stores/edulevel.js delete mode 100644 pc4backstage/hrmengine/stores/elseSettingStore.js delete mode 100644 pc4backstage/hrmengine/stores/employDemand.js delete mode 100644 pc4backstage/hrmengine/stores/enginegroup.js delete mode 100644 pc4backstage/hrmengine/stores/entryMaintenance.js delete mode 100644 pc4backstage/hrmengine/stores/external/outSignAppSetting.js delete mode 100644 pc4backstage/hrmengine/stores/formal.js delete mode 100644 pc4backstage/hrmengine/stores/funcManageDecent.js delete mode 100644 pc4backstage/hrmengine/stores/generalWorkingHours.js delete mode 100644 pc4backstage/hrmengine/stores/import.js delete mode 100644 pc4backstage/hrmengine/stores/importCommon.js delete mode 100644 pc4backstage/hrmengine/stores/importExternalAttendance.js delete mode 100644 pc4backstage/hrmengine/stores/importorg.js delete mode 100644 pc4backstage/hrmengine/stores/importresource.js delete mode 100644 pc4backstage/hrmengine/stores/index.js delete mode 100644 pc4backstage/hrmengine/stores/leaveType.js delete mode 100644 pc4backstage/hrmengine/stores/levelProtection.js delete mode 100644 pc4backstage/hrmengine/stores/limitedAnalysis.js delete mode 100644 pc4backstage/hrmengine/stores/loginFailLog.js delete mode 100644 pc4backstage/hrmengine/stores/loginLog.js delete mode 100644 pc4backstage/hrmengine/stores/majorset.js delete mode 100644 pc4backstage/hrmengine/stores/matirx.js delete mode 100644 pc4backstage/hrmengine/stores/matirxDataMaintenance.js delete mode 100644 pc4backstage/hrmengine/stores/matirxFieldSetting.js delete mode 100644 pc4backstage/hrmengine/stores/matrixAdjust.js delete mode 100644 pc4backstage/hrmengine/stores/matrixMaintenance.js delete mode 100644 pc4backstage/hrmengine/stores/moduleManage.js delete mode 100644 pc4backstage/hrmengine/stores/newPost.js delete mode 100644 pc4backstage/hrmengine/stores/normalLog.js delete mode 100644 pc4backstage/hrmengine/stores/officeaddress.js delete mode 100644 pc4backstage/hrmengine/stores/onlineAnalysis.js delete mode 100644 pc4backstage/hrmengine/stores/onlineAttendance.js delete mode 100644 pc4backstage/hrmengine/stores/orgChart.js delete mode 100644 pc4backstage/hrmengine/stores/orgFieldDisplaySetting.js delete mode 100644 pc4backstage/hrmengine/stores/organization.js delete mode 100644 pc4backstage/hrmengine/stores/otherSetting.js delete mode 100644 pc4backstage/hrmengine/stores/paidLeave.js delete mode 100644 pc4backstage/hrmengine/stores/paidLeavePeriod.js delete mode 100644 pc4backstage/hrmengine/stores/paidLeaveRule.js delete mode 100644 pc4backstage/hrmengine/stores/paidLeaveSetting.js delete mode 100644 pc4backstage/hrmengine/stores/paidLeaveTimeSetting.js delete mode 100644 pc4backstage/hrmengine/stores/payrollManagement.js delete mode 100644 pc4backstage/hrmengine/stores/payrollSending.js delete mode 100644 pc4backstage/hrmengine/stores/personalSalaryAdjustment.js delete mode 100644 pc4backstage/hrmengine/stores/postset.js delete mode 100644 pc4backstage/hrmengine/stores/privacySetting.js delete mode 100644 pc4backstage/hrmengine/stores/quit.js delete mode 100644 pc4backstage/hrmengine/stores/recruitInfo.js delete mode 100644 pc4backstage/hrmengine/stores/recruitLibrary.js delete mode 100644 pc4backstage/hrmengine/stores/recruitPlan.js delete mode 100644 pc4backstage/hrmengine/stores/rehire.js delete mode 100644 pc4backstage/hrmengine/stores/renew.js delete mode 100644 pc4backstage/hrmengine/stores/resourceIndex.js delete mode 100644 pc4backstage/hrmengine/stores/retire.js delete mode 100644 pc4backstage/hrmengine/stores/roleSetting.js delete mode 100644 pc4backstage/hrmengine/stores/rpManage.js delete mode 100644 pc4backstage/hrmengine/stores/rpType.js delete mode 100644 pc4backstage/hrmengine/stores/salaryApplySet.js delete mode 100644 pc4backstage/hrmengine/stores/salaryBank.js delete mode 100644 pc4backstage/hrmengine/stores/salaryIndexMaintenance.js delete mode 100644 pc4backstage/hrmengine/stores/salaryIndexSetting.js delete mode 100644 pc4backstage/hrmengine/stores/salaryItemsSet.js delete mode 100644 pc4backstage/hrmengine/stores/sanyuan.js delete mode 100644 pc4backstage/hrmengine/stores/scheduleShiftsSetting.js delete mode 100644 pc4backstage/hrmengine/stores/scheduleWorkTime.js delete mode 100644 pc4backstage/hrmengine/stores/schedulingSetting.js delete mode 100644 pc4backstage/hrmengine/stores/secAdminLog.js delete mode 100644 pc4backstage/hrmengine/stores/secAuditorLog.js delete mode 100644 pc4backstage/hrmengine/stores/securitySetting.js delete mode 100644 pc4backstage/hrmengine/stores/sensitiveWord/list.js delete mode 100644 pc4backstage/hrmengine/stores/sensitiveWord/setting.js delete mode 100644 pc4backstage/hrmengine/stores/serialNumber/deptNumberSetting.js delete mode 100644 pc4backstage/hrmengine/stores/serialNumber/numberComposition.js delete mode 100644 pc4backstage/hrmengine/stores/serialNumber/numberFlowRule.js delete mode 100644 pc4backstage/hrmengine/stores/serialNumber/postNumberSetting.js delete mode 100644 pc4backstage/hrmengine/stores/serialNumber/resourceNumberSetting.js delete mode 100644 pc4backstage/hrmengine/stores/serialNumber/startReservedNumberSet.js delete mode 100644 pc4backstage/hrmengine/stores/serialNumber/subNumberSetting.js delete mode 100644 pc4backstage/hrmengine/stores/signatureManagement.js delete mode 100644 pc4backstage/hrmengine/stores/staffCareReminder.js delete mode 100644 pc4backstage/hrmengine/stores/subCompanyFieldDef.js delete mode 100644 pc4backstage/hrmengine/stores/systemAdminLog.js delete mode 100644 pc4backstage/hrmengine/stores/test.js delete mode 100644 pc4backstage/hrmengine/stores/titleset.js delete mode 100644 pc4backstage/hrmengine/stores/trainActivity.js delete mode 100644 pc4backstage/hrmengine/stores/trainArrange.js delete mode 100644 pc4backstage/hrmengine/stores/trainPlan.js delete mode 100644 pc4backstage/hrmengine/stores/trainResource.js delete mode 100644 pc4backstage/hrmengine/stores/trainTypes.js delete mode 100644 pc4backstage/hrmengine/stores/transfer.js delete mode 100644 pc4backstage/hrmengine/stores/trial.js delete mode 100644 pc4backstage/hrmengine/stores/unitSet.js delete mode 100644 pc4backstage/hrmengine/stores/workflowSetting.js delete mode 100644 pc4backstage/hrmengine/stores/workingDayAdjust.js delete mode 100644 pc4backstage/hrmengine/stores/worknature.js delete mode 100644 pc4backstage/hrmengine/style/adminAreaDisplaySetting.less delete mode 100644 pc4backstage/hrmengine/style/annual.less delete mode 100644 pc4backstage/hrmengine/style/appDetach.less delete mode 100644 pc4backstage/hrmengine/style/area.css delete mode 100644 pc4backstage/hrmengine/style/assType.css delete mode 100644 pc4backstage/hrmengine/style/attendanceSetting.css delete mode 100644 pc4backstage/hrmengine/style/attendanceSynSetting.less delete mode 100644 pc4backstage/hrmengine/style/authAdjust.less delete mode 100644 pc4backstage/hrmengine/style/authSearch.less delete mode 100644 pc4backstage/hrmengine/style/batchMaintenance.less delete mode 100644 pc4backstage/hrmengine/style/birthday.css delete mode 100644 pc4backstage/hrmengine/style/browserDisplayFieldSetting.less delete mode 100644 pc4backstage/hrmengine/style/calendar.less delete mode 100644 pc4backstage/hrmengine/style/cardItemSet.less delete mode 100644 pc4backstage/hrmengine/style/checkContent.less delete mode 100644 pc4backstage/hrmengine/style/common.less delete mode 100644 pc4backstage/hrmengine/style/fieldDef.less delete mode 100644 pc4backstage/hrmengine/style/funcDecent.css delete mode 100644 pc4backstage/hrmengine/style/icon.less delete mode 100644 pc4backstage/hrmengine/style/import.css delete mode 100644 pc4backstage/hrmengine/style/index.js delete mode 100644 pc4backstage/hrmengine/style/leaveType.less delete mode 100644 pc4backstage/hrmengine/style/levelProtection.less delete mode 100644 pc4backstage/hrmengine/style/matrix.less delete mode 100644 pc4backstage/hrmengine/style/matrixAdjust.less delete mode 100644 pc4backstage/hrmengine/style/matrixDataMaintenance.less delete mode 100644 pc4backstage/hrmengine/style/matrixFieldSetting.less delete mode 100644 pc4backstage/hrmengine/style/moduleManage.css delete mode 100644 pc4backstage/hrmengine/style/newPost.less delete mode 100644 pc4backstage/hrmengine/style/onlineAnalysis.css delete mode 100644 pc4backstage/hrmengine/style/onlineAttendance.less delete mode 100644 pc4backstage/hrmengine/style/orgChart.less delete mode 100644 pc4backstage/hrmengine/style/paidLeaveSetting.less delete mode 100644 pc4backstage/hrmengine/style/paidLevel.less delete mode 100644 pc4backstage/hrmengine/style/payrollManagement.css delete mode 100644 pc4backstage/hrmengine/style/payrollManagement.less delete mode 100644 pc4backstage/hrmengine/style/payrollSending.less delete mode 100644 pc4backstage/hrmengine/style/personalSalaryAdjustment.css delete mode 100644 pc4backstage/hrmengine/style/personalSalaryAdjustment.less delete mode 100644 pc4backstage/hrmengine/style/privacySetting.less delete mode 100644 pc4backstage/hrmengine/style/resourceIndex.less delete mode 100644 pc4backstage/hrmengine/style/roleSetting.less delete mode 100644 pc4backstage/hrmengine/style/rpManage.css delete mode 100644 pc4backstage/hrmengine/style/salaryIndexMaintenance.css delete mode 100644 pc4backstage/hrmengine/style/salaryItemsSet.css delete mode 100644 pc4backstage/hrmengine/style/sanyuan.less delete mode 100644 pc4backstage/hrmengine/style/sanyuanLog.less delete mode 100644 pc4backstage/hrmengine/style/schedulingSetting.less delete mode 100644 pc4backstage/hrmengine/style/searchGroupRelated.css delete mode 100644 pc4backstage/hrmengine/style/securitySetting.less delete mode 100644 pc4backstage/hrmengine/style/serialNumber.less delete mode 100644 pc4backstage/hrmengine/style/shitfsSetting.less delete mode 100644 pc4backstage/hrmengine/style/staffCareReminder.less delete mode 100644 pc4backstage/hrmengine/style/trainActivity.css delete mode 100644 pc4backstage/hrmengine/style/trainArrange.css delete mode 100644 pc4backstage/hrmengine/style/trainPlan.css delete mode 100644 pc4backstage/hrmengine/style/workHour.css delete mode 100644 pc4backstage/hrmengine/style/workflowSetting.less delete mode 100644 pc4backstage/hrmengine/style/workingDayAdjust.less delete mode 100644 pc4backstage/hrmengine/style/worktime.less delete mode 100644 pc4backstage/hrmengine/util/PASSUtil.js delete mode 100644 pc4backstage/hrmengine/util/RSAUtil.js delete mode 100644 pc4backstage/hrmengine/util/index.js delete mode 100644 pc4backstage/hrmengine/util/organization-func.js delete mode 100644 pc4backstage/hrmengine/util/pulic-func.js delete mode 100644 pc4backstage/hrmengine/util/pure-util.js delete mode 100644 pc4backstage/hrmengine/util/save-time-util.js create mode 100644 pc4mobx/esearch/apis/apiSet.js create mode 100644 pc4mobx/esearch/apis/robot.js create mode 100644 pc4mobx/esearch/apis/searchSet.js create mode 100644 pc4mobx/esearch/apis/weeso.js create mode 100644 pc4mobx/esearch/components/ApiSet.js create mode 100644 pc4mobx/esearch/components/Weeso.js create mode 100644 pc4mobx/esearch/components/WeesoResult.js create mode 100644 pc4mobx/esearch/components/WessoRecords.js create mode 100644 pc4mobx/esearch/components/childComponents/Adlink.js create mode 100644 pc4mobx/esearch/components/childComponents/CommonContent.js create mode 100644 pc4mobx/esearch/components/childComponents/ImagesContent.js create mode 100644 pc4mobx/esearch/components/childComponents/SearchTools.js create mode 100644 pc4mobx/esearch/components/childComponents/WeesoInput.js create mode 100644 pc4mobx/esearch/components/childComponents/WeesoTop.js create mode 100644 pc4mobx/esearch/components/childComponents/aboutBrowser2.js create mode 100644 pc4mobx/esearch/components/childComponents/aboutSelect2.js create mode 100644 pc4mobx/esearch/components/childComponents/aboutTime2.js create mode 100644 pc4mobx/esearch/components/robot/RobotDialog.js create mode 100644 pc4mobx/esearch/components/robot/index.js create mode 100644 pc4mobx/esearch/components/weesoSearchSet.js rename {pc4backstage/hrmengine => pc4mobx/esearch}/debug.js (82%) create mode 100644 pc4mobx/esearch/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Background/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Background/index.less create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Control/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Control/index.less create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Image/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Image/index.less create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Position/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Position/index.less create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.less create mode 100644 pc4mobx/esearch/public/wea-zmage/config/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/utils/index.js create mode 100644 pc4mobx/esearch/public/wea-zmage/utils/lerp.js rename {pc4backstage/hrmengine => pc4mobx/esearch}/single.js (62%) create mode 100644 pc4mobx/esearch/stores/apiSet.js create mode 100644 pc4mobx/esearch/stores/index.js create mode 100644 pc4mobx/esearch/stores/index.js.bak create mode 100644 pc4mobx/esearch/stores/robot.js create mode 100644 pc4mobx/esearch/stores/weeso.js create mode 100644 pc4mobx/esearch/stores/weesoSeachSetStore.js create mode 100644 pc4mobx/esearch/style/apiSet.less create mode 100644 pc4mobx/esearch/style/index.js create mode 100644 pc4mobx/esearch/style/result.less create mode 100644 pc4mobx/esearch/style/robot.less create mode 100644 pc4mobx/esearch/style/searchSet.less create mode 100644 pc4mobx/esearch/style/weeso.less create mode 100644 pc4mobx/esearch/style/wessoRecords.less create mode 100644 pc4mobx/esearch/util/EsearchUtil.js create mode 100644 pc4mobx/esearch/util/NoRight.js create mode 100644 pc4mobx/esearch/util/img/nodata.png create mode 100644 pc4mobx/esearch/util/img/page_descStr.png create mode 100644 pc4mobx/esearch/util/img/weaverlogo.png diff --git a/pc4backstage/hrmAttendance/apis/applicationSettings.js b/pc4backstage/hrmAttendance/apis/applicationSettings.js deleted file mode 100644 index c41e606..0000000 --- a/pc4backstage/hrmAttendance/apis/applicationSettings.js +++ /dev/null @@ -1,19 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/settings/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/settings/getRightMenu', 'GET', params); -} - -export const getSettingsForm = (params) => { - return WeaTools.callApi('/api/kq/settings/getSettingsForm', 'GET', params); -} - -export const saveSettings = (params) => { - return WeaTools.callApi('/api/kq/settings/saveSettings', 'GET', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/attendance.js b/pc4backstage/hrmAttendance/apis/attendance.js deleted file mode 100644 index 1d05f65..0000000 --- a/pc4backstage/hrmAttendance/apis/attendance.js +++ /dev/null @@ -1,10 +0,0 @@ -import { - WeaTools -} from 'ecCom'; - -export const getImportForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/getImportForm?is_multilang_set=true', 'GET', params) -export const importExternalData = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/saveImport', 'POST', params) - -export const getImportFormSet = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/getImportSetForm', 'GET', params) -export const syncData = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/synData', 'POST', params) -export const saveImportSet = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulesignimport/saveImportSet', 'POST', params) \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/attendanceRpSharingSetting.js b/pc4backstage/hrmAttendance/apis/attendanceRpSharingSetting.js deleted file mode 100644 index 49e5a41..0000000 --- a/pc4backstage/hrmAttendance/apis/attendanceRpSharingSetting.js +++ /dev/null @@ -1,31 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/reportshare/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/reportshare/getRightMenu', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/reportshare/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/reportshare/getSearchList', 'GET', params); -} - -export const getReportShareForm = (params) => { - return WeaTools.callApi('/api/kq/reportshare/getReportShareForm', 'GET', params); -} - -export const saveReportShare = (params) => { - return WeaTools.callApi('/api/kq/reportshare/saveReportShare', 'POST', params); -} - -export const deleteReportShare = (params) => { - return WeaTools.callApi('/api/kq/reportshare/deleteReportShare', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/common.js b/pc4backstage/hrmAttendance/apis/common.js deleted file mode 100644 index 275777d..0000000 --- a/pc4backstage/hrmAttendance/apis/common.js +++ /dev/null @@ -1,24 +0,0 @@ -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 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/hrmAttendance/apis/groupSetting.js b/pc4backstage/hrmAttendance/apis/groupSetting.js deleted file mode 100644 index 04552fe..0000000 --- a/pc4backstage/hrmAttendance/apis/groupSetting.js +++ /dev/null @@ -1,69 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getRightMenu', 'POST', params); - -export const getSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getSearchCondition', 'GET', params); - -export const getSearchList = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getSearchList', 'POST', params); - -export const getBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getForm', 'GET', {...params, tabKey: 1}); - -export const getKQTypeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getForm', 'GET', {...params, tabKey: 2}); - -export const saveBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/save', 'POST', {...params, tabKey: 1}); - -export const saveKQTypeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/save', 'POST', {...params, tabKey: 2}); - -export const deleteGroup = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/del', 'POST', params); - -export const getShiftCycleForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getShiftCycleForm', 'GET', params); - -export const delShiftCycleForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/delShiftCycleForm', 'POST', params); - -export const getTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getTabs', 'POST', params); - -export const init = (params = {}) => Promise.all([getSearchCondition(), getTabs()]); - -export const getLocationForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/getForm', 'GET', params); - -export const saveLocation = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/save', 'POST', params); - -export const delLocation = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/del', 'POST', params); - -export const getWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/getForm', 'GET', params); - -export const saveWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/save', 'POST', params); - -export const delWifiForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/del', 'POST', params); - -export const getMemberSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getSearchCondition', 'GET', params); - -export const getMemberList = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getSearchList', 'POST', params); - -export const getMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/getForm', 'GET', params); - -export const saveMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/save', 'POST', params); - -export const delMemberForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupmember/del', 'POST', params); - -export const exportExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/exportExcel', 'POST', params); - -export const importExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/importExcel', 'POST', params); - -// 考勤组查询gropuradio -export const getGroupMemeberCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getGroupMemeberCondition', 'GET', params); - -// 考勤组查询列表 -export const getGroupMemberList = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getGroupMemberList', 'GET', params); - -// 获取添加考勤组人员表单 -export const getAddMemberCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/getAddMemberCondition', 'GET', params); - -//加入考勤组保存 -export const saveAddMember = (params = {}) => WeaTools.callApi('/api/hrm/kq/group/saveAddMember', 'POST', params); - -export const getGroupLocationList = (params = {}) => WeaTools.callApi('/api/hrm/kq/grouplocation/getGroupLocationList', 'GET', params); - -export const getGroupWifiList = (params = {}) => WeaTools.callApi('/api/hrm/kq/groupwifi/getGroupWifiList', 'GET', params); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/holidayRule.js b/pc4backstage/hrmAttendance/apis/holidayRule.js deleted file mode 100644 index 8b7f6f7..0000000 --- a/pc4backstage/hrmAttendance/apis/holidayRule.js +++ /dev/null @@ -1,51 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getHasRight', 'GET', params); -} - -export const getMenus = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getRightMenu', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSearchList', 'GET', params); -} - -export const getLeaveRulesForm = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getLeaveRulesForm', 'GET', params); -} - -export const addLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/addLeaveRules', 'POST', params); -} - -export const editLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/editLeaveRules', 'POST', params); -} - -export const deleteLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/deleteLeaveRules', 'POST', params); -} - -export const getSyncSettingForm = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSyncSettingForm', 'GET', params); -} - -export const saveSyncSetting = (params) => { - return WeaTools.callApi('/api/kq/leaverules/saveSyncSetting', 'POST', params); -} - -export const isNameRepeat = (params) => { - return WeaTools.callApi('/api/kq/leaverules/isNameRepeat', 'GET', params); -} - -export const saveDisableLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/saveDisableLeaveRules', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/holidaySetting.js b/pc4backstage/hrmAttendance/apis/holidaySetting.js deleted file mode 100644 index e4d7fa1..0000000 --- a/pc4backstage/hrmAttendance/apis/holidaySetting.js +++ /dev/null @@ -1,59 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getHasRight', 'GET', params); -} - -export const getMenus = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getRightMenu', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getSearchCondition', 'GET', params); -} - -export const getHolidaySetCalendar = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getHolidaySetCalendar', 'GET', params); -} - -export const getHolidayCount = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getHolidayCount', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getSearchList', 'GET', params); -} - -export const getHolidaySetForm = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getHolidaySetForm', 'GET', params); -} - -export const addHolidaySet = (params) => { - return WeaTools.callApi('/api/kq/holidayset/addHolidaySet', 'POST', params); -} - -export const editHolidaySet = (params) => { - return WeaTools.callApi('/api/kq/holidayset/editHolidaySet', 'POST', params); -} - -export const deleteHolidaySet = (params) => { - return WeaTools.callApi('/api/kq/holidayset/deleteHolidaySet', 'POST', params); -} - -export const initHolidaySet = (params) => { - return WeaTools.callApi('/api/kq/holidayset/initHolidaySet', 'POST', params); -} - -export const getSyncForm = (params) => { - return WeaTools.callApi('/api/kq/holidayset/getSyncForm', 'GET', params); -} - -export const syncHolidaySet = (params) => { - return WeaTools.callApi('/api/kq/holidayset/syncHolidaySet', 'POST', params); -} - -export const hasRepeactData = (params) => { - return WeaTools.callApi('/api/kq/holidayset/hasRepeactData', 'GET', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/holidayType.js b/pc4backstage/hrmAttendance/apis/holidayType.js deleted file mode 100644 index aa8c242..0000000 --- a/pc4backstage/hrmAttendance/apis/holidayType.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getRightMenu', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getSearchList', 'GET', params); -} - -export const getLeaveTypesForm = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getLeaveTypesForm', 'GET', params); -} - -export const addLeaveTypes = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/addLeaveTypes', 'POST', params); -} - -export const editLeaveTypes = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/editLeaveTypes', 'POST', params); -} - -export const deleteLeaveTypes = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/deleteLeaveTypes', 'POST', params); -} - -export const isNameRepeat = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/isNameRepeat', 'GET', params); -} - -export const saveDisableLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/saveDisableLeaveTypes', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/importScheduleCode.js b/pc4backstage/hrmAttendance/apis/importScheduleCode.js deleted file mode 100644 index 041f577..0000000 --- a/pc4backstage/hrmAttendance/apis/importScheduleCode.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - WeaTools -} from 'ecCom' -//获取导入表单 -export const getImportForm = (params) => { - const { - importType - } = params; - - const str = importType === 'kqScheduleCode' ? 'schedulecode' : 'balanceofleave'; - - return WeaTools.callApi(`/api/hrm/kq/${str}/getImportForm`, 'GET', params); -} -//导入文件提交 -export const saveImport = (params) => { - const { - importType - } = params; - - const str = importType === 'kqScheduleCode' ? 'schedulecode' : 'balanceofleave'; - - return WeaTools.callApi(`/api/hrm/kq/${str}/saveImport`, 'POST', params); -} -//获取导入结果回调数据 -export const getImportProcessLog = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportProcessLog`, 'GET', params); -} -//获取导入结果 -export const getImportResult = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportResult`, 'GET', params); -} -//历史导入信息查询 -export const getImportHistory = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportHistory`, 'GET', params); -} -//导入日志 -export const getImportLogDetail = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportColResultLog`, 'GET', params); -} -//导入日志 - 高级搜索 -export const getImportLogSearchCondition = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getHistorySearchCondition`, 'GET', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/importresource.js b/pc4backstage/hrmAttendance/apis/importresource.js deleted file mode 100644 index 9c2cba4..0000000 --- a/pc4backstage/hrmAttendance/apis/importresource.js +++ /dev/null @@ -1,48 +0,0 @@ -import { - WeaTools -} from 'ecCom' -//获取导入表单 -export const getImportForm = (params) => { - const { - importType - } = params; - - const str = importType === 'holidaySet' ? 'holidayset' : 'balanceofleave'; - - let type = 'GET'; - if (str == 'balanceofleave') { - type = 'POST'; - } - - return WeaTools.callApi(`/api/kq/${str}/getImportForm`, type, params); -} -//导入文件提交 -export const saveImport = (params) => { - const { - importType - } = params; - - const str = importType === 'holidaySet' ? 'holidayset' : 'balanceofleave'; - - return WeaTools.callApi(`/api/kq/${str}/saveImport`, 'POST', params); -} -//获取导入结果回调数据 -export const getImportProcessLog = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportProcessLog`, 'GET', params); -} -//获取导入结果 -export const getImportResult = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportResult`, 'GET', params); -} -//历史导入信息查询 -export const getImportHistory = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportHistory`, 'GET', params); -} -//导入日志 -export const getImportLogDetail = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getImportColResultLog`, 'GET', params); -} -//导入日志 - 高级搜索 -export const getImportLogSearchCondition = (params) => { - return WeaTools.callApi(`/api/kq/importlog/getHistorySearchCondition`, 'GET', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/initSetting.js b/pc4backstage/hrmAttendance/apis/initSetting.js deleted file mode 100644 index 84e97fd..0000000 --- a/pc4backstage/hrmAttendance/apis/initSetting.js +++ /dev/null @@ -1,23 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/setupwizard/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/setupwizard/getRightMenu', 'GET', params); -} - -export const getSetupForm = (params) => { - return WeaTools.callApi('/api/kq/setupwizard/getSetupForm', 'GET', params); -} - -export const getSetupSteps = (params) => { - return WeaTools.callApi('/api/kq/setupwizard/getSetupSteps', 'GET', params); -} - -export const performInitialization = (params) => { - return WeaTools.callApi('/api/kq/setupwizard/performInitialization', 'GET', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/kqMonthReportSetting.js b/pc4backstage/hrmAttendance/apis/kqMonthReportSetting.js deleted file mode 100644 index 0395605..0000000 --- a/pc4backstage/hrmAttendance/apis/kqMonthReportSetting.js +++ /dev/null @@ -1,24 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -const apiAddress = '/api/hrm/kq/reportFieldDefine/'; - -export const getRightMenu = (params = {}) => WeaTools.callApi(`${apiAddress}getRightMenu`, 'GET', params); -export const getFieldDefineTabs = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineTabs`, 'GET', params); -export const getFieldDefineList = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineList`, 'POST', params); -export const saveFieldDefineList = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldDefineList`, 'POST', params); -export const getFieldDefineForm = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineForm`, 'POST', params); -export const saveFieldDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldDefine`, 'POST', params); -export const deleteFieldDefine = (params = {}) => WeaTools.callApi(`${apiAddress}deleteFieldDefine`, 'POST', params); -export const getGroupList = (params = {}) => WeaTools.callApi(`${apiAddress}getGroupList`, 'POST', params); -export const getGroupForm = (params = {}) => WeaTools.callApi(`${apiAddress}getGroupForm`, 'POST', params); -export const saveGroup = (params = {}) => WeaTools.callApi(`${apiAddress}saveGroup`, 'POST', params); -export const deleteGroup = (params = {}) => WeaTools.callApi(`${apiAddress}deleteGroup`, 'POST', params); -export const getConditionMoudleTabs = (params = {}) => WeaTools.callApi(`${apiAddress}getConditionMoudleTabs`, 'POST', params); -export const saveConditionMoudleDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveConditionMoudleDefine`, 'POST', params); -export const getFieldOrderDefine = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldOrderDefine`, 'POST', params); -export const saveFieldOrderDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldOrderDefine`, 'POST', params); -export const changeFieldGroup = (params = {}) => WeaTools.callApi(`${apiAddress}changeFieldGroup`, 'POST', params); - -export const init = (params = {}) => Promise.all([getRightMenu(), getFieldDefineTabs()]); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/newHolidayRule.js b/pc4backstage/hrmAttendance/apis/newHolidayRule.js deleted file mode 100644 index fb2f4a8..0000000 --- a/pc4backstage/hrmAttendance/apis/newHolidayRule.js +++ /dev/null @@ -1,55 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getRightMenu', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSearchList', 'GET', params); -} - -export const getLeaveRulesForm = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getLeaveRulesForm', 'GET', params); -} - -export const addLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/addLeaveRules', 'POST', params); -} - -export const editLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/editLeaveRules', 'POST', params); -} - -export const deleteLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/deleteLeaveRules', 'POST', params); -} - -export const getSyncSettingForm = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSyncSettingForm', 'GET', params); -} - -export const saveSyncSetting = (params) => { - return WeaTools.callApi('/api/kq/leaverules/saveSyncSetting', 'POST', params); -} - -export const isNameRepeat = (params) => { - return WeaTools.callApi('/api/kq/leaverules/isNameRepeat', 'GET', params); -} - -export const saveDisableLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/saveDisableLeaveRules', 'POST', params); -} - -export const getUnitName = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getUnitName', 'GET', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/overtimeRule.js b/pc4backstage/hrmAttendance/apis/overtimeRule.js deleted file mode 100644 index 71a50e4..0000000 --- a/pc4backstage/hrmAttendance/apis/overtimeRule.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/getHasRight', 'GET', params); -} - -export const getMenus = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/getRightMenu', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/getSearchList', 'GET', params); -} - -export const getOvertimeRulesForm = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/getOvertimeRulesForm', 'GET', params); -} - -export const addOvertimeRules = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/addOvertimeRules', 'POST', params); -} - -export const editOvertimeRules = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/editOvertimeRules', 'POST', params); -} - -export const deleteOvertimeRules = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/deleteOvertimeRules', 'POST', params); -} - -export const saveDefault = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/saveDefault', 'POST', params); -} - -export const getOvertimeUnitForm = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/getOvertimeUnitForm', 'GET', params); -} - -export const saveOvertimeUnit = (params) => { - return WeaTools.callApi('/api/kq/overtimerules/saveOvertimeUnit', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/scheduleCode.js b/pc4backstage/hrmAttendance/apis/scheduleCode.js deleted file mode 100644 index 0a835aa..0000000 --- a/pc4backstage/hrmAttendance/apis/scheduleCode.js +++ /dev/null @@ -1,13 +0,0 @@ -import { - WeaTools -} from 'ecCom'; - -export const getScheduleCodeCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleCodeCondition', 'GET', params); -export const getScheduleCodeList = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleCodeList', 'POST', params); -export const getScheduleCodeForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleCodeForm', 'GET', params); -export const saveScheduleCode = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/saveScheduleCode', 'POST', params); -export const getScheduleDeviceCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleDeviceCondition', 'GET', params); -export const getScheduleDeviceList = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleDeviceList', 'POST', params); -export const getScheduleDeviceForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/getScheduleDeviceForm', 'GET', params); -export const saveScheduleDevice = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/saveScheduleDevice', 'POST', params); -export const delScheduleDevice = (params = {}) => WeaTools.callApi('/api/hrm/kq/schedulecode/delScheduleDevice', 'POST', params); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/scheduleSetting.js b/pc4backstage/hrmAttendance/apis/scheduleSetting.js deleted file mode 100644 index 7e37b1c..0000000 --- a/pc4backstage/hrmAttendance/apis/scheduleSetting.js +++ /dev/null @@ -1,25 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getTabs', 'POST', params); - -export const getShiftSchedule = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getShiftSchedule', 'POST', params); - -export const getSearchCondition = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getSearchCondition', 'POST', params); - -export const getBatchShiftScheduleFrom = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getBatchShiftScheduleFrom', 'POST', params); - -export const save = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/save', 'POST', params); - -export const batchDelete = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/delete', 'POST', params); - -export const batchSave = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/batchSave', 'POST', params); - -export const importExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/importExcel', 'POST', params); - -export const getShiftScheduleTotal = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/getShiftScheduleTotal', 'POST', params); - -export const exportExcel = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftschedulce/exportExcel', 'POST', params); - -export const init = (params = {}) => Promise.all([getSearchCondition(params), getTabs()]); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/shiftManager.js b/pc4backstage/hrmAttendance/apis/shiftManager.js deleted file mode 100644 index ec269fc..0000000 --- a/pc4backstage/hrmAttendance/apis/shiftManager.js +++ /dev/null @@ -1,33 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getRightMenu = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getRightMenu', 'POST', params); - -export const getTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getTabs', 'POST', params); - -export const getShiftManagementSearchList = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getShiftManagementSearchList', 'POST', params); - -export const getShiftManagementBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getShiftManagementBaseForm', 'POST', params); - -export const saveShiftManagementBaseForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveShiftManagementBaseForm', 'POST', params); - -export const getShiftManagementPersonalizedForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getShiftManagementPersonalizedForm', 'POST', params); - -export const saveShiftManagementPersonalizedForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveShiftManagementPersonalizedForm', 'POST', params); - -export const delShiftManagementForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/delShiftManagementForm', 'POST', params); - -export const init = (params = {}) => Promise.all([getRightMenu(), getTabs()]); - -export const getShiftInfo = (params = {}) => Promise.all([getShiftManagementBaseForm(params), getShiftManagementPersonalizedForm(params)]); - -export const getDetachOperatelevel = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getDetachOperatelevel', 'POST', params); - -export const getEmailRemindForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getEmailRemindForm', 'GET', params); - -export const getMessageRemindForm = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/getMessageRemindForm', 'GET', params); - -export const saveEmailRemind = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveEmailRemind', 'POST', params); - -export const saveMessageRemind = (params = {}) => WeaTools.callApi('/api/hrm/kq/shiftManagement/saveMessageRemind', 'POST', params); diff --git a/pc4backstage/hrmAttendance/apis/timeSelection.js b/pc4backstage/hrmAttendance/apis/timeSelection.js deleted file mode 100644 index 1327f38..0000000 --- a/pc4backstage/hrmAttendance/apis/timeSelection.js +++ /dev/null @@ -1,11 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getTimeSelectionForm = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getTimeSelectionForm', 'POST', params); -} - -export const saveTimeSelectionForm = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/saveTimeSelectionForm', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/travelRule.js b/pc4backstage/hrmAttendance/apis/travelRule.js deleted file mode 100644 index 28e8fd9..0000000 --- a/pc4backstage/hrmAttendance/apis/travelRule.js +++ /dev/null @@ -1,19 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/travelrules/getHasRight', 'GET', params); -} - -export const getMenus = (params) => { - return WeaTools.callApi('/api/kq/travelrules/getRightMenu', 'GET', params); -} - -export const getTravelRulesForm = (params) => { - return WeaTools.callApi('/api/kq/travelrules/getTravelRulesForm', 'GET', params); -} - -export const saveTravelRules = (params) => { - return WeaTools.callApi('/api/kq/travelrules/saveTravelRules', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/upgrade.js b/pc4backstage/hrmAttendance/apis/upgrade.js deleted file mode 100644 index 54bb2ce..0000000 --- a/pc4backstage/hrmAttendance/apis/upgrade.js +++ /dev/null @@ -1,13 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getTreeTabs = (params = {}) => WeaTools.callApi('/api/hrm/kq/upgrade/getTreeTabs', 'POST', params); - -export const getUpgradeInfo = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/get${params.type}`, 'POST', params); - -export const doUpgrade = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/do${params.type}`, 'POST', params); - -export const getUpgrade12Data = (params = {}) => WeaTools.callApi(`/api/hrm/kq/upgrade/getUpgrade12Data`, 'POST', params); - -export const init = (params = {}) => Promise.all([getTreeTabs(), getUpgradeInfo({type: 'Upgrade1'})]); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/vacationBalance.js b/pc4backstage/hrmAttendance/apis/vacationBalance.js deleted file mode 100644 index fc25231..0000000 --- a/pc4backstage/hrmAttendance/apis/vacationBalance.js +++ /dev/null @@ -1,35 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getHasRight', 'GET', params); -} - -export const getMenus = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getRightMenu', 'GET', params); -} - -export const getTabs = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getTabs', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getSearchList', 'GET', params); -} - -export const saveBalanceOfLeave = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/saveBalanceOfLeave', 'POST', params); -} - -export const batchProcessing = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/batchProcessing', 'POST', params); -} - -export const hasLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/hasLeaveRules', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/vacationRemain.js b/pc4backstage/hrmAttendance/apis/vacationRemain.js deleted file mode 100644 index e6b6391..0000000 --- a/pc4backstage/hrmAttendance/apis/vacationRemain.js +++ /dev/null @@ -1,51 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getRightMenu', 'GET', params); -} - -export const getTabs = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getTabs', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/getSearchList', 'POST', params); -} - -export const saveBalanceOfLeave = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/saveBalanceOfLeave', 'POST', params); -} - -export const batchProcessing = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/batchProcessing', 'POST', params); -} - -export const hasLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/balanceofleave/hasLeaveRules', 'POST', params); -} - -export const getDetailSearchList = (params) => { - return WeaTools.callApi('/api/kq/balancedetail/getSearchList', 'GET', params); -} - -export const getDetailBalanceForm = (params) => { - return WeaTools.callApi('/api/kq/balancedetail/getBalanceForm', 'GET', params); -} - -export const editBalance = (params) => { - return WeaTools.callApi('/api/kq/balancedetail/editBalance', 'POST', params); -} - -export const deleteBalance = (params) => { - return WeaTools.callApi('/api/kq/balancedetail/deleteBalance', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/vacationRule.js b/pc4backstage/hrmAttendance/apis/vacationRule.js deleted file mode 100644 index 318e90c..0000000 --- a/pc4backstage/hrmAttendance/apis/vacationRule.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getRightMenu', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getSearchList', 'GET', params); -} - -export const getLeaveRulesForm = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getLeaveRulesForm', 'GET', params); -} - -export const addLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/addLeaveRules', 'POST', params); -} - -export const editLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/editLeaveRules', 'POST', params); -} - -export const deleteLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leaverules/deleteLeaveRules', 'POST', params); -} - -export const getUnitName = (params) => { - return WeaTools.callApi('/api/kq/leaverules/getUnitName', 'GET', params); -} - -export const isNameRepeat = (params) => { - return WeaTools.callApi('/api/kq/leaverules/isNameRepeat', 'GET', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/vacationType.js b/pc4backstage/hrmAttendance/apis/vacationType.js deleted file mode 100644 index aa8c242..0000000 --- a/pc4backstage/hrmAttendance/apis/vacationType.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - WeaTools -} from 'ecCom' - -export const getHasRight = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getHasRight', 'GET', params); -} - -export const getRightMenu = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getRightMenu', 'GET', params); -} - -export const getSearchCondition = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getSearchCondition', 'GET', params); -} - -export const getSearchList = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getSearchList', 'GET', params); -} - -export const getLeaveTypesForm = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/getLeaveTypesForm', 'GET', params); -} - -export const addLeaveTypes = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/addLeaveTypes', 'POST', params); -} - -export const editLeaveTypes = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/editLeaveTypes', 'POST', params); -} - -export const deleteLeaveTypes = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/deleteLeaveTypes', 'POST', params); -} - -export const isNameRepeat = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/isNameRepeat', 'GET', params); -} - -export const saveDisableLeaveRules = (params) => { - return WeaTools.callApi('/api/kq/leavetypes/saveDisableLeaveTypes', 'POST', params); -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/apis/workflow.js b/pc4backstage/hrmAttendance/apis/workflow.js deleted file mode 100644 index 5b9007c..0000000 --- a/pc4backstage/hrmAttendance/apis/workflow.js +++ /dev/null @@ -1,45 +0,0 @@ -import { - WeaTools -} from 'ecCom'; - - -export const getFormInfo = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowForm`, 'POST', params) - -export const getFormInfoByWorkflow = (params = {}) => WeaTools.callApi('/api/hrm/stateset/getFormInfo', 'POST', params) - -export const getCondition = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetListSearchCondition`, 'GET', params) - -export const multiRemove = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/statechange/getPermissionToAdjustList`, 'POST', params) - -export const getWorkflowList = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetListSearchList`, 'POST', params) - -export const saveWf = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetFlow`, 'POST', params) - -export const getTab = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetTabInfo`, 'POST', params) - -export const createForm = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetCreateForm`, 'POST', params) - -export const getField = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowWfFields`, 'POST', params) - -export const saveField = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetFlowWfFields`, 'POST', params) - -export const getActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowWfSet`, 'POST', params) - -export const saveActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcSetFlowWfSet`, 'POST', params) - -export const changeStatus = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/changeStateProcSetStatus`, 'POST', params) - -export const removeWf = (urlParams, params = {}) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/delStateProcSet`, 'POST', params) - -export const initModuleData = (urlParams, params) => Promise.all([getFormInfo(urlParams), getCondition(urlParams)]) - -export const getProcSetTemplet = (urlParams, params) => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getProcSetTemplet`, 'POST', params) - -export const getStateProcSetFlowCheckRuleList = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getStateProcSetFlowCheckRuleList`, 'POST', params) - -export const saveStateProcCheckRule = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/saveStateProcCheckRule`, 'POST', params) - -export const delStateProcCheckRule = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/delStateProcCheckRule`, 'POST', params) - -export const getProcSetCheckRule = params => WeaTools.callApi(`/api/kq/wfSetting/statesShedule/getProcSetCheckRule`, 'POST', params) - diff --git a/pc4backstage/hrmAttendance/components/Home.js b/pc4backstage/hrmAttendance/components/Home.js deleted file mode 100644 index e60bad6..0000000 --- a/pc4backstage/hrmAttendance/components/Home.js +++ /dev/null @@ -1,82 +0,0 @@ -import { - WeaPopoverHrm, - WeaLocaleProvider, - WeaTools -} from 'ecCom'; -import { - WeaLogView -} from 'comsMobx'; -import { - isEnableMultiLang -} from '../apis/common'; -import loadjs from 'loadjs'; -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: '', - // comsLoaded: false - } - 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' - } - }); - // loadjs.isDefined('hrmComs') ? loadjs.ready('hrmComs', () => this.setState({comsLoaded: true})) : loadjs(["/spa/hrm/static4coms/hrmComs.js", "/spa/hrm/static4coms/hrmComs.css"], 'hrmComs', () => this.setState({comsLoaded: true})); - } - - setLogViewProps = (props) => { - this.setState({ - key: new Date().getTime(), - targetId: '', - visible: true, - logType: '4', - logStore: new LogStore(), - ...props - }); - } - onCancel = () => { - this.setState({ - visible: false - }) - } - render() { - return ( -
- - - - {/* {this.state.comsLoaded && this.props.children} */} - {this.props.children} - -
- ) - } -} - -export default Home \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/applicationSettings/index.js b/pc4backstage/hrmAttendance/components/applicationSettings/index.js deleted file mode 100644 index 732521b..0000000 --- a/pc4backstage/hrmAttendance/components/applicationSettings/index.js +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - Authority, - Top, - MagicForm, -} from '../../public/valhalla/components/index.js'; -import '../../style/applicationSettings.less'; - -@inject('applicationSettingsStore') -@observer -export default class ApplicationSettings extends React.Component { - componentWillMount() { - this.props.applicationSettingsStore.preMount(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - componentDidMount() { - this.init(); - } - - init = () => { - const { - applicationSettingsStore - } = this.props, { - init - } = applicationSettingsStore; - - init(); - } - - render() { - const { - applicationSettingsStore - } = this.props, { - authorityStore, - topStore, - formStore, - } = applicationSettingsStore; - - return ( -
- - -
- -
-
-
-
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Dialog.js b/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Dialog.js deleted file mode 100644 index ab0a035..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Dialog.js +++ /dev/null @@ -1,61 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog -} from 'ecCom'; -import { - MagicForm -} from '../../public/sweet-form.js'; -import { - Loading, -} from '../../public/learn'; - -@inject('hrmAttendanceRpSharingSetting') -@observer -class Dialog extends React.Component { - constructor(props) { - super(props); - } - - getContent = () => { - const { - formConfig, - formElements, - } = this.props.hrmAttendanceRpSharingSetting, { - form, - loading, - } = formElements; - - if (loading) { - return - } else { - return ( - - ) - } - } - - render() { - const { - dialog, - dialogProps, - } = this.props.hrmAttendanceRpSharingSetting; - - return ( - - {this.getContent()} - - ); - } -} - -export default Dialog; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Tab.js b/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Tab.js deleted file mode 100644 index 9437336..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Tab.js +++ /dev/null @@ -1,49 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTab -} from 'ecCom'; - -import { - SearchForm -} from '../../public/sweet-form.js'; - -@inject('hrmAttendanceRpSharingSetting') -@observer -class Tab extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.hrmAttendanceRpSharingSetting.getSearchCondition(); - } - - render() { - const { - tabProps, - tab, - search, - } = this.props.hrmAttendanceRpSharingSetting, { - form - } = search; - - return ( - { - if (e.keyCode == 13 && e.target.tagName === "INPUT") { - this.props.hrmAttendanceRpSharingSetting.handleSearch() - } - } } - >{}} - /> - ); -} -} - -export default Tab; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Table.js b/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Table.js deleted file mode 100644 index 9630192..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Table.js +++ /dev/null @@ -1,33 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTableNew -} from 'comsMobx'; -const WeaTable = WeaTableNew.WeaTable; - -@inject('hrmAttendanceRpSharingSetting') -@observer -class Table extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.hrmAttendanceRpSharingSetting.getSearchList(); - } - - render() { - const { - table, - tableProps - } = this.props.hrmAttendanceRpSharingSetting; - - return ( - - ); - } -} - -export default Table; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Top.js b/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Top.js deleted file mode 100644 index 37a0ebc..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/Top.js +++ /dev/null @@ -1,49 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaRightMenu, -} from 'ecCom'; - -import Tab from './Tab'; -import Table from './Table'; - -@inject('hrmAttendanceRpSharingSetting') -@observer -class Top extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.hrmAttendanceRpSharingSetting.getRightMenu(); - } - - render() { - const { - topProps, - toploading, - topButtons, - dropMenuDatas, - } = this.props.hrmAttendanceRpSharingSetting; - - return ( - - - - - - - ); - } - -} - -export default Top; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/index.js b/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/index.js deleted file mode 100644 index 1a5da09..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceReportSharingSetting/index.js +++ /dev/null @@ -1,56 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; - -import Top from './Top'; -import Dialog from './Dialog'; - -@inject('hrmAttendanceRpSharingSetting') -@observer -export default class AttendanceRpSharingSetting extends React.Component { - constructor(props) { - super(props); - } - - componentWillMount() { - this.props.hrmAttendanceRpSharingSetting.reset(); - } - - componentDidMount() { - this.props.hrmAttendanceRpSharingSetting.getPermissionInfo(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.props.hrmAttendanceRpSharingSetting.refresh(); - } - } - - render() { - const { - hrmAttendanceRpSharingSetting, - } = this.props, { - pageAccessPermission - } = hrmAttendanceRpSharingSetting, { - hasRight, - loading - } = pageAccessPermission; - - if (!hasRight) { - return loading ? : - } else { - return ( -
- - -
- ) - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/attendanceSyncSetting/FieldSetting.js b/pc4backstage/hrmAttendance/components/attendanceSyncSetting/FieldSetting.js deleted file mode 100644 index 6432712..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceSyncSetting/FieldSetting.js +++ /dev/null @@ -1,41 +0,0 @@ -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/hrmAttendance/components/attendanceSyncSetting/FieldSettingExplain.js b/pc4backstage/hrmAttendance/components/attendanceSyncSetting/FieldSettingExplain.js deleted file mode 100644 index d3af392..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceSyncSetting/FieldSettingExplain.js +++ /dev/null @@ -1,45 +0,0 @@ -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/hrmAttendance/components/attendanceSyncSetting/SyncSetting.js b/pc4backstage/hrmAttendance/components/attendanceSyncSetting/SyncSetting.js deleted file mode 100644 index 6a78e85..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceSyncSetting/SyncSetting.js +++ /dev/null @@ -1,84 +0,0 @@ -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/hrmAttendance/components/attendanceSyncSetting/index.js b/pc4backstage/hrmAttendance/components/attendanceSyncSetting/index.js deleted file mode 100644 index 0f99418..0000000 --- a/pc4backstage/hrmAttendance/components/attendanceSyncSetting/index.js +++ /dev/null @@ -1,99 +0,0 @@ -import '../../style/attendanceSynSetting.less'; -import React, { - Component -} from 'react'; -import { - inject, - observer -} from 'mobx-react'; -import {Spin} from 'antd'; -import { - WeaTop, - WeaAlertPage, - WeaRightMenu, - WeaLocaleProvider -} from 'ecCom'; -import SyncSetting from './SyncSetting'; -import FieldSetting from './FieldSetting'; -import FieldSettingExplain from './FieldSettingExplain'; -const getLabel = WeaLocaleProvider.getLabel; -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/hrmAttendance/components/groupSetting/AddToGroup.js b/pc4backstage/hrmAttendance/components/groupSetting/AddToGroup.js deleted file mode 100644 index 02e5029..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/AddToGroup.js +++ /dev/null @@ -1,52 +0,0 @@ -import React, { Component } from 'react' -import {observer} from 'mobx-react'; -import {toJS} from 'mobx'; -import {WeaDialog,WeaFormItem, WeaSearchGroup, WeaLocaleProvider} from 'ecCom'; -import {WeaSwitch} from 'comsMobx'; -const getLabel = WeaLocaleProvider.getLabel; - - -@observer -export default class AddToGroup extends Component { - - getContent (condition) { - const {store} = this.props; - const {addToGroupForm, chooseGroup} = store; - - const {isFormInit} = addToGroupForm; - let group = []; - isFormInit && toJS(condition).map((c, i) =>{ - let items = []; - c.items.map((field, index) => { - items.push({ - com:( - chooseGroup (data)} title='选择考勤组' /> - ), - }) - }); - group.push() - }); - return group; - } - - - render() { - const {store} = this.props; - const {addToGroupCondition,addDialogParams,buttons} = store; - return ( -
- - { - this.getContent(addToGroupCondition) - } - -
- ) - } -} diff --git a/pc4backstage/hrmAttendance/components/groupSetting/Content.js b/pc4backstage/hrmAttendance/components/groupSetting/Content.js deleted file mode 100644 index 4b8437a..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/Content.js +++ /dev/null @@ -1,68 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaRightMenu} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import classnames from 'classnames'; -import findIndex from 'lodash/findIndex'; -const { - WeaTable -} = WeaTableNew; - -@observer -export default class Content extends Component{ - doEdit = id => this.props.store.doEdit(id, '1'); - - doEditBase = this.doEdit; - - doEditKQType = id => this.props.store.doEdit(id, '2'); - - doEditKQMember = id => this.props.store.doEdit(id, '3'); - - doEditSchedule = (id, record) => this.props.store.doEditSchedule(record); - - doDelete = id => this.props.store.doDelete({ids: id}); - - showLog = id => this.props.store.showLog({logSmallType: this.props.store.logTypeDef.HRM_ENGINE_KQGROUP, targetId: 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, record); - } - - renderCol = (cols) => { - ['groupname'].map(key => { - const idx = findIndex(cols, item => item.dataIndex === key); - idx != -1 && (cols[idx].render = (text, record) => { - return this.doEdit(record.id)} dangerouslySetInnerHTML={{__html:record[`${key}span`]}}> - }); - }) - - } - - render(){ - const { - store - } = this.props; - const className = classnames({ - ['tabPane']: true, - ['tabPane-include']: store.containerInitFinished.detachable - }) - - return ( -
- - this.onOperatesClick(record, index, operate)} - getColumns={cols => this.renderCol(cols)} - /> - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/Edit.js b/pc4backstage/hrmAttendance/components/groupSetting/Edit.js deleted file mode 100644 index e2e8db7..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/Edit.js +++ /dev/null @@ -1,59 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog} from 'ecCom'; -import {Button} from 'antd'; -import {i18n} from '../../public/i18n'; -import Info from './Info'; -import BaseInfo from './info/BaseInfo'; - -@observer -export default class Edit extends Component{ - constructor(props){ - super(props); - this.state = { - height: 0 - } - } - render(){ - const {height} = this.state; - const { - store - } = this.props; - const { - dialogParams, - save, - canAdd, - } = store; - const generateDialogParams = () =>{ - const props = {...dialogParams}; - let buttons = canAdd ? [] : []; - if(dialogParams.opType === 'create' && canAdd){ - buttons.push() - } - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)}, - // key: new Date().getTime() - }) - return props; - } - - const getContent = () => { - if(dialogParams.opType == 'create'){ - return ( - - ); - }else{ - return ( - - ); - } - } - - return ( - this.setState({height: h})}> - {getContent()} - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/GroupInfo4Coms.js b/pc4backstage/hrmAttendance/components/groupSetting/GroupInfo4Coms.js deleted file mode 100644 index 475b9bc..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/GroupInfo4Coms.js +++ /dev/null @@ -1,68 +0,0 @@ -import '../../style/groupSetting.less'; -import React, {Component} from 'react'; -import {inject,observer} from 'mobx-react'; -import {WeaTop, WeaAlertPage, WeaDialogFooter} from 'ecCom'; -import {i18n} from '../../public/i18n'; -import Info from './Info'; - -@inject('hrmGroupSetting') -@observer -export default class GroupInfo4Coms extends Component{ - constructor(props) { - super(props); - } - - componentDidMount() { - this.init(); - } - - componentWillReceiveProps(nextProps) { - this.init(); - } - - init = () => { - const { - hrmGroupSetting: store, - groupId, - callback - } = this.props; - store.checkAuthorized('kq/group', null, () => store.initSingle(groupId, callback)); - } - - render(){ - const { - hrmGroupSetting: store - } = this.props; - const { - containerInitFinished, - dialogFootButtons, - } = store; - let title = i18n.label['389064'](); - const {buttons, menus} = dialogFootButtons; - - let children = [ - ( -
-
- -
- -
- ) - ] - - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && children - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/GroupSearch.js b/pc4backstage/hrmAttendance/components/groupSetting/GroupSearch.js deleted file mode 100644 index 19ef508..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/GroupSearch.js +++ /dev/null @@ -1,75 +0,0 @@ -import React, { Component } from 'react' -import {toJS} from 'mobx' -import {observer} from 'mobx-react'; -import {WeaRadioGroup, WeaTable} from 'ecCom' -import {Spin} from 'antd' -import AddToGroup from './AddToGroup'; -import classnames from 'classnames'; -import { - i18n -} from '../../public/i18n'; -import SearchRadio from './SearchRadio' - - -@observer -export default class GroupSearch extends Component { - - constructor(props) { - super(props); - } - componentDidMount () { - const { - store - } = this.props; - const { - initData, - } = store; - initData(); - } - - render() { - const {store} = this.props; - const { searchColumns, searchDatas, tableProps, total, pageIndex, pageSize , getPagenitionParams, tableChange} = store; - const pagination = { - total, - current: pageIndex, - pageSize: pageSize, - showQuickJumper: true, - pageSizeOptions: [10, 20, 50, 100], - showSizeChanger: true, - showTotal: (total) => { - return `${i18n.label['18609']()} ${total} ${i18n.label['30690']()}`; - }, - onShowSizeChange:(current, pageSize)=>{ - getPagenitionParams(1, pageSize) - }, - onChange:(current) => { - getPagenitionParams(current) - }, - } - - const className = classnames({ - ['tabPane']: true, - ['tabPane-include']: store.containerInitFinished.detachable - }) - const h = $('#wrap').height() - $('#group').height() - 44 - 90; - return ( -
-
- -
- record.id} - onChange = {(pagination, filters, sorter) => tableChange(pagination, filters, sorter)} - {...tableProps} - /> - -
- ) - } -} diff --git a/pc4backstage/hrmAttendance/components/groupSetting/Info.js b/pc4backstage/hrmAttendance/components/groupSetting/Info.js deleted file mode 100644 index 4f927e7..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/Info.js +++ /dev/null @@ -1,49 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import BaseInfo from './info/BaseInfo'; -import AttendanceType from './info/AttendanceType'; -import Member from './info/Member'; -// import {Tabs} from 'weaHrmComsPublic'; -import {Tabs} from '../../../hrmComsPublic/index'; - -@observer -export default class Info extends Component{ - render(){ - // const {Tabs} = window.weaHrmComsPublic; - const { - store - } = this.props; - const { - editTabConfig, - formTarget, - refreshTab, - } = store; - const tabConfig = store.toJS(editTabConfig); - const { - btns, - menus, - tabBtnDef - } = store.btnsAndMenus(tabConfig); - const {memberConditionForm: form, memberConditionFormFields: fields} = formTarget; - const tabProps = { - tabConfig: tabConfig, - tabChangeHandle: tabConfig.tabChangeHandle, - activeTabInfo: { - activeTabKey: tabConfig.activeTabKey, - activeTabIndex: store.getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) - }, - store: store, - tabBtnDef: tabBtnDef, - conditionForm: form, - conditionFormFields: fields, - } - - return ( - - - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/InfoSingle.js b/pc4backstage/hrmAttendance/components/groupSetting/InfoSingle.js deleted file mode 100644 index 5603342..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/InfoSingle.js +++ /dev/null @@ -1,94 +0,0 @@ -import '../../style/groupSetting.less'; -import React, {Component} from 'react'; -import {inject,observer} from 'mobx-react'; -import {WeaTop, WeaAlertPage, WeaDialogFooter} from 'ecCom'; -import {i18n} from '../../public/i18n'; -import Info from './Info'; - -@inject('hrmGroupSetting') -@observer -export default class GroupInfoSingle extends Component{ - constructor(props) { - super(props); - } - - componentDidMount() { - this.init(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - init = () => { - const { - hrmGroupSetting: store, - params, - groupId, - callback - } = this.props; - const {id} = params; - store.checkAuthorized('kq/group', null, () => store.initSingle(groupId || id, callback), null, true); - } - - render(){ - const { - hrmGroupSetting: store, - location - } = this.props; - const { - single - } = location.query; - const { - containerInitFinished, - getTopProps, - } = store; - let title = i18n.label['389064'](); - const {buttons, menus} = getTopProps(true); - const topProps = { - title, - icon: , - iconBgcolor: '#217346', - showDropIcon: true, - buttons: buttons, - dropMenuDatas: menus - } - - let children = []; - if(single === '1') - children.push( - ( - -
- -
-
- ) - ); - else - children.push( - ( -
- - -
- ) - ) - - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && children - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/Map.js b/pc4backstage/hrmAttendance/components/groupSetting/Map.js deleted file mode 100644 index b387e4c..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/Map.js +++ /dev/null @@ -1,183 +0,0 @@ -import React, { Component } from "react"; -import {observer} from 'mobx-react'; -import {Row, Col} from 'antd'; -import { WeaLocaleProvider, WeaMap, WeaInput, WeaFormItem, WeaCheckbox, WeaInputNumber, WeaError } from "ecCom"; -import has from 'lodash/has'; -const getLabel = WeaLocaleProvider.getLabel; -import {i18n} from '../../public/i18n'; - -let map, geolocation, geocoder; - -@observer -export default class Map extends Component { - constructor(props) { - super(props); - this.state = { - date: new Date().getTime() - }; - } - - onMapClickHandle = params => { - const {store: {onPositionSelected}} = this.props; - const {info, location} = params; - const {name, address} = info; - const data = { - locationname: name, - address: address, - longitude: location[0], - latitude: location[1] - } - onPositionSelected && onPositionSelected(data); - // this.setState({selectedPosition: data}); - } - - onSelectHandle = params => { - const {store: {onPositionSelected}} = this.props; - let locationname = '', address = '', longitude = '', latitude = ''; - locationname = params.name; - address = params.address; - const latlng = params.location.split(','); - longitude = latlng[0]; - latitude = latlng[1]; - const data = {locationname,address,longitude,latitude} - onPositionSelected && onPositionSelected(data); - // this.setState({selectedPosition: data}); - } - - onMapSwitchHandle = type => { - } - - setMapRef = map => this.map = map; - - onChangeHandle = (k, v) => { - const {store} = this.props; - const {setRangeParam, rangeParams} = store; - setRangeParam(k, v); - } - - gaodeRegeoCallback = (result, info) => { - const {info: rsInfo = '', status} = result || {}; - const {name = '', address = ''} = info || {}; - if(rsInfo.toLowerCase() == 'ok' && status == '1'){ - this.props.store.setRangeParam('address', address); - } - } - - googleRegeoCallback = (result, info) => { - const {name = '', address = ''} = info || {}; - address != '' && this.props.store.setRangeParam('address', address); - } - - render() { - const {store} = this.props; - const {rangeParams} = store; - const mapProps = {showGeolocation: true} - - const {longitude, latitude} = rangeParams; - if(/^(\-)?\d+(\.\d+)?$/.test(longitude) && /^(\-)?\d+(\.\d+)?$/.test(latitude)){ - Object.assign(mapProps,{position: [rangeParams.longitude, rangeParams.latitude]}); - } - return ( -
-
- -
-
- -
- store.setMapInfoError('locationname', d)} - error={`"${getLabel('388717','考勤地址')}" ${i18n.message.dataEmpty()}`}> - - - - this.onChangeHandle('locationname', v)} /> - - - - - - - -
-
- this.onChangeHandle('checkscope', v || 500)} /> -
-
{getLabel('515796','不设置默认为500米')}
-
-
- - - -
- -
{rangeParams.address}
-
- -
- - store.setMapInfoError('longitude', d)} - error={`"${getLabel('801','经度')}" ${i18n.message.dataEmpty()}`} - > - - this.onChangeHandle('longitude', v)}/> - - - - - store.setMapInfoError('latitude', d)} - error={`"${getLabel('802','纬度')}" ${i18n.message.dataEmpty()}`} - > - - this.onChangeHandle('latitude', v)}/> - - - - - - - - ); - } -} diff --git a/pc4backstage/hrmAttendance/components/groupSetting/SearchRadio.js b/pc4backstage/hrmAttendance/components/groupSetting/SearchRadio.js deleted file mode 100644 index c2131f8..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/SearchRadio.js +++ /dev/null @@ -1,18 +0,0 @@ -import React, { Component } from 'react' -import {WeaRadioGroup} from 'ecCom' -import {toJS} from 'mobx' -import {observer} from 'mobx-react'; - - -@observer -export default class SearchRadio extends Component { - render() { - const {store} = this.props; - const {config, radioChange} = store; - return ( -
- radioChange(data)} border style={{margin:'20px 10px'}}/> -
- ) - } -} diff --git a/pc4backstage/hrmAttendance/components/groupSetting/illustrateDialog.js b/pc4backstage/hrmAttendance/components/groupSetting/illustrateDialog.js deleted file mode 100644 index 306736c..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/illustrateDialog.js +++ /dev/null @@ -1,64 +0,0 @@ -import React, { Component } from "react"; -import { WeaDialog, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup } from "ecCom"; -import { inject, observer } from 'mobx-react'; -import { Button } from "antd"; -// import img1URL from '../../../../../hrm/hrm_e9/image/addattendancegroup1.png'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmGroupSetting') -@observer -export default class Illdialog extends Component { - constructor(props) { - super(props); - } - render () { - const { hrmGroupSetting } = this.props; - return ( -
- nih} - > -
-
-
{getLabel('529755', '打卡时间累加计算说明')}
-

{getLabel('529756', '1.弹性工时制设置考勤开始时间为7:00,工作时长设置为8小时;')}

-

{getLabel('529757', '2.假设当天打卡5次,打卡时间点分别为:9:00、12:00 、14:00 、16:00、18:00.')}

-

{getLabel('529758', '3.打卡时间累加计算是按照打卡时间一直累加进行计算工作时长,本质上是按照【最晚打卡时间 - 最早打卡时间】计算工作时长 。如下图所示:')}

-
- {getLabel('529759', '图例说明')} - {getLabel('16039', '考勤开始时间')} - {getLabel('529760', '有效工作时长')} -
-
-
-
-
{getLabel('529761', '打卡时间成对计算说明')}
-

{getLabel('529756', '1.弹性工时制设置考勤开始时间为7:00,工作时长设置为8小时;')}

-

{getLabel('529757', '2.假设当天打卡5次,打卡时间点分别为:9:00、12:00 、14:00 、16:00、18:00.')}

-

{getLabel('529762', '3.打卡时间成对计算即按照【签退-签到】成对进行工作时长的计算,此方式的好处是可以过滤掉午休、晚休时段不计算工作时长 。如下图所示:')}

-
- {getLabel('529759', '图例说明')} - {getLabel('16039', '考勤开始时间')} - {getLabel('529760', '有效工作时长')} - {getLabel('388417', '休息时间')} - {getLabel('529763', '无效工作时长')} -
-
-
-
-
- -
-
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/index.js b/pc4backstage/hrmAttendance/components/groupSetting/index.js deleted file mode 100644 index 0ff321f..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/index.js +++ /dev/null @@ -1,127 +0,0 @@ -import '../../style/groupSetting.less'; -import React, { Component } from 'react'; -import { inject, observer } from 'mobx-react'; -import { WeaTop, WeaAlertPage, WeaLeftRightLayout, WeaTab, WeaLocaleProvider } from 'ecCom'; -import { i18n } from '../../public/i18n'; -import { Spin } from 'antd' -import Content from './Content'; -import GroupSearch from './GroupSearch'; -// import {Tabs, OrganizationTree} from 'weaHrmComsPublic'; -import { Tabs, OrganizationTree } from '../../../hrmComsPublic/index'; -import IllustrateDialog from './illustrateDialog' -import Edit from './Edit'; -const getLabel = WeaLocaleProvider.getLabel; - - -@inject('hrmGroupSetting') -@observer -export default class ShiftManager 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 { - hrmGroupSetting: store - } = this.props; - store.checkAuthorized('kq/group', null, store.init, null, true); - } - - render () { - // const {Tabs, OrganizationTree} = window.weaHrmComsPublic; - const { - hrmGroupSetting: store - } = this.props; - const { - containerInitFinished, - selectedSubCompany, - orgTreeProps, - getTopProps, - mainTabConfig, - formTarget, - tableMultiDelete, - tabChangeHandle, - mainActiveTabKey, - getRowKey, - loading, - canAdd, - canCreate, - canDel - } = store; - let title = getLabel('500388', '考勤组管理'); - if (selectedSubCompany != null && selectedSubCompany.name) - title = `${title} - ${selectedSubCompany.name}`; - const { buttons, menus } = getTopProps(); - const { conditionForm: form, conditionFormFields: fields } = formTarget; - const topProps = { - title, - icon: , - iconBgcolor: '#217346', - showDropIcon: true, - buttons: buttons, - dropMenuDatas: menus - } - const tabProps = { - tabConfig: mainTabConfig, - activeTabInfo: { - activeTabKey: mainTabConfig.activeTabKey, - activeTabIndex: store.getTabIndex(mainTabConfig.tabs, mainTabConfig.activeTabKey) - }, - rightMenu: menus, - store: store, - conditionForm: form, - conditionFormFields: fields, - tabChangeHandle: tabChangeHandle - } - - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && - - - { - containerInitFinished.detachable - ? - } - leftWidth={310} - > - - - - - - - : - - - - - } - - - - - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/info/AttendanceType.js b/pc4backstage/hrmAttendance/components/groupSetting/info/AttendanceType.js deleted file mode 100644 index 678bd74..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/info/AttendanceType.js +++ /dev/null @@ -1,54 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaNewScroll} from 'ecCom'; -import classnames from 'classnames'; -import LocationEdit from './LocationEdit'; -import WifiEdit from './WifiEdit'; -// import {FormInfo} from 'weaHrmComsPublic'; -import {FormInfo} from '../../../../hrmComsPublic/index'; - -@observer -export default class AttendanceType extends Component{ - render(){ - // const {FormInfo} = window.weaHrmComsPublic; - const { - store - } = this.props; - const { - formTarget, - custLabelCol, - itemRender, - childrenComponents, - refreshTab, - locationTableMultiDelete, - wifiTableMultiDelete - } = store; - const { - kqTypeForm: form, - kqTypeFormFields: fields - } = formTarget; - const className = classnames({ - ['tabPane']: true, - ['tabPane-dialog']: true, - }) - - return ( -
- - -
-
-
- - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/info/BaseInfo.js b/pc4backstage/hrmAttendance/components/groupSetting/info/BaseInfo.js deleted file mode 100644 index 1d11974..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/info/BaseInfo.js +++ /dev/null @@ -1,52 +0,0 @@ -import classnames from 'classnames'; -import { WeaNewScroll } from 'ecCom'; -import { observer } from 'mobx-react'; -import React, { Component } from 'react'; -import SerialSetting from './SerialSetting'; -// import {FormInfo} from 'weaHrmComsPublic'; -import {FormInfo} from '../../../../hrmComsPublic/index'; - -@observer -export default class BaseInfo extends Component{ - render(){ - // const {FormInfo} = window.weaHrmComsPublic; - const { - store, - tabContent - } = this.props; - const { - formTarget, - custLabelCol, - itemRender, - childrenComponents, - workdaySettingData, - bChange - // refreshTab - } = store; - const { - baseForm: form, - baseFormFields: fields - } = formTarget; - const className = classnames({ - ['tabPane']: tabContent || false, - ['tabPane-dialog']: tabContent || false, - ['dCom']: !(tabContent || false) - }) - - return ( -
- - - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/info/LocationEdit.js b/pc4backstage/hrmAttendance/components/groupSetting/info/LocationEdit.js deleted file mode 100644 index 07415cc..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/info/LocationEdit.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * @Author: sunjun - * @Date: 2020-08-07 15:01:37 - * @LastEditTime: 2020-11-18 09:00:06 - * @LastEditors: Please set LastEditors - * @Description: In User Settings Edit - * @FilePath: /hrmAttendance/components/groupSetting/info/LocationEdit.js - */ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog} from 'ecCom'; -import {Button} from 'antd'; -import {i18n} from '../../../public/i18n'; -import Map from '../Map'; - -@observer -export default class WifiEdit extends Component{ - onScale = (evt, state) => { - } - - onChangeHeight = height => { - // 高度变化回调 - }; - - render(){ - const { - store - } = this.props; - const {locationDialogParams, formTarget} = store; - const { - locationForm: form, - locationFormFields: fields - } = formTarget; - const generateDialogParams = () =>{ - const props = {...locationDialogParams}; - let buttons = []; - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)}, - scalable: true, - onScale: this.onScale, - onChangeHeight: this.onChangeHeight - // key: new Date().getTime() - }) - return props; - } - - return ( - - { - locationDialogParams.visible && - - } - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/info/Member.js b/pc4backstage/hrmAttendance/components/groupSetting/info/Member.js deleted file mode 100644 index ace3e91..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/info/Member.js +++ /dev/null @@ -1,55 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaAuth} from 'ecCom'; -import classnames from 'classnames'; -import { - WeaTableNew -} from 'comsMobx'; -const { - WeaTable -} = WeaTableNew; - -@observer -export default class Member extends Component{ - doDel = id => this.props.store.deleteMember({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 - } = this.props; - const { - refreshTab, - memberAuthParams - } = store; - const className = classnames({ - ['tabPane']: true, - ['tabPane-dialog']: true - }) - const tableProps = { - scroll: { - y: this.props.height - 130 - } - } - - return ( -
- this.onOperatesClick(record, index, operate)} - /> - { - memberAuthParams.visible && - } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/info/SerialSetting.js b/pc4backstage/hrmAttendance/components/groupSetting/info/SerialSetting.js deleted file mode 100644 index a81de66..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/info/SerialSetting.js +++ /dev/null @@ -1,51 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaNewScroll, WeaDialog} from 'ecCom'; -import {Button} from 'antd'; -import {i18n} from '../../../public/i18n'; -// import {FormInfo} from 'weaHrmComsPublic'; -import {FormInfo} from '../../../../hrmComsPublic/index'; - -@observer -export default class SerialSetting extends Component{ - render(){ - // const {FormInfo} = window.weaHrmComsPublic; - const { - store - } = this.props; - const { - formTarget, - custLabelCol, - itemRender, - childrenComponents, - serialDialogParams - } = store; - const { - shiftSchedulceForm: form, - shiftSchedulceFormFields: fields - } = formTarget; - const generateDialogParams = () =>{ - const props = {...serialDialogParams}; - let buttons = []; - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)}, - // key: new Date().getTime() - }) - return props; - } - - return ( - - - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/info/SerialTableList.js b/pc4backstage/hrmAttendance/components/groupSetting/info/SerialTableList.js deleted file mode 100644 index 465a8d9..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/info/SerialTableList.js +++ /dev/null @@ -1,81 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {Table} from "antd"; -import {WeaLocaleProvider} from 'ecCom'; -import uniq from 'lodash/uniq'; -import find from 'lodash/find'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class SerialTableList extends Component{ - render(){ - const { - store: {toJS, serialTableProps, getShiftCycleForm, deleteSerial, groupShiftOptions} - } = this.props; - let { - columns, - datas, - } = serialTableProps; - columns = columns.map(c => { - if(c.dataIndex == 'serial'){ - return { - ...c, - render: (text, record, index) => { - const {serial} = record; - let arr = serial.split(','); - let coms = []; - uniq(arr).map(key => { - if(key != '-1'){ - const d = find(toJS(groupShiftOptions), {key}); - const showname = (d != null ? d.showname : ''); - coms.push( -
{showname}
- ) - } - }); - return coms; - } - } - }else if(c.dataIndex == 'operate'){ - return { - ...c, - render: (text, record) => { - return ( - - ) - } - } - }else if(c.dataIndex == 'shiftcyclename'){ - return { - ...c, - render: (text, record) => { - return ( -
- {record.shiftcyclename} -
- ) - } - } - }else - return c; - }) - return ( -
-
-
- - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/groupSetting/info/WifiEdit.js b/pc4backstage/hrmAttendance/components/groupSetting/info/WifiEdit.js deleted file mode 100644 index 38fcde6..0000000 --- a/pc4backstage/hrmAttendance/components/groupSetting/info/WifiEdit.js +++ /dev/null @@ -1,54 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaNewScroll, WeaDialog} from 'ecCom'; -import {Button} from 'antd'; -import {i18n} from '../../../public/i18n'; -// import {FormInfo} from 'weaHrmComsPublic'; -import {FormInfo} from '../../../../hrmComsPublic/index'; - -@observer -export default class WifiEdit extends Component{ - render(){ - // const {FormInfo} = window.weaHrmComsPublic; - const { - store - } = this.props; - const { - formTarget, - custLabelCol, - itemRender, - wifiDialogParams - } = store; - const { - wifiForm: form, - wifiFormFields: fields - } = formTarget; - const generateDialogParams = () =>{ - const props = {...wifiDialogParams}; - let buttons = []; - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)}, - // key: new Date().getTime() - }) - return props; - } - - return ( - - { - wifiDialogParams.visible && - - - - } - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayRule/BalanceConversionRules.js b/pc4backstage/hrmAttendance/components/holidayRule/BalanceConversionRules.js deleted file mode 100644 index b854f08..0000000 --- a/pc4backstage/hrmAttendance/components/holidayRule/BalanceConversionRules.js +++ /dev/null @@ -1,325 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaFormItem, - WeaInputNumber, - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('commonStore') -@inject('hrmHolidayRule') -@observer -class BalanceConversionRules extends React.Component { - constructor(props) { - super(props); - } - - handleConversionRulesChange = (index, value) => { - this.props.hrmHolidayRule.changeBalanceConversionRules(index, value); - } - - handleDelClick = () => { - this.props.hrmHolidayRule.delBalanceConversionRule(); - } - - handleAddClick = () => { - this.props.hrmHolidayRule.addBalanceConversionRule(); - } - - handleTimeIntervalChange = (value) => { - this.props.hrmHolidayRule.setTimeInterval(value); - } - - getHeader = (params) => { - const { - distributionMode, - timeInterval - } = params; - - return ( -
- - - - { distributionMode === '2' ? getLabel('505548',"司龄") : getLabel('505549',"工龄")} - {`${getLabel('505550',"区间")} : `} - - - - - {getLabel('505552',"年")} - -
- ) - } - - getBalancePaymentMethods = (params) => { - const { - balanceConversionRules, - distributionMode, - minimumUnit - } = params; - - const balancePaymentMethods = []; - - balanceConversionRules.map((balanceConversionRule, index) => { - const { - timePoint, - amount - } = balanceConversionRule; - - balancePaymentMethods.push( -
- - { distributionMode === '2' ? getLabel('505548',"司龄") : getLabel('505549',"工龄")} - - - {`${index === 0 ? '<' : '≥'}`} - - - {`${[0,1].includes(index) ? 1 : timePoint}${getLabel('505552',"年")} , ` } - - - {getLabel('505551',"享有")} - - - - {`${minimumUnit === '3' ? getLabel('391',"小时") : getLabel('505553',"天")}${getLabel('505554',"假")}`} - - {( (index > 1) && index === (balanceConversionRules.length - 1) ) && - - } -
- ) - }) - - return balancePaymentMethods; - } - - render() { - const { - commonStore, - hrmHolidayRule - } = this.props, { - formElements, - } = commonStore, { - conversionRules, - } = hrmHolidayRule, { - timeInterval, - balanceConversionRules - } = conversionRules, { - form - } = formElements; - - const { - distributionMode, - minimumUnit - } = form.getFormParams(); - - return (
- {this.getHeader({ - distributionMode, - timeInterval - })} - {this.getBalancePaymentMethods({ - balanceConversionRules, - distributionMode, - minimumUnit, - })} - - - {getLabel('505555',"添加规则")} - -
) - } -} - -@inject('commonStore') -@inject('hrmHolidayRule') -@observer -class MixBalanceConversionRulesNew extends React.Component { - constructor(props) { - super(props); - } - - getHeader = () => { - const { - formElements, - } = this.props.commonStore, { - form - } = formElements, { - minimumUnit - } = form.getFormParams(); - - const labels = [getLabel('505549', "工龄"), getLabel('505548', "司龄"), getLabel('505556', "法定年假"), getLabel('505557', "福利年假")]; - - return ( -
- { - labels.map( (label,index) => { - let unit; - if([0,1].includes(index)){ - unit = getLabel('505552',"年"); - }else{ - unit = (minimumUnit === '3') ? getLabel('391',"小时") : getLabel('505553',"天"); - } - return ( -
- - {`${label}(${unit})`} -
- ) - }) - } -
- ) - } - - getBalancePaymentMethods = () => { - const { - conversionRules, - changeEntryTime, - changeWorkYear, - changeLegalAmount, - changeWelfareAmount, - delBalanceConversionRule, - } = this.props.hrmHolidayRule, { - mixBalanceConversionRules - } = conversionRules; - - const balancePaymentMethods = []; - - const ageInputNumber = (params) => { - const { - value, - handleChange - } = params; - - return ( - - - - handleChange(val)} - /> - - - ) - } - - const balanceInputNumber = (params) => { - const { - value, - handleChange - } = params; - - return ( - - handleChange(val)} - /> - - ) - } - - mixBalanceConversionRules.map((mixBalanceConversionRule, outsideIndex) => { - const { - entryTime, - workYear, - legalAmount, - welfareAmount, - } = mixBalanceConversionRule; - - balancePaymentMethods.push( -
- - { - ageInputNumber({ - value: workYear, - handleChange: (val) => changeWorkYear(outsideIndex, val) - }) - } - - - { - ageInputNumber({ - value: entryTime, - handleChange: (val) => changeEntryTime(outsideIndex, val) - }) - } - - - { - balanceInputNumber({ - value: legalAmount, - handleChange: (val) => changeLegalAmount(outsideIndex, val) - }) - } - - - { - balanceInputNumber({ - value: welfareAmount, - handleChange: (val) => changeWelfareAmount(outsideIndex, val) - }) - } - - { - (outsideIndex > 0 && outsideIndex === (mixBalanceConversionRules.length - 1) ) && ( - delBalanceConversionRule({type:'mix'}) }> - - - ) - } - -
- ) - }) - - return balancePaymentMethods - } - - render() { - const { - hrmHolidayRule - } = this.props, { - addBalanceConversionRule - } = hrmHolidayRule; - - return ( -
-
- {this.getHeader()} - {this.getBalancePaymentMethods()} - addBalanceConversionRule({type:'mix'})}> - - - {getLabel('505555',"添加规则")} - - -
-
- ); - } -} - -export { - BalanceConversionRules, - MixBalanceConversionRulesNew, -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayRule/Dialog.js b/pc4backstage/hrmAttendance/components/holidayRule/Dialog.js deleted file mode 100644 index 1aeb63f..0000000 --- a/pc4backstage/hrmAttendance/components/holidayRule/Dialog.js +++ /dev/null @@ -1,323 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog, - WeaFormItem, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import { - MagicForm, -} from '../../public/sweet-form.js'; -import { - Loading, -} from '../../public/learn.js'; -import { - getDialogButtons, - confirmation, -} from '../../util/save-time-util.js'; -import { - BalanceConversionRules, - MixBalanceConversionRulesNew -} from './BalanceConversionRules.js'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('commonStore') -@inject('hrmHolidayRule') -@observer -class Dialog extends React.Component { - constructor(props) { - super(props); - } - - handleCancel = () => { - this.props.commonStore.closeDialog(); - } - - //获取弹框按钮的配置数据 - getBtnConfigDatas = () => { - const { - saveFormDatas, - formElements, - table, - dialog - } = this.props.commonStore, { - loading, - } = formElements, { - index - } = table, { - type - } = dialog; - - const { - syncVacationRules, - isEnable, - confirmBeforeSave, - } = this.props.hrmHolidayRule; - - const name = ['-1', '0'].includes(index) ? getLabel('505564', '保存') : getLabel('19015', "同步"); - - const saveHoliday = (type === 0) ? saveFormDatas : confirmBeforeSave; - - const callBack = ['-1', '0'].includes(index) ? saveHoliday : syncVacationRules; - - const btnDatas = []; - - if (isEnable === '1') { - btnDatas.push({ - name: name, - disabled: loading, - onBtnClick: callBack - }); - } - - return btnDatas; - } - - //获取同一行的表单元素 - getTransverseSiblingComponents = (params) => { - const { - items, - form - } = params; - - //当没有表单元素传入时,直接返回 - if (!items) return - - let extendedDays, expirationDay; - - items.map((item, index) => { - const { - domkey - } = item; - - if (domkey[0] === 'extendedDays') { - //当【允许延长有效期】开关关闭时,什么也不返回 - const extensionEnableValue = form.getFormParams().extensionEnable; - - if (!parseInt(extensionEnableValue)) return; - - //同一行的第二个表单元素 - extendedDays = ( - -
- -
- {`${getLabel('505553',"天")}${getLabel('505559',"内")}${getLabel('505560',"可继续使用")}`} -
- ) - } - - if (domkey[0] === 'expirationDay') { - expirationDay = ( -
- -
- ) - } - }); - - const transverseSiblingComponents = { - 'extensionEnable': extendedDays, - 'expirationMonth': expirationDay - }; - - return transverseSiblingComponents; - } - - //【余额发放方式】开关联动自定义组件 - getCustomizedComponent = (params) => { - const { - form - } = params, { - distributionMode - } = form.getFormParams(); - - if (!['2', '3', '6'].includes(distributionMode)) return - - const relationShip = { - 'distributionMode': distributionMode !== '6' ? : - } - - return relationShip; - } - - handleFormChange = (cb) => { - const key = Object.keys(cb)[0]; - const value = cb[key].value; - - const { - formElements, - } = this.props.commonStore, { - form, - } = formElements; - - //切换【应用范围】,重置【分部】浏览按钮 - (key === 'scopeType' && value === '0') && ['scopeValue'].map(key => { - form.updateFields({ - [key]: [] - }); - }); - - //下拉框【请假单位】选中项不为'1','3'项时,或【计算请假时长方式】不为第'1'项时,重置【日折算时长】 - ((key === 'minimumUnit' && !['1', '3'].includes(value)) || (key === 'computingMode') && value !== '1') && ['hoursToDay'].map(key => { - this.updateFormFields(key, 8); - }); - - //关闭【启用假期余额】开关后,重置【余额发放方式】、【有效期规则】、【允许延长有效期】和【释放规则】 - (key === 'balanceEnable' && value === '0') && ['distributionMode', 'validityRule', 'extensionEnable', 'releaseRule'].map((key, index) => { - const val = [2, 3].includes(index) ? '0' : '1'; - this.updateFormFields(key, val); - }); - - //下拉框【余额发放方式】选中项不为2、3、6项时,重置定制化组件数据 - (key === 'distributionMode' && !['2', '3', '6'].includes(value)) && ['resetBalanceConversionRules'].map(f => { - this.props.hrmHolidayRule[f]() - }); - - //下拉框【余额发放方式】选中项不为【每年自动发放固定天数】时,重置【每人发放天数】 - (key === 'distributionMode' && value !== '4') && ['annualAmount'].map(key => { - this.updateFormFields(key, 1); - }); - - //下拉框【有效期规则】选中项不为【自定义次年失效日期】时,重置【失效日期】 - (key === 'validityRule' && value !== '3') && ['expirationMonth', 'expirationDay'].map(key => { - this.updateFormFields(key, '1'); - }); - - //关闭【允许延长有效期】开关后,重置开关后面的Input框 - (key === 'extensionEnable' && value === '0') && ['extendedDays'].map((key, index) => { - this.updateFormFields(key, 90); - }); - - - if (key === 'minimumUnit') { - this.props.hrmHolidayRule.handleMinimumUnitChange(value) - } - - } - - //更新表单元素的值 - updateFormFields = (key, val) => { - const { - formElements, - } = this.props.commonStore, { - form, - } = formElements; - - form.updateFields({ - [key]: { - value: val - } - }); - } - - getTransverseSecondComponent = (conditions) => { - if (conditions.length === 0) return; - - let transverseSecondComponents = []; - - conditions[0].items.map(item => { - const { - domkey - } = item; - if (['extendedDays', 'expirationDay'].includes(domkey[0])) { - transverseSecondComponents.push(item); - } - }); - - return transverseSecondComponents - } - - getLabels = (form) => { - const { - minimumUnit - } = form.getFormParams(); - - const label = (minimumUnit !== '3') ? getLabel('389334', "每人发放天数") : getLabel('388956', "每人发放小时数"); - - return { - 'annualAmount': label - } - } - - render() { - const { - commonStore, - hrmHolidayRule - } = this.props, { - dialog, - dialogStaticProps, - formElements, - table, - } = commonStore, { - style, - formConfig, - dynamicTips, - renderBlacklist, - } = hrmHolidayRule, { - title, - visible, - } = dialog, { - form, - date, - loading, - conditions - } = formElements, { - index - } = table; - - return ( - - { - loading - ? - : ['-1','0'].includes(index) - ? - : - - } - - ) - } -} - -export default Dialog \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayRule/Search.js b/pc4backstage/hrmAttendance/components/holidayRule/Search.js deleted file mode 100644 index 15ea58f..0000000 --- a/pc4backstage/hrmAttendance/components/holidayRule/Search.js +++ /dev/null @@ -1,59 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTab, -} from 'ecCom'; -@inject('commonStore') -@inject('hrmHolidayRule') -@observer -class Search extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.commonStore.getSearchCondition(); - } - - setShowSearchAd = (bool) => { - this.props.commonStore.changeSearchPanelStatus(bool); - } - - handleSearch = () => { - this.props.commonStore.getSearchList(); - } - - handleSearchChange = (val) => { - this.props.commonStore.changeAdvanceSearchField(val); - } - - render() { - const { - search, - searchBaseValue, - searchsAd, - buttonsAd, - advanceHeight - } = this.props.commonStore, { - isPanelShow, - } = search; - - return ( - - ) - } -} - -export default Search \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayRule/Table.js b/pc4backstage/hrmAttendance/components/holidayRule/Table.js deleted file mode 100644 index 3e0d7c3..0000000 --- a/pc4backstage/hrmAttendance/components/holidayRule/Table.js +++ /dev/null @@ -1,143 +0,0 @@ -import { - observer, - inject -} from 'mobx-react'; -import { - WeaCheckbox, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import { - confirmation, -} from '../../util/save-time-util.js'; -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('commonStore') -@inject('hrmHolidayRule') -@observer -class Table extends React.Component { - constructor(props) { - super(props); - this.editParams = { - title: getLabel('388998', "编辑假期"), - type: 1, - } - } - - componentDidMount() { - this.init(); - } - - init = () => { - this.props.commonStore.getSearchList(); - } - - componentWillUnmount() { - this.props.commonStore.resetTable(); - } - - reRenderColumns = (columns) => { - const { - handleCkChange, - collectCheckedId, - } = this.props.hrmHolidayRule; - - columns.map(c => { - if (c.dataIndex === 'leaveName') { - c.render = (t, r) => { - const { - leaveNamespan, - randomFieldId - } = r; - - return ['setSelectedRowId','setSelectedRowIndex' ,'openDialog'].map( (f,i) => { - let params; - if (i === 0) { - params = randomFieldId; - } else if(i === 1){ - params = '0'; - }else{ - params = this.editParams; - }; - this.props.commonStore[f](params) - }) }>{leaveNamespan} - } - } - if (c.dataIndex === 'isEnable') { - c.render = (t, r) => { - const { - isEnablespan, - randomFieldId - } = r; - - if (isEnablespan === '1') collectCheckedId(randomFieldId) - - return handleCkChange(val,randomFieldId)}/> - } - } - }); - } - - onOperatesClick = (record, rowIndex, operate) => { - const { - randomFieldId - } = record, { - index - } = operate; - - const { - setSelectedRowId, - setSelectedRowIndex, - openDialog, - delTableRows, - } = this.props.commonStore; - - //设置选中行的id - setSelectedRowId(randomFieldId); - //设置选中行的索引值 - setSelectedRowIndex(index); - //根据索引值,执行相应的函数 - switch (index) { - case '0': //编辑 - openDialog(this.editParams); - break; - case '1': //删除 - confirmation.showDelConfirm({ - type: 0, //单个删除 - logic: (type) => delTableRows(type), - }); - break; - case '3': //同步 - openDialog({ - title: getLabel('21952', "同步设置"), - type: 0, //同步单个假期 - }); - break; - - } - } - - render() { - const { - commonStore, - } = this.props, { - table - } = commonStore, { - tableStore, - } = table; - - return ( - this.reRenderColumns(columns)} - onOperatesClick={this.onOperatesClick}/> - ) - } -} - -export default Table \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayRule/Top.js b/pc4backstage/hrmAttendance/components/holidayRule/Top.js deleted file mode 100644 index 09a0ca9..0000000 --- a/pc4backstage/hrmAttendance/components/holidayRule/Top.js +++ /dev/null @@ -1,66 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaRightMenu, - WeaLocaleProvider, -} from 'ecCom'; -import { - toJS -} from 'mobx'; -import { - AlertPage, -} from '../../public/learn'; -const getLabel = WeaLocaleProvider.getLabel; - -import Table from './Table'; -import Search from './Search'; - -@inject('commonStore') -@inject('hrmHolidayRule') -@observer -class Top extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.commonStore.getMenus(); - } - - render() { - const { - commonStore, - hrmHolidayRule - } = this.props, { - topTitle, - } = hrmHolidayRule, { - topButtons, - dropMenuDatas, - topComponentStaticProps, - table, - } = commonStore, { - tableStore, - canViewTable - } = table; - - return ( - - - - {canViewTable ?
: } - - - ) - } -} - -export default Top \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayRule/index.js b/pc4backstage/hrmAttendance/components/holidayRule/index.js deleted file mode 100644 index 171b051..0000000 --- a/pc4backstage/hrmAttendance/components/holidayRule/index.js +++ /dev/null @@ -1,70 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; - -import * as asyncFetch from '../../apis/holidayRule'; - -import Top from './Top'; -import Dialog from './Dialog'; - -@inject('commonStore') -@inject('hrmHolidayRule') -@observer -class HolidayRule extends React.Component { - constructor(props) { - super(props); - } - - componentWillMount() { - const { - pageConfig - } = this.props.hrmHolidayRule; - - const params = { - ...pageConfig, - customizedStore: this.props.hrmHolidayRule, - }; - - ['resetStorePropertys', 'setPageConfig', 'getPermissionInfo'].map((f, i) => { - this.props.commonStore[f](i === 1 && params); - }); - - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.props.commonStore.refreshPage(); - } - } - - render() { - const { - commonStore, - } = this.props, { - pageAccessPermission - } = commonStore, { - hasRight, - loading - } = pageAccessPermission; - - if (!hasRight) { - return loading ? : - } else { - return ( -
- - -
- - ) - } - } -} - -export default HolidayRule \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/Annotation.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/Annotation.js deleted file mode 100644 index 3deb5c7..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/Annotation.js +++ /dev/null @@ -1,69 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaHelpfulTip, - WeaLocaleProvider, -} from 'ecCom'; -import { - Icon -} from '../../public/learn'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmHolidySettingNew') -@observer -class Annotation extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - summary, - colorIconProps, - hasHelpfulTip, - helpfulTipProps, - handleIconClick, - } = this.props.hrmHolidySettingNew, { - annotations, - iconStates - } = summary; - - return ( -
{ - annotations.map( (annotation,index) => { - const { - changeType, - bgColor, - typeName, - value - } = annotation; - - const enhanceIconProps = { - ...colorIconProps, - bgColor, - className:`linear-gradient-${index}`, - iconState: iconStates[index], - onIconClick: (value) => handleIconClick(value, index) - } - - return ( -
-
- -
- - {`${typeName} : `} {value} {`${getLabel('505553',"天")}`} - -
- ) - }) - }{ - hasHelpfulTip && - }
- ) - } -} - -export default Annotation \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/ConditionGroup.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/ConditionGroup.js deleted file mode 100644 index ae32003..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/ConditionGroup.js +++ /dev/null @@ -1,74 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDatePicker, - WeaInputSearch, -} from 'ecCom'; - -import Tab from './Tab'; -import Annotation from './Annotation'; - -@inject('hrmHolidySettingNew') -@observer -class ConditionGroup extends React.Component { - constructor(props) { - super(props); - } - - getLeftlayout = () => { - const { - datePicker, - datePickerProps - } = this.props.hrmHolidySettingNew; - - const leftlayout = ( -
-
- -
-
- -
-
- ) - - return leftlayout; - } - - getRightlayout = () => { - const { - tab, - inputSearch, - inputSearchProps, - } = this.props.hrmHolidySettingNew, { - selectedKey - } = tab; - - let rightlayout; - - if (selectedKey === '0') { - return ( -
- -
- ) - } else { - return ( - - ) - } - } - - render() { - return ( -
- {this.getLeftlayout()} - {this.getRightlayout()} -
- ); - } -} - -export default ConditionGroup; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/Dialog.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/Dialog.js deleted file mode 100644 index fa79ae8..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/Dialog.js +++ /dev/null @@ -1,68 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog, -} from 'ecCom'; -import { - MagicForm -} from '../../public/sweet-form.js'; -import { - Loading, -} from '../../public/learn.js'; - -@inject('hrmHolidySettingNew') -@observer -class Dialog extends React.Component { - constructor(props) { - super(props); - } - - getContent = () => { - const { - hasDialogContentLoaded, - formConfig, - formElements, - dialogType, - } = this.props.hrmHolidySettingNew, { - form - } = formElements; - - const filterConfig = !['3', '4'].includes(dialogType) ? formConfig : {}; - - if (hasDialogContentLoaded) { - return ( - - ) - } else { - return - } - } - - render() { - const { - dialog, - dialogProps, - dialogTitle, - dialogButtons - } = this.props.hrmHolidySettingNew; - - return ( - - {this.getContent()} - - ); - } -} - -export default Dialog \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/Tab.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/Tab.js deleted file mode 100644 index 628bc21..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/Tab.js +++ /dev/null @@ -1,58 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; - -@inject('hrmHolidySettingNew') -@observer -class Tab extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - tab, - tabProps, - handleTabClick, - } = this.props.hrmHolidySettingNew, { - datas, - } = tabProps, { - selectedKey - } = tab; - - return ( -
{ - datas.map( (data,index) => { - const { - key, - title - } = data; - - const style = { - cursor: 'pointer' - }; - - if(key === selectedKey){ - Object.assign(style,{ - color: '#2DB7F5' - }); - } - - if(index === 1){ - Object.assign(style,{ - marginLeft: 10 - }); - } - - return ( - handleTabClick(key)} style={style}>{title} - ) - }) - }
- ); - } - -} - -export default Tab \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/Table.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/Table.js deleted file mode 100644 index 59e6e85..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/Table.js +++ /dev/null @@ -1,57 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTableNew -} from 'comsMobx'; -const WeaTable = WeaTableNew.WeaTable; - -@inject('hrmHolidySettingNew') -@observer -class Table extends React.Component { - constructor(props) { - super(props); - } - - reRenderColumns = (columns) => { - columns.map(c => { - if (c.dataIndex === 'holidayDate') { - c.render = (t, r) => { - const { - holidayDatespan, - randomFieldId - } = r; - - return this.handleClick(randomFieldId) }>{holidayDatespan} - } - } - }); - } - - handleClick = (randomFieldId) => { - const funcs = ['setOperatedRowId', 'setDialogType', 'openDialog'], - params = [randomFieldId, '2', '']; - - funcs.map((func, index) => { - this.props.hrmHolidySettingNew[func](params[index]) - }); - } - - render() { - const { - table, - tableProps - } = this.props.hrmHolidySettingNew; - - return ( - - ); - } -} - -export default Table \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/Top.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/Top.js deleted file mode 100644 index 5d41728..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/Top.js +++ /dev/null @@ -1,101 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaRightMenu, - WeaLocaleProvider, - WeaLeftRightLayout -} from 'ecCom'; -import { - LeftTree, - NoData, -} from '../../public/learn'; - -import ConditionGroup from './ConditionGroup'; -import Year from './Year'; -import Table from './Table'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmHolidySettingNew') -@observer -class Top extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount () { - this.props.hrmHolidySettingNew.getRightMenu(); - } - - getRightLayout = () => { - const { - noDataProps, - dropMenuDatas, - hasRightLayout, - } = this.props.hrmHolidySettingNew; - - if (hasRightLayout) { - return ( -
- -
- - {this.getContent()} - -
-
- ) - } else { - return - } - } - - getContent = () => { - const { - tab - } = this.props.hrmHolidySettingNew, { - selectedKey - } = tab; - - if (selectedKey === '0') { - return - } else { - return
- } - } - - render () { - const { - topProps, - toploading, - topButtons, - dropMenuDatas, - tree, - treeProps, - } = this.props.hrmHolidySettingNew; - - return ( - - } - resize={true} - leftWidth={320} - > - {this.getRightLayout()} - - - ); - } - -} - -export default Top; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/Year.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/Year.js deleted file mode 100644 index 9f1da77..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/Year.js +++ /dev/null @@ -1,123 +0,0 @@ -import { - observer, - inject -} from 'mobx-react'; -import { - toJS -} from 'mobx'; -import { - WeaYear, - WeaNewScroll, - WeaLocaleProvider, -} from 'ecCom'; -import { - Tooltip, - Spin, -} from 'antd'; -import { - Loading, -} from '../../public/learn'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmHolidySettingNew') -@observer -class Year extends React.Component { - constructor(props) { - super(props); - } - - yearDateCellRender = (_date) => { - const { - calendar - } = this.props.hrmHolidySettingNew; - - const year = _date.getYear(), - month = _date.getMonth() + 1, - day = _date.getDayOfMonth(); - - const item = toJS(calendar)[month - 1][day - 1]; - - if (!item) { - return null; - } - - const { - date, - bgColor, - changeType, - typeName, - fontColor, - desc, - } = item; - - const yearOfItem = (date || '').length >= 4 ? date.substring(0,4) : '' ; - if(year != yearOfItem){ - return null ; - } - - if (bgColor) { - const className = `linear-gradient-${['#00CC66','#FF0000','#0066FF'].findIndex(color => color === bgColor)}`; - - const params = { - date, - desc, - typeName - }; - return ( - -
- {day} -
-
- ) - } else { - return ( -
- {day} -
- ) - } - } - - getTooltip = (params) => { - const labels = [getLabel('22823', "日期"), getLabel('25734', "说明"), getLabel('505579', "类型")]; - - const values = Object.values(params); - - return ( -
    { - labels.map( (label,index) => { - return
  • {`${label}: ${values[index]}`}
  • - }) - }
- ) - } - - render() { - const { - year, - yearProps, - isyearloaded, - } = this.props.hrmHolidySettingNew, { - loading - } = year; - - if (isyearloaded) { - return ( - - - this.yearDateCellRender(date)} - /> - - - ) - } else { - return - } - } -} - -export default Year \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidaySettingNew/index.js b/pc4backstage/hrmAttendance/components/holidaySettingNew/index.js deleted file mode 100644 index c0f7fe2..0000000 --- a/pc4backstage/hrmAttendance/components/holidaySettingNew/index.js +++ /dev/null @@ -1,77 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; -import Import from '../importRelatedComponet/index'; -import '../../style/holidaySetting.css'; - -import Top from './Top'; -import Dialog from './Dialog'; - -@inject('hrmImportCommon') -@inject('hrmHolidySettingNew') -@observer -export default class HolidaySettingNew extends React.Component { - constructor(props) { - super(props); - } - - componentWillMount () { - this.props.hrmHolidySettingNew.reset(); - } - - componentDidMount () { - this.init() - } - - componentWillReceiveProps (nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.props.hrmHolidySettingNew.refresh(); - } - } - - init = () => { - const { - params - } = this.props; - - const funcs = ['setAttendanceId', 'getPermissionInfo']; - funcs.map((func, index) => { - this.props.hrmHolidySettingNew[func](index === 0 && params); - }); - } - - render () { - const { - hrmImportCommon, - hrmHolidySettingNew - } = this.props; - const { - importDialog - } = hrmImportCommon; - const { - pageAccessPermission - } = hrmHolidySettingNew, { - hasRight, - loading - } = pageAccessPermission; - - if (!hasRight) { - return loading ? : - } else { - return ( -
- - - {importDialog.visible && } -
- ) - } - } - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayType/Dialog.js b/pc4backstage/hrmAttendance/components/holidayType/Dialog.js deleted file mode 100644 index 6bbb3ff..0000000 --- a/pc4backstage/hrmAttendance/components/holidayType/Dialog.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaDialog, -} from 'ecCom'; -import { - Loading, -} from '../../public/learn'; -import DialogForm from './DialogForm'; - -@observer -export default class Dialog extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - store - } = this.props, { - DIALOG, - dialog, - dialogButtons, - } = store; - - return ( - - { - dialog.loading ? : - } - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayType/DialogForm.js b/pc4backstage/hrmAttendance/components/holidayType/DialogForm.js deleted file mode 100644 index a15afd3..0000000 --- a/pc4backstage/hrmAttendance/components/holidayType/DialogForm.js +++ /dev/null @@ -1,62 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - MagicForm, -} from '../../public/sweet-form.js'; - -@observer -export default class DialogForm extends React.Component { - constructor(props) { - super(props); - } - - handleFormChange = (data, form) => { - const key = Object.keys(data)[0]; - const value = data[key].value; - - //清空分部浏览按钮 - if (key === 'scopeType' && value === '0') { - form.updateFields({ - 'scopeValue': [] - }); - } - - //重置日折算时长 - if (key === 'computingMode' && value === '1') { - form.updateFields({ - 'hoursToDay': { - value: 8 - } - }); - } - - if (key === 'minimumUnit') { - this.props.store.onHolidayUnitChange(value); - } - } - - render() { - const { - store - } = this.props, { - dialog, - FORMCONFIG, - dynamicTips, - renderBlacklist, - } = store, { - form - } = dialog; - - return ( - this.handleFormChange(data,form)} - /> - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayType/Search.js b/pc4backstage/hrmAttendance/components/holidayType/Search.js deleted file mode 100644 index f34edc9..0000000 --- a/pc4backstage/hrmAttendance/components/holidayType/Search.js +++ /dev/null @@ -1,41 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaTab -} from 'ecCom'; - -@observer -export default class Search extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - store - } = this.props, { - TAB, - tab, - searchsBaseValue, - } = store, { - form - } = tab; - - return ( - { - if (e.keyCode == 13 && e.target.tagName === "INPUT") { - store.onSearch() - } - } - } - >{form.render()}} - /> - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayType/Table.js b/pc4backstage/hrmAttendance/components/holidayType/Table.js deleted file mode 100644 index 9ed52af..0000000 --- a/pc4backstage/hrmAttendance/components/holidayType/Table.js +++ /dev/null @@ -1,90 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaTableNew -} from 'comsMobx'; -import { - WeaCheckbox -} from 'ecCom'; -const WeaTable = WeaTableNew.WeaTable; - -@observer -export default class Table extends React.Component { - constructor(props) { - super(props); - } - - reRenderColumns = (columns, store) => { - const { - onTableTdClick, - collectChecked, - onCheckBoxChange, - } = store; - - columns.map(c => { - if (c.dataIndex === 'leaveName') { - c.render = function(text, record) { - const { - randomFieldId - } = record; - - return onTableTdClick(randomFieldId)}>{text} - } - } - if (c.dataIndex === 'isEnable') { - c.render = function(text, record) { - const { - randomFieldId - } = record; - - (text === '1') && collectChecked(randomFieldId) - - return onCheckBoxChange(val,randomFieldId) }/> - } - } - }); - } - - onOperatesClick = (record, rIndex, operate, store) => { - const { - randomFieldId - } = record, { - index - } = operate; - - const { - onTableTdClick, - del, - log, - } = store; - - if (index === '0') { - onTableTdClick(randomFieldId); - } - if (index === '1') { - del(randomFieldId); - } - if (index === '2') { - log(randomFieldId, 'table') - } - } - - render() { - const { - store - } = this.props, { - TABLE, - table - } = 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/hrmAttendance/components/holidayType/Top.js b/pc4backstage/hrmAttendance/components/holidayType/Top.js deleted file mode 100644 index 6e17a50..0000000 --- a/pc4backstage/hrmAttendance/components/holidayType/Top.js +++ /dev/null @@ -1,41 +0,0 @@ -import { - WeaTop, - WeaRightMenu, -} from 'ecCom'; -import { - observer -} from 'mobx-react'; -import Table from './Table'; -import Search from './Search'; - -@observer -export default class Top extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - store - } = this.props, { - TOP, - top, - topButtons, - dropMenuDatas - } = store; - - return ( - - - -
- - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/holidayType/index.js b/pc4backstage/hrmAttendance/components/holidayType/index.js deleted file mode 100644 index 5ff2d9c..0000000 --- a/pc4backstage/hrmAttendance/components/holidayType/index.js +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; -import Top from './Top'; -import Dialog from './Dialog'; - -@inject('hrmHolidayType') -@observer -export default class HolidayType extends React.Component { - constructor(props) { - super(props); - } - - componentWillMount() { - const { - hrmHolidayType: store - } = this.props; - - store.getPermissionInfo(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - componentDidMount() { - this.init(); - } - - init = () => { - const { - hrmHolidayType: store - } = this.props; - - store.getRightMenu(); - store.getSearchForm(); - store.setShowSearchAd(false); - } - - render() { - const { - hrmHolidayType: store - } = this.props, { - permission, - dialog, - } = store, { - hasRight, - loading - } = permission, { - visible - } = dialog; - - if (!hasRight) { - return loading ? : - } - return ( -
- - -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/importExternalAttendanceData/index.js b/pc4backstage/hrmAttendance/components/importExternalAttendanceData/index.js deleted file mode 100644 index 5701740..0000000 --- a/pc4backstage/hrmAttendance/components/importExternalAttendanceData/index.js +++ /dev/null @@ -1,117 +0,0 @@ -import React, { - Component -} from 'react'; -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaAlertPage, - WeaRightMenu, - WeaSearchGroup, - WeaNewScroll, - WeaLocaleProvider -} from 'ecCom'; -import {Spin} from 'antd'; -import ImportResource from '../../../hrmengine/components/importresource/Import'; -import { - i18n -} from '../../public/i18n'; -const getLabel = WeaLocaleProvider.getLabel; - -@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, - spinning - } = 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/hrmAttendance/components/importRelatedComponet/ImportHistory.js b/pc4backstage/hrmAttendance/components/importRelatedComponet/ImportHistory.js deleted file mode 100644 index 7499698..0000000 --- a/pc4backstage/hrmAttendance/components/importRelatedComponet/ImportHistory.js +++ /dev/null @@ -1,118 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog, - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom' -import { - Button, -} from 'antd' -import { - WeaTableNew -} from 'comsMobx'; -import { - jumpToHrmCard -} from '../../util/pure-util' -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -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/hrmAttendance/components/importRelatedComponet/ImportLog.js b/pc4backstage/hrmAttendance/components/importRelatedComponet/ImportLog.js deleted file mode 100644 index 2b256c7..0000000 --- a/pc4backstage/hrmAttendance/components/importRelatedComponet/ImportLog.js +++ /dev/null @@ -1,174 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTab, - WeaDialog, - WeaFormItem, - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom' -import { - Row, - Col, - Spin, - Button, -} from 'antd' -import { - WeaSwitch, - WeaTableNew -} from 'comsMobx' -import { - jumpToHrmCard -} from '../../util/pure-util' -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -@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' ? {getLabel(15242, '成功')} : {getLabel(498, '失败')}} - } - } - }); - } - - 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/hrmAttendance/components/importRelatedComponet/ImportResult.js b/pc4backstage/hrmAttendance/components/importRelatedComponet/ImportResult.js deleted file mode 100644 index 083ecc4..0000000 --- a/pc4backstage/hrmAttendance/components/importRelatedComponet/ImportResult.js +++ /dev/null @@ -1,227 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog, - WeaNewScroll, - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom' -import { - Row, - Col, - Icon, - Spin, - Modal, - Table, - Button, -} from 'antd' -import { - WeaTableNew -} from 'comsMobx'; -import { - toJS -} from 'mobx'; -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -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": getLabel(24960, '提示信息'), - "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' }} className='hrm-import-error-tip'> - 0 ? 'check' : 'cross'} style={{ color: '#fff', fontSize: 18 }} /> -
; - const tip = 0 ? '#54D3A2' : '#FF0000' }}>{(succnum > 0 && failnum == 0) ? getLabel(384061, '共{rownum}条数据,全部导入成功!').replace('{rownum}', `${succnum + failnum}`) : getLabel(385324, '共{rownum}条数据,{succnum}条导入成功!').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, textAlign: 'center' } : { marginTop: height / 2 - 30, textAlign: 'center' }}>{icon}{tip}
-
{resultTable}
-
- } - - getImportProcessInfo = () => { - const { - hrmImportCommon - } = this.props, { - resultDialog - } = hrmImportCommon, { - datas, - importStatus - } = resultDialog; - - const columns = [{ - "title": getLabel(27592, '行'), - "width": "15%", - "dataIndex": "rownum" - }, { - "title": getLabel(602, '状态'), - "width": "15%", - "dataIndex": "status", - render: (text, record, index) => { - return {text == '1' ? getLabel(15242, '成功') : getLabel(498, '失败')} - } - }, { - "title": getLabel(24960, '提示信息'), - "width": "70%", - "dataIndex": "message", - render: (text, record, index) => { - // return {text} - 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/hrmAttendance/components/importRelatedComponet/index.js b/pc4backstage/hrmAttendance/components/importRelatedComponet/index.js deleted file mode 100644 index 260c4a3..0000000 --- a/pc4backstage/hrmAttendance/components/importRelatedComponet/index.js +++ /dev/null @@ -1,273 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaUpload, - WeaDialog, - WeaSelect, - WeaNewScroll, - WeaMoreButton, - WeaSearchGroup, - WeaLocaleProvider, -} from 'ecCom' -import { - Row, - Col, - Spin, - Button, -} from 'antd' -import { - IEVersion -} from '../../util/pure-util' -import {addContentPath} from '../../util/index.js' -import '../../style/import.css' -const getLabel = WeaLocaleProvider.getLabel; - -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 - } = importDialog; - - let _arr = []; - 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 && (field.label.length > 14 ? `${field.label.slice(0, 14)}...` : field.label) }: - - {this.getElements(key, url)} - - - - - ), - 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) => { - const { - hrmImportCommon - } = this.props, { - setExcelFileNo, - importDialog, - setSelectedValue - } = hrmImportCommon, { - templetName, - selectedValue - } = importDialog, { - upStatus, - list - } = this.state; - - let dom; - if (key == 'keyField') { - const options = [{ - key: "workcode", - selected: true, - showname: getLabel('714', "编号"), - disabled: false - }, { - key: "loginid", - selected: false, - showname: getLabel(16126, '登录名'), - disabled: false - }]; - - dom = setSelectedValue(value)} - /> - } - if (key == 'templet') { - dom = this.getTempletElement(url, selectedValue, templetName); - } - if (key == 'excelfile') { - dom = (
-
- {this.setState({list:list}); setExcelFileNo(id)}} - onUploading={status => this.handleUploading(status)} - > - - -
-
- { list.length == 0 ?

{getLabel(384040, '未选择任何文件')}

: list.map(file =>

{file.filename}

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

{getLabel(383083, '请先下载模板')}:{dom}

); - } else { - p = (

{val}

); - } - return p; - } - - getTempletElement = (url, selectedValue, templetName) => { - let dom; - let urlArr = url.split(';'); - if (urlArr.length > 1) { - if (selectedValue == '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; - - return [ - (), - (), - () - ]; - } - - render() { - const { - hrmImportCommon - } = this.props, { - importDialog, - resultDialog, - recordDialog, - setImportDialogVisible - } = hrmImportCommon, { - visible, - title, - loading - } = importDialog, { - width, - height, - } = this.state; - - return ( -
- setImportDialogVisible(false) } - buttons={this.getButtons()} - style={{width: width, height: height}} - onChangeHeight={(h) => this.setState({height: h})} - > - - - {this.getForm()} - - - - {resultDialog.visible && } - {recordDialog.visible && } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportHistory.js b/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportHistory.js deleted file mode 100644 index b0a7d21..0000000 --- a/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportHistory.js +++ /dev/null @@ -1,118 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog, - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom' -import { - Button, -} from 'antd' -import { - WeaTableNew -} from 'comsMobx'; -import { - jumpToHrmCard -} from '../../util/pure-util' -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -import ImportLog from './ImportLog' -import ImportResult from './ImportResult' - -@inject('importScheduleCode') -@observer -export default class ImportHistory extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 870, - height: 510, - } - } - - reRenderColumns(c) { - const { - importScheduleCode - } = this.props, { - jumpToImportResult - } = importScheduleCode; - - - 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 { - importScheduleCode - } = this.props, { - recordDialog, - queryLog, - } = importScheduleCode, { - loading - } = recordDialog; - - return [ - (), - () - ]; - } - - render() { - const { - importScheduleCode - } = this.props, { - recordDialog, - logDialog, - resultDialog, - setRecordDialogVisible - } = importScheduleCode, { - 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/hrmAttendance/components/importScheduleCodeComponet/ImportLog.js b/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportLog.js deleted file mode 100644 index fb1001b..0000000 --- a/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportLog.js +++ /dev/null @@ -1,174 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTab, - WeaDialog, - WeaFormItem, - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom' -import { - Row, - Col, - Spin, - Button, -} from 'antd' -import { - WeaSwitch, - WeaTableNew -} from 'comsMobx' -import { - jumpToHrmCard -} from '../../util/pure-util' -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('importScheduleCode') -@observer -export default class ImportLog extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 870, - height: 510, - isPanelShow: false, - num: 5, - } - } - - getPanelComponents() { - const { - importScheduleCode - } = this.props, { - logDialog - } = importScheduleCode, { - 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' ? {getLabel(15242, '成功')} : {getLabel(498, '失败')}} - } - } - }); - } - - getDialogButtons = () => { - const buttons = [ - () - ]; - return buttons - } - - getSearchPanelButtons = () => { - const { - importScheduleCode - } = this.props, { - searchLogInfo, - setLogPanelStatus, - logDialog, - } = importScheduleCode, { - form - } = logDialog; - - return [ - (), - (), - (), - ]; - } - - render() { - const { - importScheduleCode - } = this.props, { - logDialog, - setLogDialogVisible, - setLogPanelStatus, - } = importScheduleCode, { - 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/hrmAttendance/components/importScheduleCodeComponet/ImportResult.js b/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportResult.js deleted file mode 100644 index 41baa31..0000000 --- a/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/ImportResult.js +++ /dev/null @@ -1,227 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog, - WeaNewScroll, - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom' -import { - Row, - Col, - Icon, - Spin, - Modal, - Table, - Button, -} from 'antd' -import { - WeaTableNew -} from 'comsMobx'; -import { - toJS -} from 'mobx'; -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -import ImportLog from './ImportLog' - -@inject('importScheduleCode') -@observer -export default class ImportResult extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 740, - height: 450, - } - } - - getButtons = () => { - const { - importScheduleCode - } = this.props, { - resultDialog, - setLogDialogVisible, - } = importScheduleCode, { - 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 { - importScheduleCode - } = this.props, { - resultDialog - } = importScheduleCode, { - errorTip, - errorInfo - } = resultDialog - - const columns = [{ - "title": getLabel(24960, '提示信息'), - "width": "100%", - "dataIndex": "message", - render: (text, record, index) => { - return {text} - } - }]; - - const elements =
-
-
- -
- {errorTip} -
-
- ; - return elements; - } - - getResultInfo = () => { - const { - importScheduleCode - } = this.props, { - resultDialog - } = importScheduleCode, { - 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) ? getLabel(384061, '共{rownum}条数据,全部导入成功!').replace('{rownum}',`${succnum+failnum}`) : getLabel(384060, '共{rownum}条数据,{succnum}条导入成功!').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 { - importScheduleCode - } = this.props, { - resultDialog - } = importScheduleCode, { - datas, - importStatus - } = resultDialog; - - const columns = [{ - "title": getLabel(27592, '行'), - "width": "15%", - "dataIndex": "rownum" - }, { - "title": getLabel(602, '状态'), - "width": "15%", - "dataIndex": "status", - render: (text, record, index) => { - return {text=='1' ? getLabel(15242, '成功') : getLabel(498, '失败')} - } - }, { - "title": getLabel(24960, '提示信息'), - "width": "70%", - "dataIndex": "message", - render: (text, record, index) => { - // return {text} - return {text} - } - }]; - - const loadingTip = (importStatus !== 'over' || importStatus !== 'error') && ; - - const processTable =
- - return
-
{loadingTip}
-
{processTable}
-
- } - - render() { - const { - importScheduleCode - } = this.props, { - resultDialog, - logDialog, - setResultInfoDialogVisible, - hasErrorInfo, - setScoll - } = importScheduleCode, { - 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/hrmAttendance/components/importScheduleCodeComponet/index.js b/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/index.js deleted file mode 100644 index 2cbe325..0000000 --- a/pc4backstage/hrmAttendance/components/importScheduleCodeComponet/index.js +++ /dev/null @@ -1,273 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaUpload, - WeaDialog, - WeaSelect, - WeaNewScroll, - WeaMoreButton, - WeaSearchGroup, - WeaLocaleProvider, -} from 'ecCom' -import { - Row, - Col, - Spin, - Button, -} from 'antd' -import { - IEVersion -} from '../../util/pure-util' -import {addContentPath} from '../../util/index.js' -import '../../style/import.css' -const getLabel = WeaLocaleProvider.getLabel; - -import ImportResult from './ImportResult' -import ImportHistory from './ImportHistory' - -@inject('importScheduleCode') -@observer -export default class Import extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 870, - height: 510, - list: [], - upStatus: '', - } - } - - getForm = () => { - const { - importScheduleCode - } = this.props, { - importDialog - } = importScheduleCode, { - condition - } = importDialog; - - let _arr = []; - 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 && (field.label.length > 14 ? `${field.label.slice(0, 14)}...` : field.label) }: - - {this.getElements(key, url)} - - - - - ), - 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) => { - const { - importScheduleCode - } = this.props, { - setExcelFileNo, - importDialog, - setSelectedValue - } = importScheduleCode, { - templetName, - selectedValue - } = importDialog, { - upStatus, - list - } = this.state; - - let dom; - if (key == 'keyField') { - const options = [{ - key: "lastname", - selected: true, - showname: getLabel('413', "姓名"), - disabled: false - }, { - key: "workcode", - selected: false, - showname: getLabel('714', "编号"), - disabled: false - }]; - - dom = setSelectedValue(value)} - /> - } - if (key == 'templet') { - dom = this.getTempletElement(url, selectedValue, templetName); - } - if (key == 'excelfile') { - dom = (
-
- {this.setState({list:list}); setExcelFileNo(id)}} - onUploading={status => this.handleUploading(status)} - > - - -
-
- { list.length == 0 ?

{getLabel(384040, '未选择任何文件')}

: list.map(file =>

{file.filename}

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

{getLabel(383083, '请先下载模板')}:{dom}

); - } else { - p = (

{val}

); - } - return p; - } - - getTempletElement = (url, selectedValue, templetName) => { - let dom; - let urlArr = url.split(';'); - if (urlArr.length > 1) { - if (selectedValue == '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 { - importScheduleCode - } = this.props, { - submitExcel, - queryRecord, - importDialog, - } = importScheduleCode, { - upStatus - } = this.state; - - return [ - (), - (), - () - ]; - } - - render() { - const { - importScheduleCode - } = this.props, { - importDialog, - resultDialog, - recordDialog, - setImportDialogVisible - } = importScheduleCode, { - visible, - title, - loading - } = importDialog, { - width, - height, - } = this.state; - - return ( -
- setImportDialogVisible(false) } - buttons={this.getButtons()} - style={{width: width, height: height}} - onChangeHeight={(h) => this.setState({height: h})} - > - - - {this.getForm()} - - - - {resultDialog.visible && } - {recordDialog.visible && } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/init/AnalysisResult.js b/pc4backstage/hrmAttendance/components/init/AnalysisResult.js deleted file mode 100644 index bdacf97..0000000 --- a/pc4backstage/hrmAttendance/components/init/AnalysisResult.js +++ /dev/null @@ -1,202 +0,0 @@ -import { - observer, - inject -} from 'mobx-react'; -import { - toJS -} from 'mobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - Icon, - Steps, - Spin, - Button, - Tooltip, - QueueAnim, -} from 'antd'; -import {addContentPath} from '../../util/index.js' -const Step = Steps.Step; -const getLabel = WeaLocaleProvider.getLabel; - -const InitStatus = props => { - const { - status - } = props; - - switch (status) { - case '0': - return - break; - case '1': - return - break; - case '2': - return - break; - default: - return null; - } -} - -const Detail = props => { - const { - description - } = props; - - const translate = (description) => { - return (
    { - description.map(d =>
  • {d}
  • ) - }
) - } - - return ( - - - - {getLabel('505586','详情')} - - - ) -} - -const Supply = props => { - const { - description - } = props; - - const supply = []; - - const insert = (html) => { - supply.push(html); - return supply; - } - - if (description) { - insert(
).push(); - } - - return supply; -} - -const InitSteps = props => { - const { - currentIndex, - items - } = props; - - return ( - - { - items.map( (item,index) => { - const { - title, - status - } = item; - - return ( - {title} : title}/> - ) - }) - } - - ) -} - -const Result = props => { - const { - results, - names, - } = props; - - return ( - - { - results.map( (result,index) => { - const { - name, - status, - sketch, - description, - url, - } = result; - - return (
- - - - - {name} - - - - -

- { sketch } - { description && } -

- { - url && ( - - {names[index]} - ) - } - -
) - }) - } -
- ) -} - -const Back = props => { - const { - back - } = props; - - return ( - - ) -} - -@inject('hrmInit') -@observer -export default class AnalysisResult extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - hrmInit - } = this.props, { - currentIndex, - steps, - analysis, - isInitFinish, - hasAnalysisResult, - back, - initItemNames, - } = hrmInit, { - items - } = steps, { - results - } = analysis; - - return ( -
-
- -
- - {hasAnalysisResult && isInitFinish && back()}/>} -
- ) - } - - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/init/InitForm.js b/pc4backstage/hrmAttendance/components/init/InitForm.js deleted file mode 100644 index b07906b..0000000 --- a/pc4backstage/hrmAttendance/components/init/InitForm.js +++ /dev/null @@ -1,299 +0,0 @@ -import { - observer, - inject -} from 'mobx-react'; -import { - Button, - Popconfirm -} from 'antd'; -import { - WeaFormItem, - WeaLocaleProvider, - WeaSlideModal, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import { - MagicForm, -} from '../../public/sweet-form.js'; -import { - DistanceToPeak, -} from '../../public/learn.js'; -const getLabel = WeaLocaleProvider.getLabel; - -const InitButton = props => { - const { - handleClick, - confirm, - cancel, - visible, - } = props; - - return ( -
- - - -
- ) -} - -const Guide = props => { - const { - visible, - open, - close, - datas, - top, - } = props; - - let width; - if (screen) { - width = (screen.width >= 1920) ? 400 : 300 - } else { - width = 400; - } - - return ( -
-
-
- -
-
{ - getLabel('505590','初始化说明') - }
-
- } - content={} - onClose={close} - /> -
- ) -} - -const SlideModalTitle = props => { - const { - close - } = props; - - return ( -
- - - - {getLabel('505590','初始化说明')} -
- ) -} - -const SlideModalContent = props => { - const { - datas - } = props; - - return ( -
- { - datas.map((data, index) => { - const { - title, - desc, - key - } = data; - - const len = desc.length; - let c; - if(len > 1){ - c = (d,i) =>

{`${i + 1}. ${d}`}

- }else{ - c = (d,i) =>

{d}

- } - - return ( -
-
- - - - {title} - -
-
{ - desc.map( (d,i) => c(d,i)) - }
-
- ) - }) - } -
- ) -} - -const HorizontalLine = props => { - return ( -
- ) -} - -@inject('hrmInit') -@observer -export default class InitForm extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.hrmInit.getFormMaterial(); - } - - getTransverseSiblingComponents = (params) => { - const { - form, - items - } = params; - - if (!items) return - - let timerRanger; - - items.map((item, index) => { - const { - domkey - } = item; - - if (domkey[0] === 'restTime_start') { - //【排除休息时间】开关的状态值 - const excludeRestTime = form.getFormParams().excludeRestTime; - - if (excludeRestTime !== '1') return; - - timerRanger = ( - - - - ) - } - }); - - const transverseSiblingComponents = { - 'excludeRestTime': timerRanger, - }; - - return transverseSiblingComponents; - } - - getTransverseSecondComponent = (conditions) => { - if (conditions.length === 0) return; - - let transverseSecondComponents = []; - - conditions[0].items.map(item => { - const { - domkey - } = item; - - if (['restTime_start'].includes(domkey[0])) { - transverseSecondComponents.push(item); - } - }); - - return transverseSecondComponents - } - - getDistanceToPeak = (distance) => { - const { - hrmInit: store - } = this.props; - - const { - setDistanceToPeak - } = store; - - setDistanceToPeak(distance); - } - - render() { - const { - hrmInit - } = this.props, { - formConfig, - formElements, - hasInitButton, - handleInitButtonClick, - errors, - confirm, - cancel, - switchSlideModal, - close, - popConfirmVisible, - slideModalVisible, - slideModalDatas, - slideTop, - } = hrmInit, { - form, - conditions, - } = formElements; - - return ( -
- - { - hasInitButton && confirm()} - cancel={() => cancel()} - visible={popConfirmVisible} - /> - } - { - hasInitButton && switchSlideModal()} - close={() => close()} - datas={slideModalDatas} - top={slideTop} - /> - } - this.getDistanceToPeak(distance)}/> -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/init/Top.js b/pc4backstage/hrmAttendance/components/init/Top.js deleted file mode 100644 index 73b5f6d..0000000 --- a/pc4backstage/hrmAttendance/components/init/Top.js +++ /dev/null @@ -1,51 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaRightMenu, -} from 'ecCom'; - -import InitForm from './InitForm'; -import AnalysisResult from './AnalysisResult'; - -@inject('hrmInit') -@observer -class Top extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.hrmInit.getRightMenu(); - } - - render() { - const { - topProps, - toploading, - topButtons, - dropMenuDatas, - hasInit, - } = this.props.hrmInit; - - return ( - - - { - hasInit ? : - } - - - ); - } - -} - -export default Top; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/init/confirmUtil.js b/pc4backstage/hrmAttendance/components/init/confirmUtil.js deleted file mode 100644 index 4ccf42f..0000000 --- a/pc4backstage/hrmAttendance/components/init/confirmUtil.js +++ /dev/null @@ -1,102 +0,0 @@ -import React ,{ - Component -}from 'react'; -import { - WeaTools, - WeaDialog, - WeaLocaleProvider -} from 'ecCom'; -import { - Button, - message -} from 'antd'; -import ReactDOM from 'react-dom'; -const getLabel = WeaLocaleProvider.getLabel; - -const check = (params) => { - return WeaTools.callApi('/api/kq/setupwizard/checkNeedInit', 'GET', params); -} - -export const checkNeedInit = (onOk) => { - check().then(datas => { - const { - status, - message, - } = datas; - - if (status === "2") { - const div = document.createElement("div"); - document.body.appendChild(div); - ReactDOM.render(, div); - } else { - onOk(); - } - }).catch(() => { - message.warning(); - }) -} - -class UpgrageConfirm extends Component{ - constructor(props){ - super(props); - - this.state = { - visible:false - } - } - - componentDidMount() { - this.setState({visible:true}); - } - - handleOk = () => { - this.props.onOk && this.props.onOk(); - this.handleCancel(); - } - - handleCancel = () => { - this.setState({visible:false}); - } - - getButtons = () => { - return[ - , - ] - - } - - render() { - const { - visible - } = this.state, { - message - } = this.props; - - const pstyle = { - display: "table-cell", - verticalAlign: "middle", - padding: "0 15px" - } - - if (!visible) { - return null; - } - - return ( - -
-

-

-
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/init/index.js b/pc4backstage/hrmAttendance/components/init/index.js deleted file mode 100644 index db935ce..0000000 --- a/pc4backstage/hrmAttendance/components/init/index.js +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; -import '../../style/init.less' - -import Top from './Top'; - -@inject('hrmInit') -@observer -export default class Init extends React.Component { - constructor(props) { - super(props); - } - - componentWillMount() { - this.props.hrmInit.refresh((domain) => domain.newForm()); - } - - componentDidMount() { - this.props.hrmInit.getPermissionInfo(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.props.hrmInit.refresh((domain) => domain.resetForm()); - } - } - - render() { - const { - hrmInit, - } = this.props, { - pageAccessPermission - } = hrmInit, { - hasRight, - loading - } = pageAccessPermission; - - if (!hasRight) { - return loading ? : - } else { - return ( - - ) - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateFieldDefine.js b/pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateFieldDefine.js deleted file mode 100644 index 5382f81..0000000 --- a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateFieldDefine.js +++ /dev/null @@ -1,32 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog, WeaNewScroll} from 'ecCom'; -import {FormInfo} from '../../../hrmComsPublic/index'; - -@observer -export default class CreateGroup extends Component{ - render(){ - const { - store - } = this.props; - const {createFieldDefineDialogProps, formTarget, feildDefineFormItemRender} = store; - - const { - createFieldDefineForm: form, - createFieldDefineFormFields: fields - } = formTarget; - - return ( - - - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateGroup.js b/pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateGroup.js deleted file mode 100644 index e3132b3..0000000 --- a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/CreateGroup.js +++ /dev/null @@ -1,31 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog, WeaNewScroll} from 'ecCom'; -import {FormInfo} from '../../../hrmComsPublic/index'; - -@observer -export default class CreateGroup extends Component{ - render(){ - const { - store - } = this.props; - const {createGroupDialogProps, formTarget} = store; - - const { - createGroupForm: form, - createGroupFormFields: fields - } = formTarget; - - return ( - - - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldDataList.js b/pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldDataList.js deleted file mode 100644 index 9cc4e3b..0000000 --- a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldDataList.js +++ /dev/null @@ -1,53 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaRightMenu, WeaTableEditable} from 'ecCom'; - -@observer -export default class FieldDataList 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.setState({ - resize: new Date().getTime() - }) - } - - render(){ - const {resize} = this.state; - const { - rightMenu, - store - } = this.props; - const {fieldListTableProps} = store; - - let tableProps = {}; - if (this.tabDom) { - tableProps = { - scroll: { - y: this.tabDom.offsetHeight - 40, - } - } - } - - return ( -
{this.tabDom = dom}}> - - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldTabs.js b/pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldTabs.js deleted file mode 100644 index de8130d..0000000 --- a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/FieldTabs.js +++ /dev/null @@ -1,22 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {Tabs} from '../../../hrmComsPublic/index'; -import FieldDataList from './FieldDataList.js'; - -@observer -export default class FieldTabs extends Component{ - render(){ - const { - store - } = this.props; - const {mainTabProps} = store; - - return ( -
- - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/GroupList.js b/pc4backstage/hrmAttendance/components/kqMonthReportSetting/GroupList.js deleted file mode 100644 index e69de29..0000000 diff --git a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/GroupListSetting.js b/pc4backstage/hrmAttendance/components/kqMonthReportSetting/GroupListSetting.js deleted file mode 100644 index 884b6ba..0000000 --- a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/GroupListSetting.js +++ /dev/null @@ -1,19 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog, WeaTableEditable} from 'ecCom'; - -@observer -export default class GroupListSetting extends Component{ - render(){ - const { - store - } = this.props; - const {groupListSettingDialogProps, groupListTableProps} = store; - - return ( - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/index.js b/pc4backstage/hrmAttendance/components/kqMonthReportSetting/index.js deleted file mode 100644 index b16f21d..0000000 --- a/pc4backstage/hrmAttendance/components/kqMonthReportSetting/index.js +++ /dev/null @@ -1,64 +0,0 @@ -import '../../style/kqMonthReportSetting.less'; -import React, {Component} from 'react'; -import {inject,observer} from 'mobx-react'; -import {WeaTop, WeaAlertPage} from 'ecCom'; -import {i18n} from '../../public/i18n'; -import {Spin} from 'antd' -import FieldTabs from './FieldTabs.js'; -import CreateFieldDefine from './CreateFieldDefine.js'; -import CreateGroup from './CreateGroup.js'; -import GroupListSetting from './GroupListSetting.js'; - -@inject('kqMonthReportSetting') -@observer -export default class KQMonthReportSetting extends Component{ - componentDidMount() { - this.init(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - init = () => { - const { - kqMonthReportSetting: store - } = this.props; - store.checkAuthorized('kq/reportFieldDefine', null, store.init, null, false); - } - - render(){ - const { - kqMonthReportSetting: store - } = this.props; - const { - containerInitFinished, - loading, - topProps - } = store; - - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && - - - - - - - - - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/newHolidayRule/BalanceConversionRules.js b/pc4backstage/hrmAttendance/components/newHolidayRule/BalanceConversionRules.js deleted file mode 100644 index 4f56472..0000000 --- a/pc4backstage/hrmAttendance/components/newHolidayRule/BalanceConversionRules.js +++ /dev/null @@ -1,364 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaFormItem, - WeaInputNumber, - WeaLocaleProvider, -} from 'ecCom'; -import {i18n} from '../../public/i18n.js' -const getLabel = WeaLocaleProvider.getLabel; - -@observer -class BalanceConversionRules extends React.Component { - constructor(props) { - super(props); - } - - //头部 - getHeader = () => { - const { - store - } = this.props, { - conversionRules, - dialog, - setTimeInterval, - } = store, { - timeInterval - } = conversionRules, { - form, - isEnable - } = dialog; - - const { - distributionMode, //余额发放方式 - } = form.getFormParams(); - - return ( -
- - - - { distributionMode === '2' ? i18n.label['527582'] : getLabel('505549',"工龄")} - {`${getLabel('505550',"区间")} : `} - - - setTimeInterval(val)}/> - - {i18n.label['527583']} - -
- ) - } - - getBalancePaymentMethods = () => { - const { - store - } = this.props, { - conversionRules, - dialog, - changeBalanceConversionRules, - delBalanceConversionRule, - } = store, { - balanceConversionRules, - unit - } = conversionRules, { - form, - isEnable, - } = dialog; - - const { - distributionMode, //余额发放方式 - } = form.getFormParams(); - - const balancePaymentMethods = []; - - balanceConversionRules.map((balanceConversionRule, index) => { - const { - timePoint, - amount - } = balanceConversionRule; - - balancePaymentMethods.push( -
- - { distributionMode === '2' ? getLabel('505548',"司龄") : getLabel('505549',"工龄")} - - - {`${index === 0 ? '<' : '≥'}`} - - - {`${[0,1].includes(index) ? 1 : timePoint}${getLabel('505552',"年")} , ` } - - - {getLabel('505551',"享有")} - - changeBalanceConversionRules(index, val)}/> - - - {`${unit ? unit : getLabel(505553,'天')}${window.e9_locale.userLanguage == '7'? '' : ' '}${i18n.label['527585']}`} - - {( (isEnable === '1') && (index > 1) && index === (balanceConversionRules.length - 1) ) && delBalanceConversionRule()}> - - } -
- ) - }) - - return balancePaymentMethods; - } - - addRule = () => { - const { - store - } = this.props, { - addBalanceConversionRule, - dialog - } = store, { - isEnable - } = dialog; - - if (isEnable === '0') { - return null; - } - - return ( - - - {getLabel('505555',"添加规则")} - - ) - } - - render() { - return (
- { - this.getHeader() - } - { - this.getBalancePaymentMethods() - } - { - this.addRule() - } -
) - } -} - -@observer -class MixBalanceConversionRulesNew extends React.Component { - constructor(props) { - super(props); - } - - getHeader = () => { - const { - store - } = this.props, { - dialog, - conversionRules - } = store, { - form - } = dialog, { - unit: ut - } = conversionRules; - - const labels = [getLabel('505549', "工龄"), getLabel('505548', "司龄"), getLabel('505556', "法定年假"), getLabel('505557', "福利年假")]; - - return ( -
- { - labels.map( (label,index) => { - let unit; - if([0,1].includes(index)){ - unit = getLabel('505552',"年"); - }else{ - unit = ut ? ut : getLabel(505553,'天'); - } - return ( -
- - {`${label}(${unit})`} -
- ) - }) - } -
- ) - } - - getBalancePaymentMethods = () => { - const { - conversionRules, - changeEntryTime, //司龄输入框事件 - changeWorkYear, //工龄输入框事件 - changeLegalAmount, //法定年假输入框事件 - changeWelfareAmount, //福利年假输入框事件 - delBalanceConversionRule, - dialog - } = this.props.store, { - mixBalanceConversionRules, //工龄+司龄余额发放规则 - } = conversionRules, { - isEnable - } = dialog; - - const balancePaymentMethods = []; - - //工龄、司龄列 - const ageInputNumber = (params) => { - const { - value, - handleChange - } = params; - - return ( - - - - handleChange(val)} - /> - - - ) - } - - //法定年假、福利年假列 - const balanceInputNumber = (params) => { - const { - value, - handleChange - } = params; - - return ( - - handleChange(val)} - /> - - ) - } - - //遍历混合余额发放规则 - mixBalanceConversionRules.map((mixBalanceConversionRule, outsideIndex) => { - const { - entryTime, //司龄 - workYear, //工龄 - legalAmount, //法定年假 - welfareAmount, //福利年假 - } = mixBalanceConversionRule; - - //outsideIndex: 行索引值 - balancePaymentMethods.push( -
- - { - ageInputNumber({ - value: workYear, - handleChange: (val) => changeWorkYear(outsideIndex, val) - }) - } - - - { - ageInputNumber({ - value: entryTime, - handleChange: (val) => changeEntryTime(outsideIndex, val) - }) - } - - - { - balanceInputNumber({ - value: legalAmount, - handleChange: (val) => changeLegalAmount(outsideIndex, val) - }) - } - - - { - balanceInputNumber({ - value: welfareAmount, - handleChange: (val) => changeWelfareAmount(outsideIndex, val) - }) - } - - { - (isEnable === '1' && outsideIndex > 0 && outsideIndex === (mixBalanceConversionRules.length - 1) ) && ( - delBalanceConversionRule({type:'mix'}) }> - - - ) - } - -
- ) - }) - - return balancePaymentMethods - } - - addRule = () => { - const { - store - } = this.props, { - addBalanceConversionRule, - dialog - } = store, { - isEnable - } = dialog; - - if (isEnable === '0') { - return null; - } - - return ( - addBalanceConversionRule({type:'mix'})}> - - - {getLabel('505555',"添加规则")} - - - ) - } - - render() { - return ( -
-
- { - this.getHeader() - } - { - this.getBalancePaymentMethods() - } - { - this.addRule() - } -
-
- ); - } -} - -export { - BalanceConversionRules, - MixBalanceConversionRulesNew, -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/newHolidayRule/Dialog.js b/pc4backstage/hrmAttendance/components/newHolidayRule/Dialog.js deleted file mode 100644 index 53099c3..0000000 --- a/pc4backstage/hrmAttendance/components/newHolidayRule/Dialog.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaDialog, -} from 'ecCom'; -import { - Loading, -} from '../../public/learn'; -import DialogForm from './DialogForm'; - -@observer -export default class Dialog extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - store - } = this.props, { - DIALOG, - dialog, - dialogButtons, - } = store; - - return ( - - { - dialog.loading ? : - } - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/newHolidayRule/DialogForm.js b/pc4backstage/hrmAttendance/components/newHolidayRule/DialogForm.js deleted file mode 100644 index ab6f463..0000000 --- a/pc4backstage/hrmAttendance/components/newHolidayRule/DialogForm.js +++ /dev/null @@ -1,227 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaSwitch -} from 'comsMobx'; -import { - WeaFormItem, - WeaLocaleProvider, -} from 'ecCom'; -import { - MagicForm, -} from '../../public/sweet-form.js'; -import { - BalanceConversionRules, - MixBalanceConversionRulesNew -} from './BalanceConversionRules.js'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class DialogForm extends React.Component { - constructor(props) { - super(props); - } - - handleFormChange = (data) => { - const key = Object.keys(data)[0]; - const value = data[key].value; - - const { - store - } = this.props, { - dialog, - getUnitName, - } = store, { - form - } = dialog; - - (key === 'scopeType' && value === '0') && ['scopeValue'].map(key => { - form.updateFields({ - [key]: [] - }); - }); - - (key === 'distributionMode' && !['2', '3', '6'].includes(value)) && ['resetBalanceConversionRules'].map(f => { - this.props.store[f]() - }); - - (key === 'distributionMode' && value !== '4') && ['annualAmount'].map(key => { - this.updateFormFields(key, 1); - }); - - (key === 'validityRule' && value !== '3') && ['expirationMonth', 'expirationDay'].map(key => { - this.updateFormFields(key, '1'); - }); - - (key === 'extensionEnable' && value === '0') && ['extendedDays'].map((key, index) => { - this.updateFormFields(key, 90); - }); - - if (key === 'typeId') { - getUnitName(value); - } - - } - - updateFormFields = (key, val) => { - const { - store - } = this.props, { - dialog - } = store, { - form - } = dialog; - - form.updateFields({ - [key]: { - value: val - } - }); - } - - //获取同一行的表单元素 - getTransverseSiblingComponents = (params) => { - const { - items, - form - } = params; - - //当没有表单元素传入时,直接返回 - if (!items) { - return - } - - let extendedDays, expirationDay; - - items.map((item, index) => { - const { - domkey - } = item; - - if (domkey[0] === 'extendedDays') { - const { - extensionEnable - } = form.getFormParams(); - - if (parseInt(extensionEnable) === 0) { - return; - } - - //同一行的第二个表单元素 - extendedDays = ( - -
- -
- {`${getLabel('505553',"天")}${getLabel('505559',"内")}${getLabel('505560',"可继续使用")}`} -
- ) - } - - if (domkey[0] === 'expirationDay') { - expirationDay = ( -
- -
- ) - } - }); - - const transverseSiblingComponents = { - 'extensionEnable': extendedDays, - 'expirationMonth': expirationDay - }; - - return transverseSiblingComponents; - } - - getTransverseSecondComponent = (conditions) => { - if (conditions.length === 0) return; - - let transverseSecondComponents = []; - - conditions[0].items.map(item => { - const { - domkey - } = item; - //extensionEnable & extendedDays - //expirationMonth & expirationDay - if (['extendedDays', 'expirationDay'].includes(domkey[0])) { - transverseSecondComponents.push(item); - } - }); - - return transverseSecondComponents - } - - //【余额发放方式】开关联动自定义组件 - getCustomizedComponent = (store) => { - const { - dialog - } = store, { - form - } = dialog, { - distributionMode - } = form.getFormParams(); - - - if (!['2', '3', '6'].includes(distributionMode)) { - return - } - const c = { - 'distributionMode': distributionMode !== '6' ? : - } - - return c; - } - - render() { - const { - store - } = this.props, { - dialog, - FORMCONFIG, - staticTips, - dynamicTips, - renderBlacklist, - } = store, { - form, - conditions, - } = dialog; - - //同行的第二个表单元素 - const transverseSecondComponent = this.getTransverseSecondComponent(conditions); - - //横向复合表单元素 - const transverseSiblingComponents = this.getTransverseSiblingComponents({ - form, - items: transverseSecondComponent, - }) - - //定制组件 - const customizations = this.getCustomizedComponent(store); - - return ( - this.handleFormChange(data)} - /> - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/newHolidayRule/Search.js b/pc4backstage/hrmAttendance/components/newHolidayRule/Search.js deleted file mode 100644 index 39e49b7..0000000 --- a/pc4backstage/hrmAttendance/components/newHolidayRule/Search.js +++ /dev/null @@ -1,40 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaTab -} from 'ecCom'; - -@observer -export default class Search extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - store - } = this.props, { - TAB, - tab, - searchsBaseValue, - } = store, { - form - } = tab; - - return ( - { - if (e.keyCode == 13 && e.target.tagName === "INPUT") { - store.onSearch() - } - } } - >{form.render()}} - /> - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/newHolidayRule/Table.js b/pc4backstage/hrmAttendance/components/newHolidayRule/Table.js deleted file mode 100644 index 8b1b429..0000000 --- a/pc4backstage/hrmAttendance/components/newHolidayRule/Table.js +++ /dev/null @@ -1,74 +0,0 @@ -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); - } - - reRenderColumns = (columns, store) => { - const { - onTableTdClick, - } = store; - - columns.map(c => { - if (c.dataIndex === 'ruleName') { - c.render = function(text, record) { - const { - randomFieldId - } = record; - - return onTableTdClick(randomFieldId)}>{text} - } - } - }); - } - - onOperatesClick = (record, rIndex, operate, store) => { - const { - randomFieldId - } = record, { - index - } = operate; - - const { - onTableTdClick, - del, - log, - } = store; - - if (index === '0') { - onTableTdClick(randomFieldId); - } - if (index === '1') { - del(randomFieldId); - } - if (index === '2') { - log(randomFieldId, 'table') - } - } - - render() { - const { - store - } = this.props, { - TABLE, - table - } = 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/hrmAttendance/components/newHolidayRule/Top.js b/pc4backstage/hrmAttendance/components/newHolidayRule/Top.js deleted file mode 100644 index ca8f601..0000000 --- a/pc4backstage/hrmAttendance/components/newHolidayRule/Top.js +++ /dev/null @@ -1,41 +0,0 @@ -import { - WeaTop, - WeaRightMenu, -} from 'ecCom'; -import { - observer -} from 'mobx-react'; -import Search from './Search'; -import Table from './Table'; - -@observer -export default class Top extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - store - } = this.props, { - TOP, - top, - topButtons, - dropMenuDatas - } = store; - - return ( - - - -
- - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/newHolidayRule/index.js b/pc4backstage/hrmAttendance/components/newHolidayRule/index.js deleted file mode 100644 index c8084ff..0000000 --- a/pc4backstage/hrmAttendance/components/newHolidayRule/index.js +++ /dev/null @@ -1,64 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; -import Top from './Top'; -import Dialog from './Dialog'; - -@inject('hrmNewHolidayRule') -@observer -export default class NewHolidayRule extends React.Component { - constructor(props) { - super(props); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - componentDidMount() { - this.init(); - } - - init = () => { - const { - hrmNewHolidayRule: store - } = this.props; - - const callback = () => { - store.getRightMenu(); - store.getSearchForm(); - store.setShowSearchAd(false); - } - - store.getPermissionInfo(callback); - } - - render() { - const { - hrmNewHolidayRule: store - } = this.props, { - permission, - } = store, { - hasRight, - loading - } = permission; - - if (!hasRight) { - return loading ? : - } - return ( -
- - -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/Dialog.js b/pc4backstage/hrmAttendance/components/overtimeRule/Dialog.js deleted file mode 100644 index a548966..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/Dialog.js +++ /dev/null @@ -1,403 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaDialog, - WeaFormItem, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import DirtyComponent from './DirtyComponent.js'; -import { - CompositeForm, -} from '../../public/sweet-form.js'; -import { - Loading, -} from '../../public/learn.js'; -import { - getDialogButtons -} from '../../util/save-time-util.js'; -import RestTime from './RestTime'; -import Form from './Form' -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmOvertimeRule') -@observer -class Dialog extends React.Component { - constructor(props) { - super(props); - } - - handleCancel = () => { - this.props.hrmOvertimeRule.closeDialog(); - } - - getBtnConfigDatas = () => { - const { - overtimeRuleFormStore: { saveForm, formStore: { loading } } - } = this.props.hrmOvertimeRule; - - const btnDatas = [{ - name: getLabel('505564', '保存'), - disabled: loading, - onBtnClick: saveForm - }]; - - return btnDatas - } - - getDynamicFields = () => { - //【工作日加班】表单动态域的配置项 - const workTime = [{ - passiveKey: 'startTime2', //加班起算时间 - activeKey: 'computingMode2', //加班方式计算 - showValue: '1,2,3' - }, { - passiveKey: 'minimumLen2', //最小加班时长 - activeKey: 'computingMode2', //加班方式计算 - showValue: '1,2,3' - }, { - passiveKey: 'computingMode2', //加班方式计算 - activeKey: 'overtimeEnable2', //允许加班 - showValue: '1' - }, { - passiveKey: 'startTime2', //加班起算时间 - activeKey: 'overtimeEnable2', //允许加班 - showValue: '1' - }, { - passiveKey: 'minimumLen2', //最小加班时长 - activeKey: 'overtimeEnable2', //允许加班 - showValue: '1' - }, { - passiveKey: 'paidLeaveEnable2', //转为调休余额 - activeKey: 'overtimeEnable2', //允许加班 - showValue: '1' - }, { - passiveKey: 'lenOfOvertime2', //加班时长 - activeKey: 'paidLeaveEnable2', //转为调休余额 - showValue: '1' - }, { - passiveKey: 'lenOfLeave2', //调休时长 - activeKey: 'paidLeaveEnable2', //转为调休余额 - showValue: '1' - }]; - - //【休息日加班】表单动态域的配置项 - const restTime = [{ - passiveKey: 'minimumLen3', //最小加班时长 - activeKey: 'computingMode3', //加班方式计算 - showValue: '1,2,3' - }, { - passiveKey: 'computingMode3', //加班方式计算 - activeKey: 'overtimeEnable3', //允许加班 - showValue: '1' - }, { - passiveKey: 'minimumLen3', //最小加班时长 - activeKey: 'overtimeEnable3', //允许加班 - showValue: '1' - }, { - passiveKey: 'paidLeaveEnable3', //转为调休余额 - activeKey: 'overtimeEnable3', //允许加班 - showValue: '1' - }, { - passiveKey: 'hasRestTime3', //排除休息时间 - activeKey: 'overtimeEnable3', //允许加班 - showValue: '1' - }, { - passiveKey: 'lenOfOvertime3', //加班时长 - activeKey: 'paidLeaveEnable3', //转为调休余额 - showValue: '1' - }, { - passiveKey: 'lenOfLeave3', //调休时长 - activeKey: 'paidLeaveEnable3', //转为调休余额 - showValue: '1' - }]; - - //【节假日加班】表单动态域的配置项 - const holidayTime = [{ - passiveKey: 'minimumLen1', //最小加班时长 - activeKey: 'computingMode1', //加班方式计算 - showValue: '1,2,3' - }, { - passiveKey: 'computingMode1', //加班方式计算 - activeKey: 'overtimeEnable1', //允许加班 - showValue: '1' - }, { - passiveKey: 'minimumLen1', //最小加班时长 - activeKey: 'overtimeEnable1', //允许加班 - showValue: '1' - }, { - passiveKey: 'paidLeaveEnable1', //转为调休余额 - activeKey: 'overtimeEnable1', //允许加班 - showValue: '1' - }, { - passiveKey: 'hasRestTime1', //排除休息时间 - activeKey: 'overtimeEnable1', //允许加班 - showValue: '1' - }, { - passiveKey: 'lenOfOvertime1', //加班时长 - activeKey: 'paidLeaveEnable1', //转为调休余额 - showValue: '1' - }, { - passiveKey: 'lenOfLeave1', //调休时长 - activeKey: 'paidLeaveEnable1', //转为调休余额 - showValue: '1' - }]; - - const dynamicFields = [...workTime, ...restTime, ...holidayTime]; - - return dynamicFields; - } - - getDirtyKeys = () => { - return ['startTime2', 'minimumLen2', 'minimumLen3', 'minimumLen1']; - } - - handleFormChange = (form, cb) => { - const key = Object.keys(cb)[0]; - //关闭【允许加班】开关后,重置【加班方式计算】,包括:radio select、加班起算时间和最小加班时长 - //勾掉【转为调休余额】时,重置调休比例。 - if (cb[key].value === '0') { - [2, 3, 1].map(v => { - if (key === `overtimeEnable${v}`) { - ['computingMode', 'paidLeaveEnable', 'minimumLen', 'lenOfOvertime', 'lenOfLeave', 'hasRestTime'].map((key, index) => { - let value; - if (index === 0) { - value = '1'; - } else if ([1, 5].includes(index)) { - value = '0'; - } else if (index === 2) { - value = 30 - } else { - value = 1 - } - form.updateFields({ - [`${key}${v}`]: { - value - } - }); - }); - if (v === 2) { - form.updateFields({ - [`startTime${v}`]: { - value: 30 - } - }); - } - if ([3, 1].includes(v)) { - this.props.hrmOvertimeRule.resetRestTime(v === 3 ? 'rstTimes' : 'vacationTimes'); - } - } - if (key === `paidLeaveEnable${v}`) { - ['lenOfOvertime', 'lenOfLeave'].map((key, index) => { - form.updateFields({ - [`${key}${v}`]: { - value: 1 - } - }); - }); - } - if (key === `hasRestTime${v}`) { - this.props.hrmOvertimeRule.resetRestTime(v === 3 ? 'rstTimes' : 'vacationTimes'); - } - - }); - } - - } - - getLongitudinalSiblingComponents = (params) => { - const { - form, - items - } = params; - - if (items.length === 0) return; - - const all = {}; - //items为二维数组 - items.map((oneDimensionalArray, index) => { - const innerArray = []; - - const number = (index === 0) ? 2 : (index === 1) ? 3 : 1; - - let lenOfOvertime, lenOfLeave; - - ['lenOfOvertime', 'lenOfLeave'].map((key, index) => { - const value = form.getFormParams()[`${key}${number}`]; - if (index === 0) { - lenOfOvertime = value - } else { - lenOfLeave = value; - } - }); - - oneDimensionalArray.map((item, index) => { - const propertys = { - tipPosition: 'bottom', - error: form.getError(item), - colon: false, - }; - if (index === 0) { - Object.assign(propertys, { - label: getLabel('505598', "加班时间转调休时间的比例"), - labelCol: { - span: 17 - }, - wrapperCol: { - span: 7 - }, - style: { - width: '47%' - }, - errorStyle: { - width: 140, - marginLeft: -90 - } - }) - - - } else { - Object.assign(propertys, { - label: '', - labelCol: { - span: 2 - }, - wrapperCol: { - span: 22 - }, - style: { - width: '48%' - } - }); - - } - - Object.assign(propertys.style, { - float: 'left' - }) - - innerArray.push( - - - { - (index === 0)&&: - } - { - (index === 1) && {`${getLabel('6151',"加班")}${lenOfOvertime ? lenOfOvertime : ''}${getLabel('391',"小时")}, ${getLabel('505599',"转调休")}${lenOfLeave ? lenOfLeave : ''}${getLabel('391',"小时")}`} - } - - ) - }); - - Object.assign(all, { - [`paidLeaveEnable${number}`]:
{innerArray}
- }); - }); - - const longitudinalSiblingComponents = {}; - - ['paidLeaveEnable2', 'paidLeaveEnable3', 'paidLeaveEnable1'].map(field => { - if (form.getFormParams()[field] === '1') { - Object.assign(longitudinalSiblingComponents, { - [field]: all[field] - }); - } - }); - - return longitudinalSiblingComponents; - } - - getLongitudinalSecondComponent = (conditions) => { - const longitudinalSecondComponents = []; - - let innerArray = []; - - conditions.map(c => { - c.items.map(item => { - const { - domkey - } = item; - - if (['lenOfOvertime2', 'lenOfLeave2', 'lenOfOvertime3', 'lenOfLeave3', 'lenOfOvertime1', 'lenOfLeave1'].includes(domkey[0])) { - innerArray.push(item); - - if (innerArray.length === 2) { - longitudinalSecondComponents.push(innerArray); - innerArray = []; - } - } - }); - }); - - return longitudinalSecondComponents; - } - - getRenderBlacklist = () => { - return ['lenOfOvertime2', 'lenOfLeave2', 'lenOfOvertime3', 'lenOfLeave3', 'lenOfOvertime1', 'lenOfLeave1']; - } - - getCustomizedComponent = (form) => { - const { - hasRestTime3, - hasRestTime1, - } = form.getFormParams(); - const { - restTime - } = this.props.hrmOvertimeRule, { - rstTimes, - vacationTimes - } = restTime - - const customizations = { - hasRestTime3: hasRestTime3 === '1' && , - hasRestTime1: hasRestTime1 === '1' && - } - - return customizations; - } - - render() { - const { - dialog, - dialogStaticProps, - style, - formElements, - overtimeRuleFormStore - } = this.props.hrmOvertimeRule, { - title, - visible, - } = dialog, { - form, - date, - loading, - conditions, - } = formElements; - - return ( - - { - visible && ( -
-
-
- ) - } -
- ) - } -} - -export default Dialog \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/DirtyComponent.js b/pc4backstage/hrmAttendance/components/overtimeRule/DirtyComponent.js deleted file mode 100644 index 1f06845..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/DirtyComponent.js +++ /dev/null @@ -1,73 +0,0 @@ -import { - WeaFormItem, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -const getLabel = WeaLocaleProvider.getLabel; - -class DirtyComponent extends React.Component { - constructor(props) { - super(props); - } - - getChildren = () => { - const { - domkey, - label, - form, - item, - } = this.props; - - const stuff = (
- -
); - - if (domkey === 'startTime2') { - return (
- - {`${getLabel('505600',"最后一次下班后")}`} - - {stuff} - - {`${getLabel('15049',"分钟")}, ${getLabel('505601',"开始计算加班")}` } - -
) - } else { - return (
- {stuff} - - {`${getLabel('15049',"分钟")}`} - - - {`${getLabel('505602',"小于该时长则加班时长记为0")}`} - -
) - } - } - - render() { - const { - label, - form, - item - } = this.props; - - return ( - - {this.getChildren()} - - ) - } -} - - -export default DirtyComponent \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/Form.js b/pc4backstage/hrmAttendance/components/overtimeRule/Form.js deleted file mode 100644 index 0314f2f..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/Form.js +++ /dev/null @@ -1,27 +0,0 @@ -import { - observer -} from 'mobx-react' -import { - Loading, -} from '../../public/learn.js' -import { MagicForm } from '../../public/valhalla/components/index.js' - -@observer -export default class Form extends React.Component { - componentDidMount() { - const { store: { getForm } } = this.props - getForm() - } - - render() { - const { store: { formStore } } = this.props - const { loading } = formStore - - if (loading) { - return - } - return ( - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/OvertimeRule.js b/pc4backstage/hrmAttendance/components/overtimeRule/OvertimeRule.js deleted file mode 100644 index d61ac6c..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/OvertimeRule.js +++ /dev/null @@ -1,93 +0,0 @@ -import { - WeaError, - WeaTimePicker, - WeaInputNumber, -} from 'ecCom' -import { i18n } from '../../public/i18n'; - -export default class OvertimeRule extends React.Component { - render() { - const { - datas, - onChange, - groupType, - ruleType, - onAdd, - onDel, - onRef, - rowConfigs, - startDelIndex, - className, - width = 400, - hasBtn = true, - onBlur, - errorTip = i18n.label['528763']() - } = this.props - - return ( -
- {datas.map( (data,index) => { - return ( -

- {rowConfigs.map(c => { - const {label,key} = c - const value = data[key] - - if (label) { - return {label} - }else{ - if ([ 'time','startTime','endTime'].includes(key) ) { - return ( - onRef(ref,index,groupType)} - error={data.errorTip || errorTip} - className='overtimeError' - > - onBlur(val,index,key,groupType,ruleType)} onChange={val => onChange(val,index,key,groupType,ruleType)} viewAttr={data.viewAttr ? data.viewAttr : '3'}/> - - ) - } - if ([ 'work','overtime'].includes(key) ) { - return ( - onRef(ref,index,groupType)} - error={data.errorTip || errorTip} - className='overtimeError' - > - onBlur(val,index,key,groupType,ruleType)} onChange={val => onChange(val,index,key,groupType,ruleType)} min={0} precision={2} viewAttr={3}/> - - ) - } - return ( - onRef(ref,index,ruleType)} - error={data.errorTip || errorTip} - className='overtimeError' - > - onBlur(val,index,key,groupType,ruleType)} onChange={val => onChange(val,index,key,groupType,ruleType)} min={0} precision={2} viewAttr={3}/> - - ) - } - })} - { - (index >= startDelIndex && datas.length > 1 && hasBtn ) && onDel(index, groupType,ruleType)}>{i18n.label.delete()} - } -

- ) - })} - { - hasBtn && ( - - - onAdd(groupType,ruleType)}>{i18n.label['388877']()} - - ) - } - -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/RestTime.js b/pc4backstage/hrmAttendance/components/overtimeRule/RestTime.js deleted file mode 100644 index e3cb6a8..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/RestTime.js +++ /dev/null @@ -1,86 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaSelect, - WeaFormItem, - WeaTimePicker, - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmOvertimeRule') -@observer -class RestTime extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - hrmOvertimeRule, - times, - type, - } = this.props, { - handleTimePickerChange, - handleSelectChange, - addRestTime, - delRestTime, - options, - } = hrmOvertimeRule; - - return ( -
{ - times.map( (time,rowIndex) => { - const { - startTime, - endTime, - startType, - endType, - } = time; - - return ( -
-
- { - [getLabel('505603',"休息时间"),'-'].map( (label,colIndex) => { - return ( - - handleTimePickerChange(value,rowIndex,colIndex,type)} - /> - - ) - }) - } -
- {times.length > 1 && delRestTime(rowIndex,type)}>{getLabel('91',"删除")}} -
- ) - }) - } - addRestTime(type)}> - - {getLabel('505604',"添加休息时间")} - -
- ); - } -} - -export default RestTime \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/Table.js b/pc4backstage/hrmAttendance/components/overtimeRule/Table.js deleted file mode 100644 index bbdcb1d..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/Table.js +++ /dev/null @@ -1,135 +0,0 @@ -import { - observer, - inject -} from 'mobx-react'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import { - confirmation, -} from '../../util/save-time-util.js'; -const WeaTable = WeaTableNew.WeaTable; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmOvertimeRule') -@observer -class Table extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.init(); - } - - init = () => { - this.props.hrmOvertimeRule.getSearchList(); - } - - componentWillUnmount() { - this.props.hrmOvertimeRule.resetTable(); - } - - reRenderColumns = (columns) => { - const { - openDialog, - setCheckedRowId, - setSelectedRowId, - } = this.props.hrmOvertimeRule; - - columns.map(c => { - //加班规则名称 - if (c.dataIndex === 'name') { - c.render = (text, record, index) => { - const { - namespan, - randomFieldId - } = record; - - return {setSelectedRowId(randomFieldId);openDialog({ - title: getLabel('505605', "编辑加班规则"), - type: 1 - })} }>{namespan} - } - } - //是否默认 - if (c.dataIndex === 'isDefault') { - c.render = (text, record, index) => { - const { - isDefault, - randomFieldId - } = record; - - //当前行是否选中 - const isChecked = (isDefault === '1') ? true : false; - //设置默认选中行的id - (isDefault === '1') && setCheckedRowId(randomFieldId); - - return - } - } - }); - } - - handleRadioChange = (id) => { - this.props.hrmOvertimeRule.setCheckedRowId(id); - } - - onOperatesClick = (record, rowIndex, operate) => { - const { - randomFieldId - } = record, { - index - } = operate; - - const { - setSelectedRowId, - openDialog, - delOverTimeRule, - log, - } = this.props.hrmOvertimeRule; - - //设置选中行的id - setSelectedRowId(randomFieldId); - - if (index === '0') { - openDialog({ - title: getLabel('505605', "编辑加班规则"), - type: 1 - }); - }; - if (index === '1') { - confirmation.showDelConfirm({ - type: 0, - logic: (type) => delOverTimeRule(type) - }); - } - if (index === '2') { - log(randomFieldId, 'table'); - } - } - - render() { - const { - hrmOvertimeRule - } = this.props, { - table - } = hrmOvertimeRule, { - tableStore, - } = table; - - return ( - this.reRenderColumns(columns)} - onOperatesClick={this.onOperatesClick}/> - ) - } -} - -export default Table \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/Top.js b/pc4backstage/hrmAttendance/components/overtimeRule/Top.js deleted file mode 100644 index 45c0530..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/Top.js +++ /dev/null @@ -1,116 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaTab, - WeaRightMenu, - WeaLocaleProvider, - WeaHelpfulTip -} from 'ecCom'; -import { - MagicForm, -} from '../../public/sweet-form.js'; -import Table from './Table'; -import TimeSelectionSetting from '../timeSelection'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmOvertimeRule') -@observer -class Top extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.hrmOvertimeRule.getMenus(); - } - - getWrapperStyle = () => { - const width = window.innerWidth || document.body.clientWidth; - - if (width < 1366) { - return { - padding: '20px 26%' - } - } else { - return { - padding: '20px 33%' - } - } - } - - getTransverseSiblingComponents = () => { - const { - form - } = this.props.hrmOvertimeRule.formElements, { - timeselection - } = form.getFormParams(); - - if(timeselection === "1"){ - return { - timeselection: this.props.hrmOvertimeRule.getDefForm(3)}>{getLabel('513303','选项名称定义')}, - } - }else{ - return { - timeselection: - } - } - - } - - render() { - const { - hrmOvertimeRule - } = this.props, { - topButtons, - dropMenuDatas, - topComponentStaticProps, - table, - tab, - tabStaticProps, - formElements, - formConfig, - dynamicTips, - handleFormElementsChange, - timeSelectionDialog, - formTarget - } = hrmOvertimeRule, { - tableStore - } = table, { - selectedKey - } = tab, { - form - } = formElements; - - return ( - - - - { - (selectedKey === '0') - ?
- : handleFormElementsChange()} - /> - } - - - - ) - } -} - -export default Top \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/overtimeRule/index.js b/pc4backstage/hrmAttendance/components/overtimeRule/index.js deleted file mode 100644 index 4e00c21..0000000 --- a/pc4backstage/hrmAttendance/components/overtimeRule/index.js +++ /dev/null @@ -1,85 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; - -import Top from './Top'; -import Dialog from './Dialog'; -import {Dialog as DemoDialog} from '../../public/valhalla/components/index.js' -import {addContentPath} from '../../util/index.js' -import '../../style/overtimeRule.less' - -@inject('hrmOvertimeRule') -@observer -class OvertimeRule extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.init() - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.props.hrmOvertimeRule.refreshPage(); - } - } - - init = () => { - ['refreshPage', 'getPermissionInfo'].map(f => { - this.props.hrmOvertimeRule[f](); - }); - } - - render() { - const { - hrmOvertimeRule - } = this.props, { - pageAccessPermission, - overtimeRuleFormStore:{dialogStore,demonstration} - } = hrmOvertimeRule, { - hasRight, - loading - } = pageAccessPermission; - - if (!hasRight) { - return loading ? : - } else { - return ( -
- - - - {demonstration.map(data => { - const {title,desc} = data - - return ( -
-
{title}
- { desc.map(d => { - if (/\.jpg$/.test(d)) { - return ( - - ) - }else{ - return

{d}

- } - }) } -
- ) - })} -
-
- - ) - } - } -} - -export default OvertimeRule \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/Analysis.js b/pc4backstage/hrmAttendance/components/scheduleSetting/Analysis.js deleted file mode 100644 index 6a318d0..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/Analysis.js +++ /dev/null @@ -1,47 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {Table} from 'antd'; - -@observer -export default class Analysis extends Component{ - constructor(props){ - super(props); - this.state = { - h: 300 - } - } - - componentDidMount(){ - window.addEventListener('resize', this.resizeHandle); - this.calculateH(); - } - - componentWillUnmount() { - window.removeEventListener('resize', this.resizeHandle); - } - - resizeHandle = (e) => { - this.calculateH(); - } - - calculateH = () =>{ - let h = $('.content').height() - 81 - 30; - this.setState({ - h - }) - } - - render(){ - const {store} = this.props; - const {analysisTable} = store; - const {columns, datas} = store.toJS(analysisTable); - const x = (columns.length -2) * 51 + 250, y = this.state.h; - return ( -
-
-
- - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/Bar.js b/pc4backstage/hrmAttendance/components/scheduleSetting/Bar.js deleted file mode 100644 index 728511b..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/Bar.js +++ /dev/null @@ -1,53 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDatePicker, WeaAuth, WeaUpload, WeaLocaleProvider} from 'ecCom'; -import {Button} from 'antd'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Bar extends Component{ - render(){ - const {store} = this.props; - const {searchDate, setSearchDate, getBatchShiftScheduleFrom, batchShiftScheduleFromParams, holidaySetting, importExcel, exportExcel, showHasNotAccount, showAll, multiDelete, multiDeleteSchedule} = store; - return ( -
- - - { - importExcel(ids[0]); - } - } > - - - - - - - { - batchShiftScheduleFromParams.visible && - } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/CycleSetting.js b/pc4backstage/hrmAttendance/components/scheduleSetting/CycleSetting.js deleted file mode 100644 index 6dbbb02..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/CycleSetting.js +++ /dev/null @@ -1,103 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaNewScroll, WeaFormItem, WeaSelect, WeaLocaleProvider} from 'ecCom'; -import { i18n } from '../../public/i18n'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class CycleSetting extends Component{ - constructor(props){ - super(props); - this.state = { - options: [ - { - key: "1", - showname: getLabel('125899','继续排班'), - selected: true - }, - { - key: "2", - showname: getLabel('125837','取消排班'), - } - ], - value: '1', - } - } - - onClickHandle = serial => { - const {store, target, date, record, hide } = this.props; - const data = { - serial, - date - } - if(record != null) - Object.assign(data, { - resourceid: record.resourceid - }); - store.onCycleClick([data], target, this.state.value === '1'); - hide && hide(); - } - - onSelectChangeHandle = (v, showname) => { - this.setState({value: v}) - this.props.onSelectHandle && this.props.onSelectHandle(); - } - - render(){ - const {store, target ,onSelectHandle} = this.props; - const {onSelectChangeHandle} = store; - const serialInfo = store.toJS(store.serialInfo); - let lbl; - switch(target){ - case 'resource': - lbl =
{getLabel('500465','当月排班')}
; - break; - default: - lbl =
{getLabel('500466','从该天开始周期排班至月底')}
; - break; - } - - return ( -
- -
- {lbl} -
- - - -
-
- - { - onSelectHandle && onSelectHandle() - onSelectChangeHandle(val,'2') - }}/> - -
-
- - { - onSelectHandle && onSelectHandle() - onSelectChangeHandle(val,'3') - }}/> - -
- { - serialInfo.map(serial =>
this.onClickHandle(serial.serial)}>{serial.name}
) - } -
-
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/DaySetting.js b/pc4backstage/hrmAttendance/components/scheduleSetting/DaySetting.js deleted file mode 100644 index 0864f69..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/DaySetting.js +++ /dev/null @@ -1,64 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaNewScroll, WeaLocaleProvider} from 'ecCom'; -import filter from 'lodash/filter'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class DaySetting extends Component{ - onClickHandle = id => { - const {store, target, date, record, hide } = this.props; - const data = {}; - if(target === 'resource'){ - Object.assign(data, { - shiftid: id - }); - }else{ - Object.assign(data, { - [date]: id - }); - } - if(record != null) - Object.assign(data, { - resourceid: record.resourceid - }); - store.onScheduleChange([data], target); - hide && hide(); - } - - render(){ - const {store, target } = this.props; - const shiftList = filter(store.toJS(store.shiftList), v => v.isDelete != '1'); - let lbl; - switch(target){ - case 'cell': - lbl =
{getLabel('500467','修改该员工当天班次')}
; - break; - case 'resource': - lbl =
{getLabel('500468','修改该员工当月所有班次')}
; - break; - case 'header': - lbl =
{getLabel('500469','修改所有员工当天班次')}
; - break; - } - - shiftList.length > 1 && shiftList.push({ - id: '-999', - bgColor: '#ddd', - name: getLabel(131966, '删除') - }); - - return ( -
- -
- {lbl} - { - shiftList.map(shift =>
this.onClickHandle(shift.id)}>{shift.name}
) - } -
-
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/DropdownOverlay.js b/pc4backstage/hrmAttendance/components/scheduleSetting/DropdownOverlay.js deleted file mode 100644 index b2af729..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/DropdownOverlay.js +++ /dev/null @@ -1,56 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import Tabs from '../../../hrmengine/coms/Tabs'; -import DaySetting from './DaySetting'; -import CycleSetting from './CycleSetting'; -import {WeaLocaleProvider} from "ecCom"; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class DropdownOverlay extends Component{ - constructor(props){ - super(props); - } - - componentWillReceiveProps(nextProps){ - if(this.props.v != nextProps.v){ - const {store} = this.props; - const {editTabConfig} = store; - const config = store.toJS(editTabConfig); - config.tabChangeHandle('1'); - } - } - - render(){ - if(!this.props.v) - return
; - - const {store} = this.props; - const {editTabConfig, serialInfo} = store; - let config = store.toJS(editTabConfig); - if(serialInfo == null) - config.tabs = config.tabs.splice(0,1); - const tabProps = { - tabConfig: config, - tabChangeHandle: config.tabChangeHandle, - activeTabInfo: { - activeTabKey: config.activeTabKey, - activeTabIndex: store.getTabIndex(config.tabs, config.activeTabKey) - }, - store: store - } - let height = 300; - const shiftList = store.toJS(store.shiftList); - const h = shiftList.length * 38 + 100; - if(h < height) - height = h; - return ( -
- - - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/GroupEdit.js b/pc4backstage/hrmAttendance/components/scheduleSetting/GroupEdit.js deleted file mode 100644 index 8ba4ced..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/GroupEdit.js +++ /dev/null @@ -1,15 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog} from 'ecCom'; -import GroupInfo4Coms from '../groupSetting/GroupInfo4Coms'; - -@observer -export default class GroupEdit extends Component{ - render(){ - return ( - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/HolidaySetting.js b/pc4backstage/hrmAttendance/components/scheduleSetting/HolidaySetting.js deleted file mode 100644 index 0bb0334..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/HolidaySetting.js +++ /dev/null @@ -1,12 +0,0 @@ -import React, {Component} from 'ract'; -import {observer} from 'mobx-react'; -import {WeaDialog} from 'ecCom'; - -@observer -export default class HolidaySetting extends Component{ - render(){ - return ( - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/Info.js b/pc4backstage/hrmAttendance/components/scheduleSetting/Info.js deleted file mode 100644 index 5a34d80..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/Info.js +++ /dev/null @@ -1,43 +0,0 @@ -import React, { Component } from 'react'; -import { observer } from 'mobx-react'; -import { WeaFormItem, WeaRadioGroup, WeaLocaleProvider } from 'ecCom'; -import { Button } from 'antd'; -import GroupEdit from './GroupEdit'; -import classnames from 'classnames'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Info extends Component { - constructor(props) { - super(props); - this.state = { - flag: true - } - } - render () { - const { store } = this.props; - const { radioGroupConfig, onRadioGroupChange, onClickHandle, showhideFlag } = store; - const displayClassName = classnames({ - radioGroupShow: true, - }) - const icon = classnames({ - 'icon-coms-down-001': !(showhideFlag), - 'icon-coms-up-001': showhideFlag - }) - const label = showhideFlag ? getLabel(517204, '隐藏条件') : getLabel(19496, '显示条件') - return ( -
-
- {label} - - - -
-
- -
- -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/ListCell.js b/pc4backstage/hrmAttendance/components/scheduleSetting/ListCell.js deleted file mode 100644 index d63e905..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/ListCell.js +++ /dev/null @@ -1,117 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import DropdownOverlay from './DropdownOverlay'; -import {Dropdown} from 'antd'; -import classnames from 'classnames'; -import find from 'lodash/find'; - -@observer -export default class ListCell extends Component{ - constructor(props){ - super(props); - this.state = { - v: false, - op: false - } - } - - onVisibleChangeHandle = v => { - setTimeout(() => { - if(!this.state.op){ - this.setState({v, op: false}); - }else - this.setState({op: false}); - }, 200); - } - - renderDateCell = () => { - const {store, colIndex, record} = this.props; - const {moment, toJS, searchDate, shiftList, onCellMouseEnter, onCellMouseLeave, today, groupValidatDate} = store; - let trigger = []; - const m = moment(toJS(searchDate), "YYYY-MM"); - m.set('date', colIndex); - const {start, end} = toJS(groupValidatDate); - let isBetween = true; - if(start != null){ - isBetween = m.isBetween(start, end) || m.isSame(start) || m.isSame(end); - } - // if((!m.isBefore(today) || m.isSame(today, 'day')) && isBetween) - trigger.push('click'); - const date = m.format('YYYY-MM-DD'); - - const id = record[date]; - const sList = store.toJS(shiftList); - const d = id != null ? find(sList, { id }) : null; - - let title = ''; - let name = ""; - let type = null; //rest - let background = null; - if (d != null) { - title = d.name; - name = d.name.substring(0, 2); - type = d.id === 0 ? 0 : 1; - background = d.bgColor; - } - const className = classnames({ - cell: true, - rest: type === 0, - shift: type === 1, - ['cell-disabled']: trigger.length == 0 - }); - const overlayProps = { - store, - target: 'cell', - date, - record, - v: this.state.v, - hide: () => this.setState({v: false}), - onSelectHandle: () => this.setState({op: true}) - } - return ( - } - getPopupContainer={() => document.getElementById("scheduleSetting")} - trigger={trigger} - onVisibleChange={this.onVisibleChangeHandle} - > -
onCellMouseEnter(colIndex)} onMouseLeave={onCellMouseLeave}> - {name} -
-
- ) - } - - renderNameCell = () => { - const {store, colIndex, record} = this.props; - const overlayProps = { - store, - target: 'resource', - record, - v: this.state.v, - hide: () => this.setState({v: false}), - onSelectHandle: () => this.setState({op: true}) - } - - return ( - } - getPopupContainer={() => document.getElementById("scheduleSetting")} - trigger={'click'} - onVisibleChange={this.onVisibleChangeHandle} - > -
- {record.name} -
-
- ) - } - - render(){ - const {withName} = this.props; - if(!withName) - return this.renderDateCell(); - else - return this.renderNameCell(); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/ListHeader.js b/pc4backstage/hrmAttendance/components/scheduleSetting/ListHeader.js deleted file mode 100644 index 66f97c1..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/ListHeader.js +++ /dev/null @@ -1,83 +0,0 @@ -import React, {Component} from 'react'; -import {inject, observer} from 'mobx-react'; -import {Dropdown} from 'antd'; -import DropdownOverlay from './DropdownOverlay'; -import find from 'lodash/find'; -import classnames from 'classnames'; -import {addContentPath} from '../../util/index.js' - -@inject('hrmScheduleSetting') -@observer -export default class ListHeader extends Component{ - constructor(props){ - super(props); - this.state = { - v: false, - op: false - } - } - - onVisibleChangeHandle = v => { - setTimeout(() => { - if(!this.state.op){ - this.setState({v, op: false}); - }else - this.setState({op: false}); - }, 200); - } - - render(){ - const {hrmScheduleSetting: store, weekDay, day} = this.props; - const {toJS, moment, shortWeekdays, searchDate, onCellMouseEnter, onCellMouseLeave, holidays, today, groupValidatDate} = store; - let trigger = []; - const m = moment(toJS(searchDate), "YYYY-MM"); - m.set('date', day); - const {start, end} = toJS(groupValidatDate); - let isBetween = true; - if(start != null){ - isBetween = m.isBetween(start, end) || m.isSame(start) || m.isSame(end); - } - // if((!m.isBefore(today) || m.isSame(today, 'day')) && isBetween) - trigger.push('click'); - const date = m.format('YYYY-MM-DD'); - const holidayInfo = find(toJS(holidays), {date}); - - const overlayProps = { - store, - target: 'header', - date, - v: this.state.v, - hide: () => this.setState({v: false}), - onSelectHandle: () => this.setState({op: true}) - } - - const className = classnames({ - header: true, - ['header-disabled']: trigger.length == 0 - }); - - return ( -
- } - getPopupContainer={() => document.getElementById("scheduleSetting")} - trigger={this.props.dropdown == null ? trigger : ['']} - onVisibleChange={this.onVisibleChangeHandle} - > -
onCellMouseEnter(day)} onMouseLeave={onCellMouseLeave}> -
-
{day}
-
{shortWeekdays[weekDay]}
-
- { - holidayInfo != null && -
- -1 ? 'rest' : 'work'}.png`)} /> -
- } -
-
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/ScheduleList.js b/pc4backstage/hrmAttendance/components/scheduleSetting/ScheduleList.js deleted file mode 100644 index 02ee641..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/ScheduleList.js +++ /dev/null @@ -1,81 +0,0 @@ -import React, { Component } from 'react'; -import { observer } from 'mobx-react'; -import { WeaTable } from 'ecCom'; -import { i18n } from '../../public/i18n'; - -@observer -export default class ScheduleList extends Component { - constructor(props) { - super(props); - this.state = { - h: 300 - } - } - - componentDidMount () { - window.addEventListener('resize', this.resizeHandle); - this.calculateH(); - } - - componentWillUnmount () { - window.removeEventListener('resize', this.resizeHandle); - } - - resizeHandle = (e) => { - this.calculateH(); - } - - calculateH = () => { - setTimeout(() => { - let h = $('.content').height() - ($('.btnBar').height() + 40 + $('.info').height() + 1 + 81 + 50); - this.setState({ - h - }) - }, 500) - } - - render () { - const { store } = this.props; - const { listTable, total, pageIndex, pageSize, getListTableQueryParams, getScheduleData, setSelectedRowKeys, selectedRowKeys } = store; - const { columns, datas } = store.toJS(listTable); - const x = (columns.length - 2) * 50 + 250, y = this.state.h; - const pagination = { - total, - current: pageIndex, - // defaultCurrent: pageIndex, - // defaultPageSize: pageSize, - pageSize, - showQuickJumper: true, - pageSizeOptions: [10, 20, 50, 100], - showSizeChanger: true, - showTotal: (total) => { - setTimeout(() => { - const pagination = $('.ant-table-pagination'); - const paginationTips = $('.paginationTips'); - if (pagination.length > 0 && paginationTips.length == 0) - pagination.append(`${i18n.label['505676']()}`); - }, 500); - - return `${i18n.label['18609']()} ${total} ${i18n.label['30690']()}`; - }, - onShowSizeChange: (current, pageSize) => { - getScheduleData(getListTableQueryParams(current, pageSize)); - setTimeout(() => { - this.calculateH(); - }, 0); - }, - onChange: (current) => { - getScheduleData(getListTableQueryParams(current)); - } - } - const rowSelection = { - selectedRowKeys: store.toJS(selectedRowKeys), - onChange: setSelectedRowKeys - }; - return ( -
- -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/Setting.js b/pc4backstage/hrmAttendance/components/scheduleSetting/Setting.js deleted file mode 100644 index 5f2169e..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/Setting.js +++ /dev/null @@ -1,19 +0,0 @@ -import React, { Component } from 'react'; -import { observer } from 'mobx-react'; -import { WeaNewScroll } from 'ecCom' -import Info from './Info'; -import Bar from './Bar'; -import ScheduleList from './ScheduleList'; - -@observer -export default class Setting extends Component { - render () { - return ( -
- - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/scheduleSetting/index.js b/pc4backstage/hrmAttendance/components/scheduleSetting/index.js deleted file mode 100644 index 514756b..0000000 --- a/pc4backstage/hrmAttendance/components/scheduleSetting/index.js +++ /dev/null @@ -1,100 +0,0 @@ -import '../../style/scheduleSetting.less'; -import React, {Component} from 'react'; -import {inject,observer} from 'mobx-react'; -import {WeaTop, WeaLocaleProvider} from 'ecCom'; -import Tabs from '../../../hrmengine/coms/Tabs'; -import {Button, Spin} from 'antd'; -import {i18n} from '../../public/i18n'; -import Setting from './Setting'; -import Analysis from './Analysis'; -const getLabel = WeaLocaleProvider.getLabel; - -@inject('hrmScheduleSetting') -@observer -export default class ScheduleSetting extends Component{ - constructor(props) { - super(props); - } - - componentDidMount() { - this.init() - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - init = () => { - const { - hrmScheduleSetting: store, - params - } = this.props; - store.init(params.id); - } - - render(){ - const { - hrmScheduleSetting: store - } = this.props; - const { - groupName, - groupId, - tabConfig, - save, - spinning, - spinTip - } = store; - const config = store.toJS(tabConfig); - const tabProps = { - tabConfig: config, - tabChangeHandle: config.tabChangeHandle, - activeTabInfo: { - activeTabKey: config.activeTabKey, - activeTabIndex: store.getTabIndex(config.tabs, config.activeTabKey) - }, - store: store - } - - if(groupName){document.title = `${getLabel('16695','排班设置')}:${groupName || ''}`} - - const topProps = { - title: `${getLabel('16695','排班设置')}:${groupName || ''}`, - icon: , - iconBgcolor: '#217346', - showDropIcon: true - } - const generateButtons = () =>{ - const props = {}; - let buttons = []; - if(config.activeTabKey === '1'){ - buttons.push() - } - Object.assign(props, { - buttons, - dropMenuDatas: [...store.convertToMenus(buttons),{ - key: "2", - icon: , - content: "日志", - onClick: key => window.setLogViewProps({logSmallType: '10000',targetId:groupId}) - } - ] - }) - return props; - } - - return ( - -
- - - - - - -
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/schedulecode/Content.js b/pc4backstage/hrmAttendance/components/schedulecode/Content.js deleted file mode 100644 index 98605e3..0000000 --- a/pc4backstage/hrmAttendance/components/schedulecode/Content.js +++ /dev/null @@ -1,87 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaRightMenu,WeaInput,WeaLocaleProvider} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import classnames from 'classnames'; -import findIndex from 'lodash/findIndex'; -import * as mobx from 'mobx'; -const toJS = mobx.toJS; -import Edit from './Edit'; -import DeviceList from './DeviceList'; -import DeviceEdit from './DeviceEdit'; -const { - WeaTable -} = WeaTableNew; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Content extends Component{ - openHrm = id => this.props.store.openHrm(id); - - setBatchEditVal = (id,val) => this.props.store.setBatchEditVal(id,val); - - doEdit = (params={}) => this.props.store.doEdit(params); - - doEditOperate = (id, record) => this.props.store.doEdit({"id":record.id,"lastname":record.lastname}); - - doEditBase = this.doEdit; - - doDelete = id => this.props.store.doDelete({ids: id}); - - showLog = id => this.props.store.showLog({logSmallType:this.props.store.logTypeDef.HRM_ENGINE_SCHEDULECODE, targetId: 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, record); - } - - renderCol = (cols) => { - ['lastname','id1','id2'].map(key => { - const idx = findIndex(cols, item => item.dataIndex === key); - idx != -1 && (cols[idx].render = (text, record) => { - if (key=='lastname') { - return window.pointerXY(e)} dangerouslySetInnerHTML={{__html:record[`${key}span`]}}> - }else if(key=='id1'){ - return this.setBatchEditVal(record.id,val) } - style={{width:120}} - /> - }else if(key=='id2'){ - return this.doEdit({"id":record.id,"lastname":record.lastname})} dangerouslySetInnerHTML={{__html:record[`${key}span`].length==0?getLabel(93,'编辑'):record[`${key}span`]}}> - } - }); - }) - - } - - render(){ - const { - store - } = this.props; - const className = classnames({ - ['tabPane']: true, - ['tabPane-include']: true//store.containerInitFinished.detachable - }) - - return ( -
- - this.onOperatesClick(record, index, operate)} - getColumns={cols => this.renderCol(cols)} - /> - - - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/schedulecode/DeviceEdit.js b/pc4backstage/hrmAttendance/components/schedulecode/DeviceEdit.js deleted file mode 100644 index ebfa945..0000000 --- a/pc4backstage/hrmAttendance/components/schedulecode/DeviceEdit.js +++ /dev/null @@ -1,47 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog,WeaRightMenu,WeaNewScroll,WeaTop,WeaLocaleProvider} from 'ecCom'; -import {Button} from 'antd'; -import {i18n} from '../../public/i18n'; -import * as mobx from 'mobx'; -import {FormInfo} from '../../../hrmComsPublic/index'; -const getLabel = WeaLocaleProvider.getLabel; -const toJS = mobx.toJS; -@observer -export default class DeviceEdit extends Component{ - render(){ - const { - store - } = this.props; - const { - deviceEditDialogParams, - formTarget, - doSaveScheduleDevice, - formItemRender - } = store; - const {deviceEditConditionForm: form, deviceEditConditionFormFields: fields} = formTarget; - const generateDialogParams = () =>{ - const props = {...deviceEditDialogParams}; - let buttons = []; - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)}, - // key: new Date().getTime(), - }) - return props; - } - - return ( - - - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/schedulecode/DeviceList.js b/pc4backstage/hrmAttendance/components/schedulecode/DeviceList.js deleted file mode 100644 index 5bf8243..0000000 --- a/pc4backstage/hrmAttendance/components/schedulecode/DeviceList.js +++ /dev/null @@ -1,107 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog,WeaRightMenu,WeaNewScroll,WeaTop,WeaLocaleProvider} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import {Button} from 'antd'; -import {i18n} from '../../public/i18n'; -import findIndex from 'lodash/findIndex'; -import * as mobx from 'mobx'; -import {Tabs} from '../../../hrmComsPublic/index'; -const getLabel = WeaLocaleProvider.getLabel; -const toJS = mobx.toJS; -const { - WeaTable -} = WeaTableNew; - -@observer -export default class DeviceList extends Component{ - doEdit = id => this.props.store.doDeviceCreateEdit({id}); - - doDelete = id => this.props.store.deleteScheduleDevice({ids: id}); - - showLog = id => this.props.store.showLog({logSmallType:this.props.store.logTypeDef.HRM_ENGINE_SCHEDULEDEVICE, targetId: 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, record); - } - - renderCol = (cols) => { - ['devicename'].map(key => { - const idx = findIndex(cols, item => item.dataIndex === key); - idx != -1 && (cols[idx].render = (text, record) => { - if (key=='devicename') { - return this.doEdit(record.id)} dangerouslySetInnerHTML={{__html:record[`${key}span`]}}> - } - }); - }) - - } - - render(){ - const { - store - } = this.props; - const { - deviceDialogParams, - formTarget, - dialogTabConfig, - } = store; - const {deviceConditionForm: form, deviceConditionFormFields: fields} = formTarget; - - const tabConfig = store.toJS(dialogTabConfig); - const { - btns, - _, - tabBtnDef - } = store.btnsAndMenus(dialogTabConfig); - const tabProps = { - tabConfig, - activeTabInfo: { - activeTabKey: tabConfig.activeTabKey, - activeTabIndex: 0 - }, - store: store, - tabBtnDef:tabBtnDef, - conditionForm: form, - conditionFormFields: fields, - } - const generateDialogParams = () =>{ - const props = {...deviceDialogParams}; - let buttons = []; - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)}, - // key: new Date().getTime() - }) - return props; - } - let menus = []; - menus.push({ - key: '1', - content: i18n.label.log(), - icon: , - onClick:()=> this.props.store.showLog({logSmallType:this.props.store.logTypeDef.HRM_ENGINE_SCHEDULEDEVICE}), - }); - return ( - - - - - this.onOperatesClick(record, index, operate)} - getColumns={cols => this.renderCol(cols)} - /> - - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/schedulecode/Edit.js b/pc4backstage/hrmAttendance/components/schedulecode/Edit.js deleted file mode 100644 index 37f64de..0000000 --- a/pc4backstage/hrmAttendance/components/schedulecode/Edit.js +++ /dev/null @@ -1,58 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog,WeaTableEdit,WeaNewScroll} from 'ecCom'; -import {Button} from 'antd'; -import {i18n} from '../../public/i18n'; -import * as mobx from 'mobx'; -const toJS = mobx.toJS; - -@observer -export default class Edit extends Component{ - render(){ - const { - store - } = this.props; - const { - dialogParams, - editTable, - onEditTableChange, - savePerson, - setEditTable, - canAdd - } = store; - const generateDialogParams = () =>{ - const props = {...dialogParams}; - let buttons = canAdd ? [] : []; - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)}, - // key: new Date().getTime() - }) - return props; - } - - const editProps = canAdd ? {} : { - showAdd: false, - showCopy: false, - showDelete: false, - showMove: false - } - - return ( - - - { - onEditTableChange(datas); - }} - ref={(editTable) => setEditTable(editTable, 'fieldDef')} - {...editProps} - /> - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/schedulecode/index.js b/pc4backstage/hrmAttendance/components/schedulecode/index.js deleted file mode 100644 index 1e32a06..0000000 --- a/pc4backstage/hrmAttendance/components/schedulecode/index.js +++ /dev/null @@ -1,113 +0,0 @@ -import '../../style/groupSetting.less'; -import React, { Component } from 'react'; -import { inject, observer } from 'mobx-react'; -import { WeaTop, WeaAlertPage, WeaLeftRightLayout, WeaLocaleProvider } from 'ecCom'; -import { i18n } from '../../public/i18n'; -import Content from './Content'; -const getLabel = WeaLocaleProvider.getLabel; -import { Tabs, OrganizationTree } from '../../../hrmComsPublic/index'; -import Import from '../importScheduleCodeComponet/index'; - -@inject('importScheduleCode') -@inject('scheduleCodeStore') -@observer -export default class ScheduleCode 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 { - scheduleCodeStore: store - } = this.props; - store.checkAuthorized('kq/schedulecode', null, store.init, null, true); - } - - render () { - // const {Tabs, OrganizationTree} = window.weaHrmComsPublic; - const { - scheduleCodeStore: store, - importScheduleCode - } = this.props; - const { - importDialog - } = importScheduleCode; - const { - containerInitFinished, - selectedSubCompany, - orgTreeProps, - getTopProps, - showAllLevel, - isOneDevice, - mainTabConfig, - formTarget, - tableMultiDelete, - canAdd - } = store; - let title = getLabel(511334, '考勤编号维护'); - if (selectedSubCompany != null && selectedSubCompany.name) - title = `${title} - ${selectedSubCompany.name}`; - const { buttons, menus } = getTopProps(); - const { conditionForm: form, conditionFormFields: fields } = formTarget; - const topProps = { - title, - icon: , - iconBgcolor: '#217346', - showDropIcon: true, - buttons: buttons, - dropMenuDatas: menus - } - const tabProps = { - tabConfig: mainTabConfig, - activeTabInfo: { - activeTabKey: mainTabConfig.activeTabKey, - activeTabIndex: 0 - }, - rightMenu: menus, - store: store, - conditionForm: form, - conditionFormFields: fields, - } - - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && - - { - containerInitFinished.detachable || true - ? - }> - - - - - : - - - - } - {importDialog.visible && } - - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/Content.js b/pc4backstage/hrmAttendance/components/shiftManager/Content.js deleted file mode 100644 index 8848495..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/Content.js +++ /dev/null @@ -1,61 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaRightMenu} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import classnames from 'classnames'; -import findIndex from 'lodash/findIndex'; -import Edit from './Edit'; -const { - WeaTable -} = WeaTableNew; - -@observer -export default class Content extends Component{ - doEdit = id => this.props.store.doEdit(id, '1'); - - personalizedEdit = id => this.props.store.doEdit(id, '2'); - - doDelete = id => this.props.store.doDelete({ids: id}); - - showLog = id => this.props.store.showLog({logSmallType: this.props.store.logTypeDef.HRM_ENGINE_SHIFTMANAGER, targetId: 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) => { - const idx = findIndex(cols, item => item.dataIndex === 'serial'); - idx != -1 && (cols[idx].render = (text, record) => { - return this.doEdit(record.id)}>{record.serialspan} - }); - } - - render(){ - const { - store - } = this.props; - const className = classnames({ - ['tabPane']: true, - ['tabPane-include']: store.containerInitFinished.detachable - }) - - return ( -
- - this.onOperatesClick(record, index, operate)} - getColumns={cols => this.renderCol(cols)} - /> - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/Edit.js b/pc4backstage/hrmAttendance/components/shiftManager/Edit.js deleted file mode 100644 index 4ca8f77..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/Edit.js +++ /dev/null @@ -1,106 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog, WeaNewScroll} from 'ecCom'; -import {Button} from 'antd'; -import {i18n} from '../../public/i18n'; -// import {Tabs, FormInfo} from 'weaHrmComsPublic'; -import {Tabs, FormInfo} from '../../../hrmComsPublic/index'; - -@observer -export default class Edit extends Component{ - render(){ - // const {Tabs, FormInfo} = window.weaHrmComsPublic; - const { - store - } = this.props; - const { - dialogParams, - formTarget, - itemRender, - childrenComponents, - save, - custLabelCol, - multiColumn, - canAdd - } = store; - const { - baseForm: form, - baseFormFields: fields - } = formTarget; - const generateDialogParams = () =>{ - const props = {...dialogParams, hasScroll: true}; - let buttons = canAdd ? [] : []; - if(canAdd && dialogParams.opType === 'create'){ - buttons.push() - } - Object.assign(props, { - buttons, - moreBtn: {datas: store.convertToMenus(buttons)} - }) - return props; - } - - const getContent = () => { - if(dialogParams.opType === 'create'){ - return ( - - - - ); - }else{ - const tabConfig = store.toJS(store.editTabConfig); - const tabProps = { - tabConfig: tabConfig, - tabChangeHandle: tabConfig.tabChangeHandle, - activeTabInfo: { - activeTabKey: tabConfig.activeTabKey, - activeTabIndex: store.getTabIndex(tabConfig.tabs, tabConfig.activeTabKey) - }, - store: store - } - return ( - -
- - - -
-
- - - -
-
- ); - } - } - - return ( - - {getContent()} - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/LinkComs.js b/pc4backstage/hrmAttendance/components/shiftManager/LinkComs.js deleted file mode 100644 index ad6c31f..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/LinkComs.js +++ /dev/null @@ -1,52 +0,0 @@ -import React, { Component } from 'react' -import { observer } from 'mobx-react' -import {WeaSwitch } from "comsMobx"; -import {WeaCheckbox} from "ecCom"; - -@observer -export default class LinkComs extends Component { - constructor(props) { - super(props); - this.state = { - showLink: false - } - } - - onCheckboxChangeHandle = (f, v, linkKey) => { - f.checkboxValue = (v === '1'); - this.setState({ - showLink: (linkKey != null ? f.checkboxValue : false) - }) - } - - render() { - const {field, textAreaProps, form, formParams, linkKey} = this.props; - const { fieldMap } = form; - return ( -
-
- this.onCheckboxChangeHandle(field, v, linkKey)} value={field.checkboxValue ? '1' : '0'} /> -
- -
-
- { - linkKey != null && (field.checkboxValue || this.state.showLink) && -
- -
- } -
- ); - } -} diff --git a/pc4backstage/hrmAttendance/components/shiftManager/Msg.js b/pc4backstage/hrmAttendance/components/shiftManager/Msg.js deleted file mode 100644 index ad4620b..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/Msg.js +++ /dev/null @@ -1,22 +0,0 @@ -import React, { Component } from 'react'; - -export default class Msg extends Component { - render() { - const { type, datas } = this.props; - - return ( -
- { datas[type].map(data => { - const { title, msgs } = data; - - return ( -
-
{title}
-
{ msgs.map(msg =>
) }
-
- ) - }) } -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/WorkTimeAnalysis.js b/pc4backstage/hrmAttendance/components/shiftManager/WorkTimeAnalysis.js deleted file mode 100644 index f81ec3a..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/WorkTimeAnalysis.js +++ /dev/null @@ -1,19 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {i18n} from '../../public/i18n'; - -@observer -export default class WorkTimeAnalysis extends Component{ - render(){ - const { - store - } = this.props; - - let result = i18n.label['388788']().replace('{hour}', store.hour); - result = result.replace('{minute}', store.minute); - - return ( -
{result}
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/index.js b/pc4backstage/hrmAttendance/components/shiftManager/index.js deleted file mode 100644 index 8660bd9..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/index.js +++ /dev/null @@ -1,125 +0,0 @@ -import '../../style/shiftManager.less'; -import React, { Component } from 'react'; -import { inject, observer } from 'mobx-react'; -import { WeaTop, WeaAlertPage, WeaLeftRightLayout } from 'ecCom'; -import { i18n } from '../../public/i18n'; -import Content from './Content'; -// import {Tabs, OrganizationTree} from 'weaHrmComsPublic'; -import { Tabs, OrganizationTree } from '../../../hrmComsPublic/index'; -import { Dialog, CenterSpin } from '../../public/valhalla/components/index.js'; -import ReminderSetting from './reminder/ReminderSetting.js'; -import Msg from "./Msg.js"; - -@inject('hrmShiftManager') -@observer -export default class ShiftManager 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 { - hrmShiftManager: store - } = this.props; - store.checkAuthorized('kq/shiftManagement', null, store.init, null, true); - } - - render () { - // const {Tabs, OrganizationTree} = window.weaHrmComsPublic; - const { - hrmShiftManager: store - } = this.props; - const { - containerInitFinished, - selectedSubCompany, - orgTreeProps, - getTopProps, - mainTabConfig, - tableMultiDelete, - dialogStore, - remindLoaing, - dialogStore1, - msgType, - msgDatas, - } = store; - let title = i18n.label['388537'](); - if (containerInitFinished.detachable && selectedSubCompany != null && selectedSubCompany.name) - title = `${title} - ${selectedSubCompany.name}`; - const { buttons, menus } = getTopProps; - const topProps = { - title, - icon: , - iconBgcolor: '#217346', - showDropIcon: true, - buttons: buttons, - dropMenuDatas: menus - } - const tabProps = { - tabConfig: mainTabConfig, - activeTabInfo: { - activeTabKey: mainTabConfig.activeTabKey, - activeTabIndex: 0 - }, - rightMenu: menus, - store: store - } - - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && - - { - containerInitFinished.detachable - ? - }> - - - - - : - - - - } - - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } - { - dialogStore.visible && ( - - - - - - ) - } - { - dialogStore1.visible && ( - - - - ) - } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderContent.js b/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderContent.js deleted file mode 100644 index 133e9b9..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderContent.js +++ /dev/null @@ -1,71 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaInput, - WeaTextarea, - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class ReminderContent extends React.Component { - render() { - const { - store - } = this.props, { - emailRemindContent, - msgRemindContent, - handleRemindTitleChange, - handleRemindContentChange, - handleParamsDoubleClick, - setTextareaRef, - searchStore - } = store,{ - selectedKey - } = searchStore; - - const rContent = (selectedKey === '0') ? emailRemindContent : msgRemindContent; - - const { - title, - content, - params - } = rContent; - - return ( -
-
- { - (selectedKey === '0') && ( -
- {`${getLabel(512654,'邮件标题')}: `} - -
- ) - } -
- {(selectedKey === '0') ? `${getLabel(512655,'邮件内容') }: `: `${getLabel(512683,"短信内容")}:`} - -
-
-
- {`${getLabel(512656,'可用参数')}:`} -
- { - params && params.map(param=>{ - return ( - {param} - ) - }) - } -
-
-
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderSetting.js b/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderSetting.js deleted file mode 100644 index b8c4a54..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderSetting.js +++ /dev/null @@ -1,41 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaSearchGroup, -} from 'ecCom'; -import { - Search -} from '../../../public/valhalla/components/index.js'; -import ReminderContent from './ReminderContent.js'; -import ReminderTable from './ReminderTable.js'; - -@observer -export default class ReminderSetting extends React.Component { - render() { - const { - store - } = this.props, { - searchGroupTitles, - searchStore, - } = store; - - return ( -
- - - - - - - -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderTable.js b/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderTable.js deleted file mode 100644 index 45af96b..0000000 --- a/pc4backstage/hrmAttendance/components/shiftManager/reminder/ReminderTable.js +++ /dev/null @@ -1,38 +0,0 @@ -import { - toJS -} from 'mobx'; -import { - observer -} from 'mobx-react'; -import { - WeaTableEditable -} from 'ecCom'; - -@observer -export default class ReminderTable extends React.Component { - render() { - const { - store - } = this.props, { - remindTypeColumns, - emailRemindTypeDatas, - msgRemindTypeDatas, - handleTableEditChange, - searchStore, - } = store, { - selectedKey - } = searchStore; - - const datas = (selectedKey === '0') ? toJS(emailRemindTypeDatas) : toJS(msgRemindTypeDatas); - - return ( - null} - onChange={handleTableEditChange} - /> - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/test/index.js b/pc4backstage/hrmAttendance/components/test/index.js deleted file mode 100644 index e9e403b..0000000 --- a/pc4backstage/hrmAttendance/components/test/index.js +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - Button -} from 'antd'; -import ConfigurableForm from '../../public/ConfigurableForm'; -import '../../style/test.less'; - -@inject('hrmTest') -@observer -export default class Test extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - const { - hrmTest: store - } = this.props; - - store.getLeaveRulesForm(); - } - - handleClick = (f, togetherKeys) => { - const { - form - } = f; - form.validateForm().then(f => { - if (f.isValid) {} else { - f.showErrors(); - } - }) - } - - render() { - const { - hrmTest: store - } = this.props, { - f, - blackList, - togetherElements, - prefix, - suffix, - linkage, - togetherKeys - } = store; - - const d = { - ...f, - blackList, - togetherElements, - prefix, - suffix, - linkage, - } - return ( -
- - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/timeSelection/index.js b/pc4backstage/hrmAttendance/components/timeSelection/index.js deleted file mode 100644 index cf81148..0000000 --- a/pc4backstage/hrmAttendance/components/timeSelection/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import '../../style/scheduleSetting.less'; -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {WeaDialog} from 'ecCom'; -import {FormInfo} from '../../../hrmComsPublic/index'; - -@observer -export default class TimeSelectionSetting extends Component{ - render(){ - const {dialog, formTarget} = this.props; - const {form, fields} = formTarget || {}; - return ( - - - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/travelRule/Top.js b/pc4backstage/hrmAttendance/components/travelRule/Top.js deleted file mode 100644 index 8146fde..0000000 --- a/pc4backstage/hrmAttendance/components/travelRule/Top.js +++ /dev/null @@ -1,128 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaRightMenu, -} from 'ecCom'; -import { - CompositeForm, -} from '../../public/sweet-form.js'; -import { - Loading, -} from '../../public/learn'; -import TimeSelectionSetting from '../timeSelection'; - -@inject('commonStore') -@inject('hrmTravelRule') -@observer -class Top extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount () { - ['getMenus', 'getFormMaterial'].map(f => { - this.props.commonStore[f](); - }); - } - - handleFormChange = (cb) => { - const { - formElements, - } = this.props.commonStore, { - form, - } = formElements; - - const key = Object.keys(cb)[0]; - const value = cb[key].value; - - if ((key === 'minimumUnit' && ['3', '4'].includes(value)) || (key === 'computingMode' && value === '1')) { - form.updateFields({ - hoursToDay: { - value: 8 - } - }); - } - if ((key === 'exit_minimumUnit' && ['3', '4'].includes(value)) || (key === 'exit_computingMode' && value === '1')) { - form.updateFields({ - hoursToDay: { - value: 8 - } - }); - } - - if (['minimumUnit', 'exit_minimumUnit'].includes(key)) { - this.props.hrmTravelRule.handleMinimumUnithange(key, value) - } - } - - getWrapperStyle = () => { - const width = window.innerWidth || document.body.clientWidth; - - if (width < 1366) { - return { - padding: '20px 20%' - } - } else { - return { - padding: '20px 33%' - } - } - } - - render () { - const { - commonStore, - hrmTravelRule - } = this.props, { - topTitle, - } = hrmTravelRule, { - topButtons, - dropMenuDatas, - topComponentStaticProps, - formElements, - } = commonStore, { - formConfig, - dynamicTips, - staticTips, - renderBlacklist, - timeSelectionDialog, - formTarget - } = hrmTravelRule, { - form, - loading, - } = formElements; - - return ( - - - { - loading - ? - : - } - - - - ) - } -} - -export default Top \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/travelRule/index.js b/pc4backstage/hrmAttendance/components/travelRule/index.js deleted file mode 100644 index d80658c..0000000 --- a/pc4backstage/hrmAttendance/components/travelRule/index.js +++ /dev/null @@ -1,64 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; - -import * as asyncFetch from '../../apis/travelRule'; - -import Top from './Top'; - -@inject('commonStore') -@inject('hrmTravelRule') -@observer -class TravelRule extends React.Component { - constructor(props) { - super(props); - } - - componentWillMount() { - const { - pageConfig, - } = this.props.hrmTravelRule; - - const params = { - ...pageConfig, - customizedStore: this.props.hrmTravelRule, - }; - - ['resetStorePropertys', 'setPageConfig', 'getPermissionInfo', 'refreshPage'].map((f, i) => { - this.props.commonStore[f](i === 1 && params); - }); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.props.commonStore.refreshPage(); - } - } - - render() { - const { - commonStore, - } = this.props, { - pageAccessPermission - } = commonStore, { - hasRight, - loading - } = pageAccessPermission; - - if (!hasRight) { - return loading ? : - } else { - return ( - - ) - } - } -} - -export default TravelRule \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/upgrade/Content.js b/pc4backstage/hrmAttendance/components/upgrade/Content.js deleted file mode 100644 index 4b45ec0..0000000 --- a/pc4backstage/hrmAttendance/components/upgrade/Content.js +++ /dev/null @@ -1,16 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import Left from './Left'; -import Right from './Right'; - -@observer -export default class Upgrade extends Component{ - render(){ - return ( -
- - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/upgrade/Left.js b/pc4backstage/hrmAttendance/components/upgrade/Left.js deleted file mode 100644 index bcb1b78..0000000 --- a/pc4backstage/hrmAttendance/components/upgrade/Left.js +++ /dev/null @@ -1,26 +0,0 @@ -import React, {Component} from 'react'; -import {observer} from 'mobx-react'; -import {Timeline} from 'antd'; - -@observer -export default class Left extends Component{ - render(){ - const {store} = this.props; - const {timeline, itemClick, selectedNode} = store; - return ( -
- - { - timeline.map((row, index) => { - return ( - itemClick(row)} dot={
{index + 1}
}> -
{row.title}
-
- ) - }) - } -
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/upgrade/Right.js b/pc4backstage/hrmAttendance/components/upgrade/Right.js deleted file mode 100644 index b8c6476..0000000 --- a/pc4backstage/hrmAttendance/components/upgrade/Right.js +++ /dev/null @@ -1,63 +0,0 @@ -import React, {Component} from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import {Button} from 'antd'; -import {WeaTop, WeaLocaleProvider} from 'ecCom'; -import {FormInfo} from '../../../hrmComsPublic/index'; -import UpgradeResult from './UpgradeResult'; -import {addContentPath} from '../../util/index.js' -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Right extends Component{ - render(){ - const {store} = this.props; - const {upgradeInfo, checkUpgrade, viewType, formTarget, refreshTime,itemRender} = store; - const topProps = { - title: upgradeInfo.title, - icon: , - iconBgcolor: '#217346' - } - const { - form, - formFields: fields - } = formTarget; - return ( -
- - { - viewType == 1 ? -
-
-
- -
-
{upgradeInfo.count}
- { - form != null && form.isFormInit && -
-
{getLabel('503421','升级数据时间段:')}
- -
- } -
- -
-
-
- : - - } -
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/upgrade/UpgradeResult.js b/pc4backstage/hrmAttendance/components/upgrade/UpgradeResult.js deleted file mode 100644 index 8295de7..0000000 --- a/pc4backstage/hrmAttendance/components/upgrade/UpgradeResult.js +++ /dev/null @@ -1,29 +0,0 @@ -import React, {Component} from 'react'; -import { - observer -} from 'mobx-react'; -import {Spin, Button, Row, Col} from 'antd'; -import {WeaLocaleProvider, WeaProgress} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Right extends Component{ - render(){ - const {store} = this.props; - const {spinning, toJS, upgradeResult, itemClick, selectedNode, progress} = store; - let {items} = toJS(upgradeResult); - return ( -
-
-
-
-
{getLabel('505883','升级完成')}
-
-
- -
-
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/upgrade/index.js b/pc4backstage/hrmAttendance/components/upgrade/index.js deleted file mode 100644 index f236e7c..0000000 --- a/pc4backstage/hrmAttendance/components/upgrade/index.js +++ /dev/null @@ -1,60 +0,0 @@ -import '../../style/upgrade.less'; -import React, {Component} from 'react'; -import {observer, inject} from 'mobx-react'; -import {WeaAlertPage} from 'ecCom'; -import {Tabs} from '../../../hrmComsPublic/index'; -import Content from './Content'; -import {i18n} from '../../public/i18n'; - -@inject('hrmUpgrade') -@observer -export default class Upgrade extends Component{ - componentDidMount(){ - this.init(); - } - - componentWillReceiveProps(nextProps){ - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - init = () => { - const { - hrmUpgrade: store - } = this.props; - store.checkAuthorized('kq/upgrade', null, store.init, null, false); - } - - render(){ - const { - hrmUpgrade: store - } = this.props; - const {containerInitFinished} = store; - const tabProps = { - tabConfig: store.tabConfig, - activeTabInfo: { - activeTabKey: '1', - activeTabIndex: 0 - }, - store: store - } - - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && - - - - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationBalance/RadioGroup.js b/pc4backstage/hrmAttendance/components/vacationBalance/RadioGroup.js deleted file mode 100644 index 2053527..0000000 --- a/pc4backstage/hrmAttendance/components/vacationBalance/RadioGroup.js +++ /dev/null @@ -1,32 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - toJS -} from 'mobx'; -import { - WeaRadioGroup -} from 'ecCom'; - -@inject('hrmVacationBalance') -@observer -export default class RadioGroup extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - radioGroup, - exportActiveParams, - setRef, - } = this.props.hrmVacationBalance, { - config - } = radioGroup; - - return ( - config.length > 0 && setRef(ref,'rg')} onChange={params => exportActiveParams(params)}/> - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationBalance/Tab.js b/pc4backstage/hrmAttendance/components/vacationBalance/Tab.js deleted file mode 100644 index 4799f33..0000000 --- a/pc4backstage/hrmAttendance/components/vacationBalance/Tab.js +++ /dev/null @@ -1,37 +0,0 @@ -import { - observer, - inject -} from 'mobx-react'; -import { - WeaTab -} from 'ecCom'; - -@inject('hrmVacationBalance') -@observer -export default class Tab extends React.Component { - constructor(props) { - super(props); - } - - handleTabChange = (key) => { - this.props.hrmVacationBalance.setTabActiveKey(key); - } - - render() { - const { - tab - } = this.props.hrmVacationBalance, { - datas, - activeKey, - } = tab; - - return ( - this.handleTabChange(key)} - /> - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationBalance/Table.js b/pc4backstage/hrmAttendance/components/vacationBalance/Table.js deleted file mode 100644 index f583d36..0000000 --- a/pc4backstage/hrmAttendance/components/vacationBalance/Table.js +++ /dev/null @@ -1,121 +0,0 @@ -import { - observer, - inject -} from 'mobx-react'; -import { - WeaInputNumber -} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -const WeaTable = WeaTableNew.WeaTable; - -@inject('hrmVacationBalance') -@observer -export default class Table extends React.Component { - constructor(props) { - super(props); - } - - reRenderColumns = (columns) => { - const dataIndexs = ['baseAmount', 'baseAmount2', 'usedAmount', 'usedAmount2', 'extraAmount', 'extraAmount2']; - columns.map(c => { - if (dataIndexs.includes(c.dataIndex)) { - c.render = (text, record, index) => this.renderCom({ - record, - index, //行索引 - colIndex: dataIndexs.findIndex(dataIndex => dataIndex === c.dataIndex) - }); - } - }); - return columns; - } - - - renderCom = (params) => { - const { - record, - index, - colIndex - } = params, { - baseAmountspan, - baseAmount2span, - usedAmountspan, - usedAmount2span, - extraAmountspan, - extraAmount2span, - randomFieldId, - } = record; - - //基础假期、已修假期和额外假期数据集合 - //数据集合为DATAINDEXS的映射 - const values = [baseAmountspan, baseAmount2span, usedAmountspan, usedAmount2span, extraAmountspan, extraAmount2span]; - - return this.handleInputNumberChange({ - index,//行的索引值 - values: this.getValues(colIndex,values,value), - id:randomFieldId, - })} - /> - } - //修改后,行可编辑列表域的值 - getValues = (colIndex, values, value) => { - const clone = [...values]; - - clone[colIndex] = value; - - return clone; - } - - handleInputNumberChange = (params) => { - const { - values, - id, - index - } = params, { - hrmVacationBalance - } = this.props; - - this.changeTableDatas(index, values); - - hrmVacationBalance.sortChangedTableDatasOut(values, id) - } - - //修改tableStore中datas的值 - changeTableDatas = (index, values) => { - const { - hrmVacationBalance - } = this.props, { - table - } = hrmVacationBalance; - - - ['baseAmountspan', 'baseAmount2span', 'usedAmountspan', 'usedAmount2span', 'extraAmountspan', 'extraAmount2span'].map((v, i) => { - if (values[i] !== undefined) table.tableStore.datas[index][v] = values[i] - }); - } - - - render() { - const { - hrmVacationBalance, - } = this.props, { - table - } = hrmVacationBalance, { - tableStore, - } = table; - - return ( - this.reRenderColumns(columns)} - /> - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationBalance/Top.js b/pc4backstage/hrmAttendance/components/vacationBalance/Top.js deleted file mode 100644 index c25d4c8..0000000 --- a/pc4backstage/hrmAttendance/components/vacationBalance/Top.js +++ /dev/null @@ -1,93 +0,0 @@ -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaRightMenu, - WeaLocaleProvider, - WeaLeftRightLayout, -} from 'ecCom'; -import { - NoData, -} from '../../public/learn'; -const getLabel = WeaLocaleProvider.getLabel; - -import { - LeftTree, - Loading, -} from '../../public/learn'; - -import Tab from './Tab'; -import RadioGroup from './RadioGroup'; -import Table from './Table'; - -@inject('hrmVacationBalance') -@observer -class Top extends React.Component { - constructor(props) { - super(props); - } - - renderContent = () => { - return (
- -
- -
-
-
- - ) - - } - - getContent = (hasContent) => { - if (hasContent) { - return this.renderContent() - } else { - return - } - } - - - render() { - const { - hrmVacationBalance, - } = this.props, { - topTitle, - orgTreeStaticProps, - topButtons, - dropMenuDatas, - topComponentStaticProps, - orgTree, - handleOrgTreeNodeClick, - table, - hasContent, - } = hrmVacationBalance, { - triggerRefresh - } = orgTree, { - tableStore - } = table; - - return ( - - handleOrgTreeNodeClick(params)}/>}> - - {this.getContent(hasContent)} - - - - ) - } -} - -export default Top; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationBalance/index.js b/pc4backstage/hrmAttendance/components/vacationBalance/index.js deleted file mode 100644 index 1889090..0000000 --- a/pc4backstage/hrmAttendance/components/vacationBalance/index.js +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - AlertPage, - Loading, -} from '../../public/learn'; - -import Import from '../importRelatedComponet/index'; -import Top from './Top'; - -@inject('hrmVacationBalance') -@inject('hrmImportCommon') -@observer -export default class VacationBalanceCopy extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - this.props.hrmVacationBalance.getPermissionInfo(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.props.hrmVacationBalance.refreshPage(); - } - } - - componentWillUnmount() { - this.props.hrmVacationBalance.componentWillUnmount(); - } - - render() { - const { - hrmVacationBalance, - hrmImportCommon, - } = this.props, { - pageAccessPermission - } = hrmVacationBalance, { - hasRight, - loading - } = pageAccessPermission, { - importDialog - } = hrmImportCommon; - - if (!hasRight) { - return loading ? : - } else { - return ( -
- - {importDialog.visible && } -
- - ) - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRemain/index.js b/pc4backstage/hrmAttendance/components/vacationRemain/index.js deleted file mode 100644 index 7230b1f..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRemain/index.js +++ /dev/null @@ -1,134 +0,0 @@ -import React, { Fragment } from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - WeaLeftRightLayout, -} from 'ecCom'; -import { - Authority, - Top, - Search, - OrgTree, - RadioGroup, - Table, - Dialog, - MagicForm, -} from '../../public/valhalla/components/index.js'; -import { Spin } from 'antd'; -import { isEmpty } from "lodash"; -import Import from '../../public/valhalla/components/importRelatedComponet/index.js'; -import '../../style/vacationRemain.less'; - -@inject('vacationRemainStore') -@observer -export default class VacationRemain extends React.Component { - componentWillMount () { - this.props.vacationRemainStore.preMount(); - } - - componentWillReceiveProps (nextProps) { - if (this.props.location.key !== nextProps.location.key) { - const { - vacationRemainStore: store - } = this.props, { - orgTreeStore - } = store; - - this.init(); - - orgTreeStore.trigger(); - } - } - - componentDidMount () { - this.init(); - } - - init = () => { - const { - vacationRemainStore - } = this.props, { - init - } = vacationRemainStore; - - init(); - } - - render () { - const { - vacationRemainStore - } = this.props, { - authorityStore, - topStore, - searchStore, - tableListStore, - orgTreeStore, - radioGroupStore, - detailDialogStore, - detailDialogSearchStore, - detailDialogTableStore, - editDialogStore, - formStore, - importExcelStore, - pageLoading - } = vacationRemainStore; - - const { datas } = searchStore; - - return ( -
- - - - } - > - {!isEmpty(datas) ? ( - - - -
- - ) : ( -
-
- -
- 请启用假期类型并启用假期余额! -
-
-
- )} - - - - { - importExcelStore.importDialog.visible && - } - { - detailDialogStore.visible && ( - - -
- { - editDialogStore.visible && ( - -
- -
-
- ) - } - - ) - } - - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRule/Rule23th.js b/pc4backstage/hrmAttendance/components/vacationRule/Rule23th.js deleted file mode 100644 index b9d6e90..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRule/Rule23th.js +++ /dev/null @@ -1,54 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaInputNumber, - WeaLocaleProvider, -} from 'ecCom'; -import DeleteButton from '../../public/valhalla/components/DeleteButton.js'; -import {i18n} from '../../public/i18n.js' -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Rule23th extends React.Component { - render() { - const { - store, - amount, - timePoint, - index, - } = this.props, { - workTimeType, - handleRule23thTimeChange, - unitName = getLabel(1925, '天'), - detailRule, - handle23thDelClick, - isDistributeModeDisabled - } = store; - - return ( -

- {`${workTimeType}≥${timePoint}${getLabel('505552', "年")}, `} - {getLabel(505551,'享有')} - handleRule23thTimeChange(val,index)} - /> - {`${unitName}${getLabel('505554',"假").replace('false','off')}`} - { - ( index > 1 && - (index === detailRule.length - 1) && - !isDistributeModeDisabled - ) &&( - - ) - } - -

- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRule/Rule6th.js b/pc4backstage/hrmAttendance/components/vacationRule/Rule6th.js deleted file mode 100644 index c9b92c4..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRule/Rule6th.js +++ /dev/null @@ -1,106 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaInputNumber, -} from 'ecCom'; -import DeleteButton from '../../public/valhalla/components/DeleteButton.js'; - -@observer -export default class Rule6th extends React.Component { - render() { - const { - store, - rule, - index, - type, - rulesLength, - } = this.props, { - workYear, - entryTime, - legalAmount, - welfareAmount, - } = rule, { - handleRule6thTimeChange, - handle6thDelClick, - isDistributeModeDisabled - } = store; - - const style={ - width:`${100/Object.keys(rule).length}%` - } - - const lastColStyle={ - width:`${100/Object.keys(rule).length - 5}%` - } - - return ( -

- { - (workYear !== undefined) && ( - - ≥ - handleRule6thTimeChange(val,index,'workYear',type)} - /> - - ) - } - { - (entryTime !== undefined) && ( - - ≥ - handleRule6thTimeChange(val,index,'entryTime',type)} - /> - - ) - } - { - (legalAmount !== undefined) && ( - - handleRule6thTimeChange(val,index,'legalAmount',type)} - /> - - ) - } - { - (welfareAmount !== undefined) && ( - - handleRule6thTimeChange(val,index,'welfareAmount',type)} - /> - - ) - } - { - ( index > 0 && - (index === rulesLength - 1) && - !isDistributeModeDisabled - ) &&( - handle6thDelClick(type)}/> - ) - } -

- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRule/Rules23th.js b/pc4backstage/hrmAttendance/components/vacationRule/Rules23th.js deleted file mode 100644 index 726d865..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRule/Rules23th.js +++ /dev/null @@ -1,53 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -import Section from './Section.js'; -import Rule23th from './Rule23th.js'; -import AddButton from '../../public/valhalla/components/AddButton.js'; - -@observer -export default class Rules23th extends React.Component { - render() { - const { - store, - } = this.props, { - detailRule, - isEnable, - handle23thAddButtonClick, - isDistributeModeDisabled, - } = store; - - return ( -
-
- { - detailRule.map((rule,index) => { - const { - timePoint, - amount - } = rule; - - return ( - - ) - }) - } - { - !isDistributeModeDisabled && ( - handle23thAddButtonClick()}/> - ) - } -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRule/Rules6th.js b/pc4backstage/hrmAttendance/components/vacationRule/Rules6th.js deleted file mode 100644 index ce65668..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRule/Rules6th.js +++ /dev/null @@ -1,68 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaSelect, - WeaLocaleProvider, -} from 'ecCom'; -import Rule6th from './Rule6th.js'; - -import AddButton from '../../public/valhalla/components/AddButton.js'; - -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Rules6th extends React.Component { - render() { - const { - store, - colNames, - rules, - type, - selectedKey, - } = this.props, { - ruleOptions, - handleRuleSelectChange, - handle6thAddButtonClick, - isDistributeModeDisabled - } = store; - - return ( -
-
- {`${getLabel(126876,'规则设置')}: `} - handleRuleSelectChange(key,type)} - /> -
-

- {colNames.map(colName=>{ - return ( - - - {colName} - - ) - })} -

-
- { - rules.map( (rule,index)=>{ - return ( - - ) - }) - } -
- { - !isDistributeModeDisabled && ( - handle6thAddButtonClick(type)}/> - ) - } -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRule/Rules6thPanel.js b/pc4backstage/hrmAttendance/components/vacationRule/Rules6thPanel.js deleted file mode 100644 index 1f41536..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRule/Rules6thPanel.js +++ /dev/null @@ -1,52 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { Collapse } from 'antd'; -import Rules6th from './Rules6th.js'; - -const { Panel } = Collapse; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Rules6thPanel extends React.Component { - render() { - const { - store - } = this.props, { - legalCols, - welfareCols, - legalRule, - welfareRule, - legalKey, - welfareKey, - } = store; - - return ( -
- - - - - - - - -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRule/Section.js b/pc4backstage/hrmAttendance/components/vacationRule/Section.js deleted file mode 100644 index 213551b..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRule/Section.js +++ /dev/null @@ -1,36 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaInputNumber, - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Section extends React.Component { - render() { - const { - store, - } = this.props, { - workTimeType, - sectionValue, - handleSectionChange, - isDistributeModeDisabled, - } = store; - - return ( -
- - {`${workTimeType}${getLabel('505550',"区间")}`} - - {getLabel('505552', "年")} -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationRule/index.js b/pc4backstage/hrmAttendance/components/vacationRule/index.js deleted file mode 100644 index a18f183..0000000 --- a/pc4backstage/hrmAttendance/components/vacationRule/index.js +++ /dev/null @@ -1,78 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - Authority, - Top, - Search, - Table, - Dialog, - MagicForm, - CenterSpin, -} from '../../public/valhalla/components/index.js'; -import '../../style/vacationRule.less'; - -@inject('vacationRuleStore') -@observer -export default class VacationRule extends React.Component { - componentWillMount() { - this.props.vacationRuleStore.preMount(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - componentDidMount() { - this.init(); - } - - init = () => { - const { - vacationRuleStore - } = this.props, { - init - } = vacationRuleStore; - - init(); - } - - render() { - const { - vacationRuleStore - } = this.props, { - authorityStore, - topStore, - searchStore, - tableListStore, - dialogStore, - formStore, - } = vacationRuleStore; - - return ( -
- - - -
- - - { - dialogStore.visible && ( - -
- - - -
-
- ) - } - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/vacationType/index.js b/pc4backstage/hrmAttendance/components/vacationType/index.js deleted file mode 100644 index 68d4370..0000000 --- a/pc4backstage/hrmAttendance/components/vacationType/index.js +++ /dev/null @@ -1,83 +0,0 @@ -import React from 'react'; -import { - observer, - inject -} from 'mobx-react'; -import { - Authority, - Top, - Search, - Table, - Dialog, - MagicForm, - CenterSpin, -} from '../../public/valhalla/components/index.js'; -import '../../style/vacationType.less'; -import TimeSelectionSetting from '../timeSelection'; - - -@inject('vacationTypeStore') -@observer -export default class VacationType extends React.Component { - componentWillMount() { - this.props.vacationTypeStore.preMount(); - } - - componentWillReceiveProps(nextProps) { - if (this.props.location.key !== nextProps.location.key) { - this.init(); - } - } - - componentDidMount() { - this.init(); - } - - init = () => { - const { - vacationTypeStore - } = this.props, { - init - } = vacationTypeStore; - - init(); - } - - render() { - const { - vacationTypeStore - } = this.props, { - authorityStore, - topStore, - searchStore, - tableListStore, - dialogStore, - formStore, - timeSelectionDialog, - formTarget - } = vacationTypeStore; - - return ( -
- - - -
- - - { - dialogStore.visible && ( - -
- - - -
-
- ) - } - - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/workflowSetting/ActionList.js b/pc4backstage/hrmAttendance/components/workflowSetting/ActionList.js deleted file mode 100644 index e1d5f92..0000000 --- a/pc4backstage/hrmAttendance/components/workflowSetting/ActionList.js +++ /dev/null @@ -1,50 +0,0 @@ -import React, { - Component -} from 'react'; -import ReactDOM from 'react-dom' -import { - observer -} from 'mobx-react'; -import { - WeaRightMenu, - WeaTableEdit -} from 'ecCom'; -import { - Spin -} from 'antd'; -import classnames from 'classnames'; - -@observer -export default class ActionList extends Component { - constructor(props) { - super(props); - } - - componentDidMount() {} - - componentWillReceiveProps(nextProps) {} - - render() { - const { - store, - rightMenu - } = this.props; - const { - spinning, - tableConfig - } = store; - const className = classnames({ - ['tabPane']: true, - ['tabPane-dialog']: true - }) - return ( -
- - - - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/workflowSetting/CheckRuleList.js b/pc4backstage/hrmAttendance/components/workflowSetting/CheckRuleList.js deleted file mode 100644 index 5608d76..0000000 --- a/pc4backstage/hrmAttendance/components/workflowSetting/CheckRuleList.js +++ /dev/null @@ -1,95 +0,0 @@ -import React, { - Component -} from 'react'; -import ReactDOM from 'react-dom' -import { - observer -} from 'mobx-react'; -import { - WeaNewScroll, - WeaDialog, -} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import { - Spin -} from 'antd'; -import classnames from 'classnames'; -import {FormInfo} from '../../../hrmComsPublic/index'; - -const { - WeaTable -} = WeaTableNew; - -@observer -export default class CheckRuleList extends Component { - doEdit = record => { - const { - store, - } = this.props; - store.doEditCheckRule(record); - } - - doDelete = record => { - const { - store, - } = this.props; - store.deleteCheckRule({ids: record.id}); - } - - onOperatesClick = (record, index, operate) => { - const func = operate.href ? operate.href.split(':')[1].split('(')[0] : ''; - this[func] && this[func](record); - } - - render() { - const { - store, - rightMenu - } = this.props; - const { - spinning, - refreshCheckRuleForm, - checkRuleTable, - formTarget, - checkRuleDialogDialogProps, - checkRuleFormItemRender, - childrenComponents - } = store; - const className = classnames({ - ['tabPane']: true, - ['tabPane-dialog']: true - }) - - - const { - checkRuleForm: form, - checkRuleFormFields: fields, - } = formTarget; - - return ( -
- - this.onOperatesClick(record, index, operate)} - // getColumns={cols => this.renderCol(cols)} - /> - - -
- -
-
-
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/workflowSetting/DataList.js b/pc4backstage/hrmAttendance/components/workflowSetting/DataList.js deleted file mode 100644 index 709ddf9..0000000 --- a/pc4backstage/hrmAttendance/components/workflowSetting/DataList.js +++ /dev/null @@ -1,231 +0,0 @@ -import React, { - Component -} from 'react'; -import ReactDOM from 'react-dom' -import { - observer -} from 'mobx-react'; -import { - WeaRightMenu, - WeaNewScroll, - WeaDialog, -} from 'ecCom'; -import { - WeaTableNew -} from 'comsMobx'; -import FieldList from './FieldList'; -import ActionList from './ActionList'; -import CheckRuleList from './CheckRuleList'; -import { - findIndex -} from 'lodash'; -import classnames from 'classnames'; -import { - i18n -} from '../../public/i18n'; -import { - openProcSetting -} from '../../util/pulic-func'; -// import {FormInfo, Tabs} from 'weaHrmComsPublic'; -import {FormInfo, Tabs} from '../../../hrmComsPublic/index'; -import {addContentPath} from '../../util/index.js' - -const { - WeaTable -} = WeaTableNew; - -@observer -export default class DataList extends Component { - constructor(props) { - super(props); - this.state = { - showProcSet: false, - procId: null - } - } - - showLog = (id, key, record) => { - const { - store - } = this.props; - store.showOpLog(20041, id); - } - - showContent = (id, key = '1', record) => { //编辑 - const { - store - } = this.props; - store.doEdit({ - id - }, key, record.field006); - } - - procSet = (id, key, record) => { //流程设置 - this.setState({ - procId: record.field001, - showProcSet: true - }) - openProcSetting(record.field001); - } - - changeStatus = (id, key, record) => { //禁用 - const { - store - } = this.props; - store.doChangeStatus(record); - } - - doDel = (id) => { //删除 - const { - store - } = this.props, { - removeWF - } = store; - removeWF({ - 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, '1', record); - } - - renderCol = (cols) => { - const colKey1 = 'field001', - colKey2 = 'stauts'; - let idx = findIndex(cols, item => item.dataIndex === colKey1); - idx != -1 && (cols[idx].render = (text, record) => { - return this.showContent(record.id, '1', record)}>{record.field001span} - }); - idx = findIndex(cols, item => item.dataIndex === colKey2); - idx != -1 && (cols[idx].render = (text, record) => { - if (record.status === '0') - return
{record.statusspan}
; - return record.statusspan; - }) - } - - tabChangeHandle = (key) => { - const { - store - } = this.props; - store.setActiveTab(key); - } - - render() { - // const {FormInfo, Tabs} = window.weaHrmComsPublic; - const { - store, - rightMenu, - moduleName - } = this.props; - const { - containerInitFinished, - table, - dialogParams, - getDialogOpButtons, - editTabConfig, - getTabIndex, - refreshTab, - formTarget, - wfFormItemRender, - editorDialogRightMenu, - generateFormDialogParams, - getAutoGenDialogOpButtons, - tableConfig, - tabButtons - } = store; - const classes = classnames({ - ['tabPane']: true, - ['tabPane-include']: containerInitFinished.detachable - }); - - const dProps = { - ...dialogParams, - hasScroll: true, - buttons: getDialogOpButtons, - className: 'hrmDialog' - } - const autoGenProps = { - ...generateFormDialogParams, - buttons: getAutoGenDialogOpButtons() - } - const tabProps = { - tabConfig: editTabConfig, - tabChangeHandle: this.tabChangeHandle, - activeTabInfo: { - activeTabKey: editTabConfig.activeTabKey, - activeTabIndex: getTabIndex(editTabConfig.tabs, editTabConfig.activeTabKey) - }, - rightMenu: editorDialogRightMenu, - tabBtnDef: tabButtons, - store - } - const { - wfForm: form, - wfFormFields: fields, - autoGenForm, - autoGenFormFields - } = formTarget; - - const { - showProcSet, - procId - } = this.state; - - return ( -
- - this.onOperatesClick(record, index, operate)} - getColumns={cols => this.renderCol(cols)} - /> - - -
- { - dProps.opType === '' ? dProps.coms : - -
- - - -
- - - -
- } -
-
- - - - { - false && - { - this.setState({showProcSet: false, procId: null}) - }} - title={i18n.label.pathSetting()} - url = { addContentPath(`/spa/workflow/static4engine/engine.html#/main/workflowengine/path/pathSet/pathDetail/baseSet/baseInfo?workflowId=${procId}&showLeftTree=false&onlySelfTab=true`)} // 也支持外部地址 - visible={showProcSet} - style={{width: 800, height: 600}} - /> - } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/workflowSetting/FieldList.js b/pc4backstage/hrmAttendance/components/workflowSetting/FieldList.js deleted file mode 100644 index 6c2e8b7..0000000 --- a/pc4backstage/hrmAttendance/components/workflowSetting/FieldList.js +++ /dev/null @@ -1,175 +0,0 @@ -import React, { - Component -} from 'react'; -import ReactDOM from 'react-dom' -import { - observer -} from 'mobx-react'; -import { - WeaRightMenu, - WeaSearchGroup, - WeaFormItem, - WeaNewScroll, - WeaHelpfulTip, - WeaCheckbox -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import { - Spin -} from 'antd'; -import { - filter, -} from 'lodash'; -import { - i18n -} from '../../public/i18n'; -import classnames from 'classnames'; - -@observer -export default class FieldList extends Component { - constructor(props) { - super(props); - this.state = {} - } - - componentDidMount() { - const { - store - } = this.props; - const { - formTarget - } = store; - const { - fieldFormFields: fields - } = formTarget; - fields && fields.map(f => { - f.items.map(item => { - this.setState({ - [`${item.domkey[0]}ShowAll`]: false - }) - }) - }) - } - - componentWillReceiveProps(nextProps) { - const { - store - } = nextProps; - const { - formTarget - } = store; - const { - fieldFormFields: fields - } = formTarget; - fields && fields.map(f => { - f.items.map(item => { - this.setState({ - [`${item.domkey[0]}ShowAll`]: false - }) - }) - }) - } - - renderGroup = (field, groupSize) => { - const { - store, - moduleName - } = this.props; - const { - formTarget, - resetOptionsVal - } = store; - const { - fieldForm: form - } = formTarget; - let items = []; - field.items.map((item, idx) => { - const {conditionType} = item; - const checked = this.state[`${item.domkey[0]}ShowAll`]; - const formParams = form.getFormParams(); - let f = { - ...item, - options: filter(item.options, (i) => checked ? true : i.visible) - } - - if(conditionType != 'DESCRIPTION'){ - items.push({ - com: ( -
- -
- -
- - { - resetOptionsVal(item.domkey[0]); - this.setState({ - [`${item.domkey[0]}ShowAll`]: (val === '0' ? false : true) - }) - }} - /> - -
-
- ), - col: 1 - }) - }else{ - f.value = (
{idx}{f.viewAttr}
) - items.push({ - com: ( -
- - - -
- ), - col: 1 - }) - } - }) - let title = ''; - if('statesShedule' === moduleName){ - title = field.title; - }else { - title = (groupSize > 1 ? field.title : null); - } - return
- } - - render() { - const { - store, - rightMenu, - moduleName - } = this.props; - const { - formTarget, - spinning - } = store; - const { - fieldFormFields: fields - } = formTarget; - const className = classnames({ - ['tabPane']: true, - ['tabPane-dialog']: true - }) - return ( -
- - - - { - fields && fields.map(field => this.renderGroup(field, fields.length)) - } - - - -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/components/workflowSetting/index.js b/pc4backstage/hrmAttendance/components/workflowSetting/index.js deleted file mode 100644 index be4f9f0..0000000 --- a/pc4backstage/hrmAttendance/components/workflowSetting/index.js +++ /dev/null @@ -1,140 +0,0 @@ -import '../../style/workflowSetting.less'; -import React, { - Component -} from 'react'; -import { - inject, - observer -} from 'mobx-react'; -import { - WeaTop, - WeaAlertPage, - WeaRightMenu, - WeaLeftRightLayout -} from 'ecCom'; -import DataList from './DataList'; -import { - i18n -} from '../../public/i18n'; -// import {FormInfo, Tabs, OrganizationTree} from 'weaHrmComsPublic'; -import {FormInfo, Tabs, OrganizationTree} from '../../../hrmComsPublic/index'; - - -@inject('hrmWorkflowSetting') - -@observer -export default class WorkflowSetting extends Component { - constructor(props) { - super(props); - this.state = { - moduleName: '' - } - } - - componentDidMount() { - const { - params - } = this.props; - this.setState({ - moduleName: params.type - }) - this.init(params.type); - } - - componentWillReceiveProps(nextProps) { - const { - params - } = nextProps; - this.setState({ - moduleName: params.type - }) - this.init(params.type); - this.refs.orgTree && this.refs.orgTree.refs.tree.fetchData(); - } - - init = (moduleType) => { - const { - hrmWorkflowSetting: store - } = this.props, { - checkAuthorized, - initData - } = store - const moduleName = moduleType === 'stateChange' ? 'statechange' : 'stateschedule'; - checkAuthorized(`stateset/${moduleName}`, null, () => initData(moduleName), 'getStateRightMenu', true); - } - - render() { - // const {FormInfo, Tabs, OrganizationTree} = window.weaHrmComsPublic; - const { - hrmWorkflowSetting: store - } = this.props; - const { - containerInitFinished, - topBtnAndMenu, - orgTreeProps, - tabConfig, - formTarget, - refreshMainTab, - attendanceOrgTreeProps - } = store; - const { - buttons, - menus - } = topBtnAndMenu; - const { - moduleName - } = this.state; - const title = moduleName === 'stateChange' ? i18n.label.stateChangeWfSetting() : i18n.label.timeManagerWfSetting(); - const topProps = { - title, - icon: , - iconBgcolor: '#217346', - showDropIcon: true, - buttons: buttons, - 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, - } - const orgProps = (moduleName === 'stateChange' ? orgTreeProps : attendanceOrgTreeProps); - return ( -
- { - containerInitFinished.init && containerInitFinished.authorized && - - { - containerInitFinished.detachable ? - }> - - - - - : - - - - } - - } - { - containerInitFinished.init && !containerInitFinished.authorized && - -
{i18n.message.authFailed()}
-
- } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/debug.js b/pc4backstage/hrmAttendance/debug.js deleted file mode 100644 index 72e894c..0000000 --- a/pc4backstage/hrmAttendance/debug.js +++ /dev/null @@ -1,45 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; - -import { createHashHistory } from 'History'; - -import { Router, Route, useRouterHistory } from 'react-router'; - -import { syncHistoryWithStore, RouterStore } from 'mobx-react-router'; - -import { Provider } from 'mobx-react'; - -import { WeaDebugRouteMenu } from 'ecCom'; -WeaDebugRouteMenu.defaultProps.showRouteLev = 3; - -import Module from './index'; - -const routing = new RouterStore(); - -const allStore = { - routing, - ...Module.store, -}; - -const browserHistory = useRouterHistory(createHashHistory)({ - queryKey: '_key', - basename: '/', -}); - -const history = syncHistoryWithStore(browserHistory, allStore.routing); - -const Home = props => props.children; - -const Root = () => ( - - - - - { Module.Route } - - - - -); - -ReactDOM.render(, document.getElementById('container')); diff --git a/pc4backstage/hrmAttendance/index.js b/pc4backstage/hrmAttendance/index.js deleted file mode 100644 index ae544e5..0000000 --- a/pc4backstage/hrmAttendance/index.js +++ /dev/null @@ -1,112 +0,0 @@ -window.WeaHrm4Formal = false; -window.inputType = { - inputType: 'MULTILANG', - isBase64: true -}; - -window.HrmGroupCol = 2; //人力布局(1、一行2列,2、一行4列) -window.HrmLabelCol = 6; -window.HrmWrapperCol = 15; -window.HrmEngineLabelCol = 6; -window.HrmEngineWrapperCol = 18; -window.defaultScheduleBGColor = [ - '#47A9FC', - '#70C06F', - '#F6D65C', - '#EA744D', - '#4EBCCC', - '#EA5C85', - '#8F72F2', - '#7297F2', - '#CA4DE4', - '#A7CC62' -]; -import { - Route -} from 'react-router'; -import { - WeaLocaleProvider -} from 'ecCom'; -import { - isEnableMultiLang -} from './apis/common'; -import Home from './components/Home'; -import ShiftManager from './components/shiftManager/index'; -import OvertimeRule from './components/overtimeRule/index'; -import HolidaySettingNew from './components/holidaySettingNew/index'; -import GroupSetting from './components/groupSetting/index'; -import HolidayRule from './components/holidayRule/index'; -import GroupInfoSingle from './components/groupSetting/InfoSingle'; -import ScheduleSetting from './components/scheduleSetting/index'; -import TravelRule from './components/travelRule/index'; -import VacationBalanceCopy from './components/vacationBalance/index'; -import AttendanceRpSharingSetting from './components/attendanceReportSharingSetting/index'; -import WorkflowSetting from './components/workflowSetting/index'; //考勤/状态变更流程设置 -import Init from './components/init/index'; -import Upgrade from './components/upgrade/index'; -import HolidayType from './components/holidayType/index'; -import NewHolidayRule from './components/newHolidayRule/index'; -import ImportExtenalAttendanceData from './components/importExternalAttendanceData/index'; -import AttendanceSyncSetting from './components/attendanceSyncSetting/index'; -import VacationRule from './components/vacationRule/index.js'; -import VacationType from './components/vacationType/index.js'; -import VacationRemain from './components/vacationRemain/index.js'; -import ApplicationSettings from './components/applicationSettings/index.js'; -import ScheduleCode from './components/schedulecode/index'; -import KQMonthReportSetting from './components/kqMonthReportSetting/index.js'; -import Test from './components/test/index'; - -import './style/index'; -import './util/index'; -import stores from './stores/index'; -// 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' -// } -// }) -const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'hrm'); -const HrmAttendanceRoute = ( - - - - - - - {/**/} - - - {/**/} - - - - - - {/* - */} - - - - - - - - - - -) -module.exports = { - Route: HrmAttendanceRoute, - store: stores -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/ConfigurableForm.js b/pc4backstage/hrmAttendance/public/ConfigurableForm.js deleted file mode 100644 index b8d5212..0000000 --- a/pc4backstage/hrmAttendance/public/ConfigurableForm.js +++ /dev/null @@ -1,221 +0,0 @@ -import { - observer, -} from 'mobx-react'; -import { - WeaFormItem, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import { - isArray -} from 'lodash'; - -@observer -export default class ConfigurableForm extends React.Component { - constructor(props) { - super(props); - } - - //渲染表单元素 - renderForm = () => { - const { - conditions, - form - } = this.props; - - return conditions.map(c => { - return c.items.map((item, index) => { - const { - label, - domkey, - } = item; - - const key = domkey[0]; - - //是否渲染当前表单元素 - if (!this.isRenderFormItem(key)) { - return null; - } - - let com = []; - - //是否只渲染当前表单元素 - if (this.isOnlyRenderCurrentFormElement(key)) { - //当前表单元素是否有前缀 - if (this.hasPrefix(key)) { - com.push(this.renderPrefix(key)); - } - - //渲染当前元素 - //当前元素为被联动元素,且不显示时,返回null - if (this.isLinked(key) && !this.isLinkedElementShow(key)) { - com.push(null); - } else { - com.push(
- -
); - } - - //当前表单元素是否有后缀 - if (this.hasSuffix(key)) { - com.push(this.renderSuffix(key)); - } - } else { - const ele = this.renderMultiFormElement(key, item); - com = [...ele]; - } - - return ( - - {com} - - ) - }); - }); - } - - isRenderFormItem = (key) => { - const { - blackList - } = this.props; - - return blackList && isArray(blackList) && !blackList.includes(key) - } - - - isOnlyRenderCurrentFormElement = (key) => { - const { - togetherElements - } = this.props; - - return togetherElements && !togetherElements[key]; - } - - - renderMultiFormElement = (key, item) => { - const { - togetherElements, - form - } = this.props; - - const items = togetherElements[key]; - - const clone = [...items]; - - clone.unshift(item); - - const ele = clone.map((item, index) => { - const { - - domkey - } = item; - - return ( -
- - - -
- ) - }) - - return ele; - } - - hasPrefix = (key) => { - const { - prefix - } = this.props; - - return prefix && prefix[key]; - } - - renderPrefix = (key) => { - const { - prefix - } = this.props; - - return prefix[key]; - } - - hasSuffix = (key) => { - const { - suffix - } = this.props; - - return suffix && suffix[key]; - } - - renderSuffix = (key) => { - const { - suffix, - form - } = this.props; - - const info = suffix[key]; - - if (isArray(info)) { - const val = form.getFormParams()[key]; - return info[val]; - } else { - return suffix[key]; - } - } - - isLinked = (key) => { - const { - linkage - } = this.props; - - return linkage && linkage[key]; - } - - isLinkedElementShow = (key) => { - const { - linkage, - form - } = this.props; - - const { - activeKey, - activeValue - } = linkage[key]; - - return form.getFormParams()[activeKey] === activeValue; - } - - getError = (key, item) => { - const { - form - } = this.props; - - if (this.isOnlyRenderCurrentFormElement(key)) { - return form.getError(item) - } - } - - render() { - const { - form - } = this.props, { - isFormInit - } = form; - - return ( -
{isFormInit && this.renderForm()}
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/EasyForm.js b/pc4backstage/hrmAttendance/public/EasyForm.js deleted file mode 100644 index 95c9dbd..0000000 --- a/pc4backstage/hrmAttendance/public/EasyForm.js +++ /dev/null @@ -1,182 +0,0 @@ -import { - observer, -} from 'mobx-react'; -import { - WeaFormItem, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import { - isArray -} from 'lodash'; - -@observer -export default class EasyForm extends React.Component { - constructor(props) { - super(props); - this.prefix = null; - this.suffix = null; - } - - renderForm = (conditions, form, config) => { - const coms = conditions.map(c => { - return c.items.map(item => { - const { - label, - domkey, - } = item; - - const key = domkey[0]; - - if (!this.isRenderFormItem(key, form, config)) { - return null; - } - - return ( - - {this.renderFormElement(item,form)} - - ) - }); - }); - - return coms; - } - - //判断当前表单元素是否渲染 - isRenderFormItem = (key, form, config) => { - const isPassive = this.isPassiveFormItem(key, config); - - if (!isPassive) - return true - - const activeConfig = this.getActiveConfig(key, config); - - const currentValue = this.getActiveCurrentValue(activeConfig.key, form.getFormParams()); - - return currentValue === activeConfig.value; - } - - //判断当前元素是否为被联动元素 - isPassiveFormItem = (key, config) => { - return isArray(config) && config.some(c => c[key]) - } - - //获取发起联动表单元素的配置数据 - getActiveConfig = (key, config) => { - const active = config.find(c => c[key]); - return active && active[key]; - } - - //获取发起联动表单元素的当前值 - getActiveCurrentValue = (key, params) => { - return params[key]; - } - - renderFormElement = (item, form) => { - const formParams = form.getFormParams(); - - const key = item.domkey[0]; - //一行是否渲染多个组件 - const isMulti = item.length > 0; - - let com; - if (isMulti) { - com = item.map(data => { - return ( -
- -
- ) - }) - } else { - return ( -
- {this.renderFormElementPrefix()} - - {this.renderFormElementSuffix(key,formParams)} -
- ) - } - - } - - renderFormElementPrefix = () => { - - } - - renderFormElementSuffix = (key, params) => { - if (!this.hasSuffix(key)) return null; - - const suffix = this.suffix[key]; - - const value = params[key]; - - if (isArray(suffix)) { - return ( - {suffix[value]} - ) - } else { - return ( - {suffix} - ) - } - } - - //当前表单元素是否有前缀 - hasPrefix = (key) => { - return this.prefix && this.prefix[key]; - } - - //当前表单元素是否有后缀 - hasSuffix = (key) => { - return this.suffix && this.suffix[key]; - } - - //对象是否含有某个key值 - isObjectHasKey = (key, object) => { - return object && object[key]; - } - //对描述性文字进行分类 - classifyDesc = (desc) => { - ['prefix', 'suffix'].forEach(key => { - this[key] = desc[key]; - }); - } - - render() { - const { - datas - } = this.props, { - conditions, - form, - config, - desc, - } = datas, { - isFormInit - } = form; - - desc && this.classifyDesc(desc); - - if (!isFormInit) { - return
; - } - - return ( -
{this.renderForm(conditions,form,config)}
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/i18n.js b/pc4backstage/hrmAttendance/public/i18n.js deleted file mode 100644 index 45e261e..0000000 --- a/pc4backstage/hrmAttendance/public/i18n.js +++ /dev/null @@ -1,255 +0,0 @@ -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'), - submit: () => getLabel(615, '提交'), - immediateSync: () => getLabel(33543, '立即同步'), - checkEnable: () => getLabel(18624, '是否启用'), - syncDateRange: () => getLabel(33542, '同步时间范围'), - createGroup: () => getLabel(30131, '新建分组'), - editGroup: () => getLabel(83149, '编辑分组'), - groupMaintain: () => getLabel(383049, '分组维护'), - '388537': () => getLabel('388537', "班次管理"), - '388528': () => getLabel('388528', "人性化班次设置"), - '388538': () => getLabel('388538', "新建班次"), - '388539': () => getLabel('388539', "编辑班次"), - '388782': () => getLabel('388782', "第{params}次"), - '125809': () => getLabel('125809', "上班时间"), - '125810': () => getLabel('125810', "下班时间"), - '388785': () => getLabel('388785', "次日"), - '388786': () => getLabel('388786', "分钟前开始打卡"), - '388787': () => getLabel('388787', "分钟后结束打卡"), - '388788': () => getLabel('388788', "合计工作时长:{hour}小时{minute}分钟(考勤统计工作时长及请假出差外出统计,会以此时间为准)"), - '388587': () => getLabel('388587', "早走规则"), - '388868': () => getLabel('388868', "上班早到"), - '388869': () => getLabel('388869', "小时,下班可以早走"), - '514727': () => getLabel('514756', "分钟,下班可以早走"), - '391': () => getLabel('391', "小时"), - '15049': () => getLabel('15049', "分钟").trim().replace(/e$/, "es"), - '388870': () => getLabel('388870', "上班{time1}到,{time2}下班不算早退"), - '388591': () => getLabel('388591', "晚走规则"), - '388871': () => getLabel('388871', "上班晚到"), - '388872': () => getLabel('388872', "小时,下班需要晚走"), - '508155': () => getLabel('508155', "分钟,下班需要晚走"), - '388873': () => getLabel('388873', "上班{time1}到,需要{time2}下班才不算早退"), - '503575': () => getLabel('503575', "上班{time1}到,需要{time2}下班才不算早退"), - '388592': () => getLabel('388592', "晚到规则"), - '388874': () => getLabel('388874', "第一天下班晚走"), - '388875': () => getLabel('388875', "小时,第二天上班可以晚到"), - '513616': () => getLabel('513616', "分钟,第二天上班可以晚到"), - '388876': () => getLabel('388876', "第一天{time1}下班,第二天{time2}上班不算迟到"), - '388877': () => getLabel('388877', "添加规则"), - '388878': () => getLabel('388878', "日期区间不正确"), - '389064': () => getLabel('389064', "考勤组维护"), - '388734': () => getLabel('388734', "修改规则"), - '388735': () => getLabel('388735', "考勤方式"), - '388736': () => getLabel('388736', "考勤组成员"), - '16695': () => getLabel('16695', "排班设置"), - '24833': () => getLabel('24833', "修改班次"), - '26593': () => getLabel('26593', "休息"), - '389065': () => getLabel('389065', "导出考勤方式"), - '389066': () => getLabel('389066', "导入考勤方式"), - '389073': () => getLabel('389073', "新建考勤组"), - '389090': () => getLabel('389090', "工作日设置"), - '33511': () => getLabel('33511', "批量设置"), - '16106': () => getLabel('16106', "周日"), - '16100': () => getLabel('16100', "周一"), - '16101': () => getLabel('16101', "周二"), - '16102': () => getLabel('16102', "周三"), - '16103': () => getLabel('16103', "周四"), - '16104': () => getLabel('16104', "周五"), - '16105': () => getLabel('16105', "周六"), - '311': () => getLabel('311', "清除"), - '389091': () => getLabel('389091', "选择班次"), - '389100': () => getLabel('389100', "点击打开排班周期设置"), - '389101': () => getLabel('389101', "点击查看设置排班周期后的效果"), - '389103': () => getLabel('389103', "排班周期"), - '389104': () => getLabel('389104', "设置排班周期"), - '389105': () => getLabel('389105', "每天几点开始新一天的考勤"), - '389108': () => getLabel('389108', "编辑考勤组"), - '389116': () => getLabel('389116', "格式:10.*.*.*;10.16.0.12;10.16.0.13-10.16.0.18,不填写为全部网段"), - '503729': () => getLabel('503729', '格式:FF01::1101;2001:DB8:0:23:8:800:200C:417A;12001:DB8:0:23:8:800:200C:417A-2001:DB8:0:23:8:800:200C:418A,不填写为全部网段'), - '389125': () => getLabel('389125', "办公地点列表"), - '389126': () => getLabel('389126', "办公Wifi列表"), - '125217': () => getLabel('125217', '添加成员'), - '389212': () => getLabel('389212', '添加wifi'), - '389213': () => getLabel('389213', '添加办公地点'), - '389218': () => getLabel('389218', "请选择办公地点"), - '389225': () => getLabel('389225', "排班周期设置"), - '389226': () => getLabel('389226', "以{params}天为周期进行循环,最大周期天数为31天"), - '389229': () => getLabel('389229', "第{params}天"), - '389292': () => getLabel('389292', "适用于:IT、金融、文化传媒、政府/事业单位、教育培训等行业"), - '389293': () => getLabel('389293', "适用于:餐饮、制造、物流贸易、客户服务、医院等行业"), - '389294': () => getLabel('389294', "适用于:班次没有规律,装修,家政,物流等计算工作时长的行业"), - '389320': () => getLabel('389320', "mac地址格式不正确,例: 02:10:18:02:40:7b"), - '18609': () => getLabel(18609, '共'), - '30690': () => getLabel(30690, '条数据'), - '390303': () => getLabel('390303', "休息时间应在上班时间内"), - '514034': () => getLabel('514034', '半天分界点应在上班时间内'), - stateChangeWfSetting: () => getLabel(84790, '状态变更流程'), - timeManagerWfSetting: () => getLabel(82797, '考勤流程设置'), - '15451': () => getLabel(15451, '表单名称'), - '83444': () => getLabel(83444, '自动生成'), - '384621': () => getLabel(384621, '新建状态变更流程'), - '385037': () => getLabel(385037, '新建考勤流程'), - '505676': () => getLabel(505676, '点击单元格可手动排班'), - plsSetFormName: () => getLabel(82091, '请填写表单名称'), - createWorkflow: () => getLabel(127037, '创建流程路径'), - createForm: () => getLabel(127027, '创建表单'), - editStateChangeWf: () => getLabel(385031, '编辑状态变更流程'), - editStatesSchedule: () => getLabel(385038, '编辑考勤流程'), - scheduledevice: () => getLabel(513116, '考勤机管理'), - "513617": () => getLabel(513617, '保证上班时长的前提下,早到可以早走,弹性限额'), - "513618": () => getLabel(513618, '保证上班时长的前提下,晚到可以晚走,弹性限额'), - "513619": () => getLabel(513619, '保证上班时长的前提下,前一天晚走,第二天可以晚到,弹性限额'), - "513858": () => getLabel(513858, '上班{time1}之前到,允许{time2}下班,不算早退'), - "513859": () => getLabel('523410', '如晚到了,在{time1}之前,需要{time2}以后下班才不算早退'), - "513860": () => getLabel(513860, '第一天{time1}以后下班,第二天允许{time2}上班,不算迟到'), - "513861": () => getLabel(513861, '早到早走,早到1分钟可早走1分钟,最多不超过{time1}分钟'), - "513862": () => getLabel('523411', '晚到晚走,晚到1分钟需要晚走1分钟才不算早退,最多不超过{time1}分钟'), - "513863": () => getLabel(513863, '第一天晚走1分钟,第二天可以晚到1分钟,最多不超过{time1}分钟'), - '516560': () => getLabel('516560', '时间与“#requestname_link#”存在重复,请重新提交!'), - '516561': () => getLabel('516561', '时间与“#requestname_link#”存在重复,确定要提交吗?'), - '516562': () => getLabel('516562', '补卡流程#num_type#最多可以提交#num_count#次,请重新提交!'), - '516563': () => getLabel('516563', '补卡流程#num_type#最多可以提交#num_count#次,确定要提交吗?'), - '516691': () => getLabel('516691', '新建校验规则'), - '516692': () => getLabel('516692', '编辑校验规则'), - '18929': () => getLabel('18929', '次'), - '527582': () => getLabel('527582', '司龄'), - '527583': () => getLabel('527583', '{param}年'), - '527584': () => getLabel('527584', '{param}天假'), - '527585': () => getLabel('527585', '假'), - '528302': () => getLabel('528302', '加班规则设置友情提示:'), - '528303': () => getLabel('528303', '1.【按加班的时间段设置转调休时长】的加班补偿方式与【根据加班时长扣除】休息时间的方式不可同时存在!'), - '528304': () => getLabel('528304', '2.【按加班的时间段设置转调休时长】的加班补偿方式与加班流程采用半天下拉框的方式不可同时使用!'), - '528763': () => getLabel('528763', '加班时长不能重复设置'), - '528764': () => getLabel('528764', '关闭'), - '528765': () => getLabel('528765', '假设工作日上班时间9:00-18:00,加班规则设置为下班后30分钟开始计算加班;'), - '528766': () => getLabel('528766', '加班流程时段为19:00-21:00,打卡时间段为8:30-20:00,'), - '528767': () => getLabel('528767', '取加班时间的交集为【19:00-20:00】,即加班时长1小时。'), - '528768': () => getLabel('528768', '假设休息日加班流程时段为14:00-20:00,打卡时间段为15:00-21:00,取加班时间的交集为【15:00-20:00】,加班时长5小时。'), - '528769': () => getLabel('528769', '假设节假日加班流程时段为14:00-21:00,打卡时间段为15:00-22:00,取加班时间的交集为【15:00-21:00】,加班时长6小时。'), - '528770': () => getLabel('528770', '{param}分钟'), - '528771': () => getLabel('528771', '加班起算时间'), - '528772': () => getLabel('528772', '最后一次下班后'), - '528773': () => getLabel('528773', '开始计算加班'), - '528774': () => getLabel('528774', '最早一次上班前'), - '528775': () => getLabel('528775', '{param}分钟开始'), - '528776': () => getLabel('528776', '截至上班时间计为加班时长'), - '528777': () => getLabel('528777', '次日'), - '528778': () => getLabel('528778', '示例说明'), - '528779': () => getLabel('528779', '最小加班时长'), - '528780': () => getLabel('528780', '小于该时长则加班时长记为0'), - '528781': () => getLabel('528781', '必填信息不完整'), - '528782': () => getLabel('528782', '加班时长必须大于扣除时长'), - '528783': () => getLabel('528783', '开始时间不能大于结束时间!'), - '528784': () => getLabel('528784', '休息时间段不能交叉'), - '528785': () => getLabel('528785', '调休余额规则未设置'), - '528786': () => getLabel('528786', '去设置'), - '528787': () => getLabel('528787', '加班时间转调休时间的比例'), - '528788': () => getLabel('528788', '加班{param1}小时,转调休{param2}小时'), - '528789': () => getLabel('528789', '转为调休余额'), - '528790': () => getLabel('528790', '按加班的时间段设置转调休时长】的加班补偿方式与【根据加班时长扣除】休息时间的方式不可同时存在!'), - '528791': () => getLabel('528791', '工作日跨天加班归属示例说明'), - '528792': () => getLabel('528792', '休息日跨天加班归属示例说明'), - '528793': () => getLabel('528793', '节假日跨天加班归属示例说明'), - '528794': () => getLabel('528794', '{param}小时'), - '528795': () => getLabel('528795', '加班时长'), - '528796': () => getLabel('528796', '转调休时长'), - '528797': () => getLabel('528797', '加班时间在{param}'), - '528798': () => getLabel('528798', '{param}后'), - '528799': () => getLabel('528799', '按照'), - '528800': () => getLabel('528800', '{param}比例转调休时长'), - '528801': () => getLabel('528801', '休息开始'), - '528802': () => getLabel('528802', '结束时间'), - '528803': () => getLabel('528803', '每天加班满'), - '528804': () => getLabel('528804', '扣除'), - '528910': () => getLabel('528910', '开启【自定义跨天加班归属分界点】时才可设置上班前的加班起算时间'), - - '528923': () => getLabel('528923', '默认跨天加班归属分界点示例说明'), - '528924': () => getLabel('528924', '自定义跨天加班归属分界点示例说明'), - - '528925': () => getLabel('528925', '1.固定班制设置1天1次打卡,上班标准时段设置为9:00-18:00;'), - '528926': () => getLabel('528926', '2.假设加班时段为周一20:00至周二凌晨2:00,而未设置自定义跨天加班归属分界点时,则取周一的上班时间为默认分界点;'), - '528927': () => getLabel('528927', '3.默认取周一(前一天)的上班时间9:00+24h为跨天加班的分界点,即跨天加班时段(20:00-2:00)的6小时归属为周一的加班时长 。如下图所示:'), - '528928': () => getLabel('528928', '2.假设加班时段为周一20:00至周二凌晨2:00,设置自定义跨天加班归属分界点为:次日0点;'), - '528929': () => getLabel('528929', '3.分界点0点前的4小时(20:00-0:00)归属为周一的加班时长,0点后的2小时(0:00-2:00)归属为周二的加班时长 。如下图所示:'), - '528930': () => getLabel('528930', '4.当自定义跨天加班归属分界点与上班前加班起算时间交叉设置时的示例说明:'), - '528931': () => getLabel('528931', '假设自定义跨天加班归属分界点设置为8:00,上班前加班起算时间设置的上班前120分钟,即早上(7:00-9:00)计为加班;则:8点前的1小时(7:00-8:00)归属为前一个工作日的加班时长,8点后的1小时(8:00-9:00)归属为当天的加班时长 。如下图所示:'), - - '528932': () => getLabel('528932', '1.假设加班时段为周六20:00至周日凌晨2:00,而未开启自定义跨天加班归属分界点,则默认取0点为默认分界点;'), - '528933': () => getLabel('528933', '2.默认取0:00为休息日跨天加班的分界点,即0点前的加班时段(20:00-0:00)4小时归属为周六的加班时长,0点后的加班时段(0:00-2:00)2小时归属为周日的加班时长 。如下图所示:'), - '528934': () => getLabel('528934', '1.假设加班时段为周六20:00至周日凌晨2:00,而自定义跨天加班归属分界点为:次日1点;'), - '528935': () => getLabel('528935', '2.自定义分界点1:00 前的加班时段(20:00-次日1:00)合计5小时归属为周六的加班时长,1点后的加班时段(1:00-2:00)共1小时归属为周日的加班时长 。如下图所示:'), - - '528936': () => getLabel('528936', '1.假设国庆节加班时段(10月1日 18:00- 10月2日 6:00),而未开启自定义跨天加班归属分界点,则默认取0点为默认分界点;'), - '528937': () => getLabel('528937', '2.默认取0:00为节假日的跨天加班分界点,即0点前的6小时(18:00-0:00)归属为10月1日的加班时长,0点后的6小时(0:00-6:00)归属为10月2日的加班时长 。如下图所示:'), - '528938': () => getLabel('528938', '1.假设国庆节加班时段(10月1日 18:00- 10月2日 6:00),而自定义跨天加班归属分界点为:次日2点;'), - '528939': () => getLabel('528939', '2.自定义分界点2:00 前的加班时段(18:00-次日2:00)合计8小时归属为10月1日的加班时长,2点后的加班时段(2:00-6:00)共4小时归属为10月2日的加班时长 。如下图所示:'), - - '529182':()=>getLabel('529182','遇公众假日') , - '117487':()=>getLabel('117487','遇调配工作日') , - '529183':()=>getLabel('529183','遇调配休息日') , - '530043':()=>getLabel('530043','上班前开始算加班设置的时间需在自定义跨天加班归属之后') , - '530919':() => getLabel('530919','{param}天假') , - }, - 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, '请先选择'), - dataEmpty: () => getLabel(82241, '不能为空'), - selectImportTemplete: () => getLabel(385362, '请选择导入模板!'), - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/learn.js b/pc4backstage/hrmAttendance/public/learn.js deleted file mode 100644 index 9c3dcd7..0000000 --- a/pc4backstage/hrmAttendance/public/learn.js +++ /dev/null @@ -1,262 +0,0 @@ -import React from 'react' -import { - WeaAlertPage, - WeaLocaleProvider, -} from 'ecCom'; -import { - Spin -} from 'antd'; -import jquery from 'jquery'; -const getLabel = WeaLocaleProvider.getLabel; - -class AlertPage extends React.Component { - render() { - return ( -
- -
- {getLabel(2012, '对不起,您暂时没有权限!')} -
-
-
- ) - } -} - - -class NoData extends React.Component { - render() { - const { - className = 'icon-coms-NoData', - tip = getLabel('83553', "暂无数据!") - } = this.props; - - return ( -
- -

{tip}

-
- ) - } -} - -class Loading extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - size - } = this.props; - - const style = { - position: 'absolute', - top: '50%', - left: '50%', - marginLeft: (size === 'lg') ? -16 : -8, - marginTop: (size === 'lg') ? -16 : -8, - } - - return ( -
- -
- ) - } -} - -//Icon组件参数:bgColor(背景色)必填,shape(形状)、pixel(像素)选填,默认为正方形和10px, -//onIconClick为图标点击的回调函数,回调的值为图标的状态值:0和1。0 -> 关闭,1 -> 开启。 -//当不传onIconClick参数时,点击图标没有变化。 -class Icon extends React.Component { - constructor(props) { - super(props); - } - - handleClick = () => { - const { - iconState - } = this.props; - - //当父组件没有传onIconClick参数时,不处理这个点击事件。 - if (!this.props.onIconClick) { - return - } - - //将图标的状态通过回调函数传回到父组件 - this.props.onIconClick(iconState === 0 ? 1 : 0); - } - - render() { - const { - iconState, //图标的状态值 - bgColor, - className, - shape = 'square', //默认为正方形 - pixel = 10, //默认为10px - } = this.props; - - const style = { - backgroundColor: (iconState === 1) ? bgColor : '#C0C0C0', //图标开启时,使用bgColor作为背景色;当为关闭的状态,则将背景色置为灰色。 - width: pixel, - height: pixel, - cursor: 'pointer', - } - - if (shape === 'circle') { //图标为圆形的情况 - Object.assign(style, { - borderRadius: '50%' - }); - } - - return ( -
- ) - } -} - -import { - WeaOrgTree, -} from 'ecCom'; - -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()); - } - - handleOrgTreeNodeClick = (event, ids, nodeids, nodes) => { - const { - handleOrgTreeNodeClick - } = this.props; - - const { - type, - name - } = nodes[0]; - - handleOrgTreeNodeClick({ - id: ids[0], - type, - name - }); - } - - render() { - const { - title, - rightStr - } = this.props; - - return ( -
- ${title}`} - params={{rightStr:rightStr}} - treeNodeClick = {(event, ids, nodeids, nodes) => this.handleOrgTreeNodeClick(event, ids, nodeids, nodes)} - /> -
- ) - } -} - -class Tip extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - tip, - icon - } = this.props; - - return ( -
- -

{tip}

-
- ) - } -} - -class DistanceToPeak extends React.Component { - constructor(props) { - super(props); - } - - componentDidMount() { - const { - requestDistanceToPeak - } = this.props; - - const headerHeight = jquery('.e9theme-bs-header').height(); - const navbarHeight = jquery('.e9theme-bs-navbar').height(); - - const gap = 10; - - let distance = 0; - if (headerHeight !== null) { - distance = headerHeight + navbarHeight + 10; - } - - requestDistanceToPeak(distance); - - } - - render() { - return ( -
- ); - } -} - -export { - AlertPage, - NoData, - Loading, - Icon, - LeftTree, - Tip, - DistanceToPeak, -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/logType.js b/pc4backstage/hrmAttendance/public/logType.js deleted file mode 100644 index 243738d..0000000 --- a/pc4backstage/hrmAttendance/public/logType.js +++ /dev/null @@ -1,9 +0,0 @@ -export const logTypeDef = { - /** - * definition of log type - * key-value mode - */ - //simple - HRM_ENGINE_HRM_SCHEDULESIGN_IMPORT :20052,//外部集成考勤 - HRM_ENGINE_RESOURCEFIELDDEFINED_GROUP: 20067,//班次设置 -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/sweet-form.js b/pc4backstage/hrmAttendance/public/sweet-form.js deleted file mode 100644 index f13fc49..0000000 --- a/pc4backstage/hrmAttendance/public/sweet-form.js +++ /dev/null @@ -1,317 +0,0 @@ -import React from 'react'; -import { - WeaFormItem, - WeaSearchGroup, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import { - toJS -} from 'mobx'; -import { - Row, - Col, -} from 'antd'; - -class MagicForm extends React.Component { - constructor(props) { - super(props); - this.state = { - usedAsForceUpdate: new Date() - } - } - - //监听表单元素事件的回调函数 - handleFormChange = (cb) => { - const { - onFormElementsChange, - dynamicFields, - } = this.props; - - dynamicFields && dynamicFields.map(field => { - const { - activeKey, - } = field; - - if (Object.keys(cb)[0] === activeKey) { - this.forceUpdate(); - } - }); - //当父组件没有传onFormElementsChange属性时,不执行下面的回调函数。 - if (!onFormElementsChange) return; - - onFormElementsChange(cb); - } - - //强制刷新组件 - forceUpdate = () => { - this.setState({ - usedAsForceUpdate: new Date() - }); - } - - //判断当前表单元素能否被渲染 - canRender = (domkey) => { - const { - dynamicFields, - form - } = this.props; - - //表单元素能否被渲染的标志:true -> 可以被渲染; false -> 不可以被渲染 - let flag = true; - - dynamicFields.map(field => { - const { - passiveKey, - activeKey, - showValue - } = field; - - const showValueArray = showValue.split(','); - //判断是否为被联动的表单元素(被动) - if (domkey === passiveKey) { - const activeValue = form.getFormParams()[activeKey]; - - if (!showValueArray.includes(activeValue)) { - flag = false; - } - } - }); - - return flag; - } - - getSubComponent = (params) => { - const { - dirtyKeys, //需要被特殊渲染的表单元素的domkey集合 - dirtyComponent, //特殊组件 - classNames, - } = this.props, { - domkey, - item, - form, - label - } = params; - - if (dirtyKeys && dirtyKeys.includes(domkey)) { - return dirtyComponent(params) - } else { - return ( -
- - {this.getSiblingComponent(domkey, form)} -
- ) - } - } - - getClassName = (domkey) => { - const { - classNames - } = this.props; - - return this.isObjectHasDomkey(classNames, domkey) ? classNames[domkey] : ''; - } - - //获取WeaSwitch组件的相邻组件 - getSiblingComponent = (domkey, form) => { - const { - staticTips, //静态提示 - dynamicTips, //动态提示 - transverseSiblingComponents, //横向相邻组件 - longitudinalSiblingComponents, //纵向相邻组件 - customizations, //自定义组件 - } = this.props; - - let siblings = []; - //静态提示 - if (this.isObjectHasDomkey(staticTips, domkey)) { - siblings.push(staticTips[domkey]); - } - //动态提示 - if (this.isObjectHasDomkey(dynamicTips, domkey)) { - const index = parseInt(form.getFormParams()[domkey]) - 1; - const tipsLen = dynamicTips[domkey].length; - let _index; - if (index < 0) { - _index = (tipsLen - 1); - } else { - _index = index; - } - siblings.push(

0 && dynamicTips[domkey][_index] }} />

); - } - //横向相邻组件 - if (this.isObjectHasDomkey(transverseSiblingComponents, domkey)) { - siblings.push(transverseSiblingComponents[domkey]); - } - //纵向相邻组件 - if (this.isObjectHasDomkey(longitudinalSiblingComponents, domkey)) { - siblings.push(longitudinalSiblingComponents[domkey]); - } - //自定义组件 - if (this.isObjectHasDomkey(customizations, domkey)) { - siblings.push(customizations[domkey]); - } - - return siblings; - } - - //判断domkey是否在容器中 - isObjectHasDomkey = (obj, domkey) => { - return obj && Object.keys(obj).includes(domkey) - } - - render() { - const { - conditions, - form, - isFormInit, - dynamicFields, //动态域 - date, //刷新组件 - dirtyKeys, - renderBlacklist, //不需要渲染的items, - labels, - wrapperStyle, - errors, - } = this.props, { - usedAsForceUpdate - } = this.state; - - if (!isFormInit) return null; - - //WeaFormItem组件的容器 - const formItemContainer = []; - - const translatedConditions = toJS(conditions); - //conditions数据类型:数组或者对象 - const c = Array.isArray(translatedConditions) ? translatedConditions[0] : conditions; - - c.items.map((item, index) => { - const { - domkey, - viewAttr, - } = item; - - //判断当前表单元素是否需要被渲染 - if (dynamicFields && !this.canRender(domkey[0])) return - - if (renderBlacklist && renderBlacklist.includes(domkey[0])) return - - if (labels && Object.keys(labels).includes(domkey[0])) { - item.label = labels[domkey[0]]; - } - - const isDirty = dirtyKeys ? dirtyKeys.includes(domkey[0]) : false; - - let error; - - if (errors) { - error = errors[domkey[0]]; - } else { - error = !isDirty && form.getError(item); - } - - formItemContainer.push( - - {this.getSubComponent({ - domkey:domkey[0], - label:item.label, - item, - form, - })} - - ) - }) - - return
{formItemContainer}
- } -} - -//复合表单组件 -class CompositeForm extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - conditions - } = this.props; - - return (
- { - conditions.map((c, index) => { - const { - title - } = c; - - return (} - />) - }) - } -
) - } -} - -//高级搜索表单 -class SearchForm extends React.Component { - constructor(props) { - super(props); - } - - render() { - const { - form, - conditions, - isFormInit - } = this.props; - - if (!isFormInit) return null; - - const formItemContainer = []; - - conditions.map(c => { - c.items.map((item, index) => { - formItemContainer.push( -
- - {} - - - ) - }) - }) - - return ( - {formItemContainer} - ) - } -} - -export { - MagicForm, - CompositeForm, - SearchForm, -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/AccountIcon.js b/pc4backstage/hrmAttendance/public/valhalla/components/AccountIcon.js deleted file mode 100644 index 1b09a8d..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/AccountIcon.js +++ /dev/null @@ -1,45 +0,0 @@ -import { - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -export default class AccountIcon extends React.Component { - render() { - const { - isShow, - onClick - } = this.props; - - const style = { - padding: 6, - border: '1px solid #D9D9D9', - cursor: 'pointer' - }; - - if (isShow) { - Object.assign(style, { - color: '#2DB7F5' - }); - } - - if (isShow) { - return ( - onClick(false)} - /> - ) - } else { - return ( - onClick(true)} - /> - ); - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/AddButton.js b/pc4backstage/hrmAttendance/public/valhalla/components/AddButton.js deleted file mode 100644 index 7eb32f2..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/AddButton.js +++ /dev/null @@ -1,19 +0,0 @@ -import '../style/addButton.less'; - -export default class AddButton extends React.Component { - render() { - const { - onClick, - label - } = this.props; - - return ( -
- - - {label} - -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/Authority.js b/pc4backstage/hrmAttendance/public/valhalla/components/Authority.js deleted file mode 100644 index 8c6a628..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/Authority.js +++ /dev/null @@ -1,54 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaAlertPage, - WeaLocaleProvider, -} from 'ecCom'; -import { - Spin -} from 'antd'; -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Authority extends React.Component { - render() { - const { - store - } = this.props, { - loading, - hasRight, - } = store; - - //css in js - const style = { - position: 'absolute', - top: '50%', - left: '50%', - marginLeft: -16, - marginTop: -16, - } - - if (loading) { - return ( -
- -
- ) - } - - if (hasRight) { - return this.props.children; - } else { - return ( -
- -
- {getLabel(2012, '对不起,您暂时没有权限!')} -
-
-
- ) - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/CenterSpin.js b/pc4backstage/hrmAttendance/public/valhalla/components/CenterSpin.js deleted file mode 100644 index f28d32a..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/CenterSpin.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - Spin -} from 'antd'; - -export default class CenterSpin extends React.Component { - render() { - const { - loading, - size, - } = this.props; - - const style = { - position: 'absolute', - top: '50%', - left: '50%', - marginLeft: -8, - marginTop: -8, - } - - if (size === 'large') { - Object.assign(style, { - marginLeft: -16, - marginTop: -16, - }); - } - - if (loading) { - return ( -
- -
- ) - }else{ - return this.props.children - } - - - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/DeleteButton.js b/pc4backstage/hrmAttendance/public/valhalla/components/DeleteButton.js deleted file mode 100644 index cea206c..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/DeleteButton.js +++ /dev/null @@ -1,15 +0,0 @@ -import '../style/deleteButton.less'; - -export default class DeleteButton extends React.Component { - render() { - const { - onClick, - } = this.props; - - return ( - - - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/Dialog.js b/pc4backstage/hrmAttendance/public/valhalla/components/Dialog.js deleted file mode 100644 index 48d471f..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/Dialog.js +++ /dev/null @@ -1,37 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaDialog -} from "ecCom"; - -@observer -export default class Dialog extends React.Component { - render() { - const { - store - } = this.props, { - dialogProps, - title, - style, - visible, - buttons, - moreBtn={}, - closeDialog - } = store; - - return ( - - {this.props.children} - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/MagicForm.js b/pc4backstage/hrmAttendance/public/valhalla/components/MagicForm.js deleted file mode 100644 index a5e6fca..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/MagicForm.js +++ /dev/null @@ -1,226 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaFormItem, - WeaSearchGroup, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; - -@observer -export default class MagicForm extends React.Component { - //表单是否需要分组 - isNeedSearchGroup = (conditions) => { - return conditions.length > 1 - } - - //表单元素是否显示 - isItemShow = (item) => { - const { - store - } = this.props, { - form, - customRenderKeyList - } = store; - - const { - domkey - } = item; - - //自定义渲染 - if (customRenderKeyList && customRenderKeyList.includes(domkey[0])) { - return false; - } - - const linkageConfig = this.findLinkageConfig(domkey[0]); - - if (linkageConfig) { - const { - activeKey, - showValue - } = linkageConfig; - - //active表单元素当前的value - const curActiveVal = form.getFormParams()[activeKey]; - - //当value包含curActiveVal时,显示当前表单元素 - return showValue.includes(curActiveVal) - } - - return true; - - } - - //查找联动当前表单元素的 - findLinkageConfig = (passiveKey) => { - const { - store - } = this.props, { - linkageConfigs - } = store; - - return linkageConfigs && linkageConfigs.find(config => config.passiveKey === passiveKey); - } - - renderForm = (items) => { - const { - store - } = this.props, { - form - } = store; - - return items.map((item, index) => { - if (!this.isItemShow(item)) { - return null; - } - - const { - label, - labelcol, - fieldcol, - domkey - } = item; - - return ( - - {this.renderFormItemChildren(item)} - - ) - }) - } - - renderFormItemChildren = (item) => { - const { - store - } = this.props, { - form, - handleFormChange, - } = store; - - return ( -
- - {this.renderOtherComponents(item)} -
- ) - } - - renderOtherComponents = (item) => { - const { - store - } = this.props, { - form, - handleFormChange, - otherComponents - } = store; - - if (!otherComponents) { - return null; - } - - const { - domkey - } = item; - - const fn = otherComponents[domkey[0]]; - - if (fn) { - return fn(item, form) - } else { - return null; - } - } - - //表单元素控制组 - getFormGroup = (index, condition) => { - const { - store - } = this.props, { - groupShowConfigs, - form, - isCenter - } = store; - - const { - title, - items, - defaultshow = true, - } = condition; - - if (groupShowConfigs) { - return groupShowConfigs.map((config,i) => { - const { - activeKey, - passiveIndex, - showValue - } = config; - - const activeVal = form.getFormParams()[activeKey]; - - if ( - (index === passiveIndex && showValue.includes(activeVal)) || - (index !== passiveIndex) - ) { - return ( - - ) - } - - }) - } else { - return ( - - ) - } - } - - render() { - const { - store - } = this.props, { - conditions, - form, - } = store, { - isFormInit - } = form; - - const hasSearchGroup = this.isNeedSearchGroup(conditions); - - return ( - isFormInit && conditions.map( (condition,index) => { - const { - items, - } = condition; - - if (hasSearchGroup) { - return this.getFormGroup(index,condition); - } else { - return this.renderForm(items) - } - }) - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/OrgTree.js b/pc4backstage/hrmAttendance/public/valhalla/components/OrgTree.js deleted file mode 100644 index d33df8d..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/OrgTree.js +++ /dev/null @@ -1,49 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaOrgTree, -} from 'ecCom'; - -@observer -export default class OrgTree extends React.Component { - constructor(props) { - super(props); - this.tree = null; - this.setRef = element => { - this.tree = element; - } - } - - componentDidMount() { - this.init() - } - - componentDidUpdate(prevProps, prevState) { - this.init() - } - - init = () => { - if (this.tree) this.tree.reset(() => this.tree.fetchData()); - } - - render() { - const { - store - } = this.props, { - triggerRefresh, - orgTreeProps, - handleOrgTreeNodeClick, - } = store; - - return ( -
- -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/RadioGroup.js b/pc4backstage/hrmAttendance/public/valhalla/components/RadioGroup.js deleted file mode 100644 index 888a886..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/RadioGroup.js +++ /dev/null @@ -1,30 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - toJS -} from 'mobx'; -import { - WeaRadioGroup -} from 'ecCom'; - -@observer -export default class RadioGroup extends React.Component { - render() { - const { - store - } = this.props, { - config, - handleRadioGroupChange - } = store; - - return ( -
- -
- ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/Search.js b/pc4backstage/hrmAttendance/public/valhalla/components/Search.js deleted file mode 100644 index 967dc39..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/Search.js +++ /dev/null @@ -1,45 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaTab -} from 'ecCom'; - -@observer -export default class Search extends React.Component { - render() { - const { - store - } = this.props, { - searchProps, - datas, - selectedKey, - buttons, - searchsBaseValue, - showSearchAd, - setShowSearchAd, - searchsAd, - buttonsAd, - handleTabChange, - handleSearch, - handleSearchChange, - } = store; - - return ( - - ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/Table.js b/pc4backstage/hrmAttendance/public/valhalla/components/Table.js deleted file mode 100644 index f549542..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/Table.js +++ /dev/null @@ -1,30 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaTableNew, -} from 'comsMobx'; -const WeaTable = WeaTableNew.WeaTable; - -@observer -export default class Table extends React.Component { - render() { - const { - store - } = this.props, { - tableProps, - tableStore, - onOperatesClick, - reRenderColumns, - } = store; - - return ( - onOperatesClick(record,index,operate,flag)} - getColumns={columns=>reRenderColumns(columns)} - /> - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/Top.js b/pc4backstage/hrmAttendance/public/valhalla/components/Top.js deleted file mode 100644 index 3584d17..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/Top.js +++ /dev/null @@ -1,36 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaTop, - WeaRightMenu -} from 'ecCom'; - -@observer -export default class Top extends React.Component { - render() { - const { - store, - } = this.props, { - title, - loading, - topProps, - buttons, - dropMenuDatas - } = store; - - return ( - - - {this.props.children} - - - ); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportHistory.js b/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportHistory.js deleted file mode 100644 index 12c9c12..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportHistory.js +++ /dev/null @@ -1,118 +0,0 @@ -import { - observer -} from 'mobx-react'; -import { - WeaDialog, - WeaMoreButton, -} from 'ecCom' -import { - Button, -} from 'antd' -import { - WeaTableNew -} from 'comsMobx'; -import { - jumpToHrmCard -} from '../../../../util/pulic-func' -import { - WeaLocaleProvider -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; -const WeaTable = WeaTableNew.WeaTable; - -import ImportLog from './ImportLog' -import ImportResult from './ImportResult' - -@observer -export default class ImportHistory extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 870, - height: 510, - } - } - - reRenderColumns(c) { - const { - store - } = this.props, { - jumpToImportResult - } = store; - - - 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 { - store - } = this.props, { - recordDialog, - queryLog, - } = store, { - loading - } = recordDialog; - - return [ - (), - () - ]; - } - - render() { - const { - store - } = this.props, { - recordDialog, - logDialog, - resultDialog, - setRecordDialogVisible - } = store, { - 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/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportLog.js b/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportLog.js deleted file mode 100644 index bfc2093..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportLog.js +++ /dev/null @@ -1,174 +0,0 @@ -import { - 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 '../../../../util/pulic-func'; -import { - WeaLocaleProvider -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; -const WeaTable = WeaTableNew.WeaTable; - -@observer -export default class ImportLog extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 870, - height: 510, - isPanelShow: false, - num: 5, - } - } - - getPanelComponents() { - const { - store - } = this.props, { - logDialog - } = store, { - 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' ? {getLabel(15242, '成功')} : {getLabel(498, '失败')}} - } - } - }); - } - - getDialogButtons = () => { - const buttons = [ - () - ]; - return buttons - } - - getSearchPanelButtons = () => { - const { - store - } = this.props, { - searchLogInfo, - setLogPanelStatus, - logDialog, - } = store, { - form - } = logDialog; - - return [ - (), - (), - (), - ]; - } - - render() { - const { - store - } = this.props, { - logDialog, - setLogDialogVisible, - setLogPanelStatus, - } = store, { - 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/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportResult.js b/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportResult.js deleted file mode 100644 index 6b997f7..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/ImportResult.js +++ /dev/null @@ -1,226 +0,0 @@ -import { - 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 { - WeaLocaleProvider -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; -const WeaTable = WeaTableNew.WeaTable; - -import ImportLog from './ImportLog' - -@observer -export default class ImportResult extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 740, - height: 450, - } - } - - getButtons = () => { - const { - store - } = this.props, { - resultDialog, - setLogDialogVisible, - } = store, { - 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 { - store - } = this.props, { - resultDialog - } = store, { - errorTip, - errorInfo - } = resultDialog - - const columns = [{ - "title": getLabel(24960, '提示信息'), - "width": "100%", - "dataIndex": "message", - render: (text, record, index) => { - return {text} - } - }]; - - const elements =
-
-
- -
- {errorTip} -
-
- ; - return elements; - } - - getResultInfo = () => { - const { - store - } = this.props, { - resultDialog - } = store, { - succnum, - failnum, - tableStore, - } = resultDialog, { - height - } = this.state; - - const icon =
0 ? '#54D3A2' : '#FF0000' }} className='hrm-import-error-tip'> - 0 ? 'check' : 'cross'} style={{ color: '#fff',fontSize: 18 }} /> -
; - const tip = 0 ? '#54D3A2' : '#FF0000'}}>{(succnum > 0 && failnum == 0) ? getLabel(384061, '共{rownum}条数据,全部导入成功!').replace('{rownum}',`${succnum+failnum}`) : getLabel(384060, '共{rownum}条数据,{succnum}条导入成功!').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,textAlign:'center'} : {marginTop: height/2 -30,textAlign:'center'}}>{icon}{tip}
-
{resultTable}
-
- } - - getImportProcessInfo = () => { - const { - store - } = this.props, { - resultDialog - } = store, { - datas, - importStatus - } = resultDialog; - - const columns = [{ - "title": getLabel(27592, '行'), - "width": "15%", - "dataIndex": "rownum" - }, { - "title": getLabel(602, '状态'), - "width": "15%", - "dataIndex": "status", - render: (text, record, index) => { - return {text=='1'?getLabel(15242, '成功'):getLabel(498, '失败')} - } - }, { - "title": getLabel(24960, '提示信息'), - "width": "70%", - "dataIndex": "message", - render: (text, record, index) => { - return {text} - } - }]; - - const loadingTip = (importStatus !== 'over' || importStatus !== 'error') && ; - - const processTable =
- - return
-
{loadingTip}
-
{processTable}
-
- } - - render() { - const { - store - } = this.props, { - resultDialog, - logDialog, - setResultInfoDialogVisible, - hasErrorInfo, - setScoll - } = store, { - 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/hrmAttendance/public/valhalla/components/importRelatedComponet/index.js b/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/index.js deleted file mode 100644 index 0e09cf5..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/importRelatedComponet/index.js +++ /dev/null @@ -1,260 +0,0 @@ -import { - 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 '../../../../util/pure-util.js' -import { - WeaLocaleProvider -} from 'ecCom'; -import ImportResult from './ImportResult' -import ImportHistory from './ImportHistory' -import {addContentPath} from '../../../../util/index.js' -const getLabel = WeaLocaleProvider.getLabel; - -@observer -export default class Import extends React.Component { - constructor(props) { - super(props); - this.state = { - width: 870, - height: 510, - list: [], - upStatus: '', - } - } - - getForm = () => { - const { - store - } = this.props, { - importDialog - } = store, { - 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 { - store - } = this.props, { - setExcelFileNo, - importDialog, - setSelectedValue - } = store, { - 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 ?

{ getLabel(384040, '未选择任何文件')}

: list.map(file =>

{file.filename}

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

{ getLabel(383083, '请先下载模板')}:{dom}

); - } else { - p = (

{val}

); - } - return p; - } - - getTempletElement = (url, selectedValue, templetName) => { - let dom; - let urlArr = url.split(';'); - if (urlArr.length > 1) { - if (selectedValue == '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 { - store - } = this.props, { - submitExcel, - queryRecord, - importDialog, - } = store, { - upStatus - } = this.state; - - return [ - (), - (), - () - ]; - } - - render() { - const { - store - } = this.props, { - importDialog, - resultDialog, - recordDialog, - setImportDialogVisible - } = store, { - visible, - title, - loading - } = importDialog, { - width, - height, - } = this.state; - - return ( -
- setImportDialogVisible(false) } - buttons={this.getButtons()} - style={{width: width, height: height}} - onChangeHeight={(h) => this.setState({height: h})} - > - - - {this.getForm()} - - - - {resultDialog.visible && } - {recordDialog.visible && } -
- ) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/components/index.js b/pc4backstage/hrmAttendance/public/valhalla/components/index.js deleted file mode 100644 index b19211b..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/components/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import Authority from './Authority.js'; -import Dialog from './Dialog.js'; -import Search from './Search.js'; -import Table from './Table.js'; -import Top from './Top.js'; -import OrgTree from './OrgTree.js'; -import RadioGroup from './RadioGroup.js'; - -import MagicForm from './MagicForm.js'; -import CenterSpin from './CenterSpin.js'; -import AccountIcon from './AccountIcon'; - -export { - Authority, - Dialog, - Search, - Table, - Top, - OrgTree, - RadioGroup, - - MagicForm, - CenterSpin, - AccountIcon, -} diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/authority.js b/pc4backstage/hrmAttendance/public/valhalla/stores/authority.js deleted file mode 100644 index 40aaad6..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/authority.js +++ /dev/null @@ -1,30 +0,0 @@ -import { - observable, - action -} from 'mobx'; - -export default class AuthorityStore { - constructor(api) { - this.api = api; - } - - @observable hasRight = false; - @observable loading = true; - - @action fetchAuthority = () => { - return new Promise((resolve, reject) => { - this.api().then(datas => { - const { - hasRight - } = datas; - - this.hasRight = hasRight; - this.loading = false; - - if (hasRight) { - resolve(); - } - }); - }) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/dialog.js b/pc4backstage/hrmAttendance/public/valhalla/stores/dialog.js deleted file mode 100644 index 86fab34..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/dialog.js +++ /dev/null @@ -1,67 +0,0 @@ -import { - observable, - action, - computed -} from 'mobx'; - -export default class DialogStore { - constructor(rootStore) { - this.rootStore = rootStore; - } - - get dialogProps() { - return { - hasScroll: true, - icon: 'icon-coms-hrm', - iconBgcolor: '#217346', - } - } - - //控制弹框显隐 - @observable visible = false; - - @action openDialog = () => { - this.visible = true; - } - - @action closeDialog = () => { - this.visible = false; - - const mark = this.getDialogMark(); - let markPro; - if (mark) { - //首字母大写 - markPro = mark.replace(mark[0],mark[0].toUpperCase()); - }else{ - markPro = mark; - } - - if (this.rootStore[`close${markPro}Dialog`]) { - this.rootStore[`close${markPro}Dialog`](); - } - } - - @computed get buttons() { - const mark = this.getDialogMark(); - return this.rootStore[`${mark}DialogButtons`]; - } - - @computed get moreBtn() { - const mark = this.getDialogMark(); - return this.rootStore[`${mark}MoreBtn`]; - } - - //获取弹框的标识,便于从rootStore中获取对应的buttons和moreBtn。 - getDialogMark = () => { - return (this.dialogMark !== undefined) ? this.dialogMark : ''; - } - - //设置弹框的标题、样式、标识等。 - setDialogConfig=(config)=>{ - Object.keys(config).forEach(key=>{ - this[key] = config[key]; - }) - } - - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/form.js b/pc4backstage/hrmAttendance/public/valhalla/stores/form.js deleted file mode 100644 index 635ffa2..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/form.js +++ /dev/null @@ -1,138 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaForm -} from 'comsMobx'; - -export default class FormStore { - constructor(api, rootStore) { - this.api = api; - this.rootStore = rootStore - } - - isCenter = false - @observable form = new WeaForm(); - @observable conditions = []; - @observable loading = false; - @observable customRenderKeyList = []; - - //自定义渲染 - get otherComponents() { - const mark = this.getFormMark(); - return this.rootStore[`${mark}OtherComponents`]; - } - - @computed get customRenderItem(){ - const obj = [] - this.conditions.forEach(c => c.items.forEach(item => { - const [key] = item.domkey - if (this.customRenderKeyList.includes(key)) { - obj[key] = item - } - })) - return obj - } - - @action fetchForm = (params = {}, exportDatas, afterInit) => { - //控制页面、弹框出现loading态 - this.loading = true; - //清空表单数据 - this.form = new WeaForm(); - - return this.api(params).then(datas => { - //将接口返回的数据抛出去 - exportDatas && exportDatas(datas); - - const conditions = this.getCondition(datas); - - if (this.isCustomRender) { //是否自定义渲染 - this.conditions = conditions; - this.form.initFormFields(conditions, afterInit); - } else { - this.form.setCondition(conditions); - } - - this.loading = false; - - }) - } - - //校验表单 - validateForm = (form) => { - return new Promise((resolve, reject) => { - form.validateForm().then(f => { - if (f.isValid) { - resolve(); - } else { - f.showErrors(); - } - }) - }) - } - - //收集所有ViewAttr为3的表单元素对应的key值 - collectViewAttr3keys = (conditions) => { - let keys = []; - this.conditions.forEach(c => { - c.items.forEach(item => { - const { - viewAttr, - domkey - } = item; - - if (viewAttr === 3) { - let key; - if (domkey.length > 1) { - key = domkey.join('__'); - } else { - key = domkey[0]; - } - keys.push(key); - } - }) - }) - return keys - } - - //收集不需要校验的表单元素对应的key值 - collectHideFormFieldKeys = (showFormFieldKeys) => { - const viewAttr3keys = this.collectViewAttr3keys(); - return viewAttr3keys.filter(key => !showFormFieldKeys.includes(key)); - } - - //处理后端接口参数名混乱的问题 - getCondition = (datas) => { - let c = []; - Object.keys(datas).forEach(key => { - if (key.includes('condition')) { - c = datas[key]; - } - }) - return c; - } - - //修改表单元素,触发的回调函数 - handleFormChange = (datas) => { - this.rootStore.handleFormChange && this.rootStore.handleFormChange(datas); - } - - //获取表单的标识 - getFormMark = () => { - return (this.formMark !== undefined) ? this.formMark : ''; - } - - setCustomRenderKeyList = (customRenderKeyList) => { - this.customRenderKeyList = customRenderKeyList; - } - - //config包括:searchGroupProps、comProps、customRenderKeyList、linkageConfigs、isCustomRender、formMark等 - setFormConfig = (config) => { - Object.keys(config).forEach(key => { - this[key] = config[key]; - }) - } - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/importCommon.js b/pc4backstage/hrmAttendance/public/valhalla/stores/importCommon.js deleted file mode 100644 index 72f94ba..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/importCommon.js +++ /dev/null @@ -1,431 +0,0 @@ -import * as Api from '../../../apis/importresource'; -import { - observable, - action, - extendObservable -} from 'mobx'; -import { - WeaForm, - WeaTableNew -} from 'comsMobx'; -import { - message -} from 'antd'; -import { - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; - -export default class ImportCommon { - sourceStore = null; - @observable importType = ''; - @observable importDialog = { - visible: false, - condition: [], - form: new WeaForm(), - title: '', - loading: true, - templetName: '', - selectedValue: 'workcode', - } - - @observable resultDialog = { - title: observable.ref(getLabel(82341, '导入结果')), - errorTip: observable.ref(getLabel(529729, '导入文件存在以下错误,请解决后重新上传!')), - visible: false, - index: 1, - datas: [], - importStatus: '', - pId: '', - interval: '', - tableStore: new TableStore(), - errorInfo: [], - succnum: 0, - failnum: 0, - loading: true, - component: '', - } - - @observable recordDialog = { - title: observable.ref(getLabel(24644, '历史导入记录')), - visible: false, - tableStore: new TableStore(), - } - - @observable logDialog = { - title: observable.ref(getLabel(24835, '导入日志')), - visible: false, - tableStore: new TableStore(), - isPanelShow: false, - form: new WeaForm(), - condition: [], - loading: true, - } - - @action - getImportForm = () => { - this.importDialog.loading = true; - let params = { - importType: this.importType - }; - if (this.importDialog.formAsyncParams) { - Object.assign(params, { - ...this.importDialog.formAsyncParams - }); - } - Api.getImportForm(params).then(rs => { - const { - status, - condition = [], - } = rs; - - if (status == '1') { - this.importDialog.condition = condition; - const copy = [...condition]; - copy.splice(1); - copy[0].items.splice(2); - this.importDialog.form.initFormFields(copy); - this.importDialog.loading = false; - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - getImportProcessInfo = () => { - let params = { - importType: this.importType, - index: this.resultDialog.index, - }; - Api.getImportProcessLog(params).then(rs => { - const { - datas, - index, - pId = '', - status - } = rs; - - this.resultDialog.loading = false; - if (status == '1') { - const { - importStatus, - interval, - errorInfo, - component - } = this.resultDialog; - - component && component.scrollToLast(); - - if (importStatus == 'over' || importStatus == 'error') { - clearInterval(interval); - if (!this.hasErrorInfo(errorInfo)) this.getResultInfo(); - - this.sourceStore && this.sourceStore.getSearchList(); - return - } - - if (rs.importStatus == 'over' || rs.importStatus == 'error') { - this.resultDialog.loading = true; - } - - this.resultDialog.importStatus = rs.importStatus; - - if (pId) this.resultDialog.pId = pId; - - if (this.resultDialog.datas.length == 0) { - this.resultDialog.datas = datas; - } else { - this.resultDialog.datas = [...this.resultDialog.datas, ...datas] - } - - this.resultDialog.index = index; - } - - }); - } - - @action - getResultInfo = () => { - let params = { - pId: this.resultDialog.pId - }; - this.resultDialog.loading = true; - Api.getImportResult(params).then(rs => { - const { - datas, - status - } = rs, { - succnum, - failnum, - sessionkey = '' - } = datas; - - if (status == '1') { - this.resultDialog.succnum = succnum; - this.resultDialog.failnum = failnum; - sessionkey && this.resultDialog.tableStore.getDatas(sessionkey, 1); - } - this.resultDialog.loading = false; - }); - } - - @action - getRecordTable = () => { - let params = { - importType: this.importType - }; - Api.getImportHistory(params).then(rs => { - const { - status, - sessionkey, - } = rs; - - if (status == '1') { - this.recordDialog.tableStore.getDatas(sessionkey, 1); - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - getLogTable = () => { - let params = { - importType: this.importType, - ...this.logDialog.form.getFormParams(), - }; - if (this.resultDialog.pId) { - params = { - ...params, - pId: this.resultDialog.pId - } - } - Api.getImportLogDetail(params).then(rs => { - const { - status, - sessionkey - } = rs; - - if (status == '1') { - this.logDialog.tableStore.getDatas(sessionkey, 1); - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - submitImportInfo = () => { - const params = { - ...this.importDialog.form.getFormParams(), - importType: this.importType, - excelfile: this.importDialog.excelFileId, - operateType: 'add' - }; - if (this.importDialog.formAsyncParams) { - Object.assign(params, { - ...this.importDialog.formAsyncParams - }); - } - this.setResultInfoDialogVisible(true); - Api.saveImport(params).then(rs => { - const { - status, - errorInfo - } = rs; - - if (status == '1') { - if (this.hasErrorInfo(errorInfo)) { - this.resultDialog.errorInfo = errorInfo; - this.resultDialog.importStatus = 'error'; - } - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - this.resultDialog.interval = setInterval(() => this.getImportProcessInfo(), 2000); - } - - @action - getLogSearchPanelCondition = () => { - this.logDialog.loading = true; - let params = { - importType: this.importType - }; - Api.getImportLogSearchCondition(params).then(rs => { - const { - status, - searchCondition - } = rs; - - if (status == '1') { - this.logDialog.condition = searchCondition; - this.logDialog.form.initFormFields(searchCondition); - } else { - message.error(rs.message); - } - this.logDialog.loading = false; - }).catch(error => { - message.error(error); - }); - } - - @action - setExcelFileNo = (id) => { - extendObservable(this.importDialog, { - excelFileId: id - }); - } - - @action - submitExcel = () => { - if (!this.importDialog.excelFileId) { - message.warning(getLabel(385362, '请选择导入模板!')); - return; - } - this.submitImportInfo(); - } - - @action - queryRecord = () => { - this.setRecordDialogVisible(true); - } - - @action - queryLog = () => { - this.setLogDialogVisible(true); - } - - @action - jumpToImportResult = (id) => { - this.resultDialog.pId = id; - this.resultDialog.importStatus = 'over'; - this.setResultInfoDialogVisible(true); - this.getResultInfo(); - } - - - @action - setImportDialogVisible = (bool) => { - this.importDialog.visible = bool; - if (bool) { - this.getImportForm(); - } else { - this.importDialogReset(); - } - - } - - //设置标识,标识当前是那个页面在导入 - @action - setImportPage = (pageName) => { - this.pageName = pageName; - } - - @action - setResultInfoDialogVisible = (bool) => { - this.resultDialog.visible = bool; - if (!bool) { - clearInterval(this.resultDialog.interval); - this.resetResultDialogStatus(); - } - } - - @action - importDialogReset = () => { - this.importDialog.condition = []; - this.importDialog.form = new WeaForm(); - this.importDialog.selectedValue = 'workcode'; - this.importDialog.excelFileId = ''; - } - - @action - resetResultDialogStatus = () => { - this.resultDialog.index = 1; - this.resultDialog.datas = []; - this.resultDialog.importStatus = ''; - this.resultDialog.pId = ''; - this.resultDialog.interval = ''; - this.resultDialog.errorInfo = ''; - this.resultDialog.loading = true; - } - - @action - setRecordDialogVisible = (bool) => { - this.recordDialog.visible = bool; - bool && this.getRecordTable(); - } - - @action - setLogDialogVisible = (bool) => { - this.logDialog.visible = bool; - bool && this.getLogTable(); - if (!bool) { - this.logDialog.isPanelShow = false; - this.logDialog.form = new WeaForm(); - this.logDialog.condition = []; - } - } - - @action - setLogPanelStatus = (bool) => { - this.logDialog.isPanelShow = bool; - bool && this.logDialog.condition.length == 0 && this.getLogSearchPanelCondition(); - } - - @action - searchLogInfo = () => { - this.getLogTable(); - } - - hasErrorInfo = (errorInfo) => { - if (errorInfo.length == 0) return false; - return true - } - - @action - setTempletName = (templetName) => { - this.importDialog.templetName = templetName; - } - - @action - setImportDialogTitle = (title) => { - this.importDialog.title = title; - } - - @action - setImportType = (type) => { - this.importType = type; - } - - setFormAsyncParams = (params) => { - this.importDialog.formAsyncParams = params - } - - @action - setSelectedValue = (value) => { - this.importDialog.selectedValue = value; - } - - @action - setScoll = (component) => { - this.resultDialog.component = component; - } - - setSourceStore = (store) => { - this.sourceStore = store; - } - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/index.js b/pc4backstage/hrmAttendance/public/valhalla/stores/index.js deleted file mode 100644 index fadc4ae..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import AuthorityStore from './authority.js'; -import DialogStore from './dialog.js'; -import FormStore from './form.js'; -import SearchStore from './search.js'; -import TableListStore from './table.js'; -import TopStore from './top.js'; -import OrgTreeStore from './orgTree.js'; -import RadioGroupStore from './radioGroup.js'; -import ImportCommon from './importCommon.js'; - -export { - AuthorityStore, - DialogStore, - FormStore, - SearchStore, - TableListStore, - TopStore, - OrgTreeStore, - RadioGroupStore, - ImportCommon -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/orgTree.js b/pc4backstage/hrmAttendance/public/valhalla/stores/orgTree.js deleted file mode 100644 index 8fb1a47..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/orgTree.js +++ /dev/null @@ -1,50 +0,0 @@ -import { - observable, - action, -} from 'mobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; - -export default class OrgTreeStore { - constructor(rootStore) { - this.rootStore = rootStore; - } - - get orgTreeProps() { - const basicProps = { - needSearch: true, - noCache: true, - isLoadAllSub: true, - inputLeftDom: `${getLabel(25332, '组织结构')}`, - }; - - return Object.assign({}, basicProps, this.orgTreeMoreProps); - } - - @observable triggerRefresh = false; - - @action trigger = () => { - this.triggerRefresh = !this.triggerRefresh; - } - - handleOrgTreeNodeClick = (event, ids, nodeids, nodes) => { - this.splitNodeInfo(nodes); - - this.rootStore.handleOrgTreeNodeClick && this.rootStore.handleOrgTreeNodeClick(); - } - - splitNodeInfo = (nodes) => { - ['id', 'type', 'pid', 'name'].forEach(v => { - this[v] = nodes[0][v]; - }); - } - - //config包括:orgTreeMoreProps - setOrgTreeConfig=(config)=>{ - Object.keys(config).forEach(key => { - this[key] = config[key]; - }) - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/radioGroup.js b/pc4backstage/hrmAttendance/public/valhalla/stores/radioGroup.js deleted file mode 100644 index 573707c..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/radioGroup.js +++ /dev/null @@ -1,56 +0,0 @@ -import { - observable, - action, -} from 'mobx'; - -export default class RadioGroupStore { - constructor(api, rootStore) { - this.api = api; - this.rootStore = rootStore - } - - //搜索参数 - radioGroupParams = {}; - - @observable config = []; - - @action fetchRadioGroupConfig = () => { - return new Promise((resolve, reject) => { - this.config = []; - - this.api().then(datas => { - const conditions = this.getCondition(datas); - - const { - items - } = conditions[0]; - - this.config = this.rootStore.processRadioGroupConfig(items); - - resolve(); - }); - }) - } - - handleRadioGroupChange = (params) => { - this.radioGroupParams = Object.assign({}, params, this.moreParams); - - this.rootStore.handleRadioGroupChange && this.rootStore.handleRadioGroupChange(); - } - - setRadioGroupMoreParams = (moreParams) => { - this.moreParams = moreParams; - - Object.assign(this.radioGroupParams, moreParams); - } - - getCondition = (datas) => { - let c = []; - Object.keys(datas).forEach(key => { - if (key.includes('condition')) { - c = datas[key]; - } - }) - return c; - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/search.js b/pc4backstage/hrmAttendance/public/valhalla/stores/search.js deleted file mode 100644 index d89ac56..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/search.js +++ /dev/null @@ -1,183 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaForm -} from 'comsMobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - Button, -} from 'antd'; -const getLabel = WeaLocaleProvider.getLabel; - -export default class SearchStore { - constructor(api, rootStore) { - this.api = api; - this.rootStore = rootStore; - } - - @observable datas = [];//用来渲染页签 - @observable selectedKey = '0';//页签的选中值 - @observable form = new WeaForm();//实例化WeaForm - @observable conditions = []; - @observable showSearchAd = false;//控制下拉面板的显隐 - - //基本值 - @computed get searchsBaseValue() { - return this.form.getFormParams()[this.linkageFieldName] - } - - //渲染高级搜索表单 - @computed get searchsAd() { - return
{ - if (e.keyCode == 13 && e.target.tagName === "INPUT") { - this.handleSearch(); - } - } - } - >{this.form.render()}
; - } - - //存放Search组件所需的,不被观察的属性。 - get searchProps() { - const basicProps = { - advanceHeight: 130, - hasMask: false, - keyParam: 'key', - searchType: ['base', 'advanced'], - }; - - return Object.assign({}, basicProps, this.searchMoreProps); - } - - //按钮组 - get buttons() { - const mark = (this.searchMark !== undefined) ? this.searchMark : ''; - return this.rootStore[`${mark}SearchButtons`]; - } - - //高级搜索下拉面板中按钮组的名称 - get buttonsAdNames() { - return [getLabel(82529, '搜索'), getLabel(27088, '重置'), getLabel(32694, '取消')]; - } - - //高级搜索下拉面板中的按钮组 - get buttonsAd() { - return this.buttonsAdNames.map((name, index) => { - const type = (index === 0) && "primary"; - - let callback; - if (index === 0) { - callback = () => this.handleSearch(); - } else if (index === 1) { - callback = () => { - if (this.isFormIncludeSelect) { - this.form.resetConditionValue(); - } else { - this.form.reset(); - } - } - } else { - callback = () => this.setShowSearchAd(false) - } - - return - }) - } - - //表单元素中是否包含下拉框 - get isFormIncludeSelect() { - return this.conditions.some(condition => { - return condition.items.some(item => { - const { - conditionType - } = item; - - return conditionType === 'SELECT' - }) - }) - } - - //获取高级搜索表单数据 - @action fetchSearchForm = (params = {}) => { - this.form = new WeaForm(); - - return new Promise((resolve, reject) => { - this.api(params).then(datas => { - const conditions = this.getCondition(datas); - - if (conditions.length == 1) { - conditions[0].title = ""; - } - - this.conditions = conditions; - this.form.setCondition(conditions); - - resolve(); - }); - }) - } - - //设置渲染页签所需的数据 - @action setDatas = (datas) => { - this.datas = datas; - } - - //改变页签的选中值 - @action setSelectedKey = (selectedKey) => { - this.selectedKey = selectedKey; - } - - //控制高级搜索下拉面板的显隐 - @action setShowSearchAd = (showSearchAd) => { - this.showSearchAd = showSearchAd; - } - - //切换页签触发的回调函数 - handleTabChange = (selectedKey) => { - this.setSelectedKey(selectedKey); - - this.rootStore.handleTabClick && this.rootStore.handleTabClick(); - } - - //搜索 - handleSearch = () => { - this.rootStore.handleSearch(); - this.setShowSearchAd(false); - } - - //联动表单中的字段 - handleSearchChange = (val) => { - if (this.linkageFieldName) { - this.form.updateFields({ - [this.linkageFieldName]: val - }); - } - } - - //处理后端接口参数名混乱的问题 - getCondition = (datas) => { - let condition = []; - Object.keys(datas).forEach(key => { - if (key.includes('condition')) { - condition = datas[key]; - } - }) - return condition; - } - - //config包括:linkageFieldName、searchMark、searchMoreProps等 - setSearchConfig=(config)=>{ - Object.keys(config).forEach(key => { - this[key] = config[key]; - }) - } - - - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/table.js b/pc4backstage/hrmAttendance/public/valhalla/stores/table.js deleted file mode 100644 index c912b1d..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/table.js +++ /dev/null @@ -1,91 +0,0 @@ -import { - observable, - action, -} from 'mobx'; -import { - WeaTableNew -} from 'comsMobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - Modal, -} from 'antd'; -const { - TableStore -} = WeaTableNew; -const getLabel = WeaLocaleProvider.getLabel; -const confirm = Modal.confirm; - -export default class TableListStore { - constructor(api, rootStore) { - this.api = api; - this.rootStore = rootStore; - } - - get tableProps() { - return { - hasOrder: true, - needScroll: true, - } - } - - @observable tableStore = new TableStore(); - - @action fetchTableList = (params = {}) => { - this.api(params).then(datas => { - const { - sessionkey, - } = datas; - - this.tableStore = new TableStore(); - this.tableStore.getDatas(sessionkey, 1); - }) - } - - reRenderColumns = (columns) => { - this.rootStore.reRenderColumns && this.rootStore.reRenderColumns(columns); - } - - onOperatesClick = (record, rowIndex, operate) => { - this.rootStore.onOperatesClick && this.rootStore.onOperatesClick(record, rowIndex, operate); - } - - colSet = () => { - this.tableStore.setColSetVisible(true); - this.tableStore.tableColSet(true) - } - - showConfirm = (msg) => { - return new Promise((resolve, reject) => { - confirm({ - title: getLabel('131329', '信息确认'), - content: msg, - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - resolve(); - }, - onCancel() { - return false; - }, - }); - }) - } - - showLog = (type, id) => { - const params = { - logSmallType: type, - }; - if (id) { - Object.assign(params, { - targetId: id, - }); - } - window.setLogViewProps(params); - } - - exportExcel = () => { - this.tableStore.exportAll(); - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/stores/top.js b/pc4backstage/hrmAttendance/public/valhalla/stores/top.js deleted file mode 100644 index 60511ac..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/stores/top.js +++ /dev/null @@ -1,136 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - Button, -} from 'antd'; - -export default class TopStore { - constructor(api, rootStore) { - this.api = api; - this.rootStore = rootStore; - } - - get topProps() { - return { - showDropIcon: true, - iconBgcolor: '#217346', - icon: , - } - } - - @observable tConf = []; - @observable rConf = []; - - @computed get loading() { - return this.rootStore.topLoading; - } - - @action fetchRightMenu = (params = {}) => { - this.api(params).then(datas => { - const { - btnMenu = [] - } = datas; - - const { - tConf, - rConf - } = this.convertDatasToTopRightConf(btnMenu); - - this.tConf = tConf; - this.rConf = rConf; - }) - } - - @computed get buttons() { - const buttons = this.tConf.map((item, index) => { - const { - menuFun, - menuName - } = item; - - const state = this.getRightMenuState(index); - - return ( - - ) - }); - - if (this.rootStore.otherTopButtons) { - return [...this.rootStore.otherTopButtons, ...buttons]; - } else { - return buttons; - } - } - - @computed get dropMenuDatas() { - return this.rConf.map((item, index) => { - const { - menuFun, - menuName, - menuIcon - } = item; - - const state = this.getRightMenuState(index); - - return { - key: menuFun, - disabled: state, - icon: , - content: menuName, - onClick: () => this.rootStore[menuFun]() - } - }); - } - - getRightMenuState = (index) => { - const { - rightMenuStates - } = this.rootStore; - - if (rightMenuStates) { - return rightMenuStates[index]; - } else { - return false - } - } - - convertDatasToTopRightConf = (datas) => { - let tConf, rConf; - tConf = datas && datas.filter(data => { - const { - isTop, - isBatch - } = data; - if (isTop === '1') { - return true; - } - if (isBatch === '1') { - return true; - } - }) - - rConf = datas; - - return { - tConf, - rConf - } - } - - //config包括:title。 - setTopConfig = (config) => { - Object.keys(config).forEach(key => { - this[key] = config[key]; - }) - } - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/style/addButton.less b/pc4backstage/hrmAttendance/public/valhalla/style/addButton.less deleted file mode 100644 index aee5d84..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/style/addButton.less +++ /dev/null @@ -1,14 +0,0 @@ -.add-button-wrapper{ - .add-button{ - color: #2d7ad8; - } - - .add-button:hover{ - cursor: pointer; - color: #2DB7F5; - } - - .add-button-label{ - margin-left:5px; - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/public/valhalla/style/deleteButton.less b/pc4backstage/hrmAttendance/public/valhalla/style/deleteButton.less deleted file mode 100644 index 84f34fa..0000000 --- a/pc4backstage/hrmAttendance/public/valhalla/style/deleteButton.less +++ /dev/null @@ -1,12 +0,0 @@ -.del-button{ - font-size: 14px; - - .del-icon{ - color: #999; - } - - .del-icon:hover{ - cursor: pointer; - color: #333; - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/single.js b/pc4backstage/hrmAttendance/single.js deleted file mode 100644 index 18852db..0000000 --- a/pc4backstage/hrmAttendance/single.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; - -import { createHashHistory } from 'History'; - -import { Router, Route, useRouterHistory } from 'react-router' - -import { syncHistoryWithStore, RouterStore } from 'mobx-react-router'; - -import { Provider } from 'mobx-react'; - -import Hrm from 'weaHrmAttendanceEngine' //umd - -const routing = new RouterStore(); - -const allStore = { - routing, - ...Hrm.store, -} - -const HrmRoute = Hrm.Route; - -const browserHistory = useRouterHistory(createHashHistory)({ - queryKey: '_key', - basename: '/' -}); - -const history = syncHistoryWithStore(browserHistory, allStore.routing); - -const Home = props => props.children; - -const Root = () => ( - - - - { HrmRoute } - - - -); - -ReactDOM.render(, document.getElementById('container')); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/ReminderSetting.js b/pc4backstage/hrmAttendance/stores/ReminderSetting.js deleted file mode 100644 index 75684de..0000000 --- a/pc4backstage/hrmAttendance/stores/ReminderSetting.js +++ /dev/null @@ -1,3 +0,0 @@ -class ReminderSettingStore { - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/applicationSettings.js b/pc4backstage/hrmAttendance/stores/applicationSettings.js deleted file mode 100644 index 527d3f3..0000000 --- a/pc4backstage/hrmAttendance/stores/applicationSettings.js +++ /dev/null @@ -1,85 +0,0 @@ -import { - observable, - action, -} from 'mobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - message, -} from 'antd'; -import { - AuthorityStore, - TopStore, - FormStore, -} from '../public/valhalla/stores/index.js'; -import * as api from '../apis/applicationSettings.js'; -const getLabel = WeaLocaleProvider.getLabel; - -class ApplicationSettingsStore { - @observable authorityStore = new AuthorityStore(api.getHasRight); - @observable topStore = new TopStore(api.getRightMenu, this); - @observable formStore = new FormStore(api.getSettingsForm, this); - - get topLoading() { - return this.formStore.loading; - } - - get rightMenuStates() { - const { - loading, - } = this.formStore; - - return [loading]; - } - - get topConfig() { - return { - title: getLabel(507184, "应用设置") - } - } - - get formConfig() { - return { - isCustomRender: true, - } - } - - preMount = () => { - this.topStore.setTopConfig(this.topConfig); - } - - init = () => { - this.authorityStore.fetchAuthority().then(() => { - const { - setFormConfig, - fetchForm - } = this.formStore; - - this.topStore.fetchRightMenu(); - - setFormConfig(this.formConfig); - fetchForm(); - }) - } - - save = () => { - const params = this.formStore.form.getFormParams(); - - api.saveSettings({datas:JSON.stringify(params) }).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - } else { - message.warning(datas.message); - } - }) - } - - -} - -export const applicationSettingsStore = new ApplicationSettingsStore(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/attendanceRpSharingSetting.js b/pc4backstage/hrmAttendance/stores/attendanceRpSharingSetting.js deleted file mode 100644 index aa9eb00..0000000 --- a/pc4backstage/hrmAttendance/stores/attendanceRpSharingSetting.js +++ /dev/null @@ -1,497 +0,0 @@ -import { - action, - computed, - reaction, - observable, -} from 'mobx'; -import { - WeaForm, - WeaTableNew, -} from 'comsMobx'; -import { - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom'; -import { - Button, - message, -} from 'antd'; -import { - fetch, - confirmation, - getTopButtons, - getDropMenuDatas, - getSearchButtons, - getMenusCreationConfig, -} from '../util/save-time-util.js'; -import * as asyncFetch from '../apis/attendanceRpSharingSetting'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; - -class HrmAttendanceRpSharingSetting { - //************权限************* - @observable pageAccessPermission = { - hasRight: false, - loading: true, - } - - @action getPermissionInfo = () => { - fetch({ - asyncFetch, - name: 'getHasRight', - logic: (cb) => { - const { - hasRight - } = cb; - - if (hasRight) { - this.pageAccessPermission.hasRight = true; - } - this.pageAccessPermission.loading = false; - } - }); - } - - //*************头部************** - get topProps () { - return { - showDropIcon: true, - iconBgcolor: '#217346', - icon: , - title: getLabel('505545', "考勤报表共享设置"), - } - } - - @observable btnMenu = []; - - @computed get toploading () { - return this.table.comsWeaTableStore.loading; - } - - @computed get menusCreationConfig () { - return getMenusCreationConfig(this.btnMenu); - } - - @computed get topButtons () { - const { - topMenu - } = this.menusCreationConfig; - - return getTopButtons.call(this, { - datas: topMenu, - disabled: this.menuState, - }) - } - - @computed get dropMenuDatas () { - const { - rightMenu - } = this.menusCreationConfig; - - return getDropMenuDatas.call(this, { - datas: rightMenu, - disabled: this.menuState, - }); - } - - @computed get menuState () { - const { - loading, - selectedRowKeys - } = this.table.comsWeaTableStore; - - const isChecked = (selectedRowKeys.length === 0); - return [loading, isChecked]; - } - - @action getRightMenu = () => { - fetch({ - asyncFetch, - name: 'getRightMenu', - logic: (cb) => { - const { - btnMenu, - } = cb; - - this.btnMenu = btnMenu; - } - }); - } - - new = () => { - this.openDialog(); - } - - batchDelete = () => { - confirmation.showDelConfirm({ - type: 1, - logic: (type) => this.deleteReportShare(type), - }) - } - - log = (id, source) => { - const params = { - logSmallType: '3061', - }; - if (source === 'table') { - Object.assign(params, { - targetId: id, - }); - } - window.setLogViewProps(params); - } - - custom = () => { - const { - comsWeaTableStore - } = this.table; - - comsWeaTableStore.setColSetVisible(true); - comsWeaTableStore.tableColSet(true) - } - - //************页签************* - tabProps = { - searchType: ['base', 'advanced'], - buttonsAd: getSearchButtons({ - form: this.search.form, - search: () => this.handleSearch(), - reset: () => this.search.form.resetConditionValue(), - cancel: () => this.changePanelStatus(false) - }), - onSearch: () => this.handleSearch(), - onSearchChange: (val) => this.handleSearchChange(val), - setShowSearchAd: (bool) => this.changePanelStatus(bool), - advanceHeight: 70, - hasMask: false, - } - - @observable search = { - form: new WeaForm(), - conditions: [], - } - - @observable tab = { - searchsBaseValue: '', - showSearchAd: false, - } - - @action handleSearch = () => { - this.getSearchList(); - if (this.tab.showSearchAd) this.changePanelStatus(false); - } - - @action changePanelStatus = (bool) => { - this.tab.showSearchAd = bool; - } - - @action handleSearchChange = (val) => { - this.tab.searchsBaseValue = val; - } - - @action getSearchCondition = () => { - fetch({ - asyncFetch, - name: 'getSearchCondition', - logic: (cb) => { - const { - condition - } = cb; - - this.search.conditions = condition; - this.search.form.initFormFields(condition); - } - }); - } - - //************列表************* - tableProps = { - hasOrder: true, - needScroll: true, - onOperatesClick: (record, rowIndex, operate) => { - const { - randomFieldId - } = record, { - index - } = operate; - - this.singleRowId = randomFieldId; - - if (index === '1') { - confirmation.showDelConfirm({ - type: 0, - logic: (type) => this.deleteReportShare(type) - }); - } - } - } - - @observable table = { - comsWeaTableStore: new TableStore() - } - - @computed get tableAsyncFetchParams () { - const { - form - } = this.search; - - const params = { - resourceName: this.tab.searchsBaseValue, - }; - - if (form.isFormInit) { - Object.assign(params, { - ...this.search.form.getFormParams() - }); - } else { - Object.assign(params, { - reportName: 0 - }); - } - - return params; - } - - @action getSearchList = () => { - fetch({ - asyncFetch, - name: 'getSearchList', - fetchParams: this.tableAsyncFetchParams, - logic: (cb) => { - const { - sessionkey - } = cb; - - this.table.comsWeaTableStore.getDatas(sessionkey, 1); - } - }); - } - - deleteReportShare = (type) => { - const { - comsWeaTableStore - } = this.table; - - const params = { - ids: (type === 0) ? this.singleRowId : comsWeaTableStore.selectedRowKeys.toString() - } - - fetch({ - asyncFetch, - name: 'deleteReportShare', - fetchParams: params, - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') this.getSearchList(); - - message[(sign === '1') ? 'success' : 'warning'](cb.message); - } - }); - } - - //**************弹框**************** - dialogProps = { - icon: 'icon-coms-hrm', - iconBgcolor: '#217346', - hasScroll: true, - title: getLabel('505546', "添加共享"), - style: { - width: 600, - height: 340 - }, - onCancel: () => this.closeDialog(), - buttons: [ - , - - ] - } - - @observable dialog = { - visible: false, - } - - @action openDialog = () => { - this.dialog.visible = true; - } - - @action closeDialog = () => { - this.dialog.visible = false; - } - - disposer = reaction(() => this.dialog.visible, visible => { - if (visible) { - this.getReportShareForm() - } else { - this.resetReportShareForm(); - } - }); - - - //************表单************* - formConfig = { - dynamicFields: [{ - passiveKey: 'subcomId', - activeKey: 'shareLevel', - showValue: '0' - }, { - passiveKey: 'deptId', - activeKey: 'shareLevel', - showValue: '1' - }, { - passiveKey: 'userId', - activeKey: 'shareLevel', - showValue: '2' - }, { - passiveKey: 'jobtitleId', - activeKey: 'shareLevel', - showValue: '3' - }, { - passiveKey: 'resourceIds', - activeKey: 'resourceType', - showValue: '1' - }, { - passiveKey: 'resourceManagerIds', - activeKey: 'resourceType', - showValue: '7' - }] - } - - @observable formElements = { - conditions: [], - form: new WeaForm(), - loading: false, - date: new Date(), - } - - @action getReportShareForm = () => { - this.formElements.loading = true; - - fetch({ - asyncFetch, - name: 'getReportShareForm', - logic: (cb) => { - const { - condition - } = cb; - - this.formElements.loading = false; - this.formElements.conditions = condition - this.formElements.form.initFormFields(condition) - } - }); - } - - @action resetReportShareForm = () => { - this.formElements.conditions = []; - this.formElements.form = new WeaForm(); - } - - saveReportShare = () => { - const { - form - } = this.formElements; - - this.ignoreField(); - - form.validateForm().then(f => { - if (f.isValid) { - this.formElements.loading = true; - - fetch({ - asyncFetch, - name: 'saveReportShare', - fetchParams: form.getFormParams(), - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - ['closeDialog', 'getSearchList'].map(func => { - this[func](); - }); - } else { - message.warning(cb.message); - } - - this.formElements.loading = false; - } - }); - } else { - f.showErrors(); - this.formElements.date = new Date(); - } - }); - } - - ignoreField = () => { - window.e9HideFormFieldKeys = []; - - const { - shareLevel, - resourceType, - } = this.formElements.form.getFormParams(); - - const keys = ['subcomId', 'deptId', 'userId', 'jobtitleId']; - - keys.map((key, index) => { - if (index !== parseInt(shareLevel)) { - window.e9HideFormFieldKeys.push(key); - } - }); - - resourceType === '1' && window.e9HideFormFieldKeys.push('resourceManagerIds'); - - resourceType === '7' && window.e9HideFormFieldKeys.push('resourceIds'); - - resourceType === '8' && window.e9HideFormFieldKeys.push('resourceManagerIds', 'resourceIds'); - - } - - - //************其他************* - reset = () => { - const { - showSearchAd, - searchsBaseValue - } = this.tab, { - form, - conditions - } = this.search; - - if (showSearchAd) { - this.tab.showSearchAd = false; - } - - if (searchsBaseValue) { - this.tab.searchsBaseValue = ''; - } - - if (form.isFormInit) { - this.search.form = new WeaForm(); - this.search.conditions = []; - } - - this.table.comsWeaTableStore = new TableStore(); - - } - - refresh = () => { - this.reset(); - ['getSearchCondition', 'getSearchList'].map(func => { - this[func](); - }); - } -} - -const hrmAttendanceRpSharingSetting = new HrmAttendanceRpSharingSetting(); - -export { - hrmAttendanceRpSharingSetting -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/attendanceSyncSetting.js b/pc4backstage/hrmAttendance/stores/attendanceSyncSetting.js deleted file mode 100644 index 974675f..0000000 --- a/pc4backstage/hrmAttendance/stores/attendanceSyncSetting.js +++ /dev/null @@ -1,230 +0,0 @@ -import { - observable, - action, - computed -} from 'mobx'; -import { - WeaSearchGroup, - WeaFormItem, - WeaCheckbox, - WeaRangePicker, - WeaHelpfulTip, - WeaTableEdit -} from 'ecCom'; -import { - WeaForm, - WeaTableNew, - WeaSwitch -} from 'comsMobx'; -import { - Button, - message -} from 'antd'; -import HrmBaseStore from './baseStore'; -import { - has -} from 'lodash'; -import * as api from '../apis/attendance'; -import { - i18n -} from '../public/i18n'; - -class HrmAttendanceSyncSetting extends HrmBaseStore { - /********************* unobservable list *********************/ - editTable = {}; - topBtnAndMenu = () => { - return { - btns: [ - - ], - menus: [{ - key: '1', - content: i18n.label.save(), - icon: , - onClick: this.save - }, ...this.getBasicMenus("HRM_ENGINE_HRM_SCHEDULESIGN_IMPORT")] - } - } - - tableEditConfig = { - ...this.editTableConfig, - showTitle: true, - draggable: false, - showAdd: true, - showDelete: true, - showCopy: true, - columns: [], - datas: [], - selectedData: {}, - copyFilterProps: ['datasourceid', 'tablename', 'workcode', 'lastname', 'signdate', 'signtime', 'clientaddress', 'com.lastname'], - onChange: this.onTableDataChange - } - - syncDate; - errorRef; - tableStateData; - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable refreshTableData = new Date().getTime(); - - @observable isVaild = false; - @observable spinning = false; - - @observable syncSettingFormCondition = {}; - @observable fieldSettingFormCondition = {}; - @observable fieldSettingExplainConditon = {}; - /********************* observable list *********************/ - - /********************* computed list *********************/ - - /********************* computed list *********************/ - - /********************* action list *********************/ - initData = () => { - api.getImportFormSet().then(data => { - if (data.status === '1') { - data.group.map((g, i) => { - switch (i) { - case 0: - this.isVaild = g.items[0].isVaild; - this.syncSettingFormCondition = g; - break; - case 1: - this.fieldSettingFormCondition = g; - const { - columns, - datas - } = g.items[0].table; - this.tableEditConfig.columns = columns; - this.tableEditConfig.datas = datas; - this.refreshTableData = new Date().getTime(); - break; - case 2: - this.fieldSettingExplainConditon = g; - break; - case 3: - break; - case 4: - break; - } - }) - this.containerInitFinished = { - ...this.containerInitFinished, - init: true - } - } - }) - } - - setValid = (val) => { - this.isVaild = val === '0' ? false : true; - } - - setSyncDate = (date) => { - this.syncDate = { - fromdate: date[0], - enddate: date[1] - } - } - - setErrorRef = (ref) => { - this.errorRef = ref; - } - - /** - * 设置WeaTableEdit的refs对象 - * @param {Object} refs [WeaTableEdit] - */ - setEditTable = (refs, name) => { - this.editTable[name] = refs; - } - - @action sync = () => { - if (this.syncDate == null || !has(this.syncDate, 'fromdate') || this.syncDate.fromdate === '') { - this.errorRef.showError(); - return; - } - if(this.spinning) - return; - this.spinning = true; - api.syncData(this.syncDate).then(data => { - if (data.status === '1') { - message.success(data.message) - } else { - message.error(data.message) - } - this.spinning = false; - }, error => {this.spinning = false;}) - } - - @action onTableDataChange = (datas) => { - this.tableStateData = datas; - // this.tableEditConfig.datas = datas; - // this.refreshTableData = new Date().getTime() - } - - @action - recordOP = (target, type, callback = null) => { - switch (type) { - case 'add': - target.refs.edit.doAdd() - break; - case 'remove': - target.refs.edit.doDelete() - break; - case 'copy': - target.refs.edit.doCopy() - break; - case 'valid': - return target.refs.edit.doRequiredCheck() - default: - break; - } - } - - @action save = () => { - const { - pass, - index, - key - } = this.recordOP(this.editTable['fieldDef'], 'valid'); - if (!pass || this.tableEditConfig.columns === 0) - return; - let obj = {}; - this.tableEditConfig.columns.map(c => { - Object.assign(obj, { - [c.dataIndex]: [] - }) - const datas = this.tableStateData == null ? this.tableEditConfig.datas : this.tableStateData; - datas.map(d => { - obj[c.dataIndex].push(d[c.dataIndex]); - }) - }) - const keys = Object.keys(obj); - keys.map(k => { - obj[k] = obj[k].join(','); - }) - const params = { - ...obj, - isVaild: this.isVaild ? '1' : '0' - } - api.saveImportSet(params).then(data => { - if (data.status === '1') { - message.success(i18n.message.saveSuccess()); - this.tableEditConfig.selectedData = {}; - this.tableEditConfig.selectedRowKeys = []; - this.initData(); - } else { - message.error(data.message); - } - }, error => {}) - } - /********************* action list *********************/ -} - -export const hrmAttendanceSyncSetting = new HrmAttendanceSyncSetting(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/baseStore.js b/pc4backstage/hrmAttendance/stores/baseStore.js deleted file mode 100644 index 37980d0..0000000 --- a/pc4backstage/hrmAttendance/stores/baseStore.js +++ /dev/null @@ -1,369 +0,0 @@ -import { - observable, - action -} from 'mobx'; -import { - Button, - message, - Modal -} from 'antd'; -import { - WeaForm, - WeaLogView -} from 'comsMobx'; -import { - WeaLocaleProvider -} 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' - } - 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 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(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}' - } - }, - } - } - /********************* tableEdit props & functions *********************/ -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/commonStore.js b/pc4backstage/hrmAttendance/stores/commonStore.js deleted file mode 100644 index ee00e41..0000000 --- a/pc4backstage/hrmAttendance/stores/commonStore.js +++ /dev/null @@ -1,839 +0,0 @@ -import { - observable, - action, - computed -} from 'mobx'; -import { - WeaForm, - WeaTableNew, -} from 'comsMobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - Modal, - Button, - message, -} from 'antd'; -import { - toJS -} from 'mobx'; -import { - fetch, - getMenusCreationConfig, - getTopButtons, - getDropMenuDatas, - getSearchButtons, - callback, - componentReset, - string, - executeFunction, - page, -} from '../util/save-time-util.js'; -import { - SearchForm -} from '../public/sweet-form.js'; -const getLabel = WeaLocaleProvider.getLabel; -const confirm = Modal.confirm; -const { - TableStore -} = WeaTableNew; - -class CommonStore { - hasOrgTree = true; //页面是否包含组织树 - hasAdvancedSearch = true; //页面是否包含高级搜索 - hasTable = true; //页面是否包含列表 - hasRadioGroup = false; //页面是否包含单选组合 - hasTab = false; //页面是否包含标签页 - isOrgTreeInfluenceForm = false; //组织树是否影响表单的生成 - - asyncFetch; //异步请求 - customizedStore; //各个页面的store - permissAsyncName; //权限接口名称 - menusAsyncName; //功能按钮接口名称 - searchAsyncName; //高级搜索接口名称 - tableAsyncName; //列表接口名称 - delAsyncName; //删除接口名称 - formAsyncName; //表单接口名称 - secondFormAsyncName; //同步设置表单接口名称 - addAsyncName; //新建保存接口名称 - editAsyncName; //编辑保存接口名称 - saveSecondFormAsyncName; //同步设置保存接口名称 - tabAsyncName; //标签页接口名称 - radioGroupAsyncName; //单选组合接口名称 - editIdPropertyName; //编辑保存id名称 - delIdPropertyName; //删除id名称 - searchLinkageFieldName; //高级搜索表单需要联动的表单域 - - @action setPageConfig = (params) => { - page.initConfig(params, this); - } - - //************权限************* - @observable pageAccessPermission = { - hasRight: false, - loading: true, - } - //获取页面权限 - @action getPermissionInfo = () => { - fetch({ - asyncFetch: this.asyncFetch, - name: this.permissAsyncName, - logic: (cb) => { - const { - hasRight - } = cb; - - if (hasRight) { - this.pageAccessPermission.hasRight = true; - } - this.pageAccessPermission.loading = false; - } - }); - } - - @action resetAccessPermissionProps = () => { - ['hasRight', 'loading'].map((v, i) => { - this.pageAccessPermission[v] = (i === 0) ? false : true; - }); - } - - //*************头部************** - topComponentStaticProps = { - icon: , - iconBgcolor: '#217346', - showDropIcon: true - }; - - @observable top = { - btnMenu: [], - } - - //获取按钮、下拉菜单和右键菜单的复合数据 - @action getMenus = () => { - const { - menusParams, - } = this.customizedStore; - - fetch({ - asyncFetch: this.asyncFetch, - name: this.menusAsyncName, - fetchParams: menusParams, - logic: (cb) => { - const { - btnMenu, - buttonSelect, - } = cb; - - this.top.btnMenu = btnMenu; - } - }); - } - - //根据btnMenu,计算出topMenu和rightMenu - @computed get menusCreationConfig() { - const { - btnMenu - } = this.top; - - return getMenusCreationConfig(btnMenu); - } - - //Top组件的按钮 - get topButtons() { - const { - topMenu - } = this.menusCreationConfig; - - const { - getMenusState - } = this.customizedStore; - - return getTopButtons.call(this.customizedStore, { - datas: topMenu, - disabled: Array.isArray(getMenusState) ? getMenusState : getMenusState(), - }) - } - - //获取右键菜单和top组件下拉菜单的数据 - get dropMenuDatas() { - const { - rightMenu - } = this.menusCreationConfig; - - const { - getMenusState - } = this.customizedStore; - - return getDropMenuDatas.call(this.customizedStore, { - datas: rightMenu, - disabled: Array.isArray(getMenusState) ? getMenusState : getMenusState(), - }); - - } - - @action resetMenusConfig = () => { - this.top.btnMenu = []; - } - - //**************组织树****************** - @observable orgTree = { - triggerRefresh: false, - organizationId: '', - organizationType: '0', //默认总部 - } - - //组织树点击事件的回调函数 - @action handleOrgTreeNodeClick = (params) => { - const { - id, - type, - name - } = params; - - const { - changeSpinning, - resetTableEditableDatas, - isNeedCallMenusAsyncFetch, - } = this.customizedStore; - - //设置当前节点的类型 - this.orgTree.organizationType = type; - //设置当前节点的ID - this.orgTree.organizationId = id; - //触发页面的加载状态 - changeSpinning && changeSpinning(true); - //是否需要重新调用Menus接口 - isNeedCallMenusAsyncFetch && this.getMenus(); - //初始化高级搜索 - this.hasAdvancedSearch && this.initAdvanceSearch(); - //获取标签页数据、初始化标签页 - this.hasTab && this.getTabDatas(); - //重置单选组合 - this.hasRadioGroup && this.resetRadioGroup(); - //重置可编辑列表保存参数 - resetTableEditableDatas && resetTableEditableDatas(); - //刷新列表 - if (this.hasTable && !this.hasTab && !this.hasRadioGroup) { - this.getSearchList(); - } - } - - //手动刷新组织树 - @action triggerRefresh = () => { - this.orgTree.triggerRefresh = !this.orgTree.triggerRefresh; - } - - @action resetOrgTreeProps = () => { - ['organizationType', 'organizationId'].map((v, i) => { - this.orgTree[v] = (i === 0) ? '0' : '' - }); - } - - //***************高级搜索***************** - @observable search = { - isPanelShow: false, - conditions: [], - form: new WeaForm(), - } - - //获取生成高级搜索表单的数据 - @action getSearchCondition = () => { - fetch({ - asyncFetch: this.asyncFetch, - name: this.searchAsyncName, - logic: (cb) => { - const { - condition - } = cb; - - this.search.conditions = condition; - this.search.form.initFormFields(condition); - } - }); - } - - //获取高级搜索基本值 - @computed get searchBaseValue() { - const { - form - } = this.search; - - return form.isFormInit ? form.getFormParams()[this.searchLinkageFieldName] : ''; - } - - //获取高级搜索表单 - get searchsAd() { - const { - form - } = this.search; - - return
{ - if (e.keyCode == 13 && e.target.tagName === "INPUT") { - ['changeSearchPanelStatus', 'getSearchList'].map((f, i) => this[f](i === 0 && false)) - } - } } - >{}
- } - - //获取高级搜索按钮组 - get buttonsAd() { - const { - form - } = this.search; - - const buttons = getSearchButtons({ - form, - search: () => ['changeSearchPanelStatus', 'getSearchList'].map((f, i) => this[f](i === 0 && false)), - cancel: () => this.changeSearchPanelStatus(false), - }); - - return buttons; - } - - //获取高级搜索下拉面板的高度 - @computed get advanceHeight() { - const { - conditions - } = this.search; - - const length = conditions.length > 0 ? conditions[0].items.length : 0; - - return Math.ceil(length / 2) * 52 + 20; - } - - //改变下拉面板的状态 - @action changeSearchPanelStatus = (bool) => { - this.search.isPanelShow = bool; - } - - //联动高级搜索表单中的字段 - @action changeAdvanceSearchField = (val) => { - const { - form - } = this.search; - - form.isFormInit && form.updateFields({ - [this.searchLinkageFieldName]: { - value: val - } - }) - } - - //初始化高级搜索 - @action initAdvanceSearch = () => { - const { - form, - isPanelShow, - } = this.search; - - if (isPanelShow) this.changeSearchPanelStatus(false); - - if (form.isFormInit) { - form.reset(); //点击当前菜单 - } else { - this.search.form = new WeaForm(); //切换菜单 - } - } - - @action resetSearchProps = () => { - ['conditions', 'form', 'isPanelShow'].map((v, i) => { - this.search[v] = (i === 0) ? [] : (i === 1) ? new WeaForm() : false; - }); - } - - //***************页签***************** - @observable tab = { - activeKey: '0', - datas: [], - ids: [], - } - - //切换标签页 - @action setTabActiveKey = (key) => { - const { - handleTabClick - } = this.customizedStore; - - this.tab.activeKey = key; - handleTabClick && handleTabClick(); - } - - @action getTabDatas = () => { - if (!this.tabAsyncName) return - - const { - organizationType, - organizationId - } = this.orgTree; - - const params = {}; - - if (this.hasOrgTree) { - Object.assign(params, { - organizationType, - organizationId - }); - } - - fetch({ - asyncFetch: this.asyncFetch, - name: this.tabAsyncName, - fetchParams: params, - logic: (cb) => { - const datas = callback.getArrayDatas(cb) - const ids = callback.getTabId(cb); - - this.tab.datas = datas; - this.tab.ids = ids; - - this.setTabActiveKey(0); - } - }); - } - - @action resetTabProps = () => { - ['activeKey', 'datas', 'ids'].map((v, i) => { - this.tab[v] = (i === 0) ? '0' : []; - }) - } - - //***************单选组合(RadioGroup)***************** - @observable radioGroup = { - config: [], - activeParams: '', - } - - @action getRadioGroupConfig = () => { - fetch({ - asyncFetch: this.asyncFetch, - name: this.radioGroupAsyncName, - logic: (cb) => { - //RadioGroup组件初始化的时候,会触发一次onChange事件,因此会调用一次列表接口,所以这里不需要重复调用列表接口。 - const { - conditions - } = cb; - - const { - addCustomizedConfig, - changeSpinning - } = this.customizedStore; - - addCustomizedConfig && addCustomizedConfig(conditions, cb); - - this.radioGroup.config = conditions[0].items; - - changeSpinning && changeSpinning(false); - } - }); - } - - @action exportActiveParams = (params) => { - const { - isRequiredElementComplete - } = this.customizedStore; - - this.radioGroup.activeParams = params; - - if (isRequiredElementComplete && isRequiredElementComplete(params)) { - this.getSearchList(); - } - } - - @action resetRadioGroup = () => { - const { - handleBrowserChange - } = this.customizedStore; - - handleBrowserChange && handleBrowserChange('', false); - //这里重置单选组合(RadioGroup)会连续触发两次onChange事件,因此会调用两次列表接口。 - ['radioGroup', 'browser'].map(type => { - this[`${type}_ref`] && componentReset[`reset${string.capitalize(type)}`](this[`${type}_ref`]); - }); - } - - @action resetRadioGroupProps = () => { - ['config', 'activeParams'].map((v, i) => { - this.radioGroup[v] = (i === 0) ? [] : ''; - }); - ['radioGroup', 'browser'].map(v => { - this[`${v}_ref`] = null; - }); - } - - //***************列表***************** - @observable table = { - id: '', - tableStore: new TableStore(), - canViewTable: true, - } - - @computed get radioGroupParams() { - const { - radioGroupCustomizedComParams - } = this.customizedStore; - - return { - ...this.radioGroup.activeParams, - ...(radioGroupCustomizedComParams ? radioGroupCustomizedComParams : {}) - } - } - - //获取列表数据 - @action getSearchList = (current) => { - const { - organizationId, - organizationType - } = this.orgTree; - - const params = {}; - - if (this.search.form.isFormInit) { - Object.assign(params, this.search.form.getFormParams()); - } - - if (this.hasOrgTree) { - Object.assign(params, { - organizationId, - organizationType, - }); - } - - if (this.hasRadioGroup) { - Object.assign(params, this.radioGroupParams); - } - - if (this.hasTab) { - const { - ids, - activeKey - } = this.tab; - - Object.assign(params, getTabParam && getTabParam.call(this)); - } - - const _current = current ? current : 1; - - this.resetTable(); - - fetch({ - asyncFetch: this.asyncFetch, - name: this.tableAsyncName, - fetchParams: params, - logic: (cb) => { - const { - sessionkey, - status, - } = cb; - - if (status && status === '-1') { - this.table.canViewTable = false; - return; - } - this.table.canViewTable = true; - - this.table.tableStore.getDatas(sessionkey, _current); - - const { - receiveTableAsyncCallback - } = this.customizedStore; - - receiveTableAsyncCallback && receiveTableAsyncCallback(cb); - - } - }); - } - - //删除列表数据 - delTableRows = (type) => { - const { - id, - tableStore - } = this.table; - - fetch({ - asyncFetch: this.asyncFetch, - name: this.delAsyncName, - fetchParams: { - [this.delIdPropertyName]: (type === 1) ? tableStore.selectedRowKeys.toString() : id, - }, - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - this.getSearchList(); - } else { - message.warning(cb.message); - } - } - }); - } - - @action setSelectedRowId = (id) => { - this.table.id = id; - } - - @action setSelectedRowIndex = (index) => { - this.table.index = index; - } - - @action resetTable = () => { - this.table.tableStore = new TableStore(); - } - - //**************弹框**************** - //弹框组件的常量参数 - dialogStaticProps = { - icon: 'icon-coms-hrm', - iconBgcolor: '#217346', - hasScroll: true, - } - - @observable dialog = { - title: '', - visible: false, - type: 0, - } - - @action openDialog = (params) => { - const { - title, - type, - } = params; - - ['title', 'type', 'visible'].map((v, i) => { - this.dialog[v] = (i < 2) ? params[v] : true; - }); - //调用表单接口 - this.getFormMaterial(); - } - - @action closeDialog = () => { - const { - closeDialog - } = this.customizedStore; - - //设置弹框隐藏 - this.dialog.visible = false; - //重置表单数据 - this.resetForm(); - //不同页面,关闭弹框时,除了重置表单之外,还有其他的重置项。 - closeDialog && closeDialog(); - } - - //**************表单**************** - @observable formElements = { - conditions: [], - form: new WeaForm(), - loading: true, - date: new Date(), //用来刷新form组件 - } - - //获取表单数据 - @action getFormMaterial = () => { - const { - id, - index, - } = this.table, { - type, - } = this.dialog, { - organizationType, - organizationId - } = this.orgTree; - - const fetchParams = (type === 1) ? { - [this.editIdPropertyName]: id - } : {}; - - if (this.hasOrgTree && this.isOrgTreeInfluenceForm) { - Object.assign(fetchParams, { - organizationType, - organizationId, - }); - } - - const { - isMainForm, - setAdditionalFormDatas - } = this.customizedStore; - - if (!isMainForm) { - return - } - - fetch({ - asyncFetch: this.asyncFetch, - name: isMainForm() ? this.formAsyncName : this.secondFormAsyncName, - fetchParams: fetchParams, - logic: (cb) => { - const { - condition, - } = cb; - - ['loading', 'conditions', 'form'].map((v, i) => { - if (i < 2) { - this.formElements[v] = (i === 0) ? false : condition - } else { - this.formElements[v].initFormFields(condition); - } - }); - - setAdditionalFormDatas && setAdditionalFormDatas(cb); - } - }); - } - - //保存表单信息 - saveFormDatas = () => { - const { - form - } = this.formElements, { - id - } = this.table, { - type - } = this.dialog, { - organizationType - } = this.orgTree; - - const { - neglectHiddenField, - furtherValidate, - isRepeat, - isFieldRepeat, - getAdditionalParams, - } = this.customizedStore; - - //不检验隐藏的表单元素 - neglectHiddenField && neglectHiddenField(); - - form.validateForm().then(f => { - if (f.isValid) { - //除了校验表单之外,不同的页面还有其他的校验项。 - if (furtherValidate && !furtherValidate()) return; - - //校验字段是否重复 - if (isRepeat) { - isFieldRepeat && isFieldRepeat(); - return - } - //保存的参数包含:表单生成的参数和其他参数 - const fetchParams = Object.assign(form.getFormParams(), getAdditionalParams && getAdditionalParams()); - - if (this.hasOrgTree) { - Object.assign(fetchParams, { - organizationType, - }); - } - - (type === 1) && Object.assign(fetchParams, { - [this.editIdPropertyName]: id - }); - - this.canOperateForm(false); - - fetch({ - asyncFetch: this.asyncFetch, - name: (type === 0) ? this.addAsyncName : this.editAsyncName, - fetchParams, - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - this.closeDialog(); - - const { - tableStore - } = this.table; - - const current = tableStore.current; - - this.getSearchList(current); - } else { - this.canOperateForm(true); - message.warning(cb.message); - } - } - }); - } else { - f.showErrors(); - this.forceUpdateForm(); - } - }); - } - - @action canOperateForm = (bool) => { - this.formElements.loading = !bool; - } - - @action forceUpdateForm = () => { - this.formElements.date = new Date(); - } - - //重置表单 - @action resetForm = () => { - ['loading', 'conditions', 'form'].map((v, i) => { - this.formElements[v] = (i === 0) ? true : (i === 1) ? [] : new WeaForm(); - }); - } - - setRef = (ref, type) => { - this[`${type}_ref`] = ref; - } - - refreshPage = () => { - const { - refreshPage - } = this.customizedStore; - - //强制刷新左侧树 - this.hasOrgTree && this.triggerRefresh(); - - this.handleOrgTreeNodeClick({ - id: '', - type: '0' - }); - - //不同页面会有个性化的重置项 - refreshPage && refreshPage(); - } - - //重置页面配置项 - resetPageConfig = () => { - ['hasOrgTree', 'hasAdvancedSearch', 'hasTable'].map(v => { - this[v] = true; - }); - ['hasRadioGroup', 'hasTab', 'isOrgTreeInfluenceForm'].map(v => { - this[v] = false; - }); - } - - //页面最高层级的组件在要挂起的时候调用这个函数,重置store中的属性 - //这里,不需要重置对象formElements内的属性,因为上个页面在关闭弹框时,会执行这一操作 - //不需要重置对象dialog内的属性,因为在打开弹框的时候,会对dialog对象内的属性进行赋值操作 - //不需要重置对象table内的属性,首先属性id不作为判断条件,其次在每次执行tableStore.getDatas()函数时,tableStore都会被重新new一次 - resetStorePropertys = () => { - const { - form - } = this.formElements; - - ['resetAccessPermissionProps', 'resetMenusConfig', 'resetOrgTreeProps', 'resetSearchProps', - 'resetTabProps', 'resetRadioGroupProps', 'resetPageConfig', 'resetForm' - ].map(f => { - this[f](); - }); - } - -} - -const commonStore = new CommonStore(); - -export { - commonStore -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/groupSetting.js b/pc4backstage/hrmAttendance/stores/groupSetting.js deleted file mode 100644 index 258555b..0000000 --- a/pc4backstage/hrmAttendance/stores/groupSetting.js +++ /dev/null @@ -1,2672 +0,0 @@ -import { observable, action, computed } from "mobx"; -import { WeaTableNew, WeaSwitch } from "comsMobx"; -import { WeaBrowser, WeaFormItem, WeaSelect, WeaUpload, WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaError, WeaTools, WeaInputSearch } from "ecCom"; -import { WeaLogView, WeaForm } from 'comsMobx'; -import { Button, message, Table, Radio, Row, Col } from "antd"; -import HrmBaseStore from "../../hrmComsPublic/stores/baseStore"; -import * as api from "../apis/groupSetting"; -import { i18n } from "../public/i18n"; -import { uniq, find, findIndex, has, fill, concat, dropRight, filter, isEmpty } from "lodash"; -import classnames from "classnames"; -import SerialTableList from '../components/groupSetting/info/SerialTableList'; -import { addContentPath } from '../util/index.js' -const RadioGroup = Radio.Group; -const { WeaTable, TableStore } = WeaTableNew; -const getLabel = WeaLocaleProvider.getLabel; - -export class HrmGroupSetting extends HrmBaseStore { - /********************* unobservable list *********************/ - single; - moduleCallback; - custLabelCol = 5; - rightMenus = []; - columns = []; - opId; - currGroupSerialidsDirty = []; - locationSessionKey; - wifiSessionKey; - location = {}; - groupSelectedShift = []; - orgTreeProps = { - needSearch: true, - isLoadAllSub: false, - topPrefix: "hrmSearch", - inputLeftDom: `${i18n.label.organization()}`, - // needDropMenu: true, - treeNodeClick: this.treeNodeClick, - params: { - rightStr: "HrmKQGroup:Add" - } - }; - @observable mainActiveTabKey = '1'; - @computed get mainTabConfig () { - return { - tabs: [ - { - color: "#000000", - groupId: "main", - title: getLabel('390221', '考勤组'), - viewCondition: "1", - searchType: ["base", "advanced"], - searchKey: "groupname", - doSearch: () => this.getTableData() - }, - { - color: "#000000", - groupId: "1212", - title: getLabel('515128', '人员考勤组查询'), - viewCondition: "2", - } - ], - keyParam: "viewCondition", - activeTabKey: this.mainActiveTabKey - } - }; - - addBtnClasses = classnames({ - ["icon-coms-Add-to-hot"]: true, - ["btn"]: true, - ["btn-active"]: true - }); - - _itemRender = { - groupname: (field, textAreaProps, form, formParams) => { - return ( -
-
- -
-
- ); - }, - excludeid: (field, textAreaProps, form, formParams) => - this.itemRender.groupname(field, textAreaProps, form, formParams), - subcompanyid: (field, textAreaProps, form, formParams) => - this.itemRender.groupname(field, textAreaProps, form, formParams), - kqtype: (field, textAreaProps, form, formParams) => { - const radioStyle = { - display: 'block', - height: '30px', - lineHeight: '30px', - }; - const getHelpful = (key) => { - switch (key) { - case '1': - return getLabel('500476', '按周设置固定上班时间,适用于:早九晚五固定上班时间的公司使用'); - case '2': - return getLabel('500477', '按日期设置上班时间,适用于:每天工作时间不固定的公司使用'); - case '3': - return getLabel('500478', '不设置上班时间,随时打卡考勤,适用于:班次没有规律只计算工作时段的公司使用'); - } - } - return ( -
-
- form.updateFields({ kqtype: { value: e.target.value } })} value={formParams.kqtype}> - { - field.options.map((option, index) => { - return ( - - {option.showname} - - - ) - }) - } - -
-
- ); - }, - calmethod: (field, textAreaProps, form, formParams) => { - if (formParams.kqtype === "3") - return ( - - ); - return null; - }, - desc: (field, textAreaProps, form, formParams) => { - if (formParams.kqtype === "3") { - return ( - - ) - } - return null; - }, - serialids: (field, textAreaProps, form, formParams) => { - if (formParams.kqtype === "2") { - return ( -
-
-
- { - this.compareSearial(v, form); - }} - /> -
-
-
- ) - } - return null; - }, - shiftcycleday: (field, textAreaProps, form, formParams) => { - let info = i18n.label['389226'](); - info = info.replace("{params}", formParams.shiftcycleday); - return ( -
-
-
- -
- { - formParams.shiftcycleday &&
{info}
- } -
-
- ); - }, - weekday: (field, textAreaProps, form, formParams) => { - if (formParams.kqtype === "3") - return ( - - ); - return null; - }, - signstart: (field, textAreaProps, form, formParams) => { - if (formParams.kqtype === "3") - return ( -
-
-
{i18n.label["389105"]()}
- -
-
- ); - return null; - }, - workhour: (field, textAreaProps, form, formParams) => { - if (formParams.kqtype === "3") - return ( -
-
- -
-
- ); - return null; - }, - validityfromdate: (field, textAreaProps, form, formParams) => { - if (formParams.validity === "1") - return ( -
-
- -
-
- ); - return null; - }, - validityenddate: (field, textAreaProps, form, formParams) => { - if (formParams.validity === "1") - return ( -
-
- -
-
- ); - return null; - }, - signintype: (field, textAreaProps, form, formParams) => { - return ( - this.refreshAttendanceForm = new Date().getTime()} - /> - ) - }, - ipscope_v4_pc: (field, textAreaProps, form, formParams) => { - const signintype = ~~formParams.signintype; - if (signintype > 3) - return null; - const { fieldMap } = form; - return ( -
- { - (signintype == 1 || signintype == 2) && - -
{getLabel('522577', 'pc端')}
- - - - - } - { - (signintype == 1 || signintype == 3) && - -
{getLabel('522578', '移动端')}
- - - - - } - - -
{i18n.label["389116"]()}
- - - - ); - }, - ipscope_v4_em: (field, textAreaProps, form, formParams) => null, - ipscope_v6_pc: (field, textAreaProps, form, formParams) => { - const signintype = ~~formParams.signintype; - if (signintype > 3) - return null; - const { fieldMap } = form; - return ( -
- { - (signintype == 1 || signintype == 2) && - -
{getLabel('522577', 'pc端')}
- - - - - } - { - (signintype == 1 || signintype == 3) && - -
{getLabel('522578', '移动端')}
- - - - - } - - -
{i18n.label["503729"]()}
- - - - ); - }, - ipscope_v6_em: (field, textAreaProps, form, formParams) => null, - locationcheck: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - return ( -
-
-
- -
-
- { - formParams.locationcheck == '1' && -
- -
- } - { - formParams.locationcheck == '1' && formParams.locationfacecheck == '1' && -
- { - form.updateFields({ wififacechecktype: { value: v.locationfacechecktype.value } }) - } - } - /> -
- } -
- ); - }, - locationfacecheck: (field, textAreaProps, form, formParams) => null, - locationfacechecktype: (field, textAreaProps, form, formParams) => null, - locationshowaddress: (field, textAreaProps, form, formParams) => { - if (formParams.locationcheck == '1') { - return ( - - ); - } else { - return null; - } - }, - wificheck: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - return ( -
-
-
- -
-
- { - formParams.wificheck == '1' && -
- -
- } - { - formParams.wificheck == '1' && formParams.wififacecheck == '1' && -
- { - form.updateFields({ locationfacechecktype: { value: v.wififacechecktype.value } }) - } - } - /> -
- } -
- ); - }, - wififacecheck: (field, textAreaProps, form, formParams) => null, - wififacechecktype: (field, textAreaProps, form, formParams) => null, - wifiname: (field, textAreaProps, form, formParams) => { - return ( -
-
- -
-
- ); - }, - mac: (field, textAreaProps, form, formParams) => { - return ( -
-
- -
-
- ); - }, - auto_checkin: (field, textAreaProps, form, formParams) => { - const { signintype, locationcheck, wificheck } = formParams; - if ([1, 3].indexOf(parseInt(signintype)) > -1 && (locationcheck == '1' || wificheck == '1')) { - return ( -
-
-
- -
-
-
- ) - } - return null; - }, - auto_checkin_before: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - const { signintype, locationcheck, wificheck, auto_checkin } = formParams; - if ([1, 3].indexOf(parseInt(signintype)) > -1 && (locationcheck == '1' || wificheck == '1') && auto_checkin == '1') { - return ( -
-
- -
{getLabel('519431', '上班前')} - - - - {getLabel('519434', '分钟开始')},{getLabel('519432', '上班后')} - - - { - auto_checkin == '1' && -
- -
- - - {getLabel('519435', '分钟结束')} - - - - - - } - - ) - } - return null; - }, - auto_checkin_after: (field, textAreaProps, form, formParams) => null, - auto_checkout: (field, textAreaProps, form, formParams) => { - const { signintype, locationcheck, wificheck } = formParams; - if ([1, 3].indexOf(parseInt(signintype)) > -1 && (locationcheck == '1' || wificheck == '1')) { - return ( -
-
-
- -
-
-
- ) - } - return null; - }, - auto_checkout_before: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - const { signintype, locationcheck, wificheck, auto_checkout } = formParams; - if ([1, 3].indexOf(parseInt(signintype)) > -1 && (locationcheck == '1' || wificheck == '1') && auto_checkout == '1') { - return ( -
-
- -
{getLabel('519433', '下班后')} - - - - {getLabel('519434', '分钟开始')},{getLabel('519433', '下班后')} - - - { - auto_checkout == '1' && -
- -
- - - {getLabel('519435', '分钟结束')} - - - - - - } - - ) - } - return null; - }, - auto_checkout_after: (field, textAreaProps, form, formParams) => null - }; - @observable illustrateVisible = false - calmethodHandle = () => { - this.illustrateVisible = true; - } - calmethodcancel = () => { - this.illustrateVisible = false; - } - - _childrenComponents = () => ({ - kqtype: () => { - const formParams = this.formTarget.baseForm.getFormParams(); - if (formParams.kqtype != "1") { - return []; - } - - const rowSelection = { - onChange: (selectedRowKeys, selectedRows) => { - this.selectedWorkdayKeys = selectedRowKeys; - let datas = this.toJS(this.workdaySettingData); - datas.map((d, i) => { - if (selectedRowKeys.indexOf(i) < 0) { - d.serialid = '-1'; - d.serialinfo = getLabel('26593', '休息'); - } - }) - this.workdaySettingData = datas; - }, - clear: () => { - this.selectedWorkdayKeys = []; - } - }; - return [ - { - com: ( -
-
-
{i18n.label["389090"]()}
-
- {this.selectedWorkdayKeys.length > 0 && this.canAdd ? ( - this.multiSetting(datas)} - quickSearchName='serial' - > - - - ) : ( - - )} -
-
-
-
- - - ), - col: 1 - } - ]; - }, - serialids: () => { - const formParams = this.formTarget.baseForm.getFormParams(); - if (formParams.kqtype != "2") { - return []; - } - - let coms = [ - { - com: ( - -
-
- {this.canAdd && this.getShiftCycleForm()} title={i18n.label.add()} />} -
-
-
- ), - col: 1 - }, - { - com: this.generateSerialTable(), - col: 1 - } - ] - - return coms; - }, - shiftcycleday: () => { - const options = this.toJS(this.groupShiftOptions); - const formParams = this.formTarget.shiftSchedulceForm.getFormParams(); - const shiftcycleday = Number(formParams.shiftcycleday) || 0; - if (this.currGroupSerialidsDirty.length === 0) { - this.currGroupSerialidsDirty = fill(Array(shiftcycleday), this.groupShiftOptions[0].key); - } else if (this.currGroupSerialidsDirty.length < shiftcycleday) { - this.currGroupSerialidsDirty = concat(this.currGroupSerialidsDirty, fill(Array(shiftcycleday - this.currGroupSerialidsDirty.length), this.groupShiftOptions[0].key)); - } else { - this.currGroupSerialidsDirty = dropRight(this.currGroupSerialidsDirty, this.currGroupSerialidsDirty.length - shiftcycleday); - } - for (let i = 0; i < this.currGroupSerialidsDirty[i]; i++) { - if (this.currGroupSerialidsDirty[i] != '' && findIndex(options, { key: this.currGroupSerialidsDirty[i] }) < 0) { - this.currGroupSerialidsDirty[i] = ''; - } - } - - if (formParams.shiftcycleday != "" && formParams.shiftcycleday > 0) { - let coms = []; - for (let i = 0; i < Number(formParams.shiftcycleday); i++) { - let lbl = i18n.label['389229'](); - lbl = lbl.replace("{params}", i + 1); - coms.push({ - com: ( - - { - this.currGroupSerialidsDirty[i] = v; - } - } - /> - - ), - col: 1 - }) - } - return coms; - } else { - return []; - } - }, - // ipscope_v6_pc: () => { - // return [ - // { - // com: ( - //
- //
{i18n.label["388735"]()}
- //
- // {/* */} - //
- // { - // this.importConfig(ids[0]); - // } - // } > - // - // - //
- // - //
- //
- // ), - // col: 1 - // } - // ]; - // }, - locationshowaddress: (type = "location") => { - return [ - { - com: this.generateTable(type), - col: 1 - } - ]; - }, - wificheck: () => this.childrenComponents().locationshowaddress("wifi") - }); - - @computed get itemRender () { - this.refreshAttendanceForm; - this.refreshTab; - const form = this.formTarget.kqTypeForm; - if (form == null) - return this._itemRender; - - const formParams = form.getFormParams(); - const { signintype } = formParams; - if (this.editTabsActiveKey == '1' || signintype < 4) - return this._itemRender; - else { - const itemRender = {}; - Object.keys(formParams).map(key => Object.assign(itemRender, { - [key]: (field, textAreaProps, form, formParams) => null - })); - Object.assign(itemRender, { - signintype: (field, textAreaProps, form, formParams) => { - return ( - this.refreshAttendanceForm = new Date().getTime()} - /> - ) - } - }); - return itemRender - } - } - - @computed get childrenComponents () { - this.refreshAttendanceForm; - const form = this.formTarget.kqTypeForm; - if (form == null) - return this._childrenComponents; - - const formParams = form.getFormParams(); - const { signintype } = formParams; - if (this.editTabsActiveKey == '1' || signintype < 4) { - let childKey = 'ipscope_v4_pc'; - if (has(formParams, 'ipscope_v6_pc')) - childKey = 'ipscope_v6_pc'; - - return () => ({ - ...this._childrenComponents(), - [childKey]: () => { - return [ - { - com: ( -
-
{i18n.label["388735"]()}
-
-
- { - this.importConfig(ids[0]); - } - } > - - -
- -
-
- ), - col: 1 - } - ]; - }, - }) - } else { - return () => { }; - } - } - - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable canAdd = false; - @observable canCreate = false; - @observable canDel = false; - @observable canDelMember = false; - - @observable - spinning = false; - @observable - selectedSubCompany; - @observable - table = new TableStore(); - @observable - locationTable = new TableStore(); - @observable - wifiTable = new TableStore(); - @observable - memberTable = new TableStore(); - @observable - selectedWorkdayKeys = []; - @observable - workdaySettingData = []; - @observable - groupShiftOptions = []; - // @observable - // currGroupSerialids = []; - @observable _serialTableProps = {} - @observable refreshTab = new Date().getTime(); - @observable bChange = new Date().getTime(); - - // @observable rangeParams = { locationname: '', range: 500, longitude: '', latitude: '' }; - @computed get serialTableProps () { - return this.toJS(this._serialTableProps); - } - - @observable _rangeParams = {}; - @computed get rangeParams(){return this.toJS(this._rangeParams)} - set rangeParams(v){this._rangeParams = v} - - dialogParams = { - ...this.dialogPropsDef, - opType: "create", - style: { - width: 500, - height: 165 - }, - onCancel: () => { - this.selectedWorkdayKeys = []; - this.dialogParams.visible = false; - this.dialogParams.opType = "create"; - this.opId = null; - this.editTabsActiveKey = "1"; - this.illustrateVisible = false; - } - }; - - @observable - serialDialogParams = { - ...this.dialogPropsDef, - style: { - width: 700, - height: 500 - }, - onCancel: () => { - this.serialDialogParams.visible = false; - }, - onClose: formParams => { - // this.currGroupSerialids = [...this.currGroupSerialidsDirty]; - const { record, isCreate } = this.toJS(this.serialDialogParams); - this.serialDialogParams.visible = false; - const d = { ...formParams, serial: this.currGroupSerialidsDirty.join(",") }; - let { columns, datas } = this.serialTableProps; - if (isCreate) - datas.push({ ...d, key: new Date().getTime() }); - else { - datas = datas.map(data => { - if ((data.id && data.id == record.id) || (data.key && data.key == record.key)) { - return { - ...data, - ...d - } - } else { - return data; - } - }) - } - this._serialTableProps = { columns, datas }; - } - }; - - @observable - locationDialogParams = { - ...this.dialogPropsDef, - style: { - width: 900, - height: 500 - }, - onCancel: () => { - this.location = null; - this.locationDialogParams.visible = false; - } - }; - - @observable - wifiDialogParams = { - ...this.dialogPropsDef, - style: { - width: 500, - height: 135 - }, - onCancel: () => { - this.wifiDialogParams.visible = false; - } - }; - - @observable - memberAuthParams = { - icon: "icon-coms-hrm", - iconBgcolor: "#217346", - title: i18n.label["125217"](), - visible: false, - onOk: data => - this.doSaveMember({ - ...data, - groupId: this.opId - }), - onCancel: () => (this.memberAuthParams.visible = false) - }; - - @observable _editTabs = []; - @observable editTabsActiveKey = '1'; - @observable refreshAttendanceForm = new Date().getTime(); - /********************* observable list *********************/ - - /********************* computed list *********************/ - @computed - get tableMultiDelete () { - return this.table.selectedRowKeys.length === 0; - } - @computed - get locationTableMultiDelete () { - return this.locationTable.selectedRowKeys.length === 0; - } - @computed - get wifiTableMultiDelete () { - return this.wifiTable.selectedRowKeys.length === 0; - } - @computed - get memberRemoveable () { - return this.memberTable.selectedRowKeys.length === 0; - } - - @computed get editTabs () { - return this.toJS(this._editTabs); - } - - @computed get editTabConfig () { - let tabs = this.editTabs; - const tabButtonDef = []; - this.canAdd && tabButtonDef.push({ - comType: "button", - icon: "icon-coms-Add-to-hot", - label: i18n.label.create, - rightMenuIcon: this.menuIconCollection.create, - onClickHandle: () => this.getMemberForm() - }); - this.canAdd && tabButtonDef.push({ - comType: "button", - icon: "icon-coms-form-delete-hot", - label: i18n.label.multiDelete, - rightMenuIcon: this.menuIconCollection.remove, - onClickHandle: () => this.deleteMember(), - checkAction: "memberRemoveable" - }); - if (tabs.length > 2) { - tabs[2].tabButtonDef = tabButtonDef; - } - - return { - tabs, - keyParam: "viewCondition", - activeTabKey: this.editTabsActiveKey, - tabChangeHandle: key => this.setActiveTab(key) - } - }; - /********************* computed list *********************/ - - /********************* action list *********************/ - getOsInfo = async () => { - let data = await WeaTools.callApi('/api/system/info/getOSinfo', 'GET', {}); - if (data.status) { - data.mapParams.ableToSwitchMap = "true"; - localStorage.setItem('getOsInfo', JSON.stringify(data)); - } - } - - @action - init = () => { - // this.getOsInfo(); - this.selectedSubCompany = null; - this.single = null; - this.mainActiveTabKey = '1'; - api.init().then( - rs => { - rs.map((data, index) => { - if (data.status === "1") { - switch (index) { - case 0: - this.containerInitFinished.init = false; - this.setFormData("conditionForm", data.conditions); - if (this.formTarget.conditionForm.isFormInit) - this.containerInitFinished.init = true; - break; - case 1: - let tabs = []; - data.tabs.map((tab, index) => { - let tabInfo = { - color: "#000000", - groupId: `g{tab.key}`, - title: tab.title, - viewCondition: tab.key - }; - if (index === 2) { - tabInfo.searchType = ['base', 'advanced']; - tabInfo.doSearch = () => this.getMemberList(); - tabInfo.searchKey = 'hrmName'; - // tabInfo.tabButtonDef = this.memberTabButtonDef; - } - tabs.push(tabInfo); - }); - this._editTabs = tabs; - break; - } - } - }); - this.getTableData(); - }, - error => { } - ); - }; - - @computed get memberTabButtonDef () { - const tabButtonDef = []; - this.canAdd && tabButtonDef.push({ - comType: "button", - icon: "icon-coms-Add-to-hot", - label: i18n.label.create, - rightMenuIcon: this.menuIconCollection.create, - onClickHandle: () => this.getMemberForm() - }); - this.canDelMember && tabButtonDef.push({ - comType: "button", - icon: "icon-coms-form-delete-hot", - label: i18n.label.multiDelete, - rightMenuIcon: this.menuIconCollection.remove, - onClickHandle: () => this.deleteMember(), - checkAction: "memberRemoveable" - }); - return tabButtonDef; - } - - @action - initSingle = (id, callback) => { - if (id == null) - return; - this.single = true; - this.moduleCallback = callback; - api.getTabs().then(data => { - if (data.status === "1") { - let tabs = []; - data.tabs.map((tab, index) => { - let tabInfo = { - color: "#000000", - groupId: `g{tab.key}`, - title: tab.title, - viewCondition: tab.key - }; - if (index === 2) { - tabInfo.searchType = ['base', 'advanced']; - tabInfo.doSearch = () => this.getMemberList(); - tabInfo.searchKey = 'hrmName'; - tabInfo.tabButtonDef = [ - { - comType: "button", - icon: "icon-coms-Add-to-hot", - label: i18n.label.create, - rightMenuIcon: this.menuIconCollection.create, - onClickHandle: () => this.getMemberForm() - }, - { - comType: "button", - icon: "icon-coms-form-delete-hot", - label: i18n.label.multiDelete, - rightMenuIcon: this.menuIconCollection.remove, - onClickHandle: () => this.deleteMember(), - checkAction: "memberRemoveable" - } - ]; - } - tabs.push(tabInfo); - }); - this._editTabs = tabs; - this.opId = id; - this.doEdit(id, '1'); - this.containerInitFinished.init = true; - } else { - - } - }, error => { }); - }; - - @computed get dialogFootButtons () { - let buttons = []; - if (this.canAdd) { - buttons = [ - - ]; - } - - let menus = this.convertToMenus(buttons); - return { - buttons, - menus: [ - ...menus, - ] - }; - } - - @action - getTopProps = (single) => { - let buttons = []; - if (single && this.canAdd) { - buttons = [ - - ]; - } else { - if (this.mainActiveTabKey == '1') { - buttons = []; - this.canCreate && buttons.push(( - - )); - this.canDel && buttons.push(( - - )); - } - if (this.mainActiveTabKey == '2') { - buttons = [ - , - ] - } - - } - let menus = this.convertToMenus(buttons); - return { - buttons, - menus: [ - ...menus, - ...this.getBasicMenus("HRM_ENGINE_KQGROUP") - ] - }; - }; - - @action - treeNodeClick = (event, ids, nodeids, nodes) => { - const { data: nodeData } = event.node.props; - this.selectedSubCompany = nodeData; - this.formTarget.conditionForm.resetConditionValue(); - this.setRadioConfig(nodeData) - this.getTableData(); - }; - - @action - getTableData = () => { - const params = this.formTarget.conditionForm.getFormParams(); - Object.assign(params, { - subcompanyid: this.selectedSubCompany ? this.selectedSubCompany.id : null - }); - api.getSearchList(params).then( - data => { - if (data.status === "1") { - this.canCreate = data.canAdd; - this.canDel = data.canDel; - this.table = new TableStore(); - this.table.getDatas(data.sessionkey, 1); - } else { - message.error(data.message); - } - }, - error => { } - ); - }; - - @action resetBaseForm = () => { - // this.currGroupSerialids.length = 0;; - delete this.formTarget.shiftSchedulceForm; - delete this.formTarget.shiftSchedulceFormFields; - } - - @action setShiftOptions = (datas) => { - this.groupShiftOptions.length = 0; - datas.map(d => { - ['', '-1'].indexOf(d.id) < 0 && this.groupShiftOptions.push({ - key: d.id, - showname: d.name - }) - }) - this.groupShiftOptions.push({ - key: '-1', - showname: i18n.label['26593']() - }) - this.bChange = new Date().getTime(); - } - - @action - getBaseForm = (params, callback) => { - params = params || {}; - Object.assign(params, { - subcompanyid: this.selectedSubCompany ? this.selectedSubCompany.id : null - }); - this.canAdd = false; - api.getBaseForm(params).then( - data => { - if (data.status === "1") { - this.canAdd = data.canAdd; - this.resetBaseForm(); - this.setFormData("baseForm", data.formField); - const idx = findIndex(data.formField[0].items, { domkey: ['serialids'] }); - if (idx > 0) { - const { replaceDatas } = data.formField[0].items[idx].browserConditionParam; - this.setShiftOptions(replaceDatas) - } - if (has(data, 'shiftSchedulceTable')) { - this._serialTableProps = { ...data.shiftSchedulceTable }; - // this.setFormData("shiftSchedulceForm", data.shiftSchedulce.formField); - // this.currGroupSerialids = (data.shiftSchedulce.shiftcycleserialids === '' ? [] : data.shiftSchedulce.shiftcycleserialids.split(',')); - // this.currGroupSerialidsDirty = [...this.currGroupSerialids]; - } - if (this.formTarget.baseForm.isFormInit) { - callback && callback(data.fixedSchedulce); - } - } else { - message.error(data.message); - } - }, - error => { } - ); - }; - - @action - getKQTypeForm = (params, callback) => { - if (this.spinning) return; - this.spinning = true; - this.canAdd = false; - api.getKQTypeForm(params).then( - data => { - if (data.status === "1") { - this.canAdd = data.canAdd; - this.setFormData("kqTypeForm", data.formField); - if (this.formTarget.kqTypeForm.isFormInit) { - this.refreshAttendanceForm = new Date().getTime(); - callback && callback(data); - } - } else { - message.error(data.message); - } - this.spinning = false; - }, - error => (this.spinning = false) - ); - }; - - @action - getMemberSearchCondition = params => { - api.getMemberSearchCondition().then( - data => { - if (data.status === "1") { - this.setFormData("memberConditionForm", data.formField); - if (this.formTarget.memberConditionForm.isFormInit) { - this.refreshTab = new Date().getTime(); - this.getMemberList(); - } - } else message.error(data.message); - }, - erro => { } - ); - }; - - @action - getMemberList = params => { - this.canAdd = false; - this.canDelMember = false; - api.getMemberList({ groupId: this.opId, ...this.formTarget.memberConditionForm.getFormParams() }).then( - data => { - if (data.status === "1") { - this.canAdd = data.canAdd; - this.canDelMember = data.canDel; - this.memberTable = new TableStore(); - this.memberTable.getDatas(data.sessionkey, 1); - } else message.error(data.message); - }, - error => { } - ); - }; - - @action - setWorkdaySettingData = schedulce => { - this.columns.length = 0; - this.workdaySettingData.length = 0; - try { - if (schedulce != null) { - schedulce.columns.map(column => { - let c = { - title: column.title, - key: column.dataIndex, - dataIndex: column.dataIndex, - width: column.width - }; - if (column.dataIndex === "operate") { - c.render = (text, record, index) => this.canAdd ? ( - - this.setShift(datas, record.id) - } - > - {i18n.label["24833"]()} - - ) : ''; - } - this.columns.push(c); - }); - this.workdaySettingData = schedulce.datas; - this.selectedWorkdayKeys = [0, 1, 2, 3, 4, 5, 6]; - } - } catch (e) { } - }; - - @action - getCreateForm = () => { - this.getBaseForm(null, schedulce => { - if (this.selectedSubCompany != null) { - this.formTarget.baseForm.updateFields({ - subcompanyid: { - value: this.selectedSubCompany.id.toString(), - valueSpan: this.selectedSubCompany.name, - valueObj: [{ - id: this.selectedSubCompany.id.toString(), - name: this.selectedSubCompany.name - }] - } - }); - } - this.setWorkdaySettingData(schedulce); - this.dialogParams.title = i18n.label["389073"](); - this.dialogParams.opType = "create"; - this.dialogParams.style = { - width: 800, - height: 680 - }; - this.dialogParams.visible = true; - }); - }; - - @action - multiSetting = records => { - const selectedWorkdayKeys = this.toJS(this.selectedWorkdayKeys); - let v = { - shiftId: null, - shiftInfo: "" - }; - let datas = this.toJS(this.workdaySettingData); - if (records.length === 0) { - datas.map(d => { - d.serialid = null; - d.serialinfo = i18n.label["26593"](); - }); - } else { - datas.map((d, index) => { - if (selectedWorkdayKeys.indexOf(index) > -1) { - d.serialid = records[0].id; - d.serialinfo = records[0].aliasidspan; - } - }); - } - this.workdaySettingData = datas; - }; - - @action - setShift = (records, id) => { - const index = findIndex(this.toJS(this.workdaySettingData), { id }); - if (records.length === 0) { - this.workdaySettingData[index].serialid = null; - this.workdaySettingData[index].serialinfo = i18n.label["26593"](); - } else { - this.workdaySettingData[index].serialid = records[0].id; - this.workdaySettingData[index].serialinfo = records[0].aliasidspan; - } - }; - - @action doModuleCallback = () => { - if (this.moduleCallback != null) { - this.moduleCallback(); - } else { - let dia = top.window.getParentDialog(); - if (dia != null) { - const { callback } = dia.props; - callback && callback(); - } - } - } - - @action - save = (setting = false) => { - if (this.spinning) return; - this.spinning = true; - window.e9HideFormFieldKeys = []; - let form, formParams; - let formType = "base"; - let autoSign = false; - if ( - this.dialogParams.opType === "create" || - this.editTabsActiveKey === "1" - ) { - form = this.formTarget.baseForm; - formParams = form.getFormParams(); - switch (formParams.kqtype) { - case "1": - window.e9HideFormFieldKeys.push( - ...["serialids", "weekday", "signstart", "workhour"] - ); - break; - case "2": - window.e9HideFormFieldKeys.push(...["serialids", "weekday", "signstart", "workhour"]); - break; - case "3": - window.e9HideFormFieldKeys.push(...['serialids']); - break; - } - if (formParams.validity != '1') { - window.e9HideFormFieldKeys.push( - ...['validityfromdate', 'validityenddate'] - ); - } - } else if (this.editTabsActiveKey === "2") { - formType = "kqtype"; - form = this.formTarget.kqTypeForm; - formParams = form.getFormParams(); - const { signintype, locationcheck, wificheck, auto_checkin, auto_checkout, auto_checkout_before, auto_checkout_after } = formParams; - if ([1, 3].indexOf(parseInt(signintype)) > -1) { - if (locationcheck != '1' && wificheck != '1' || this.currKQType == '3') { - window.e9HideFormFieldKeys.push( - ...['auto_checkin', 'auto_checkin_before', 'auto_checkin_after', 'auto_checkout', 'auto_checkout_before', 'auto_checkout_after'] - ); - } else { - autoSign = true; - auto_checkin == '0' && window.e9HideFormFieldKeys.push( - ...['auto_checkin', 'auto_checkin_before', 'auto_checkin_after'] - ); - auto_checkout == '0' && window.e9HideFormFieldKeys.push( - ...['auto_checkout', 'auto_checkout_before', 'auto_checkout_after'] - ); - } - } - } else if (this.editTabsActiveKey === "3") { - message.success(i18n.message.saveSuccess()); - this.spinning = false; - this.doModuleCallback(); - return; - } - - form.validateForm().then(f => { - if (f.isValid) { - if (formType == "base") { - this.saveBaseForm(formParams, setting); - } else { - const { auto_checkout, auto_checkout_before, auto_checkout_after } = formParams; - if (autoSign && auto_checkout != '0' && parseInt(auto_checkout_after || '0') <= parseInt(auto_checkout_before || '0')) { - f.showError('auto_checkout_before', getLabel('519436', '结束时间必须大于开始时间')); - this.spinning = false; - return; - } - this.saveKQTypeForm(formParams); - } - } else { - f.showErrors(); - const fields = form.fieldMap; - [...Object.keys(fields)].map(k => { - const e = form.getError(fields[k]); - if (e != null && e != "") { - if (k.indexOf('auto_checkin') > -1) { - form.showError('auto_checkin_before', e); - } else if (k.indexOf('auto_checkout') > -1) { - form.showError('auto_checkout_before', e); - } - console && console.debug(e); - } - }); - this.showError = new Date().getTime(); - this.spinning = false; - } - }); - }; - - @action - saveBaseForm = (formParams, setting = false) => { - let params = { ...formParams }; - if (formParams.kqtype === "1") { - params.fixedSchedulce = []; - this.toJS(this.workdaySettingData).map(d => { - params.fixedSchedulce.push({ - id: (this.opId ? d.id : ''), - serialid: d.serialid - }); - }); - } else if (formParams.kqtype === "2") { - // const shiftSchedulceFormParams = this.formTarget.shiftSchedulceForm.getFormParams(); - // this.currGroupSerialids.splice(shiftSchedulceFormParams.shiftcycleday, this.currGroupSerialids.length); - // params.shiftSchedulce = { - // ...shiftSchedulceFormParams, - // shiftcycleserialids: this.currGroupSerialids.join() - // } - params.shiftSchedulce = this.serialTableProps.datas; - } - if (this.opId != null) params.id = this.opId; - api.saveBaseForm({ data: JSON.stringify(params) }).then( - data => { - this.spinning = false; - if (data.status === "1") { - message.success(i18n.message.saveSuccess()); - // if(params.id == null && formParams.kqtype === "2") - // this.doEditSchedule(data); - if (!this.single) { - this.dialogParams.onCancel(); - this.getTableData(); - } - this.doModuleCallback(); - if (setting) this.doEdit(data.id, "2"); - } else { - message.error(data.message); - } - }, - error => (this.spinning = false) - ); - }; - - @action - saveKQTypeForm = formParams => { - let params = { ...formParams, id: this.opId }; - api.saveKQTypeForm({ data: JSON.stringify(params) }).then( - data => { - if (data.status === "1") { - message.success(i18n.message.saveSuccess()); - if (!this.single) { - this.dialogParams.onCancel(); - this.getTableData(); - } - this.doModuleCallback(); - } else { - message.error(data.message); - } - this.spinning = false; - }, - error => (this.spinning = false) - ); - }; - - @action - doEdit = (id, tabKey) => { - this.opId = id; - this.dialogParams.title = i18n.label["389108"](); - this.dialogParams.opType = "edit"; - this.dialogParams.style = { - width: 800, - height: 680 - }; - this.dialogParams.visible = true; - this.setActiveTab(tabKey); - }; - - currKQType = ''; - @action - setActiveTab = key => { - const tabIndex = this.getTabIndex(this.editTabConfig.tabs, key); - if (tabIndex < 0) return; - this.currKQType = ''; - switch (key) { - case "1": - this.getBaseForm({ id: this.opId }, schedulce => { - this.setWorkdaySettingData(schedulce); - this.refreshTab = new Date().getTime(); - }); - break; - case "2": - this.getKQTypeForm({ id: this.opId }, data => { - this.currKQType = data.kqtype; - this.helpTipMap = data.helpTipMap; - this.locationTable = new TableStore(); - this.wifiTable = new TableStore(); - this.locationSessionKey = data.locationSessionKey; - this.wifiSessionKey = data.wifiSessionKey; - this.locationTable.getDatas(data.locationSessionKey, 1); - this.wifiTable.getDatas(data.wifiSessionKey, 1); - this.refreshTab = new Date().getTime(); - }); - break; - case "3": - this.getMemberSearchCondition(); - break; - } - this.editTabsActiveKey = - key || this.editTabConfig.tabs[0].viewCondition; - }; - - @action - generateSerialTable = () => { - if (isEmpty(this.serialTableProps)) - return null; - - return (); - } - - @action - generateTable = type => { - let title, removeable, tableStore, addFunc, removeFunc; - switch (type) { - case "location": - title = i18n.label["389125"](); - removeable = this.locationTableMultiDelete; - tableStore = this.locationTable; - addFunc = this.addLocation; - removeFunc = () => this.removeLocation(); - break; - case "wifi": - title = i18n.label["389126"](); - removeable = this.wifiTableMultiDelete; - tableStore = this.wifiTable; - addFunc = this.addWifi; - removeFunc = () => this.removeWifi(); - break; - } - const removeBtnClasses = classnames({ - ["icon-coms-form-delete-hot"]: true, - ["btn"]: true, - ["btn-active"]: !removeable, - ["btn-disable"]: removeable - }); - - const renderCol = (cols) => { - cols.map((col, i) => { - if (col.dataIndex == 'id') { - col.render = (text, record) => { - return this.canAdd && [ - this.editLocationOrWifi(record, type)}>{i18n.label.modify()}, - this.deleteLocationOrWifi(record.id, type)}>{i18n.label.delete()} - ] - } - } else if (col.dataIndex == 'locationname' || col.dataIndex == 'wifiname') { - col.render = (text, record) => { - return this.editLocationOrWifi(record, type)}>{record[`${col.dataIndex}span`]} - } - } - }) - } - - const tableProps = { - scroll: { - y: 400 - } - } - - return ( -
-
-
{title}
-
- this.doSearchLocationWifi(type, value)} /> -
- {this.canAdd && } - {this.canAdd && } -
-
- -
-
- ); - }; - - @action doSearchLocationWifi = async (type, value) => { - const callApi = type == 'location' ? api.getGroupLocationList : api.getGroupWifiList; - const params = { - id: this.opId, - [type == 'location' ? 'locationname' : 'wifiname']: value - } - const tableStore = type == 'location' ? this.locationTable : this.wifiTable - const data = await callApi(params); - if (data.status == '1') { - tableStore.getDatas(data.sessionkey, 1); - } else { - message.error(data.message); - } - } - - @action - addLocation = () => { - this.locationOrWifiId = null; - this.clearRangeParams(); - this.locationDialogParams.title = i18n.label['389213'](); - this.locationDialogParams.visible = true; - // api.getLocationForm().then(data => { - // if(data.status == '1'){ - // this.locationFormStore = new WeaForm(); - // this.locationFormStore.initFormFields(data.formField); - // if (this.locationFormStore.isFormInit) { - // this.locationDialogParams.title = i18n.label['389213'](); - // this.locationDialogParams.visible = true; - // } - // } - // }) - }; - - @action editLocation = record => { - this.clearRangeParams(); - ['locationname', 'address', 'checkscope', 'longitude', 'latitude'].map(k => { - this.setRangeParam(k, record[k]); - }) - this.locationDialogParams.title = getLabel('386247', '编辑办公地点'); - this.locationDialogParams.visible = true; - } - - @action - removeLocation = (params) => { - let content; - if (params == null) { - params = { - ids: this.locationTable.selectedRowKeys - }; - content = i18n.confirm.deleteSelected(); - } else { - content = i18n.confirm.delete(); - } - this.confirmInfo({ - content, - onOk: () => { - api.delLocation({ ...params, groupId: this.opId }).then(data => { - if (data.status === "1") { - this.locationTable.setSelectedRowKeys([]); - this.locationTable.getDatas(null, 1); - } else { - message.error(data.message); - } - }); - } - }); - }; - - @action - saveLocation = () => { - // if(this.location == null) { - // message.error(i18n.label['389218']()); - // return; - // } - if (this.rangeParams.locationname == null || this.rangeParams.locationname == '') { - this.mapInfoError && this.mapInfoError['locationname'] && this.mapInfoError['locationname'].showError(); - return; - } - if (this.rangeParams.longitude == null || this.rangeParams.longitude == '') { - this.mapInfoError && this.mapInfoError['longitude'] && this.mapInfoError['longitude'].showError('123'); - return; - } else if (!/^(\-)?\d+(\.\d+)?$/.test(this.rangeParams.longitude)) { - message.error(getLabel('529869', '请输入正确的经纬度坐标!')); - return; - } - if (this.rangeParams.latitude == null || this.rangeParams.latitude == '') { - this.mapInfoError && this.mapInfoError['latitude'] && this.mapInfoError['latitude'].showError(); - return; - } else if (!/^(\-)?\d+(\.\d+)?$/.test(this.rangeParams.latitude)) { - message.error(getLabel('529869', '请输入正确的经纬度坐标!')); - return; - } - if (this.spinning) return; - this.spinning = true; - api.saveLocation({ groupId: this.opId, data: JSON.stringify({ ...this.location, groupId: this.opId, ...this.toJS(this.rangeParams), id: this.locationOrWifiId }) }).then(data => { - if (data.status === "1") { - this.locationDialogParams.onCancel(); - //this.locationTable = new TableStore(); - this.locationTable.getDatas(this.locationSessionKey, 1); - } else { - message.error(data.message); - } - this.spinning = false; - }, error => this.spinning = false) - } - - @action - onPositionSelected = (data) => { - this.location = data; - ['locationname', 'address', 'longitude', 'latitude'].map(k => { - this.setRangeParam(k, data[k]); - }); - } - - @action - addWifi = () => { - this.locationOrWifiId = null; - api.getWifiForm().then( - data => { - if (data.status === "1") { - this.setFormData("wifiForm", data.formField); - if (this.formTarget.wifiForm.isFormInit) { - this.wifiDialogParams.title = i18n.label['389212'](); - this.wifiDialogParams.visible = true; - } - } else { - message.error(data.message); - } - }, - error => { } - ); - }; - - @action editWifi = async record => { - this.locationOrWifiId = record.id; - const data = await api.getWifiForm(); - if (data.status === "1") { - this.setFormData("wifiForm", data.formField); - if (this.formTarget.wifiForm.isFormInit) { - this.formTarget.wifiForm.updateFields({ - wifiname: { value: record.wifiname }, - mac: { value: record.mac }, - }) - this.wifiDialogParams.title = getLabel('529576', '编辑wifi信息'); - this.wifiDialogParams.visible = true; - } - } else { - message.error(data.message); - } - } - - @action - saveWifi = () => { - if (this.spinning) return; - this.spinning = true; - const form = this.formTarget.wifiForm, - formParams = form.getFormParams(); - form.validateForm().then(f => { - if (f.isValid) { - if (!/(([a-f0-9]{2}:)|([a-f0-9]{2}-)){5}[a-f0-9]{2}/gi.test(formParams.mac)) { - f.showError('mac', i18n.label['389320']()); - this.spinning = false; - return; - } - let params = { ...formParams, groupId: this.opId, id: this.locationOrWifiId }; - api.saveWifiForm({ groupId: this.opId, data: JSON.stringify(params) }).then( - data => { - if (data.status === "1") { - this.wifiDialogParams.onCancel(); - //this.wifiTable = new TableStore(); - this.wifiTable.getDatas(this.wifiSessionKey, 1); - } else { - message.error(data.message); - } - this.spinning = false; - }, - error => (this.spinning = false) - ); - } else { - this.spinning = false; - f.showErrors(); - const fields = this.formTarget.wifiForm.fieldMap; - [...Object.keys(fields)].map(k => { - const e = this.formTarget.wifiForm.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - } - }); - this.showError = new Date().getTime(); - } - }); - }; - - @action - removeWifi = params => { - let content; - if (params == null) { - params = { - ids: this.wifiTable.selectedRowKeys - }; - content = i18n.confirm.deleteSelected(); - } else { - content = i18n.confirm.delete(); - } - this.confirmInfo({ - content, - onOk: () => { - api.delWifiForm({ ...params, groupId: this.opId }).then(data => { - if (data.status === "1") { - this.wifiTable.getDatas(null, 1); - } else { - message.error(data.message); - } - }); - } - }); - }; - - @action - getMemberForm = () => { - api.getMemberForm().then( - data => { - if (data.status === "1") { - this.memberAuthParams.title = i18n.label["125217"](); - this.memberAuthParams.conditions = data.conditions; - this.memberAuthParams.visible = true; - } else { - message.error(data.message); - } - }, - error => { } - ); - }; - - @action - doSaveMember = (params) => { - if (this.spinning) - return; - this.spinning = true; - api.saveMemberForm(params).then(data => { - if (data.status === '1') { - message.success(i18n.message.saveSuccess()); - this.formTarget.memberConditionForm.resetConditionValue(); - } else - message.error(data.message); - this.getMemberList(); - this.memberAuthParams.onCancel(); - this.spinning = false; - }, error => this.spinning = false) - } - - @action - deleteMember = (params) => { - let content; - if (params == null) { - params = { - ids: this.memberTable.selectedRowKeys - }; - content = i18n.confirm.deleteSelected(); - } else { - content = i18n.confirm.delete(); - } - this.confirmInfo({ - content, - onOk: () => { - api.delMemberForm({ ...params, groupId: this.opId }).then(data => { - if (data.status === "1") { - message.success(i18n.message.deleteSuccess()); - this.memberTable.getDatas(null, 1); - this.getTableData(); - } - }); - } - }); - } - - @action - doDelete = params => { - let content; - if (params == null) { - params = { - ids: this.table.selectedRowKeys - }; - content = i18n.confirm.deleteSelected(); - } else { - content = i18n.confirm.delete(); - } - this.confirmInfo({ - content, - onOk: () => { - api.deleteGroup(params).then(data => { - if (data.status === "1") { - message.success(i18n.message.deleteSuccess()); - this.table.getDatas(null, 1); - } - }); - } - }); - }; - - @action - saveSerial = () => { - this.formTarget.shiftSchedulceForm.validateForm().then(f => { - if (f.isValid) { - this.serialDialogParams.onClose(f.getFormParams()); - } else { - f.showErrors(); - const fields = this.formTarget.wifiForm.fieldMap; - [...Object.keys(fields)].map(k => { - const e = this.formTarget.wifiForm.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - } - }); - this.showError = new Date().getTime(); - } - }); - } - - locationOrWifiId; - @action editLocationOrWifi = (record, type) => { - this.locationOrWifiId = record.id; - if (type === 'location') { - this.editLocation(record); - } - else - this.editWifi(record); - } - - @action - deleteLocationOrWifi = (id, type) => { - if (type === 'location') - this.removeLocation({ ids: id }); - else - this.removeWifi({ ids: id }); - } - - @action - importConfig = (fileid) => { - api.importExcel({ groupId: this.opId, filename: fileid }).then(data => { - if (data.status === '1') { - message.success(i18n.message.uploadSuccess()); - this.locationTable.getDatas(this.locationSessionKey, 1); - this.wifiTable.getDatas(this.wifiSessionKey, 1); - } else { - message.error(data.message); - } - }, error => { }) - } - - @action - exportConfig = () => { - const downloadUrl = addContentPath('/api/hrm/kq/group/exportExcel'); - let formElement = document.createElement('form'); - formElement.style.display = "display:none;"; - formElement.method = 'post'; - formElement.action = downloadUrl; - let inputElement = document.createElement('input'); - inputElement.type = 'hidden'; - inputElement.name = "groupId"; - inputElement.value = this.opId; - formElement.appendChild(inputElement); - document.body.appendChild(formElement); - formElement.submit(); - document.body.removeChild(formElement); - } - - @action - doEditSchedule = record => { - const url = `/spa/hrm/staticAttendance4engine/engine.html#/attendance/scheduleSetting/${record.id}?_key=${new Date().getTime()}`; - window.open(url); - } - - @action compareSearial = (v, form) => { - if (this.showConfirm) - return; - this.showConfirm = true; - let datas = []; - v.serialids.valueObj.map(d => { - datas.push({ id: d.id, name: d.name }); - }); - - const options = filter(this.toJS(this.groupShiftOptions), v => ['', '-1'].indexOf(v.key) < 0); - let removedIds = [], removedNames = []; - if (options.length > 0) { - options.map(op => { - if (findIndex(datas, { id: op.key }) < 0) { - removedIds.push(op.key); - removedNames.push(op.showname); - } - }); - if (removedIds.length > 0) { - this.confirmInfo({ - width: 640, - content: ( -
-
{getLabel('500703', '确认从考勤组移除下列班次吗?')}
-
- { - removedNames.map(name =>
{name}
) - } -
-
{getLabel('500704', '移除后,排班周期将自动去除该班次,排班设置中已排班次不受影响')}
-
- ), - onOk: () => { - this.setShiftOptions(datas); - let tableDatas = this.toJS(this.serialTableProps.datas); - tableDatas = tableDatas.map(row => { - let { serial } = row; - let arr = serial.split(','); - arr = arr.map(d => { - if (findIndex(datas, { id: d }) > -1) - return d; - return -1; - }) - return { - ...row, - serial: arr.join(',') - }; - }) - this._serialTableProps.datas = tableDatas; - this.showConfirm = false; - }, - onCancel: () => { - let value = [], valueSpan = [], valueObj = []; - options.map(op => { - value.push(op.key); - valueSpan.push(op.showname); - valueObj.push({ - id: op.key, - name: op.showname - }) - }) - form.updateFields({ - serialids: { - value: value.join(','), - valueSpan: valueSpan.join(','), - valueObj - } - }); - this.bChange = new Date().getTime(); - this.showConfirm = false; - } - }); - } else { - this.setShiftOptions(datas); - this.showConfirm = false; - } - } else { - let datas = []; - v.serialids.valueObj.map(d => { - datas.push({ id: d.id, name: d.name }); - }) - this.setShiftOptions(datas); - this.showConfirm = false; - } - } - - @action clearRangeParams = () => this.rangeParams = { locationname: '', checkscope: 500, longitude: '', latitude: '' }; - - @action setRangeParam = (k, v) => { - this.rangeParams = {...this.rangeParams, [k]: v}; - // this.rangeParams[k] = v; - } - - mapInfoError = {}; - @action setMapInfoError = (key, ref) => this.mapInfoError[key] = ref; - - @action getShiftCycleForm = record => { - if (this.groupShiftOptions.length > 1) { - if (record) { - this.currGroupSerialidsDirty = record.serial.split(','); - } else { - this.currGroupSerialidsDirty = this.currGroupSerialidsDirty || []; - this.currGroupSerialidsDirty.length = 0; - } - api.getShiftCycleForm().then(data => { - this.setFormData("shiftSchedulceForm", data.formField); - this.formTarget.shiftSchedulceForm.isFormInit && record != null && this.formTarget.shiftSchedulceForm.updateFields({ - shiftcyclename: { - value: record.shiftcyclename - }, - shiftcycleday: { - value: record.shiftcycleday - } - }); - this.showSerialDialog(record == null); - }) - this.serialDialogParams.record = record; - } else { - message.error(getLabel('500479', '请选择班次')); - } - } - - @action showSerialDialog = (isCreate = true) => { - if (this.formTarget.shiftSchedulceForm.isFormInit) { - this.serialDialogParams.title = i18n.label['389225'](); - this.serialDialogParams.visible = true; - this.serialDialogParams.isCreate = isCreate; - } - } - - @action deleteSerial = record => { - const { id, key } = record; - this.confirmInfo({ - content: i18n.confirm.delete(), - onOk: () => { - let { columns, datas } = this.serialTableProps; - datas = _.filter(datas, v => v.id != id || v.key != key); - this._serialTableProps = { columns, datas }; - // api.delLocation({...params, groupId: this.opId}).then(data => { - // if (data.status === "1") { - // this.locationTable.setSelectedRowKeys([]); - // this.locationTable.getDatas(null, 1); - // } - // }); - } - }); - } - /********************* action list *********************/ - - //************************************************************** */ 人员考勤组查询 */ ********************************************************** - buttons = [ - , - - ] - - @observable config = []; - @observable searchTable = new TableStore(); - @observable searchColumns = []; - @observable searchDatas = []; - @observable addToGroupForm = new WeaForm(); - @observable addToGroupCondition = []; - @observable loading = false; - @observable selectId = ''; // 人员id - @observable groupId = ''; // 考勤组id - @observable selectedGroupRow = []; - @observable rowKey = []; - @observable lastparams = {}; - - @observable pageIndex = 1; - @observable pageSize = 10; - @observable total = 0; - - @observable radioParams = {}; - @observable orderParams = {}; - - @observable order = ''; - @observable columnKey = ''; - - @observable spinning = false; - - - @computed get tableProps () { - return ({ - rowSelection: { - selectedRowKeys: this.toJS(this.rowKey), - getCheckboxProps: record => { // 选择框默认属性配置 - return { disabled: record.groupIds.length > 0 || !record.canEdit }; - }, - onChange: (selectedRowKeys, selectedRows) => { - this.rowKey = selectedRowKeys; - this.selectedGroupRow = selectedRows; - } - } - } - ) - } - - // 加入考勤组按钮disabled计算 - @computed get getRowKey () { - return this.rowKey.length === 0; - } - - - @observable addDialogParams = { - title: getLabel('515662', '加入到考勤组'), - icon: "icon-coms-hrm", - iconBgcolor: "#217346", - visible: false, - style: { height: 100, width: 700 }, - buttons: this.buttons, - onCancel: () => { - this.addDialogParams.visible = false; - } - } - - - @action tabChangeHandle = (key) => { - this.mainActiveTabKey = key; - key == '1' && this.init(); - } - - // @action initSearchGroup = () => { - // this.initData(); - - // } - - // 数据初始化 - @action initData = () => { - this.pageIndex = 1; - this.pageSize = 10; - this.total = 0; - this.selectId = ''; // 人员id - this.groupId = ''; // 考勤组id - this.selectedGroupRow = []; - this.rowKey = []; - this.lastparams = {}; - this.radioParams = {}; - this.config = []; - this.getGroupMemeberCondition(); - } - - // 考勤组查询groupRadio - @action getGroupMemeberCondition = () => { - api.getGroupMemeberCondition().then(resp => { - this.config = resp.conditions; - }) - } - - // 考勤组查询列表渲染 - @action getGroupMemberList = (params) => { - if (this.spinning) - return; - this.loading = true; - this.spinning = true; - api.getGroupMemberList(params).then(resp => { - if (resp.status == '1') { - this.pageIndex = resp.pageIndex; - this.total = resp.total; - this.searchDatas = resp.dataSource; - this.searchColumns = this.setColumns(resp.columns); - this.loading = false; - this.spinning = false; - } else { - message.error(resp.message); - this.loading = false; - } - - }) - } - - // 设置定制列 - @action setColumns = (columns) => { - columns.map((c, i) => { - if (c.key == 'lastname') { - c.sorter = true; - c.render = (text, record, index) => { - return window.pointerXY(e)} title={text}>
{text}
; - } - } - if (c.key == "departmentid") { - c.sorter = true; - c.render = (text, record, index) => { - return record.departmentName - } - } - if (c.key == 'subcompanyid1') { - c.sorter = true; - c.render = (text, record, index) => { - return record.subcompanyName - } - } - if (c.key == 'groups') { - c.render = (text, record, index) => { - if (isEmpty(text) && record.canEdit) { - return this.getAddMemberCondition(record.id)} >
{getLabel('514133', '未设置')}
- } - else if (isEmpty(text) && !record.canEdit) { - return
{getLabel('514133', '未设置')}
- } else { - return record.groups.map((item, index) => { - return index === record.groups.length - 1 ? -
{item}
- : -
{item}
{','}
; - }) - } - - } - } - - }) - - return columns; - } - - // 点击未设置的a标签,获取添加考勤组的表单 - @action getAddMemberCondition = (id) => { - api.getAddMemberCondition().then(resp => { - this.addToGroupForm = new WeaForm(); - this.addToGroupCondition.length = 0; - this.addToGroupCondition = resp.condition; - this.addToGroupForm.initFormFields(this.addToGroupCondition); - this.addDialogParams.visible = true; - this.selectId = id; //选中的那行数据的人员id - }) - } - - // 弹框取消、关闭 - @action onCancel = () => { - this.addDialogParams.visible = false; - } - - // 选择考勤组加入 - @action chooseGroup = (data) => { - this.groupId = data.groupId.value; - } - - //加入考勤组保存 - @action saveGroup = () => { - this.spinning = true - let params = { - ids: this.selectId, - groupId: this.groupId - } - this.addToGroupForm.validateForm().then(f => { - if (f.isValid) { - api.saveAddMember(params).then(resp => { - this.spinning = false; - if (resp.status == '1') { - message.success(i18n.message.saveSuccess()); - this.rowKey.length = 0; - this.addDialogParams.visible = false; - this.getGroupMemberList(this.radioParams); - - } - }) - } else { - f.showErrors(); - this.spinning = false; - } - }); - - } - - //点击加入考勤组 - @action addToGroup = () => { - const id = []; - this.selectedGroupRow.map(c => { - id.push(c.id) - }) - id.join(','); - this.getAddMemberCondition(id); - } - - // 范围条件切换 - @action radioChange = (data) => { - if (!data.viewScope) { - data.viewScope = '0' - } - this.radioParams = data; - if (data.viewScope == '0' && (data.groupType == '0' || data.groupType == '1') || data.subcompanyId || data.departmentId || data.resourceId || data.allLevel || data.viewScope == '4' || data.groupType == '2' && data.groupId && (data.viewScope == '0' || data.viewScope == '1' && data.subcompanyId || data.viewScope == '2' && data.departmentId || data.viewScope == '3' && data.resourceId)) { - this.getGroupMemberList({ - ...this.orderParams, - ...data, - pageSize: this.pageSize, - pageIndex: 1 - }) - } - - } - - // 获取分页参数 - @action getPagenitionParams = (pageIndex, pageSize) => { - this.pageIndex = pageIndex || 1; - this.pageSize = pageSize || this.pageSize; - const params = { - pageIndex: this.pageIndex, - pageSize: this.pageSize - } - this.getGroupMemberList({ - ...params, - ...this.radioParams, - ...this.orderParams - }) - } - - // 排序 - @action tableChange = (pagination, filters, sorter) => { - if (sorter.order && sorter.order != this.order || sorter.columnKey && sorter.columnKey != this.columnKey) { - this.order = sorter.order; - this.columnKey = sorter.columnKey; - let type = ''; - if (sorter.order == "descend") { - type = 'desc' - } - if (sorter.order == "ascend") { - type = 'asc' - } - this.orderParams = { - orderParams: JSON.stringify([{ - orderKey: sorter.columnKey, - orderType: type - }]) - } - this.getGroupMemberList({ - ...this.radioParams, - ...this.orderParams, - pageSize: this.pageSize, - pageIndex: this.pageIndex - }) - } else { - return; - } - } - - @action setRadioConfig = (data) => { - const b = !!this.config.length - b && this.config[0] && Object.assign(this.config[0].selectLinkageDatas[1].browserConditionParam.replaceDatas, [ - { - id: data.id, - name: data.name - } - ]) - - b && this.config[0] && this.config[0].options.map(c => { - if (c.key == '1') { - c.selected = true; - } else { - c.selected = false; - } - }) - } - - -} - -export const hrmGroupSetting = new HrmGroupSetting(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/holidayRule.js b/pc4backstage/hrmAttendance/stores/holidayRule.js deleted file mode 100644 index 02be371..0000000 --- a/pc4backstage/hrmAttendance/stores/holidayRule.js +++ /dev/null @@ -1,637 +0,0 @@ -import { - observable, - action, - computed -} from 'mobx'; -import { - WeaHelpfulTip, - WeaLocaleProvider, -} from 'ecCom'; -import { - message, -} from 'antd'; -import { - fetch, - msg, - validate, - rule, - confirmation, -} from '../util/save-time-util.js'; -import { - commonStore -} from './commonStore'; -import * as asyncFetch from '../apis/holidayRule'; -const getLabel = WeaLocaleProvider.getLabel; -class HrmHolidayRule { - //页面配置项 - pageConfig = { - asyncFetch: asyncFetch, - hasOrgTree: false, - isOrgTreeInfluenceForm: true, - tableAsyncName: 'getSearchList', - permissAsyncName: 'getHasRight', - menusAsyncName: 'getMenus', - searchAsyncName: 'getSearchCondition', - delAsyncName: 'deleteLeaveRules', - formAsyncName: 'getLeaveRulesForm', - secondFormAsyncName: 'getSyncSettingForm', - addAsyncName: 'addLeaveRules', - editAsyncName: 'editLeaveRules', - saveSecondFormAsyncName: 'saveSyncSetting', - editIdPropertyName: 'ruleId', - delIdPropertyName: 'ruleIds', - searchLinkageFieldName: 'leaveName', - }; - - @observable renderBlacklist = ['extendedDays', 'expirationDay', 'proportion']; - //表单配置项 - formConfig = { - staticTips: { - hoursToDay: ( -

- {`${getLabel('391',"小时")}=1${getLabel('1925',"天")}`} - -

- ), - proportion: ( -

- {`${getLabel('391',"小时")}=1${getLabel('1925',"天")}`} - -

- ) - }, - classNames: { - hoursToDay: 'hrm-holiday-rule-form-input', - proportion: 'hrm-holiday-rule-form-input', - expirationMonth: 'hrm-select-short' - }, - dynamicFields: [ - //【应用范围】联动配置项 - { - passiveKey: 'scopeValue', //分部 - activeKey: 'scopeType', //应用范围 - showValue: '1' - }, - //【最小请假单位】联动配置项 - { - passiveKey: 'hoursToDay', //日折算时长 - activeKey: 'minimumUnit', //最小请假单位 - showValue: '1,2,3,4' - }, - //【计算请假时长方式】联动配置项 - { - passiveKey: 'hoursToDay', //日折算时长 - activeKey: 'computingMode', //计算请假时长方式 - showValue: '2', - }, - //【启用假期余额】联动配置项 - { - passiveKey: 'distributionMode', //余额发放方式 - activeKey: 'balanceEnable', //启用假期余额 - showValue: '1' - }, { - passiveKey: 'validityRule', //有效期规则 - activeKey: 'balanceEnable', //启用假期余额 - showValue: '1' - }, { - passiveKey: 'extensionEnable', //允许延长有效期 - activeKey: 'balanceEnable', //启用假期余额 - showValue: '1' - }, { - passiveKey: 'extendedDays', //检查余额 - activeKey: 'balanceEnable', //启用假期余额 - showValue: '1' - }, { - passiveKey: 'releaseRule', //释放规则 - activeKey: 'balanceEnable', //启用假期余额 - showValue: '1' - }, - //【余额发放方式】联动配置项 - { - passiveKey: 'annualAmount', //每人发放小时数 - activeKey: 'distributionMode', //余额发放方式 - showValue: '4' - }, { - passiveKey: 'priority', //优先级别 - activeKey: 'distributionMode', //余额发放方式 - showValue: '6' - }, { - passiveKey: 'calcMethod', //计算方式 - activeKey: 'distributionMode', //余额发放方式 - showValue: '2,3,6' - }, - //【允许延长有效期】联动配置项 - { - passiveKey: 'extendedDays', //允许延长有效期 - activeKey: 'extensionEnable', //允许延长有效期 - showValue: '1' - }, - //【有效期规则】联动配置项 - { - passiveKey: 'expirationMonth', //失效日期 - activeKey: 'validityRule', //有效期规则 - showValue: '3' - }, { - passiveKey: 'extensionEnable', //允许延长有效期 - activeKey: 'validityRule', //有效期规则 - showValue: '1,2,3' - }, - //【释放规则】联动配置项 - { - passiveKey: 'unrestrictedScope', //不受限范围 - activeKey: 'releaseRule', //释放规则 - showValue: '1,2' - } - ], - } - //*************头部************** - topTitle = getLabel('505561', "假期规则"); - - //新建 - new = () => { - const params = { - title: getLabel(505562, '新建假期规则'), - type: 0, //0:代表新建 - }; - ['setSelectedRowIndex', 'openDialog'].map((f, i) => { - commonStore[f](i === 0 ? '-1' : params); - }); - - } - - save = () => { - fetch({ - asyncFetch, - name: 'saveDisableLeaveRules', - fetchParams: { - ruleIds: this.enableRowsId.toString() - }, - logic: (cb) => { - const { - sign - } = cb; - - message[sign === '1' ? 'success' : 'warning'](cb.message); - - this.enableRowsId = []; - - const { - table - } = commonStore, { - tableStore - } = table; - - const current = tableStore.current; - - commonStore.getSearchList(current); - } - }); - } - - //批量删除 - batchDelete = () => { - confirmation.showDelConfirm({ - type: 1, - logic: (type) => commonStore.delTableRows(type), - }); - } - - custom = () => { - const { - table - } = commonStore, { - tableStore - } = table; - - ['setColSetVisible', 'tableColSet'].map(f => { - tableStore[f](true); - }); - - } - - //获取交互元素(按钮元素和下拉菜单元素)的状态 - getMenusState = () => { - const { - tableStore - } = commonStore.table, { - loading, - selectedRowKeys - } = tableStore; - - //决定按钮是否可点击 - return [loading, loading, selectedRowKeys.length === 0]; - } - - //**************弹框**************** - //弹框的样式 - get style() { - const { - index - } = commonStore.table; - - if (['-1', '0'].includes(index)) { - return { - width: 700, - height: 600 - } - } else { - return { - width: 600, - height: 80 - } - } - } - - //获取余额发放规则的参数 - getConversionRulesParams = () => { - const { - form - } = commonStore.formElements, { - distributionMode - } = form.getFormParams(); - - if (!['2', '3', '6'].includes(distributionMode)) return {} - - const { - balanceConversionRules, - mixBalanceConversionRules - } = this.conversionRules; - - const dynamicFormParams = {}; - - if (distributionMode !== '6') { - balanceConversionRules.map((balanceConversionRule, index) => { - ['timePoint', 'amount'].map(v => { - Object.assign(dynamicFormParams, { - [`${v}_${index}`]: balanceConversionRule[v] - }); - }); - }); - } else { - mixBalanceConversionRules.map((mixBalanceConversionRule, index) => { - ['entryTime', 'workYear', 'legalAmount', 'welfareAmount'].map(v => { - Object.assign(dynamicFormParams, { - [`${v}_${index}`]: mixBalanceConversionRule[v] - }); - }); - }); - } - - Object.assign(dynamicFormParams, { - 'detailRuleLen': distributionMode !== '6' ? balanceConversionRules.length : mixBalanceConversionRules.length - }); - - return dynamicFormParams; - } - - //不检验隐藏的表单元素 - neglectHiddenField = () => { - //重置e9HideFormFieldKeys容器 - window.e9HideFormFieldKeys = []; - - const { - form - } = commonStore.formElements, { - validityRule, - scopeType, //应用范围 - scopeValue - } = form.getFormParams(); - - validityRule !== '3' && ['expirationDate'].map(key => { - window.e9HideFormFieldKeys.push(key); - }); - - scopeType === '0' && ['scopeValue'].map(key => { - window.e9HideFormFieldKeys.push(key); - }); - - if (this.renderBlacklist.find(key => key === 'proportion')) window.e9HideFormFieldKeys.push('proportion'); - } - - closeDialog = () => { - this.resetBalanceConversionRules(); - this.resetFields(); - } - - //**************表单*************** - @observable minimumUnit = []; //【最小请假单位】提示信息集合 - @observable distributionMode = []; //【余额发放方式】提示信息集合 - @observable calcMethod = []; //【计算方式】提示信息集合 - @observable isRepeat = true; //【假期名称】是否重复 - @observable isEnable = '0'; - - @computed get reverseCalcMethod() { - const clone = [...this.calcMethod]; - - if (clone.length === 0) return clone; - - let _clone = []; - - const first = clone.splice(0, 1); - - clone.forEach((c, i) => { - _clone.push(c); - - if (i === 1) { - _clone.push(first); - } - }); - - return _clone; - } - - - //获取表单元素提示信息 - @computed get dynamicTips() { - return { - minimumUnit: this.minimumUnit, - distributionMode: this.distributionMode, - calcMethod: this.reverseCalcMethod, - }; - } - - @action setAdditionalFormDatas = (datas) => { - if (!datas.minimumUnit) return - - const { - form - } = commonStore.formElements, { - distributionMode, - minimumUnit, - calcMethod, - } = form.getFormParams(); - - ['minimumUnit', 'distributionMode', 'calcMethod', 'isEnable'].map(v => { - this[v] = datas[v]; - }); - ['detailRule'].map(v => { - if (datas[v]) this.conversionRules[distributionMode !== '6' ? 'balanceConversionRules' : 'mixBalanceConversionRules'] = datas[v]; - }); - - this.tempValue = minimumUnit; - } - - @action handleMinimumUnitChange = (value) => { - const result = this.renderBlacklist.find(key => key === 'proportion'); - if (value === '3' || (['1', '2', '4'].includes(value) && this.tempValue === '3')) { - if (result) this.renderBlacklist.pop(); - } else { - if (!result) this.renderBlacklist.push('proportion'); - } - this.tempValue = value; - } - - //除了表单参数外,其他的参数 - getAdditionalParams = () => { - return this.getConversionRulesParams() - } - - isFieldRepeat = () => { - this.isVacationNameRepeat(); - } - - //假期名称是否重复 - isVacationNameRepeat = () => { - const { - formElements, - orgTree, - table, - } = commonStore, { - form - } = formElements, { - organizationType, - } = orgTree, { - id - } = table; - - const { - leaveName, - organizationId, - } = form.getFormParams(); - - fetch({ - asyncFetch: asyncFetch, - name: 'isNameRepeat', - fetchParams: { - leaveName, - organizationType, - ruleId: id, - organizationId: (organizationType === '0') ? '' : organizationId - }, - logic: (cb) => { - const { - isRepeat - } = cb; - - this.isRepeat = isRepeat; - - if (isRepeat) { - form.showError('leaveName', `${getLabel('388883',"假期名称")}${getLabel('18082',"重复")}`); - commonStore.forceUpdateForm(); - } else { - commonStore.saveFormDatas(); - } - } - }); - } - - isMainForm = () => { - const { - index - } = commonStore.table; - - return ['-1', '0'].includes(index) ? true : false; - } - - confirmBeforeSave = () => { - const { - formElements, - saveFormDatas, - forceUpdateForm, - } = commonStore, { - form - } = formElements; - - this.neglectHiddenField(); - - form.validateForm().then(f => { - if (f.isValid) { - confirmation.showSaveConfirm({ - content: getLabel('390326', "假期规则改动后需重新设置假期余额,确认保存?"), - logic: saveFormDatas, - }) - } else { - f.showErrors(); - forceUpdateForm(); - } - }) - - } - - //**************余额发放方式**************** - @observable conversionRules = { - timeInterval: 1, //时间区间 - balanceConversionRules: [{ - timePoint: 1, - amount: 0, - }, { - timePoint: 1, - amount: 5, - }], - mixBalanceConversionRules: [{ - entryTime: 0, - workYear: 0, - legalAmount: 0, - welfareAmount: 0 - }] - } - - //改变余额换算规则 - @action changeBalanceConversionRules = (index, value) => { - this.conversionRules.balanceConversionRules[index].amount = value ? value : 0; - } - - @action changeEntryTime = (index, value) => { - this.conversionRules.mixBalanceConversionRules[index].entryTime = value ? value : 0; - } - - @action changeWorkYear = (index, value) => { - this.conversionRules.mixBalanceConversionRules[index].workYear = value ? value : 0; - } - - @action changeLegalAmount = (index, value) => { - this.conversionRules.mixBalanceConversionRules[index].legalAmount = value ? value : 0; - } - - @action changeWelfareAmount = (index, value) => { - this.conversionRules.mixBalanceConversionRules[index].welfareAmount = value ? value : 0; - } - - @action delBalanceConversionRule = (params) => { - const type = params ? params.type : ''; - - this.conversionRules[type === 'mix' ? 'mixBalanceConversionRules' : 'balanceConversionRules'].pop(); - } - - //设置余额换算规则 - @action setBalanceConversionRule = (balanceConversionRules) => { - this.conversionRules.balanceConversionRules = balanceConversionRules; - } - - @action setMixBalanceConversionRule = (mixBalanceConversionRules) => { - this.conversionRules.mixBalanceConversionRules = mixBalanceConversionRules; - } - - //设置时间间隔区间 - @action setTimeInterval = (value) => { - const showValue = value ? value : 1; - - this.conversionRules.timeInterval = showValue; - } - - //添加余额换算规则 - @action addBalanceConversionRule = (params) => { - const type = params ? params.type : ''; - - if (type === 'mix') { - const { - mixBalanceConversionRules, - } = this.conversionRules; - - const config = { - fields: [], //需要校验的域 - intervals: { - 'entryTime': 1, - 'workYear': 1, - 'legalAmount': 1, - 'welfareAmount': 1 - }, //时间间隔 - datas: mixBalanceConversionRules, - } - - const result = rule.add(config); - - this.conversionRules.mixBalanceConversionRules = result - } else { - const { - balanceConversionRules, - timeInterval, - } = this.conversionRules; - - const config = { - fields: ['amount'], - intervals: { - 'timePoint': timeInterval - }, - datas: balanceConversionRules, - msgs: [getLabel('505566', "年假")], - } - - const result = rule.add(config); - - this.conversionRules.balanceConversionRules = result - } - } - - @action resetBalanceConversionRules = () => { - //初始化换算条件 - this.setBalanceConversionRule([{ - timePoint: 1, - amount: 0, - }, { - timePoint: 1, - amount: 5, - }]); - - this.setMixBalanceConversionRule([{ - entryTime: 0, - workYear: 0, - legalAmount: 0, - welfareAmount: 0 - }]); - //重置时间间隔 - ['timeInterval'].map(interval => { - this.conversionRules[interval] = 1; - }); - } - - @action resetFields = () => { - this.isRepeat = true; - - if (!this.renderBlacklist.find(key => key === 'proportion')) this.renderBlacklist.push('proportion'); - - commonStore.setSelectedRowId(''); - } - - //**************列表**************** - enableRowsId = []; - - @action handleCkChange = (val, id) => { - if (val === '1') { - this.enableRowsId.push(id) - } else { - const targetIndex = this.enableRowsId.findIndex(_id => _id === id); - if (targetIndex > -1) this.enableRowsId.splice(targetIndex, 1); - } - } - - @action collectCheckedId = (id) => { - const result = this.enableRowsId.find(_id => _id === id); - if (!result) this.enableRowsId.push(id); - } - - @action refreshPage = () => {} - -} - -const hrmHolidayRule = new HrmHolidayRule(); - -export { - hrmHolidayRule -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/holidaySettingNew.js b/pc4backstage/hrmAttendance/stores/holidaySettingNew.js deleted file mode 100644 index ed2ddd7..0000000 --- a/pc4backstage/hrmAttendance/stores/holidaySettingNew.js +++ /dev/null @@ -1,960 +0,0 @@ -import { - toJS, - action, - reaction, - computed, - observable, -} from 'mobx'; -import { - WeaForm, - WeaTableNew, -} from 'comsMobx'; -import { - WeaDropdown, - WeaLocaleProvider, -} from 'ecCom'; -import { - Button, - message, -} from 'antd'; -import { - hrmImportCommon -} from './importCommon'; -import { - fetch, - confirmation, - getTopButtons, - getDropMenuDatas, - getDialogButtons, - getMenusCreationConfig, -} from '../util/save-time-util.js'; -import * as asyncFetch from '../apis/holidaySetting'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; -const { - ButtonSelect -} = WeaDropdown; - - -class HrmHolidySettingNew { - //************权限************* - @observable pageAccessPermission = { - hasRight: false, - loading: true, - } - - @action getPermissionInfo = () => { - fetch({ - asyncFetch, - name: 'getHasRight', - logic: (cb) => { - const { - hasRight - } = cb; - - if (hasRight) { - this.pageAccessPermission.hasRight = true; - - this.attendanceId && this.handleOrgTreeNodeClick({ - id: this.attendanceId - }); - } - this.pageAccessPermission.loading = false; - } - }); - } - - //*************头部************** - topProps = { - showDropIcon: true, - iconBgcolor: '#217346', - icon: , - } - - @observable btnMenu = []; - - @observable buttonSelect = []; - - @computed get toploading () { - if (this.tab.selectedKey === '0') { - return this.year.loading; - } else { - return this.table.comsWeaTableStore.loading; - } - } - - @computed get menusCreationConfig () { - return getMenusCreationConfig(this.btnMenu); - } - - @computed get topButtons () { - const { - topMenu - } = this.menusCreationConfig; - - const topButtons = getTopButtons.call(this, { - datas: topMenu, - disabled: this.menuState, - }); - - if (this.tab.selectedKey === '1' && this.buttonSelect.length > 0) { - const { - selectedRowKeys - } = this.table.comsWeaTableStore; - - topButtons.push( this.btnOnClick(key)} - menuOnClick={key => this.menuOnClick(key)} - />) - } - - return topButtons; - } - - btnOnClick = (key) => { - if (key === '0') { - confirmation.showDelConfirm({ - type: 1, - logic: (type) => this.delHoildaySettingDatas(type), - }) - } else { - this.setDialogType('4'); - this.openDialog(); - } - } - - menuOnClick = (key) => { - - } - - @computed get dropMenuDatas () { - const { - rightMenu - } = this.menusCreationConfig; - - return getDropMenuDatas.call(this, { - datas: rightMenu, - disabled: this.menuState, - }); - } - - @computed get menuState () { - if (this.tab.selectedKey === '0') { - const { - loading - } = this.year; - - return [loading, loading, loading]; - - } else { - const { - loading - } = this.table.comsWeaTableStore; - - return [loading, loading]; - } - } - - @computed get rightMenuAsyncFetchParams () { - const params = { - groupId: this.groupId - }; - if (this.tab.selectedKey === '1') { - Object.assign(params, { - isList: true - }); - } - return params; - } - - @action getRightMenu = () => { - fetch({ - asyncFetch, - name: 'getMenus', - fetchParams: this.rightMenuAsyncFetchParams, - logic: (cb) => { - const { - btnMenu, - buttonSelect = [] - } = cb; - - this.btnMenu = btnMenu; - this.buttonSelect = buttonSelect; - } - }); - } - - rightMenuDisposer = reaction(() => this.rightMenuAsyncFetchParams, rightMenuAsyncFetchParams => { - this.getRightMenu(); - }) - - new = () => { - this.setDialogType('0'); - this.openDialog(); - } - - import = () => { - const params = [getLabel('129833', '导入模板'), getLabel('505581', "节假日导入"), 'holidaySet', true]; - - const funcs = ['setTempletName', 'setImportDialogTitle', 'setImportType', 'setImportDialogVisible']; - - funcs.map((func, index) => { - hrmImportCommon[func](params[index]); - }) - } - - custom = () => { - const { - comsWeaTableStore - } = this.table; - - comsWeaTableStore.setColSetVisible(true); - comsWeaTableStore.tableColSet(true); - } - - log = (id, source) => { - const params = { - logSmallType: '3056', - }; - if (source === 'table') { - Object.assign(params, { - targetId: id, - }); - } - window.setLogViewProps(params); - } - - init = () => { - this.year.loading = true; - - fetch({ - asyncFetch, - name: 'initHolidaySet', - fetchParams: this.countAsyncFetchParams, - logic: (cb) => { - const { - status - } = cb; - - if (status === '1') { - message.success(cb.message); - this.refreshContent(); - } else { - message.warning(cb.message); - } - - this.year.loading = false; - } - }); - } - - //**************组织树****************** - get treeProps () { - return ({ - title: getLabel(505582, '考勤组'), - rightStr: 'KQHolidaySetAdd:Add', - dataUrl: '/api/hrm/kq/group/getGroupTree', - handleOrgTreeNodeClick: (params) => this.handleOrgTreeNodeClick(params) - } - ) - } - - @observable groupId = '0'; - - @observable tree = { - triggerRefresh: false, - } - - @action handleOrgTreeNodeClick = (params) => { - const { - id - } = params; - - this.groupId = id; - } - - @action triggerRefresh = () => { - this.tree.triggerRefresh = !this.tree.triggerRefresh; - } - - @computed get hasRightLayout () { - return this.groupId !== '0' ? true : false; - } - - //**************无数据图标****************** - - get noDataProps () { - return { - className: 'icon-coms-blank', - tip: getLabel('505583', "请先选择左侧考勤组") - } - } - - //**************标签页****************** - get tabProps () { - return { - datas: [{ - key: '0', - title: getLabel('490', "日历") - }, { - key: '1', - title: getLabel('491', "清单") - }] - } - } - - @observable tab = { - selectedKey: '0' - } - - @action handleTabClick = (key) => { - this.tab.selectedKey = key; - } - - tabDisposer = reaction(() => this.tab.selectedKey, selectedKey => { - if (this.groupId === '0') return; - - this.refreshContent(); - }) - - //**************日期选择器****************** - datePickerProps = { - arrow: true, - type: 'year', - onChange: (value) => this.handleDatePickerChange(value) - } - - @observable datePicker = { - value: new Date() - } - - @observable fullYear = ''; - - @action handleDatePickerChange = (value) => { - this.fullYear = value.year ? value.year() : value.getFullYear(); - this.datePicker.value = value; - this.year.value = value; - } - - //**************总计****************** - colorIconProps = { - pixel: 10, - shape: 'square', - } - - get helpfulTipProps () { - return { - width: 150, - style: { - marginLeft: 10 - }, - title: getLabel('390077', "点击图标可以过滤数据!") - } - } - - @observable summary = { - annotations: [], - iconStates: [1, 1, 1], - } - - @action handleIconClick = (value, index) => { - this.summary.iconStates[index] = value; - } - - @computed get hasHelpfulTip () { - return (this.summary.annotations.length > 0) ? true : false - } - - @computed get countAsyncFetchParams () { - const params = { - groupId: this.groupId, - currentYear: this.fullYear ? this.fullYear : new Date().getFullYear(), - }; - - return params; - } - - @computed get hoildayType () { - let checked = []; - - this.summary.iconStates.map((val, index) => { - if (val !== 0) checked.push(index + 1); - }); - - return { - changeType: checked.toString() - } - } - - @action getHolidayCount = () => { - fetch({ - asyncFetch, - name: 'getHolidayCount', - fetchParams: this.countAsyncFetchParams, - logic: (cb) => { - const { - type, - } = cb; - - this.summary.annotations = type; - } - }); - } - - countDisposer = reaction(() => this.countAsyncFetchParams, countAsyncFetchParams => { - const { - groupId - } = countAsyncFetchParams; - - if (groupId !== '0' && this.tab.selectedKey === '0') { - this.getHolidayCount(); - } - }); - - //**************搜索框****************** - inputSearchProps = { - style: { - float: 'right', - margin: 10 - }, - onSearch: (val) => this.handleInputSearch(val) - } - - @observable inputSearch = { - value: '', - } - - @action handleInputSearch = (value) => { - this.inputSearch.value = value; - } - - inputSearchDisposer = reaction(() => this.tab.selectedKey, selectedKey => { - if (selectedKey === '0') { - this.inputSearch.value = ''; - } - }) - - //**************年视图****************** - yearProps = { - onDateSelect: (date) => this.handleDateSelect(date) - } - - @observable calendar = []; - - @observable _year = ''; - - @observable month = ''; - - @observable day = ''; - - @observable year = { - loading: false, - value: new Date(), - date: new Date(), - } - - @action handleDateSelect = (date) => { - this._year = date.getYear(); - this.month = date.getMonth() + 1; - this.day = date.getDayOfMonth(); - - if (this.isHoliday) { - this.setDialogType('2'); - } else { - this.setDialogType('1'); - } - - this.openDialog(); - } - - @computed get isHoliday () { - if (this.month && this.day) { - const { - changeType, - } = this.calendar[this.month - 1][this.day - 1]; - - return changeType ? true : false; - } else { - return false - } - } - - @computed get dateSelectId () { - const { - changeType, - id, - } = this.calendar[this.month - 1][this.day - 1]; - - if (changeType) return id; - } - - @computed get formatDate () { - let month, day; - if (this.month < 10) { - month = `0${this.month}`; - } else { - month = this.month; - } - if (this.day < 10) { - day = `0${this.day}`; - } else { - day = this.day; - } - return `${this._year}-${month}-${day}`; - } - - @computed get isyearloaded () { - return this.calendar.length > 0 ? true : false; - } - - @computed get calendarAsyncFetchParams () { - const params = { - ...this.countAsyncFetchParams, - ...this.hoildayType - }; - - return params; - } - - @action getHolidaySetCalendar () { - this.year.loading = true; - - fetch({ - asyncFetch, - name: 'getHolidaySetCalendar', - fetchParams: this.calendarAsyncFetchParams, - logic: (cb) => { - const { - data, - } = cb; - - this.calendar = data; - this.year.loading = false; - this.year.date = new Date(); - } - }); - } - - yearDisposer = reaction(() => this.calendarAsyncFetchParams, calendarAsyncFetchParams => { - const { - groupId - } = calendarAsyncFetchParams; - - if (groupId !== '0' && this.tab.selectedKey === '0') { - this.getHolidaySetCalendar(); - } - }); - - //***************列表***************** - tableProps = { - hasOrder: true, - needScroll: true, - onOperatesClick: (record, rowIndex, operate) => this.handleOperatesClick(record, rowIndex, operate) - } - - @observable table = { - comsWeaTableStore: new TableStore() - } - - @action handleOperatesClick = (record, rowIndex, operate) => { - const { - randomFieldId - } = record, { - index - } = operate; - - this.setOperatedRowId(randomFieldId); - - if (index === '0') { - this.setDialogType('2'); - this.openDialog(); - } - - if (index === '1') { - confirmation.showDelConfirm({ - type: 0, - logic: (type) => this.delHoildaySettingDatas(type), - }); - } - - if (index === '2') { - this.log(randomFieldId, 'table'); - } - - if (index === '3') { - this.setDialogType('3'); - this.openDialog(); - } - } - - @computed get tableAsyncFetchParams () { - const params = { - ...this.countAsyncFetchParams, - holidayDesc: this.inputSearch.value, - }; - - return params - } - - @action getSearchList = () => { - fetch({ - asyncFetch, - name: 'getSearchList', - fetchParams: this.tableAsyncFetchParams, - logic: (cb) => { - const { - sessionkey - } = cb; - - this.table.comsWeaTableStore.getDatas(sessionkey, 1) - } - }); - } - - getDelFetchParams = (type) => { - let params; - if (type === 0) { - params = { - ids: (this.tab.selectedKey === '0') ? this.dateSelectId : this.operatedRowId - }; - } else { - params = { - ids: this.table.comsWeaTableStore.selectedRowKeys.toString() - } - } - - return params; - } - - delHoildaySettingDatas = (type) => { - fetch({ - asyncFetch, - name: 'deleteHolidaySet', - fetchParams: this.getDelFetchParams(type), - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - this.dialog.visible && this.closeDialog(); - this.refreshContent(); - } else { - message.warning(cb.message); - } - } - }); - } - - tableDisposer = reaction(() => this.tableAsyncFetchParams, tableAsyncFetchParams => { - const { - groupId - } = tableAsyncFetchParams; - - if (groupId !== '0' && this.tab.selectedKey === '1') { - this.getSearchList(); - } - }); - - setOperatedRowId = (id) => { - this.operatedRowId = id; - } - - //**************弹框**************** - dialogProps = { - icon: 'icon-coms-hrm', - iconBgcolor: '#217346', - hasScroll: true, - style: { - width: 600, - height: 340 - }, - onCancel: () => this.closeDialog() - } - - @observable dialogType = ''; - - @observable dialog = { - visible: false, - } - - @action openDialog = () => { - this.dialog.visible = true; - } - - @action closeDialog = () => { - this.dialog.visible = false; - } - - @action setDialogType = (type) => { - this.dialogType = type; - } - - @computed get dialogTitle () { - let title; - - if (['0', '1'].includes(this.dialogType)) { - title = getLabel('385333', "新建工作日期调整"); - } - if (this.dialogType === '2') { - title = getLabel('385334', "编辑工作日期调整") - } - if (['3', '4'].includes(this.dialogType)) { - title = getLabel('505585', "同步考勤组"); - } - - return title; - } - - @computed get dialogButtons () { - const { - loading - } = this.formElements; - - const datas = [{ - name: getLabel('505564', '保存'), - disabled: loading, - onBtnClick: this.saveFormInfo - }]; - - if (this.tab.selectedKey === '0' && this.dialogType === '2') { - datas.push({ - name: getLabel('131966', '删除'), - disabled: loading, - onBtnClick: () => confirmation.showDelConfirm({ - type: 0, - logic: (type) => this.delHoildaySettingDatas(type), - }) - }) - } - - const buttons = getDialogButtons({ - datas - }); - - return buttons; - } - - //**************表单**************** - formConfig = { - dynamicFields: [{ - passiveKey: 'relatedDay', //对应工作日 - activeKey: 'changeType', //类型 - showValue: '2' - }, { - passiveKey: 'syncGroupIds', //考勤组 - activeKey: 'isSync', //类型 - showValue: '1' - }] - } - - @observable formElements = { - conditions: [], - form: new WeaForm(), - loading: false, - date: new Date(), - } - - @computed get formAsyncFetchName () { - let name; - if (['3', '4'].includes(this.dialogType)) { - name = 'getSyncForm'; - } else { - name = 'getHolidaySetForm'; - } - - return name; - } - - @computed get formAsyncFetchParams () { - let params; - if (['0', '1'].includes(this.dialogType)) { - params = { - groupId: this.groupId, - holidayDate: (this.dialogType === '1') ? this.formatDate : '', - } - } - if (this.dialogType === '2') { - params = { - groupId: this.groupId, - id: (this.tab.selectedKey === '0') ? this.dateSelectId : this.operatedRowId, - } - } - - return params; - } - - @action getFormInfo = () => { - this.formElements.loading = true; - - fetch({ - asyncFetch, - name: this.formAsyncFetchName, - fetchParams: this.formAsyncFetchParams, - logic: (cb) => { - const { - condition - } = cb; - - this.formElements.loading = false; - this.formElements.conditions = condition - this.formElements.form.initFormFields(condition) - } - }); - } - - @computed get saveAsyncFetchName () { - let name; - if (['0', '1'].includes(this.dialogType)) { - name = 'addHolidaySet'; - } - if (this.dialogType === '2') { - name = 'editHolidaySet'; - } - if (['3', '4'].includes(this.dialogType)) { - name = 'syncHolidaySet'; - } - - return name; - - } - - @computed get saveAsyncFetchParams () { - const params = { - ...this.formElements.form.getFormParams() - } - if (this.dialogType === '2') { - Object.assign(params, { - id: (this.tab.selectedKey === '0') ? this.dateSelectId : this.operatedRowId - }); - } - if (['3', '4'].includes(this.dialogType)) { - const { - selectedRowKeys - } = this.table.comsWeaTableStore; - - Object.assign(params, { - ids: (this.dialogType === '3') ? this.operatedRowId : selectedRowKeys.toString() - }); - } - - return params; - } - - saveFormInfo = () => { - const { - form - } = this.formElements; - - this.ignoreFields(); - - form.validateForm().then(f => { - if (f.isValid) { - this.formElements.loading = true; - - fetch({ - asyncFetch, - name: this.saveAsyncFetchName, - fetchParams: this.saveAsyncFetchParams, - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - this.closeDialog(); - this.refreshContent(); - } else { - message.warning(cb.message); - } - - this.formElements.loading = false; - } - }); - } else { - f.showErrors(); - this.formElements.date = new Date(); - } - }); - } - - ignoreFields = () => { - window.e9HideFormFieldKeys = []; - - const { - form - } = this.formElements, { - isSync, - } = form.getFormParams(); - - (!['3', '4'].includes(this.dialogType) && isSync !== '1') && ['syncGroupIds'].map(key => { - window.e9HideFormFieldKeys.push(key); - }); - } - - refreshContent = () => { - if (this.tab.selectedKey === '0') { - ['getHolidayCount', 'getHolidaySetCalendar'].map(func => { - this[func](); - }); - } else { - this.getSearchList(); - } - } - - @action resetFormInfo = () => { - this.formElements.conditions = []; - this.formElements.form = new WeaForm(); - } - - @computed get hasDialogContentLoaded () { - const { - form - } = this.formElements; - - return form.isFormInit ? true : false - } - - formDisposer = reaction(() => this.dialog.visible, visible => { - if (visible) { - this.getFormInfo(); - } else { - this.resetFormInfo(); - } - }); - - //**************其他**************** - setAttendanceId = (params) => { - const { - id - } = params; - - this.attendanceId = id; - } - - refresh = () => { - this.reset(); - this.triggerRefresh(); - } - - reset = () => { - this.groupId = '0'; - this.tab.selectedKey = '0'; - this.datePicker.value = new Date(); - this.fullYear = ''; - this.summary.iconStates = [1, 1, 1]; - } - -} - -const hrmHolidySettingNew = new HrmHolidySettingNew() - -export { - hrmHolidySettingNew -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/holidayType.js b/pc4backstage/hrmAttendance/stores/holidayType.js deleted file mode 100644 index d91a433..0000000 --- a/pc4backstage/hrmAttendance/stores/holidayType.js +++ /dev/null @@ -1,566 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaHelpfulTip, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaForm, - WeaTableNew -} from 'comsMobx'; -import { - message, - Button, - Modal, -} from 'antd'; -import * as api from '../apis/holidayType'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; -const confirm = Modal.confirm; - -class HrmHolidayType { - @observable permission = { - hasRight: false, - loading: true, - } - - getPermissionInfo = () => { - api.getHasRight().then(cb => { - const { - hasRight - } = cb; - - this.permission.hasRight = hasRight; - this.permission.loading = false; - }).catch(error => {}); - } - - TOP = { - showDropIcon: true, - iconBgcolor: '#217346', - icon: , - title: getLabel(505572, "假期类型"), - } - - @observable top = { - loading: false, - } - - @observable tConf = []; - @observable rConf = []; - - @action getRightMenu = () => { - api.getRightMenu().then(data => { - const { - btnMenu - } = data; - - const { - tConf, - rConf - } = this.filter(btnMenu); - - this.tConf = tConf; - this.rConf = rConf; - }, error => {}) - } - - filter = (datas) => { - let tConf, rConf; - tConf = datas.filter(item => { - var bool = false; - ['isTop', 'isBatch'].forEach(prop => { - const b = parseInt(item[prop]); - if (b) { - bool = true - } - }); - - return bool - }) - - rConf = datas; - - return { - tConf, - rConf - } - } - - @computed get topButtons() { - return this.tConf.map((item, index) => { - const { - menuFun, - menuName - } = item; - - return ( - - ) - }); - } - - @computed get dropMenuDatas() { - return this.rConf.map((item, index) => { - const { - menuFun, - menuName, - menuIcon - } = item; - - return { - key: index.toString(), - disabled: this.menuStatus[index], - icon: , - content: menuName, - onClick: () => this[menuFun]() - } - }); - } - - get menuStatus() { - const { - comsWeaTableStore - } = this.table, { - loading, - selectedRowKeys - } = comsWeaTableStore; - - return [loading, loading, selectedRowKeys.length === 0]; - } - - new = () => { - this.dialog.title = getLabel(505573, '新建假期类型'); - this.dialogType = '1'; - this.dialog.visible = true; - this.getLeaveTypesForm(); - } - - save = () => { - api.saveDisableLeaveRules({ - typeIds: this.checkedIds.toString() - }).then(data => { - const { - sign - } = data; - - if (sign === '1') { - message.success(data.message); - this.getSearchList(); - } else { - message.warning(data.message); - } - }, error => {}) - } - - log = (id, source) => { - const params = { - logSmallType: '3059', - }; - if (source === 'table') { - Object.assign(params, { - targetId: id, - }); - } - window.setLogViewProps(params); - } - - @action getLeaveTypesForm = (id) => { - this.dialog.loading = true; - - let params; - if (id !== undefined) { - params = { - typeId: id, - } - } - api.getLeaveTypesForm(params).then(data => { - const { - condition, - minimumUnit, - isEnable, - } = data; - - this.dialog.form = new WeaForm(); - this.dialog.conditions = condition; - this.dialog.form.initFormFields(condition); - this.dialog.loading = false; - this.dialog.minimumUnit = minimumUnit; - this.isEnable = isEnable; - - if (id !== undefined) { - this.dialog.title = isEnable ? getLabel(505574, '编辑假期类型') : getLabel(505575, '查看假期类型'); - } - - this.lastSelectedHolidayUnit = this.dialog.form.getFormParams().minimumUnit; - }, error => {}) - } - - @computed get dynamicTips() { - return { - minimumUnit: this.dialog.minimumUnit, - }; - } - - @observable renderBlacklist = ['proportion']; - - lastSelectedHolidayUnit = ''; //上一次选中的请假单位 - - @action onHolidayUnitChange = (value) => { - const last = this.lastSelectedHolidayUnit; - - const index = this.renderBlacklist.findIndex(key => key === 'proportion'); - - if (value === '3' || (['1', '2', '4'].includes(value) && last === '3')) { - if (index > -1) this.renderBlacklist.splice(index, 1); - } else { - if (index === -1) { - this.renderBlacklist.push('proportion'); - this.dialog.form.updateFields({ - proportion: { - value: 8 - } - }); - } - } - - this.lastSelectedHolidayUnit = value; - } - - saveDialogForm = () => { - const { - form - } = this.dialog, { - scopeType - } = form.getFormParams(); - - window.e9HideFormFieldKeys = []; - - scopeType === '0' && ['scopeValue'].map(key => { - window.e9HideFormFieldKeys.push(key); - }); - - const params = form.getFormParams(); - - let func; - if (this.dialogType === '2') { - Object.assign(params, { - typeId: this.typeId - }); - func = 'editLeaveTypes'; - } else { - func = 'addLeaveTypes'; - } - - form.validateForm().then(f => { - if (f.isValid) { - api[func](params).then(data => { - const { - sign - } = data; - - if (sign === '1') { - message.success(data.message); - this.closeDialog(); - this.getSearchList(); - } else { - message.warning(data.message); - } - }, error => {}) - } else { - f.showErrors(); - this.dialog.date = new Date(); - } - }) - } - - batchDelete = () => { - let _this = this; - confirm({ - title: getLabel('131329', '信息确认'), - content: getLabel('385625', '确定要删除选择的记录吗?'), - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - const { - comsWeaTableStore - } = _this.table, { - selectedRowKeys - } = comsWeaTableStore; - - api.deleteLeaveTypes({ - typeIds: selectedRowKeys.toString() - }).then(data => { - const { - sign - } = data; - - if (sign === '1') { - message.success(data.message); - _this.getSearchList(); - } else { - message.warning(data.message); - } - }); - }, - onCancel() { - return false; - }, - }); - } - - custom = () => { - const { - comsWeaTableStore - } = this.table; - - comsWeaTableStore.setColSetVisible(true); - comsWeaTableStore.tableColSet(true); - } - - TABLE = { - hasOrder: true, - needScroll: true, - } - - dialogType = '1'; - - typeId = ''; - - checkedIds = []; - - @observable isEnable = true; //当前假期类型是否启用 - - @observable table = { - comsWeaTableStore: new TableStore(), - } - - @action getSearchList = () => { - api.getSearchList({ - ...this.tab.form.getFormParams() - }).then(data => { - const { - sessionkey - } = data; - this.table.comsWeaTableStore = new TableStore(); - this.table.comsWeaTableStore.getDatas(sessionkey, 1); - }, error => {}) - } - - @action onTableTdClick = (id) => { - this.dialog.title = getLabel(505574, '编辑假期类型'); - this.dialogType = '2'; - this.typeId = id; - this.dialog.visible = true; - this.getLeaveTypesForm(id); - } - - del = (id) => { - let _this = this; - confirm({ - title: getLabel('131329', '信息确认'), - content: getLabel('83877', '确定要删除吗?'), - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - api.deleteLeaveTypes({ - typeIds: id - }).then(data => { - const { - sign - } = data; - - if (sign === '1') { - message.success(data.message); - _this.getSearchList(); - } else { - message.warning(data.message); - } - }); - }, - onCancel() { - return false; - }, - }); - } - - collectChecked = (id) => { - if (!this.checkedIds.includes(id)) { - this.checkedIds.push(id); - } - } - - onCheckBoxChange = (val, id) => { - if (val === '1') { - if (!this.checkedIds.includes(id)) { - this.checkedIds.push(id); - } - } else { - if (this.checkedIds.includes(id)) { - const index = this.checkedIds.findIndex(ckId => ckId === id); - this.checkedIds.splice(index, 1); - } - } - } - - DIALOG = { - hasScroll: true, - icon: 'icon-coms-hrm', - iconBgcolor: '#217346', - onCancel: () => this.closeDialog(), - style: { - width: 700, - height: 350 - }, - moreBtn: { - datas: [] - }, - } - - @computed get dialogButtons() { - const btns = []; - if (this.isEnable) { - btns.push(); - } - return btns; - } - - @observable dialog = { - visible: false, - loading: false, - conditions: [], - form: new WeaForm(), - date: new Date(), - minimumUnit: [], - title: '', - } - - @action closeDialog = () => { - this.dialog.visible = false; - this.renderBlacklist = ['proportion']; - } - - FORMCONFIG = { - dynamicFields: [{ - passiveKey: 'scopeValue', //分部 - activeKey: 'scopeType', //流程可见范围 - showValue: '1' - }, { - passiveKey: 'hoursToDay', //日折算时长 - activeKey: 'computingMode', //计算请假时长方式 - showValue: '2', - }, { - passiveKey: 'hoursToDay', //日折算时长 - activeKey: 'minimumUnit', //最小请假单位 - showValue: '1,2,3,4' - }], - staticTips: { - hoursToDay: ( -

- {`${getLabel('391',"小时")}=1${getLabel('505553',"天")}`} - -

- ), - proportion: ( -

- {`${getLabel('391',"小时")}=1${getLabel('505553',"天")}`} - -

- ) - }, - classNames: { - hoursToDay: 'hrm-holiday-rule-form-input', - proportion: 'hrm-holiday-rule-form-input', - }, - } - - buttonsAds = [getLabel(82529, '搜索'), getLabel(27088, '重置'), getLabel(32694, '取消')]; - - TAB = { - advanceHeight: 170, - hasMask: false, - searchType: ['base', 'advanced'], - setShowSearchAd: bool => this.setShowSearchAd(bool), - onSearch: () => this.onSearch(), - onSearchChange: val => this.onSearchChange(val), - buttonsAd: this.buttonsAds.map((name, index) => { - const type = (index === 0) && "primary"; - let callback; - if (index === 0) { - callback = () => this.onSearch(); - } else if (index === 1) { - callback = () => this.tab.form.resetConditionValue(); - } else { - callback = this.setShowSearchAd - } - return - }) - } - - @observable tab = { - showSearchAd: false, - form: new WeaForm() - } - - @computed get searchsBaseValue() { - const { - form - } = this.tab; - return form.getFormParams().leaveName; - } - - @action setShowSearchAd = (bool) => { - this.tab.showSearchAd = bool; - } - - onSearch = () => { - this.getSearchList(); - this.setShowSearchAd(false); - } - - onSearchChange = (val) => { - const { - form - } = this.tab; - - form.updateFields({ - leaveName: { - value: val - } - }); - - } - - @action getSearchForm = () => { - api.getSearchCondition().then(data => { - const { - condition - } = data; - - this.tab.form = new WeaForm(); - this.tab.form.setCondition(condition); - this.getSearchList(); - }, error => {}) - } - - -} - -export const hrmHolidayType = new HrmHolidayType(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/importCommon.js b/pc4backstage/hrmAttendance/stores/importCommon.js deleted file mode 100644 index 85984f2..0000000 --- a/pc4backstage/hrmAttendance/stores/importCommon.js +++ /dev/null @@ -1,440 +0,0 @@ -import * as asyncFetch from '../apis/importresource'; -import { - observable, - action, - extendObservable -} from 'mobx'; -import { - WeaForm, - WeaTableNew -} from 'comsMobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - message -} from 'antd'; -import { - hrmHolidySettingNew -} from './holidaySettingNew'; -import { - hrmVacationBalance -} from './vacationBalance'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; - -class HrmImportCommon { - @observable importType = ''; - @observable importDialog = { - visible: false, - condition: [], - title: '', - loading: true, - templetName: '', - selectedValue: 'workcode', - } - - @observable resultDialog = { - title: observable.ref(getLabel(82341, '导入结果')), - errorTip: observable.ref(getLabel(529729, '导入文件存在以下错误,请解决后重新上传!')), - visible: false, - index: 1, - datas: [], - importStatus: '', - pId: '', - interval: '', - tableStore: new TableStore(), - errorInfo: [], - succnum: 0, - failnum: 0, - loading: true, - component: '', - } - - @observable recordDialog = { - title: observable.ref(getLabel(24644, '历史导入记录')), - visible: false, - tableStore: new TableStore(), - } - - @observable logDialog = { - title: observable.ref(getLabel(24835, '导入日志')), - visible: false, - tableStore: new TableStore(), - isPanelShow: false, - form: new WeaForm(), - condition: [], - loading: true, - } - - @action - getImportForm = () => { - this.importDialog.loading = true; - let params = { - importType: this.importType - } - if (this.importDialog.formAsyncParams) { - Object.assign(params, { - ...this.importDialog.formAsyncParams - }); - } - asyncFetch.getImportForm(params).then(rs => { - const { - status, - condition = [], - } = rs; - - if (status == '1') { - this.importDialog.condition = condition; - this.importDialog.loading = false; - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - getImportProcessInfo = () => { - let params = { - importType: this.importType, - index: this.resultDialog.index, - }; - asyncFetch.getImportProcessLog(params).then(rs => { - const { - datas, - index, - pId = '', - status - } = rs; - - this.resultDialog.loading = false; - if (status == '1') { - const { - importStatus, - interval, - errorInfo, - component - } = this.resultDialog; - - component.scrollToLast(); - - if (importStatus == 'over' || importStatus == 'error') { - clearInterval(interval); - if (!this.hasErrorInfo(errorInfo)) { - this.getResultInfo(); - - switch (this.importType) { - case 'holidaySet': - hrmHolidySettingNew.refreshContent(); - break; - case 'balanceOfLeave': - hrmVacationBalance.resetTableEditableDatas(); - hrmVacationBalance.getSearchList(); - break; - } - } - return - } - - if (rs.importStatus == 'over' || rs.importStatus == 'error') { - this.resultDialog.loading = true; - } - - this.resultDialog.importStatus = rs.importStatus; - - if (pId) this.resultDialog.pId = pId; - - if (this.resultDialog.datas.length == 0) { - this.resultDialog.datas = datas; - } else { - this.resultDialog.datas = [...this.resultDialog.datas, ...datas] - } - - this.resultDialog.index = index; - } - }); - } - - @action - getResultInfo = () => { - let params = { - pId: this.resultDialog.pId - }; - this.resultDialog.loading = true; - asyncFetch.getImportResult(params).then(rs => { - const { - datas, - status - } = rs, { - succnum, - failnum, - sessionkey = '' - } = datas; - - if (status == '1') { - this.resultDialog.succnum = succnum; - this.resultDialog.failnum = failnum; - sessionkey && this.resultDialog.tableStore.getDatas(sessionkey, 1); - } - this.resultDialog.loading = false; - }); - } - - @action - getRecordTable = () => { - let params = { - importType: this.importType - }; - asyncFetch.getImportHistory(params).then(rs => { - const { - status, - sessionkey, - } = rs; - - if (status == '1') { - this.recordDialog.tableStore.getDatas(sessionkey, 1); - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - getLogTable = () => { - let params = { - importType: this.importType, - ...this.logDialog.form.getFormParams(), - }; - if (this.resultDialog.pId) { - params = { - ...params, - pId: this.resultDialog.pId - } - } - asyncFetch.getImportLogDetail(params).then(rs => { - const { - status, - sessionkey - } = rs; - - if (status == '1') { - this.logDialog.tableStore.getDatas(sessionkey, 1); - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - submitImportInfo = () => { - let params = { - importType: this.importType, - excelfile: this.importDialog.excelFileId, - operateType: 'add' - }; - if (this.importType == 'group') { - params = { - ...params, - keyField: this.importDialog.selectedValue - } - } - if (this.importDialog.formAsyncParams) { - Object.assign(params, { - ...this.importDialog.formAsyncParams - }); - } - this.setResultInfoDialogVisible(true); - asyncFetch.saveImport(params).then(rs => { - const { - status, - errorInfo - } = rs; - - if (status == '1') { - if (this.hasErrorInfo(errorInfo)) { - this.resultDialog.errorInfo = errorInfo; - this.resultDialog.importStatus = 'error'; - } - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - this.resultDialog.interval = setInterval(() => this.getImportProcessInfo(), 2000); - } - - @action - getLogSearchPanelCondition = () => { - this.logDialog.loading = true; - let params = { - importType: this.importType - }; - asyncFetch.getImportLogSearchCondition(params).then(rs => { - const { - status, - searchCondition - } = rs; - - if (status == '1') { - this.logDialog.condition = searchCondition; - this.logDialog.form.initFormFields(searchCondition); - } else { - message.error(rs.message); - } - this.logDialog.loading = false; - }).catch(error => { - message.error(error); - }); - } - - @action - setExcelFileNo = (id) => { - extendObservable(this.importDialog, { - excelFileId: id - }); - } - - @action - submitExcel = () => { - if (!this.importDialog.excelFileId) { - message.warning(getLabel(385362, '请选择导入模板!')); - return; - } - this.submitImportInfo(); - } - - @action - queryRecord = () => { - this.setRecordDialogVisible(true); - } - - @action - queryLog = () => { - this.setLogDialogVisible(true); - } - - @action - jumpToImportResult = (id) => { - this.resultDialog.pId = id; - this.resultDialog.importStatus = 'over'; - this.setResultInfoDialogVisible(true); - this.getResultInfo(); - } - - - @action - setImportDialogVisible = (bool) => { - this.importDialog.visible = bool; - if (bool) { - this.getImportForm(); - } else { - this.importDialogReset(); - } - - } - - @action - setResultInfoDialogVisible = (bool) => { - this.resultDialog.visible = bool; - if (!bool) { - clearInterval(this.resultDialog.interval); - this.resetResultDialogStatus(); - } - } - - @action - importDialogReset = () => { - this.importDialog.condition = []; - this.importDialog.selectedValue = 'workcode'; - this.importDialog.excelFileId = ''; - } - - @action - resetResultDialogStatus = () => { - this.resultDialog.index = 1; - this.resultDialog.datas = []; - this.resultDialog.importStatus = ''; - this.resultDialog.pId = ''; - this.resultDialog.interval = ''; - this.resultDialog.errorInfo = ''; - this.resultDialog.loading = true; - } - - @action - setRecordDialogVisible = (bool) => { - this.recordDialog.visible = bool; - bool && this.getRecordTable(); - } - - @action - setLogDialogVisible = (bool) => { - this.logDialog.visible = bool; - bool && this.getLogTable(); - if (!bool) { - this.logDialog.isPanelShow = false; - this.logDialog.form = new WeaForm(); - this.logDialog.condition = []; - } - } - - @action - setLogPanelStatus = (bool) => { - this.logDialog.isPanelShow = bool; - bool && this.logDialog.condition.length == 0 && this.getLogSearchPanelCondition(); - } - - @action - searchLogInfo = () => { - this.getLogTable(); - } - - hasErrorInfo = (errorInfo) => { - if (errorInfo.length == 0) return false; - return true - } - - @action - setTempletName = (templetName) => { - this.importDialog.templetName = templetName; - } - - @action - setImportDialogTitle = (title) => { - this.importDialog.title = title; - } - - @action - setImportType = (type) => { - this.importType = type; - } - - @action setFormAsyncParams = (params) => { - this.importDialog.formAsyncParams = params - } - - @action - setSelectedValue = (value) => { - this.importDialog.selectedValue = value; - } - - @action - setScoll = (component) => { - this.resultDialog.component = component; - } - -} - -const hrmImportCommon = new HrmImportCommon(); - -export { - hrmImportCommon -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/importExternalAttendance.js b/pc4backstage/hrmAttendance/stores/importExternalAttendance.js deleted file mode 100644 index b9406c8..0000000 --- a/pc4backstage/hrmAttendance/stores/importExternalAttendance.js +++ /dev/null @@ -1,117 +0,0 @@ -import { - observable, - action, - computed -} from 'mobx'; -import { - WeaForm, - WeaTableNew -} from 'comsMobx'; -import { - Button, - message -} from 'antd'; -import HrmBaseStore from './baseStore'; -import { - has -} from 'lodash'; -import * as api from '../apis/attendance'; -import { - i18n -} from '../public/i18n'; - -class HrmImportExternalAttendance extends HrmBaseStore { - /********************* unobservable list *********************/ - hrmImportResource; - setImportResource = (hrmImportResource) => { - this.hrmImportResource = hrmImportResource; - } - - topBtnAndMenu = () => { - return { - btns: [ - - ], - menus: [{ - key: '1', - content: i18n.label.submit(), - icon: , - onClick: this.submit - }, ...this.getBasicMenus()] - } - } - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable message = []; - @observable spinning = false; - /********************* observable list *********************/ - - /********************* computed list *********************/ - - /********************* computed list *********************/ - - /********************* action list *********************/ - initData = () => { - api.getImportForm().then(data => { - if (data.status === '1') { - this.hrmImportResource.condition = data.condition; - data.condition.map(g => { - g.items && g.items.length > 0 && g.items.map(d => { - if(d.domkey && d.domkey[0]==='keyField'){ - this.hrmImportResource.setParam(d.domkey[0], d.value); - } - }) - }) - // this.hrmImportResource.setParam('keyField', 'workcode'); - this.hrmImportResource.excelfile = ''; - this.hrmImportResource.filelist.length = 0; - this.message.length = 0; - this.hrmImportResource.single = true; - this.hrmImportResource.visible = true; - this.containerInitFinished = { - ...this.containerInitFinished, - init: true - } - } - }) - } - - @action submit = () => { - if(this.spinning) - return; - this.spinning = true; - this.message.length = 0; - // const keyField = this.hrmImportResource.keyField; - const excelfile = this.hrmImportResource.excelfile || ''; - if (excelfile === '') { - message.warning(i18n.message.selectImportTemplete()); - this.spinning = false; - return; - } - api.importExternalData({ - ...this.hrmImportResource.importParams, - excelfile - }).then(data => { - if (data.status === '1') { - if (has(data, 'errorInfo')) { - this.message = data.errorInfo; - } else - this.message = [data.message]; - this.spinning = false; - } - }, error => {this.spinning = false}) - } - - resetImportResource = () => { - this.hrmImportResource.single = false; - this.hrmImportResource.visible = false; - } - /********************* action list *********************/ -} - -export const hrmImportExternalAttendance = new HrmImportExternalAttendance(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/importScheduleCode.js b/pc4backstage/hrmAttendance/stores/importScheduleCode.js deleted file mode 100644 index 57244e9..0000000 --- a/pc4backstage/hrmAttendance/stores/importScheduleCode.js +++ /dev/null @@ -1,423 +0,0 @@ -import * as asyncFetch from '../apis/importScheduleCode'; -import { - observable, - action, - extendObservable -} from 'mobx'; -import { - WeaForm, - WeaTableNew -} from 'comsMobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - message -} from 'antd'; -import { - hrmHolidySettingNew -} from './holidaySettingNew'; -import { - scheduleCodeStore -} from './scheduleCode'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; - -class ImportScheduleCode { - @observable importType = ''; - @observable importDialog = { - visible: false, - condition: [], - title: '', - loading: true, - templetName: '', - selectedValue: 'workcode', - } - - @observable resultDialog = { - title: observable.ref(getLabel(82341, '导入结果')), - errorTip: observable.ref(getLabel(384059, '导入文件存在以下错误,请解决后重新上传!')), - visible: false, - index: 1, - datas: [], - importStatus: '', - pId: '', - interval: '', - tableStore: new TableStore(), - errorInfo: [], - succnum: 0, - failnum: 0, - loading: true, - component: '', - } - - @observable recordDialog = { - title: observable.ref(getLabel(24644, '历史导入记录')), - visible: false, - tableStore: new TableStore(), - } - - @observable logDialog = { - title: observable.ref(getLabel(24835, '导入日志')), - visible: false, - tableStore: new TableStore(), - isPanelShow: false, - form: new WeaForm(), - condition: [], - loading: true, - } - - @action - getImportForm = () => { - this.importDialog.loading = true; - let params = { - importType: this.importType - } - if (this.importDialog.formAsyncParams) { - Object.assign(params, { - ...this.importDialog.formAsyncParams - }); - } - asyncFetch.getImportForm(params).then(rs => { - const { - status, - condition = [], - } = rs; - - if (status == '1') { - this.importDialog.condition = condition; - this.importDialog.loading = false; - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - getImportProcessInfo = () => { - let params = { - importType: this.importType, - index: this.resultDialog.index, - }; - asyncFetch.getImportProcessLog(params).then(rs => { - const { - datas, - index, - pId = '', - status - } = rs; - - this.resultDialog.loading = false; - if (status == '1') { - const { - importStatus, - interval, - errorInfo, - component - } = this.resultDialog; - - component.scrollToLast(); - - if (importStatus == 'over' || importStatus == 'error') { - clearInterval(interval); - if (!this.hasErrorInfo(errorInfo)) { - this.getResultInfo(); - scheduleCodeStore.getTableData(); - } - return - } - - if (rs.importStatus == 'over' || rs.importStatus == 'error') { - this.resultDialog.loading = true; - } - - this.resultDialog.importStatus = rs.importStatus; - - if (pId) this.resultDialog.pId = pId; - - if (this.resultDialog.datas.length == 0) { - this.resultDialog.datas = datas; - } else { - this.resultDialog.datas = [...this.resultDialog.datas, ...datas] - } - - this.resultDialog.index = index; - } - }); - } - - @action - getResultInfo = () => { - let params = { - pId: this.resultDialog.pId - }; - this.resultDialog.loading = true; - asyncFetch.getImportResult(params).then(rs => { - const { - datas, - status - } = rs, { - succnum, - failnum, - sessionkey = '' - } = datas; - - if (status == '1') { - this.resultDialog.succnum = succnum; - this.resultDialog.failnum = failnum; - sessionkey && this.resultDialog.tableStore.getDatas(sessionkey, 1); - } - this.resultDialog.loading = false; - }); - } - - @action - getRecordTable = () => { - let params = { - importType: this.importType - }; - asyncFetch.getImportHistory(params).then(rs => { - const { - status, - sessionkey, - } = rs; - - if (status == '1') { - this.recordDialog.tableStore.getDatas(sessionkey, 1); - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - getLogTable = () => { - let params = { - importType: this.importType, - ...this.logDialog.form.getFormParams(), - }; - if (this.resultDialog.pId) { - params = { ...params, - pId: this.resultDialog.pId - } - } - asyncFetch.getImportLogDetail(params).then(rs => { - const { - status, - sessionkey - } = rs; - - if (status == '1') { - this.logDialog.tableStore.getDatas(sessionkey, 1); - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - } - - @action - submitImportInfo = () => { - let params = { - importType: this.importType, - excelfile: this.importDialog.excelFileId, - operateType: 'add' - }; - params = { ...params, - keyField: this.importDialog.selectedValue - } - if (this.importDialog.formAsyncParams) { - Object.assign(params, { - ...this.importDialog.formAsyncParams - }); - } - this.setResultInfoDialogVisible(true); - asyncFetch.saveImport(params).then(rs => { - const { - status, - errorInfo - } = rs; - - if (status == '1') { - if (this.hasErrorInfo(errorInfo)) { - this.resultDialog.errorInfo = errorInfo; - this.resultDialog.importStatus = 'error'; - } - } else { - message.error(rs.message); - } - }).catch(error => { - message.error(error); - }); - this.resultDialog.interval = setInterval(() => this.getImportProcessInfo(), 2000); - } - - @action - getLogSearchPanelCondition = () => { - this.logDialog.loading = true; - let params = { - importType: this.importType - }; - asyncFetch.getImportLogSearchCondition(params).then(rs => { - const { - status, - searchCondition - } = rs; - - if (status == '1') { - this.logDialog.condition = searchCondition; - this.logDialog.form.initFormFields(searchCondition); - } else { - message.error(rs.message); - } - this.logDialog.loading = false; - }).catch(error => { - message.error(error); - }); - } - - @action - setExcelFileNo = (id) => { - extendObservable(this.importDialog, { - excelFileId: id - }); - } - - @action - submitExcel = () => { - if (!this.importDialog.excelFileId) { - message.warning(getLabel(385362, '请选择导入模板!')); - return; - } - this.submitImportInfo(); - } - - @action - queryRecord = () => { - this.setRecordDialogVisible(true); - } - - @action - queryLog = () => { - this.setLogDialogVisible(true); - } - - @action - jumpToImportResult = (id) => { - this.resultDialog.pId = id; - this.resultDialog.importStatus = 'over'; - this.setResultInfoDialogVisible(true); - this.getResultInfo(); - } - - - @action - setImportDialogVisible = (bool) => { - this.importDialog.visible = bool; - if (bool) { - this.getImportForm(); - } else { - this.importDialogReset(); - } - - } - - @action - setResultInfoDialogVisible = (bool) => { - this.resultDialog.visible = bool; - if (!bool) { - clearInterval(this.resultDialog.interval); - this.resetResultDialogStatus(); - } - } - - @action - importDialogReset = () => { - this.importDialog.condition = []; - this.importDialog.selectedValue = 'workcode'; - this.importDialog.excelFileId = ''; - } - - @action - resetResultDialogStatus = () => { - this.resultDialog.index = 1; - this.resultDialog.datas = []; - this.resultDialog.importStatus = ''; - this.resultDialog.pId = ''; - this.resultDialog.interval = ''; - this.resultDialog.errorInfo = ''; - this.resultDialog.loading = true; - } - - @action - setRecordDialogVisible = (bool) => { - this.recordDialog.visible = bool; - bool && this.getRecordTable(); - } - - @action - setLogDialogVisible = (bool) => { - this.logDialog.visible = bool; - bool && this.getLogTable(); - if (!bool) { - this.logDialog.isPanelShow = false; - this.logDialog.form = new WeaForm(); - this.logDialog.condition = []; - } - } - - @action - setLogPanelStatus = (bool) => { - this.logDialog.isPanelShow = bool; - bool && this.logDialog.condition.length == 0 && this.getLogSearchPanelCondition(); - } - - @action - searchLogInfo = () => { - this.getLogTable(); - } - - hasErrorInfo = (errorInfo) => { - if (errorInfo.length == 0) return false; - return true - } - - @action - setTempletName = (templetName) => { - this.importDialog.templetName = templetName; - } - - @action - setImportDialogTitle = (title) => { - this.importDialog.title = title; - } - - @action - setImportType = (type) => { - this.importType = type; - } - - @action setFormAsyncParams = (params) => { - this.importDialog.formAsyncParams = params - } - - @action - setSelectedValue = (value) => { - this.importDialog.selectedValue = value; - } - - @action - setScoll = (component) => { - this.resultDialog.component = component; - } - -} - -export const importScheduleCode = new ImportScheduleCode(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/index.js b/pc4backstage/hrmAttendance/stores/index.js deleted file mode 100644 index d4a1497..0000000 --- a/pc4backstage/hrmAttendance/stores/index.js +++ /dev/null @@ -1,111 +0,0 @@ -import { - commonStore -} from './commonStore'; -import { - hrmShiftManager -} from './shiftManager'; -import { - hrmImportCommon -} from './importCommon'; -import { - hrmOvertimeRule -} from './overtimeRule'; -import { - hrmHolidySettingNew -} from './holidaySettingNew'; -import { - hrmGroupSetting -} from './groupSetting'; -import { - hrmHolidayRule -} from './holidayRule'; -import { - hrmScheduleSetting -} from './scheduleSetting'; -import { - hrmTravelRule -} from './travelRule'; -import { - hrmVacationBalance -} from './vacationBalance'; -import { - hrmAttendanceRpSharingSetting -} from './attendanceRpSharingSetting'; -import { - hrmWorkflowSetting -} from './workflowSetting'; -import { - hrmInit -} from './init'; -import { - hrmUpgrade -} from './upgrade'; -import { - hrmHolidayType -} from './holidayType'; -import { - hrmNewHolidayRule -} from './newHolidayRule'; -import { - hrmImportExternalAttendance -} from './importExternalAttendance'; -import { - HrmImportResource -} from '../../hrmengine/stores/importresource'; -import { - hrmAttendanceSyncSetting -} from './attendanceSyncSetting'; -import { - hrmTest -} from './test'; -import { - vacationRuleStore -} from './vacationRule.js'; -import { - vacationTypeStore -} from './vacationType.js'; -import { - vacationRemainStore -} from './vacationRemain.js'; -import { - applicationSettingsStore -} from './applicationSettings.js'; -import { - scheduleCodeStore -} from './scheduleCode.js'; -import { - importScheduleCode -} from './importScheduleCode'; -import {kqMonthReportSetting} from './kqMonthReportSetting.js'; - -const hrmImportResource = new HrmImportResource(); - -module.exports = { - commonStore, - hrmShiftManager, - hrmImportCommon, - hrmOvertimeRule, - hrmHolidySettingNew, - hrmGroupSetting, - hrmHolidayRule, - hrmScheduleSetting, - hrmTravelRule, - hrmVacationBalance, - hrmAttendanceRpSharingSetting, - hrmWorkflowSetting, - hrmInit, - hrmUpgrade, - hrmHolidayType, - hrmNewHolidayRule, - hrmImportExternalAttendance, - hrmAttendanceSyncSetting, - hrmImportResource, - hrmTest, - vacationRuleStore, - vacationTypeStore, - vacationRemainStore, - applicationSettingsStore, - scheduleCodeStore, - importScheduleCode, - kqMonthReportSetting, -}; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/init.js b/pc4backstage/hrmAttendance/stores/init.js deleted file mode 100644 index d2c1c6e..0000000 --- a/pc4backstage/hrmAttendance/stores/init.js +++ /dev/null @@ -1,539 +0,0 @@ -import { - observable, - action, - computed, - reaction, -} from 'mobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaForm, -} from 'comsMobx'; -import { - message -} from 'antd'; -import { - fetch, - getMenusCreationConfig, - getTopButtons, - getDropMenuDatas, - msg, -} from '../util/save-time-util.js'; -import { - checkNeedInit -} from "../components/init/confirmUtil.js"; -import * as asyncFetch from '../apis/initSetting'; -const getLabel = WeaLocaleProvider.getLabel; - -const isEmptyArray = (value) => { - return value.length === 0 -} - -class HrmInit { - //************权限************* - @observable pageAccessPermission = { - hasRight: false, - loading: true, - } - - @action getPermissionInfo = () => { - fetch({ - asyncFetch, - name: 'getHasRight', - logic: (cb) => { - const { - hasRight - } = cb; - - if (hasRight) { - this.pageAccessPermission.hasRight = true; - } - this.pageAccessPermission.loading = false; - } - }); - } - - //*************头部************** - get topProps () { - return { - showDropIcon: true, - iconBgcolor: '#217346', - icon: , - title: getLabel('505591', "一键启用考勤"), - } - } - - @observable btnMenu = []; - - @computed get toploading () { - const { - loading - } = this.formElements; - - return loading - } - - @computed get menusCreationConfig () { - return getMenusCreationConfig(this.btnMenu); - } - - @computed get topButtons () { - const { - topMenu - } = this.menusCreationConfig; - - const topButtons = getTopButtons.call(this, { - datas: topMenu, - disabled: this.menuState, - }); - - return topButtons; - } - - - @computed get dropMenuDatas () { - const { - rightMenu - } = this.menusCreationConfig; - - return getDropMenuDatas.call(this, { - datas: rightMenu, - disabled: this.menuState, - }); - } - - @computed get menuState () { - const { - loading - } = this.formElements; - - return [loading]; - } - - - @action getRightMenu = () => { - fetch({ - asyncFetch, - name: 'getRightMenu', - fetchParams: { - isInitResult: this.hasInit - }, - logic: (cb) => { - const { - btnMenu, - } = cb; - - this.btnMenu = btnMenu; - } - }); - } - - startInit = () => { - this.handleInitButtonClick(); - } - - log = () => { - window.setLogViewProps({ logSmallType: 3075 }); - } - - //*************表单************** - formConfig = { - renderBlacklist: ['restTime_start'], - classNames: { - 'workTime': 'hrm-init-form-datepicker', - 'restTime': 'hrm-init-form-datepicker', - 'workDate': 'hrm-init-form-select', - }, - } - - @observable errors = {}; - - @observable formElements = { - conditions: [], - form: new WeaForm(), - loading: false, - date: new Date(), - } - - @action getFormMaterial = () => { - this.formElements.loading = true; - - fetch({ - asyncFetch, - name: 'getSetupForm', - logic: (cb) => { - const { - condition, - datas, - } = cb; - - this.processCondition(condition); - - this.formElements.loading = false; - this.formElements.conditions = condition; - this.formElements.form.initFormFields(condition); - - this.slideModalDatas = datas; - } - }); - } - - processCondition = (condition) => { - const ICONS = ['icon-portal-official-o', 'icon-coms02-rest', 'Icon-coms03-rest', 'icon-coms-New-schedule', 'icon-coms-New-schedule'], - COLORS = ['#2DB7F5', '#2DB7F5', '#CCC'], - RULE = 'scopeRequired|scopeDirty'; - - condition.map(c => { - c.items.map((item, index) => { - const key = item.domkey[0]; - - if (['workTime', 'restTime', 'excludeRestTime', 'workDate'].includes(key)) { - item.label = ( - - - {item.label} - - ); - } - - if (key === 'restTime_start') { - item.rules = RULE; - } - }); - }); - } - - @action newForm = () => { - this.formElements.conditions = []; - this.formElements.form = new WeaForm(); - } - - @action resetForm = () => { - this.formElements.form.resetForm(); - } - - @computed get hasInitButton () { - return this.formElements.form.isFormInit; - } - - handleInitButtonClick = () => { - this.validateForm({ - success: (moreValidate) => { - if (!moreValidate()) return; - - checkNeedInit(() => { - this.popConfirmVisible = true; - }) - }, - fail: (f) => { - const { - form - } = this.formElements, { - workTime, - restTime - } = form.getFormParams(); - - Object.assign(this.errors, { - workTime: !workTime ? `"${getLabel('505592', '上班时间')}" ${getLabel('505571', '未填写')}` : '' - }); - - Object.assign(this.errors, { - restTime: !restTime ? `"${getLabel('505593', '下班时间')}" ${getLabel('505571', '未填写')}` : '', - }); - - f.showErrors(); - - this.formElements.date = new Date(); - - Object.assign(this.errors, { - workTime: '', - restTime: '' - }); - } - }); - } - - validateForm = (params) => { - const { - form - } = this.formElements, { - excludeRestTime, - } = form.getFormParams(); - - const noValidateField = () => { - window.e9HideFormFieldKeys = []; - - if (excludeRestTime !== '1') { - window.e9HideFormFieldKeys.push('restTime_start__restTime_end'); - } - } - - noValidateField(); - - const { - success, - fail, - } = params; - - form.validateForm().then(f => { - if (f.isValid) { - success(() => this.validateTime()); - } else { - fail(f); - } - }); - } - - validateTime = () => { - const { - form - } = this.formElements, { - workTime, - restTime, - restTime_start, - restTime_end, - } = form.getFormParams(); - - const compareTime = (start, end) => { - const startTime = start.split(':'); - const endTime = end.split(':'); - - const rulea = (startTime[0] === endTime[0]) && (startTime[1] < endTime[1]); - const ruleb = startTime[0] < endTime[0]; - - if (rulea || ruleb) { - return true - } - return false; - } - - const msgs = []; - if (!compareTime(workTime, restTime)) { - msgs.push(`【${getLabel('505593', '下班时间')}】 ${getLabel('505594', '不能早于')} 【${getLabel('505592', '上班时间')}】`); - } - - if (restTime_start && !compareTime(restTime_start, restTime_end)) { - msgs.push(`【${getLabel('505595', '休息结束时间')}】 ${getLabel('505594', '不能早于')} 【${getLabel('505596', '休息开始时间')}】`); - } - - if (msgs.length > 0) { - msg.showFailMsg(msgs, 2); - return false; - } else { - return true; - } - - } - //*************配置向导************** - @observable popConfirmVisible = false; - - @observable slideModalVisible = false; - - @observable slideModalDatas = []; - - @observable slideTop = 0; - - confirm = () => { - this.hasInit = true; - - this.getStepDatas({ - success: () => { - this.add(() => this.init()); - } - }); - } - - cancel = () => { - this.popConfirmVisible = false; - } - - switchSlideModal = () => { - this.slideModalVisible = this.slideModalVisible ? false : true; - } - - close = () => { - this.slideModalVisible = false; - } - - setDistanceToPeak = (distance) => { - this.slideTop = distance; - } - - //*************步骤****************** - @observable hasInit = false; - - @observable steps = { - status: 'process', - items: [], - } - - @computed get initItemNames () { - const names = []; - - this.steps.items.map(item => { - const { - title - } = item; - names.push(title); - }); - - return names; - } - - @action getStepDatas = (params) => { - fetch({ - asyncFetch, - name: 'getSetupSteps', - logic: (cb) => { - const { - items - } = cb; - - Object.assign(this.steps, { - items - }); - - const { - success - } = params; - - success(); - } - }); - } - - startInitDisposer = reaction(() => this.hasInit, hasInit => { - this.getRightMenu(); - - if (!hasInit) { - this.newForm(); - this.steps.items = []; - this.analysis.results = []; - this.currentIndex = 0; - } - }); - - //*************初始化结果************** - @observable currentIndex = 0; - - @observable analysis = { - results: [] - } - - @action increase = () => { - this.currentIndex++; - } - - @computed get currentName () { - const items = this.steps.items; - - return `${getLabel('505597', '初始化')}${items[this.currentIndex].title}` - } - - @computed get initConfig () { - return { - name: this.currentName, - status: '2' - } - } - - @action add = (next) => { - this.analysis.results.push(this.initConfig); - next(); - } - - @action result = (cb) => { - const { - sketch, - status, - description, - url, - } = cb; - - const replace = (config) => { - const targetItem = this.analysis.results[this.currentIndex]; - - Object.assign(targetItem, config); - } - - const changeStepStatus = (status) => { - const targetItem = this.steps.items[this.currentIndex]; - const _status = (status === '0') ? 'error' : 'finish'; - - Object.assign(targetItem, { - status: _status - }); - } - - const resultConfig = { - status, - sketch, - url, - }; - - description && !isEmptyArray(description) && Object.assign(resultConfig, { - description - }); - - changeStepStatus(status); - - replace(resultConfig); - } - - @computed get isInitFinish () { - return this.currentIndex === this.steps.items.length - } - - - @computed get hasAnalysisResult () { - return this.analysis.results.length > 0 - } - - init = () => { - const { - form - } = this.formElements; - - const fetchParams = { - ...form.getFormParams(), - index: this.currentIndex, - } - - fetch({ - asyncFetch, - name: 'performInitialization', - fetchParams, - logic: (cb) => { - const { - status - } = cb; - - this.result(cb); - - this.increase(); - - !this.isInitFinish && this.add(() => this.init()); - } - }); - } - - back = () => { - this.hasInit = false; - this.popConfirmVisible = false; - } - - //*************其他************** - refresh = (operateForm) => { - if (this.hasInit) { - this.back(); - } else { - operateForm(this); - } - } - - - -} - -export const hrmInit = new HrmInit(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/kqMonthReportSetting.js b/pc4backstage/hrmAttendance/stores/kqMonthReportSetting.js deleted file mode 100644 index 1ff8b42..0000000 --- a/pc4backstage/hrmAttendance/stores/kqMonthReportSetting.js +++ /dev/null @@ -1,705 +0,0 @@ -import { observable, action, computed } from "mobx"; -import { WeaButtonIcon, WeaDropdown, WeaLocaleProvider} from "ecCom"; -import {WeaSwitch} from 'comsMobx'; -import { Menu, Button, message} from "antd"; -import HrmBaseStore from "../../hrmComsPublic/stores/baseStore"; -import * as api from "../apis/kqMonthReportSetting"; -import { i18n } from "../public/i18n"; -import findIndex from 'lodash/findIndex'; -import filter from 'lodash/filter'; -import cloneDeep from 'lodash/cloneDeep'; -const getLabel = WeaLocaleProvider.getLabel; -const {ButtonSelect} = WeaDropdown; - -export class KQMonthReportSetting extends HrmBaseStore { - @observable loading = false; - - //#region WeaTop属性 - @observable _topButtons = []; - @computed get topButtons(){ - return this.toJS(this._topButtons); - } - set topButtons(v){ - this._topButtons = v; - } - - @computed get topBtnAndMenus(){ - const buttons = [], menus = []; - this.topButtons.map((d, i) => { - if(1 == d.isTop){ - buttons.push( - () - ); - } - menus.push({ - key: i + '', - content: d.menuName, - icon: , - onClick: () => this[d.menuFun] && this[d.menuFun](), - }) - }); - - return { - buttons, - dropMenuDatas: [ - ...menus, - ...this.getBasicMenus("HRM_ENGINE_KQREPORT_DEFINED") - ] - } - } - - @computed get topProps(){ - return { - title: getLabel('516794','考勤汇总报表展示列定制'), - icon: , - iconBgcolor: '#217346', - showDropIcon: true, - ...this.topBtnAndMenus - } - } - //#endregion - - //#region WeaTab 字段分组tab属性 - @observable mainActiveTabKey = ''; - - @observable _mainTabs = []; - @computed get mainTabs(){ - return this.toJS(this._mainTabs); - } - set mainTabs(v){ - this._mainTabs = v; - } - - @observable dropdownSelectedKey = '1'; - @computed get dropdownProps(){ - return { - type: 'small', - btnProps: { - style: { padding: 0, background: 'transparent', border: 'none', color: this.fieldListSelectedRowKeys.length == 0 ? '#dadada' : '#34A2FF', fontSize: 20 }, - disabled: this.fieldListSelectedRowKeys.length == 0 - }, - datas: [ - { key: '1', text: getLabel(131966, '删除'), show: , selected: this.dropdownSelectedKey == '1' }, - { key: '2', text: getLabel('-81296', "移动到组"), show: , selected: this.dropdownSelectedKey == '2', isDropBtn: true } - ], - btnDropPropsDatas: {'2': {overlay: this.moveDropDown}}, - btnOnClick: this.btnOnClick, - menuOnClick: this.menuOnClick - } - } - - @computed get moveDropDown(){ - return ( - - { - filter(this.mainTabs, tab => { - try{ - return tab.viewCondition != this.mainActiveTabKey && tab.viewCondition != 'other' - }catch(e){ - return true; - } - }).map((tab, index) => ( - -
{tab.title}
-
- )) - } - - -
{getLabel('31194', "新建分组并移动")}
-
-
- ) - } - - @computed get tabButtons(){ - return [ - this.getFieldDefineForm()} />, - - ] - } - - @computed get mainTabProps(){ - const tabConfig = { - tabs: this.mainTabs, - keyParam: "viewCondition", - activeTabKey: this.mainActiveTabKey, - onTabEdit: (tabKey, action) => this.onTabEdit(tabKey, action, this.refreshMainData) - } - - return { - tabConfig, - activeTabInfo: { - activeTabKey: tabConfig.activeTabKey, - activeTabIndex: 0 - }, - rightMenu: this.topBtnAndMenus.dropMenuDatas, - store: this, - tabChangeHandle: this.setActiveTab, - tabBtnDef: this.tabButtons - } - }; - - @action setActiveTab = k => { - this.dropdownSelectedKey = '1'; - this.fieldListSelectedRowKeys = []; - this.mainActiveTabKey = k; - this.getFieldData(); - } - - @action onTabEdit = async (tabKey, action, callback) => { - if(findIndex(this.mainTabs, {viewCondition: tabKey}) < 0) return; - switch (action) { - case 'remove': - this.confirmInfo({ - content: i18n.confirm.delete(), - onOk: () => { - api.deleteGroup({ids: tabKey}).then(data => { - if (data.status === '1') { - message.success(i18n.message.deleteSuccess()); - callback && callback(); - } else { - message.error(data.message); - } - }) - } - }); - break; - default: - break; - } - } - //#endregion - - //#region 初始化数据 - @action cleanData = () => { - this.dropdownSelectedKey = '1'; - this.fieldListSelectedRowKeys = []; - } - - @action initData = async () => { - this.cleanData(); - this.containerInitFinished.init = true; - const rs = await api.init(); - rs.map((data, index) => { - if(data.status == null || data.status == 1){ - switch(index){ - case 0: - this.topButtons = data.btnMenu; - break; - case 1: - this.mainTabs = data.tabs.map((d, i) => { - if(i == 0) this.mainActiveTabKey = d.key; - return { - editable: d.editable, - color: "#000000", - title: d.title, - viewCondition: d.key, - // searchType: ["base"], - // searchKey: "groupname", - // doSearch: () => this.getTableData() - } - }); - this.getFieldData(); - break; - } - }else - message.error(resut.message); - }); - } - - @action init = () => { - this.initData(); - } - //#endregion - - //#region 根据groupid获取字段列表 - fieldListDraggable = false; - fieldListShowTitle = false; - fieldListColumns = []; - @observable _fieldListData = []; - @computed get fieldListData(){ - return this.toJS(this._fieldListData); - } - set fieldListData(v){ - this._fieldListData = v; - } - @observable _fieldListSelectedRowKeys = []; - @computed get fieldListSelectedRowKeys(){ return this.toJS(this._fieldListSelectedRowKeys) } - set fieldListSelectedRowKeys(v){ this._fieldListSelectedRowKeys = v } - - - defaultShowColComs; - @computed get cells(){ - return this.fieldListData.map(data => { - const coms = cloneDeep(this.defaultShowColComs).map(com => ({ - ...com, - disabled: (data.isenable != 1) - })); - return {id: data.id, defaultshow: {com: coms}}; - }) - } - - @computed get fieldListTableProps(){ - this.dropdownSelectedKey; - return { - draggable: this.fieldListDraggable, - showTitle: this.fieldListShowTitle, - columns: this.fieldListColumns, - cells: this.cells, - datas: this.fieldListData, - initialDatas: this.fieldListData, - getRowSelection: this.getRowSelection, - onRowSelect: this.onFieldDataRowSelect, - selectedRowKeys: this.fieldListSelectedRowKeys, - onChange: this.fieldListChangeHandle - } - } - - getRowSelection = rowSelection => { - const sel = { ...rowSelection }; - sel.getCheckboxProps = record => { - const disabled = this.dropdownSelectedKey == '2' ? false : record.disabled; - return {disabled}; - }; - return sel; - }; - - @action onFieldDataRowSelect = selectedRowKeys => this.fieldListSelectedRowKeys = selectedRowKeys - - @action fieldListChangeHandle = datas => this.fieldListData = datas.map(d => { - if(d.isenable == 0) Object.assign(d, {defaultshow: 0}); - return d; - }); - - @action getFieldData = async () => { - if(this.loading) - return; - this.loading = true; - const result = await api.getFieldDefineList({groupid: this.mainActiveTabKey}); - if(result.status == 1 && result.items.length > 0){ - const {table} = result.items[0] || {}; - const {draggable, showTitle, columns, datas} = table; - this.fieldListDraggable = draggable; - this.fieldListShowTitle = showTitle; - this.fieldListColumns = (columns || []).map((d, i) => { - const {title, dataIndex, width, com, checkVauleType, showCheckAll} = d; - const colDef = { - title, - dataIndex, - width - } - com && Object.assign(colDef, {com}); - dataIndex == 'defaultshow' && (this.defaultShowColComs = com); - if(dataIndex === 'formulaspan'){ - Object.assign(colDef, { - com: [ - { - type: 'CUSTOM', - key: dataIndex, - render: (text, record, index, onEdit) => { - if(!text || text == "") - return null; - return ( this.getFieldDefineForm(record.id)}>{text}); - } - } - ], - }) - } - return colDef; - }); - this.fieldListData = datas || []; - }else - message.error(resut.message); - this.loading = false; - } - - @action btnOnClick = key => key == '1' && this.deleteFieldDefine(); - - @action menuOnClick = key => { - this.dropdownSelectedKey = key; - this.fieldListSelectedRowKeys = []; - } - - @action dropdownClick = e => { - const {key} = e; - if(key === 'createAndMove'){ - this.createGroup(true); - }else{ - const [groupid, groupname] = key.split('_'); - let moveFieldConfirm = getLabel('388100', "确定要移动所选择的记录到分组{params}吗?").replace('{params}', groupname); - this.confirmInfo({ - content:moveFieldConfirm, - onOk: () => { - this.changeFieldGroup(groupid); - } - }); - } - } - - @action deleteFieldDefine = () => { - this.confirmInfo({ - content: i18n.confirm.deleteSelected(), - onOk: async () => { - this.showWeaLoadingGlobal(); - const data = await api.deleteFieldDefine({ids: this.fieldListSelectedRowKeys}); - if (data.status === '1') { - message.success(i18n.message.deleteSuccess()); - this.fieldListSelectedRowKeys = []; - this.refreshMainData(this.mainActiveTabKey); - } else { - message.error(data.message); - } - this.hideWeaLoadingGlobal(); - } - }); - } - //#endregion - - //#region 添加自定义展示列 - formid; - @observable createFieldDefineDialogVisible = false; - @computed get createFieldDefineDialogProps(){ - let buttons = []; - return { - ...this.dialogPropsDef, - hasScroll: true, - title: this.formid == null ? getLabel('516792','添加自定义展示列') : getLabel('516793','编辑自定义展示列'), - style: { - width: 500, - height: 300 - }, - onCancel: () => { - this.createFieldDefineDialogVisible = false; - }, - visible: this.createFieldDefineDialogVisible, - buttons, - moreBtn: {datas: this.convertToMenus(buttons)}, - key: new Date().getTime() - } - } - - feildDefineFormItemRender = { - fieldlabel: (field, textAreaProps, form, formParams) => { - return ( - this.onFieldlabelChangeHandle(v.fieldlabel.value)} - /> - ); - } - } - - @action onFieldlabelChangeHandle = async v => { - if(this.formid == null){ - const data = await this.getPinYin({labelName: WeaLocaleProvider.formatMultiLang(v)}); - const {pinyin} = data; - this.formTarget.createFieldDefineForm.updateFields({ - fieldname: {value: pinyin} - }) - } - } - - @action getFieldDefineForm = async id => { - this.showWeaLoadingGlobal(); - const params = {}; - this.formid = id; - id && Object.assign(params, {id}) - const data = await api.getFieldDefineForm(params); - if(data.status == 1){ - this.setFormData("createFieldDefineForm", data.formField); - if(this.formTarget.createFieldDefineForm.isFormInit) - this.createFieldDefineDialogVisible = true; - }else{ - message.error(data.message); - } - this.hideWeaLoadingGlobal(); - } - - @action saveFieldDefine = () => { - const form = this.formTarget.createFieldDefineForm, - formParams = form.getFormParams(); - form.validateForm().then(f => { - if (f.isValid) { - const params = { ...formParams, groupid: this.mainActiveTabKey}; - this.formid && Object.assign(params, {id: this.formid}); - - this.confirmInfo({ - content: (
{getLabel('517312','耗时操作,请错开高峰期执行')}
{getLabel('518682','保存后需在报表中手动重新计算考勤数据后生效')}
), - onOk: async () => { - this.showWeaLoadingGlobal(getLabel('517313','数据处理中')); - const data = await api.saveFieldDefine(params); - if (data.status === "1") { - message.success(i18n.message.saveSuccess()); - this.createFieldDefineDialogVisible = false; - this.refreshMainData(this.mainActiveTabKey); - } else { - message.error(data.message); - } - this.hideWeaLoadingGlobal(); - } - }) - } else { - f.showErrors(); - const fields = this.formTarget.createFieldDefineForm.fieldMap; - [...Object.keys(fields)].map(k => { - const e = this.formTarget.createFieldDefineForm.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - } - }); - this.showError = new Date().getTime(); - } - }); - } - //#endregion - - //#region 保存列定制 - @action saveGroup = async () => { - this.showWeaLoadingGlobal(); - const datas = this.fieldListData.map((d, i) => ({...d, fieldOrder: i})); - const data = await api.saveFieldDefineList({datas: JSON.stringify(datas)}); - if(data.status == '1') message.success(i18n.message.saveSuccess()); - else message.error(data.message); - this.hideWeaLoadingGlobal(); - } - //#endregion - - //#region 移动分组 - @action changeFieldGroup = async groupid => { - const params = {groupid, ids: this.fieldListSelectedRowKeys}; - const data = await api.changeFieldGroup(params); - if(data.status == '1'){ - this.fieldListSelectedRowKeys = []; - this.refreshMainData(params.groupid); - }else{ - message.error(data.message); - } - } - //#endregion - - //#region 新建分组 - isCreateAndMove = false; - @observable createGroupDialogVisible = false; - @computed get createGroupDialogProps(){ - let buttons = []; - return { - ...this.dialogPropsDef, - title: getLabel('30131','新建分组'), - style: { - width: 500, - height: 135 - }, - onCancel: () => { - this.createGroupDialogVisible = false; - }, - visible: this.createGroupDialogVisible, - buttons, - moreBtn: {datas: this.convertToMenus(buttons)}, - key: new Date().getTime() - } - } - - @action createGroup = async (isCreateAndMove = false) => { - this.showWeaLoadingGlobal(); - this.isCreateAndMove = isCreateAndMove; - const result = await api.getGroupForm(); - if(result.status == 1){ - this.setFormData("createGroupForm", result.formField); - if(this.formTarget.createGroupForm.isFormInit) - this.createGroupDialogVisible = true; - }else{ - message.error(result.message); - } - this.hideWeaLoadingGlobal(); - } - - @action doCreateGroup = (cmd, callback) => { - this.showWeaLoadingGlobal(); - switch(cmd){ - case 'save': - this.saveGroupForm(cmd, callback); - break; - case 'savebatch': - this.saveGroupList(cmd, callback); - break; - } - } - - @action saveGroupForm = (cmd, callback) => { - const form = this.formTarget.createGroupForm, - formParams = form.getFormParams(); - form.validateForm().then(f => { - if (f.isValid) { - api.saveGroup({ ...formParams, cmd}).then( - data => { - if (data.status === "1") { - message.success(i18n.message.saveSuccess()); - this.createGroupDialogVisible = false; - callback && callback(data.id); - } else { - message.error(data.message); - } - this.hideWeaLoadingGlobal(); - }, - error => {this.hideWeaLoadingGlobal()} - ); - } else { - this.hideWeaLoadingGlobal(); - f.showErrors(); - const fields = this.formTarget.createGroupForm.fieldMap; - [...Object.keys(fields)].map(k => { - const e = this.formTarget.createGroupForm.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - } - }); - this.showError = new Date().getTime(); - } - }); - } - - @action saveGroupList = async (cmd, callback) => { - this.showWeaLoadingGlobal(); - let flag = true; - let datas = this.groupListData; - datas = datas.map((d, i) => { - const data = {...d, showorder: i + 1}; - if(d.id.startsWith('random_')) Object.assign(data, {id: ''}); - flag = flag && d.groupname && d.groupname.trim().length > 0; - return data; - }); - - if(!flag){ - message.error(getLabel('130064','请填写分组名称')); - this.hideWeaLoadingGlobal(); - return; - } - - const params = {cmd, datas: JSON.stringify(datas)}; - const data = await api.saveGroup(params); - if (data.status === "1") { - this.groupListSettingDialogProps.onCancel(); - callback && callback(); - } else { - message.error(data.message); - } - this.hideWeaLoadingGlobal(); - } - - @action refreshMainData = async groupid => { - const result = await api.getFieldDefineTabs(); - if(result.status == 1){ - this.mainTabs = result.tabs.map((d, i) => { - if(groupid == null && i == 0) this.mainActiveTabKey = d.key; - return { - editable: d.editable, - color: "#000000", - title: d.title, - viewCondition: d.key, - } - }); - groupid && (this.mainActiveTabKey = groupid); - this.getFieldData(); - }else{ - message.error(result.message); - } - } - //#endregion - - //#region 分组维护 - groupListDraggable = false; - groupListShowTitle = true; - groupListColumns = []; - @observable _groupListData = []; - @computed get groupListData () { - return this.toJS(this._groupListData); - } - set groupListData(v){ - this._groupListData = v; - } - - @computed get groupListTableProps(){ - return { - draggable: this.groupListDraggable, - showTitle: this.groupListShowTitle, - columns: this.groupListColumns, - datas: this.groupListData, - initialDatas: this.groupListData, - showCopy: false, - showMove: false, - willAdd: this.willAdd, - willDelete: this.willDelete, - onChange: this.onChange - } - } - - @action willAdd = (datas, addData) => { - return datas.map(data => { - if (addData.id === data.id) return { ...data, id: `random_${data.id}`, isshow: '1' }; - return data; - }); - } - - willDelete = (datas, keys) => new Promise((resolve, reject) => { - this.confirmInfo({ - content: i18n.confirm.deleteSelected(), - onOk: () => resolve(true), - onCancel: () => resolve(false) - }); - }); - - @action onChange = (datas, other, data) => { - this.groupListData = datas; - } - - @observable groupListSettingVisible = false; - @computed get groupListSettingDialogProps(){ - let buttons = []; - let moreBtn = {datas: this.convertToMenus(buttons)}; - return { - ...this.dialogPropsDef, - title: getLabel('383049','分组维护'), - style: { - width: 500, - height: 500 - }, - buttons, - moreBtn, - onCancel: () => { - this.groupListSettingVisible = false; - }, - visible: this.groupListSettingVisible, - } - } - - @action editGroup = async () => { - this.showWeaLoadingGlobal(); - const result = await api.getGroupList(); - if(result.status == 1 && result.items.length > 0){ - const {table} = result.items[0] || {}; - const {draggable, showTitle, columns, datas} = table; - this.groupListDraggable = draggable; - this.groupListColumns = (columns || []).map((d, i) => { - const {title, dataIndex, width, com, checkVauleType, showCheckAll} = d; - return { - title, - dataIndex, - width, - com, - checkVauleType, - showCheckAll: showCheckAll || false - } - }); - this.groupListData = datas || []; - this.groupListSettingVisible = true; - }else - message.error(resut.message); - this.hideWeaLoadingGlobal(); - } - //#endregion -} - -export const kqMonthReportSetting = new KQMonthReportSetting(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/newHolidayRule.js b/pc4backstage/hrmAttendance/stores/newHolidayRule.js deleted file mode 100644 index 61f3f61..0000000 --- a/pc4backstage/hrmAttendance/stores/newHolidayRule.js +++ /dev/null @@ -1,807 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaHelpfulTip, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaForm, - WeaTableNew -} from 'comsMobx'; -import { - message, - Button, - Modal, -} from 'antd'; -import * as api from '../apis/newHolidayRule.js'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; -const confirm = Modal.confirm; - -class HrmNewHolidayRule { - @observable permission = { - hasRight: false, - loading: true, - } - - getPermissionInfo = (callback) => { - api.getHasRight().then(cb => { - const { - hasRight - } = cb; - - this.permission.hasRight = hasRight; - this.permission.loading = false; - if (hasRight) { - callback && callback(); - } - }).catch(error => {}); - } - - TOP = { - showDropIcon: true, - iconBgcolor: '#217346', - icon: , - title: getLabel('505561', "假期规则"), - } - - @observable top = { - loading: false, - } - - @observable tConf = []; - @observable rConf = []; - - @action getRightMenu = () => { - api.getRightMenu().then(data => { - const { - btnMenu - } = data; - - const { - tConf, - rConf - } = this.filter(btnMenu); - - this.tConf = tConf; - this.rConf = rConf; - }, error => {}) - } - - filter = (datas) => { - let tConf, rConf; - tConf = datas.filter(item => { - var bool = false; - ['isTop', 'isBatch'].forEach(prop => { - const b = parseInt(item[prop]); - if (b) { - bool = true - } - }); - - return bool - }) - - rConf = datas; - - return { - tConf, - rConf - } - } - - @computed get topButtons() { - return this.tConf.map((item, index) => { - const { - menuFun, - menuName - } = item; - - return ( - - ) - }); - } - - @computed get dropMenuDatas() { - return this.rConf.map((item, index) => { - const { - menuFun, - menuName, - menuIcon - } = item; - - return { - key: index.toString(), - disabled: this.menuStatus[index], - icon: , - content: menuName, - onClick: () => this[menuFun]() - } - }); - } - - get menuStatus() { - const { - comsWeaTableStore - } = this.table, { - loading, - selectedRowKeys - } = comsWeaTableStore; - - return [loading, selectedRowKeys.length === 0]; - } - - new = () => { - this.dialog.title = getLabel(505562, '新建假期规则'); - this.dialogType = '1'; - this.dialog.visible = true; - this.getLeaveRulesForm(); - } - - batchDelete = () => { - let _this = this; - confirm({ - title: getLabel('131329', '信息确认'), - content: getLabel('385625', '确定要删除选择的记录吗?'), - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - const { - comsWeaTableStore - } = _this.table, { - selectedRowKeys - } = comsWeaTableStore; - - api.deleteLeaveRules({ - ruleIds: selectedRowKeys.toString() - }).then(data => { - const { - sign - } = data; - - if (sign === '1') { - message.success(data.message); - _this.getSearchList(); - } else { - message.warning(data.message); - } - }); - }, - onCancel() { - return false; - }, - }); - } - - log = (id, source) => { - const params = { - logSmallType: '3060', - }; - if (source === 'table') { - Object.assign(params, { - targetId: id, - }); - } - window.setLogViewProps(params); - } - - buttonsAds = [getLabel(82529, '搜索'), getLabel(27088, '重置'), getLabel(32694, '取消')]; - - TAB = { - advanceHeight: 130, - hasMask: false, - searchType: ['base', 'advanced'], - setShowSearchAd: bool => this.setShowSearchAd(bool), - onSearch: () => this.onSearch(), - onSearchChange: val => this.onSearchChange(val), - buttonsAd: this.buttonsAds.map((name, index) => { - const type = (index === 0) && "primary"; - let callback; - if (index === 0) { - callback = () => this.onSearch(); - } else if (index === 1) { - callback = () => this.tab.form.resetConditionValue(); - } else { - callback = this.setShowSearchAd - } - return - }) - } - - @observable tab = { - showSearchAd: false, - form: new WeaForm() - } - - @computed get searchsBaseValue() { - const { - form - } = this.tab; - return form.getFormParams().ruleName; - } - - @action setShowSearchAd = (bool) => { - this.tab.showSearchAd = bool; - } - - onSearch = () => { - this.getSearchList(); - this.setShowSearchAd(false); - } - - onSearchChange = (val) => { - const { - form - } = this.tab; - - form.updateFields({ - ruleName: { - value: val - } - }); - - } - - @action getSearchForm = () => { - api.getSearchCondition().then(data => { - const { - condition - } = data; - - this.tab.form = new WeaForm(); - this.tab.form.setCondition(condition); - this.getSearchList(); - }, error => {}) - } - - TABLE = { - hasOrder: true, - needScroll: true, - } - - dialogType = '1'; - - ruleId = ''; - - @observable table = { - comsWeaTableStore: new TableStore(), - } - - @action getSearchList = () => { - api.getSearchList({ - ...this.tab.form.getFormParams() - }).then(data => { - const { - sessionkey - } = data; - this.table.comsWeaTableStore = new TableStore(); - this.table.comsWeaTableStore.getDatas(sessionkey, 1); - }, error => {}) - } - - @action onTableTdClick = (id) => { - this.dialog.title = getLabel(505563, '编辑假期规则'); - this.dialogType = '2'; - this.ruleId = id; - this.dialog.visible = true; - this.getLeaveRulesForm(id); - } - - del = (id) => { - let _this = this; - confirm({ - title: getLabel('131329', '信息确认'), - content: getLabel('83877', '确定要删除吗?'), - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - api.deleteLeaveRules({ - ruleIds: id - }).then(data => { - const { - sign - } = data; - - if (sign === '1') { - message.success(data.message); - _this.getSearchList(); - } else { - message.warning(data.message); - } - }); - }, - onCancel() { - return false; - }, - }); - } - - DIALOG = { - hasScroll: true, - icon: 'icon-coms-hrm', - iconBgcolor: '#217346', - onCancel: () => { - this.dialog.visible = false; - this.resetBalanceConversionRules(); - }, - style: { - width: 700, - height: 650 - }, - moreBtn: { - datas: [] - }, - } - - @computed get dialogButtons() { - if (this.dialog.isEnable === '1') { - return [] - } else { - return []; - } - } - - @observable dialog = { - visible: false, - loading: false, - conditions: [], - form: new WeaForm(), - date: new Date(), - calcMethod: [], - distributionMode: [], - isEnable: '1', - title: '', - } - - @action getLeaveRulesForm = (id) => { - this.dialog.loading = true; - - let params; - if (id !== undefined) { - params = { - ruleId: id, - } - } - api.getLeaveRulesForm(params).then(data => { - const { - condition, - calcMethod, - distributionMode, - unitName, - detailRule, - isEnable, - } = data; - - this.dialog.form = new WeaForm(); - this.dialog.conditions = condition; - this.dialog.form.initFormFields(condition); - this.dialog.loading = false; - this.dialog.calcMethod = calcMethod; - this.dialog.distributionMode = distributionMode; - this.dialog.isEnable = isEnable; - if (id !== undefined) { - this.dialog.title = (isEnable === '1') ? getLabel(505563, '编辑假期规则') : getLabel(505565, '查看假期规则'); - } - this.conversionRules.unit = unitName; - - if (detailRule && detailRule.length > 0) { - const isFH = Object.keys(detailRule[0]).length === 4; - - if (isFH) { - this.setMixBalanceConversionRule(detailRule); - } else { - this.setBalanceConversionRule(detailRule); - } - } - }, error => {}) - } - - validateDialogForm = () => { - const { - form - } = this.dialog, { - scopeType - } = form.getFormParams(); - - window.e9HideFormFieldKeys = []; - - scopeType === '0' && ['scopeValue'].map(key => { - window.e9HideFormFieldKeys.push(key); - }); - - form.validateForm().then(f => { - if (f.isValid) { - this.saveConfirm(); - } else { - f.showErrors(); - this.dialog.date = new Date(); - } - }) - } - - saveConfirm = () => { - let _this = this; - confirm({ - title: getLabel('131329', '信息确认'), - content: getLabel('-1', '保存后会根据规则内容自动调整本年度的员工假期余额,历史年份则需要手动批处理后才会生效。'), - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - _this.saveDialogForm() - }, - onCancel() { - return false; - }, - }); - } - - saveDialogForm = () => { - const { - form - } = this.dialog; - - const params = { - ...form.getFormParams(), - ...this.getConversionRulesParams() - }; - - let func; - if (this.dialogType === '2') { - Object.assign(params, { - ruleId: this.ruleId - }); - func = 'editLeaveRules'; - } else { - func = 'addLeaveRules'; - } - - api[func](params).then(data => { - const { - sign - } = data; - - if (sign === '1') { - message.success(data.message); - this.dialog.visible = false; - this.getSearchList(); - } else { - message.warning(data.message); - } - }, error => {}) - } - - FORMCONFIG = { - classNames: { - expirationMonth: 'hrm-select-short', - annualAmount: 'hrm-holiday-rule-form-input', - }, - dynamicFields: [ - //【应用范围】联动配置项 - { - passiveKey: 'scopeValue', //分部 - activeKey: 'scopeType', //应用范围 - showValue: '1' - }, - //【余额发放方式】联动配置项 - { - passiveKey: 'annualAmount', //每人发放小时数 - activeKey: 'distributionMode', //余额发放方式 - showValue: '4' - }, { - passiveKey: 'priority', //优先级别 - activeKey: 'distributionMode', //余额发放方式 - showValue: '6' - }, { - passiveKey: 'calcMethod', //计算方式 - activeKey: 'distributionMode', //余额发放方式 - showValue: '2,3,6' - }, - //【允许延长有效期】联动配置项 - { - passiveKey: 'extendedDays', //允许延长有效期 - activeKey: 'extensionEnable', //允许延长有效期 - showValue: '1' - }, - //【有效期规则】联动配置项 - { - passiveKey: 'expirationMonth', //失效日期 - activeKey: 'validityRule', //有效期规则 - showValue: '3' - }, { - passiveKey: 'extensionEnable', //允许延长有效期 - activeKey: 'validityRule', //有效期规则 - showValue: '1,2,3' - }, - ], - } - - @computed get staticTips() { - const { - unit - } = this.conversionRules; - - return { - annualAmount: ( -

- {unit ? unit : getLabel(505553,'天')} -

- ), - } - } - - @action getUnitName = (id) => { - api.getUnitName({ - typeId: id - }).then(data => { - const { - unitName - } = data; - this.conversionRules.unit = unitName; - }, error => {}) - } - - @observable renderBlacklist = ['extendedDays', 'expirationDay']; - - @computed get dynamicTips() { - return { - distributionMode: this.dialog.distributionMode, - calcMethod: this.reverseCalcMethod, - }; - } - - @computed get reverseCalcMethod() { - const clone = [...this.dialog.calcMethod]; - - if (clone.length === 0) return clone; - - let _clone = []; - - const first = clone.splice(0, 1); - - clone.forEach((c, i) => { - _clone.push(c); - - if (i === 1) { - _clone.push(first); - } - }); - - return _clone; - } - - @observable conversionRules = { - timeInterval: 1, //时间区间 - balanceConversionRules: [{ - timePoint: 1, - amount: 0, - }, { - timePoint: 1, - amount: 5, - }], - mixBalanceConversionRules: [{ - entryTime: 0, - workYear: 0, - legalAmount: 0, - welfareAmount: 0 - }], - unit: '' - } - - @action changeBalanceConversionRules = (index, value) => { - const val = value ? value : 0; - this.conversionRules.balanceConversionRules[index].amount = val; - } - - @action changeEntryTime = (index, value) => { - const val = value ? value : 0; - this.conversionRules.mixBalanceConversionRules[index].entryTime = val; - } - - @action changeWorkYear = (index, value) => { - const val = value ? value : 0; - this.conversionRules.mixBalanceConversionRules[index].workYear = val; - } - - @action changeLegalAmount = (index, value) => { - const val = value ? value : 0; - this.conversionRules.mixBalanceConversionRules[index].legalAmount = val; - } - - @action changeWelfareAmount = (index, value) => { - const val = value ? value : 0; - this.conversionRules.mixBalanceConversionRules[index].welfareAmount = val; - } - - @action delBalanceConversionRule = (params) => { - const type = params ? params.type : ''; - - this.conversionRules[type === 'mix' ? 'mixBalanceConversionRules' : 'balanceConversionRules'].pop(); - } - - @action setBalanceConversionRule = (balanceConversionRules) => { - this.conversionRules.balanceConversionRules = balanceConversionRules; - } - - @action setMixBalanceConversionRule = (mixBalanceConversionRules) => { - this.conversionRules.mixBalanceConversionRules = mixBalanceConversionRules; - } - - //设置时间间隔区间 - @action setTimeInterval = (value) => { - const val = value ? value : 1; //为空的情况 - - this.conversionRules.timeInterval = val; - } - - //添加余额换算规则 - @action addBalanceConversionRule = (params) => { - const type = params ? params.type : ''; - - if (type === 'mix') { - const { - mixBalanceConversionRules, - } = this.conversionRules; - - const config = { - fields: [], //需要校验的域 - intervals: { - 'entryTime': 1, - 'workYear': 1, - 'legalAmount': 1, - 'welfareAmount': 1 - }, //时间间隔 - datas: mixBalanceConversionRules, - } - - const result = this.add(config); - - this.conversionRules.mixBalanceConversionRules = result - } else { - const { - balanceConversionRules, - timeInterval, - } = this.conversionRules; - - const config = { - fields: ['amount'], - intervals: { - 'timePoint': timeInterval - }, - datas: balanceConversionRules, - msgs: [getLabel('505566', "年假")], - } - - const result = this.add(config); - - this.conversionRules.balanceConversionRules = result - } - } - - add = (config) => { - const { - fields, - intervals, - datas, - msgs - } = config; - - const last = datas[datas.length - 1]; - const clone = [...datas]; - - if (!this.isComplete(fields, datas)) return datas; - - const newData = {}; - - Object.keys(last).map((key, index) => { - if (!fields.includes(key)) { - Object.assign(newData, { - [key]: last[key] + intervals[key], - }); - } else { - Object.assign(newData, { - [key]: last[key] + 1, - }); - } - }); - - clone.push(newData); - - return clone; - - } - - isComplete = (fields, datas) => { - const unfilledRows = []; - - datas.map((data, index) => { - fields.some(field => data[field] === undefined) && unfilledRows.push(index + 1); - }); - - (unfilledRows.length > 0) && message.warning(`${getLabel('505567',"第")} ${unfilledRows.toString()} ${getLabel('27592',"行")}${getLabel('505569',"余额发放")}${getLabel('505570',"天数")}${getLabel('505571',"未填写")}`); - - if (unfilledRows.length > 0) return false; - - return true; - } - - @action resetBalanceConversionRules = () => { - //初始化换算条件 - this.setBalanceConversionRule([{ - timePoint: 1, - amount: 0, - }, { - timePoint: 1, - amount: 5, - }]); - - this.setMixBalanceConversionRule([{ - entryTime: 0, - workYear: 0, - legalAmount: 0, - welfareAmount: 0 - }]); - //重置时间间隔 - ['timeInterval'].map(interval => { - this.conversionRules[interval] = 1; - }); - } - - //获取余额发放规则的参数 - getConversionRulesParams = () => { - const { - form - } = this.dialog, { - distributionMode - } = form.getFormParams(); - - if (!['2', '3', '6'].includes(distributionMode)) return {} - - const { - balanceConversionRules, - mixBalanceConversionRules - } = this.conversionRules; - - const dynamicFormParams = {}; - - if (distributionMode !== '6') { - balanceConversionRules.map((balanceConversionRule, index) => { - ['timePoint', 'amount'].map(v => { - Object.assign(dynamicFormParams, { - [`${v}_${index}`]: balanceConversionRule[v] - }); - }); - }); - } else { - mixBalanceConversionRules.map((mixBalanceConversionRule, index) => { - ['entryTime', 'workYear', 'legalAmount', 'welfareAmount'].map(v => { - Object.assign(dynamicFormParams, { - [`${v}_${index}`]: mixBalanceConversionRule[v] - }); - }); - }); - } - - Object.assign(dynamicFormParams, { - 'detailRuleLen': distributionMode !== '6' ? balanceConversionRules.length : mixBalanceConversionRules.length - }); - - return dynamicFormParams; - } - - - -} - -export const hrmNewHolidayRule = new HrmNewHolidayRule(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/overtimeRule.js b/pc4backstage/hrmAttendance/stores/overtimeRule.js deleted file mode 100644 index 027f557..0000000 --- a/pc4backstage/hrmAttendance/stores/overtimeRule.js +++ /dev/null @@ -1,845 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaForm, - WeaTableNew, -} from 'comsMobx'; -import { - WeaLocaleProvider, -} from 'ecCom'; -import { - Button, - message, -} from 'antd'; -import { - toJS -} from 'mobx'; -import { - fetch, - getMenusCreationConfig, - getTopButtons, - getDropMenuDatas, - confirmation, -} from '../util/save-time-util.js'; -import OvertimeRuleFormStore from './overtimeRuleForm' -import * as asyncFetch from '../apis/overtimeRule'; -import * as timeSelectionApi from '../apis/timeSelection.js'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; - -class HrmOvertimeRule { - //************权限************* - @observable pageAccessPermission = { - hasRight: false, - loading: true, - } - //获取页面权限 - getPermissionInfo = () => { - fetch({ - asyncFetch, - name: 'getHasRight', - logic: (cb) => { - const { - hasRight - } = cb; - - if (hasRight) { - this.pageAccessPermission.hasRight = true; - } - this.pageAccessPermission.loading = false; - } - }); - } - - //*************头部************** - get topComponentStaticProps() { - return { - title: getLabel('505606', "加班规则"), - icon: , - iconBgcolor: '#217346', - showDropIcon: true - } - } - - @observable top = { - btnMenu: [], - } - - //获取按钮、下拉菜单和右键菜单的复合值 - getMenus = () => { - fetch({ - asyncFetch, - name: 'getMenus', - fetchParams: { - tabKey: this.tab.selectedKey - }, - logic: (cb) => { - const { - btnMenu - } = cb; - - this.top.btnMenu = btnMenu; - } - }); - } - - //根据btnMenu,计算出topMenu和rightMenu - @computed get menusCreationConfig() { - const { - btnMenu - } = this.top; - - return getMenusCreationConfig(btnMenu); - } - - //Top组件的按钮 - get topButtons() { - const { - topMenu - } = this.menusCreationConfig; - - return getTopButtons.call(this, { - datas: topMenu, - disabled: this.getMenusState(), - }) - } - - //保存选中的加班规则 - save = () => { - const { - selectedKey - } = this.tab; - - let name, fetchParams; - - if (selectedKey === '0') { - name = 'saveDefault'; - fetchParams = { - ruleId: this.table.checkedRowId - } - callAPI(); - } else { - name = 'saveOvertimeUnit'; - const {form} = this.formElements; - - fetchParams = { - ...form.getFormParams() - } - - form.validateForm().then(f => { - if (f.isValid) { - callAPI() - } else { - f.showErrors(); - //强制刷新表单 - this.forceUpdateForm(); - } - }) - } - - const callAPI = () => fetch({ - asyncFetch, - name, - fetchParams, - logic: (cb) => { - const { - sign - } = cb; - - message[sign === '1' ? 'success' : 'warning'](cb.message); - } - }); - } - //新建 - new = () => { - this.openDialog({ - title: getLabel('505607', "新建加班规则"), - type: 0, //0:代表新建 - }); - } - - //批量删除 - batchDelete = () => { - confirmation.showDelConfirm({ - type: 1, - logic: (type) => this.delOverTimeRule(type), - }); - } - - //显示定制列 - custom = () => { - const { - tableStore - } = this.table; - - ['setColSetVisible', 'tableColSet'].map(f => { - tableStore[f](true); - }); - - } - - log = (id, source) => { - const params = { - logSmallType: (this.tab.selectedKey === '0') ? '3057' : '3058', - }; - if (source === 'table') { - Object.assign(params, { - targetId: id, - }); - } - window.setLogViewProps(params); - } - - //获取右键菜单和top组件下拉菜单的数据 - get dropMenuDatas() { - const { - rightMenu - } = this.menusCreationConfig; - - return getDropMenuDatas.call(this, { - datas: rightMenu, - disabled: this.getMenusState(), - }); - } - - //获取菜单元素的状态值 - getMenusState = () => { - const { - tableStore - } = this.table, { - loading, - selectedRowKeys - } = tableStore; - - const { - selectedKey - } = this.tab; - - if (selectedKey === '0') { - return [loading, selectedRowKeys.length === 0, loading, loading]; - } else { - return [this.formElements.loading]; - } - } - - //***************标签页***************** - get tabStaticProps() { - return { - datas: [{ - key: '0', - title: getLabel('505606', "加班规则") - }, { - key: '1', - title: getLabel('505608', "加班计算单位") - }], - keyParam: 'key', - onChange: (key) => this.setSelectedKey(key), - } - } - - @observable tab = { - selectedKey: '0' - } - - @action setSelectedKey = (key) => { - this.tab.selectedKey = key; - - this.getMenus(); - - if (key === '0') { - this.resetForm(); - } else { - this.getFormMaterial(); - } - } - - resetTab = () => { - this.setSelectedKey('0') - } - - //***************列表***************** - @observable table = { - id: '', - checkedRowId: '', - tableStore: new TableStore(), - } - - //获取列表数据 - getSearchList = () => { - fetch({ - asyncFetch, - name: 'getSearchList', - logic: (cb) => { - const { - sessionkey - } = cb; - - this.table.tableStore.getDatas(sessionkey, 1) - } - }); - } - - //删除加班规则 - delOverTimeRule = (type) => { - const { - id, - tableStore - } = this.table; - - fetch({ - asyncFetch, - name: 'deleteOvertimeRules', - fetchParams: { - ruleIds: (type === 1) ? tableStore.selectedRowKeys.toString() : id, //type等于0 -> 单个删除; type等于1 -> 批量删除 - }, - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - this.getSearchList(); - } else { - message.warning(cb.message); - } - } - }); - } - - //设置当前点击行的ID - @action setSelectedRowId = (id) => { - this.table.id = id; - } - - //设置加班规则选中行的id - @action setCheckedRowId = (id) => { - ['id', 'checkedRowId'].map(v => { - this.table[v] = id; - }); - } - - @action resetTable = () => { - this.table.tableStore = new TableStore(); - } - - //**************弹框**************** - //弹框组件的常量参数 - dialogStaticProps = { - icon: 'icon-coms-hrm', - iconBgcolor: '#217346', - hasScroll: true, - } - - @observable dialog = { - title: '', - visible: false, - type: 0, - } - - //弹框的样式 - get style() { - return { - width: 900, - height: 600 - } - } - - //保存节假日设置信息 - saveOverTimeRules = () => { - const { - form - } = this.formElements, { - id - } = this.table, { - type - } = this.dialog; - - const fetchParams = form.getFormParams(); - - //type等于1代表:编辑加班规则 - (type === 1) && Object.assign(fetchParams, { - ruleId: id - }); - - Object.assign(fetchParams, this.getRestTimeParams()); - - //忽略校验隐藏的必填字段 - this.neglectHiddenField(); - - //校验休息时间 - if (!this.verifyRestTime()) return - - form.validateForm().then(f => { - if (f.isValid) { - this.canOperateForm(false); - - fetch({ - asyncFetch, - name: (type === 0) ? 'addOvertimeRules' : 'editOvertimeRules', - fetchParams, - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - this.closeDialog(); - this.getSearchList(); - } else { - this.canOperateForm(true); - message.warning(cb.message); - } - - } - }); - } else { - f.showErrors(); - //强制刷新表单 - this.forceUpdateForm(); - } - }); - } - - @action canOperateForm = (bool) => { - this.formElements.loading = !bool; - } - - getRestTimeParams = () => { - const params = {}; - - const { - rstTimes, - vacationTimes - } = this.restTime; - - const decorate = (datas, mark) => { - datas.map((time, index) => { - Object.keys(time).map(key => { - Object.assign(params, { - [`${key}${mark}_${index}`]: time[key] - }); - }); - }); - } - - [rstTimes, vacationTimes].map((times, index) => { - const mark = (index === 0) ? 3 : 1; - decorate(times, mark) - }); - - Object.assign(params, { - restTimeLen3: rstTimes.length, - restTimeLen1: vacationTimes.length, - }); - return params; - } - - //校验休息时间 - verifyRestTime = () => { - const { - hasRestTime3, - hasRestTime1 - } = this.formElements.form.getFormParams(), { - rstTimes, - vacationTimes, - } = this.restTime; - - //必填项是否完整 - const isComplete = (datas) => { - for (let i = 0; i < datas.length; i++) { - const { - startTime, - endTime - } = datas[i]; - - if (!startTime || !endTime) { - message.warning(getLabel('505609', "休息时间区间不完整!")); - return false - } - - } - return true - } - - - //判断time是否符合规范 - const isRightTime = (data, index) => { - const { - startTime, - endTime, - } = data; - - const start = startTime.split(':').map(v => parseInt(v)), - end = endTime.split(':').map(v => parseInt(v)); - - if ((start[0] > end[0]) || (start[0] === end[0] && start[1] > end[1])) { - message.warning(`${getLabel('505610', "开始时间不能大于结束时间!")}`); - return false - } - return true; - } - - const isStickToRule = (datas) => { - for (let index = 0; index < datas.length; index++) { - const data = datas[index]; - - if (!isRightTime(data)) return false - } - return true; - } - - //校验【休息日加班】休息时间 - if (hasRestTime3 === '1') { - if (!isComplete(rstTimes) || !isStickToRule(rstTimes)) return false; - } - - //校验【节假日加班】休息时间 - if (hasRestTime1 === '1') { - if (!isComplete(vacationTimes) || !isStickToRule(vacationTimes)) return false; - } - - return true; - } - //忽略校验隐藏的必填字段 - neglectHiddenField = () => { - //重置e9HideFormFieldKeys容器 - window.e9HideFormFieldKeys = []; - - const { - form - } = this.formElements; - - [2, 3, 1].map(v => { - if (form.getFormParams()[`paidLeaveEnable${v}`] === '0') { - ['lenOfOvertime', 'lenOfLeave'].map(key => { - window.e9HideFormFieldKeys.push(`${key}${v}`); - }); - } - }); - - } - - @action forceUpdateForm = () => { - this.formElements.date = new Date(); - } - - @action openDialog = (params) => { - const { - title, - type, - } = params; - - ['title', 'type', 'visible'].map((v, i) => { - this.dialog[v] = (i < 2) ? params[v] : true; - }); - //调用“节假日设置”表单接口 - // this.getFormMaterial(); - } - - @action closeDialog = () => { - //设置弹框隐藏 - this.dialog.visible = false; - //重置表单数据 - this.resetForm(); - //重置休息时间表单元素 - ['rstTimes', 'vacationTimes'].map(type => { - this.resetRestTime(type); - }) - } - - //**************表单**************** - get conversionTip(){ - return ( -

- {`${getLabel('391',"小时")}=1${getLabel('505553',"天")}`} - {`${getLabel('505611',"请假、出差、外出、加班的日折算时长会同时生效")}`} -

- ); - } - - get formConfig (){ - return { - staticTips: { - weekdayHoursToDay: this.conversionTip, - weekendHoursToDay: this.conversionTip, - }, - classNames: { - weekdayHoursToDay: 'hrm-travel-rule-form-input', - weekendHoursToDay: 'hrm-travel-rule-form-input', - hoursToday: 'hrm-holiday-rule-form-input', - timeselection: 'hrm-travel-timeselection', - }, - staticTips: { - hoursToday: ( - {`${getLabel('391',"小时")}=1${getLabel('505553',"天")}`} - ) - }, - dynamicFields: [{ - passiveKey: 'timeselection', //时间选择方式 - activeKey: 'minimumUnit', - showValue: '2', - },{ - passiveKey: 'overtimeConversion', //加班时长折算方式 - activeKey: 'minimumUnit', - showValue: '5,6', - }] - } - } - - @observable formElements = { - conditions: [], - form: new WeaForm(), - loading: true, - date: new Date(), //用来刷新form组件 - minimumUnit: [], - hasTXrules: false, - } - - @observable overtimeConversion5 = [] - @observable overtimeConversion6 = [] - - //获取表单元素提示信息 - @computed get dynamicTips() { - const { form } = this.formElements - const { minimumUnit } = form.getFormParams() - const overtimeConversion = this[`overtimeConversion${minimumUnit}`], - tips = { minimumUnit: this.formElements.minimumUnit } - if (overtimeConversion) { - return Object.assign({}, tips, { overtimeConversion }) - } - return tips - } - - //获取“节假日设置”表单数据 - getFormMaterial = () => { - const { - id - } = this.table, { - type - } = this.dialog, { - selectedKey - } = this.tab; - - let name, fetchParams; - if (selectedKey === '0') { - name = 'getOvertimeRulesForm'; - fetchParams = (type === 1) && { - ruleId: id - } - } else { - name = 'getOvertimeUnitForm' - } - - fetch({ - asyncFetch, - name, - fetchParams, - logic: (cb) => { - const { - condition, - minimumUnit, - restTime3, - restTime1, - hasTXrules, - } = cb; - - this.formElements.hasTXrules = hasTXrules; - - this.handleCondition(condition); - - ['loading', 'conditions', 'form'].map((v, i) => { - if (i < 2) { - this.formElements[v] = (i === 0) ? false : condition - } else { - this.formElements[v].initFormFields(condition); - } - }); - - if (minimumUnit) this.formElements.minimumUnit = minimumUnit; - - if (restTime3) this.restTime.rstTimes = restTime3; - - if (restTime1) this.restTime.vacationTimes = restTime1; - - if (typeof cb == 'object') { - Object.keys(cb).forEach(key => this[key] = cb[key]) - } - - } - }); - } - - //处理condition - handleCondition = (condition) => { - condition.map(c => { - c.items.map(item => { - const { - domkey - } = item; - - const key = domkey[0]; - if (['paidLeaveEnable2', 'paidLeaveEnable3', 'paidLeaveEnable1'].includes(key)) { - item.content = ( - - {`${getLabel('505612',"转为调休余额")}`} - { - !this.formElements.hasTXrules && ( - - { `( ${getLabel('505613',"调休余额规则未设置")} ,`} - {getLabel('505614',"去设置")} - {` )`} - - ) - } - - ) - } - }); - }); - } - - //【去设置】链接的回调函数 - handleHrefClick = (e) => { - e.preventDefault(); - window.open(`/spa/hrm/staticAttendance4engine/engine.html#/attendance/holidayRule`); - } - - //重置表单 - @action resetForm = () => { - ['loading', 'conditions', 'form'].map((v, i) => { - this.formElements[v] = (i === 0) ? true : (i === 1) ? [] : new WeaForm(); - }); - } - - @action handleFormElementsChange = () => { - this.formElements.date = new Date(); - } - - //*************自定义组件-休息时间************** - @observable restTime = { - rstTimes: [{ - startTime: '', - endTime: '', - }], - vacationTimes: [{ - startTime: '', - endTime: '', - }] - } - - @action handleTimePickerChange = (value, rowIndex, colIndex, type) => { - const rowData = this.restTime[type][rowIndex]; - rowData[colIndex === 0 ? 'startTime' : 'endTime'] = value; - } - - @action addRestTime = (type) => { - this.restTime[type].push({ - startTime: '', - endTime: '', - }); - } - - @action delRestTime = (rowIndex, type) => { - this.restTime[type].splice(rowIndex, 1); - } - - @action resetRestTime = (type) => { - this.restTime[type] = [{ - startTime: '', - endTime: '', - }]; - } - - //*************OvertimeRule************** - //重置页面 - refreshPage = () => { - this.resetTab(); - this.getSearchList(); - } - - /** 选项名称定义 */ - @observable timeSelectionDialogVisible = false; - @computed get timeSelectionDialog(){ - return { - key: new Date().getTime(), - ...ecCom.WeaTools.getIconBGC('hrm'), - style: { - height: 200 - }, - title: getLabel('513303','选项名称定义'), - hasScroll: true, - visible: this.timeSelectionDialogVisible, - buttons: [ - , - ], - moreBtn: { - datas: [ - { - key: "1", - icon: , - content: getLabel(30986, '保存'), - onClick: () => this.saveDefForm() - }, - ] - }, - onCancel: () => { - this.timeSelectionDialogVisible = false; - } - } - } - - @action getDefForm = (selectiontype) => { - this.selectiontype = selectiontype; - const {form} = this.formElements; - const {minimumUnit} = form.getFormParams(); - const params = {selectiontype, minimumUnit}; - timeSelectionApi.getTimeSelectionForm(params).then(data => { - if(data.status == '1'){ - const {condition: fields} = data; - this.formTarget = { - fields, - form: new WeaForm() - }; - this.formTarget.form.initFormFields(fields); - this.timeSelectionDialogVisible = true; - }else{ - message.error(data.message); - } - }) - } - - @action saveDefForm = () => { - const {form} = this.formElements; - const {minimumUnit} = form.getFormParams(); - const params = {selectiontype: this.selectiontype, minimumUnit}; - - const formData = this.formTarget.form.getFormParams(); - Object.assign(params, {...formData}); - - timeSelectionApi.saveTimeSelectionForm(params).then(data => { - if(data.status == '1'){ - this.timeSelectionDialogVisible = false; - }else{ - message.error(data.message); - } - }) - } - - - @observable overtimeRuleFormStore = new OvertimeRuleFormStore({ ...this, api: { ...asyncFetch, ...timeSelectionApi } }) - - -} - -const hrmOvertimeRule = new HrmOvertimeRule(); - -export { - hrmOvertimeRule -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/overtimeRuleForm.js b/pc4backstage/hrmAttendance/stores/overtimeRuleForm.js deleted file mode 100644 index f94edca..0000000 --- a/pc4backstage/hrmAttendance/stores/overtimeRuleForm.js +++ /dev/null @@ -1,1177 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx' -import { Fragment } from 'react' -import { - WeaForm, - WeaSwitch, -} from 'comsMobx' -import { - WeaFormItem, - WeaSelect, - WeaCheckbox, - WeaHelpfulTip, - WeaInputNumber, - WeaLocaleProvider, -} from 'ecCom' -import { FormStore, DialogStore } from '../public/valhalla/stores/index.js' -import OvertimeRule from '../components/overtimeRule/OvertimeRule.js' -import { flatten,debounce } from 'lodash' -import { Button, message } from 'antd' -import { i18n } from '../public/i18n.js' -import {addContentPath} from '../util/index.js' -const getLabel = WeaLocaleProvider.getLabel - -export default class OvertimeRuleFormStore { - constructor(store) { - this.parentStore = store - } - //overtimeEnable:允许加班 | computingMode:加班方式计算 | startTime:加班起算时间 | before_startTime:加班起算时间 - //minimumLen:最小加班时长 | paidLeaveEnableType:加班补偿 | paidLeaveEnableDefaultType:默认加班补偿规则 | paidLeaveEnableFlowType:根据员工在加班流程上选择的加班补偿类型进行补偿 - //paidLeaveEnable:转为调休余额 | lenOfOvertime:加班时长 | lenOfLeave:调休时长 | has_cut_point:自定义跨天加班归属分界点 - //cut_point:自定义跨天加班归属分界点 | restTimeType2:排除休息时间 - - errorRefs = {} - domkeySuffixs = ['2', '3', '1'] //2、3、1分别标识工作日、休息日和节假日 - restTimeTypeShowname = [] //存放【排除休息时间】下拉框选项的showname值 - paidLeaveEnableTypeShowname = [] //存放【加班补偿】下拉框选项的showname值 - paidLeaveEnableDefaultType2Option = [] //【默认加班补偿规则】下拉选项 - paidLeaveEnableFlowType2Option = [] //【根据员工在加班流程上选择的加班补偿类型进行补偿】下拉选项 - //自定义渲染表单元素domkey值的集合 - customRenderKeyList = flatten(this.domkeySuffixs.map(v => ['startTime', 'before_startTime', 'minimumLen', 'paidLeaveEnable', 'lenOfOvertime', 'lenOfLeave', 'paidLeaveEnableDefaultType', 'paidLeaveEnableFlowType', 'cut_point', 'restTimeType'].map(key => `${key}${v}`))) - - @observable demonstration = [] - @observable overtimeCompensationRuleDefault2 = [] //工作日加班补偿规则 - @observable overtimeCompensationRuleFlow2 = [] - @observable overtimeCompensationRuleDefault3 = [] //休息日... - @observable overtimeCompensationRuleFlow3 = [] - @observable overtimeCompensationRuleDefault1 = [] //节假日... - @observable overtimeCompensationRuleFlow1 = [] - @observable restTime2 = [] //工作日排除休息时间 - @observable overtime2 = [] - @observable restTime3 = [] //休息日... - @observable overtime3 = [] - @observable restTime1 = [] //节假日... - @observable overtime1 = [] - @observable formStore = new FormStore(this.parentStore.api.getOvertimeRulesForm, this) - @observable dialogStore = new DialogStore(this) - - renderCustomField = (configs, form) => { - const { customRenderItem } = this.formStore - - return ( - configs.map(config => { - const { key, label } = config - const item = customRenderItem[key] - if (key && this.customRenderKeyList.includes(key)) { - return this.renderFormItem(form, item) - } else { - return {label} - } - }) - ) - } - - get DialogButtons() { - return [ - - ] - } - - get MoreBtn() { - return { - datas: [] - } - } - - get computingModeTip() { - return { - computingMode2: ['528765', '528766', '528767'].map(n => i18n.label[n]()), - computingMode3: [ - i18n.label['528768']() - ], - computingMode1: [ - i18n.label['528769']() - ] - } - } - - get OtherComponents() { - const { form } = this.formStore - const { has_cut_point2 } = form.getFormParams() - const minute = { label: `${i18n.label['528770']().replace('{param}', '')}` } - - return { - //加班方式计算 - computingMode2: (item, form) => { - const afterWork = [ //最后一次下班 - // { label: `${i18n.label['528771']()}: ` }, - { label: i18n.label['528772']() }, - { key: 'startTime2' }, - minute, - { label: `, ${i18n.label['528773']()}` } - ], - beforeWork = [ //最早一次上班 - { label: i18n.label['528774']() }, - { key: 'before_startTime2' }, - { label: `${i18n.label['528775']().replace('{param}', '')}, ` }, - { label: i18n.label['528776']() } - ] - - return ( -
- {`${i18n.label['528771']()}: `} -
-

{this.renderCustomField(afterWork, form)}

- {(has_cut_point2 == '1') && ( -

{this.renderCustomField(beforeWork, form)}

- )} -
- {this.renderMinimumLen(item, form, '2')} -
- ) - }, - computingMode3: (item, form) => ( -
- {this.renderMinimumLen(item, form, '3')} -
- ), - computingMode1: (item, form) => ( -
- { this.renderMinimumLen(item, form, '1')} -
- ), - //自定义跨天加班归属分界点 - has_cut_point2: (item, form) => this.renderCutPoint(item, form, '2'), - has_cut_point3: (item, form) => this.renderCutPoint(item, form, '3'), - has_cut_point1: (item, form) => this.renderCutPoint(item, form, '1'), - //排除休息时间 - hasRestTime2: (item, form) => this.renderRestTime(item, form, '2'), - hasRestTime3: (item, form) => this.renderRestTime(item, form, '3'), - hasRestTime1: (item, form) => this.renderRestTime(item, form, '1') - } - } - - get linkageConfigs() { - return flatten( - this.domkeySuffixs.map(suffix => [ - { - passiveKey: `computingMode${suffix}`, - activeKey: `overtimeEnable${suffix}`, - showValue: '1' - }, - { - passiveKey: `paidLeaveEnableType${suffix}`, - activeKey: `overtimeEnable${suffix}`, - showValue: '1' - }, - { - passiveKey: `hasRestTime${suffix}`, - activeKey: `overtimeEnable${suffix}`, - showValue: '1' - } - ]) - ) - } - - renderFormItem = (form, item) => { - return ( - - - - ) - } - - /** - * 概述:获取自定义cut_point表单元素 - */ - renderCutPoint = (item, form, type) => { - const fragments = [ - { label: i18n.label['528777']() }, - { key: '' }, - ], - //【自定义跨天加班归属分界点】开关值 - has_cut_point = form.getFormParams()[`has_cut_point${type}`] - - fragments[1].key = `cut_point${type}` - - return ( - - {(has_cut_point == '1') && this.renderCustomField(fragments, form)} - this.showDemonstration(type)}>{i18n.label['528778']()} - - ) - } - - renderRestTime = (item, form, type) => { - const hasRestTime = form.getFormParams()[`hasRestTime${type}`] - const { customRenderItem } = this.formStore - if (hasRestTime == '1') { - return ( - - ) - } - } - - /** - * 概述:获取自定义minimumLen表单元素 - */ - renderMinimumLen = (item, form, type) => { - const fragments = [ - { label: `${i18n.label['528779']()}: ` }, - { key: '' }, - { label: `${i18n.label['528770']().replace('{param}', '')}` }, - { label: i18n.label['528780']() } - ] - fragments[1].key = `minimumLen${type}` - - return ( -

{this.renderCustomField(fragments, form)}

- ) - - - } - - @action getForm = () => { - const fs = this.formStore - const { dialog: { type }, table: { id } } = this.parentStore - const params = {} - fs.setFormConfig({ - isCustomRender: true, - isCenter: true, - customRenderKeyList: this.customRenderKeyList, - linkageConfigs: this.linkageConfigs, - }) - if (type == 1) { - params.ruleId = id - } - fs.fetchForm(params, this.extractData, this.afterFormInit) - } - - saveForm = () => { - const { form, validateForm } = this.formStore - const formParams = form.getFormParams() - - window.e9HideFormFieldKeys = flatten(this.domkeySuffixs.map(suffix => ['lenOfOvertime', 'lenOfLeave'].map(prefix => `${prefix}${suffix}`))) - - - const getPaidLeaveEnableTypeRule = (suffix) => { - const { - paidLeaveEnableTypeValue, - paidLeaveEnableValue, - paidLeaveEnableDefaultTypeValue, - paidLeaveEnableFlowTypeValue - } = this.getFieldValue(suffix, ['paidLeaveEnableType', 'paidLeaveEnable', 'paidLeaveEnableDefaultType', ' paidLeaveEnableFlowType']) - - if (paidLeaveEnableTypeValue == '1') { - if (paidLeaveEnableValue == '1') { - if (paidLeaveEnableDefaultTypeValue == '1') { - return [] - } else { - return this[`overtimeCompensationRuleDefault${suffix}`] - } - } else { - return [] - } - } else { - if (paidLeaveEnableFlowTypeValue == '1') { - return [] - } else { - return this[`overtimeCompensationRuleFlow${suffix}`] - } - } - } - - const getRestTimeRule = (suffix) => { - const { - hasRestTimeValue, - restTimeTypeValue - } = this.getFieldValue(suffix, ['hasRestTime', 'restTimeType']) - - if (hasRestTimeValue == '1') { - if (restTimeTypeValue == '1') { - return this[`restTime${suffix}`].map(data => ({ startTime: data.startTime, endTime: data.endTime })) - } else { - return this[`overtime${suffix}`].map(data => ({ overtime: data.overtime, exclude: data.exclude })) - } - } else { - return [] - } - } - - const getRules = () => { - const params = {} - this.domkeySuffixs.forEach(suffix => { - Object.assign(params, { - [`paidLeaveEnableTypeRule${suffix}`]: JSON.stringify(getPaidLeaveEnableTypeRule(suffix).filter(data => Object.values(data).every(val => val !== ''))), - [`restTimeRule${suffix}`]: JSON.stringify(getRestTimeRule(suffix).filter(data => Object.values(data).every(val => val !== ''))) - }) - }) - return params - } - - validateForm(form).then(() => { - if (this.validateRule()) { - const params = Object.assign({}, form.getFormParams(), getRules()) - const { table: { id }, dialog: { type } } = this.parentStore - if (type == 1) { - params.ruleId = id - } - const apiName = (type == 1) ? 'editOvertimeRules' : 'addOvertimeRules' - this.parentStore.api[apiName](params).then(res => { - const { api_status, sign } = res - const msg = res.message - if (api_status) { - if (sign == '1') { - message.success(msg) - this.parentStore.getSearchList() - this.parentStore.dialog.visible = false - } else { - message.warning(msg) - } - } else { - message.error(msg) - } - }) - } - }) - } - - getFieldValue = (suffix, prefixs) => { - const { form } = this.formStore - const values = {} - prefixs.forEach(prefix => { - values[`${prefix}Value`] = form.getFormParams()[`${prefix}${suffix}`] - }) - return values - - } - - validateRule = () => { - const { form } = this.formStore - const formParams = form.getFormParams() - const requiredWarning = () => { message.warning(i18n.label['528781']()) } - // const repeatWarning = () => { message.warning(i18n.label['528763']()) } - const repeatWarning = () => {} - // const scopeWarning = () => { message.warning(i18n.label['528782']()) } - const scopeWarning = () =>{} - for (let i = 0; i < this.domkeySuffixs.length; i++) { - const suffix = this.domkeySuffixs[i] - const prefixs = ['overtimeEnable','paidLeaveEnableType', 'paidLeaveEnable', 'paidLeaveEnableDefaultType', 'paidLeaveEnableFlowType', 'hasRestTime', 'restTimeType', 'lenOfOvertime', 'lenOfLeave'] - const {overtimeEnableValue, paidLeaveEnableTypeValue, paidLeaveEnableValue, paidLeaveEnableDefaultTypeValue, paidLeaveEnableFlowTypeValue, hasRestTimeValue, restTimeTypeValue, lenOfOvertimeValue, lenOfLeaveValue } = this.getFieldValue(suffix, prefixs) - - if (overtimeEnableValue != '1') { - continue - } - //加班补偿 - if ( - (paidLeaveEnableTypeValue == '1' && paidLeaveEnableValue == '1') || - paidLeaveEnableTypeValue == '2' - ) { - const defaultFlowTypeValue = (paidLeaveEnableTypeValue == '1') ? paidLeaveEnableDefaultTypeValue : paidLeaveEnableFlowTypeValue - if (defaultFlowTypeValue == '1') { - if ([lenOfOvertimeValue, lenOfLeaveValue].some(v => !v && v !== 0)) { - requiredWarning() - return - } - } else { - const defaultFlowValue = (paidLeaveEnableTypeValue == '1') ? paidLeaveEnableDefaultTypeValue : paidLeaveEnableFlowTypeValue, - ruleType = `defaultFlow${defaultFlowValue}`, - rules = this.getTargetRules(suffix, ruleType) - - if (!this.isRuleComplete(rules)) { - requiredWarning() - return - } - - if (!this.checkDatasRepeat(rules, suffix, ruleType)) { - repeatWarning() - return - } - - } - } - - //排除休息时间 - if (hasRestTimeValue == '1') { - const ruleType = (restTimeTypeValue == '1') ? 'restTime' : 'overtime', - rules = this.getTargetRules(suffix, ruleType) - - if (!this.isRuleComplete(rules)) { - requiredWarning() - return - } - - if (restTimeTypeValue == '1') { - if (!this.checkRestTime(rules)) { - return - } - } else { - if (!this.checkDatasRepeat(rules, suffix, ruleType)) { - repeatWarning() - return - } - - if (!this.checkExcludeMoreThanOvertime(rules, suffix, ruleType)) { - scopeWarning() - return - } - } - - - } - } - - return true - } - - isRuleComplete = (datas) => { - return datas.every(data => { - return Object.keys(data).filter(key => !['disabled', 'errorTip'].includes(key)).map(key => data[key]).every(val => (val || val === 0)) - }) - } - - checkRestTime = (rules) => { - const splitTime = (rule) => { - return flatten(Object.values(rule).filter(val => typeof val == 'string' && val.includes(':')).map(val => val.split(':').map(v => parseInt(v)))) - - } - for (let i = 0; i < rules.length; i++) { - const [startHour, startMinute, endHour, endMinute] = splitTime(rules[i]) - if ( - (startHour > endHour) || - (startHour == endHour && startMinute > endMinute) - ) { - message.warning(i18n.label['528783']()) - return - } - - for (let j = i + 1; j < rules.length; j++) { - const [startHour1, startMinute1, endHour1, endMinute1] = splitTime(rules[j]) - if ( - (endHour < startHour1) || - (endHour == startHour1 && endMinute <= startMinute1) || - (startHour > endHour1) || - (startHour == endHour1 && startMinute >= endMinute1) - ) { } else { - message.warning(i18n.label['528784']()) - return - } - } - } - - return true - } - - extractData = (datas) => { - const getShowname = (item) => { - return item.options.map(option => option.showname) - } - const extendTitle = (title) => { - return ( - - {title} - {/* i18n.label[num]()).map(label =>

{label}

)} width={700}/> */} -
- ) - } - datas.condition.forEach((c, i) => { - if (i > 0) { - c.title = extendTitle(c.title) - } - c.items.forEach(item => { - const [key] = item.domkey - if (key == 'paidLeaveEnableType2') { - this.paidLeaveEnableTypeShowname = getShowname(item) - } - if (['paidLeaveEnableDefaultType2', 'paidLeaveEnableFlowType2'].includes(key)) { - this[`${key}Option`] = item.options - } - if (key == 'restTimeType2') { - this.restTimeTypeShowname = getShowname(item) - } - - }) - }) - - Object.keys(datas).forEach(key => this[key] = datas[key]); - - const isRest = (arr) => { - return arr.some(data => data.startTime) - } - this.domkeySuffixs.forEach(suffix => { - const target = datas[`restTimeRule${suffix}`] - - if (Array.isArray(target)) { - ['restTime' , 'overtime'].forEach(key => { - this[`${key}${suffix}`] = ( (isRest(target) && key == 'restTime') || (!isRest(target) && key == 'overtime') ) ? target : [] - }) - } else { - ['restTime', 'overtime'].forEach(v => { - this[`${v}${suffix}`] = [] - }) - } - }) - } - - afterFormInit = () => { - this.handleExcludeRestTimeRule() - - const { form } = this.formStore - const formParams = form.getFormParams() - - this.domkeySuffixs.forEach(suffix => { - const target = this[`paidLeaveEnableTypeRule${suffix}`], - paidLeaveEnableTypeValue = formParams[`paidLeaveEnableType${suffix}`] - - if (Array.isArray(target)) { - if (paidLeaveEnableTypeValue == '2') { - this[`overtimeCompensationRuleFlow${suffix}`] = target - } else { - this[`overtimeCompensationRuleDefault${suffix}`] = target - } - } - }) - - this.handleConditionItemOption() - - } - - /** - * 概述:修改【加班补偿】等表单元素的options - */ - handleConditionItemOption = () => { - const { conditions, form, customRenderItem } = this.formStore - const formParams = form.getFormParams() - - conditions.forEach(c => c.items.forEach(item => { - const [domkey] = item.domkey; - - this.domkeySuffixs.map(v => { - const prefixs = [ - 'overtimeEnable', 'paidLeaveEnableType', 'paidLeaveEnable', - 'lenOfOvertime', 'lenOfLeave', 'paidLeaveEnableDefaultType', - 'paidLeaveEnableFlowType', 'computingMode', 'restTimeType' - ], - keys = prefixs.map(key => `${key}${v}`), - paidLeaveEnableTypeKey = keys[1], - computingModeKey = keys[7], - restTimeTypeKey = keys[8] - - const [ - overtimeEnableValue, paidLeaveEnableTypeValue, paidLeaveEnableValue, - lenOfOvertimeValue, lenOfLeaveValue, paidLeaveEnableDefaultTypeValue, - paidLeaveEnableFlowTypeValue, computingModeValue, restTimeTypeValue - ] = keys.map(key => formParams[key]) - - //加班补偿 - if (domkey == paidLeaveEnableTypeKey) { - item.options.forEach((option, index) => { - const originName = this.paidLeaveEnableTypeShowname[index] - - //当选择【无需审批,根据打卡时间计算加班时长】时,此项设置置灰不可选 - option.disabled = (computingModeValue == '3' && option.key == '2') ? true : false - - //修改加班补偿选中option的showname - if (option.key == paidLeaveEnableTypeValue) { - const isOcSelectShow = (paidLeaveEnableTypeValue == '1' && paidLeaveEnableValue == '1') || paidLeaveEnableTypeValue == '2', - defaultFlowTypeOptions = (paidLeaveEnableTypeValue == '1') ? this.paidLeaveEnableDefaultType2Option : this.paidLeaveEnableFlowType2Option, - defaultFlowTypeValue = (paidLeaveEnableTypeValue == '1') ? paidLeaveEnableDefaultTypeValue : paidLeaveEnableFlowTypeValue, - isCpShow = (paidLeaveEnableTypeValue == '1' && paidLeaveEnableDefaultTypeValue == '1') || (paidLeaveEnableTypeValue == '2' && paidLeaveEnableFlowTypeValue == '1') - - - const cName = this.getRuleContainerName(paidLeaveEnableTypeValue, v, 'paidLeaveEnableType'), - ocDatas = this[cName], - ruleType = (ocDatas.length && ocDatas[0].work !== undefined) ? 'defaultFlow2' : 'defaultFlow3' - - option.showname = ( -
- {originName} -
-

- {/*加班补偿类型为【默认加班补偿规则】,显示【转为调休余额】*/} - {paidLeaveEnableTypeValue == '1' && this.renderPaidLeaveEnable(keys[2], paidLeaveEnableValue)} - {/*如果没有设置调休余额规则,则选中后需联动显示调休余额规则设置提示*/} - {!this.hasTXrules && ( {`${i18n.label['528785']()}, `}{i18n.label['528786']()} )} -

- {/*加班补偿方式下拉框是否显示*/} - {isOcSelectShow && this.renderPaidLeaveEnableDefaultFlowType(defaultFlowTypeValue, defaultFlowTypeOptions, (paidLeaveEnableTypeValue == '1') ? keys[5] : keys[6])} - { - isOcSelectShow && ( - isCpShow ? - this.renderCompensationProportion(v) : - this.renderRule(ruleType, ocDatas, v) - ) - } -
-
- ) - } else { - option.showname = originName - } - }) - } - - //加班方式计算 - if (domkey == computingModeKey) { - const { showname } = item.options[2] - item.options[2].showname = this.renderHelpfulTip(computingModeKey, showname) - } - - //排除休息时间 - if (domkey == restTimeTypeKey) { - item.options.forEach((option, index) => { - const { key } = option - option.showname = this.renderRestTimeTypeRule(key, this.restTimeTypeShowname[index], v) - }) - } - }) - })) - } - - /** - * 概述:按加班时长比例转调休时长 - */ - renderCompensationProportion = (groupType) => { - const { form } = this.formStore - const formParams = form.getFormParams() - const [overtimeValue, leaveValue] = ['lenOfOvertime', 'lenOfLeave'].map(v => formParams[`${v}${groupType}`]) - - return ( -

- {i18n.label['528787']()} - {['lenOfOvertime', 'lenOfLeave'].map(key => { - const value = (key == 'lenOfOvertime') ? overtimeValue : leaveValue - - return ( - - this.updateFormFields(val, `${key}${groupType}`)} min={0} precision={2} viewAttr={3} /> - {key == 'lenOfOvertime' && : } - - ) - })} - {`${i18n.label['528788']().replace(/{Param1}|{param1}/, overtimeValue).replace('{param2}', leaveValue)}`} -

- - ) - } - - renderRule = (ruleType, datas, groupType) => { - const width = { defaultFlow2: 430, defaultFlow3: 500, restTime: 430, overtime: 430 }[ruleType], - delIndex = { defaultFlow2: 2, defaultFlow3: 1, restTime: 0, overtime: 1 }[ruleType] - - const { form } = this.formStore - let hasBtn - if (['defaultFlow2', 'defaultFlow3'].includes(ruleType)) { - hasBtn = true - } else { - const restTimeTypeValue = form.getFormParams()[`restTimeType${groupType}`] - hasBtn = ((ruleType == 'restTime' && restTimeTypeValue == '1') || (ruleType == 'overtime' && restTimeTypeValue == '2')) ? true : false - } - - return ( - - ) - } - - /** - * 概述:加班补偿方式下拉框 - */ - renderPaidLeaveEnableDefaultFlowType = (value, options, key) => { - return ( - this.updateFormFields(val, key)} - /> - ) - } - - /** - * 概述:转为调休余额 - */ - renderPaidLeaveEnable = (key, value) => { - return ( - - this.updateFormFields(val, key)} - /> - {i18n.label['528789']()} - - ) - } - - /** - * 概述:添加提示语 - */ - renderHelpfulTip = (computingModeKey, showname) => { - if (typeof showname == 'string') { - return ( - - {showname} -

{tip}

)} /> -
- ) - - } else { - return showname - } - - } - - /** - * 概述:渲染【设置休息时间】和【根据加班时长扣除】规则 - */ - renderRestTimeTypeRule = (key, showname, groupType) => { - const cName = this.getRuleContainerName(key, groupType, 'restTimeType'), - datas = this[cName], - ruleType = (key == '1') ? 'restTime' : 'overtime' - - return ( -
- {showname} - {this.renderRule(ruleType, datas, groupType)} -
- ) - } - - /** - * 概述:修改表单元素触发的回调函数 - */ - handleFormChange = (datas) => { - const key = Object.keys(datas)[0], - needToHandleConditionKeys = flatten(this.domkeySuffixs.map(v => ['paidLeaveEnableType', 'paidLeaveEnable', 'paidLeaveEnableDefaultType', 'paidLeaveEnableFlowType', 'computingMode', 'lenOfOvertime', 'lenOfLeave', 'restTimeType'].map(key => `${key}${v}`))), - needToInitOvertimeCompensationRuleKeys = flatten(this.domkeySuffixs.map(v => ['paidLeaveEnableDefaultType', 'paidLeaveEnableFlowType'].map(key => `${key}${v}`))) - - const { form } = this.formStore - const formParams = form.getFormParams() - - if (key.includes('paidLeaveEnableType') || key.includes('paidLeaveEnableDefaultType') ||key.includes('paidLeaveEnableFlowType') ) { - const suffix = key.slice(-1); - ['lenOfOvertime', 'lenOfLeave'].map(v => { - form.updateFields({ - [`${v}${suffix}`] : '1' - }) - }) - } - - //切换转调休方式时,需要初始化规则 - if (needToInitOvertimeCompensationRuleKeys.includes(key)) { - this.initOvertimeCompensationRule(datas[key], key.slice(-1)) - } - - //当选择【无需审批,根据打卡时间计算加班时长】时,自动选中【默认加班补偿规则】。 - if (this.domkeySuffixs.map(v => `computingMode${v}`).includes(key)) { - const { value } = datas[key] - if (value === '3') { - form.updateFields({ - [`paidLeaveEnableType${key.slice(-1)}`]: '1' - }) - } - } - - //【按加班的时间段设置转调休时长】的加班补偿方式与【根据加班时长扣除】休息时间的方式不可同时存在! - if (this.domkeySuffixs.map(v => `paidLeaveEnableDefaultType${v}`).includes(key)) { - if (datas[key] === '3') { - const _key = `restTimeType${key.slice(-1)}` - if (formParams[_key] == '2') { - message.warning(i18n.label['528790']()) - } - form.updateFields({ - [_key]: '1' - }) - this.handleExcludeRestTimeRule() - } - } - - //切换【加班补偿】选项,重置下拉框中的值 - if (this.domkeySuffixs.map(v => `paidLeaveEnableType${v}`).includes(key)) { - const groupType = key.slice(-1), - paidLeaveEnableTypeValue = formParams[`paidLeaveEnableType${groupType}`] - form.updateFields({ - [`${paidLeaveEnableTypeValue == '1' ? 'paidLeaveEnableFlowType' : 'paidLeaveEnableDefaultType'}${groupType}`]: '1' - }) - } - - if (needToHandleConditionKeys.includes(key)) { - this.handleConditionItemOption() - } - //【设置休息时间】和【根据加班时长扣除】选项切换 - if (this.domkeySuffixs.map(v => `restTimeType${v}`).includes(key)) { - this.handleExcludeRestTimeRule() - } - } - - /** - * 概述:更新自定义表单元素(非WeaSwicth渲染)的值 - */ - updateFormFields = (val, key) => { - if (val === undefined) return - const { form } = this.formStore - const data = { - [key]: val + '' - } - form.updateFields(data) - this.handleFormChange(data) - } - - /** - * 概述:初始化加班补偿规则(工作日、休息日和节假日分别只能存在一种加班补偿规则) - */ - initOvertimeCompensationRule = (value, groupType) => { - const { form } = this.formStore - const formParams = form.getFormParams(); - - this.domkeySuffixs.forEach(v => { - if (v == groupType) { - const paidLeaveEnableTypeValue = formParams[`paidLeaveEnableType${v}`] - - this[this.getRuleContainerName(paidLeaveEnableTypeValue, v, 'paidLeaveEnableType')] = (value == '2') ? [{ - work: 0, - rest: 0 - }, { - work: 1, - rest: 1 - }] : [{ - time: '19:00', - left: 1, - right: 1 - }] - } - }) - } - - /** - * 概述:处理【排除休息时间】规则 - * 当【根据加班时长扣除】没有设置项时,默认添加一条规则 - * 当restTimeTypeValue等于1时,【根据加班时长扣除】所有设置项禁用;当restTimeTypeValue等于2时,则反之 - */ - handleExcludeRestTimeRule = () => { - const { form } = this.formStore - this.domkeySuffixs.map(suffix => { - const restTimeTypeValue = form.getFormParams()[`restTimeType${suffix}`] - - const restTimeArr = this[`restTime${suffix}`], - overTimeArr = this[`overtime${suffix}`] - - if (!restTimeArr.length) { - restTimeArr.push({ - startTime: '', - endTime: '' - }) - } - - if (!overTimeArr.length) { - overTimeArr.push({ - overtime: 5, - exclude: 1 - }) - } - ['restTime', 'overtime'].forEach((name, index) => { - this[`${name}${suffix}`].forEach(item => { - item.disabled = ((restTimeTypeValue == '1' && index == 1) || (restTimeTypeValue == '2' && index == 0)) ? true : false - item.viewAttr = item.disabled ? 2 : 3 - }) - }) - }) - } - - - handleRuleInputNumberChange = (val, index, key, groupType, ruleType) => { - const rules = this.getTargetRules(groupType, ruleType) - rules[index][key] = val - - // if (['work', 'time', 'overtime'].includes(key)) { - // val && this.checkDatasRepeat(rules, groupType, ruleType) - // } - // if (['overtime', 'exclude'].includes(key)) { - // val && this.checkExcludeMoreThanOvertime(rules, groupType, ruleType) - // } - } - - handleBlur = (value, index, key, groupType, ruleType) => { - const rules = this.getTargetRules(groupType, ruleType) - const val = rules[index][key] - - if (['work', 'time', 'overtime'].includes(key)) { - val && this.checkDatasRepeat(rules, groupType, ruleType) - } - if (['overtime', 'exclude'].includes(key)) { - val && this.checkExcludeMoreThanOvertime(rules, groupType, ruleType) - } - } - - /** - * 概述:示例说明 - */ - showDemonstration = (type) => { - const url = addContentPath('/hrm/hrm_e9/image/overtimeRule'), - getLabels = arr => arr.map(n => i18n.label[n]()), - datas = { - '2': { - title: i18n.label['528791'](), - content: [{ - title: i18n.label['528923'](), - desc: getLabels(['528925', '528926', '528927']).concat(`${url}/1.jpg`) - }, { - title: i18n.label['528924'](), - desc: getLabels(['528925', '528928', '528929']).concat(`${url}/2.jpg`).concat(getLabels(['528930', '528931'])).concat(`${url}/3.jpg`) - }] - }, - '3': { - title: i18n.label['528792'](), - content: [{ - title: i18n.label['528923'](), - desc: getLabels(['528932', '528933']).concat(`${url}/4.jpg`) - }, { - title: i18n.label['528924'](), - desc: getLabels(['528934', '528935']).concat(`${url}/5.jpg`) - }] - }, - '1': { - title: i18n.label['528793'](), - content: [{ - title: i18n.label['528923'](), - desc: getLabels(['528936', '528937']).concat(`${url}/6.jpg`) - }, { - title: i18n.label['528924'](), - desc: getLabels(['528938', '528939']).concat(`${url}/7.jpg`) - }] - } - } - - const ds = this.dialogStore - const { title, content } = datas[type] - - this.demonstration = content - - ds.setDialogConfig({ - title, - style: { width: 900, height: 675 } - }) - ds.openDialog() - } - - getRuleContainerName = (value, groupType, fieldType) => { - if (fieldType == 'paidLeaveEnableType') { - return `overtimeCompensationRule${value == '1' ? 'Default' : 'Flow'}${groupType}` - } - if (fieldType == 'restTimeType') { - return `${value == '1' ? 'restTime' : 'overtime'}${groupType}` - } - } - - /** - * 概述:添加规则 - */ - handleRuleAdd = (groupType, ruleType) => { - const rules = this.getTargetRules(groupType, ruleType) - const { work, rest, time, left, right } = rules[rules.length - 1] - - switch (ruleType) { - case 'defaultFlow2': - rules.push({ - work: parseInt(work) + 1, - rest: parseInt(rest) + 1 - }) - break - case 'defaultFlow3': - const [hour, minute] = time.split(':') - const h = parseInt(hour) - rules.push({ - time: h < 23 ? `${h + 1}:${minute}` : `00:${minute}`, - left, - right: right + 1 - }) - break - case 'restTime': - rules.push({ - startTime: '', - endTime: '' - }) - break - case 'overtime': - rules.push({ - overtime: '', - exclude: '' - }) - break - - } - } - - /** - * 概述:删除规则 - */ - handleRuleDel = (index, groupType, ruleType) => { - const rules = this.getTargetRules(groupType, ruleType) - rules.splice(index, 1) - } - - getTargetRules = (groupType, ruleType) => { - const { form } = this.formStore - - const fieldType = ['defaultFlow2', 'defaultFlow3'].includes(ruleType) ? 'paidLeaveEnableType' : 'restTimeType', - key = `${fieldType}${groupType}`, - value = form.getFormParams()[key], - cName = this.getRuleContainerName(value, groupType, fieldType) - - return this[cName] - } - - setErrorRef = (ref, index, ruleType = '') => { - this.errorRefs[`ref${index}${ruleType}`] = ref; - } - - checkDatasRepeat = (rules, groupType, ruleType) => { - const targetField = { defaultFlow2: 'work', defaultFlow3: 'time', overtime: 'overtime' }[ruleType], - verifyDatas = rules.map(rule => parseFloat(rule[targetField]) ), - repeatIndexs = [] - - verifyDatas.forEach((value, index) => { - const otherValues = verifyDatas.filter((w, i) => { if (i != index) return w }) - if (otherValues.includes(value)) { - repeatIndexs.push(index) - } - }) - - setTimeout(() => { - repeatIndexs.forEach(index => { - const key = `ref${index}${groupType}` - this.errorRefs[key] && this.errorRefs[key].showError() - }) - }) - - if (repeatIndexs.length == 0) { - return true - } - } - - checkExcludeMoreThanOvertime = (rules, groupType, ruleType) => { - for (let i = 0; i < rules.length; i++) { - const rule = rules[i] - const { overtime, exclude } = rule - if (parseFloat(exclude) >= parseFloat(overtime)) { - rule.errorTip = getLabel(-1, '加班时长必须大于扣除时长') - const refName = `ref${i}`; - setTimeout(() => { - [refName, `${refName}${ruleType}`].forEach(v => { - this.errorRefs[v] && this.errorRefs[v].showError() - }) - }) - return - } else { - rule.errorTip = '' - } - } - return true - } - - /** - * 概述:规则的组成 - */ - getRuleRowConfigs = (type) => { - let configs; - const hour = { - label: i18n.label['528794']().replace('{param}', '') - } - switch (type) { - case 'defaultFlow2': - configs = [{ - label: i18n.label['528795']() - }, { - label: ' ≥ ' - }, { key: 'work' }, - hour, - { - label: `, ${i18n.label['528796']()}` - }, { key: 'rest' }, - hour - ] - break - case 'defaultFlow3': - configs = [{ - label: i18n.label['528797']().replace('{param}', '') - }, { - key: 'time' - }, { - label: `${i18n.label['528798']().replace('{param}', '')}, ` - }, { - label: i18n.label['528799']() - }, { - key: 'left', - }, { - label: ' : ' - }, { - key: 'right' - }, { - label: i18n.label['528800']().replace('{param}', '') - }] - break - case 'restTime': - configs = [{ - label: i18n.label['528801']() - }, { - key: 'startTime' - }, { - label: i18n.label['528802']() - }, { - key: 'endTime' - }] - break - case 'overtime': - configs = [{ - label: i18n.label['528803']() - }, { - key: 'overtime' - }, - hour, - { - label: ',' - }, { - label: i18n.label['528804']() - }, { - key: 'exclude' - }, - hour - ] - break - } - return configs - - } - - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/scheduleCode.js b/pc4backstage/hrmAttendance/stores/scheduleCode.js deleted file mode 100644 index d74eee9..0000000 --- a/pc4backstage/hrmAttendance/stores/scheduleCode.js +++ /dev/null @@ -1,489 +0,0 @@ -import { observable, action, computed } from "mobx"; -import { WeaTableNew, WeaSwitch } from "comsMobx"; -import { WeaBrowser, WeaFormItem, WeaSelect, WeaUpload, WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaError} from "ecCom"; -import {WeaLogView} from 'comsMobx'; -import { Button, message, Table, Radio} from "antd"; -import HrmBaseStore from "../../hrmComsPublic/stores/baseStore"; -import {importScheduleCode} from './importScheduleCode'; -import * as api from "../apis/scheduleCode"; -import { i18n } from "../public/i18n"; -import { uniq, find, findIndex, has, fill, concat, dropRight, filter, isEmpty, forEach} from "lodash"; -const RadioGroup = Radio.Group; -const { WeaTable, TableStore } = WeaTableNew; -const getLabel = WeaLocaleProvider.getLabel; - -export class ScheduleCode extends HrmBaseStore { - /********************* unobservable list *********************/ - opId; - orgTreeProps = { - needSearch: true, - isLoadAllSub: false, - isLoadSubDepartment:true, - topPrefix: "hrmSearch", - inputLeftDom: `${i18n.label.organization()}`, - // needDropMenu: true, - treeNodeClick: this.treeNodeClick, - params: { - rightStr: "ScheduleCode:Edit" - } - }; - mainTabConfig = { - tabs: [ - { - color: "#000000", - groupId: "main", - title: "", - viewCondition: "1", - searchType: ["base", "advanced"], - searchKey: "lastname", - doSearch: () => { - this.selectedSubCompany=null; - this.getTableData() - } - } - ], - keyParam: "viewCondition", - activeTabKey: "1" - }; - @computed get dialogTabConfig(){ - return { - tabs: [ - { - color: "#000000", - groupId: "dialog", - title: "", - viewCondition: "1", - searchType: ["base", "advanced"], - searchKey: "devicename", - doSearch: () => { - this.getDeviceTableData() - }, - tabButtonDef: [ - { - comType: "button", - icon: "icon-coms-Add-to-hot", - label: i18n.label.create, - rightMenuIcon: this.menuIconCollection.create, - onClickHandle: () => this.doDeviceCreateEdit() - }, - { - comType: "button", - icon: "icon-coms-form-delete-hot", - label: i18n.label.multiDelete, - rightMenuIcon: this.menuIconCollection.remove, - onClickHandle: () => this.deleteScheduleDevice(), - checkAction: "memberRemoveable" - } - ] - } - ], - keyParam: "viewCondition", - activeTabKey: "1" - } - }; - @observable dialogParams = { - ...this.dialogPropsDef, - opType: "create", - style: { - width: 800, - height: 400 - }, - onCancel: () => { - this.dialogParams.visible = false; - this.dialogParams.opType = "create"; - this.opId = null; - } - }; - @observable deviceDialogParams = { - ...this.dialogPropsDef, - opType: "create", - style: { - width: 800, - height: 400 - }, - onCancel: () => { - this.deviceDialogParams.visible = false; - this.deviceDialogParams.opType = "create"; - this.opId = null; - } - }; - - @observable deviceEditDialogParams = { - ...this.dialogPropsDef, - opType: "create", - style: { - width: 600, - height: 300 - }, - onCancel: () => { - this.deviceEditDialogParams.visible = false; - this.deviceEditDialogParams.opType = "create"; - this.opId = null; - } - }; - - @computed - get memberRemoveable() { - return this.devicetable.selectedRowKeys.length === 0; - } - - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable - spinning = false; - @observable - selectedSubCompany; - @observable - table = new TableStore(); - @observable - batchEditVal = new Map(); - @observable - editTable = {}; - @observable - editTableData = []; - - @observable - devicetable = new TableStore(); - @observable - showAllLevel = true; - @observable - isOneDevice = true; - - @observable canAdd = false; - - /********************* action list *********************/ - @action - init = () => { - this.selectedSubCompany = null; - this.single = null; - api.getScheduleCodeCondition().then( - data => { - this.setFormData("conditionForm", data.conditions); - if (this.formTarget.conditionForm.isFormInit){ - this.containerInitFinished.init = true; - } - this.getTableData(); - }, - error => {} - ); - } - - @action - getTopProps = (single) => { - let buttons = [( - - )]; - if(this.canAdd){ - this.isOneDevice && buttons.push(( - - )); - buttons.push(( - - )); - }; - // buttons = [ - // - // ]; - let menus = this.convertToMenus(buttons); - menus = menus.filter(obj=>obj.key!=='0'); - return { - buttons, - menus: [ - ...menus, - { - key: menus.length + 1 + "", - content: i18n.label.scheduledevice(), - icon: , - onClick: () => this.scheduleDevice() - }, - ...this.getBasicMenus("HRM_ENGINE_SCHEDULECODE") - ] - }; - }; - - changeShowAllLevel() { - this.showAllLevel = !this.showAllLevel; - this.getTableData(); - } - - @action - treeNodeClick = (event, ids, nodeids, nodes) => { - const { data: nodeData } = event.node.props; - this.selectedSubCompany = nodeData; - this.formTarget.conditionForm.resetConditionValue(); - - this.getTableData(); - }; - - @action - getTableData = () => { - const params = this.formTarget.conditionForm.getFormParams(); - Object.assign(params, { - subcompanyid: (this.selectedSubCompany && this.selectedSubCompany.type=='1') ? this.selectedSubCompany.id : params.subcompanyid, - departmentid: (this.selectedSubCompany && this.selectedSubCompany.type=='2') ? this.selectedSubCompany.id : params.departmentid, - showAllLevel:this.showAllLevel?"1":"0" - }); - api.getScheduleCodeList(params).then( - data => { - if (data.status === "1") { - this.canAdd = data.canAdd || false; - this.table = new TableStore(); - this.table.getDatas(data.sessionkey, 1); - this.isOneDevice = data.isOneDevice; - } else { - message.error(data.message); - } - }, - error => {} - ); - }; - - getDeviceTableData = () => { - const params = this.formTarget.deviceConditionForm.getFormParams(); - api.getScheduleDeviceList(params).then( - data => { - if (data.status === "1") { - this.devicetable = new TableStore(); - this.devicetable.getDatas(data.sessionkey, 1); - } else { - message.error(data.message); - } - }, - error => {} - ); - }; - - @action - resetBaseForm = () => { - delete this.formTarget.shiftSchedulceForm; - delete this.formTarget.shiftSchedulceFormFields; - } - - @action - openHrm=(id)=>{ - window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${id}`,'_blank'); - } - - @action - setBatchEditVal(id, val) { - this.batchEditVal.set(id, val); - } - - @action - doEdit = (params={}) => { - api.getScheduleCodeForm(params).then( - data => { - if (data.status === "1") { - this.canAdd = data.canAdd; - this.editTable=data.table; - this.editTableData = data.table.datas; - } else { - message.error(data.message); - } - this.opId = params.id; - this.dialogParams.title = params.lastname+"-"+ getLabel("27960","考勤编号"); - this.dialogParams.opType = "edit"; - this.dialogParams.visible = true; - }, - error => {} - ); - }; - - @action - onEditTableChange=(datas=[])=>{ - this.editTableData = datas; - } - - @action - save=(params={})=>{ - params.cmd='batch'; - params.resourceids = [...this.batchEditVal.keys()].join(';'); - params.schedulecodes = [...this.batchEditVal.values()].join(';'); - if (params.resourceids == '' && params.schedulecodes == '') return; - api.saveScheduleCode(params).then(data => { - if (data.status == '1') { - message.success(i18n.message.saveSuccess()); - this.getTableData(); - } else { - message.warning(data.message); - } - }, error => { - message.warning(error.message); - }) - } - - /** - * 设置WeaTableEdit的refs对象 - * @param {Object} refs [WeaTableEdit] - */ - setEditTable = (refs, name) => { - this.editTable[name] = refs; - } - - @action - recordOP = (target, type, callback = null) => { - switch (type) { - case 'add': - target.refs.edit.doAdd() - break; - case 'remove': - target.refs.edit.doDelete() - break; - case 'copy': - target.refs.edit.doCopy() - break; - case 'valid': - return target.refs.edit.doRequiredCheck() - default: - break; - } - } - - @action - savePerson=(params={})=>{ - const { - pass, - index, - key - } = this.recordOP(this.editTable['fieldDef'], 'valid'); - if (!pass || this.editTable.columns === 0 ) - return; - - params.datas=this.editTableData; - params.resourceid=this.opId; - api.saveScheduleCode({ data: JSON.stringify(params) }).then(data => { - if (data.status == '1') { - message.success(i18n.message.saveSuccess()); - this.getTableData(); - this.dialogParams.visible = false; - } else { - message.warning(data.message); - } - }, error => { - message.warning(error.message); - }) - } - - @action - import = () => { - const params = [getLabel('129833', '导入模板'), getLabel('511419', "考勤编号导入"), 'kqScheduleCode', true]; - - const funcs = ['setTempletName', 'setImportDialogTitle', 'setImportType', 'setImportDialogVisible']; - - funcs.map((func, index) => { - importScheduleCode[func](params[index]); - }) - importScheduleCode.importDialog.visible=true; - } - - @action - scheduleDevice = (params={}) => { - api.getScheduleDeviceCondition().then( - data => { - if (data.status === "1") { - this.setFormData("deviceConditionForm", data.conditions); - if (this.formTarget.deviceConditionForm.isFormInit){ - this.containerInitFinished.init = true; - } - this.getDeviceTableData(); - this.opId = params.id; - this.deviceDialogParams.title = getLabel("513116","考勤机管理"); - this.deviceDialogParams.opType = "edit"; - this.deviceDialogParams.visible = true; - } else { - message.error(data.message); - } - }, - error => {} - ); - } - - @action - doDeviceCreateEdit(params={}){ - api.getScheduleDeviceForm(params).then( - data => { - if (data.status === "1") { - this.setFormData("deviceEditConditionForm", data.condition); - if (this.formTarget.deviceEditConditionForm.isFormInit){ - this.containerInitFinished.init = true; - } - this.deviceEditDialogParams.title = params.id?getLabel(513253, '编辑考勤机'):getLabel(513252, '新建考勤机'); - this.deviceEditDialogParams.opType = params.id?"edit":"create"; - this.deviceEditDialogParams.visible = true; - } else { - message.error(data.message); - } - }, - error => {} - ); - } - - @action - doSaveScheduleDevice = () => { - this.formTarget.deviceEditConditionForm.validateForm().then(f => { - if (f.isValid) { - if(this.spinning) - return; - this.spinning = true; - const params = this.formTarget.deviceEditConditionForm.getFormParams(); - api.saveScheduleDevice(params).then(data => { - if (data.status === '1') { - this.deviceEditDialogParams.visible = false; - message.success(i18n.message.saveSuccess()); - this.formTarget.deviceEditConditionForm.resetConditionValue(); - this.getDeviceTableData(); - } else - message.error(data.message); - this.spinning = false; - }, error => this.spinning = false) - } else { - f.showErrors(); - this.showError = new Date().getTime(); - } - }) - } - - @action - deleteScheduleDevice = (params) => { - let content; - if (params == null) { - params = { - ids: this.devicetable.selectedRowKeys - }; - content = i18n.confirm.deleteSelected(); - } else { - content = i18n.confirm.delete(); - } - this.confirmInfo({ - content, - onOk: () => { - api.delScheduleDevice({...params}).then(data => { - if (data.status === "1") { - message.success(i18n.message.deleteSuccess()); - this.devicetable.getDatas(null, 1); - this.getDeviceTableData(); - } - }); - } - }); - } - - formItemRender = { - id: (field, textAreaProps, form, formParams) => null - } -} - -export const scheduleCodeStore = new ScheduleCode(); diff --git a/pc4backstage/hrmAttendance/stores/scheduleSetting.js b/pc4backstage/hrmAttendance/stores/scheduleSetting.js deleted file mode 100644 index 201de39..0000000 --- a/pc4backstage/hrmAttendance/stores/scheduleSetting.js +++ /dev/null @@ -1,825 +0,0 @@ -import { observable, action, computed } from "mobx"; -import { message, Button } from "antd"; -import HrmBaseStore from "../../hrmComsPublic/stores/baseStore"; -import * as api from "../apis/scheduleSetting"; -import { i18n } from "../public/i18n"; -import { findIndex, dropRight, remove, cloneDeep, find } from "lodash"; -import ListCell from "../components/scheduleSetting/ListCell"; -import ListHeader from "../components/scheduleSetting/ListHeader"; -import { dateFormat } from '../util/index'; -import has from 'lodash/has'; -import filter from 'lodash/filter'; -import { WeaLocaleProvider, WeaTools } from "ecCom"; -import {addContentPath} from '../util/index.js' -const getLabel = WeaLocaleProvider.getLabel; - -export class HrmScheduleSetting extends HrmBaseStore { - /********************* unobservable list *********************/ - groupId; - shortWeekdays = this.getLocale().lang.format.veryShortWeekdays; - dateMap = new Map(); - radioGroupVal = {} - extenalRadioGroupConfig = []; - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable showhideFlag = true; - @observable today = this.moment(); - @observable groupName = ''; - @observable spinning = false; - @observable spinTip = ''; - @observable pageIndex = 1; - @observable pageSize = 10; - @observable total = 0; - @observable radioGroupConfig = []; - @observable showHasNotAccount = false; - @observable tabConfig = { - tabs: [], - keyParam: "viewCondition", - activeTabKey: "1", - tabChangeHandle: key => this.setActiveTab(key) - }; - @observable groupValidatDate = { start: null, end: null }; - - @observable editTabConfig = { - tabs: [ - { - color: "#000000", - groupId: "g1", - title: () => getLabel('389506', '按天排班'), - viewCondition: "1" - }, - { - color: "#000000", - groupId: "g2", - title: () => getLabel('389507', '按周期排班'), - viewCondition: "2" - } - ], - keyParam: "viewCondition", - activeTabKey: "1", - tabChangeHandle: key => this.setEditActiveTab(key) - }; - - @observable - groupEditDialogParams = { - ...this.dialogPropsDef, - moreBtn: {}, - style: { - width: 800, - height: 740 - }, - callback: () => { - message.success(i18n.message.saveSuccess()); - this.groupEditDialogParams.visible = false; - // this.init(this.groupId); - this.getScheduleData(this.getListTableQueryParams()); - }, - onCancel: () => { - this.groupEditDialogParams.visible = false; - } - }; - - @observable - holidayDialogParams = { - ...this.dialogPropsDef, - moreBtn: {}, - style: { - width: 800, - height: 680 - }, - callback: () => { - message.success(i18n.message.saveSuccess()); - this.holidayDialogParams.visible = false; - this.init(this.groupId); - }, - onCancel: () => { - this.holidayDialogParams.visible = false; - } - }; - - @observable searchDate = this.moment().format("YYYY-MM"); - @observable shiftList = []; - @observable serialInfo = []; - @observable listTable = { - columns: [], - datas: [] - }; - @observable analysisTable = { - columns: [], - datas: [] - }; - @observable holidays = []; - - @observable batchShiftScheduleFromParams = { - moduleName: 'hrm', - visible: false, - onOk: data => { - this.doBatchSchedule(data); - }, - onCancel: () => (this.batchShiftScheduleFromParams.visible = false) - }; - - @observable selectedRowKeys = []; - /********************* observable list *********************/ - - /********************* computed list *********************/ - @computed get multiDelete () { - return this.selectedRowKeys.length === 0; - } - /********************* computed list *********************/ - - /********************* action list *********************/ - clearData = groupId => { - this.selectedRowKeys.length = 0; - this.showHasNotAccount = false; - this.groupId = groupId; - this.pageIndex = 1; - this.pageSize = 10; - this.shiftList.length = 0; - this.serialInfo.length = 0; - this.holidays.length = 0; - this.dateMap.clear(); - }; - - @action getListTableQueryParams = (pageIndex, pageSize) => { - this.pageIndex = pageIndex || 1; - pageSize && (this.pageSize = pageSize); - return { - groupId: this.groupId, - kqMonth: this.searchDate, - pageIndex: this.pageIndex, - pageSize: this.pageSize, - ...this.radioGroupVal, - isNoAccount: this.showHasNotAccount ? '1' : '0' - } - } - - init = groupId => { - this.searchDate = this.moment().format("YYYY-MM"); - this.clearData(groupId); - this.radioGroupVal = {}; - api.init(this.getListTableQueryParams()).then( - rs => { - rs.map((data, index) => { - if (data.status === "1") { - switch (index) { - case 0: - this.extenalRadioGroupConfig = data.conditions; - this.setRadioGroupConfig(); - break; - case 1: - let tabs = []; - data.tabs.map((tab, index) => { - let tabInfo = { - color: "#000000", - groupId: `g{tab.key}`, - title: tab.title, - viewCondition: tab.key - }; - tabs.push(tabInfo); - }); - this.tabConfig.tabs = tabs; - this.setActiveTab("1"); - break; - // case 2: - // this.setScheduleData(data); - // break; - } - } - }); - }, - error => { } - ); - }; - - @action setActiveTab = key => { - const tabIndex = this.getTabIndex(this.toJS(this.tabConfig.tabs), key); - if (tabIndex < 0) return; - this.tabConfig.activeTabKey = key || this.tabConfig.tabs[0].viewCondition; - if (key === '2') { - this.getShiftScheduleTotal(); - } else { - this.clearData(this.groupId); - // this.getScheduleData(this.getListTableQueryParams()); - } - }; - - @action getShiftScheduleTotal = () => { - api.getShiftScheduleTotal({ groupId: this.groupId, kqMonth: this.searchDate }).then(data => { - if (data.status === '1') { - this.setAnalysisData(data); - // this.analysisTable.columns = [...data.columns]; - } else { - message.error(data.message); - } - }, error => { }) - } - - @action setSelectedRowKeys = v => this.selectedRowKeys = v; - - @action setAnalysisData = data => { - const serialCol = data.columns[0]; - const render = (text, record) => { - const style = { - background: (record.serialId === '-1' ? '#ccc' : (find(this.toJS(this.shiftList), { id: record.serialId }) || { bgColor: window.defaultScheduleBGColor[0] }).bgColor), - color: (record.serialId === '-1' ? '#000' : '#fff') - } - return
{text}
- } - this.analysisTable.columns = [{ ...serialCol, key: serialCol.dataIndex, width: '250px', render }]; - this.generateAnalysisTableColumns(); - this.analysisTable.datas = data.datas; - } - - @action setEditActiveTab = key => { - const tabIndex = this.getTabIndex(this.toJS(this.editTabConfig.tabs), key); - if (tabIndex < 0) return; - this.editTabConfig.activeTabKey = - key || this.editTabConfig.tabs[0].viewCondition; - }; - - @action setSearchDate = v => { - if (this.moment.isMoment(v)) - this.searchDate = v.format("YYYY-MM"); - else - this.searchDate = dateFormat(v, "YYYY-MM") - this.getScheduleData(this.getListTableQueryParams()); - }; - - @action getScheduleData = (params) => { - if (this.spinning) - return; - this.selectedRowKeys.length = 0; - this.spinning = true; - api.getShiftSchedule(params).then(data => { - if (data.status === '1') { - this.setScheduleData(data); - } else { - message.error(data.message); - } - this.spinning = false; - }, error => { this.spinning = false; }) - } - - @action setDateMap = datas => { - this.dateMap.clear(); - datas.map(d => { - const arr = d.split('|'); - const resourceid = arr[0], date = arr[1], recordId = arr[2]; - if (!this.dateMap.has(resourceid)) - this.dateMap.set(resourceid, new Map()); - this.dateMap.get(resourceid).set(date, recordId); - }) - } - - @action setShiftList = datas => { - const colorLen = window.defaultScheduleBGColor.length; - datas.map((d, i) => { - d.bgColor = window.defaultScheduleBGColor[i % colorLen]; - }); - this.shiftList = [ - ...datas, - { - id: '-1', - bgColor: "#ccc", - name: getLabel('26593', '休息') - } - ] - } - - @action setSerialInfo = datas => { - if (this.shiftList.length > 0 && datas.length > 0) { - datas = datas.map((d, i) => { - return { ...d, bgColor: window.defaultScheduleBGColor[i % window.defaultScheduleBGColor.length] } - }) - } - // datas[0].bgColor = this.shiftList[0].bgColor; - this.serialInfo = [...datas]; - } - - cloneData = []; - @action setListTableColumns = datas => { - this.listTable.columns = [ - { - title:
{getLabel('25034', '姓名')}
, - dataIndex: "name", - key: "name", - width: 100, - // fixed: 'left', - render: (text, record, index) => , - }, - { - title:
{getLabel('27511', '部门')}
, - dataIndex: "department", - key: "department", - width: 150, - // fixed: 'left', - render: (text, record, index) =>
{text}
, - } - ]; - this.cloneData = cloneDeep(datas); - this.listTable.datas = [...datas]; - this.generateListTableColumns(); - } - - @action setScheduleData = data => { - this.today = this.moment(data.today, 'YYYY-MM-DD'); - this.groupName = data.groupName; - this.setDateMap(data.keyDatas); - this.holidays = data.holidays || []; - this.setShiftList(data.shiftList); - this.setSerialInfo(data.serialInfo); - this.setRadioGroupConfig(); - this.setListTableColumns(data.datas); - this.pageIndex = Number(data.pageindex); - this.pageSize = Number(data.pagesize); - this.total = Number(data.count); - if (has(data, 'validityFromDate')) { - this.groupValidatDate = { start: data.validityFromDate, end: data.validityEndDate }; - } - } - - @action onCellMouseEnter = index => { - $("div[name*='scheduleCol']").removeClass('sameCol'); - const k = `div[name='scheduleCol${index}']`; - $(k).addClass('sameCol') - } - - @action onCellMouseLeave = () => { - } - - @action generateListTableColumns = () => { - const hs = this.toJS(this.holidays); - const m = this.moment(this.toJS(this.searchDate), "YYYY-MM"); - const days = m.daysInMonth(); - let { columns } = this.toJS(this.listTable); - if (columns.length > 2) - columns = dropRight(columns, columns.length - 2); - for (let i = 1; i <= days; i++) { - m.set("date", i); - const d = m.format("d"); - const date = m.format('YYYY-MM-DD'); - const props = { - weekDay: d, - day: i, - holidayInfo: hs.length > 0 && hs.find(data => data.date == date), - } - columns.push({ - title: ( - - ), - width: 50, - dataIndex: m.format('YYYY-MM-DD'), - key: m.format('YYYY-MM-DD'), - render: (text, record, index) => this.listTableColRender(text, record, index, i), - otherParams: props - }); - } - this.listTable.columns = columns; - }; - - listTableColRender = (text, record, index, colIndex) => { - const props = { - store: this, - colIndex, - id: text, - record - } - return ( - - ); - }; - - @action generateAnalysisTableColumns = () => { - const hs = this.toJS(this.holidays); - const m = this.moment(this.toJS(this.searchDate), "YYYY-MM"); - const days = m.daysInMonth(); - let { columns } = this.toJS(this.analysisTable); - for (let i = 1; i <= days; i++) { - m.set("date", i); - const d = m.format("d"); - const date = m.format('YYYY-MM-DD'); - const props = { - weekDay: d, - day: i, - holidayInfo: hs.length > 0 ? hs[0][date] : null, - dropdown: false - } - columns.push({ - title: ( - - ), - width: "50px", - dataIndex: m.format('YYYY-MM-DD'), - key: m.format('YYYY-MM-DD'), - // render: (text, record, index) => this.listTableColRender(text, record, index, i), - // otherParams: props - }); - } - this.analysisTable.columns = columns; - }; - - @action onScheduleChange = (records, target) => { - let { datas, columns } = this.toJS(this.listTable); - let dataIndex, d; - records.map(record => { - switch (target) { - case 'cell': - dataIndex = findIndex(datas, { resourceid: record.resourceid }); - d = datas[dataIndex]; - datas[dataIndex] = { ...d, ...record }; - break; - case 'header': - [...Object.keys(record)].map(k => { - if (k != 'resourceid') { - for (let i = 0; i < datas.length; i++) { - let d = datas[i]; - datas[i] = { ...d, [k]: record[k] }; - } - } - }); - break; - case 'resource': - dataIndex = findIndex(datas, { resourceid: record.resourceid }); - let colIndex = this.getColIndex(columns, null, target); - for (let col = colIndex; col < columns.length; col++) { - const column = columns[col]; - Object.assign(datas[dataIndex], { - [column.dataIndex]: record.shiftid - }); - } - break; - } - }); - this.listTable.datas = datas; - } - - getValidDate = () => { - const m = this.moment(this.toJS(this.searchDate), "YYYY-MM"); - const days = m.daysInMonth(); - for (let i = 1; i <= days; i++) { - m.set("date", i); - if (!m.isBefore(this.toJS(this.today)) || m.isSame(this.toJS(this.today), 'day')) { - return m.format('YYYY-MM-DD'); - } - } - return null; - } - - getColIndex = (columns, date, target) => { - if (target === 'cell') - return findIndex(columns, { dataIndex: date }); - else { - return findIndex(columns, { dataIndex: this.getValidDate() }); - } - } - - @action onCycleClick = (records, target, isContinue = false) => { - let { datas, columns } = this.toJS(this.listTable); - records.map(record => { - const { date, serial } = record; - let i = 0, dataIndex; - switch (target) { - case 'header': - const o = {}; - for (let col = colIndex; col < columns.length; col++) { - const column = columns[col]; - const { weekDay, holidayInfo } = column.otherParams; - // if((weekDay == 0 || weekDay == 6 || (holidayInfo && holidayInfo.type === 'rest')) && !isContinue){ - if ((weekDay == 0 || weekDay == 6) && !isContinue) { - Object.assign(o, { - [column.dataIndex]: '' - }); - continue; - } - Object.assign(o, { - [column.dataIndex]: serial[i % serial.length] - }); - i++; - } - for (i = 0; i < datas.length; i++) { - Object.assign(datas[i], o); - } - break; - default: - let colIndex = this.getColIndex(columns, date, target); - dataIndex = findIndex(datas, { resourceid: record.resourceid }); - for (let col = colIndex; col < columns.length; col++) { - const column = columns[col]; - const { weekDay, holidayInfo = {} } = column.otherParams; - const {type} = holidayInfo - // if((weekDay == 0 || weekDay == 6 || (holidayInfo && holidayInfo.type === 'rest')) && !isContinue){ - - //双休日取消排班 - const b = (weekDay == 0 || weekDay == 6) && !isContinue - - if ( - ( type == '1' && (this.value2 == '2' ) ) || - ( type == '3' && (this.value3 == '2') ) || - (!['1','3'].includes(type) && b ) - ) { - Object.assign(datas[dataIndex], { - [column.dataIndex]: '' - }); - continue; - } - Object.assign(datas[dataIndex], { - [column.dataIndex]: serial[i % serial.length] - }); - i++; - } - break; - } - }); - this.listTable.datas = datas; - this.value2 = '1'; - this.value3 = '1'; - } - - @action save = () => { - if (this.spinning) - return; - this.spinning = true; - let datas = this.toJS(this.listTable.datas); - let arr = []; - datas.map((d, index) => { - const cloneRecord = this.cloneData[index]; - let entity = { - kqdata: [] - }; - remove([...Object.keys(d)], v => ['name', 'department'].indexOf(v) < 0).map(k => { - if (k === 'resourceid') - entity.resourceid = d[k]; - else { - const resourceid = entity.resourceid || d.resourceid; - const date = k; - let recordId = ''; - if (this.dateMap.has(resourceid) && this.dateMap.get(resourceid).has(date)) { - recordId = this.dateMap.get(resourceid).get(date); - } - entity.kqdata.push({ - id: recordId, - serialid: d[k], - oldValue: cloneRecord[k], - date - }); - } - }) - arr.push(entity); - }); - api.save({ data: JSON.stringify({ datas: arr, groupId: this.groupId }) }).then(data => { - if (data.status === '1') { - message.success(i18n.message.saveSuccess()); - this.spinning = false; - this.getScheduleData(this.getListTableQueryParams()); - } else { - message.error(data.message); - } - this.spinning = false; - }, error => this.spinning = false); - }; - - @action groupSetting = () => { - // const url = `/spa/hrm/attendance.html#/attendance/groupInfo/${this.groupId}?_key=${new Date().getTime()}`; - const url = `/#/main/attendance/groupInfo/${this.groupId}?_key=${new Date().getTime()}`; - this.groupEditDialogParams.title = i18n.label["389108"](); - this.groupEditDialogParams.groupId = this.groupId; - // this.groupEditDialogParams.url = url; - this.groupEditDialogParams.visible = true; - } - - @action getBatchShiftScheduleFrom = () => { - api.getBatchShiftScheduleFrom({ groupId: this.groupId }).then(data => { - if (data.status === '1') { - this.batchShiftScheduleFromParams.conditions = data.conditions; - this.batchShiftScheduleFromParams.title = getLabel('33511', '批量设置'); - this.batchShiftScheduleFromParams.visible = true; - } else { - message.error(data.message); - } - }, error => { }) - } - - @action holidaySetting = () => { - window.open(`/spa/hrm/staticAttendance4engine/engine.html#/attendance/holidaySetting/${this.groupId}`); - } - - @action doBatchSchedule = (data) => { - let sd = null; - if (data.shiftScheduleType == '1' && data.shiftScheduleDate != '') { - sd = this.moment(data.shiftScheduleDate, "YYYY-MM-DD"); - } else if (data.shiftScheduleType == '2' && data.shiftScheduleBeginDate != null && data.shiftScheduleEndDate != '') { - sd = this.moment(data.shiftScheduleBeginDate, "YYYY-MM-DD"); - let ed = this.moment(data.shiftScheduleEndDate, "YYYY-MM-DD"); - // if(Math.abs(sd.diff(ed, "d")) > 31){ - // message.error(getLabel('508248','排班周期不能超过31天')); - // this.batchShiftScheduleFromParams.onCancel(); - // return; - // } - if (!sd.isSame(ed) && !sd.isBefore(ed)) { - message.error(getLabel('508286', '结束日期不能大于开始日期')); - this.batchShiftScheduleFromParams.onCancel(); - return; - } - } else { - message.error('排班日期不能为空'); - this.batchShiftScheduleFromParams.onCancel(); - return; - } - - // if(sd.isBefore(this.toJS(this.today)) && !sd.isSame(this.toJS(this.today), 'day')){ - // message.error(getLabel('500488','无法对过往日期进行排班')); - // this.batchShiftScheduleFromParams.onCancel(); - // return; - // } - - if (this.spinning) - return; - this.spinning = true; - let d = cloneDeep(data); - const keys = remove([...Object.keys(data)], v => v.indexOf('span') > -1); - keys.map(k => delete d[k]); - let obj = { groupId: this.groupId, ...d }; - api.batchSave({ data: JSON.stringify(obj) }).then(data => { - this.spinning = false; - if (data.status === '1') { - message.success(i18n.message.saveSuccess()); - this.getScheduleData(this.getListTableQueryParams()); - this.batchShiftScheduleFromParams.onCancel(); - } else { - message.error(data.message); - this.batchShiftScheduleFromParams.onCancel(); - } - }, error => { - this.spinning = false; - this.batchShiftScheduleFromParams.onCancel(); - }) - } - - @action importExcel = (fileid) => { - api.importExcel({ groupId: this.groupId, filename: fileid }).then(data => { - if (data.status === '1') { - message.success(i18n.message.uploadSuccess()); - this.getScheduleData(this.getListTableQueryParams()); - } else { - message.error(data.message); - } - }, error => { }) - } - - @action exportExcel = () => { - if (this.spinning) - return; - this.spinning = true; - this.spinTip = getLabel('500702', '导出数据中,请稍候'); - const params = { - groupId: this.groupId, - kqMonth: this.searchDate, - ...this.radioGroupVal, - isNoAccount: this.showHasNotAccount ? '1' : '0' - }; - - api.exportExcel({ data: JSON.stringify(params) }).then(data => { - this.spinning = false; - this.spinTip = ''; - if (data.status === '1' && data.url != null && data.url.trim().length > 0) - WeaTools.downloadFile(addContentPath(data.url), "GET"); - }, error => { - this.spinning = false; - this.spinTip = ''; - }) - } - - getContrastYIQ = (val) => { - if (val == null) - return '#000'; - let sColor = val.toLowerCase(); - //十六进制颜色值的正则表达式 - const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; - // 如果是16进制颜色 - if (sColor && reg.test(sColor)) { - if (sColor.length === 4) { - let sColorNew = "#"; - for (var i = 1; i < 4; i += 1) { - sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); - } - sColor = sColorNew; - } - //处理六位的颜色值 - var sColorChange = []; - for (var i = 1; i < 7; i += 2) { - sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2))); - } - const yiq = ((sColorChange[0] * 299) + (sColorChange[1] * 587) + (sColorChange[2] * 114)) / 1000; - const c = (yiq >= 128) ? 'black' : 'white'; - return c; - } - return '#000'; - }; - - @action setRadioGroupConfig = () => { - let { viewscope, datascope } = this.radioGroupVal; - viewscope = viewscope || '0'; - datascope = datascope || '0'; - const config = [ - { - label: getLabel('500489', '班次说明'), - labelcol: 3, - fieldcol: 21, - com: ( -
- { - filter(this.toJS(this.shiftList), v => v.isDelete != '1').map(shift =>
{shift.name}
) - } -
- ) - }, - { - label: getLabel('389103', '排班周期'), - labelcol: 3, - fieldcol: 21, - com: ( -
- { - this.toJS(this.serialInfo).map(serial =>
{serial.name}
) - } - -
- ) - } - ]; - config.push(...this.extenalRadioGroupConfig); - this.radioGroupConfig = config; - } - - @action onRadioGroupChange = params => { - this.radioGroupVal = params; - switch (params.viewscope) { - case '1': - if (params.subCompanyId == null || params.subCompanyId == '') { - return; - } - break; - case '2': - if (params.departmentId == null || params.departmentId == '') { - return; - } - break; - case '3': - if (params.resourceId == null || params.resourceId == '') { - return; - } - break; - } - this.showHasNotAccount = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1); - this.getScheduleData(this.getListTableQueryParams()); - } - - @action showAll = () => { - this.showHasNotAccount = !this.showHasNotAccount; - this.getScheduleData(this.getListTableQueryParams()); - } - - @action multiDeleteSchedule = () => { - let { datas } = this.toJS(this.listTable); - let ids = []; - this.toJS(this.selectedRowKeys).map(index => { - ids.push(datas[index].resourceid) - }) - const params = { - resourceids: ids.join(','), - month: this.searchDate, - groupId: this.groupId - } - this.confirmInfo({ - content: getLabel('500490', '确定要删除所选人员的排班信息吗?'), - onOk: () => { - api.batchDelete(params).then(data => { - if (data.status === "1") { - message.success(i18n.message.deleteSuccess()); - this.selectedRowKeys.length = 0; - this.getScheduleData(this.getListTableQueryParams()); - } else { - message.error(data.message); - } - }); - } - }); - } - /********************* action list *********************/ - - @action onClickHandle = () => { - this.showhideFlag = !this.showhideFlag - } - - onSelectChangeHandle = (val, type) => { - this[`value${type}`] = val - } -} - -export const hrmScheduleSetting = new HrmScheduleSetting(); diff --git a/pc4backstage/hrmAttendance/stores/shiftManager.js b/pc4backstage/hrmAttendance/stores/shiftManager.js deleted file mode 100644 index 690ca1a..0000000 --- a/pc4backstage/hrmAttendance/stores/shiftManager.js +++ /dev/null @@ -1,2849 +0,0 @@ -import { observable, action, computed, autorun } from "mobx"; -import { WeaTableNew, WeaSwitch } from "comsMobx"; -import { WeaFormItem, WeaTimePicker, WeaInputNumber, WeaSelect ,WeaHelpfulTip, WeaCheckbox, WeaError, WeaLocaleProvider} from "ecCom"; -import { Button, message } from "antd"; -import HrmBaseStore from "../../hrmComsPublic/stores/baseStore"; -import * as api from "../apis/shiftManager"; -import { i18n } from "../public/i18n"; -import WorkTimeAnalysis from "../components/shiftManager/WorkTimeAnalysis"; -import LinkComs from "../components/shiftManager/LinkComs"; -import {DialogStore,SearchStore} from '../public/valhalla/stores/index.js'; -import isEmpty from 'lodash/isEmpty'; -import cloneDeep from 'lodash/cloneDeep'; -import {addContentPath} from '../util/index.js' -import uuid from 'uuid'; -const getLabel = WeaLocaleProvider.getLabel; - -const { TableStore } = WeaTableNew; - - -export class HrmShiftManager extends HrmBaseStore { - /********************* unobservable list *********************/ - custLabelCol = 4; - worktime = 0; - rightMenus = []; - worktimeError = false;//message.error(i18n.label["388878"]()); - resttimeError = false;//message.error(i18n.label["388878"]()); - resttimeRangeError = false; - sTime = ["09:00", "13:00", "19:00"]; - eTime = ["12:00", "18:00", "23:00"]; - ruleOptions = []; - worktimeConstruct = { - across: 0, - mins: 60, - mins_next:'', - times: "" - }; - searchParams = {}; - orgTreeProps = { - needSearch: true, - isLoadAllSub: false, - topPrefix: "hrmSearch", - inputLeftDom: `${i18n.label.organization()}`, - // needDropMenu: true, - treeNodeClick: this.treeNodeClick, - params: { - rightStr: "KQClass:Management" - } - }; - errRefs = {} - - mainTabConfig = { - tabs: [ - { - color: "#000000", - groupId: "main", - title: "", - viewCondition: "1", - searchType: ["base"], - searchKey: "serial", - doSearch: params => this.getTableData(params) - } - ], - keyParam: "viewCondition", - activeTabKey: "1" - }; - - multiColumn = [ - { - key: "permitlateminutes", - labelCol: 0 - }, - { - key: "seriouslateminutes", - labelCol: 0 - }, - { - key: "lateabsentminutes", - labelCol: 0 - }, - { - key: "permitleaveearlyminutes", - labelCol: 0 - }, - { - key: "seriousleaveearlyminutes", - labelCol: 0 - }, - { - key: "leaveearlyabsentminutes", - labelCol: 0 - } - ]; - - itemRender = { - serial: (field, textAreaProps, form, formParams) => { - return ( -
-
- -
-
- ); - }, - subcompanyid: (field, textAreaProps, form, formParams) => { - return ( -
-
- -
-
- ); - }, - shiftonoffworkcount: (field, textAreaProps, form, formParams, callback) => { - const { fieldMap } = form; - return ( -
-
- this.onWorkCountChange(v)} - /> -
- {/*
- -
*/} -
- ); - }, - punchsettings: (field, textAreaProps, form, formParams) => null, - isresttimeopen: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form;//mins_next - if (true/*formParams.shiftonoffworkcount === "1"*/) { - return ( -
- this.calculateWorkTime()} - /> - {/* {formParams.isresttimeopen === "1" && ( -
-
{fieldMap["restbeigin"].label}
-
- this.errRefs['restbeigin'] = d} - error={`"${fieldMap["restbeigin"].label}" ${i18n.message.dataEmpty()}`}> - this.calculateWorkTime()} - /> - -
- { - this.calculateRestTime(true) && -
{i18n.label["388785"]()}
- } -
- )} - {formParams.isresttimeopen === "1" && ( -
-
{fieldMap["restend"].label}
-
- this.errRefs['restend'] = d} - error={`"${fieldMap["restend"].label}" ${i18n.message.dataEmpty()}`}> - this.calculateWorkTime()} - /> - -
- { - this.calculateRestTime() && -
{i18n.label["388785"]()}
- } -
- )} */} -
- ); - } else { - return null; - } - }, - restbeigin: (field, textAreaProps, form, formParams) => null, - restend: (field, textAreaProps, form, formParams) => null, - halfcalrule: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - let coms = []; - if(formParams.halfcalrule == '1'){ - coms = [ -
-
{fieldMap["halfcalpoint"].label}:
- -
, -
- -
- ] - } - return ( -
-
- -
- { - coms - } -
- ); - }, - halfcalpoint: (field, textAreaProps, form, formParams) => null, - halfcalpoint2cross: (field, textAreaProps, form, formParams) => null, - color: (field, textAreaProps, form, formParams) => { - return ( -
-
- -
- -
-
-
- ); - }, - permitlateminutes: (field, textAreaProps, form, formParams) => ( - - ), - seriouslateminutes: (field, textAreaProps, form, formParams) => ( - - ), - lateabsentminutes: (field, textAreaProps, form, formParams) => - this.itemRender.seriouslateminutes(field, textAreaProps, form, formParams), - permitleaveearlyminutes: (field, textAreaProps, form, formParams) => ( - - ), - seriousleaveearlyminutes: (field, textAreaProps, form, formParams) => - this.itemRender.seriouslateminutes(field, textAreaProps, form, formParams), - leaveearlyabsentminutes: (field, textAreaProps, form, formParams) => - this.itemRender.seriouslateminutes(field, textAreaProps, form, formParams), - enableexcludelate: (field, textAreaProps, form, formParams) => null, - enableexcludeleaveearly: (field, textAreaProps, form, formParams) =>null, - cardRemind: (field, textAreaProps, form, formParams) => {//打卡提醒 - return (
- -
) - }, - cardRemOfSignIn: (field, textAreaProps, form, formParams) => {//上班打卡提醒 - const { - cardRemind - } = formParams; - - if (cardRemind === '1') { - return ( -
- -
- ) - } - }, - minsBeforeSignIn:(field, textAreaProps, form, formParams) => {//提前多少分钟提醒 - const { - cardRemind, - cardRemOfSignIn - } = formParams; - - if ( cardRemind === '1' && cardRemOfSignIn === '1') { - return ( -
- - {i18n.label["15049"]()} -
- ) - } - }, - cardRemOfSignOut: (field, textAreaProps, form, formParams) => {//下班打卡提醒 - const { - cardRemind - } = formParams; - - if (cardRemind === '1') { - return ( -
- -
- ) - } - }, - minsAfterSignOut:(field, textAreaProps, form, formParams) => {//延后多少分钟提醒 - const { - cardRemind, - cardRemOfSignOut - } = formParams; - - if (cardRemind === '1' && cardRemOfSignOut === '1') { - return ( -
- - {i18n.label["15049"]()} -
- ) - } - }, - remindMode:(field, textAreaProps, form, formParams) => {//提醒方式 - const { - cardRemind - } = formParams; - - if (cardRemind==='1') { - return ( -
- -

- {getLabel(512648,'提醒内容设置')} - {`(${getLabel(512649,'仅适用邮件提醒和短信提醒')})`} -

-
- ) - } - }, - remindOnPC:(field, textAreaProps, form, formParams) => {//登陆PC端弹窗提醒 - const { - cardRemind - } = formParams; - - if (cardRemind==='1') { - return ( - - ) - } - - }, - earlyinearlyoutsame: (field, textAreaProps, form, formParams) => null, - lateinlateoutsame: (field, textAreaProps, form, formParams) => null, - lateoutlateinsame: (field, textAreaProps, form, formParams) => null, - earlyinearlyout: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - let coms = []; - if (formParams.earlyinearlyout === "1") { - coms = [ -
- - this.handleMsgLabelClick("earlyinearlyout")}>示例说明 -
- ] - } - return ( -
-
- -
- { - coms - } -
- ) - }, - lateinlateout: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - let coms = []; - if (formParams.lateinlateout === "1") { - coms = [ -
- - this.handleMsgLabelClick("lateinlateout")}>示例说明 -
- ] - } - return ( -
-
- -
- { - coms - } -
- ) - }, - lateoutlatein: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - let coms = []; - if (formParams.lateoutlatein === "1") { - coms = [ -
- - this.handleMsgLabelClick("lateoutlatein")}>示例说明 -
- ] - } - return ( -
-
- -
- { - coms - } -
- ) - } - - }; - - - stopBubble = (e) => { - e.stopPropagation &&e.stopPropagation(); - e.preventDefault && e.preventDefault(); - } - - handleCardRemindChange = (datas) => { - const { - cardRemind - } = datas; - - if (cardRemind.value === '0') { - this.formTarget.baseForm.updateFields({ - cardRemOfSignIn: '1', - cardRemOfSignOut: '1', - remindMode:'1', - remindOnPC:'0', - - }); - } - } - - @observable dialogStore = new DialogStore(this); - @observable searchStore = new SearchStore('', this); - - @observable remindLoaing = false; - - @observable checkedReminderType = 0;//选中的提醒类型 - - @observable emailRemindContent = { - title:'', - content:'', - params:'', - }; - @observable emailRemindTypeDatas=[]; - - @observable msgRemindContent = { - content:'', - params:'', - }; - @observable msgRemindTypeDatas=[]; - - requestRemindContentTimes = 0; - - get dialogConfig(){ - return { - title: getLabel(512648,'提醒内容设置'), - style: { - width: 700, - height: 500 - } - } - } - - get DialogButtons() { - return ( - [ - , - - ] - ) - } - - get MoreBtn() { - return { - datas: [{ - key: "1", - disabled: false, - icon: , - content: getLabel(505564, '保存'), - onClick: this.handleSaveRemindSettingClick - },{ - key: "2", - disabled: false, - icon: , - content: getLabel(512684, '恢复默认设置'), - onClick: this.handleRestoreDefaultSettingClick - }] - } - } - - get searchConfig() { - return { - searchMoreProps: { - searchType: [] - }, - datas:[{ - key:'0', - title:getLabel(512714,'邮件提醒') - },{ - key:'1', - title:getLabel(512650,'短信提醒') - }] - } - } - - //提醒类型可编辑列表的columns - get remindTypeColumns() { - const { - selectedKey - } = this.searchStore; - - const columns = [{ - title: '', - dataIndex: 'radio', - width: '10%', - com: [{ - type: "RADIO", - key: "radio" - }] - }, { - title: getLabel(512657, '提醒类型'), - dataIndex: 'type', - width: '30%', - com: [{ - type: "INPUT", - key: "type", - viewAttr: 1 - }] - }, { - title: getLabel(125926, '提醒标题'), - dataIndex: 'title', - width: '30%', - com: [{ - type: "INPUT", - key: "title", - viewAttr: 1 - }] - }, { - title: getLabel(512658, '提醒内容'), - dataIndex: 'content', - width: '30%', - com: [{ - type: "INPUT", - key: "content", - viewAttr: 1 - }] - }]; - if (selectedKey === '0') { - return columns - } else { - return columns.filter(col => col.dataIndex !== 'title') - } - }; - - //提醒内容设置组的标题 - @computed get searchGroupTitles() { - const titles = [getLabel(512653, '提醒类型(点击列表行可修改提醒内容)')]; - const label = getLabel(506919, '内容设置'); - - if (this.checkedReminderType === 0) { - titles.unshift(`${label}-${getLabel(512651,'上班打卡提醒')}`); - } else { - titles.unshift(`${label}-${getLabel(512652,'下班打卡提醒')}`); - } - - return titles - } - - //点击"提醒内容设置" - handleSettingLinkClick = () => { - const { - setDialogConfig, - openDialog - } = this.dialogStore, { - setSearchConfig, - setSelectedKey - } = this.searchStore; - - setSearchConfig(this.searchConfig); - setSelectedKey('0'); - - setDialogConfig(this.dialogConfig); - openDialog(); - - //新建班次只需调用一次提醒内容设置相关的接口 - if (this.dialogParams.opType === 'create' && this.requestRemindContentTimes === 1) { - return; - } - - this.getEmailRemindInfo().then(()=>{ - this.getMessageRemindInfo().then(() => { - if (this.dialogParams.opType === 'create') { - this.requestRemindContentTimes = 1; - } - }); - }); - } - - //保存提醒内容 - handleSaveRemindSettingClick=()=>{ - if (this.dialogParams.opType === 'create') { - this.dialogStore.closeDialog(); - }else{ - this.saveRemindContent(); - } - } - - //保存提醒内容 - saveRemindContent = () => { - return new Promise((resolve, reject) => { - this.saveEmailRemind().then(() => { - this.saveMessageRemind().then(() => { - resolve(); - }); - }) - }) - } - - //恢复提醒内容默认设置 - handleRestoreDefaultSettingClick = () => { - const { - selectedKey - } = this.searchStore; - - if (selectedKey === '0') { - this.emailRemindTypeDatas = this.emailDefaultDatas; - }else{ - this.msgRemindTypeDatas = this.msgDefaultDatas; - } - - this.changeRemindContent(); - } - - //获取邮件提醒信息 - getEmailRemindInfo = () => { - this.remindLoaing = true; - - return new Promise((resolve, reject) => { - const params = {}; - if (this.dialogParams.opType === 'edit') { - Object.assign(params, { - serialId: this.opId - }); - }; - api.getEmailRemindForm(params).then(cb => { - const { - datas, - defaultDatas, - signInParams, - signOutParams - } = cb; - - this.emailRemindTypeDatas = datas; - this.emailDefaultDatas = defaultDatas; - this.emailSignInParams = signInParams; - this.emailSignOutParams = signOutParams; - - this.changeRemindContent(); - - resolve(); - - }) - }) - } - - //获取短信提醒信息 - getMessageRemindInfo = () => { - return new Promise((resolve, reject) => { - const params = {}; - if (this.dialogParams.opType === 'edit') { - Object.assign(params, { - serialId: this.opId - }); - }; - api.getMessageRemindForm(params).then(cb => { - const { - datas, - defaultDatas, - signInParams, - signOutParams - } = cb; - - this.msgRemindTypeDatas = datas; - this.msgDefaultDatas = defaultDatas; - this.msgSignInParams = signInParams; - this.msgSignOutParams = signOutParams; - - this.remindLoaing = false; - - resolve(); - - }) - }) - } - - //保存邮件提醒 - saveEmailRemind = () => { - this.remindLoaing = true; - - return new Promise((resolve, reject) => { - const params = { - serialId: this.opId, - datas: JSON.stringify(this.emailRemindTypeDatas) - }; - api.saveEmailRemind(params).then(datas => { - const { - status, - sign, - } = datas; - - if (status === '1' || sign === '1') { - resolve(); - }else{ - message.error(datas.message); - } - }) - }) - } - - //保存信息提醒 - saveMessageRemind = () => { - return new Promise((resolve, reject) => { - const params = { - serialId: this.opId, - datas: JSON.stringify(this.msgRemindTypeDatas) - }; - api.saveMessageRemind(params).then(datas => { - const { - status, - sign, - } = datas; - - if (status === '1' || sign === '1') { - this.remindLoaing = false; - this.dialogStore.closeDialog(); - resolve(); - }else{ - message.error(datas.message); - } - }) - }) - } - - //修改邮件标题 - handleRemindTitleChange = (title) => { - this.emailRemindContent.title = title; - - this.changeTableEditDatas('title') - } - - //修改邮件内容 - handleRemindContentChange = (content) => { - const { - selectedKey - } = this.searchStore; - - if (selectedKey === '0') { - this.emailRemindContent.content = content; - } else { - this.msgRemindContent.content = content; - } - - this.changeTableEditDatas('content'); - } - - //双击可用参数 - handleParamsDoubleClick = (event) => { - this.remindTextAreaRef.setValue(`[${event.target.innerText}]`); - - this.changeTableEditDatas('content'); - } - - //改变可编辑列表的数据 - changeTableEditDatas = (type) => { - const { - selectedKey - } = this.searchStore; - - const datas = (selectedKey === '0') ? this.emailRemindTypeDatas : this.msgRemindTypeDatas; - - let value; - if (selectedKey === '0') { - const { - title, - content - } = this.emailRemindContent; - value = (type === 'title') ? title : content; - } else { - value = this.msgRemindContent.content; - } - datas.forEach(data => { - if (data.radio === '1') { - if (type === 'title') { - data.title = value; - } else { - data.content = value; - } - } - }) - } - - //设置文本域ref - setTextareaRef=(ref)=>{ - this.remindTextAreaRef=ref; - } - - //切换radio - handleTableEditChange = (datas) => { - const { - selectedKey - } = this.searchStore; - - if (selectedKey === '0') { - this.emailRemindTypeDatas = datas; - } else { - this.msgRemindTypeDatas = datas; - } - - this.changeRemindContent(); - } - - @action changeRemindContent = () => { - let datas, rContent, signInParams, signOutParams; - - const {selectedKey}= this.searchStore; - - if (selectedKey === '0') { - datas = this.emailRemindTypeDatas; - rContent = this.emailRemindContent; - signInParams = this.emailSignInParams; - signOutParams = this.emailSignOutParams; - } else { - datas = this.msgRemindTypeDatas; - rContent = this.msgRemindContent; - signInParams = this.msgSignInParams; - signOutParams = this.msgSignOutParams; - } - - //获取被选中提醒类型的索引值 - this.checkedReminderType = datas.findIndex(data => data.radio === '1'); - - const { - title, - content - } = datas.find(data => data.radio === '1'); - - Object.assign(rContent, { - title, - content, - }); - - if (this.checkedReminderType === 0) { - Object.assign(rContent, { - params: (typeof signInParams === 'string') ? signInParams.split(',') : signInParams - }); - } else { - Object.assign(rContent, { - params: (typeof signOutParams === 'string') ? signOutParams.split(',') : signOutParams - }); - } - - } - - //切换【提醒内容设置】页签 - handleTabClick = () => { - this.changeRemindContent(); - } - - childrenComponents = { - shiftonoffworkcount: () => { - const formParams = this.formTarget.baseForm.getFormParams(); - /*if (formParams.shiftonoffworkcount != "1") { - this.formTarget.baseForm.updateFields({ - isresttimeopen: { - value: "0" - } - }); - }*/ - let coms = [], worktimes = this.toJS(this.worktimes); - if (worktimes.length === 0) return []; - for (let i = 1; i <= Number(formParams.shiftonoffworkcount); i++) { - const label = i18n.label["388782"]().replace("{params}", i); - let timeConfig = worktimes[i - 1]; - coms.push( - -
-
-
-
{i18n.label["125809"]()}
-
- this.onTimeChange(i - 1, v)} - /> -
- {timeConfig.start.across === '1' && ( -
{i18n.label["388785"]()}
- )} - {formParams.punchsettings === "1" && ( -
- this.errRefs[`s${i - 1}-0`] = d} - error={this.rangeTimeError}> - (this.worktimes[i - 1].start.mins = (v || 1))} - /> - -
- )} -
-
- {formParams.punchsettings === "1" && ( -
- this.errRefs[`s${i - 1}-1`] = d} - error={this.rangeTimeError}> - (this.worktimes[i - 1].start.mins_next = v)} - /> - -
- )} -
-
-
-
-
{i18n.label["125810"]()}
-
- this.onTimeChange(i - 1, v, false)} - /> -
- {timeConfig.end.across === '1' && ( -
{i18n.label["388785"]()}
- )} - {formParams.punchsettings === "1" && ( -
- this.errRefs[`e${i - 1}-1`] = d} - error={this.rangeTimeError}> - (this.worktimes[i - 1].end.mins_next = v)} - /> - -
- )} -
-
- {formParams.punchsettings === "1" && ( -
- this.errRefs[`e${i - 1}-0`] = d} - error={this.rangeTimeError}> - (this.worktimes[i - 1].end.mins = (v || 1))} - /> - -
- )} -
-
-
- - {i === Number(formParams.shiftonoffworkcount) && ( - - )} -
- ); - } - return [ - { - com:
{coms}
, - col: 1 - } - ]; - }, - isresttimeopen: () => { - const formParams = this.formTarget.baseForm.getFormParams(); - const { fieldMap } = this.formTarget.baseForm; - if (formParams.isresttimeopen != "1") { - return []; - } - const coms = []; - this.toJS(this.restTimeCollection).forEach((d, index) => { - console.debug(d) - const {record, start, end} = d; - const {time: sTime = '12:00', accross: sAccross} = start || {}; - const {time: eTime, accross: eAccross} = end || {}; - coms.push( - -
-
-
{fieldMap["restbeigin"].label}
-
- this.errRefs[`restbeigin${index}`] = d} - error={`"${fieldMap["restbeigin"].label}" ${i18n.message.dataEmpty()}`}> - { - this.restTimeCollection[index].start.time = v; - this.calculateWorkTime(); - } - } - /> - -
- { - sAccross == '1' && -
{i18n.label["388785"]()}
- } -
-
-
{fieldMap["restend"].label}
-
- this.errRefs[`restend${index}`] = d} - error={`"${fieldMap["restend"].label}" ${i18n.message.dataEmpty()}`}> - { - this.restTimeCollection[index].end.time = v; - this.calculateWorkTime(); - } - } - /> - -
- { - eAccross == '1' && -
{i18n.label["388785"]()}
- } -
- -
-
- ); - }) - coms.push( - ( - - ) - ) - return [ - { - com:
{coms}
, - col: 1 - } - ]; - }, - earlyinearlyout: () => { - const formParams = this.formTarget.settingForm.getFormParams(); - let coms = []; - if (formParams.earlyinearlyout === "1") { - if(formParams.earlyinearlyoutsame === "1"){ - const label = i18n.label["388587"](); - let info = i18n.label["513861"]().replace("{time1}", this.lateRules.earlyinearlyout.advancetime || ''); - coms.push( - -
-
-
{i18n.label["513617"]()}
-
- this.errRefs[`earlyinearlyout-advancetime`] = d} - error={getLabel('522833','时间段必填')}> - ( - this.lateRules.earlyinearlyout.advancetime = v - )} - /> - -
-
{i18n.label["15049"]()}
-
{info}
-
-
-
- ); - }else{ - const label = i18n.label["388587"](); - const time1 = this.calculateTime( - this.worktimes[0].start.times, - this.lateRules.earlyinearlyout.advancetime, - false - ), - time2 = this.calculateTime( - this.worktimes[this.worktimes.length - 1].end.times, - this.lateRules.earlyinearlyout.postponetime, - false - ); - let info = i18n.label["513858"]().replace("{time1}", time1 || ''); - info = info.replace("{time2}", time2 || ''); - coms.push( - -
-
-
{i18n.label["388868"]()}
-
- this.errRefs[`earlyinearlyout-advancetime`] = d} - error={getLabel('522833','时间段必填')}> - ( - this.lateRules.earlyinearlyout.advancetime = v - )} - /> - -
-
{getLabel(508152,'分钟,下班可以早走')}
-
- this.errRefs[`earlyinearlyout-postponetime`] = d} - error={getLabel('522833','时间段必填')}> - ( - this.lateRules.earlyinearlyout.postponetime = v - )} - /> - -
-
{i18n.label["15049"]()}
-
{info}
-
-
-
- ); - } - - return [ - { - com:
{coms}
, - col: 1 - } - ]; - } else return []; - }, - lateinlateout: () => { - const formParams = this.formTarget.settingForm.getFormParams(); - let coms = []; - if (formParams.lateinlateout === "1") { - if(formParams.lateinlateoutsame === "1"){ - const label = i18n.label["388591"](); - let info = i18n.label["513862"]().replace("{time1}", this.lateRules.lateinlateout.advancetime || ''); - coms.push( - -
-
-
{i18n.label["513618"]()}
-
- this.errRefs[`lateinlateout-advancetime`] = d} - error={getLabel('522833','时间段必填')}> - ( - this.lateRules.lateinlateout.advancetime = v - )} - /> - -
-
{i18n.label["15049"]()}
-
{info}
-
-
-
- ); - }else{ - const label = i18n.label["388591"](); - const time1 = this.calculateTime( - this.worktimes[0].start.times, - this.lateRules.lateinlateout.advancetime - ), - time2 = this.calculateTime( - this.worktimes[this.worktimes.length - 1].end.times, - this.lateRules.lateinlateout.postponetime - ); - let info = i18n.label["513859"]().replace("{time1}", time1 || ''); - info = info.replace("{time2}", time2 || ''); - coms.push( - -
-
-
{i18n.label["388871"]()}
-
- this.errRefs[`lateinlateout-advancetime`] = d} - error={getLabel('522833','时间段必填')}> - ( - this.lateRules.lateinlateout.advancetime = v - )} - /> - -
-
{i18n.label["508155"]()}
-
- this.errRefs[`lateinlateout-postponetime`] = d} - error={getLabel('522833','时间段必填')}> - ( - this.lateRules.lateinlateout.postponetime = v - )} - /> - -
-
{i18n.label["15049"]()}
-
{info}
-
-
-
- ); - } - return [ - { - com:
{coms}
, - col: 1 - } - ]; - } else return []; - }, - lateoutlatein: () => { - const formParams = this.formTarget.settingForm.getFormParams(); - let coms = []; - const rules = this.toJS(this.lateRules); - if (formParams.lateoutlatein === "1") { - if (formParams.lateoutlateinsame === "1") { - rules.lateoutlatein.map((rule, index) => { - const label = `${i18n.label["388592"]()}${index + 1}`; - let info = i18n.label["513863"]().replace("{time1}", this.lateRules.lateoutlatein[index].advancetime || ''); - coms.push( - -
-
-
{i18n.label["513619"]()}
-
- this.errRefs[`lateoutlatein-${index}-advancetime`] = d} - error={getLabel('522833','时间段必填')}> - - (this.lateRules.lateoutlatein[index].advancetime = v) - } - /> - -
-
{i18n.label["15049"]()}
-
{info}
- {rules.lateoutlatein.length >= 1 && formParams.lateoutlateinsame !== "1" && ( - - )} -
-
-
- ); - }); - if (rules.lateoutlatein.length < 3) { - coms.push( - - ); - } - if(formParams.lateoutlateinsame === "1"){ - coms = [coms[0]]; - } - return [ - { - com:
{coms}
, - col: 1 - } - ]; - }else{ - rules.lateoutlatein.map((rule, index) => { - const label = `${i18n.label["388592"]()}${index + 1}`; - const time1 = this.calculateTime( - this.worktimes[this.worktimes.length - 1].end.times, - this.lateRules.lateoutlatein[index].advancetime - ), - time2 = this.calculateTime( - this.worktimes[0].start.times, - this.lateRules.lateoutlatein[index].postponetime - ); - let info = i18n.label["513860"]().replace("{time1}", time1 || ''); - info = info.replace("{time2}", time2 || ''); - coms.push( - -
-
-
{i18n.label["388874"]()}
-
- this.errRefs[`lateoutlatein-${index}-advancetime`] = d} - error={getLabel('522833','时间段必填')}> - - (this.lateRules.lateoutlatein[index].advancetime = v) - } - /> - -
-
{i18n.label["513616"]()}
-
- this.errRefs[`lateoutlatein-${index}-postponetime`] = d} - error={getLabel('522833','时间段必填')}> - - (this.lateRules.lateoutlatein[index].postponetime = v) - } - /> - -
-
{i18n.label["15049"]()}
-
{info}
- {rules.lateoutlatein.length >= 1 && ( - - )} -
-
-
- ); - }); - if (rules.lateoutlatein.length < 3) { - coms.push( - - ); - } - return [ - { - com:
{coms}
, - col: 1 - } - ]; - } - - } else return []; - - } - }; - - - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable - spinning = false; - @observable - selectedSubCompany; - @observable - table = new TableStore(); - @observable - worktimes = []; - @observable - hour = 0; - @observable - minute = 0; - @observable - lateRules = { - earlyinearlyout: { - advancetime: "30", - postponetime: "30" - }, - lateinlateout: { - advancetime: "30", - postponetime: "30" - }, - lateoutlatein: [] - }; - @observable restTimeSections = [ - { - resttype: "start", - time: '', - across: '' - }, - { - resttype: "end", - time: '', - across: '' - } - ]; - @observable - refreshCalRs = new Date().getTime(); - @observable - editTabConfig = { - tabs: [], - keyParam: "viewCondition", - activeTabKey: "1", - tabChangeHandle: key => this.setActiveTab(key) - }; - - @observable canAdd = false; - @observable canCreate = false; - @observable canDel = false; - - dialogParams = { - ...this.dialogPropsDef, - opType: "create", - style: { - width: 500, - height: 165 - }, - onCancel: () => { - this.dialogParams.visible = false; - this.dialogParams.opType = "create"; - this.opId = null; - } - }; - - @observable timeErrorType = 1; - - @observable restTimeCollection = []; - /********************* observable list *********************/ - - /********************* computed list *********************/ - @computed - get tableMultiDelete() { - return this.table.selectedRowKeys.length === 0; - } - - @computed get rangeTimeError(){ - return this.timeErrorType == 1 ? getLabel('505756','打卡时段无法重叠') : getLabel('505757','打卡时段无法跨两天'); - } - /********************* computed list *********************/ - - /********************* action list *********************/ - @action onAddrest = () => { - this.restTimeCollection.push({ - record: uuid(), - start: {time: '', accross: '0'}, - end: {time: '', accross: '0'} - }); - - this.calculateWorkTime(); - } - - @action deleteRest = index => { - this.restTimeCollection.splice(index, 1); - this.calculateWorkTime(); - } - - setRuleOptions = () => { - this.ruleOptions.length = 0; - for (let i = 0; i < 10; i++) { - for (let j = 1; j <= 2; j++) { - this.ruleOptions.push({ - key: i + j / 2, - showname: (i + j / 2).toString() - }); - } - } - }; - @action - init = () => { - this.selectedSubCompany = null; - this.setRuleOptions(); - this.containerInitFinished.init = true; - api.init().then( - rs => { - rs.map((data, index) => { - if (data.status === "1") { - switch (index) { - case 0: - this.rightMenus = data.rightMenu; - break; - case 1: - let tabs = []; - data.tabs.map(tab => { - tabs.push({ - color: "#000000", - groupId: `g{tab.key}`, - title: tab.title, - viewCondition: tab.key - }); - }); - this.editTabConfig.tabs = tabs; - break; - } - } - }); - this.getTableData(); - }, - error => {} - ); - }; - - @computed - get getTopProps(){ - let buttons = []; - this.canCreate && buttons.push(( - - )); - this.canDel && buttons.push(( - - )); - - let menus = this.convertToMenus(buttons); - return { - buttons, - menus: [ - ...menus, - ...this.getBasicMenus("HRM_ENGINE_SHIFTMANAGER") - ] - }; - }; - - @action - treeNodeClick = (event, ids, nodeids, nodes) => { - const { data: nodeData } = event.node.props; - this.selectedSubCompany = nodeData; - this.getTableData(); - }; - - @action - clearData = () => { - this.worktimes.length = 0; - this.lateRules.lateoutlatein.lenght = 0; - this.requestRemindContentTimes = 0; - }; - - @action - getTableData = (params = {}) => { - this.searchParams = params; - Object.assign(params, { - subcompanyid: this.selectedSubCompany ? this.selectedSubCompany.id : null - }); - api.getShiftManagementSearchList(params).then( - data => { - if (data.status === "1") { - this.canCreate = data.canAdd; - this.canDel = data.canDel; - this.table = new TableStore(); - this.table.getDatas(data.sessionkey, 1); - } else { - message.error(data.message); - } - }, - error => {} - ); - }; - - @action - getShiftManagementBaseForm = (params, callback) => { - if (this.spinning) return; - this.spinning = true; - api.getShiftManagementBaseForm(params).then( - data => { - if (data.status === "1") { - this.processCondition(data); - this.canAdd = data.canAdd; - this.shift_24 = data.shift_24 || 0; - this.restTimeCollection = data.restTimeSections; - this.setFormData("baseForm", data.condition); - if (this.formTarget.baseForm.isFormInit) { - callback && callback(); - } - } else { - message.error(data.message); - } - this.spinning = false; - }, - error => (this.spinning = false) - ); - }; - - processCondition = (data) => { - const { - condition - } = data; - - condition.map(c => c.items.map(item => { - if (item.domkey[0] === 'remindMode') { - item.options.map(option => { - const { - key, - showname - } = option; - - let callback; - - if (key === '2') { //邮件提醒 - callback = (e) => { - this.stopBubble(e); - window.open(`/spa/email/static4engine/engine.html#/email/sysSetting`); - }; - } - if (key === '3') { //短信提醒 - callback = (e) => { - this.stopBubble(e); - window.open(`/spa/smallApp/static4engine/engine.html#/sms/SmsSet`); - } - } - if (key !== '1') { - option.showname = ( - {showname} - ); - } - }) - } - })) - } - - @action - getCreateForm = () => { - this.clearData(); - this.getShiftManagementBaseForm(null, () => { - if(this.selectedSubCompany != null){ - this.formTarget.baseForm.updateFields({ - subcompanyid: { - value: this.selectedSubCompany.id.toString(), - valueSpan: this.selectedSubCompany.name, - valueObj: [{ - id: this.selectedSubCompany.id.toString(), - name: this.selectedSubCompany.name - }] - } - }); - } - this.worktimes.push({ - start: { - ...this.worktimeConstruct, - times: "09:00", - key: 's0' - }, - end: { - ...this.worktimeConstruct, - times: "18:00", - key: 'e0' - } - }); - this.calculateWorkTime(); - this.dialogParams.title = i18n.label["388538"](); - this.dialogParams.opType = "create"; - this.dialogParams.style = { - width: 1000, - height: 420 - }; - this.dialogParams.visible = true; - }); - }; - - @action - onWorkCountChange = v => { - this.worktimes.length = 0; - const count = Number(v.shiftonoffworkcount.value); - for (let i = 1; i <= count; i++) { - this.worktimes.push({ - start: { - across: 0, - mins: i == 1 ? 60 : 30, - mins_next:'', - times: count === 1 ? "09:00" : this.sTime[i - 1], - key: `s${i - 1}` - }, - end: { - across: 0, - mins: i == count ? 60 : 29, - mins_next:'', - times: count === 1 ? "18:00" : this.eTime[i - 1], - key: `e${i - 1}` - } - }); - } - this.calculateWorkTime(); - }; - - @action - onTimeChange = (index, v, isStart = true) => { - this.worktimeError = false; - const d = this.toJS(this.worktimes); - let record = d[index]; - - if (v === "") { - record[isStart ? "start" : "end"].key = new Date().getTime(); - this.worktimes[index] = record; - return; - } - record[isStart ? "start" : "end"].times = v; - - let s = this.convertTimeToMoment(record.start.times), - e = this.convertTimeToMoment(record.end.times); - - if(this.shift_24 == 0 && record.start.across == record.end.across && s.isSame(e)){ - this.worktimeError = true; - // return; - } - - //计算是否跨天 - if (d.length === 1) {//只有1个班次 - record.end.across = (e.isBefore(s) || e.isSame(s)) ? '1' : '0'; - } else{//多个班次 - if(index == (d.length - 1)){//最后一个班次 - //最后一个班次下班时间与第一个班次上班时间比较 - let lastRecord = d[index - 1]; - let le = this.convertTimeToMoment(lastRecord.end.times); - - if(this.shift_24 == 0 && lastRecord.end.across === '1' && (s.isBefore(le) || e.isBefore(s))){ - this.worktimeError = true; - // return; - }else if(s.isBefore(le)){ - record.start.across = record.end.across = '1'; - }else if(e.isBefore(s)){ - record.start.across = lastRecord.end.across; - record.end.across = "1"; - }else{ - record.start.across = lastRecord.end.across; - record.end.across = record.start.across; - } - }else{ - if(index != 0){ - let lastRecord = d[index - 1]; - let le = this.convertTimeToMoment(lastRecord.end.times); - record.start.across = s.isBefore(le) ? '1' : lastRecord.end.across; - } - record.end.across = e.isBefore(s) ? '1' : record.start.across; - for (let i = index + 1; i < d.length; i++) { - record = d[i - 1]; - - s = this.convertTimeToMoment(record.start.times); - e = this.convertTimeToMoment(record.end.times); - - let nextRecord = d[i]; - - let nst = this.convertTimeToMoment(nextRecord.start.times); - let net = this.convertTimeToMoment(nextRecord.end.times); - if(this.shift_24 == 0 && record.end.across === '1' && (nst.isBefore(e) || net.isBefore(nst))){ - this.worktimeError = true; - // return; - } - if(nst.isBefore(e)){ - nextRecord.start.across = nextRecord.end.across = "1"; - }else if(net.isBefore(nst)){ - nextRecord.start.across = record.end.across; - nextRecord.end.across = "1"; - }else{ - nextRecord.start.across = record.end.across; - nextRecord.end.across = nextRecord.start.across; - } - } - } - } - this.worktimes = d; - if(this.worktimeError) - return; - this.calculateWorkTime(); - }; - - calculateRestTime = (isStart = false) => { - if(isStart) - return this.restTimeSections[0].across == '1'; - else - return this.restTimeSections[1].across == '1'; - } - -checkRestTimeCollection = (times) => { - this.resttimeRangeError = false; - if(times.length <= 1) - return this.resttimeRangeError; - const obj = times.reduce((current, next) => { - const {s, e} = next; - current.start.push(s.format('YYYY-MM-DD HH:mm:ss')); - current.end.push(e.format('YYYY-MM-DD HH:mm:ss')); - return current; - }, {start: [], end: []}); - let {start, end} = obj; - start = start.sort(); - end = end.sort(); - - for(let i = 1; i < start.length; i++){ - if (start[i] <= end[i - 1]){ - message.error(getLabel('523624','休息时间不能重叠')); - this.resttimeRangeError = true; - } - } - - return this.resttimeRangeError; - } - - calculateWorkTime = () => { - this.resttimeError = false; - this.timeRange = 0; - const formParams = this.formTarget.baseForm.getFormParams(); - let hour = 0, - minute = 0; - try { - const d = this.toJS(this.worktimes); - let firstS; - let lastE; - d.map((record, i) => { - let s = this.convertTimeToMoment(record.start.times), - e = this.convertTimeToMoment(record.end.times); - i == 0 && (firstS = s); - if (record.start.across === "1" && record.end.across === "1") { - } else if (record.end.across === "1") { - e.add(1, "d"); - } - i == d.length - 1 && (lastE = e); - minute += Math.abs(s.diff(e, "m")); - }); - if (formParams.isresttimeopen === "1") { - const times = []; - const wst = this.convertTimeToMoment(this.worktimes[0].start.times), - wet = this.convertTimeToMoment(this.worktimes[this.worktimes.length - 1].end.times); - if(this.worktimes[this.worktimes.length - 1].end.across == '1') - wet.add(1, 'd'); - - this.restTimeCollection = this.toJS(this.restTimeCollection).map((d, index) => { - const {start, end} = d; - const {time: restbeigin = ''} = start || {}; - const {time: restend = ''} = end || {}; - let sAcross = '0', eAcross = '0'; - if (restbeigin != "" && restend != "") { - const rst = this.convertTimeToMoment(restbeigin), - ret = this.convertTimeToMoment(restend); - - if(index != 0){ - let lastRecord = this.restTimeCollection[index - 1]; - let le = this.convertTimeToMoment(lastRecord.end.time); - d.start.accross = rst.isBefore(le) ? '1' : lastRecord.end.across; - }else{ - d.start.accross = rst.isBefore(wst) ? '1' : '0'; - } - d.end.accross = ret.isBefore(rst) ? '1' : d.start.accross; - - console.debug(d) - - d.start.accross == '1' && rst.add(1, 'd'); - d.end.accross == '1' && ret.add(1, 'd'); - - times.push({s: rst, e: ret}); - - if ( - rst.isBefore(wst) || - rst.isAfter(wet) || - ret.isBefore(wst) || - ret.isAfter(wet) || - rst.isSame(ret) - ){ - this.resttimeError = true; - message.error('休息时间不在工作时段内'); - - if(!rst.isSame(ret)) { - this.toJS(this.worktimes).forEach((worktime) => { - const s = this.convertTimeToMoment(worktime.start.times); - worktime.start.across == '1' && s.add(1, 'd'); - - const e = this.convertTimeToMoment(worktime.end.times); - worktime.end.across == '1' && e.add(1, 'd'); - - let ts = rst, te = ret; - if(ts.isBefore(s)) - ts = s; - else if(ts.isAfter(e)){ - ts = e; - } - if(te.isAfter(e)) - te = e; - - minute -= Math.abs(ts.diff(te, "m")); - }) - } - }else{ - minute -= Math.abs(rst.diff(ret, "m")); - } - } - return d; - }); - this.checkRestTimeCollection(times); - } - - this.worktime = minute; - this.hour = Math.floor(minute / 60); - this.minute = minute % 60; - } catch (ex) { - console.error(ex) - } - let result = i18n.label["388788"]().replace("{hour}", hour); - result = result.replace("{minute}", minute); - return result; - }; - - convertTimeToMoment = time => { - const arr = time.split(':'); - return this.moment() - .hour(Number(arr[0])) - .minute(Number(arr[1])) - .second(0) - .millisecond(0); - } - - // compareTime = (start, end) => { - // let compareLeft, compareRight, minute, minLeft, minRight, rs = true; - // //比较上班开始打卡和下班结束打卡时间是否重叠 - // compareLeft = this.convertTimeToMoment(start.times); - // start.across == '1' && compareLeft.add(1, 'd'); - // compareRight = this.convertTimeToMoment(end.times); - // end.across == '1' && compareRight.add(1, 'd'); - // minLeft = Number(start.mins == '' ? 0 : start.mins); - // compareLeft.add(start.time * minLeft, 'm'); - // minRight = Number(end.mins == '' ? 0 : end.mins); - // compareRight.add(end.time * minRight, 'm'); - // if(!compareLeft.isBefore(compareRight) || Math.abs(compareLeft.diff(compareRight, 'd')) > 1 || Math.abs(compareLeft.diff(compareRight, 'm')) >= (60 * 24) || compareLeft.format('HH:mm:ss') == compareRight.format('HH:mm:ss')){ - // this.timeErrorType = (Math.abs(compareLeft.diff(compareRight, 'd')) > 1 ? 2 : 1); - // [start.key, end.key].map(k => { - // const errRefKey = `${k}-0`; - // this.errRefs[errRefKey] && this.errRefs[errRefKey].showError(); - // }); - // rs = false; - // } - // return rs; - // } - - // @action - // checkSignTime = () =>{ - // let failed = false; - // const worktimes = this.toJS(this.worktimes); - // const len = worktimes.length; - // for(let i = 0; i < len; i++){ - // let {start, end} = worktimes[i]; - // failed = !this.compareTime({...start, time: -1}, {...end, time: 1}); - // if(failed) - // break; - // if(len > 1){ - // if(i == 0){ - // end = worktimes[len - 1].end; - // failed = !this.compareTime({...start, time: -1}, {...end, time: 1}); - // if(failed) - // break; - // if(i < len -1){ - // start = worktimes[i].end; - // end = worktimes[i + 1].start; - // failed = !this.compareTime({...start, time: 1}, {...end, time: -1}); - // if(failed) - // break; - // } - // }else if(i < len -1){ - // start = worktimes[i].end; - // end = worktimes[i + 1].start; - // failed = !this.compareTime({...start, time: 1}, {...end, time: -1}); - // if(failed) - // break; - // } - // } - // } - // return failed; - // } - - compareTime = (t1, t2, keys) => { - const ks = keys.map(k => k.split('-')[0]); - const sameKey = ks[0] == ks[1]; - if(!t1.isBefore(t2) || Math.abs(t1.diff(t2, 'd')) > 1 || (!sameKey && Math.abs(t1.diff(t2, 'm')) >= (60 * 24)) || t1.format('HH:mm:ss') === t2.format('HH:mm:ss')){ - this.timeErrorType = (Math.abs(t1.diff(t2, 'd')) > 1 ? 2 : 1); - keys.map(k => { - console.debug && console.debug(t1.format('YYYY-MM-DD HH:mm:ss'), t2.format('YYYY-MM-DD HH:mm:ss')); - this.errRefs[k] && this.errRefs[k].showError(); - }); - return true; - } - } - - /** - * 比对当前班次信息 - * 1.当前班次上班开始打卡时间与当前班次上班结束打卡时间比对 - * 2.当前班次上班结束打卡时间与当前班次下班开始打卡时间比对 - * 3.当前班次下班开始打卡时间与当前班次下班结束打卡时间比对 - * 4.当前班次上班开始打卡时间与下班结束打卡时间比对 - */ - compareCurrentShift = worktime => { - let rs = false; - const {start, end} = worktime; - const {times: st, mins: sm, mins_next: smn, across: sAcross, key: sk} = start; - const {times: et, mins: emn, mins_next: em, across: eAcross, key: ek} = end; - //上班时间 - let workStartTime = this.convertTimeToMoment(st).add((sAcross == 1 ? 1 : 0), 'd') - //下班时间 - let workOffTime = this.convertTimeToMoment(et).add((eAcross == 1 ? 1 : 0), 'd') - //上班开始打卡时间 - const workStartBeginTime = cloneDeep(workStartTime).add(-1 * Number(sm == '' ? 0 : sm), 'm'); - // console.debug(workStartBeginTime.format('YYYY-MM-DD HH:mm:ss')); - //上班结束打卡时间 - const workStartEndTime = cloneDeep(workStartTime).add(Number(smn == '' ? 0 : smn), 'm'); - // console.debug(workStartEndTime.format('YYYY-MM-DD HH:mm:ss')); - //下班开始打卡时间 - const workOffBeginTime = cloneDeep(workOffTime).add(-1 * Number(em == '' ? 0 : em), 'm'); - // console.debug(workOffBeginTime.format('YYYY-MM-DD HH:mm:ss')); - //下班结束打卡时间 - const workOffEndTime = cloneDeep(workOffTime).add(Number(emn == '' ? 0 : emn), 'm'); - // console.debug(workOffEndTime.format('YYYY-MM-DD HH:mm:ss')); - - //1.当前班次上班开始打卡时间与当前班次上班结束打卡时间比对 - rs = rs || this.compareTime(workStartBeginTime, workStartEndTime, [`${sk}-0`, `${sk}-1`]); - //2.当前班次上班结束打卡时间与当前班次下班开始打卡时间比对 - rs = rs || this.compareTime(workStartEndTime, workOffBeginTime, [`${sk}-1`, `${ek}-1`]); - //3.当前班次下班开始打卡时间与当前班次下班结束打卡时间比对 - rs = rs || this.compareTime(workOffBeginTime, workOffEndTime, [`${ek}-1`, `${ek}-0`]); - //4.当前班次上班开始打卡时间与下班结束打卡时间比对 - rs = rs || this.compareTime(workStartBeginTime, workOffEndTime, [`${sk}-0`, `${ek}-0`]); - - return rs; - } - - /** - * 比对当前班次与下一班次时间 - * 当前班次下班结束打卡时间与下一班次上班开始打卡时间比对 - */ - compareNextShift = (currentWorktime, nextWorktime) => { - let rs = false; - const {end} = currentWorktime; - const {start} = nextWorktime; - const {times: st, mins: sm, across: sAcross, key: sk} = end; - const {times: et, mins: em, across: eAcross, key: ek} = start; - //当前班次时间 - let current = this.convertTimeToMoment(st).add((sAcross == 1 ? 1 : 0), 'd') - //下次班次时间 - let next = this.convertTimeToMoment(et).add((eAcross == 1 ? 1 : 0), 'd') - //当前班次下班结束打卡时间 - const currentTime = cloneDeep(current).add(Number(sm == '' ? 0 : sm), 'm'); - // console.debug(currentTime.format('YYYY-MM-DD HH:mm:ss')); - //下次班次上班开始打卡时间 - const nextTime = cloneDeep(next).add(-1 * Number(em == '' ? 0 : em), 'm'); - // console.debug(nextTime.format('YYYY-MM-DD HH:mm:ss')); - - //当前班次下班结束打卡时间与下一班次上班开始打卡时间比对 - rs = rs || this.compareTime(currentTime, nextTime, [`${sk}-0`, `${ek}-0`]); - - return rs; - } - - /** - * 比对第一个班次与最后一个班次时间 - * 第一个班次上班开始打卡时间与最后一个班次下班结束打卡时间的比对 - */ - compareShift = (firstWorktime, lastWorktime) => { - let rs = false; - const {start} = firstWorktime; - const {end} = lastWorktime; - const {times: st, mins: sm, across: sAcross, key: sk} = start; - const {times: et, mins: em, across: eAcross, key: ek} = end; - //第一个班次时间 - let first = this.convertTimeToMoment(st).add((sAcross == 1 ? 1 : 0), 'd') - //最后一个班次时间 - let next = this.convertTimeToMoment(et).add((eAcross == 1 ? 1 : 0), 'd') - //第一个班次上班开始打卡时间 - const firstTime = cloneDeep(first).add(-1 * Number(sm == '' ? 0 : sm), 'm'); - //最后一个班次下班结束打卡时间 - const lastTime = cloneDeep(next).add(Number(em == '' ? 0 : em), 'm'); - - //第一个班次上班开始打卡时间与最后一个班次下班结束打卡时间的比对 - rs = rs || this.compareTime(firstTime, lastTime, [`${sk}-0`, `${ek}-0`]); - - return rs; - } - - /** - * 1.当前班次上班开始打卡时间与当前班次上班结束打卡时间比对 - * 2.当前班次上班结束打卡时间与当前班次下班开始打卡时间比对 - * 3.当前班次下班开始打卡时间与当前班次下班结束打卡时间比对 - * 4.当前班次下班结束打卡时间与下一班次上班开始打卡时间比对 - * 5.最后一个班次下班结束打卡时间与第一个班次上班开始打卡时间比对 - * 6.只有一个班次时还需要进行上班开始打卡时间与下班结束打卡时间的比对 - */ - @action - checkSignTime = () =>{ - if(this.shift_24 != 0) - return false; - let failed = false; - const worktimes = this.toJS(this.worktimes); - const len = worktimes.length; - if(len == 1){ - const worktime = worktimes[0]; - return this.compareCurrentShift(worktime); - } - for(let i = 0; i < len; i++){ - const worktime = worktimes[i]; - failed = this.compareCurrentShift(worktime); - if(failed) - break; - if(i + 1 == len){ - const firstWorktime = worktimes[0]; - failed = this.compareShift(firstWorktime, worktime); - if(failed) - break; - }else{ - const nextWorktime = worktimes[i + 1]; - failed = this.compareNextShift(worktime, nextWorktime); - if(failed) - break; - } - } - return failed; - } - - @action - save = (setting = false) => { - if ( - this.dialogParams.opType === "edit" && - this.editTabConfig.tabs.length > 0 && - this.editTabConfig.activeTabKey === "2" - ) { - this.saveRule(); - return; - } - if (this.spinning) return; - this.spinning = true; - const formParams = this.formTarget.baseForm.getFormParams(); - window.e9HideFormFieldKeys = []; - const{shiftonoffworkcount, isresttimeopen, cardRemind,cardRemOfSignIn,cardRemOfSignOut, halfcalrule}=formParams; - /*if ( - shiftonoffworkcount != null && - (shiftonoffworkcount != "1" || - (shiftonoffworkcount === "1" && - isresttimeopen && - isresttimeopen != "1")) - ) {*/ - window.e9HideFormFieldKeys.push(...["restbeigin", "restend"]); - //} - if(halfcalrule == '0'){ - ['halfcalpoint','halfcalpoint2cross'].forEach(key=>{ - window.e9HideFormFieldKeys.push(key); - }) - } - if (!cardRemind || cardRemind === '0') {//关闭【打卡提醒】开关 - ['minsBeforeSignIn','minsAfterSignOut'].forEach(key=>{ - window.e9HideFormFieldKeys.push(key); - }) - } - if (cardRemind === '1') { - if(cardRemOfSignIn === '0') { - window.e9HideFormFieldKeys.push('minsBeforeSignIn'); - } - if (cardRemOfSignOut === '0') { - window.e9HideFormFieldKeys.push('minsAfterSignOut'); - } - } - if(this.shift_24 == 1 && this.timeRange / 60 > 24){ - this.spinning = false; - message.error(getLabel('518907','班次设置不能超过24小时')); - return; - } - - this.formTarget.baseForm.validateForm().then(f => { - if (f.isValid) { - let data = { ...formParams }; - if (this.opId != null) data.id = this.opId; - if (this.selectedSubCompany && !data.subcompanyid) - data.subcompanyid = this.selectedSubCompany.id; - const worktimes = this.toJS(this.worktimes); - worktimes.map((record, index) => { - record.record = index; - if(formParams.punchsettings != '1'){ - record.start.mins = 0; - record.end.mins = 0; - } - }); - data.workSections = worktimes; - data.worktime = this.worktime; - if(this.worktimeError){ - message.error(i18n.label["388878"]()); - this.spinning = false; - return; - } - if(formParams.punchsettings == '1' && this.checkSignTime()){ - this.spinning = false; - return; - } - if(/*shiftonoffworkcount == "1" &&*/ isresttimeopen == '1'){ - if(this.resttimeError){ - message.error('休息时间不在工作时段内'); - this.spinning = false; - return; - } - - if(this.resttimeRangeError){ - message.error(getLabel('523624','休息时间不能重叠')); - this.spinning = false; - return; - } - // if(this.resttimeError){ - // message.error(i18n.label["390303"]()); - // this.spinning = false; - // return; - // } - - const arr = this.toJS(this.restTimeCollection); - if(arr.length == 0){ - message.error(getLabel('523634','请设置休息时间')); - this.spinning = false; - return; - } - - const rIndex = []; - arr.map((d, i) => { - const {start, end} = d; - const {time: restbeigin = ''} = start || {}; - const {time: restend = ''} = end || {}; - const flag = (restbeigin == '' || restend == ''); - flag && rIndex.push(i); - restbeigin == '' && this.errRefs[`restbeigin${i}`] && this.errRefs[`restbeigin${i}`].showError(); - restend == '' && this.errRefs[`restend${i}`] && this.errRefs[`restend${i}`].showError(); - }) - if(rIndex.length > 0){ - this.spinning = false; - return; - } - } - if(halfcalrule == '1'){ - const {halfcalpoint, halfcalpoint2cross} = data; - const time = this.convertTimeToMoment(halfcalpoint).add(Number(halfcalpoint2cross), 'd'); - const start = worktimes[0].start; - const end = worktimes[worktimes.length - 1].end; - const startTime = this.convertTimeToMoment(start.times).add(Number(start.across), 'd'); - const endTime = this.convertTimeToMoment(end.times).add(Number(end.across), 'd'); - if(time.isBefore(startTime) || time.isAfter(endTime)){ - message.error(i18n.label['514034']()); - this.spinning = false; - return; - } - } - - // data.restTimeSections = this.toJS(this.restTimeSections); - data.restTimeSections = this.toJS(this.restTimeCollection).map((d, i) => { - return {...d, orderId: i} - }); - - const params = { data: JSON.stringify(data) }; - api.saveShiftManagementBaseForm(params).then( - data => { - if (data.status === "1") { - const cb = () => { - message.success(i18n.message.saveSuccess()); - this.dialogParams.onCancel(); - this.getTableData(this.toJS(this.searchParams)); - if (setting) this.doEdit(data.id, "2"); - } - - //新建班次时,因为拿不到班次id,所以需要先保存班次,然后再保存提醒内容设置。 - if (this.dialogParams.opType === 'create') { - this.opId = data.id; - this.saveRemindContent().then(()=>{ - cb(); - }) - }else{ - cb(); - } - } else { - message.error(data.message); - } - this.spinning = false; - }, - error => (this.spinning = false) - ); - } else { - f.showErrors(); - const fields = this.formTarget.baseForm.fieldMap; - [...Object.keys(fields)].map(k => { - const e = this.formTarget.baseForm.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - this.errRefs[k] && this.errRefs[k].showError(); - } - }); - this.showError = new Date().getTime(); - this.spinning = false; - } - }); - }; - - @action - getShiftInfo = (id, callback) => { - api.getShiftInfo({ id }).then(rs => { - let workSections, personalizedRuleDetails; - rs.map((data, index) => { - if (data.status === "1") { - switch (index) { - case 0: - this.processCondition(data); - this.canAdd = data.canAdd; - this.shift_24 = data.shift_24 || 0; - this.setFormData("baseForm", data.condition); - workSections = data.workSections || []; - this.restTimeCollection = data.restTimeSections - break; - case 1: - data.condition[0].items.map(item => (item.colSpan = 2)); - personalizedRuleDetails = data.personalizedRuleDetails; - this.setFormData("settingForm", data.condition); - break; - } - } - }); - if ( - this.formTarget.baseForm.isFormInit && - this.formTarget.settingForm.isFormInit - ) - callback && callback(workSections, personalizedRuleDetails); - }); - }; - - @action - setWorkSection = workSections => { - let arr = []; - if (workSections && workSections.length > 0) { - workSections.map((d, i) => { - arr.push({ - start: { - ...d.start, - key: `s${i}` - }, - end: { - ...d.end, - key: `e${i}` - } - }); - }); - } else { - arr.push({ - start: { - ...this.worktimeConstruct, - times: "09:00", - key: 's0' - }, - end: { - ...this.worktimeConstruct, - times: "18:00", - key: 'e0' - } - }); - } - this.worktimes = arr; - }; - - @action - setLateRule = details => { - if (details == null) return; - const { earlyinearlyout, lateinlateout, lateoutlatein } = details; - if (earlyinearlyout != null) { - this.lateRules.earlyinearlyout = earlyinearlyout; - } else { - this.lateRules.earlyinearlyout = { - advancetime: "30", - postponetime: "30" - }; - } - if (lateinlateout != null) { - this.lateRules.lateinlateout = lateinlateout; - } else { - this.lateRules.lateinlateout = { - advancetime: "30", - postponetime: "30" - }; - } - this.lateRules.lateoutlatein.length = 0; - if (lateoutlatein && lateoutlatein.length > 0) { - lateoutlatein.map(d => { - this.lateRules.lateoutlatein.push({ - advancetime: d.advancetime, - postponetime: d.postponetime - }); - }); - } - }; - - @action - doEdit = (id, tabKey) => { - this.opId = id; - - this.getShiftInfo(id, (workSections, personalizedRuleDetails) => { - this.setWorkSection(workSections); - this.setLateRule(personalizedRuleDetails); - this.calculateWorkTime(); - this.dialogParams.title = i18n.label["388539"](); - this.dialogParams.opType = "edit"; - this.dialogParams.style = { - width: 1000, - height: 420 - }; - this.dialogParams.visible = true; - this.setActiveTab(tabKey); - }); - }; - - @action - setActiveTab = key => { - this.editTabConfig.activeTabKey = - key || this.editTabConfig.tabs[0].viewCondition; - const tabIndex = this.getTabIndex(this.editTabConfig.tabs, key); - if (tabIndex < 0) return; - }; - - @action - ruleOp = (index, add = true) => { - if (add) { - this.lateRules.lateoutlatein.push({ - advancetime: "30", - postponetime: "30" - }); - } else { - this.lateRules.lateoutlatein.splice(index, 1); - } - }; - - @action - saveRule = () => { - if (this.spinning) return; - this.spinning = true; - const formParams = this.formTarget.settingForm.getFormParams(); - window.e9HideFormFieldKeys = []; - const { fieldMap } = this.formTarget.settingForm; - [...Object.keys(fieldMap)].map(key => { - if ( - fieldMap[key].checkbox && - (fieldMap[key].checkboxValue || false) == false - ) { - window.e9HideFormFieldKeys.push(key); - } - }); - - this.formTarget.settingForm.validateForm().then(f => { - if (f.isValid) { - let data = { ...formParams }; - if (this.opId != null) data.id = this.opId; - if (this.selectedSubCompany) - data.subcompanyid = this.selectedSubCompany.id; - data.personalizedRuleDetails = this.toJS(this.lateRules); - let flag = true; - if (formParams.earlyinearlyout === "1") {//早到早走 - const {earlyinearlyout: {advancetime, postponetime}} = data.personalizedRuleDetails; - if((advancetime || '') == ''){ - this.errRefs[`earlyinearlyout-advancetime`] && this.errRefs[`earlyinearlyout-advancetime`].showError(); - flag = false; - } - if(formParams.earlyinearlyoutsame === "0" && ((postponetime || '') == '')){ - this.errRefs[`earlyinearlyout-postponetime`] && this.errRefs[`earlyinearlyout-postponetime`].showError(); - flag = false - } - } - if (formParams.lateinlateout === "1") {//晚到晚走 - const {lateinlateout: {advancetime, postponetime}} = data.personalizedRuleDetails; - if((advancetime || '') == ''){ - this.errRefs[`lateinlateout-advancetime`] && this.errRefs[`lateinlateout-advancetime`].showError(); - flag = false; - } - if(formParams.lateinlateoutsame === "0" && ((postponetime || '') == '')){ - this.errRefs[`lateinlateout-postponetime`] && this.errRefs[`lateinlateout-postponetime`].showError(); - flag = false - } - } - if (formParams.lateoutlatein === "1") {//晚走晚到 - const {lateoutlatein} = data.personalizedRuleDetails; - lateoutlatein.map((d, i) => { - const {advancetime, postponetime} = d; - if((advancetime || '') == ''){ - this.errRefs[`lateoutlatein-${i}-advancetime`] && this.errRefs[`lateoutlatein-${i}-advancetime`].showError(); - flag = false; - } - if(formParams.lateinlateoutsame === "0" && ((postponetime || '') == '')){ - this.errRefs[`lateoutlatein-${i}-postponetime`] && this.errRefs[`lateoutlatein-${i}-postponetime`].showError(); - flag = false - } - }) - } - if(!flag){ - this.spinning = false; - return; - } - data.personalizedRuleDetails.lateoutlatein.map((record, index) => { - record.record = index; - }); - const { fieldMap } = this.formTarget.settingForm; - [...Object.keys(fieldMap)].map(key => { - if (fieldMap[key].checkbox) { - data[`${key}enable`] = - fieldMap[key].checkboxValue || false ? "1" : "0"; - } - }); - const params = { data: JSON.stringify(data) }; - api.saveShiftManagementPersonalizedForm(params).then( - data => { - if (data.status === "1") { - message.success(i18n.message.saveSuccess()); - console && console.debug(data); - this.dialogParams.onCancel(); - this.getTableData(this.toJS(this.searchParams)); - } else { - message.error(data.message); - } - this.spinning = false; - }, - error => (this.spinning = false) - ); - } else { - f.showErrors(); - const fields = this.formTarget.baseForm.fieldMap; - [...Object.keys(fields)].map(k => { - const e = this.formTarget.baseForm.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - } - }); - this.showError = new Date().getTime(); - this.spinning = false; - } - }); - }; - - @action - doDelete = params => { - let content; - if (params == null) { - params = { - ids: this.table.selectedRowKeys - }; - content = i18n.confirm.deleteSelected(); - } else { - content = i18n.confirm.delete(); - } - this.confirmInfo({ - content, - onOk: () => { - api.delShiftManagementForm(params).then(data => { - if (data.status === "1") { - message.success(i18n.message.deleteSuccess()); - this.table.getDatas(null, 1); - } - }); - } - }); - }; - - calculateTime = (time, range, plus = true) => { - let t = this.convertTimeToMoment(time); - t.add(Number(range) * (plus ? 1 : -1), "m"); - return t.format("HH:mm"); - }; - - @action getDetachOperatelevel = v => { - api.getDetachOperatelevel({subcompanyid: v.subcompanyid.value}).then(data => { - if(data.status == 1){ - this.canAdd = !(data.operatelevel < 1); - }else{ - message.error(data.message); - } - }) - } - /********************* action list *********************/ -@observable dialogStore1 = new DialogStore(this); - -msgDialogButtons = [,]; - -msgMoreBtn = {datas: []}; - -handleMsgLabelClick = (type) => { - const o = this.dialogStore1; - const c = { - title: (type == "earlyinearlyout") ? getLabel('521192','允许早到早走示例说明') : (type == "lateinlateout") ? getLabel('521193','允许晚到晚走示例说明') : getLabel('521194','允许晚走晚到示例说明') , - style: { - width: 900, - height: 650 - }, - dialogMark:"msg" - }; - - this.msgType = type; - - o.setDialogConfig(c) - o.openDialog(); -} - -@computed get title1(){ - return getLabel('521195','精确时间计算示例说明') -} ; - -@computed get title2(){ - return getLabel('521196','相对时间计算示例说明') -} - -@computed get msg1(){ - return getLabel('521197','1.固定班制设置1天1次打卡,上班标准时段设置为9:00-18:00;') -} - -@computed get msgDatas() { - return { - earlyinearlyout:[{ - title:this.title1, - msgs: [ - this.msg1, - getLabel('521198','2.设置早到早走规则:上班早到30分钟,下班可以早走30分钟;即08:30之前打上班卡,允许17:30下班不算早退。如下图所示:') , - `` - ] - },{ - title:this.title2, - msgs: [ - this.msg1, - getLabel('521199','2.早到早走规则-使用相对时间:在保证上班时长的前提下,早到可以早走,弹性限额30分钟;即每早到1分钟可早走1分钟,最多可早走30分钟。如下图所示:') , - `` - ] - }], - lateinlateout:[{ - title:this.title1, - msgs: [ - this.msg1, - getLabel('521200','2.晚到晚走规则:上班晚到30分钟及以内,下班需晚走30分钟以上;即在9:00-9:30之间打上班卡,需在18:30后下班才算正常出勤。如下图所示:'), - `` - ] - },{ - title:this.title2, - msgs: [ - this.msg1, - getLabel('521201','2.晚到晚走规则-使用相对时间:在保证上班时长的前提下,晚到可以晚走,弹性限额30分钟;即每晚到1分钟需晚走1分钟才不算迟到,弹性限额最多30分钟。如下图所示:'), - `` - ] - }], - lateoutlatein:[{ - title:this.title1, - msgs: [ - this.msg1, - getLabel('521202','2.晚走晚到规则:前一天下班晚走30分钟及以上,第二天上班可以晚到30分钟;即第一天在18:30以后下班,第二天允许9:30上班不算迟到。如下图所示:'), - `` - ] - },{ - title:this.title2, - msgs: [ - this.msg1, - getLabel('521203','2.晚走晚到规则-使用相对时间:在保证上班时长的前提下,第一天晚走,第二天可以晚到,弹性限额30分钟;即第二天的晚到时间等于第一天的晚走时间,算正常出勤。如下图所示:'), - `` - ] - }] - } -} -} - -export const hrmShiftManager = new HrmShiftManager(); diff --git a/pc4backstage/hrmAttendance/stores/test.js b/pc4backstage/hrmAttendance/stores/test.js deleted file mode 100644 index 657d5bc..0000000 --- a/pc4backstage/hrmAttendance/stores/test.js +++ /dev/null @@ -1,100 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaForm, -} from 'comsMobx'; -import * as api from '../apis/holidayRule'; - - -class HrmTest { - @observable f = { - form: new WeaForm(), - conditions: [] - } - - togetherKeys = { - typeId: ['ruleName', 'scopeType'] - } - - prefix = { - scopeValue: 分部前 - } - - suffix = { - scopeValue: 分部后, - distributionMode: ['', '1', '2', '3', '4', '5', '6'] - } - - linkage = { - scopeValue: { - activeKey: 'scopeType', - activeValue: '1', - } - } - - togetherElements = {}; - - @action getLeaveRulesForm = () => { - api.getLeaveRulesForm().then(datas => { - const { - condition, - } = datas; - - const items = this.collectTogetherElement(condition, this.togetherKeys); - Object.assign(this.togetherElements, items); - - this.blackList = this.computeBlackList(this.togetherKeys); - - this.f.form = new WeaForm(); - this.f.conditions = condition; - this.f.form.initFormFields(condition); - }, error => {}) - } - - collectTogetherElement = (conditions, togetherKeys) => { - const values = Object.values(togetherKeys); //[['ruleName', 'scopeType']] - const keys = Object.keys(togetherKeys); //['typeId'] - - const items = {}; - - conditions.map(c => { - c.items.map(item => { - const { - domkey - } = item; - - const key = domkey[0]; - - values.map((value, index) => { - if (value.includes(key)) { //['ruleName', 'scopeType'] - const firstKey = keys[index]; //typeId - if (!items[firstKey]) { - items[firstKey] = []; - } - items[firstKey].push(item); - } - }); - - }); - }) - - return items; - } - - computeBlackList = (togetherKeys) => { - const blackList = []; - - Object.values(togetherKeys).forEach(value => { - value.forEach(key => { - blackList.push(key); - }); - }); - - return blackList; - } -} - -export const hrmTest = new HrmTest(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/travelRule.js b/pc4backstage/hrmAttendance/stores/travelRule.js deleted file mode 100644 index ad89c66..0000000 --- a/pc4backstage/hrmAttendance/stores/travelRule.js +++ /dev/null @@ -1,339 +0,0 @@ -import { - observable, - action, - computed -} from 'mobx'; -import { - WeaHelpfulTip, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaForm -} from 'comsMobx'; -import { - message, - Button -} from 'antd'; -import { - fetch, -} from '../util/save-time-util.js'; -import { - commonStore -} from './commonStore'; -import * as asyncFetch from '../apis/travelRule'; -import * as timeSelectionApi from '../apis/timeSelection.js'; -const getLabel = WeaLocaleProvider.getLabel; - -class HrmTravelRule { - //页面配置项 - pageConfig = { - asyncFetch: asyncFetch, - hasOrgTree: false, - hasAdvancedSearch: false, - hasTable: false, - permissAsyncName: 'getHasRight', - menusAsyncName: 'getMenus', - formAsyncName: 'getTravelRulesForm', - }; - - hourToDayRuleTip = (tip) => ( - - {`${getLabel('391', "小时")}=1${getLabel('505553', "天")}`} - - - ) - - //表单配置项 - formConfig = { - classNames: { - hoursToDay: 'hrm-travel-rule-form-input', - exit_hoursToDay: 'hrm-travel-rule-form-input', - proportion: 'hrm-travel-rule-form-input', - exit_proportion: 'hrm-travel-rule-form-input', - travel_timeselection: 'hrm-travel-timeselection', - exit_timeselection: 'hrm-exit-timeselection', - }, - dynamicFields: [{ - passiveKey: 'hoursToDay', - activeKey: 'minimumUnit', - showValue: '1,2,3,4' - }, { - passiveKey: 'hoursToDay', - activeKey: 'computingMode', - showValue: '2', - }, { - passiveKey: 'exit_hoursToDay', - activeKey: 'exit_minimumUnit', - showValue: '1,2,3,4' - }, { - passiveKey: 'exit_hoursToDay', - activeKey: 'exit_computingMode', - showValue: '2', - }, - {//时间选择方式 - passiveKey: 'travel_timeselection', //时间选择方式 - activeKey: 'minimumUnit', - showValue: '2', - }, - {//时间选择方式 - passiveKey: 'exit_timeselection', //时间选择方式 - activeKey: 'exit_minimumUnit', - showValue: '2', - }] - } - - //*************头部************** - - get topTitle () { return { title: getLabel('505626', "出差公出规则") }; } - - //获取交互元素(按钮元素和下拉菜单元素)的状态 - getMenusState = () => { - const { - loading - } = commonStore.formElements; - - //决定按钮是否可点击 - return [loading]; - } - - log = () => { - window.setLogViewProps({ - logSmallType: '3062', - }); - } - - save = () => { - const { - formElements, - } = commonStore, { - form - } = formElements; - - this.neglectHiddenField(); - - form.validateForm().then(f => { - if (f.isValid) { - fetch({ - asyncFetch, - name: 'saveTravelRules', - fetchParams: { - ...form.getFormParams() - }, - logic: (cb) => { - const { - sign - } = cb - - message[sign === '1' ? 'success' : 'warning'](cb.message); - } - }); - } else { - f.showErrors(); - commonStore.forceUpdateForm(); - } - }) - - } - - //**************表单*************** - @observable minimumUnit = []; - @observable exit_minimumUnit = []; - @observable hoursToDay_Tips = ''; - @observable exit_hoursToDay_Tips = ''; - @observable proportion_Tips = ''; - @observable exit_proportion_Tips = ''; - - @observable renderBlacklist = ['proportion', 'exit_proportion']; - - //获取表单元素提示信息 - @computed get dynamicTips () { - return { - minimumUnit: this.minimumUnit, - exit_minimumUnit: this.exit_minimumUnit, - }; - } - - @computed get travelTimeSelectionTip () { - const { - form - } = commonStore.formElements, { - travel_timeselection - } = form.getFormParams(); - if (travel_timeselection == 1) - return this.getDefForm(1)}>{getLabel('513303', '选项名称定义')}; - else - return ; - } - - @computed get exitTimeSelectionTip () { - const { - form - } = commonStore.formElements, { - exit_timeselection - } = form.getFormParams(); - if (exit_timeselection == 1) - return this.getDefForm(2)}>{getLabel('513303', '选项名称定义')}; - else - return ; - } - - @computed get staticTips () { - return { - hoursToDay: this.hourToDayRuleTip(this.hoursToDay_Tips), - exit_hoursToDay: this.hourToDayRuleTip(this.exit_hoursToDay_Tips), - proportion: this.hourToDayRuleTip(this.proportion_Tips), - exit_proportion: this.hourToDayRuleTip(this.exit_proportion_Tips), - travel_timeselection: this.travelTimeSelectionTip, - exit_timeselection: this.exitTimeSelectionTip - } - } - - @action setAdditionalFormDatas = (datas) => { - const { - form - } = commonStore.formElements, { - minimumUnit, - exit_minimumUnit - } = form.getFormParams(); - - ['minimumUnit', 'exit_minimumUnit', 'hoursToDay_Tips', 'exit_hoursToDay_Tips', 'proportion_Tips', 'exit_proportion_Tips'].map(v => { - if (datas[v]) this[v] = datas[v]; - }); - - this.minimumUnitTemp = minimumUnit; - this.exit_minimumUnitTemp = exit_minimumUnit; - } - - handleMinimumUnithange = (key, value) => { - this.showOff(key, value); - } - - showOff = (_key, value) => { - const tempValue = (_key === 'minimumUnit') ? this.minimumUnitTemp : this.exit_minimumUnitTemp; - - const linkedKey = (_key === 'minimumUnit') ? 'proportion' : 'exit_proportion'; - - const index = this.renderBlacklist.findIndex(key => key === linkedKey); - - if (value === '3' || (['1', '2', '4'].includes(value) && tempValue === '3')) { - if (index > -1) this.renderBlacklist.splice(index, 1); - } else { - if (index === -1) this.renderBlacklist.push(linkedKey); - } - - this[(_key === 'minimumUnit') ? 'minimumUnitTemp' : 'exit_minimumUnitTemp'] = value; - - } - - neglectHiddenField = () => { - window.e9HideFormFieldKeys = []; - - this.renderBlacklist.map(key => { - window.e9HideFormFieldKeys.push(key); - }) - } - - isMainForm = () => { - return true - } - - refreshPage = () => { - const { - formElements, - } = commonStore, { - form - } = formElements; - - this.renderBlacklist = ['proportion', 'exit_proportion']; - - window.e9ChangedFormFieldKey = 'resetFormNoNeedWarning'; - - commonStore.getFormMaterial(); - - } - - /** 选项名称定义 */ - @observable timeSelectionDialogVisible = false; - @computed get timeSelectionDialog () { - return { - key: new Date().getTime(), - ...ecCom.WeaTools.getIconBGC('hrm'), - style: { - height: 200 - }, - title: getLabel('513303', '选项名称定义'), - hasScroll: true, - visible: this.timeSelectionDialogVisible, - buttons: [ - , - ], - moreBtn: { - datas: [ - { - key: "1", - icon: , - content: getLabel(30986, '保存'), - onClick: () => this.saveDefForm() - }, - ] - }, - onCancel: () => { - this.timeSelectionDialogVisible = false; - } - } - } - - @action getDefForm = (selectiontype) => { - this.selectiontype = selectiontype; - const { - formElements, - } = commonStore, { - form - } = formElements; - const { minimumUnit, exit_minimumUnit } = form.getFormParams(); - const params = { selectiontype, minimumUnit: (selectiontype == 1 ? minimumUnit : exit_minimumUnit) }; - timeSelectionApi.getTimeSelectionForm(params).then(data => { - if (data.status == '1') { - const { condition: fields } = data; - this.formTarget = { - fields, - form: new WeaForm() - }; - this.formTarget.form.initFormFields(fields); - this.timeSelectionDialogVisible = true; - } else { - message.error(data.message); - } - }) - } - - @action saveDefForm = () => { - const { - formElements, - } = commonStore, { - form - } = formElements; - const { minimumUnit, exit_minimumUnit } = form.getFormParams(); - const params = { selectiontype: this.selectiontype, minimumUnit: (this.selectiontype == 1 ? minimumUnit : exit_minimumUnit) }; - - const formData = this.formTarget.form.getFormParams(); - Object.assign(params, { ...formData }); - - timeSelectionApi.saveTimeSelectionForm(params).then(data => { - if (data.status == '1') { - this.timeSelectionDialogVisible = false; - } else { - message.error(data.message); - } - }) - } -} - -const hrmTravelRule = new HrmTravelRule(); - -export { - hrmTravelRule -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/upgrade.js b/pc4backstage/hrmAttendance/stores/upgrade.js deleted file mode 100644 index 113a3bf..0000000 --- a/pc4backstage/hrmAttendance/stores/upgrade.js +++ /dev/null @@ -1,252 +0,0 @@ -import { observable, action, computed } from "mobx"; -import {WeaLocaleProvider, WeaError} from "ecCom"; -import { WeaSwitch } from "comsMobx"; -import HrmBaseStore from "../../hrmComsPublic/stores/baseStore"; -import { message } from "antd"; -import * as api from "../apis/upgrade"; -import { i18n } from "../public/i18n"; -import has from 'lodash/has'; -const getLabel = WeaLocaleProvider.getLabel; - - -export class HrmUpgrade extends HrmBaseStore { - /********************* unobservable list *********************/ - tabConfig = { - tabs: [ - { - color: "#000000", - groupId: "g1", - title: () => getLabel('505755','考勤升级设置'), - viewCondition: "1" - } - ], - keyParam: "viewCondition", - activeTabKey: "1" - }; - - errRefs = {} - - timer; - - itemRender = { - startdate: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - return ( -
-
- this.errRefs['startdate'] = d} - error={`"${fieldMap["startdate"].label}" ${i18n.message.dataEmpty()}`}> - - -
-
- this.errRefs['enddate'] = d} - error={`"${fieldMap["enddate"].label}" ${i18n.message.dataEmpty()}`}> - - -
-
- ); - }, - enddate: (field, textAreaProps, form, formParams) =>null - } - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable spinning = false; - @observable timeline = []; - @observable selectedNode = {}; - @observable upgradeInfo = {}; - @observable upgradeResult = {}; - @observable viewType = 1; - @observable refreshTime = new Date().getTime(); - @observable progress = 0; - /********************* observable list *********************/ - - /********************* computed list *********************/ - /********************* computed list *********************/ - - /********************* action list *********************/ - @action clear = () => { - this.viewType = 1; - this.upgradeResult = {}; - this.spinning = false; - } - - @action init = () => { - this.containerInitFinished.init = true; - this.clear(); - api.init().then( - rs => { - rs.map((data, index) => { - if (data.status === "1") { - switch (index) { - case 0: - this.timeline = data.tabs; - this.selectedNode = data.tabs[0]; - break; - case 1: - this.upgradeInfo = data; - this.initForm(data); - break; - } - } - }); - } - ).catch(error => {}); - } - - @action itemClick = node => { - if(this.spinning) - return; - this.selectedNode = node; - this.goBack(); - api.getUpgradeInfo({type: node.key}).then(data => { - if(data.status == '1') - this.upgradeInfo = data; - this.initForm(data); - }, error => {}); - } - - @action initForm = data => { - if(has(data, 'itemList')){ - let conditions = [{ - items: data.itemList - }] - this.setFormData("form", conditions); - }else{ - this.formTarget = {}; - } - this.refreshTime = new Date().getTime(); - } - - @action checkUpgrade = () => { - if(this.spinning) - return; - this.spinning = true; - // this.viewType = 2; - - const {form} = this.formTarget; - if(form != null){ - form.validateForm().then(f => { - if (f.isValid) { - let formParams = form.getFormParams(); - let params = { ...formParams, type: this.selectedNode.key}; - this.doUpgrade(params); - } else { - f.showErrors(); - const fields = form.fieldMap; - [...Object.keys(fields)].map(k => { - const e = form.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - this.errRefs[k] && this.errRefs[k].showError(); - } - }); - this.showError = new Date().getTime(); - this.spinning = false; - } - }); - }else{ - this.doUpgrade({type: this.selectedNode.key}); - } - } - - @action doUpgrade = async params => { - this.spinning = false; - this.showWeaLoadingGlobal(getLabel('505758','正在升级,请稍后...')); - const data = await api.doUpgrade(params); - if(data.status == '1'){ - this.viewType = 2; - }else{ - message.error(data.message); - } - this.hideWeaLoadingGlobal(); - } - - // @action doUpgrade = params => { - // if(this.timer != null){ - // clearInterval(this.timer); - // this.timer = null; - // } - // this.spinning = true; - // this.upgradeResult = {}; - // this.progress = 0; - // api.doUpgrade(params).then(data => { - // if(data.status == '1'){ - // this.upgradeResult = data; - // if(this.selectedNode.key == 'Upgrade12'){ - // if(data.data > 0){ - // this.timer = setInterval(() => { - // this.getUpgrade12Data(); - // }, 10000); - // }else{ - // this.spinning = false; - // } - // }else{ - // this.spinning = false; - // } - // // this.upgradeResult.items = [{ - // // label: '生成班次', - // // status: '1', - // // results: [ - // // '班次09:00~18:00', - // // '班次09:00~18:00', - // // '班次09:00~18:00' - // // ] - // // },{ - // // label: '生成考勤组', - // // status: '1', - // // results: [ - // // '考勤组1:每周一、二、三、四、五 班次: 09:00-18:00', - // // '考勤组2:每周一、二、三、四、五 班次: 09:00-18:00', - // // '考勤组3:每周一、二、三、四、五 班次: 09:00-18:00' - // // ] - // // }] - // }else{ - // message.error(data.message); - // this.spinning = false; - // } - // }, error => {this.spinning = false}); - // } - - @action getUpgrade12Data = () => { - const {form} = this.formTarget; - let formParams = form.getFormParams(); - api.getUpgrade12Data(formParams).then(data => { - if(data.status == '1'){ - if(data.data == 0){ - if(this.timer != null){ - clearInterval(this.timer); - this.timer = null; - } - this.progress = 100; - this.spinning = false; - }else{ - this.progress = Math.round((this.upgradeResult.data - data.data) / this.upgradeResult.data * 100); - } - } - }, error => this.spinning = false) - } - - @action goBack = () => { - this.viewType = 1; - } - /********************* action list *********************/ -} - -export const hrmUpgrade = new HrmUpgrade(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/vacationBalance.js b/pc4backstage/hrmAttendance/stores/vacationBalance.js deleted file mode 100644 index 3353fc5..0000000 --- a/pc4backstage/hrmAttendance/stores/vacationBalance.js +++ /dev/null @@ -1,639 +0,0 @@ -import { - observable, - action, - computed, - reaction, - toJS, -} from 'mobx'; -import { - WeaTableNew, -} from 'comsMobx'; -import { - WeaBrowser, - WeaLocaleProvider, -} from 'ecCom'; -import { - message, -} from 'antd'; -import { - fetch, - array, - callback, - getTopButtons, - getDropMenuDatas, - getMenusCreationConfig, - componentReset, - confirmation, -} from '../util/save-time-util.js'; -import { - hrmImportCommon -} from './importCommon'; -import * as asyncFetch from '../apis/vacationBalance'; -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; - -class HrmVacationBalanceCopy { - //************权限************* - @observable pageAccessPermission = { - hasRight: false, - loading: true, - } - - @action getPermissionInfo = () => { - fetch({ - asyncFetch, - name: 'getHasRight', - logic: (cb) => { - const { - hasRight - } = cb; - - if (hasRight) { - this.pageAccessPermission.hasRight = true; - } - this.pageAccessPermission.loading = false; - } - }); - } - - permissionDisposer = reaction(() => this.pageAccessPermission.hasRight, hasRight => { - if (hasRight) { - this.getTabs(); - this.refreshPage(); - } - }); - - //*************头部************** - topComponentStaticProps = { - icon: , - iconBgcolor: '#217346', - showDropIcon: true, - title: getLabel('505619', "假期余额设置"), - }; - - @observable top = { - btnMenu: [], - } - - batchEditing = () => { - confirmation.showSaveConfirm({ - content: getLabel(505620, '批处理将会初始化假期余额信息,确定批处理?'), - logic: () => this._batchEditing() - }); - } - - _batchEditing = () => { - if (!this.isEmptyYear) { - message.warning(getLabel('505621', "请指定年份!")); - return - } - - fetch({ - asyncFetch, - name: 'batchProcessing', - fetchParams: this.tableAsyncFetchParams, - logic: (cb) => { - const { - sign - } = cb; - - if (sign === '1') { - message.success(cb.message); - this.resetTableEditableDatas(); - this.getSearchList(); - } else { - message.warning(cb.message); - } - } - }); - } - - importExcel = () => { - if (!this.isEmptyYear) { - message.warning(getLabel('505621', "请指定年份!")); - return - } - - const templetName = getLabel('129833', '导入模板'), - dialogTitle = getLabel('505622', "员工假期余额导入"), - importType = 'balanceOfLeave', - asyncFetchParams = this.tableAsyncFetchParams, - visible = true; - - const paramsArray = [templetName, dialogTitle, importType, asyncFetchParams, visible, ]; - - const funcs = ['setTempletName', 'setImportDialogTitle', 'setImportType', 'setFormAsyncParams', 'setImportDialogVisible'] - - funcs.map((f, i) => { - hrmImportCommon[f](paramsArray[i]); - }); - } - - exportExcel = () => { - if (!this.isEmptyYear) { - message.warning(getLabel('505621', "请指定年份!")); - return - } - - const { - tableStore - } = this.table; - - if (tableStore.datas.length === 0) { - message.warning(getLabel('505623', "暂无数据可导出!")); - return - } - - tableStore.exportAll(); - } - - custom = () => { - const { - tableStore - } = this.table; - - ['setColSetVisible', 'tableColSet'].map(f => { - tableStore[f](true); - }); - } - - save = () => { - if (!this.isEmptyYear) { - message.warning(getLabel('505621', "请指定年份!")); - return - } - - const { - tableStore - } = this.table; - - const datas = tableStore.datas; - - for (let index = 0; index < datas.length; index++) { - const data = datas[index]; - - const { - baseAmountspan, - baseAmount2span, - usedAmountspan, - usedAmount2span, - extraAmountspan, - extraAmount2span, - } = data; - - const isMix = Object.keys(data).includes('usedAmount2span'); - - if (!this.verifyTableField(['baseAmountspan', 'usedAmountspan', 'extraAmountspan'], data, index)) { - return; - } - - if (isMix && !this.verifyTableField(['baseAmount2span', 'usedAmount2span', 'extraAmount2span'], data, index, isMix)) { - return; - } - } - - fetch({ - asyncFetch, - name: 'saveBalanceOfLeave', - fetchParams: this.getSaveParams(), - logic: (cb) => { - const { - sign - } = cb; - - message[sign === '1' ? 'success' : 'warning'](cb.message); - this.resetTableEditableDatas(); - this.getSearchList(); - } - }); - } - - verifyTableField = (fields, data, dataIndex, isMix) => { - const { - tableStore - } = this.table; - - const { - lastname - } = data; - - const columns = tableStore.columns; - - const titles = {}; - //收集列表域对应的TITLE,用于必填校验提示语。 - ['baseAmount', 'usedAmount', 'extraAmount', 'canUseAmount', 'baseAmount2', 'usedAmount2', 'extraAmount2', 'canUseAmount2'].map(v => { - const target = columns.find(c => c.dataIndex === v); - if (!target) return; - Object.assign(titles, { - [`${v}span`]: target.title - }); - }); - //找到列表域为空时对应的DATAINDEX - const field = fields.find(field => data[field] === ''); - - if (field) { - message.warning(`${getLabel('505567',"第")} ${dataIndex + 1} ${getLabel('27592',"行")},${lastname} ${titles[field]} ${getLabel('505571',"未填写")} `); - return false; - } - - let flag = true; - - const estimateUsedAmount = (used, base, extra, backup) => { - //读取已修假期、基础假期、额外假期和本年假期的数据 - const usedAmount = parseFloat(data[used]), - baseAmount = parseFloat(data[base]), - extraAmount = parseFloat(data[extra]), - canUseAmount = data[backup] ? parseFloat(data[backup]) : data[backup]; - - //本年假期不存在时,使用基础假期(一次性发放)。 - const choice = canUseAmount !== undefined ? canUseAmount : baseAmount; - - //当已修假期大于基础假期(或本年假期)和额外假期之和时,给出超额提示。 - if (usedAmount > (choice + extraAmount)) { - message.warning(`${getLabel('505567',"第")} ${dataIndex + 1} ${getLabel('27592',"行")},${lastname} ${titles[used]} ${getLabel('505624',"不能大于")} ${titles[backup] ? titles[backup] : titles[base]} + ${titles[extra]} `); - flag = false; - } - } - - estimateUsedAmount('usedAmountspan', 'baseAmountspan', 'extraAmountspan', 'canUseAmountspan'); - - isMix && estimateUsedAmount('usedAmount2span', 'baseAmount2span', 'extraAmount2span', 'canUseAmount2span'); - - return flag; - } - - getSaveParams = () => { - const params = { - ...this.tabCallbackParamsCollector, - ...this.rgCallbackParamsCollector, - hrmResourceIds: this.table.ids.toString(), - }; - - ['baseAmountValues', 'usedAmountValues', 'extraAmountValues', 'baseAmount2Values', 'usedAmount2Values', 'extraAmount2Values'].map(v => { - Object.assign(params, { - [v]: this.table[v].toString() - }); - }); - - return params; - } - - @computed get menusAsyncFetch() { - const params = { - ...this.treeCallbackParamsCollector, - ...this.tabCallbackParamsCollector, - }; - - return params; - } - - @action getMenus = () => { - fetch({ - asyncFetch, - name: 'getMenus', - fetchParams: this.menusAsyncFetch, - logic: (cb) => { - const { - btnMenu, - } = cb; - - const result = btnMenu.find(item => item.menuFun === 'batchEditing'); - if (result) result.title = getLabel('505625', "根据假期规则初始化假期基数"); - this.top.btnMenu = btnMenu; - } - }); - } - - @computed get menusCreationConfig() { - const { - btnMenu - } = this.top; - - return getMenusCreationConfig(btnMenu); - } - - get topButtons() { - const { - topMenu - } = this.menusCreationConfig; - - return getTopButtons.call(this, { - datas: topMenu, - disabled: this.getMenusState(), - }) - } - - get dropMenuDatas() { - const { - rightMenu - } = this.menusCreationConfig; - - return getDropMenuDatas.call(this, { - datas: rightMenu, - disabled: this.getMenusState(), - }); - - } - - getMenusState = () => { - const { - tableStore - } = this.table, { - loading, - } = tableStore; - - return [loading, loading, loading, loading]; - } - - - //**************组织树****************** - orgTreeStaticProps = { - title: getLabel('25332', "组织结构"), - rightStr: 'KQLeaveRulesEdit:Edit', - isLoadSubDepartment: true, - } - - @observable orgTree = { - triggerRefresh: false, - organizationId: '', - organizationType: '0', - } - - @action handleOrgTreeNodeClick = (params) => { - const { - id, - type, - } = params; - - this.orgTree.organizationType = type; - this.orgTree.organizationId = id; - } - - @action triggerRefresh = () => { - this.orgTree.triggerRefresh = !this.orgTree.triggerRefresh; - } - - @computed get treeCallbackParamsCollector() { - const callback = {}; - - ['organizationType', 'organizationId'].map(v => { - Object.assign(callback, { - [v]: this.orgTree[v] - }); - }); - - return callback; - } - - treeDisposer = reaction(() => this.treeCallbackParamsCollector, treeCallbackParamsCollector => { - // this.setTabActiveKey('0'); - this.getTabs(); - }); - - //***************页签***************** - @observable tab = { - activeKey: '0', - datas: [], - ids: [], - } - - @action setTabActiveKey = (key) => { - this.tab.activeKey = key; - } - - @action getTabs = () => { - fetch({ - asyncFetch, - name: 'getTabs', - fetchParams: this.treeCallbackParamsCollector, - logic: (cb) => { - this.tab.datas = callback.getArrayDatas(cb); - this.tab.ids = callback.getTabId(cb); - } - }); - } - - @computed get tabCallbackParamsCollector() { - const { - activeKey, - ids - } = this.tab; - - const callback = {}; - - if (ids.length > 0) { - Object.assign(callback, { - ruleId: ids[parseInt(activeKey)] - }); - } - - return callback; - } - - @computed get hasContent() { - const { - datas - } = this.tab; - - if (datas.length === 0) { - return false; - } - return true; - } - - tabDisposer = reaction(() => this.tabCallbackParamsCollector, tabCallbackParamsCollector => { - this.getMenus(); - if (this.browser) { - componentReset.resetBrowser(this.browser); - this.radioGroup.hrmResourceId = ''; - } - this.getRadioGroupConfig(); - }) - - //***************单选组合(RadioGroup)***************** - @observable radioGroup = { - config: [], - activeParams: { - searchYearSelect: '', - searchYear: '', - }, - hrmResourceId: '' - } - - @action getRadioGroupConfig = () => { - fetch({ - asyncFetch, - name: 'getSearchCondition', - logic: (cb) => { - const { - conditions - } = cb; - - this.processCondition(conditions); - - this.radioGroup.config = conditions[0].items; - } - }); - } - - @action handleBrowserChange = (ids) => { - this.radioGroup.hrmResourceId = ids; - } - - processCondition = (conditions) => { - const browser = conditions[0].items[1]; - - conditions[0].items[1] = { - label: getLabel('25034', "姓名"), - com: (
- this.setRef(ref,'browser')} onChange ={ids => this.handleBrowserChange(ids)}/> -
), - labelcol: 5, - fieldcol: 19, - } - } - - setRef = (ref, type) => { - this[type] = ref; - } - - @action exportActiveParams = (params) => { - Object.assign(this.radioGroup.activeParams, params); - } - - @computed get isEmptyYear() { - const { - activeParams - } = this.radioGroup, { - searchYearSelect, - searchYear - } = activeParams; - - if (searchYearSelect === '6' && !searchYear) { - return false; - } - return true; - } - - @computed get rgCallbackParamsCollector() { - const { - activeParams, - hrmResourceId - } = this.radioGroup; - - const callback = { - hrmResourceId, - ...activeParams, - }; - - return callback; - } - - //**************列表****************** - @observable table = { - ids: [], - baseAmountValues: [], - usedAmountValues: [], - extraAmountValues: [], - baseAmount2Values: [], - usedAmount2Values: [], - extraAmount2Values: [], - tableStore: new TableStore(), - } - - //收集列表中修改过的值 - @action sortChangedTableDatasOut = (values, rowId) => { - const { - ids - } = this.table; - - let currentRowIndex = ids.length; - - //判断修改的列表域对应的行是否为新的一行 - if (array.isUnique(rowId, ids)) { - this.table.ids.push(rowId); - } else { - currentRowIndex = ids.findIndex(id => id === rowId); - } - - ['baseAmountValues', 'baseAmount2Values', 'usedAmountValues', 'usedAmount2Values', 'extraAmountValues', 'extraAmount2Values'].map((name, index) => { - this.table[name][currentRowIndex] = values[index]; - }); - } - - @computed get tableAsyncFetchParams() { - const params = { - ...this.treeCallbackParamsCollector, - ...this.tabCallbackParamsCollector, - ...this.rgCallbackParamsCollector, - } - - return params; - } - - @action getSearchList = () => { - if (!this.isEmptyYear) { - message.warning(getLabel('505621', "请指定年份!")); - return - } - - this.table.tableStore = new TableStore(); - - fetch({ - asyncFetch, - name: 'getSearchList', - fetchParams: this.tableAsyncFetchParams, - logic: (cb) => { - const { - sessionkey, - } = cb; - - this.table.tableStore.getDatas(sessionkey, 1); - } - }); - } - - @action resetTableEditableDatas = () => { - ['ids', 'usedAmountValues', 'extraAmountValues', 'usedAmount2Values', 'extraAmount2Values'].map(v => { - this.table[v] = []; - }); - } - - tableDisposer = reaction(() => this.tableAsyncFetchParams, tableAsyncFetchParams => { - const { - ruleId, - searchYearSelect, - searchYear, - } = tableAsyncFetchParams; - - if (!ruleId || (!searchYearSelect || (searchYearSelect === '6' && !searchYear))) return - - this.resetTableEditableDatas(); - this.getSearchList(); - }); - - componentWillUnmount = () => { - this.pageAccessPermission.hasRight = false; - } - - refreshPage = () => { - this.triggerRefresh(); - this.setTabActiveKey('0'); - this.handleOrgTreeNodeClick({ - id: '', - type: '0' - }); - this.rg && componentReset.resetRadioGroup(this.rg); - this.browser && componentReset.resetBrowser(this.browser); - this.radioGroup.hrmResourceId = ''; - } - - -} - -const hrmVacationBalance = new HrmVacationBalanceCopy; -export { - hrmVacationBalance -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/vacationRemain.js b/pc4backstage/hrmAttendance/stores/vacationRemain.js deleted file mode 100644 index 23587ed..0000000 --- a/pc4backstage/hrmAttendance/stores/vacationRemain.js +++ /dev/null @@ -1,743 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaBrowser, - WeaButtonIcon, - WeaInputNumber, - WeaLocaleProvider, -} from 'ecCom'; -import { - message, - Button -} from 'antd'; -import { - AuthorityStore, - TopStore, - SearchStore, - TableListStore, - OrgTreeStore, - RadioGroupStore, - DialogStore, - FormStore, - ImportCommon, -} from '../public/valhalla/stores/index.js'; -import { isEmpty } from "lodash"; -import * as api from '../apis/vacationRemain.js'; -const getLabel = WeaLocaleProvider.getLabel; - -class VacationRemainStore { - @observable authorityStore = new AuthorityStore(api.getHasRight); - @observable topStore = new TopStore(api.getRightMenu, this); - @observable searchStore = new SearchStore('', this); - @observable tableListStore = new TableListStore(api.getSearchList, this); - @observable orgTreeStore = new OrgTreeStore(this); - @observable radioGroupStore = new RadioGroupStore(api.getSearchCondition, this); - - @observable detailDialogStore = new DialogStore(this); - @observable detailDialogSearchStore = new SearchStore('', this); - @observable detailDialogTableStore = new TableListStore(api.getDetailSearchList, this); - - @observable editDialogStore = new DialogStore(this); - @observable formStore = new FormStore(api.getDetailBalanceForm, this); - - @observable importExcelStore = new ImportCommon(); - - @observable pageLoading = false; - - //页面加载状态 - get topLoading () { - const { - loading - } = this.tableListStore.tableStore; - - return loading; - } - - //菜单、按钮是否禁用 - get rightMenuStates () { - const { - loading, - } = this.tableListStore.tableStore; - - return [loading, loading, loading, loading]; - } - - //组织树可以展开到部门节点 - get orgTreeConfig () { - return { - orgTreeMoreProps: { - isLoadSubDepartment: true, - isLoadAllSub : false, - params:{ - rightStr: 'KQLeaveRulesEdit:Edit', - } - } - } - } - - //设置页面标题 - get topConfig () { - return { - title: getLabel('505619', "假期余额设置") - } - } - - //不显示高级搜索 - get pageSearchConfig () { - return { - searchMoreProps: { - searchType: [] - } - } - } - - //明细弹框内,不显示高级搜索,同时标识search组件 - get detailDialogSearchConfig () { - return { - searchMark: 'detail', - searchMoreProps: { - searchType: [] - } - } - } - - //明细弹框的配置 - get detailDialogConfig () { - return { - title: getLabel(17463, '明细'), - dialogMark: 'detail', - style: { - width: 800, - height: 600 - }, - } - } - - //编辑弹框的配置 - get editDialogConfig () { - return { - title: getLabel(93, '编辑'), - dialogMark: 'edit', - style: { - height: 430 - } - } - } - - //自定义渲染表单 - get editDialogFormConfig () { - return { - isCustomRender: true - } - } - - //获取页签的id - @computed get ruleId () { - const { - datas, - selectedKey - } = this.searchStore; - - return datas[parseInt(selectedKey)].id; - } - - //明细弹框内的图标按钮 - @computed get detailSearchButtons () { - const { - selectedRowKeys - } = this.detailDialogTableStore.tableStore; - - const disabled = (selectedRowKeys.length === 0); - - return ( - [] - ) - } - //编辑弹框的底部按钮 - @computed get editDialogButtons () { - const { - loading - } = this.formStore; - - return [ - - ] - } - - //VacationRemain组件Mount前执行的操作 - preMount = () => { - this.topStore.setTopConfig(this.topConfig); - this.searchStore.setSearchConfig(this.pageSearchConfig); - this.orgTreeStore.setOrgTreeConfig(this.orgTreeConfig); - } - - //初始化页面 - init = () => { - this.authorityStore.fetchAuthority().then(() => { - this.resetStoreDatas(); - - this.fetchPageRightInfo(); - }) - } - - //重置store中的数据 - resetStoreDatas = () => { - ['id', 'type'].forEach(val => { - this.orgTreeStore[val] = '' - }); - this.resetBrowser(); - } - - //保存假期余额设置 - save = () => { - if (!this.canFetchTableList()) { - message.warning(getLabel('505621', "请指定年份!")); - return; - } - - if (!this.isComplte()) { - message.warning(getLabel(30702, '必填信息不完整')); - return; - } - - if (!this.isDatasNormal()) { - return; - } - - const params = { - datas: JSON.stringify(this.tableListStore.tableStore.datas), - ...this.getTableListParams() - }; - - api.saveBalanceOfLeave(params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.fetchTableList() - } else { - message.warning(datas.message); - } - }); - - } - - //假期余额信息是否完整 - isComplte = () => { - const { - datas - } = this.tableListStore.tableStore; - - return datas.every(data => { - return Object.values(data).every(val => val !== undefined) - }) - } - - //假期余额信息是否正常 - isDatasNormal = () => { - const { - datas - } = this.tableListStore.tableStore; - return datas.every((data, index) => { - const { - baseAmountspan, - extraAmountspan, - usedAmountspan, - baseAmount2span, - extraAmount2span, - usedAmount2span, - lastname, - } = data; - - //const result1 = parseFloat(baseAmountspan) + parseFloat(extraAmountspan) >= parseFloat(usedAmountspan); - - // let result2 = true; - - // if (baseAmount2span !== undefined) { - // result2 = parseFloat(baseAmount2span) + parseFloat(extraAmount2span) >= parseFloat(usedAmount2span); - // } - - // if (!(result1 && result2)) { - // message.warning(`${getLabel(15323, '第')}${index + 1}${getLabel(27592, '行')},${lastname}${getLabel(529327, '已休年假-初始化(天)不能大于本年年假-初始化(天)+额外年假-初始化(天)')}`); - // } - return true; - - }) - } - - //导入excel - importExcel = () => { - if (!this.canFetchTableList()) { - message.warning(getLabel('505621', "请指定年份!")); - return; - } - - const { - setTempletName, - setImportDialogTitle, - setImportType, - setImportDialogVisible, - setSourceStore, - setFormAsyncParams, - } = this.importExcelStore; - - setTempletName(getLabel('129833', '导入模板')); - setImportDialogTitle(getLabel('505622', "员工假期余额导入")); - setImportType('balanceOfLeave'); - setFormAsyncParams(this.getTableListParams()); - setImportDialogVisible(true); - setSourceStore(this); - } - - //导入excel完成后调用 - getSearchList = () => { - this.fetchTableList(); - } - - //批处理 - batchEditing = () => { - const msg = getLabel(505620, '批处理将会初始化假期余额信息,确定批处理?'); - - if (!this.canFetchTableList()) { - message.warning(getLabel('505621', "请指定年份!")); - return; - } - - this.tableListStore.showConfirm(msg).then(() => { - const params = this.getTableListParams(); - - this.pageLoading = true; - - api.batchProcessing(params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.fetchTableList(); - } else { - message.warning(datas.message); - } - - this.pageLoading = false; - }) - }) - } - - //导出excel - exportExcel = () => { - this.tableListStore.exportExcel(); - } - - //处理接口返回的数据 - processRadioGroupConfig = (items) => { - const browserConfig = items[1]; - - return [items[0], { - label: getLabel('25034', "姓名"), - com: (
- -
), - labelcol: 5, - fieldcol: 19, - }] - - } - - //姓名浏览按钮事件回调 - handleBrowserChange = (ids) => { - const moreParams = { - hrmResourceId: ids - }; - - this.radioGroupStore.setRadioGroupMoreParams(moreParams); - - this.canFetchTableList() && this.fetchTableList(); - - } - - //切换年份触发的事件回调 - handleRadioGroupChange = () => { - this.canFetchTableList() && this.fetchTableList(); - } - - //是否可以调用列表接口 - canFetchTableList = () => { - const { - radioGroupParams - } = this.radioGroupStore, { - searchYearSelect, - searchYear - } = radioGroupParams; - - if ( - searchYearSelect === '6' && - !searchYear - ) { - return false; - }; - - return true; - } - - //组织树事件回调 - handleOrgTreeNodeClick = () => { - // this.searchStore.setSelectedKey('0'); - - this.handleTabClick(); - } - - //页签事件回调 - handleTabClick = () => { - this.resetBrowser(); - - const { - selectedKey, - datas - } = this.searchStore; - - if (!isEmpty(datas)) { - this.topStore.fetchRightMenu({ - ruleId: datas[selectedKey].id - }); - - this.fetchRadioGroupAndTableInfo(); - } - } - - //重置浏览按钮的参数 - resetBrowser = () => { - this.radioGroupStore.setRadioGroupMoreParams({ - hrmResourceId: '' - }); - } - - //获取rightLayout的数据 - fetchPageRightInfo = () => { - this.fetchTabs().then(() => { - const { - selectedKey, - datas - } = this.searchStore; - - if (!isEmpty(datas)) { - this.topStore.fetchRightMenu({ - ruleId: datas[selectedKey].id - }); - - this.fetchRadioGroupAndTableInfo() - } - }) - } - - //获取RadioGroup和Table的数据 - fetchRadioGroupAndTableInfo = () => { - const { - fetchRadioGroupConfig - } = this.radioGroupStore; - - fetchRadioGroupConfig().then(() => { - //这里不需要执行fetchTableList - }) - } - - //获取页签数据 - fetchTabs = () => { - return new Promise((resolve, reject) => { - const { - id, - type - } = this.orgTreeStore, { - setDatas, - setSelectedKey, - } = this.searchStore; - - const params = { - organizationType: type ? type : '0', - organizationId: id, - }; - - api.getTabs(params).then(datas => { - const { - tab - } = datas; - - setDatas(tab); - if (!isEmpty(tab)) { - setSelectedKey(tab[0].key); - } - - resolve(); - }) - }) - } - - //获取列表信息 - fetchTableList = () => { - const params = this.getTableListParams(); - - this.tableListStore.fetchTableList(params); - } - - //获取调用列表接口所需的参数 - getTableListParams = () => { - const { - radioGroupParams, - } = this.radioGroupStore, { - id, - type - } = this.orgTreeStore; - - const orgTreeParams = { - organizationType: type ? type : '0', - organizationId: id - }; - - const tabParams = { - ruleId: this.ruleId - }; - - return Object.assign({}, orgTreeParams, radioGroupParams, tabParams); - } - - //重新渲染列 - reRenderColumns = (columns) => { - if (this.detailDialogStore.visible) { - return columns; - } - - const needReRenderCols = ['baseAmount', 'baseAmount2', 'usedAmount', 'usedAmount2', 'extraAmount', 'extraAmount2']; - - columns.map(column => { - const { - dataIndex - } = column; - - if (needReRenderCols.includes(dataIndex)) { - column.render = (text, record, index) => { - return ( - this.handleInputNumberChange(value, index, dataIndex)} - /> - ) - } - }; - - if (dataIndex === 'detailShow') { - column.render = (text, record) => { - const { - randomFieldId: resourceId, - detailShowspan - } = record; - - return ( - this.handleDetailClick(resourceId)}>{detailShowspan} - ) - } - } - }) - } - - //列表数字框回调函数 - handleInputNumberChange = (value, rowIndex, dataIndex) => { - const { - tableStore - } = this.tableListStore, { - datas - } = tableStore; - - datas.map((data, index) => { - if (rowIndex === index) { - Object.assign(data, { - [`${dataIndex}span`]: value - }) - } - }); - } - - //点击【明细】触发的回调事件 - handleDetailClick = (id) => { - const { - setDialogConfig, - openDialog, - } = this.detailDialogStore; - - setDialogConfig(this.detailDialogConfig); - - this.detailDialogSearchStore.setSearchConfig(this.detailDialogSearchConfig); - - openDialog(); - - //在当前对象中写入人员id - this.resourceId = id; - - this.fetchDetailDialogTableList(); - } - - //获取弹框列表的信息 - fetchDetailDialogTableList = () => { - const params = { - ...this.getTableListParams(), - resourceId: this.resourceId - }; - this.detailDialogTableStore.fetchTableList(params); - } - - //点击【批量删除】触发的回调函数(明细弹框) - batchDel = () => { - const msg = getLabel(385625, '确定要删除选择的记录吗?'); - - const { - showConfirm, - tableStore - } = this.detailDialogTableStore; - - showConfirm(msg).then(() => { - const params = { - ids: tableStore.selectedRowKeys + '' - }; - - this.del(params); - }) - } - - //点击【删除】触发的回调函数(明细弹框) - singleDel = (id) => { - const msg = getLabel(83877, '确定要删除吗?'); - - const { - showConfirm, - } = this.detailDialogTableStore; - - showConfirm(msg).then(() => { - const params = { - ids: id - }; - - this.del(params); - }) - } - - del = (params) => { - api.deleteBalance(params).then(datas => { - const { - status - } = datas; - - if (status === '1') { - message.success(datas.message); - this.fetchDetailDialogTableList() - } else { - message.warning(datas.message); - } - }) - } - - //列表功能的回调函数 - onOperatesClick = (record, rindex, operate) => { - const { - index - } = operate, { - randomFieldId: detailId - } = record; - - switch (index) { - case '0': - this.doEdit(detailId); - break; - case '1': - this.singleDel(detailId); - break; - case '2': - this.detailDialogTableStore.showLog('3074', detailId); - break; - } - - } - - //编辑明细 - doEdit = (detailId) => { - const { - setDialogConfig, - openDialog, - } = this.editDialogStore; - - setDialogConfig(this.editDialogConfig); - openDialog(); - - this.detailId = detailId; - - this.getDetailBalanceForm(); - } - - //获取明细表单 - getDetailBalanceForm = () => { - const { - setFormConfig, - fetchForm - } = this.formStore; - - const params = { - id: this.detailId - }; - - setFormConfig(this.editDialogFormConfig); - - fetchForm(params) - } - - //保存明细表单 - handleDetailFormSaveClick = () => { - const { - form, - validateForm - } = this.formStore; - - validateForm(form).then(() => { - const params = { - ...form.getFormParams(), - id: this.detailId - }; - - api.editBalance(params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.editDialogStore.closeDialog(); - this.fetchDetailDialogTableList(); - } else { - message.warning(datas.message); - } - }) - }) - } - - //关闭【明细】弹框 - closeDetailDialog = () => { - this.fetchTableList(); - } - - log = () => { - window.setLogViewProps({ logSmallType: 3074 }); - } - -} - -export const vacationRemainStore = new VacationRemainStore(); diff --git a/pc4backstage/hrmAttendance/stores/vacationRule.js b/pc4backstage/hrmAttendance/stores/vacationRule.js deleted file mode 100644 index f78a9fd..0000000 --- a/pc4backstage/hrmAttendance/stores/vacationRule.js +++ /dev/null @@ -1,1067 +0,0 @@ -import { - observable, - action, - computed, - toJS, -} from 'mobx'; -import { - WeaLocaleProvider, - WeaHelpfulTip, - WeaFormItem, -} from 'ecCom'; -import { - WeaSwitch -} from 'comsMobx'; -import { - Button, - message, -} from 'antd'; -import { - AuthorityStore, - TopStore, - SearchStore, - TableListStore, - DialogStore, - FormStore, -} from '../public/valhalla/stores/index.js'; -import * as api from '../apis/vacationRule.js'; -import Rules23th from '../components/vacationRule/Rules23th.js'; -import Rules6thPanel from '../components/vacationRule/Rules6thPanel.js'; -const getLabel = WeaLocaleProvider.getLabel; - -class VacationRuleStore { - @observable authorityStore = new AuthorityStore(api.getHasRight); - @observable topStore = new TopStore(api.getRightMenu, this); - @observable searchStore = new SearchStore(api.getSearchCondition, this); - @observable tableListStore = new TableListStore(api.getSearchList, this); - @observable dialogStore = new DialogStore(this); - @observable formStore = new FormStore(api.getLeaveRulesForm, this); - - @observable sectionValue = 1; - @observable detailRule = []; - - @observable legalRule = []; - @observable welfareRule = []; - @observable legalKey = '0'; - @observable welfareKey = '1'; - - @observable unitName = ''; - @observable isEnable = '1'; - - get workTimeType() { - const { - distributionMode - } = this.formStore.form.getFormParams(); - - if ([ '2','7'].includes(distributionMode)) { - return getLabel(505548, '司龄'); - } - if (distributionMode === '3') { - return getLabel(505549, '工龄'); - } - } - - get topLoading() { - const { - loading - } = this.tableListStore.tableStore; - - return loading; - } - - get rightMenuStates() { - const { - loading, - selectedRowKeys - } = this.tableListStore.tableStore; - - return [loading, selectedRowKeys.length === 0]; - } - - get topConfig() { - return { - title: getLabel('505561', "假期规则") - } - } - - get searchConfig() { - return { - linkageFieldName: 'ruleName' - } - } - - get DialogButtons() { - if (this.isEnable !== '0') { - return ( - [] - ) - }else{ - return [] - } - } - - get MoreBtn() { - return { - datas: [] - } - } - - get formConfig() { - return { - linkageConfigs: this.linkageConfigs, - groupShowConfigs:this.groupShowConfigs, - customRenderKeyList: this.customRenderKeyList, - isCustomRender: true, - } - } - - //法定年假列名 - get legalCols() { - const unit = this.unitName ? this.unitName : getLabel(505553, '天'); - - const legalCol = `${getLabel('505556', "法定年假")}(${unit})`; - const workYearCol = `${getLabel('505549',"工龄")}(${getLabel('505552',"年")})`; - const entryTimeCol = `${getLabel('505548',"司龄")}(${getLabel('505552',"年")})`; - - const cols = [legalCol]; - - if (this.legalKey === '0') { - cols.unshift(workYearCol); - } else if (this.legalKey === '1') { - cols.unshift(entryTimeCol); - } else { - [entryTimeCol, workYearCol].forEach(col => { - cols.unshift(col); - }) - } - - return cols; - } - - //福利年假列名 - get welfareCols() { - const unit = this.unitName ? this.unitName : getLabel(505553, '天'); - - const welfareCol = `${getLabel('505557', "福利年假")}(${unit})`; - const workYearCol = `${getLabel('505549',"工龄")}(${getLabel('505552',"年")})`; - const entryTimeCol = `${getLabel('505548',"司龄")}(${getLabel('505552',"年")})`; - - const cols = [welfareCol]; - - if (this.welfareKey === '0') { - cols.unshift(workYearCol); - } else if (this.welfareKey === '1') { - cols.unshift(entryTimeCol); - } else { - [entryTimeCol, workYearCol].forEach(col => { - cols.unshift(col); - }) - } - return cols; - } - - //法定年假、福利年假规则选择框options - get ruleOptions() { - return [{ - key: "0", - showname: getLabel('505549', "工龄") - }, { - key: "1", - showname: getLabel('505548', "司龄") - }, { - key: "2", - showname: `${getLabel('505549', "工龄")} + ${getLabel('505548', "司龄")}` - }] - } - - get linkageConfigs() { - return [ - //应用范围 - { - passiveKey: 'scopeValue', //分部 - activeKey: 'scopeType', - showValue: '1' - }, - //余额发放方式 - { - passiveKey: 'annualAmount', //每人发放余额 - activeKey: 'distributionMode', - showValue: '4,8' - }, { - passiveKey: 'priority', //优先级别 - activeKey: 'distributionMode', - showValue: '6' - }, { - passiveKey: 'calcMethod', //假期基数计算方式 - activeKey: 'distributionMode', - showValue: '2,3,6' - }, { - passiveKey: 'convertMode', //是否折算 - activeKey: 'distributionMode', - showValue: '2,3,4,6' - },{ - passiveKey: 'releaseRule', //释放规则 - activeKey: 'distributionMode', - showValue: '1,2,3,4,5,6' - }, - //有效期规则 - { - passiveKey: 'expirationMonth', //次年失效日期 - activeKey: 'validityRule', - showValue: '3' - }, { - passiveKey: 'extensionEnable', //允许延长有效期 - activeKey: 'validityRule', - showValue: '1,2,3,5' - }, { - passiveKey: 'effectiveDays', //有效天数 - activeKey: 'validityRule', - showValue: '4,8' - }, { - passiveKey: 'effectiveMonths', //有效月数 - activeKey: 'validityRule', - showValue: '6' - } - ] - } - - get groupShowConfigs() { - return [{ - passiveIndex: 3, - activeKey: 'distributionMode', - showValue: '1,2,3,4,6,7,8' - }] - } - - get OtherComponents() { - return { - distributionMode: (item, form) => { //余额发放方式 - const { - distributionMode - } = form.getFormParams(); - - let balancePaymentRule; - - if (['2', '3',"7"].includes(distributionMode)) { //司龄、工龄 - balancePaymentRule = - } - if (distributionMode === '6') { //司龄+工龄 - balancePaymentRule = - } - - return ( -
-

- - -

- {balancePaymentRule} -
- ) - }, - annualAmount: () => { //每人发放余额 - return {this.unitName?this.unitName:getLabel(1925, '天')} - }, - calcMethod: (item, form) => { //假期基数计算方式 - const { - calcMethod - } = form.getFormParams(); - - return ( -

- - -

- ) - }, - convertMode:(item, form) => {//是否折算 - const { - convertMode - } = form.getFormParams(); - - return ( -

- - -

- ) - }, - extensionEnable: (item, form) => { //允许延长有效期 - const { - extensionEnable - } = form.getFormParams(); - - if (parseInt(extensionEnable) === 1) { - const fieldConfig = this.customRenderItems['extendedDays']; - - return ( -

- {getLabel(505558,'超过有效期')} - - - - {`${getLabel(1925, '天')}`} -

- ) - } - }, - expirationMonth: (item, form) => { //次年失效日期 - const fieldConfig = this.customRenderItems['expirationDay']; - - return ( - - ) - }, - effectiveDays: () => { //有效天数 - return {getLabel(1925, '天')} - }, - effectiveMonths: () => { //有效月数 - return ( - - {getLabel(6076, '月')} - - - ) - }, - - }; - - } - - get newDialogConfig() { - return { - title: getLabel(505562, '新建假期规则'), - style: { - width: 775, - height: 650 - } - } - } - - get editDialogConfig() { - return { - title: getLabel(505563, '编辑假期规则'), - style: { - width: 775, - height: 650 - } - } - } - - //自定义渲染表单元素的key值 - get customRenderKeyList() { - return ['extendedDays', 'expirationDay'] - } - - //根据customRenderKeyList得出item的集合 - get customRenderItems() { - const { - conditions - } = this.formStore; - - let items = {}; - - conditions.forEach(condition => { - condition.items.forEach(item => { - const { - domkey - } = item; - if (this.customRenderKeyList.includes(domkey[0])) { - Object.assign(items, { - [domkey[0]]: item - }) - } - }) - }) - - return items - } - - @computed get isDistributeModeDisabled() { - return this.isEnable === '0'; - } - - preMount = () => { - this.topStore.setTopConfig(this.topConfig); - this.searchStore.setSearchConfig(this.searchConfig); - this.searchStore.searchMoreProps = { - advanceHeight:80 - }; - } - - //页面初始化 - init = () => { - this.authorityStore.fetchAuthority().then(() => { - this.resetStoreDatas(); - - this.topStore.fetchRightMenu(); - - this.searchStore.fetchSearchForm().then(() => { - const params = this.searchStore.form.getFormParams(); - this.tableListStore.fetchTableList(params); - }) - }) - } - - resetStoreDatas = () => { - this.searchStore.showSearchAd = false; - } - - new = () => { - const { - setDialogConfig, - openDialog, - } = this.dialogStore; - - this.resetDistributeModeRule(); - - this.dialogType = 'new'; - - setDialogConfig(this.newDialogConfig); - - openDialog(); - - this.getForm(); - } - - resetDistributeModeRule = () => { - ['detailRule', 'legalRule', 'welfareRule'].forEach(val => { - this[val] = []; - }) - } - - batchDelete = () => { - const msg = getLabel(385625, '确定要删除选择的记录吗?'); - - this.tableListStore.showConfirm(msg).then(() => { - const { - selectedRowKeys - } = this.tableListStore.tableStore; - - const params = { - ruleIds: selectedRowKeys + '' - }; - - this.del(params); - - }) - } - - singleDel = (ruleId) => { - const msg = getLabel(83877, '确定要删除吗?'); - - this.tableListStore.showConfirm(msg).then(() => { - const params = { - ruleIds: ruleId - }; - - this.del(params); - }); - } - - del = (params) => { - api.deleteLeaveRules(params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.handleSearch(); - } else { - message.warning(datas.message); - } - }) - } - - doEdit = (ruleId) => { - const { - setDialogConfig, - openDialog, - } = this.dialogStore; - - this.resetDistributeModeRule(); - - this.dialogType = 'edit'; - - this.ruleId = ruleId; - - setDialogConfig(this.editDialogConfig); - openDialog(); - - const params = { - ruleId - }; - this.getForm(params); - } - - log = (id) => { - this.tableListStore.showLog('3060', id); - } - - custom = () => { - this.tableListStore.colSet() - } - - //保存按钮事件回调 - handleSaveClick = () => { - const { - form, - validateForm, - } = this.formStore, { - distributionMode - } = form.getFormParams(); - - this.setHideFormFieldKeys(); - - validateForm(form).then(() => { - this.isNameRepeat().then(() => { - const params = form.getFormParams(); - - if (['2', '3','7'].includes(distributionMode)) { - Object.assign(params, { - detailRule: JSON.stringify(this.detailRule) - }) - } - if (distributionMode === '6') { - Object.assign(params, { - legalRule: JSON.stringify(this.legalRule), - welfareRule: JSON.stringify(this.welfareRule), - legalKey: this.legalKey, - welfareKey: this.welfareKey, - }) - } - - if (this.dialogType === 'edit') { - Object.assign(params, { - ruleId: this.ruleId - }); - } - - const apiName = (this.dialogType === 'new') ? 'addLeaveRules' : 'editLeaveRules'; - - this.formStore.loading = true; - - api[apiName](params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.handleSearch(); - this.dialogStore.closeDialog(); - } else { - message.warning(datas.message); - } - - this.formStore.loading = false; - }) - }) - }) - - - } - - setHideFormFieldKeys = () => { - const { - form, - conditions, - collectHideFormFieldKeys - } = this.formStore, { - scopeType, //应用范围 - distributionMode, //余额发放方式 - extensionEnable, //允许延长有效期 - validityRule, //有效期规则 - } = form.getFormParams(); - - //默认两项:假期类型、规则名称 - const needValidation = ['typeId', 'ruleName']; - - if (scopeType === '1') { //分部 - needValidation.push('scopeValue'); - } - if (distributionMode === '4') { //每年自动发放固定余额 - needValidation.push('annualAmount'); - } - if (parseInt(extensionEnable) === 1) { //允许延长有效期 - needValidation.push('extendedDays'); - } - if (validityRule === '4') {//有效期规则 - needValidation.push('effectiveDays'); - } - if (validityRule === '6') { - needValidation.push('effectiveMonths'); - } - - window.e9HideFormFieldKeys = collectHideFormFieldKeys(needValidation); - } - - isNameRepeat = () => { - return new Promise((resolve, reject) => { - const { - form - } = this.formStore, { - ruleName - } = form.getFormParams(); - - const params = { - ruleName - } - - if (this.dialogType === 'edit') { - Object.assign(params, { - ruleId: this.ruleId - }) - } - - api.isNameRepeat(params).then(datas => { - const { - isRepeat - } = datas; - - if (isRepeat) { - form.showError('ruleName', getLabel(84543, '规则名称已存在!')) - } else { - resolve(); - } - }) - }) - } - - //表单事件回调 - handleFormChange = (datas) => { - const { - typeId, - distributionMode, - calcMethod, - } = datas; - - if (typeId) { //切换假期类型 - const { - value - } = typeId; - - this.getUnitName(value); - } - - if (distributionMode) { //切换余额发放方式 - const { - value - } = distributionMode; - - if (['2', '3','7'].includes(value)) { - this.sectionValue = 1; //重置区间 - this.detailRule = [{ //重置工龄、司龄规则 - timePoint: 0, - amount: 0 - }, { - timePoint: 1, - amount: 5 - }]; - }; - if (value === '6') { - this.legalKey = '0'; //默认选中工龄 - this.welfareKey = '1'; //默认选中司龄 - this.legalRule = [{ - workYear: 0, - legalAmount: 0 - }]; - this.welfareRule = [{ - entryTime: 0, - welfareAmount: 0 - }]; - }; - - this.setValidityRuleDisabled(value); - - //【余额发放方式】从第5项切换到其他项时,重置【有效期规则】 - if (this.lastDistributionMode === '5' && value !== '5') { - this.formStore.form.updateFields({ - validityRule: '0' - }) - } - //【余额发放方式】从第8项切换到其他项时,重置【有效期规则】 - if (this.lastDistributionMode === '8' && value !== '8') { - this.formStore.form.updateFields({ - validityRule: '0' - }) - } - //【余额发放方式】从其他项第切换到8项时,重置【有效期规则】 - if (this.lastDistributionMode !== '8' && value == '8') { - this.formStore.form.updateFields({ - validityRule: '7' - }) - } - - //重置【假期基数计算方式】,避免【是否折算】第一项被禁用 - if (['2','3','6'].includes(this.lastDistributionMode) && !['2','3','6'].includes(value)) { - this.formStore.form.updateFields({ - calcMethod: '1' - }); - this.setConvertModeDisabled('1'); - } - - this.lastDistributionMode = value; - - - } - - if (calcMethod) { //假期基数计算方式 - const { - value - } = calcMethod; - - this.setConvertModeDisabled(value); - - if (value === '0') { - this.formStore.form.updateFields({ - convertMode: '1' - }) - } - } - } - - setValidityRuleDisabled = (value) => { - const { - conditions - } = this.formStore; - //【余额发放方式】选中项不为'加班时长自动计入余额'时,禁用【有效期规则】最后一项。 - conditions.map(c => c.items.map(item => { - if (item.domkey[0] === 'validityRule') { - [4, 5, 6].map(val => { - item.options[val].disabled = (value !== '5') ? true : false; - }), - [1,2,3].map(val => { - item.options[val].disabled = (value == '8') ? true : false; - }), - [7].map(val => { - item.options[val].disabled = (value !== '8') ? true : false; - }) - - } - })); - } - - setConvertModeDisabled = (value) => { - const { - conditions - } = this.formStore; - - //【假期基数计算方式】选中项为'精确计算'时,是否折算第一项禁用。 - conditions.map(c => c.items.map(item => { - if (item.domkey[0] === 'convertMode') { - item.options[0].disabled = (value === '0') ? true : false; - } - })) - } - - //获取假期余额发放单位 - @action getUnitName = (id) => { - const params = { - typeId: id - }; - api.getUnitName(params).then(data => { - const { - unitName - } = data; - - this.unitName = unitName; - }) - } - - //区间回调 - @action handleSectionChange = (value) => { - this.sectionValue = (value !== undefined) ? value : 1; - } - - //余额数字框事件回调(工龄、司龄) - @action handleRule23thTimeChange = (value, index) => { - this.detailRule[index].amount = (value !== undefined) ? value : 0; - } - - //添加规则(司龄、工龄) - @action handle23thAddButtonClick = (type) => { - //正常情况下,不会执行if语句块内的代码; - //此段代码是为了避免误删数据库,导致前端添加规则出现数据异常的问题。 - if (this.detailRule.length === 0) { - this.detailRule.push({ - timePoint: 0, - amount: 0, - }); - return; - } - - const { - timePoint, - amount - } = this.detailRule.slice(-1)[0]; - - this.detailRule.push({ - timePoint: timePoint + this.sectionValue, - amount: amount + 1, - }); - } - - //删除规则(司龄、工龄) - @action handle23thDelClick = () => { - this.detailRule.pop(); - } - - //余额数字框事件回调(工龄+司龄) - @action handleRule6thTimeChange = (val, index, prop, type) => { - if (type === 'legal') { - this.legalRule[index][prop] = (val !== undefined) ? val : 0; - } else { - this.welfareRule[index][prop] = (val !== undefined) ? val : 0; - } - } - - //添加规则(司龄+工龄) - @action handle6thAddButtonClick = (type) => { - //规则异常 - if ( - this.legalRule.length === 0 || - this.welfareRule.length === 0 - ) { - this.handle6thRuleError(type); - return; - } - - if (type === 'legal') { - const { - workYear, - entryTime, - legalAmount - } = this.legalRule.slice(-1)[0]; - - if (this.legalKey === '0') { //工龄 - this.legalRule.push({ - workYear: workYear + 1, - legalAmount: legalAmount + 1 - }); - } else if (this.legalKey === '1') { //司龄 - this.legalRule.push({ - entryTime: entryTime + 1, - legalAmount: legalAmount + 1, - }); - } else { - this.legalRule.push({ //工龄+司龄 - workYear: workYear + 1, - entryTime: entryTime + 1, - legalAmount: legalAmount + 1, - }); - } - } else { - const { - workYear, - entryTime, - welfareAmount - } = this.welfareRule.slice(-1)[0]; - - if (this.welfareKey === '0') { - this.welfareRule.push({ //工龄 - workYear: workYear + 1, - welfareAmount: welfareAmount + 1 - }); - } else if (this.welfareKey === '1') { - this.welfareRule.push({ //司龄 - entryTime: entryTime + 1, - welfareAmount: welfareAmount + 1 - }); - } else { - this.welfareRule.push({ //工龄+司龄 - workYear: workYear + 1, - entryTime: entryTime + 1, - welfareAmount: welfareAmount + 1, - }); - } - } - } - - handle6thRuleError = (type) => { - if (type === 'legal') { - if (this.legalKey === '0') { //工龄 - this.legalRule.push({ - workYear: 0, - legalAmount: 0 - }); - } else if (this.legalKey === '1') { //司龄 - this.legalRule.push({ - entryTime: 0, - legalAmount: 0, - }); - } else { - this.legalRule.push({ //工龄+司龄 - workYear: 0, - entryTime: 0, - legalAmount: 0, - }); - } - } else { - if (this.welfareKey === '0') { - this.welfareRule.push({ //工龄 - workYear: 0, - welfareAmount: 0 - }); - } else if (this.welfareKey === '1') { - this.welfareRule.push({ //司龄 - entryTime: 0, - welfareAmount: 0 - }); - } else { - this.welfareRule.push({ //工龄+司龄 - workYear: 0, - entryTime: 0, - welfareAmount: 0, - }); - } - } - } - - //删除规则(司龄+工龄) - @action handle6thDelClick = (type) => { - if (type === 'legal') { - this.legalRule.pop(); - } else { - this.welfareRule.pop(); - } - } - - getForm = (params) => { - const { - setFormConfig, - fetchForm, - } = this.formStore; - - setFormConfig(this.formConfig); - fetchForm(params, this.exportFormDatas, this.afterFormInit); - } - - exportFormDatas = (datas) => { - ['distributionMode', 'calcMethod', 'convertModeTips', 'isEnable', 'detailRule', 'unitName', 'legalRule', 'welfareRule', 'legalKey', 'welfareKey'].forEach(val => { - this[val] = datas[val]; - }); - } - - afterFormInit = () => { - //将表单默认的【余额发放方式】选项挂载到当前对象上 - const { - distributionMode, - calcMethod, - } = this.formStore.form.getFormParams(); - - this.setValidityRuleDisabled(distributionMode); - this.setConvertModeDisabled(calcMethod); - - this.lastDistributionMode = distributionMode; - } - - //法定年假、福利年假规则选择框事件回调 - @action handleRuleSelectChange = (key, type) => { - if (type === 'legal') { - this.legalKey = key; - } else { - this.welfareKey = key; - } - - this.changeRuleCol(type) - } - - changeRuleCol = (type) => { - this[`${type}Rule`] = toJS(this[`${type}Rule`]).map(rule => { - const { - workYear, - entryTime - } = rule; - - const key = this[`${type}Key`]; - - if (key === '0') { //规则:工龄 - if (!workYear) { - rule.workYear = 0; - } - if (entryTime + '') { //0 => '0' - delete rule.entryTime - } - } else if (key === '1') { //规则:司龄 - if (workYear + '') { - delete rule.workYear - } - if (!entryTime) { - rule.entryTime = 0; - } - } else { //规则:工龄+司龄 - if (!workYear) { - rule.workYear = 0; - } - if (!entryTime) { - rule.entryTime = 0; - } - } - - return rule; - }) - - } - - handleSearch = () => { - const params = this.searchStore.form.getFormParams(); - this.tableListStore.fetchTableList(params); - } - - reRenderColumns = (columns) => { - columns.map(column => { - if (column.dataIndex === 'ruleName') { - column.render = (text, record) => { - const { - ruleName, - randomFieldId: ruleId - } = record; - - return this.doEdit(ruleId)}>{ruleName} - } - } - }) - } - - onOperatesClick = (record, rowIndex, operate) => { - const { - randomFieldId: ruleId - } = record, { - index - } = operate; - - switch (index) { - case '0': - this.doEdit(ruleId); - break; - case '1': - this.singleDel(ruleId); - break; - case '2': - this.log(ruleId); - break; - } - } - -} - -export const vacationRuleStore = new VacationRuleStore(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/vacationType.js b/pc4backstage/hrmAttendance/stores/vacationType.js deleted file mode 100644 index 0ca271e..0000000 --- a/pc4backstage/hrmAttendance/stores/vacationType.js +++ /dev/null @@ -1,656 +0,0 @@ -import { - observable, - action, - computed, -} from 'mobx'; -import { - WeaCheckbox, - WeaHelpfulTip, - WeaInputNumber, - WeaLocaleProvider, -} from 'ecCom'; -import { - WeaSwitch, - WeaForm -} from 'comsMobx'; -import { - Button, - message, -} from 'antd'; -import { - AuthorityStore, - TopStore, - SearchStore, - TableListStore, - DialogStore, - FormStore, -} from '../public/valhalla/stores/index.js'; -import * as api from '../apis/vacationType.js'; -import * as timeSelectionApi from '../apis/timeSelection.js'; -const getLabel = WeaLocaleProvider.getLabel; - -const queryParams = { - selectiontype: 0 -} - -class VacationTypeStore { - @observable authorityStore = new AuthorityStore(api.getHasRight); - @observable topStore = new TopStore(api.getRightMenu, this); - @observable searchStore = new SearchStore(api.getSearchCondition, this); - @observable tableListStore = new TableListStore(api.getSearchList, this); - @observable dialogStore = new DialogStore(this); - @observable formStore = new FormStore(api.getLeaveTypesForm, this); - @observable isEnable = true; - - get topLoading() { - const { - loading - } = this.tableListStore.tableStore; - - return loading; - } - - get rightMenuStates() { - const { - loading, - selectedRowKeys - } = this.tableListStore.tableStore; - - return [loading, loading, selectedRowKeys.length === 0]; - } - - get topConfig() { - return { - title: getLabel(505572, "假期类型") - } - } - - get searchConfig() { - return { - linkageFieldName: 'leaveName' - } - } - - get formConfig() { - return { - linkageConfigs: this.linkageConfigs, - isCustomRender: true, - customRenderKeyList: ['proportion'] - } - } - - get linkageConfigs() { - return [ - //流程可见范围 - { - passiveKey: 'scopeValue', //分部 - activeKey: 'scopeType', - showValue: '1' - }, - //计算请假时长方式 - { - passiveKey: 'hoursToDay', //日折算时长 - activeKey: 'computingMode', - showValue: '2', - }, - //时间选择方式 - { - passiveKey: 'timeselection', //时间选择方式 - activeKey: 'minimumUnit', - showValue: '2', - }, - { - passiveKey: 'filterHolidays', - activeKey: 'computingMode', - showValue: '2', - }, - { - passiveKey: 'conversion', - activeKey: 'minimumUnit', - showValue: '5,6', - }, - ] - } - - get OtherComponents() { - return { - hoursToDay: () => { //日折算时长 - return ( - - {`${getLabel('391',"小时")}=1${getLabel('505553',"天")}`} - - - ) - }, - timeselection: (item, form) => {//时间选择方式 - const { - timeselection - } = form.getFormParams(); - if(timeselection == 1) - return ( - this.getDefForm()}>{getLabel('513303','选项名称定义')} - ) - else - return ; - }, - minimumUnit: (item, form) => { //请假单位 - const { - minimumUnit - } = form.getFormParams(); - - return ( -

- - -

- ) - }, - proportion: (item, form) => { //余额单位变更时的换算比例 - return ( - - {`${getLabel('391',"小时")}=1${getLabel('505553',"天")}`} - - - ) - }, - conversion:(item, form)=>{ - const { - minimumUnit, - conversion, - } = form.getFormParams(); - - const tips = this[`conversion${minimumUnit}`] - - return ( -

- - {tips && } -

- ) - } - } - } - - get newDialogConfig() { - return { - title: getLabel(505573, '新建假期类型'), - style: { - width: 600, - height: 300 - } - } - } - - get editDialogConfig() { - return { - title: getLabel(505574, '编辑假期类型'), - style: { - width: 600, - height: 300 - } - } - } - - get DialogButtons() { - if (this.isEnable) { - return ( - [] - ) - }else{ - return []; - } - } - - get MoreBtn() { - return { - datas: [] - } - } - - preMount = () => { - this.topStore.setTopConfig(this.topConfig); - this.searchStore.setSearchConfig(this.searchConfig); - } - - //页面初始化 - init = () => { - this.authorityStore.fetchAuthority().then(() => { - this.resetStoreDatas(); - - this.topStore.fetchRightMenu(); - - this.searchStore.fetchSearchForm().then(() => { - const params = this.searchStore.form.getFormParams(); - this.tableListStore.fetchTableList(params); - }) - }) - } - - //关闭下拉面板 - resetStoreDatas = () => { - this.searchStore.showSearchAd = false; - } - - //新建假期类型 - new = () => { - const { - setDialogConfig, - openDialog, - } = this.dialogStore; - - this.dialogType = 'new'; - - setDialogConfig(this.newDialogConfig); - - openDialog(); - - this.getForm(); - } - - batchDelete = () => { - const msg = getLabel(385625, '确定要删除选择的记录吗?'); - - this.tableListStore.showConfirm(msg).then(() => { - const { - selectedRowKeys - } = this.tableListStore.tableStore; - - const params = { - typeIds: selectedRowKeys + '' - }; - - this.del(params); - - }) - } - - singleDel = (typeId) => { - const msg = getLabel(83877, '确定要删除吗?'); - - this.tableListStore.showConfirm(msg).then(() => { - const params = { - typeIds: typeId - }; - - this.del(params); - }); - } - - del = (params) => { - api.deleteLeaveTypes(params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.handleSearch(); - } else { - message.warning(datas.message); - } - }) - } - - //编辑假期类型 - doEdit = (typeId) => { - const { - setDialogConfig, - openDialog, - } = this.dialogStore; - - this.dialogType = 'edit'; - - this.typeId = typeId; - - setDialogConfig(this.editDialogConfig); - - openDialog(); - - const params = { - typeId - }; - this.getForm(params); - } - - log = (id) => { - this.tableListStore.showLog('3059', id); - } - - custom = () => { - this.tableListStore.colSet() - } - - save = () => { - const params = { - datas: JSON.stringify(this.tableListStore.tableStore.datas) - }; - - api.saveDisableLeaveRules(params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.handleSearch() - } else { - message.warning(datas.message); - } - }) - } - - //保存按钮事件回调 - handleSaveClick = () => { - const { - form, - validateForm, - } = this.formStore; - - this.setHideFormFieldKeys(); - - validateForm(form).then(() => { - this.isNameRepeat().then(() => { - const params = form.getFormParams(); - - if (this.dialogType === 'edit') { - Object.assign(params, { - typeId: this.typeId - }); - } - - const apiName = (this.dialogType === 'new') ? 'addLeaveTypes' : 'editLeaveTypes'; - - this.formStore.loading = true; - - api[apiName](params).then(datas => { - const { - sign - } = datas; - - if (sign === '1') { - message.success(datas.message); - this.handleSearch(); - this.dialogStore.closeDialog(); - } else { - message.warning(datas.message); - } - - this.formStore.loading = false; - }) - }) - }) - } - - setHideFormFieldKeys = () => { - const { - form, - conditions, - collectHideFormFieldKeys - } = this.formStore, { - scopeType, //流程可见范围, - computingMode, //计算请假时长方式 - } = form.getFormParams(); - - //默认一项:假期名称 - const needValidation = ['leaveName','showOrder']; - - if (scopeType === '1') { //分部 - needValidation.push('scopeValue'); - } - if (computingMode === '2') { //按自然日计算请假时长 - needValidation.push('hoursToDay'); - } - - window.e9HideFormFieldKeys = collectHideFormFieldKeys(needValidation); - } - - isNameRepeat = () => { - return new Promise((resolve, reject) => { - const { - form - } = this.formStore, { - leaveName - } = form.getFormParams(); - - const params = { - leaveName - } - - if (this.dialogType === 'edit') { - Object.assign(params, { - typeId: this.typeId - }) - } - - api.isNameRepeat(params).then(datas => { - const { - isRepeat - } = datas; - - if (isRepeat) { - form.showError('leaveName', `${getLabel(388883,'假期名称')}${getLabel(18082,'重复')}`) - } else { - resolve(); - } - }) - }) - } - - //表单事件回调 - handleFormChange = (datas) => { - const { - minimumUnit - } = datas; - - if (minimumUnit) { - const { - value - } = minimumUnit; - - const { - setCustomRenderKeyList - } = this.formStore; - - const d = ['1','2','4'],h = ['3','5','6'] - - if ( - (d.includes(value) && h.includes(this.prevMinimumUnit) ) || - ( h.includes(value) && d.includes(this.prevMinimumUnit) ) - ) { - setCustomRenderKeyList(''); - } else { - setCustomRenderKeyList(['proportion']); - } - - this.prevMinimumUnit = value - - } - } - - getForm = (params) => { - const { - setFormConfig, - setCustomRenderKeyList, - fetchForm, - } = this.formStore; - - setFormConfig(this.formConfig); - setCustomRenderKeyList(['proportion']); - fetchForm(params, this.exportFormDatas); - } - - exportFormDatas = (datas) => { - ['isEnable', 'minimumUnit','conversion5','conversion6'].forEach(val => { - this[val] = datas[val]; - }); - this.getDefaultVacationUnit(datas.condition); - } - - getDefaultVacationUnit = (condition) => { - condition.forEach(c => c.items.forEach(item => { - if (item.domkey[0] === "minimumUnit") { - this.prevMinimumUnit = item.options.find(option => option.selected).key; - } - })) - } - - handleSearch = () => { - const params = this.searchStore.form.getFormParams(); - this.tableListStore.fetchTableList(params); - } - - reRenderColumns = (columns) => { - let _this = this; - columns.map(column => { - if (column.dataIndex === 'leaveName') { //假期名称 - column.render = (text, record) => { - const { - leaveName, - randomFieldId: typeId - } = record; - - return this.doEdit(typeId)}>{leaveName} - } - } - if (column.dataIndex === 'isEnable') { //是否启用 - column.render = function(text, record) { - const { - randomFieldId - } = record; - - return _this.handleCheckboxChange(val,randomFieldId) }/> - } - } - if (column.dataIndex === 'showOrder') { //显示顺序 - column.render = function(text, record) { - const { - randomFieldId - } = record; - - return _this.handleInputNumberChange(val,randomFieldId) }/> - } - } - - }) - } - - handleCheckboxChange = (val, id) => { - const { - datas - } = this.tableListStore.tableStore; - - const result = datas.find(data => data.randomFieldId === id); - - if (result) { - result.isEnable = val; - } - - } - - handleInputNumberChange = (val, id) => { - const { - datas - } = this.tableListStore.tableStore; - - const result = datas.find(data => data.randomFieldId === id); - - if (result) { - result.showOrder = val; - } - - } - - onOperatesClick = (record, rowIndex, operate) => { - const { - randomFieldId: typeId - } = record, { - index - } = operate; - - switch (index) { - case '0': - this.doEdit(typeId); - break; - case '1': - this.singleDel(typeId); - break; - case '2': - this.log(typeId); - break; - } - } - - /** 选项名称定义 */ - @observable timeSelectionDialogVisible = false; - @computed get timeSelectionDialog(){ - return { - key: new Date().getTime(), - ...ecCom.WeaTools.getIconBGC('hrm'), - style: { - height: 200 - }, - title: getLabel('513303','选项名称定义'), - hasScroll: true, - visible: this.timeSelectionDialogVisible, - buttons: [ - , - ], - moreBtn: { - datas: [ - { - key: "1", - icon: , - content: getLabel(30986, '保存'), - onClick: () => this.saveDefForm() - }, - ] - }, - onCancel: () => { - this.timeSelectionDialogVisible = false; - } - } - } - - @action getDefForm = () => { - const {minimumUnit} = this.formStore.form.getFormParams(); - const params = {leaveruleid: this.typeId, ...queryParams, minimumUnit}; - timeSelectionApi.getTimeSelectionForm(params).then(data => { - if(data.status == '1'){ - const {condition: fields} = data; - this.formTarget = { - fields, - form: new WeaForm() - }; - this.formTarget.form.initFormFields(fields); - this.timeSelectionDialogVisible = true; - }else{ - message.error(data.message); - } - }) - } - - @action saveDefForm = () => { - const {minimumUnit} = this.formStore.form.getFormParams(); - const params = {leaveruleid: this.typeId, ...queryParams, minimumUnit}; - - const formData = this.formTarget.form.getFormParams(); - Object.assign(params, {...formData}); - - timeSelectionApi.saveTimeSelectionForm(params).then(data => { - if(data.status == '1'){ - this.timeSelectionDialogVisible = false; - }else{ - message.error(data.message); - } - }) - } - -} - -export const vacationTypeStore = new VacationTypeStore(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/stores/workflowSetting.js b/pc4backstage/hrmAttendance/stores/workflowSetting.js deleted file mode 100644 index 2a545e7..0000000 --- a/pc4backstage/hrmAttendance/stores/workflowSetting.js +++ /dev/null @@ -1,1302 +0,0 @@ -import { - observable, - action, - computed -} from 'mobx'; -import { - WeaHelpfulTip, - WeaNewScroll, - WeaTools, - WeaButtonIcon, - WeaFormItem, - WeaBrowser, - WeaError, - WeaLocaleProvider -} from 'ecCom'; -import { - WeaTableNew, - WeaSwitch -} from 'comsMobx'; -import { - Button, - message -} from 'antd'; -import HrmBaseStore from "../../hrmComsPublic/stores/baseStore"; -import * as api from '../apis/workflow'; -import * as shiftapi from "../apis/shiftManager"; -import { - i18n -} from '../public/i18n'; -import { - indexOf, - cloneDeep, - findIndex, - has -} from 'lodash'; -// import {FormInfo} from 'weaHrmComsPublic'; -import {FormInfo} from '../../hrmComsPublic/index'; -import {addContentPath} from '../util/index.js' -const getLabel = WeaLocaleProvider.getLabel; -const { - TableStore -} = WeaTableNew; - -class HrmWorkflowSetting extends HrmBaseStore { - constructor() { - super(); - } - /********************* unobservable list *********************/ - moduleName; - descObj = {}; - tips = {}; - - orgTreeProps = { - needSearch: true, - topPrefix: 'hrmSearch', - inputLeftDom: `${i18n.label.organization()}`, - treeNodeClick: this.treeNodeClick, - params: { - rightStr: 'StateChangeProcess:Set' - } - } - - attendanceOrgTreeProps = { - ...this.orgTreeProps, - params: { - rightStr: 'HrmAttendanceProcess:setting' - } - } - - tabConfig = { - tabs: [{ - color: '#000000', - groupId: 'roleList', - title: '', - viewCondition: '1', - searchType: ['base', 'advanced'], - searchKey: 'field001', - doSearch: (params) => this.getTableData(params) - }], - keyParam: 'viewCondition', - activeTabKey: '1' - } - - editTabConfig = { - tabs: [{ - color: '#000000', - groupId: 'info', - title: '流程概览', - viewCondition: '1', - }, { - color: '#000000', - groupId: 'field', - title: '字段对应', - viewCondition: '2', - }, { - color: '#000000', - groupId: 'actionSetting', - title: '动作设置', - viewCondition: '3', - }], - keyParam: 'viewCondition', - activeTabKey: '1' - } - - get generateFormFields(){ - return [{ - "title": i18n.label.basicSetting(), - "items": [{ - "colSpan": 2, - "conditionType": "INPUT", - "domkey": ["formName"], - "fieldcol": 12, - "isQuickSearch": false, - "label": i18n.label['15451'](), - "labelcol": 6, - "precision": 0, - "rules": "required|string", - "value": "", - "viewAttr": 3 - }], - "defaultshow": true - }] - } - - wfFormItemRender = { - field001: (field, textAreaProps, form, formParams) => { - return ( -
- this.callAddPath(values)}} - form={form} formParams={formParams} onChange={this.onWfChange} /> -
- ) - }, - field002: (field, textAreaProps, form, formParams) => { - return ( -
-
- this.callAddForm(values)}} - form={form} formParams={formParams} onChange={this.onWfChange1}/> -
- {i18n.label['83444']()} - -
- ) - }, - field004: (field, textAreaProps, form, formParams) => { - return ( -
- ) - }, - field006: (field, textAreaProps, form, formParams) => { - const fv = formParams.field006; - const {field006: desc} = this.descObj; - const {field006: tip} = this.tips; - const helpfulTip = (tip || {})[fv] || ''; - return ( -
- this.onField006Change(v)}/> - { - desc &&
{desc[fv]}
- } -
- ) - }, - usedetail: (field, textAreaProps, form, formParams) => { - if(['5', '6', '7', '8'].indexOf(formParams.field006) > -1) - return null; - return ( -
this.onField006Change(v)}/>
- ) - }, - flow_deduct_card: (field, textAreaProps, form, formParams) => { - if(['0', '1', '2'].indexOf(formParams.field006) > -1){ - return ( -
- ) - }else{ - return null; - } - - } - } - - editorDialogRightMenu = []; - @computed get getDialogOpButtons(){ - let buttons = []; - this.editorDialogRightMenu.length = 0; - if(this.canAdd){ - switch (this.dialogParams.opType) { - case '': - buttons.push(); - buttons.push(); - break; - case 'showContent': - buttons.push(); - break; - } - } - - buttons.map((btn, index) => { - const { - props - } = btn; - this.editorDialogRightMenu.push({ - key: index.toString(), - content: props.children, - icon: , - onClick: props.onClick - }); - }) - - this.dialogParams.moreBtn.datas = this.editorDialogRightMenu; - return buttons; - } - - autoGenDialogRightMenu = []; - getAutoGenDialogOpButtons = () => { - let buttons = []; - this.autoGenDialogRightMenu.length = 0; - buttons.push(); - - buttons.map((btn, index) => { - const { - props - } = btn; - this.autoGenDialogRightMenu.push({ - key: index.toString(), - content: props.children, - icon: , - onClick: props.onClick - }); - }) - - this.generateFormDialogParams.moreBtn.datas = this.autoGenDialogRightMenu; - return buttons; - } - - wfFormFields; - selectedSubCompany; - tableEditDatas; - - needRender = ['fakeInp', 'field005', 'field006']; - renderCol = {} - browsers = []; - /********************* unobservable list *********************/ - - /********************* dialog info setting *********************/ - - /********************* dialog info setting *********************/ - - /********************* observable list *********************/ - @observable table = new TableStore(); - @observable checkRuleTable = new TableStore(); - @observable spinning = false; - @observable canAdd = false; - @observable canCreate = false; - @observable canDel = false; - - @computed get topBtnAndMenu(){ - let buttons = []; - this.canCreate && buttons.push(( - - )); - this.canDel && buttons.push(( - - )); - - let menus = this.convertToMenus(buttons); - const obj = { - buttons, - menus: [ - ...menus, - ...this.getBasicMenus("HRM_KQ_WORKFLOW") - ] - }; - return obj; - } - - dialogParams = { - ...this.dialogPropsDef, - opType: '', - onCancel: () => { - this.dialogParams.opType = ''; - this.dialogParams.visible = false; - this.opId = null; - } - } - - @observable generateFormDialogParams = { - ...this.dialogPropsDef, - onCancel: () => { - this.generateFormDialogParams.visible = false; - } - } - - @observable tableConfig = { - ...this.editTableConfig, - showTitle: false, - draggable: false, - showAdd: false, - showDelete: false, - showCopy: false, - columns: [], - datas: [], - selectedData: {}, - getRowSelection: (rowSelection) => { - return null; - }, - onChange: (data) => { - this.tableEditDatas = data; - this.tableConfig.datas = this.convertData(data, true); - } - } - - @observable refreshMainTab = new Date().getTime(); - @observable refreshTab = new Date().getTime(); - /********************* observable list *********************/ - - /********************* computed list *********************/ - @computed get multiRemoveable() { - return this.table.selectedRowKeys.length === 0; - } - /********************* computed list *********************/ - - /********************* action list *********************/ - clearParams = () => { - this.selectedSubCompany = null; - this.opId = null; - } - - initData = (moduleName) => { - this.clearParams(); - this.moduleName = moduleName; - this.containerInitFinished = { - ...this.containerInitFinished, - init: true - } - api.initModuleData(moduleName).then(rs => { - rs.map((result, index) => { - if (result.status === '1') { - switch (index) { - case 0: - this.wfFormFields = result.condition; - this.descObj = result.desc; - this.tips = result.tips; - this.setFormData('wfForm', result.condition); - break; - case 1: - this.setFormData('conditionForm', result.conditions); - if (this.formTarget.conditionForm.isFormInit) { - this.refreshMainTab = new Date().getTime(); - this.getTableData(); - } - break; - } - } - }) - }) - } - - @action treeNodeClick = (event, ids, nodeids, nodes) => { - this.formTarget.conditionForm.resetForm(); - const { - data: nodeData - } = event.node.props; - this.selectedSubCompany = nodeData; - this.formTarget.conditionForm.updateFields({ - subcompanyid: { - value: nodeData.id.toString(), - valueSpan: nodeData.name, - valueObj: [{ - id: nodeData.id.toString(), - name: nodeData.name - }] - } - }) - this.getTableData(); - } - - getTableData = (params) => { - this.table = new TableStore(); - if (params == null) - params = { ...this.formTarget.conditionForm.getFormParams() - }; - // this.selectedSubCompany != null && Object.assign(params, { - // subcompanyid: this.selectedSubCompany.id, - // }) - api.getWorkflowList(this.moduleName, params).then(data => { - if (data.status === '1'){ - this.canCreate = data.canAdd; - this.canDel = data.canDel; - this.table.getDatas(data.sessionkey, 1); - }else - message.error(data.message) - }, error => {}) - } - - getFormData = async (params) => { - const data = await api.getFormInfo(this.moduleName, params); - if (data.status === '1') { - this.canAdd = data.canAdd; - this.setFormData('wfForm', data.condition); - this.refreshTab = new Date().getTime(); - this.dialogParams.visible = true; - } else - message.error(data.message); - } - - checkRight = async (params) => { - const data = await api.getFormInfo(this.moduleName, params); - if (data.status === '1') { - this.canAdd = data.canAdd; - } else - message.error(data.message); - } - - @action create = async () => { - // this.getFormData(); - const f = cloneDeep(this.wfFormFields); - this.checkRight(); - this.selectedSubCompany != null && f.map(g => { - g.items.map(item => { - if (item.domkey[0] === 'field004') { - item.browserConditionParam.replaceDatas = [{ - id: this.selectedSubCompany.id, - name: this.selectedSubCompany.name - }] - } - }) - }) - this.setFormData('wfForm', f); - if (this.formTarget.wfForm.isFormInit) { - this.dialogParams.title = this.moduleName === 'statechange' ? i18n.label['384621']() : i18n.label['385037'](); - this.dialogParams.style = { - width: 600, - height: 520 - } - this.dialogParams.coms = ( - - - - ); - this.dialogParams.visible = true; - } - } - - @action createForm = () => { - const formParams = this.formTarget.wfForm.getFormParams(); - let typeLabel = this.formTarget.wfForm.fieldMap.field006.label; - let options = this.formTarget.wfForm.fieldMap.field006.options; - if (formParams.field006 == null || formParams.field006 === '') { - message.error(`${i18n.message.plsSelect()}"${typeLabel}"!`) - return; - } - let formTemp = options[findIndex(options, { - key: formParams.field006 - })].showname; - let arr = (this.moduleName === 'statechange' ? ['2', '4', '5'] : ['0', '1', '2']); - // if (indexOf(arr, formParams.field006) < 0) { - // message.error(`"${formTemp}"${i18n.message.autoGenFormFaild()}`) - // return; - // } - - let content = i18n.confirm.checkGenForm(); - content = content.replace('{param}', `"${formTemp}"`); - this.confirmInfo({ - content, - onOk: () => { - this.setFormData('autoGenForm', this.generateFormFields); - if (this.formTarget.autoGenForm.isFormInit) { - this.generateFormDialogParams.title = i18n.label.plsSetFormName(); - this.generateFormDialogParams.style = { - height: 90 - }; - this.generateFormDialogParams.visible = true; - } - } - }); - } - - @action callAddPath = (values) => { - const formParams = this.formTarget.wfForm.getFormParams(); - let url = '/spa/workflow/static4engine/engine.html#/main/workflowengine/path/addContent?isRoute=true'; - if (formParams.field002 != null && formParams.field002 != '') { - url += `&formId=${formParams.field002}`; - } - const dialog = WeaTools.createDialog({ - title: i18n.label.createWorkflow(), - moduleName: 'workflow', - url:addContentPath(url), - style: { - width: 600, - height: 600 - }, - callback: (datas) => { - this.formTarget.wfForm.updateFields({ - field001: { - value: datas.id.toString(), - valueSpan: datas.name, - valueObj: [{ - id: datas.id.toString(), - name: datas.name - }] - } - }) - this.getFormInfoByWorkflow(datas.id); - }, - onCancel: () => { - - } - }); - dialog.show(); - } - - @action callAddForm = () => { - let url = '/spa/workflow/static4engine/engine.html#/main/workflowengine/form/formSet/addForm?isRoute=true'; - const dialog = WeaTools.createDialog({ - title: i18n.label.createForm(), - moduleName: 'workflow', - url:addContentPath(url), - style: { - width: 600, - height: 600 - }, - callback: (datas) => { - this.formTarget.wfForm.updateFields({ - field002: { - value: datas.id.toString(), - valueSpan: datas.name, - valueObj: [{ - id: datas.id.toString(), - name: datas.name - }] - } - }); - if (datas.inDetail) { - this.callSetFomDetail(datas.id); - } - }, - onCancel: () => { - - } - }); - dialog.show(); - } - - @action callSetFomDetail = (formId) => { - let url = `/spa/workflow/static4engine/engine.html#/main/workflowengine/form/formSet/edidForm?formId=${formId}&isBill=1`; - const dialog = WeaTools.createDialog({ - title: '表单详细设置', - moduleName: 'workflow', - url:addContentPath(url), - style: { - width: 600, - height: 600 - }, - callback: (datas) => {}, - onCancel: () => { - - } - }); - dialog.show(); - } - - dispatchAutoGenForm = () => { - const formParams = this.formTarget.wfForm.getFormParams(); - let params = { - field006: formParams.field006, - usedetail: formParams.usedetail - } - this.formTarget.autoGenForm.validateForm().then(f => { - if (f.isValid) { - Object.assign(params, this.formTarget.autoGenForm.getFormParams()); - this.selectedSubCompany != null && Object.assign(params, { - subcompanyid: this.selectedSubCompany.id - }); - - let content = getLabel('522474','是否创建{param0}{params1}表'); - if(['5', '6', '7'].indexOf(formParams.field006) > -1){ - content = content.replace('{param0}', params.formName).replace('{params1}', ''); - }else{ - content = content.replace('{param0}', params.formName).replace('{params1}', (formParams.usedetail == '1' ? getLabel('17463','明细') : getLabel('6074','主'))); - } - this.confirmInfo({ - content, - onOk: () => { - api.createForm(this.moduleName, params).then(data => { - if (data.status === '1') { - this.generateFormDialogParams.onCancel(); - this.formTarget.wfForm.updateFields({ - field002: { - value: data.formId.toString(), - valueSpan: data.formName, - valueObj: [{ - id: data.formId.toString(), - name: data.formName - }] - } - }) - } else { - message.error(data.message); - } - }, error => {}); - } - }); - } else { - f.showErrors(); - this.showError = new Date().getTime(); - } - }); - } - - saveWf = (entry = false) => { - const params = {} - this.opId != null && Object.assign(params, { - id: this.opId - }) - this.selectedSubCompany != null && Object.assign(params, { - subcompanyid: this.selectedSubCompany.id - }) - this.formTarget.wfForm.validateForm().then(f => { - if (f.isValid) { - if (this.spinning) - return; - this.spinning = true; - !entry && this.dialogParams.onCancel(); - const formParams = this.formTarget.wfForm.getFormParams(); - Object.assign(params, formParams); - api.saveWf(this.moduleName, params).then(data => { - if (data.status === '1') { - entry && this.doEdit({ - id: data.id - }, '2', formParams.field006); - this.table.getDatas(null, 1); - message.success(i18n.message.saveSuccess()); - } else - message.error(data.message); - this.spinning = false; - }, error => { - this.spinning = false; - }); - } else { - f.showErrors(); - this.showError = new Date().getTime(); - } - }); - } - - @action setActiveTab = (key) => { - this.editTabConfig.activeTabKey = key || this.editTabConfig.tabs[0].viewCondition; - const tabIndex = this.getTabIndex(this.editTabConfig.tabs, key); - if (tabIndex < 0) return; - switch (key) { - case '1': - this.getFormData({ - id: this.opId, - subcompanyid: this.selectedSubCompany ? this.selectedSubCompany.id : null - }); - break; - case '2': - this.getField(); - break; - case '3': - this.tableEditDatas = null; - this.getActionSetting(); - break; - case '4': - this.getStateProcSetFlowCheckRuleList(); - break; - default: - break; - } - this.refreshTab = new Date().getTime(); - } - - @action getField = () => { - this.formTarget.fieldFormFields = []; - this.spinning = true; - let params = { - id: this.opId - }; - this.selectedSubCompany != null && Object.assign(params, { - subcompanyid: this.selectedSubCompany.id - }) - api.getField(this.moduleName, params).then(data => { - if (data.status === '1') { - this.setFormData('fieldForm', data.condition); - // this.refreshTab = new Date().getTime(); - } else { - message.error(data.message); - } - this.spinning = false; - }, error => { - this.spinning = false; - }) - } - - convertColumn = (columns) => { - columns.map(col => { - if (indexOf(this.needRender, col.dataIndex) >= 0) { - col.useRecord = true; - this.renderCol[col.dataIndex] = col; - } - }) - return columns; - } - - convertData = (datas, onChange) => { - datas.map((data, i) => { - data.com = data.com || {}; - data.com['fakeInp'] = [
{data.fakeInp}{data.fakeInpHelpful && }
] - data.com['field005'] = this.renderCol['field005'].com; - if (data.field005 === '0') { - data.com['field006'] = this.browsers[0].com; - data.com['field007'] = [(
)]; - } else { - data.com['field006'] = this.browsers[1].com; - delete data.com['field007']; - } - // data.com['field006'] = data.field005 === '0' ? this.browsers[0].com : this.browsers[1].com; - // data.com['field007'] = data.field005 === '0' ? this.browsers[0].com : this.browsers[1].com; - if (onChange && data.field005 != this.tableConfig.datas[i].field005) { - data.field006 = ''; - data.field006span = ''; - } - }) - return datas; - } - - @action getActionSetting = () => { - this.spinning = true; - this.tableConfig.columns.length = 0; - this.tableConfig.datas.length = 0; - api.getActionSetting(this.moduleName, { - id: this.opId - }).then(data => { - if (data.status === '1') { - this.browsers = data.items[0].table.browsers; - const columns = this.convertColumn(data.items[0].table.columns); - const datas = this.convertData(data.items[0].table.datas); - this.tableConfig.columns = columns; - this.tableConfig.datas = datas; - this.refreshTab = new Date().getTime(); - } else { - message.error(data.message); - } - this.spinning = false; - }, error => { - this.spinning = false - }) - } - - doEdit = (params, key, field006) => { - const obj = { - id: params.id, - topage: 'content' - } - this.moduleName != 'statechange' && Object.assign(obj, { - field006 - }) - api.getTab(this.moduleName, obj).then(data => { - if (data.status === '1') { - this.editTabConfig.tabs.length = 0; - data.tabs.map((tab, i) => { - const tabConf = { - color: '#000000', - groupId: tab.key, - title: tab.title, - viewCondition: (i + 1).toString(), - } - this.editTabConfig.tabs.push(tabConf); - }) - this.opId = params.id; - this.dialogParams.title = this.moduleName === 'statechange' ? i18n.label.editStateChangeWf() : i18n.label.editStatesSchedule(); - this.dialogParams.opType = 'showContent'; - this.dialogParams.style = { - width: 700, - height: 500 - } - this.setActiveTab(key); - } else { - message.error(data.message); - } - }, error => {}) - } - - @action save = () => { - let params = { - field001: this.opId - } - switch (this.editTabConfig.activeTabKey) { - case '1': - this.saveWf(); - break; - case '2': - this.saveField() - break; - case '3': - this.saveAction() - break; - case '4': - this.dialogParams.onCancel(); - break; - } - } - - resetOptionsVal = (domkey) => { - this.formTarget.fieldForm.updateFields({ - [domkey]: { - value: '' - } - }) - } - - saveField = () => { - if (this.spinning) - return; - this.formTarget.fieldForm.validateForm().then(f => { - if (f.isValid) { - this.spinning = true; - let params = { - field001: this.opId, - ...this.formTarget.fieldForm.getFormParams() - } - this.selectedSubCompany != null && Object.assign(params, { - subcompanyid: this.selectedSubCompany.id - }) - api.saveField(this.moduleName, params).then(data => { - if (data.status === '1') { - this.dialogParams.onCancel(); - message.success(i18n.message.saveSuccess()); - this.spinning = false; - } else { - message.error(data.message); - this.spinning = false; - } - }, error => { - this.spinning = false; - }) - } else { - f.showErrors(); - this.showError = new Date().getTime(); - } - }); - } - - saveAction = () => { - if (this.spinning) - return; - this.spinning = true; - let params = { - field001: this.opId, - field002: '' - } - const datas = this.tableEditDatas != null ? this.tableEditDatas : this.toJS(this.tableConfig.datas); - datas.map(d => { - delete d.com; - }) - params.field002 = JSON.stringify(datas); - api.saveActionSetting(this.moduleName, params).then(data => { - if (data.status === '1') { - this.dialogParams.onCancel(); - message.success(i18n.message.saveSuccess()); - this.spinning = false; - } else { - message.error(data.message); - this.spinning = false; - } - }, error => { - this.spinning = false; - }) - } - - doChangeStatus = (record) => { - let content = record.field005 === '1' ? i18n.confirm.forbidden() : i18n.confirm.active(); - let params = { - id: record.id, - field005: record.field005 === '1' ? '0' : '1' - }; - this.confirmInfo({ - content, - onOk: () => { - api.changeStatus(this.moduleName, params).then(data => { - if (data.status === '1') { - message.success(i18n.message.opSuccess()); - this.table.getDatas(); - } else { - message.error(data.message); - } - }, error => {}) - } - }); - } - - removeWF = (params) => { - let content; - if (params == null) { - params = { - ids: this.table.selectedRowKeys - } - content = i18n.confirm.removeSelected(); - } else { - content = i18n.confirm.remove(); - } - this.confirmInfo({ - content, - onOk: () => { - api.removeWf(this.moduleName, params).then(data => { - if (data.status === '1') { - message.success(i18n.message.removeSuccess()); - this.table.getDatas(null, 1); - } - }) - } - }); - } - - onWfChange = (ids, names, datas) => { - if (names.value.length === 0) { - this.formTarget.wfForm.updateFields({ - field002: { - value: '', - valueSpan: '', - valueObj: [{ - id: '', - name: '' - }] - } - }) - } else { - this.getFormInfoByWorkflow(names.value); - } - } - - onWfChange1 = (ids, names, datas) => { - if (names.value.length === 0) { - this.formTarget.wfForm.updateFields({ - field001: { - value: '', - valueSpan: '', - valueObj: [{ - id: '', - name: '' - }] - } - }) - } - } - - getFormInfoByWorkflow = (id) => { - api.getFormInfoByWorkflow({ - workflowid: id - }).then(data => { - if (data.status === '1') { - const { - id, - name - } = data; - this.formTarget.wfForm.updateFields({ - field002: { - value: id || '', - valueSpan: name || '', - valueObj: [{ - id: id || '', - name: name || '' - }] - } - }) - } else { - message.error(data.message); - } - }, error => {}) - } - - @action showOpLog = (logSmallType, targetId = '') => { - this.showLog({ - logType: '4', - logSmallType, - targetId - }); - } - - @action onField006Change = v => { - const params = { - field006: v.field006.value - } - api.getProcSetTemplet(this.moduleName, params).then(data => { - if(data.status === '1'){ - this.formTarget.wfForm.updateFields({ - templetfile: data.templetfile, - templetmobilefile: data.templetmobilefile, - templetroute: data.templetroute - }) - }else{ - message.error(data.message); - } - }, error => {}); - } - - //#region 校验规则 - @computed - get tabButtons(){ - this.refreshTab; - if(this.editTabConfig.activeTabKey != "4") - return []; - else{ - const disabled = this.checkRuleTable.selectedRowKeys.length == 0; - return [ - this.getProcSetCheckRule()} />, - this.deleteCheckRule()} disabled={disabled} /> - ] - } - } - - @action getStateProcSetFlowCheckRuleList = () => { - api.getStateProcSetFlowCheckRuleList({attid: this.opId}).then(data => { - if(data.status == 1){ - this.checkRuleTable = new TableStore(); - this.checkRuleTable.getDatas(data.sessionkey); - }else{ - message.error(data.message); - } - }) - } - - checkRuleEdit = false; - // kqtype; - // msglist; - // fieldMap; - // related; - - get checkLevelKey(){ - let key = ''; - if(has(this.fieldMap || {}, 'check_level')) - key = this.fieldMap.check_level; - return key; - } - - get checkMsglKey(){ - let key = ''; - if(has(this.fieldMap || {}, 'check_message')) - key = this.fieldMap.check_message; - return key; - } - - duplicateMsg; - getDuplicateMsg = v => { - let msg = ''; - if(has(this.duplicateMsg || {}, `check_level_${v}`)) - msg = this.duplicateMsg[`check_level_${v}`]; - return msg; - } - - get relatedRander(){ - const r = {}; - Object.keys(this.related || {}).map((key, index) => { - const rela = this.related[key]; - Object.assign(r, { - [key]: (field, textAreaProps, form, formParams) => { - let flag = false; - Object.keys(rela || {}).map(key => { - const v = rela[key].split(','); - flag = flag || (has(formParams, key) && v.indexOf(formParams[key]) > -1); - }) - if(!flag) return null; - return ( - - ) - } - }) - }) - return r; - } - - ruleid; - @observable refreshCheckRuleForm = new Date().getTime(); - @action getProcSetCheckRule = (rule_type_uuid, id) => { - this.ruleid = id; - const params = {attid: this.opId}; - rule_type_uuid && Object.assign(params, {rule_type_uuid}); - if(id){ - Object.assign(params, {id}); - this.checkRuleEdit = true; - }else - this.checkRuleEdit = false; - api.getProcSetCheckRule(params).then(data => { - if(data.status == '1'){ - const {msglist, kqtype, field_map: fieldMap, msg: duplicateMsg, related} = data; - Object.assign(this, { - msglist, - kqtype, - fieldMap, - duplicateMsg, - related - }); - this.setFormData('checkRuleForm', data.condition); - Object.assign(this.checkRuleFormItemRender, { - [this.checkLevelKey]: (field, textAreaProps, form, formParams) => { - return ( - this.setDuplicateMessage(v[this.checkLevelKey].value)}/> - ) - }, - ...this.relatedRander - }); - Object.assign(this.childrenComponents, { - [this.checkMsglKey]: () => { - let coms = []; - this.msglist && this.msglist.map((msgInfo, index) => { - coms.push( - -
-
- ); - }) - return [ - { - com:
{coms}
, - col: 1 - } - ]; - } - }) - if (this.formTarget.checkRuleForm.isFormInit){ - if(this.checkRuleDialogVisible) - this.refreshCheckRuleForm = new Date().getTime(); - else - this.checkRuleDialogVisible = true; - } - }else{ - message.error(data.message); - } - }) - } - - @action doEditCheckRule = record => { - this.getProcSetCheckRule(null, record.id); - } - - @observable checkRuleDialogVisible = false; - @computed get checkRuleDialogDialogProps(){ - let buttons = []; - return { - ...this.dialogPropsDef, - title: !this.checkRuleEdit ? i18n.label['516691']() : i18n.label['516692'](), - style: { - width: 700, - height: 405 - }, - onCancel: () => { - this.checkRuleDialogVisible = false; - }, - visible: this.checkRuleDialogVisible, - buttons, - moreBtn: {datas: this.convertToMenus(buttons)}, - key: new Date().getTime() - } - } - - errRef = {}; - checkRuleFormItemRender = { - rule_type_uuid: (field, textAreaProps, form, formParams) => { - return ( - this.getProcSetCheckRule(v.rule_type_uuid.value)}/> - ) - }, - frequency_rule: (field, textAreaProps, form, formParams) => { - const { fieldMap } = form; - return ( -
-
- this.getProcSetCheckRule(v.rule_type_uuid.value)}/> -
-
-
{fieldMap['frequency_rule_count'].label}
-
- this.errRef['frequency_rule_count'] = dom}> - - -
-
{i18n.label['18929']()}
-
-
- ) - }, - frequency_rule_count: (field, textAreaProps, form, formParams) => null, - } - - childrenComponents = {} - - setHideFormValid = () => { - window.e9HideFormFieldKeys = []; - const formParams = this.formTarget.checkRuleForm.getFormParams(); - Object.keys(this.related || {}).map(key => { - const rela = this.related[key] || {}; - let flag = true; - Object.keys(rela).map(key => { - const v = rela[key].split(','); - if(has(formParams, key) && v.indexOf(formParams[key]) > -1) - flag = flag && true; - else - flag = false; - }) - !flag && window.e9HideFormFieldKeys.push(key); - }) - } - - @action saveCheckRule = () => { - this.setHideFormValid(); - this.formTarget.checkRuleForm.validateForm().then(f => { - if (f.isValid) { - const params = this.formTarget.checkRuleForm.getFormParams(); - Object.assign(params, { - attid: this.opId, - kqtype: this.kqtype - }) - this.ruleid && Object.assign(params, {id: this.ruleid}); - api.saveStateProcCheckRule(params).then(data => { - if (data.status === '1') { - message.success(i18n.message.opSuccess()); - this.getStateProcSetFlowCheckRuleList(); - this.checkRuleDialogVisible = false; - } else { - message.error(data.message); - } - }, error => {}); - } else { - f.showErrors(); - const fields = this.formTarget.checkRuleForm.fieldMap; - [...Object.keys(fields)].map(k => { - const e = this.formTarget.checkRuleForm.getError(fields[k]); - if (e != null && e != "") { - console && console.debug(e); - this.errRef[k] && this.errRef[k].showError(); - - } - }); - this.showError = new Date().getTime(); - } - }); - } - - setDuplicateMessage = v => { - this.formTarget.checkRuleForm.updateFields({ - [this.checkMsglKey]: { - value: this.getDuplicateMsg(v) - } - }) - } - - @action deleteCheckRule = params => { - let content; - if (params == null) { - params = { - ids: this.checkRuleTable.selectedRowKeys - } - content = i18n.confirm.deleteSelected(); - } else { - content = i18n.confirm.deleteSelected(); - } - this.confirmInfo({ - content, - onOk: () => { - api.delStateProcCheckRule(params).then(data => { - if (data.status === '1') { - message.success(i18n.message.removeSuccess()); - this.checkRuleTable.getDatas(null, 1); - } - }) - } - }); - } - - @action getDetachOperatelevel = v => { - shiftapi.getDetachOperatelevel({subcompanyid: v.field004.value}).then(data => { - if(data.status == 1){ - this.canAdd = !(data.operatelevel < 1); - }else{ - message.error(data.message); - } - }) - } - //#endregion - /********************* action list *********************/ -} - -export const hrmWorkflowSetting = new HrmWorkflowSetting(); \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/applicationSettings.less b/pc4backstage/hrmAttendance/style/applicationSettings.less deleted file mode 100644 index f5c88a4..0000000 --- a/pc4backstage/hrmAttendance/style/applicationSettings.less +++ /dev/null @@ -1,11 +0,0 @@ -.hrm-kq-application-settings{ - height: 100%; - - .content{ - padding: 40px 0 20px 35%; - - .setLineHeight{ - padding: 3px 0; - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/attendanceSynSetting.less b/pc4backstage/hrmAttendance/style/attendanceSynSetting.less deleted file mode 100644 index d201f6c..0000000 --- a/pc4backstage/hrmAttendance/style/attendanceSynSetting.less +++ /dev/null @@ -1,40 +0,0 @@ -.attendanceSynSetting{ - .syncForm{ - width: 680px; - margin: auto; - padding-bottom: 15px; - - .tips{ - line-height: 30px; - margin-left: 10px; - } - - .dateRange{ - &>div{ - float: left; - margin-right: 10px; - &:first-child{ - width: 200px; - } - } - .btnGroup{ - &>button{ - float: left; - margin-right: 10px; - } - - .tips{ - line-height: 30px; - float: left; - } - } - } - } - - .explain{ - margin-left: 10px; - &>div{ - margin-bottom: 10px; - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/common.css b/pc4backstage/hrmAttendance/style/common.css deleted file mode 100644 index 88a9993..0000000 --- a/pc4backstage/hrmAttendance/style/common.css +++ /dev/null @@ -1,95 +0,0 @@ -.hrm_module_container { - width: 100%; - height: 100%; -} -.hrm-import-circle { - width: 20px; - height: 20px; - padding-left: 6px; - background-color: #D8D8D8; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - -o-border-radius: 10px; - border-radius: 10px; -} -.tabBtn { - cursor: pointer; - font-size: 20px; - position: relative; - top: 6px; - right: 15px; -} -.tabBtn-disable { - color: #D8D8D8; - cursor: not-allowed; -} -.tabBtn-active { - color: #34A2FF; -} -.tabPane { - position: absolute; - top: 100px; - bottom: 0; - width: 100%; -} -.tabPane-dialog, -.tabPane-include { - top: 47px; -} -.tabPane-single { - bottom: 60px; -} -.tabPane .formItem { - width: 100%; -} -.tabPane .formItem > div { - float: left; - margin-right: 10px; -} -.tabPane .formItem .oneColInput { - width: 40%; -} -.tabPane .formItem .oneColInput-dropdown { - width: 120px; -} -.tabPane .formItem .switch { - width: 50px; -} -.tabPane .formItem .multi > div { - float: left; - height: 30px; - line-height: 30px; - margin-right: 3px; -} -.tabPane .formItem .multi .num { - width: 60px; -} -.tabPane .formItem .multi .refreshVerificationCode { - margin-left: 10px; - cursor: pointer; - font-size: 16px; - padding-top: 3px; -} -.tabPane .formItem .multi img { - cursor: pointer; -} -.formInfo { - height: 100%; -} -.rightLayOut { - width: 100%; - height: 100%; -} -@media screen and (max-height: 700px) { - .tabPane { - top: 93px; - } - .tabPane-dialog, - .tabPane-include { - top: 47px; - } -} -.horLayout > div { - float: left; -} diff --git a/pc4backstage/hrmAttendance/style/common.less b/pc4backstage/hrmAttendance/style/common.less deleted file mode 100644 index 5d87bb2..0000000 --- a/pc4backstage/hrmAttendance/style/common.less +++ /dev/null @@ -1,217 +0,0 @@ -.hrm_module_container{ - width: 100%; - height: 100%; -} - -.hrm-import-circle{ - width: 20px; - height: 20px; - padding-left: 6px; - background-color: #D8D8D8; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - -o-border-radius: 10px; - border-radius: 10px; -} - -.tabBtn{ - cursor: pointer; - // padding:4px; - font-size: 20px; - position: relative; - top: 6px; - right: 15px; - &-disable{ - color:#D8D8D8; - cursor: not-allowed; - } - &-active{ - color:#34A2FF; - } -} - -.tabPane{ - position: absolute; - top: 100px; - bottom: 0; - width: 100%; - - &-dialog, &-include{ - top: 47px; - } - &-single { - bottom: 60px; - } - - .formItem{ - width: 100%; - &>div{ - float: left; - margin-right: 10px; - } - .oneColInput{ - width: 40%; - &-dropdown{ - width: 120px; - } - } - .switch{ - width: 50px; - } - .multi{ - &>div{ - float: left; - height: 30px; - line-height: 30px; - margin-right: 3px; - } - .num{ - width: 60px; - } - .refreshVerificationCode{ - margin-left: 10px; - cursor: pointer; - font-size: 16px; - padding-top: 3px; - } - img{ - cursor: pointer; - } - } - } -} - -.formInfo{ - height: 100%; -} - -.rightLayOut{ - width: 100%; - height: 100%; -} - -@media screen { - @media (max-height: 700px) { - .tabPane { - top: 93px; - &-dialog, &-include{ - top: 47px; - } - } - } -} - -.horLayout{ - &>div{ - float: left; - } -} - -.hrm-special-form{ - padding: 0 !important; - margin-bottom: 0 !important; -} - -.hrm-holiday-rule-form-input{ - width: 112% -} - -.hrm-holiday-rule-form-input .wea-input-number{ - width:75px !important; -} - -.hrm-holiday-rule-form-input .wea-field-readonly{ - width:75px !important; -} - -.hrm-travel-rule-form-input{ - width: 112% -} - -.hrm-travel-rule-form-input .wea-input-number{ - width:100px !important; -} - -.hrm-travel-timeselection, .hrm-exit-timeselection{ - .wea-select{ - width:180px; - } - - .name-def{ - color: #2db7f5; - margin-left: 5px; - cursor: pointer; - } -} - -.hrm-customized-input{ - padding: 4px 0; -} - -.hrm-customized-input .wea-input-number{ - width: 60px !important; - margin: 0px 5px; -} - -.hrm-customized-input-mix .wea-input-number{ - width: 50px !important; - margin: 0 10px 0 0; -} - -.holiday-link{ - cursor: pointer; - color: #2D7AD8; -} - -.holiday-link:hover{ - color: #2DB7F5; -} - -.hrm-del-icon{ - cursor: pointer; - color: #999; -} - -.hrm-del-icon:hover{ - color: #333; -} - -.hrm-customize-input .wea-input-number{ - width: 80px; -} - -.hrm-select-short .wea-select{ - width:74px !important; -} - -.hrm-overtime-input{ - width: 140% -} - -.hrm-overtime-input .wea-input-number{ - width:60px !important; -} - -.amap-sug-result{ - z-index: 1050 !important; -} - -.hrm-over-flow { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -.hrmDialog{ - .ant-modal-body{ - .wea-right-menu-wrap{ - .ant-spin-nested-loading{ - height: 100%; - .ant-spin-container{ - height: 100%; - } - } - } - } -} diff --git a/pc4backstage/hrmAttendance/style/groupSetting.css b/pc4backstage/hrmAttendance/style/groupSetting.css deleted file mode 100644 index bcaa884..0000000 --- a/pc4backstage/hrmAttendance/style/groupSetting.css +++ /dev/null @@ -1,78 +0,0 @@ -.groupSetting .formComponent .wea-search-group .wea-form-cell { - padding: 0px; -} -.groupSetting .formComponent .wea-search-group .wea-form-item { - padding: 8px; -} -.groupSetting .formComponent .cust > div { - float: left; -} -.groupSetting .formComponent .cust .basic { - width: 300px; -} -.groupSetting .formComponent .cust .basicSetting { - width: 80px; -} -.groupSetting .formComponent .cust .child { - line-height: 30px; - margin-right: 10px; -} -.groupSetting .formComponent .cust .child > div { - float: left; -} -.groupSetting .formComponent .cust .child .lbl { - padding-left: 5px; - padding-right: 5px; -} -.groupSetting .formComponent .cust .child .lbl1 { - padding-left: 0px; - padding-right: 10px; -} -.groupSetting .formComponent .cust .child .lbl-info { - padding-left: 5px; - padding-right: 5px; - color: #999; -} -.groupSetting .formComponent .cust .child .select { - width: 80px; -} -.groupSetting .formComponent .cust .child .restTime { - width: 100px; -} -.groupSetting .formComponent .cust .child .restTimeInfo { - color: red; - background-color: #FDDBD9; - border-radius: 5px; - padding-left: 5px; - padding-right: 5px; - line-height: 20px; - margin: 5px; -} -.groupSetting .formComponent .cust .child .minutes { - margin-left: 10px; -} -.groupSetting .formComponent .cust .child .minutes .wea-input-normal .ant-input-wrapper { - width: 40px; - float: left; -} -.groupSetting .formComponent .cust .child .minutes .wea-input-normal .input-tip { - float: left; - position: relative; - top: 0px; - left: 0px; - width: auto; - margin-left: 5px !important; -} -.groupSetting .formComponent .calculate { - display: table-row; - line-height: 30px; - font-size: 12px; - color: #999; -} -.groupSetting .formComponent .times { - border: 1px solid #E4E4E4; - background: #F8F8F8; -} -.groupSetting .formComponent .addRule { - padding: 8px; -} diff --git a/pc4backstage/hrmAttendance/style/groupSetting.less b/pc4backstage/hrmAttendance/style/groupSetting.less deleted file mode 100644 index 74859b3..0000000 --- a/pc4backstage/hrmAttendance/style/groupSetting.less +++ /dev/null @@ -1,459 +0,0 @@ -.formComponent{ - .wea-search-group .wea-form-cell{ - padding: 0px; - } - - .wea-search-group .wea-form-item{ - padding: 8px; - } - - .basic { - width: 300px; - } - - .ipscope{ - height: 30px; - line-height: 30px; - } - - .cust{ - width: 100%; - &>div{ - float: left; - } - - .ip_range{ - float: none; - margin-bottom: 10px; - } - - .ip_range:last-child{ - margin-bottom: 0px; - } - - .basic { - width: 300px; - - .serialidsBrowser{ - .wea-associative-search .ant-select-selection--multiple .ant-select-selection__choice{ - padding: 0px 10px 0px 10px; - border-radius: 5px; - margin: 3px; - &>div{ - height: 30px; - line-height: 30px; - - a, span{ - color: #fff; - cursor: pointer; - } - } - } - - li:nth-child(10n+1){ - background: #47A9FC; - } - li:nth-child(10n+2){ - background: #70C06F; - } - li:nth-child(10n+3){ - background: #F6D65C; - } - li:nth-child(10n+4){ - background: #EA744D; - } - li:nth-child(10n+5){ - background: #4EBCCC; - } - li:nth-child(10n+6){ - background: #EA5C85; - } - li:nth-child(10n+7){ - background: #8F72F2; - } - li:nth-child(10n+8){ - background: #7297F2; - } - li:nth-child(10n+9){ - background: #CA4DE4; - } - li:nth-child(10n){ - background: #A7CC62; - } - } - } - - .basicSetting{ - width: 80px; - } - - .child { - line-height: 30px; - margin-right: 10px; - div{ - float: left; - .wea-switch{ - margin-top: 0px; - } - } - - .lbl{ - padding-left: 5px; - padding-right: 5px; - - &1{ - padding-left: 0px; - padding-right: 10px; - } - - &-info{ - padding-left: 5px; - padding-right: 5px; - color: #999; - } - } - - .select{ - width: 80px; - } - - .inputNumber{ - width: 55px; - } - } - - .child-checkbox{ - .wea-checkbox{ - margin: 0px; - padding-top: 3px; - } - .ant-checkbox+span, .ant-checkbox-wrapper+span{ - margin-right: 0px; - } - - .wea-helpful-tip{ - top: 3px !important; - } - } - - .opBtns{ - float: right; - line-height: 30px; - height: 30px; - - .btn{ - cursor: pointer; - font-size: 20px; - float: right; - margin-right: 10px; - padding-top: 10px; - - &:first-child{ - margin-right: 0px; - } - - &-disable{ - color:#D8D8D8; - cursor: not-allowed; - } - &-active{ - color:#34A2FF; - } - } - } - } -} - -.serialSetting{ - .wea-select{ - width: 328px; - } -} - -.workdaySetting{ - padding: 8px; - &-header{ - width: 100%; - height: 30px; - line-height: 30px; - - .title{ - float: left; - } - .multiSetting{ - float: right; - } - } - - .table{ - margin-top: 8px; - border: 1px solid #e9e9e9; - border-bottom: none; - - .ant-table-thead>tr>th{ - border-bottom: 1px solid #e9e9e9; - } - } -} - -.kqType{ - padding-left: 8px; - padding-right: 8px; - border-bottom: 1px solid #e9e9e9; - height: 40px; - line-height: 30px; - margin-top: 20px; - .title{ - float: left; - } - .buttonBar{ - float: right; - button{ - margin-left: 10px; - } - .upload{ - float: right; - .wea-upload{ - padding: 0px; - } - } - } -} - -.listSetting{ - padding: 8px; - &-header{ - width: 100%; - height: 40px; - line-height: 40px; - border: 1px solid #e9e9e9; - border-bottom: none; - - .title{ - float: left; - padding-left: 10px; - } - .btn{ - cursor: pointer; - font-size: 20px; - float: right; - margin-right: 10px; - padding-top: 10px; - - &:first-child{ - margin-right: 0px; - } - - &-disable{ - color:#D8D8D8; - cursor: not-allowed; - } - &-active{ - color:#34A2FF; - } - } - } - - .table{ - // border: 1px solid #e9e9e9; - // border-bottom: none; - - .wea-new-table{ - &>div{ - &>div:first-child{ - border: 1px solid #e9e9e9; - border-bottom: none; - } - } - } - - .ant-table-thead>tr>th{ - border-bottom: 1px solid #e9e9e9; - } - } -} - -.dCom{ - width: 100%; - height: 100%; -} - -.groupSetting{ - .dCom{ - width: 100%; - height: 100%; - } - - // .formComponent; - // .workdaySetting; - // .kqType; - // .listSetting; -} - -.shiftChangeConfirm{ - &>div{ - line-height: 30px; - margin-bottom: 10px; - } - .title{ - } - - .detail{ - max-height: 300px; - border: 1px solid #ddd; - overflow-y: auto; - margin-bottom: 5px; - .name{ - border-bottom: 1px solid #ddd; - padding: 0px 16px; - &:last-child{ - border-bottom: none; - } - } - } - - .tips{ - color: #999; - font-size: 12px; - } -} - -.groupSetting .wea-left-tree-search .wea-input-focus { - left: 80px; - width: 150px; - } - .groupSetting .wea-left-tree-search .wea-left-tree-search-label{ - width: 200px; - } - - - - .ant-modal .ant-modal-content .ant-modal-body .serialidsBrowser { - .wea-select{ - float: left; - // display: inline-block - width: 300px; - } - - - } - .ant-modal .ant-modal-content .ant-modal-body .Computational_Method{ - margin-left: 20px; - margin-top: 15px; - margin-right: 15px; - } -.ant-modal .ant-modal-content .ant-modal-body { - .summation{ - p{ - margin-top:10px; - font-family: 'Regular'; - font-size: 12px; - } - .img1{ - width: 700px; - height: 150px; - margin: 10px 49px 10px 50px; - } - .imgExplain1{ - margin: 15px 49px 10px 50px; - span{ - display: inline-block; - font-family: 'Regular'; - font-size: 12px; - } - .tuli{ - margin-right: 30px; - } - .time{ - margin-right: 30px; - padding-left: 10px; - border-left: solid 1px #B0B0B0; - } - .duration{ - border-left: solid 50px #4680F4; - padding-left: 10px; - } - } - .topbar1{ - height: 50px; - line-height: 50px; - padding-left: 10px; - border-left: 5px solid rgb(97, 169, 245); - background-color:'#EBEBEB'; - font-family:"PingFangSC-Semibold"; - font-size:16px; - } - } -.double_summation { - p{ - margin-top:10px; - font-family: 'Regular'; - font-size: 12px; - } - .topbar2{ - height: 50px; - line-height: 50px; - padding-left: 10px; - border-left: 5px solid rgb(97, 169, 245); - background-color:'#EBEBEB'; - font-family:"Semibold"; - font-size:16px; - } - .img2{ - width: 700px; - height: 150px; - margin: 10px 49px 10px 50px; - } - .imgExplain2{ - margin: 15px 49px 10px 50px; - span{ - display: inline-block; - font-family: 'Regular'; - font-size: 12px; - } - .tuli{ - margin-right: 30px; - } - .time{ - margin-right: 30px; - padding-left: 10px; - border-left: solid 1px #B0B0B0; - } - .duration{ - margin-right: 30px; - border-left: solid 50px #4680F4; - padding-left: 10px; - } - .rest{ - margin-right: 30px; - border-left: solid 50px #F8914B; - padding-left: 10px; - } - .nouse{ - border-left: solid 50px #B0B0B0; - padding-left: 10px; - } - } - } -} - -.hrm_attendance_location_range_setting{ - width: 100%; - &>div{ - float: left; - } - .location_range_input{ - width: 90px; - margin-right: 10px; - } - .location_range_tip{ - width: calc(~"100% - 110px"); - line-height: 30px; - } -} - -.hrm_attendance_location_range_address{ - .wea-form-item-wrapper{ - table-layout: fixed; - } -} diff --git a/pc4backstage/hrmAttendance/style/holidaySetting.css b/pc4backstage/hrmAttendance/style/holidaySetting.css deleted file mode 100644 index 1a2d012..0000000 --- a/pc4backstage/hrmAttendance/style/holidaySetting.css +++ /dev/null @@ -1,77 +0,0 @@ -.hrm-holiday-condition-group{ - height: 50px; - border-bottom: 1px solid #EAEAEA; -} - -.hrm-holiday-tab{ - float: left; - padding: 16px; -} - -.hrm-holiday-count{ - float: right; - padding: 16px; -} - -.hrm-holiday-count-item{ - float: left; -} - -.hrm-holiday-color-icon{ - float: left; - padding: 5px; -} - -.linear-gradient-0{ - background-image: -webkit-linear-gradient(90deg, #94eaf7, #04aaad); - background-image: -o-linear-gradient(90deg, #94eaf7, #04aaad); - background-image: -moz-linear-gradient(90deg, #94eaf7, #04aaad); - background-image: linear-gradient(90deg, #94eaf7, #04aaad); -} - -.linear-gradient-1{ - background-image: -webkit-linear-gradient(90deg, #facae0, #f51313); - background-image: -o-linear-gradient(90deg, #facae0, #f51313); - background-image: -moz-linear-gradient(90deg, #facae0, #f51313); - background-image: linear-gradient(90deg, #facae0, #f51313); -} - -.linear-gradient-2{ - background-image: -webkit-linear-gradient(90deg, #82c1f7, #4f3be8); - background-image: -o-linear-gradient(90deg, #82c1f7, #4f3be8); - background-image: -moz-linear-gradient(90deg, #82c1f7, #4f3be8); - background-image: linear-gradient(90deg, #82c1f7, #4f3be8); -} - -/* .hrmHolidySettingNew #wea-new-top-wapper #wea-new-top-content #wea-left-right-layout { - -} */ -#hrmHolidySettingNew .wea-left-right-layout-left .wea-left-tree-search{ - width: 100%; - height: 46px; - line-height: 46px; - padding: 0 14px 0 76px; - position: relative; -} -#hrmHolidySettingNew .wea-left-right-layout-left .wea-left-tree-search .wea-input-focus { - height: 28px; - line-height: 28px; - position: absolute; - left: 170px; - top: 5px; - width: 150px; -} -#hrmHolidySettingNew .wea-left-right-layout-left .wea-left-tree-search .wea-left-tree-search-label{ - display: inline-block; - padding-left: 14px; - position: absolute; - left: 0; - top: 0; - cursor: pointer; - font-weight: 600; - width: 200px; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/icon.less b/pc4backstage/hrmAttendance/style/icon.less deleted file mode 100644 index c8766bd..0000000 --- a/pc4backstage/hrmAttendance/style/icon.less +++ /dev/null @@ -1,139 +0,0 @@ -@font-face { - font-family: 'icon-Human-resources'; - src: url('/font/hrm/icon-Human-resources.eot?yqeh07'); - src: url('/font/hrm/icon-Human-resources.eot?yqeh07#iefix') format('embedded-opentype'), - url('/font/hrm/icon-Human-resources.ttf?yqeh07') format('truetype'), - url('/font/hrm/icon-Human-resources.woff?yqeh07') format('woff'), - url('/font/hrm/icon-Human-resources.svg?yqeh07#icon-Human-resources') format('svg'); - font-weight: normal; - font-style: normal; -} - -[class^="icon-Human"], [class*=" icon-Human"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: 'icon-Human-resources' !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-Human-resources-abnormal-small2:before { - content: "\e900"; - color: #606060; -} -.icon-Human-resources-check:before { - content: "\e9c6"; -} -.icon-Human-resources-leave:before { - content: "\e9c7"; -} -.icon-Human-resources-all .path1:before { - content: "\e930"; - color: rgb(34, 23, 20); -} -.icon-Human-resources-all .path2:before { - content: "\e933"; - margin-left: -1em; - color: rgb(0, 0, 0); -} -.icon-Human-resources-all .path3:before { - content: "\e934"; - margin-left: -1em; - color: rgb(0, 0, 0); -} -.icon-Human-resources-all .path4:before { - content: "\e935"; - margin-left: -1em; - color: rgb(0, 0, 0); -} -.icon-Human-resources-IP .path1:before { - content: "\e913"; - color: rgb(34, 23, 20); -} -.icon-Human-resources-IP .path2:before { - content: "\e92e"; - margin-left: -1em; - color: rgb(0, 0, 0); -} -.icon-Human-resources-IP .path3:before { - content: "\e92f"; - margin-left: -1em; - color: rgb(0, 0, 0); -} -.icon-Human-resources-micro-blog:before { - content: "\e92d"; -} -.icon-Human-resources-Mobile-sign-in:before { - content: "\e92c"; -} -.icon-Human-resources-Sign-in-information:before { - content: "\e92b"; -} -.icon-Human-resources-Sign-out:before { - content: "\e92a"; -} -.icon-Human-resources-abnormal-small .path1:before { - content: "\e9c5"; - color: rgb(34, 23, 20); -} -.icon-Human-resources-abnormal-small .path2:before { - content: "\e9c9"; - margin-left: -1em; - color: rgb(35, 24, 21); -} -.icon-Human-resources-abnormal:before { - content: "\e902"; -} -.icon-Human-resources-Absenteeism .path1:before { - content: "\e903"; - color: rgb(34, 23, 20); -} -.icon-Human-resources-Absenteeism .path2:before { - content: "\e904"; - margin-left: -1em; - color: rgb(62, 58, 57); -} -.icon-Human-resources-Absenteeism .path3:before { - content: "\e905"; - margin-left: -1em; - color: rgb(62, 58, 57); -} -.icon-Human-resources-adjustment:before { - content: "\e906"; -} -.icon-Human-resources-Annual-leave:before { - content: "\e907"; -} -.icon-Human-resources-business-travel:before { - content: "\e908"; -} -.icon-Human-resources-late:before { - content: "\e909"; -} -.icon-Human-resources-Leave-early:before { - content: "\e90b"; -} -.icon-Human-resources-normal:before { - content: "\e90d"; -} -.icon-Human-resources-overtime-small:before { - content: "\e90f"; -} -.icon-Human-resources-overtime:before { - content: "\e910"; -} -.icon-Human-resources-sick-leave:before { - content: "\e911"; -} -.icon-Human-resources-work:before { - content: "\e912"; -} - - diff --git a/pc4backstage/hrmAttendance/style/import.css b/pc4backstage/hrmAttendance/style/import.css deleted file mode 100644 index ee4ec9b..0000000 --- a/pc4backstage/hrmAttendance/style/import.css +++ /dev/null @@ -1,62 +0,0 @@ -.hrm-import-wrap{ - width: 90%; - height: 100%; - margin-left: 5%; - padding-top: 30px; -} - -.hrm-import-table-th .ant-table-tbody>tr>td, .ant-table-thead>tr>th{ - padding: 8px 8px; - color: #666; -} - -.hrm-import-table-th .ant-table-thead>tr>th{ - background-color: #F0F6F6; -} - -.hrm-import-table-th .ant-table{ - border-radius: 0; -} - -.hrm-import-table-th .ant-table table{ - border-radius: 0; -} - -.hrm-import-loading .ant-spin.ant-spin-show-text .ant-spin-text{ - float: right; - margin-left: 20px; - padding-top: 2px -} - -.hrm-import-error-tip{ - width: 30px; - height: 30px; - border-radius: 25px; - padding: 6px; - margin-right: 10px; - display: inline-block; - background-color: rgb(255, 0, 0); -} - -.hrm-import-dialog .wea-new-table table td.noWrap{ - overflow: inherit; - white-space: normal; -} - -.hrm-import-dialog .wea-new-table table .ant-table-row td{ - overflow: inherit; - white-space: normal; -} - - -.hrm-import-ant-table .ant-table-tbody>tr>td, .ant-table-thead>tr>th{ - padding: 8px 8px; -} - -.hrm-import-link{ - color: #B4B4B4; -} - -.hrm-import-link:hover{ - color: #FFF; -} diff --git a/pc4backstage/hrmAttendance/style/index.js b/pc4backstage/hrmAttendance/style/index.js deleted file mode 100644 index 0156b0e..0000000 --- a/pc4backstage/hrmAttendance/style/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import './icon.less' -import "./common.less" diff --git a/pc4backstage/hrmAttendance/style/init.less b/pc4backstage/hrmAttendance/style/init.less deleted file mode 100644 index 486cb72..0000000 --- a/pc4backstage/hrmAttendance/style/init.less +++ /dev/null @@ -1,165 +0,0 @@ -.hrm-init{ - &-form{ - position: absolute; - width: 480px; - left: 50%; - margin-left: -240px; - top: 20%; - &-datepicker{ - input{ - min-width: 271px !important; - } - } - &-select .wea-select{ - width: 288px - } - &-icon{ - position: absolute; - font-size: 20px; - top: 5px; - } - - &-label{ - margin-left: 30px; - } - - .guide{ - position: relative; - bottom: 47px; - height: 50px; - right: -470px; - line-height: 50px; - color: #333; - .icon{ - font-size: 24px; - padding-top: 2px; - } - .title{ - } - .wrapper{ - height: 100%; - cursor: pointer; - } - .wrapper:hover{ - color: #2DB7F5 - } - .float{ - float: left; - } - - .slide-modal{ - position: relative; - height: 40px; - line-height: 40px; - } - - .slide-modal-title{ - display: block; - float: left; - position: absolute; - left: 10%; - background-color: #FFF; - padding: 0 10px; - } - - .slide-modal-title i{ - margin-right: 10px; - color: #fa0; - } - - .slide-modal-content{ - clear: both; - } - - .slide-modal-content p{ - line-height: 30px; - padding: 0 10px; - } - - .line{ - float: left; - border-top: 1px solid #DDD; - margin-top: 20px; - width: 98%; - margin-left: 1%; - } - - .header-title{ - position: relative; - &-icon{ - position: absolute; - top: 2px; - left: 10px; - display: inline-block; - width: 30px; - cursor: pointer; - } - } - } - } - &-form .ant-col-6{ - width: 175px - } - &-form .ant-col-18{ - width: 300px - } - - &-btnparent{ - position: relative; - &-button{ - width: 448px; - height: 50px; - margin-top: 20px; - font-size: 18px !important - } - } - - &-analysis{ - position: absolute; - width: 800px; - left: 50%; - margin-left: -400px; - top: 10%; - &-item{ - padding: 0px 28px; - background-color: rgb(249, 249, 249); - margin-top: 10px; - border-radius: 5px; - line-height: 50px; - height: 50px; - &-index{ - position: absolute; - font-size: 18px; - top: 2px; - } - &-name{ - margin-left: 40px; - display: inline-block; - width: 140px; - } - &-icon{ - position: absolute; - left: 215px; - top: 1px; - font-size: 16px; - } - &-desc{ - display: inline; - position: absolute; - left: 270px; - width: 200px; - } - &-link{ - position: absolute; - left: 550px; - &-a{ - margin-left: 10px; - } - } - } - } - - - - -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/kqMonthReportSetting.less b/pc4backstage/hrmAttendance/style/kqMonthReportSetting.less deleted file mode 100644 index 95502fd..0000000 --- a/pc4backstage/hrmAttendance/style/kqMonthReportSetting.less +++ /dev/null @@ -1,8 +0,0 @@ -.kqMonthReportSetting{ - width: 100%; - height: 100%; - - .wea-tab .wea-search-tab{ - padding-right: 20px; - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/overtimeRule.less b/pc4backstage/hrmAttendance/style/overtimeRule.less deleted file mode 100644 index 4abcb23..0000000 --- a/pc4backstage/hrmAttendance/style/overtimeRule.less +++ /dev/null @@ -1,215 +0,0 @@ -.overtimeForm { - .startTime { - width: 137%; - - &>span { - display: inline-block; - vertical-align: top; - line-height: 44px; - width: 18%; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - } - - &>div { - display: inline-block; - padding-left: 10px; - width: 82%; - } - - .wea-input-number { - width: 50px; - margin: 0 13px; - } - - .beforeWork { - position: relative; - } - - .minimumLen { - &>span:last-child { - color: #999; - margin-left: 10px - } - } - - .ant-row { - display: inline-block; - vertical-align: middle; - } - - } - - .transToBalance { - margin-left: 10px - } - - .paidLeaveEnableType { - width: 120%; - - .lenOfOvertime-lenOfLeave { - .wea-input-number { - width: 60px; - margin: 0 5px; - } - - &>span:last-child { - color: #999; - margin-left: 10px - } - } - - .paidLeaveEnableDefaultType { - margin: 5px 0; - width: 300px; - - - } - } - - .paidLeaveEnableType2, - .paidLeaveEnableType3, - .paidLeaveEnableType1 {} - - .wea-input-number { - width: 50px; - margin: 0 10px; - } - - .ant-time-picker { - width: 90px; - margin: 0 5px - } - - .overtimeCompensation { - padding: 10px; - border: 1px solid #ddd; - margin: 5px 0; - - .overtimeError{ - .error-tip{ - width: 200px; - } - } - - .wea-input-number { - width: 60px; - margin: 0 10px; - } - - p { - padding: 5px 0; - - .del { - margin-left: 10px; - color: #4D7AD8; - cursor: pointer; - } - } - - - &>span { - color: #4D7AD8; - cursor: pointer; - - span { - margin-left: 5px - } - - } - - .required:after { - right: -10px; - } - } - - .overtime { - p { - &>div:nth-of-type(2) { - .error-tip { - display: none; - } - } - } - } - - .computingMode2, - .computingMode3, - .computingMode1 { - .wea-helpful-tip { - margin-left: 10px - } - - .wea-form-item-wrapper { - display: block !important; - } - } - - .has_cut_point2, - .has_cut_point3, - .has_cut_point1 { - .cutPoint { - margin-left: 10px; - white-space: nowrap; - width: 300px; - display: inline-block; - - &>span { - margin: 0 5px; - } - - &>span:last-child { - color: #4D7AD8; - cursor: pointer; - margin-left: 15px; - } - - .ant-row { - display: inline-block; - vertical-align: middle; - } - } - - .wea-date-picker { - width: 100px; - } - } - - .ant-radio-group { - width: 500px; - - label { - display: block; - } - - .ant-radio-wrapper { - white-space: normal; - } - } - - .ant-radio-wrapper>span { - vertical-align: top - } -} - -.otrDemo { - .otrDemo-title { - margin: 20px; - margin-bottom: 10px; - background-color: #ebeaeabf; - height: 40px; - line-height: 40px; - border-left: 6px solid #61a9f5; - padding-left: 10px; - font-size: 16px; - } - - p{ - padding: 5px 25px; - } - - img{ - margin-left: 30px; - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/scheduleSetting.less b/pc4backstage/hrmAttendance/style/scheduleSetting.less deleted file mode 100644 index 6556e0a..0000000 --- a/pc4backstage/hrmAttendance/style/scheduleSetting.less +++ /dev/null @@ -1,226 +0,0 @@ -.scheduleSetting{ - .content{ - padding: 10px; - - .info{ - .item, .item-default{ - border-radius: 5px; - color: #fff; - height: 30px; - line-height: 30px; - float: left; - margin-top: 6px; - margin-right: 8px; - padding: 0px 10px 0px 10px; - cursor: pointer; - } - .settingBtn{ - margin-top: 6px; - } - - .wea-radio-group .wea-form-item-wrapper .ext-com-wrapper{ - margin-top: 0px; - } - .wea-form-item .wea-form-item-wrapper .wea-checkbox, .wea-form-item .wea-form-item-wrapper .wea-switch{ - margin-top: 0px; - } - .radioGroupShow{ - text-align: center; - line-height: 30px; - margin-bottom: 8px; - background-color: #f4f4f4; - color: #333; - - span{ - padding: 3px; - cursor: pointer; - } - } - } - - .btnBar{ - margin: 20px 0px 0px 0px; - .wea-date-picker-arrow{ - line-height: 30px; - } - button{ - float: right; - margin-left: 8px; - } - .wea-upload { - float: right; - padding: 0px; - } - } - - .table{ - margin-top: 20px; - // border: 1px solid #e9e9e9; - border-bottom: none; - - .ant-table{ - border-radius: 0px; - table{ - border-radius: 0px; - } - } - - .ant-table-thead>tr>th{ - border-bottom: 1px solid #e9e9e9; - padding: 0px; - background: #fff; - text-align: center; - } - - .wea-new-table .ant-table-thead>tr>th>span{ - padding: 0px; - } - - .paginationTips{ - position: absolute; - left: 10px; - color: #999999; - } - - .ant-table-tbody>tr>td{ - text-align: center; - padding: 0px; - height: 30px; - line-height: 30px; - } - - .ant-table.ant-table-scroll-position-left .ant-table-fixed-left{ - border: none; - border-radius: 0px; - border-left: 1px solid #e9e9e9; - border-top: 1px solid #e9e9e9; - } - - .ant-table-fixed-left{ - border: none; - border-radius: 0px; - } - - .ant-table-bordered.ant-table-fixed-header .ant-table-fixed-left{ - border: none; - } - - .header{ - position: relative; - cursor: pointer; - &-disabled{ - cursor: not-allowed; - } - .dh{ - position: relative; - height: 60px; - line-height: 60px; - .d{ - height: 30px; - line-height: 30px; - padding-top: 10px; - } - .w{ - height: 20px; - line-height: 20px; - } - } - - .tag{ - position: absolute; - top: 3px; - right: 3px; - height: 20px; - } - } - - .cell{ - cursor: pointer; - width: 100%; - height: 100%; - &-disabled{ - cursor: not-allowed; - } - } - - .rest{ - background: #ccc; - color: #000; - } - - .shift{ - color: #fff; - } - - .sameCol{ - background: #eaf8fe; - } - - .scheduleName{ - width: 150px; - padding: 0px 10px 0px 10px; - margin: 0px auto; - margin-top: 5px; - margin-bottom: 5px; - border-radius: 5px; - } - } - } - - &-edit{ - width: 300px; - min-height: 214px; - background: #fff; - border: 1px solid #ccc; - - .ant-tabs-nav{ - width: 100%; - - } - - .wea-tab .wea-tab-edit>.ant-tabs-bar .ant-tabs-tab{ - width: 50%; - .ant-tabs-tab-inner{ - text-align: center; - } - } - - .daySetting{ - padding: 8px 20px 0px 20px; - text-align: center; - - .tips{ - width: 100%; - height: 30px; - line-height: 30px; - color: #999; - margin-bottom: 8px; - } - - .item{ - width: 100%; - color: #fff; - height: 30px; - line-height: 30px; - margin-bottom: 8px; - padding: 0px 10px 0px 10px; - cursor: pointer; - } - - .holiday{ - width: 100%; - height: 30px; - line-height: 30px; - margin-bottom: 8px; - } - } - } -} - -.scheduleSetting-auth{ - .ant-modal-content { - .required:after{ - right:-11px; - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/shiftManager.css b/pc4backstage/hrmAttendance/style/shiftManager.css deleted file mode 100644 index 2b8a436..0000000 --- a/pc4backstage/hrmAttendance/style/shiftManager.css +++ /dev/null @@ -1,78 +0,0 @@ -.shiftManager .formComponent .wea-search-group .wea-form-cell { - padding: 0px; -} -.shiftManager .formComponent .wea-search-group .wea-form-item { - padding: 8px; -} -.shiftManager .formComponent .cust > div { - float: left; -} -.shiftManager .formComponent .cust .basic { - width: 300px; -} -.shiftManager .formComponent .cust .basicSetting { - width: 80px; -} -.shiftManager .formComponent .cust .child { - line-height: 30px; - margin-right: 10px; -} -.shiftManager .formComponent .cust .child > div { - float: left; -} -.shiftManager .formComponent .cust .child .lbl { - padding-left: 5px; - padding-right: 5px; -} -.shiftManager .formComponent .cust .child .lbl1 { - padding-left: 0px; - padding-right: 10px; -} -.shiftManager .formComponent .cust .child .lbl-info { - padding-left: 5px; - padding-right: 5px; - color: #999; -} -.shiftManager .formComponent .cust .child .select { - width: 90px; -} -.shiftManager .formComponent .cust .child .restTime { - width: 100px; -} -.shiftManager .formComponent .cust .child .restTimeInfo { - color: red; - background-color: #FDDBD9; - border-radius: 5px; - padding-left: 5px; - padding-right: 5px; - line-height: 20px; - margin: 5px; -} -.shiftManager .formComponent .cust .child .minutes { - margin-left: 10px; -} -.shiftManager .formComponent .cust .child .minutes .wea-input-normal .ant-input-wrapper { - width: 40px; - float: left; -} -.shiftManager .formComponent .cust .child .minutes .wea-input-normal .input-tip { - float: left; - position: relative; - top: 0px; - left: 0px; - width: auto; - margin-left: 5px !important; -} -.shiftManager .formComponent .calculate { - display: table-row; - line-height: 30px; - font-size: 12px; - color: #999; -} -.shiftManager .formComponent .times { - border: 1px solid #E4E4E4; - background: #F8F8F8; -} -.shiftManager .formComponent .addRule { - padding: 8px; -} diff --git a/pc4backstage/hrmAttendance/style/shiftManager.less b/pc4backstage/hrmAttendance/style/shiftManager.less deleted file mode 100644 index ec4e888..0000000 --- a/pc4backstage/hrmAttendance/style/shiftManager.less +++ /dev/null @@ -1,278 +0,0 @@ -.formComponent{ - .wea-search-group .wea-form-cell{ - padding: 0px; - } - - .wea-search-group .wea-form-item{ - padding: 8px; - } - - .cust{ - float: left; - margin-bottom: 10px; - - &>div{ - float: left; - } - - .num{ - width: 80px; - margin-top: 6px; - - .input-tip{ - top: 0px; - } - } - - .basic { - width: 300px; - } - - .basicSetting{ - width: 80px; - } - - .helpful{ - margin-left: 10px; - padding-top: 5px; - } - - .child { - line-height: 30px; - margin-right: 10px; - &>div{ - float: left; - } - - .example-description{ - display: inline-block; - padding-top: 5px; - color: #4D7AD8; - - &:hover{ - cursor: pointer; - color: #00A9FF; - }; - } - - - - - .lbl{ - padding-left: 5px; - padding-right: 5px; - - &1{ - padding-left: 0px; - padding-right: 10px; - } - - &-info{ - padding-left: 5px; - padding-right: 5px; - color: #999; - } - } - - .select{ - width: 80px; - } - - .restTime{ - width: 100px; - - &Info{ - color: red; - background-color: #FDDBD9; - border-radius: 5px; - padding-left: 5px; - padding-right: 5px; - line-height: 20px; - margin: 5px; - } - } - - .minutes{ - margin-left: 10px; - .wea-input-number .ant-input-number{ - width: 60px; - float: left; - } - .wea-input-number .input-tip{ - float: left; - position: relative; - top: 0px; - left: 0px; - width: auto; - margin-left: 5px !important; - } - } - - .helpful{ - margin-left: 15px; - padding-top: 0px !important; - } - } - } - - .workCust{ - .cust; - } - - .calculate{ - display: table-row; - line-height: 30px; - font-size: 12px; - color: #999; - } - - .times{ - border: 1px solid #E4E4E4; - background: #F8F8F8; - - &>div{ - border-bottom: 1px solid #E4E4E4; - } - - &:last-child{ - border-bottom: none; - } - } - - .addRule{ - padding: 8px; - } - - .cardRemOfSignIn{ - width:200px; - } - - .cardRemOfSignOut{ - width:200px; - } - - .minsBeforeSignIn{ - .wea-input-number { - width:70px; - margin-right:15px; - } - } - - .minsAfterSignOut{ - .wea-input-number { - width:70px; - margin-right:15px; - } - } - - .remindMode{ - i{ - margin-left:5px; - cursor: pointer; - } - p{ - padding-top:10px; - span:first-child{ - cursor:pointer; - color:rgb(0, 0, 255); - margin-right:5px; - }; - } - - } -} - -.kq-remind{ - .first-group{ - height:160px; - - .left{ - width:60%; - display:inline-block; - height:100%; - float:left; - - .title{ - - } - .content{ - height:calc(~"100% - 57px"); - margin-top:10px; - - .wea-textarea-normal { - height:100%; - - textarea{ - height:calc(~"100% - 14px") !important; - } - } - } - .only{ - height:100%; - margin-top:0; - } - } - .right{ - width:38%; - height:100%; - margin-left:2%; - display:inline-block; - - .params{ - height:calc(~"100% - 14px"); - border:1px solid #d9d9d9; - - span{ - display:inline-block; - padding:5px 0 0 8px; - cursor:pointer; - } - } - } - } - .wea-search-group:last-child{ - .wea-content{ - padding-top:0; - } - } -} - -.shiftManager{ - .formComponent; -} - -.shiftManager .wea-left-tree-search .wea-input-focus { - left: 70px; - width: 150px; - } - .shiftManager .wea-left-tree-search .wea-left-tree-search-label{ - width: 200px; - } - -.msg-section{ - padding: 20px; - - & > div:first-child{ - height: 40px; - line-height: 40px; - background: #EBEBEB; - padding-left: 15px; - border-left: 5px solid #007AFF; - font-size: 16px; - }; - - & > div:last-child{ - div{ - margin: 10px 0; - } - - & > div:last-child{ - text-align: center; - } - } - - img{ - width: 703px; - height: 268px; - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/test.less b/pc4backstage/hrmAttendance/style/test.less deleted file mode 100644 index cf85a76..0000000 --- a/pc4backstage/hrmAttendance/style/test.less +++ /dev/null @@ -1,20 +0,0 @@ -.test{ - .typeId{ - display: inline-block; - width: 20%; - } - .ruleName{ - display: inline-block; - width: 20%; - margin-left: 10%; - } - .scopeType{ - display: inline-block; - width: 20%; - margin-left: 10%; - } - .scopeValue{ - display: inline-block; - width: 30% - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/upgrade.less b/pc4backstage/hrmAttendance/style/upgrade.less deleted file mode 100644 index e92307c..0000000 --- a/pc4backstage/hrmAttendance/style/upgrade.less +++ /dev/null @@ -1,217 +0,0 @@ -.upgrade{ - width: 100%; - height: 100%; - - .content{ - width: 100%; - height: 100%; - .left{ - position: absolute; - top: 0px; - left: 0px; - width: 220px; - max-width: 220px; - height: 100%; - overflow-y: auto; - padding: 20px; - border-right: 1px solid #eaeaea; - background: #f9f9f9; - - li{ - cursor: pointer; - - .ant-timeline-item-head{ - background-color: #f9f9f9; - } - - .dot{ - &>div{ - margin: 0px auto; - width: 16px; - height: 16px; - border-radius: 50%; - border: 1px solid #B2B2B2; - color: #B2B2B2; - } - - .active{ - border: 1px solid #4D9BFB; - color: #fff; - background: #4D9BFB; - } - } - - .nodeLabel{ - color: #B2B2B2; - } - - .nodeLabel-active{ - color: #000; - } - } - } - - .right{ - position: absolute; - left: 220px; - top: 0px; - right: 0px;; - height: 100%; - - .upgradeInfo{ - background: #fff; - width: 100%; - height: 100%; - display: table; - - .content{ - display: table-cell; - text-align: center; - padding-top: 150px; - - &>div{ - margin: 0px auto; - margin-bottom: 20px; - } - - .icon{ - width: 100px; - height: 100px; - // border: 1px solid #3681F6; - // border-radius: 50%; - - img{ - width: 100px; - height: 100px; - } - } - - .info{ - - } - - .calendarForm{ - width: 300px; - - .label{ - text-align: left; - padding: 8px; - } - - .formComponent{ - .itemCondition{ - display: flex; - &>div{ - flex: 1; - } - &>div:first-child{ - margin-right: 10px; - } - } - .wea-search-group{ - padding: 0px; - .wea-form-cell{ - padding: 0px; - } - } - } - } - - .doUpgrade{ - width: 159px; - height: 44px; - line-height: 44px; - - button{ - width: 100%; - height: 100%; - font-size: 14px; - } - } - } - } - - .upgradeResult{ - background: #fff; - width: 100%; - height: 100%; - - .content{ - text-align: center; - padding-top: 50px; - - .spinContainer{ - width: 300px; - height: 47px; - line-height: 47px; - margin: 0px auto; - margin-bottom: 20px; - .spinIcon{ - float: left; - } - .complateIcon{ - font-size: 46px; - color: #999; - float: left; - } - .msg{ - padding-left: 10px; - font-size: 16px; - float: left; - - } - } - - .list{ - width: calc(100% - 200px); - margin: 0px auto; - margin-bottom: 20px; - max-height: 65%; - overflow-y: auto; - border: 1px solid #999; - - .ant-row{ - margin: 0px !important; - padding: 20px; - border-bottom: 1px solid #999; - } - - .ant-row:last-child{ - border-bottom: none; - } - - .index{ - width: 16px; - height: 16px; - line-height: 14px; - border: 1px solid #999; - border-radius: 50%; - color: #999; - } - - .status{ - font-size: 16px; - color: green; - } - - .result{ - text-align: left; - margin-bottom: 10px; - } - } - - .goBack{ - clear: both; - width: calc(100% - 200px); - margin: 0px auto; - text-align: right; - - button{ - font-size: 14px; - } - } - } - } - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/vacationRemain.less b/pc4backstage/hrmAttendance/style/vacationRemain.less deleted file mode 100644 index e5d22cf..0000000 --- a/pc4backstage/hrmAttendance/style/vacationRemain.less +++ /dev/null @@ -1,45 +0,0 @@ -.hrm-vacation-remain{ - height: 100%; - - .radio-group{ - padding: 10px; - } - - .wea-new-table { - padding: 0 10px; - } - - .vacation-no-data{ - display: table; - height: 100%; - width: 100%; - - & > div{ - display: table-cell; - vertical-align: middle; - text-align: center; - } - i{ - font-size: 50px; - } - } -} - -.hrm-balance-detail-form{ - padding: 20px 10%; - - .setLineHeight { - padding-bottom: 8px; - } -} - -.hrm-vacation-remain .wea-left-tree-search .wea-input-focus{ - height: 28px; - line-height: 28px; - position: relative; - left: 80px; - width: 140px; -} -.hrm-vacation-remain .wea-left-tree-search .wea-left-tree-search-label{ - width: 200px; -} diff --git a/pc4backstage/hrmAttendance/style/vacationRule.less b/pc4backstage/hrmAttendance/style/vacationRule.less deleted file mode 100644 index 9c48c68..0000000 --- a/pc4backstage/hrmAttendance/style/vacationRule.less +++ /dev/null @@ -1,130 +0,0 @@ -.hrm-vacation-rule{ - height: 100%; -} -.hrm-vacation-rule-form{ - padding: 0 2%; - height:100%; - - .wea-search-group{ - .wea-content{ - padding:0 10%; - } - } - - .annualAmount{ - .wea-input-number{ - width:80px; - } - } - .extensionEnable{ - p{ - display: inline-block; - padding-left: 10px; - } - .wea-input-number{ - width:65px; - margin: 0 5px; - } - } - .expirationMonth{ - .wea-select{ - width: 70px; - margin-right: 10px; - } - } - .effectiveDays{ - .wea-input-number{ - width:80px; - } - } - .effectiveMonths{ - .wea-input-number{ - width:80px; - } - } - .extendedDays{ - display: inline-block; - vertical-align: middle; - } - .balance-payment{ - border: 1px solid #d9d9d9; - - .section{ - margin:20px; - margin-bottom:10px; - border-bottom: 1px solid #d9d9d9; - padding-bottom: 10px; - - .wea-input-number{ - width:60px; - margin: 0 10px; - } - } - .payment{ - padding: 5px 20px; - - position:relative; - - .wea-input-number{ - width:60px; - margin: 0 10px; - } - - .del-button{ - position:absolute; - top:12px; - margin-left: 15px; - } - } - .add-button-wrapper{ - padding-left: 20px; - } - } - .compose-balance-payment{ - .rule-select{ - padding-bottom: 10px; - border-bottom: 1px solid #e0d5d5; - - .wea-select{ - width:100px; - } - } - .header{ - background-color: #eeeeee; - padding: 7px; - - span{ - display:inline-block; - span{ - margin-left:10px; - } - } - } - .rules{ - .rule{ - padding: 5px 0; - span{ - display:inline-block; - - .wea-input-number { - width:calc(~"95% - 20px"); - } - - } - .legal{ - .wea-input-number { - width:100%; - } - } - .weafare{ - .wea-input-number { - width:100%; - } - } - .del-button{ - margin-left:5px; - } - } - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/vacationType.less b/pc4backstage/hrmAttendance/style/vacationType.less deleted file mode 100644 index e6f3ada..0000000 --- a/pc4backstage/hrmAttendance/style/vacationType.less +++ /dev/null @@ -1,43 +0,0 @@ -.hrm-vacation-type{ - height: 100%; -} -.hrm-vacation-type-form{ - padding: 20px 11%; - - .setLineHeight{ - padding-bottom: 8px; - } - - .hoursToDay{ - .wea-input-number{ - width:80px; - } - } - .proportion{ - .wea-input-number{ - width:80px; - } - } - - .timeselection{ - .wea-select{ - width:180px; - } - - .name-def{ - color: #2db7f5; - margin-left: 5px; - cursor: pointer; - } - } - - .minimumUnit{ - .wea-select + p{ - clear: both; - } - } - - .wea-select{ - width: 100% !important; - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/style/workflowSetting.less b/pc4backstage/hrmAttendance/style/workflowSetting.less deleted file mode 100644 index 131c071..0000000 --- a/pc4backstage/hrmAttendance/style/workflowSetting.less +++ /dev/null @@ -1,138 +0,0 @@ -.sdialog{ - .ant-spin .ant-spin-spinning{ - width: 100%; - padding: 100px; - } - - textarea{ - resize: none !important; - } - - .cust{ - float: left; - margin-bottom: 10px; - - &>div{ - float: left; - } - - // .num{ - // width: 80px; - // margin-top: 6px; - - // .input-tip{ - // top: 0px; - // } - // } - - .basic { - width: 300px; - } - - .select{ - width: 80px; - } - - .child { - line-height: 30px; - margin-right: 10px; - &>div{ - float: left; - } - - .lbl{ - padding-left: 20px; - padding-right: 5px; - max-width: 100px; - } - - .select, .num{ - width: 80px; - } - - .restTime{ - width: 100px; - - &Info{ - color: red; - background-color: #FDDBD9; - border-radius: 5px; - padding-left: 5px; - padding-right: 5px; - line-height: 20px; - margin: 5px; - } - } - - .minutes{ - margin-left: 10px; - .wea-input-number .ant-input-number{ - width: 60px; - float: left; - } - .wea-input-number .input-tip{ - float: left; - position: relative; - top: 0px; - left: 0px; - width: auto; - margin-left: 5px !important; - } - } - - .helpful{ - margin-left: 15px; - padding-top: 0px !important; - } - } - } - - .browser{ - // width: 180px; - width: 65%; - float: left; - } - .autoGen, .tips{ - line-height: 30px; - float: left; - // width: 10%; - margin-left: 20px; - } - - .tips{ - .wea-checkbox{ - margin-top: 0px; - } - } - - .fieldList{ - .itemRow{ - // padding-left: 70px; - // padding-right: 70px; - - .options{ - width: 150px; - float: left; - // margin-right: 20px; - } - .tips{ - line-height: 30px; - float: left; - margin-left: 35px; - // margin-right: 20px; - } - } - - .itemRow1{ - .wea-form-item{ - min-height: 0px !important; - padding: 0px !important; - - .wea-form-item-wrapper{ - min-height: 0px !important; - color: red; - } - } - } - } -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/util/index.js b/pc4backstage/hrmAttendance/util/index.js deleted file mode 100644 index b3754c1..0000000 --- a/pc4backstage/hrmAttendance/util/index.js +++ /dev/null @@ -1,467 +0,0 @@ -import isEmpty from "lodash/isEmpty"; -import { message } from "antd"; -import { indexOf } from "lodash"; - -const dbKeys = [ - "PERCENT", - "PLAN", - "PRECISION", - "PRIMARY", - "PRINT", - "PROC", - "PROCEDURE", - "PUBLIC", - "RAISERROR", - "READ", - "READTEXT", - "RECONFIGURE", - "REFERENCES", - "REPLICATION", - "RESTORE", - "RESTRICT", - "RETURN", - "REVOKE", - "RIGHT", - "ROLLBACK", - "ROWCOUNT", - "ROWGUIDCOL", - "RULE", - "SAVE", - "SCHEMA", - "SELECT", - "SESSION_USER", - "SET", - "SETUSER", - "SHUTDOWN", - "SOME", - "STATISTICS", - "SYSTEM_USER", - "TABLE", - "TEXTSIZE", - "THEN", - "TO", - "TOP", - "TRAN", - "TRANSACTION", - "TRIGGER", - "TRUNCATE", - "TSEQUAL", - "UNION", - "UNIQUE", - "UPDATE", - "UPDATETEXT", - "USE", - "USER", - "VALUES", - "VARYING", - "VIEW", - "WAITFOR", - "WHEN", - "WHERE", - "WHILE", - "WITH", - "WRITETEXT", - "EXCEPT", - "EXEC", - "EXECUTE", - "EXISTS", - "EXIT", - "FETCH", - "FILE", - "FILLFACTOR", - "FOR", - "FOREIGN", - "FREETEXT", - "FREETEXTTABLE", - "FROM", - "FULL", - "FUNCTION", - "GOTO", - "GRANT", - "GROUP", - "HAVING", - "HOLDLOCK", - "IDENTITY", - "IDENTITY_INSERT", - "IDENTITYCOL", - "IF", - "IN", - "INDEX", - "INNER", - "INSERT", - "INTERSECT", - "INTO", - "IS", - "JOIN", - "KEY", - "KILL", - "LEFT", - "LIKE", - "LINENO", - "LOAD", - "NATIONAL", - "NOCHECK", - "NONCLUSTERED", - "NOT", - "NULL", - "NULLIF", - "OF", - "OFF", - "OFFSETS", - "ON", - "OPEN", - "OPENDATASOURCE", - "OPENQUERY", - "OPENROWSET", - "OPENXML", - "OPTION", - "OR", - "ORDER", - "OUTER", - "OVER", - "ADD", - "ALL", - "ALTER", - "AND", - "ANY", - "AS", - "ASC", - "AUTHORIZATION", - "BACKUP", - "BEGIN", - "BETWEEN", - "BREAK", - "BROWSE", - "BULK", - "BY", - "CASCADE", - "CASE", - "CHECK", - "CHECKPOINT", - "CLOSE", - "CLUSTERED", - "COALESCE", - "COLLATE", - "COLUMN", - "COMMIT", - "COMPUTE", - "CONSTRAINT", - "CONTAINS", - "CONTAINSTABLE", - "CONTINUE", - "CONVERT", - "CREATE", - "CROSS", - "CURRENT", - "CURRENT_DATE", - "CURRENT_TIME", - "CURRENT_TIMESTAMP", - "CURRENT_USER", - "CURSOR", - "DATABASE", - "DBCC", - "DEALLOCATE", - "DECLARE", - "DEFAULT", - "DELETE", - "DENY", - "DESC", - "DISK", - "DISTINCT", - "DISTRIBUTED", - "DOUBLE", - "DROP", - "DUMMY", - "DUMP", - "ELSE", - "END", - "ERRLVL", - "ESCAPE", - "ACCESS", - "ADD", - "ALL", - "ALTER", - "AND", - "ANY", - "AS", - "ASC", - "AUDIT", - "BETWEEN", - "BY", - "CHAR", - "CHECK", - "CLUSTER", - "COLUMN", - "COMMENT", - "COMPRESS", - "CONNECT", - "CREATE", - "CURRENT", - "DATE", - "DECIMAL", - "DEFAULT", - "DELETE", - "DESC", - "DISTINCT", - "DROP", - "ELSE", - "EXCLUSIVE", - "EXISTS", - "FILE", - "FLOAT", - "FOR", - "FROM", - "GRANT", - "GROUP", - "HAVING", - "IDENTIFIED", - "IMMEDIATE", - "IN", - "INCREMENT", - "INDEX", - "INITIAL", - "INSERT", - "INTEGER", - "INTERSECT", - "INTO", - "IS", - "LEVEL", - "LIKE", - "LOCK", - "LONG", - "MAXEXTENTS", - "MINUS", - "MLSLABEL", - "MODE", - "MODIFY", - "NOAUDIT", - "NOCOMPRESS", - "NOT", - "NOWAIT", - "NULL", - "NUMBER", - "OF", - "OFFLINE", - "ON", - "ONLINE", - "OPTION", - "OR", - "ORDER", - "PCTFREE", - "PRIOR", - "PRIVILEGES", - "PUBLIC", - "RAW", - "RENAME", - "RESOURCE", - "REVOKE", - "ROW", - "ROWID", - "ROWNUM", - "ROWS", - "SELECT", - "SESSION", - "SET", - "SHARE", - "SIZE", - "SMALLINT", - "START", - "SUCCESSFUL", - "SYNONYM", - "SYSDATE", - "TABLE", - "THEN", - "TO", - "TRIGGER", - "UID", - "UNION", - "UNIQUE", - "UPDATE", - "USER", - "VALIDATE", - "VALUES", - "VARCHAR", - "VARCHAR2", - "VIEW", - "WHENEVER", - "WHERE", - "WITH" -]; - -export const validate = (conditions, params = {}) => { - if (!isEmpty(conditions)) { - for (let i = 0, leg = conditions.length; i < leg; i++) { - let cd = conditions[i]; - for (let j = 0, length = cd.items.length; j < length; j++) { - let c = cd.items[j]; - if (c) { - let domkey = c.domkey[0]; - let viewAttr = c.viewAttr; - if (c.conditionType == "BROWSER") - viewAttr = c.browserConditionParam.viewAttr; - if (viewAttr == "3" && !params[domkey]) { - if (domkey == "managerid" || domkey == "belongto") { - //直接上级 主账号不用校验 - } else { - //message.warning(domkey+'必要信息不完整!'); - message.warning("必要信息不完整!"); - return false; - } - } - } - } - } - } - return true; -}; - -export const getFormParamValue = (conditions = {}, fieldname) => { - let fieldvalue = ""; - if (!isEmpty(conditions)) { - for (let i = 0, leg = conditions.length; i < leg; i++) { - let cd = conditions[i]; - for (let j = 0, length = cd.items.length; j < length; j++) { - let c = cd.items[j]; - if (c) { - let domkey = c.domkey[0]; - if (domkey == fieldname) { - fieldvalue = c.value; - } - } - } - } - } - return fieldvalue; -}; - -export const transParams = formParams => { - let params = {}; - for (let key in formParams) { - if (formParams[key] === !!formParams[key]) - params[key] = !!formParams[key] ? "1" : "0"; - else params[key] = formParams[key]; - } - return params; -}; - -export const findTabCount = str => { - const bIndex = str.lastIndexOf("("); - const eIndex = str.lastIndexOf(")"); - let title = "", - count = ""; - try { - title = str.substring(0, bIndex); - count = str.substring(bIndex + 1, eIndex); - } catch (err) {} - return { - title, - count - }; -}; - -export 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; -}; - -export const validDBKeys = value => { - if (indexOf(dbKeys, value.toUpperCase()) >= 0) { - message.error("不能使用数据库保留字作为字段名!"); - return { - isValid: false, - value: "" - }; - } - return { - isValid: true, - value - }; -}; - -export const validNumber = value => { - if (isNaN(parseInt(value))) return 0; - return parseInt(value); -}; - -export const getColumIndex = num => { - const n = 64; - const loopIndex = num / 26; - if (loopIndex <= 1) - return String.fromCharCode(n + (num % 26 === 0 ? 26 : num)); - else - return `${String.fromCharCode( - n + parseInt(loopIndex) - )}${String.fromCharCode(n + (num % 26))}`; -}; - -export const calColumnIndex = val => { - const arr = Array.from(val); - let num = 0; - if (arr.length === 1) num = arr[0].charCodeAt() - 64; - else { - arr.map((c, i) => { - if (i === 0) num += (c.charCodeAt() - 64) * 26; - else num += c.charCodeAt() - 64; - }); - } - - return num; -}; - -export const convertCalendarDate = date => { - const y = date.getYear(); - let d = date.getDayOfMonth(); - if (d < 10) d = "0" + d; - let m = date.getMonth() + 1; - if (m < 10) m = "0" + m; - return `${y}-${m}-${d}`; -}; - -export const dateFormat = (date, format) => { - let o = { - "M+": date.getMonth() + 1, //month - "d+": date.getDate(), //day - "h+": date.getHours(), //hour - "m+": date.getMinutes(), //minute - "s+": date.getSeconds(), //second - "q+": Math.floor((date.getMonth() + 3) / 3), //quarter - S: date.getMilliseconds() //millisecond - }; - if (/((y|Y)+)/.test(format)) - format = format.replace( - RegExp.$1, - (date.getFullYear() + "").substr(4 - RegExp.$1.length) - ); - for (var k in o) - if (new RegExp("(" + k + ")").test(format)) - format = format.replace( - RegExp.$1, - RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length) - ); - return format; -}; - -/** - * 添加多级路径 - * - * @param {*} url - */ -export const addContentPath = (url) => { - const ecologyContentPath = window.ecologyContentPath || ''; - if (url && ecologyContentPath) { - //避免重复添加ecologyContentPath - //避免传入的参数不是链接 - if (url.startsWith('/') && !url.startsWith(ecologyContentPath)) { - url = ecologyContentPath + url; - } - } - return url; -}; \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/util/pulic-func.js b/pc4backstage/hrmAttendance/util/pulic-func.js deleted file mode 100644 index a611b01..0000000 --- a/pc4backstage/hrmAttendance/util/pulic-func.js +++ /dev/null @@ -1,311 +0,0 @@ -import { - Modal, - message -} from 'antd' -import {addContentPath} from './index.js' -const confirm = Modal.confirm; -//发消息、发起群聊 -function sendEmessage(emessageId) { - var isGroup = false; - if (!!emessageId) { - if (emessageId.indexOf(",") > -1) { - isGroup = true; - } - } - if (!emessageId) { - message.warning(SystemEnv.getHtmlNoteName(4780, readCookie("languageidweaver"))); - return; - } - if (emessageId.match(/,$/)) { - emessageId = emessageId.substring(0, emessageId.length - 1); - } - var openType = isGroup ? "2" : "0"; - if (isGroup) { - confirm({ - content: SystemEnv.getHtmlNoteName(4781, readCookie("languageidweaver")), - onOk() { - sendMsgToPCorWeb(emessageId, openType, '', ''); - }, - onCancel() {}, - }); - } else { - sendMsgToPCorWeb(emessageId, openType, '', ''); - } -} - -//发送邮件 -function sendMail(id) { - openFullWindowForXtable("/email/new/MailInBox.jsp?opNewEmail=1&isInternal=1&internalto&id=" + id); -} - -//发送短信 -function sendSmsMessage(id) { - openFullWindowForXtable("/sms/SmsMessageEdit.jsp?hrmid=" + id); -} - -//新建协作 -function addCoWork(id) { - openFullWindowForXtable("/cowork/AddCoWork.jsp?hrmid=" + id); -} - -//新建日程 -function doAddWorkPlanByHrm(id) { - openFullWindowForXtable("/workplan/data/WorkPlan.jsp?resourceid=" + id + "&add=1") -} - -//系统信息 -function jsHrmResourceSystemView(id) { - //window.open(`/spa/hrm/index.html#/main/hrm/systeminfo${window.WeaHrm4Formal?'4Formal':''}/${id}`); - window.open(`/spa/hrm/index_mobx.html#/main/hrm/systeminfo/${id}`); -} - -//我的下属--流程 -function jsRequestView(id) { - openFullWindowForXtable("/workflow/request/RequestView.jsp?resourceid=" + id); -} - -//我的下属--文档 -function docSearch(id) { - openFullWindowForXtable('/docs/search/DocSearchTemp.jsp?docstatus=6&hrmresid=' + id); -} - -//我的下属--项目 -function doProjcSearch(id) { - openFullWindowForXtable("/proj/search/SearchOperation.jsp?member=" + id); -} - -//我的下属--客户 -function openCRM(id) { - openFullWindowForXtable('/CRM/search/SearchOperation.jsp?destination=myAccount&resourceid=' + id); -} - -//我的下属--资产 -function cptSearch(id) { - openFullWindowForXtable('/cpt/search/SearchOperation.jsp?resourceid=' + id + '&isdata=2'); -} - -//我的下属--下属 -function openHrmResourceView(id) { - openFullWindowForXtable("/hrm/HrmTab.jsp?_fromURL=HrmResourceView&id=" + id + "&srcid=" + id); -} - -//我的下属--预算 -function openFnaBudgetResourceDetail(id) { - openFullWindowForXtable("/fna/report/budget/FnaBudgetResourceDetail.jsp?resourceid=" + id); -} - -//我的下属--收支 -function openFnaExpenseResourceDetail(id) { - openFullWindowForXtable("/fna/report/expense/FnaExpenseResourceDetail.jsp?resourceid=" + id); -} - -//培训记录--详细信息 -function jsTrainRecordShowDetail(id) { - let dialog = new window.top.Dialog(); - dialog.currentWindow = window; - const url = "/hrm/HrmDialogTab.jsp?_fromURL=HrmResourceTrainRecordBasic&isdialog=1&id=" + id; - dialog.Title = "培训记录详细信息"; - dialog.Width = 800; - dialog.Height = 503; - dialog.Drag = true; - dialog.URL = addContentPath(url); - dialog.show(); -} - -//培训记录--培训安排--申请 -function jsHrmTrainApply(trainplanid, applyworkflowid) { - openFullWindowForXtable("/workflow/request/AddRequest.jsp?workflowid=" + applyworkflowid + "&TrainPlanId=" + trainplanid); -} - -//考核奖惩--奖惩情况--详细信息 -function jsRewardsRecord2Detial(id) { - //openFullWindowForXtable("/hrm/HrmDialogTab.jsp?_fromURL=HrmAwardEdit&id="+id+"&cmd=showdetail"); - let dialog = new window.top.Dialog(); - dialog.currentWindow = window; - dialog.Title = "奖惩信息"; - const url = "/hrm/HrmDialogTab.jsp?_fromURL=HrmAwardEdit&id=" + id + "&cmd=showdetail"; - dialog.Width = 800; - dialog.Height = 500; - dialog.Drag = true; - dialog.URL = addContentPath(url) ; - dialog.show(); -} - -function openFullWindowForXtable(url) { - var redirectUrl = addContentPath(url) ; - var width = screen.availWidth - 10; - var height = screen.availHeight - 60; - //if (height == 768 ) height -= 75 ; - //if (height == 600 ) height -= 60 ; - var szFeatures = "top=0,"; - szFeatures += "left=0,"; - szFeatures += "width=" + width + ","; - szFeatures += "height=" + height + ","; - szFeatures += "directories=no,"; - szFeatures += "status=yes,"; - szFeatures += "menubar=no,"; - szFeatures += "scrollbars=yes,"; - szFeatures += "resizable=yes"; //channelmode - window.open(redirectUrl, "", szFeatures); -} - -const openFullWindowHaveBar = (url) => { - var redirectUrl = addContentPath(url) ; - var width = screen.availWidth - 10; - var height = screen.availHeight - 50; - var szFeatures = "top=0,"; - szFeatures += "left=0,"; - szFeatures += "width=" + width + ","; - szFeatures += "height=" + height + ","; - szFeatures += "directories=no,"; - szFeatures += "status=yes,toolbar=no,location=no,"; - szFeatures += "menubar=no,"; - szFeatures += "scrollbars=yes,"; - szFeatures += "resizable=yes"; //channelmode - window.open(redirectUrl, "", szFeatures); -} - -function getUserName() { - try { - let vbsserial = ""; - let hCard = htactx.OpenDevice(1); //打开设备 - if (hCard == 0) { - message.warning("请确认您已经正确地安装了驱动程序并插入了usb令牌"); - return vbsserial; - } - - try { - vbsserial = htactx.GetUserName(hCard); //获取用户名 - htactx.CloseDevice(hCard) - return vbsserial; - } catch (e) { - message.warning("请确认您已经正确地安装了驱动程序并插入了usb令牌2"); - htactx.CloseDevice(hCard); - return vbsserial; - } - } catch (e) { - message.warning("请确认您已经正确地安装了驱动程序并插入了usb令牌"); - htactx.CloseDevice(hCard); - return vbsserial; - } -} - -function chkMail(email) { - if (email == '') { - return true; - } - - let pattern = /^(?:[a-z\d]+[_\-\+\.]?)*[a-z\d]+@(?:([a-z\d]+\-?)*[a-z\d]+\.)+([a-z]{2,})+$/i; - let chkFlag = pattern.test(email); - if (chkFlag) { - return true; - } else { - message.warning("邮箱地址的格式不正确"); - return false; - } -} - -function jumpToHrmCard(id) { - //window.open(`/spa/hrm/index.html#/main/hrm/resource${window.WeaHrm4Formal?'4Formal':''}/HrmResourceBase${window.WeaHrm4Formal?'4Formal':''}/${id}`); - window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${id}`); -} - -//新建流程 -function onNewRequest(params) { - const wfid = params.wfid || ''; - const f_weaver_belongto_userid = params.f_weaver_belongto_userid || ''; - const beagenter = params.beagenter || ''; - const isagent = params.isagent || ''; - //计数 - jQuery.post('/workflow/request/AddWorkflowUseCount.jsp', { - wfid: wfid - }); - let paramstr = `workflowid=${wfid}&isagent=${isagent}&beagenter=${beagenter}&f_weaver_belongto_userid=${f_weaver_belongto_userid}&f_weaver_belongto_usertype=0`; - openFullWindowHaveBar('/workflow/request/CreateRequestForward.jsp?' + paramstr); -} - -const openFullWindowHaveBarForWFList = (url, requestid) => { - try { - document.getElementById("wflist_" + requestid + "span").innerHTML = ""; - } catch (e) {} - const redirectUrl = addContentPath(url) ; - const width = screen.availWidth - 10; - const height = screen.availHeight - 50; - let szFeatures = "top=0,left=0,"; - szFeatures += "width=" + width + ","; - szFeatures += "height=" + height + ","; - szFeatures += "directories=no,status=yes,toolbar=no,location=no,"; - szFeatures += "menubar=no,scrollbars=yes,resizable=yes"; - window.open(redirectUrl, "", szFeatures); -} - -const viewDepartment = (departmentid) => { - openFullWindowForXtable("/hrm/HrmTab.jsp?_fromURL=HrmDepartmentDsp&id=" + departmentid) -} - -const viewSubCompany = (subcompanyid) => { - openFullWindowForXtable("/hrm/HrmTab.jsp?_fromURL=HrmSubCompanyDsp&id=" + subcompanyid) -} - -const showAuthorizationRefs = (groupID, coulddetach = 0, id) => { - const group = groupID == null ? '' : `&groupID=${groupID}`; - openFullWindowForXtable(`/hrm/HrmDialogTab.jsp?_fromURL=systemRightGroup&method=showAuth&detachable=1${group}&coulddetach=${coulddetach}&id=${id}`) -} - -function openProcSetting(id) { - window.open(`/spa/workflow/static4engine/engine.html#/main/workflowengine/path/pathSet/pathDetail/baseSet/baseInfo?workflowId=${id}&showLeftTree=false`); -} - -const bindTokenKey = (id) => { - // const hrmId = id || ''; - // const url = "/login/bindTokenKey.jsp?requestFrom=system&userid=" + hrmId; - // var redirectUrl = url; - // var width = 800; - // var height = 600; - // var szFeatures = "top=0,"; - // szFeatures += "left=0,"; - // szFeatures += "width=" + width + ","; - // szFeatures += "height=" + height + ","; - // szFeatures += "directories=no,"; - // szFeatures += "status=yes,"; - // szFeatures += "menubar=no,"; - // szFeatures += "scrollbars=yes,"; - // szFeatures += "resizable=yes"; //channelmode - // window.open(redirectUrl, "", szFeatures); - const title = ""; - let url = "/spa/hrm/index_mobx.html#/main/hrm/BindTokenKey?requestFrom=system&userid="+id; - const dialog = ecCom.WeaTools.createDialog({ title, url:addContentPath(url), style: { width: 600, height: 365 }, zIndex: 9999 }); - dialog.show(); -} - -window.viewDepartment = viewDepartment; -window.viewSubCompany = viewSubCompany; -window.openFullWindowHaveBarForWFList = openFullWindowHaveBarForWFList; - -export { - sendEmessage, - sendMail, - sendSmsMessage, - addCoWork, - doAddWorkPlanByHrm, - jsHrmResourceSystemView, - openFullWindowForXtable, - jsRequestView, - docSearch, - doProjcSearch, - openCRM, - cptSearch, - openHrmResourceView, - openFnaBudgetResourceDetail, - openFnaExpenseResourceDetail, - jsTrainRecordShowDetail, - jsHrmTrainApply, - jsRewardsRecord2Detial, - getUserName, - chkMail, - jumpToHrmCard, - onNewRequest, - showAuthorizationRefs, - openProcSetting, - bindTokenKey, -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/util/pure-util.js b/pc4backstage/hrmAttendance/util/pure-util.js deleted file mode 100644 index e2d8cbf..0000000 --- a/pc4backstage/hrmAttendance/util/pure-util.js +++ /dev/null @@ -1,37 +0,0 @@ -const IEVersion = () => { - var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 - var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 - var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 - var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; - if (isIE) { - var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); - reIE.test(userAgent); - var fIEVersion = parseFloat(RegExp["$1"]); - if (fIEVersion == 7) { - return 7; - } else if (fIEVersion == 8) { - return 8; - } else if (fIEVersion == 9) { - return 9; - } else if (fIEVersion == 10) { - return 10; - } else { - return 6; //IE版本<=7 - } - } else if (isEdge) { - return 'edge'; //edge - } else if (isIE11) { - return 11; //IE11 - } else { - return -1; //不是ie浏览器 - } -} - -const jumpToHrmCard = (id) => { - window.open(`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${id}`); -} - -export { - IEVersion, - jumpToHrmCard -} \ No newline at end of file diff --git a/pc4backstage/hrmAttendance/util/save-time-util.js b/pc4backstage/hrmAttendance/util/save-time-util.js deleted file mode 100644 index fbed5f9..0000000 --- a/pc4backstage/hrmAttendance/util/save-time-util.js +++ /dev/null @@ -1,369 +0,0 @@ -import { - Modal, - message, - Button, -} from 'antd'; -import { - WeaMoreButton, - WeaLocaleProvider, -} from 'ecCom'; -const getLabel = WeaLocaleProvider.getLabel; -const confirm = Modal.confirm; - -const fetch = (params) => { - const { - asyncFetch, - name, - fetchParams = {}, - logic, - } = params; - - asyncFetch[name](fetchParams).then(cb => { - const { - api_status, - status, - } = cb; - - if (api_status || status === '1') { - logic(cb); - } else { - message.error(); - } - }).catch(error => { - message.error(); - }); -} - -const getDialogButtons = (params) => { - const { - datas, - dropMenuDatas = [], - } = params; - - const btns = []; - datas.map((data, index) => { - const { - name, - disabled, - onBtnClick - } = data; - btns.push( - - ); - }); - btns.push( - - ); - return btns -} - -const getMenusCreationConfig = (datas) => { - const topMenu = datas.filter(item => { - const { - isTop, - isBatch - } = item; - return isTop === '1' || isBatch === '1' - }) - - const rightMenu = datas; - - return { - topMenu, - rightMenu - } -} - -function getTopButtons(params) { - const { - datas, - disabled, - } = params; - - let btns = []; - datas.map((item, index) => { - const { - menuFun, - menuName, - title, - } = item; - - btns.push() - }); - - return btns -} - -function getDropMenuDatas(params) { - const { - datas, - disabled, - } = params; - - let dropMenuDatas = []; - - datas.map((item, index) => { - const { - menuFun, - menuName, - menuIcon - } = item; - - dropMenuDatas.push({ - key: index.toString(), - disabled: Array.isArray(disabled) ? disabled[index] : disabled, - icon: , - content: menuName, - onClick: this[menuFun] - }); - }); - - return dropMenuDatas; -} - -const getSearchButtons = (params) => { - const { - form, - search, - cancel, - reset, - } = params; - - const buttons = []; - const buttonNames = [getLabel(82529, '搜索'), getLabel(27088, '重置'), getLabel(32694, '取消')]; - - [0, 1, 2].map((v, index) => { - buttons.push(); - }); - - return buttons; -} - - -const showFailMsg = (messages, ratio) => { - const msgs = [], - duration = messages.length; - - messages.map((msg, index) => msgs.push( 0) ? 22 : 0}}>{`${index + 1}. ${msg}`}
)); - - message.warning(msgs, duration * ratio); -} - -const msg = { - showFailMsg: showFailMsg -} - -const isComplete = (fields, datas) => { - const unfilledRows = []; - - datas.map((data, index) => { - fields.some(field => data[field] === undefined) && unfilledRows.push(index + 1); - }); - - (unfilledRows.length > 0) && message.warning(`${getLabel('505567',"第")} ${unfilledRows.toString()} ${getLabel('27592',"行")}${getLabel('505569',"余额发放")}${getLabel('505570',"天数")}${getLabel('21423',"未填写")}`); - - if (unfilledRows.length > 0) return false; - - return true; -} - -const validate = { - isComplete: isComplete -} - -const add = (config) => { - const { - fields, - intervals, - datas, - msgs - } = config; - - const last = datas[datas.length - 1]; - const clone = [...datas]; - - if (!validate.isComplete(fields, datas)) return datas; - - const newData = {}; - - Object.keys(last).map((key, index) => { - if (!fields.includes(key)) { - Object.assign(newData, { - [key]: last[key] + intervals[key], - }); - } else { - Object.assign(newData, { - [key]: last[key] + 1, - }); - } - }); - - clone.push(newData); - - return clone; - -} - -const rule = { - add: add -} - -const getArrayDatas = (cb) => { - let datas = []; - - const keys = Object.keys(cb); - - keys.map(key => { - if (Array.isArray(cb[key])) { - datas = cb[key]; - } - }); - - return datas; -} - -const getTabId = (cb) => { - let ids = []; - - const keys = Object.keys(cb); - - keys.map(key => { - if (Array.isArray(cb[key])) { - cb[key].map(item => { - item.id && ids.push(item.id); - }); - } - }); - - return ids -} - -const callback = { - getArrayDatas: getArrayDatas, - getTabId: getTabId, -} - -const componentReset = { - resetRadioGroup: (ref) => { - ref.resetDefault(); - }, - resetBrowser: (ref) => { - ref.set([]) - } -} - -const capitalize = ([first, ...rest], lowerRest = false) => { - return first.toUpperCase() + (lowerRest ? rest.join('').toLowerCase() : rest.join('')); -} - -const string = { - capitalize: capitalize -} - -const executeFunction = (config) => { - const { - functions, - params, - father - } = config; - - functions.map((func, index) => { - const object = Array.isArray(father) ? father[index] : father; - object[func](params ? params[index] : ''); - }); -} - -const page = { - initConfig: (params, pointer) => { - Object.keys(params).map(key => { - pointer[key] = params[key]; - }); - } -} - -const isUnique = (val, arr) => { - let flag = true; - - arr.map(ele => { - if (ele === val) { - flag = false; - } - }); - - return flag; -} - -const array = { - isUnique: isUnique -} - -const showDelConfirm = (params) => { - const { - type, - logic - } = params; - - confirm({ - title: getLabel('131329', '信息确认'), - content: (type === 0) ? getLabel('83877', '确定要删除吗?') : getLabel('385625', '确定要删除选择的记录吗?'), - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - logic(type); - }, - onCancel() { - return false; - }, - }); -} - -const showSaveConfirm = (params) => { - const { - content, - logic - } = params; - - confirm({ - title: getLabel('131329', '信息确认'), - content, - okText: getLabel('33703', '确定'), - cancelText: getLabel('32694', '取消'), - onOk() { - logic(); - }, - onCancel() { - return false; - }, - }); -} - -const confirmation = { - showDelConfirm: showDelConfirm, - showSaveConfirm, -} - -export { - fetch, - getDialogButtons, - getMenusCreationConfig, - getTopButtons, - getDropMenuDatas, - getSearchButtons, - msg, - validate, - rule, - callback, - componentReset, - string, - executeFunction, - page, - array, - confirmation, -} \ No newline at end of file diff --git a/pc4backstage/hrmComsPublic/apis/common.js b/pc4backstage/hrmComsPublic/apis/common.js deleted file mode 100644 index 2ef767c..0000000 --- a/pc4backstage/hrmComsPublic/apis/common.js +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index 0564eda..0000000 --- a/pc4backstage/hrmComsPublic/components/AdvanceSearchFormInfo.js +++ /dev/null @@ -1,65 +0,0 @@ -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 deleted file mode 100644 index 7864f22..0000000 --- a/pc4backstage/hrmComsPublic/components/Calendar.js +++ /dev/null @@ -1,221 +0,0 @@ -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 deleted file mode 100644 index 295abc9..0000000 --- a/pc4backstage/hrmComsPublic/components/FormInfo.js +++ /dev/null @@ -1,144 +0,0 @@ -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 deleted file mode 100644 index 3118983..0000000 --- a/pc4backstage/hrmComsPublic/components/OrganizationTree.js +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index 325b800..0000000 --- a/pc4backstage/hrmComsPublic/components/Tabs.js +++ /dev/null @@ -1,224 +0,0 @@ -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 deleted file mode 100644 index b73a118..0000000 --- a/pc4backstage/hrmComsPublic/components/index.js +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index fdd4edf..0000000 --- a/pc4backstage/hrmComsPublic/index.js +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 4f8948b..0000000 --- a/pc4backstage/hrmComsPublic/public/i18n.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index 34add10..0000000 --- a/pc4backstage/hrmComsPublic/public/logType.js +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index e388906..0000000 --- a/pc4backstage/hrmComsPublic/stores/baseStore.js +++ /dev/null @@ -1,377 +0,0 @@ -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 deleted file mode 100644 index 6b76017..0000000 --- a/pc4backstage/hrmComsPublic/style/calendar.less +++ /dev/null @@ -1,289 +0,0 @@ -.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 deleted file mode 100644 index b79b37b..0000000 --- a/pc4backstage/hrmengine/apis/adareaset.js +++ /dev/null @@ -1,125 +0,0 @@ -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 deleted file mode 100644 index 99c8df1..0000000 --- a/pc4backstage/hrmengine/apis/adminAreaDisplaySetting.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 8062891..0000000 --- a/pc4backstage/hrmengine/apis/adminDecentralization.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4621367..0000000 --- a/pc4backstage/hrmengine/apis/annual.js +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index 0106d24..0000000 --- a/pc4backstage/hrmengine/apis/appDetach.js +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b869e3c..0000000 --- a/pc4backstage/hrmengine/apis/archiveLogView.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 3186ff3..0000000 --- a/pc4backstage/hrmengine/apis/assImple.js +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 16e2a2b..0000000 --- a/pc4backstage/hrmengine/apis/assItem.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 193bbc0..0000000 --- a/pc4backstage/hrmengine/apis/assType.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index d3a08aa..0000000 --- a/pc4backstage/hrmengine/apis/attendance.js +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 0521ee0..0000000 --- a/pc4backstage/hrmengine/apis/attendanceSetting.js +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 529aaa7..0000000 --- a/pc4backstage/hrmengine/apis/authAdjust.js +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index 8c5fd8a..0000000 --- a/pc4backstage/hrmengine/apis/authSearch.js +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 52f1189..0000000 --- a/pc4backstage/hrmengine/apis/authorizationSetting.js +++ /dev/null @@ -1,107 +0,0 @@ -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 deleted file mode 100644 index ae77f68..0000000 --- a/pc4backstage/hrmengine/apis/avatarSetting.js +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 930d757..0000000 --- a/pc4backstage/hrmengine/apis/basicImport.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 3a02318..0000000 --- a/pc4backstage/hrmengine/apis/batchAdjust.js +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 88ee59e..0000000 --- a/pc4backstage/hrmengine/apis/batchEdit.js +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 3b2d9a0..0000000 --- a/pc4backstage/hrmengine/apis/batchMaintenance.js +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 9303903..0000000 --- a/pc4backstage/hrmengine/apis/batchUpload.js +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 4d82482..0000000 --- a/pc4backstage/hrmengine/apis/birthdayRemind.js +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index 11a5e8b..0000000 --- a/pc4backstage/hrmengine/apis/browserDisplayField.js +++ /dev/null @@ -1,9 +0,0 @@ - - -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 deleted file mode 100644 index 84f9662..0000000 --- a/pc4backstage/hrmengine/apis/cardItemSet.js +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 8e43b59..0000000 --- a/pc4backstage/hrmengine/apis/city.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 34af337..0000000 --- a/pc4backstage/hrmengine/apis/common.js +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index c9e82ee..0000000 --- a/pc4backstage/hrmengine/apis/contractExpireWarning.js +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index df65a98..0000000 --- a/pc4backstage/hrmengine/apis/contractMaintain.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 739e292..0000000 --- a/pc4backstage/hrmengine/apis/contractTemplate.js +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 1551e17..0000000 --- a/pc4backstage/hrmengine/apis/contractType.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 8f1a145..0000000 --- a/pc4backstage/hrmengine/apis/country.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index f83a778..0000000 --- a/pc4backstage/hrmengine/apis/county.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 31366d1..0000000 --- a/pc4backstage/hrmengine/apis/decentralizationAdminSet.js +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index 447262d..0000000 --- a/pc4backstage/hrmengine/apis/dismiss.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 7c5b16c..0000000 --- a/pc4backstage/hrmengine/apis/duty.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index a2909c4..0000000 --- a/pc4backstage/hrmengine/apis/dutyType.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 514dac0..0000000 --- a/pc4backstage/hrmengine/apis/edu.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 46b0d94..0000000 --- a/pc4backstage/hrmengine/apis/education.js +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 1676767..0000000 --- a/pc4backstage/hrmengine/apis/edulevel.js +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 7cb3817..0000000 --- a/pc4backstage/hrmengine/apis/elseSetting.js +++ /dev/null @@ -1,9 +0,0 @@ -//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 deleted file mode 100644 index 4de23ed..0000000 --- a/pc4backstage/hrmengine/apis/employDemand.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index cdefee2..0000000 --- a/pc4backstage/hrmengine/apis/enginegroup.js +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index a5f7f33..0000000 --- a/pc4backstage/hrmengine/apis/entryMaintenance.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1c8ab8b..0000000 --- a/pc4backstage/hrmengine/apis/formal.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a12d800..0000000 --- a/pc4backstage/hrmengine/apis/funcManageDecent.js +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 5c44ba0..0000000 --- a/pc4backstage/hrmengine/apis/importorg.js +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index ea33906..0000000 --- a/pc4backstage/hrmengine/apis/importresource.js +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index a562da9..0000000 --- a/pc4backstage/hrmengine/apis/leaveType.js +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 7055c71..0000000 --- a/pc4backstage/hrmengine/apis/levelProtection.js +++ /dev/null @@ -1,36 +0,0 @@ -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 deleted file mode 100644 index b81dd9e..0000000 --- a/pc4backstage/hrmengine/apis/limitedAnalysis.js +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 8508948..0000000 --- a/pc4backstage/hrmengine/apis/loginFailLog.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 12c90ad..0000000 --- a/pc4backstage/hrmengine/apis/loginLog.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index fabd1d4..0000000 --- a/pc4backstage/hrmengine/apis/majorset.js +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index e973f11..0000000 --- a/pc4backstage/hrmengine/apis/matrix.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * @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 deleted file mode 100644 index cedd3f3..0000000 --- a/pc4backstage/hrmengine/apis/moduleManage.js +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index d7b76f1..0000000 --- a/pc4backstage/hrmengine/apis/normalLog.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index f825178..0000000 --- a/pc4backstage/hrmengine/apis/officeLocation.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index d400ade..0000000 --- a/pc4backstage/hrmengine/apis/officeaddress.js +++ /dev/null @@ -1,71 +0,0 @@ -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 deleted file mode 100644 index 99f8dd7..0000000 --- a/pc4backstage/hrmengine/apis/onlineAnalysis.js +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 868c04b..0000000 --- a/pc4backstage/hrmengine/apis/onlineAttendance.js +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index ca2d8e0..0000000 --- a/pc4backstage/hrmengine/apis/orgChart.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index d922ccf..0000000 --- a/pc4backstage/hrmengine/apis/orgFieldDisplaySetting.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index b1b2743..0000000 --- a/pc4backstage/hrmengine/apis/organization.js +++ /dev/null @@ -1,146 +0,0 @@ -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 deleted file mode 100644 index 9570b2b..0000000 --- a/pc4backstage/hrmengine/apis/organizationvirtual.js +++ /dev/null @@ -1,154 +0,0 @@ -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 deleted file mode 100644 index ca8ae6e..0000000 --- a/pc4backstage/hrmengine/apis/otherSetting.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 48492b4..0000000 --- a/pc4backstage/hrmengine/apis/paidLeave.js +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 55aebd6..0000000 --- a/pc4backstage/hrmengine/apis/paidLeaveManager.js +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index e6f9241..0000000 --- a/pc4backstage/hrmengine/apis/payrollManagement.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index 8c6d191..0000000 --- a/pc4backstage/hrmengine/apis/payrollSending.js +++ /dev/null @@ -1,76 +0,0 @@ -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 deleted file mode 100644 index 3ee01cc..0000000 --- a/pc4backstage/hrmengine/apis/personalSalaryAdjustment.js +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index e54c105..0000000 --- a/pc4backstage/hrmengine/apis/post.js +++ /dev/null @@ -1,110 +0,0 @@ -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 deleted file mode 100644 index f644030..0000000 --- a/pc4backstage/hrmengine/apis/posts.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9d68a6a..0000000 --- a/pc4backstage/hrmengine/apis/privacySetting.js +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 72cecc2..0000000 --- a/pc4backstage/hrmengine/apis/province.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 52fefcd..0000000 --- a/pc4backstage/hrmengine/apis/quit.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a0fc47a..0000000 --- a/pc4backstage/hrmengine/apis/recruitInfo.js +++ /dev/null @@ -1,51 +0,0 @@ -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 deleted file mode 100644 index 0b64322..0000000 --- a/pc4backstage/hrmengine/apis/recruitLibrary.js +++ /dev/null @@ -1,131 +0,0 @@ -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 deleted file mode 100644 index aaf9eeb..0000000 --- a/pc4backstage/hrmengine/apis/recruitPlan.js +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index 68db45e..0000000 --- a/pc4backstage/hrmengine/apis/rehire.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 88e8f63..0000000 --- a/pc4backstage/hrmengine/apis/renew.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3d92348..0000000 --- a/pc4backstage/hrmengine/apis/resourceIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index e8341a4..0000000 --- a/pc4backstage/hrmengine/apis/retire.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index ead3a68..0000000 --- a/pc4backstage/hrmengine/apis/roleSetting.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index 4060ada..0000000 --- a/pc4backstage/hrmengine/apis/rpManage.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index c9d821c..0000000 --- a/pc4backstage/hrmengine/apis/rpType.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 285a450..0000000 --- a/pc4backstage/hrmengine/apis/salaryApplySet.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 96af22f..0000000 --- a/pc4backstage/hrmengine/apis/salaryBank.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 9569500..0000000 --- a/pc4backstage/hrmengine/apis/salaryIndexMaintenance.js +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index 58c6cb9..0000000 --- a/pc4backstage/hrmengine/apis/salaryIndexSetting.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index be1f6b1..0000000 --- a/pc4backstage/hrmengine/apis/salaryItemsSet.js +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index 16787f5..0000000 --- a/pc4backstage/hrmengine/apis/sanyuan.js +++ /dev/null @@ -1,111 +0,0 @@ -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 deleted file mode 100644 index 8f12d81..0000000 --- a/pc4backstage/hrmengine/apis/schedule.js +++ /dev/null @@ -1,46 +0,0 @@ -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 deleted file mode 100644 index 7a8ee8b..0000000 --- a/pc4backstage/hrmengine/apis/secAdminLog.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 2a097f1..0000000 --- a/pc4backstage/hrmengine/apis/secAuditorLog.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 062194b..0000000 --- a/pc4backstage/hrmengine/apis/securitySetting.js +++ /dev/null @@ -1,70 +0,0 @@ -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 deleted file mode 100644 index f106a98..0000000 --- a/pc4backstage/hrmengine/apis/sensitiveWord.js +++ /dev/null @@ -1,130 +0,0 @@ -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 deleted file mode 100644 index e64dcd6..0000000 --- a/pc4backstage/hrmengine/apis/serialNumber.js +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index 3502db8..0000000 --- a/pc4backstage/hrmengine/apis/signatureManagement.js +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 22171fa..0000000 --- a/pc4backstage/hrmengine/apis/specialty.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 716d77d..0000000 --- a/pc4backstage/hrmengine/apis/staffCareReminder.js +++ /dev/null @@ -1,66 +0,0 @@ -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 deleted file mode 100644 index 5a5a66a..0000000 --- a/pc4backstage/hrmengine/apis/subCompanyFieldDef.js +++ /dev/null @@ -1,43 +0,0 @@ -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 deleted file mode 100644 index dbe8538..0000000 --- a/pc4backstage/hrmengine/apis/systemAdminLog.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index b87da97..0000000 --- a/pc4backstage/hrmengine/apis/test.js +++ /dev/null @@ -1,34 +0,0 @@ -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 deleted file mode 100644 index b45be4a..0000000 --- a/pc4backstage/hrmengine/apis/title.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 0b2d42d..0000000 --- a/pc4backstage/hrmengine/apis/titleset.js +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 7f54b09..0000000 --- a/pc4backstage/hrmengine/apis/trainActivity.js +++ /dev/null @@ -1,125 +0,0 @@ -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 deleted file mode 100644 index 693d357..0000000 --- a/pc4backstage/hrmengine/apis/trainArrange.js +++ /dev/null @@ -1,87 +0,0 @@ -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 deleted file mode 100644 index 1806f46..0000000 --- a/pc4backstage/hrmengine/apis/trainPlan.js +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index fc5eb4f..0000000 --- a/pc4backstage/hrmengine/apis/trainResource.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index dae7144..0000000 --- a/pc4backstage/hrmengine/apis/trainTypes.js +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 6a8b978..0000000 --- a/pc4backstage/hrmengine/apis/transfer.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 37d49d0..0000000 --- a/pc4backstage/hrmengine/apis/trial.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3d2d5fa..0000000 --- a/pc4backstage/hrmengine/apis/unitSet.js +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 63a5eb9..0000000 --- a/pc4backstage/hrmengine/apis/workHour.js +++ /dev/null @@ -1,39 +0,0 @@ -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 deleted file mode 100644 index 9c4ff18..0000000 --- a/pc4backstage/hrmengine/apis/workNatureExcerpt.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 36750b0..0000000 --- a/pc4backstage/hrmengine/apis/workflow.js +++ /dev/null @@ -1,41 +0,0 @@ -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 deleted file mode 100644 index fa2e16f..0000000 --- a/pc4backstage/hrmengine/apis/workingDayAdjust.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index d22c7c1..0000000 --- a/pc4backstage/hrmengine/apis/worknature.js +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 847aefa..0000000 --- a/pc4backstage/hrmengine/components/EduLevel.js +++ /dev/null @@ -1,162 +0,0 @@ -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 deleted file mode 100644 index e505926..0000000 --- a/pc4backstage/hrmengine/components/Home.js +++ /dev/null @@ -1,78 +0,0 @@ -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 deleted file mode 100644 index 5d8a661..0000000 --- a/pc4backstage/hrmengine/components/HrmTest.js +++ /dev/null @@ -1,186 +0,0 @@ -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 deleted file mode 100644 index 99f886f..0000000 --- a/pc4backstage/hrmengine/components/ResourceIndex.js +++ /dev/null @@ -1,165 +0,0 @@ -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 deleted file mode 100644 index c366c91..0000000 --- a/pc4backstage/hrmengine/components/adminAreaDisplaySetting/index.js +++ /dev/null @@ -1,57 +0,0 @@ -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 deleted file mode 100644 index 39207b3..0000000 --- a/pc4backstage/hrmengine/components/adminDecentralization/index.js +++ /dev/null @@ -1,428 +0,0 @@ -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 deleted file mode 100644 index 94cd445..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/period/DataList.js +++ /dev/null @@ -1,77 +0,0 @@ -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 deleted file mode 100644 index f8632f6..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/period/index.js +++ /dev/null @@ -1,97 +0,0 @@ -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 deleted file mode 100644 index 0a19917..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/rule/DataList.js +++ /dev/null @@ -1,76 +0,0 @@ -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 deleted file mode 100644 index 4d26eb2..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/rule/index.js +++ /dev/null @@ -1,97 +0,0 @@ -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 deleted file mode 100644 index 5c896aa..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/setting/DataList.js +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index 598148c..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/setting/Import.js +++ /dev/null @@ -1,64 +0,0 @@ -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 deleted file mode 100644 index 80a092b..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/setting/TabPane.js +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index c3825b5..0000000 --- a/pc4backstage/hrmengine/components/annualLeave/setting/index.js +++ /dev/null @@ -1,109 +0,0 @@ -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 deleted file mode 100644 index 9797d99..0000000 --- a/pc4backstage/hrmengine/components/appDetach/DetachEdit.js +++ /dev/null @@ -1,168 +0,0 @@ -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 deleted file mode 100644 index 3b5fb77..0000000 --- a/pc4backstage/hrmengine/components/appDetach/DetachList.js +++ /dev/null @@ -1,144 +0,0 @@ -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 deleted file mode 100644 index ced811b..0000000 --- a/pc4backstage/hrmengine/components/appDetach/GlobalSetting.js +++ /dev/null @@ -1,57 +0,0 @@ -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 deleted file mode 100644 index 3fda9b6..0000000 --- a/pc4backstage/hrmengine/components/appDetach/index.js +++ /dev/null @@ -1,131 +0,0 @@ -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 deleted file mode 100644 index f07dd0f..0000000 --- a/pc4backstage/hrmengine/components/archiveLogView/index.js +++ /dev/null @@ -1,116 +0,0 @@ -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 deleted file mode 100644 index 4686a7c..0000000 --- a/pc4backstage/hrmengine/components/area/Area.js +++ /dev/null @@ -1,1209 +0,0 @@ -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 deleted file mode 100644 index 7566bc1..0000000 --- a/pc4backstage/hrmengine/components/area/AreaTable.js +++ /dev/null @@ -1,134 +0,0 @@ -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 deleted file mode 100644 index 0eaaa60..0000000 --- a/pc4backstage/hrmengine/components/area/BriefInfo.js +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 6bbb5d5..0000000 --- a/pc4backstage/hrmengine/components/area/LeftTree.js +++ /dev/null @@ -1,93 +0,0 @@ -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 deleted file mode 100644 index 577c7f9..0000000 --- a/pc4backstage/hrmengine/components/area/NewAndEditDialog.js +++ /dev/null @@ -1,133 +0,0 @@ -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 deleted file mode 100644 index f17bd26..0000000 --- a/pc4backstage/hrmengine/components/area/OfficeAddress.js +++ /dev/null @@ -1,486 +0,0 @@ -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 deleted file mode 100644 index 5973128..0000000 --- a/pc4backstage/hrmengine/components/area/TabInfo.js +++ /dev/null @@ -1,121 +0,0 @@ -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 deleted file mode 100644 index 70e1be1..0000000 --- a/pc4backstage/hrmengine/components/assImple/Header.js +++ /dev/null @@ -1,103 +0,0 @@ -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 deleted file mode 100644 index f74a0e4..0000000 --- a/pc4backstage/hrmengine/components/assImple/MainDialog.js +++ /dev/null @@ -1,69 +0,0 @@ -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 deleted file mode 100644 index cfdc5fa..0000000 --- a/pc4backstage/hrmengine/components/assImple/MainTable.js +++ /dev/null @@ -1,71 +0,0 @@ -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 deleted file mode 100644 index be05197..0000000 --- a/pc4backstage/hrmengine/components/assImple/SubDialog.js +++ /dev/null @@ -1,74 +0,0 @@ -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 deleted file mode 100644 index 41dcc8c..0000000 --- a/pc4backstage/hrmengine/components/assImple/SubTable.js +++ /dev/null @@ -1,163 +0,0 @@ -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 deleted file mode 100644 index e1c2367..0000000 --- a/pc4backstage/hrmengine/components/assImple/Tab.js +++ /dev/null @@ -1,231 +0,0 @@ -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 deleted file mode 100644 index d5cbb3b..0000000 --- a/pc4backstage/hrmengine/components/assImple/ThirdTable.js +++ /dev/null @@ -1,92 +0,0 @@ -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 deleted file mode 100644 index ac1a7be..0000000 --- a/pc4backstage/hrmengine/components/assImple/index.js +++ /dev/null @@ -1,102 +0,0 @@ -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 deleted file mode 100644 index 4aae9fe..0000000 --- a/pc4backstage/hrmengine/components/assItem/FormInfo.js +++ /dev/null @@ -1,119 +0,0 @@ -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 deleted file mode 100644 index 23316f9..0000000 --- a/pc4backstage/hrmengine/components/assItem/Header.js +++ /dev/null @@ -1,202 +0,0 @@ -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 deleted file mode 100644 index 436e1be..0000000 --- a/pc4backstage/hrmengine/components/assItem/MainDialog.js +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index b155725..0000000 --- a/pc4backstage/hrmengine/components/assItem/MainTable.js +++ /dev/null @@ -1,103 +0,0 @@ -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 deleted file mode 100644 index 5968154..0000000 --- a/pc4backstage/hrmengine/components/assItem/Tab.js +++ /dev/null @@ -1,277 +0,0 @@ -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 deleted file mode 100644 index b0d8b8f..0000000 --- a/pc4backstage/hrmengine/components/assItem/index.js +++ /dev/null @@ -1,98 +0,0 @@ -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 deleted file mode 100644 index 097b32f..0000000 --- a/pc4backstage/hrmengine/components/assType/FormInfo.js +++ /dev/null @@ -1,112 +0,0 @@ -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 deleted file mode 100644 index 66a3954..0000000 --- a/pc4backstage/hrmengine/components/assType/Group.js +++ /dev/null @@ -1,297 +0,0 @@ -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 deleted file mode 100644 index 1ac6759..0000000 --- a/pc4backstage/hrmengine/components/assType/Header.js +++ /dev/null @@ -1,202 +0,0 @@ -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 deleted file mode 100644 index 011900c..0000000 --- a/pc4backstage/hrmengine/components/assType/MainDialog.js +++ /dev/null @@ -1,78 +0,0 @@ -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 deleted file mode 100644 index 97aad12..0000000 --- a/pc4backstage/hrmengine/components/assType/MainTable.js +++ /dev/null @@ -1,103 +0,0 @@ -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 deleted file mode 100644 index 6fcb1df..0000000 --- a/pc4backstage/hrmengine/components/assType/Tab.js +++ /dev/null @@ -1,275 +0,0 @@ -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 deleted file mode 100644 index d080fd0..0000000 --- a/pc4backstage/hrmengine/components/assType/index.js +++ /dev/null @@ -1,98 +0,0 @@ -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 deleted file mode 100644 index 507ac52..0000000 --- a/pc4backstage/hrmengine/components/attendanceSetting/Content.js +++ /dev/null @@ -1,162 +0,0 @@ -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 deleted file mode 100644 index 34cf1f8..0000000 --- a/pc4backstage/hrmengine/components/attendanceSetting/Header.js +++ /dev/null @@ -1,106 +0,0 @@ -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 deleted file mode 100644 index 89ddb86..0000000 --- a/pc4backstage/hrmengine/components/attendanceSetting/MainDialog.js +++ /dev/null @@ -1,76 +0,0 @@ -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 deleted file mode 100644 index 584d02e..0000000 --- a/pc4backstage/hrmengine/components/attendanceSetting/PageFormInfo.js +++ /dev/null @@ -1,89 +0,0 @@ -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 deleted file mode 100644 index ce5938e..0000000 --- a/pc4backstage/hrmengine/components/attendanceSetting/SubFormInfo.js +++ /dev/null @@ -1,163 +0,0 @@ -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 deleted file mode 100644 index c9ce672..0000000 --- a/pc4backstage/hrmengine/components/attendanceSetting/TableEdit.js +++ /dev/null @@ -1,40 +0,0 @@ -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 deleted file mode 100644 index 99765c6..0000000 --- a/pc4backstage/hrmengine/components/attendanceSetting/index.js +++ /dev/null @@ -1,101 +0,0 @@ -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 deleted file mode 100644 index 5891e6d..0000000 --- a/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSetting.js +++ /dev/null @@ -1,41 +0,0 @@ -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 deleted file mode 100644 index d92c2b9..0000000 --- a/pc4backstage/hrmengine/components/attendanceSyncSetting/FieldSettingExplain.js +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index 79c20f8..0000000 --- a/pc4backstage/hrmengine/components/attendanceSyncSetting/SyncSetting.js +++ /dev/null @@ -1,84 +0,0 @@ -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 deleted file mode 100644 index f3f88a2..0000000 --- a/pc4backstage/hrmengine/components/attendanceSyncSetting/index.js +++ /dev/null @@ -1,99 +0,0 @@ -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 deleted file mode 100644 index c108329..0000000 --- a/pc4backstage/hrmengine/components/authAdjust/Content.js +++ /dev/null @@ -1,178 +0,0 @@ -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 deleted file mode 100644 index 3231b1b..0000000 --- a/pc4backstage/hrmengine/components/authAdjust/Dashboard.js +++ /dev/null @@ -1,96 +0,0 @@ -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 deleted file mode 100644 index a671824..0000000 --- a/pc4backstage/hrmengine/components/authAdjust/Result.js +++ /dev/null @@ -1,111 +0,0 @@ -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 deleted file mode 100644 index f1b3ad5..0000000 --- a/pc4backstage/hrmengine/components/authAdjust/Timer.js +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index 4066656..0000000 --- a/pc4backstage/hrmengine/components/authAdjust/index.js +++ /dev/null @@ -1,112 +0,0 @@ -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 deleted file mode 100644 index c6b9101..0000000 --- a/pc4backstage/hrmengine/components/authSearch/Content.js +++ /dev/null @@ -1,131 +0,0 @@ -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 deleted file mode 100644 index beba5f7..0000000 --- a/pc4backstage/hrmengine/components/authSearch/Dashboard.js +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 468302a..0000000 --- a/pc4backstage/hrmengine/components/authSearch/index.js +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index 7bc6b36..0000000 --- a/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationGroupEditTab.js +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index c8ce8bd..0000000 --- a/pc4backstage/hrmengine/components/authorizationSetting/AuthorizationList.js +++ /dev/null @@ -1,127 +0,0 @@ -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 deleted file mode 100644 index 66cce5b..0000000 --- a/pc4backstage/hrmengine/components/authorizationSetting/Group.js +++ /dev/null @@ -1,160 +0,0 @@ -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 deleted file mode 100644 index 1f52a22..0000000 --- a/pc4backstage/hrmengine/components/authorizationSetting/RoleRefs.js +++ /dev/null @@ -1,240 +0,0 @@ -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 deleted file mode 100644 index 65cc8d4..0000000 --- a/pc4backstage/hrmengine/components/authorizationSetting/index.js +++ /dev/null @@ -1,123 +0,0 @@ -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 deleted file mode 100644 index 928fb37..0000000 --- a/pc4backstage/hrmengine/components/avatarSetting/AvatarSetting.js +++ /dev/null @@ -1,135 +0,0 @@ -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 deleted file mode 100644 index 0ac4660..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/Dashboard.js +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 062a947..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustDepartment.js +++ /dev/null @@ -1,150 +0,0 @@ -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 deleted file mode 100644 index fd23da3..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustLeftContainer.js +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 6538a02..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustResource.js +++ /dev/null @@ -1,150 +0,0 @@ -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 deleted file mode 100644 index 813b811..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustRightContainer.js +++ /dev/null @@ -1,53 +0,0 @@ -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 deleted file mode 100644 index e6a99cb..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/adjust/AdjustSubCompany.js +++ /dev/null @@ -1,150 +0,0 @@ -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 deleted file mode 100644 index befe1a6..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/adjust/CheckContent.js +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index ef5fbd1..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/adjust/index.js +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 97b61ff..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditDepartment.js +++ /dev/null @@ -1,84 +0,0 @@ -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 deleted file mode 100644 index f0a8862..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditLeftContainer.js +++ /dev/null @@ -1,48 +0,0 @@ -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 deleted file mode 100644 index 8c3ebd9..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditResource.js +++ /dev/null @@ -1,84 +0,0 @@ -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 deleted file mode 100644 index 0ed94dc..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditRightContainer.js +++ /dev/null @@ -1,139 +0,0 @@ -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 deleted file mode 100644 index f5d4d6e..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/edit/EditSubCompany.js +++ /dev/null @@ -1,84 +0,0 @@ -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 deleted file mode 100644 index 685dbde..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/edit/NeedRender.js +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index ca0fb59..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/edit/index.js +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index ad6e224..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/index.js +++ /dev/null @@ -1,180 +0,0 @@ -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 deleted file mode 100644 index 0632644..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/upload/LeftContainer.js +++ /dev/null @@ -1,37 +0,0 @@ -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 deleted file mode 100644 index 30debc2..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/upload/RightContainer.js +++ /dev/null @@ -1,143 +0,0 @@ -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 deleted file mode 100644 index c739f6c..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/upload/UploadForm.js +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index 174606a..0000000 --- a/pc4backstage/hrmengine/components/batchMaintenance/upload/index.js +++ /dev/null @@ -1,68 +0,0 @@ -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 deleted file mode 100644 index d521d79..0000000 --- a/pc4backstage/hrmengine/components/birthEditor/apis/index.js +++ /dev/null @@ -1,30 +0,0 @@ -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 deleted file mode 100644 index 618fdb7..0000000 --- a/pc4backstage/hrmengine/components/birthEditor/components/body/card/Background.js +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 69b0d8c..0000000 --- a/pc4backstage/hrmengine/components/birthEditor/components/body/card/Congratulations.js +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index e35da59..0000000 --- a/pc4backstage/hrmengine/components/birthEditor/components/body/card/DateField.js +++ /dev/null @@ -1,39 +0,0 @@ -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 deleted file mode 100644 index 5d1ed45..0000000 --- a/pc4backstage/hrmengine/components/birthEditor/components/body/card/Header.js +++ /dev/null @@ -1,32 +0,0 @@ -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 deleted file mode 100644 index 8c24945..0000000 --- a/pc4backstage/hrmengine/components/cardItemSet/index.js +++ /dev/null @@ -1,202 +0,0 @@ -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 deleted file mode 100644 index 442a622..0000000 --- a/pc4backstage/hrmengine/components/contractExpireWarning/Add.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index 62fdbe4..0000000 --- a/pc4backstage/hrmengine/components/contractExpireWarning/Content.js +++ /dev/null @@ -1,111 +0,0 @@ -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 deleted file mode 100644 index 6ab2ed0..0000000 --- a/pc4backstage/hrmengine/components/contractExpireWarning/Header.js +++ /dev/null @@ -1,132 +0,0 @@ -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 deleted file mode 100644 index c4ce767..0000000 --- a/pc4backstage/hrmengine/components/contractExpireWarning/MainForm.js +++ /dev/null @@ -1,91 +0,0 @@ -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 deleted file mode 100644 index 26a566a..0000000 --- a/pc4backstage/hrmengine/components/contractExpireWarning/Table.js +++ /dev/null @@ -1,39 +0,0 @@ -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 deleted file mode 100644 index b445d8f..0000000 --- a/pc4backstage/hrmengine/components/contractExpireWarning/index.js +++ /dev/null @@ -1,91 +0,0 @@ -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 deleted file mode 100644 index b5565e4..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/DialogContent.js +++ /dev/null @@ -1,101 +0,0 @@ -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 deleted file mode 100644 index 7c835b5..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/FormInfo.js +++ /dev/null @@ -1,145 +0,0 @@ -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 deleted file mode 100644 index 5248ce3..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/Header.js +++ /dev/null @@ -1,211 +0,0 @@ -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 deleted file mode 100644 index 08a90b7..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/LeftTree.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index d42da9e..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/MainDialog.js +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index 4032a61..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/MainTable.js +++ /dev/null @@ -1,136 +0,0 @@ -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 deleted file mode 100644 index 5af27a6..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/RichText.js +++ /dev/null @@ -1,107 +0,0 @@ -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 deleted file mode 100644 index b89d99d..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/Tab.js +++ /dev/null @@ -1,277 +0,0 @@ -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 deleted file mode 100644 index 86ac01b..0000000 --- a/pc4backstage/hrmengine/components/contractMaintain/index.js +++ /dev/null @@ -1,112 +0,0 @@ -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 deleted file mode 100644 index 6c308bc..0000000 --- a/pc4backstage/hrmengine/components/contractTemplate/Header.js +++ /dev/null @@ -1,173 +0,0 @@ -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 deleted file mode 100644 index 1ac1e1d..0000000 --- a/pc4backstage/hrmengine/components/contractTemplate/LeftTree.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index 4b76421..0000000 --- a/pc4backstage/hrmengine/components/contractTemplate/MainDialog.js +++ /dev/null @@ -1,69 +0,0 @@ -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 deleted file mode 100644 index e74fbde..0000000 --- a/pc4backstage/hrmengine/components/contractTemplate/MainTable.js +++ /dev/null @@ -1,117 +0,0 @@ -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 deleted file mode 100644 index da30f0c..0000000 --- a/pc4backstage/hrmengine/components/contractTemplate/Tab.js +++ /dev/null @@ -1,195 +0,0 @@ -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 deleted file mode 100644 index 0f76b06..0000000 --- a/pc4backstage/hrmengine/components/contractTemplate/index.js +++ /dev/null @@ -1,112 +0,0 @@ -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 deleted file mode 100644 index 9ad7a82..0000000 --- a/pc4backstage/hrmengine/components/contractType/FormInfo.js +++ /dev/null @@ -1,137 +0,0 @@ -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 deleted file mode 100644 index 04c5686..0000000 --- a/pc4backstage/hrmengine/components/contractType/Header.js +++ /dev/null @@ -1,199 +0,0 @@ -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 deleted file mode 100644 index 4fc02b0..0000000 --- a/pc4backstage/hrmengine/components/contractType/LeftTree.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index 18cedea..0000000 --- a/pc4backstage/hrmengine/components/contractType/MainDialog.js +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index 8c8389f..0000000 --- a/pc4backstage/hrmengine/components/contractType/MainTable.js +++ /dev/null @@ -1,120 +0,0 @@ -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 deleted file mode 100644 index f20bc69..0000000 --- a/pc4backstage/hrmengine/components/contractType/Tab.js +++ /dev/null @@ -1,279 +0,0 @@ -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 deleted file mode 100644 index 64de1e6..0000000 --- a/pc4backstage/hrmengine/components/contractType/index.js +++ /dev/null @@ -1,112 +0,0 @@ -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 deleted file mode 100644 index af5a467..0000000 --- a/pc4backstage/hrmengine/components/decentralizationAdminSet/HocFactory.js +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 9bde092..0000000 --- a/pc4backstage/hrmengine/components/decentralizationAdminSet/SecuritySet.js +++ /dev/null @@ -1,264 +0,0 @@ -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} = 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 === '7' && ['needauto', 'enableDate', 'enableUsbType', 'mobile', 'tokenKey', 'serial', 'selectdateselect'].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; - } - - 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 deleted file mode 100644 index 6ccce30..0000000 --- a/pc4backstage/hrmengine/components/decentralizationAdminSet/index.js +++ /dev/null @@ -1,555 +0,0 @@ -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 deleted file mode 100644 index b150e4c..0000000 --- a/pc4backstage/hrmengine/components/education/Education.js +++ /dev/null @@ -1,486 +0,0 @@ -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 deleted file mode 100644 index 9ab9b98..0000000 --- a/pc4backstage/hrmengine/components/education/HocFactory.js +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 465cfe9..0000000 --- a/pc4backstage/hrmengine/components/elseSetting/index.js +++ /dev/null @@ -1,115 +0,0 @@ -//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 deleted file mode 100644 index 8d91c08..0000000 --- a/pc4backstage/hrmengine/components/employmentDemand/FormInfo.js +++ /dev/null @@ -1,122 +0,0 @@ -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 deleted file mode 100644 index b2a87d0..0000000 --- a/pc4backstage/hrmengine/components/employmentDemand/Header.js +++ /dev/null @@ -1,208 +0,0 @@ -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 deleted file mode 100644 index 4f16540..0000000 --- a/pc4backstage/hrmengine/components/employmentDemand/MainDialog.js +++ /dev/null @@ -1,78 +0,0 @@ -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 deleted file mode 100644 index 01d268c..0000000 --- a/pc4backstage/hrmengine/components/employmentDemand/MainTable.js +++ /dev/null @@ -1,126 +0,0 @@ -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 deleted file mode 100644 index 302086b..0000000 --- a/pc4backstage/hrmengine/components/employmentDemand/Tab.js +++ /dev/null @@ -1,182 +0,0 @@ -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 deleted file mode 100644 index 202a6d3..0000000 --- a/pc4backstage/hrmengine/components/employmentDemand/index.js +++ /dev/null @@ -1,93 +0,0 @@ -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 deleted file mode 100644 index 8267a32..0000000 --- a/pc4backstage/hrmengine/components/enginegroup/AddGpMember.js +++ /dev/null @@ -1,64 +0,0 @@ -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 deleted file mode 100644 index 01abefd..0000000 --- a/pc4backstage/hrmengine/components/enginegroup/GroupSetting.js +++ /dev/null @@ -1,224 +0,0 @@ -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 deleted file mode 100644 index cd4d749..0000000 --- a/pc4backstage/hrmengine/components/enginegroup/NeForm.js +++ /dev/null @@ -1,51 +0,0 @@ -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 deleted file mode 100644 index da85c75..0000000 --- a/pc4backstage/hrmengine/components/enginegroup/NewEngineGroup.js +++ /dev/null @@ -1,98 +0,0 @@ -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 deleted file mode 100644 index 05202d5..0000000 --- a/pc4backstage/hrmengine/components/enginegroup/index.js +++ /dev/null @@ -1,481 +0,0 @@ -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 deleted file mode 100644 index eb06c0d..0000000 --- a/pc4backstage/hrmengine/components/entryMaintenance/index.js +++ /dev/null @@ -1,249 +0,0 @@ -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 deleted file mode 100644 index ebce4b5..0000000 --- a/pc4backstage/hrmengine/components/external/outSignAppSetting.js +++ /dev/null @@ -1,103 +0,0 @@ -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 deleted file mode 100644 index 2c56ef5..0000000 --- a/pc4backstage/hrmengine/components/funcManageDecent/FormInfo.js +++ /dev/null @@ -1,171 +0,0 @@ -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 deleted file mode 100644 index 822600f..0000000 --- a/pc4backstage/hrmengine/components/funcManageDecent/Header.js +++ /dev/null @@ -1,188 +0,0 @@ -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 deleted file mode 100644 index 2301f6f..0000000 --- a/pc4backstage/hrmengine/components/funcManageDecent/MainDialog.js +++ /dev/null @@ -1,80 +0,0 @@ -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 deleted file mode 100644 index 58f0ac7..0000000 --- a/pc4backstage/hrmengine/components/funcManageDecent/MainTable.js +++ /dev/null @@ -1,100 +0,0 @@ -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 deleted file mode 100644 index 107eafa..0000000 --- a/pc4backstage/hrmengine/components/funcManageDecent/Tab.js +++ /dev/null @@ -1,263 +0,0 @@ -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 deleted file mode 100644 index a2a6497..0000000 --- a/pc4backstage/hrmengine/components/funcManageDecent/index.js +++ /dev/null @@ -1,118 +0,0 @@ -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 deleted file mode 100644 index a1479ee..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/BasicSet.js +++ /dev/null @@ -1,101 +0,0 @@ -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 deleted file mode 100644 index c267922..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/FormInfo.js +++ /dev/null @@ -1,114 +0,0 @@ -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 deleted file mode 100644 index 926d34b..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/Header.js +++ /dev/null @@ -1,210 +0,0 @@ -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 deleted file mode 100644 index e9557da..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/LeftTree.js +++ /dev/null @@ -1,63 +0,0 @@ -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 deleted file mode 100644 index 628d6b3..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/MainDialog.js +++ /dev/null @@ -1,121 +0,0 @@ -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 deleted file mode 100644 index 4fa1f3b..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/MainTableInfo.js +++ /dev/null @@ -1,226 +0,0 @@ -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 deleted file mode 100644 index 1211dd8..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/Search.js +++ /dev/null @@ -1,151 +0,0 @@ -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 deleted file mode 100644 index 0732c8e..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/SpecialForm.js +++ /dev/null @@ -1,107 +0,0 @@ -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 deleted file mode 100644 index 7636db9..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/StaticFormInfo.js +++ /dev/null @@ -1,124 +0,0 @@ -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 deleted file mode 100644 index c0ad7de..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/SubDialog.js +++ /dev/null @@ -1,77 +0,0 @@ -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 deleted file mode 100644 index f151600..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/TableEdit.js +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index e8f7a93..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/WorkHourTab.js +++ /dev/null @@ -1,95 +0,0 @@ -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 deleted file mode 100644 index bc8262a..0000000 --- a/pc4backstage/hrmengine/components/generalWorkingHours/index.js +++ /dev/null @@ -1,129 +0,0 @@ -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 deleted file mode 100644 index b8ffa7b..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Dismiss.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index 8552a63..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Formal.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index 6ee8f16..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/HocFactory.js +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index c13ea61..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Info.js +++ /dev/null @@ -1,49 +0,0 @@ -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 deleted file mode 100644 index b1f2ae9..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Quit.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index abb28c2..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Rehire.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index bfa47cf..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Renew.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index 444976e..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Retire.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index 066f063..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Transfer.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index ac111c8..0000000 --- a/pc4backstage/hrmengine/components/humanStatusChange/Trial.js +++ /dev/null @@ -1,228 +0,0 @@ -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 deleted file mode 100644 index 2848bfc..0000000 --- a/pc4backstage/hrmengine/components/import/index.js +++ /dev/null @@ -1,204 +0,0 @@ -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 deleted file mode 100644 index 289fd10..0000000 --- a/pc4backstage/hrmengine/components/importExternalAttendanceData/index.js +++ /dev/null @@ -1,112 +0,0 @@ -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 deleted file mode 100644 index 763fa16..0000000 --- a/pc4backstage/hrmengine/components/importRelatedComponet/ImportHistory.js +++ /dev/null @@ -1,119 +0,0 @@ -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 deleted file mode 100644 index 690674a..0000000 --- a/pc4backstage/hrmengine/components/importRelatedComponet/ImportLog.js +++ /dev/null @@ -1,172 +0,0 @@ -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 deleted file mode 100644 index c7cefb2..0000000 --- a/pc4backstage/hrmengine/components/importRelatedComponet/ImportResult.js +++ /dev/null @@ -1,227 +0,0 @@ -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 deleted file mode 100644 index 07b47fb..0000000 --- a/pc4backstage/hrmengine/components/importRelatedComponet/index.js +++ /dev/null @@ -1,278 +0,0 @@ -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 deleted file mode 100644 index 52ed170..0000000 --- a/pc4backstage/hrmengine/components/importorg/Import.js +++ /dev/null @@ -1,235 +0,0 @@ -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 deleted file mode 100644 index 06c0c79..0000000 --- a/pc4backstage/hrmengine/components/importorg/ImportHistory.js +++ /dev/null @@ -1,100 +0,0 @@ -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 deleted file mode 100644 index bdffeae..0000000 --- a/pc4backstage/hrmengine/components/importorg/ImportLog.js +++ /dev/null @@ -1,137 +0,0 @@ -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 deleted file mode 100644 index b4d4eae..0000000 --- a/pc4backstage/hrmengine/components/importorg/ImportResult.js +++ /dev/null @@ -1,131 +0,0 @@ -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 deleted file mode 100644 index 303ae01..0000000 --- a/pc4backstage/hrmengine/components/importresource/Import.js +++ /dev/null @@ -1,356 +0,0 @@ -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 deleted file mode 100644 index d13699c..0000000 --- a/pc4backstage/hrmengine/components/importresource/ImportHistory.js +++ /dev/null @@ -1,137 +0,0 @@ -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 deleted file mode 100644 index 38a6484..0000000 --- a/pc4backstage/hrmengine/components/importresource/ImportLog.js +++ /dev/null @@ -1,175 +0,0 @@ -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 deleted file mode 100644 index e3e1ed2..0000000 --- a/pc4backstage/hrmengine/components/importresource/ImportResult.js +++ /dev/null @@ -1,185 +0,0 @@ -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 deleted file mode 100644 index 676e536..0000000 --- a/pc4backstage/hrmengine/components/leaveType/index.js +++ /dev/null @@ -1,93 +0,0 @@ -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 deleted file mode 100644 index 53da078..0000000 --- a/pc4backstage/hrmengine/components/levelProtection/BasicInfo.js +++ /dev/null @@ -1,106 +0,0 @@ -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 deleted file mode 100644 index 6a0891b..0000000 --- a/pc4backstage/hrmengine/components/levelProtection/Tab.js +++ /dev/null @@ -1,43 +0,0 @@ -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 deleted file mode 100644 index 91efa1a..0000000 --- a/pc4backstage/hrmengine/components/levelProtection/Table.js +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index 8863fe3..0000000 --- a/pc4backstage/hrmengine/components/levelProtection/Top.js +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index 7367675..0000000 --- a/pc4backstage/hrmengine/components/levelProtection/index.js +++ /dev/null @@ -1,61 +0,0 @@ -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 deleted file mode 100644 index 92b6c89..0000000 --- a/pc4backstage/hrmengine/components/limitedAnalysis/Echarts.js +++ /dev/null @@ -1,78 +0,0 @@ -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 deleted file mode 100644 index 79ab35e..0000000 --- a/pc4backstage/hrmengine/components/limitedAnalysis/RadioGroup.js +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index dbb470c..0000000 --- a/pc4backstage/hrmengine/components/limitedAnalysis/index.js +++ /dev/null @@ -1,196 +0,0 @@ -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 deleted file mode 100644 index 2380c98..0000000 --- a/pc4backstage/hrmengine/components/loginFailLog/index.js +++ /dev/null @@ -1,437 +0,0 @@ -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 deleted file mode 100644 index 41fcd8d..0000000 --- a/pc4backstage/hrmengine/components/loginLog/index.js +++ /dev/null @@ -1,483 +0,0 @@ -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 deleted file mode 100644 index a51198e..0000000 --- a/pc4backstage/hrmengine/components/major/HocFactory.js +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index a8b7069..0000000 --- a/pc4backstage/hrmengine/components/major/Major.js +++ /dev/null @@ -1,520 +0,0 @@ -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 deleted file mode 100644 index e6f3d60..0000000 --- a/pc4backstage/hrmengine/components/matrix/Dashboard.js +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index e38471a..0000000 --- a/pc4backstage/hrmengine/components/matrix/DataList.js +++ /dev/null @@ -1,101 +0,0 @@ -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 deleted file mode 100644 index 5c63b26..0000000 --- a/pc4backstage/hrmengine/components/matrix/DataListPagination.js +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index c594ae5..0000000 --- a/pc4backstage/hrmengine/components/matrix/FieldItem.js +++ /dev/null @@ -1,225 +0,0 @@ -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 deleted file mode 100644 index 07ae2c8..0000000 --- a/pc4backstage/hrmengine/components/matrix/HiddenTable.js +++ /dev/null @@ -1,32 +0,0 @@ -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 deleted file mode 100644 index aec28c5..0000000 --- a/pc4backstage/hrmengine/components/matrix/MatrixCard.js +++ /dev/null @@ -1,88 +0,0 @@ -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 deleted file mode 100644 index fbd9a7d..0000000 --- a/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenance.js +++ /dev/null @@ -1,90 +0,0 @@ -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 deleted file mode 100644 index 81540be..0000000 --- a/pc4backstage/hrmengine/components/matrix/MatrixDataMaintenanceView.js +++ /dev/null @@ -1,171 +0,0 @@ -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 deleted file mode 100644 index 9b24b22..0000000 --- a/pc4backstage/hrmengine/components/matrix/MatrixEdit.js +++ /dev/null @@ -1,146 +0,0 @@ -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 deleted file mode 100644 index d59a38e..0000000 --- a/pc4backstage/hrmengine/components/matrix/MatrixFieldSetting.js +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index b97e425..0000000 --- a/pc4backstage/hrmengine/components/matrix/MatrixMaintenance.js +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 8889291..0000000 --- a/pc4backstage/hrmengine/components/matrix/Screen.js +++ /dev/null @@ -1,157 +0,0 @@ -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 deleted file mode 100644 index a359abe..0000000 --- a/pc4backstage/hrmengine/components/matrix/SubCompanyDisplaySetting.js +++ /dev/null @@ -1,118 +0,0 @@ -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 deleted file mode 100644 index bb3d73f..0000000 --- a/pc4backstage/hrmengine/components/matrix/index.js +++ /dev/null @@ -1,150 +0,0 @@ -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 deleted file mode 100644 index 5455dd4..0000000 --- a/pc4backstage/hrmengine/components/matrix/maintenance/ColumnSetting.js +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index ca7dde4..0000000 --- a/pc4backstage/hrmengine/components/matrix/maintenance/ConditionSetting.js +++ /dev/null @@ -1,54 +0,0 @@ -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 deleted file mode 100644 index ffd7355..0000000 --- a/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceLevel.js +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 0979194..0000000 --- a/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceListView.js +++ /dev/null @@ -1,120 +0,0 @@ -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 deleted file mode 100644 index e84fad2..0000000 --- a/pc4backstage/hrmengine/components/matrix/maintenance/MaintenanceSettingView.js +++ /dev/null @@ -1,49 +0,0 @@ -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 deleted file mode 100644 index 8f74cf0..0000000 --- a/pc4backstage/hrmengine/components/matrix/maintenance/Maintenancer.js +++ /dev/null @@ -1,54 +0,0 @@ -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 deleted file mode 100644 index 03d0be6..0000000 --- a/pc4backstage/hrmengine/components/matrix/maintenance/MatrixMaintenance.js +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 571564c..0000000 --- a/pc4backstage/hrmengine/components/matrixAdjust/Content.js +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index b5c8792..0000000 --- a/pc4backstage/hrmengine/components/matrixAdjust/Dashboard.js +++ /dev/null @@ -1,70 +0,0 @@ -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 deleted file mode 100644 index 12d7b6f..0000000 --- a/pc4backstage/hrmengine/components/matrixAdjust/Result.js +++ /dev/null @@ -1,62 +0,0 @@ -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 deleted file mode 100644 index 9089f0b..0000000 --- a/pc4backstage/hrmengine/components/matrixAdjust/Timer.js +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index 392ba34..0000000 --- a/pc4backstage/hrmengine/components/matrixAdjust/index.js +++ /dev/null @@ -1,100 +0,0 @@ -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 deleted file mode 100644 index 8868350..0000000 --- a/pc4backstage/hrmengine/components/moduleManage/Editor.js +++ /dev/null @@ -1,182 +0,0 @@ -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 deleted file mode 100644 index 100f6a3..0000000 --- a/pc4backstage/hrmengine/components/moduleManage/index.js +++ /dev/null @@ -1,465 +0,0 @@ -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 deleted file mode 100644 index 7fd3bb7..0000000 --- a/pc4backstage/hrmengine/components/newPost/AsyncTree.js +++ /dev/null @@ -1,99 +0,0 @@ -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 deleted file mode 100644 index 4b371ff..0000000 --- a/pc4backstage/hrmengine/components/newPost/BriefInfo.js +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index 774dbaa..0000000 --- a/pc4backstage/hrmengine/components/newPost/Content.js +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index f2defa9..0000000 --- a/pc4backstage/hrmengine/components/newPost/Dialog.js +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 6b6bf22..0000000 --- a/pc4backstage/hrmengine/components/newPost/OrgTree.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 deleted file mode 100644 index ccf5bd0..0000000 --- a/pc4backstage/hrmengine/components/newPost/Tab.js +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index c320cbd..0000000 --- a/pc4backstage/hrmengine/components/newPost/Table.js +++ /dev/null @@ -1,110 +0,0 @@ -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 deleted file mode 100644 index 20643a3..0000000 --- a/pc4backstage/hrmengine/components/newPost/Top.js +++ /dev/null @@ -1,46 +0,0 @@ -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 deleted file mode 100644 index 7552ed2..0000000 --- a/pc4backstage/hrmengine/components/newPost/index.js +++ /dev/null @@ -1,76 +0,0 @@ -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 deleted file mode 100644 index 3544109..0000000 --- a/pc4backstage/hrmengine/components/normalLog/index.js +++ /dev/null @@ -1,116 +0,0 @@ -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 deleted file mode 100644 index b947a1b..0000000 --- a/pc4backstage/hrmengine/components/onlinAttendance/index.js +++ /dev/null @@ -1,102 +0,0 @@ -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 deleted file mode 100644 index 23031ff..0000000 --- a/pc4backstage/hrmengine/components/onlineAnalysis/Echarts.js +++ /dev/null @@ -1,78 +0,0 @@ -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 deleted file mode 100644 index d2da2d3..0000000 --- a/pc4backstage/hrmengine/components/onlineAnalysis/RadioGroup.js +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index a17189d..0000000 --- a/pc4backstage/hrmengine/components/onlineAnalysis/index.js +++ /dev/null @@ -1,194 +0,0 @@ -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 deleted file mode 100644 index adaa430..0000000 --- a/pc4backstage/hrmengine/components/orgChart/Chart.js +++ /dev/null @@ -1,32 +0,0 @@ -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 ( -
    - +
    + ) + } else if (item.schema == 'RSC') { + return ( +
    +
    + {item && item.head && item.head.id != '' ? : + + } +
    +
    +

    + {this.getHrmNameContent(item,weesoStore,index)} + {item.head.gender} + + +

    + { + item.foot && item.foot.info && item.foot.info.length != 0 && item.foot.info.map(i => { + return ( +

    + {i.key}: +

    { + i.value + && (i.value.indexOf('desensitization__') > -1 || i.value.indexOf('encryption__') > -1) + ? () + : i.value + } +

    +

    + ) + } + ) + } +
    + {this.getCommonComtent(item.head)} +
    + ) + } else { + const other = item.other ? JSON.parse(item.other) : undefined; + return ( + + } + } + + + {this.props.weesoStore.wpLoaded && window.weaWorkplan && window.weaWorkplan.com && window.weaWorkplan.com.WorkPlanCreate && + {this.setState({workPlanVisible: false})}} + onlyClose={() => {this.setState({workPlanVisible: false})}} + isCustom={true} + selectUser={this.state.id} + createConditionParams={[]} + /> + } + + + {this.setState({smsVisible: false})}} + > + {this.props.weesoStore.smLoaded && window.weaSmallApp && window.weaSmallApp.com && window.weaSmallApp.com.SendSms && + + } + + + ) + } + + //用户使用习惯记录 + userHabitCollect = (link, index) => { + const {weesoStore} = this.props; + weesoStore.userDatas.push({ + type: 'eventTrack', + key: weesoStore.inputValue, + contentType: weesoStore.defaultKey, + page: weesoStore.page, + searchType: weesoStore.defalutMoreKey, + sortField: weesoStore.sortValue, + timeStamp: String(new Date().getTime()), + index: String(index), + eventUrl: link + }) + } + + getHrmNameContent=(item,weesoStore,index)=>{ + if(item.head.titlelink&&item.head.titlelink!=''){ + return( + {this.userHabitCollect(item.head.titlelink,index)}} + > + + + ); + }else{ + return( + + + + ); + } + } + + getCommonComtent = (chooseValues) => { + const { addSubdomainUrl } = this.props.weesoStore; + return ( +
    +
    + { (chooseValues.hideMessage==undefined||chooseValues.hideMessage!='1')&& + sendMsg(chooseValues && chooseValues.id, 0, '', '')}> + + + } + { + (chooseValues.hideSms==undefined||chooseValues.hideSms!='1')&& + {this.setState({smsVisible: true, id: chooseValues.id})}}> + + + } + + { + (chooseValues.hideEmail==undefined||chooseValues.hideEmail!='1')&& + window.open(`${addSubdomainUrl('/spa/email/static/index.html#/main/email/new?isInternal=1&internalto=')}${chooseValues && chooseValues.id}`)}> + + + } + + { + (chooseValues.hideWorkPlan==undefined||chooseValues.hideWorkPlan!='1')&& + {this.setState({workPlanVisible: true, id: chooseValues.id})}}> + + + } +
    +
    + ) + } +} diff --git a/pc4mobx/esearch/components/childComponents/ImagesContent.js b/pc4mobx/esearch/components/childComponents/ImagesContent.js new file mode 100644 index 0000000..eaee1f5 --- /dev/null +++ b/pc4mobx/esearch/components/childComponents/ImagesContent.js @@ -0,0 +1,49 @@ +import React from 'react'; +import {inject, observer} from 'mobx-react'; +import {WeaZmage} from 'ecCom'; +import {toJS} from 'mobx'; + +@inject('weesoStore') +@observer +export default class ImagesContent extends React.Component { + constructor(props) { + super(props); + this.state = { + img: this.props.values && this.props.values.imgUrl + } + } + + render() { + let {values, weesoStore, index} = this.props; + let {imageResult, addSubdomainUrl} = weesoStore; + imageResult = toJS(imageResult); + values = toJS(values); + let + imgWidth = Number(values.width), + imgHeight = Number(values.height); + + let imgSet = []; + imageResult && imageResult.length != 0 && imageResult.map(item => { + imgSet.push({ + src: item.imgUrl, + onError: () => { + this.setState({img: '/spa/esearch/images/default.png'}) + } + }) + }) + return ( +
    160 ? (imgWidth*160)/imgHeight : imgWidth)}}> + { + this.setState({img: '/spa/esearch/images/default.png'}) + }} + page={index} + /> +

    +

    ${values && values.title}`}} >

    +
    + ) + } +} diff --git a/pc4mobx/esearch/components/childComponents/SearchTools.js b/pc4mobx/esearch/components/childComponents/SearchTools.js new file mode 100644 index 0000000..e929d19 --- /dev/null +++ b/pc4mobx/esearch/components/childComponents/SearchTools.js @@ -0,0 +1,518 @@ +import React from 'react'; +import {Popover, Row, Modal, QueueAnim, Button, message} from 'antd'; +import {WeaInput, WeaButton, WeaSelect, WeaInputSearch, WeaDatePicker, WeaBrowser, WeaTools, WeaFormItem, WeaLocaleProvider, + WeaSearchGroup, WeaDialog } from 'ecCom'; +import {WeaTableNew, WeaSwitch} from 'comsMobx'; +import AboutTime from '../childComponents/aboutTime2'; +import AboutBrowser from '../childComponents/aboutBrowser2'; +import AboutSelsect from '../childComponents/aboutSelect2'; +const getLabel = WeaLocaleProvider.getLabel; +const types = WeaTools.types; +const getKey = WeaTools.getKey; +import {inject, observer} from 'mobx-react'; +import {toJS} from 'mobx'; + +const store = ['routing', 'weesoStore', 'weesoSeachSetStore'] +@inject(...store) +@observer +export default class SearchTools extends React.Component { + constructor(props) { + super(props); + this.state = { + } + } + + componentDidMount() { + setTimeout(() => { + const toolTip = $('.tool-icon-tip'); + if(toolTip){ + toolTip.fadeIn(300, () => { + setTimeout(() => { + toolTip.fadeOut(500); + },1500) + }) + } + }, 3000); + this.addStyle(); + document.addEventListener("click", this.maskFun,false); + } + + componentWillUnmount() { + const { setState } = this.props.weesoStore; + setState({ showToolPopover: false }); + $('#esearch-propver-mask').remove(); + document.removeEventListener("click", this.maskFun,false); + const { adSearchFormReset } = this.props.weesoSeachSetStore; + adSearchFormReset(); + } + + maskFun = (e) => { + const { setState } = this.props.weesoStore; + if(e.target) { + if(!$(e.target).hasClass('tool-right') && $(e.target).closest('.wesult-top-container').length > 0) { + setState({ showToolPopover: false }); + } + if($(e.target).hasClass('ant-popover-mask')) { + setState({ showToolPopover: false }); + } + } + } + + addStyle = () => { + const style = document.createElement('style'); + style.id = 'esearch-propver-mask'; + style.type = 'text/css'; + style.innerHTML = `.ant-popover-mask { + position: fixed; + top: 115px; + bottom: 0px; + width: 100%; + }`; + document.getElementsByTagName('head')[0].appendChild(style); + const style2 = document.createElement('style'); + style2.id = 'esearch-propver-mask-hidden'; + style2.type = 'text/css'; + style2.innerHTML = `.ant-popover-mask-hidden { + display: none; + }`; + document.getElementsByTagName('head')[0].appendChild(style2); + } + + adOnChange = () => { + const { setState } = this.props.weesoSeachSetStore; + setState({ searchTagParams: {} }); + } + + getSearchs() { + const { adSearchForm, adSearchFormConditions } = this.props.weesoSeachSetStore; + const { isFormInit } = adSearchForm; + let group = []; + + isFormInit && adSearchFormConditions && + toJS(adSearchFormConditions).map((c, _index) => { + let items = []; + c.items.map(field => { + let col = 1; + + items.push({ + com: ( + + + + ), + col: col, + hide: adSearchForm.isHide(field, (keys, allParams) => { + return false; + }) + }); + }); + group.push( + + ); + }); + return group; + } + + saveCommonCondition = () => { + const { setState } = this.props.weesoSeachSetStore; + const { inputValue } = this.props.weesoStore; + setState({ commonDialogVisible: true, commonDialogInputVal: inputValue }); + } + + filterParams = () => { + let { browserKeyArr, adSearchForm } = this.props.weesoSeachSetStore; + const formParams = adSearchForm.getFormParams(); + let search_json = { ...formParams }; + delete search_json.showorder; + delete search_json.tagName; + delete search_json.tagTitle; + browserKeyArr = toJS(browserKeyArr); + Object.keys(search_json).forEach(key => { + if(browserKeyArr.some(v => v === key)) { + if(search_json[key] !== '') { + search_json[key] = search_json[key].split(','); + } else { + delete search_json[key]; + } + } + }); + return search_json; + } + + adSearchToolContent = () => { + const {weesoStore} = this.props; + let {searchDatas, showToolPopover, maskClosable, searchForm, getTypeDatas} = weesoStore; + const { adSearchForm, searchTagParams, adSearchFormReset, setState } = this.props.weesoSeachSetStore; + + //高级搜索是否显示图标处理 + let searchParamsArray = []; + const searchParams = adSearchForm.getFormParams(); + return( +
    + { this.getSearchs() } +
    + { + const { adSearchForm } = this.props.weesoSeachSetStore; + if(this.filterParams && this.filterParams() && (this.filterParams().CREATEDATE_date_select === '5')) { + if(this.filterParams().CREATEDATE_range_picker_start === undefined || this.filterParams().CREATEDATE_range_picker_start === '' + || this.filterParams().CREATEDATE_range_picker_end === undefined || this.filterParams().CREATEDATE_range_picker_end === '' + ) { + adSearchForm.showError("CREATEDATE_date_select", getLabel('524259','必填项未填写!')) + return; + } + } + if(searchParamsArray.length!==0) { + weesoStore.isShowSearchIcon = true //控制是否显示图标 + }else { + weesoStore.isShowSearchIcon = false + } + weesoStore.setState({ + showToolPopover: false, + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }); + weesoStore.toolChangeInit(); + weesoStore.preSearch({ + searchTagId: searchTagParams.key || '', + page_search_json: JSON.stringify(this.filterParams()) + }); + }} + text={getLabel(197,"搜索")} + /> + + { + setState({ searchTagParams: {} }); + adSearchFormReset(); + }} + text={getLabel(2022,"重置")} + /> +
    +
    + ); + } + + + filterAdParams = (form, browserKeyArr) => { + if(form === undefined || browserKeyArr === undefined) return; + const formParams = form.getFormParams(); + let search_json = { ...formParams }; + + delete search_json.showorder; + delete search_json.tagName; + delete search_json.tagTitle; + browserKeyArr = toJS(browserKeyArr); + + Object.keys(search_json).forEach(key => { + let json = toJS(search_json[key]); + if(typeof json === 'object') { // 过滤obj + let objA = { ...search_json[key] }; + search_json = { + ...search_json, + ...objA + }; + } + if(browserKeyArr.some(v => v === key)) { + if(search_json[key] !== '') { + search_json[key] = search_json[key].split(','); + } else { + delete search_json[key]; + } + } + + browserKeyArr.forEach(v => {// 过滤浏览按钮span + if(key.indexOf('span') > -1 && key.indexOf(v) > -1) { + delete search_json[key]; + } + }); + + if(search_json[key] === '') {// 过滤''值 + delete search_json[key]; + } + }); + if(search_json.CREATERID !== undefined && search_json.CREATERID !== '') { + search_json = { + ...search_json, + CREATERID_select: '2' + }; + } + + return search_json; + } + + addCommonSaveBtn = () => { + const { inputValue, defalutMoreKey } = this.props.weesoStore; + let { setState, commonDialogInputVal, adSearchForm, browserKeyArr, doSaveSearchTag } = this.props.weesoSeachSetStore; + const formParams = adSearchForm.getFormParams(); + if(commonDialogInputVal === '') { + message.error(getLabel('524259','必填项未填写!') ); + } else { + let search_json = this.filterAdParams(adSearchForm, browserKeyArr); + + let p = { + id: '', + search_type: defalutMoreKey, + tagTitle: commonDialogInputVal, + tagName: inputValue || commonDialogInputVal, + search_json: JSON.stringify(search_json) + }; + doSaveSearchTag(p, () => { + setState({ commonDialogVisible: false, commonDialogInputVal: '' }); + }); + } + } + + addCommonBtns = () => { + let btns = []; + btns.push( + , + ); + return btns; + } + + getDialog = () => { + const dialogW = 600, dialogH = 140; + const { collectParams, commonDialogVisible, setState, stepForm, stepConditions, commonDialogInputVal } = this.props.weesoSeachSetStore; + return( { setState({ commonDialogVisible: false }) }} + > + + {setState({commonDialogInputVal: val});}}/> +
    {getLabel('524260','举例:一周内张三创建的文档') }
    +
    +
    ); + } + + adIconVisible = () => { + let { searchTagParams } = this.props.weesoSeachSetStore; + let { defalutMoreKey } = this.props.weesoStore; + let bool = false; + let formP = this.filterParams(); + if(searchTagParams.key && searchTagParams.key !== '') { + bool = true; + } + if(formP) { + Object.keys(formP).forEach(key => { + if(key === 'CREATEDATE_date_select') { + } else { + if(typeof formP[key] === 'string') { + formP[key] !== '' && (bool = true); + } + if(Array.isArray(formP[key]) && formP[key].length > 0) { + bool = true; + } + } + }); + if(formP.CREATEDATE_date_select && formP.CREATEDATE_date_select !== '0') { + bool = true; + } + if(defalutMoreKey === 'WKP') { + if(formP.BEGINDATE_date_select === '0' && formP.CREATEDATE_date_select === '0') { + bool = false; + if(formP.RESOURCEID && formP.RESOURCEID.length > 0) { + bool = true; + } + } + } + } + if(defalutMoreKey === 'FAQ') { + if(String(formP.updatedate_date_select) === '0') { + bool = false; + } + } + return bool; + } + + render() { + const {weesoStore} = this.props; + let {searchDatas, showToolPopover, maskClosable, searchForm, getTypeDatas} = weesoStore; + searchDatas = toJS(searchDatas); + getTypeDatas = toJS(getTypeDatas); + let key1 = searchDatas.key1 || '', pagese = searchDatas.pagese || ''; + const { getAdConditions, searchTagParams } = this.props.weesoSeachSetStore; + //高级搜索是否显示图标处理 + let searchParamsArray = []; + const searchParams = searchForm.getFormParams(); + for(let key in searchParams){ + let val = searchParams[key].toString(); + if(val !== '' && val !==','){ + searchParamsArray.push(val) + } + } + + const toolContent = ( +
    + {this.getType()} +
    + { + if(searchParamsArray.length!==0) { + weesoStore.isShowSearchIcon = true //控制是否显示图标 + }else { + weesoStore.isShowSearchIcon = false + } + weesoStore.setState({ + showToolPopover: false, + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }); + weesoStore.toolChangeInit(); + const { filterParams } = this.props.weesoSeachSetStore; + let p = { page_search_json: JSON.stringify(filterParams())}; + weesoStore.preSearch(p); + }} + text={getLabel(197,"搜索")} + /> + { + }} + text={getLabel('524258','存为常用条件') } + /> + { + weesoStore.resetForm(); + }} + text={getLabel(2022,"重置")} + /> +
    +
    + ) + let isChina = true; + if(localStorage.languageidweaver === '8') {// 英文模式 + isChina = false; + } + + return ( +
    +

    + /g, '')}> + + {pagese} + + {(key1 && weesoStore.showSubmitIcon) && + + weesoStore.doSubmit()} + onMouseOver={() => $('.tool-icon-tip') && $('.tool-icon-tip').show()} + onMouseOut={() => $('.tool-icon-tip') && $('.tool-icon-tip').hide()} + /> + +

    +

    +

    {getLabel(384972,'当前结果不满意?请点击这里')}

    +
    + + } +

    + + + {this.getType().length != 0 && + {weesoStore.setState({showToolPopover: v})}} + mask={showToolPopover} + maskClosable={maskClosable} + zIndex={1000} + overlayClassName="weeso-style-popover weeso-ad-search-popver" + + > +

    { + weesoStore.setState({showToolPopover: !showToolPopover}); + // getAdConditions({ id: searchTagParams.key||'', search_json: JSON.stringify(this.filterParams()) }); + }} + style={{ width: isChina ? 90 : 160 }} + > + {getLabel(347,"高级搜索")} + {this.adIconVisible() && } +

    +
    + } + { this.getDialog() } +
    + ) + } + + //处理搜索工具 + getSearchInfo = (type, item, bindObj) => { + if (type == types.BROWSER) { + return + } else if (type == types.RANGEPICKER) { + return + } else if (type == types.SELECT) { + return + } else if (type == types.INPUT) { + return ( + + ) + } + } + + getType = () => { + const {weesoStore} = this.props; + let {searchConditions, searchForm} = weesoStore; + const {isFormInit} = searchForm; + searchConditions = toJS(searchConditions); + const arr = []; + searchConditions && isFormInit && searchConditions.length!==0 && searchConditions.map(field => { + const type = field.conditionType.toUpperCase(); + const key = getKey(field); + const bindObj = searchForm.$(key); + const searchParams = searchForm.getFormParams(); + if(type != types.RANGEPICKER || (key=='CREATEDATE_range_picker'&&type == types.RANGEPICKER && searchParams.CREATEDATE_date_select == '5')|| (key=='BEGINDATE_range_picker'&&type == types.RANGEPICKER && searchParams.BEGINDATE_date_select + == '5')){ + arr.push( + + + {this.getSearchInfo(type, field, bindObj)} + + ) + } + }) + return arr; + } +} diff --git a/pc4mobx/esearch/components/childComponents/WeesoInput.js b/pc4mobx/esearch/components/childComponents/WeesoInput.js new file mode 100644 index 0000000..2e8e143 --- /dev/null +++ b/pc4mobx/esearch/components/childComponents/WeesoInput.js @@ -0,0 +1,565 @@ +import React from 'react'; +import {Icon, Menu, Dropdown, Popover, Button, Spin, Modal} from 'antd'; +import {WeaInput, WeaSelect, WeaLocaleProvider} from 'ecCom'; +import {inject, observer} from 'mobx-react'; +import {toJS} from 'mobx'; +const getLabel = WeaLocaleProvider.getLabel; + +const store = ['routing', 'weesoStore', 'weesoSeachSetStore'] +@inject(...store) +@observer +export default class Weeso extends React.Component { + constructor(props) { + super(props); + this.state = { + timeoutMarker: undefined, + topTabsWrapperWidth: 456 + }; + this.topTabsWrapper = React.createRef(); + } + + componentDidMount() { + } + + componentDidUpdate(prevProps, prevState, prevContext) { + const {weesoStore} = this.props; + //tabs计算获得每个li的宽度 + let tabs = $('.weeso-tab-content li'); + //Object.keys(weesoStore.widthMap).length == 0 -- 保证只获取一次 + if (Object.keys(weesoStore.widthMap).length == 0 && tabs.length != 0) { + tabs.map(item => { + let itemWid = $('.weeso-tab-content li')[item].clientWidth + weesoStore.widthMap[tabs[item].id] = itemWid + }) + weesoStore.resortTopTaps(); + } + + //处理理由跳转之后,光标位置 + $('.input').focus(); + if(weesoStore.isRouting || weesoStore.isHotkeySearch){ + const inputNode = ReactDOM.findDOMNode(this.refs.inputNode); + inputNode.setSelectionRange(weesoStore.selectionStart,weesoStore.selectionEnd) + weesoStore.isRouting = false; + weesoStore.isHotkeySearch = false; + } + this.setTopTabsWrapperWidth(); + } + + componentWillUnmount() { + const { resortTopTaps } = this.props.weesoStore; + resortTopTaps(); + window.clearTimeout(this.state.timeoutMarker); + } + + setTopTabsWrapperWidth = () => { + setTimeout(() => { + if(this.topTabsWrapper && this.topTabsWrapper.current !== null && this.topTabsWrapper.current.offsetWidth) { + let currentWidth = this.topTabsWrapper.current.offsetWidth+33; + if(currentWidth > this.state.topTabsWrapperWidth) { + this.setState({ topTabsWrapperWidth: currentWidth }); + } + } + }, 0); + } + + getAdConditionsForm = () => { + if(this.props.routing && this.props.routing.location) { + const { pathname } = this.props.routing.location; + const { weesoSeachSetStore } = this.props; + if(pathname === 'main/esearch/result') { + weesoSeachSetStore.getAdConditions(); + } + } + } + + render() { + const { search } = this.props.routing.location; + const {weesoStore, routing, weesoSeachSetStore} = this.props; + let {defalutMoreKey, inputValue, hotkeys, iconClick, copiedcontentType1, copiedcontentType2, baseDadas} = weesoStore; + let { search_type, page_descStr, setState, page_uuid } = this.props.weesoSeachSetStore; + hotkeys = toJS(hotkeys); + copiedcontentType1 = toJS(copiedcontentType1); + copiedcontentType2 = toJS(copiedcontentType2); + + if (copiedcontentType1 && copiedcontentType1.length != 0) { + debugger + } + + //二开 + console.log(search_type); + search_type = 'ALL'; + console.log(page_uuid); + page_uuid = "FULLSEARCH" + + const placeHolder = weesoStore.defaultKey === 'CONTENT' ? getLabel(384222,'请输入搜索内容关键字') : getLabel(384223,'请输入搜索图片关键字'); + const hotkeysContent = ( +
      + { hotkeys && hotkeys.length != 0 && hotkeys.map((item, index) => { + return
    • { + weesoStore.setState({inputValue: item}); + if(!weesoStore.isSearch && baseDadas.FLAG != -1){ + weesoStore.changeKey(weesoStore.defalutMoreKey, false); + routing.push(`/main/esearch/result${search}`); + } + weesoStore.isShowSearchIcon = false; + const { filterParams } = this.props.weesoSeachSetStore; + let p = { page_search_json: JSON.stringify(filterParams())}; + weesoStore.preSearch(p); + }} + >{item}
    • + })} +
    + ) + if(page_uuid === 'FULLSEARCH' || page_uuid === '') { + return ( +
    +
    + {this.props.hideTitle === "true" ? +
    + { page_descStr && page_descStr!== '' ?
    { page_descStr }
    : ''} +
    + : +
    + +
      + {copiedcontentType1 && copiedcontentType1.length != 0 && copiedcontentType1.map(item => { + return ( +
    • { + weesoStore.setState({ + defalutMoreKey: item.key, + showToolPopover: false, + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }); + weesoStore.commonInit(); + weesoStore.changeKey(item.key); + weesoSeachSetStore.adSearchFormReset(); + weesoSeachSetStore.getAdConditions(); + weesoSeachSetStore.setState({ searchTagParams: {} }, () => { + const { filterParams } = this.props.weesoSeachSetStore; + let p = { page_search_json: JSON.stringify(filterParams())}; + weesoStore.preSearch(p); + }); + }} + >{item.name}
    • + ) + })} +
    +
    + {copiedcontentType2.length !== 0 && +
    + + {copiedcontentType2 && copiedcontentType2.length!==0 && copiedcontentType2.map((item, index) => { + return ( +
  • + { + weesoStore.setState({ + defalutMoreKey: item.key, + showToolPopover: false, + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }, () => { + this.getAdConditionsForm(); + }); + weesoStore.commonInit(); + weesoStore.changeKey(item.key); + weesoStore.resortTopTaps(); + weesoSeachSetStore.adSearchFormReset(); + weesoSeachSetStore.setState({ searchTagParams: {} }, () => { + const { filterParams } = this.props.weesoSeachSetStore; + let p = { page_search_json: JSON.stringify(filterParams())}; + weesoStore.isSearch && weesoStore.preSearch(p); + }); + }} + >{item.name} +
  • + ) + })} + + } + > + + + +
    +
    } +
    + } +
    +
    + + { + weesoStore.setState({showHotKeys: inputValue == '' ? false : v}) + }} + style={{top: 84}} + overlayClassName="weeso-hotkeys-popover" + > + { + this.inputChange(e.target.value); + weesoStore.setState({myKey: -1}); + weesoSeachSetStore.setState({ searchTagParams: {} }); + // weesoSeachSetStore.adSearchFormReset(); + }} + onKeyDown={(e) => { + this.myKeyDown(e); + }} + /> + + {/* { + this.commonSearchFun(e); + }} + onMouseDown = {(e) => { + e.preventDefault(); //点击搜索,输入框不失去焦点 + }} + >{getLabel(197, "搜索")} */} + + +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + ) + }; + + + + + return ( +
    +
    + {this.props.hideTitle === "true" ? +
    + { page_descStr && page_descStr!== '' ?
    { page_descStr }
    : ''} +
    + : + (search_type === 'ALL' && (page_uuid === 'FULLSEARCH' || page_uuid === '')) ?
    + +
      + {copiedcontentType1 && copiedcontentType1.length != 0 && copiedcontentType1.map(item => { + return ( +
    • { + weesoStore.setState({ + defalutMoreKey: item.key, + showToolPopover: false, + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }); + weesoStore.commonInit(); + weesoStore.changeKey(item.key); + weesoSeachSetStore.adSearchFormReset(); + weesoSeachSetStore.getAdConditions(); + weesoSeachSetStore.setState({ searchTagParams: {} }, () => { + const { filterParams } = this.props.weesoSeachSetStore; + let p = { page_search_json: JSON.stringify(filterParams())}; + weesoStore.preSearch(p); + }); + }} + >{item.name}
    • + ) + })} +
    +
    + {copiedcontentType2.length !== 0 && +
    + + {copiedcontentType2 && copiedcontentType2.length!==0 && copiedcontentType2.map((item, index) => { + return ( +
  • + { + weesoStore.setState({ + defalutMoreKey: item.key, + showToolPopover: false, + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }); + weesoStore.commonInit(); + weesoStore.changeKey(item.key); + weesoStore.resortTopTaps(); + weesoSeachSetStore.adSearchFormReset(); + weesoSeachSetStore.setState({ searchTagParams: {} }, () => { + const { filterParams } = this.props.weesoSeachSetStore; + let p = { page_search_json: JSON.stringify(filterParams())}; + weesoStore.isSearch && weesoStore.preSearch(p); + }); + }} + >{item.name} +
  • + ) + })} + + } + > + + + +
    +
    } +
    + : + ( page_descStr && page_descStr!== '' ?
    { page_descStr }
    : '') + } +
    +
    + + { + weesoStore.setState({showHotKeys: inputValue == '' ? false : v}) + }} + style={{top: 84}} + overlayClassName="weeso-hotkeys-popover" + > + { + this.inputChange(e.target.value); + weesoStore.setState({myKey: -1}); + weesoSeachSetStore.setState({ searchTagParams: {} }); + // weesoSeachSetStore.adSearchFormReset(); + }} + onKeyDown={(e) => { + this.myKeyDown(e); + }} + /> + + {/* { + this.commonSearchFun(e); + }} + onMouseDown = {(e) => { + e.preventDefault(); //点击搜索,输入框不失去焦点 + }} + >{getLabel(197, "搜索")} */} + + + +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + ) + } + + //input框改变回调 + inputChange = (value) => { + const {weesoStore} = this.props; + weesoStore.setState({ + previousInputValue: weesoStore.inputValue, + inputValue: value, + currentInputValue: value, + isSearchSucess: false + }); + this.searchDelay(); + } + + //图片翻转效果 + onClick = (e) => { + const {weesoStore} = this.props; + const { filterParams } = this.props.weesoSeachSetStore; + weesoStore.setState({ + iconClick: !weesoStore.iconClick, + defaultKey: weesoStore.iconClick ? 'CONTENT' : 'PICTURE', + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }) + weesoStore.commonInit(); + weesoStore.preSearch({ page_search_json: JSON.stringify(filterParams()) }); + // !weesoStore.isLocked && weesoStore.preSearch(); + } + + //延时搜索 + searchDelay = (value) => { + const {weesoStore} = this.props; + if (this.state.timeoutMarker) { + window.clearTimeout(this.state.timeoutMarker) + } + this.setState({ + timeoutMarker: setTimeout(() => { + let previousValue = weesoStore.previousInputValue; + if (weesoStore.inputValue && previousValue != weesoStore.inputValue) { + !weesoStore.isSearchSucess && weesoStore.setState({showHotKeys: true}) + weesoStore.getAssociate({key: weesoStore.inputValue}); + } + if (!weesoStore.inputValue) { + weesoStore.setState({showHotKeys: false}) + window.clearTimeout(this.state.timeoutMarker); + } + }, 300) + }); + } + + //键盘事件 + myKeyDown = (e) => { + const {weesoStore, routing} = this.props; + let {myKey, hotkeys, showHotKeys, currentInputValue} = weesoStore; + hotkeys = toJS(hotkeys); + + if (e.keyCode == 13) { + this.commonSearchFun(e); + } else if (e.keyCode == 40) { + if (showHotKeys && hotkeys.length != 0) { + if (myKey < hotkeys.length - 1 && myKey >= -1) { + weesoStore.setState({myKey: myKey + 1, inputValue: hotkeys[myKey + 1]}) + } else { + weesoStore.setState({myKey: -1, inputValue: currentInputValue}) + } + } + } else if (e.keyCode == 38) { + e.preventDefault();//阻止光标的默认事件 + if (showHotKeys && hotkeys.length != 0) { + if (myKey > 0) { + weesoStore.setState({myKey: myKey - 1, inputValue: hotkeys[myKey - 1]}) + } else if (myKey == 0) { + weesoStore.setState({myKey: -1, inputValue: currentInputValue}) + } else { + weesoStore.setState({myKey: hotkeys.length - 1, inputValue: hotkeys[hotkeys.length - 1]}) + } + } + } + } + + //点击按钮搜索和enter搜索共同方法 + commonSearchFun = (e) => { + const {weesoStore, routing} = this.props; + e.preventDefault();//阻止光标的默认事件 + //获得光标位置 + const inputNode = ReactDOM.findDOMNode(this.refs.inputNode); + weesoStore.setState({ + inputNode: ReactDOM.findDOMNode(this.refs.inputNode), + selectionStart: inputNode.selectionStart, + selectionEnd: inputNode.selectionEnd, + skipSearchParams: { + currentPage: 0, + lastRealNumber: 0, + }, + }) + + if(!weesoStore.isSearch && weesoStore.inputValue !== ''){ + weesoStore.isRouting = true; + weesoStore.changeKey(weesoStore.defalutMoreKey, false); + // weesoStore.baseDadas.FLAG != -1 && routing.push('/main/esearch/result'); + weesoStore.baseDadas.FLAG != -1 && this.pushRouter(); + } + weesoStore.commonInit(); + const { search } = this.props.routing.location; + if(search.indexOf('type=') < 0 && (weesoStore.inputValue === undefined || weesoStore.inputValue === '')) { + routing.push(`/main/esearch/weeso${search}`); + } else { + const { filterParams } = this.props.weesoSeachSetStore; + weesoStore.preSearch({ page_search_json: JSON.stringify(filterParams()) }); + } + } + + pushRouter = () => { + const { search } = this.props.routing.location; + let page_uuid = this.props.routing.location && this.props.routing.location.query && this.props.routing.location.query.page_uuid; + // if(page_uuid) { + // this.props.routing.push(`/main/esearch/result?page_uuid=${page_uuid}`); + // } else { + // } + this.props.routing.push(`/main/esearch/result${search}`); + } + + +} \ No newline at end of file diff --git a/pc4mobx/esearch/components/childComponents/WeesoTop.js b/pc4mobx/esearch/components/childComponents/WeesoTop.js new file mode 100644 index 0000000..a3e3799 --- /dev/null +++ b/pc4mobx/esearch/components/childComponents/WeesoTop.js @@ -0,0 +1,288 @@ +import React from 'react'; +import {Button, Popover} from 'antd'; +import {WeaSelect, WeaLocaleProvider} from 'ecCom'; +import {inject, observer} from 'mobx-react'; +import {toJS} from 'mobx'; +const getLabel = WeaLocaleProvider.getLabel; + +import ApiSet from '../ApiSet'; +import WeesoSearchSet from '../weesoSearchSet'; + +const store = [ + 'weesoStore', + 'weesoSetStore', + 'routing', + 'weesoSeachSetStore' +] +@inject(...store) +@observer +export default class WeesoTop extends React.Component { + constructor(props) { + super(props); + this.state = { + setMaskClosable: true + } + } + + componentDidMount() { + } + + componentWillUnmount() { + } + + render() { + const {weesoStore} = this.props; + let { + setVisible, sysVisible, perVisible, sysadminVisible, + numberValue, searchValue, sortValue, baseDadas, + addSubdomainUrl + } = weesoStore; + baseDadas = toJS(baseDadas); + let + sysBtn = baseDadas.sysBtn || [], + hotKeyPer = baseDadas.hotKey && baseDadas.hotKey.per || [], + hotKeySys = baseDadas.hotKey && baseDadas.hotKey.sys || [], + numperpage = baseDadas.searchSet && baseDadas.searchSet.numperpage || [], + searchField = baseDadas.searchSet && baseDadas.searchSet.searchField || [], + sortField = baseDadas.searchSet && baseDadas.searchSet.sortField || []; + let hasPer = true, hasSys = true; + if(baseDadas.hotKey) { + baseDadas.hotKey.hasPer !== undefined && (hasPer = baseDadas.hotKey.hasPer); + baseDadas.hotKey.hasSys !== undefined && (hasSys = baseDadas.hotKey.hasSys); + } + + const {setMaskClosable} = this.state; + const sysadminContent = ( +
      + {sysBtn && sysBtn.length != 0 && sysBtn.map(item => { + return ( +
    • {item.title}
    • + ) + })} +
    + ) + const sysContent = ( +
      + { hotKeySys.length ===0 &&
    • {getLabel('391116','暂无热点')}
    • } + {hotKeySys && hotKeySys.length!==0 && hotKeySys.map(item => { + return ( +
    • { + weesoStore.sysVisible = false; + this.hotCommonClick(item); + }}>{item}
    • + ) + })} +
    + ) + const perContent = ( +
      + { hotKeyPer.length ===0 &&
    • {getLabel('391116','暂无热点')}
    • } + {hotKeyPer && hotKeyPer.length!==0 && hotKeyPer.map(item => { + return ( +
    • { + weesoStore.perVisible = false; + this.hotCommonClick(item); + }}>{item}
    • + ) + })} +
    + ) + const searchContent = ( +
    +

    + {getLabel(384226, "搜索设置")} +

    +
    +
    + {getLabel(17491, "每页显示记录数")}: + + { + weesoStore.setState({numberValue: v}) + this.setState({setMaskClosable: true}) + }} + onFocus={() => { + this.setState({setMaskClosable: false}) + }} + onBlur={() => { + this.setState({setMaskClosable: true}) + }} + layout={this.refs.contentWrapper} + /> + + {getLabel(18256, "条")} +
    +
    + {getLabel(19332, "高级设置")}: + + { + weesoStore.setState({searchValue: v}) + this.setState({setMaskClosable: true}) + }} + layout={this.refs.contentWrapper} + onFocus={() => { + this.setState({setMaskClosable: false}) + }} + onBlur={() => { + this.setState({setMaskClosable: true}) + }} + style={{maxWidth:'120px'}} + /> + + + { + weesoStore.setState({sortValue: v}) + this.setState({setMaskClosable: true}) + }} + layout={this.refs.contentWrapper} + onFocus={() => { + this.setState({setMaskClosable: false}) + }} + onBlur={() => { + this.setState({setMaskClosable: true}) + }} + style={{maxWidth:'120px'}} + /> + +
    +
    +
    + +
    +
    + ) + return ( +
    +
      +
    • + { + weesoStore.setState({setVisible: v}) + }} + mask={true} + maskClosable={setMaskClosable} + overlayClassName="weeso-style-popover" + > + { + weesoStore.setState({setVisible: !setVisible}) + }}>{getLabel(30747, "设置")} + +
    • + {hasPer &&
    • + { + weesoStore.setState({perVisible: v}) + }} + overlayClassName="weeso-style-popover" + > + { + weesoStore.setState({perVisible: !perVisible}) + }}>{getLabel(81784, "个人热点")} + +
    • } + {hasSys &&
    • + { + weesoStore.setState({sysVisible: v}) + }} + overlayClassName="weeso-style-popover" + > + { + weesoStore.setState({sysVisible: !sysVisible}) + }}>{getLabel(81783, "系统热点")} + +
    • } + + {weesoStore.showAdmin && sysBtn && sysBtn.length != 0 && sysBtn.length > 4 && +
    • + { + weesoStore.setState({sysadminVisible: v}) + }} + overlayClassName="weeso-style-popover" + > + { + weesoStore.setState({sysadminVisible: !sysadminVisible}) + }}>{getLabel(25433, "管理")} + +
    • + } +
    + +
      + {weesoStore.showAdmin && sysBtn && sysBtn.length != 0 && sysBtn.map((item,index) => { + if(item.id == 0){ + return
    • +
      { + const { setState, getCusPageSetList } = this.props.weesoSeachSetStore; + setState({ dialogVisible: true }, () => { + getCusPageSetList(); + }); + }}> {item.title}
      +
    • + } + if(item.id == 1){ + return
    • {item.title}
    • + } + if(item.id == 2) { + return
    • window.open(addSubdomainUrl('/spa/esearch/static/index.html#/main/esearch/robot'))}>{item.title}
    • + } + if(item.id == 3){ + return
    • this.props.weesoSetStore.setState({showDialog: true})}>{item.title}
    • + } + })} +
    + + + +
    + ) + } + + //系统热点、个人热点--共有方法 + hotCommonClick = (item) => { + const {weesoStore, routing} = this.props; + const { search } = routing.location; + weesoStore.setState({ + inputValue: item, + isHotkeySearch: true, + selectionStart: item.length, + selectionEnd: item.length + }); + const { filterParams } = this.props.weesoSeachSetStore; + let p = { page_search_json: JSON.stringify(filterParams())}; + weesoStore.preSearch(p); + if(!weesoStore.isSearch){ + weesoStore.changeKey(weesoStore.defalutMoreKey, false); + weesoStore.baseDadas.FLAG != -1 && routing.push(`/main/esearch/result${search}`); + } + } + + opt = (datas) => { + let options = []; + datas = toJS(datas); + datas && datas.length!==0 && datas.map(item => { + options.push({ + key: item.key, + selected: item.selected, + showname: item.showname, + }) + }) + return options; + } +} diff --git a/pc4mobx/esearch/components/childComponents/aboutBrowser2.js b/pc4mobx/esearch/components/childComponents/aboutBrowser2.js new file mode 100644 index 0000000..a59ce1b --- /dev/null +++ b/pc4mobx/esearch/components/childComponents/aboutBrowser2.js @@ -0,0 +1,45 @@ +import React from 'react'; +import {WeaBrowser} from 'ecCom'; +import {toJS} from 'mobx'; +import {inject, observer} from 'mobx-react'; + +@inject('weesoStore') +@observer +export default class AboutBrowser extends React.Component { + constructor(props) { + super(props); + this.state = { + } + } + + render() { + const {values, weesoStore, bindObj} = this.props; + return ( + { + weesoStore.setState({maskClosable: true}); + bindObj.onChange(...args)} + } + onFocus={() => { + weesoStore.setState({maskClosable: false}) + }} + onBlur={() => { + weesoStore.setState({maskClosable: true}) + }} + onOpen={() => { + weesoStore.setState({maskClosable: false}) + }} + onClose={() => { + weesoStore.setState({maskClosable: true}) + }} + onSearch={() => { + weesoStore.setState({maskClosable: false}) + }} + layout={document.body} + /> + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/components/childComponents/aboutSelect2.js b/pc4mobx/esearch/components/childComponents/aboutSelect2.js new file mode 100644 index 0000000..1cc3780 --- /dev/null +++ b/pc4mobx/esearch/components/childComponents/aboutSelect2.js @@ -0,0 +1,40 @@ +import React from 'react'; +import {WeaNewScroll, WeaSelect} from 'ecCom'; +import {inject, observer} from 'mobx-react'; +import {toJS} from 'mobx'; + +@inject('weesoStore') +@observer +export default class AboutSelect extends React.Component { + constructor(props) { + super(props); + this.state = { + } + } + + render() { + const {values, weesoStore, bindObj, container} = this.props; + return ( + + { + weesoStore.setState({ + showToolPopover: true, + maskClosable: true + }); + bindObj.onChange(...args) + }} + onFocus={() => { + weesoStore.setState({maskClosable: false}) + }} + onBlur={() => { + weesoStore.setState({maskClosable: true}) + }} + > + + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/components/childComponents/aboutTime2.js b/pc4mobx/esearch/components/childComponents/aboutTime2.js new file mode 100644 index 0000000..167085c --- /dev/null +++ b/pc4mobx/esearch/components/childComponents/aboutTime2.js @@ -0,0 +1,32 @@ +import React from 'react'; +import {WeaSelect, WeaRangePicker} from 'ecCom'; +import {inject, observer} from 'mobx-react'; +import {toJS} from 'mobx'; + +@inject('weesoStore') +@observer +export default class AboutTime extends React.Component { + constructor(props) { + super(props); + this.state = { + } + } + + componentDidMount() { + } + + render() { + const {weesoStore, values, bindObj} = this.props; + return ( + { + weesoStore.setState({showToolPopover: true}); + weesoStore.setState({maskClosable: true}); + bindObj.onChange(...args)}} + toggleOpen={(open) => {weesoStore.setState({maskClosable: !open.open})}} //阻止popover影响 + /> + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/components/robot/RobotDialog.js b/pc4mobx/esearch/components/robot/RobotDialog.js new file mode 100644 index 0000000..a8c3794 --- /dev/null +++ b/pc4mobx/esearch/components/robot/RobotDialog.js @@ -0,0 +1,140 @@ +import React from 'react'; +import {inject, observer} from 'mobx-react'; +import {toJS} from 'mobx'; +import {Button} from 'antd'; +import {WeaSwitch} from 'comsMobx'; +import { + WeaTools, + WeaFormItem, + WeaSearchGroup, + WeaRightMenu, + WeaDialog, + WeaNewScroll, + WeaAlertPage, + WeaLocaleProvider +} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +@inject('weesoRobotStore') +@observer +export default class WeesoRobotDialog extends React.Component { + constructor (props) { + super(props); + this.state = { + } + } + + componentDidMount () { + } + + getSearchs = (form, datas) => { + const {isFormInit} = form; + let group = []; + const formParams = form.getFormParams(); + isFormInit && datas && datas.map((c, _index) =>{ + let items = []; + c.items.map(fields => { + items.push({ + com:( + + + ), + colSpan:1, + hide: form.isHide(fields, (keys, allParams) => { + let bool = false; + keys[0] === 'url' && allParams.showDiv === '1' && (bool = true); + keys[0] === 'width' && allParams.showDiv === '0' && (bool = true); + keys[0] === 'height' && allParams.showDiv === '0' && (bool = true); + keys[0] === 'iframeUrl' && allParams.showDiv === '0' && (bool = true); + return bool; + }) + }) + }); + group.push() + }); + return group; + } + + getRightMenu() { + let btnArr = [ + { + key: 'BTN_SAVE', + icon: , + content : `${getLabel(86,'保存')}`, + onClick : () => this.doSave() + } + ] + return btnArr; + } + + trimSplace = (str) => { + return typeof str === 'string' ? str.replace(/(^\s*) \ (\s*$)/g, '') : str; + } + + doSave = () => { + const {weesoRobotStore} = this.props; + const {createForm, dialogStatus} = weesoRobotStore; + let formParams = createForm && createForm.getFormParams(); + const func = () => dialogStatus.createOrEdit == 0 ? weesoRobotStore.addRobot({...formParams}) : weesoRobotStore.editRobot({...formParams, id: dialogStatus.editId}); + createForm && createForm.validateForm().then(f=>{ + if(f.isValid){ + func(); + }else{ + formParams.title = this.trimSplace(formParams.title); + formParams.keywords = this.trimSplace(formParams.keywords); + formParams.url = this.trimSplace(formParams.url); + formParams.width = this.trimSplace(formParams.width); + formParams.height = this.trimSplace(formParams.height); + if(formParams.title !== '' && formParams.keywords !== '' && formParams.url !== '' && formParams.showDiv === '0'){ + func(); + }else if(formParams.title !== '' && formParams.keywords !== '' && formParams.iframeUrl !== '' && formParams.width !== '' && formParams.height!== '' && formParams.showDiv === '1'){ + func(); + }else { + f.showErrors(); + } + } + }); + } + + render() { + const {weesoRobotStore} = this.props; + const {dialogStatus, createForm, status} = weesoRobotStore; + const {collectParams} = toJS(status); + const {showDialog, createFields, saveLoading} = toJS(dialogStatus); + let title=getLabel(82832, '智能指令'); + return ( + { + weesoRobotStore.setDialogState({showDialog : false}); + createForm.reset(); + }} + buttons={[]} + moreBtn={{ + datas : this.getRightMenu(), + collectParams : collectParams + }} + > + + + {this.getSearchs(createForm, createFields)} + + + + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/components/robot/index.js b/pc4mobx/esearch/components/robot/index.js new file mode 100644 index 0000000..7fc071f --- /dev/null +++ b/pc4mobx/esearch/components/robot/index.js @@ -0,0 +1,203 @@ +import React from 'react'; +import {inject, observer} from 'mobx-react'; +import {toJS} from 'mobx'; + +import { + WeaTop, + WeaLeftRightLayout, + WeaLeftTree, + WeaTools, + WeaOrgTree, + WeaTab, + WeaFormItem, + WeaSearchGroup, + WeaRightMenu, + WeaAlertPage, + WeaLocaleProvider +} from 'ecCom'; +import {Button} from 'antd'; +import {WeaTableNew, WeaSwitch} from 'comsMobx'; +const {WeaTable} = WeaTableNew; +const getLabel = WeaLocaleProvider.getLabel; +import * as EsearchUtil from '../../util/EsearchUtil'; +import WeesoRobotDialog from './RobotDialog'; + +@inject('weesoRobotStore') +@observer +export default class Index extends React.Component { + constructor (props) { + super(props); + this.state = { + } + } + + componentDidMount() { + const {weesoRobotStore} = this.props; + weesoRobotStore.doInit(); + } + + componentWillReceiveProps(nextProps) { + const {weesoRobotStore} = this.props; + if (this.props.location.key !== nextProps.location.key) { + weesoRobotStore.doInit() + } + } + + getTabButtonsAd() { + const {weesoRobotStore} = this.props; + let btns = btns=[ + , + , + , + ] + return btns; + } + + getRightMenu() { + const selectedRowKeys = toJS(this.props.weesoRobotStore.tableStore.selectedRowKeys); + let btnArr = [ + { + key: 'BTN_NEW', + icon: , + content : getLabel(611,'添加'), + onClick : () => this.onRightMenuClick('BTN_NEW') + }, + { + key: 'BTN_DEL', + icon: , + disabled:selectedRowKeys.length === 0, + content : getLabel(32136,'批量删除'), + onClick : () => this.onRightMenuClick('BTN_DEL') + }, + { + key: 'BTN_INDEX', + icon: , + content : getLabel(20472,'创建索引'), + onClick : () => this.onRightMenuClick('BTN_INDEX') + }, + { + key: 'BTN_COLUMN', + icon: , + content : getLabel(32535,'显示列定制'), + onClick : () => this.onRightMenuClick('BTN_COLUMN') + } + ]; + return btnArr; + } + + getBtns = () => { + const selectedRowKeys = toJS(this.props.weesoRobotStore.tableStore.selectedRowKeys); + let btns = [ + , + , + + ]; + return btns; + } + + onRightMenuClick = (type) => { + const {weesoRobotStore} = this.props; + const selectedRowKeys = toJS(weesoRobotStore.tableStore.selectedRowKeys); + if(type == 'BTN_NEW'){//新建 + weesoRobotStore.setDialogState({createOrEdit: 0}); + weesoRobotStore.dialogStatus.canClick && weesoRobotStore.getFields(); + } + if(type == 'BTN_DEL'){//批量删除 + if(selectedRowKeys && selectedRowKeys.length > 0){ + EsearchUtil.doConfirm(`${getLabel(127574, '确定删除吗?')}`, () => weesoRobotStore.deleteRobot({ids: selectedRowKeys.join(',')})); + }else { + EsearchUtil.setModal(`${getLabel(22000,'请先选择操作对象')}`); + } + } + if(type == 'BTN_INDEX'){//创建索引 + weesoRobotStore.createRobotIndex(); + } + if(type == 'BTN_COLUMN'){//显示列定制 + weesoRobotStore.tableStore.setColSetVisible(true); + weesoRobotStore.tableStore.tableColSet(true); + } + } + + onOperatesClick = (record, index, operate) => { + const {weesoRobotStore} = this.props; + if(operate.index == 0){//启用 + EsearchUtil.doConfirm(getLabel(83450, '确定启用吗?'), () => weesoRobotStore.openRobot({state: 0, id: record.randomFieldId})) + } + if(operate.index == 1){//禁用 + EsearchUtil.doConfirm(getLabel(83451, '确定禁用吗?'), () => weesoRobotStore.openRobot({state: 1, id: record.randomFieldId})) + } + if(operate.index == 2){//编辑 + weesoRobotStore.setDialogState({createOrEdit: 1, editId: record.randomFieldId}); + weesoRobotStore.dialogStatus.canClick && weesoRobotStore.getFields({id: record.randomFieldId}); + } + if(operate.index == 3){//删除 + EsearchUtil.doConfirm(getLabel(127574, '确定删除吗?'), () => weesoRobotStore.deleteRobot({ids: record.randomFieldId})); + } + } + + render() { + const {weesoRobotStore} = this.props; + const {tableStore, status, form } = weesoRobotStore; + const {showSearchAd, conditioninfo, alertPage} = toJS(status); + let collectParams={ + favname: getLabel(82832, '智能指令'), + favouritetype: 5, + objid:0, + importantlevel: 1, + }; + let title=getLabel(82832, '智能指令'); + + return ( +
    + {alertPage ? + +
    {getLabel(382663,'暂无权限')}
    +
    + : + + } + iconBgcolor='#A0B0BA' + buttonSpace={10} + buttons={this.getBtns()} + showDropIcon={true} + dropMenuDatas={this.getRightMenu()} + dropMenuProps={{ + collectParams:collectParams + }} + /> + { + weesoRobotStore.setState({showSearchAd: false}); + weesoRobotStore.getList({...weesoRobotStore.form.getFormParams()},true); + })} + showSearchAd={showSearchAd} + advanceHeight={220} + buttonsAd={this.getTabButtonsAd()} + setShowSearchAd={() => weesoRobotStore.setState({showSearchAd: !showSearchAd})} + hideSearchAd={() => weesoRobotStore.setState({showSearchAd: false})} + searchsBaseValue= {form.isFormInit && form.getFormParams() && form.getFormParams().title || ''} + onSearch={() => weesoRobotStore.getList({...form.getFormParams()}, true)} + onSearchChange={value => form.updateFields({title : value})} + /> + + + } + +
    + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/components/weesoSearchSet.js b/pc4mobx/esearch/components/weesoSearchSet.js new file mode 100644 index 0000000..d56e202 --- /dev/null +++ b/pc4mobx/esearch/components/weesoSearchSet.js @@ -0,0 +1,1273 @@ +import React from "react"; +import { WeaDialog, WeaTop, WeaSteps, WeaNewScroll, WeaSearchGroup, WeaFormItem, WeaButtonIcon, + WeaLocaleProvider, WeaRightMenu, WeaInput, WeaUpload, WeaHelpfulTip, WeaInputSearch } from "ecCom"; +import { Button, Row, message, Modal, Icon, Tooltip } from 'antd'; +import { inject, observer } from 'mobx-react'; +import {WeaTableNew, WeaSwitch, WeaLogView} from 'comsMobx'; +import { toJS } from 'mobx'; +import NoRight from '../util/NoRight'; +const {WeaTable} = WeaTableNew; +const Step = WeaSteps.Step; +const getLabel = WeaLocaleProvider.getLabel; +const WeaLogViewComp = WeaLogView.Component; +const store = [ + 'weesoSeachSetStore', + 'weesoStore' +]; +@inject(...store) +@observer +export default class WeesoSearchSet extends React.Component { + constructor(props) { + super(props); + this.state = { + weesoSearchPageSetHeight: 590, + }; + this.customStepRef = React.createRef(); + this.customStepTopRef = React.createRef(); + this.weesoSearchPageSetRef = React.createRef(); + } + + componentDidMount() { + const { getSeachTable, getSeachCustomTable, doSaveSearchTag, + doSaveHistorySearch, page_uuid + } = this.props.weesoSeachSetStore; + getSeachTable(); + getSeachCustomTable(); + } + + componentDidUpdate() { + if(this.weesoSearchPageSetRef && this.weesoSearchPageSetRef.current && this.weesoSearchPageSetRef.current.state) { + if(this.weesoSearchPageSetRef.current.state.height !== this.state.weesoSearchPageSetHeight) { + this.setState({ weesoSearchPageSetHeight: this.weesoSearchPageSetRef.current.state.height }); + } + } + } + + openView = (page_uuid) => { + if(page_uuid) { + const { addSubdomainUrl } = this.props.weesoStore; + window.open(`${addSubdomainUrl('/spa/esearch/static/index.html#/main/esearch/weeso?page_uuid=')}${page_uuid}`); + } + } + + onOperatesClick = (record,index,operate,flag, type) => { + const { setState, getCusPageSetDtl, doSaveCusPageSetDtl, getCusPageSetList, delCusPageSet, getSearchTagDtl, + search_type, delSearchTag, showAndHideSearchTag, getCustompageBaseDatas, recordParams + } = this.props.weesoSeachSetStore; + + if(type === 'searchSet') { // 搜索页面 + setState({ recordParams: record, commonPageType: '' }); + if(operate.index === '0') { // {getLabel('221','预览') } + this.openView(record.page_uuid); + } else if(operate.index === '1') { // 编辑 + setState({ customizationDialogVisible: true, recordId: record.randomFieldId, currentStep: 0, commonPageType: 'edit' }, () => { + getCusPageSetDtl({ + id: record.randomFieldId, + type: '1', + page_uuid: record.page_uuid + }); + }); + } else if(operate.index === '2') { // 另存为 + doSaveCusPageSetDtl({ + fromSaveAsNew: '1', + id: record.randomFieldId, + }, (ret) => { + setState({ customizationDialogVisible: true, recordId: ret.newId, currentStep: 0, commonPageType: 'saveas', recordParams: { randomFieldId: ret.newId, page_uuid: ret.newPage_uuid } }); + getCusPageSetDtl({ + id: ret.newId, + type: '1', + page_uuid: ret.newPage_uuid + }); + getCusPageSetList(); + }); + } else if(operate.index === '3') { // 删除 + this.delCusPageSet(record.randomFieldId); + } else if(operate.index === '4') { // 日志 + setState({ logvisible: true }); + } + } else if(type === 'searchCustom') { // 常用条件设置 + setState({ commonConditionParams: record }); + if(operate.index === '0') { // 编辑 + let p = { + id: record.randomFieldId + } + if(!(this.props.page === 'maintenanceKey' && this.props.lvisible === true)) { + p = { + ...p, + page_uuid: recordParams.page_uuid || '' + } + } + getSearchTagDtl(p, () => { + if(this.props.page === 'maintenanceKey' && this.props.lvisible === true) { + setState({ maintenanceKeyAddCommonVisible: true, addRecordId: record.randomFieldId }); + } else { + setState({ addCommonVisible: true, addRecordId: record.randomFieldId }); + } + getCustompageBaseDatas({ + cuspage_type: '3' + }); + }); + } else if(operate.index === '1') { // 隐藏 + showAndHideSearchTag({ id: record.randomFieldId , enable: 0 }, () => { + this.getCommonConditionSetTable(); + getCustompageBaseDatas({ + cuspage_type: '3' + }); + }); + } else if(operate.index === '2') { // 取消隐藏 + showAndHideSearchTag({ id: record.randomFieldId , enable: 1 }, () => { + this.getCommonConditionSetTable(); + getCustompageBaseDatas({ + cuspage_type: '3' + }); + }); + } else if(operate.index === '3') { // 删除 + this.deleteRecords(getLabel(127574, '确定删除吗?'), () => { + let p = { + id: record.randomFieldId, + }; + if(this.props.page === 'maintenanceKey' && this.props.lvisible === true) { + } else { + p = { + ...p, + page_uuid: recordParams.page_uuid, + fromSystem: 1, + }; + } + delSearchTag(p, () => { + this.getCommonConditionSetTable(); + getCustompageBaseDatas({ + cuspage_type: '3' + }); + }); + },); + } + } + } + + onTopBtnClick = (type) => { + const { setState, customizationDialogVisible, getCusPageSetDtl, searchTableStore } = this.props.weesoSeachSetStore; + if(type === 'add') { + setState({ customizationDialogVisible: true, recordId: '', currentStep: 0, commonPageType: 'create', pageCusCurrentId: '' }, () => { + getCusPageSetDtl({ type: '1' }); + }); + } else if(type === 'del') { + this.delCusPageSet(toJS(searchTableStore.selectedRowKeys)); + } + } + + delCusPageSet = (ids) => { + const { getCusPageSetList, delCusPageSet } = this.props.weesoSeachSetStore; + this.deleteRecords(getLabel(127574, '确定删除吗?'), () => { + delCusPageSet({ id: ids }, () => { + getCusPageSetList(); + }); + },); + } + + copyUrl = (url) => { + let mark = document.createElement('input'); + + mark.value = url; + document.body.appendChild(mark); + mark.select(); + let successful = document.execCommand('Copy'); + + if(successful) { + message.success(getLabel('125245','复制成功')); + mark && document.body.removeChild(mark); + } + } + + onFormItemChange = (formObj) => { + let _this = this; + const { setState } = this.props.weesoSeachSetStore; + setState({ searchTagParams: {} }); + if(formObj.tagName) { + if(window.esearch_debounce) clearTimeout(window.esearch_debounce); + window.esearch_debounce = setTimeout(() => {// 防抖 + const { addCommonForm } = _this.props.weesoSeachSetStore; + const formParams = addCommonForm.getFormParams(); + if(formParams.tagTitle === '' && formParams.tagName !== '') { + addCommonForm.updateFields({ tagTitle: formParams.tagName }); + } + }, 500); + } + } + + imgVisible = (domkey, type, imgValue) => { + let uploadBool = false; + if(domkey === 'page_resultLogo') { + if(type === 'create' || type === 'create-edit') { + if(imgValue === undefined || imgValue === '') { + uploadBool = true; + } + } else { + if(imgValue === undefined || imgValue === '') { + uploadBool = true; + } + } + } + if(domkey === 'page_icon') { + if(type === 'create' || type === 'create-edit') { + if(imgValue === undefined || imgValue === '') { + if(type === 'create') { + uploadBool = false; + } else { + uploadBool = true; + } + } + } else { + if(imgValue === undefined || imgValue === '') { + uploadBool = true; + } + } + } + return uploadBool; + } + + imgV = (domkey, type, imgValue) => { + let bool = true; + if(domkey === 'page_icon') { + if(imgValue === undefined || imgValue === '') { + bool = false; + } else if(imgValue === 'CLASSNAME:icon-coms-ws') { + bool = false; + } + } + return bool; + } + + resetDefaultIcon = () => { + let { commonPageType,setState } = this.props.weesoSeachSetStore; + setState({ commonPageType: 'create' }); + } + + getSearchs(form, conditioninfo, type) { + let { currentStep, commonPageType, hasPageIcon, hasPageResultLogo, setState, page_icon_dir, recordParams } = this.props.weesoSeachSetStore; + if(form === undefined || conditioninfo === undefined) return + const { isFormInit } = form; + const formParams = form.getFormParams(); + let group = []; + let isstep2 = Number(currentStep) === 2; + isFormInit && + toJS(conditioninfo).map((c, _index) => { + let items = []; + c.items.map(field => { + let col = 1; + if(type === 'viewUrl') { + items.push({ + com: ( + + + { + this.copyUrl(field.value); + }} > + + + + ), + col: col, + hide: form.isHide(field, (keys, allParams) => { + + return false; + }) + }); + } else { + let pointPerson = false; + if(field.domkey && field.domkey[0] === 'CREATERID_select' && formParams.CREATERID_select === '2') { // 创建人--指定人员 + field.selectLinkageDatas && field.selectLinkageDatas[2] && (field.selectLinkageDatas[2].viewAttr = 3); + (formParams.CREATERID === '' || formParams.CREATERID === undefined) && (pointPerson = true); + } + if(type !== 'add-common-conditions') { + if(field.domkey && (field.domkey[0] === 'WORKFLOWID' || field.domkey[0] === 'firstDirectory')) { // 流程-路径, 文档-目录必填 + field.viewAttr = 3; + } + if(field.domkey && field.domkey[0] === 'CREATEDATE_date_select' && formParams.CREATEDATE_date_select === '5') { // 创建时间--自定义 + field.selectLinkageDatas && field.selectLinkageDatas[5] && (field.selectLinkageDatas[5].viewAttr = 3); + } + } + if(type === 'add-common-conditions') { + if(field.domkey && field.domkey[0] === 'CREATEDATE_date_select' && formParams.CREATEDATE_date_select === '5') { // 创建时间--自定义 + field.selectLinkageDatas && field.selectLinkageDatas[5] && (field.selectLinkageDatas[5].viewAttr = 3); + } + } + const deleteIcon = ( + { + if(commonPageType === 'create') { + setState({ commonPageType: 'create-edit' }); + if(e && e.target.getAttribute('domkey') === 'page_icon') { + form.updateFields({ page_icon: { value: '' } }); + } + if(e && e.target.getAttribute('domkey') === 'page_resultLogo') { + form.updateFields({ page_resultLogo: { value: '' } }); + } + } else { + if(e && e.target.getAttribute('domkey') === 'page_icon') { + setState({ hasPageIcon: false }); + form.updateFields({ page_icon: { value: '' } }); + } + if(e && e.target.getAttribute('domkey') === 'page_resultLogo') { + setState({ hasPageResultLogo: false }); + form.updateFields({ page_resultLogo: { value: '' } }); + } + } + }} /> + ); + items.push({ + com: ( + + { + (field.domkey[0] === 'page_icon' || field.domkey[0] === 'page_resultLogo') ? +
    + { + this.imgVisible(field.domkey[0], commonPageType, formParams[field.domkey[0]]) ? + { + form.updateFields({ [field.domkey[0]]: { value: ids[0] } }); + }} + /> + : +
    + { ((commonPageType === 'create' && field.domkey[0] === 'page_icon' && formParams.page_icon === '') || (field.domkey[0] === 'page_icon'&& formParams.page_icon === 'CLASSNAME:icon-coms-ws') ) && + + { deleteIcon } + + } + + { !this.imgVisible(field.domkey[0], commonPageType, formParams[field.domkey[0]]) && this.imgV(field.domkey[0], commonPageType, formParams[field.domkey[0]]) && + + { deleteIcon } + + } +
    + } + {field.domkey[0] === 'page_icon' &&
    {getLabel('524263','建议上传图片大小为36px*36px') }
    } + {field.domkey[0] === 'page_resultLogo' &&
    {getLabel('524264','建议上传图片大小为70px*40px')}
    } + {recordParams.page_uuid === "FULLSEARCH" && field.domkey[0] === 'page_icon' && commonPageType !== 'create' && formParams.page_icon === '' &&
    + + + +
    } +
    + : + + } + { + field.domkey[0] === 'page_descStr' && + {getLabel('524265','描述的位置说明') } + + } + placement="bottomLeft" + /> + } +
    + ), + col: col, + hide: form.isHide(field, (keys, allParams) => { + let bool = true; + if(type === 'setpage') { + if(currentStep === 0) { + if(keys[0] === 'doc_sourceType') {// 文档来源 + bool = false; + formParams['search_type'] === "DOC" && (bool = true); + } + if(keys[0] === 'firstDirectory') {// 目录 + bool = false; + formParams['search_type'] === "DOC" && (bool = true); + formParams['doc_sourceType'] == '1' && (bool = false); + + } + if(keys[0] === 'wf_sourceType') {// 流程来源 + bool = false; + formParams['search_type'] === "WF" && (bool = true); + } + if(keys[0] === 'WORKFLOWID') {// 路径 + bool = false; + formParams['search_type'] === "WF" && (bool = true); + formParams['wf_sourceType'] == '1' && (bool = false); + } + if(keys[0] === 'page_descStr') {// 描述 + bool = true; + formParams['search_type'] === "ALL" && (bool = false); + } + } + if(currentStep === 2) { + keys[0] === "page_resultLogo" && formParams['page_resultShowLogo'] === "0" && (bool = false); + } + } + + return !bool; + }) + }); + } + }); + group.push( + + ); + }); + if(type === 'viewUrl') { + group =
    { group }
    + } + return group; + } + + stepOne = (callback) => {// 页面基本设置 + const { stepForm, doSaveCusPageSetDtl, setState, recordParams, currentStep, recordId } = this.props.weesoSeachSetStore; + let formParams = stepForm.getFormParams(); + let current = parseInt(currentStep, 10); + + stepForm.validateForm().then(f => { + if (f.isValid) { + if((formParams.search_type === "WF" && formParams.wf_sourceType !== '1' && formParams.WORKFLOWID === '' ) + || (formParams.search_type === "DOC" && formParams.doc_sourceType !== '1' && formParams.firstDirectory === '' ) + ) { + message.error(getLabel('524259','必填项未填写!') ); + } else { + doSaveCusPageSetDtl({ + type: 1, + id: recordId, + page_uuid: recordParams.page_uuid, + ...formParams + }, (ret) => { + setState({ recordParams: ret }); + typeof callback === 'function' && callback(ret); + }); + } + } else { + f.showErrors(); + } + }); + } + + stepThree = (callback) => {// 搜索结果页设置 + const { currentStep, setState, getCusPageSetDtl, recordId, stepForm, + doSaveCusPageSetDtl, recordParams + } = this.props.weesoSeachSetStore; + const formParams = stepForm.getFormParams(); + if(formParams.page_resultShowLogo == '1' && formParams.page_resultLogo === '') { + message.error(getLabel('524259','必填项未填写!') ); + } else { + stepForm.validateForm().then(f => { + if (f.isValid) { + doSaveCusPageSetDtl({ + type: 3, + id: recordId, + page_uuid: recordParams.page_uuid, + ...formParams + }, (ret) => { + if(ret && ret.status === 'success') { + typeof callback === 'function' && callback(ret); + } + }); + } else { + f.showErrors(); + } + }); + } + } + + onStepClick = (type, btntype, callback) => { + const { currentStep, setState, stepContents, getCusPageSetDtl, recordId, stepForm, + doSaveCusPageSetDtl, getCusPageSetList, recordParams, hasPageIcon, commonPageType + } = this.props.weesoSeachSetStore; + let current = parseInt(currentStep, 10); + if(type === 'next-step' && currentStep < stepContents.length || btntype === 'viewBtn') { + if(current === 0) { // 页面基本设置 + let formParams = stepForm.getFormParams(); + if(commonPageType === 'create') {//新建且没有点击过删除默认图片 + formParams = { + ...formParams, + page_icon: "CLASSNAME:icon-coms-ws", + }; + } + stepForm.validateForm().then(f => { + if (f.isValid) { + if((formParams.search_type === "WF" && formParams.wf_sourceType !== '1' && formParams.WORKFLOWID === '' ) + || (formParams.search_type === "DOC" && formParams.doc_sourceType !== '1' && formParams.firstDirectory === '' ) + ) { + message.error(getLabel('524259','必填项未填写!') ); + } else { + doSaveCusPageSetDtl({ + type: 1, + id: recordId, + page_uuid: recordParams.page_uuid, + ...formParams + }, (ret) => { + if(btntype === 'viewBtn') {// 新建{getLabel('221','预览') } + typeof callback === 'function' && callback(recordParams.page_uuid); + } else { + setState({ currentStep: current + 1, recordParams: ret}); + this.getCommonConditionSetTable(ret); + } + }); + } + } else { + f.showErrors(); + } + }); + } else if(current === 1) { + getCusPageSetDtl({ id: recordId,type: current + 2, page_uuid: recordParams.page_uuid }, (ret) => { + if(btntype === 'viewBtn') { + typeof callback === 'function' && callback(recordParams.page_uuid); + }else { + setState({ currentStep: current + 1}); + } + }); + } else if(current === 2) {// 搜索结果设置 + const formParams = stepForm.getFormParams(); + if(formParams.page_resultShowLogo == '1' && formParams.page_resultLogo === '') { + message.error(getLabel('524259','必填项未填写!') ); + } else { + stepForm.validateForm().then(f => { + if (f.isValid) { + doSaveCusPageSetDtl({ + type: 3, + id: recordId, + page_uuid: recordParams.page_uuid, + ...formParams + }, (ret) => { + if(btntype === 'viewBtn') { + typeof callback === 'function' && callback(recordParams.page_uuid); + }else { + setState({ currentStep: current + 1}); + getCusPageSetDtl({ id: recordId,type: current + 2, page_uuid: ret.page_uuid }); + } + }); + } else { + f.showErrors(); + } + }); + } + } else if(current === 3) { + if(btntype === 'viewBtn') { + typeof callback === 'function' && callback(recordParams.page_uuid); + } + } + } else if((type === 'pre-step' || type === 'click-step-pre')&& currentStep > 0) { + if(current === 2 && (type !== 'click-step-pre')) { + this.stepThree(() => { + setState({ currentStep: current - 1}); + getCusPageSetDtl({ id: recordId,type: current, page_uuid: recordParams.page_uuid }); + }); + } else { + setState({ currentStep: current - 1}); + getCusPageSetDtl({ id: recordId,type: current, page_uuid: recordParams.page_uuid }); + } + this.getCommonConditionSetTable(recordParams); + } + + } + + preStep = (type) => { + if(type === 'click-step-pre') { + this.onStepClick('click-step-pre'); + } else { + this.onStepClick('pre-step'); + } + } + + nextStep = () => { + this.onStepClick('next-step'); + } + + viewBtn = () => { + this.onStepClick('pre-step', 'viewBtn',this.openView); + } + + getCommonConditionSetTable = (params) => { + const { getSearchTagList, recordId, addRecordId } = this.props.weesoSeachSetStore; + if(this.props.page === 'maintenanceKey' && this.props.lvisible === true) { + getSearchTagList(); + } else { + let p = { + infoSetId: recordId, + fromSystem: 1 + }; + if(params && params.page_uuid) { + p = { + ...p, + page_uuid: params.page_uuid + } + } + getSearchTagList(p); + } + } + + stepComplete = () => { + const { setState, getCusPageSetList } = this.props.weesoSeachSetStore; + setState({ customizationDialogVisible: false }); + getCusPageSetList(); + } + + getCumtonDialogBtns = () => { + const { currentStep, stepContents } = this.props.weesoSeachSetStore; + let btns = []; + let nextStep = false, preStep = false; + if(currentStep > 0) { + btns.push( + , + ); + } + if(currentStep < stepContents.length - 1) { + btns.push( + , + ); + } + if(currentStep === stepContents.length - 1) { + btns.push( + , + ); + btns.push( + , + ); + } + return btns; + } + + getSearchDialogBtns = () => { + let btns = []; + btns.push( + , + ); + + return btns; + } + + getRightMenu(btns) { + let btnArr = []; + Array.isArray(btns) && btns.forEach(res => { + let icon = ; + if(res.key === 'pre') { + icon = ; + } else if(res.key === 'next') { + icon = ; + } else if(res.key === 'searchset-save') { + icon = ; + } else if(res.key === "complete") { + icon = ; + } else if(res.key.indexOf('save') > -1) { + icon = ; + } + btnArr.push({ + key: res.key, + icon: icon, + content : res.props ? res.props.children : '', + onClick : res.props ? res.props.onClick : null + }); + }); + return btnArr; + } + + filterParams = () => { + let { browserKeyArr, addCommonForm } = this.props.weesoSeachSetStore; + const formParams = addCommonForm.getFormParams(); + let search_json = { ...formParams }; + delete search_json.showorder; + delete search_json.tagName; + delete search_json.tagTitle; + browserKeyArr = toJS(browserKeyArr); + Object.keys(search_json).forEach(key => { + if(browserKeyArr.some(v => v === key)) { + if(search_json[key] !== '') { + search_json[key] = search_json[key].split(','); + } else { + delete search_json[key]; + } + } + }); + return search_json; + } + + addCommonSaveBtn = () => { + const { addCommonForm, doSaveSearchTag, commonConditionParams, addRecordId, recordId, + recordParams, getCustompageBaseDatas, editCommonConditionRetdatas + } = this.props.weesoSeachSetStore; + let { browserKeyArr } = this.props.weesoSeachSetStore; + + addCommonForm.validateForm().then(f => { + if (f.isValid) { + const formParams = addCommonForm.getFormParams(); + let bool = false; + if(formParams.CREATEDATE_date_select === '5' &&(formParams.CREATEDATE_range_picker_end === '' || formParams.CREATEDATE_range_picker_end === undefined)) { + bool = true; + } + if(formParams.CREATERID_select === '2' &&(formParams.CREATERID === '' || formParams.CREATERID === undefined)) { + bool = true; + } + if(bool) { + message.error(getLabel('524259','必填项未填写!') ); + return; + } + let search_json = { ...formParams }; + delete search_json.showorder; + delete search_json.tagName; + delete search_json.tagTitle; + browserKeyArr = toJS(browserKeyArr); + Object.keys(search_json).forEach(key => { + if(browserKeyArr.some(v => v === key)) { + if(search_json[key] !== '') { + search_json[key] = search_json[key].split(','); + } else { + delete search_json[key]; + } + } + }); + let p = { + ...formParams, + id: commonConditionParams.randomFieldId, + search_json: JSON.stringify(search_json) + }; + if(!(this.props.page === 'maintenanceKey' && this.props.lvisible === true)) { + if(recordParams.page_uuid) { + p = { + ...p, + fromSystem: 1, + page_uuid: recordParams.page_uuid + }; + } else { + p = { + ...p, + fromSystem: 1, + }; + } + } + if(editCommonConditionRetdatas.search_type) { + p = { + ...p, + search_type: editCommonConditionRetdatas.search_type + }; + } + doSaveSearchTag({ ...p }, (ret) => { + this.addCommononCancel(); + this.getCommonConditionSetTable(ret); + getCustompageBaseDatas({ + cuspage_type: '3' + }); + }); + } else { + f.showErrors(); + } + }) + } + + addCommonBtns = () => { + let btns = []; + btns.push( + , + ); + + return btns; + } + + + addCommononCancel = () => { + const { setState } = this.props.weesoSeachSetStore; + setState({ addCommonVisible: false, maintenanceKeyAddCommonVisible: false }); + } + + getAddCommonConditions = () => { + const dialogW = 600, dialogH = 350; + const { collectParams, addCommonVisible, maintenanceKeyAddCommonVisible, setState, addCommonForm, addCommonConditions } = this.props.weesoSeachSetStore; + let dialogVisible = addCommonVisible; + if(this.props.page === "maintenanceKey") { + dialogVisible = maintenanceKeyAddCommonVisible; + } + return( + + + { this.getSearchs(addCommonForm, addCommonConditions, 'add-common-conditions') } + + + ); + } + + getUrlDialog = () => { + const dialogW = 600, dialogH = 200; + const { collectParams, urlDialogVisible, setState, stepForm, stepConditions } = this.props.weesoSeachSetStore; + return( { setState({ urlDialogVisible: false }) }} + // moreBtn={{ + // datas : this.getRightMenu(this.addCommonBtns()), + // collectParams : collectParams + // }} + > + { this.getSearchs(stepForm, stepConditions, 'viewUrl') } + ); + } + + getColumns = (e) => { + let newColumns = ''; + newColumns = e.map(column => { + let newColumn = column; + newColumn.render = (text, record, index) => { //前端元素转义 + let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex]; + return ( + newColumn.dataIndex == "page_uuid" ? +
    { + const { setState, getCusPageSetDtl } = this.props.weesoSeachSetStore; + setState({ urlDialogVisible: true, recordId: record.randomFieldId }); + getCusPageSetDtl({ id: record.randomFieldId,type: '4' }); + }} dangerouslySetInnerHTML={{__html: getLabel('33564','查看') }}/> + : +
    + ) + } + return newColumn; + }); + return newColumns; + } + + deleteRecords = (msg, onOk, onCancel) => { + Modal.confirm({ + title: getLabel('131329','信息确认') , + content: msg, + onOk() { + typeof onOk === 'function' && onOk(); + }, + onCancel() { + typeof onCancel === 'function' && onCancel(); + }, + }); + } + + maintenanceKeyAdd = (type) => { + const { dialogVisible, setState, searchTableStore, customizationDialogVisible, form, conditions, currentStep, + collectParams, stepForm, stepConditions, commonConditionTableStore, getSearchTagDtl, search_type, recordId, + commonConditionParams,recordParams + } = this.props.weesoSeachSetStore; + const { defalutMoreKey } = this.props.weesoStore; + let param = {}; + if(!(this.props.page === 'maintenanceKey' && this.props.lvisible === true)) { + param = { + page_uuid: recordParams.page_uuid, + }; + } + if(type === 'commonSet') { + param = { + ...param, + search_type: defalutMoreKey + }; + } + getSearchTagDtl({ id: '', ...param }, () => { + if(this.props.page === 'maintenanceKey' && this.props.lvisible === true) { + setState({ addCommonVisible: false, maintenanceKeyAddCommonVisible: true, commonConditionParams: {} }); + } else { + setState({ addCommonVisible: true, maintenanceKeyAddCommonVisible: false, commonConditionParams: {} }); + } + }); + } + + maintenanceKeyDel = () => { + const { delSearchTag, commonConditionTableStore, recordI, recordParams, getCustompageBaseDatas } = this.props.weesoSeachSetStore; + let ids = toJS(commonConditionTableStore.selectedRowKeys); + let params = { + id: ids, + }; + this.deleteRecords(getLabel(127574, '确定删除吗?'), () => { + if(!(this.props.page === 'maintenanceKey' && this.props.lvisible === true)) { + params = { + ...params, + page_uuid: recordParams.page_uuid, + fromSystem: 1 + }; + } + delSearchTag(params, () => { + this.getCommonConditionSetTable(); + getCustompageBaseDatas({ + cuspage_type: '3' + }); + }); + },); + } + + searchPageCusCancel = () => { + const { setState, commonPageType, pageCusCurrentId, delCusPageSet, currentStep, defalutStepForm, stepForm } = this.props.weesoSeachSetStore; + if(String(currentStep) === '1' || (String(currentStep) === '4' && commonPageType.indexOf('create') === -1 )) { + setState({ customizationDialogVisible: false, recordParams: {} }); + } else { + let isModify = false; + if(typeof defalutStepForm.getFormParams === 'function') { + const defalutStepFormParams = defalutStepForm.getFormParams(); + const stepFormParams = stepForm.getFormParams(); + Object.keys(defalutStepForm.getFormParams()).forEach(key => { + if(String(defalutStepFormParams[key]) !== String(stepFormParams[key])) { + isModify = true; + } + }); + } + if(isModify) { + this.deleteRecords(getLabel('524268','数据未保存,确定退出吗?') ,() => { + if(commonPageType === 'create' && pageCusCurrentId !== '') { + delCusPageSet({ id: pageCusCurrentId }, () => { + setState({ customizationDialogVisible: false, recordParams: {} }); + }); + } else { + setState({ customizationDialogVisible: false, recordParams: {} }); + } + }); + } else { + setState({ customizationDialogVisible: false, recordParams: {} }); + } + } + } + + searchPageCancel = () => { + + } + + closeLog = () => { + const { setState, } = this.props.weesoSeachSetStore; + setState({ logvisible: false }); + } + + onSearch = (value) => { + const { getCusPageSetList, setState } = this.props.weesoSeachSetStore; + getCusPageSetList({ page_title: value || '' }); + } + + onSearchChange = (value) => { + const { setState } = this.props.weesoSeachSetStore; + setState({ searchDefinePageInputVal: value }); + } + + onCommonSearchChange = (value) => { + const { setState } = this.props.weesoSeachSetStore; + setState({ searchDefineCommonInputVal: value }); + } + + onCommonSearch = (value) => { + const { getSearchTagList } = this.props.weesoSeachSetStore; + getSearchTagList({ tagTitle: value || '' }); + } + + onCloseSearchDefineDialog = () => { + const { setState } = this.props.weesoSeachSetStore; + setState({ dialogVisible: false, searchDefineCommonInputVal: '', searchDefinePageInputVal: '' }); + } + + onStepChange = (e) => { + if(e) { + const { currentStep, setState, stepContents, getCusPageSetDtl, recordId, stepForm, + doSaveCusPageSetDtl, getCusPageSetList, recordParams, hasPageIcon, commonPageType + } = this.props.weesoSeachSetStore; + + if(commonPageType !== 'saveas' && commonPageType !== 'edit') return; + const current = Number(currentStep); // 当前步 + const now = Number(e.step); + if(now > current) {// 往后 + if(current === 0) { + this.stepOne((ret) => { + setState({ currentStep: now }); + if(now === 1) { + this.getCommonConditionSetTable(ret); + } + if(now === 2) { + getCusPageSetDtl({ id: recordId,type: 3, page_uuid: recordParams.page_uuid }, (ret) => { + }); + } + if(now === 3) { + getCusPageSetDtl({ id: recordId,type: 4, page_uuid: ret.page_uuid }); + } + }); + } + if(current === 1) { + if(now === 2) { + this.nextStep(); + } + if(now === 3) { + setState({ currentStep: now }); + getCusPageSetDtl({ id: recordId,type: 4, page_uuid: recordParams.page_uuid }); + } + } + if(current === 2) { + this.nextStep(); + } + } + if(now < current) {// 往前 + if(current === 1) { + this.preStep(); + } + if(current === 2) { + this.stepThree(() => { + if(now === 0 ) { + setState({ currentStep: now }); + getCusPageSetDtl({ id: recordId,type: 1, page_uuid: recordParams.page_uuid }); + } + if(now === 1 ) { + this.preStep('click-step-pre'); + } + }); + } + if(current === 3) { + if(now === 0) { + setState({ currentStep: now }); + getCusPageSetDtl({ id: recordId,type: 1, page_uuid: recordParams.page_uuid }); + } + if(now === 1) { + setState({ currentStep: now }); + this.getCommonConditionSetTable(); + } + if(now === 2) { + this.preStep(); + } + } + } + } + } + + maintenanceKey_Add = () => { + this.maintenanceKeyAdd('commonSet'); + } + + render() { + const { dialogVisible, setState, searchTableStore, customizationDialogVisible, form, conditions, currentStep, + collectParams, stepForm, stepConditions, commonConditionTableStore, getSearchTagDtl, search_type,recordParams, + logStore, logvisible, logSmallType, logType, searchPageRight, commonPageType + } = this.props.weesoSeachSetStore; + let { stepContents, } = this.props.weesoSeachSetStore; + const { weesoSearchPageSetHeight } = this.state; + stepContents = toJS(stepContents); + const dialogH = weesoSearchPageSetHeight, dialogW = 900; + const stepTopH = this.customStepTopRef&&this.customStepTopRef.current ? this.customStepTopRef.current.offsetHeight : 160; + if(this.props.page === 'maintenanceKey') { + return(
    + + + + + + + + + + +
    + } + > + this.onOperatesClick(record,index,operate,flag, 'searchCustom')} + /> + + { this.getAddCommonConditions() } +
    ) + } + + return(
    + + {!searchPageRight && } + {searchPageRight && + + + { + this.onTopBtnClick("add"); + }} /> + + + { + this.onTopBtnClick("del") + }} /> + + + + +
    + } + > + this.onOperatesClick(record,index,operate,flag, 'searchSet')} + getColumns={this.getColumns} + /> + + } + + + + +
    + + + { + stepContents && stepContents.map(res => ( this.onStepChange(res)} description={res.label} />)) + } + + +
    + + { currentStep !== 1 && currentStep !== 3 && this.getSearchs(stepForm, stepConditions, 'setpage') } + { currentStep === 1 && + + + + + + +
    + } + > + this.onOperatesClick(record,index,operate,flag, 'searchCustom')} + /> +
    } + { currentStep === 3 && this.getSearchs(stepForm, stepConditions, 'viewUrl')} + + + + + { this.getAddCommonConditions() } + { this.getUrlDialog() } + + ); + } +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/debug.js b/pc4mobx/esearch/debug.js similarity index 82% rename from pc4backstage/hrmengine/debug.js rename to pc4mobx/esearch/debug.js index eb80cce..9e0fabf 100644 --- a/pc4backstage/hrmengine/debug.js +++ b/pc4mobx/esearch/debug.js @@ -31,10 +31,10 @@ const history = syncHistoryWithStore(browserHistory, allStore.routing); const Home = props => props.children; const Root = () => ( - - - - + + + + { Module.Route } @@ -42,4 +42,4 @@ const Root = () => ( ); -ReactDOM.render(, document.getElementById('container')); +ReactDOM.render(, document.getElementById('container')); diff --git a/pc4mobx/esearch/index.js b/pc4mobx/esearch/index.js new file mode 100644 index 0000000..a370705 --- /dev/null +++ b/pc4mobx/esearch/index.js @@ -0,0 +1,40 @@ +import React from 'react'; +import Route from 'react-router/lib/Route'; +import Weeso from './components/Weeso'; +import WeesoResult from './components/WeesoResult'; +import WeesoSet from './components/ApiSet'; +import WeesoRobot from './components/robot/index'; + + +import {WeaLocaleProvider} from 'ecCom'; +const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'esearch'); + + + +import './style'; +import stores from './stores'; + +const Home = props => { + return ( +
    + + + {props.children} + +
    + ) +}; + +const Routes = ( + + + + + + +); + +module.exports = { + Route: Routes, + store: stores, +}; diff --git a/pc4mobx/esearch/public/wea-zmage/components/Background/index.js b/pc4mobx/esearch/public/wea-zmage/components/Background/index.js new file mode 100644 index 0000000..7501379 --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Background/index.js @@ -0,0 +1,28 @@ +/** + * 背景层 + * 叠加半透明背景 + **/ + +// React Libs +import React from 'react' +// Style +import './index.less' + +export default class Background extends React.Component { + constructor(props) { + super(props) + } + + bgOverlayStyle = show => show ? {backgroundColor: 'rgba(0,0,0,1)'} : {backgroundColor: 'rgba(0,0,0,0)'} + + render() { + const {show, zoom, unmountSelf, toggleZoom} = this.props + return ( +
    + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Background/index.less b/pc4mobx/esearch/public/wea-zmage/components/Background/index.less new file mode 100644 index 0000000..20424d0 --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Background/index.less @@ -0,0 +1,20 @@ +// 屏幕宽度 +@vw: ~"calc(100vw - (100vw - 100%))"; +@vh: 100vh; +// 动画时长 (ms) ( config/index.js ) +@animationDurations: 400ms; +@animationDurationsHalf: 400/2ms; +// 动画曲线 ( config/index.js ) +@animationFunction: cubic-bezier(0.15, 1, 0.3, 1); + +.backgroundLayer { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + cursor: zoom-out; + transition: all @animationDurations; + background-color: rgba(0, 0, 0, 0); + opacity: .5; +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Control/index.js b/pc4mobx/esearch/public/wea-zmage/components/Control/index.js new file mode 100644 index 0000000..75c94b4 --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Control/index.js @@ -0,0 +1,165 @@ +/** + * 控制层 + * 控制图片切换等 + **/ + +// React Libs +import React, {Fragment} from 'react' +import {Icon} from 'antd'; +// Style +import './index.less' + +export default class Control extends React.Component { + constructor(props) { + super(props) + } + + // 放大按钮样式 + zoomStyle = show => + show ? { + WebkitClipPath: "polygon(0 65%, 65% 0, 100% 0, 100% 35%, 35% 100%, 0 100%)", + MozClipPath: "polygon(0 65%, 65% 0, 100% 0, 100% 35%, 35% 100%, 0 100%)", + MsClipPath: "polygon(0 65%, 65% 0, 100% 0, 100% 35%, 35% 100%, 0 100%)", + OClipPath: "polygon(0 65%, 65% 0, 100% 0, 100% 35%, 35% 100%, 0 100%)", + clipPath: "polygon(0 65%, 65% 0, 100% 0, 100% 35%, 35% 100%, 0 100%)", + opacity: 1 + } : { + WebkitClipPath: "polygon(0 100%, 100% 0, 100% 0, 100% 0, 0 100%, 0 100%)", + MozClipPath: "polygon(0 100%, 100% 0, 100% 0, 100% 0, 0 100%, 0 100%)", + MsClipPath: "polygon(0 100%, 100% 0, 100% 0, 100% 0, 0 100%, 0 100%)", + OClipPath: "polygon(0 100%, 100% 0, 100% 0, 100% 0, 0 100%, 0 100%)", + clipPath: "polygon(0 100%, 100% 0, 100% 0, 100% 0, 0 100%, 0 100%)", + opacity: 0 + } + // 关闭按钮样式 + lineL = show => + show ? { + WebkitTransform: 'translate(-50%, -50%) rotate(45deg)', + transform: 'translate(-50%, -50%) rotate(45deg)', + opacity: 1 + } : { + WebkitTransform: 'translate(-50%, -50%) rotate(0)', + transform: 'translate(-50%, -50%) rotate(0)', + opacity: 0 + } + lineR = show => + show ? { + WebkitTransform: 'translate(-50%, -50%) rotate(-45deg)', + transform: 'translate(-50%, -50%) rotate(-45deg)', + opacity: 1 + } : { + WebkitTransform: 'translate(-50%, -50%) rotate(0)', + transform: 'translate(-50%, -50%) rotate(0)', + opacity: 0 + } + + // 切换按钮样式 + prevStyle = show => + show ? { + left: 0, + opacity: 1 + } : { + left: -55, + opacity: 0 + } + nextStyle = show => + show ? { + right: 0, + opacity: 1 + } : { + right: -55, + opacity: 0 + } + + // 页数指示样式 + pagesStyle = show => + show ? { + bottom: 0, + opacity: 1 + } : { + bottom: -31, + opacity: 0 + } + + // 图片标题样式 + altStyle = show => show ? { + WebkitClipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)", + MozClipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)", + MsClipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)", + OClipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)", + clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)", + opacity: 1 + } : { + WebkitClipPath: "polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%)", + MozClipPath: "polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%)", + MsClipPath: "polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%)", + OClipPath: "polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%)", + clipPath: "polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%)", + opacity: 0 + } + + render() { + const {show, zoom, page, imageSet, unmountSelf, toggleZoom, switchPages} = this.props + const hasMultipleImage = imageSet.length > 1 + return ( + + + {/*放大按钮*/} + {/*{!zoom && + //
    +
    + +
    }*/} + + {/*缩小按钮*/} + {/*{!zoom && +
    + +
    }*/} + + {/*关闭按钮*/} +
    + {/*
    +
    */} + +
    + + {/*切换按钮*/} + {hasMultipleImage && !zoom && +
    + {/* + + + */} + +
    } + {hasMultipleImage && !zoom && +
    + {/* + + + */} + +
    } + + {/*页数指示*/} + {/*{hasMultipleImage && !zoom && +
    + {`${page+1} / ${imageSet.length}`} +
    }*/} + + {/*图片标题*/} + {!zoom ? + imageSet[page].alt && +
    + {imageSet[page].alt} +
    : + imageSet.alt && +
    + {imageSet.alt} +
    } + + + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Control/index.less b/pc4mobx/esearch/public/wea-zmage/components/Control/index.less new file mode 100644 index 0000000..5897dbf --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Control/index.less @@ -0,0 +1,158 @@ +// 屏幕宽度 +@vw: ~"calc(100vw - (100vw - 100%))"; +@vh: 100vh; +// 动画时长 (ms) ( config/index.js ) +@animationDurations: 400ms; +@animationDurationsHalf: 400/2ms; +// 动画曲线 ( config/index.js ) +@animationFunction: cubic-bezier(0.15, 1, 0.3, 1); + +// 放大按钮 +.zoomButton { + box-sizing: border-box; + position: absolute; + bottom: 10%; + left: 46%; + z-index: 110; + cursor: pointer; + transition: all @animationDurations @animationFunction; + will-change: clip-path; + + > i { + font-size: 30px; + } + + color: #ffffff; +} + +.zoomButton:hover { + transform: scale(1.1); +} + +.zoomButton:active { + transform: scale(1); +} + +//缩小按钮 +.zoomButton-shrink { + left: 52%; +} + +// 关闭按钮 +.closeButton { + position: absolute; + top: 40px; + right: 20px; + width: 40px; + height: 40px; + line-height: 40px; + z-index: 110; + cursor: pointer; + transition: all @animationDurations @animationFunction; + will-change: transform; + + > i { + font-size: 24px; + float: right; + color: #ffffff; + } + + .crossLine { + position: absolute; + top: 50%; + left: 50%; + width: 35px; + height: 1px; + background-color: black; + transition: all @animationDurations @animationFunction; + will-change: transform; + } +} + +.closeButton:hover { + transform: scale(1.1); +} + +.closeButton:active { + transform: scale(1); +} + +// 切换按钮 +.switchButton { + position: absolute; + top: 50%; + width: 56px; + height: 56px; + z-index: 110; + cursor: pointer; + transition: all @animationDurations @animationFunction; + transform-origin: 50% 0; + transform: translateY(-50%); + will-change: transform, left, right, opacity; + vertical-align: middle; + text-align: center; + .icon-coms-Left, .icon-coms-Right { + font-size: 20px; + color: #ffffff; + } + svg { + fill: white; + } +} + +.switchButton:hover { + transform: scale(1.1) translateY(-50%); +} + +.switchButton:active { + transform: scale(1) translateY(-50%); +} + +// 页数指示 +.pages { + box-sizing: border-box; + padding: 6px 14px; + position: absolute; + left: 50%; + color: white; + font-size: 14px; + font-weight: bold; + z-index: 110; + background-color: black; + user-select: none; + transition: all @animationDurations @animationFunction; + transform: translateX(-50%); + will-change: bottom, opacity; +} + +// 图片标题 +.imgAlt { + box-sizing: border-box; + padding: 20px; + position: absolute; + top: 0; + left: 0; + color: black; + font-size: 18px; + z-index: 90; + user-select: none; + transition: all @animationDurations @animationFunction; + will-change: clip-path, opacity; +} + +// 图片文字 +.imgText { + box-sizing: border-box; + padding: 12px 20px; + position: absolute; + left: 0; + top: 50% + 180px; + color: white; + font-size: 16px; + z-index: 90; + user-select: none; + background-color: black; + transition: all @animationDurations @animationFunction; + transform: translateY(-50%); + will-change: left, opacity; +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Image/index.js b/pc4mobx/esearch/public/wea-zmage/components/Image/index.js new file mode 100644 index 0000000..1853eac --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Image/index.js @@ -0,0 +1,166 @@ +/** + * 图片层 + * 展示图片 + **/ + +// React Libs +import React, {Fragment} from 'react' +// Style +import './index.less' +// Utils +import Lerp from '../../utils/lerp' +import { + calcFitScale, + addListenEventOf, removeListenEventOf +} from '../../utils' + +// TODO: CONFIG +const IMAGE_MARGIN = 50 + +export default class Image extends React.Component { + constructor(props) { + super(props) + + this.state = { + // 加载完成 + onLoad: true, + // 加载错误 + onError: false, + // 翻页方向 + direction: '' + } + } + + componentWillMount() { + this.resize = new Lerp({ + data: this.getCoverScale(), + poster: this.handleResizeScale + }) + addListenEventOf('resize', this.setToPageFitScale) + } + + componentWillReceiveProps(nextProps) { + const {show, zoom, page} = nextProps + if (show) { + if (zoom) { + this.setToOriginalScale() + } else { + this.setToPageFitScale() + } + } else { + this.setToCoverScale() + } + if (page) { + this.setState({ + onLoad: true, + onError: false + }) + } + } + + componentWillUnmount() { + removeListenEventOf('resize', this.setToPageFitScale) + } + + /** + * 状态切换设置大小 + **/ + getCoverScale = () => { + const {coverNodeRef} = this.props + let coverScale = {scale: 0} + if (coverNodeRef) { + const coverNodeStyle = window.getComputedStyle(coverNodeRef) + coverScale = {scale: parseInt(coverNodeStyle.width) / coverNodeRef.naturalWidth} + } + return coverScale + } + setToCoverScale = () => { + const {coverNodeRef, remove} = this.props + this.resize.to({ + data: this.getCoverScale(), + after: () => { + // 显示封面原图 + if (coverNodeRef) coverNodeRef.style.visibility = 'visible' + // 移除节点 + remove() + } + }) + } + getPageFitScale = () => { + const {coverNodeRef} = this.props + let fitScale = {scale: 1} + if (coverNodeRef) { + fitScale = {scale: calcFitScale(coverNodeRef, IMAGE_MARGIN)} + } + return fitScale + } + setToPageFitScale = () => { + const {coverNodeRef} = this.props + this.resize.to({data: this.getPageFitScale()}) + if (!coverNodeRef) { + this.refs.imageLayer.style.maxWidth = `calc(100vw - ${2 * IMAGE_MARGIN}px)` + this.refs.imageLayer.style.maxHeight = `calc(100vh - ${2 * IMAGE_MARGIN}px)` + } + } + getOriginalScale = () => { + return {scale: 1} + } + setToOriginalScale = () => { + const {coverNodeRef} = this.props + this.resize.to({data: this.getOriginalScale()}) + if (!coverNodeRef) { + this.refs.imageLayer.style.maxWidth = '' + this.refs.imageLayer.style.maxHeight = '' + } + } + + /** + * 尺寸控制器 + **/ + handleResizeScale = (curr) => { + if (this.refs.imageLayer) { + this.refs.imageLayer.style.transform = `translate(-50%, -50%) scale(${curr.scale})` + } + } + + // 获取加了二级域名的链接 + addSubdomainUrl = (url = '') => { + let subdomain = window.ecologyContentPath || ''; + //外部链接和已经加过的不用加 + if( url === '' || subdomain === '' + || url.indexOf('/') != 0 + || url.indexOf(subdomain+'/') == 0 ) return url; + + return subdomain+url; + + } + + render() { + const {zoom, page, imageSet} = this.props + const {onLoad, onError} = this.state + return ( + + + {/*加载动画*/} + {onLoad && } + + {/*加载错误*/} + {onError && } + + {/*图片*/} + {this.addSubdomainUrl(imageSet[page].alt)} this.setState({onLoad: false})} + onError={() => this.setState({onError: true, onLoad: false})} + onClick={zoom ? this.handleToggleZoom : () => { + }} + /> + + + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Image/index.less b/pc4mobx/esearch/public/wea-zmage/components/Image/index.less new file mode 100644 index 0000000..bf8649f --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Image/index.less @@ -0,0 +1,66 @@ +.imageLayer { + user-select: none; + transform: translate(-50%, -50%); + will-change: transform; +} + +.loading-error { + width: 100px; + font-size: 16px; +} + +// 加载动画 +.loading { + display: inline-block; + z-index: 80; + width: 20px; + height: 20px; + transform: rotate(45deg); + animation: rotate 1.2s infinite linear; + + i { + width: 9px; + height: 9px; + border-radius: 100%; + background-color: #108ee9; + transform: scale(.75); + display: block; + position: absolute; + opacity: .3; + animation: spinMove 1s infinite linear alternate; + transform-origin: 50% 50%; + } + + :first-child { + left: 0; + top: 0; + } + :nth-child(2) { + right: 0; + top: 0; + animation-delay: .4s + } + :nth-child(3) { + right: 0; + bottom: 0; + animation-delay: .8s + } + :nth-child(4) { + left: 0; + bottom: 0; + animation-delay: 1.2s + } +} + +// 加载动画 +@keyframes rotate { + to { + transform: rotate(405deg) + } +} + +@keyframes spinMove { + to { + opacity: 1 + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Position/index.js b/pc4mobx/esearch/public/wea-zmage/components/Position/index.js new file mode 100644 index 0000000..f68c319 --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Position/index.js @@ -0,0 +1,146 @@ +/** + * 位移控制层 + * 获取封面位置并控制图片位移 + **/ + +// React Libs +import React from 'react' +// Style +import './index.less' +// Utils +import Lerp from '../../utils/lerp' +import { + addListenEventOf, removeListenEventOf, + windowWidth, clientWidth, + windowHeight, clientHeight +} from '../../utils' + +// TODO: CONFIG +const IMAGE_MARGIN = 50 + +export default class Position extends React.Component { + constructor(props) { + super(props) + + this.state = { + // 原始尺寸 + naturalSize: null, + // 移动范围 + moveRange: null + } + } + + componentWillMount() { + this.move = new Lerp({ + data: this.getCoverCenterPosition(), + poster: this.handleMoveCenterPosition + }) + // 记录初始页面高度 + this.initialPageOffset = window.pageYOffset + } + + componentWillReceiveProps(nextProps) { + const {show, zoom} = nextProps + if (show) { + this.moveToPageCenterPosition() + if (zoom) { + this.gerZoomMovePositionRange() + addListenEventOf('mousemove', this.handleMouseMove) + } else { + removeListenEventOf('mousemove', this.handleMouseMove) + } + } else { + this.moveToCoverCenterPosition() + removeListenEventOf('mousemove', this.handleMouseMove) + } + } + + /** + * 放大查看 + **/ + gerZoomMovePositionRange = () => { + const {zoom, page, imageSet} = this.props + const image = new Image() + image.src = imageSet[page].src + const naturalWidth = image.naturalWidth + const naturalHeight = image.naturalHeight + this.setState({ + naturalSize: !zoom ? {naturalWidth, naturalHeight} : null, + moveRange: !zoom ? { + x: naturalWidth - clientWidth() + (2 * IMAGE_MARGIN), + y: naturalHeight - clientHeight() + (2 * IMAGE_MARGIN) + } : null + }) + } + handleMouseMove = (e) => { + const {naturalSize, moveRange: mr} = this.state + const {naturalWidth: nw, naturalHeight: nh} = naturalSize + const cw = clientWidth() + const ch = clientHeight() + const mouseX = e.clientX + const mouseY = e.clientY + // 计算偏移量 + const imgPosX = nw > cw ? ((nw - cw) / 2 + IMAGE_MARGIN) - (mr.x * (mouseX / cw)) : 0 + const imgPosY = nh > ch ? ((nh - ch) / 2 + IMAGE_MARGIN) - (mr.y * (mouseY / ch)) : 0 + // 设置图片位置 + this.move.to({ + data: { + x: imgPosX, + y: imgPosY + } + }) + } + + /** + * 状态切换 + **/ + getCoverCenterPosition = () => { + const {page, coverNodeRef} = this.props + let coverCenterPosition = {x: 0, y: 0} + if (coverNodeRef) { + const coverNodeRect = coverNodeRef.getBoundingClientRect() + coverCenterPosition = page === 0 ? { + x: -windowWidth() / 2 + coverNodeRect.left + coverNodeRect.width / 2, + y: -windowHeight() / 2 + coverNodeRect.top + coverNodeRect.height / 2 + } : { + x: 0, + y: -windowHeight() + } + } + return coverCenterPosition + } + moveToCoverCenterPosition = () => { + this.move.to({data: this.getCoverCenterPosition()}) + } + getPageCenterPosition = () => { + return {x: 0, y: 0} + } + moveToPageCenterPosition = () => { + this.move.to({data: this.getPageCenterPosition()}) + } + + /** + * 位移控制器 + **/ + handleMoveCenterPosition = (curr) => { + const {show} = this.props + if (this.refs.positionController) { + this.refs.positionController.style.visibility = 'visible' + this.refs.positionController.style.transform = `translate3d(${curr.x}px, ${curr.y}px, 0)` + if (!show) { + const scrollChange = window.pageYOffset - this.initialPageOffset + this.refs.positionController.style.top = `calc(50% - ${scrollChange}px)` + } + } + } + + render() { + return ( +
    +
    + { this.props.children } +
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Position/index.less b/pc4mobx/esearch/public/wea-zmage/components/Position/index.less new file mode 100644 index 0000000..2e4073e --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Position/index.less @@ -0,0 +1,27 @@ +.positionLayer { + width: 100vw; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + + > div { + z-index: 100; + visibility: hidden; + will-change: transform, top; + + // + width: 0; + height: 0; + position: absolute; + left: 50vw; + + .loadError { + position: absolute; + top: 50%; + left: 50%; + margin-left: -120px; + margin-top: -80px; + } + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.js b/pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.js new file mode 100644 index 0000000..7548df3 --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.js @@ -0,0 +1,216 @@ +/** + * 包裹层 + * 储存主要状态,组织架构 + **/ + +// React Libs +import React from 'react' +import ReactDOM from 'react-dom' +// Style +import './index.less' +// Components +import Position from '../Position' +import Control from '../Control' +import Image from '../Image' +import Background from '../Background' + +import {addListenEventOf, removeListenEventOf} from '../../utils' + +class Wrapper extends React.Component { + constructor(props) { + super(props) + + this.state = { + // 显示 + show: false, + // 缩放 + zoom: false, + // 当前页数 + page: props.page || 0 + } + } + + componentWillReceiveProps(nextProps) { + if (this.props.page != nextProps.page) { + this.setState({page: nextProps.page}); + } + } + + componentWillMount() { + // 延迟 100 毫秒加载自己,保证动画正常 + setTimeout(this.mountSelf, 50) + } + + componentWillUnmount() { + removeListenEventOf('keydown', this.handleKeyDown) + removeListenEventOf('wheel', this.handleWheelScroll) + } + + /** + * 加载器 + **/ + mountSelf = () => { + const {coverNodeRef} = this.props + // 隐藏封面原图 + // if (coverNodeRef) coverNodeRef.style.visibility = 'hidden' + // 显示并绑定事件 + this.setState({show: true}, () => { + addListenEventOf('keydown', this.handleKeyDown) + addListenEventOf('wheel', this.handleWheelScroll) + }) + } + unmountSelf = () => { + const {coverNodeRef} = this.props + const {page} = this.state + // 显示封面原图(当前不为第一页时,遮罩从上方移除会迅速露出,需要立即显示,否则交由图片层处理) + if (coverNodeRef && page !== 0) coverNodeRef.style.visibility = 'visible' + this.setState({show: false}) + } + + /** + * 事件处理 + **/ + handleKeyDown = (e) => { + // 阻止默认事件 + e.preventDefault() + const {imageSet} = this.props + const {zoom} = this.state + const hasImageSet = imageSet && imageSet.constructor === Array + const toPrevPage = this.handleSwitchPages("prev") + const toNextPage = this.handleSwitchPages("next") + switch (e.key) { + case "ArrowLeft": + // 上一张 + !zoom && toPrevPage() + break + case "ArrowRight": + // 下一张 + !zoom && hasImageSet && toNextPage() + break + case " ": + // 缩放 + this.handleToggleZoom() + break + case "Escape": + // 退出 + zoom ? this.handleToggleZoom() : this.unmountSelf() + break + default: + return + } + } + handleWheelScroll = (e) => { + this.state.show && this.unmountSelf() + } + + /** + * 翻页控制 + **/ + handleSwitchPages = (direction) => { + return () => { + const {imageSet} = this.props + const {page} = this.state + this.setState({ + page: direction === "prev" ? + Math.abs(imageSet.length + page - 1) % imageSet.length : + (page + 1) % imageSet.length + }) + } + } + + /** + * 缩放控制 + **/ + handleToggleZoom = () => { + this.setState({ + zoom: !this.state.zoom + }) + } + + render() { + const {coverNodeRef, imageSet, remove} = this.props + const {show, zoom, page} = this.state + return ( +
    + {/*控制层*/} + + + {/*位移控制层*/} + + {/*图片层*/} + + + + {/*背景层*/} + + +
    + ) + } +} + +// 主动调用显示,插入控件到指定节点(Body末端) +const showImage = ({id, lazyLoad, indicator, imageSet, page}) => { + + // 封面节点 + const coverNodeRef = document.getElementById(id) + + // 容器节点 + const wrapperNodeId = `zmage-wrapper` + const previousOverlayNode = document.getElementById(wrapperNodeId) + previousOverlayNode && previousOverlayNode.remove() + const wrapperNode = document.createElement('div') + wrapperNode.id = wrapperNodeId + document.body.appendChild(wrapperNode) + const wrapperNodeRef = document.getElementById(wrapperNodeId) + + //移除函数 + const remove = () => { + ReactDOM.unmountComponentAtNode(wrapperNodeRef) + wrapperNodeRef.remove() + } + + // 插入容器节点 + wrapperNodeRef && ReactDOM.render( + , wrapperNodeRef) + + // 对于函数调用模式,返回容器节点引用, 调用 remove() 即可移除(无动画) + return { + node: wrapperNodeRef, + remove: remove + } +} + +export {showImage, Wrapper} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.less b/pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.less new file mode 100644 index 0000000..f93aa64 --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/components/Wrapper/index.less @@ -0,0 +1,9 @@ +.wrapperLayer { + box-sizing: border-box; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1000; +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/config/index.js b/pc4mobx/esearch/public/wea-zmage/config/index.js new file mode 100644 index 0000000..7b05b5d --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/config/index.js @@ -0,0 +1,18 @@ +/** + * 定义基本的 Image 参数类型 + **/ + +// React Libs +import PropTypes from 'prop-types'; + +// 默认的图片参数类型 +export const imageType = PropTypes.shape({ + src: PropTypes.string, // 图片链接 + alt: PropTypes.string, // 同 img 标签的 alt + text: PropTypes.string, // 图片描述文字 +}) + +// 动画时长 (ms) ( img/index.less ) +export const animateDuration = 400 +// 动画曲线 ( img/index.less ) +export const animationFunc = 'cubic-bezier(0.15, 1, 0.3, 1)' \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/index.js b/pc4mobx/esearch/public/wea-zmage/index.js new file mode 100644 index 0000000..8d3cf10 --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/index.js @@ -0,0 +1,102 @@ +/** + * 应用主入口 + **/ + +// React Libs +import React, {Fragment} from 'react' +import PropTypes from 'prop-types' +// Components +import {showImage} from './components/Wrapper' +// Config +import {imageType} from './config' +// Utils +import {generateUUID} from './utils' + +export {showImage, ReactZmage} +export default class ReactZmage extends React.Component { + constructor(props) { + super(props) + this.state = { + uid: generateUUID() + } + } + + render() { + const {uid} = this.state + const { + id, className, // 避免意外 id 覆盖 + src, hiResSrc, alt, text, // 基本属性 + lazyLoad, indicator, // 配置参数 + imageSet, // 图片列表 + onClick, // 用于单独执行 onClick + style, // 样式 + page, + ...props // 剩余参数 + } = this.props + const uuid = `u${uid}` + return ( + {alt} { + // 执行绑定的函数 + onClick && onClick.constructor === Function && onClick() + // 显示幻灯片叠层 + showImage({ + id: uuid, + lazyLoad, indicator, + imageSet: imageSet && imageSet.constructor === Array ? + imageSet : [{ + src: hiResSrc || src, + alt, + text + }], + page: page + }) + }} + style={Object.assign({cursor: 'zoom-in'}, style)} + {...props} + /> + ) + } +} + + +// 默认参数 +ReactZmage.defaultProps = { + // 图片链接 + src: "", + // 高分原图链接 + hiResSrc: "", + // 图片标题 + alt: "", + // 图片描述 + text: "", + // 图片列表参数 + imageSet: null, + // 懒加载 + lazyLoad: true, + // 指示器 + indicator: true +} + +// 参数类型 +ReactZmage.propTypes = { + // 图片链接 + src: PropTypes.string, + // 高分原图链接 + hiResSrc: PropTypes.string, + // 图片标题 + alt: PropTypes.string, + // 图片描述文字== + text: PropTypes.string, + // 图片列表参数, 可以传入单独的图片类型或数组包裹的图片类型 + imageSet: PropTypes.oneOfType([ + PropTypes.arrayOf(imageType), + imageType + ]), + // 懒加载 (图片切换时) + lazyLoad: PropTypes.bool, + // 指示器 (图片切换时) + indicator: PropTypes.bool +} \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/utils/index.js b/pc4mobx/esearch/public/wea-zmage/utils/index.js new file mode 100644 index 0000000..1f6300a --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/utils/index.js @@ -0,0 +1,43 @@ +/** + * 工具函数 + **/ + +// 随机字符串 +export const generateUUID = () => { + let d = new Date().getTime(); + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { + const r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c==="x" ? r : (r&0x7|0x8)).toString(16); + }); +}; + +// 通过屏幕尺寸以及图片尺寸,计算出图片能在屏幕中完整显示的缩放比例 +export const calcFitScale = (nodeRef, margin) => { + const cw = clientWidth(), ch = clientHeight() + const nw = nodeRef.naturalWidth+4*margin, nh = nodeRef.naturalHeight+4*margin + const windowRatio = cw/ch, naturalRatio = nw/nh + if (nw>=cw && nh>=ch) { + return windowRatio>naturalRatio ? ch/nh : cw/nw + } else if (nw>=cw && nh<=ch) { + return cw/nw + } else if (nw<=cw && nh>=ch) { + return ch/nh + } else if (nw<=cw && nh<=ch) { + return 1 + } +} + +// 事件绑定 +export const addListenEventOf = (event, handler) => { + window.addEventListener(event, handler, true) +} +export const removeListenEventOf = (event, handler) => { + window.removeEventListener(event, handler, true) +} + +// 屏幕尺寸 +export const windowWidth = () => window.innerWidth +export const clientWidth = () => document.documentElement.clientWidth +export const windowHeight = () => window.innerHeight +export const clientHeight = () => document.documentElement.clientHeight \ No newline at end of file diff --git a/pc4mobx/esearch/public/wea-zmage/utils/lerp.js b/pc4mobx/esearch/public/wea-zmage/utils/lerp.js new file mode 100644 index 0000000..248377a --- /dev/null +++ b/pc4mobx/esearch/public/wea-zmage/utils/lerp.js @@ -0,0 +1,111 @@ +/** + * 插值工具函数 + * 传入一个目标值,然后会循环调用初始化中传入的 poster 函数,返回生成的中间值 + * 使用方式 + * 1. 初始化 + * const lerp = new Lerp({ + * data: {x: 0, y: 0}, + * poster: (curr, diff) => {} + * }) + * 2. 启动 + * lerp.go({ + * x: imgPosX, + * y: imgPosY + * }) + * 3. 中断 + * lerp.stop() + **/ + +export default class Lerp { + + constructor({ data, poster }) { + // 是否正在执行插值循环 + this.looping = false + // 目标池 + this.pool = data || { value: 0 } + // 当前值 + this.current = data || { value: 0 } + // 发送器 + this._postValue = poster || this._postValue + // 插值系数 + this.attr = 0.25 + // 定时器引用 + this._timer = null + } + + // ******* + // 接口方法 + // ******* + // 启动循环 + to = ({ data, before, after, attr }) => { + // 更新参数 + this.pool = data || this.pool + // 前置与后置函数 + this._before = before || this._before + this._after = after || this._after + // 插值系数 + this.attr = attr || this.attr + // 启动循环 + this._startLoop() + } + // 终止循环 + stop = this._stopLoop + + // ******* + // 内部方法 + // ******* + // 执行循环 + _startLoop = () => { + !this.looping && this._runLoop() + this.looping = true + } + _runLoop = () => { + this._before() + this._timer = window.requestAnimationFrame(this._loop) + } + _loop = () => { + // 插值 + const pulse = {} + for(let key in this.pool) { + pulse[key] = this._lerp(this.current[key], this.pool[key]) + } + // 更新当前值 + for(let key in this.current) { + this.current[key] += pulse[key] + } + // 发送计算结果 + this._postValue(this.current, pulse) + + // 根据处理结果选择是否需要继续迭代 + let needLoop = false + for(let key in this.current) { + if(Math.abs(this.pool[key] - this.current[key]) > 0.0005) { + needLoop = true + } + } + needLoop ? this._runLoop() : this._stopLoop() + } + _stopLoop = () => { + this.looping && window.cancelAnimationFrame(this._timer) + this.looping = false + this._after() + } + + // ******* + // 插值函数 + // ******* + // 线性插值 + _lerp = (src, dest) => { + return (dest - src) * this.attr + } + + // ******* + // 重载函数 + // ******* + // 发送器 + _postValue = (curr, diff) => {} + // 前置函数 + _before = () => {} + // 后置函数 + _after = () => {} +} \ No newline at end of file diff --git a/pc4backstage/hrmengine/single.js b/pc4mobx/esearch/single.js similarity index 62% rename from pc4backstage/hrmengine/single.js rename to pc4mobx/esearch/single.js index ec6fb9d..f070a87 100644 --- a/pc4backstage/hrmengine/single.js +++ b/pc4mobx/esearch/single.js @@ -1,28 +1,25 @@ import React from 'react'; import ReactDOM from 'react-dom'; - import { createHashHistory } from 'History'; - -import { Router, Route, useRouterHistory } from 'react-router' - +import { Router, Route, useRouterHistory } from 'react-router'; import { syncHistoryWithStore, RouterStore } from 'mobx-react-router'; - import { Provider } from 'mobx-react'; - -import Hrm from 'weaHrmEngine' //umd - +import ESearch from 'weaESearch' //umd const routing = new RouterStore(); const allStore = { routing, - ...Hrm.store, -} + ...ESearch.store, +}; -const HrmRoute = Hrm.Route; +const signStore = { + routing, + store: { ...ESearch.store }, +}; const browserHistory = useRouterHistory(createHashHistory)({ queryKey: '_key', - basename: '/' + basename: '/', }); const history = syncHistoryWithStore(browserHistory, allStore.routing); @@ -30,13 +27,15 @@ const history = syncHistoryWithStore(browserHistory, allStore.routing); const Home = props => props.children; const Root = () => ( - - - - { HrmRoute } + + + + { ESearch.Route } ); -ReactDOM.render(, document.getElementById('container')); \ No newline at end of file +ReactDOM.render(, document.getElementById('container')); + +module.exports = ESearch; \ No newline at end of file diff --git a/pc4mobx/esearch/stores/apiSet.js b/pc4mobx/esearch/stores/apiSet.js new file mode 100644 index 0000000..f3850d8 --- /dev/null +++ b/pc4mobx/esearch/stores/apiSet.js @@ -0,0 +1,74 @@ +import {observable, action, toJS} from 'mobx'; +import * as API from '../apis/apiSet'; + +import {message} from 'antd'; +import {WeaForm } from 'comsMobx'; + +import {WeaLocaleProvider} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; +import weeosStore from './weeso'; + +class ApiSetStore { + @observable form = new WeaForm(); + + @observable status = { + fields: [], + saveLoading: false, + showDialog: false, + } + + @observable apiSetRight = false; + + @action + + doInit = () =>{ + this.status = { + fields: [], + saveLoading: false, + }; + this.getSearchSet(); + } + + setState = (params = {}) => { + let status = {...this.status}; + Object.keys(params).forEach(key => { + status[key] = params[key]; + }); + this.status = status; + } + + //获取微搜接口设置信息 + getSearchSet = () => { + API.getSearchSet().then(result => { + if(result.ret === "noright") { + this.apiSetRight = false; + } else { + this.apiSetRight = true; + this.form = new WeaForm(); + this.form.initFormFields(result.fields); + window.e9ChangedFormFieldKey = 'balalblallale'; + this.status = {...this.status, fields: result.fields} + } + }) + } + + // 保存微搜接口设置信息 + saveSearchSet = (params) => { + this.status.saveLoading = true; + API.saveSearchSet(params).then(result => { + this.status.saveLoading = false; + if(result.ret){ + this.status.showDialog = false; + message.success(`${getLabel(18758,'保存成功')}`); + this.getSearchSet(); + weeosStore.getBaseData(); + }else { + message.error(`${getLabel(22620,'保存失败')}`); + } + }) + } + +} + +const weesoSetStore = new ApiSetStore(); +export default weesoSetStore; \ No newline at end of file diff --git a/pc4mobx/esearch/stores/index.js b/pc4mobx/esearch/stores/index.js new file mode 100644 index 0000000..4ab0636 --- /dev/null +++ b/pc4mobx/esearch/stores/index.js @@ -0,0 +1,12 @@ +import weesoStore from './weeso'; +import weesoSetStore from './apiSet'; +import weesoRobotStore from './robot'; +import weesoSeachSetStore from './weesoSeachSetStore'; + +module.exports = { + weesoStore, + weesoSetStore, + weesoRobotStore, + weesoSeachSetStore +}; + diff --git a/pc4mobx/esearch/stores/index.js.bak b/pc4mobx/esearch/stores/index.js.bak new file mode 100644 index 0000000..88c5787 --- /dev/null +++ b/pc4mobx/esearch/stores/index.js.bak @@ -0,0 +1,10 @@ +import weesoStore from './weeso'; +import weesoSetStore from './apiSet'; +import weesoRobotStore from './robot'; + +module.exports = { + weesoStore, + weesoSetStore, + weesoRobotStore +}; + diff --git a/pc4mobx/esearch/stores/robot.js b/pc4mobx/esearch/stores/robot.js new file mode 100644 index 0000000..43ada2c --- /dev/null +++ b/pc4mobx/esearch/stores/robot.js @@ -0,0 +1,147 @@ +import {observable, action, toJS} from 'mobx'; +import * as API from '../apis/robot'; +import {Modal, message} from 'antd'; +import { WeaTableNew, WeaForm } from 'comsMobx'; +const {TableStore} = WeaTableNew; +import {WeaLocaleProvider} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +class WeesoRobotStore { + @observable form = new WeaForm(); + @observable createForm = new WeaForm(); + @observable tableStore = new TableStore(); + + @observable status = { + showSearchAd: false, + conditioninfo: [], //高级搜索 + alertPage: false, + } + + @observable dialogStatus = { + createOrEdit: 0, //0:新建 1: + editId: '', // 编辑id + canClick: true, //控制新建、编辑不能同一时刻多次点击 + showDialog: false, //新建、编辑弹框 + dialogLoading: false, + saveLoading: false, //保存 + createFields: [], + } + + @action + + doInit = () => { + this.getList(); + this.getCondition(); + } + + setState = (params = {}) => { + let status = {...this.status}; + Object.keys(params).forEach(key => { + status[key] = params[key]; + }); + this.status = status; + } + + setDialogState = (params = {}) => { + let dialogStatus = {...this.dialogStatus}; + Object.keys(params).forEach(key => { + dialogStatus[key] = params[key]; + }); + this.dialogStatus = dialogStatus; + } + + //指令列表 + getList = (isOnChange = false) => { + let params = this.form && this.form.getFormParams() || {}; + API.getList(params).then(result => { + if(result.ret == 'noright'){ + this.status.alertPage = true; + }else { + this.status.alertPage = false; + isOnChange ? this.tableStore.getDatas(result.sessionkey, 1) :this.tableStore.getDatas(result.sessionkey) + } + }) + } + + //高级搜索条件 + getCondition = () => { + API.getCondition().then(result => { + this.form = new WeaForm(); + this.form.initFormFields(result.condition); + this.status = {...this.status, conditioninfo: result.condition} + }) + } + + //添加修改数据展示 + getFields = (params) => { + this.dialogStatus.canClick = false; + API.getFields(params).then(result => { + if(result.ret == 'noright'){ + this.dialogStatus.alertPage = true; + }else { + this.dialogStatus.alertPage = false; + this.createForm = new WeaForm(); + this.createForm.initFormFields(result.fields); + window.e9ChangedFormFieldKey = 'bakkdakekoafkoew'; + this.dialogStatus = {...this.dialogStatus, createFields: result.fields, showDialog: true, canClick: true} + } + }) + } + + // 添加 + addRobot = (params) => { + this.dialogStatus.saveLoading = true; + API.addRobot(params).then(result => { + this.dialogStatus = {...this.dialogStatus, saveLoading: false, showDialog: false}; + this.doCommonFunc(result); + }) + } + + // 修改 + editRobot = (params) => { + this.dialogStatus.saveLoading = true; + API.editRobot(params).then(result => { + this.dialogStatus = {...this.dialogStatus, saveLoading: false, showDialog: false}; + this.doCommonFunc(result); + }) + } + + // 删除 + deleteRobot = (params) => { + API.deleteRobot(params).then(result => { + this.doCommonFunc(result); + }) + } + + // 启用/禁用 + openRobot = (params) => { + API.openRobot(params).then(result => { + this.doCommonFunc(result); + }) + } + + // 创建索引 + createRobotIndex = (params) => { + API.createRobotIndex(params).then(result => { + if(result.ret == 'true'){ + message.success(getLabel(83885,'操作成功!')); + }else { + message.error(getLabel(83912,'操作失败!')); + } + }) + } + + doCommonFunc = (result) => { + if(result.ret == 'true'){ + message.success(getLabel(83885,'操作成功!')); + this.getList(); + }else { + message.error(result.msg ? result.msg : getLabel(83912,'操作失败!')); + } + } + +} + +const weesoRobotStore = new WeesoRobotStore(); +export default weesoRobotStore; + diff --git a/pc4mobx/esearch/stores/weeso.js b/pc4mobx/esearch/stores/weeso.js new file mode 100644 index 0000000..df10433 --- /dev/null +++ b/pc4mobx/esearch/stores/weeso.js @@ -0,0 +1,661 @@ +import {observable, action, toJS} from 'mobx'; +import {WeaForm, WeaTableNew} from 'comsMobx'; +import * as API from '../apis/weeso'; +import {Modal, message} from 'antd'; +import isEmpty from 'lodash/isEmpty'; +import {WeaLocaleProvider} from 'ecCom'; +import weesoSeachSetStore from './weesoSeachSetStore'; +const {TableStore} = WeaTableNew; +const getLabel = WeaLocaleProvider.getLabel; + +class WeesoStore { + //getBaseData获取是否成功 + @observable spinning = false; + //数据加载 + @observable loading = false; + //getBaseData返回数据 + @observable baseDadas = {}; + @observable contentType = []; + @observable searchType = []; + + //保存微搜个人搜索设置 + @observable numberValue = ''; + @observable searchValue = ''; + @observable sortValue = ''; + + //顶部热点、设置相关 + @observable sysadminVisible = false; + @observable sysVisible = false; + @observable setVisible = false; + @observable perVisible = false; + + //input输入框相关 + @observable iconClick = false; + + //tab默认显示 + @observable defaultKey = 'CONTENT'; //查询类型 内容:CONTENT、图片:PICTURE + @observable defalutMoreKey = 'ALL'; //查询模块 WF、DOC、WKP等 + + //微搜查询数据 + @observable inputValue = ''; //搜索内容 + @observable previousInputValue = ''; + // @observable otherString = {}; //查询工具内容 + @observable sourceType = 'PC'; + @observable page = '1'; //当前页 + @observable pages = '1'; //总共页数 + + //doSearch返回数据 + @observable searchDatas = {}; + @observable searchResult = []; + @observable emptyResult = ''; + @observable imageResult = []; + + //创建时间、日期等选择 + @observable startDate = ''; + @observable endDate = ''; + + //浏览按钮相关 + @observable browsertype = ''; + + //判断是否调用doSearch + @observable isSearch = false; + //管理员权限 + @observable showAdmin = false; + + // 获取常用词关联 + @observable hotkeys = []; + @observable showHotKeys = false; + + //input上一排tab计算 + @observable widthMap = {}; + @observable copiedcontentType1 = []; //深拷贝后的contentType , + @observable copiedcontentType2 = []; //dropdowm 剩余参数 + + //热词上下键切换效果 + @observable myKey = -1; + @observable currentInputValue = ''; + + @observable isSearchSucess = false; + + + //工具展示改造 + @observable showToolPopover = false; + @observable maskClosable = true; + + // 高级搜索数据 + @observable searchInfo = {}; + @observable searchForm = new WeaForm(); + @observable searchConditions = []; + @observable isShowSearchIcon = false; //是否显示高级搜索图标--选择搜搜条件,并搜索之后 + @observable getTypeDatas = []; //保存高级搜索取到的值 + @observable searchKey = ''; + + + //记录用户使用习惯 + @observable userDatas = []; + @observable userData1 = { + type: 'pageTrack', + userAgent: navigator.userAgent, + timeStamp: '', + timeStayTime: '', + } + @observable timeStamp1 = ''; + @observable timeStamp2 = ''; + + //路由跳转记录 + @observable isRouting = false; + @observable inputNode = null; + @observable selectionStart = 0; + @observable selectionEnd = 0; + + // + @observable isHotkeySearch = false; //记录是否热词搜索 + @observable isCustomer = false; //记录是否外部切入微搜 + + @observable workPlanVisible = false; //日程引入 + + @observable showSubmitIcon = false; //是否显示微搜结果提交按钮 + + @observable isLocked = false; //是否锁定搜索 + + @observable wpLoaded = false; + + @observable smLoaded = false; + + @observable supportSkipSearch = false; + + @observable skipSearchParams = { + currentPage: 0, + lastRealNumber: 0, + }; + //支持无侵入开发的参数-勿删 + @observable searchPageParams = {}; + + @observable ecodeTitleParams = { + }; + //支持无侵入开发的参数-勿删 + + @observable tagsDatas = { + commonConditions: [ + {name: '1111', key: 1}, + {name: '2222', key: 2, canDel: true}, + ], + conditionSpining: false, + conditionSetTableStore: new TableStore(), + logoVisible: true, + }; + + + @observable cuspage_status = undefined; + @observable historySearchList = undefined; + @observable page_icon = undefined; + @observable page_resultLogo = undefined; + @observable page_resultShowLogo = undefined; + @observable page_showCommonConditions = undefined; + @observable page_showHistory = undefined; + @observable page_showIcon = undefined; + @observable page_title = undefined; + @observable tagList = []; + @observable urlParams = {}; + @observable isSetServer = true; + @observable isSetServerMsg = ''; + + @action + + //初始化微搜初始化页面 + initWeeso = (page_uuid) => { + this.getBaseData(undefined, undefined, undefined, page_uuid); + this.isSearch = false; + this.inputValue = ''; + this.showHotKeys = false; + this.iconClick = false; + this.defaultKey = 'CONTENT'; + this.defalutMoreKey = 'ALL'; + this.showHotKeys = false; + this.commonInit(); + }; + + //初始化微搜查询页面 + initWeesoResult = () => { + this.isSearch = true; + this.commonInit(); + }; + + setWPLoaded = (bool) => this.wpLoaded = bool; + + setSMLoaded = (bool) => this.smLoaded = bool; + + + //其他公共初始化 + commonInit = () => { + this.showTool = false; + this.otherString = {}; + this.pages = '1'; + this.page = '1'; + this.myKey = -1; + this.searchDatas = {}; + this.imageResult = []; + this.emptyResult = ''; + this.searchResult = []; + this.toolChangeInit(); + } + + //工具切换初始化 + toolChangeInit = () => { + this.pages = '1'; + this.page = '1'; + this.myKey = -1; + this.searchDatas = {}; + this.imageResult = []; + this.emptyResult = ''; + this.searchResult = []; + } + + setState = (params = {}, callback) => { + Object.keys(params).forEach(key => { + this[key] = params[key]; + }); + typeof callback == 'function' && callback(); + return this; + } + + setUrlParams = (params, callback) => { + this.urlParams = params; + typeof callback == 'function' && callback(); + } + + //获取初始数据 + getBaseData = (showError = true, callRouting, callSearch, page_uuid, callback) => { + this.spinning = true; + let params = { + page_uuid: page_uuid + }; + API.getBaseData(params).then(data => { + this.spinning = false; + if (data.FLAG == -1) { + this.isSetServer = false; + this.isSetServerMsg = data.MSG; + if(callRouting)callRouting(); + if(showError){ + Modal.error({ + title: getLabel(15172, "系统提示"), + content: , + }); + } + }else { + this.isSetServer = true; + this.isSetServerMsg = ''; + if(params.page_uuid && !(params.page_uuid === '' || params.page_uuid === 'FULLSEARCH')) { + this.defalutMoreKey = data.search_type; + } + + if(callSearch)callSearch(); + } + this.baseDadas = data; + this.contentType = data.contentType && data.contentType; + this.searchType = data.searchType && data.searchType; + this.searchInfo = data.searchInfo && data.searchInfo; + + this.supportSkipSearch = data && data.supportSkipSearch ? data.supportSkipSearch : false; + + this.changeKey(this.defalutMoreKey); + + //topTabs初始 + debugger + if(Object.keys(this.widthMap).length == 0){ + this.copiedcontentType1 = this.contentType; + } + + data.searchSet && data.searchSet.numperpage && data.searchSet.numperpage.length!==0 && + data.searchSet.numperpage.map((item, index) => { + if (item.selected == true) { + this.numberValue = data.searchSet.numperpage[index].key + } + }); + + data.searchSet && data.searchSet.sortField && data.searchSet.sortField.length!==0 && + data.searchSet.sortField.map((item, index) => { + if (item.selected == true) { + this.sortValue = data.searchSet.sortField[index].key + } + }); + + data.searchSet && data.searchSet.searchField && data.searchSet.searchField.length!==0 && + data.searchSet.searchField.map((item, index) => { + if (item.selected == true) { + this.searchValue = data.searchSet.searchField[index].key + } + }); + + if(data.api_status) { + this.cuspage_status = data.cuspage_status; + this.historySearchList = data.historySearchList; + this.page_icon = data.page_icon; + this.page_resultLogo = data.page_resultLogo; + this.page_resultShowLogo = data.page_resultShowLogo; + this.page_showCommonConditions = data.page_showCommonConditions; + this.page_showHistory = data.page_showHistory; + this.page_showIcon = data.page_showIcon; + this.page_title = data.page_title; + this.tagList = data.tagList; + let urlP = {}; + if(this.urlParams.type) { + urlP = { + ...urlP, + search_type: this.urlParams.type + }; + } + if(this.urlParams.hideTitle === 'true' || this.urlParams.hideTitle === '1') { + urlP = { + ...urlP, + topTabsVisible: false + }; + } + if(weesoSeachSetStore) { + weesoSeachSetStore.setState({ + search_type: data.search_type, + page_descStr: data.page_descStr, + page_uuid: data.page_uuid, + topTabsVisible: data.search_type === 'ALL', + ...urlP + }); + } + } + if(callback)callback(); + }) + } + + //tabs重排 + resortTopTaps = () => { + debugger; + let + top = [], right = [], contentType = toJS(this.contentType), allWidth = 489; + //如果没有或者widthMap,不进行计算 + if (!this.widthMap) return; + + let currentWidth; + for (let key in this.widthMap) { + if (key == this.defalutMoreKey) { + currentWidth = this.widthMap[key]; + } + } + let restWidth = allWidth - currentWidth - 10; + let sumWidth = 0, isTop = true; + contentType && contentType.length > 0 && contentType.forEach((item) => { + if (item.key == this.defalutMoreKey) { + if (isTop) { + restWidth += currentWidth; + sumWidth += currentWidth; + } + top.push(item) + } else { + sumWidth += this.widthMap[item.key]; + // 二开 && sumWidth < restWidth + if (isTop ) { + top.push(item); + } else { + //isTop -- 保证不会出现上一个元素长了放不下,把下一个元素放到top里面 + isTop = false; + right.push(item) + } + } + this.copiedcontentType1 = top; + this.copiedcontentType2 = right; + }) + } + + + //获取常用词关联 + getAssociate = (params = {key: ''}) => { + API.getAssociate(params).then(result => { + this.hotkeys = result.result + }) + } + + + //切换tab回调 -- 工具表单的处理(路由跳转也需要此处理) + changeKey = (key, isFirst = false) => { + this.searchForm = new WeaForm(); + const source = toJS(this.searchInfo); + if (isEmpty(source) && isFirst) { + let interval = setInterval(() => { + if (!isEmpty(source)) { + this.searchConditions = source[key]; + this.searchForm.initFormFieldObj(toJS(this.searchConditions)); + clearInterval(interval); + } + }, 10) + } else { + if (!isEmpty(source)) { + this.searchConditions = source[key]; + this.searchForm.initFormFieldObj(toJS(this.searchConditions)); + } + } + } + + resetForm = () => { + this.searchForm.reset(); + } + + //处理搜索工具表单数据 + dealSearchParams = () => { + let searchDatas = {}; + if (Object.keys(this.baseDadas).length == 0) { + return searchDatas = ''; + } else { + let datas = toJS(this.searchConditions); + const searchParams = this.searchForm.getFormParams(); + let + resultDay = toJS(this.baseDadas.timeSag.day) || [], + resultWeek = toJS(this.baseDadas.timeSag.week) || [], + resultMonth = toJS(this.baseDadas.timeSag.month) || [], + resultYear = toJS(this.baseDadas.timeSag.year) || []; + datas && datas.length>0 && datas.map(item => { + for (let key in searchParams) { + if (searchParams[key].toString() != '' && key == item.domkey[0]) { + const type = item.conditionType.toUpperCase(); + if (type == 'BROWSER') { + if (item.domkey[0] == 'seccategory') { + searchDatas['firstDirectory'] = searchParams[key].split(','); + } else { + searchDatas[item.domkey] = searchParams[key].split(','); + } + } else if (type == 'RANGEPICKER') { + if (searchParams.CREATEDATE_date_select == '5') { + searchDatas.CREATEDATE = searchParams[key]; + } + if(searchParams.BEGINDATE_date_select == '5'){ + searchDatas.BEGINDATE = searchParams[key]; + } + } else if (type == 'SELECT') { + if (key == 'CREATEDATE_date_select') { + if (searchParams[key] == '1') { + searchDatas.CREATEDATE = resultDay; + } else if (searchParams[key] == '2') { + searchDatas.CREATEDATE = resultWeek; + } else if (searchParams[key] == '3') { + searchDatas.CREATEDATE = resultMonth; + } else if (searchParams[key] == '4') { + searchDatas.CREATEDATE = resultYear; + } + } else if (key == 'BEGINDATE_date_select') { + if (searchParams[key] == '1') { + searchDatas.BEGINDATE = resultDay; + } else if (searchParams[key] == '2') { + searchDatas.BEGINDATE = resultWeek; + } else if (searchParams[key] == '3') { + searchDatas.BEGINDATE = resultMonth; + } else if (searchParams[key] == '4') { + searchDatas.BEGINDATE = resultYear; + } + } else { + searchDatas[key] = searchParams[key]; + } + } else if (type == 'INPUT') { + searchDatas[key] = searchParams[key]; + } + } + } + }) + if(JSON.stringify(searchDatas) == '{}'){ + return searchDatas = '' + }else { + return JSON.stringify(searchDatas); + } + } + } + + preSearch = (params) => { + if(this.showToolPopover){this.showToolPopover = false;} + this.showHotKeys = false; + + this.inputValue && this.inputValue !=='' && this.doSearch(undefined, params); + } + + //微搜查询 + doSearch = (params = { + key: this.inputValue, + contentType: this.defalutMoreKey, + // otherString: this.isCustomer ? '' : this.dealSearchParams(), + otherString: this.urlParams.otherString, + sourceType: this.sourceType, + searchType: this.defaultKey, + page: this.page + }, otherString) => { + // 如果是第三方页面走ecode xlz + if(params.contentType === 'customOdoc'){ + typeof window.customSearch === 'function' && window.customSearch(params,otherString); + return; + } + if(this.isSetServer === false) return; // 未配置微搜 + this.isLocked = true; + // this.showHotKeys = false; + + // if(this.loading) return; + this.setState({ + loading: true, + emptyResult: '', + showHotKeys: false, + searchResult: [] + }) + params = { + ...params, + ...otherString, + page_uuid: weesoSeachSetStore.page_uuid, + searchTagId: weesoSeachSetStore.searchTagParams.key || '', + ...this.skipSearchParams + } + this.skipSearchParams.currentPage = params.page; + if(weesoSeachSetStore) { + weesoSeachSetStore.doSaveHistorySearch({ + searchkey: params.key + }); + } + API.doSearch(params).then(result => { + this.isLocked = false; + this.loading = false; + //this.hotkeys = []; + + const normal = result.normalkey; + if ("-1" == result.FLAG || (normal == this.inputValue)) { + this.isSearchSucess = true; + this.searchDatas = result; + this.pages = result.pages; + + this.skipSearchParams.lastRealNumber = result.lastRealNumber || -1; + + // 这部分是对快速搜索时,判断上次请求是否完成,取最新的搜索结果-start + if (result.FLAG == -1) { + Modal.error({ + title: getLabel(15172, "系统提示"), + content: , + }); + } else if (result.FLAG == -99 ) { + this.emptyResult = result.MSG + } else { + this.searchResult = result.result; + } + // 这部分是对快速搜索时,判断上次请求是否完成,取最新的搜索结果-end + + if (result.FLAG != -1 && this.defaultKey == 'PICTURE') { + this.imageResult = this.imageResult.concat(result.result) + } + if(result.contentType) { + this.defalutMoreKey = result.contentType; + this.resortTopTaps(); + } + } + + //记录用户使用习惯 + if (this.timeStamp1 == '') {//表示第一次进入 + this.timeStamp2 = new Date().getTime(); + this.timeStamp1 = this.timeStamp2; + } else {//此后进入,计算时间差,调接口记录数据 + this.timeStamp1 = this.timeStamp2; + this.timeStamp2 = new Date().getTime(); + this.userData1 = { + ...this.userData1, + timeStamp: String(this.timeStamp1), + timeStayTime: String(this.timeStamp2 - this.timeStamp1) + } + this.userDatas.push(this.userData1); + + this.collectUserData({userDatas: JSON.stringify(this.userDatas)}); + } + }) + } + + //保存微搜个人搜索设置 + saveSearchSet = (params = { + numperpage: this.numberValue, + searchField: this.searchValue, + sortField: this.sortValue + }) => { + API.saveSearchSet(params).then(result => { + if (result.flag == true) { + this.doSearch() + } else { + Modal.error({ + title: getLabel(15172, "系统提示"), + content: getLabel(22620, "保存失败"), + }); + } + }) + } + + //记录用户使用习惯 + collectUserData = (userDatas) => { + API.collectUserData(userDatas).then(() => { + this.userDatas = [] + } + ) + } + + //是否显示微搜结果提交按钮 + showSubmit = () => { + API.showSubmit().then(result => { + this.showSubmitIcon = result.ret; + } + ) + } + + doSubmit = () => { + const params = { + key: this.inputValue,//搜索关键字 + page: this.page, //当前页数 + pageSize: this.numberValue, //每页显示条数 + searchType: this.searchValue, //搜索类型(CONTENT,TITLE) + sort: this.sortValue, //排序方式 + contentType: this.defalutMoreKey, //搜索tab + sourceType: this.sourceType, //来源(PC,mobile) + searchField: this.defaultKey, //搜索范围(内容,图片) + condition: this.isCustomer ? '' : this.dealSearchParams(), //高级搜索条件{json串} + } + Modal.confirm({ + title: getLabel(15172,'系统提示'), + content: getLabel(384971,'不是我想要的搜索结果,确认提交?'), + okText: getLabel(826,'确定'), + cancelText: getLabel(31129,'取消'), + onOk: () => {this.submitResult({...params})} + }); + } + + //微搜结果提交 + submitResult = (params) => { + API.submitResult(params).then(result => { + if(result.ret){ + message.success(getLabel(83923,'提交成功!')); + }else { + message.error(getLabel(384535,'提交失败!')); + } + } + ) + } + + // 常用条件设置 + getConditionSetTable = (params, callback) => { + API.getConditionSetTable(params).then(result => { + if(result.ret == 'noright'){ + }else { + this.tagsDatas.conditionSetTableStore.getDatas(result.sessionkey, 1); + typeof callback === 'function' && callback(); + } + }) + } + + // 获取加了二级域名的链接 + addSubdomainUrl = (url = '') => { + let subdomain = window.ecologyContentPath || ''; + //外部链接和已经加过的不用加 + if( url === '' || subdomain === '' + || url.indexOf('/') != 0 + || url.indexOf(subdomain+'/') == 0 ) return url; + + return subdomain+url; + + } + +} + +const weesoStore = new WeesoStore(); +export default weesoStore; diff --git a/pc4mobx/esearch/stores/weesoSeachSetStore.js b/pc4mobx/esearch/stores/weesoSeachSetStore.js new file mode 100644 index 0000000..7564d5e --- /dev/null +++ b/pc4mobx/esearch/stores/weesoSeachSetStore.js @@ -0,0 +1,376 @@ +import { observable, action, toJS } from 'mobx'; +import { WeaTableNew, WeaForm, WeaLogView } from 'comsMobx'; +import { WeaLocaleProvider } from 'ecCom'; +import * as API from '../apis/searchSet.js'; +import weesoStore from './weeso'; +const {TableStore} = WeaTableNew; +const {LogStore} = WeaLogView; +const getLabel = WeaLocaleProvider.getLabel; +class WeesonSeachSetStore { + @observable dialogVisible = false; + @observable customizationDialogVisible = false; + @observable searchTableStore = new TableStore(); + @observable commonConditionTableStore = new TableStore(); + @observable form = new WeaForm(); + @observable conditions = []; + @observable stepForm = new WeaForm(); + @observable stepConditions = []; + @observable addCommonForm = new WeaForm(); + @observable addCommonConditions = []; + @observable currentStep = 0; + @observable stepContents = [ + { step: 0, label: getLabel('524084','页面基本设置') }, + { step: 1, label: getLabel('524085','常用条件设置') }, + { step: 2, label: getLabel('524261','搜索结果页设置') }, + { step: 3, label: getLabel('555','完成') } + ]; + + @observable collectParams = { + favname:getLabel('524262','微搜设置'), + favouritetype: 1, + objid:0, + link : 'wui/engine.html#/meetingengine/msgdefine', + importantlevel:1, + }; + + @observable addCommonVisible = false; + @observable maintenanceKeyAddCommonVisible = false; + @observable page_uuid = 'FULLSEARCH'; + @observable recordId = ''; + @observable recordParams = {}; + @observable addRecordId = ''; + @observable urlDialogVisible = false; + @observable homeLoading = false; + @observable search_type = ''; + @observable page_descStr = ''; + @observable baseDatas = {}; + @observable commonConditionParams = {}; + @observable browserKeyArr = []; + @observable commonPageType = ''; + @observable hasPageIcon = true; + @observable hasPageResultLogo= true; + @observable pageCusCurrentId = ''; + @observable adSearchForm = new WeaForm(); + @observable adSearchFormConditions = []; + @observable commonDialogVisible = false; + @observable commonDialogInputVal = ''; + @observable searchTagParams = {}; + @observable logStore = new LogStore(); + @observable logvisible = false; + @observable logSmallType = '3'; + @observable logType = '35'; + @observable topTabsVisible = true; + @observable homeToResultPage = undefined; + @observable editCommonConditionRetdatas = {}; + @observable searchPageRight = true; + @observable searchDefinePageInputVal = ''; + @observable searchDefineCommonInputVal = ''; + @observable recordType = ''; + @observable defalutStepForm = new WeaForm(); + + @action + setState = (params = {}, callback) => { + Object.keys(params).forEach(key => { + this[key] = params[key]; + }); + + typeof callback === 'function' && callback(); + } + + getSeachTable = (params) => { + API.getSeachTable(params).then(result => { + // this.searchTableStore.getDatas(result.sessionkey, 1); + }) + } + + getSeachCustomTable = (params) => { + this.form = new WeaForm(); + this.conditions = []; + API.getSeachCustomTable(params).then(result => { + if(result.api_status) { + this.form.initFormFields(result.fields); + this.conditions = result.fields; + + } + }); + } + + getCustompageBaseDatas = (params, type) => { + // cuspage_type: 1:基础信息 2: 仅获取历史搜索记录 (刷新的时候) 3: 仅获取常用条件(刷新的时候) 其他值: 全部获取 + if(type !== 'init') { + params = { + page_uuid: this.page_uuid, + ...params + }; + } + + this.homeLoading = true; + API.getCustompageBaseDatas(params).then(result => { + this.homeLoading = false; + if(type === 'init') { + this.page_uuid = result.page_uuid; + } + if(result.api_status) { + if(result.cuspage_type === '1') { + this.baseDatas = result; + weesoStore.setState({ defalutMoreKey: result.search_type }); + } + if(result.cuspage_type === '2') { + weesoStore.setState({ historySearchList: result.historySearchList }); + } + if(result.cuspage_type === '3') { + weesoStore.setState({ tagList: result.tagList }); + } + if(result.search_type) { + this.search_type = result.search_type; + if(result.search_type === 'ALL') { + this.topTabsVisible = true; + } else { + this.topTabsVisible = false; + } + } + if(result.page_descStr) { + this.page_descStr = result.page_descStr; + } + } + }); + } + + //新建编辑保存 常用条件 + doSaveSearchTag = (params, callback) => { + params = { + page_uuid: this.page_uuid, + search_type: weesoStore.defalutMoreKey, + ...params + }; + API.doSaveSearchTag(params).then(result => { + if(result.api_status) { + typeof callback === 'function' && callback(result); + } + }); + } + + //插入历史搜索记录 + doSaveHistorySearch = (params) => { + params = { + page_uuid: this.page_uuid, + search_type: weesoStore.defalutMoreKey, + ...params + }; + API.doSaveHistorySearch(params).then(result => { + }); + } + + //删除常用条件 + delSearchTag = (params, callback) => { + params = { + page_uuid: this.page_uuid, + ...params + }; + API.delSearchTag(params).then(result => { + if(result.api_status) { + typeof callback === 'function' && callback(); + } + }); + } + + //删除历史搜索条件 + delHistorySearch = (params, callback) => { + params = { + page_uuid: this.page_uuid, + ...params + }; + API.delHistorySearch(params).then(result => { + if(result.api_status) { + typeof callback === 'function' && callback(); + } + }); + } + + getCusPageSetDtl = (params, callback) => { + params = { + page_uuid: this.page_uuid, + ...params, + }; + // params.id = 33 + // params.type = 3 + this.stepForm = new WeaForm(); + this.defalutStepForm = new WeaForm(); + this.stepConditions = []; + API.getCusPageSetDtl(params).then(result => { + if(result.api_status) { + this.page_icon_dir = result.page_icon_dir; + if(result.fields === undefined) { + this.stepForm = new WeaForm(); + this.defalutStepForm = new WeaForm(); + this.stepConditions = []; + } else { + this.stepForm.initFormFields(result.fields); + this.defalutStepForm.initFormFields(result.fields); + this.stepForm.updateFields() + this.stepConditions = result.fields; + } + typeof callback === 'function' && callback(result); + } + }); + } + + getCusPageSetList = (params, callback) => { + params = { + page_uuid: this.page_uuid, + page_title: this.searchDefinePageInputVal, + ...params, + }; + API.getCusPageSetList(params).then(result => {+ `` + if(result.api_status) { + if(result.status === 'noright') { + this.searchPageRight = false; + } else { + this.searchPageRight = true; + this.searchTableStore.getDatas(result.sessionkey, 1); + typeof callback === 'function' && callback(); + } + } + }); + } + + doSaveCusPageSetDtl = (params, callback) => { + params = { + page_uuid: this.page_uuid, + ...params, + }; + API.doSaveCusPageSetDtl(params).then(result => { + if(result.ret === 'success') { + this.recordId = result.id; + this.pageCusCurrentId = result.id; + typeof callback === 'function' && callback(result); + } + }); + } + + getSearchTagList = (params, callback) => { + params = { + page_uuid: this.page_uuid, + tagTitle: this.searchDefineCommonInputVal, + ...params, + }; + this.commonConditionTableStore = new TableStore(); + API.getSearchTagList(params).then(result => { + if(result.api_status) { + this.commonConditionTableStore.getDatas(result.sessionkey, 1); + typeof callback === 'function' && callback(); + } + }); + } + + getSearchTagDtl = (params, callback) => { + params = { + page_uuid: this.page_uuid, + ...params, + }; + this.addCommonForm = new WeaForm(); + this.addCommonConditions = []; + API.getSearchTagDtl(params).then(result => { + if(result.api_status) { + this.addCommonForm.initFormFields(result.fields); + this.addCommonConditions = result.fields; + this.browserKeyArr = result.browserKeyArr; + this.editCommonConditionRetdatas = result; + typeof callback === 'function' && callback(); + } + }); + } + + //删除搜索页面 + delCusPageSet = (params, callback) => { + params = { + page_uuid: this.page_uuid, + ...params + }; + API.delCusPageSet(params).then(result => { + if(result.api_status) { + typeof callback === 'function' && callback(); + } + }); + } + + // 取消隐藏/隐藏 + showAndHideSearchTag = (params, callback) => { + params = { + page_uuid: this.page_uuid, + ...params + }; + API.showAndHideSearchTag(params).then(result => { + if(result.api_status) { + typeof callback === 'function' && callback(); + } + }); + } + + // 高级搜索 + getAdConditions = (params, callback) => { + params = { + page_uuid: this.page_uuid, + fromCondition: 1, + search_type: weesoStore.defalutMoreKey, + ...params, + }; + if(!this.topTabsVisible) { + params = { + ...params, + search_type: this.search_type, + } + } + this.adSearchForm = new WeaForm(); + this.adSearchFormConditions = []; + API.getSearchTagDtl(params).then(result => { + if(result.api_status) { + this.adSearchForm.initFormFields(result.fields); + // this.adSearchForm.resetForm(); + if(result.fields && result.fields[0] && result.fields[0].items && result.fields[0].items[1]) { + if(result.fields[0].items[1].selectLinkageDatas && result.fields[0].items[1].selectLinkageDatas[5]) { + result.fields[0].items[1].selectLinkageDatas[5].viewAttr = 3; + } + } + + this.adSearchFormConditions = result.fields; + this.browserKeyArr = result.browserKeyArr; + typeof callback === 'function' && callback(); + } + }); + } + + adSearchFormReset = () => { + this.adSearchForm.resetForm(); + setTimeout(() => { + this.adSearchForm.updateFields({ CREATEDATE_date_select: '0', BEGINDATE_date_select: '0' }); + }, 0); + } + + filterParams = () => { + let browserKeyArr = this.browserKeyArr; + let adSearchForm = this.adSearchForm; + const formParams = adSearchForm.getFormParams(); + let search_json = { ...formParams }; + delete search_json.showorder; + delete search_json.tagName; + delete search_json.tagTitle; + browserKeyArr = toJS(browserKeyArr); + Object.keys(search_json).forEach(key => { + if(browserKeyArr.some(v => v === key)) { + if(search_json[key] !== '') { + search_json[key] = search_json[key].split(','); + } else { + delete search_json[key]; + } + } + }); + if(Object.keys(search_json).length === 1 && search_json.CREATEDATE_date_select === '0') { + delete search_json.CREATEDATE_date_select; + } + return search_json; + } + +} + +export default new WeesonSeachSetStore(); \ No newline at end of file diff --git a/pc4mobx/esearch/style/apiSet.less b/pc4mobx/esearch/style/apiSet.less new file mode 100644 index 0000000..b8ed516 --- /dev/null +++ b/pc4mobx/esearch/style/apiSet.less @@ -0,0 +1,14 @@ +.wea-weeso-apiset { + .wea-form-cell { + &:last-child { + .wea-form-item{ + padding-bottom: 30px; + } + } + } + .set-tip { + position: absolute; + top: 6px; + right: -35px; + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/style/index.js b/pc4mobx/esearch/style/index.js new file mode 100644 index 0000000..b18ecbc --- /dev/null +++ b/pc4mobx/esearch/style/index.js @@ -0,0 +1,6 @@ +import './weeso.less'; +import './result.less'; +import './apiSet.less'; +import './robot.less'; +import './wessoRecords.less'; +import './searchSet.less'; \ No newline at end of file diff --git a/pc4mobx/esearch/style/result.less b/pc4mobx/esearch/style/result.less new file mode 100644 index 0000000..243eec9 --- /dev/null +++ b/pc4mobx/esearch/style/result.less @@ -0,0 +1,467 @@ +.wea-weeso-result { + width: 100%; + position: relative; + color: #333333; + .wea-weeso-spin { + height: 100%; + .ant-spin-nested-loading { + height: 100%; + .ant-spin-container { + height: 100%; + } + } + } + .wesult-top-container { + position: absolute; + width: 100%; + // height: 118px; + border-bottom: 1px solid #e2e2e2; + background: #ffffff; + z-index: 100; + } + .result-input { + position: absolute; + left: 20px; + top: 5px; + width: 504px; + .weeso-con { + display: block; + } + .weeso-con-main { + float: left; + } + .weeso-tab { + .weeso-tab-search { + padding-left: 0; + } + } + } + .result-create { + width: 502px; + line-height: 30px; + color: #666666; + height: 30px; + > span { + float: left; + padding-right: 21px; + i { + margin-left: 6px; + } + } + > p { + display: inline-block; + float: right; + } + } + .result-tool { + width: 100%; + height: 30px; + color: #999999; + line-height: 30px; + overflow: hidden; + .tool-left { + float: left; + height: 30px; + .tool-left-desc { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: inline-block; + max-width: calc(100% - 38px); + } + } + .tool-icon { + display: inline-flex; + height: 100%; + justify-content: center; + align-items: center; + width: 38px; + vertical-align: top; + >i { + font-size: 18px; + color: #2DB7F5; + cursor: pointer; + margin-top: 4px; + } + .tool-icon-tip { + position: absolute; + margin-top: 58px; + margin-left: 153px; + z-index: 1001; + display: none; + .tool-tip-triangle { + width:0; + height:0; + border-width:0 4px 4px; + border-style:solid; + border-color:transparent transparent #B5AC85; + position:relative; + margin-left: 5px; + >span{ + position:absolute; + top:1px; + left:-3px; + display:block; + width:0; + height:0; + border-width:0 3px 3px; + border-style:solid; + border-color:transparent transparent #FFF8C3; + } + } + .tool-tip-content { + background: #FFF8C3; + border: 1px solid #B5AC85; + border-radius: 3px; + padding: 0 7px; + color: #666666; + margin-top: -1px; + } + } + } + .tool-right { + float: right; + text-align: right; + cursor: pointer; + .tool-right-icon { + color: #00A9FF; + margin-left: 3px; + } + &:hover { + color: #00A9FF; + } + } + .tool-right-show { + color: #00A9FF; + } + .tool-input-content { + color: red; + } + } + .result-link { + position: absolute; + top: 54px; + left: 552px; + color: #999; + } + .result-content { + width: 100%; + height: 100%; + padding: 118px 20px 10px 20px; + .wea-new-scroll { + margin-right: -20px; + } + .ant-spin { + display: block; + padding-top: 20px; + padding-left: 20px; + } + b { + color: red; + } + //iframe 样式 + .robot-content { + //padding: 9px 0; + } + //带头像个人信息 + .content { + padding: 14px 0; + border-bottom: 1px solid #F4F4F4; + position: relative; + &:hover { + .content-choose { + visibility: visible; + } + } + .content-img { + position: absolute; + display: inline-block; + margin-right: 10px; + width: 40px; + height: 40px; + border-radius: 50%; + border: 1px solid #ffffff; + overflow: hidden; + > img { + width: 40px; + height: 40px; + border-radius: 50%; + } + } + .content-detail { + width: 60%; + display: inline-block; + padding-left: 60px; + a { + color: #333333; + &:hover { + color: #00A9FF; + } + } + .detail-msg { + padding-bottom: 6px; + .detail-msg-gender { + margin-left: 10px; + } + } + .detail-target { + color: #999999; + } + .detail-addrs { + padding-left: 23px; + padding-right: 2px; + } + .detail-specific { + padding-right: 14px; + > label { + color: #999999; + } + } + } + .content-choose { + position: absolute; + width: 25%; + line-height: 42px; + display: inline-block; + padding-top: 4px; + visibility: hidden; + .choose-icon { + display: inline-block; + width: 30px; + height: 30px; + line-height: 30px; + text-align: center; + border-radius: 50%; + margin-left: 11px; + text-decoration: none; + > i { + font-size: 20px; + } + } + } + .content-foot { + display: inline-block; + padding-right: 14px; + > span { + color: #999999; + } + > p { + display: inline-block; + color: #333333; + } + } + } + //通用信息 + .common-content { + padding: 9px 0; + > p { + padding-bottom: 6px; + } + > p:last-child { + padding-bottom: 0; + } + .common-content-top { + // font-size: 14px; + // >a { + // font-size: 14px; + // } + > span { + padding-right: 6px; + } + } + .conmon-content-foot { + display: inline-block; + padding-right: 14px; + color: #999999; + > p { + display: inline-block; + } + } + } + } + //查询返回图片样式 + .result-content-images { + width: 100%; + height: 100%; + padding-top: 128px; + padding-left: 20px; + .ant-spin { + padding-top: 10px; + } + .content-images-image { + margin-right: 20px; + margin-bottom: 20px; + display: inline-block; + vertical-align: center; + width: auto; + height: 160px; + position: relative; + float: left; + text-align: center; + border: 1px solid #eee; + transition: all 0.6s; + overflow: hidden; + &:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; + width: 0; + } + &:hover { + border: 1px solid rgba(0,0,0,.6); + .image-title-bg { + display: inline-block; + opacity: .6; + } + .image-title-content { + display: inline-block; + } + img { + transform: scale(1.2); + } + } + > img { + display: inline-block; + width: auto; + max-height: 100%; + max-width: 100%; + vertical-align: middle; + } + .image-title-bg, .image-title-content { + position: absolute; + bottom: 0; + left: 0; + height: 32px; + line-height: 32px; + width: 100%; + z-index: 10; + } + .image-title-bg { + background: #000; + opacity: 0; + } + .image-title-content { + display: none; + z-index: 11; + background: transparent; + overflow: hidden; + padding-left: 10px; + > span { + width: 80%; + color: #fff; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: inline-block; + > b { + color: red; + } + } + } + } + } + .result-pagination { + margin: 10px 0; + .ant-pagination { + > li:nth-last-child(2) { + //display: none; + } + } + .esearch-pagination-customize { + .ant-pagination-last { + display: none; + } + } + } + .weeso-cursor { + cursor: pointer; + } + .weeso-tool { + display: inline-block; + } + + .weeso-plat-select { + > li { + padding: 0 12px; + line-height: 24px; + cursor: pointer; + &:hover { + background: #E9F7FF; + } + } + } + .weeso-tool-position { + position: relative; + display: inline-block; + height: 30px; + margin-right: 35px; + > i { + position: absolute; + top: 9px; + float: right; + } + .weeso-tool-limit { + display: inline-block; + max-width: 80px; + text-overflow: ellipsis; + float: left; + height: 30px; + overflow: hidden; + white-space: nowrap; + } + } + + //查询结果为空时样式 + .wea-content-empty { + padding-top: 10px; + } +} + +//微搜结果图标 +.weeso-style-popover-icon { + .ant-popover-inner { + min-width: 0; + .ant-popover-inner-content { + padding: 0; + color: #333333; + } + } +} + +.weeso-style-popover-animate { + +} + +.esearch-result-container { + .h-115 { + height: 115px; + } + .h-85 { + height: 85px; + } + .esearch-result-logo { + width: 91px; + height: 100%; + float: left; + .result-img { + display: inline-flex; + width: 100%; + align-items: flex-end; + padding-bottom: 30px; + padding-left: 11px; + border-bottom: 1px solid #e2e2e2; + } + + } + .wea-weeso-logo-visible { + width: calc(100% - 91px); + float: left; + .result-input { + left: 0px; + } + .result-content { + padding-left: 0px; + } + } +} diff --git a/pc4mobx/esearch/style/robot.less b/pc4mobx/esearch/style/robot.less new file mode 100644 index 0000000..9d844d7 --- /dev/null +++ b/pc4mobx/esearch/style/robot.less @@ -0,0 +1,9 @@ +.wea-weeso-robot-dialog { + .wea-search-group .wea-content.center { + padding-bottom: 30px; + .wea-form-cell-wrapper{ + width: 550px; + } + } +} + diff --git a/pc4mobx/esearch/style/searchSet.less b/pc4mobx/esearch/style/searchSet.less new file mode 100644 index 0000000..a95cb57 --- /dev/null +++ b/pc4mobx/esearch/style/searchSet.less @@ -0,0 +1,226 @@ +.weeso-search-set { + &-topbtn { + background-color: #fff; + .topbtn { + color: #55a1f8; + } + .ant-btn { + border-radius: 0; + padding: 0; + border: none; + font-size: 20px; + line-height: 20px; + } + } + + &-topbtn { + padding: 0; + .wea-title { + // border-bottom: 0; + .topbtn-group { + .topbtn { + margin-left: 15px; + >div { + display: inline-block; + } + } + } + } + .wea-content { + padding: 0px !important; + } + } + .wea-url-name{ + color: #4D7AD8; + &:hover { + text-decoration: underline; + color: #2db7f5; + } + } +} + +.weeso-search-set-customization { + .ant-steps-item { + .ant-steps-item-icon, .ant-steps-item-content { + cursor: pointer; + } + } + .customization-step { + padding: 30px; + } + .customization-table { + height: calc(100% - 130px); + // border: 1px solid red; + .esearch-group { + margin: 0 130px; + .upload-img-area { + position: relative; + .wea-upload { + display: inline-block; + float: left; + } + .wea-upload .icon-coms-AddTo { + margin: 0px !important; + font-size: 36px; + } + .img-area { + position: relative; + float: left; + // width: 36px; + // height: 36px; + display: inline-block; + padding: 5px; + cursor:pointer; + .icon-coms-ws { + font-size: 36px; + color: #4CB1FC; + } + .anticon-cross-circle-o { + position: absolute; + font-size: 18px; + top: -9px; + right: -9px; + color: #fff; + background-color: #4CB1FC; + border-radius: 9px; + + &:hover { + background-color: red; + } + } + } + .img-area-desc { + // float: left; + display: inline-flex; + align-items: center; + color: #B2B2B2; + margin-left: 15px; + height: 50px; + width: calc(100% - 65px); + } + .img-refresh { + display: inline-block; + color: #B2B2B2; + position: absolute; + height: 50px; + line-height: 50px; + padding: 0px 5px; + .icon-coms-Refresh { + cursor: pointer; + } + } + } + + } + .customization-commonset { + .commonset-btn { + margin-left: 15px; + .wea-button-icon { + display: inline-block; + } + } + .wea-content { + padding: 0; + } + } + } + .create { + .ant-steps-item-icon, .ant-steps-item-content { + cursor: auto; + } + } +} + +.weeso-search-set-container { + .customization-commonset { + padding:0; + .commonset-btn { + margin-left: 15px; + .wea-button-icon { + display: inline-block; + } + } + .wea-content { + padding: 0; + } + } +} + +.weeso-search-add-common, .customization-table { + .esearch-group { + .pcUrl, .mobileUrl { + .ant-col-16 { + border: 1px solid #e1e1e1; + } + } + .wea-field-readonly.border { + background: #fff; + border: 0px !important; + width: calc(100% - 30px); + } + .esearch-view-url-input { + overflow: hidden; + .wdb { + word-break: normal !important; + } + } + .esearch-view-url-icon { + display: inline-block; + vertical-align: middle; + margin-left: 7px; + font-size: 16px; + cursor: pointer; + } + .esearch-view-url-icon:hover { + font-size: 18px; + } + .wea-form-item { + .wea-form-item-wrapper { + display: block !important; + } + } + .img-page-descStr-tip { + position: absolute; + top: 6px; + right: -23px; + } + } +} + +.weeso-search-add-common-conditions { + .wea-dialog-body { + padding-top: 40px; + .tip-message { + color: #999999; + } + } +} + +.weeso-search-add-common { + .add-common-form { + + .point-person{ + .wea-browser::after { + content: "*"; + position: absolute; + top: 50%; + width: 9px; + height: 9px; + margin-top: -5px; + right: -14px; + color: transparent; + background-image: url(/images/BacoError_wev9.png); + background-repeat: no-repeat; + background-position: 50%; + } + } + } +} + +.weeso-ad-search-popver { + .ant-popover-content { + .ant-popover-inner { + margin-left:-64px; + } + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/style/weeso.less b/pc4mobx/esearch/style/weeso.less new file mode 100644 index 0000000..0db4b23 --- /dev/null +++ b/pc4mobx/esearch/style/weeso.less @@ -0,0 +1,531 @@ +.esearch-home { + min-width: 800px; + overflow: auto; +} +.wea-weeso { + /*a:hover { + text-decoration: none; + }*/ + height: 100%; + .weeso-topbox-container { + width: 100%; + height: 40px; + border-bottom: 1px solid #F4F4F4; + } + .weeso-topbox { + padding-right: 24px; + height: 40px; + float: right; + > ul { + display: inline-block; + height: 40px; + line-height: 40px; + float: right; + > li { + display: inline-block; + padding-left: 20px; + } + .topbox-li-focus { + color: #00a9ff; + } + .topbox-li-blur { + color: #666; + &:hover { + color: #00a9ff; + } + } + } + } + .weeso-systop { + .weeso-systop-link { + > a { + color: #666666; + text-decoration: none; + &:hover { + color: #00a9ff; + } + } + .systop-link-searchset { + color: #666666; + &:hover { + color: #00a9ff; + cursor: pointer; + } + } + } + } + .weeso-top { + > li { + cursor: pointer; + color: #666666; + float: right; + } + } + .weeeso-title { + text-align: center; + padding-top: 78px; + padding-bottom: 48px; + .titlt-position { + width: 428px; + margin: 0 auto; + display: flex; + align-items: center; + justify-content: center; + .img-logo { + margin-right: 12px; + } + } + .icon-coms-ws { + font-size: 36px; + color: #2DB7F5; + padding-right: 15px; + // margin-left: -51px; + } + span { + font-size: 36px; + color: #333333; + } + } + .weeso-con { + width: 100%; + display: flex; + justify-content: center; + .weeso-con-main { + margin: 0; + width: 504px; + .weeso-page_descStr { + color: #666666; + height: 33px; + padding-top: 12px; + font-size: 14px; + } + } + .weeso-tab { + position: relative; + // max-width: 504px; + // min-width: 428px; + height: 33px; + overflow: hidden; + .ant-spin-nested-loading { + float: left; + } + .weeso-tab-content { + float: left; + max-width: 489px; + white-space: nowrap; + overflow: hidden; + >li:first-child { + padding-left: 0; + } + > li { + font-size: 14px; + cursor: pointer; + display: inline-block; + padding: 6px 7px; + border-radius: 4px; + margin-right: 1px; + } + } + //切换tab效果 + .tab-search-click { + background: #2DB7F5; + color: #ffffff; + } + .tab-content-click { + color: #2DB7F5; + } + .tab-more { + position: absolute; + z-index: 100; + background: #ffffff; + border: 1px solid #e2e2e2; + > li { + display: block; + padding: 2px 12px; + text-align: left; + &:hover { + background: #E9F7FF; + } + } + } + } + .weeeso-input { + width: 428px; + } + .weeso-tab-moredefault { + padding: 0; + color: #00A9FF; + text-decoration: underline; + } + .weeso-tab-defeault { + font-size: 14px; + padding: 0; + color: #333; + } + .weeso-tab-defeault:hover { + color: #00A9FF; + text-decoration: underline; + } + .tab-content-rest { + float: left; + width: 15px; + height: 33px; + line-height: 33px; + .ant-dropdown-link .anticon-down { + font-size: 14px !important; + } + > a { + color: #B2B2B2; + } + } + .weeso-tab-search { + padding-left: 25px; + } + .tab-icon-right { + font-size: 12px; + color: #B2B2B2; + cursor: pointer; + } + .weeso-tab-line { + color: #B2B2B2; + line-height: 30px; + } + .weeeso-input { + padding-top: 10px; + position: relative; + //图片翻转效果 + .input-left { + position: absolute; + top: 14px; + left: 1px; + cursor: pointer; + } + .flip-container { + display: inline-block; + width: 30px; + height: 30px; + line-height: 30px; + .front { + z-index: 2; + background-color: #fff; + } + .flipper { + transition: 0.6s; + position: relative; + } + .front, .back { + position: absolute; + top: 0; + left: 0; + .anticon { + font-size: 100px; + } + } + } + .click { + transition: .6s; + -ms-transform: rotateY(180deg); + position: relative; + transform: rotateY(180deg); + } + .flip-container, .front, .back { + width: 20px; + height: 25px; + text-align: center; + } + + .flip-container{ + width: 26px; + box-sizing: border-box; + padding: 0 3px; + } + + .icon-coms-Journal, .icon-coms-chart { + font-size: 16px; + color: #2DB7F5; + } + .input-line { + width: 8px; + border-left: 1px solid #E2E2E2; + height: 14px; + display: inline-block; + position: absolute; + top: 7px; + } + } + .input-search { + display: inline-block; + width: 504px; + height: 36px; + line-height: 34px; + position: relative; + .input { + width: 442px; + height: 36px; + padding-left: 40px; + border: 1px solid #2DB7F5; + outline: none; + } + .input-text { + display: inline-block; + width: 62px; + height: 36px; + line-height: 36px; + text-align: center; + background: #2DB7F5; + color: #ffffff; + float: right; + &:hover { + background: #00a9ff; + } + } + input::-webkit-input-placeholder{ /*WebKit browsers*/ + color: #999; + } + input:-ms-input-placeholder{ /*Internet Explorer*/ + color: #999; + } + .ant-btn { + padding: 0px !important; + } + } + } + //隐藏 + .weeso-hide { + display: none; + } + .weeso-cursor { + display: inline-block; + // cursor: pointer; + max-height: 171px; + overflow: hidden; + } +} + +.weeso-style-popover { + // left: 20px !important; + .ant-popover-inner { + min-width: 0; + .ant-popover-inner-content { + padding: 0; + color: #333333; + } + } + + //抽出样式--设置 + .wea-top-set-content { + width: 430px; + //height: 231px; + .set-content-search { + border-bottom: 1px solid #e2e2e2; + line-height: 40px; + margin: 0 18px; + } + .set-content-advanced { + padding: 0 18px 25px 45px; + > div { + > span { + display: inline-block; + vertical-align: middle; + } + > span:first-child { + width: 96px; + margin-right: 12px; + text-overflow:ellipsis; + white-space:nowrap; + overflow: hidden; + } + } + .set-content-count { + line-height: 24px; + margin: 22px 0 18px 0; + } + .set-select { + margin-right: 8px; + //select样式复写 + .wea-select .ant-select .ant-select-selection { + padding-right: 23px; + } + } + } + .set-content-btn { + border-top: 1px solid #e2e2e2; + text-align: center; + line-height: 60px; + cursor: pointer; + } + } + //抽出样式--热点 + .wea-top-hot-content { + color: #333333; + padding-top: 5px; + padding-bottom: 5px; + min-width: 150px; + > li { + padding: 0 20px; + line-height: 30px; + cursor: pointer; + max-width: 250px; + overflow: hidden; + text-overflow:ellipsis; + white-space:nowrap; + > a { + color: #333333; + } + &:hover { + background: #E9F7FF; + } + } + } + + //抽出样式--创建人 + .weeso-create-person { + .create-person-content { + color: #333333; + width: 270px; + height: 122px; + text-align: center; + .person-search { + height: 62px; + border-bottom: 1px solid #e2e2e2; + padding: 12px 0; + .wea-associative-search { + //height: 30px; + overflow: hidden; + } + .wea-browser, .wea-input-normal { + width: 180px; + height: 30px; + margin: 0 auto; + } + } + .person-btn { + line-height: 60px; + } + } + } + //抽出样式--创建时间 + .weeso-create-time { + color: #333333; + .create-time-limit { + padding-bottom: 2px; + > li { + line-height: 24px; + padding-left: 16px; + cursor: pointer; + &:hover { + background: #E9F7FF; + } + } + } + .create-time-define { + margin: 0 16px; + border-top: 1px solid #e2e2e2; + > p { + margin-bottom: 16px; + } + .define-text { + padding-right: 14px; + } + .define-date { + width: 130px; + display: inline-block; + } + } + .create-time-btn { + line-height: 60px; + text-align: center; + } + } +} + +//下拉菜单样式 +.ant-dropdown { + .weeso-tab-defeault, .weeso-tab-moredefault { + display: inline-block; + width: 100%; + padding: 7px 15px; + text-align: center; + cursor: pointer; + color: #333; + font-size: 14px; + &:hover { + background: #E9F7FF; + } + } +} + + +//弹出热词样式复写 +.weeso-hotkeys-popover { + padding-top: 0 !important; + z-index: 100; + .ant-popover-arrow { + display: none; + } + .ant-popover-inner { + border: none; + border-radius: 0; + box-shadow: none; + } + .ant-popover-inner-content { + padding: 0; + } + //热词显示 + .input-hotkeys { + border: 1px solid #e8e8e8; + border-radius: 2px; + border-top: none; + width: 442px; + z-index: 100; + background: #fff; + margin-top: -4px; + >li { + cursor: pointer; + } + .hotkeys-background { + background: #E9F7FF; + } + .hotkeys-hide-background { + background: #ffffff; + } + > li { + padding-left: 41px; + line-height: 24px; + height: 24px; + overflow: hidden; + max-width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + &:hover { + background: #E9F7FF; + } + } + } +} + + +.weeso-tool-popover { + width: 700px; + height: auto; + padding: 45px 0px 0 0px; + .wea-associative-search { + overflow: hidden; + } + .wea-form-item { + margin-bottom: 18px; + } + .tool-btn { + width: 100%; + border-top: 1px solid #E2E2E2; + line-height: 60px; + text-align: center; + margin-top: 27px; + >div { + display: inline-block; + } + >.btn-left { + margin-right: 20px; + } + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/style/wessoRecords.less b/pc4mobx/esearch/style/wessoRecords.less new file mode 100644 index 0000000..3894df2 --- /dev/null +++ b/pc4mobx/esearch/style/wessoRecords.less @@ -0,0 +1,103 @@ +.esearch-tags { + margin-top: 30px; + .esearch-tags-container { + // // >.ant-row >.ant-col-9 { + // // width: 37%; + // // } + // >.ant-row >.ant-col-9:nth-child(2) { + // margin-left: 20px; + // } + .ant-card-head { + .ant-card-head-title { + color: #333333; + } + } + .ant-card-extra { + cursor: pointer; + } + // esearch-tags { + // margin: 10px; + // // .anticon-cross:hover { + // // width: 16px; + + // // } + // .anticon-cross { + // position: absolute; + // top: 5px; + // // width: 16px; + // height: 16px; + // line-height: 16px; + // border-radius: 8px; + // color: #fff !important; + // background: #737373; + // } + // .anticon-cross:hover { + // width: 16px; + // height: 16px; + // line-height: 16px; + // border-radius: 8px; + // color: #fff !important; + // background: #737373 !important; + // } + // } + // .esearch-tags :hover { + // .anticon-cross::before { + // width: 16px; + + // } + // } + .esearch-tags-col-2 { + .esearch-tags-container-left { + margin-right: 10px; + } + .esearch-tags-container-right { + margin-left: 10px; + } + } + &-head-icon { + font-size: 16px; + color: #B2B2B2; + i:first-child { + margin-right: 11px; + } + } + .esearch-tag-nodata { + font-size: 14px; + color: #AFB0B2; + } + } + .esearch-tag { + display: inline-block; + position: relative; + line-height: 30px; + // height: 30px; + background: #F4F4F4; + border-radius: 15px; + border-radius: 15px; + padding: 0px 14px; + margin: 8px; + cursor: pointer; + .esearch-tag-com { + display: none; + } + } + .esearch-tag:hover { + .esearch-tag-com { + display: inline-block; + position: absolute; + top: -5px; + right: 0px; + color: #737373; + font-size: 16px; + } + } +} + +.esearch-no-data { + width: 100%; + height: 100%; + text-align: center; + padding-top: 55px; + color: #AFB0B2; +} + diff --git a/pc4mobx/esearch/util/EsearchUtil.js b/pc4mobx/esearch/util/EsearchUtil.js new file mode 100644 index 0000000..f07ff9d --- /dev/null +++ b/pc4mobx/esearch/util/EsearchUtil.js @@ -0,0 +1,63 @@ +import {Modal} from 'antd'; +import {WeaSearchGroup, WeaFormItem} from 'ecCom'; +import {WeaSwitch} from 'comsMobx'; +import {WeaLocaleProvider} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +//表单验证 +export const onCheck = (form, func) => { + form.validateForm().then(f=>{ + if(f.isValid){ + func && typeof func == 'function' && func(); + }else{ + f.showErrors(); + } + }); +} + +export const setModal = (content) => { + Modal.warning({ + title: getLabel(15172,'系统提示'), + content: content, + }); +} + +//信息确认 +export const doConfirm = (content, func) => {//确认信息, 方法, 方法参数 + Modal.confirm({ + title: `${getLabel(131329,'信息确认')}`, + content: content, + okText: `${getLabel(826,'确定')}`, + cancelText:`${getLabel(31129,'取消')}`, + onOk: () => func && func(), + }) +} + +//用于获取高级搜索中的表单控件 +export const getSearchs = (form, datas, needTigger = true, col=1, onEnterSearch) => { + const {isFormInit} = form; + let group = []; + const formParams = form.getFormParams(); + isFormInit && datas && datas.map((c, _index) =>{ + let items = []; + c.items.map(fields => { + items.push({ + com:( + { + typeof onEnterSearch === 'function' && onEnterSearch(); + }}/> + ), + colSpan:1 + }) + }); + if(needTigger){ + group.push() + }else { + group.push() + } + }); + return group; +} \ No newline at end of file diff --git a/pc4mobx/esearch/util/NoRight.js b/pc4mobx/esearch/util/NoRight.js new file mode 100644 index 0000000..97578b4 --- /dev/null +++ b/pc4mobx/esearch/util/NoRight.js @@ -0,0 +1,14 @@ +import {WeaLocaleProvider,WeaAlertPage} from 'ecCom'; +const getLabel = WeaLocaleProvider.getLabel; + +export default class NoRight extends React.Component { + render(){ + return ( + +
    + {getLabel(2012,'对不起,您暂时没有权限!')} +
    +
    + ) + } +} \ No newline at end of file diff --git a/pc4mobx/esearch/util/img/nodata.png b/pc4mobx/esearch/util/img/nodata.png new file mode 100644 index 0000000000000000000000000000000000000000..74bef7e42bfd425e45191cfe41052201f2e037dd GIT binary patch literal 3407 zcmV-V4Y2ZwP)Px?2}wjjRCodHTzPC<#TlP@Z#RkYg%e01N=R(uti5ZSpahCUOHxokg0z&oNTF2; z0@MPj098GxIHdl8fFjO7p|qg|p^Bp%fj|qTl%o^~;Jv-RLP8q?Nlcu0?S1=Z`upCl zH|zBt?`__$*Re;kcizl5-+c3X-+c4U^%y(MLYF`Ma#tYyy-IJEQt1Mkl`j&B%nk(l zmT)GIXF_%a0t3gIEjt->hYj#iP23k3u>mPr3xK>WE=Km`%*(;2)&X*;)4*cT3; zB;))?09-}6%TRc>Wb9F_k4Tj(PrBX9-m=1PI@4Oxco}C`Nh#Kk0S3@1TuHyWlw@*d zfG0#u1WUjlJ+FSlu08vnQaD$IE}mkX)k5{Z!=UkV<~ZInQQriTV6cCw&a@SHb2MI* zHz*LCE1x-7)kke@i*}c@a!aNrT`;dNyb~s8ZfASztn_rVaazKSOYJc<{dBWsN=3&x zN2itd&18!qpt7pv^-`9?|eLp20kCte0lW3e1Y&FHY{qfcK$?%r*&OE`f}uL-@d(SaNmIt zWI7I-@O-DoWoqk?%%xzlOHi(fG3Aqa4KC-j z=zDKbHe6#tnlHtya#^r^R}XK{{d#w8bT~$DZx}t#LSZH#Rm7n&As8A7wPeN?uin-tXU4BlNwSKu*2( z4ruQig0YLxn=j|1`a>vxP9Yv81Kt$cli9_SMZ#>y&P7?bWm%Oq#3@y+=G|l zh{xjvU2NMy@dmorNFi=81mkP~R`X#+vj3TGlbwW$Y!H&IgD$UthMwsQM6L(>I}f!A zQKi1mqk0T{E{2EpY?V`aV?@(0Vv?^$U0p3LE&B@9VLR|lh^rEn@?B1)dS$t1gqaP7 zmfsI;e-FT~gas$rvIB3y)O0j8eSu#6OYpuEKtC5vnoHRGQH8T>GG)m2Jg)0?ZQIrW zW{31LFi06|^q358o@~&m!RY#NrYL_-Hoh75_sDEOSWSa%ze`co?}Gnk7%3mQ#tKtb zcs#DR&G0fnhIu%LNpZIvinbsg#oK&Z*38+^xn#*+GfdKHU?`8GQ3@v0a@lk~cE;f% z?j@O^RD4L&Xtr(2(5OfvZ zXl_ryVs+lWz6CO>Jpl+TyO0nLYbf$oOt}7HvD%6xcL>RE1JIl+?1~O|>+i`G+CLn7 z0idr51j1)RYTG6`G8#J#Hqn@xTSbFRFqGg5lsi0tXIyroO<*@PAL zHL%y6b^_l}SN+o9zTsO?Uz1hfA!n33*hb6cDztzDwr?9`YsWl;2E`9aPKAk6$i6_w zD9^T#n3}U&ZDTlv896vpekYl@SH`v1y#CPRKzk8v{skBwcg%4ruT0^#RkY{|rqcIg zM~SA>^%!6`pa)!lfvlH19Os#t2vl_IDp)uN04GoD2EV`e9--Z#@-4HKX@H> zwd&DBNA2ZZI&LZ8OIO7~&YU~nVNASLlvi_*&A1px_kqekGnGK629yGLGF@4N+r5+) z%T{I0oMwsR)@r6%+b6ZTGr&(0{G~88FuS>f-yc31UPx1J3d|s+jMmjvzm}YE-Y)a>q0{Fa!q`A5IYam8{(>jy__`HK_F0{kp@KNzN zYr}k~nlbf@hKA~}*;84$cvez6&GLf5o^PPn|C{701@NZZ3t^nzKx7@Z=B|sy*$E_E zqOi_zDr*$yR5q)Ma>tmkrWsctp)V3?#p#RpU}}$~USHP1H64$x?(Qa^zxy5R^*#o` zmmdT@L4{}BHj(G+QoM^7@Bp4CRY}riw;K2P!awAiyn@Od7>RG7!(Nlpm{2IxsA=MD z3rz?u8c+M;Jq1k-fGTRR%moX+A#*K2Z>M}{ z_q|w0zcK^#RMC#s)~=%(YQISvGn9x0;Ga`(NfAt;h!C~?OyPIC-HVK)C3%4lg+5yd zE&FQc&Ykcy>SxABZkj6(}?8Hb;q2trl1j>XOV0&s&Kve7-IvX4z> zWVAw)6?p2_3Y)t`<@_{argF6%W?{J%#@T2&Q^#(CFz)1i*=Ta6ah9SV7#OI@NjF6@ zvI0-ClT8v;&ThPf9?T;9&6k1uO7rTzKJr1B(dO~$pQOP3C%(x+%7Z!IUHU5w}XJOE}Y*`;% z!w_X*u>2{l&txH+kc3aPT!=yW1j<19XC@HXlW<&uKg+n~VGr|6E@cJYs9eEeehRo; zJQ|k|8u2{;dU|^1>r9N%9hl`{kK`dQDyu6PS%rdYjKW+Ri&#Z5vQQ|msjZAW#afL#Me1U8Mq{qV_TlR)bA;R48V54+Og-X-UyeFc zvo5`%;gmac3HN!68kbY-RnW~9N4{2ous$Dli(X#M`}b9Kk? z{3=E1&peU`1N@%}KBQ!>I2-v#A@Cv7k;bb+9XJJjfa;p;V7pfXI~_C{CHdKOi_l5~ zJ)XsTI$f?%Cg{YYuI`ABU?wIEz)*cxTpHjfmYFjugn2?6#rG*0<##9NCK*)ae?*Ul zE!>7R;$(_T#Vg2xkwgUiTP@Gx;gEhJU-A6S{+@uL_m>Qs8(C(p|jwp&^O!zge zjvSA%$^WDYUtGmf6HaOSr3jTAsH5Sgl9#@xS?~Z$}z=tUfJmE>;tBkJ(`0ryJ l8p2HYS%+GU3vQJi{tviA4o;WqG0^}3002ovPDHLkV1n?xcq9M- literal 0 HcmV?d00001 diff --git a/pc4mobx/esearch/util/img/page_descStr.png b/pc4mobx/esearch/util/img/page_descStr.png new file mode 100644 index 0000000000000000000000000000000000000000..b95abd0a6340295414dd82d19bbfd5f2d04a774e GIT binary patch literal 11964 zcmc(lRZty47w1EO;O;ILC%C&^;NtFZad&qJ?(PX1+=Dv=xOi{~?iSn$&XTWc_wC!= zhppO&nK@lu)#r5g%=GDB|D%)@rBM(G5kGwRfFc6|s($zY)%b4Lz<+wbgHi9%-XBn| zs?y>gY9@#e-wQC7VhUm(KGY>3JsZQmml2#mI<6l+phEs#P-%>)L?1pdtH=Pw)V;u` zIS76@^Gk1mo+GGBtuW%+A1TnGTYqQ+!P6#8zh_j-o0jkFtE)9_?JMVsn@p;^s|QqD zY)-$wXqD^X9evtXrNm~05+jHDNM$Djzl2x6b{d%5#xb(`&9{M;Dr18u?_o8|bt2n- zU%2Nwo6pn4xnm8CE)Gx8Ph9yb15Xi(Y)fYqiZ0&w5s{E0H1WrmU@3SCs?YiP7~=2< zNdF(IVpdM?j-En)+U(&+zzpqN{_zb(Ri==o1(_eF$m1=UU%QZ%^WhVsZzwExrKAXDKgw%}68l_1K8DDn#MD>9>|uJBopC7^ zn>C;OKAVQkY+j_AiAYhKUj*!YPA-fAoi-?6?GLs~d}}2vsz}#iA8Z{Ug#t82hg#iH z)CX}P252HV%2UJ25o+;8WS99SfmpAe4OpJozCY@gV@TXjSMF@ka{0~%>&M5v_J1HT zS@tPc6eD(coS=)C!$6FMOd3g1)@pC^-c2^4YXK=7N zXDmCb!Ox{rVG(0pqpK|`xUl+sgVB!hE!(;gunmA^N8Vc1WW1PcuZrPnDvJvzt@FW@ zgzhg)dORk9I*y%rvc%72xLj!p_-rP?+8$9-Ek=(TU(AGRa9ElMI7qMi3HsULlv#U? zdycE=PkAWAv+r$4>*XMkfE`-RD^JC(x*7b8@)1_Czk=vxZ%tUOnjfVN{WO}4GM!b? zWOkM7cA6?$YOXb~qQm9^C_pOAg2-48aF)}g3Si|xMEey5k)Z!cXUOiQ{@6q2Frc>= za$`4W5H)U_J8&Gan(1F*&m2+~4#Y7-@i;w6en%RLiWC zqlg`A(SNKM2Wgit50|FB{5p#j=5*71?;-$-*+*@abAV1TZG7hwd%)jE?pA5$0krO0 z87i-1{avay3$DtUY!*mX{S!!nk$hq=Ph{_BS}8t2#`&$>}95z15LDbPll(@swb zL4WZMfVDY>YhPv5R>0D&Bg12KPqF~BDX4GB3%^$IMWC~5B}_@*AFD=$1)Ok5G2wEu z4o1$XIDgz&55r;9gt4pqA^g`0Ef0aTzx^P0ur~0;*54Pwn|8e4nX86nlx^URFfiae zlT^Yd^z#I3XPMFZ!fytl{J=|#EF7jKTBnlsdq=nzA(jTqOxrmnZ=drDQ$-<<_h0*C zIH6toaYtV&u>brBCe2K~5mx4rr$q*ZOD-FlbKNc7=ydY@=QW=+>t#L5*2)-*^3KZo zmY_Eb8Ezg>OC!f^uTZm%Ck$rm-boxZwY zKkSTDsIkBh`<3R0=Dz_6N`sOB@9ocmjdwV!jczpC(h9vdhqL}GyXwHjsvnXN(>`?} zyGQNDZ;ea$OJ8|bu2=4S_1T0Z6RwkfY(ACT+j~7oyWZfl+hqzv=N@9$2ZjH8JL_RB z-$y!phq3mM?(MrQzov6Xp6}e zvfn}J->p%lqM!RU19wefF=Xh!CXaE`~-Z=qsQ z+zdOYR-<;yb>Y($nVBBHTLW(WV=blg+TnHL$u|m2Du~=z5%X!deH@yVZCu9n&n#oq zd>9o^Vu;q|*&K_CBJ1+zyDayiCEeJ9#EjarnSG`n4gSV{(rVPG;48JS(y}yyr6}k! z9AdvOFk#ax!W`c_hu(8|MAqq)#~+VJ7Vsg^%U|FmFYsgS8i%1CvFiOy-2F_&X}4K{ z_A6tRM`!Smr?iQtKi}_DVWi1`do{BqLAvK5L_h!er%b=G>-#aS`Wq}iFCkLi81PUU zk5FuMJ1>=hV!<;I(8=L2XscuxhT>@$Jj8Pt<=cD1C(?IRT04mU;+2n3nt>JL)Z{I} zUR~;I6tLALh8qw$L__+ulY%NS$@;>NT|TSy{14bwhe@X)2Ps2PB&RDv5fsjI% zV|Tf2`JkwO8NkuqUQS@Rx*A+df{e})rhvkCZM$lZ1pM@|b|_AQtUHXS#V_=e#>Af1 zJ*4UhV*Hvx29elkBaOj}3m*^oK#hYLfH;KsElrzIfZMt;UA2ELG$o7-a4;UYoiN!I z)*g=As=vqUJrf2&&}n6*1{+#YQthn9Fb`OYJn8hDVx_37n+cYT8-z~6K$yN-2c*Cs z3T(g7omYrt^hWrA@nFWdQ!?X_TR9}{8sv?y1h|}{9{)_LPnvVB)W-? z+b<=mRAh(E9(;3_m6X?4t96p@pS6i7;fxfEn*{ODUN69%b(4RgLu_-`!dEP3KtuqaA_l)9-dY z!{_>$65Wx0mdg2jpbi``-*jCFM8V4yBH>`CrJz_2?mIoMYq3kkY`kWr=-o*4zmI9V zKl7b+-bo0IchqNx#qeo0n&UH`lmDg1+O{Af@rQnEr(lGm{L6+ff~;Vt@|Kt&&nXk- zIU&YX|31M*eB#T8^U;eb`Fn5wAky?aTG|JOTi*qBo-R}pL21`D5Yf#P=*_6X#Kwjy zpq&*Ft&|Ss4=}TveInd)UwS)2b{#~*Lk^&2 z`8iW8C$QnhhDB^z!Z7VP5crogqGO-xipXZOJ}=?d<>2}G=Q5_%V6^M_g7t5aORf_V z@@`b$cS^QqCIdeqO^yRq^{J|w;pK%4uMDTeezo_NT}y`0S!{_uUDuJDc<{q#r~ewA zlB@@;w?XyzA778f_hb23K@wgc66V3Jx~sh4qd{M;$J65aoLsa16LkTTlXgC9_bsv& z-8$Je>(aRb1?xTo)9PVDvY;w2#_wjr^-7H<=Xsi&wo3M5eRH3)@k|HK)*f1a?G}uP z$BklXu=Z?plL%~MVquVBA?P4|SGmSG>%7v$&UR-!drK!t5V~N!n|Psq_5Ukr51uRF zA%nC(N@{nT39BBj_s%%Je2lw`xx9!G>Gy6|v8j1O_cXjRxVghvhGksXxhzI~v2wz{ zBh@WC(4}#tooi@%y_@3q(znmm`||hCK@{xe=a5uS8VNB#z)eE_?FWpeHAO*#PRnbG&a1Hl z1admz?Tw_SkuhJQ_oWVSiGs<etJScNybG1kd_%DEkoXy_@D_7&Rq7^uoF)*;&Uq zc=e{doBsQ}L(}F>3T&UB(_9bDY>)t|M z(?2dh1!5>h>%h@j?KWaznGQUR_OjKkRXV`t3Qk4$q}`lo^aMdH0x>-O_OP6Qhfoxt zv3AUa&Km}>|9p#($AU}j{7z{4G6V6V!55#~G?_Lpg8dHtvg%5S$6zIL*COu`DYPiU zumPSxG&$9;m#-qPkv)#9ar>z8$~fyf4=93<`@)OtECbaGEE0s4S>ZgCHL`P^*TJ1n zb&R{GPuUj8h_G?l9-loJaf_w52B&eU{uqm=%+yC*>0X`~G|e{A=j8&%xmzdjF}dReOpADJ8U3`MnLJ$OBI>p3kD4Tv5+w4Ut~u?2p82((Lr zk|?=>6s9O>k~LFIPTgGm#KZXuLv163%P~Wb&B;#nV_?}yLlY(-(L`)>w#*VKXOXE= z>QgY`o_9G~B{iX}7PM2r^Jc{T?4;w6;|60mmoO%70#O>-8;aw3^1Vst-$xo^`=g`N zGy^P=on!6GeimaJ2$bM!!_&pE;qR@rme-(pkq$hiDwdzav6A<9_MTgENV8381!kG( z_xzRX&mx>N_HYUTmll$L&s;Pb&^KE zw;eYp^lHSzyRd6tUn!oqw>GxpRtxc)HVFlt-V&T|`=Ux(Zc-=`K5xR`@iXp-=)>VO z1HDjcmAQp!k1^gyspyB~%Ee(7T^0VqS-Cl_E}Nrh_d?UKuaaw1A}cLX;Yv3O(_)i1 zG~pId!k=TJ>(E)y=U_gQs|4Yg%=gnVk_~IXdzBgr6Y7H}8!|IK$!dnbkmLPb+Fd*Ge!_%@fpFn-A1U zu8-eMZRy37+MBrhm5borD&nums@|ubzz=_4`QUJeyzhUH`a18Oa6(!cf1Eqve0C}@ z8zU6F_$BZI!ZL7_ao(#_CS|Qd{Z;pyvW5@#lgN5JTJtm93X(s-+jkBWOL!`JR2AcF zU4rxNx8u)OQ(9#Ja|IV>yv$PT{ddVs|8@DIVhF`DDV($oBBsgX57y#u$dGz}woxHT z!3?m9D*mb|J5$qni}_PPkDl6}E&quPv}>0@O693YG6|`vN0LCX4)<;2&ii}+`xhc= z-lukr`+1ZDaz!P2b+V0+1k~)ls_O%C>Ka%9!xsQ)z;-R2>*u~xv?@q4efQj1h2ZmL zZ`!@u1RIrNHwa-j;i7z3U%$bQ8nFpmmg53yk?!*4| zOAu++A~zz2Stl|J3qtL_qrQjn{5L0V@oNtnY=@`u+a+RS^I;WiI`WCiy@C&kwV49Y}g?ebc zlaz`cV$?(J$^AS3-U%ZfHzWUEn*#OZRU5%U$inYTYBgYO0Oatt_xB6iDh!Gtui*xp z)yMUaR=ahjsdj4ooKAWmjGG~{q$T=4f;NFI*5RLy=TNHlAj%DtauY5-bZ?<_ z+?ie6*NwJi$q9x3Ht=>Uaq)eBk@;j19HXQ4j7E$>%DFIx#Tz#8@tY9h^fZP&TGd*0 zoRy1@al;aZaZ9CArR?vn;d0;nkpz5;xPvXe_8GX`D z6fY^!810=uvhNloCY}95kjOgiJ88F%5x=QU{z21ls@nNX%1UUhgLDNVNn!jCQbZnLy^({cC_79 zn2+N>C8C>AP@wofSNv-^CR9bV|Bz=0Vi!BR@_($4@7C0Xr&VYoR4F3`mJg#v?^OwF zZq~m_=s{7$EOdrI#N{l6Qep%O=swXH9XdJ-OXhdSpdL!`-)Wgqf0VsIf$xb*=nYZn z7$X4q&+8-dd#l+0u^@*xqaUw}jdGXXdqPp9<>Zru%=M=LL)-^>AQoBjKNiq4Hx0vu zKR-eW{*Z^xV%P0oyf*|G?9l{#YyScfqEv3BGczmuY55=892|hvcvj^@85#2HpRX7M)mDE%GRn zAcr+5LDGTCDQgUC^~)9<)TbDPqsyRy-Xg0>cv)sYazD<=%Bf|nIM(V17%>iE9H+)KJflbf{9mGlt9;?p$Bn{JpIQMq z2-2*-4$T8O2s!w9d{leJ;|O|T!PA;=W{0&>W>$l2+I&bDzMxNl$Ee`;!KGoXzOUhn zh(_W19S&gWf)H}p8!fR3{<#U(H5QUbj-UCS(o;UlB7w+Bm$wpHFAh_uuRM~rFW(;< zRc_1Ma&^IL_~>E8Q||Aq9vSbG!W2LL1!|x16c&_Lg*J@C z#u`5!f^Ho_7hJ@K+;Mc^-t;wJ12$Tj){WY#!nKZ>1uBCGL44H^Gkv<1fPzH4TExB1 z9_y5pd_lNpniK!pU<@&0L~VBFrs)ljV#)2?ojSZiIZ*5z@V?yZ7P3r$u9%$4N8AaJ?_seFlJy1UKs7=JDa+gWi{N(hdg@&WMj?B6057(7m1KTL)U-i)TD4LG zW6bcfM!P+(R7#4%7w?oMwYk{ByolXn#s*7t`9yyCd4%5B)^#vY5-J{9BjXu;p?AZ| zlNk9v*6XMfW^RA~Tgi?*<@e(2T0Kvg@z~UreUughMzuAn&qetJf82HPV>m7*!YFhV5_ntfZS?ZfIu?nf7N->CDPf2$+Kz6=#Nq0j(qxXWG`tw_T9%D&0Rd2kCIpW}Qol%K7uAvshe zltg>#Y1bWbnd(N9+T{Avzsc|ck&u9SQL{$hJFk0#_Vbh6O_xWf&W@iznslO;_80%B zJL8RMpH@>TfUOzy9ak(+^O26})kqGJeZEW!U1bT24fpbv)>(c6VU-HaSCGb{LgmLJ z467XK57sWzZwUjTeMKx>rS0D_^1LlG4C7ofHxk8Y;!dJ}WwxSwj1NC33L(zQSwC8i#Vz0O_|xt_?C(9gqct}C)5LBjU`XWM%s^(2 zxs4vb)2aLfmyy}ZZKAM1WIA?K%8S1hzICHo%uR>LGyTup z944n<4wFc-(Q>=(mJ_|i4NzSs(5$4uHFVSAlPz0#HsEVRj@{MyHyb9!@Z5Z4!IiiB}@ow9r(E z;Tgzkuj1Pg%Oo(O4)-=5NY#UCyAYkxj9#$}QeOYck24?PqVW{WVV_hrs8>0mN91QL zmUcC!zR_ez5aIGs;J4`#yJ6N$O9soBl&TyXccmcpMw3|S2}3?}Ta?W%(cwI<*&QG6 z_FmPvip2&mc5M+xQvqRBB4=Fu$m!n@0{0#g@n(;;js#@N<>PM6>)7WN)0)C8<|o6m zgXY(~aLLiaYSr(lh3u~KnoNnlT1TsYz7P{eI?3cdj8-zPuY%F44dZM9S?HL9$kF*Y zshR+8vA4S@DE-t}O7ky`ELP;YotM;ToS2Um+?fn7f(;5&-6u44Gg;gK6uODoSb4bK zV?^^^40*pNB#i_2{X2TbIn~ako^c!77HRgbM$K=82FUzEj+&UE$ zJ>I)gS*#L_W79tK7I4fQL|F^dCE?r7hL8CBE$DB9_}Q8iL6Oz>)kwdz-QQTQ!Nfw={rU^&Q+yQ}tQd8q7QgI$q`Qan{b!`D?KgQoAJ!cge};N{ zRF#sU=P?d|T63<<>8$k-+J1o`joxv}XaBE!mZvn>jq$fk$f^t6vpz82n$vC7Y=>OA z^A`^XqA*!3STY?Mv=Ymg}bY6yAFY}PW=hZbmk zk4Y*}l>dg@!SOINWF&*F5G7h2In#l{X9OaP}ERlq%y7lDRRxb65rqX*pBeLN-|Jjo2-uIvF zgQ`|wr(wZO;9Qh=b!b$(N>My+BwM~_!=DNxGZ zQshnfc0tpCu#*24RxEk7R@0>AH=FnV#_a z7QL$?LeXao-V=LtI)NjIF)b_4(()nq+TmbNeEUtqyD%ehg1}A8m7Yy5s=)|cUwy4m zZ0+XZMyjW$r(&?SBw|k$ita+=vYcDstt+&sb}HqN_SP&B#&uJep|7bKzPzl<$<6(} zrbZE~zpqa`ThLooK-m2VyA#Z!tE;=|#?UmM5dur-SW+pxm z2(;RYii)CRVv-aW|0orUAN2Jrp#n_d_wSrg1Y9=QQt`wHF$3QTo*y556!2$fW{g@^ zZj=2$e%{_~>9yk)vv;uNp8DD6s7dW|LPf-4K*`aVgoK3&jNRwCId%IDQD9+xy(;6v zA5VIv37pF`{}H((JQ9-XdBa3OHC5HdJ6T#WdB0|0DMGm!ZI}DNNG0XaL7^K zkWKqyyvqb4!@p$B0H1Xynm9U*rP&dv3#p{8su&dI~Ze14kjQtfKPHIEZ7CGTLLH(*2{boReAER+FV-oBg5-@Bj|*vAgt# zlDsAIS>MA5B3W~JoyD=B0FDv;1>Vt=K*~@`Zc6YBuGpwRz%%b)98qZ+HAtw)Z$v3n zlJ$t$nksNaKuE{{i@w~~&aNtbBDM%mC9S@=Ta|}i>ng*Q3VfC9kHLoV*dKvrJETfh zUVGCNSq`6<$^`x4Pzi%i>`|hVhfkVY>?k)WsbD?{o&EksbBcW%;PmFrEw5s@XPO4~ zGVSzo?jX9J)VO1-#W|;1uH&4EiHOnXt;*vN&#Goq8I2z%>;^H`WZ6XQ{lE&e=d=j^ z0H-ug?uxGN-7vxXF6olM`@0~{-;PLrBM)#m^UAxZkO>e z_6~6dO_fK+HnJ=m@PI_Ao16!q?`5=Kt~jE0M=PI+uKuH_vrsz0#>5t$n8M8IkPK}+ z{x)MNak0owA{CE%lx9-Cc@va`M3*q1H5K!cp$wr;6tX>A`O^RvPXU>3YksUM>5qsb#9Xoo00k~8F| zqtFrFyZC!FMd|X9N(6(wyrT$j8pBZms9GXPO=g{v%5RPx_-Gp* z4Q_$qBUx$Iqa~wo=Q#D86hB@_1;IHp$fuX}xFCX5Mw{A}p*JM3kTBCW>be%gco+mT zGmQoYZFqFmm%O4nn#HXC+T=&oo1Uf8ea_kM zG2o{E2zc~XX89EOE0gVOi&12horx2QqXZBX+wP?}IF|*Vjc;{LCptqYP9AOm>C5!N zg8Yd25PdO>oev*;5~Cbx6!|5JT*e=njV)9S1{5j}QQAgHO1+9J7sqhH;C9VQ&WntX z%xDyYNC71$k_30Pg^NF%V)e2^#^F<*VapTd6dq+CB}bDxi&5$cB3sQZEKH8(%9p#n z+_%$YzQu9BLo_^7Q+w@Pn-D->u=BLT^KC0p8XGQz!4aSc@&=IOmI_tQ)zrVZOG%` zmsL^v-^tX%BAgv2DNR962~L!d_+CxB!-p_oERC(#zlKD)}6}ZePuR&ob)Ic zuzd^4&IW)pvuXQiFJ0_XjlHC1P%&^3QmhpVCxO|hB>Y8t^!BOEpu9+Jxd+Nj%E1}# zLWP<08B{03dGahJsVAnx45OeRbFS4 zxcq0pIRlObm+!LHrNK@6;+cD!O9iRk60=W@B7vBj155P280i*(wQ^nzXV~CB6UE~9afgd2( zm@G1^xdjB3wA3tFxv8$yfg@UpF%$=K!dHTFB}9@JyV|3v*So|!1iIu`$O=Hk?Eyw? z`DZ$Ki^e8fg%grTm9#jF!I-5{9CBG90oX;|Msx=9bxmW|1wlEi_&Oo&n z=yWA@NOQL0)3Hx|F8lj3LwT=7!Mi3iO9CN}N#fGH82`$Jq@$zrHG_(hqL0FaoHQOj z1mBVEtUl@=f8$Ktp)GLIN zrrt{&D1DXI4kD$bql`|LCU=1{ADxZlIidiO06XIpuGp>;mH4Dbler1(6O}NiE~$zY zlNIBOg;ljM#L7!|nbcB~BTnRms1%nO4hU{(Ly;ZL2DbSwH6i6ePr>R$^{HP-+?Rj& z$x`JiwHPUd!4(cIvyN($7Wkzc7TVvhHi86Mxe$A@t^0LG6ZkfpOqNpNpPgK&96$|Q zes6o&(0%#7R@7k%+8P#O*)Ea-g-yL7QKpp6W7vU!B{j5hQREsgD@v1XZxHFWbrc?T zxb_uJFUF)KatpqDR&t8JSSQC)#!c_?XK&e8DgF`ZE3876C-zgzDjQBg3VK7J<_wX0 zk`iCKYjKULBZh)0gHkAPH0i2nUCMt~dnQ_&0Hl-r`(mQVFDl~^hVq4?k8#@(zW638 zo6#HOkFx7GGE`P+m%RQ*PJH;Vw1xC5{BpJmH;{k+3)jrY2zF1>3_QJx&S6zJ7v!|l zK!&xl)XRE!-DH&6Q}78rEc;BVfm(gN3W8w{k`qvm%`p`=t%6xkAbz^T45Y-@Za`X% z)jnGj3XddZC1PhKjoiQ)9G-$ME8y&M) uo}s_wzgA%XH@y2Foc~`a{KMuObZ`ggSlCs@>RoaEK}J#$SR-x}{67E)Y?|Bv literal 0 HcmV?d00001 diff --git a/pc4mobx/esearch/util/img/weaverlogo.png b/pc4mobx/esearch/util/img/weaverlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..3ff76482103bd7cc1ba9c427b54ab8d61f676460 GIT binary patch literal 7990 zcmcI}Wmr^EyY_&9q$r^@lETmojfj9CF(3{@cMK_lbV(}6(9Mt{T_fF%%H&wZbkpjTMTw;3KCz;HZ6I%l$okow{{TWV+MAS#A2P zC6Dx;YXW0mb|S_;@7KTkrj`q-sHEPKUnpy}zy}x_{e&lWV@^S6>V>!NuD0SW6 zPS8)Bn*4E<KHLWq)gNeSaNbH!@3^J z5evo<8~UhAkkU8(lc^NG4{sw+KTFNvt15+Lckm077Ko>pR`ABjanva~CFa)vu1-<= zU4uM^|InkTga}On0iWBWb3;j=t7f0Ov*nA;4?NX(H8$7WlMV@JPO^FI$w1A<^tjD& z8;8mAtQp6x#!<8r`q_?G9Qx`sXqNtD8rJtLJl7>!JCqrkozklXRF>6n+P7j2c)}Og ztxD&B(TN?ex=>nNcCUMO0yrp=oDVRptxDE@vy^DQ?|riIb6FOBH4uHM%il4SqCaiTMocO3c|ThhHpq^b zm9c&<5ic;G;EQ01L9{!Wj>Fs!!JxpC;mqZ zlH2HradjwTB8qVYjy6soI@`Zu`28!RK4m#)9xMyutlyLW z-tJNYD(*ULOa1QH4pr4xZfn|x#e&2?;6j$mBZ%qYZ=!}HoiC_8Q2J2;T&}IkWxh&cj?w(nL{`E6Gi&(-uRRpr4TL` z;rOjLWW+pG@t^j6FhPiwpjJhH6HZS9##csZ$|PDcr{(PQ(q2WcQMK=7j_hoKNTST^ zsT5PaS&PEg%a(d?ryXw$%3j*2YryI5;j)zLv0W{I1qSFCSl;9(oqHCnTg%Z(mzdS-u!Xvk(jEY%2F)ujl3RY*wHovi2R!sJ>66 zs=G)JL~6$vOIwBzdTL4KRyzdD)T=0kDBq;WUB2}(Gj|w+BY}EGw&X?*{^m%!PF|tM zJ!Cj)6qxpQbM6Mrt0gmti8)`#gF$<6@JF&_xOkAdIk5J?9xLU$zUNjvf1qLCD*hUh z$LCXBX6aRJfoVKw*VRi9gm{XXE4m07F^w}4`)wL6HAmED_n4mz`h_Y>d1T@GoKqD>GkM{PXt9n^34$IQkOJB_JKi%D;Y@=@y~OooahBs%gY1w!7zs1 zdO|_OI~Gwt=K?0r{t)vQ9PPf2NPT6EFd@^l!k#vs2t~mdkL+uusyT30U^u`-!+i(5b;!T`q z{e9C9tfsK$AX=;h{VXE?L-&3L<#)TP zm4VS?TLtOI@9MA+jh@-%?#YA-#Nsqf;@hG>u4R5catL#1Zjb0)&MC8wJjYMKw^%xQ zd=6BncH5^-LX`z<GK{Fm zd!Z)$(WR+YPdax*H-Uu5XLxI3G#2T?`Ke`j%u1Ig!>SA6ZS%h6r17^Gvyo*{3$}VX zbMQ=M7;`$TiO!0@$<_95(2$W*Y}c5(R>pzUK zp&ZS&5yehxi!KN)>x+nDSN}GvWovo4CI8WF4Y)$GG%4}&SPuXA6V}zBrlbZ**ac@G z*3--qy4SLaZdv-NM;jE3W zO+U<{=RbLl=3M%@vK1x<+9nEQ`WUptGq#i zxg1-Vq!?mUW99zYiT;v5E=82%nog$tzzhLLnM;3h(;3s-F{m4te$UO-2|ei+OvrBe zqO3NYV6IN&xlTybFTl6a2$mfvZ%FZay(j3K--6qmJC%Woj8F>sI^j~V+@iPtxs$u* zFTm=u#<^n>a}pGHBT)ywX$xAhkYLUWqB_{K0y;E7J6GNaYucCqjTjp*^floMymwCF zv|ccS_kqiL^#;F9_=8|>Cfwye%m1DIT?e!9g;w{@dxeRC%&-?5m1U8})<2X|1B(t_ zc5lD!W^RnQXKQWK>3cGzMlom*mmdt>?Ntq_x%G|WM?UJh`sE5W1 z*d*+UrVEsLVrY3h$u;Qrr$8XqZ`{B;5R${#T-{r(D)PO|JMH)vA*~z;CBZC54u3SY zWzEiElx8VAiP$pce~*9@FMSz`lt?`*{*E4uyWV4Vw0Wi!hYEaE(XA0K6nA|ot~nRg z&7NMz>Ptz&8T2+kS;mA_yMh;y35GSLh~U$4wWhSkR39WGcxQ4gLX_V#*@XVbA z)Z*2`&B}s{(x=gL9=;gkpVtKyg{9>g8;zh65yU0t%LwnA^dR-rs3Tx<>Q-h_WG2BoC9 z)z~Oo__UM?7b}|;Fo9Web8m;3j-Z)?U}(|a{ldK_{#b(0f#3n)uC*MUvRD ze^XN~S%qq{s`^5R9Pg>iQX)rMH&-W&jQgpE@*huUt$Fp}`GHbMPBiISp)$(>Zp~rF zns_zz+!ZhwfHTl(&Oe%axtNtpui~ya(BycWmIIlwnWyTzb>G26u#qQ5bXxC1^Q%yY z#V1UZ+S>8?HHS)sZ++rxqu*M&h>^<}+NID@%Oe#qGqDbbzR8Hz2ZJjM^T`Nh6rK_U zt&f^9zDYrwO)G?sZ{$N7(KKpN3}vb}D%W4bs-WyC@2NwIwHG*9IO^)Uv5$sgW$bNh z`oy6o`!JxW={1wA#5|1-C+WoM2LadUw$ErScC`V%$0(@K{Op&iXs;<}1&jXY8B9IJ z8ZHxQ5(n&J)1NE0@n?3M;?A82JaYTXNGHn|zrZw!G|;(<2>6_Cp;r+if2-k#zKeF{ zv|{`En!R_@{Z^2f(g9z2mKF>{jBv74yUs9*4=+)F;4}p6iskStvy9S6Z;NL;8kepd z^4q+51+m5@P74d0oxGfgas(#!@@FIdSVy|Hmc9|M{pxD&+Jk3=_UJ4FvrN)RAKRzz zvQE!`^?r?Kn0Tz!ZhvH!he-K?J-T@rq_Uwu0KIX&Dj>iYJJe83$?o>nA^7oZ%>31_ zLMphC{vb3yzq_%rx08xi(-PCPM<#5zA@PY%u>`KD`s{rA@;jQ+Uxn}L%8&h07NCrz z)8d&NM9fO9O-+-pH4@*~>J614VFieMvjMAai6`&b93qMwtmeJJK|F;)>^voInEX*j z?&cuMvxB8->9k>}nbs~YX)rr|$OrI{-OhS^_c)i|E+dYqVY`-^T907Rw1mB+?)nD4 z`AS)`y;(P8*2~UA;zcsrA6Jm{MQo9gvm9;Xt0_vbY%>pKnv*SFzu0qHG4|b570(`N zT=00iK1(!!)i&xS`{s*|RtHjU5n|`yX~p@1gxSKBLH$+NYge|$ANQj~0Qd2YL?cfv94ivr z;lgWS50=vEDzfspWiK+#jdrm#?iV-#Yxj?~5F7TRc11hQPuzYr72bHd$ZZD3WN_4Z zqb;$2mn#LjwW)vF_?#tnsoIn~MVI5?LQ0w8*N2azMAghAV)-OqLd!h&DeVLimPY*?3*JjODM>gu2Y@J+hS1hll6{Lbn_(75pv3A@N;B^Qq z$!btz?<24PC3=ETmf25S?;mjD*s<0qIaP4333d6rK=}9^8}uwDilJeLNL(Lhedmj_ zkk)XQQp1zYA#!~a6KHN4ALP#>-eO)W%qD81Uyf`RE+4r$NmKy!3LDBu`h{J zHb{yv%eC>jR>T-vjk(b{-}pQfvnPW$f&Ck!`j`?-9I`W-KWJaCWP2{3*VUu7-AjK#OdQjK${En4dYlE;={w3afH~t7uwnK(m zP!eiy22`?xu(k%m2XPKUa3QQI?axnNfT9nDpi%Fda%)mUfP%7ludoi=4RGVAq#YXV zr|A}6vubuI1#=LtBaJPAVy>=gc#89=^3?$M8RoT9Rj1G-l+JIrcBKkEcf5^hzry4y zqS-0uFjx|NY2ei*xGCZ&x&I2!1ASw<9WMg&sixFc3bFAear%+_dEl3vjf^l795<}s zOQgO&+@@+GdrIet==}-pbn+mfl)n;C*s7&k-M40QHr*cayt7BQCr>u9mJ6zt>?8rL zfMMD~&s`-sKzNG`rDaO28?Ni~xjs#nLm*6u>$dykCPtqr0W(4+&zfADK||apCVIki z%;A&k!pf(8LU}vwuB&su=DnpC;dmi{zsdsz!L>$gQifpFnXN~<`}o;fv$J-S!V?BL zjNnb1GXp`o_>&F6#D9OS1uelL8QCV3?b7TzXM2tbBucgIgf7J7bC+rmDjGd^+6y+? zlbs)ls`=J4cH_e13zzSM3d}Iym=0v&xZ3hq{5@DC^W>(SP}jniDz38NnItdJG5a8c zH@*C2@Mg=Mrv^d@;Qp5Wev5L;pgMHF{sP)>yT-|~AR&WCy5%4lo`xa`7)`!E7yRC; z7y7b7RZkV*$G5G-b%K#3Y4B%^McRCvDk}jRP5V_;jsi4IK62x$6lj z0muNXwvKBeN@?qcvOE{9UTkwm_T!8|#@@cAid0YHexjYDub6;7Ue96LG(T0+kik-^ z3CIf5tIoq-0diR4s@RYoWP=be6gm|0uY8hMAtL)vE-%@~;Cw<6N8@Y?K#N?8v7o-9 z7nRI2TfR8o#G1m@$lK}ojXVHAMF}^>+z6#USNJ9_;|CB7d%H8`nN9KE6SjAC1IJg_ zKU}C~svwWlC{-P&t^S+z2fL(hnbv|?pD5d9q#+}pFp+?bia-ralmM!OB-J0$NUNeY4I`V8xkO?diR6ISaM#VDZIl(mr8EjDeSn`E%9LSb>iQkVb6IP4S4@{xDv zc0g9D%7i-`3i1g*>9bFupjB9zmA+I;WnuP-@5_nni!5=sP=0Q=4%^F5_K=5|#B^xM|2( zOKQ)j>n=gqv?m#_Sy}@fh!b`Mdhe{`>Ny4=dddC#MC2-!SB-s0jJMl24YCl*Kt{{i zqE$y{RyDk}BC=g8;4}v3Gm0Rim4M?bP!xzp64Bs5cddsKEgICdHUl0s*hrj1v@wL* z8xDQ$Q2V8u-#maR_-cOmViI=7z){t276Ne?cH9?=rO2EWdkhBAIp%Z)#9AbTH+5{2 zI7T5@X0q6D5+sR!8rEV=_}) zMu3M;@Ap^91_*}6fNdOomaPuW0F?!Mn@;M;zpI&Qwg<*8T7F0!m z-#w^N%hDmS>=!FaR2JSNz44)~6eTCzT*aOY?kM$IATqBLdbP3R1S@<0$YiX9k*R$5 zvJLtZUJz$OO(g3Ul2b-q*lGn7@8-IwAnI{%&v13<>%r#hVJ_>N7=M*4x3C$u=4z8; z0>gGaGa%>e2xo5^lp@&I1{w3kckBj#*+0GPG&J<$I`yExhsC2>BhY|v^A5<#JmZaP zk~b>B49w2xl7zXd7!_r|jZGF+pdEQ0l^8@Ne4mU%3vyNR7*^XI@9@=!zR1CxkJ|j8^Y{xG_L$kImjdmthZs*Qch=(+ z{lKR44F{Yrvw8coFO!$YJJ}suA0*G% zwg37}^`8CL56bjg$oq0TooD&||CJ>C|8aeDmw0@xeN<$t%vagSN*-brWL4fFrH%am EADMFdjQ{`u literal 0 HcmV?d00001