Merge remote-tracking branch 'origin/dev' into dev
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // èµæºè¦æ±-äººåæ»è§ |
| | | export function selectPersonnelOverview(query) { |
| | | return request({ |
| | | url: "/user/selectPersonnelOverview", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | //å é¤é¨é¨ |
| | | export function delDepartmentLims(query) { |
| | | return request({ |
| | | url: "/department/delDepartmentLims", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ·»å é¨é¨ |
| | | export function addDepartmentLims(data) { |
| | | return request({ |
| | | url: "/department/addDepartmentLims", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢CNAS人åä¾§è¾¹æ |
| | | export function selectCNSAPersonTree(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/selectCNSAPersonTree", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 对æ¥äººåå¹³å° è·åææäººåä¿¡æ¯ |
| | | export function getEmployees(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getEmployees", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // è·å人åå表 |
| | | export function basicInformationOfPersonnelSelectPage(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/basicInformationOfPersonnelSelectPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤äººåæç»æå¨ç»ç»æ¶æ |
| | | export function delUserDepardLimsId(query) { |
| | | return request({ |
| | | url: "/user/delUserDepardLimsId", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹äººåæç»æå¨ç»ç»æ¶æ |
| | | export function upUserDepardLimsId(data) { |
| | | return request({ |
| | | url: "/user/upUserDepardLimsId", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¬ä¿¡æ¯å¯¼åº,ä¼ å类似å页 |
| | | export function exportPersonBasicInfo(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/exportPersonBasicInfo", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¬ä¿¡æ¯å¯¼åº,ä¼ å类似å页 |
| | | export function exportPersonBasicInfoById(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/exportPersonBasicInfoById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc æ²éè®°å½ |
| | | */ |
| | | |
| | | // æ²éè®°å½-å表 |
| | | export function personPersonCommunicationAbilityPage(query) { |
| | | return request({ |
| | | url: "/personCommunicationAbility/personPersonCommunicationAbilityPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ²éè®°å½-å é¤ |
| | | export function deletePersonCommunicationAbility(query) { |
| | | return request({ |
| | | url: "/personCommunicationAbility/deletePersonCommunicationAbility", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ²éè®°å½-å¯¼åº |
| | | export function exportPersonCommunicationAbility(query) { |
| | | return request({ |
| | | url: "/personCommunicationAbility/exportPersonCommunicationAbility", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 人åå表 |
| | | export function selectUserList(query) { |
| | | return request({ |
| | | url: "/deviceScope/selectUserList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ²éè®°å½æ°å¢-ç¼è¾ |
| | | export function addOrUpdatePersonCommunicationAbility(data) { |
| | | return request({ |
| | | url: "/personCommunicationAbility/addOrUpdatePersonCommunicationAbility", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc å²ä½èè´£ |
| | | */ |
| | | |
| | | // å页æ¥è¯¢å²ä½èè´£ |
| | | export function personJobResponsibilitiesSelect(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesSelect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢å²ä½èè´£ |
| | | export function personJobResponsibilitiesSave(data) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesSave", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 导åºäººåèè´£,ä¼ åid |
| | | export function exportPersonJobResponsibilities(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/exportPersonJobResponsibilities", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤å²ä½èè´£ |
| | | export function personJobResponsibilitiesDelete(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesDelete", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc ä»»èææ |
| | | */ |
| | | |
| | | // ä»»èææè®°å½-å表 |
| | | export function PersonPostAuthorizationRecordPage(query) { |
| | | return request({ |
| | | url: "/personPostAuthorizationRecord/PersonPostAuthorizationRecordPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä»»èææè®°å½-å é¤ |
| | | export function deletePersonPostAuthorizationRecord(query) { |
| | | return request({ |
| | | url: "/personPostAuthorizationRecord/deletePersonPostAuthorizationRecord", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导åºäººåèè´£,ä¼ åid |
| | | export function exportPersonPostAuthorizationRecord(query) { |
| | | return request({ |
| | | url: "/personPostAuthorizationRecord/exportPersonPostAuthorizationRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ä»»èææè®°å½-æ°å¢ |
| | | export function addOrUpdatePersonPostAuthorizationRecord(data) { |
| | | return request({ |
| | | url: "/personPostAuthorizationRecord/addOrUpdatePersonPostAuthorizationRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å 餿件 |
| | | export function deleteCNASFile(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/deleteCNASFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc 人åè½å |
| | | */ |
| | | // 导åºäººåè½å |
| | | export function exportPersonnelCapacity(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/exportPersonnelCapacity", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢äººåè½å |
| | | export function personPersonnelCapacityPage(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/personPersonnelCapacityPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢ç¼è¾äººåè½å |
| | | export function addOrUpdatePersonPersonnelCapacity(data) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/addOrUpdatePersonPersonnelCapacity", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 确认人åè½å |
| | | export function confirmPersonnelCapability(data) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/confirmPersonnelCapability", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤äººåè½å |
| | | export function deletePersonPersonnelCapacity(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/deletePersonPersonnelCapacity", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc 人åä¿¡æ¯ |
| | | */ |
| | | // è·åéä»¶ |
| | | export function getAnnex(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getAnnex", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ´æ°éä»¶ |
| | | export function updateAnnex(data) { |
| | | return request({ |
| | | url: "/personBasicInfo/updateAnnex", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // |
| | | export function getAnnexByUserId(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getAnnexByUserId", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ·»å éä»¶ |
| | | export function addAnnex(data) { |
| | | return request({ |
| | | url: "/personBasicInfo/addAnnex", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤éä»¶ |
| | | export function deleteAnnex(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/deleteAnnex/" + query, |
| | | method: "delete", |
| | | // params: query, |
| | | }); |
| | | } |
| | | |
| | | //人ååºæ¬ä¿¡æ¯æ¥è¯¢ |
| | | export function getCNASPersonnelInfo(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getCNASPersonnelInfo", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 人ååºæ¬ä¿¡æ¯ä¿å |
| | | export function saveCNASPersonnelInfo(data) { |
| | | return request({ |
| | | url: "/personBasicInfo/saveCNASPersonnelInfo", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /**å¹è®è®¡å |
| | | */ |
| | | //年度计åæç»è¡¨ å é¤ |
| | | export function deleteDetail(query) { |
| | | return request({ |
| | | url: "/personTraining/deleteDetail", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢äººåå¹è® |
| | | export function personTrainingSelect(query) { |
| | | return request({ |
| | | url: "/personTraining/personTrainingSelect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢å¹è®è®¡å年度计åæç»è¡¨ |
| | | export function queryTheAnnualPlanDetailsTable(query) { |
| | | return request({ |
| | | url: "/personTraining/queryTheAnnualPlanDetailsTable", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤äººåå¹è®ä¿¡æ¯ |
| | | export function personTrainingDelete(query) { |
| | | return request({ |
| | | url: "/personTraining/personTrainingDelete", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å®¡æ ¸ 年度人åå¹è® |
| | | export function reviewAnnualPersonnelTraining(data) { |
| | | return request({ |
| | | url: "/personTraining/reviewAnnualPersonnelTraining", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¹å 年度人åå¹è® |
| | | export function approveAnnualPersonnelTraining(data) { |
| | | return request({ |
| | | url: "/personTraining/approveAnnualPersonnelTraining", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 导åºäººåå¹è®ä¸èæ ¸è®°å½ |
| | | export function exportPersonTrainingRecord(query) { |
| | | return request({ |
| | | url: "/personTraining/exportPersonTrainingRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导åº/人åå¹è® |
| | | export function exportPersonTraining(query) { |
| | | return request({ |
| | | url: "/personTraining/exportPersonTraining", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 认é¢/åæ¶è®¤é¢ |
| | | export function claimOfTrainingAndAssessmentRecords(data) { |
| | | return request({ |
| | | url: "/personTraining/claimOfTrainingAndAssessmentRecords", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¹éå é¤ å¹´åº¦è®¡åæç»è¡¨ |
| | | export function deleteAnnualPlanDetailTable(query) { |
| | | return request({ |
| | | url: "/personTraining/deleteAnnualPlanDetailTable", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 年度计åæç» æä»¶ä¸è½½ |
| | | export function fileDownLoad(query) { |
| | | return request({ |
| | | url: "/personTraining/fileDownLoad", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å 餿¥è¯¢ |
| | | export function deleteFile(query) { |
| | | return request({ |
| | | url: "/personTraining/deleteFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //éä»¶æ¥è¯¢ |
| | | export function getFileData(query) { |
| | | return request({ |
| | | url: "/personTraining/getFileData", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å¹è®ä¸èæ ¸è®°å½ æ¥è¯¢ |
| | | export function trainingAndAssessmentRecordsPage(query) { |
| | | return request({ |
| | | url: "/personTraining/trainingAndAssessmentRecordsPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å¹è®ä¸èæ ¸ å¤±ç¦æ´æ° |
| | | export function outOfFocusPreservation(data) { |
| | | return request({ |
| | | url: "/personTraining/outOfFocusPreservation", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å¹è®ä¸èæ ¸ æ°å¢äººå |
| | | export function newPersonnelAddedToTrainingRecords(data) { |
| | | return request({ |
| | | url: "/personTraining/newPersonnelAddedToTrainingRecords", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å¹è®ä¸èæ ¸è®°å½ æ¹éå é¤ |
| | | export function deleteTrainingAndAssessmentRecords(query) { |
| | | return request({ |
| | | url: "/personTraining/deleteTrainingAndAssessmentRecords", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å¹è®ä¸èæ ¸è®°å½ æäº¤ |
| | | export function trainingAndAssessmentRecordsAdded(data) { |
| | | return request({ |
| | | url: "/personTraining/trainingAndAssessmentRecordsAdded", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢é¨é¨ |
| | | export function selectDepartLims(query) { |
| | | return request({ |
| | | url: "/personTraining/selectDepartLims", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢å¹è®è®¡å年度计åæç»è¡¨ |
| | | export function addOrUpdatePersonTrainingDetailed(data) { |
| | | return request({ |
| | | url: "/personTraining/addOrUpdatePersonTrainingDetailed", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc çç£è®¡å |
| | | */ |
| | | //年度计åå表 |
| | | export function yearPlanList(query) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //年度计åæç» |
| | | export function yearPlanDetailList(query) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanDetailList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å é¤å¹´è®¡å |
| | | export function yearPlanDel(query) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanDel", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å é¤å¹´è®¡åæç» |
| | | export function yearPlanDetailDel(query) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanDetailDel", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¹å年度计å |
| | | export function yearPlanDetailApproval(data) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanDetailApproval", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 人å çç£è®¡åå¯¼åº |
| | | export function exportSuperVisePlan(query) { |
| | | return request({ |
| | | url: "/superVisePlan/exportSuperVisePlan", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // çç£è®¡å导å
¥å¹´åº¦è®¡å |
| | | export function yearPlanDetailImport(data) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanDetailImport", |
| | | method: "post", |
| | | headers: { |
| | | "Content-Type": "multipart/form-data;", |
| | | }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // çç£è®¡å-æ°å¢å¹´åº¦è®¡å |
| | | export function yearPlanDetailAdd(data) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanDetailAdd", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // çç£è®¡å-ç¼è¾å¹´åº¦è®¡å |
| | | export function yearPlanDetailEdit(data) { |
| | | return request({ |
| | | url: "/superVisePlan/yearPlanDetailEdit", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc çç£è®°å½ |
| | | */ |
| | | //æ¥è¯¢ |
| | | export function personSupervisionRecordPage(query) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/personSupervisionRecordPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å é¤ çç£è®°å½ |
| | | export function deletePersonSupervisionRecord(query) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/deletePersonSupervisionRecord", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ§å¶åå¯¼åº |
| | | export function exportSupervisionControlSheet(query) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/exportSupervisionControlSheet", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å¤çåå¯¼åº |
| | | export function exportSupervisionProcessingSheet(query) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/exportSupervisionProcessingSheet", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // çç£è®°å½å¯¼åº |
| | | export function exportPersonSupervisionRecord(query) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/exportPersonSupervisionRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢-ç¼è¾ çç£è®°å½ |
| | | export function addOrUpdatePersonSupervisionRecord(data) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/addOrUpdatePersonSupervisionRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢ æ§å¶å |
| | | export function personSupervisionControlSheetPage(query) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/personSupervisionControlSheetPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢-ç¼è¾ æ§å¶å |
| | | export function addOrUpdatePersonSupervisionControl(data) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/addOrUpdatePersonSupervisionControl", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢ å¤çå |
| | | export function personSupervisionProcessingPage(query) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/personSupervisionProcessingPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢-ç¼è¾ å¤çå |
| | | export function addOrUpdatePersonnelServiceProcessing(data) { |
| | | return request({ |
| | | url: "/personSupervisionRecord/addOrUpdatePersonnelServiceProcessing", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc 奿©è®°å½ |
| | | */ |
| | | // 奿©è®°å½ æ°å¢/æ´æ° |
| | | export function addOrUpdateRewardPunishment(data) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/addOrUpdateRewardPunishment", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 人å - 奿©è®°å½ å é¤ |
| | | export function deleteRewardPunishment(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/deleteRewardPunishment", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 人å - 奿©è®°å½ å页æ¥è¯¢ |
| | | export function rewardPunishmentPage(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/rewardPunishmentPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc å·¥ä½å±¥å |
| | | */ |
| | | |
| | | // 导åºå·¥ä½å±¥å |
| | | export function personTrackRecordExport(query) { |
| | | return request({ |
| | | url: "/personTrackRecord/personTrackRecordExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ´æ°å·¥ä½å±¥å |
| | | export function personTrackRecordUpdate(data) { |
| | | return request({ |
| | | url: "/personTrackRecord/personTrackRecordUpdate", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢å·¥ä½å±¥å |
| | | export function personTrackRecordSave(data) { |
| | | return request({ |
| | | url: "/personTrackRecord/personTrackRecordSave", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å é¤å·¥ä½å±¥å |
| | | export function personTrackRecordDelete(query) { |
| | | return request({ |
| | | url: "/personTrackRecord/personTrackRecordDelete", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢å·¥ä½å±¥å |
| | | export function personTrackRecordSelect(query) { |
| | | return request({ |
| | | url: "/personTrackRecord/personTrackRecordSelect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc å¹è®è®°å½ |
| | | */ |
| | | // 导åºå¹è®è®°å½ |
| | | export function exportTrainingRecord(query) { |
| | | return request({ |
| | | url: "/personTrainingRecord/exportTrainingRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢äººå å¹è®è®°å½ |
| | | export function trainingSelectTrainingRecord(query) { |
| | | return request({ |
| | | url: "/personTrainingRecord/trainingSelectTrainingRecord", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢äººåæç» å¹è®è®°å½ |
| | | export function queryPersonnelDetails(query) { |
| | | return request({ |
| | | url: "/personTrainingRecord/queryPersonnelDetails", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <svg width="148" height="21" viewBox="0 0 148 21" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <path fill-rule="evenodd" clip-rule="evenodd" d="M7.00437 5.75531V0.0625L0.772461 5.75531H7.00437Z" fill="#B26F00"/> |
| | | <path fill-rule="evenodd" clip-rule="evenodd" d="M141.709 5.75531V0.0625L147.941 5.75531H141.709Z" fill="#B26F00"/> |
| | | <path d="M6.97192 2.0625C6.97192 0.957931 7.86735 0.0625 8.97192 0.0625H139.676C140.781 0.0625 141.676 0.957931 141.676 2.0625V12.0625C141.676 16.4808 138.095 20.0625 133.676 20.0625H14.9719C10.5537 20.0625 6.97192 16.4808 6.97192 12.0625V2.0625Z" fill="url(#paint0_linear_2026_4)"/> |
| | | <defs> |
| | | <linearGradient id="paint0_linear_2026_4" x1="6.97192" y1="0.0625" x2="6.97192" y2="20.0625" gradientUnits="userSpaceOnUse"> |
| | | <stop stop-color="#F9C76F"/> |
| | | <stop offset="1" stop-color="#FEB42F"/> |
| | | </linearGradient> |
| | | </defs> |
| | | </svg> |
| | |
| | | <template> |
| | | <div> |
| | | <el-upload |
| | | :action="uploadUrl" |
| | | :before-upload="handleBeforeUpload" |
| | | :on-success="handleUploadSuccess" |
| | | :on-error="handleUploadError" |
| | | name="file" |
| | | :show-file-list="false" |
| | | :headers="headers" |
| | | style="display: none" |
| | | ref="upload" |
| | | v-if="this.type == 'url'" |
| | | > |
| | | <el-upload :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleUploadSuccess" |
| | | :on-error="handleUploadError" name="file" :show-file-list="false" :headers="uploadHeader" style="display: none" |
| | | ref="upload" v-if="this.type == 'url'"> |
| | | </el-upload> |
| | | <div class="editor" ref="editor" :style="styles"></div> |
| | | </div> |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | .editor, .ql-toolbar { |
| | | .editor, |
| | | .ql-toolbar { |
| | | white-space: pre-wrap !important; |
| | | line-height: normal !important; |
| | | } |
| | | |
| | | .quill-img { |
| | | display: none; |
| | | } |
| | | |
| | | .ql-snow .ql-tooltip[data-mode="link"]::before { |
| | | content: "请è¾å
¥é¾æ¥å°å:"; |
| | | } |
| | | |
| | | .ql-snow .ql-tooltip.ql-editing a.ql-action::after { |
| | | border-right: 0px; |
| | | content: "ä¿å"; |
| | | padding-right: 0px; |
| | | } |
| | | |
| | | .ql-snow .ql-tooltip[data-mode="video"]::before { |
| | | content: "请è¾å
¥è§é¢å°å:"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item::before { |
| | | content: "14px"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { |
| | | content: "10px"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { |
| | | content: "18px"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { |
| | | content: "32px"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item::before { |
| | | content: "ææ¬"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { |
| | | content: "æ é¢1"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { |
| | | content: "æ é¢2"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { |
| | | content: "æ é¢3"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { |
| | | content: "æ é¢4"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { |
| | | content: "æ é¢5"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { |
| | | content: "æ é¢6"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-font .ql-picker-label::before, |
| | | .ql-snow .ql-picker.ql-font .ql-picker-item::before { |
| | | content: "æ ååä½"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, |
| | | .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { |
| | | content: "衬线åä½"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, |
| | | .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { |
| | | content: "ç宽åä½"; |
| | |
| | | <template> |
| | | <div class="upload-file"> |
| | | <el-upload |
| | | multiple |
| | | :action="uploadFileUrl" |
| | | :before-upload="handleBeforeUpload" |
| | | :file-list="fileList" |
| | | :limit="limit" |
| | | :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" |
| | | :on-success="handleUploadSuccess" |
| | | :show-file-list="false" |
| | | :headers="headers" |
| | | class="upload-file-uploader" |
| | | ref="fileUpload" |
| | | > |
| | | <el-upload multiple :action="uploadFileUrl" :before-upload="handleBeforeUpload" :file-list="fileList" :limit="limit" |
| | | :on-error="handleUploadError" :on-exceed="handleExceed" :on-success="handleUploadSuccess" :show-file-list="false" |
| | | :headers="uploadHeader" class="upload-file-uploader" ref="fileUpload"> |
| | | <!-- ä¸ä¼ æé® --> |
| | | <el-button size="mini" type="primary">éåæä»¶</el-button> |
| | | <!-- ä¸ä¼ æç¤º --> |
| | |
| | | .upload-file-uploader { |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .upload-file-list .el-upload-list__item { |
| | | border: 1px solid #e4e7ed; |
| | | line-height: 2; |
| | | margin-bottom: 10px; |
| | | position: relative; |
| | | } |
| | | |
| | | .upload-file-list .ele-upload-list__item-content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | color: inherit; |
| | | } |
| | | |
| | | .ele-upload-list__item-content-action .el-link { |
| | | margin-right: 10px; |
| | | } |
| | |
| | | <template> |
| | | <div class="component-upload-image"> |
| | | <el-upload |
| | | multiple |
| | | :action="uploadImgUrl" |
| | | list-type="picture-card" |
| | | :on-success="handleUploadSuccess" |
| | | :before-upload="handleBeforeUpload" |
| | | :limit="limit" |
| | | :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" |
| | | ref="imageUpload" |
| | | :on-remove="handleDelete" |
| | | :show-file-list="true" |
| | | :headers="headers" |
| | | :file-list="fileList" |
| | | :on-preview="handlePictureCardPreview" |
| | | :class="{hide: this.fileList.length >= this.limit}" |
| | | > |
| | | <el-upload multiple :action="uploadImgUrl" list-type="picture-card" :on-success="handleUploadSuccess" |
| | | :before-upload="handleBeforeUpload" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed" |
| | | ref="imageUpload" :on-remove="handleDelete" :show-file-list="true" :headers="uploadHeader" :file-list="fileList" |
| | | :on-preview="handlePictureCardPreview" :class="{ hide: this.fileList.length >= this.limit }"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | |
| | |
| | | çæä»¶ |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | title="é¢è§" |
| | | width="800" |
| | | append-to-body |
| | | > |
| | | <img |
| | | :src="dialogImageUrl" |
| | | style="display: block; max-width: 100%; margin: 0 auto" |
| | | /> |
| | | <el-dialog :visible.sync="dialogVisible" title="é¢è§" width="800" append-to-body> |
| | | <img :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | }, |
| | | // 大å°éå¶(MB) |
| | | fileSize: { |
| | | type: Number, |
| | | type: Number, |
| | | default: 5, |
| | | }, |
| | | // æä»¶ç±»å, ä¾å¦['png', 'jpg', 'jpeg'] |
| | |
| | | this.fileList = list.map(item => { |
| | | if (typeof item === "string") { |
| | | if (item.indexOf(this.baseUrl) === -1 && !isExternal(item)) { |
| | | item = { name: this.baseUrl + item, url: this.baseUrl + item }; |
| | | item = { name: this.baseUrl + item, url: this.baseUrl + item }; |
| | | } else { |
| | | item = { name: item, url: item }; |
| | | item = { name: item, url: item }; |
| | | } |
| | | } |
| | | return item; |
| | |
| | | <style scoped lang="scss"> |
| | | // .el-upload--picture-card æ§å¶å å·é¨å |
| | | ::v-deep.hide .el-upload--picture-card { |
| | | display: none; |
| | | display: none; |
| | | } |
| | | |
| | | // 廿å¨ç»ææ |
| | | ::v-deep .el-list-enter-active, |
| | | ::v-deep .el-list-leave-active { |
| | | transition: all 0s; |
| | | transition: all 0s; |
| | | } |
| | | |
| | | ::v-deep .el-list-enter, .el-list-leave-active { |
| | | ::v-deep .el-list-enter, |
| | | .el-list-leave-active { |
| | | opacity: 0; |
| | | transform: translateY(0); |
| | | } |
| | | </style> |
| | | |
| | |
| | | <!-- 坿ä½è¡è¿è¡ç¹å»äºä»¶ --> |
| | | <span v-else-if="data.linkEvent && showLink(a.label, data.linkEvent)" style="color:#409EFF;cursor: pointer;" |
| | | @click="handleLinkEvent(scope.row, data.linkEvent[a.label])">{{ scope.row[a.label] }}</span> |
| | | <img v-else-if="showUpload(a.label) && scope.row[a.label]" :src="javaApi + '/img/' + scope.row[a.label]" alt="" |
| | | style="width: 40px;height: 40px;margin-top: 10px;"> |
| | | <img v-else-if="showUpload(a.label) && scope.row[a.label]" :src="javaApi + '/img/' + scope.row[a.label]" |
| | | alt="" style="width: 40px;height: 40px;margin-top: 10px;"> |
| | | <span v-else :class="{ red: getRedColor(a.label, scope.row) }">{{ scope.row[a.label] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <span v-if="a.type != 'upload'">{{ a.font }}</span> |
| | | <el-upload v-else ref='upload' :accept='a.uploadConfig.accept' |
| | | :action="javaApi + a.uploadConfig.url + '?id=' + (a.uploadConfig.uploadIdFun ? a.uploadConfig.uploadIdFun(scope.row) : scope.row.id)" |
| | | :disabled="a.disabled ? a.disabled(scope.row, scope.$index) : false" :headers="token" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" name="file" style="background: transparent;"> |
| | | :disabled="a.disabled ? a.disabled(scope.row, scope.$index) : false" :headers="uploadHeader" |
| | | :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" name="file" |
| | | style="background: transparent;"> |
| | | <span>{{ a.font }}</span> |
| | | </el-upload> |
| | | </el-button> |
| | |
| | | <span v-if="showUpReq(a.label)" class="required-span">* </span>{{ a.value }}ï¼ |
| | | </el-col> |
| | | <el-col :span="16 / data.row"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | <el-input |
| | | v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`请è¾å
¥${a.value}`" clearable |
| | | size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | :action="javaApi + data.addUploadConfig.url" :headers="uploadHeader" :multiple="false" |
| | | :on-error="onError" :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" |
| | | class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | |
| | | <span v-if="showUpReq(a.label)" class="required-span">* </span>{{ a.value }}ï¼ |
| | | </el-col> |
| | | <el-col :offset="1" :span="16"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | <el-input |
| | | v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`请è¾å
¥${a.value}`" clearable |
| | | size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | |
| | | :value="b.value"></el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | :action="javaApi + data.addUploadConfig.url" :headers="uploadHeader" :multiple="false" |
| | | :on-error="onError" :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" |
| | | class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | |
| | | class="required-span">* |
| | | </span>{{ a.value }}ï¼</el-col> |
| | | <el-col :span="16 / data.row"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | <el-input |
| | | v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :placeholder="`请è¾å
¥${a.value}`" clearable size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | | :multiple="data.selectField[a.label].choose" :placeholder="`è¯·éæ©${a.value}`" clearable filterable |
| | |
| | | :value="b.value"></el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | :action="javaApi + data.addUploadConfig.url" :headers="uploadHeader" :multiple="false" |
| | | :on-error="onError" :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" |
| | | class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | |
| | | <el-col :span="6" style="text-align: right;"><span v-if="showAddReq(a.label)" class="required-span">* |
| | | </span>{{ a.value }}ï¼</el-col> |
| | | <el-col :offset="1" :span="16"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | <el-input |
| | | v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :placeholder="`请è¾å
¥${a.value}`" clearable size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | | :multiple="data.selectField[a.label].choose" :placeholder="`è¯·éæ©${a.value}`" clearable size="small" |
| | |
| | | :value="b.value"></el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | :action="javaApi + data.addUploadConfig.url" :headers="uploadHeader" :multiple="false" |
| | | :on-error="onError" :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" |
| | | class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | |
| | | <el-dialog :visible.sync="uploadDia" title="æ°æ®å¯¼å
¥" width="500px"> |
| | | <div style="margin: 0 auto;"> |
| | | <el-upload ref="upload" :accept="data.accept === undefined ? '.csv' : data.accept" :action="javaApi + inputUrl" |
| | | :auto-upload="false" :data="{ param: data.uploadStr }" :file-list="fileList" :headers="token" :limit="1" |
| | | :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" drag name="file"> |
| | | :auto-upload="false" :data="{ param: data.uploadStr }" :file-list="fileList" :headers="uploadHeader" |
| | | :limit="1" :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" drag name="file"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | |
| | | <el-dialog title="éä»¶æ¥ç" :visible.sync="isShow" width="80%" @closed="$emit('closeFilesLook')"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in dataVisibleTitle" :key="i" :class="{active:i===dataVisibleIndex}" @click="handleDataVisibleTab(m,i)">{{m.label}}</li> |
| | | <li v-for="(m, i) in dataVisibleTitle" :key="i" :class="{ active: i === dataVisibleIndex }" |
| | | @click="handleDataVisibleTab(m, i)">{{ m.label }}</li> |
| | | </ul> |
| | | <el-upload :action="action" |
| | | :auto-upload="true" |
| | | :data="{orderId: dataVisibleIndex === 0 ? filesLookInfo.enterOrderId : filesLookInfo.quarterOrderId}" |
| | | :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers" |
| | | :before-upload="beforeUpload" |
| | | style="width: 80px !important;" |
| | | :on-error="onError" ref='upload'> |
| | | <el-upload :action="action" :auto-upload="true" |
| | | :data="{ orderId: dataVisibleIndex === 0 ? filesLookInfo.enterOrderId : filesLookInfo.quarterOrderId }" |
| | | :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="uploadHeader" |
| | | :before-upload="beforeUpload" style="width: 80px !important;" :on-error="onError" ref='upload'> |
| | | <el-button size="small" type="primary" style="height: 38px">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <div style="height: 70vh;overflow-y: auto;" v-if="filesDialogVisible"> |
| | | <ValueTable ref="fileList" |
| | | :url="$api.insOrderPlan.getFileList" |
| | | :delUrl="$api.insOrderPlan.delfile" |
| | | class="value-table" |
| | | :key="upIndex" |
| | | :componentData="componentData"/> |
| | | <ValueTable ref="fileList" :url="$api.insOrderPlan.getFileList" :delUrl="$api.insOrderPlan.delfile" |
| | | class="value-table" :key="upIndex" :componentData="componentData" /> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | export default { |
| | | name: "filesLookVisible", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {ValueTable}, |
| | | components: { ValueTable }, |
| | | props: { |
| | | filesDialogVisible: { |
| | | type: Boolean, |
| | |
| | | }, |
| | | filesLookInfo: { |
| | | type: Object, |
| | | default: () => {} |
| | | default: () => { } |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | dataVisibleIndex: 0, // tabæ éæ©å¼ |
| | | componentData: { |
| | | entity: { |
| | | insOrderId:'' |
| | | insOrderId: '' |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | sort: false, |
| | | init:false, |
| | | init: false, |
| | | do: [ |
| | | { |
| | | id: 'parent', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDown' |
| | | },{ |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | |
| | | isPage: false, |
| | | linkEvent: {}, |
| | | tagField: { |
| | | type:{ |
| | | select:[ |
| | | type: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | label: 'å¾ç' |
| | |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // åæ¢æ°æ®æ¥çtabæ |
| | | handleDataVisibleTab (m, i) { |
| | | handleDataVisibleTab(m, i) { |
| | | this.dataVisibleIndex = i |
| | | this.refreshTable() |
| | | }, |
| | |
| | | this.$refs['fileList'].selectList(e) |
| | | }) |
| | | }, |
| | | handleDown(row){ |
| | | handleDown(row) { |
| | | this.$axios.post(this.$api.insOrderPlan.downFile, { |
| | | id: row.id, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | let url = ''; |
| | | if(res.data.type==1){ |
| | | url = this.javaApi+'/img/'+res.data.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+res.data.fileUrl |
| | | if (res.data.type == 1) { |
| | | url = this.javaApi + '/img/' + res.data.fileUrl |
| | | file.downloadIamge(url, row.fileName) |
| | | } else { |
| | | url = this.javaApi + '/word/' + res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | |
| | | |
| | | }) |
| | | }, |
| | | handleSuccessUp(response, ) { |
| | | handleSuccessUp(response,) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <style scoped> |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .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); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .card { |
| | | list-style-type: none; |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fit, 320px); |
| | | /* justify-content: center; */ |
| | | grid-gap: 16px; |
| | | min-height: 200px; |
| | | } |
| | | |
| | | .card li { |
| | | width: 320px; |
| | | border-radius: 8px 8px 8px 8px; |
| | | box-shadow: 4px 4px 8px 0px rgba(51, 51, 51, 0.04); |
| | | border: 1px solid #EEEEEE; |
| | | margin: 0 !important; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | box-sizing: border-box; |
| | | padding: 26px 16px 16px; |
| | | font-size: 14px; |
| | | position: relative; |
| | | overflow: show; |
| | | } |
| | | |
| | | li .title { |
| | | width: 147px; |
| | | height: 20px; |
| | | background: url(../../../../assets/images/renyuan-title.svg) no-repeat; |
| | | position: absolute; |
| | | top: -6px; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | text-align: center; |
| | | line-height: 20px; |
| | | color: #fff; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="role_manage"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">人ååç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="entity.name"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" |
| | | @click="currentPage = 1, list = [], finishLoding = false, keyMap = {}, refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table" v-loading="loading"> |
| | | <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list" |
| | | v-if="list.length > 0 || loading"> |
| | | <ul class="card" style="margin-top: 10px;"> |
| | | <li v-for="(m, i) in list" :key="i"> |
| | | <el-image style="width: 80px; |
| | | height: 112px;" :src="javaApi + '/img/' + m.pictureUrl"> |
| | | <div slot="error" class="image-error" style="width: 79px; |
| | | height: 110px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <el-image style="width: 195px; |
| | | height: 112px;" :src="javaApi + '/img/' + m.signatureUrl"> |
| | | <div slot="error" class="image-error" style="width: 194px; |
| | | height: 110px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <div class="title">{{ m.name }}</div> |
| | | </li> |
| | | </ul> |
| | | </scroll-pagination> |
| | | <div v-if="list.length < 1 && !loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px"> |
| | | ææ æ°æ® |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScrollPagination from '@/components/index/scroll-paging.vue' |
| | | import { |
| | | selectPersonnelOverview |
| | | } from '@/api/cnas/personnel/personalOverview' |
| | | export default { |
| | | components: { |
| | | ScrollPagination |
| | | }, |
| | | data() { |
| | | return { |
| | | entity: { |
| | | name: null, |
| | | state: 1, |
| | | orderBy: { field: "id", order: "asc" } |
| | | }, |
| | | list: [], |
| | | currentPage: 1, // å½å页 |
| | | pageSize: 16, // ä¸é¡µ16æ¡ |
| | | total: '', |
| | | loading: true, // ç»ä»¶loadingçå±ç¤º,é»è®¤ä¸ºtrue |
| | | finishLoding: false, // å è½½å®æï¼æ¾ç¤ºå·²ç»æ²¡ææ´å¤äº |
| | | keyMap: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 妿valueåå¨ï¼è¡¨ç¤ºç¼åæå¼ï¼é£ä¹é»æ¢è¯·æ± |
| | | if (value) { |
| | | return |
| | | } |
| | | // valueä¸åå¨ï¼è¡¨ç¤ºç¬¬ä¸æ¬¡è¯·æ±,设置å ä½ |
| | | this.keyMap[key] = 'temp' |
| | | if (this.currentPage == 1) { |
| | | this.loading = true |
| | | } |
| | | selectPersonnelOverview({ |
| | | current: this.currentPage, |
| | | size: this.pageSize, |
| | | ...this.entity |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.total = res.data.body.total |
| | | let list = res.data.body.records; |
| | | if (list.length == 0) { |
| | | this.finishLoding = true; |
| | | } else { |
| | | if (list.length < this.pageSize) { |
| | | this.finishLoding = true; |
| | | } |
| | | this.list = this.list.concat(list) |
| | | if (this.total == this.list.length) { |
| | | this.finishLoding = true; |
| | | } |
| | | this.currentPage++; |
| | | } |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | refresh() { |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.finishLoding = false; |
| | | this.entity = { |
| | | name: null, |
| | | state: 1, |
| | | orderBy: { field: "id", order: "asc" } |
| | | }; |
| | | this.refreshTable() |
| | | }, |
| | | // æ»å¨è§¦åºå è½½ |
| | | scrollFn() { |
| | | let clientHeight = document.documentElement.clientHeight - 18; //å¯è§åºå |
| | | let scrollHeight = document.body.scrollHeight; // æ»å¨ææ¡£é«åº¦ |
| | | let scrollTop = parseInt(document.documentElement.scrollTop); // å·²æ»å¨çé«åº¦ |
| | | let height = 300; |
| | | if ( |
| | | scrollTop + clientHeight >= scrollHeight - height && |
| | | scrollHeight != 0 |
| | | ) { |
| | | if (!this.finishLoding && this.currentPage * this.pageSize < this.total) { |
| | | this.currentPage = this.currentPage + 1; |
| | | this.refreshTable(); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | throttle(fn, wait) { |
| | | // å°è£
彿°è¿è¡èæµ |
| | | var timer = null; |
| | | return function () { |
| | | var context = this; |
| | | var args = arguments; |
| | | if (!timer) { |
| | | timer = setTimeout(function () { |
| | | fn.apply(context, args); |
| | | timer = null; |
| | | }, wait); |
| | | } |
| | | }; |
| | | }, |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("scroll", this.throttle(), false); |
| | | }, |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="add"> |
| | | <el-dialog :title="isEdit ? 'ç¼è¾éä»¶èµæ' : 'æ°å¢éä»¶èµæ'" :visible.sync="dialogVisible" width="40%"> |
| | | <el-form :model="form" label-width="80px" size="small"> |
| | | <el-form-item label="æ²é人"> |
| | | <el-select v-model="form.userId" placeholder="è¯·éæ©" style="width: 100%" multiple> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ²éæ¶é´"> |
| | | <el-date-picker v-model="form.communicationTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="è¯·éæ©æ¥ææ¶é´" style="width: 100%"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ²éå°ç¹"> |
| | | <el-input v-model="form.communicationPlace" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ²éå
容"> |
| | | <el-input v-model="form.communicationContent" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="foot"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" :loading="loading" @click="submitForm">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | selectUserList, |
| | | addOrUpdatePersonCommunicationAbility |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | form: { |
| | | id: undefined, |
| | | userId: [], |
| | | communicationTime: undefined, |
| | | communicationPlace: undefined, |
| | | communicationContent: undefined |
| | | }, |
| | | loading: false, |
| | | userList: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc æ¾ç¤ºæ¨¡ææ¡ |
| | | * @param {*} row |
| | | * @param {*} type |
| | | */ |
| | | openDialog(row, type) { |
| | | this.getUserList() |
| | | this.dialogVisible = true |
| | | if (type) { |
| | | this.isEdit = true |
| | | this.form.id = row.id |
| | | this.form.userId = row.userId.split(',').map(m => Number(m)) |
| | | this.form.communicationTime = row.communicationTime |
| | | this.form.communicationPlace = row.communicationPlace |
| | | this.form.communicationContent = row.communicationContent |
| | | } else { |
| | | this.isEdit = false |
| | | this.form.id = undefined |
| | | this.form.userId = [] |
| | | this.form.communicationTime = undefined |
| | | this.form.communicationPlace = undefined |
| | | this.form.communicationContent = undefined |
| | | } |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await selectUserList() |
| | | if (code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm() { |
| | | this.loading = true |
| | | const { code, data } = await addOrUpdatePersonCommunicationAbility({ |
| | | id: this.form.id, |
| | | userId: this.form.userId.join(','), |
| | | communicationTime: this.form.communicationTime, |
| | | communicationPlace: this.form.communicationPlace, |
| | | communicationContent: this.form.communicationContent, |
| | | }) |
| | | if (code == 200) { |
| | | this.$emit('submit') |
| | | this.dialogVisible = false |
| | | } else { |
| | | this.$message.error(this.isEdit ? 'ç¼è¾å¤±è´¥' : 'æ°å¢å¤±è´¥') |
| | | } |
| | | this.loading = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | |
| | | .add>>>.el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <TableCard :showForm="isDepartment" title="æ²éè®°å½"> |
| | | <template v-slot:form> |
| | | <div v-if="isDepartment" class="w100 items_center justify_between"> |
| | | <div></div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openDialog">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="columnData" :height="'calc(100vh - 21em)'" :table-data="tableData" |
| | | :table-loading="loading" style="margin-top: 18px; padding: 0 15px;" :page="page" |
| | | @pagination="pagination"></limsTable> |
| | | </template> |
| | | </TableCard> |
| | | <Add ref="communicateModal" @submit="getTableData"></Add> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import Add from "./Add.vue" |
| | | import { |
| | | personPersonCommunicationAbilityPage, |
| | | deletePersonCommunicationAbility, |
| | | exportPersonCommunicationAbility |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, |
| | | limsTable, |
| | | Add |
| | | }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // departId: 0, |
| | | columnData: [ |
| | | { |
| | | label: 'åºå·', |
| | | prop: 'id' |
| | | }, { |
| | | label: 'æ²é人', |
| | | prop: 'userName' |
| | | }, { |
| | | label: 'æ²éæ¶é´', |
| | | prop: 'communicationTime' |
| | | }, { |
| | | label: 'æ²éå°ç¹', |
| | | prop: 'communicationPlace' |
| | | }, { |
| | | label: 'æ²éå
容', |
| | | prop: 'communicationContent' |
| | | }, { |
| | | label: 'æä½', |
| | | dataType: 'action', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDialog(row, true) |
| | | } |
| | | }, { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPerson(row.id) |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | page: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | openDialog(row, type = false) { |
| | | this.$refs.communicateModal.openDialog(row, type) |
| | | }, |
| | | async getTableData() { |
| | | this.loading = true |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | } |
| | | const { code, data } = await personPersonCommunicationAbilityPage(params) |
| | | if (code == 200) { |
| | | this.page.total = data.total |
| | | this.tableData = data.records |
| | | this.loading = false |
| | | } |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getTableData(); |
| | | }, |
| | | /** |
| | | * @desc è·å设å¤id |
| | | */ |
| | | getDepart(id) { |
| | | this.departId = id |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc å 餿²éè®°å½ |
| | | */ |
| | | delPerson(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | let formData = new FormData() |
| | | formData.append('id', id) |
| | | const { code } = await deletePersonCommunicationAbility(formData) |
| | | if (code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getTableData() |
| | | } |
| | | }) |
| | | }, |
| | | async handleDown(row) { |
| | | exportPersonCommunicationAbility({ id: row.id }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message.error(res.message) |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, row.userName + '-æ²éè®°å½' + '.docx') |
| | | }) |
| | | } |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (newId) { |
| | | this.getTableData(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .w100 { |
| | | width: 100%; |
| | | } |
| | | |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .justify_between { |
| | | justify-content: space-between |
| | | } |
| | | |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 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 '@/utils/date'; |
| | | import { |
| | | selectUserList, |
| | | personJobResponsibilitiesSelect, |
| | | personJobResponsibilitiesSave, |
| | | exportPersonJobResponsibilities, |
| | | personJobResponsibilitiesDelete, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | 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'; |
| | | personJobResponsibilitiesSelect({ |
| | | userName: this.userName, |
| | | [name]: this.search.userId, |
| | | size: this.search.size, |
| | | current: 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]; |
| | | personJobResponsibilitiesSave(this.form).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) { |
| | | exportPersonJobResponsibilities({ id: row.id }).then(res => { |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, row.incumbentName + '-å²ä½èè´£' + '.docx') |
| | | }) |
| | | }, |
| | | // å é¤å²ä½èè´£ |
| | | deletePost(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å 餿¤æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | 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() { |
| | | 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 class="add"> |
| | | <el-dialog :title="isEdit ? 'ç¼è¾éä»¶èµæ' : 'æ°å¢éä»¶èµæ'" :visible.sync="dialogVisible" width="50%"> |
| | | <el-form ref="ruleForm" :rules="rules" :model="form" label-width="100px" size="medium"> |
| | | <el-form-item label="è¯ä¹¦ç¼å·" prop="certificateNumber"> |
| | | <el-input v-model="form.certificateNumber" placeholder="请è¾å
¥" style="width: 100%"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="被任è人å" prop="userId"> |
| | | <el-select v-model="form.userId" placeholder="è¯·éæ©"> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä»»èå²ä½" prop="post"> |
| | | <el-input v-model="form.post" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç论èè¯æç»©" prop="num1"> |
| | | <el-input v-model="form.num1" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä½æè½èè¯æç»©" prop="num2"> |
| | | <el-input v-model="form.num2" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä½ç±»å" prop="operationType"> |
| | | <el-input v-model="form.operationType" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="ä¸å²è¯ä¹¦"> |
| | | <el-input v-model="form.systemFileName" size="small" disabled> |
| | | <el-button slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile(form.systemFileName)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-upload ref="upload" style="float: left; margin: 0 12px 0 20px;" :action="action" |
| | | :show-file-list="false" :on-success="onSuccess" :headers="uploadHeader"> |
| | | <el-button class="uploadFile" slot="trigger" size="small" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="form.remarks" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="foot"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" :loading="loading" @click="submitForm">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | addOrUpdatePersonPostAuthorizationRecord, |
| | | selectUserList, |
| | | deleteCNASFile |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | form: { |
| | | id: undefined, |
| | | certificateNumber: undefined, |
| | | userId: undefined, |
| | | post: undefined, |
| | | operationType: undefined, |
| | | fileList: [], |
| | | fileName: undefined, |
| | | systemFileName: undefined, |
| | | remarks: undefined, |
| | | num2: undefined, |
| | | num1: undefined |
| | | }, |
| | | rules: { |
| | | certificateNumber: [{ required: true, message: '请è¾å
¥è¯ä¹¦ç¼å·', trigger: 'blur' }], |
| | | userId: [{ required: true, message: 'è¯·éæ©è¢«ä»»è人å', trigger: 'change' }], |
| | | post: [{ required: true, message: 'ä»»èå²ä½', trigger: 'blur' }], |
| | | operationType: [{ required: true, message: 'æä½ç±»å', trigger: 'blur' }], |
| | | |
| | | }, |
| | | loading: false, |
| | | userList: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | methods: { |
| | | async onSuccess(response, file, fileList) { |
| | | this.$set(this.form, "systemFileName", response.data) |
| | | }, |
| | | deleteFile(fileName) { |
| | | deleteCNASFile({ fileName }).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.$set(this.form, "systemFileName", null) |
| | | }) |
| | | }, |
| | | async openDialog(row, type) { |
| | | await this.getUserList() |
| | | this.dialogVisible = true |
| | | if (type) { |
| | | this.isEdit = true |
| | | this.form.id = row.id |
| | | this.form.certificateNumber = row.certificateNumber |
| | | this.form.userId = Number(row.userId) |
| | | this.form.post = row.post |
| | | this.form.operationType = row.operationType |
| | | this.form.systemFileName = row.systemFileName |
| | | this.form.remarks = row.remarks |
| | | this.form.num1 = row.num1 |
| | | this.form.num2 = row.num2 |
| | | } else { |
| | | this.isEdit = false |
| | | this.form.id = undefined |
| | | this.form.certificateNumber = undefined |
| | | this.form.userId = undefined |
| | | this.form.post = undefined |
| | | this.form.operationType = undefined |
| | | this.form.fileList = [] |
| | | this.form.fileName = undefined |
| | | this.form.systemFileName = undefined |
| | | this.form.remarks = undefined |
| | | this.form.num1 = undefined |
| | | this.form.num2 = undefined |
| | | } |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await selectUserList() |
| | | if (code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | submitForm() { |
| | | this.$refs.ruleForm.validate(async (valid) => { |
| | | if (valid) { |
| | | await this.submitFormData() |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc ä¸ä¼ æä»¶ |
| | | */ |
| | | beforeUpload(file) { |
| | | this.form.fileList = [file] |
| | | this.form.fileName = file.name |
| | | }, |
| | | /** |
| | | * @desc æäº¤form表å |
| | | */ |
| | | async submitFormData() { |
| | | this.loading = true |
| | | const { code, data } = await addOrUpdatePersonPostAuthorizationRecord({ |
| | | id: this.form.id, |
| | | certificateNumber: this.form.certificateNumber, |
| | | userId: this.form.userId, |
| | | post: this.form.post, |
| | | operationType: this.form.operationType, |
| | | systemFileName: this.form.systemFileName, |
| | | remarks: this.form.remarks, |
| | | num1: this.form.num1, |
| | | num2: this.form.num2 |
| | | }) |
| | | if (code == 200) { |
| | | this.closeDialog() |
| | | this.$emit('refresh') |
| | | } |
| | | this.loading = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | |
| | | .add>>>.el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <TableCard :showForm="isDepartment" title="ä»»èææè®°å½"> |
| | | <template v-slot:form> |
| | | <div v-if="isDepartment" class="w100 items_center justify_between"> |
| | | <div></div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openDialog">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="columnData" :height="'calc(100vh - 21em)'" :table-data="tableData" |
| | | :table-loading="loading" style="margin-top: 18px; padding: 0 15px;" :page="page" |
| | | @pagination="pagination"></limsTable> |
| | | </template> |
| | | </TableCard> |
| | | <Add ref="mandateModal" @refresh="getTableData"></Add> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from "@/components/TableCard/index.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import Add from "./Add.vue" |
| | | import { |
| | | PersonPostAuthorizationRecordPage, |
| | | deletePersonPostAuthorizationRecord, |
| | | exportPersonPostAuthorizationRecord |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | import { nextTick } from "vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, |
| | | limsTable, |
| | | Add |
| | | }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // departId: 0, |
| | | columnData: [ |
| | | { |
| | | label: 'åºå·', |
| | | prop: 'id' |
| | | }, { |
| | | label: 'è¯ä¹¦ç¼å·', |
| | | prop: 'certificateNumber' |
| | | }, { |
| | | label: '被任è人å', |
| | | prop: 'userName' |
| | | }, { |
| | | label: 'ä»»èå²ä½', |
| | | prop: 'post' |
| | | }, { |
| | | label: 'ç论èè¯æç»©', |
| | | prop: 'num1' |
| | | }, { |
| | | label: 'æä½æè½èè¯æç»©', |
| | | prop: 'num2' |
| | | }, { |
| | | label: 'æä½æ¶é´', |
| | | prop: 'updateTime' |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks', |
| | | width: 300 |
| | | }, { |
| | | label: 'æä½', |
| | | dataType: 'action', |
| | | width: 160, |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDialog(row, true) |
| | | } |
| | | }, { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteNotify(row.id) |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | page: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | console.log(this.departId) |
| | | }, |
| | | methods: { |
| | | openDialog(row, type = false) { |
| | | this.$refs.mandateModal.openDialog(row, type) |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢è¡¨æ ¼æ°æ® |
| | | */ |
| | | async getTableData() { |
| | | this.loading = true |
| | | await nextTick() |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | } |
| | | const { code, data } = await PersonPostAuthorizationRecordPage(params) |
| | | if (code == 200) { |
| | | this.page.total = data.total |
| | | this.tableData = data.records |
| | | this.loading = false |
| | | } |
| | | }, |
| | | /** |
| | | * @desc å页 |
| | | */ |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getTableData(); |
| | | }, |
| | | /** |
| | | * @desc å é¤ä»»èè®°å½ |
| | | */ |
| | | deleteNotify(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.delMandate(id) |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc apiå é¤ |
| | | */ |
| | | async delMandate(id) { |
| | | const formData = new FormData() |
| | | formData.append('id', id) |
| | | const { code, data } = await deletePersonPostAuthorizationRecord(formData) |
| | | if (code == 200) { |
| | | this.$message({ message: 'å 餿å', type: 'success' }) |
| | | this.getTableData() |
| | | } else { |
| | | this.$message({ message: 'å é¤å¤±è´¥', type: 'error' }) |
| | | } |
| | | }, |
| | | /** |
| | | * @desc è·å设å¤id |
| | | */ |
| | | getDepart(id) { |
| | | this.departId = id |
| | | this.getTableData() |
| | | }, |
| | | handleDown(row) { |
| | | exportPersonPostAuthorizationRecord({ id: row.id }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message.error(res.message) |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'ä»»èææ-' + row.certificateNumber + '-' + row.post + '.docx') |
| | | }) |
| | | } |
| | | }, |
| | | // watch: { |
| | | // departId: { |
| | | // handler(newId, oldId) { |
| | | // if (newId) { |
| | | // this.getTableData(); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .w100 { |
| | | width: 100%; |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .justify_between { |
| | | justify-content: space-between |
| | | } |
| | | </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> |
| | | <limsTable :column="yearColumnData" :height="'calc(100vh - 20em)'" :table-data="tableData" |
| | | :table-loading="yearLoading" style="padding: 0 15px;margin-bottom: 16px" :page="search" |
| | | @pagination="pagination"> |
| | | <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> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </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 limsTable from "@/components/Table/lims-table.vue"; |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import { |
| | | exportPersonnelCapacity, |
| | | personPersonnelCapacityPage, |
| | | addOrUpdatePersonPersonnelCapacity, |
| | | confirmPersonnelCapability, |
| | | deletePersonPersonnelCapacity, |
| | | selectUserList, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | dicts: ['responsibilities_list'], |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | components: { |
| | | limsTable, |
| | | 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) { |
| | | exportPersonnelCapacity({ id: row.id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, "人åè½å导åº" + '.docx') |
| | | }) |
| | | }, |
| | | // æ¥è¯¢ |
| | | refreshTable() { |
| | | this.getList(this.departId); |
| | | }, |
| | | // è·å人åè½ååè¡¨ä¿¡æ¯ |
| | | getList(userId) { |
| | | this.search.userId = userId; |
| | | const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.yearLoading = true |
| | | personPersonnelCapacityPage({ |
| | | userName: this.userName, |
| | | [name]: this.search.userId, |
| | | size: this.search.size, |
| | | current: 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.responsibilities = this.dict.type.responsibilities_list; |
| | | }, |
| | | 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) { |
| | | addOrUpdatePersonPersonnelCapacity(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå'); |
| | | this.getList(this.departId); |
| | | this.form.id = null; |
| | | this.dialogVisible = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | verifyGet(id) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤æ¬æ¡ä¿¡æ¯?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | confirmPersonnelCapability({ 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(() => { |
| | | deletePersonPersonnelCapacity({ 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() { |
| | | selectUserList().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data; |
| | | } |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.search.current = page; |
| | | this.search.size = limit; |
| | | this.getList(); |
| | | }, |
| | | }, |
| | | 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="synchronous" :loading="synchronousLoading">åæ¥ç¬¬ä¸æ¹ä¿¡æ¯</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: 180px;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.departmentCode" 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"> |
| | | </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"> |
| | | </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="ååå·¥" size="mini">ååå·¥</el-radio> |
| | | <el-radio label="æ£å¼å·¥" 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"> |
| | | </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"> |
| | | </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"> |
| | | </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.personBasicInfoAge" :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"> |
| | | </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='å·²å©' size="mini">å·²å©</el-radio> |
| | | <el-radio label='æªå©' 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='æ¯' size="mini">æ¯</el-radio> |
| | | <el-radio label='å¦' 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"> |
| | | </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.companyEmail" 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"> |
| | | </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"> |
| | | </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"> |
| | | </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" :headers="uploadHeader" |
| | | :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" :headers="uploadHeader" |
| | | :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%;"> |
| | | <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="级å«" prop="level"> |
| | | <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"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="å¤å°ä»¶" prop="copy"> |
| | | <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="åä»¶" prop="original"> |
| | | <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" :headers="uploadHeader" :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 { |
| | | getEmployees, |
| | | getAnnex, |
| | | updateAnnex, |
| | | getAnnexByUserId, |
| | | addAnnex, |
| | | deleteAnnex, |
| | | getCNASPersonnelInfo, |
| | | saveCNASPersonnelInfo, |
| | | deleteCNASFile |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | dicts: ['personnl_type'], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { return {} } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | synchronousLoading: false, |
| | | 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, |
| | | } |
| | | }, |
| | | created() { |
| | | this.init() |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | methods: { |
| | | synchronous() { |
| | | console.log('åºæ¬ä¿¡æ¯', this.clickNodeVal); |
| | | this.synchronousLoading = true |
| | | getEmployees({ userId: this.clickNodeVal.userId }).then(res => { |
| | | this.synchronousLoading = false |
| | | this.getUserBasisInfo(this.clickNodeVal.userId) |
| | | this.$message.success("忥æå") |
| | | |
| | | }) |
| | | }, |
| | | annexAdd(type, row) { |
| | | if (type === 1) { |
| | | this.title = 'ç¼è¾éä»¶èµæ' |
| | | this.addOrupdate = 1 |
| | | 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) { |
| | | updateAnnex(this.annex).then(res => { |
| | | if (res.code == 200) { |
| | | 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 |
| | | addAnnex(this.annex).then(res => { |
| | | if (res.code == 200) { |
| | | 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(() => { |
| | | 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) { |
| | | this.$download.saveAs(fileName, 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) { |
| | | getCNASPersonnelInfo({ 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 = '' |
| | | } |
| | | } |
| | | saveCNASPersonnelInfo(this.form).then(res => { |
| | | this.saveLoading = false |
| | | this.isSave = true |
| | | this.getUserBasisInfo(this.clickNodeVal.userId) |
| | | this.$message.success('ä¿åæåï¼') |
| | | }) |
| | | }, |
| | | // å人ååç±»çåå
¸ |
| | | getComparisonList() { |
| | | tthis.personnelClassification = this.dict.type.personnl_type; |
| | | this.checkList = this.form.personnelClassification.split('ï¼') |
| | | }, |
| | | clickPersonnelClassificationSure() { |
| | | this.dialogVisible = false |
| | | this.form.personnelClassification = this.checkList.filter(m => m).join('ï¼') |
| | | }, |
| | | async deleteFile(fileName, entityVal) { |
| | | await deleteCNASFile({ 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 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="synchronousLoading" size="small" type="primary" @click="synchronous" |
| | | :v-show="departId">åæ¥ç¬¬ä¸æ¹äººåä¿¡æ¯</el-button> |
| | | <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="åºå·" width="60"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (page.current - 1) * page.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </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 '@/components/Table/value-table.vue'; |
| | | import { |
| | | getEmployees, |
| | | basicInformationOfPersonnelSelectPage, |
| | | delUserDepardLimsId, |
| | | upUserDepardLimsId, |
| | | exportPersonBasicInfo, |
| | | exportPersonBasicInfoById, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | 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 { |
| | | synchronousLoading: false, |
| | | 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: { |
| | | synchronous() { |
| | | console.log('departId', this.departId); |
| | | this.$message.warning("æ£å¨åæ¥ï¼è¯·ç¨å...") |
| | | this.synchronousLoading = true |
| | | getEmployees({ departId: this.departId }).then(res => { |
| | | this.synchronousLoading = false |
| | | this.$message.success("忥æå") |
| | | }) |
| | | }, |
| | | /** |
| | | * @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; |
| | | basicInformationOfPersonnelSelectPage({ ...this.page, ...this.entit }).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(() => { |
| | | 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; |
| | | 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; |
| | | exportPersonBasicInfo(entity).then(res => { |
| | | this.outLoading = false; |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '人åä¿¡æ¯.xlsx') |
| | | }); |
| | | }, |
| | | downPerson(row) { |
| | | exportPersonBasicInfoById({ id: row.userId }).then(res => { |
| | | this.$download.saveAs(res.data, res.data) |
| | | this.$message.success('ä¸è½½æå') |
| | | }); |
| | | } |
| | | }, |
| | | 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" :show="currshowlist" @close="$emit('update:currshowlist', false)" |
| | | 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-form-item label="å¹è®æä»½:" prop="trainingDate"> |
| | | <el-select v-model="trainingPlan.trainingDate"> |
| | | <el-option v-for="(v, i) in months" :key="i" :label="v.label" :value="v.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®æ¥æ:" prop="trainingDateTwo"> |
| | | <el-date-picker v-model="trainingPlan.trainingDateTwo" type="date" value-format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </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" multiple clearable filterable placeholder="è¯·éæ©" |
| | | size="small" style="width: 100%"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name"> |
| | | </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-select v-model="trainingPlan.holdingDepartment" placeholder="è¯·éæ©"> |
| | | <el-option v-for="(v, i) in departLims" :key="i" :label="v.name" :value="v.id"></el-option> |
| | | </el-select> |
| | | <!-- |
| | | <el-input |
| | | v-model="trainingPlan.holdingDepartment" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | ></el-input> --> |
| | | </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-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> |
| | | import { |
| | | selectDepartLims, |
| | | addOrUpdatePersonTrainingDetailed, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | props: { |
| | | currshowlist: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentChangeRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | }, |
| | | }, |
| | | }, |
| | | name: "Add", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | var trainingLecturerIdValidate = (rule, value, callback) => { |
| | | if (typeof value !== "undefined" && value.length == 0) { |
| | | callback(new Error("è¯·éæ©è®²å¸")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | departLims: [], |
| | | months: [ |
| | | { label: "1æ", value: "1æ" }, |
| | | { label: "2æ", value: "2æ" }, |
| | | { label: "3æ", value: "3æ" }, |
| | | { label: "4æ", value: "4æ" }, |
| | | { label: "5æ", value: "5æ" }, |
| | | { label: "6æ", value: "6æ" }, |
| | | { label: "7æ", value: "7æ" }, |
| | | { label: "8æ", value: "8æ" }, |
| | | { label: "9æ", value: "9æ" }, |
| | | { label: "10æ", value: "10æ" }, |
| | | { label: "11æ", value: "11æ" }, |
| | | { label: "12æ", value: "12æ" }, |
| | | ], |
| | | addTrainingPlanDia: false, |
| | | trainingPlan: { |
| | | id: "", |
| | | planId: "", |
| | | trainingDate: "", |
| | | trainingDateTwo: "", |
| | | classHour: "", |
| | | openingTime: "", |
| | | endTime: "", |
| | | trainingObjectives: "", |
| | | participants: "", |
| | | trainingContent: "", |
| | | trainingLecturerId: undefined, |
| | | projectCredits: "", |
| | | placeTraining: "", |
| | | trainingMode: "", |
| | | holdingDepartment: "", |
| | | }, |
| | | trainingPlanRules: { |
| | | trainingDate: [ |
| | | { required: true, message: "è¯·éæ©å¹è®æ¥æ", trigger: "change" }, |
| | | ], |
| | | trainingDateTwo: [ |
| | | { required: true, message: "è¯·éæ©å¹è®æ¥æ", trigger: "change" }, |
| | | ], |
| | | openingTime: [ |
| | | { required: true, message: "è¯·éæ©å¼å§æ¶é´", trigger: "change" }, |
| | | ], |
| | | endTime: [ |
| | | { required: true, message: "è¯·éæ©ç»ææ¶é´", trigger: "change" }, |
| | | ], |
| | | trainingContent: [ |
| | | { required: true, message: "请è¾å
¥å¹è®å
容", trigger: "blur" }, |
| | | ], |
| | | trainingLecturerId: [ |
| | | { |
| | | required: true, |
| | | validator: trainingLecturerIdValidate, |
| | | trigger: "change", |
| | | }, |
| | | ], |
| | | }, |
| | | responsibleOptions: [], |
| | | }; |
| | | }, |
| | | created() { |
| | | this.departLims = []; |
| | | selectDepartLims().then((res) => { |
| | | this.departLims = res.data; |
| | | }); |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | showDialog(id) { |
| | | this.trainingPlan.planId = id; |
| | | this.getUserList(); |
| | | // this.addTrainingPlanDia = true; |
| | | }, |
| | | showEditDialog(row) { |
| | | this.getUserList(); |
| | | let data = JSON.parse(JSON.stringify(row)); |
| | | |
| | | console.log(data.trainingLecturerId); |
| | | let list = data.trainingLecturerId.split(/ã|ï¼|,|\\s+/); |
| | | this.$set(this.trainingPlan, "trainingLecturerId", list); |
| | | this.$set(this.trainingPlan, "id", data.id); |
| | | this.$set(this.trainingPlan, "trainingDate", data.trainingDate); |
| | | this.$set(this.trainingPlan, "trainingDateTwo", data.trainingDateTwo); |
| | | this.$set(this.trainingPlan, "classHour", data.classHour); |
| | | this.$set(this.trainingPlan, "openingTime", data.openingTime); |
| | | this.$set(this.trainingPlan, "endTime", data.endTime); |
| | | this.$set( |
| | | this.trainingPlan, |
| | | "trainingObjectives", |
| | | data.trainingObjectives |
| | | ); |
| | | this.$set(this.trainingPlan, "participants", data.participants); |
| | | this.$set(this.trainingPlan, "projectCredits", data.projectCredits); |
| | | this.$set(this.trainingPlan, "placeTraining", data.placeTraining); |
| | | this.$set(this.trainingPlan, "trainingContent", data.trainingContent); |
| | | this.$set(this.trainingPlan, "trainingMode", data.trainingMode); |
| | | this.$set(this.trainingPlan, "holdingDepartment", data.holdingDepartment); |
| | | this.$set(this.trainingPlan, "planId", data.planId); |
| | | |
| | | console.log("222", this.trainingPlan); |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | submitAdd() { |
| | | this.$refs.trainingPlan.validate((valid) => { |
| | | if (valid) { |
| | | // å°å¹è®è®²å¸å¼å°è£
|
| | | this.trainingPlan.trainingLecturerId = |
| | | this.trainingPlan.trainingLecturerId.join(","); |
| | | console.log( |
| | | "this.trainingPlan.trainingLecturerId", |
| | | this.trainingPlan.trainingLecturerId |
| | | ); |
| | | const personTrainingDetailed = this.trainingPlan; |
| | | console.log("personTrainingDetailed", personTrainingDetailed); |
| | | addOrUpdatePersonTrainingDetailed(personTrainingDetailed).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("æäº¤æå"); |
| | | this.closeAdd(); |
| | | this.dialogVisible = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeAdd() { |
| | | this.$refs.trainingPlan.resetFields(); |
| | | this.$emit("search"); |
| | | this.$emit("searchPlan"); |
| | | this.addTrainingPlanDia = false; |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // addTrainingPlanDia(newVal) { |
| | | // if (newVal) { |
| | | // this.trainingPlan.planId = null; |
| | | // } |
| | | // }, |
| | | currshowlist(newValue) { |
| | | this.addTrainingPlanDia = this.currshowlist; |
| | | if (!newValue) { |
| | | this.closeAdd(); |
| | | this.trainingPlan = { |
| | | id: "", |
| | | planId: "", |
| | | trainingDate: "", |
| | | classHour: "", |
| | | openingTime: "", |
| | | endTime: "", |
| | | trainingObjectives: "", |
| | | participants: "", |
| | | trainingContent: "", |
| | | trainingLecturerId: undefined, |
| | | projectCredits: "", |
| | | placeTraining: "", |
| | | trainingMode: "", |
| | | holdingDepartment: "", |
| | | }; |
| | | } |
| | | if (this.currshowlist) { |
| | | this.$nextTick(() => { |
| | | if (this.trainingPlan.trainingLecturerId.length == 0) { |
| | | this.trainingPlan.trainingLecturerId = undefined; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </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" :disabled="![1, 4].includes(currentRow.state)">{{ |
| | | currentRow.assessmentUserId ? 'ä¿å' : 'æäº¤' }}</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.trainingLecturerId }} </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 || currentRow.assessmentUserId" :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 || ((currentRow.assessmentUserId !== user.userId) && ![35, 16, 36].includes(user.userId)) || !currentRow.assessmentUserId" |
| | | :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 || currentRow.assessmentUserId" 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-col :span="12"> |
| | | <el-form-item label="è¯ä»·æ¶é´"> |
| | | <el-date-picker v-model="trainingForm.assessmentDate" |
| | | :disabled="currentRow.state == 1 || ((currentRow.assessmentUserId !== user.userId) && ![35, 16, 36].includes(user.userId)) || !currentRow.assessmentUserId" |
| | | style="width:40%" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®æè¦"> |
| | | <el-input v-model="trainingForm.trainingAbstract" |
| | | :disabled="currentRow.state == 1 || currentRow.assessmentUserId" :rows="2" placeholder="请è¾å
¥" |
| | | size="small" style="width: 79%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item> |
| | | <!-- <el-upload |
| | | ref="upload" |
| | | :action="action" |
| | | :before-upload="beforeUpload" |
| | | :on-error="onError" |
| | | :data="uploadData" |
| | | :headers="uploadHeader" |
| | | :on-success="attachmentUpload" |
| | | > |
| | | <el-button size="small" type="primary">ç¹å»ä¸ä¼ </el-button> |
| | | </el-upload> --> |
| | | <el-button type="primary" size="small" @click="attachmentFrame = true">éä»¶</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12" :offset="12"> |
| | | <el-image |
| | | v-if="currentRow.url" |
| | | style="width: 70%; height: 100px" |
| | | :src="javaApi + '/img/' + currentRow.url"> |
| | | </el-image> |
| | | </el-col> --> |
| | | </el-form> |
| | | </el-row> |
| | | </div> |
| | | <!-- æä»¶é¢è§ --> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="previewFile" |
| | | style="height: 90vh;overflow-y: auto;top: 0" /> |
| | | </el-dialog> |
| | | <!-- éä»¶å¼¹æ¡ --> |
| | | <el-dialog title="éä»¶" :visible.sync="attachmentFrame" width="70%" border :before-close="handleClose"> |
| | | <el-upload ref="upload" :action="action" :before-upload="beforeUpload" :on-error="onError" :data="uploadData" |
| | | :headers="uploadHeader" :on-success="attachmentUpload" style="margin-bottom: 10px"> |
| | | <el-button size="small" type="primary" :disabled="currentRow.state == 1">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload> |
| | | <el-table ref="fileData" :data="fileData" height="400px"> |
| | | <el-table-column label="åºå·" type="index" width="100" header-align="center" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶åç§°" prop="fileName" header-align="center" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" fixed="right" width="200px" header-align="center" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="preview(scope.row)">é¢è§</el-button> |
| | | <el-button type="text" size="small" @click="download(scope.row)">ä¸è½½</el-button> |
| | | <el-button type="text" style="color: red;" size="small" @click="deleteFile(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="attachmentFrame = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="attachmentFrame = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | |
| | | <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-select v-model="scope.row.examinationResults" :disabled="currentRow.state === 1" size="small" |
| | | style="width: 100%" @change="updatePersonResult(scope.row)"> |
| | | <el-option label="åæ ¼" value="åæ ¼"></el-option> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | </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 '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import ValueTable from '@/components/Table/value-table.vue'; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { |
| | | fileDownLoad, |
| | | deleteFile, |
| | | getFileData, |
| | | trainingAndAssessmentRecordsPage, |
| | | outOfFocusPreservation, |
| | | newPersonnelAddedToTrainingRecords, |
| | | deleteTrainingAndAssessmentRecords, |
| | | trainingAndAssessmentRecordsAdded, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | name: 'Edit', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ValueTable, limsTable, TableCard, filePreview }, |
| | | props: { |
| | | currentRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | previewFile: '', |
| | | lookDialogVisible: false, |
| | | user: {}, |
| | | fileData: [], |
| | | attachmentFrame: false, |
| | | isSelectedList: [], // ç¦ç¨çå¤é |
| | | userName: undefined, |
| | | trainingForm: { |
| | | code: '111111', |
| | | date: '2024-10-10', |
| | | }, |
| | | uploadData: {}, |
| | | 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: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personTraining/fileUpload'; |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | mounted() { |
| | | this.trainingForm = JSON.parse(JSON.stringify(this.currentRow)) |
| | | this.getInfo() |
| | | this.getUserList() |
| | | this.getFileData(this.trainingForm.id) |
| | | // è·åå½åç»å½äººä¿¡æ¯ |
| | | this.loginPerson(); |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // éä»¶é¢è§ |
| | | preview(row) { |
| | | let folder = ''; |
| | | if (row.fileUrl.includes('xls')) { |
| | | folder = 'excel' |
| | | } else if (row.fileUrl.includes('docx')) { |
| | | folder = 'word' |
| | | } else { |
| | | folder = 'img' |
| | | } |
| | | this.previewFile = this.javaApi + folder + row.fileUrl |
| | | this.$nextTick(() => { |
| | | this.lookDialogVisible = true |
| | | }) |
| | | }, |
| | | // ä¸è½½ |
| | | download(row) { |
| | | fileDownLoad({ id: row.id }).then(res => { |
| | | console.log('2123'); |
| | | const blob = new Blob([res], { type: row.mime }); |
| | | this.$download.saveAs(blob, row.fileName) |
| | | }) |
| | | }, |
| | | |
| | | // å é¤ |
| | | deleteFile(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteFile({ id: row.id }).then(res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getFileData(this.trainingForm.id); |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | | // æ¥è¯¢ |
| | | getFileData(id) { |
| | | getFileData({ detailedId: id }).then(res => { |
| | | this.fileData = res.data |
| | | }) |
| | | }, |
| | | // éä»¶ä¸ä¼ æåçé©å |
| | | attachmentUpload(res, file, fileList) { |
| | | // ç»å¾çè·¯å¾èµå¼ |
| | | this.$message.success('ä¸ä¼ æå') |
| | | this.currentRow.url = res.data.url |
| | | this.$refs.upload.clearFiles(); |
| | | this.getFileData(this.trainingForm.id); |
| | | }, |
| | | // 失败çé©å |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | }, |
| | | // ä¸ä¼ åçé©å |
| | | beforeUpload(file) { |
| | | // ç»ä¼ éçåæ°èµå¼ |
| | | this.$set(this.uploadData, "id", this.currentRow.id) |
| | | }, |
| | | // å½åç»å½äººä¿¡æ¯ |
| | | loginPerson() { |
| | | this.user = { |
| | | userId: this.userId |
| | | } |
| | | }, |
| | | // è·åå½åæ°æ® |
| | | async getInfo() { |
| | | this.trainingLoading = true |
| | | trainingAndAssessmentRecordsPage({ |
| | | trainingDetailedId: this.currentRow.id, |
| | | userName: this.userName |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.trainingTableData = res.data |
| | | } |
| | | this.trainingLoading = false |
| | | }) |
| | | }, |
| | | async updatePersonResult(row) { |
| | | const { code } = await outOfFocusPreservation(row) |
| | | 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); |
| | | }); |
| | | newPersonnelAddedToTrainingRecords(list).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) |
| | | deleteTrainingAndAssessmentRecords(formData) |
| | | .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() { |
| | | console.log('this.currentRow.state', this.currentRow.state); |
| | | if (this.currentRow.state !== 4 && this.currentRow.state !== 1) { |
| | | this.$message.warning("å½åç¶ææ æ³æäº¤/æ¤éï¼") |
| | | return |
| | | } |
| | | // 妿çäº4 è¡¨ç¤ºè¯¥ç¶æä¸ºå·²ç»æï¼1 è¡¨ç¤ºå·²å®æ |
| | | let state = 4 |
| | | if (this.currentRow.assessmentUserId == this.user.userId) { |
| | | state = 1 |
| | | } |
| | | let data = { |
| | | assessmentMethod: this.trainingForm.assessmentMethod, |
| | | comprehensiveAssessment: this.trainingForm.comprehensiveAssessment, |
| | | trainingDetailedId: this.trainingForm.id, |
| | | assessmentUserId: this.currentRow.assessmentUserId ? this.currentRow.assessmentUserId : this.trainingForm.assessmentUserId, |
| | | assessmentDate: this.trainingForm.assessmentDate, |
| | | state: state, |
| | | trainingAbstract: this.trainingForm.trainingAbstract |
| | | } |
| | | const { code } = await trainingAndAssessmentRecordsAdded(data) |
| | | if (code === 200) { |
| | | this.currentRow.state = state |
| | | this.$message.success("æä½æå") |
| | | // this.$emit('refresh',this.currentRow.id) |
| | | } |
| | | }, |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.userList = res.data |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.attachmentFrame = false; |
| | | }, |
| | | } |
| | | }; |
| | | </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 && flag"> |
| | | <TableCard title="年度计å表"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>å建人</span> |
| | | <el-input v-model="pagination.compilerName" class="search" placeholder="请è¾å
¥" size="mini"></el-input> |
| | | <el-button size="mini" type="primary" @click="getYearPlanList(departId)">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="mini" type="primary" @click="uploadDia = true">导å
¥</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="yearPlanColumn" :currentChange="currentChange" :height="'130'" |
| | | :table-data="yearPlanTableData" :table-loading="yearLoading" highlightCurrentRow style="padding: 0 15px" |
| | | :page="pagination" @pagination="paginationMetod"> |
| | | </limsTable> |
| | | </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="mini"></el-input> |
| | | <!-- <span>课ç¨ç¼å·</span> |
| | | <el-input v-model="inDetailForm.courseCode" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input> --> |
| | | <span style="margin-right: 4px">å¹è®æ¥æ</span> |
| | | <el-date-picker v-model="inDetailForm.trainingDate" clearable format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="mini" type="date" value-format="yyyy-MM-dd"></el-date-picker> |
| | | <el-button size="mini" style="margin-left: 10px" type="primary" @click="searchTable">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div style="display: flex; align-items: center"> |
| | | <el-button v-if="isDepartment && currentChangeRow && isOperation && flag" size="mini" |
| | | @click="batchDelete">æ¹éå é¤</el-button> |
| | | <el-button v-if="isDepartment && currentChangeRow && isOperation && flag" size="mini" type="primary" |
| | | @click="addTrainingPlan">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <el-tabs v-model="activeName" style="margin-left: 15px"> |
| | | <el-tab-pane label="æªå¹è®" name="first"> |
| | | <limsTable :column="inDetailPlanColumn" :handleSelectionChange="handleSelectionChange" |
| | | :height="tableHeight + ''" :isSelection="true" :table-data="inDetailPlanTableData" |
| | | :table-loading="yearLoading" style="padding: 0 15px" :page="inDetailPagination" |
| | | @pagination="paginationmethod0"> |
| | | </limsTable> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å·²ç»æ" name="second"> |
| | | <limsTable :column="inDetailPlanColumn" :handleSelectionChange="handleSelectionChange" |
| | | :height="tableHeight + ''" :isSelection="true" :table-data="inDetailPlanTableData" |
| | | :table-loading="yearLoading" style="padding: 0 15px" :page="inDetailPagination" |
| | | @pagination="paginationmethod0"> |
| | | </limsTable> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <Add ref="addPlan" :currshowlist.sync="addInDetail" :currentChangeRow="currentChangeRow" |
| | | @search="getInDetailPlan(currentRowId, departId)" @searchPlan="refreshYearPlanList(departId2)"></Add> |
| | | <Edit v-if="editPlanShow" ref="editPlan" :currentRow="currentRow" :key="editKey" @refresh="refresh" |
| | | @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 + '/personTraining/personTrainingImport'" :auto-upload="false" |
| | | :before-upload="beforeUpload" :file-list="fileList" :headers="uploadHeader" :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 TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import Add from "./AddInDetail.vue"; |
| | | import Edit from "./Edit.vue"; |
| | | import { |
| | | deleteDetail, |
| | | personTrainingSelect, |
| | | queryTheAnnualPlanDetailsTable, |
| | | personTrainingDelete, |
| | | reviewAnnualPersonnelTraining, |
| | | approveAnnualPersonnelTraining, |
| | | exportPersonTrainingRecord, |
| | | claimOfTrainingAndAssessmentRecords, |
| | | exportPersonTraining, |
| | | deleteAnnualPlanDetailTable, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | |
| | | export default { |
| | | name: "PersonnelTraining", |
| | | components: { Add, limsTable, TableCard, Edit }, |
| | | props: { |
| | | flag: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | }, |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | currentPlanId: null, |
| | | activeName: "first", |
| | | addInDetail: false, |
| | | departId2: null, |
| | | editKey: 1, |
| | | search: {}, |
| | | superviseForm: {}, |
| | | inDetailForm: { |
| | | trainingLecturerName: "", |
| | | courseCode: "", |
| | | trainingDate: "", |
| | | }, |
| | | yearLoading: false, |
| | | yearPlanTableData: [], // 年度计åè¡¨æ°æ® |
| | | yearPlanColumn: [ |
| | | { |
| | | label: "æä»¶åç§°", |
| | | width: "160px", |
| | | minWidth: "160px", |
| | | prop: "fileName", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | 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 || (row.departId == 18 && row.currentId != 10 && row.currentId != 16) || (row.departId == 19 && row.currentId != 35 && row.currentId != 16)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.handleCheck(row.id); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | disabled: (row) => { |
| | | if (row.approvalStatus === 1 || (row.currentId != 11 && row.currentId != 16)) { |
| | | 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", |
| | | isShow: this.flag, |
| | | formatData: (params) => { |
| | | if (params === true) { |
| | | return "å·²æ¥å"; |
| | | } else { |
| | | return "æªæ¥å"; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === true) { |
| | | return "success"; |
| | | } else { |
| | | return "info"; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "æ¥å人æ°", |
| | | prop: "enrollment", |
| | | width: "100px", |
| | | isShow: !this.flag, |
| | | }, |
| | | { |
| | | label: "å¹è®ç®æ ", |
| | | prop: "trainingObjectives", |
| | | width: "160px", |
| | | minWidth: "160px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | label: "å¹è®å
容", |
| | | prop: "trainingContent", |
| | | width: "160px", |
| | | minWidth: "160px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | label: "å¹è®æ¹å¼", |
| | | prop: "trainingMode", |
| | | width: "140px", |
| | | minWidth: "140px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | 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: "140px", |
| | | minWidth: "140px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | label: "举åé¨é¨", |
| | | prop: "holdingDepartmentName", |
| | | width: "140px", |
| | | minWidth: "140px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | label: "å¹è®å°ç¹", |
| | | prop: "placeTraining", |
| | | width: "160px", |
| | | minWidth: "160px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | label: "å¹è®è®²å¸", |
| | | prop: "trainingLecturerId", |
| | | width: "120px", |
| | | minWidth: "120px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | label: "å¹è®æ¥æ", |
| | | prop: "trainingDateTwo", |
| | | width: "140px", |
| | | }, |
| | | { |
| | | label: "å¼å§æ¶é´", |
| | | prop: "openingTime", |
| | | width: "120px", |
| | | }, |
| | | { |
| | | label: "课æ¶", |
| | | prop: "classHour", |
| | | width: "100px", |
| | | }, |
| | | { |
| | | label: "夿³¨", |
| | | prop: "remarks", |
| | | width: "120px", |
| | | minWidth: "120px", |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | width: "240", |
| | | label: "æä½", |
| | | fixed: "right", |
| | | operation: [ |
| | | // è¶
è¿ä¼è®®å¼å§æ¶é´å°±ä¸è½è®¤é¢äº |
| | | { |
| | | name: "æ¥å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleClaim(row); |
| | | }, |
| | | disabled: (row) => { |
| | | if ( |
| | | row.whetherClaim === true || |
| | | row.trainingDateTwo < this.$moment().format("YYYY-MM-DD") |
| | | ) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: "ç»ææç»", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.editInDetail(row); |
| | | }, |
| | | showHide: (row) => { |
| | | if (row.isDisabled == 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: "导åº", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.downLoadInDetail(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | color: "#f56c6c", |
| | | clickFun: (row) => { |
| | | this.deleteDetail(row); |
| | | }, |
| | | showHide: (row) => { |
| | | if (row.isDisabled == 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.editDetail(row); |
| | | }, |
| | | showHide: (row) => { |
| | | if (row.isDisabled == 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | pagination: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | compilerName: "", |
| | | }, |
| | | inDetailPagination: { |
| | | size: 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: {}, |
| | | tableHeight: 0, |
| | | }; |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener("resize", this.getTableHeight); |
| | | }, |
| | | created() { |
| | | this.getTableHeight(); |
| | | }, |
| | | mounted() { |
| | | window.addEventListener("resize", this.getTableHeight); |
| | | this.token = { |
| | | token: sessionStorage.getItem("token"), |
| | | }; |
| | | if (this.isDepartment) { |
| | | this.getYearPlanList(this.departId); |
| | | } else { |
| | | this.getInDetailPlan("", this.departId); |
| | | } |
| | | console.log("this.flag", this.flag); |
| | | }, |
| | | methods: { |
| | | //卿è·åè¡¨æ ¼é«åº¦ |
| | | getTableHeight() { |
| | | const otherHeight = 548; // å
¶ä½é«åº¦ |
| | | const tableH = 50; // è·ç¦»é¡µé¢ä¸æ¹çé«åº¦ |
| | | const tableHeightDetil = window.innerHeight - tableH; |
| | | if (tableHeightDetil <= 300) { |
| | | this.tableHeight = 200; |
| | | } else { |
| | | this.tableHeight = window.innerHeight - tableH - otherHeight; |
| | | } |
| | | }, |
| | | // ç¼è¾æç» |
| | | editDetail(row) { |
| | | this.addInDetail = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.addPlan.showEditDialog(row); |
| | | }); |
| | | }, |
| | | // å é¤æç» |
| | | deleteDetail(row) { |
| | | this.$confirm("æ¯å¦å é¤?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | deleteDetail({ id: row.id }).then((res) => { |
| | | this.$message.success("å 餿å"); |
| | | this.searchTable(); |
| | | }); |
| | | }); |
| | | }, |
| | | searchTable() { |
| | | // å°é¡µç 设为 |
| | | this.inDetailPagination.current = 1 |
| | | this.getInDetailPlan(this.currentRowId); |
| | | }, |
| | | // æ¥è¯¢-年度计å表 |
| | | getYearPlanList(userId) { |
| | | const name = this.isDepartment ? "departmentId" : "userId"; |
| | | personTrainingSelect({ |
| | | [name]: userId, |
| | | size: this.pagination.size, |
| | | current: this.pagination.current, |
| | | compilerName: this.pagination.compilerName |
| | | }).then((res) => { |
| | | if (res.code === 201) return; |
| | | let data = {}; |
| | | this.yearPlanTableData = res.data.records; |
| | | this.pagination.total = res.data.total; |
| | | if (this.yearPlanTableData.length > 0) { |
| | | this.currentRowId = this.yearPlanTableData[0].id; |
| | | if (this.currentPlanId) { |
| | | let filterData = this.yearPlanTableData.filter( |
| | | (item) => item.id == this.currentPlanId |
| | | ); |
| | | if (filterData.length > 0) { |
| | | data = filterData[0]; |
| | | } |
| | | } else { |
| | | data = this.yearPlanTableData[0]; |
| | | } |
| | | this.currentChange(data); |
| | | } else { |
| | | this.inDetailPlanTableData = []; |
| | | } |
| | | }); |
| | | }, |
| | | refreshYearPlanList(departmentId) { |
| | | console.log("å·æ°ä¸»è¡¨", departmentId); |
| | | personTrainingSelect({ |
| | | departmentId: departmentId, |
| | | size: this.pagination.size, |
| | | current: 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; |
| | | }); |
| | | }, |
| | | 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.currentPlanId = row.id; |
| | | this.getInDetailPlan(row.id); |
| | | }, |
| | | getInDetailPlan(id) { |
| | | if (this.inDetailForm.trainingDate === null) { |
| | | this.inDetailForm.trainingDate = ""; |
| | | } |
| | | let state = 3; |
| | | if (this.activeName != "first") { |
| | | state = -1; |
| | | } |
| | | const userId = this.isDepartment ? "" : this.departId; |
| | | if (this.currentPlanId) { |
| | | id = this.currentPlanId; |
| | | } |
| | | queryTheAnnualPlanDetailsTable({ |
| | | userId, |
| | | size: this.inDetailPagination.size, |
| | | current: this.inDetailPagination.current, |
| | | trainingLecturerName: this.inDetailForm.trainingLecturerName, |
| | | trainingDate: this.inDetailForm.trainingDate, |
| | | courseCode: this.inDetailForm.courseCode, |
| | | departId: this.departId, |
| | | state |
| | | }).then((res) => { |
| | | if (res.code === 201) return; |
| | | this.inDetailPlanTableData = res.data.records; |
| | | this.inDetailPagination.total = res.data.total; |
| | | this.departId2 = res.data.records[0].departId; |
| | | }); |
| | | }, |
| | | // æ°å¢å¹´åº¦è®¡åæç»è¡¨ |
| | | addTrainingPlan() { |
| | | if (!this.currentRowId) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡è®¡åè¿è¡æ°å¢"); |
| | | return; |
| | | } |
| | | this.addInDetail = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.addPlan.showDialog(this.currentRowId); |
| | | }); |
| | | }, |
| | | // 年度计å表-å é¤ |
| | | deleteFun(id) { |
| | | this.$confirm("æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | personTrainingDelete({ 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; |
| | | reviewAnnualPersonnelTraining(personTrainingUpdateDto).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; |
| | | approveAnnualPersonnelTraining(personTrainingUpdateDto).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) { |
| | | exportPersonTraining({ id: row.id }).then((res) => { |
| | | this.outLoading = false; |
| | | const blob = new Blob([res], { type: "application/msword" }); |
| | | this.$download.saveAs(blob, row.fileName + ".docx") |
| | | }); |
| | | }, |
| | | // 年度计å-导å
¥ |
| | | 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; |
| | | } |
| | | }, |
| | | // 年度计åå页 |
| | | paginationMetod({ page, limit }) { |
| | | this.pagination.current = page; |
| | | this.pagination.size = limit; |
| | | this.getYearPlanList(); |
| | | }, |
| | | // 年度计åæç»è¡¨-认é¢ãåæ¶è®¤é¢ |
| | | handleClaim(row) { |
| | | this.$confirm("æ¯å¦ç¡®è®¤æ¥å该课ç¨?", "æç¤º", { |
| | | confirmButtonText: "æ¥å", |
| | | cancelButtonText: "åæ¶æ¥å", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.handleClaimFun(true, row.id); |
| | | }) |
| | | .catch(() => { |
| | | this.handleClaimFun(false, row.id); |
| | | }); |
| | | }, |
| | | handleClaimFun(claimAndClaim, rowId) { |
| | | claimOfTrainingAndAssessmentRecords({ |
| | | claimAndClaim, |
| | | rowId |
| | | }).then((res) => { |
| | | this.getInDetailPlan(this.currentChangeRow.id); |
| | | }); |
| | | }, |
| | | // 年度计åæç»è¡¨-ç¼è¾ |
| | | editInDetail(row) { |
| | | this.editPlanShow = true; |
| | | this.currentRow = row; |
| | | }, |
| | | // |
| | | goBack() { |
| | | this.editPlanShow = false; |
| | | this.getInDetailPlan(this.currentRowId); |
| | | }, |
| | | refresh(id) { |
| | | if (this.inDetailForm.trainingDate === null) { |
| | | this.inDetailForm.trainingDate = ""; |
| | | } |
| | | const userId = this.isDepartment ? "" : this.departId; |
| | | queryTheAnnualPlanDetailsTable({ |
| | | userId, |
| | | size: this.inDetailPagination.size, |
| | | current: this.inDetailPagination.current, |
| | | trainingLecturerName: this.inDetailForm.trainingLecturerName, |
| | | id, |
| | | trainingDate: this.inDetailForm.trainingDate, |
| | | courseCode: this.inDetailForm.courseCode, |
| | | departId: this.departId |
| | | }).then((res) => { |
| | | if (res.code === 201) return; |
| | | this.inDetailPlanTableData = res.data.records; |
| | | this.inDetailPagination.total = res.data.total; |
| | | this.currentRow = this.inDetailPlanTableData.find( |
| | | (item) => item.id == id |
| | | ); |
| | | this.editKey += 1; |
| | | }); |
| | | console.log("å·æ°", this.currentRow); |
| | | }, |
| | | refresh(id) { |
| | | if (this.inDetailForm.trainingDate === null) { |
| | | this.inDetailForm.trainingDate = ""; |
| | | } |
| | | const userId = this.isDepartment ? "" : this.departId; |
| | | queryTheAnnualPlanDetailsTable({ |
| | | userId, |
| | | size: this.inDetailPagination.size, |
| | | current: this.inDetailPagination.current, |
| | | id, |
| | | trainingLecturerName: this.inDetailForm.trainingLecturerName, |
| | | trainingDate: this.inDetailForm.trainingDate, |
| | | courseCode: this.inDetailForm.courseCode, |
| | | departId: this.departId |
| | | }).then((res) => { |
| | | if (res.code === 201) return; |
| | | this.inDetailPlanTableData = res.data.records; |
| | | this.inDetailPagination.total = res.data.total; |
| | | this.currentRow = this.inDetailPlanTableData.find( |
| | | (item) => item.id == id |
| | | ); |
| | | this.editKey += 1; |
| | | }); |
| | | console.log("å·æ°", this.currentRow); |
| | | }, |
| | | // 年度计åæç»è¡¨-ä¸è½½ |
| | | downLoadInDetail(row) { |
| | | exportPersonTrainingRecord({ id: row.id }).then((res) => { |
| | | this.outLoading = false; |
| | | const blob = new Blob([res], { type: "application/msword" }); |
| | | this.$download.saveAs(blob, row.courseCode + "人åå¹è®ä¸èæ ¸è®°å½" + ".docx") |
| | | }); |
| | | }, |
| | | // 年度计åæç»è¡¨-å¤é |
| | | 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(() => { |
| | | 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("è¯·éæ©éè¦å é¤çæ°æ®"); |
| | | } |
| | | }, |
| | | paginationmethod0({ page, limit }) { |
| | | this.inDetailPagination.current = page; |
| | | this.inDetailPagination.size = limit; |
| | | this.getYearPlanList(this.departId); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | this.currentPlanId = null; |
| | | if (this.isDepartment) { |
| | | console.log("主"); |
| | | this.getYearPlanList(newId); |
| | | } else { |
| | | this.getInDetailPlan(""); |
| | | } |
| | | }, |
| | | }, |
| | | activeName: { |
| | | handler(newValue, oldValue) { |
| | | this.getInDetailPlan(this.currentRowId); |
| | | }, |
| | | }, |
| | | }, |
| | | }; |
| | | </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="add"> |
| | | <el-dialog :title="isEdit ? 'ç¼è¾çç£è®¡åæç»' : 'æ°å¢çç£è®¡åæç»'" :visible.sync="dialogVisible" width="800px"> |
| | | <el-form ref="formRef" :model="ruleForm" :rules="rules" label-width="100px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£æ¥æ" prop="superviseDate"> |
| | | <el-date-picker v-model="ruleForm.superviseDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | style="width: 100%;" type="date" value-format="yyyy-MM-dd"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£ç®ç" prop="superviseDes"> |
| | | <el-input v-model="ruleForm.superviseDes"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£é¡¹ç®" prop="superviseProject"> |
| | | <el-input v-model="ruleForm.superviseProject"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="被çç£äºº" prop="supervisePerson"> |
| | | <el-input v-model="ruleForm.supervisePerson"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="çç£åå " prop="superviseReason"> |
| | | <el-input v-model="ruleForm.superviseReason"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" prop="remarks"> |
| | | <el-input v-model="ruleForm.remarks"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <div slot="footer" class="foot"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | yearPlanDetailAdd, |
| | | yearPlanDetailEdit |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | props: { |
| | | planId: { |
| | | type: Number, |
| | | default: undefined |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | ruleForm: { |
| | | id: undefined, |
| | | superviseDate: undefined, // çç£æ¥æ |
| | | superviseDes: undefined, // çç£ç®ç |
| | | superviseProject: undefined, // çç£é¡¹ç® |
| | | supervisePerson: undefined, // 被çç£äºº |
| | | superviseReason: undefined, // çç£åå |
| | | remarks: undefined, // 夿³¨ |
| | | }, |
| | | rules: { |
| | | superviseDate: [{ required: true, message: 'è¯·éæ©æ¥æ', trigger: 'change' }], |
| | | superviseDes: [{ required: true, message: '请è¾å
¥çç£ç®ç', trigger: 'blur' }], |
| | | superviseProject: [{ required: true, message: '请è¾å
¥çç£é¡¹ç®', trigger: 'blur' }], |
| | | supervisePerson: [{ required: true, message: '请è¾å
¥è¢«çç£äºº', trigger: 'blur' }], |
| | | superviseReason: [{ required: true, message: '请è¾å
¥çç£åå ', trigger: 'blur' }], |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | formatForm(row) { |
| | | this.ruleForm.id = undefined |
| | | this.ruleForm.planId = row.planId |
| | | this.ruleForm.superviseDate = undefined |
| | | this.ruleForm.superviseDes = undefined |
| | | this.ruleForm.superviseProject = undefined |
| | | this.ruleForm.supervisePerson = undefined |
| | | this.ruleForm.superviseReason = undefined |
| | | this.ruleForm.remarks = undefined |
| | | }, |
| | | renderForm(row) { |
| | | this.ruleForm.id = row.id |
| | | this.ruleForm.superviseDate = row.superviseDate |
| | | this.ruleForm.superviseDes = row.superviseDes |
| | | this.ruleForm.superviseProject = row.superviseProject |
| | | this.ruleForm.supervisePerson = row.supervisePerson |
| | | this.ruleForm.superviseReason = row.superviseReason |
| | | this.ruleForm.remarks = row.remarks |
| | | }, |
| | | showDialog(row, type) { |
| | | console.log(row) |
| | | if (type) { |
| | | this.isEdit = true |
| | | this.renderForm(row) |
| | | } else { |
| | | this.formatForm(row) |
| | | this.isEdit = false |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | async addYearDetail() { |
| | | const { code, data } = await yearPlanDetailAdd(this.ruleForm) |
| | | this.loading = false |
| | | if (code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æå' |
| | | }) |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ°å¢å¤±è´¥' |
| | | }) |
| | | } |
| | | }, |
| | | async editYearDetail() { |
| | | const { code, data } = await yearPlanDetailEdit(this.ruleForm) |
| | | this.loading = false |
| | | if (code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ç¼è¾æå' |
| | | }) |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'ç¼è¾å¤±è´¥' |
| | | }) |
| | | } |
| | | }, |
| | | submitForm() { |
| | | this.$refs.formRef.validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | if (this.isEdit) { |
| | | this.editYearDetail() |
| | | } else { |
| | | this.addYearDetail() |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | |
| | | .add>>>.el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-upload ref="upload" action="#" :before-upload="beforeUpload" :http-request="uploadFile" |
| | | :file-list="fileList" :on-success="uploadFileSuccess" accept=".xls, .xlsx" :limit="1" :auto-upload="true" |
| | | :show-file-list="false"> |
| | | <el-button size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | yearPlanDetailImport |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | fileList: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc ä¸ä¼ æä»¶ |
| | | */ |
| | | beforeUpload(file) { |
| | | this.fileList = [file] |
| | | }, |
| | | /** |
| | | * @desc ä¸ä¼ è³æå¡å¨ |
| | | */ |
| | | async uploadFile() { |
| | | console.log('æä»¶', this.fileList[0]) |
| | | let formData = new FormData() |
| | | formData.append('file', this.fileList[0]) |
| | | const { code, data } = await yearPlanDetailImport(formData) |
| | | if (code == 200) { |
| | | this.$emit('upload') |
| | | } |
| | | }, |
| | | uploadFileSuccess() { |
| | | this.$refs.upload.clearFiles() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div> |
| | | <TableCard title="年度计å表"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>ç¼å¶äºº</span> |
| | | <el-input v-model="yearForm.organizationPerson" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearYear">æ¸
空</el-button> |
| | | </div> |
| | | <!-- <UploadExcel v-if="isShowButton" @upload="getYearPlanList"></UploadExcel> --> |
| | | <el-upload ref="upload" v-if="isShowButton" :action="action" :data="uploadData" |
| | | :headers="uploadHeader" :before-upload="beforeUpload" :on-success="onSuccess"> |
| | | <el-button size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | |
| | | |
| | | |
| | | |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable ref="yearTable" :column="yearColumnData" :height="'calc(100vh - 38em)'" |
| | | :highlightCurrentRow="true" :rowClick="rowClick" :table-data="yearTableData" |
| | | :table-loading="yearLoading" style="margin-top: 0.5em; |
| | | padding: 0 15px;" :page="yearPage" @pagination="yearPagination"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div style="width: 100%; height: 0.5em; background-color: #f5f7fb;"></div> |
| | | <div> |
| | | <TableCard title="年度计åæç»è¡¨"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>çç£æ¥æ</span> |
| | | <el-date-picker v-model="yearDetailForm.date" class="date_box" format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" size="small" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | <span>çç£é¡¹ç®</span> |
| | | <el-input v-model="yearDetailForm.project" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearDetailPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearDetail">æ¸
空</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button v-if="isOperation" size="small" type="primary" |
| | | @click="showDialog('add')">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="yearDetailColumnData" :height="'calc(100vh - 38em)'" |
| | | :table-data="yearDetailTableData" :table-loading="yearDetailLoading" |
| | | style="margin-top: 18px; padding: 0 15px;" :page="yearDeatilPage" |
| | | @pagination="yearDeatilPagination"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <PlanAdd ref="planModal" :planId="planId" @submit="handleForm"></PlanAdd> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import PlanAdd from "./Add.vue" |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import UploadExcel from "./UploadExcel.vue" |
| | | import { |
| | | yearPlanList, |
| | | yearPlanDetailList, |
| | | yearPlanDel, |
| | | yearPlanDetailDel, |
| | | yearPlanDetailApproval, |
| | | exportSuperVisePlan |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: null |
| | | } |
| | | }, |
| | | |
| | | |
| | | components: { |
| | | TableCard, |
| | | PlanAdd, |
| | | limsTable, |
| | | UploadExcel |
| | | }, |
| | | data() { |
| | | return { |
| | | uploadData: {}, |
| | | isShowButton: false, |
| | | planId: undefined, |
| | | yearForm: { |
| | | organizationPerson: undefined, |
| | | }, |
| | | yearTableData: [], // 年表 |
| | | yearPage: { |
| | | curent: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | yearColumnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'organizationPersonName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¼å¶æ¥æ', |
| | | prop: 'organizationDate', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'æ¹å人', |
| | | prop: 'approvalName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'æ¹åæ¥æ', |
| | | prop: 'approvalDate', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å®¡æ ¸äºº', |
| | | prop: 'examine' |
| | | }, { |
| | | dataType: 'tag', |
| | | label: 'æ¹åç¶æ', |
| | | prop: 'approvalStatus', |
| | | minWidth: '130', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'æ¹å' |
| | | } else { |
| | | return '䏿¹å' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'createName', |
| | | minWidth: '100' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '160', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.approvalStatus == 1 || (row.departId == 18 && ![12, 11, 16].includes(row.currentId)) || (row.departId == 19 && ![35, 41, 16].includes(row.currentId))) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.approvalYearPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlan(row.id) |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearLoading: false, |
| | | yearDetailForm: { |
| | | date: undefined, |
| | | project: undefined |
| | | }, |
| | | yearDetailTableData: [], // å¹´æç»è¡¨ |
| | | yearDeatilPage: { |
| | | curent: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | yearDetailColumnData: [ |
| | | { |
| | | label: 'çç£æ¥æ', |
| | | prop: 'superviseDate' |
| | | }, { |
| | | label: 'çç£ç®ç', |
| | | prop: 'superviseDes' |
| | | }, { |
| | | label: '被çç£äººå', |
| | | prop: 'supervisePerson' |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks' |
| | | }, { |
| | | label: 'å¹è®æ¥æ', |
| | | prop: 'trainDate' |
| | | }, { |
| | | label: 'å建', |
| | | prop: 'createBy' |
| | | }, { |
| | | dataType: 'action', |
| | | width: '180', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.$refs.planModal.showDialog(row, true) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlanDetail(row.id) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | yearDetailLoading: false, |
| | | isOperation: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getYearPlanList() |
| | | // this.getPower() |
| | | // this.getYearDetailPlanList() |
| | | |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/superVisePlan/yearPlanDetailImport' |
| | | }, |
| | | }, |
| | | watch: { |
| | | departId(newValue, oldValue) { |
| | | this.getYearPlanList(); |
| | | } |
| | | }, |
| | | methods: { |
| | | // ä¸ä¼ åçé©å |
| | | beforeUpload(file) { |
| | | let list = file.name.split(".") |
| | | let fileName = list[list.length - 1] |
| | | this.$set(this.uploadData, "suffix", fileName) |
| | | }, |
| | | // æåä¹åçé©å |
| | | onSuccess(response, file, fileList) { |
| | | this.getYearPlanList(); |
| | | this.$message.success("导å
¥æå") |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'yearPlanDetailImport') { |
| | | up = true |
| | | } |
| | | } |
| | | if (!up) { |
| | | this.isShowButton = false |
| | | } else { |
| | | this.isShowButton = true |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢å¹´åº¦è®¡åå表 |
| | | */ |
| | | async getYearPlanList() { |
| | | this.yearLoading = true |
| | | const { code, data } = await yearPlanList({ |
| | | current: this.yearPage.curent, |
| | | size: this.yearPage.pageSize, |
| | | organizationPerson: this.yearForm.organizationPerson, |
| | | departId: this.departId |
| | | }) |
| | | if (code == 200) { |
| | | this.yearTableData = data.records |
| | | this.yearPage.total = data.total |
| | | if (this.yearTableData.length > 0) { |
| | | this.rowClick(this.yearTableData[0]) |
| | | } else { |
| | | this.yearDetailTableData = [] |
| | | } |
| | | } |
| | | console.log('ä¸»è¡¨æ°æ®', this.yearTableData); |
| | | this.yearLoading = false |
| | | }, |
| | | // 年计åå页 |
| | | yearPagination({ page, limit }) { |
| | | this.yearPage.current = page; |
| | | this.yearPage.size = limit; |
| | | this.getYearPlanList(); |
| | | }, |
| | | // 年度计åè¡¨æ ¼ï¼ç¹å»è¡æ°æ®åå·æ°è¯¦æ
|
| | | rowClick(row) { |
| | | const now = new Date(); |
| | | const currentYear = now.getFullYear(); |
| | | if (row.createTime.slice(0, 4) == currentYear) { |
| | | this.isOperation = true; |
| | | } else { |
| | | this.isOperation = false; |
| | | } |
| | | this.planId = row.id |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æ°å¢|ç¼è¾å®æååä»ä¹ |
| | | handleForm() { |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æ¸
é¤å¹´ |
| | | clearYear() { |
| | | this.$refs.yearTable.setCurrent() |
| | | this.yearForm.organizationPerson = undefined |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¸
é¤æç» |
| | | clearDetail() { |
| | | this.yearDetailForm.date = undefined |
| | | this.yearDetailForm.project = undefined |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | |
| | | /** |
| | | * @desc æ¥è¯¢å¹´åº¦è®¡åæç» |
| | | */ |
| | | async getYearDetailPlanList() { |
| | | this.yearDetailLoading = true |
| | | const { code, data } = await yearPlanDetailList({ |
| | | planId: this.planId, |
| | | current: this.yearDeatilPage.curent, |
| | | size: this.yearDeatilPage.pageSize, |
| | | date: this.yearDetailForm.date, |
| | | project: this.yearDetailForm.project |
| | | }) |
| | | if (code == 200) { |
| | | this.yearDetailTableData = data.records |
| | | this.yearDeatilPage.total = data.total |
| | | } |
| | | this.yearDetailLoading = false |
| | | }, |
| | | showDialog(operationType, row, type = false) { |
| | | if (operationType === 'add') { |
| | | if (!this.planId) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®¡åè¿è¡æ°å¢') |
| | | return |
| | | } |
| | | } |
| | | this.$refs.planModal.showDialog({ planId: this.planId, ...row }, type) |
| | | }, |
| | | |
| | | |
| | | |
| | | // å¹´æç»è®¡åå页 |
| | | yearDeatilPagination({ page, limit }) { |
| | | this.yearDeatilPage.current = page; |
| | | this.yearDeatilPage.size = limit; |
| | | this.getYearDetailPlanList(); |
| | | }, |
| | | // å é¤å¹´è®¡å |
| | | delYearPlan(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const { code } = await yearPlanDel({ id }) |
| | | if (code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getYearPlanList() |
| | | this.getYearDetailPlanList() |
| | | } else { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | } |
| | | }) |
| | | }, |
| | | // å é¤å¹´è®¡åæç» |
| | | delYearPlanDetail(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const { code } = await yearPlanDetailDel({ id }) |
| | | if (code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getYearDetailPlanList() |
| | | } else { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹å年度计å |
| | | approvalYearPlan(row) { |
| | | this.$confirm('确认æ¹å该年度计å?', 'æç¤º', { |
| | | confirmButtonText: 'æ¹å', |
| | | cancelButtonText: '䏿¹å', |
| | | type: 'info' |
| | | }).then(() => { |
| | | this.approvalYearPlanFun(1, row.id) |
| | | }).catch(action => { |
| | | this.approvalYearPlanFun(0, row.id) |
| | | }) |
| | | }, |
| | | // 年度计å表-ä¸è½½ |
| | | downLoadPost(row) { |
| | | exportSuperVisePlan({ id: row.id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, row.fileName + '.docx') |
| | | }) |
| | | }, |
| | | async approvalYearPlanFun(approvalStatus, rowId) { |
| | | const { code } = await yearPlanDetailApproval({ |
| | | id: rowId, |
| | | approvalStatus: approvalStatus |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success('æä½æåï¼') |
| | | this.getYearPlanList() |
| | | } else { |
| | | this.$message.error('æä½æåï¼') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </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; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="add"> |
| | | <el-dialog :isEdit="isEdit" :title="isEdit ? 'ç¼è¾å·¥ä½çç£è®°å½' : 'æ°å¢å·¥ä½çç£è®°å½'" :visible.sync="dialogVisible" width="800"> |
| | | <el-steps v-if="isEdit" :active="active" :align-center="true" finish-status="success"> |
| | | <el-step style="cursor: pointer;" title="æ£æµ" @click.native="setStep(0)"></el-step> |
| | | <el-step style="cursor: pointer;" title="审æ¹" @click.native="setStep(1)"></el-step> |
| | | </el-steps> |
| | | <SuperviseForm v-show="pageStatus == 0" ref="superviseFormRef" :disabled="active != 0" :departId="departId" |
| | | :isEdit="isEdit" :superviseForm.sync="mainForm.superviseForm" :userList="userList" @addData="addData" |
| | | @close="closeDialog" @submit="submit"></SuperviseForm> |
| | | <ApproveForm v-show="pageStatus == 1" ref="approveFormRef" :approveForm.sync="mainForm.approveForm" |
| | | :disabled="active != 1" :departId="departId" :isEdit="isEdit" :userList="userList" @close="toClose" |
| | | @submit="submit"></ApproveForm> |
| | | <el-result v-show="pageStatus == 2" icon="success" subTitle="å¤ç宿" title="å®¡æ ¸å®æ"> |
| | | </el-result> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import SuperviseForm from './supervise/SuperviseForm.vue' |
| | | import ApproveForm from './supervise/ApproveForm.vue' |
| | | import { |
| | | selectUserList, |
| | | addOrUpdatePersonSupervisionRecord |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | import { dateFormat } from '@/utils/date.js' |
| | | |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: null |
| | | } |
| | | }, |
| | | |
| | | components: { |
| | | SuperviseForm, |
| | | ApproveForm |
| | | }, |
| | | data() { |
| | | return { |
| | | active: 0, |
| | | pageStatus: 0, |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | userList: [], |
| | | id: undefined, |
| | | mainForm: { |
| | | superviseForm: { |
| | | testerId: undefined, |
| | | supervisorId: undefined, |
| | | testItem: undefined, |
| | | sampleNumber: undefined, |
| | | detectionDate: undefined, |
| | | personnel: [], |
| | | instrumentEquipment: undefined, |
| | | workingEnvironment: undefined, |
| | | sampleCollection: undefined, |
| | | samplePreparation: undefined, |
| | | testMethod: undefined, |
| | | testingRecords: undefined, |
| | | testReport: undefined, |
| | | evaluationSupervisionSituation: undefined, |
| | | doNotMeetTheHandlingOpinions: undefined, |
| | | }, |
| | | approveForm: { |
| | | technicalDirector: undefined |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | async openDialog(row, type = false) { |
| | | this.dialogVisible = true |
| | | this.isEdit = type |
| | | console.log('type', this.isEdit); |
| | | await this.getUserList() |
| | | if (this.isEdit) { |
| | | // ç¼è¾ |
| | | this.loadForm(row) |
| | | this.id = row.id |
| | | console.log(1111); |
| | | } else { |
| | | // æ°å¢ |
| | | this.resetForm(row) |
| | | this.id = undefined |
| | | console.log(22222); |
| | | } |
| | | console.log('this.id', this.id); |
| | | }, |
| | | /** |
| | | * @desc å 载表å |
| | | */ |
| | | loadForm(row) { |
| | | if (row.currentState) { |
| | | this.active = Number(row.currentState) |
| | | this.pageStatus = Number(row.currentState === '2' ? 0 : row.currentState) |
| | | } |
| | | // 第1æ¥ |
| | | this.mainForm.superviseForm.testerId = row.testerId |
| | | this.mainForm.superviseForm.supervisorId = row.supervisorId |
| | | this.mainForm.superviseForm.testItem = row.testItem |
| | | this.mainForm.superviseForm.sampleNumber = row.sampleNumber |
| | | this.mainForm.superviseForm.detectionDate = row.detectionDate |
| | | // let personList = row.personnel.split(',') |
| | | // this.mainForm.superviseForm.personnel = personList.map(item => { |
| | | // return Number(item) |
| | | // }); |
| | | this.mainForm.superviseForm.personnel = row.personnel |
| | | this.mainForm.superviseForm.instrumentEquipment = row.instrumentEquipment |
| | | this.mainForm.superviseForm.workingEnvironment = row.workingEnvironment |
| | | this.mainForm.superviseForm.sampleCollection = row.sampleCollection |
| | | this.mainForm.superviseForm.samplePreparation = row.samplePreparation |
| | | this.mainForm.superviseForm.testMethod = row.testMethod |
| | | this.mainForm.superviseForm.testingRecords = row.testingRecords |
| | | this.mainForm.superviseForm.testReport = row.testReport |
| | | this.mainForm.superviseForm.evaluationSupervisionSituation = row.evaluationSupervisionSituation |
| | | this.mainForm.superviseForm.doNotMeetTheHandlingOpinions = row.doNotMeetTheHandlingOpinions |
| | | // 第2æ¥ |
| | | this.mainForm.approveForm.technicalDirector = row.technicalDirector |
| | | }, |
| | | /** |
| | | * @desc é置表å |
| | | */ |
| | | resetForm(row) { |
| | | console.log(row) |
| | | this.active = 0 |
| | | this.pageStatus = 0 |
| | | // 第1个 |
| | | this.mainForm.superviseForm.currentState = undefined |
| | | this.mainForm.superviseForm.testerId = undefined |
| | | this.mainForm.superviseForm.supervisorId = undefined |
| | | this.mainForm.superviseForm.testItem = undefined |
| | | this.mainForm.superviseForm.sampleNumber = undefined |
| | | this.mainForm.superviseForm.detectionDate = undefined |
| | | this.mainForm.superviseForm.personnel = undefined |
| | | this.mainForm.superviseForm.instrumentEquipment = undefined |
| | | this.mainForm.superviseForm.workingEnvironment = undefined |
| | | this.mainForm.superviseForm.sampleCollection = undefined |
| | | this.mainForm.superviseForm.samplePreparation = undefined |
| | | this.mainForm.superviseForm.testMethod = undefined |
| | | this.mainForm.superviseForm.testingRecords = undefined |
| | | this.mainForm.superviseForm.testReport = undefined |
| | | this.mainForm.superviseForm.evaluationSupervisionSituation = undefined |
| | | this.mainForm.superviseForm.doNotMeetTheHandlingOpinions = undefined |
| | | // 第2个 |
| | | this.mainForm.approveForm.technicalDirector = undefined |
| | | console.log('æ°å¢', this.mainForm); |
| | | |
| | | |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await selectUserList() |
| | | if (code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | toClose() { |
| | | this.submitFormApi({ |
| | | id: this.id, |
| | | currentState: 0, |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc æ°å¢ |
| | | */ |
| | | addData(step) { |
| | | let data = this.setParams(step) |
| | | this.submitFormApi(data) |
| | | }, |
| | | /** |
| | | * @desc ç¼è¾ |
| | | */ |
| | | submit(step) { |
| | | let data = this.setParams(step) |
| | | data.id = this.id |
| | | this.submitFormApi(data) |
| | | }, |
| | | // è®¾ç½®åæ° |
| | | setParams(step) { |
| | | if (step == 1) { |
| | | let result = this.mainForm.superviseForm |
| | | result.currentState = this.active + 1 |
| | | result.technicalDirectorDate = dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss') |
| | | return result |
| | | } |
| | | if (step == 2) { |
| | | let result = this.mainForm.approveForm |
| | | result.currentState = this.active + 1 |
| | | return result |
| | | } |
| | | }, |
| | | // åæå¡å¨åé表å |
| | | async submitFormApi(data) { |
| | | console.log('æ¥å£è¡¨å', data) |
| | | // å°é¨é¨å¸¦å
¥ |
| | | if (data.id == null) { |
| | | data.departLimsId = this.departId |
| | | } |
| | | const { code } = await addOrUpdatePersonSupervisionRecord(data) |
| | | if (code == 200) { |
| | | this.$message.success('æä½æå') |
| | | this.dialogVisible = false |
| | | this.$emit('submit') |
| | | } |
| | | }, |
| | | setStep(e) { |
| | | this.pageStatus = e |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | |
| | | .add>>>.el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | |
| | | .main_right { |
| | | text-align: left; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form label-width="160px" :model="form" :disabled="disabled" style="position: relative;" size="small"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="é¨é¨è´è´£äºº"> |
| | | <el-select v-model="form.departmentHeadId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="被çç£äºº"> |
| | | <el-select v-model="form.supervisedPersonId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ç¬¦åå·¥ä½åç°éå¾"> |
| | | <el-checkbox-group v-model="form.discoveryApproach"> |
| | | <el-checkbox v-for="(item, index) in checkbox" :key="index" :label="item.value" name="type">{{ |
| | | item.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ç¬¦åå·¥ä½ç详ç»è®°å½"> |
| | | <el-input v-model="form.notConformDetails" type="textarea" :rows="2" placeholder="请è¾å
¥å
容"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ç¬¦åç便®åæ¡æ¬¾å·"> |
| | | <el-input v-model="form.nonConformityClause" type="textarea" :rows="2" placeholder="请è¾å
¥å
容"></el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 0 || step == 1"> |
| | | <el-button v-if="step == 1" :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button :disabled="false" @click="save">ä¿å</el-button> |
| | | <el-button type="primary" @click="onSubmit" |
| | | :disabled="(supervisedPersonId != null && userId != supervisedPersonId) || |
| | | ((departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId)))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | supervisedPersonId: { |
| | | type: Number, |
| | | default: null |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: () => { |
| | | return [] |
| | | } |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | condiForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.condiForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:condiForm', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | checkbox: [ |
| | | { |
| | | label: '管çè¯å®¡', |
| | | value: 0 |
| | | }, { |
| | | label: 'å
é¨å®¡æ ¸', |
| | | value: 1 |
| | | }, { |
| | | label: 'æ£æµè¿ç¨æ§å¶', |
| | | value: 2 |
| | | }, { |
| | | label: 'å
é¨è´¨éæ§å¶', |
| | | value: 3 |
| | | }, { |
| | | label: 'å
é¨çç£', |
| | | value: 4 |
| | | }, { |
| | | label: 'å¤é¨è¯å®¡/æ£æ¥', |
| | | value: 5 |
| | | }, { |
| | | label: '顾客æè¯/æè§åé¦', |
| | | value: 6 |
| | | }, { |
| | | label: 'å
¶ä»', |
| | | value: 7 |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" label-width="160px" style="position: relative" :disabled="disabled" size="small"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="éç¥å®¢æ·"> |
| | | <el-radio-group v-model="form.whetherInformCustomer"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ¢å¤å·¥ä½"> |
| | | <el-radio-group v-model="form.whetherResumeWork"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="è´¨éè´è´£äºº"> |
| | | <el-select v-model="form.qualitySupervisorId" placeholder="è¯·éæ©"> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 4"> |
| | | <el-button @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="onSubmit" |
| | | :disabled="(departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | inform: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.inform |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:inform', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" label-width="200px" style="position: relative;" :disabled="disabled" size="small"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="责任é¨é¨"> |
| | | <el-select v-model="form.responsibleDepartmentId" placeholder="è¯·éæ©" @change="filterUserList"> |
| | | <el-option label="é信产åå®éªå®¤" :value="18"></el-option> |
| | | <el-option label="çµå产åå®éªå®¤" :value="19"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="责任人"> |
| | | <el-select v-model="form.responsibleDepartmentPersonId" placeholder="è¯·éæ©"> |
| | | <el-option v-for="(item, index) in userListTwo" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¶é¤ä¸ç¬¦å工使éåçæªæ½"> |
| | | <el-input v-model="form.treatmentMeasures" type="textarea" :rows="2" placeholder="请è¾å
¥å
容"></el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item v-if="step == 2" label-width="0px" :disabled="disabled"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div> |
| | | <el-button @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="onSubmit" |
| | | :disabled="(departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | handleForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.handleForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:handleForm', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | userListTwo: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.userListTwo = JSON.parse(JSON.stringify(this.userList)) |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | filterUserList() { |
| | | this.userListTwo = this.userList.filter(item => item.departLimsId.includes(this.form.responsibleDepartmentId)) |
| | | if (!this.userListTwo.some(item => item.id == this.form.responsibleDepartmentPersonId)) { |
| | | this.form.responsibleDepartmentPersonId = null |
| | | } |
| | | }, |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" label-width="160px" style="position: relative" :disabled="disabled" size="small"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="æ¯å¦éè¦éåçº æ£æªæ½"> |
| | | <el-radio-group v-model="form.correctiveMeasure"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="çº æ£æªæ½å¤çåè·è¸ª"> |
| | | <el-radio-group v-model="form.correctiveMeasureFollowTracks"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="ææ¯è´è´£äºº"> |
| | | <el-select v-model="form.correctiveMeasurePersonId" placeholder="è¯·éæ©"> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 3"> |
| | | <el-button @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="onSubmit" |
| | | :disabled="(departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | rectifyForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.rectifyForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:rectifyForm', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="dialogVisible" title="ä¸ç¬¦å工使§å¶å"> |
| | | <el-steps :active="active" :align-center="true" finish-status="success"> |
| | | <el-step v-for="(item, index) in stepList" :key="index" :title="item.label" style="cursor: pointer;" |
| | | @click.native="setStep(item.value)"></el-step> |
| | | </el-steps> |
| | | <el-divider></el-divider> |
| | | <ConditionForm v-if="pageStatus == 0" :departId="departId" :isPermission="isPermission" |
| | | :supervisedPersonId="mainForm.condiForm.supervisedPersonId" :condiForm.sync="mainForm.condiForm" |
| | | :currentResponsible="currentResponsible" :disabled="active != 0" :step="active" :userList="userList" |
| | | @nextStep="submit"></ConditionForm> |
| | | <ConditionForm v-if="pageStatus == 1" :departId="departId" :isPermission="isPermission" |
| | | :supervisedPersonId="mainForm.condiForm.supervisedPersonId" :condiForm.sync="mainForm.condiForm" |
| | | :currentResponsible="currentResponsible" :disabled="true" :step="active" :userList="userList" |
| | | @cancel="cancel" @nextStep="submit"></ConditionForm> |
| | | <MeasureForm v-if="pageStatus == 2" :departId="departId" :isPermission="isPermission" |
| | | :currentResponsible="currentResponsible" :disabled="active != 2" :handleForm.sync="mainForm.handleForm" |
| | | :step="active" :userList="userList" @cancel="cancel" @nextStep="submit"></MeasureForm> |
| | | <RectifyForm v-if="pageStatus == 3" :departId="departId" :isPermission="isPermission" |
| | | :currentResponsible="currentResponsible" :disabled="active != 3" |
| | | :rectifyForm.sync="mainForm.rectifyForm" :step="active" :userList="userList" @cancel="cancel" |
| | | @nextStep="submit"></RectifyForm> |
| | | <Inform v-if="pageStatus == 4" :departId="departId" :isPermission="isPermission" :disabled="active != 4" |
| | | :inform.sync="mainForm.inform" :step="active" :userList="userList" @cancel="cancel" @nextStep="submit"> |
| | | </Inform> |
| | | <el-result v-if="pageStatus == 5" icon="success" subTitle="å¤ç宿" title="å®¡æ ¸å®æ"> |
| | | </el-result> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import ConditionForm from './Step/ConditionForm.vue' |
| | | import MeasureForm from './Step/MeasureForm.vue' |
| | | import RectifyForm from './Step/RectifyForm.vue' |
| | | import Inform from './Step/Inform.vue' |
| | | import { |
| | | selectUserList, |
| | | personSupervisionControlSheetPage, |
| | | addOrUpdatePersonSupervisionControl |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | components: { |
| | | ConditionForm, MeasureForm, RectifyForm, Inform |
| | | }, |
| | | data() { |
| | | return { |
| | | isPermission: true, |
| | | supervisedPersonId: null, |
| | | active: 0, |
| | | pageStatus: 0, |
| | | dialogVisible: false, |
| | | currentResponsible: undefined, |
| | | stepList: [{ |
| | | label: '工使
åµ', |
| | | value: 0 |
| | | }, { |
| | | label: '被çç£äººç¡®è®¤', |
| | | value: 1 |
| | | }, { |
| | | label: 'å¤çæªæ½', |
| | | value: 2 |
| | | }, { |
| | | label: 'çº æ£æªæ½', |
| | | value: 3 |
| | | }, { |
| | | label: 'éç¥å®¢æ·', |
| | | value: 4 |
| | | } |
| | | ], |
| | | supervisionRecordId: undefined, |
| | | controlId: undefined, |
| | | mainForm: { |
| | | condiForm: { |
| | | departmentHeadId: undefined, |
| | | supervisedPersonId: undefined, |
| | | discoveryApproach: [], |
| | | notConformDetails: undefined, |
| | | nonConformityClause: undefined, |
| | | departLimsId: undefined |
| | | }, |
| | | handleForm: { |
| | | responsibleDepartmentPersonId: undefined, |
| | | treatmentMeasures: undefined, |
| | | departLimsId: undefined |
| | | }, |
| | | rectifyForm: { |
| | | correctiveMeasure: undefined, |
| | | correctiveMeasureFollowTracks: undefined, |
| | | correctiveMeasurePersonId: undefined, |
| | | departLimsId: undefined |
| | | }, |
| | | inform: { |
| | | whetherInformCustomer: undefined, |
| | | whetherResumeWork: undefined, |
| | | qualitySupervisorId: undefined, |
| | | departLimsId: undefined |
| | | } |
| | | }, |
| | | userList: [], |
| | | controlType: undefined |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.isPermission = isPermission("isSubmit") |
| | | console.log('æé', this.isPermission); |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc åå§å表å |
| | | */ |
| | | initForm() { |
| | | this.mainForm.condiForm.departmentHeadId = undefined |
| | | this.mainForm.condiForm.supervisedPersonId = undefined |
| | | this.mainForm.condiForm.discoveryApproach = [] |
| | | this.mainForm.condiForm.notConformDetails = undefined |
| | | this.mainForm.condiForm.nonConformityClause = undefined |
| | | this.mainForm.condiForm.departLimsId = undefined |
| | | this.mainForm.handleForm.responsibleDepartmentPersonId = undefined |
| | | this.mainForm.handleForm.treatmentMeasures = undefined |
| | | this.mainForm.handleForm.departLimsId = undefined |
| | | this.mainForm.rectifyForm.correctiveMeasure = undefined |
| | | this.mainForm.rectifyForm.correctiveMeasureFollowTracks = undefined |
| | | this.mainForm.rectifyForm.correctiveMeasurePersonId = undefined |
| | | this.mainForm.rectifyForm.departLimsId = undefined |
| | | this.mainForm.inform.whetherInformCustomer = undefined |
| | | this.mainForm.inform.whetherResumeWork = undefined |
| | | this.mainForm.inform.qualitySupervisorId = undefined |
| | | this.mainForm.inform.departLimsId = undefined |
| | | }, |
| | | /** |
| | | * @desc æå¼æ¨¡ææ¡ |
| | | * @param {çç£è®°å½id} id |
| | | */ |
| | | openDialog(id) { |
| | | this.dialogVisible = true |
| | | this.getUserList() |
| | | this.getControlData(id) |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await selectUserList() |
| | | if (code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢çç£è®°å½æ§å¶å |
| | | * @param {çç£è®°å½id} id |
| | | */ |
| | | async getControlData(id) { |
| | | const { code, data } = await personSupervisionControlSheetPage({ id }) |
| | | if (code == 202) { |
| | | this.controlType = 'æ°å¢' |
| | | this.supervisionRecordId = id |
| | | this.active = 0 |
| | | this.pageStatus = 0 |
| | | this.controlId = undefined |
| | | this.initForm() |
| | | } |
| | | if (code == 200) { |
| | | this.currentResponsible = data.currentResponsible |
| | | this.controlType = 'ç¼è¾' |
| | | this.controlId = data.id |
| | | this.active = Number(data.currentState) |
| | | this.pageStatus = Number(data.currentState === 4 ? 0 : data.currentState) |
| | | // 第1ã2æ¥æ°æ® |
| | | this.mainForm.condiForm.departmentHeadId = data.departmentHeadId |
| | | this.mainForm.condiForm.supervisedPersonId = data.supervisedPersonId |
| | | this.mainForm.condiForm.notConformDetails = data.notConformDetails |
| | | this.mainForm.condiForm.nonConformityClause = data.nonConformityClause |
| | | this.mainForm.condiForm.departLimsId = data.departLimsId |
| | | // 第3æ¥æ°æ® |
| | | this.mainForm.handleForm.responsibleDepartmentPersonId = data.responsibleDepartmentPersonId |
| | | this.mainForm.handleForm.treatmentMeasures = data.treatmentMeasures |
| | | this.mainForm.handleForm.departLimsId = data.departLimsId |
| | | // 第4æ¥æ°æ® |
| | | this.mainForm.rectifyForm.correctiveMeasure = data.correctiveMeasure |
| | | this.mainForm.rectifyForm.correctiveMeasureFollowTracks = data.correctiveMeasureFollowTracks |
| | | this.mainForm.rectifyForm.correctiveMeasurePersonId = data.correctiveMeasurePersonId |
| | | this.mainForm.rectifyForm.departLimsId = data.departLimsId |
| | | // 第5æ¥æ°æ® |
| | | this.mainForm.inform.whetherInformCustomer = data.whetherInformCustomer |
| | | this.mainForm.inform.whetherResumeWork = data.whetherResumeWork |
| | | this.mainForm.inform.qualitySupervisorId = data.qualitySupervisorId |
| | | this.mainForm.inform.departLimsId = data.departLimsId |
| | | this.supervisionRecordId = data.supervisionRecordId |
| | | |
| | | |
| | | this.supervisedPersonId = data.supervisedPersonId |
| | | } |
| | | }, |
| | | submit(type) { |
| | | let currentState = undefined |
| | | if (type == 'submit') { |
| | | currentState = this.active + 1 |
| | | } else if (type == 'save') { |
| | | currentState = undefined |
| | | } |
| | | if (this.active == 0) { |
| | | let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm |
| | | let approcahStr = discoveryApproach.join(',') |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | discoveryApproach: approcahStr, |
| | | currentState: currentState, |
| | | discovererDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...condiFormRest |
| | | }) |
| | | } |
| | | if (this.active == 1) { |
| | | let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm |
| | | let approcahStr = discoveryApproach.join(',') |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | discoveryApproach: approcahStr, |
| | | currentState: currentState, |
| | | supervisedPersonDate: this.$moment().format('YYYY-MM-DD'), |
| | | ...condiFormRest |
| | | }) |
| | | } |
| | | if (this.active == 2) { |
| | | let { handleForm } = this.mainForm |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | responsibleDepartmentDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...handleForm |
| | | }) |
| | | } |
| | | if (this.active == 3) { |
| | | let { rectifyForm } = this.mainForm |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | correctiveMeasureDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...rectifyForm |
| | | }) |
| | | } |
| | | if (this.active == 4) { |
| | | let { inform } = this.mainForm |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | qualitySupervisorDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...inform |
| | | }) |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm(form) { |
| | | let user = JSON.parse(localStorage.getItem('user')); |
| | | form.responsibleDepartmentId = Number(form.responsibleDepartmentId) |
| | | const { code } = await addOrUpdatePersonSupervisionControl({ |
| | | currentResponsible: user.name, |
| | | ...form |
| | | }) |
| | | if (this.controlType == 'æ°å¢') { |
| | | if (code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } else if (this.controlType == 'ç¼è¾') { |
| | | if (code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } |
| | | this.$emit('getTableData') |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | cancel() { |
| | | let currentState = this.active - 1 |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | }) |
| | | }, |
| | | setStep(e) { |
| | | this.pageStatus = e |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .dialog-footer { |
| | | width: 100%; |
| | | } |
| | | |
| | | >>>.el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" :disabled="disabled" label-width="140px" size="small" style="position: relative"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="æåºé¨é¨"> |
| | | <!-- <el-select |
| | | v-model="form.proposingDepartment" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="é信产åå®éªå®¤" :value="18"></el-option> |
| | | <el-option label="çµå产åå®éªå®¤" :value="19"></el-option> |
| | | </el-select> --> |
| | | <el-input :disabled="true" v-model="form.proposingDepartment"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="人åéæ©"> |
| | | <el-select v-model="form.proposingDepartmentPersonId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ä¸åæ ¼æå离æè¿°"> |
| | | <el-input type="textarea" v-model="form.descriptionNonconformity" :rows="2" placeholder="请è¾å
¥å
容"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 0"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button @click="save">ä¿å</el-button> |
| | | <el-button type="primary" @click="submit" |
| | | :disabled="(departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | factForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | this.$set(this.factForm, 'proposingDepartment', 'çç£å') |
| | | return this.factForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:factForm', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" :disabled="disabled" label-width="130px" size="small" style="position: relative"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="责任é¨é¨"> |
| | | <!-- <el-select v-model="form.correctiveActionId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> --> |
| | | <el-select @change="filterUserList" v-model="form.causeAnalysisId" placeholder="è¯·éæ©" |
| | | style="width: 100%"> |
| | | <el-option label="é信产åå®éªå®¤" :value="18"></el-option> |
| | | <el-option label="çµå产åå®éªå®¤" :value="19"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="责任人"> |
| | | <el-select v-model="form.correctiveActionId" placeholder="è¯·éæ©"> |
| | | <el-option v-for="(item, index) in userListTwo" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="çº æ£æªæ½"> |
| | | <el-input type="textarea" v-model="form.correctiveMeasure" :rows="2" placeholder="请è¾å
¥å
容"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æåºè¦æ±é¨é¨ç¡®è®¤"> |
| | | <el-input type="textarea" v-model="form.requestDepartmentConfirmation" :rows="2" placeholder="请è¾å
¥å
容"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 2"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="submit" |
| | | :disabled="(departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | measureForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.measureForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:measureForm', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | userListTwo: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.userListTwo = JSON.parse(JSON.stringify(this.userList)) |
| | | console.log('this.userListTwo', this.userListTwo); |
| | | }, |
| | | methods: { |
| | | filterUserList() { |
| | | this.userListTwo = this.userList.filter(item => item.departLimsId.includes(this.form.causeAnalysisId)) |
| | | if (!this.userListTwo.some(item => item.id == this.form.correctiveActionId)) { |
| | | this.form.correctiveActionId = null |
| | | } |
| | | }, |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" :disabled="disabled" label-width="140px" size="small" style="position: relative;"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="责任é¨é¨"> |
| | | <!-- <el-select |
| | | v-model="form.causeAnalysisPersonId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> --> |
| | | <el-select @change="filterUserList" v-model="form.causeAnalysisId" placeholder="è¯·éæ©" |
| | | style="width: 100%"> |
| | | <el-option label="é信产åå®éªå®¤" :value="18"></el-option> |
| | | <el-option label="çµå产åå®éªå®¤" :value="19"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="人åéæ©"> |
| | | <el-select v-model="form.causeAnalysisPersonId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="(item, index) in userListTwo" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="åå åæ"> |
| | | <el-input type="textarea" v-model="form.causeAnalysis" :rows="2" placeholder="请è¾å
¥å
容"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | <span>æä½äººï¼{{ currentResponsible }}</span> |
| | | </div> |
| | | <div v-if="step == 1"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="submit" |
| | | :disabled="(departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | reasonForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.reasonForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:reasonForm', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | userListTwo: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.userListTwo = JSON.parse(JSON.stringify(this.userList)) |
| | | }, |
| | | methods: { |
| | | filterUserList() { |
| | | this.userListTwo = this.userList.filter(item => item.departLimsId.includes(this.form.causeAnalysisId)) |
| | | if (!this.userListTwo.some(item => item.id == this.form.causeAnalysisPersonId)) { |
| | | this.form.causeAnalysisPersonId = null |
| | | } |
| | | }, |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :model="form" :disabled="disabled" label-width="130px" size="small" style="position: relative"> |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto' }"> |
| | | <el-form-item label="éªè¯é¨é¨"> |
| | | <!-- <el-select |
| | | v-model="form.verificationDepartmentPersonId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> --> |
| | | <el-input :disabled="true" v-model="form.verificationDepartment"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="人åéæ©"> |
| | | <el-select v-model="form.verificationDepartmentPersonId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="(item, index) in userList" :key="index" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="宿½éªè¯ç»æ"> |
| | | <el-input type="textarea" v-model="form.implementationVerificationResults" :rows="2" |
| | | placeholder="请è¾å
¥å
容"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 3"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="submit" |
| | | :disabled="(departId == 18 && ![12, 10, 16].includes(userId)) || (departId == 19 && ![35, 41, 16].includes(userId))">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isPermission: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | resultForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | this.$set(this.resultForm, 'verificationDepartment', 'è´¨éè´è´£äºº') |
| | | return this.resultForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:resultForm', val) |
| | | } |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog title="çº éå¤çå" :visible.sync="dialogVisible"> |
| | | <el-steps :active="active" finish-status="success" :align-center="true"> |
| | | <el-step style="cursor: pointer;" v-for="(item, index) in stepList" :key="index" :title="item.label" |
| | | @click.native="setStep(item.value)"></el-step> |
| | | </el-steps> |
| | | <el-divider></el-divider> |
| | | <Fact v-if="pageStatus == 0" :departId="departId" :isPermission="isPermission" |
| | | :factForm.sync="mainForm.factForm" :userList="userList" :currentResponsible="currentResponsible" |
| | | :disabled="active != 0" :step="active" @nextStep="submit" @cancel="cancel"></Fact> |
| | | <Reason v-if="pageStatus == 1" :isPermission="isPermission" :departId="departId" |
| | | :reasonForm.sync="mainForm.reasonForm" :userList="userList" :currentResponsible="currentResponsible" |
| | | :disabled="active != 1" :step="active" @nextStep="submit" @cancel="cancel"></Reason> |
| | | <Measure v-if="pageStatus == 2" :departId="departId" :isPermission="isPermission" |
| | | :measureForm.sync="mainForm.measureForm" :userList="userList" :currentResponsible="currentResponsible" |
| | | :disabled="active != 2" :step="active" @nextStep="submit" @cancel="cancel"></Measure> |
| | | <Result v-if="pageStatus == 3" :departId="departId" :isPermission="isPermission" |
| | | :resultForm.sync="mainForm.resultForm" :userList="userList" :currentResponsible="currentResponsible" |
| | | :disabled="active != 3" :step="active" @nextStep="submit" @cancel="cancel"></Result> |
| | | <!-- <div slot="footer" class="dialog-footer"> |
| | | <el-button v-if="active == 4" type="primary" @click="submit(5)">宿</el-button> |
| | | </div> --> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Fact from './Step/Fact.vue' |
| | | import Reason from './Step/Reason.vue' |
| | | import Measure from './Step/Measure.vue' |
| | | import Result from './Step/Result.vue' |
| | | import { dateFormat } from '@/utils/date.js' |
| | | import { |
| | | selectUserList, |
| | | personSupervisionProcessingPage, |
| | | addOrUpdatePersonnelServiceProcessing |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | components: { |
| | | Fact, Reason, Measure, Result |
| | | }, |
| | | data() { |
| | | return { |
| | | isPermission: true, |
| | | active: 0, |
| | | pageStatus: 0, |
| | | dialogVisible: false, |
| | | currentResponsible: undefined, |
| | | stepList: [ |
| | | { |
| | | label: 'é®é¢æè¿°', |
| | | value: 0 |
| | | }, { |
| | | label: 'åå åæ', |
| | | value: 1 |
| | | }, { |
| | | label: 'çº æ£æªæ½', |
| | | value: 2 |
| | | }, { |
| | | label: 'éªè¯ç»æ', |
| | | value: 3 |
| | | } |
| | | ], |
| | | supervisionRecordId: undefined, |
| | | processId: undefined, |
| | | mainForm: { |
| | | factForm: { |
| | | proposingDepartmentPersonId: undefined, |
| | | descriptionNonconformity: undefined |
| | | }, |
| | | reasonForm: { |
| | | causeAnalysisPersonId: undefined, |
| | | causeAnalysis: undefined |
| | | }, |
| | | measureForm: { |
| | | correctiveActionId: undefined, |
| | | correctiveMeasure: undefined, |
| | | requestDepartmentConfirmation: undefined |
| | | }, |
| | | resultForm: { |
| | | verificationDepartmentPersonId: undefined, |
| | | implementationVerificationResults: undefined |
| | | } |
| | | }, |
| | | userList: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.isPermission = isPermission("isSubmit") |
| | | console.log('æé', this.isPermission); |
| | | }, |
| | | methods: { |
| | | openDialog(id) { |
| | | this.dialogVisible = true |
| | | this.getUserList() |
| | | this.getProcessData(id) |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await selectUserList() |
| | | if (code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢çç£è®°å½å¤çå |
| | | * @param {çç£è®°å½id} id |
| | | */ |
| | | async getProcessData(id) { |
| | | const { code, data } = await personSupervisionProcessingPage({ id }) |
| | | if (code == 202) { |
| | | this.controlType = 'æ°å¢' |
| | | this.supervisionRecordId = id |
| | | this.active = 0 |
| | | this.pageStatus = 0 |
| | | this.processId = undefined |
| | | } |
| | | if (code == 200) { |
| | | this.currentResponsible = data.currentResponsible |
| | | this.controlType = 'ç¼è¾' |
| | | this.supervisionRecordId = id |
| | | this.processId = data.processingId |
| | | this.active = Number(data.currentState) |
| | | this.pageStatus = Number(data.currentState === 2 ? 0 : data.currentState) |
| | | // 第1æ¥æ°æ® |
| | | this.mainForm.factForm.proposingDepartmentPersonId = data.proposingDepartmentPersonId |
| | | this.mainForm.factForm.descriptionNonconformity = data.descriptionNonconformity |
| | | // 第2æ¥æ°æ® |
| | | this.mainForm.reasonForm.causeAnalysisPersonId = data.causeAnalysisPersonId |
| | | this.mainForm.reasonForm.causeAnalysis = data.causeAnalysis |
| | | // 第3æ¥æ°æ® |
| | | this.mainForm.measureForm.correctiveActionId = data.correctiveActionId |
| | | this.mainForm.measureForm.correctiveMeasure = data.correctiveMeasure |
| | | this.mainForm.measureForm.requestDepartmentConfirmation = data.requestDepartmentConfirmation |
| | | // 第4æ¥æ°æ® |
| | | this.mainForm.resultForm.verificationDepartmentPersonId = data.verificationDepartmentPersonId |
| | | this.mainForm.resultForm.implementationVerificationResults = data.implementationVerificationResults |
| | | } |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | submit(type) { |
| | | let currentState = undefined |
| | | if (type == 'submit') { |
| | | currentState = this.active + 1 |
| | | } else if (type == 'save') { |
| | | currentState = undefined |
| | | } |
| | | if (this.active == 0) { |
| | | // 第1æ¥ |
| | | console.log('第1æ¥', this.active, currentState) |
| | | let { factForm } = this.mainForm |
| | | this.submitForm({ |
| | | proposingDepartmentDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...factForm |
| | | }) |
| | | } else if (this.active == 1) { |
| | | // 第2æ¥ |
| | | console.log('第2æ¥', this.active, currentState) |
| | | let { reasonForm } = this.mainForm |
| | | this.submitForm({ |
| | | causeAnalysisDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...reasonForm |
| | | }) |
| | | } else if (this.active == 2) { |
| | | // 第3æ¥ |
| | | console.log('第3æ¥', this.active, currentState) |
| | | let { measureForm } = this.mainForm |
| | | let { requestDepartmentConfirmation, ...measureFormRest } = measureForm |
| | | this.submitForm({ |
| | | correctiveActionDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | requestDepartmentConfirmation: requestDepartmentConfirmation ? 1 : 2, |
| | | ...measureFormRest |
| | | }) |
| | | } else if (this.active == 3) { |
| | | // 第4æ¥ |
| | | console.log('第4æ¥', this.active, currentState) |
| | | let { resultForm } = this.mainForm |
| | | this.submitForm({ |
| | | verificationDepartmentDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...resultForm |
| | | }) |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm(form) { |
| | | console.log('æäº¤è¡¨å', form) |
| | | const { code } = await addOrUpdatePersonnelServiceProcessing({ |
| | | processingId: this.processId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | ...form |
| | | }) |
| | | if (this.controlType == 'æ°å¢') { |
| | | if (code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } else if (this.controlType == 'ç¼è¾') { |
| | | if (code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } |
| | | this.$emit('getTableData') |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | cancel() { |
| | | let currentState = this.active - 1 |
| | | this.submitForm({ |
| | | id: this.processId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | }) |
| | | }, |
| | | setStep(e) { |
| | | console.log(e) |
| | | this.pageStatus = e |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div> |
| | | <TableCard :showTitle="false"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <!-- <span>å
³é®å</span> |
| | | <el-input size="small" class="search" v-model="superviseForm.searchVal" placeholder="请è¾å
¥"></el-input> |
| | | <el-button type="primary" size="small">æ¥è¯¢</el-button> --> |
| | | <el-button v-if="multipleSelection.length > 0" slot="reference" size="small" type="danger" |
| | | @click="delRecords">å é¤</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="addRecord" |
| | | v-show="departId && departId != 1">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="superviseColumnData" :handleSelectionChange="handleSelectionChange" |
| | | :height="'calc(100vh - 19em)'" :isSelection="true" :table-data="superviseTableData" |
| | | :table-loading="superviseLoading" rowKey="id" style="margin-top: 18px; padding: 0 15px;" |
| | | :page="page" @pagination="pagination"> |
| | | <div slot="action" slot-scope="scope"> |
| | | <el-button type="text" @click="openDownloadDia(scope.row)"> |
| | | <span>导åº</span> |
| | | </el-button> |
| | | <el-button type="text" @click="openRecord(scope.row)"> |
| | | <span>çç£è®°å½</span> |
| | | </el-button> |
| | | <el-button type="text" @click="openControl(scope.row.id)" |
| | | :disabled="scope.row.evaluationSupervisionSituation != 'ä¸ç¬¦å'"> |
| | | <span :style="renderBtn(scope.row.currentStateControl)">æ§å¶å</span> |
| | | </el-button> |
| | | <el-button type="text" @click="openDispose(scope.row.id)" |
| | | :disabled="scope.row.correctiveMeasure != '1'"> |
| | | <span :style="renderBtn(scope.row.currentStateProcessing)">å¤çå</span> |
| | | </el-button> |
| | | </div> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <RecordAdd ref="recordModal" @submit="getTableData" :departId="departId"></RecordAdd> |
| | | <ControlModal ref="controlModal" @getTableData="getTableData" :departId="departId"></ControlModal> |
| | | <DisposeModal ref="disposeModal" @getTableData='getTableData' :departId="departId"></DisposeModal> |
| | | <el-dialog :visible.sync="downloadDialog" title="导åº" width="600px"> |
| | | <span> |
| | | <el-button :disabled="!download.currentStateControl" plain type="primary" |
| | | @click="controlDown">æ§å¶å导åº</el-button> |
| | | <el-button :disabled="!download.currentStateProcessing" plain type="primary" |
| | | @click="processingDown">å¤çå导åº</el-button> |
| | | <el-button plain type="primary" @click="supervisoryDown">çç£è®°å½å¯¼åº</el-button> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="downloadDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import RecordAdd from "./Add.vue" |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import ControlModal from "./control/index.vue" |
| | | import DisposeModal from "./dispose/index.vue" |
| | | import { |
| | | personSupervisionRecordPage, |
| | | deletePersonSupervisionRecord, |
| | | exportSupervisionControlSheet, |
| | | exportSupervisionProcessingSheet, |
| | | exportPersonSupervisionRecord |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | props: { |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | components: { |
| | | TableCard, |
| | | RecordAdd, |
| | | limsTable, |
| | | ControlModal, |
| | | DisposeModal |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | page: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | // çç£è®°å½ |
| | | superviseForm: { |
| | | searchVal: undefined |
| | | }, |
| | | superviseColumnData: [ |
| | | // { |
| | | // label: 'id', |
| | | // prop: 'id' |
| | | // }, |
| | | { |
| | | label: 'æ£æµäººå', |
| | | prop: 'testerName', |
| | | width: 120 |
| | | }, { |
| | | label: 'çç£äººå', |
| | | prop: 'supervisorName', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£éªé¡¹ç®', |
| | | prop: 'testItem', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ ·åç¼å·', |
| | | prop: 'sampleNumber', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£éªæ¥æ', |
| | | prop: 'detectionDate', |
| | | width: 160 |
| | | }, { |
| | | label: 'æ§å¶åç¶æ', |
| | | prop: 'currentStateControl', |
| | | formatData: (item) => { |
| | | let result = undefined |
| | | switch (item) { |
| | | case '0': |
| | | result = '工使
åµ' |
| | | break; |
| | | case '1': |
| | | result = '被çç£äººç¡®è®¤' |
| | | break; |
| | | case '2': |
| | | result = 'å¤çæªæ½' |
| | | break; |
| | | case '3': |
| | | result = 'çº æ£æªæ½' |
| | | break; |
| | | case '4': |
| | | result = 'éç¥å®¢æ·' |
| | | break; |
| | | } |
| | | return result |
| | | }, |
| | | width: 140, |
| | | }, { |
| | | label: 'æµç¨åç¶æ', |
| | | prop: 'currentStateProcessing', |
| | | formatData: (item) => { |
| | | let result = undefined |
| | | switch (item) { |
| | | case '0': |
| | | result = 'é®é¢æè¿°' |
| | | break; |
| | | case '1': |
| | | result = 'åå åæ' |
| | | break; |
| | | case '2': |
| | | result = 'çº æ£æªæ½' |
| | | break; |
| | | case '3': |
| | | result = 'éªè¯ç»æ' |
| | | break; |
| | | } |
| | | return result |
| | | }, |
| | | width: 140, |
| | | }, { |
| | | label: '人å', |
| | | prop: 'personnel', |
| | | width: 150 |
| | | }, { |
| | | label: '设å¤ä»ªå¨', |
| | | prop: 'instrumentEquipment', |
| | | width: 140 |
| | | }, { |
| | | label: 'å·¥ä½ç¯å¢', |
| | | prop: 'workingEnvironment', |
| | | width: 140 |
| | | }, { |
| | | label: 'æ ·åéé', |
| | | prop: 'sampleCollection', |
| | | width: 140 |
| | | }, { |
| | | label: 'æ ·åçåå¤', |
| | | prop: 'samplePreparation', |
| | | width: 140 |
| | | }, { |
| | | label: 'æ£éªæ¹æ³', |
| | | prop: 'testMethod', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£æµè®°å½', |
| | | prop: 'testingRecords', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£éªæ¥å', |
| | | prop: 'testReport', |
| | | width: 120 |
| | | }, { |
| | | label: 'çç£æ
åµè¯ä»·', |
| | | prop: 'evaluationSupervisionSituation', |
| | | width: 140 |
| | | }, { |
| | | label: 'ä¸ç¬¦åå¤çæè§', |
| | | prop: 'doNotMeetTheHandlingOpinions', |
| | | width: 140 |
| | | }, { |
| | | fixed: 'right', |
| | | dataType: "slot", |
| | | width: 280, |
| | | label: 'æä½', |
| | | slot: 'action', |
| | | } |
| | | ], |
| | | superviseTableData: [], |
| | | superviseLoading: false, |
| | | multipleSelection: [], |
| | | downloadDialog: false, |
| | | download: { |
| | | currentStateControl: '', |
| | | currentStateProcessing: '', |
| | | }, |
| | | downloadId: '', |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc è·åæ ç人åid |
| | | */ |
| | | getDepart() { |
| | | this.getTableData() |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.pageSize = limit; |
| | | this.getTableData(); |
| | | }, |
| | | // è·åçç£è®°å½ |
| | | async getTableData() { |
| | | this.loading = true |
| | | const { code, data } = await personSupervisionRecordPage({ |
| | | departLimsId: this.isDepartment ? this.departId : null, |
| | | userId: this.isDepartment ? null : this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | }) |
| | | if (code == 200) { |
| | | this.superviseTableData = data.records |
| | | this.page.total = data.total |
| | | } |
| | | this.loading = false |
| | | }, |
| | | // æ°å¢çç£è®°å½ |
| | | addRecord(row, type = false) { |
| | | this.$refs.recordModal.openDialog({ departId: this.departId, ...row }, type) |
| | | }, |
| | | openRecord(row) { |
| | | this.$refs.recordModal.openDialog(row, true) |
| | | }, |
| | | // æå¼å¯¼åºå¼¹æ¡ |
| | | openDownloadDia(row) { |
| | | this.downloadDialog = true |
| | | this.download = row |
| | | console.log('this.download', this.download.currentStateProcessing, this.download.currentStateControl); |
| | | this.downloadId = row.id |
| | | }, |
| | | // æ§å¶åå¯¼åº |
| | | controlDown() { |
| | | exportSupervisionControlSheet({ supervisionRecordId: this.downloadId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'æ§å¶å导åº' + '.docx') |
| | | }) |
| | | }, |
| | | // å¤çåå¯¼åº |
| | | processingDown() { |
| | | exportSupervisionProcessingSheet({ supervisionRecordId: this.downloadId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å¤çå导åº' + '.docx') |
| | | }) |
| | | }, |
| | | // çç£è®°å½å¯¼åº |
| | | supervisoryDown() { |
| | | exportPersonSupervisionRecord({ id: this.downloadId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'çç£è®°å½å¯¼åº' + '.docx') |
| | | }) |
| | | }, |
| | | // æ¾ç¤ºæ§å¶å |
| | | openControl(id) { |
| | | this.$refs.controlModal.openDialog(id) |
| | | }, |
| | | // æ¾ç¤ºå¤çå |
| | | openDispose(id) { |
| | | this.$refs.disposeModal.openDialog(id) |
| | | }, |
| | | // è¡¨æ ¼å¤éæ¿æ´»ååä»ä¹ |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | /** |
| | | * @desc æ¹éå é¤çç£è®°å½ |
| | | */ |
| | | delRecords() { |
| | | this.$confirm( |
| | | 'æ¤æä½å°å é¤é䏿°æ®, æ¯å¦ç»§ç»?', |
| | | 'æç¤º', |
| | | { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | console.log(this.multipleSelection) |
| | | let ids = this.multipleSelection.map((item) => item.id) |
| | | const code = this.delTableData(ids) |
| | | this.$message({ |
| | | type: code == 200 ? 'success' : 'error', |
| | | message: code == 200 ? 'å 餿åï¼' : 'å é¤å¤±è´¥ï¼' |
| | | }); |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | // å é¤api |
| | | async delTableData(ids) { |
| | | const { code } = await this.$axios({ |
| | | method: 'delete', |
| | | url: deletePersonSupervisionRecord, |
| | | data: ids |
| | | }) |
| | | return code |
| | | }, |
| | | // è¡èæ¯è² |
| | | renderBtn(currentState) { |
| | | let status = Number(currentState) |
| | | let res = {} |
| | | switch (status) { |
| | | case 0: |
| | | break; |
| | | case 1: |
| | | res = { color: '#337ecc' } |
| | | break; |
| | | case 2: |
| | | res = { color: '#409EFF' } |
| | | break; |
| | | case 3: |
| | | res = { color: '#79bbff' } |
| | | break; |
| | | case 4: |
| | | res = { color: '#a0cfff' } |
| | | break; |
| | | } |
| | | return res; |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (this.isDepartment) { |
| | | this.getTableData(); |
| | | } else { |
| | | this.getTableData() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | label-width="100px" |
| | | :disabled="disabled" |
| | | size="small" |
| | | > |
| | | <el-form-item label="ææ¯è´è´£äºº"> |
| | | <el-select |
| | | v-model="form.technicalDirector" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="审æ¹"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item v-if="!disabled" style="text-align: right;"> |
| | | <el-button size="small" type="danger" @click="close">驳å</el-button> |
| | | <el-button size="small" type="primary" @click="submit">æäº¤</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | userList: { |
| | | type: Array, |
| | | default: () => { |
| | | return [] |
| | | } |
| | | }, |
| | | approveForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.approveForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('approveForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('submit', 2) |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | close() { |
| | | this.$emit('close', 2) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="ruleForm" |
| | | :disabled="disabled" |
| | | label-width="100px" |
| | | size="small" |
| | | > |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµäººå"> |
| | | <el-select v-model="ruleForm.testerId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£å"> |
| | | <el-select v-model="ruleForm.supervisorId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµé¡¹ç®"> |
| | | <el-input v-model="ruleForm.testItem" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ·åç¼å·"> |
| | | <el-input v-model="ruleForm.sampleNumber" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¥æ"> |
| | | <el-date-picker |
| | | v-model="ruleForm.detectionDate" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | style="width: 100%;" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="人å"> |
| | | <!-- <el-select |
| | | v-model="ruleForm.personnel" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> --> |
| | | <el-input v-model="ruleForm.personnel" type="textarea" :rows="2" style="width: 100%" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仪å¨è®¾å¤"> |
| | | <el-input v-model="ruleForm.instrumentEquipment" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥ä½ç¯å¢"> |
| | | <el-input v-model="ruleForm.workingEnvironment" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ·åéé"> |
| | | <el-input v-model="ruleForm.sampleCollection" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ·åçåå¤"> |
| | | <el-input v-model="ruleForm.samplePreparation" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¹æ³"> |
| | | <el-input v-model="ruleForm.testMethod" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµè®°å½"> |
| | | <el-input v-model="ruleForm.testingRecords" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¥å"> |
| | | <el-input v-model="ruleForm.testReport" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£æ
åµè¯ä»·"> |
| | | <el-select v-model="ruleForm.evaluationSupervisionSituation" placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option label="符å" value="符å"></el-option> |
| | | <el-option label="ä¸ç¬¦å" value="ä¸ç¬¦å"></el-option> |
| | | </el-select> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¤çæè§"> |
| | | <el-input v-model="ruleForm.doNotMeetTheHandlingOpinions" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col v-show="isEdit && !disabled" :span="24"> |
| | | <el-form-item style="text-align: right;"> |
| | | <el-button size="small" @click="close">åæ¶</el-button> |
| | | <el-button size="small" type="primary" @click="approve">审æ¹</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-show="!isEdit" :span="24"> |
| | | <el-form-item style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="addData">æäº¤</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | |
| | | export default { |
| | | props: { |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: () => { |
| | | return [] |
| | | } |
| | | }, |
| | | superviseForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ruleForm: { |
| | | get() { |
| | | return this.superviseForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('superviseForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | approve() { |
| | | this.$emit('submit', 1) |
| | | }, |
| | | addData() { |
| | | this.$emit('addData', 1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- å¹è®è®°å½ --> |
| | | <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> |
| | | <limsTable :column="trainingColumn" :currentChange="currentChange" :height="'calc(100vh - 18em)'" |
| | | :highlightCurrentRow="true" :table-data="trainingTableData" :table-loading="trainingLoading" |
| | | style="padding: 0 15px;" :page="trainingPagination" @pagination="trainingPaginationMethod"> |
| | | </limsTable> |
| | | </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> |
| | | <limsTable :column="trainingPersonColumn" :height="'calc(100vh - 18em)'" |
| | | :table-data="trainingPersonTableData" :table-loading="trainingPersonLoading" style="padding: 0 15px;" |
| | | :page="trainingPersonPagination" @pagination="trainingPersonPaginationMethod"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import TableCard from "@/components/TableCard/index.vue"; |
| | | import { |
| | | exportTrainingRecord, |
| | | trainingSelectTrainingRecord, |
| | | queryPersonnelDetails, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | components: { TableCard, limsTable }, |
| | | 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); |
| | | exportTrainingRecord({ |
| | | userId: row.userId, |
| | | trainingDate: date |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å¹è®è®°å½å¯¼åº' + '.docx') |
| | | }) |
| | | }, |
| | | // è·åå®éªå®¤-å¹è®è®¡ååè¡¨ä¿¡æ¯ |
| | | getPersonnelTraining(departId) { |
| | | // const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | trainingSelectTrainingRecord({ |
| | | departmentId: departId, |
| | | ...this.trainingPagination |
| | | }).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 = '' |
| | | } |
| | | queryPersonnelDetails({ |
| | | userId, |
| | | ...this.trainingPersonPagination |
| | | }).then(res => { |
| | | this.trainingPersonTableData = res.data.records; |
| | | this.trainingPersonPagination.total = res.data.total; |
| | | }); |
| | | }, |
| | | // å页 |
| | | trainingPaginationMethod({ page, limit }) { |
| | | this.trainingPagination.current = page; |
| | | this.trainingPagination.size = limit; |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | // å页 |
| | | trainingPersonPaginationMethod({ page, limit }) { |
| | | this.trainingPersonPagination.current = page; |
| | | this.trainingPersonPagination.size = limit; |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 奿©è®°å½ --> |
| | | <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 { |
| | | deleteRewardPunishment, |
| | | addOrUpdateRewardPunishment, |
| | | rewardPunishmentPage |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | 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 rewardPunishmentPage({ |
| | | 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' |
| | | }) |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | // å建ä¸ä¸ªè¶
龿¥ï¼å°æä»¶æµèµè¿å»ï¼ç¶åå®ç°è¿ä¸ªè¶
龿¥çåå»äºä»¶ |
| | | 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) |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | // å建ä¸ä¸ªè¶
龿¥ï¼å°æä»¶æµèµè¿å»ï¼ç¶åå®ç°è¿ä¸ªè¶
龿¥çåå»äºä»¶ |
| | | 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) |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | 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 addOrUpdateRewardPunishment(this.form) |
| | | if (code == 200) { |
| | | this.$message.success("æä½æåï¼") |
| | | this.getPersonnelTraining(this.departId); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | async deleteRow(row) { |
| | | const { code, data } = await deleteRewardPunishment({ |
| | | 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 v-if="clickNodeVal.userId" size="small" type="primary" @click="dialogVisible = true">æ·»å å·¥ä½å±¥å</el-button> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="exportExcel">导åºexcel</el-button> |
| | | </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="startTime"> |
| | | </el-table-column> |
| | | <el-table-column label="ç»ææ¥æ" min-width="180" prop="endTime"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½åä½" min-width="120" prop="placeWork"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½é¨é¨" min-width="120" prop="department"> |
| | | </el-table-column> |
| | | <el-table-column label="èå¡" min-width="120" prop="post"> |
| | | </el-table-column> |
| | | <el-table-column label="夿³¨" min-width="180" prop="remarks"> |
| | | </el-table-column> |
| | | <el-table-column label="å建人" min-width="180" prop="createUser"> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" min-width="180" prop="createTime"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="150"> |
| | | <template v-slot="scope"> |
| | | <el-button size="small" type="text" @click="downloadFile(scope.row.fileName)">导åº</el-button> |
| | | <el-button size="small" type="text" @click="checkFun(scope.row)">æ¥ç</el-button> |
| | | <el-button size="small" style="color: red;" type="text" @click="deleteFun(scope.row.id)">å é¤</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="45%"> |
| | | <div style="height: 30vh;"> |
| | | <el-form ref="ruleForm" :model="ruleForm" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èµ·å§æ¥æ" prop="startTime"> |
| | | <el-date-picker v-model="ruleForm.startTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" required |
| | | 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="12"> |
| | | <el-form-item label="ç»ææ¥æ"> |
| | | <el-date-picker v-model="ruleForm.endTime" 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="12"> |
| | | <el-form-item label="å·¥ä½åä½" prop="placeWork"> |
| | | <el-input v-model="ruleForm.placeWork" clearable required size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥ä½é¨é¨" prop="department"> |
| | | <el-input v-model="ruleForm.department" clearable required size="small"></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" clearable required size="small"></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" disabled size="small"></el-input></el-col> |
| | | <el-col :span="7"> |
| | | <el-upload ref="upload" :action="action" :on-change="handleChangePic" :on-success="onSuccess" |
| | | :show-file-list="false" style="float: left; margin: 0 20px;" :headers="uploadHeader"> |
| | | <el-button slot="trigger" class="uploadFile" 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" clearable size="small"></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 { |
| | | personTrackRecordExport, |
| | | personTrackRecordUpdate, |
| | | personTrackRecordSave, |
| | | personTrackRecordDelete, |
| | | personTrackRecordSelect, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | 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 + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | methods: { |
| | | downloadFile(fileName) { |
| | | this.$download.saveAs(fileName, 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 |
| | | personTrackRecordExport({ |
| | | userId, |
| | | departmentId |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'å·¥ä½å±¥å.xlsx') |
| | | }) |
| | | }, |
| | | saveOrUpdate() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.isUpdate) { |
| | | personTrackRecordUpdate(this.ruleForm).then(res => { |
| | | if (res.code = 200) { |
| | | this.dialogVisible = false |
| | | this.$message.success('æ´æ°æåï¼') |
| | | this.init() |
| | | } |
| | | }) |
| | | } else { |
| | | this.ruleForm.userId = this.clickNodeVal.userId |
| | | personTrackRecordSave(this.ruleForm).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(() => { |
| | | personTrackRecordDelete({ 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) { |
| | | personTrackRecordSelect({ |
| | | userId, |
| | | departmentId, |
| | | ...this.search |
| | | }).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> |
| | | <el-tabs v-model="activeName" :lazy="true" type="border-card"> |
| | | <el-tab-pane label="人ååºæ¬ä¿¡æ¯" name="人ååºæ¬ä¿¡æ¯"> |
| | | <PersonnelList v-if="activeName === '人ååºæ¬ä¿¡æ¯' && isShowAll" ref="personnelList" |
| | | :currentCompaniesList="currentCompaniesList" :departId="departId" @refreshTree="refreshTree" |
| | | @updatePerson="updatePerson"></PersonnelList> |
| | | <personnelInformation v-if="activeName === '人ååºæ¬ä¿¡æ¯' && !isShowAll" :clickNodeVal="clickNodeVal"> |
| | | </personnelInformation> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å¹è®è®¡å" name="å¹è®è®¡å"> |
| | | <PersonnelTraining v-if="activeName === 'å¹è®è®¡å'" ref="personnelTraining" :flag="flag" :departId="departId" |
| | | :isDepartment="isDepartment"></PersonnelTraining> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="çç£è®¡å" name="çç£è®¡å"> |
| | | <Plan v-if="activeName === 'çç£è®¡å'" :departId="departId"></Plan> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å²ä½èè´£" name="å²ä½èè´£"> |
| | | <job-responsibilities v-if="activeName === 'å²ä½èè´£'" ref="jobResponsibilities" :departId="departId" |
| | | :isDepartment="isDepartment"></job-responsibilities> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å·¥ä½å±¥å" name="å·¥ä½å±¥å"> |
| | | <trackRecord v-if="activeName === 'å·¥ä½å±¥å'" :clickNodeVal="clickNodeVal"></trackRecord> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="奿©è®°å½" name="奿©è®°å½"> |
| | | <rewardPunishmentRecord v-if="activeName === '奿©è®°å½'" :departId="departId" :isDepartment="isDepartment"> |
| | | </rewardPunishmentRecord> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å¹è®è®°å½" name="å¹è®è®°å½"> |
| | | <training-record v-if="activeName === 'å¹è®è®°å½'" ref="trainingRecord" :departId="departId" |
| | | :isDepartment="isDepartment"></training-record> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="çç£è®°å½" name="çç£è®°å½"> |
| | | <Records v-if="activeName === 'çç£è®°å½'" ref="recordsRef" :departId="departId" :isDepartment="isDepartment"> |
| | | </Records> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ä»»èææè®°å½" name="ä»»èææè®°å½"> |
| | | <Mandate v-if="activeName === 'ä»»èææè®°å½'" ref="manDateRef" :departId="departId" :isDepartment="isDepartment"> |
| | | </Mandate> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="人åè½å" name="人åè½å"> |
| | | <personnel-capacity v-if="activeName === '人åè½å'" ref="personnelCapacity" :departId="departId" |
| | | :isDepartment="isDepartment"></personnel-capacity> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æ²éè®°å½" name="æ²éè®°å½"> |
| | | <Communicate v-if="activeName === 'æ²éè®°å½'" ref="communicateRef" :departId="departId" :isDepartment="isDepartment"> |
| | | </Communicate> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </template> |
| | | <script> |
| | | import Plan from './components/Plan/index.vue'; |
| | | import Records from './components/Records/index.vue'; |
| | | import Communicate from './components/Communicate/index.vue'; |
| | | import Mandate from './components/Mandate/index.vue'; |
| | | import PersonnelList from './components/PersonnelList/index.vue'; |
| | | import PersonnelTraining from './components/PersonnelTraining/index.vue'; |
| | | import JobResponsibilities from './components/JobResponsibilities/index.vue'; |
| | | import TrainingRecord from './components/TrainingRecord/index.vue'; |
| | | import PersonnelCapacity from './components/PersonnelCapacity/index.vue'; |
| | | import trackRecord from "./components/trackRecord/index.vue"; |
| | | import rewardPunishmentRecord from "./components/rewardPunishmentRecord/index.vue"; |
| | | import PersonnelInformation from "./components/PersonnelInformation/index.vue"; |
| | | |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | }, |
| | | departId: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isShowAll: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | currentCompaniesList: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | }, |
| | | components: { |
| | | PersonnelInformation, |
| | | rewardPunishmentRecord, |
| | | trackRecord, |
| | | PersonnelCapacity, |
| | | TrainingRecord, |
| | | JobResponsibilities, |
| | | PersonnelTraining, |
| | | PersonnelList, |
| | | Plan, |
| | | Records, |
| | | Communicate, |
| | | Mandate |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (newId) { |
| | | switch (this.activeName) { |
| | | case 'æ²éè®°å½': |
| | | this.$refs.communicateRef.getDepart(newId); |
| | | break; |
| | | case 'ä»»èææè®°å½': |
| | | this.$refs.manDateRef.getDepart(newId); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | flag: true, |
| | | activeName: '人ååºæ¬ä¿¡æ¯', |
| | | } |
| | | }, |
| | | created() { |
| | | // this.flag = isPermission('personTrainingSelect') |
| | | // console.log('this.flag',this.flag); |
| | | }, |
| | | methods: { |
| | | updatePerson(row) { |
| | | this.$parent.updatePerson(row); |
| | | }, |
| | | refreshTree() { |
| | | this.$parent.refreshTree(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .box { |
| | | height: calc(100vh - 11em); |
| | | } |
| | | |
| | | .el-tabs>>>.el-tabs--border-card { |
| | | box-shadow: unset; |
| | | border: unset; |
| | | } |
| | | |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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% - 80px);overflow-y: scroll;scrollbar-width: none;" |
| | | @node-click="handleNodeClick"> |
| | | <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 './Department/index.vue'; |
| | | import { |
| | | delDepartmentLims, |
| | | addDepartmentLims, |
| | | selectCNSAPersonTree, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | |
| | | 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 |
| | | 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 |
| | | } |
| | | addDepartmentLims(this.addOb).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() { |
| | | 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; |
| | | }, |
| | | 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: 240px; |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .main_right { |
| | | width: calc(100% - 240px); |
| | | 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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getToken } from "@/utils/auth"; |
| | | import { |
| | | getPageResults, |
| | | dangerousRiskApproval, |
| | |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-upload v-if="radio === 0" ref='upload1' style="display: inline;margin-right: 8px" :action="uploadAction1" |
| | | :before-upload="beforeUpload1" :headers="token" :on-error="onError1" :on-success="handleSuccessUp1" |
| | | :before-upload="beforeUpload1" :headers="uploadHeader" :on-error="onError1" :on-success="handleSuccessUp1" |
| | | :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'> |
| | | <el-button size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="uploadDia" title="æ°æ®å¯¼å
¥" width="500px"> |
| | | <div style="margin: 0 auto;"> |
| | | <el-upload ref="upload" :action="uploadAction" :auto-upload="false" :file-list="fileList" :headers="token" |
| | | :limit="1" :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag |
| | | name="file"> |
| | | <el-upload ref="upload" :action="uploadAction" :auto-upload="false" :file-list="fileList" |
| | | :headers="uploadHeader" :limit="1" :on-change="beforeUpload" :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> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="èµè´¨å¾ç"> |
| | | <el-upload ref="upload" :action="uploadAction" :on-success="(m) => handleSuccessUpImg(m, 'imageUrl')" |
| | | accept="image/jpg,image/jpeg,image/png" :multiple="false" :limit="1" :headers="headers" |
| | | accept="image/jpg,image/jpeg,image/png" :multiple="false" :limit="1" :headers="uploadHeader" |
| | | :on-change="beforeUpload" :on-error="onError"> |
| | | <el-button slot="trigger" size="small" type="primary">éåå¾ç</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item label="èµè´¨éä»¶"> |
| | | <el-upload ref="upload1" :action="uploadAction" :on-success="(m) => handleSuccessUpImg(m, 'fileUrl')" |
| | | accept="image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx" :headers="headers" :multiple="false" |
| | | accept="image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx" :headers="uploadHeader" :multiple="false" |
| | | :limit="1" :on-change="beforeUpload1" :on-error="onError1"> |
| | | <el-button slot="trigger" size="small" type="primary">éåæä»¶</el-button> |
| | | </el-upload> |