| | |
| | | feCalibrationSchedule, |
| | | feStandardSubstance, |
| | | feStandardSubstanceRecord, |
| | | personPostAuthorizationRecord, |
| | | deviceCheck, |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | const deviceScope = { |
| | | selectDeviceParameter: "/deviceScope/selectDeviceParameter", //æ¥è¯¢è®¾å¤è¯¦æ
å表 |
| | | addDeviceParameter: "/deviceScope/addDeviceParameter", //æ·»å 设å¤è¯¦æ
åæ° |
| | | delDeviceParameter: "/deviceScope/delDeviceParameter", //å é¤è®¾å¤è¯¦æ
åæ° |
| | | upDeviceParameter: "/deviceScope/upDeviceParameter", //ä¿®æ¹è®¾å¤è¯¦æ
åæ° |
| | | selectDeviceByCategory: "/deviceScope/selectDeviceByCategory", //éè¿è®¾å¤åç±»è·å设å¤å表 |
| | | authorizedPerson: "/user/getDeviceManager", //è·åææäºº |
| | | selectEquipmentOverview: "/deviceScope/selectEquipmentOverview", //è·åè®¾å¤æ»è§ |
| | | uploadFile: "/deviceScope/uploadFile", //ä¸ä¼ å¾ç |
| | | selectDevicePrincipal: "/user/getDeviceManager", //è·å设å¤è´è´£äºº |
| | | selectDeviceByCode: "/deviceScope/selectDeviceByCode", //éè¿è®¾å¤ç¼å·è·å设å¤å表 |
| | | getNumberCollect: "/deviceScope/getNumberCollect", //æ¥è¯¢æ°éé
ç½® |
| | | numberCollect: "/deviceScope/numberCollect", //ç»´æ¤æ°éé
ç½® |
| | | saveDataAcquisitionConfiguration: "/deviceScope/saveDataAcquisitionConfiguration", // ç»´æ¤æ°éé
ç½® |
| | | queryDataAcquisitionConfiguration: "/deviceScope/queryDataAcquisitionConfiguration", // æ¥è¯¢æ°éé
ç½® |
| | | deleteDataAcquisitionConfiguration: "/deviceScope/deleteDataAcquisitionConfiguration", // å 餿°éé
ç½® |
| | | determineWhetherToCollectData: "/deviceScope/determineWhetherToCollectData", // å¤æè¯¥è®¾å¤æ¯å¦å¯ä»¥æ°é |
| | | dataCollection: "/deviceScope/dataCollection", // æ°é-æ°æ®éé |
| | | treeDevice: "/deviceScope/treeDevice", // è®¾å¤æ å½¢ |
| | | temDataAcquisition: "/deviceScope/temDataAcquisition", // PK8000æ°é |
| | | temDataAcquisition2: "/deviceScope/temDataAcquisition2", // PK8000æ°é--夿¡ |
| | | formulaCalculation: "/deviceScope/formulaCalculation", // æ°é-å
¬å¼è®¡ç® |
| | | selectUserList: '/deviceScope/selectUserList', //è·åç¨æ·å表 |
| | | selectDeviceParameter: '/deviceScope/selectDeviceParameter', //æ¥è¯¢è®¾å¤è¯¦æ
å表 |
| | | addDeviceParameter: '/deviceScope/addDeviceParameter', //æ·»å 设å¤è¯¦æ
åæ° |
| | | delDeviceParameter: '/deviceScope/delDeviceParameter', //å é¤è®¾å¤è¯¦æ
åæ° |
| | | upDeviceParameter: '/deviceScope/upDeviceParameter', //ä¿®æ¹è®¾å¤è¯¦æ
åæ° |
| | | selectDeviceByCategory: '/deviceScope/selectDeviceByCategory', //éè¿è®¾å¤åç±»è·å设å¤å表 |
| | | deviceScopeSearch: "/deviceScope/search", //éè¿è®¾å¤åç±»è·å设å¤å表 |
| | | authorizedPerson: '/user/getDeviceManager', //è·åææäºº |
| | | selectEquipmentOverview: '/deviceScope/selectEquipmentOverview', //è·åè®¾å¤æ»è§ |
| | | uploadFile: '/deviceScope/uploadFile', //ä¸ä¼ å¾ç |
| | | selectDevicePrincipal: '/user/getDeviceManager', //è·å设å¤è´è´£äºº |
| | | selectDeviceByCode: '/deviceScope/selectDeviceByCode', //éè¿è®¾å¤ç¼å·è·å设å¤å表 |
| | | getNumberCollect: '/deviceScope/getNumberCollect', //æ¥è¯¢æ°éé
ç½® |
| | | numberCollect: '/deviceScope/numberCollect', //ç»´æ¤æ°éé
ç½® |
| | | saveDataAcquisitionConfiguration: '/deviceScope/saveDataAcquisitionConfiguration', // ç»´æ¤æ°éé
ç½® |
| | | queryDataAcquisitionConfiguration: '/deviceScope/queryDataAcquisitionConfiguration', // æ¥è¯¢æ°éé
ç½® |
| | | deleteDataAcquisitionConfiguration: '/deviceScope/deleteDataAcquisitionConfiguration', // å 餿°éé
ç½® |
| | | determineWhetherToCollectData: '/deviceScope/determineWhetherToCollectData', // å¤æè¯¥è®¾å¤æ¯å¦å¯ä»¥æ°é |
| | | dataCollection: '/deviceScope/dataCollection', // æ°é-æ°æ®éé |
| | | treeDevice: '/deviceScope/treeDevice', // è®¾å¤æ å½¢ |
| | | temDataAcquisition: '/deviceScope/temDataAcquisition', // PK8000æ°é |
| | | temDataAcquisition2: '/deviceScope/temDataAcquisition2', // PK8000æ°é--夿¡ |
| | | formulaCalculation: '/deviceScope/formulaCalculation', // æ°é-å
¬å¼è®¡ç® |
| | | formulaCalculation2: '/deviceScope/export', //å¯¼åº |
| | | selectListBylargeCategory: '/deviceScope/largeCategory' |
| | | } |
| | | |
| | | const insOrder = { |
| | |
| | | // 6.2 人å |
| | | const personnel = { |
| | | selectCNSAPersonTree: '/personBasicInfo/selectCNSAPersonTree', // æ¥è¯¢CNAS人åä¾§è¾¹æ |
| | | getAnnex: '/personBasicInfo/getAnnex', // è·åéä»¶ |
| | | basicInformationOfPersonnelSelectPage: 'personBasicInfo/basicInformationOfPersonnelSelectPage', // è·å人åå表 |
| | | getAnnexByUserId: '/personBasicInfo/getAnnexByUserId', |
| | | addAnnex: '/personBasicInfo/addAnnex', // æ·»å éä»¶ |
| | | deleteAnnex: '/personBasicInfo/deleteAnnex', // å é¤éä»¶ |
| | | updateAnnex: '/personBasicInfo/updateAnnex', // æ´æ°éä»¶ |
| | | getCNASFile: '/personBasicInfo/getCNASFile', // è·åå¾ç |
| | | getCNASInformation: '/personBasicInfo/getCNASInformation', // æ¥è¯¢CNAS人åä¿¡æ¯ |
| | | updateCNASInformation: '/personBasicInfo/updateCNASInformation', // æ´æ°CNAS人åä¿¡æ¯ |
| | | getCNASPersonnelInfo: '/personBasicInfo/getCNASPersonnelInfo', // 人ååºæ¬ä¿¡æ¯æ¥è¯¢ |
| | | saveCNASPersonnelInfo: '/personBasicInfo/saveCNASPersonnelInfo', // 人ååºæ¬ä¿¡æ¯ä¿å |
| | | saveCNASFile: '/personBasicInfo/saveCNASFile', // å
Œ
±æä»¶ä¿åæ¥å£ |
| | | deleteCNASFile: '/personBasicInfo/deleteCNASFile', // å 餿件 |
| | | personTrainingSelect: '/personTraining/personTrainingSelect', // æ¥è¯¢äººåå¹è® |
| | | personTrainingDelete: '/personTraining/personTrainingDelete', // å é¤äººåå¹è®ä¿¡æ¯ |
| | | approveAnnualPersonnelTraining: '/personTraining/approveAnnualPersonnelTraining', // æ¹å 年度人åå¹è® |
| | | reviewAnnualPersonnelTraining: '/personTraining/reviewAnnualPersonnelTraining', // å®¡æ ¸ 年度人åå¹è® |
| | | personTrainingImport: '/personTraining/personTrainingImport', // 导å
¥ 人åå¹è® |
| | | exportPersonTraining: "/personTraining/exportPersonTraining", // 导åº/人åå¹è® |
| | | queryTheAnnualPlanDetailsTable: '/personTraining/queryTheAnnualPlanDetailsTable', // æ¥è¯¢å¹è®è®¡å年度计åæç»è¡¨ |
| | | addOrUpdatePersonTrainingDetailed: '/personTraining/addOrUpdatePersonTrainingDetailed', // æ°å¢å¹è®è®¡å年度计åæç»è¡¨ |
| | | deleteAnnualPlanDetailTable: '/personTraining/deleteAnnualPlanDetailTable', // æ¹éå é¤ å¹´åº¦è®¡åæç»è¡¨ |
| | | trainingAndAssessmentRecordsPage: '/personTraining/trainingAndAssessmentRecordsPage', // å¹è®ä¸èæ ¸è®°å½ æ¥è¯¢ |
| | | deleteTrainingAndAssessmentRecords: '/personTraining/deleteTrainingAndAssessmentRecords', // å¹è®ä¸èæ ¸è®°å½ æ¹éå é¤ |
| | | trainingAndAssessmentRecordsAdded: '/personTraining/trainingAndAssessmentRecordsAdded', // å¹è®ä¸èæ ¸è®°å½ æäº¤ |
| | | personJobResponsibilitiesSave: '/personJobResponsibilities/personJobResponsibilitiesSave', // æ°å¢å²ä½èè´£ |
| | | personJobResponsibilitiesDelete: '/personJobResponsibilities/personJobResponsibilitiesDelete', // å é¤å²ä½èè´£ |
| | | personJobResponsibilitiesUpdate: '/personJobResponsibilities/personJobResponsibilitiesUpdate', // æ´æ°å²ä½èè´£ |
| | | personJobResponsibilitiesSelect: '/personJobResponsibilities/personJobResponsibilitiesSelect', // å页æ¥è¯¢å²ä½èè´£ |
| | | personJobResponsibilitiesExport: '/personJobResponsibilities/personJobResponsibilitiesExport', // 导åºå²ä½èè´£ |
| | | personTrackRecordSave: '/personTrackRecord/personTrackRecordSave', // æ°å¢å·¥ä½å±¥å |
| | | personTrackRecordDelete: '/personTrackRecord/personTrackRecordDelete', // å é¤å·¥ä½å±¥å |
| | | personTrackRecordUpdate: '/personTrackRecord/personTrackRecordUpdate', // æ´æ°å·¥ä½å±¥å |
| | | personTrackRecordSelect: '/personTrackRecord/personTrackRecordSelect', // æ¥è¯¢å·¥ä½å±¥å |
| | | personTrackRecordExport: '/personTrackRecord/personTrackRecordExport', // 导åºå·¥ä½å±¥å |
| | | personTrainingRecordSelect: '/personTrainingRecord/personTrainingRecordSelect', // æ¥è¯¢å¹è®è®°å½ |
| | | personTrainingRecordExport: '/personTrainingRecord/personTrainingRecordExport', // å·¥ä½å¹è®è®°å½ |
| | | personPersonnelCapacityPage: '/personPersonnelCapacity/personPersonnelCapacityPage', // æ¥è¯¢äººåè½å |
| | | deletePersonPersonnelCapacity: '/personPersonnelCapacity/deletePersonPersonnelCapacity', // å é¤äººåè½å |
| | | addOrUpdatePersonPersonnelCapacity: '/personPersonnelCapacity/addOrUpdatePersonPersonnelCapacity', // æ°å¢ç¼è¾äººåè½å |
| | | exportPersonnelCapacity: '/personPersonnelCapacity/exportPersonnelCapacity', // 导åºäººåè½å |
| | | newPersonnelAddedToTrainingRecords: "/personTraining/newPersonnelAddedToTrainingRecords", // å¹è®ä¸èæ ¸ æ°å¢äººå |
| | | outOfFocusPreservation: "/personTraining/outOfFocusPreservation", // å¹è®ä¸èæ ¸ å¤±ç¦æ´æ° |
| | | trainingSelectTrainingRecord: "/personTrainingRecord/trainingSelectTrainingRecord", // æ¥è¯¢äººå å¹è®è®°å½ |
| | | queryPersonnelDetails: "/personTrainingRecord/queryPersonnelDetails", // æ¥è¯¢äººåæç» å¹è®è®°å½ |
| | | claimOfTrainingAndAssessmentRecords: "/personTraining/claimOfTrainingAndAssessmentRecords", // 认é¢/åæ¶è®¤é¢ |
| | | exportPersonTrainingRecord: "/personTraining/exportPersonTrainingRecord", // 导åºäººåå¹è®ä¸èæ ¸è®°å½ |
| | | exportTrainingRecord: "/personTrainingRecord/exportTrainingRecord", // 导åºå¹è®è®°å½ |
| | | confirmPersonnelCapability: "/personPersonnelCapacity/confirmPersonnelCapability", // 确认人åè½å |
| | | } |
| | | |
| | | // 8.3 å®¢æ·æ»¡æåº¦è°æ¥ |
| | |
| | | getVerifyMethodFileList:'/processMethodVerify/getVerifyMethodFileList', // åå§è®°å½å表 |
| | | delVerifyMethodFileList:'/processMethodVerify/delVerifyMethodFileList', // å é¤éªè¯åå§è®°å½å表 |
| | | delMethodVerify:'/processMethodVerify/delMethodVerify', // å 餿 åæ¹æ³æ´æ°éªè¯ |
| | | exportMethodVerify:'/processMethodVerify/exportMethodVerify', // å¯¼åºæ åæ¹æ³æ´æ°éªè¯ |
| | | } |
| | | |
| | | // 7.4æ£æµææ ¡åç©åçå¤ç½®-æ ·åæ¥æ¶ |
| | |
| | | ratifyQualityMonitor:'/qualityMonitor/ratifyQualityMonitor', // çæ§è®¡åæ¹å |
| | | delQualitySupervise:'/qualityMonitor/delQualitySupervise', // çæ§è®¡åæ¹å |
| | | importQualityMonitor:'/qualityMonitor/importQualityMonitor', // 导å
¥çæ§è®¡å |
| | | exportQualityMonitorDetail:'/qualityMonitor/exportQualityMonitorDetail', // 导åºçæ§è®¡å |
| | | exportQualityMonitorDetail:'/qualityMonitor/exportQualityMonitorDetail', |
| | | exportQualityMonitorRatify:'/qualityMonitor/exportQualityMonitorRatify', // è´¨éçæ§å®æ½è®¡åå¯¼åº |
| | | exportQualityMonitorEvaluate:'/qualityMonitor/exportQualityMonitorEvaluate', // è´¨éçæ§è¯ä»·å¯¼åº |
| | | } |
| | | |
| | | // 8.5 åºå¯¹é£é©åæºéçæªæ½ |
| | |
| | | returnSubstance:'/feStandardSubstanceRecord/returnSubstance',//æ åç©è´¨æ¸
åå½è¿ |
| | | getPageSubstanceRecord: '/feStandardSubstanceRecord/getPageSubstanceRecord', // å页æ¥è¯¢ |
| | | } |
| | | |
| | | const personPostAuthorizationRecord = { |
| | | exportPersonPostAuthorizationRecord:'/personPostAuthorizationRecord/exportPersonPostAuthorizationRecord',//ä¼ åid 人åçä»»èææå¯¼åº |
| | | exportPersonBasicInfo:'/personBasicInfo/exportPersonBasicInfo',//æ¬ä¿¡æ¯å¯¼åº,ä¼ å类似å页 |
| | | exportPersonBasicInfoById:'/personBasicInfo/exportPersonBasicInfoById',//æ¬ä¿¡æ¯å¯¼åº,ä¼ å类似å页 |
| | | exportPersonJobResponsibilities:'/personJobResponsibilities/exportPersonJobResponsibilities',//导åºäººåèè´£,ä¼ åid |
| | | } |
| | | |
| | | //è®¾å¤æ¥å£ |
| | | const deviceCheck = { |
| | | list: '/device-alt', |
| | | edit: '/device-alt/edit', |
| | | saveIncidentReportData: '/incident-report/saveIncidentReportData', // 设å¤éªæ¶ ä¿åï¼æäº¤ï¼é©³åï¼éè¿æ¥å£ |
| | | incidentReportPage: '/incident-report/incidentReportPage', // æå¼æ°å¢å¼¹æ¡ï¼è·å设å¤çåºç¡ä¿¡æ¯ |
| | | deleteIncidentReport: '/incident-report/deleteIncidentReport', // å é¤è®¾å¤éªæ¶æ°æ® |
| | | getShowIncidentReport: '/incident-report/getShowIncidentReport', // 设å¤éªæ¶ ç¹å»æ¥çè·åæ°æ® |
| | | deleteIncidentReportAll: '/incident-report/deleteIncidentReportAll', // 设å¤éªæ¶ä¸å个tableè¡¨æ ¼çå é¤åè½ |
| | | incidentReportExport: '/incident-report/incidentReportExport', // 设å¤éªæ¶å¯¼åº |
| | | deviceRecordPage: '/deviceRecord/deviceRecordPage', // cnas设å¤ä½¿ç¨è®°å½å页æ¥è¯¢ |
| | | saveDeviceRecord: '/deviceRecord/saveDeviceRecord', // 设å¤ä½¿ç¨è®°å½ä¿å |
| | | deleteDeviceRecord: '/deviceRecord/deleteDeviceRecord', // å é¤è®¾å¤ä½¿ç¨è®°å½ |
| | | deviceRecordExport: '/deviceRecord/deviceRecordExport', // 设å¤ä½¿ç¨è®°å½å é¤ |
| | | getDeviceMaintenancePage: '/device-maintain/getDeviceMaintenancePage', // 设å¤ç»´æ¤å页æ¥è¯¢ |
| | | deviceMaintenanceExport: '/device-maintain/deviceMaintenanceExport', // 设å¤ç»´æ¤å¯¼åº |
| | | deviceMaintenanceDelete: '/device-maintain/delete', // 设å¤ç»´æ¤å é¤ |
| | | deviceMaintainAdd: '/device-maintain', // 设å¤ç»´æ¤æ°å¢ |
| | | saveDeviceState: '/deviceState/saveDeviceState', // 设å¤å¯ç¨/åç¨ ä¿åï¼æäº¤ï¼é©³åï¼éè¿æ¥å£ |
| | | getDeviceStatePage: '/deviceState/getDeviceStatePage', // 设å¤å¯ç¨/åç¨ å页 |
| | | deleteDeviceState: '/deviceState/deleteDeviceState', // 设å¤å¯ç¨/åç¨ å é¤ |
| | | deviceFaultOnePage: '/deviceFaultOne/deviceFaultOnePage', // è®¾å¤æ
é表 å页æ¥è¯¢ |
| | | addOrUpdateDeviceFaultOne: '/deviceFaultOne/addOrUpdateDeviceFaultOne', |
| | | deleteDeviceFaultOne: '/deviceFaultOne/deleteDeviceFaultOne', // å é¤ è®¾å¤æ
é |
| | | deviceMetricRecordPage: '/deviceMetricRecord/deviceMetricRecordPage', // è®¾å¤æ ¡å å页æ¥è¯¢ |
| | | addOrUpdateDeviceMetricRecord: '/deviceMetricRecord/addOrUpdateDeviceMetricRecord', // è®¾å¤æ ¡å æ°å¢ æ´æ° |
| | | deleteDeviceMetricRecord: '/deviceMetricRecord/deleteDeviceMetricRecord', // è®¾å¤æ ¡å å é¤ |
| | | showDeviceMetricsCopy: '/deviceMetricRecord/showDeviceMetricsCopy', // è®¾å¤æ ¡å æ¥è¯¢æ ¡åæ¡ç® |
| | | selectDeviceMetric: '/deviceMetrics/selectDeviceMetric', // è®¾å¤æ ¡å 设å¤ç»´æ¤è¡¨ æ¥è¯¢ |
| | | saveOrUpdateDeviceMetric: '/deviceMetrics/saveOrUpdateDeviceMetric', // è®¾å¤æ ¡å æ°å¢ æ´æ° |
| | | deleteDeviceMetrics: '/deviceMetrics/deleteDeviceMetrics', // è®¾å¤æ ¡å å é¤ |
| | | rewardPunishmentExport: '/personRewardPunishmentRecord/rewardPunishmentExport', // 奿©è®°å½ å¯¼åº |
| | | exportRewardAndPunishmentRecords: '/deviceFaultOne/exportRewardAndPunishmentRecords', // 奿©è®°å½å¯¼åº |
| | | deviceStateExport: "/deviceState/deviceStateExport", // 设å¤ç¶æ |
| | | newHomeworkGuidebookAdded: "/instruction/newHomeworkGuidebookAdded", // ä½ä¸æå¯¼ä¹¦æ°å¢ |
| | | pageByPageQueryOfHomeworkInstructions: "/instruction/pageByPageQueryOfHomeworkInstructions", // ä½ä¸æå¯¼ä¹¦ æ¥è¯¢ |
| | | homeworkGuidebookEditor: "/instruction/homeworkGuidebookEditor", // ä½ä¸æå¯¼ä¹¦ ç¼è¾æ¥è¯¢ |
| | | deleteHomeworkGuidebook: "/instruction/deleteHomeworkGuidebook", // ä½ä¸æå¯¼ä¹¦åæ§æä»¶å é¤ |
| | | homeworkGuidebook: "/instruction/homeworkGuidebook", // ä½ä¸æå¯¼ä¹¦ å é¤ |
| | | approvalOfHomeworkInstructionManual: "/instruction/approvalOfHomeworkInstructionManual", // ä½ä¸æå¯¼ä¹¦ å®¡æ¹ |
| | | deviceMetricRecordExport: '/deviceMetricRecord/deviceMetricRecordExport', // è®¾å¤æ ¡å å¯¼åº |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-list"> |
| | | <span class="search-input"> |
| | | <span class="search-label"> |
| | | <span style="width: 120px;font-size: 14px;line-height: 32px" |
| | | >人ååç§°ï¼</span |
| | | > |
| | | <el-input |
| | | v-model="entity.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | style="width: 100%;" |
| | | @keyup.enter.native="refreshTable()" |
| | | > |
| | | </el-input> |
| | | </span> |
| | | <el-button size="small" style="margin-left: 10px" @click="refresh()" |
| | | >é ç½®</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="refreshTable()" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | </span> |
| | | <span> |
| | | <el-button |
| | | :loading="outLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="handleDown" |
| | | >导åº</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="selectUserDia = true" |
| | | >æ°å»º</el-button |
| | | > |
| | | </span> |
| | | </div> |
| | | <div class="search-table"> |
| | | <el-table |
| | | v-loading="tableLoading" |
| | | :data="tableData" |
| | | border |
| | | height="calc(100vh - 20em)" |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column align="center" label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="åå·¥ç¼å·" prop="account" width="150"></el-table-column> |
| | | <el-table-column label="å§å" prop="name" width="120"></el-table-column> |
| | | <el-table-column label="å
¥é墿¶é´" prop="groupTime" width="120"></el-table-column> |
| | | <el-table-column label="ç±è´¯" prop="nativePlace" width="120"></el-table-column> |
| | | <el-table-column label="è¯ä»¶å·ç " prop="identityCard" show-overflow-tooltip width="300"></el-table-column> |
| | | <el-table-column label="è¯ä»¶å°å" prop="idAddress" show-overflow-tooltip width="100"></el-table-column> |
| | | <el-table-column label="ææºå·" prop="telephone" show-overflow-tooltip width="100"></el-table-column> |
| | | <el-table-column label="æ¯ä¸é¢æ ¡" prop="graduatedInstitutions1" width="100"></el-table-column> |
| | | <el-table-column label="æå¦ä¸ä¸" prop="major1" width="100"></el-table-column> |
| | | <el-table-column label="æ¯ä¸æ¶é´" prop="graduationTime1" width="100"></el-table-column> |
| | | <el-table-column label="æé«å¦å" prop="officialAcademicRedentials" width="100"></el-table-column> |
| | | <el-table-column label="æé«å¦ä½" prop="highestDegree" width="100"></el-table-column> |
| | | <el-table-column label="èç§°" prop="professionalTitle" width="100"></el-table-column> |
| | | <el-table-column label="ç´§æ¥è系人" prop="emergencyContact" width="120"></el-table-column> |
| | | <el-table-column label="ç´§æ¥èç³»çµè¯" prop="emergencyContactPhone" width="120"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="downPerson(scope.row)">ä¸è½½</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="text" |
| | | @click="$emit('updatePerson', scope.row)" |
| | | >ç¼è¾ |
| | | </el-button> |
| | | <el-button size="small" type="text" @click="deletePerson(scope.row)" |
| | | >å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | :current-page="1" |
| | | :current-page.sync="page.current" |
| | | :page-size="page.size" |
| | | :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="page.total" |
| | | layout="->,total, sizes, prev, pager, next, jumper" |
| | | style="margin-top: 16px" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog :visible.sync="selectUserDia" title="éæ©ç¨æ·" width="70%"> |
| | | <div class="search" style="margin-bottom: 9px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¨æ·åï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="addUserTableInfo.entity.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="$refs.ValueTable.selectList()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-if="selectUserDia" class="body" style="height: 60vh;"> |
| | | <ValueTable |
| | | ref="ValueTable" |
| | | :componentData="addUserTableInfo" |
| | | :url="$api.user.selectUserList" |
| | | /> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="selectUserDia = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="selectUser">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue'; |
| | | |
| | | export default { |
| | | name: 'PersonnelList', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ValueTable }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | currentCompaniesList: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | outLoading: false, |
| | | tableLoading: false, |
| | | tableData: [], // äººåæ»åè¡¨æ°æ® |
| | | selectUserDia: false, // æ·»å 人åå¼¹æ¡ |
| | | entity: { |
| | | name: '', |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | addUserTableInfo: { |
| | | name: null, |
| | | entity: { |
| | | isCustom: 0, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: true, |
| | | select: true, |
| | | do: [], |
| | | tagField: { |
| | | state: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | type: 'success', |
| | | label: 'å¯ç¨' |
| | | }, |
| | | { |
| | | value: 0, |
| | | type: 'danger', |
| | | label: 'åç¨' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | upUserDepardLimsIdPower: true |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.refreshTable(); |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | /** |
| | | * @desc è·å设å¤id |
| | | */ |
| | | // éç½® |
| | | refresh() { |
| | | this.page = { |
| | | size: 20, |
| | | current: 1, |
| | | }; |
| | | this.entity.name = '' |
| | | this.refreshTable(); |
| | | }, |
| | | // æ¥è¯¢äººååè¡¨æ°æ® |
| | | refreshTable(entity, type) { |
| | | try { |
| | | this.tableLoading = true; |
| | | this.entity.departLimsId = this.departId; |
| | | this.$axios.get( |
| | | this.$api.personnel.basicInformationOfPersonnelSelectPage |
| | | + '?size=' + this.page.size |
| | | + '¤t=' + this.page.current |
| | | + '&departmentId=' + this.entity.departLimsId |
| | | + '&name=' + this.entity.name |
| | | ) |
| | | .then(res => { |
| | | this.tableLoading = false; |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.page.total = res.data.total; |
| | | this.tableData = res.data.records; |
| | | }); |
| | | } catch (e) { |
| | | this.tableLoading = false; |
| | | } |
| | | }, |
| | | // å é¤äººå |
| | | deletePerson(row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.user.delUserDepardLimsId + '?id=' + row.id) |
| | | .then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('å 餿å'); |
| | | this.refreshTable(); |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥'); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | | this.refreshTable(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val; |
| | | this.refreshTable(); |
| | | }, |
| | | selectUser() { |
| | | if (!this.currentCompaniesList.length > 0) { |
| | | this.$message.warning("è¯·éæ©é¨é¨ï¼") |
| | | return; |
| | | } |
| | | let selects = this.$refs.ValueTable.multipleSelection; |
| | | if (selects.length == 0) { |
| | | this.$message.error('æªéæ©æ°æ®'); |
| | | return; |
| | | } |
| | | let ids = []; |
| | | selects.forEach(a => { |
| | | ids.push(a.id); |
| | | }); |
| | | let str = ''; |
| | | this.currentCompaniesList.forEach(a => { |
| | | if (a) { |
| | | str += a + ','; |
| | | } |
| | | }); |
| | | this.selectUserDia = false; |
| | | this.$axios.post(this.$api.user.upUserDepardLimsId, { |
| | | ids: JSON.stringify(ids), |
| | | id: str |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('æ·»å æå'); |
| | | this.refreshTable(); |
| | | }); |
| | | this.$emit('refreshTree') |
| | | }, |
| | | handleDown() { |
| | | this.outLoading = true; |
| | | let entity = this.HaveJson(this.entity) |
| | | delete entity.orderBy; |
| | | this.$axios.post( |
| | | this.$api.personPostAuthorizationRecord.exportPersonBasicInfo, |
| | | { |
| | | entity: entity |
| | | }, |
| | | { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | responseType: "blob" |
| | | } |
| | | ) |
| | | .then(res => { |
| | | this.outLoading = false; |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('ä¸è½½æå') |
| | | const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '人åä¿¡æ¯.xlsx'; |
| | | link.click(); |
| | | }); |
| | | }, |
| | | downPerson(row){ |
| | | this.$axios.post( |
| | | this.$api.personPostAuthorizationRecord.exportPersonBasicInfoById+'?id=' + row.userId, |
| | | { |
| | | id: row.userId |
| | | } |
| | | ) |
| | | .then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('ä¸è½½æå') |
| | | try { |
| | | let url = res.message; |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + '/word/'+ url; |
| | | // link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | } catch (error) { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (newId) { |
| | | this.page.current = 1 |
| | | this.refreshTable(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-list { |
| | | padding: 0 16px 16px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-table { |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .search-input { |
| | | display: flex; |
| | | } |
| | | |
| | | .search-label { |
| | | display: flex; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="addTrainingPlanDia" title="æ°å¢å¹è®è®¡å" width="50%"> |
| | | <div class="body"> |
| | | <el-form ref="trainingPlan" :model="trainingPlan" label-position="right" label-width="90px" :rules="trainingPlanRules"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®æ¥æ:" prop="trainingDate"> |
| | | <el-date-picker v-model="trainingPlan.trainingDate" format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" size="small" value-format="yyyy-MM-dd" |
| | | type="date" style="width: 100%"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="课æ¶:"> |
| | | <el-input type="number" v-model="trainingPlan.classHour" label="æè¿°æå" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¼å§æ¶é´:" prop="openingTime"> |
| | | <el-time-picker v-model="trainingPlan.openingTime" placeholder="éæ©æ¶é´" |
| | | size="small" style="width: 100%" value-format="HH:mm:ss"></el-time-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»ææ¶é´:" prop="endTime"> |
| | | <el-time-picker v-model="trainingPlan.endTime" placeholder="éæ©æ¶é´" size="small" |
| | | style="width: 100%" value-format="HH:mm:ss"></el-time-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®ç®æ :"> |
| | | <el-input v-model="trainingPlan.trainingObjectives" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå 对象:"> |
| | | <el-input v-model="trainingPlan.participants" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®å
容:" prop="trainingContent"> |
| | | <el-input v-model="trainingPlan.trainingContent" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®è®²å¸:" prop="trainingLecturerId"> |
| | | <el-select v-model="trainingPlan.trainingLecturerId" |
| | | clearable filterable |
| | | placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="课é¢å¦å:"> |
| | | <el-input type="number" v-model="trainingPlan.projectCredits" label="æè¿°æå" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®å°ç¹:"> |
| | | <el-input v-model="trainingPlan.placeTraining" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®æ¹å¼:"> |
| | | <el-input v-model="trainingPlan.trainingMode" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="举åé¨é¨:"> |
| | | <el-input v-model="trainingPlan.holdingDepartment" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeAdd">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitAdd">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentChangeRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | }, |
| | | name: 'Add', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | addTrainingPlanDia: false, |
| | | trainingPlan: { |
| | | planId: '', |
| | | }, |
| | | trainingPlanRules: { |
| | | trainingDate: [{ required: true, message: 'è¯·éæ©å¹è®æ¥æ', trigger: 'change' }], |
| | | openingTime: [{ required: true, message: 'è¯·éæ©å¼å§æ¶é´', trigger: 'change' }], |
| | | endTime: [{ required: true, message: 'è¯·éæ©ç»ææ¶é´', trigger: 'change' }], |
| | | trainingContent: [{ required: true, message: '请è¾å
¥å¹è®å
容', trigger: 'change' }], |
| | | trainingLecturerId: [{ required: true, message: 'è¯·éæ©å¹è®è®²å¸', trigger: 'change' }], |
| | | }, |
| | | responsibleOptions: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | showDialog(id) { |
| | | this.addTrainingPlanDia = true; |
| | | this.trainingPlan.planId = id |
| | | this.getUserList() |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | submitAdd() { |
| | | this.$refs.trainingPlan.validate((valid) => { |
| | | if (valid) { |
| | | this.trainingPlan.planId = this.currentChangeRow.id |
| | | const personTrainingDetailed = this.trainingPlan |
| | | this.$axios.post(this.$api.personnel.addOrUpdatePersonTrainingDetailed, personTrainingDetailed, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå'); |
| | | this.closeAdd(); |
| | | this.dialogVisible = false; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeAdd() { |
| | | this.$refs.trainingPlan.resetFields(); |
| | | this.$emit('search') |
| | | this.addTrainingPlanDia = false; |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | addTrainingPlanDia(newVal) { |
| | | if (newVal) { |
| | | this.trainingPlan = { |
| | | planId: '', |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="page-header"> |
| | | <h4><span class="line"></span><span>å¹è®ä¸èæ ¸è®°å½</span></h4> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" @click="submitForm">{{ currentRow.state === 4 ? 'æäº¤' : 'æ¤é' }}</el-button> |
| | | <el-button size="small" @click="$emit('goBack')">è¿å</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="form_title"> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <span class="form_label">课ç¨ç¼å·ï¼</span> |
| | | <span> {{ trainingForm.courseCode }} </span> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <span class="form_label">å¹è®å
容ï¼</span> |
| | | <span> {{ trainingForm.trainingContent }} </span> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <span class="form_label">ç¶æï¼</span> |
| | | <el-tag v-if="trainingForm.state === 1" type="success">已宿</el-tag> |
| | | <el-tag v-if="trainingForm.state === 2" type="warning">è¿è¡ä¸</el-tag> |
| | | <el-tag v-if="trainingForm.state === 3" type="primary">æªå¼å§</el-tag> |
| | | <el-tag v-if="trainingForm.state === 4" type="info">å·²ç»æ</el-tag> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <span class="form_label">å¹è®è®²å¸ï¼</span> |
| | | <span> {{ trainingForm.trainingLecturerName }} </span> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <span class="form_label">å¹è®æ¥æï¼</span> |
| | | <span> {{ trainingForm.trainingDate }} </span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin: 15px 0"> |
| | | <el-form> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èæ ¸æ¹å¼"> |
| | | <el-input v-model="trainingForm.assessmentMethod" :disabled="currentRow.state === 1" :rows="2" placeholder="请è¾å
¥" |
| | | size="small" style="width: 79%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¬æ¬¡å¹è®ç»¼åè¯ä»·"> |
| | | <el-input v-model="trainingForm.comprehensiveAssessment" :disabled="currentRow.state === 1" :rows="2" placeholder="请è¾å
¥" |
| | | size="small" style="width: 68%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¯ä»·äºº"> |
| | | <el-select v-model="trainingForm.assessmentUserId" :disabled="currentRow.state === 1" placeholder="è¯·éæ©" size="small" style="width: 68%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | </div> |
| | | <el-divider>人å详æ
</el-divider> |
| | | <div> |
| | | <div class="items_center"> |
| | | <span>å§å</span> |
| | | <el-input v-model="userName" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getInfo">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div class="items_btn"> |
| | | <el-button :disabled="currentRow.state === 1" size="small" type="primary" @click="addPerson">æ°å¢äººå</el-button> |
| | | <el-button :disabled="currentRow.state === 1" size="small" @click="batchDelete">æ¹éå é¤</el-button> |
| | | </div> |
| | | <el-table :data="trainingTableData" height="calc(100vh - 30em)" stripe style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="å§å" prop="userName"></el-table-column> |
| | | <el-table-column label="å·¥å·" prop="account"></el-table-column> |
| | | <el-table-column label="è§è²" prop="roleName"></el-table-column> |
| | | <el-table-column label="çµè¯å·ç " prop="phone"></el-table-column> |
| | | <el-table-column label="èæ ¸ç»æ" prop="examinationResults"> |
| | | <template v-slot="scope"> |
| | | <el-input v-model="scope.row.examinationResults" :disabled="currentRow.state === 1" clearable size="small" style="width: 100%" @blur="updatePersonResult(scope.row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog :visible.sync="selectUserDia" title="éæ©ç¨æ·" width="70%"> |
| | | <div class="search" style="margin-bottom: 9px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¨æ·åï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="addUserTableInfo.entity.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="$refs.ValueTable.selectList()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-if="selectUserDia" class="body" style="height: 60vh;"> |
| | | <ValueTable |
| | | ref="ValueTable" |
| | | :componentData="addUserTableInfo" |
| | | :isSelectedList="isSelectedList" |
| | | :url="$api.user.selectUserList" |
| | | /> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="selectUserDia = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="selectUser">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '../../caorui/TableCard/index.vue'; |
| | | import ZTTable from '../../caorui/ZTTable/index.vue'; |
| | | import ValueTable from '../../tool/value-table.vue'; |
| | | |
| | | export default { |
| | | name: 'Edit', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {ValueTable, ZTTable, TableCard}, |
| | | props: { |
| | | currentRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | isSelectedList: [], // ç¦ç¨çå¤é |
| | | userName: undefined, |
| | | trainingForm: { |
| | | code: '111111', |
| | | date: '2024-10-10', |
| | | }, |
| | | trainingColumn: [ |
| | | { |
| | | label: 'å§å', |
| | | prop: 'userName' |
| | | }, |
| | | { |
| | | label: 'å·¥å·', |
| | | prop: 'account' |
| | | }, |
| | | { |
| | | label: 'è§è²', |
| | | prop: 'roleName' |
| | | }, |
| | | { |
| | | label: 'çµè¯å·ç ', |
| | | prop: 'phone' |
| | | }, |
| | | { |
| | | label: 'èæ ¸ç»æ', |
| | | prop: 'result' |
| | | } |
| | | ], |
| | | trainingTableData: [], |
| | | trainingLoading: false, |
| | | selectUserDia: false, // æ·»å 人åå¼¹æ¡ |
| | | addUserTableInfo: { |
| | | name: null, |
| | | entity: { |
| | | departLimsId: '1', |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: true, |
| | | select: true, |
| | | do: [], |
| | | tagField: { |
| | | state: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | type: 'success', |
| | | label: 'å¯ç¨' |
| | | }, |
| | | { |
| | | value: 0, |
| | | type: 'danger', |
| | | label: 'åç¨' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | upUserDepardLimsIdPower: true |
| | | }, |
| | | multipleSelection: [], |
| | | userList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.trainingForm = this.currentRow |
| | | this.getInfo() |
| | | this.getUserList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // è·åå½åæ°æ® |
| | | async getInfo() { |
| | | this.trainingLoading = true |
| | | await this.$axios({ |
| | | method: 'get', |
| | | url: this.$api.personnel.trainingAndAssessmentRecordsPage, |
| | | params: { |
| | | trainingDetailedId: this.currentRow.id, |
| | | userName: this.userName |
| | | }, |
| | | headers: { |
| | | 'Content-Type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | noQs: true |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.trainingTableData = res.data |
| | | } |
| | | this.trainingLoading = false |
| | | }) |
| | | }, |
| | | async updatePersonResult(row) { |
| | | const { code } = await this.$axios({ |
| | | method: 'post', |
| | | url: this.$api.personnel.outOfFocusPreservation, |
| | | data: row, |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }) |
| | | if (code === 200) { |
| | | this.$message.success("æä½æåï¼") |
| | | } |
| | | }, |
| | | addPerson() { |
| | | this.isSelectedList = this.trainingTableData.map(item => item.userId) |
| | | this.selectUserDia = true; |
| | | }, |
| | | selectUser() { |
| | | let selects = this.$refs.ValueTable.multipleSelection; |
| | | if (selects.length == 0) { |
| | | this.$message.error('æªéæ©æ°æ®'); |
| | | return; |
| | | } |
| | | let list = [] |
| | | selects.forEach(a => { |
| | | const obj = { |
| | | courseId: this.currentRow.id, |
| | | examinationResults: "", |
| | | userId: a.id |
| | | } |
| | | list.push(obj) |
| | | // this.trainingTableData.push(obj); |
| | | }); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: this.$api.personnel.newPersonnelAddedToTrainingRecords, |
| | | data: list, |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }) |
| | | .then(res => { |
| | | this.isSelectedList = [] |
| | | this.selectUserDia = false; |
| | | this.getInfo() |
| | | }) |
| | | }, |
| | | // æ¹éå é¤ |
| | | handleSelectionChange(list) { |
| | | this.multipleSelection = list |
| | | }, |
| | | batchDelete() { |
| | | console.log('æ¹éå é¤', this.multipleSelection) |
| | | if (this.multipleSelection.length > 0) { |
| | | let ids = this.multipleSelection.map(item => item.trainingRecordId) |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤æéæ©çæ°æ®?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let formData = new FormData() |
| | | formData.append('ids', ids) |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: this.$api.personnel.deleteTrainingAndAssessmentRecords, |
| | | data: formData, |
| | | headers: { |
| | | 'Content-Type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | noQs: true |
| | | }) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getInfo() |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message.warning('åæ¶å é¤'); |
| | | }); |
| | | } else { |
| | | this.$message.warning('è¯·éæ©éè¦å é¤çæ°æ®') |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.getInfo(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.getInfo(); |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm() { |
| | | if (this.currentRow.state !== 4 && this.currentRow.state !== 1) { |
| | | this.$message.warning("å½åç¶ææ æ³æäº¤/æ¤éï¼") |
| | | return |
| | | } |
| | | // 妿çäº4 è¡¨ç¤ºè¯¥ç¶æä¸ºå·²ç»æï¼1 è¡¨ç¤ºå·²å®æ |
| | | let state = this.currentRow.state === 4 ? 1 : 4 |
| | | let data = { |
| | | assessmentMethod: this.trainingForm.assessmentMethod, |
| | | comprehensiveAssessment: this.trainingForm.comprehensiveAssessment, |
| | | trainingDetailedId: this.trainingForm.id, |
| | | assessmentUserId: this.trainingForm.assessmentUserId, |
| | | state: state |
| | | } |
| | | const {code} = await this.$axios({ |
| | | method: 'post', |
| | | url: this.$api.personnel.trainingAndAssessmentRecordsAdded, |
| | | data: data, |
| | | headers: { |
| | | 'Content-Type': 'application/json;' |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if(code === 200) { |
| | | this.currentRow.state = state |
| | | this.$message.success("æä½æå") |
| | | } |
| | | }, |
| | | getUserList(){ |
| | | this.$axios.post(this.$api.user.selectUserList, { |
| | | page: {current: -1, size: -1,}, |
| | | entity: {name: null, isCustom: 0} |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.userList = res.data.body.records |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .page-header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | h4 { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | h4 .line { |
| | | display: inline-block; |
| | | width: 3px; |
| | | height: 16px; |
| | | background: #3A7BFA; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .form_title { |
| | | font-size: 14px; |
| | | padding: 0 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .el-divider { |
| | | margin: 0 1em 1em 0; |
| | | } |
| | | |
| | | .form__input_label { |
| | | width: 90px; |
| | | margin-right: 6px; |
| | | color: #606266; |
| | | } |
| | | |
| | | .form__input_label2 { |
| | | width: 210px; |
| | | margin-right: 6px; |
| | | color: #606266; |
| | | } |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center |
| | | } |
| | | .search_label { |
| | | width: 120px; |
| | | } |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | |
| | | .items_center { |
| | | float: left; |
| | | width: 50%; |
| | | text-align: left; |
| | | } |
| | | .items_btn { |
| | | text-align: right; |
| | | width: 50%; |
| | | float: right; |
| | | margin-bottom: 1em; |
| | | } |
| | | |
| | | .search { |
| | | width: 180px; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 人åå¹è® --> |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div v-if="!editPlanShow && isDepartment"> |
| | | <TableCard title="年度计å表"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>å建人</span> |
| | | <el-input v-model="pagination.compilerName" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearPlanList(departId)">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="uploadDia = true">导å
¥</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="yearPlanColumn" |
| | | :currentChange="currentChange" |
| | | :height="'320'" |
| | | :table-data="yearPlanTableData" |
| | | :table-loading="yearLoading" |
| | | highlightCurrentRow |
| | | style="padding: 0 15px;"> |
| | | </ZTTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="pagination.pageSize" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="pagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearCurrent" |
| | | @size-change="handleYearSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div v-if="!editPlanShow" class="table"> |
| | | <TableCard title="年度计åæç»è¡¨"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>å¹è®è®²å¸</span> |
| | | <el-input v-model="inDetailForm.trainingLecturerName" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | <span>课ç¨ç¼å·</span> |
| | | <el-input v-model="inDetailForm.courseCode" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | <span style="margin-right: 16px">å¹è®æ¥æ</span> |
| | | <el-date-picker v-model="inDetailForm.trainingDate" clearable |
| | | format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | type="date" value-format="yyyy-MM-dd"></el-date-picker> |
| | | <el-button size="small" style="margin-left: 16px" type="primary" @click="searchTable">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" @click="batchDelete">æ¹éå é¤</el-button> |
| | | <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" type="primary" @click="addTrainingPlan">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="inDetailPlanColumn" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | :height="isDepartment ? '45vh' : '68vh' " |
| | | :isSelection="true" |
| | | :table-data="inDetailPlanTableData" |
| | | :table-loading="yearLoading" |
| | | style="padding: 0 15px;"> |
| | | </ZTTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="inDetailPagination.pageSize" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="inDetailPagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleCurrentChange" |
| | | @size-change="handleSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <Add ref="addPlan" :currentChangeRow="currentChangeRow" @search="getInDetailPlan(currentRowId, departId)"></Add> |
| | | <Edit |
| | | v-if="editPlanShow" |
| | | ref="editPlan" |
| | | :currentRow="currentRow" |
| | | @del="getInDetailPlan(currentRowId, departId)" |
| | | @goBack="goBack" |
| | | ></Edit> |
| | | <el-dialog :visible.sync="reviewDialog" title="å®¡æ ¸" width="30%" @close="reviewRemarks = ''"> |
| | | <span> |
| | | å®¡æ ¸å¤æ³¨ï¼ |
| | | <el-input v-model="reviewRemarks" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="reviewLoading" @click="handleReview(2)">ä¸éè¿</el-button> |
| | | <el-button :loading="reviewLoading" type="primary" @click="handleReview(1)">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="approvalDialog" title="æ¹å" width="30%" @close="approvalRemarks = ''"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="approvalRemarks" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="approvalLoading" @click="handleApproval(2)">䏿¹å</el-button> |
| | | <el-button :loading="reviewLoading" type="primary" @click="handleApproval(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="uploadDia" title="æ°æ®å¯¼å
¥" width="500px"> |
| | | <div style="margin: 0 auto;"> |
| | | <el-upload ref="upload" :action="javaApi + $api.personnel.personTrainingImport" :auto-upload="false" :before-upload="beforeUpload" :file-list="fileList" :headers="token" |
| | | :limit="1" :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag |
| | | name="file"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="uploadDia = false">å æ¶</el-button> |
| | | <el-button :loading="uploading" type="primary" @click="submitUpload()">ä¸ ä¼ </el-button> |
| | | </span> |
| | | </el-dialog > |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue'; |
| | | import TableCard from '../../caorui/TableCard/index.vue'; |
| | | import ZTTable from '../../caorui/ZTTable/index.vue'; |
| | | import Add from './AddInDetail.vue'; |
| | | import Edit from './Edit.vue'; |
| | | |
| | | export default { |
| | | name: 'PersonnelTraining', |
| | | components: { Add, ZTTable, TableCard, ValueTable, Edit }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | search: {}, |
| | | superviseForm: {}, |
| | | inDetailForm: { |
| | | trainingLecturerName: '', |
| | | courseCode: '', |
| | | trainingDate: '', |
| | | }, |
| | | yearLoading: false, |
| | | yearPlanTableData: [], // 年度计åè¡¨æ°æ® |
| | | yearPlanColumn: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | width: '160px', |
| | | prop: 'fileName' |
| | | }, { |
| | | label: 'å建æ¶é´', |
| | | width: '160px', |
| | | prop: 'createTime' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'createUserName' |
| | | }, { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'compilerName' |
| | | }, { |
| | | label: 'ç¼å¶æ¥æ', |
| | | width: '160px', |
| | | prop: 'compilationDate' |
| | | }, { |
| | | label: 'å®¡æ ¸äºº', |
| | | prop: 'reviewerName', |
| | | minWidth: '100px', |
| | | }, { |
| | | dataType: 'tag', |
| | | label: 'å®¡æ ¸ç¶æ', |
| | | prop: 'reviewerStatus', |
| | | width: '100px', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'éè¿'; |
| | | } else if (params == 2) { |
| | | return 'ä¸éè¿'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success'; |
| | | } else if (params == 2) { |
| | | return 'danger'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, { |
| | | label: 'å®¡æ ¸å¤æ³¨', |
| | | prop: 'auditRemarks', |
| | | minWidth: '100px', |
| | | }, { |
| | | label: 'å®¡æ ¸æ¥æ', |
| | | width: '160px', |
| | | prop: 'auditDate' |
| | | }, { |
| | | label: 'æ¹å人', |
| | | prop: 'approverName', |
| | | minWidth: '100px', |
| | | }, { |
| | | label: 'æ¹å夿³¨', |
| | | prop: 'approvalRemarks', |
| | | minWidth: '100px', |
| | | }, { |
| | | dataType: 'tag', |
| | | label: 'æ¹åç¶æ', |
| | | minWidth: '100px', |
| | | prop: 'approvalStatus', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'æ¹å'; |
| | | } else if (params == 2) { |
| | | return '䏿¹å'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success'; |
| | | } else if (params == 2) { |
| | | return 'danger'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, { |
| | | label: 'æ¹åæ¥æ', |
| | | width: '160px', |
| | | prop: 'approvalDate' |
| | | }, { |
| | | dataType: 'action', |
| | | width: '180px', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if(row.approvalStatus === 1 && row.reviewerStatus === 1) { |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å®¡æ ¸', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if(row.reviewerStatus === 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.handleCheck(row.id); |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if(row.approvalStatus === 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.handleApprove(row.id); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteFun(row.id); |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | inDetailPlanTableData: [], // 年度计åæç»è¡¨è¡¨æ°æ® |
| | | inDetailPlanColumn: [ |
| | | { |
| | | label: '课ç¨ç¼å·', |
| | | prop: 'courseCode', |
| | | width: '130px', |
| | | }, { |
| | | dataType: 'tag', |
| | | label: '认é¢ç¶æ', |
| | | width: '100px', |
| | | prop: 'whetherClaim', |
| | | formatData: (params) => { |
| | | if (params === true) { |
| | | return '已认é¢'; |
| | | } else { |
| | | return 'æªè®¤é¢'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === true) { |
| | | return 'success'; |
| | | } else { |
| | | return 'info' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'å¹è®ç®æ ', |
| | | prop: 'trainingObjectives', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®å
容', |
| | | prop: 'trainingContent', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®æ¹å¼', |
| | | prop: 'trainingMode', |
| | | width: '100px', |
| | | }, { |
| | | dataType: 'tag', |
| | | label: '课ç¨ç¶æ', |
| | | width: '100px', |
| | | prop: 'state', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return '已宿'; |
| | | } else if (params == 2) { |
| | | return 'è¿è¡ä¸'; |
| | | } else if (params == 3) { |
| | | return 'æªå¼å§'; |
| | | } else if (params == 4) { |
| | | return 'å·²ç»æ'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success'; |
| | | } else if (params == 2) { |
| | | return 'warning'; |
| | | } else if (params == 3) { |
| | | return 'primary'; |
| | | } else if (params == 4) { |
| | | return 'info'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, { |
| | | label: 'åå 对象', |
| | | prop: 'participants', |
| | | width: '100px', |
| | | }, { |
| | | label: '举åé¨é¨', |
| | | prop: 'holdingDepartment', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®å°ç¹', |
| | | prop: 'placeTraining', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®è®²å¸', |
| | | prop: 'trainingLecturerName', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®æ¥æ', |
| | | prop: 'trainingDate', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¼å§æ¶é´', |
| | | prop: 'openingTime', |
| | | width: '100px', |
| | | }, { |
| | | label: '课æ¶', |
| | | prop: 'classHour', |
| | | width: '100px', |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks', |
| | | width: '100px', |
| | | }, { |
| | | dataType: 'action', |
| | | width: '180', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | // è¶
è¿ä¼è®®å¼å§æ¶é´å°±ä¸è½è®¤é¢äº |
| | | { |
| | | name: '认é¢', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleClaim(row); |
| | | }, |
| | | disabled: (row) => { |
| | | if(row.whetherClaim === true || row.trainingDate < this.$moment().format('YYYY-MM-DD')) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ç»ææç»', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editInDetail(row); |
| | | }, |
| | | showHide: () => { |
| | | if (this.isDepartment) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadInDetail(row); |
| | | } |
| | | } |
| | | |
| | | ] |
| | | }], |
| | | pagination: { |
| | | pageSize: 20, |
| | | current: 1, |
| | | total: 0, |
| | | compilerName: "" |
| | | }, |
| | | inDetailPagination: { |
| | | pageSize: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | editPlanShow: false, |
| | | currentRow: {}, |
| | | currentRowId: null, // å½åé䏿°æ®çid |
| | | reviewRemarks: '', // å®¡æ ¸å¤æ³¨ |
| | | reviewDialog: false, // å®¡æ ¸å¼¹æ¡ |
| | | reviewLoading: false, // å®¡æ ¸æäº¤æé® |
| | | approvalRemarks: '', // å®¡æ ¸å¤æ³¨ |
| | | approvalDialog: false, // å®¡æ ¸å¼¹æ¡ |
| | | approvalLoading: false, // å®¡æ ¸æäº¤æé® |
| | | multipleSelection: [], // 年度æç»è¡¨éä¸çæ°æ® |
| | | uploadDia: false, |
| | | uploading: false, |
| | | isOperation: false, |
| | | token: null, |
| | | fileList: [], |
| | | currentChangeRow: {}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.token = { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | if (this.isDepartment) { |
| | | this.getYearPlanList(this.departId) |
| | | } else { |
| | | this.getInDetailPlan('', this.departId) |
| | | } |
| | | }, |
| | | methods: { |
| | | searchTable () { |
| | | this.getInDetailPlan(this.currentRowId) |
| | | }, |
| | | // æ¥è¯¢-年度计å表 |
| | | getYearPlanList(userId) { |
| | | const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.$axios.get(this.$api.personnel.personTrainingSelect + `?${name}=` + userId + '&size=' + this.pagination.pageSize + '¤t=' + this.pagination.current + '&compilerName=' + this.pagination.compilerName).then(res => { |
| | | if (res.code === 201) return |
| | | this.yearPlanTableData = res.data.records; |
| | | this.pagination.total = res.data.total; |
| | | if (this.yearPlanTableData.length > 0) { |
| | | this.currentRowId = this.yearPlanTableData[0].id |
| | | this.currentChange(this.yearPlanTableData[0]) |
| | | } |
| | | }); |
| | | }, |
| | | currentChange (row) { |
| | | const now = new Date(); |
| | | const currentYear = now.getFullYear(); |
| | | this.currentChangeRow = row |
| | | this.currentRowId = row.id |
| | | if (row.createTime.slice(0,4) == currentYear) { |
| | | this.isOperation = true; |
| | | } else { |
| | | this.isOperation = false; |
| | | } |
| | | this.getInDetailPlan(row.id) |
| | | }, |
| | | getInDetailPlan (id) { |
| | | if (this.inDetailForm.trainingDate === null) { |
| | | this.inDetailForm.trainingDate = '' |
| | | } |
| | | const userId = this.isDepartment ? '' : this.departId |
| | | this.$axios.get(this.$api.personnel.queryTheAnnualPlanDetailsTable + '?userId=' + userId + '&size=' + this.inDetailPagination.pageSize + |
| | | '¤t=' + this.inDetailPagination.current + '&id=' + id + |
| | | '&trainingLecturerName=' + this.inDetailForm.trainingLecturerName+ |
| | | '&trainingDate=' + this.inDetailForm.trainingDate+ |
| | | '&courseCode=' + this.inDetailForm.courseCode).then(res => { |
| | | if (res.code === 201) return |
| | | this.inDetailPlanTableData = res.data.records; |
| | | this.inDetailPagination.total = res.data.total; |
| | | }); |
| | | }, |
| | | // æ°å¢å¹´åº¦è®¡åæç»è¡¨ |
| | | addTrainingPlan() { |
| | | if (!this.currentRowId) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®¡åè¿è¡æ°å¢') |
| | | return |
| | | } |
| | | this.$refs.addPlan.showDialog(this.currentRowId); |
| | | }, |
| | | // 年度计å表-å é¤ |
| | | deleteFun(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.personnel.personTrainingDelete + '?id=' + id).then(res => { |
| | | this.$message.success('å 餿åï¼'); |
| | | this.getYearPlanList(this.departId); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // 年度计å表-å®¡æ ¸ |
| | | handleCheck(id) { |
| | | this.currentRowId = id |
| | | this.reviewDialog = true |
| | | }, |
| | | handleReview (status) { |
| | | const personTrainingUpdateDto = { |
| | | id: this.currentRowId, |
| | | remarks: this.reviewRemarks, |
| | | status: status |
| | | } |
| | | this.reviewLoading = true |
| | | this.$axios.post(this.$api.personnel.reviewAnnualPersonnelTraining, personTrainingUpdateDto, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.reviewDialog = false |
| | | this.getYearPlanList(this.departId); |
| | | } |
| | | this.reviewLoading = false |
| | | }).catch(() => { |
| | | this.reviewLoading = false |
| | | }) |
| | | }, |
| | | // 年度计å表-æ¹å |
| | | handleApprove(id) { |
| | | this.currentRowId = id |
| | | this.approvalDialog = true |
| | | }, |
| | | handleApproval (status) { |
| | | const personTrainingUpdateDto = { |
| | | id: this.currentRowId, |
| | | remarks: this.approvalRemarks, |
| | | status: status |
| | | } |
| | | this.approvalLoading = true |
| | | this.$axios.post(this.$api.personnel.approveAnnualPersonnelTraining, personTrainingUpdateDto, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.getYearPlanList(this.departId); |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | // 年度计å表-ä¸è½½ |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.personnel.exportPersonTraining + '?id=' + row.id,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // 年度计å-导å
¥ |
| | | submitUpload() { |
| | | if (this.$refs.upload.uploadFiles.length == 0) { |
| | | this.$message.error('æªéæ©æä»¶') |
| | | return |
| | | } |
| | | this.uploading = true |
| | | this.$refs.upload.submit(); |
| | | this.uploading = false |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | this.$refs.upload.clearFiles() |
| | | this.uploadDia = false |
| | | this.uploading = false |
| | | if (response.code == 201) { |
| | | this.$message.error(response.message) |
| | | return |
| | | } |
| | | this.$message.success('ä¸ä¼ æå') |
| | | this.standardList = [] |
| | | this.productList = [] |
| | | this.getYearPlanList(this.departId) |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | this.uploading = false |
| | | }, |
| | | beforeUpload(file, fileList) { |
| | | if (file.type != 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') { |
| | | this.$message.error('ä¸ä¼ æä»¶æ ¼å¼ä¸æ£ç¡®'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } |
| | | }, |
| | | // 年度计åå页 |
| | | handleYearCurrent(page) { |
| | | this.pagination.current = page; |
| | | this.getYearPlanList(this.departId); |
| | | }, |
| | | handleYearSizeChange(size) { |
| | | this.pagination.pageSize = size; |
| | | this.getYearPlanList(this.departId); |
| | | }, |
| | | // 年度计åæç»è¡¨-认é¢ãåæ¶è®¤é¢ |
| | | handleClaim(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤è®¤é¢è¯¥è¯¾ç¨?', 'æç¤º', { |
| | | confirmButtonText: '认é¢', |
| | | cancelButtonText: 'åæ¶è®¤é¢', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.handleClaimFun(true, row.id) |
| | | }).catch(() => { |
| | | this.handleClaimFun(false, row.id) |
| | | }); |
| | | }, |
| | | handleClaimFun(claimAndClaim, rowId) { |
| | | this.$axios.post(this.$api.personnel.claimOfTrainingAndAssessmentRecords + `?claimAndClaim=${claimAndClaim}&courseId=${rowId}`).then(res => { |
| | | this.getInDetailPlan(this.currentChangeRow.id) |
| | | }); |
| | | }, |
| | | // 年度计åæç»è¡¨-ç¼è¾ |
| | | editInDetail(row) { |
| | | this.editPlanShow = true; |
| | | this.currentRow = row |
| | | }, |
| | | // |
| | | goBack() { |
| | | this.editPlanShow = false; |
| | | this.getInDetailPlan(this.currentRowId) |
| | | }, |
| | | // 年度计åæç»è¡¨-ä¸è½½ |
| | | downLoadInDetail(row) { |
| | | this.$axios.get(this.$api.personnel.exportPersonTrainingRecord + '?id=' + row.id,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.courseCode + '人åå¹è®ä¸èæ ¸è®°å½' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // 年度计åæç»è¡¨-å¤é |
| | | handleSelectionChange(list) { |
| | | this.multipleSelection = list |
| | | }, |
| | | // 年度æç»è¡¨-å é¤ |
| | | batchDelete () { |
| | | if (this.multipleSelection.length > 0) { |
| | | let ids = [] |
| | | this.multipleSelection.forEach(item => { |
| | | ids.push(item.id) |
| | | }) |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤æéæ©çæ°æ®?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.personnel.deleteAnnualPlanDetailTable+ '?ids=' +ids.join(',')).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getInDetailPlan(this.currentRowId); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message.warning('åæ¶å é¤'); |
| | | }); |
| | | } else { |
| | | this.$message.warning('è¯·éæ©éè¦å é¤çæ°æ®') |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.inDetailPagination.size = val; |
| | | this.getYearPlanList(this.departId); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.inDetailPagination.current = val; |
| | | this.getYearPlanList(this.departId); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (this.isDepartment) { |
| | | this.getYearPlanList(newId); |
| | | } else { |
| | | this.getInDetailPlan('') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | height: 80vh; |
| | | flex-direction: column; |
| | | overflow: auto; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | margin: 0 16px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- å²ä½èè´£ --> |
| | | <template> |
| | | <div class="view"> |
| | | <div style="text-align: left; margin-bottom: 15px;padding: 0 10px"> |
| | | <label>åå·¥ï¼</label> |
| | | <el-input v-model="userName" clearable placeholder="请è¾å
¥åå·¥" size="small" style="width: 20vh;"></el-input> |
| | | <el-button size="small" type="primary" @click="refreshTable">æ¥è¯¢</el-button> |
| | | <div v-if="isDepartment" style="float: right;"> |
| | | <el-button size="small" type="primary" @click="addPost">æ°å¢</el-button> |
| | | <!-- <el-button size="small" type="primary">导åºexcel</el-button>--> |
| | | </div> |
| | | </div> |
| | | <div class="table" style="padding: 0 10px"> |
| | | <el-table :data="tableData" height="70vh" style="width: 100%"> |
| | | <el-table-column label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="åå·¥ç¼å·" min-width="120" prop="account"></el-table-column> |
| | | <el-table-column label="å²ä½åç§°" min-width="180" prop="postName"></el-table-column> |
| | | <el-table-column label="æå±é¨é¨" min-width="180" prop="departLimsName"></el-table-column> |
| | | <el-table-column label="å·¥ä½ç®æ " min-width="180" prop="jobObjective"></el-table-column> |
| | | <el-table-column label="å²ä½èè´£" min-width="180" prop="jobResponsibilities"></el-table-column> |
| | | <el-table-column label="ä»»è人" min-width="180" prop="incumbentName"></el-table-column> |
| | | <el-table-column label="ä»»èäººå®¡æ ¸æ¥æ" min-width="180" prop="incumbentDate"></el-table-column> |
| | | <el-table-column label="主管" min-width="180" prop="supervisorName"></el-table-column> |
| | | <el-table-column label="ä¸»ç®¡å®¡æ ¸æ¥æ" min-width="180" prop="supervisorDate"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="140"> |
| | | <template v-slot="scope"> |
| | | <el-button v-if="!isDepartment || scope.row.currentState === 'å
³é'" size="small" type="text" |
| | | @click="handleViewClick(scope.row, 'view')">æ¥ç |
| | | </el-button> |
| | | <el-button v-if="isDepartment && scope.row.currentState !== 'å
³é'" size="small" type="text" |
| | | @click="handleViewClick(scope.row, 'edit')">ç¼è¾ |
| | | </el-button> |
| | | <el-button size="small" type="text" @click="downLoadPost(scope.row)">ä¸è½½</el-button> |
| | | <el-button v-if="isDepartment" size="small" type="text" @click="deletePost(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <!-- æ°å¢å²ä½èè´£ --> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" |
| | | title="æ°å¢å²ä½èè´£" |
| | | width="50%" @close="resetForm"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step v-for="(v, i) in steps" :key="i" :title="v" style="cursor:pointer" |
| | | @click.native="choiceStep(i)"></el-step> |
| | | </el-steps> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="130px"> |
| | | <div> |
| | | <el-card style="margin-top: 1em; height: 40vh; overflow-y: scroll;"> |
| | | <!-- æ°å¢è®¾å¤äºè®°å½å¡ç --> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å²ä½åç§°ï¼" prop="postName"> |
| | | <el-input v-model="form.postName" :disabled="currentStep !== 0 || operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å·¥ä½ç®æ ï¼" prop="jobObjective"> |
| | | <el-input v-model="form.jobObjective" :disabled="currentStep !== 0 || operationType === 'view'" |
| | | size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å²ä½èè´£ï¼" prop="jobResponsibilities"> |
| | | <el-input v-model="form.jobResponsibilities" :disabled="currentStep !== 0 || operationType === 'view'" |
| | | size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="currentStep === 0 || operationType === 'view'" :span="12"> |
| | | <el-form-item |
| | | :rules="[{ required: currentStep === 0, message: 'è¯·éæ©ä»»è人', trigger: 'change' }]" |
| | | label="ä»»è人ï¼" |
| | | prop="incumbentId"> |
| | | <el-select v-model="form.incumbentId" :disabled="operationType === 'view'" clearable |
| | | filterable |
| | | placeholder="è¯·éæ©ä»»è人" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="currentStep === 1 || operationType === 'view'" :span="12"> |
| | | <el-form-item |
| | | :rules="[{ required: currentStep === 1, message: 'è¯·éæ©ä¸»ç®¡', trigger: 'blur' }]" |
| | | label="主管ï¼" |
| | | prop="supervisorId"> |
| | | <el-select v-model="form.supervisorId" :disabled="currentStep !== 1 || operationType === 'view'" |
| | | clearable filterable |
| | | placeholder="è¯·éæ©ä¸»ç®¡" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.submitPerson }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.submitDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="currentStep !== 0 && currentStep !== 3" @click="submitForm('3reject')">驳å</el-button> |
| | | <el-button v-if="currentStep === 0" @click="submitForm('2save')">ä¿å</el-button> |
| | | <el-button v-if="currentStep !== 3" type="primary" |
| | | @click="submitForm('1submit')">{{ currentStep === 0 ? 'æäº¤' : 'éè¿' }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { dateFormat } from '../../../util/date'; |
| | | import { deletePersonCommunicationAbility } from '../../../assets/api/api'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | userName: '', |
| | | tableData: [], |
| | | responsibleOptions: [], |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | dialogVisible: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | currentStepClick: 0, // ç¹å»æ¥éª¤æ¡åå |
| | | operationType: '', |
| | | steps: ['æäº¤', 'ä»»è人确认', '主管确认'], |
| | | form: { |
| | | postName: '', // å²ä½åç§° |
| | | jobObjective: '', // å·¥ä½ç®æ |
| | | jobResponsibilities: '', // å²ä½èè´£ |
| | | incumbentId: '', // ä»»è人 |
| | | supervisorId: '' // 主管 |
| | | }, |
| | | rules: { |
| | | postName: [{ required: true, message: '请è¾å
¥å²ä½åç§°', trigger: 'blur' }], |
| | | jobObjective: [{ required: true, message: '请è¾å
¥å·¥ä½ç®æ ', trigger: 'blur' }], |
| | | jobResponsibilities: [{ required: true, message: '请è¾å
¥å²ä½èè´£', trigger: 'blur' }], |
| | | incumbentId: [{ required: true, message: 'è¯·éæ©ä»»è人', trigger: 'change' }], |
| | | supervisorId: [{ required: true, message: 'è¯·éæ©ä¸»ç®¡', trigger: 'change' }] |
| | | } |
| | | // departId: 0 |
| | | }; |
| | | }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getPostList(this.departId); |
| | | }, |
| | | methods: { |
| | | addPost() { |
| | | this.dialogVisible = true; |
| | | this.form = { |
| | | postName: '', // å²ä½åç§° |
| | | jobObjective: '', // å·¥ä½ç®æ |
| | | jobResponsibilities: '', // å²ä½èè´£ |
| | | incumbentId: '', // ä»»è人 |
| | | supervisorId: '', // æä½äºº |
| | | submitPerson: '', // 主管 |
| | | submitDate: '', // æ¥æ |
| | | currentStep: 0 // æ¥æ |
| | | }; |
| | | this.currentStep = 0; |
| | | this.getUserList(); |
| | | }, |
| | | // æ¥è¯¢åè¡¨ä¿¡æ¯ |
| | | getPostList(userId) { |
| | | this.search.userId = userId; |
| | | const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.$axios.get(this.$api.personnel.personJobResponsibilitiesSelect + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '¤t=' + this.search.current).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }); |
| | | }, |
| | | //æäº¤è¡¨å |
| | | async submitForm(saveState) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // ç»å½åç¯è设置åå»ºäººä¸æ¶é´ |
| | | let user = JSON.parse(localStorage.getItem('user')); |
| | | const dateTime = dateFormat(new Date()); |
| | | // è·åå½åç¯èæä½äººä¸æ¥æ |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.submittingOperator = user.name; |
| | | this.form.submittingDate = dateTime; |
| | | break; |
| | | case 1: |
| | | this.form.incumbentOperator = user.name; |
| | | this.form.incumbentDate = dateTime; |
| | | break; |
| | | case 2: |
| | | this.form.supervisorOperator = user.name; |
| | | this.form.supervisorDate = dateTime; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | // è·åå½åç¯èè´è´£äºº |
| | | switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) { |
| | | case 1: |
| | | this.form.currentResponsible = this.form.submittingOperator; |
| | | break; |
| | | case 2: |
| | | this.form.currentResponsible = this.form.incumbentOperator; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | let currentStepAction; |
| | | // 设置该æä½å¤ææ¯å¦ä¸ºæäº¤ï¼ä¿åï¼é©³åï¼éè¿ |
| | | switch (saveState) { |
| | | // æäº¤ï¼éè¿ |
| | | case '1submit': |
| | | currentStepAction = this.currentStep + 1; |
| | | break; |
| | | // ä¿å |
| | | case '2save': |
| | | currentStepAction = this.currentStep; |
| | | break; |
| | | // 驳å |
| | | case '3reject': |
| | | currentStepAction = this.currentStep - 1; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | // è·åå½åç¶æ |
| | | this.form.currentState = currentStepAction === 3 ? 'å
³é' : this.steps[currentStepAction]; |
| | | this.$axios.post(this.$api.personnel.personJobResponsibilitiesSave, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå'); |
| | | this.getPostList(this.departId); |
| | | this.dialogVisible = false; |
| | | } |
| | | }); |
| | | } else { |
| | | let step = this.steps[this.currentStep]; |
| | | this.$message.warning(step + ' æµç¨ä¸æå¿
填项æªå¡«ï¼'); |
| | | } |
| | | }); |
| | | }, |
| | | // ç¼è¾ |
| | | handleViewClick(row, type) { |
| | | this.operationType = type; |
| | | this.getUserList(); |
| | | row.incumbentId = Number(row.incumbentId); |
| | | this.form = { ...row }; |
| | | switch (row.currentState) { |
| | | case 'æäº¤': |
| | | this.currentStep = 0; |
| | | break; |
| | | case 'ä»»è人确认': |
| | | this.currentStep = 1; |
| | | this.form.submitPerson = row.submittingOperator; |
| | | this.form.submitDate = row.submittingDate; |
| | | break; |
| | | case '主管确认': |
| | | this.currentStep = 2; |
| | | this.form.submitPerson = row.incumbentOperator; |
| | | this.form.submitDate = row.incumbentDate; |
| | | break; |
| | | case 'å
³é': |
| | | this.currentStep = 3; |
| | | this.form.submitPerson = row.supervisorOperator; |
| | | this.form.submitDate = row.supervisorDate; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | this.form.currentState = this.currentStep; |
| | | this.currentStepClick = this.currentStep === 3 ? 0 : this.currentStep |
| | | console.log('this.form---', this.form); |
| | | this.dialogVisible = true; |
| | | }, |
| | | // ä¸è½½å²ä½èè´£ |
| | | downLoadPost(row) { |
| | | this.$axios.post(this.$api.personPostAuthorizationRecord.exportPersonJobResponsibilities,{id:row.id},{responseType: "blob"}).then(res => { |
| | | this.$message.success('ä¸è½½æå') |
| | | const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.incumbentName+'-å²ä½èè´£'+'.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // å é¤å²ä½èè´£ |
| | | deletePost(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å 餿¤æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.personnel.personJobResponsibilitiesDelete + '?id=' + row.id).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getPostList(this.departId); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message.error('å é¤å¤±è´¥'); |
| | | }); |
| | | }, |
| | | resetForm() { |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | refreshTable() { |
| | | this.getPostList(this.departId); |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data; |
| | | } |
| | | }); |
| | | }, |
| | | choiceStep(index) { |
| | | this.currentStepClick = index; |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.getPostList(this.departId); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.getPostList(this.departId); |
| | | } |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | this.getPostList(newId); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 人åè½å --> |
| | | <template> |
| | | <div> |
| | | <div style="text-align: left; margin-bottom: 15px;padding: 0 16px"> |
| | | <label>å§å</label> |
| | | <el-input v-model="userName" placeholder="请è¾å
¥å§å" size="small" style="width: 20vh;"></el-input> |
| | | <el-button size="small" type="primary" @click="refreshTable">æ¥è¯¢</el-button> |
| | | <div v-if="isDepartment" style="float: right;"> |
| | | <el-button size="small" type="primary" @click="addAppointPost('add')">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="yearColumnData" |
| | | :height="'calc(100vh - 20em)'" |
| | | :table-data="tableData" |
| | | :table-loading="yearLoading" |
| | | style="padding: 0 15px;margin-bottom: 16px" |
| | | > |
| | | <div slot="jobResponsibilities" slot-scope="scope"> |
| | | <div v-html="changeLine(scope.row.responsibilities)"></div> |
| | | </div> |
| | | <div slot="placeWorkSlot" slot-scope="scope"> |
| | | <div v-html="changeLine(scope.row.placeWork)"></div> |
| | | </div> |
| | | </ZTTable> |
| | | </template> |
| | | </TableCard> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <!--æ°å¢è½å认å®å¼¹æ¡--> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" |
| | | :visible.sync="dialogVisible" |
| | | width="80%" @close="resetForm"> |
| | | <el-form v-if="dialogVisible" ref="infoForm" :model="form" :rules="rules"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="人åï¼" label-width="110px" prop="userId"> |
| | | <el-select v-model="form.userId" :disabled="operationType === 'view'" clearable |
| | | filterable placeholder="è¯·éæ©" |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èç§°ï¼" label-width="110px" prop="technicalPost"> |
| | | <el-input v-model="form.technicalPost" :disabled="operationType === 'view'" clearable size="small" style="width: 100%;"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div style="display: flex;justify-content: space-evenly;font-weight: 600"> |
| | | <span>æ¥æ ¸ç»æ</span> |
| | | <span>符åä¸å¦</span> |
| | | <span>夿³¨</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¦åï¼" label-width="110px" prop="academicDegree"> |
| | | <el-input v-model="form.academicDegree" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="academicConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view'"> |
| | | <el-radio :label="1">符å</el-radio> |
| | | <el-radio :label="2">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="3">ä¸éç¨</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="academicRemarks"> |
| | | <el-input v-model="form.academicRemarks" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¸å
³å¹´éï¼" label-width="110px" prop="relatedYears"> |
| | | <el-input v-model="form.relatedYears" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="relatedYearsConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view'"> |
| | | <el-radio :label="1">符å</el-radio> |
| | | <el-radio :label="2">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="3">ä¸éç¨</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="relatedYearsRemarks "> |
| | | <el-input v-model="form.relatedYearsRemarks " :disabled="operationType === 'view'" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¸å
³å¹è®ï¼" label-width="110px" prop="relatedTraining"> |
| | | <el-input v-model="form.relatedTraining" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="relatedTrainingConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view'"> |
| | | <el-radio :label="1">符å</el-radio> |
| | | <el-radio :label="2">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="3">ä¸éç¨</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="relatedTrainingRemarks"> |
| | | <el-input v-model="form.relatedTrainingRemarks" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¸å
³ç»éªï¼" label-width="110px" prop="relevantExperience"> |
| | | <el-input v-model="form.relevantExperience" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="relevantExperienceConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view'"> |
| | | <el-radio :label="1">符å</el-radio> |
| | | <el-radio :label="2">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="3">ä¸éç¨</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="relevantExperienceRemarks"> |
| | | <el-input v-model="form.relevantExperienceRemarks" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸å²è¯ï¼" label-width="110px" prop="workLicense"> |
| | | <el-input v-model="form.workLicense" :disabled="operationType === 'view'" size="small" |
| | | style="width: 100%"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="workLicenseConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view'"> |
| | | <el-radio :label="1">符å</el-radio> |
| | | <el-radio :label="2">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="3">ä¸éç¨</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="workLicenseRemarks"> |
| | | <el-input v-model="form.workLicenseRemarks" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å²ä½èè´£ï¼" label-width="110px" prop="jobResponsibilitiesTem" style="height: 450px"> |
| | | <el-checkbox-group v-model="form.jobResponsibilitiesTem" :disabled="operationType === 'view'" |
| | | @change="selectResponsibilities"> |
| | | <el-checkbox v-for="city in responsibilities" :key="city.value" :label="city.label" |
| | | :value="city.value"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="jobResponsibilitiesConformNot" |
| | | style="text-align: center;height: 420px"> |
| | | <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view'"> |
| | | <el-radio :label="1">符å</el-radio> |
| | | <el-radio :label="2">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="3">ä¸éç¨</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="jobResponsibilitiesRemarks" style="height: 420px"> |
| | | <el-input v-model="form.jobResponsibilitiesRemarks" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <span style="padding-left: 110px;font-size: 14px">夿³¨ï¼å²ä½è责达å°5项å5项以ä¸ä¸ºç¬¦å</span> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-form-item label="综åè¯ä»·ï¼" label-width="110px" prop="comprehensiveAssessment"> |
| | | <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view'"> |
| | | <el-radio label="Qualified this position">å¯è任该å²ä½</el-radio> |
| | | <el-radio label="You can work while training">å¯è¾¹å¹è®è¾¹ä¸å²</el-radio> |
| | | <el-radio label="Iconpetent for the position">ä¸è任该å²ä½</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType !== 'view'" @click="resetForm">åæ¶</el-button> |
| | | <el-button v-if="operationType !== 'view'" type="primary" @click="submitForm">ä¿å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ZTTable from '../../caorui/ZTTable/index.vue'; |
| | | import TableCard from '../../caorui/TableCard/index.vue'; |
| | | import {exportSuperVisePlanApi} from "../../../assets/api/api"; |
| | | |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | components: { |
| | | ZTTable, |
| | | TableCard |
| | | }, |
| | | data() { |
| | | return { |
| | | userName: '', |
| | | tableData: [], |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | title: 'æ°å¢è½å认å®', |
| | | operationType: '', |
| | | yearColumnData: [ |
| | | { |
| | | label: 'å²ä½', |
| | | prop: 'postName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å§å', |
| | | prop: 'userName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å¦å', |
| | | prop: 'academicDegree', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ä¸ä¸', |
| | | prop: 'major', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'èç§°', |
| | | prop: 'technicalPost', |
| | | minWidth: '100' |
| | | }, { |
| | | dataType: 'slot', |
| | | label: 'å·¥ä½ç»å', |
| | | prop: 'placeWork', |
| | | minWidth: '100', |
| | | slot: 'placeWorkSlot' |
| | | }, { |
| | | dataType: 'slot', |
| | | label: 'å²ä½èè´£', |
| | | prop: 'jobResponsibilities', |
| | | minWidth: '200px', |
| | | slot: 'jobResponsibilities' |
| | | }, { |
| | | dataType: 'tag', |
| | | label: '综åè¯ä»·', |
| | | minWidth: '140px', |
| | | prop: 'comprehensiveAssessment', |
| | | formatData: (params) => { |
| | | if (params == 'Qualified this position') { |
| | | return 'å¯è任该å²ä½'; |
| | | } else if (params == 'You can work while training') { |
| | | return 'å¯è¾¹å¹è®è¾¹ä¸å²'; |
| | | } else { |
| | | return 'ä¸è任该å²ä½'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 'Qualified this position') { |
| | | return 'success'; |
| | | } else if (params == 'You can work while training') { |
| | | return 'warning'; |
| | | } else { |
| | | return 'danger'; |
| | | } |
| | | } |
| | | }, { |
| | | label: '确认人', |
| | | prop: 'confirmOperatingPersonnelId', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¡®è®¤æ¥æ', |
| | | prop: 'confirmDate', |
| | | minWidth: '160' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleViewClick('edit', row); |
| | | }, |
| | | showHide: (row) => { |
| | | if (this.isDepartment) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleViewClick('view', row); |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row); |
| | | } |
| | | }, |
| | | { |
| | | name: '确认', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.verifyGet(row.id); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deletePost(row.id); |
| | | }, |
| | | showHide: (row) => { |
| | | if (this.isDepartment) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearLoading: false, |
| | | dialogVisible: false, |
| | | form: { |
| | | jobResponsibilitiesTem: [] |
| | | }, |
| | | responsibleOptions: [], |
| | | rules: { |
| | | userId: [{ required: true, message: 'è¯·éæ©äººå', trigger: 'change' }], |
| | | academicDegree: [{ required: true, message: '请è¾å
¥å¦åæ¥æ ¸ç»æ', trigger: 'blur' }], |
| | | academicConformNot: [{ required: true, message: 'è¯·éæ©å¦å符åä¸å¦', trigger: 'change' }], |
| | | relatedYears: [{ required: true, message: '请è¾å
¥ç¸å
³å¹´éæ¥æ ¸ç»æ', trigger: 'blur' }], |
| | | relatedYearsConformNot: [{ required: true, message: 'è¯·éæ©ç¸å
³å¹´é符åä¸å¦', trigger: 'change' }], |
| | | relatedTraining: [{ required: true, message: '请è¾å
¥ç¸å¹è®éæ¥æ ¸ç»æ', trigger: 'blur' }], |
| | | relatedTrainingConformNot: [{ required: true, message: 'è¯·éæ©ç¸å
³å¹è®ç¬¦åä¸å¦', trigger: 'change' }], |
| | | relevantExperience: [{ required: true, message: '请è¾å
¥ç¸å
³ç»éªæ¥æ ¸ç»æ', trigger: 'blur' }], |
| | | relevantExperienceConformNot: [{ required: true, message: 'è¯·éæ©ç¸å
³ç»éªç¬¦åä¸å¦', trigger: 'change' }], |
| | | workLicense: [{ required: true, message: '请è¾å
¥ä¸å²è¯æ¥æ ¸ç»æ', trigger: 'blur' }], |
| | | workLicenseConformNot: [{ required: true, message: 'è¯·éæ©ä¸å²è¯ç¬¦åä¸å¦', trigger: 'change' }], |
| | | jobResponsibilitiesTem: [{ required: true, message: 'è¯·éæ©å²ä½èè´£æ¥æ ¸ç»æ', trigger: 'change' }], |
| | | jobResponsibilitiesConformNot: [{ required: true, message: 'è¯·éæ©å²ä½è责符åä¸å¦', trigger: 'change' }], |
| | | comprehensiveAssessment: [{ required: true, message: 'è¯·éæ©ç»¼åè¯ä»·', trigger: 'change' }] |
| | | }, |
| | | responsibilities: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getList(this.departId); |
| | | }, |
| | | methods: { |
| | | // ä¸è½½ |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.personnel.exportPersonnelCapacity + '?id=' + row.id,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = "人åè½å导åº" + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // æ¥è¯¢ |
| | | refreshTable() { |
| | | this.getList(this.departId); |
| | | }, |
| | | // è·å人åè½ååè¡¨ä¿¡æ¯ |
| | | getList(userId) { |
| | | this.search.userId = userId; |
| | | const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.yearLoading = true |
| | | this.$axios.get(this.$api.personnel.personPersonnelCapacityPage + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '¤t=' + this.search.current).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }).catch(err => { |
| | | console.log(err); |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | selectResponsibilities(arr) { |
| | | let arrTem = []; |
| | | arr.map(val => { |
| | | const index = this.responsibilities.findIndex(item => item.label === val); |
| | | if (index > -1) { |
| | | arrTem.push(this.responsibilities[index].value); |
| | | } |
| | | }); |
| | | this.form.jobResponsibilities = arrTem.join(','); |
| | | }, |
| | | getResponsibilities() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: 'å²ä½èè´£' |
| | | }).then(res => { |
| | | this.responsibilities = res.data; |
| | | }); |
| | | }, |
| | | changeLine (val) { |
| | | if(val) { |
| | | return val.replace(/,/g, '<br>') |
| | | } else { |
| | | return |
| | | } |
| | | }, |
| | | // æ°å¢ |
| | | addAppointPost(type) { |
| | | this.operationType = type; |
| | | this.title = 'æ°å¢è½å认å®' |
| | | this.dialogVisible = true; |
| | | this.form = { |
| | | jobResponsibilitiesTem: [] |
| | | } |
| | | this.getUserList(); |
| | | this.getResponsibilities(); |
| | | |
| | | }, |
| | | // ç¼è¾/æ¥ç |
| | | handleViewClick(type, row) { |
| | | this.operationType = type; |
| | | this.title = this.operationType === 'edit' ? 'ä¿®æ¹è½å认å®' : 'æ¥çè½å认å®' |
| | | this.dialogVisible = true; |
| | | this.form = {...row} |
| | | if(this.form.responsibilities) { |
| | | this.$set(this.form, 'jobResponsibilitiesTem', this.form.responsibilities.split(",")) |
| | | } else { |
| | | this.$set(this.form, 'jobResponsibilitiesTem', []) |
| | | } |
| | | this.getUserList(); |
| | | this.getResponsibilities(); |
| | | }, |
| | | submitForm() { |
| | | this.$refs.infoForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.personnel.addOrUpdatePersonPersonnelCapacity, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå'); |
| | | this.getList(this.departId); |
| | | this.dialogVisible = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | verifyGet (id) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤æ¬æ¡ä¿¡æ¯?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.personnel.confirmPersonnelCapability + '?id=' + id).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('确认æå'); |
| | | this.getList(this.departId); |
| | | } |
| | | }); |
| | | }).catch((err) => { |
| | | console.log('err---', err); |
| | | this.$message.info('已忶') |
| | | }); |
| | | }, |
| | | // å é¤å²ä½èè´£ |
| | | deletePost(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å 餿¤æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.personnel.deletePersonPersonnelCapacity + '?id=' + id).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getList(this.departId); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message.error('å é¤å¤±è´¥'); |
| | | }); |
| | | }, |
| | | resetForm() { |
| | | this.$refs.infoForm.resetFields(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data; |
| | | } |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.getList(this.departId); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.getList(this.departId); |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | this.getList(newId); |
| | | } |
| | | }, |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | isDepartment: { |
| | | handler(newId, oldId) { |
| | | this.getList(this.departId); |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | >>> .el-dialog__body { |
| | | max-height: 70vh; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .radio-group >>> .el-form-item__error { |
| | | padding-left: 38px; |
| | | } |
| | | >>>.el-checkbox__label { |
| | | width: 212px; |
| | | white-space: pre-wrap; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div style="text-align: right;margin-bottom: 10px"> |
| | | <!-- <el-button size="small" @click="$emit('goBackList')">è¿å</el-button>--> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">人ååç±»</el-button> |
| | | <el-button :loading="saveLoading" size="small" type="primary" @click="save">ä¿å</el-button> |
| | | </div> |
| | | <div> |
| | | <div style="display: flex;flex-direction: row;"> |
| | | <div style="width: 12em"> |
| | | <el-image :src="javaApi + '/img/' + form.pictureUrl" fit="fill" |
| | | style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline" style="font-size: 40px;"></i> |
| | | </div> |
| | | </el-image> |
| | | <el-image :src="javaApi + '/img/' + form.signatureUrl" fit="fill" |
| | | style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline" style="font-size: 40px;"></i> |
| | | </div> |
| | | </el-image> |
| | | </div> |
| | | <div style="height: calc(100vh - 14em);overflow-y: auto"> |
| | | <el-form ref="form" :model="form" label-width="110px"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å§å"> |
| | | <el-input v-model="form.name" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç»å½è´¦å·"> |
| | | <el-input v-model="form.account" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å½åç¶æ"> |
| | | <el-radio-group v-model="form.currentState"> |
| | | <el-radio label="1formal" size="mini">æ£å¼</el-radio> |
| | | <el-radio label="2intern" size="mini">å®ä¹ </el-radio> |
| | | <el-radio label="3leaveOffice" size="mini">离è</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å·¥å·"> |
| | | <el-input v-model="form.jobNumber" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åå·¥åç¼å·"> |
| | | <el-input v-model="form.subordinateNumber" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ§å«"> |
| | | <el-radio-group v-model="form.sex"> |
| | | <el-radio label="1" size="mini">ç·</el-radio> |
| | | <el-radio label="0" size="mini">女</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="å
¥èæ¶é´"> |
| | | <el-date-picker v-model="form.entryTime" type="date" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="å½åèå¡"> |
| | | <el-input v-model="form.currentPosition" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¬å¸åç§°"> |
| | | <el-input v-model="form.corporateName" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="é¨é¨ç¼å·"> |
| | | <el-input v-model="form.department" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æå±é¨é¨"> |
| | | <el-cascader v-model="form.departLimsId" :options="department" :props="{ label: 'name', value: 'id',checkStrictly: true }" filterable style="width: 100%;"></el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å²ä½ç±»å«"> |
| | | <el-input v-model="form.postType" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å²ä½ç¼å·"> |
| | | <el-input v-model="form.postCode" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å²ä½åç§°"> |
| | | <el-input v-model="form.postName" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¥é墿¶é´"> |
| | | <el-date-picker v-model="form.groupTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¥å使¶é´"> |
| | | <el-date-picker v-model="form.unitTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç´æ¥ä¸çº§"> |
| | | <el-input v-model="form.reportingTo" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å³å¨å
³ç³»"> |
| | | <el-radio-group v-model="form.laborRelations"> |
| | | <el-radio :label=0 size="mini">ååå·¥</el-radio> |
| | | <el-radio :label=1 size="mini">æ£å¼å·¥</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ç¨å¼å§æ¶é´"> |
| | | <el-date-picker v-model="form.trialStartTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ç¨ç»ææ¶é´"> |
| | | <el-date-picker v-model="form.trialEndTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24" style="text-align: left;"> |
| | | <el-form-item label="人ååç±»"> |
| | | <span style="color: #000;">{{ form.personnelClassification }}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åºçæ¥æ"> |
| | | <el-date-picker v-model="form.dateBirth" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç±è´¯"> |
| | | <el-input v-model="form.nativePlace" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ°æ"> |
| | | <el-input v-model="form.nation" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶ç±»å"> |
| | | <el-input v-model="form.idType" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="身份è¯å·"> |
| | | <el-input v-model="form.identityCard" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¹´é¾"> |
| | | <el-input-number v-model="form.age" :max="130" :min="1" |
| | | controls-position="right" size="small" style="width: 99%;"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶æææ"> |
| | | <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å©å§»ç¶åµ"> |
| | | <el-radio-group v-model="form.maritalStatus"> |
| | | <el-radio :label=0 size="mini">å·²å©</el-radio> |
| | | <el-radio :label=1 size="mini">æªå©</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶å°å"> |
| | | <el-input v-model="form.idAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶è¯¦ç»å°å"> |
| | | <el-input v-model="form.idDetailAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç°å±
å°å"> |
| | | <el-input v-model="form.currentAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç°å±
详ç»å°å"> |
| | | <el-input v-model="form.currentDetailAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="éè¾¾å°å"> |
| | | <el-input v-model="form.serviceAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="é达详ç»å°å"> |
| | | <el-input v-model="form.serviceDetailAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯å¦éä¼å人"> |
| | | <el-radio-group v-model="form.retiredSoldiers"> |
| | | <el-radio :label=1 size="mini">æ¯</el-radio> |
| | | <el-radio :label=0 size="mini">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¿æ²»é¢è²"> |
| | | <el-input v-model="form.politicalStatus" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¥å
/墿¶é´"> |
| | | <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææºå·"> |
| | | <el-input v-model="form.telephone" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="çå·"> |
| | | <el-input v-model="form.cornet" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åå
¬çµè¯"> |
| | | <el-input v-model="form.officePhone" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¬å¸é®ç®±"> |
| | | <el-input v-model="form.email" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è®¡ç®æºç级"> |
| | | <el-input v-model="form.ncre" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æé«å¦å"> |
| | | <el-input v-model="form.officialAcademicRedentials" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æé«å¦ä½"> |
| | | <el-input v-model="form.highestDegree" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸é¢æ ¡1"> |
| | | <el-input v-model="form.graduatedInstitutions1" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸ä¸1"> |
| | | <el-input v-model="form.major1" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸æ¶é´1"> |
| | | <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸é¢æ ¡2"> |
| | | <el-input v-model="form.graduatedInstitutions2" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸ä¸2"> |
| | | <el-input v-model="form.major2" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸æ¶é´2"> |
| | | <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯å¦å
¨æ¥å¶"> |
| | | <el-radio-group v-model="form.fullTime"> |
| | | <el-radio :label="1" size="mini">æ¯</el-radio> |
| | | <el-radio :label= "0" size="mini">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯å¦å±äºä¸å¤©"> |
| | | <el-radio-group v-model="form.enroll"> |
| | | <el-radio :label=1 size="mini">æ¯</el-radio> |
| | | <el-radio :label=0 size="mini">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="XXå±å¤§å¦ç"> |
| | | <el-input v-model="form.collegeStudents" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç´§æ¥è系人"> |
| | | <el-input v-model="form.emergencyContact" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç´§æ¥èç³»çµè¯"> |
| | | <el-input v-model="form.emergencyContactPhone" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æåæ´æ°æ¶é´"> |
| | | <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="18"> |
| | | <el-form-item label="个人ç
§ç"> |
| | | <el-input v-model="form.pictureUrl" disabled size="small"> |
| | | <el-button v-if="form.pictureUrl" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile(form.pictureUrl, 'pictureUrl')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-upload ref="upload" :action="action" :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'pictureUrl')" |
| | | :show-file-list="false" |
| | | style="float: left; margin: 0 10px 0 10px;"> |
| | | <el-button slot="trigger" class="uploadFile" size="mini" type="primary">ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | <el-button v-if="form.pictureUrl" class="uploadFile" size="mini" |
| | | type="primary" @click="downloadFile(form.pictureUrl)">ä¸è½½</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="18"> |
| | | <el-form-item label="çµåç¾å"> |
| | | <el-input v-model="form.signatureUrl" disabled size="small"> |
| | | <el-button v-if="form.signatureUrl" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile(form.signatureUrl, 'signatureUrl')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-upload ref="upload" :action="action" :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'signatureUrl')" |
| | | :show-file-list="false" |
| | | style="float: left; margin: 0 10px 0 10px;"> |
| | | <el-button slot="trigger" class="uploadFile" size="small" type="primary">ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | <el-button v-if="form.signatureUrl" class="uploadFile" size="small" |
| | | type="primary" @click="downloadFile(form.signatureUrl)">ä¸è½½</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="éä»¶èµæ"> |
| | | <el-input v-model="form.attachmentInformation" size="small" disabled> |
| | | <el-button v-if="form.attachmentInformation" slot="append" |
| | | icon="el-icon-delete-solid" |
| | | @click="deleteFile(form.attachmentInformation, 'attachmentInformation')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-upload ref="upload" style="float: left; margin: 0 20px;" :action="action" |
| | | :show-file-list="false" |
| | | :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'attachmentInformation')"> |
| | | <el-button class="uploadFile" slot="trigger" size="mini" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | <el-button class="uploadFile" size="mini" type="primary" @click="downloadFile(form.attachmentInformation)">ä¸è½½</el-button> |
| | | </el-col> |
| | | </el-row> --> |
| | | |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="éä»¶èµæ" > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd(0)">æ°å¢</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="annexList" border height="200" style="width: 96%;float: right;"> |
| | | <el-table-column label="åºå·" type="index" width="80px"> |
| | | </el-table-column> |
| | | <el-table-column label="è¯ä»¶å·" prop="idNumber" width="150px"> |
| | | </el-table-column> |
| | | <el-table-column label="åè¯åä½" prop="issueUnit" width="150px"> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶åç§°" prop="fileName" show-overflow-tooltip width="200px"> |
| | | </el-table-column> |
| | | <el-table-column label="级å«" prop="level" width="150px"> |
| | | </el-table-column> |
| | | <el-table-column label="æææ" prop="periodValidity" width="150px"> |
| | | </el-table-column> |
| | | <el-table-column label="æ·»å æ¶é´" prop="createTime" width="150px"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="150px"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" @click="downloadFile(scope.row.fileName)">ä¸è½½</el-button> |
| | | <el-button size="mini" type="text" @click="annexAdd(1,scope.row)">ç¼è¾</el-button> |
| | | <el-button size="mini" type="text" @click="deleteAnnex(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form> |
| | | <el-row> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 人ååç±»å¼¹æ¡ --> |
| | | <el-dialog :visible.sync="dialogVisible" title="æç¤º" width="40%" @open="getComparisonList"> |
| | | <div style="height: 30vh;"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | 人ååç±»ï¼ |
| | | </el-col> |
| | | <el-col :span="20" style="text-align: left;"> |
| | | <el-checkbox-group v-model="checkList"> |
| | | <el-checkbox v-for="v in personnelClassification" :key="v.value" |
| | | :label="v.value"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickPersonnelClassificationSure">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- æ°å¢éä»¶èµæ --> |
| | | <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" @open="getComparisonList"> |
| | | <el-form ref="annex" :model="annex" :rules="rules" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-form-item label="è¯ä»¶å·" prop="idNumber"> |
| | | <el-input v-model="annex.idNumber" clearable size="small" style="width: 100%;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="åè¯åä½" prop="issueUnit"> |
| | | <el-input v-model="annex.issueUnit" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="级å«"> |
| | | <el-input v-model="annex.level" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="æææ" prop="periodValidity"> |
| | | <el-date-picker v-model="annex.periodValidity" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="å¤å°ä»¶"> |
| | | <el-input v-model="annex.copy" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="åä»¶"> |
| | | <el-input v-model="annex.original" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="æä»¶"> |
| | | <el-upload |
| | | :action="action" |
| | | :before-upload="beforeAvatarUpload" |
| | | :on-success="(response,file,fileList) => onSuccess(response, file, fileList, 'fileName')" |
| | | :show-file-list="false"> |
| | | <img v-if="imageUrl" :src="imageUrl" class="avatar"> |
| | | <i v-else class="el-icon-upload avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cancellation">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm('annex')">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import fileDownload from '../../../util/file' |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { return {} } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | addOrupdate: null, |
| | | title: '', |
| | | annexList: [], |
| | | imageUrl: '', |
| | | annex: { |
| | | userId: '', |
| | | idNumber: '', |
| | | issueUnit: '', |
| | | level: '', |
| | | periodValidity: '', |
| | | copy: '', |
| | | original: '', |
| | | fileName: '' |
| | | }, |
| | | rules: { |
| | | idNumber: [ |
| | | { required: true, message: '请è¾å
¥è¯ä»¶å·', trigger: 'blur' } |
| | | ], |
| | | issueUnit: [ |
| | | { required: true, message: '请è¾å
¥åè¯åä½', trigger: 'blur' } |
| | | ], |
| | | periodValidity: [ |
| | | { required: true, message: 'è¯·éæ©æææ', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | dialogVisible1: false, |
| | | form: { |
| | | userId: '', |
| | | name: '', |
| | | account: '', |
| | | currentState: '', |
| | | jobNumber: '', |
| | | subordinateNumber: '', |
| | | sex: '', |
| | | corporateName: '', |
| | | department: '', |
| | | departLimsId: [], |
| | | postType: '', |
| | | postCode: '', |
| | | postName: '', |
| | | groupTime: '', |
| | | unitTime: '', |
| | | reportingTo: '', |
| | | laborRelations: '', |
| | | trialStartTime: '', |
| | | trialEndTime: '', |
| | | personnelClassification: '', |
| | | dateBirth: '', |
| | | nativePlace: '', |
| | | nation: '', |
| | | idType: '', |
| | | identityCard: '', |
| | | age: '', |
| | | validityPeriod: '', |
| | | maritalStatus: '', |
| | | idAddress: '', |
| | | idDetailAddress: '', |
| | | currentAddress: '', |
| | | currentDetailAddress: '', |
| | | serviceAddress: '', |
| | | serviceDetailAddress: '', |
| | | retiredSoldiers: '', |
| | | politicalStatus: '', |
| | | dumplingTime: '', |
| | | telephone: '', |
| | | cornet: '', |
| | | officePhone: '', |
| | | email: '', |
| | | ncre: '', |
| | | officialAcademicRedentials: '', |
| | | highestDegree: '', |
| | | graduatedInstitutions1: '', |
| | | major1: '', |
| | | graduationTime1: '', |
| | | graduatedInstitutions2: '', |
| | | major2: '', |
| | | graduationTime2: '', |
| | | fullTime: '', |
| | | enroll: '', |
| | | collegeStudents: '', |
| | | emergencyContact: '', |
| | | emergencyContactPhone: '', |
| | | lastUpdateTime: '', |
| | | pictureUrl: '', |
| | | signatureUrl: '', |
| | | }, |
| | | department: [], |
| | | saveLoading: false, |
| | | dialogVisible: false, |
| | | personnelClassification: [], |
| | | checkList: [], |
| | | successFileList: [], // 鲿¢å端åºç°èæ°æ® |
| | | isSave: false, |
| | | } |
| | | }, |
| | | components: { |
| | | fileDownload |
| | | }, |
| | | created() { |
| | | this.init() |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + this.$api.personnel.saveCNASFile |
| | | } |
| | | }, |
| | | methods: { |
| | | annexAdd(type,row) { |
| | | if(type === 1) { |
| | | this.title = 'ç¼è¾éä»¶èµæ' |
| | | this.addOrupdate = 1 |
| | | this.$axios.get(this.$api.personnel.getAnnex + '?id=' + row.id).then(res => { |
| | | this.annex = res.data |
| | | this.imageUrl = this.javaApi + '/img/' + res.data.fileName |
| | | }) |
| | | }else { |
| | | this.title = 'æ°å¢éä»¶èµæ' |
| | | this.addOrupdate = 2 |
| | | } |
| | | this.dialogVisible1 = true |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.addAnnex() |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | addAnnex() { |
| | | if(this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) { |
| | | this.$message.error("请ä¸ä¼ æä»¶") |
| | | return |
| | | } |
| | | this.annex.userId = this.clickNodeVal.userId |
| | | if(this.addOrupdate === 1) { |
| | | this.$axios.post(this.$api.personnel.updateAnnex, this.annex, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if(res.code == 200) { |
| | | this.$axios.get(this.$api.personnel.getAnnexByUserId + '?userId=' + this.clickNodeVal.userId).then(res => { |
| | | this.dialogVisible1 = false |
| | | this.imageUrl = '' |
| | | this.resetForm('annex') |
| | | this.annexList = res.data |
| | | this.$message.success('æ´æ°æåï¼') |
| | | }) |
| | | } |
| | | }) |
| | | }else { |
| | | this.annex.id = null |
| | | this.$axios.post(this.$api.personnel.addAnnex, this.annex, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if(res.code == 200) { |
| | | this.$axios.get(this.$api.personnel.getAnnexByUserId + '?userId=' + this.clickNodeVal.userId).then(res => { |
| | | this.dialogVisible1 = false |
| | | this.imageUrl = '' |
| | | this.resetForm('annex') |
| | | this.annexList = res.data |
| | | this.$message.success('ä¿åæå') |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | deleteAnnex(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.personnel.deleteAnnex + '/' + row.id).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.annexList = this.annexList.filter(item => item.id != row.id) |
| | | }) |
| | | }) |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isJPGorPNG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif'; |
| | | const isLt2MB = file.size / 1024 / 1024 < 2; |
| | | if (!isJPGorPNG) { |
| | | this.$message.error('ä¸ä¼ å¾çåªè½æ¯ JPG/PNG æ ¼å¼!'); |
| | | return false; |
| | | } |
| | | if (!isLt2MB) { |
| | | this.$message.error('ä¸ä¼ å¾ç大å°ä¸è½è¶
è¿ 2MB!'); |
| | | } |
| | | // æ ¡éªéè¿æè¿å trueï¼å
许æä»¶ä¸ä¼ |
| | | return isJPGorPNG && isLt2MB; |
| | | }, |
| | | downloadFile(fileName) { |
| | | let url = this.javaApi + '/img/' + fileName; |
| | | fileDownload.downloadIamge(url, fileName) |
| | | }, |
| | | async onSuccess(response, file, fileList, entityVal) { |
| | | if(entityVal == 'fileName') { |
| | | this.annex.fileName = response.data |
| | | this.imageUrl = this.javaApi + '/img/' + response.data |
| | | } |
| | | // å¨ä¿åèµå¼æ°æä»¶ |
| | | this.successFileList.push(response.data) |
| | | this.$set(this.form, entityVal, response.data) |
| | | }, |
| | | // åå§åè°ç¨ |
| | | init() { |
| | | if (!this.clickNodeVal.userId) { |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.getUserBasisInfo(user.userId) |
| | | this.clickNodeVal.userId = user.userId |
| | | } else { |
| | | this.getUserBasisInfo(this.clickNodeVal.userId) |
| | | } |
| | | }, |
| | | getUserBasisInfo(userId) { |
| | | this.$axios.get(this.$api.personnel.getCNASPersonnelInfo + '?userId=' + userId).then(res => { |
| | | this.form = res.data.PersonBasicInfoDto |
| | | this.department = res.data.department |
| | | this.annexList = res.data.annexList |
| | | this.form.departLimsId = res.data.PersonBasicInfoDto.departLimsId.split(',').filter(a => a != "").map(Number) |
| | | console.log('res.data',res); |
| | | }) |
| | | }, |
| | | async save() { |
| | | this.saveLoading = true |
| | | this.form.userId = this.clickNodeVal.userId |
| | | if(Array.isArray(this.form.departLimsId)) { |
| | | if(this.form.departLimsId.length > 0) { |
| | | this.form.departLimsId = this.form.departLimsId.join(',').trim() + ',' |
| | | }else { |
| | | this.form.departLimsId = '' |
| | | } |
| | | } |
| | | this.$axios.post(this.$api.personnel.saveCNASPersonnelInfo, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.saveLoading = false |
| | | this.isSave = true |
| | | this.getUserBasisInfo(this.clickNodeVal.userId) |
| | | this.$message.success('ä¿åæåï¼') |
| | | }) |
| | | }, |
| | | // å人ååç±»çåå
¸ |
| | | getComparisonList() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "人ååç±»" |
| | | }).then(res => { |
| | | let data = res.data |
| | | this.personnelClassification = data; |
| | | this.checkList = this.form.personnelClassification.split('ï¼') |
| | | }) |
| | | }, |
| | | clickPersonnelClassificationSure() { |
| | | this.dialogVisible = false |
| | | this.form.personnelClassification = this.checkList.filter(m=>m).join('ï¼') |
| | | }, |
| | | async deleteFile(fileName, entityVal) { |
| | | await this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + fileName).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.$set(this.form, entityVal, null) |
| | | let index = this.successFileList.indexOf(fileName) |
| | | if (index != -1) { |
| | | this.successFileList.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | validateFileSize(rule, value, callback) { |
| | | if (!value) { |
| | | return callback(new Error('请ä¸ä¼ æä»¶')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | }, |
| | | cancellation() { |
| | | this.dialogVisible1 = false |
| | | this.imageUrl = '' |
| | | this.resetForm('annex') |
| | | }, |
| | | handleClose(done) { |
| | | this.imageUrl = '' |
| | | this.annex = { |
| | | userId: '', |
| | | idNumber: '', |
| | | issueUnit: '', |
| | | level: '', |
| | | periodValidity: '', |
| | | copy: '', |
| | | original: '', |
| | | fileName: '' |
| | | } |
| | | done(); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal: { |
| | | handler(newVal, oldVal) { |
| | | if (newVal.userId) { |
| | | this.getUserBasisInfo(newVal.userId) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-form-item { |
| | | margin-bottom: 3px; |
| | | } |
| | | |
| | | .el-input { |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .el-icon-picture-outline { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | |
| | | .uploadFile { |
| | | margin-top: 2px; |
| | | float: left; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #0f8bf1; |
| | | width: 178px; |
| | | height: 50px; |
| | | text-align: center; |
| | | border: 1px solid #d9d9d9; |
| | | } |
| | | .avatar { |
| | | width: 178px; |
| | | height: 178px; |
| | | display: block; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 人åçç£ --> |
| | | <template> |
| | | <div> |
| | | <div style="text-align: left; margin-bottom: 15px;"> |
| | | <label>å
³é®å</label> |
| | | <el-input placeholder="请è¾å
¥å
³é®å" style="width: 20vh;" size="small"></el-input> |
| | | <el-button type="primary" size="small">æ¥è¯¢</el-button> |
| | | <div style="float: right;"> |
| | | <el-button type="primary" size="small">æ¥è¯¢</el-button> |
| | | <el-button type="primary" size="small">导åºexcel</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table :data="tableData" style="width: 100%" height="70vh"> |
| | | <el-table-column prop="date" label="åºå·" min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="æµç¨ç¼å·" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="æå±å¹´åº¦" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="ç¼å¶æ¥æ" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="æäº¤äºº" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="å½åç¶æ" min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="å½å责任人" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small">æ¥ç</el-button> |
| | | <el-button type="text" size="small">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" |
| | | :page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" layout="->,total, sizes, prev, pager, next, jumper" |
| | | :total="search.total"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.search.size = val |
| | | this.getPersonnelTraining(this.clickNodeVal.userId); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val |
| | | this.getPersonnelTraining(this.clickNodeVal.userId); |
| | | }, |
| | | // åå§åè°ç¨ |
| | | init() { |
| | | if (this.clickNodeVal.userId) { |
| | | this.getPersonnelTraining(this.clickNodeVal.userId ? this.clickNodeVal.userId : null, null); |
| | | } else { |
| | | this.getPersonnelTraining(null, this.clickNodeVal.id ? this.clickNodeVal.id : null); |
| | | } |
| | | }, |
| | | getPersonnelTraining(userId) { |
| | | this.search.userId = userId |
| | | this.$axios.get(this.$api.personnel.personTrainingSelect+"?userId=" + userId + "&size=" + this.search.size + "¤t=" + this.search.current).then(res => { |
| | | console.log(`output->res`,res) |
| | | }) |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.userId) { |
| | | this.getPersonnelTraining(newVal.userId); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 奿©è®°å½ --> |
| | | <template> |
| | | <div> |
| | | <div style="text-align: left; margin-bottom: 15px;"> |
| | | <label>å§å</label> |
| | | <el-input v-model="search.userName" clearable placeholder="请è¾å
¥å
³é®å" size="small" style="width: 20vh;"></el-input> |
| | | <label style="margin-left: 1em">奿©æ¥æ</label> |
| | | <el-date-picker |
| | | v-model="search.searchTimeList" |
| | | :picker-options="pickerOptions" |
| | | align="right" |
| | | clearable |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="yyyy-MM-dd" |
| | | range-separator="è³" |
| | | size="small" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | style="width: 20%" |
| | | type="daterange" |
| | | unlink-panels |
| | | value-format="yyyy-MM-dd 00:00:00"> |
| | | </el-date-picker> |
| | | <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button> |
| | | <div style="float: right;"> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">导åº</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table :data="tableData" height="70vh" style="width: 100%"> |
| | | <el-table-column label="åºå·" type="index" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åå·¥ç¼å·" min-width="180" prop="account"> |
| | | </el-table-column> |
| | | <el-table-column label="å§å" min-width="180" prop="userName"> |
| | | </el-table-column> |
| | | <el-table-column label="奿©çº§å«" min-width="180" prop="rewardPunishLevel"> |
| | | </el-table-column> |
| | | <el-table-column label="奿©æ¶é´" min-width="180" prop="rewardPunishTime"> |
| | | </el-table-column> |
| | | <el-table-column label="奿©åç§°" min-width="180" prop="rewardPunishName"> |
| | | </el-table-column> |
| | | <el-table-column label="奿©å
·ä½å
容" min-width="120" prop="rewardPunishContent"> |
| | | </el-table-column> |
| | | <el-table-column label="奿©åä½" min-width="180" prop="rewardPunishWorkUnit"> |
| | | </el-table-column> |
| | | <el-table-column label="å建人" min-width="180" prop="createUserName"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button size="small" type="text" @click="editForm(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" @click="deleteRow(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | title="æç¤º" |
| | | width="50%" |
| | | @open="getUserList"> |
| | | <div style="height: 40vh"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·¥ç¼å·"> |
| | | <el-input v-model="form.account" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·¥å§å" prop="userName"> |
| | | <el-select v-model="form.userName" placeholder="è¯·éæ©" size="small" style="width: 100%" value-key="id" |
| | | @change="selectUserChange"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="奿©çº§å«" prop="rewardPunishLevel"> |
| | | <el-input v-model="form.rewardPunishLevel" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="奿©åç§°" prop="rewardPunishName"> |
| | | <el-input v-model="form.rewardPunishName" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="奿©æ¶é´" prop="rewardPunishTime"> |
| | | <el-date-picker |
| | | v-model="form.rewardPunishTime" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="奿©åä½" prop="rewardPunishWorkUnit"> |
| | | <el-input v-model="form.rewardPunishWorkUnit" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="奿©å
容"> |
| | | <el-input v-model="form.rewardPunishContent" :rows="2" size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveOrUpdate">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addOrUpdateRewardPunishmentApi, |
| | | deleteRewardPunishmentApi, |
| | | rewardPunishmentExportApi, |
| | | rewardPunishmentPageApi |
| | | } from "../../../assets/api/api" |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | userName: '', |
| | | searchTimeList: [] |
| | | }, |
| | | form: {}, |
| | | dialogVisible: false, |
| | | outLoading: false, |
| | | pickerOptions: { |
| | | shortcuts: [{ |
| | | text: 'æè¿ä¸å¨', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }, { |
| | | text: 'æè¿ä¸ä¸ªæ', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }, { |
| | | text: 'æè¿ä¸ä¸ªæ', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }] |
| | | }, |
| | | rules: { |
| | | userName: [{ |
| | | required: true, message: 'è¯·éæ©åå·¥å§å', trigger: 'change' |
| | | }], |
| | | rewardPunishLevel: [{ |
| | | required: true, message: '请è¾å
¥å¥æ©çº§å«', trigger: 'blur' |
| | | }], |
| | | rewardPunishName: [{ |
| | | required: true, message: '请è¾å
¥å¥æ©åç§°', trigger: 'blur' |
| | | }], |
| | | rewardPunishTime: [{ |
| | | required: true, message: '请è¾å
¥å¥æ©æ¶é´', trigger: 'blur' |
| | | }], |
| | | rewardPunishWorkUnit: [{ |
| | | required: true, message: '请è¾å
¥å¥æ©åä½', trigger: 'blur' |
| | | }] |
| | | }, |
| | | responsibleOptions: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.search.size = val |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | async getPersonnelTraining() { |
| | | const {code, data} = await this.$axios({ |
| | | method: 'get', |
| | | url: rewardPunishmentPageApi, |
| | | params: { |
| | | userId: this.isDepartment ? '' : this.departId, |
| | | departmentId: this.isDepartment ? this.departId : '', |
| | | current: this.search.curent, |
| | | size: this.search.size, |
| | | userName: this.search.userName, |
| | | startTime: this.search.searchTimeList && this.search.searchTimeList[0], |
| | | endTime: this.search.searchTimeList && this.search.searchTimeList[1], |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.tableData = data.records |
| | | this.search.total = data.total |
| | | } |
| | | }, |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.deviceCheck.rewardPunishmentExport,{ |
| | | userId: this.isDepartment ? '' : this.departId, |
| | | departmentId: this.isDepartment ? this.departId : '', |
| | | userName: this.search.userName, |
| | | startTime: this.search.searchTimeList && this.search.searchTimeList[0], |
| | | endTime: this.search.searchTimeList && this.search.searchTimeList[1] |
| | | },{responseType: 'blob'}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | // å建ä¸ä¸ªè¶
龿¥ï¼å°æä»¶æµèµè¿å»ï¼ç¶åå®ç°è¿ä¸ªè¶
龿¥çåå»äºä»¶ |
| | | const elink = document.createElement('a') |
| | | elink.download = decodeURI('奿©è®°å½'+'.xlsx') |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href) // éæ¾URL 对象 |
| | | document.body.removeChild(elink) |
| | | }) |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | selectUserChange(val) { |
| | | this.form.userName = val.name |
| | | this.form.account = val.account |
| | | this.form.userId = val.id |
| | | }, |
| | | editForm(row) { |
| | | this.dialogVisible = true |
| | | this.form = {...row}; |
| | | }, |
| | | saveOrUpdate() { |
| | | this.$refs.form.validate(async (valid) => { |
| | | if (valid) { |
| | | this.dialogVisible = false |
| | | const {code, data} = await this.$axios({ |
| | | method: 'post', |
| | | url: addOrUpdateRewardPunishmentApi, |
| | | data: this.form, |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success("æä½æåï¼") |
| | | this.getPersonnelTraining(this.departId); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | async deleteRow(row) { |
| | | const {code, data} = await this.$axios({ |
| | | method: 'delete', |
| | | url: deleteRewardPunishmentApi, |
| | | params: { |
| | | id: row.id |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success("æä½æåï¼") |
| | | this.getPersonnelTraining(this.departId); |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | this.getPersonnelTraining(newId); |
| | | } |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (newVal === false) { |
| | | this.form = {} |
| | | this.$refs['form'].clearValidate() |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- å·¥ä½å±¥å --> |
| | | <template> |
| | | <div> |
| | | <div style="text-align: right; margin-bottom: 15px;"> |
| | | <el-button type="primary" size="small" @click="dialogVisible = true" v-if="clickNodeVal.userId">æ·»å å·¥ä½å±¥å</el-button> |
| | | <el-button type="primary" size="small" @click="exportExcel" :loading="outLoading">导åºexcel</el-button> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table :data="tableData" style="width: 100%" height="70vh"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="startTime" label="èµ·å§æ¥æ" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="endTime" label="ç»ææ¥æ" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="placeWork" label="å·¥ä½åä½" min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="department" label="å·¥ä½é¨é¨" min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="post" label="èå¡" min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="remarks" label="夿³¨" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="createUser" label="å建人" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="150"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="downloadFile(scope.row.fileName)">ä¸è½½</el-button> |
| | | <el-button type="text" size="small" @click="checkFun(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small" style="color: red;" @click="deleteFun(scope.row.id)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" |
| | | :page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" layout="->,total, sizes, prev, pager, next, jumper" |
| | | :total="search.total"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog title="æç¤º" :visible.sync="dialogVisible" width="45%"> |
| | | <div style="height: 30vh;"> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èµ·å§æ¥æ" prop="startTime"> |
| | | <el-date-picker v-model="ruleForm.startTime" type="date" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" required> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»ææ¥æ"> |
| | | <el-date-picker v-model="ruleForm.endTime" type="date" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥ä½åä½" prop="placeWork"> |
| | | <el-input v-model="ruleForm.placeWork" size="small" clearable required></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥ä½é¨é¨" prop="department"> |
| | | <el-input v-model="ruleForm.department" size="small" clearable required></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æé«èå¡" prop="post"> |
| | | <el-input v-model="ruleForm.post" size="small" clearable required></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éä»¶èµæ"> |
| | | <el-row> |
| | | <el-col :span="17"><el-input v-model="ruleForm.fileName" size="small" disabled></el-input></el-col> |
| | | <el-col :span="7"> |
| | | <el-upload ref="upload" style="float: left; margin: 0 20px;" :action="action" |
| | | :on-success="onSuccess" :on-change="handleChangePic" :show-file-list="false"> |
| | | <el-button class="uploadFile" slot="trigger" size="mini" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="ruleForm.remarks" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveOrUpdate">{{ isUpdate ? 'æ´ æ°' : 'ä¿ å' }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import fileDownload from '../../../util/file' |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | dialogVisible: false, |
| | | ruleForm: { |
| | | fileName: '', |
| | | sysFileName: '' |
| | | }, |
| | | rules: { |
| | | startTime: [ |
| | | { required: true, message: '请è¾å
¥èµ·å§æ¥æ', trigger: 'blur' }, |
| | | { required: true, message: '请è¾å
¥èµ·å§æ¥æ', trigger: 'change' } |
| | | ], |
| | | placeWork: [ |
| | | { required: true, message: '请è¾å
¥å·¥ä½åä½', trigger: 'blur' } |
| | | ], |
| | | department: [ |
| | | { required: true, message: '请è¾å
¥å·¥ä½é¨é¨', trigger: 'blur' } |
| | | ], |
| | | post: [ |
| | | { required: true, message: '请è¾å
¥æé«èå¡', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | isUpdate: false, |
| | | outLoading: false |
| | | }; |
| | | }, |
| | | created() { |
| | | this.init(); |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + this.$api.personnel.saveCNASFile |
| | | } |
| | | }, |
| | | methods: { |
| | | downloadFile(fileName) { |
| | | let url = this.javaApi + '/img/' + fileName; |
| | | fileDownload.downloadIamge(url,fileName) |
| | | }, |
| | | handleChangePic(file, fileList) { |
| | | if (fileList.length > 1) { |
| | | fileList.splice(0, 1); |
| | | } |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | if (response.code === 200) { |
| | | this.$set(this.ruleForm, 'fileName', response.data) |
| | | } else { |
| | | this.$message.warning(response.message) |
| | | } |
| | | }, |
| | | exportExcel() { |
| | | this.outLoading = true |
| | | let userId = this.clickNodeVal.userId ? this.clickNodeVal.userId : null |
| | | let departmentId = this.clickNodeVal.id ? this.clickNodeVal.id : null |
| | | this.$axios.get(this.$api.personnel.personTrackRecordExport + "?userId=" + userId + "&departmentId=" + departmentId, { responseType: "blob" }).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'å·¥ä½å±¥å.xlsx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | saveOrUpdate() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.isUpdate) { |
| | | this.$axios.put(this.$api.personnel.personTrackRecordUpdate, this.ruleForm, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code = 200) { |
| | | this.dialogVisible = false |
| | | this.$message.success('æ´æ°æåï¼') |
| | | this.init() |
| | | } |
| | | }) |
| | | } else { |
| | | this.ruleForm.userId = this.clickNodeVal.userId |
| | | this.$axios.post(this.$api.personnel.personTrackRecordSave, this.ruleForm, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code = 200) { |
| | | this.dialogVisible = false |
| | | this.$message.success('æ°å¢æåï¼') |
| | | this.init() |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | deleteFun(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.personnel.personTrackRecordDelete + "?id=" + id).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.init() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val |
| | | this.init() |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val |
| | | this.init() |
| | | }, |
| | | // åå§åè°ç¨ |
| | | init() { |
| | | if (this.clickNodeVal.userId) { |
| | | this.getPersonnelTraining(this.clickNodeVal.userId ? this.clickNodeVal.userId : null, null); |
| | | } else { |
| | | this.getPersonnelTraining(null, this.clickNodeVal.id ? this.clickNodeVal.id : null); |
| | | } |
| | | }, |
| | | getPersonnelTraining(userId, departmentId) { |
| | | this.$axios.get(this.$api.personnel.personTrackRecordSelect + "?userId=" + userId + "&size=" + this.search.size + "¤t=" + this.search.current + "&departmentId=" + departmentId).then(res => { |
| | | this.tableData = res.data.records |
| | | this.search.total = res.data.total |
| | | }) |
| | | }, |
| | | checkFun(row) { |
| | | this.ruleForm = { ...row } |
| | | this.dialogVisible = true |
| | | this.isUpdate = true |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.userId) { |
| | | // ç¨æ·id |
| | | this.getPersonnelTraining(newVal.userId, null); |
| | | } else { |
| | | // é¨é¨id |
| | | this.getPersonnelTraining(null, newVal.id); |
| | | } |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.isUpdate = false |
| | | this.$refs.ruleForm.resetFields(); |
| | | this.ruleForm = {} |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | >>>.el-form-item { |
| | | margin-bottom: 13px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- å¹è®è®°å½ --> |
| | | <template> |
| | | <div> |
| | | <div class="flex_table"> |
| | | <div v-if="isDepartment" style="width: 50%"> |
| | | <TableCard :showTitle="false"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>å§å</span> |
| | | <el-input v-model="trainingPagination.userName" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div> |
| | | <!-- <el-button :loading="outLoading" size="small" type="primary" @click="exportExcel">导åº</el-button>--> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="trainingColumn" |
| | | :currentChange="currentChange" |
| | | :height="'calc(100vh - 18em)'" |
| | | :highlightCurrentRow="true" |
| | | :table-data="trainingTableData" |
| | | :table-loading="trainingLoading" |
| | | style="padding: 0 15px;"> |
| | | </ZTTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="trainingPagination.size" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="trainingPagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearCurrentTraining" |
| | | @size-change="handleYearSizeChangeTraining"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div :style="`width: ${isDepartment ? '50%' : '100%'};`"> |
| | | <TableCard :showTitle="false"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>年份</span> |
| | | <el-date-picker |
| | | v-model="searchForm.trainingDate" |
| | | clearable |
| | | format="yyyy" |
| | | placeholder="鿩年" |
| | | size="small" |
| | | style="margin: 0 10px" |
| | | type="year" |
| | | value-format="yyyy"> |
| | | </el-date-picker> |
| | | <el-button size="small" type="primary" @click="queryPersonnelDetailsPage(currentChangeRow.userId)">æ¥è¯¢</el-button> |
| | | <el-button size="small" type="primary" @click="openDownloadDia(currentChangeRow)">导åº</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="trainingPersonColumn" |
| | | :height="'calc(100vh - 18em)'" |
| | | :table-data="trainingPersonTableData" |
| | | :table-loading="trainingPersonLoading" |
| | | style="padding: 0 15px;"> |
| | | </ZTTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="trainingPersonPagination.size" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="trainingPersonPagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearCurrentPagination" |
| | | @size-change="handleYearSizeChangePagination"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ZTTable from '../../caorui/ZTTable/index.vue'; |
| | | import TableCard from '../../caorui/TableCard/index.vue'; |
| | | import {exportPersonSupervisionRecord} from "../../../assets/api/api"; |
| | | |
| | | export default { |
| | | components: { TableCard, ZTTable }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | outLoading: false, |
| | | trainingForm: {}, |
| | | trainingColumn: [ |
| | | { |
| | | label: 'åå·¥ç¼å·', |
| | | prop: 'account', |
| | | width: '100' |
| | | }, { |
| | | label: 'å§å', |
| | | prop: 'name' |
| | | }, { |
| | | label: 'æå¨é¨é¨', |
| | | prop: 'departLimsName', |
| | | width: '150' |
| | | }, { |
| | | label: 'èç§°', |
| | | prop: 'professionalTitle' |
| | | }, { |
| | | label: 'æé«å¦å', |
| | | prop: 'officialAcademicRedentials', |
| | | width: '100' |
| | | }, { |
| | | label: 'å
¥å使¶é´', |
| | | prop: 'unitTime', |
| | | width: '150' |
| | | }, |
| | | // { |
| | | // fixed: 'right', |
| | | // dataType: 'action', |
| | | // width: 80, |
| | | // label: 'æä½', |
| | | // operation: [ |
| | | // { |
| | | // name: '导åº', |
| | | // type: 'text', |
| | | // clickFun: (row) => { |
| | | // this.openDownloadDia(row) |
| | | // } |
| | | // } |
| | | // ] |
| | | // } |
| | | ], |
| | | trainingTableData: [], |
| | | trainingLoading: false, |
| | | trainingPagination: { |
| | | size: 20, |
| | | total: 0, |
| | | current: 1, |
| | | userName: null |
| | | }, |
| | | searchForm: { |
| | | trainingDate: '' |
| | | }, |
| | | trainingPersonColumn: [ |
| | | { |
| | | label: 'å¹è®æ¥æ', |
| | | prop: 'trainingDate' |
| | | }, { |
| | | label: 'å¹è®å
容', |
| | | prop: 'trainingContent' |
| | | }, { |
| | | label: 'å¹è®è¯¾æ¶', |
| | | prop: 'educationBackground' |
| | | }, { |
| | | label: '课æ¶', |
| | | prop: 'classHour' |
| | | }, { |
| | | label: 'å¹è®ç»æ', |
| | | prop: 'examinationResults', |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks' |
| | | } |
| | | ], |
| | | trainingPersonTableData: [], |
| | | trainingPersonLoading: false, |
| | | trainingPersonPagination: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | currentChangeRow: '', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | methods: { |
| | | exportExcel() { |
| | | this.outLoading = true; |
| | | const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.$axios.get(this.$api.personnel.personTrackRecordExport + `&${name}=` + this.departId, { responseType: 'blob' }).then(res => { |
| | | this.outLoading = false; |
| | | this.$message.success('å¯¼åºæå'); |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'å¹è®è®°å½.xlsx'; |
| | | link.click(); |
| | | }).catch(err => { |
| | | this.outLoading = false; |
| | | }) |
| | | }, |
| | | // æ¥è¯¢ |
| | | refreshTable() { |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | // å¹è®è®°å½å¯¼åº |
| | | openDownloadDia (row) { |
| | | let date = this.searchForm.trainingDate |
| | | if (!date) { |
| | | date = this.$moment().format('YYYY') |
| | | } |
| | | console.log('date----', date); |
| | | this.$axios.get( this.$api.personnel.exportTrainingRecord+ '?userId=' + row.userId + '&trainingDate=' + date,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'å¹è®è®°å½å¯¼åº' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // è·åå®éªå®¤-å¹è®è®¡ååè¡¨ä¿¡æ¯ |
| | | getPersonnelTraining(departId) { |
| | | // const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.$axios.get(`${this.$api.personnel.trainingSelectTrainingRecord}?departmentId=${departId}&size=${this.trainingPagination.size}¤t=${this.trainingPagination.current}&userName=${this.trainingPagination.userName}`).then(res => { |
| | | this.trainingTableData = res.data.records; |
| | | this.trainingPagination.total = res.data.total; |
| | | if (this.trainingTableData.length > 0) { |
| | | this.currentChange(this.trainingTableData[0]); |
| | | } |
| | | }); |
| | | }, |
| | | // è·å个人-å¹è®è®¡ååè¡¨ä¿¡æ¯ |
| | | currentChange(row) { |
| | | this.currentChangeRow = row |
| | | if (row === null) { |
| | | row = this.trainingTableData[0] |
| | | } |
| | | this.queryPersonnelDetailsPage(row.userId) |
| | | }, |
| | | queryPersonnelDetailsPage(userId) { |
| | | if (this.searchForm.trainingDate === null) { |
| | | this.searchForm.trainingDate = '' |
| | | } |
| | | this.$axios.get(`${this.$api.personnel.queryPersonnelDetails}?userId=${userId}&size=${this.trainingPersonPagination.size}¤t=${this.trainingPersonPagination.current}&trainingDate=${this.searchForm.trainingDate}`).then(res => { |
| | | this.trainingPersonTableData = res.data.records; |
| | | this.trainingPersonPagination.total = res.data.total; |
| | | }); |
| | | }, |
| | | // å页 |
| | | handleYearCurrentTraining(page) { |
| | | this.trainingPagination.curent = page; |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | handleYearSizeChangeTraining(size) { |
| | | this.trainingPagination.size = size; |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | // å页 |
| | | handleYearCurrentPagination(page) { |
| | | this.trainingPersonPagination.curent = page; |
| | | this.queryPersonnelDetailsPage(this.currentChangeRow.userId); |
| | | }, |
| | | handleYearSizeChangePagination(size) { |
| | | this.trainingPersonPagination.size = size; |
| | | this.queryPersonnelDetailsPage(this.currentChangeRow.userId); |
| | | } |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (this.isDepartment) { |
| | | this.getPersonnelTraining(newId); |
| | | } else { |
| | | this.queryPersonnelDetailsPage(newId) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | >>> .el-form-item { |
| | | margin-bottom: 13px; |
| | | } |
| | | |
| | | .flex_table { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 0 6px; |
| | | } |
| | | </style> |
| | |
| | | // å½åæä»¶ |
| | | getCurrentFile(e){ |
| | | this.currentFile = this.fileList.find(m=>m.documentCode==e) |
| | | if(!this.currentFile){ |
| | | this.currentFile = {} |
| | | } |
| | | }, |
| | | selectEnumByCategory() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main"> |
| | | |
| | | <div class="main_left"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-input |
| | | v-model="search" |
| | | class="div_left_input" |
| | | clearable |
| | | placeholder="è¾å
¥å
³é®åè¿è¡æç´¢" |
| | | size="small" |
| | | suffix-icon="el-icon-search" |
| | | @blur="searchFilter" |
| | | @clear="searchFilter" |
| | | @keyup.enter.native="searchFilter" |
| | | ></el-input> |
| | | </el-col> |
| | | <el-col :span="4" style="text-align: center;line-height: 30px; margin-top: 14px"> |
| | | <el-button circle icon="el-icon-plus" size="mini" type="primary" @click="handleAdd"></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree |
| | | ref="tree" |
| | | :data="list" |
| | | :default-expanded-keys="[1]" |
| | | :expand-on-click-node="false" |
| | | :filter-node-method="filterNode" |
| | | :props="{ children: 'children', label: 'name' }" |
| | | highlight-current |
| | | node-key="id" |
| | | style="height:calc(100% - 70px);overflow-y: scroll;scrollbar-width: none;" |
| | | @node-click="handleNodeClick" |
| | | @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" |
| | | > |
| | | <div slot-scope="{ node, data }" class="custom-tree-node"> |
| | | <el-row style="width: 100%;"> |
| | | <el-col :span="22" style="text-align: left;"> |
| | | <span><i |
| | | :class="`node_i ${data.children != undefined&&data.children.length>0 ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> |
| | | {{ data.name }}</span> |
| | | </el-col> |
| | | <el-col v-if="node.level>1 && data.id !== null" :span="2" style="text-align: right;"> |
| | | <el-button size="mini" type="text" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div style="width: 10px;"></div> |
| | | <div class="main_right"> |
| | | <!-- é¨é¨ --> |
| | | <Department |
| | | ref="departRef" |
| | | :clickNodeVal="clickNodeVal" |
| | | :currentCompaniesList="currentCompaniesList" |
| | | :departId="departId" |
| | | :isDepartment="isDepartment" |
| | | :isShowAll="isShowAll" |
| | | /> |
| | | </div> |
| | | <el-dialog :visible.sync="addDia" title="æ¶ææ°å¢" width="400px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <span class="required-span">* </span>æ¶æåç§°ï¼ |
| | | </el-col> |
| | | <el-col :offset="1" :span="16"> |
| | | <el-input v-model="addOb.name" clearable placeholder="请è¾å
¥æ¶æåç§°" size="small" @keyup.enter.native="addStandardTree"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDia = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addStandardTree">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Department from '../caorui/Department/index.vue'; |
| | | |
| | | export default { |
| | | components: { |
| | | Department |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowAll: true, // æ¯å¦å±ç¤ºæ ç¾æ |
| | | departId: 0, |
| | | list: [], |
| | | addDia: false, |
| | | addOb: { |
| | | name: '', |
| | | fatherId: '' |
| | | }, |
| | | search: '', |
| | | clickNodeVal: {}, |
| | | addUserForm: { |
| | | name: '' |
| | | }, |
| | | currentCompaniesList: [], |
| | | entity: { |
| | | name: '', |
| | | departLimsId: '', |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | overallRecord: '人åå表', |
| | | isDepartment: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.geList(); |
| | | }, |
| | | methods: { |
| | | remove(node, data) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥å±çº§", "æç¤º", { |
| | | type: "error" |
| | | }).then(() => { |
| | | this.treeLoad = true |
| | | this.$axios.post(this.$api.department.delDepartmentLims, { |
| | | id: data.id |
| | | }).then(res => { |
| | | if (res.code == 201) return |
| | | this.$message.success('å·²å é¤') |
| | | this.geList(); |
| | | }) |
| | | }).catch(e => {}) |
| | | }, |
| | | addStandardTree() { |
| | | if (this.addOb.name == null || this.addOb.factory == '') { |
| | | this.$message.error('ææ¶åç§°æ¯å¿
填项') |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.department.addDepartmentLims, this.addOb, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('æ·»å æå') |
| | | this.addDia = false |
| | | this.geList(); |
| | | this.addOb.name = '' |
| | | this.addOb.fatherId = '' |
| | | }) |
| | | }, |
| | | handleAdd() { |
| | | if (this.addOb.fatherId) { |
| | | this.addDia = true; |
| | | } else { |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªæ¶æå±çº§') |
| | | } |
| | | }, |
| | | // 人åå表ç¼è¾ |
| | | updatePerson(row) { |
| | | const node = this.findNodeById(this.list, row.name); |
| | | if (node) { |
| | | this.handleNodeClick(node); |
| | | } else { |
| | | this.$message.warning('æªæ¾å°è¯¥äººå'); |
| | | } |
| | | }, |
| | | // æ°å»ºäººååå·æ°æ |
| | | refreshTree () { |
| | | this.geList() |
| | | }, |
| | | findNodeById(treeData, name) { |
| | | for (let i = 0; i < treeData.length; i++) { |
| | | if (treeData[i].name === name) { |
| | | return treeData[i]; // æ¾å°èç¹ï¼è¿å该èç¹ |
| | | } |
| | | if (treeData[i].children && treeData[i].children.length > 0) { |
| | | const foundNode = this.findNodeById(treeData[i].children, name); |
| | | if (foundNode) { |
| | | return foundNode; // å¨åèç¹ä¸æ¾å°ï¼è¿å该èç¹ |
| | | } |
| | | } |
| | | } |
| | | return null; // æ²¡ææ¾å°èç¹ï¼è¿ånull |
| | | }, |
| | | searchFilter() { |
| | | this.$refs.tree.filter(this.search); |
| | | }, |
| | | // è·åæ |
| | | geList() { |
| | | this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then(res => { |
| | | this.list = res.data; |
| | | if(this.list.length > 0) { |
| | | this.isDepartment = true; |
| | | this.departId = this.list[0].id |
| | | } |
| | | }); |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder'); |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened'); |
| | | }, |
| | | handleNodeClick(val, node, el) { |
| | | //æ çå¼ |
| | | this.clickNodeVal = val; |
| | | // åå¨ç¶çº§èç¹çº§æ° |
| | | if (node) { |
| | | this.getNodeParent(node); |
| | | this.clickNodeVal.level = node.level; |
| | | this.clickNodeVal.parent = node.parent.data; |
| | | } |
| | | this.entity.departLimsId = val.id; |
| | | this.addOb.fatherId = val.id; |
| | | // æ¯å¦æ¾ç¤ºè®¾å¤è¯¦æ
|
| | | this.isShowAll = val.id !== null; |
| | | if (val.id) { // 妿æ¯å®éªå®¤ |
| | | this.departId = val.id; |
| | | this.isDepartment = true; |
| | | } |
| | | if (val.userId) { // æ¯äººå |
| | | this.departId = val.userId; |
| | | this.isDepartment = false |
| | | } |
| | | }, |
| | | getNodeParent(val) { |
| | | if (val.parent != null) { |
| | | this.currentCompaniesList[val.level - 1] = val.data.id; |
| | | this.selectTree += ' - ' + val.label; |
| | | this.getNodeParent(val.parent); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .custom-tree-node { |
| | | width: 80%; |
| | | line-height: 32px; |
| | | } |
| | | .custom-tree-node .el-icon-delete { |
| | | color: #3A7BFA; |
| | | opacity: 0; |
| | | font-size: 15px; |
| | | } |
| | | |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | opacity: 1; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .main { |
| | | display: flex; |
| | | padding: 15px 0; |
| | | } |
| | | |
| | | .main_left { |
| | | background: #ffffff; |
| | | text-align: center; |
| | | height: calc(100vh - 6.5em); |
| | | width: 270px; |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .main_right { |
| | | width: calc(100% - 288px); |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .div_left_input { |
| | | margin: 15px 0; |
| | | width: 90%; |
| | | } |
| | | |
| | | >>> .el-tabs--border-card > .el-tabs__header .el-tabs__item { |
| | | border: 0 none; |
| | | } |
| | | |
| | | >>> .el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active { |
| | | color: black; |
| | | } |
| | | |
| | | >>> .el-tabs--border-card > .el-tabs__header { |
| | | border-bottom: none; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: end; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | </style> |
| | |
| | | <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="downloadDialog" title="导åº" width="600px"> |
| | | <span> |
| | | <el-button plain type="primary" @click="controlDown">宿½è®¡å导åº</el-button> |
| | | <el-button plain type="primary" @click="processingDown">è¯ä»·å¯¼åº</el-button> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="downloadDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | |
| | | examineInfo: {}, |
| | | ratifyInfo: {}, |
| | | upLoading: false, |
| | | downloadDialog: false, |
| | | download: {}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | this.evaluateDialog = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼å¯¼åºå¼¹æ¡ |
| | | downLoadPost (row) { |
| | | this.downloadDialog = true |
| | | this.download = row |
| | | }, |
| | | // æå¼å¹´åº¦æç»æ°å¢ãä¿®æ¹å¼¹æ¡ |
| | | showDialog (type, row) { |
| | | this.formDia = true |
| | |
| | | this.formDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æ§å¶åå¯¼åº |
| | | controlDown() { |
| | | this.$axios.get(this.$api.qualityMonitor.exportQualityMonitorRatify + '?qualityMonitorDetailsId=' + this.download.qualityMonitorDetailsId, { responseType: "blob" }).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'è´¨éçæ§å®æ½è®¡å.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // å¤çåå¯¼åº |
| | | processingDown() { |
| | | this.$axios.get(this.$api.qualityMonitor.exportQualityMonitorEvaluate + '?qualityMonitorDetailsId=' + this.download.qualityMonitorDetailsId, { responseType: "blob" }).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'è´¨éçæ§è¯ä»·.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | delYearPlanDetail (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 120px">æ åæ¹æ³ï¼</span> |
| | | <el-input size="small" v-model="searchForm.methodName" clearable></el-input> |
| | | <!-- <el-input size="small" v-model="searchForm.methodName" clearable></el-input> --> |
| | | <el-input v-model="searchForm.methodName" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | this.formDIa = false |
| | | this.searchList() |
| | | }, |
| | | // å¯¼åº |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.processMethodVerify.exportMethodVerify + '?methodVerifyId=' + row.methodVerifyId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æ åï¼æ¹æ³ï¼ç¡®è®¤è®°å½.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // å页 |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 120px">æ åæ¹æ³ï¼</span> |
| | | <el-input size="small" v-model="searchForm.methodName" clearable></el-input> |
| | | <el-input v-model="searchForm.methodName" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | this.$refs.formDIa.openDia(row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.processMethodVerify.exportMethodVerify + '?methodVerifyId=' + row.methodVerifyId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æ åï¼æ¹æ³ï¼ç¡®è®¤è®°å½.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia () { |
| | | this.formDIa = false |
| | |
| | | const javaApi = 'https://ztwxlims.ztt.cn:7443/lims/'; |
| | | |
| | | //äº |
| | | // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; |
| | | Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; |
| | | const javaApi = 'http://114.132.189.42:1234'; |
| | | |
| | | // //æ£æµä¸å¿æ£å¼åº |