Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev
| | |
| | | "axios": "0.28.1", |
| | | "clipboard": "2.0.8", |
| | | "core-js": "3.37.1", |
| | | "dom-to-image": "^2.6.0", |
| | | "echarts": "5.4.0", |
| | | "element-resize-detector": "^1.2.4", |
| | | "element-ui": "2.15.14", |
| | | "file-saver": "2.0.5", |
| | | "fuse.js": "6.4.3", |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥çæå±å使£éªå |
| | | export function selectBushingBySampleId(query) { |
| | | return request({ |
| | | url: '/insBushing/selectBushingBySampleId', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | export function exportChecked(query) { |
| | | return request({ |
| | | url: '/insOrder/exportChecked', |
| | | method: 'get', |
| | | method: 'post', |
| | | data: query, |
| | | responseType:'blob' |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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: "/system/newUser/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, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // ä¸ç¡®å®åº¦è¯å®ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //è®¾å¤æ å½¢ |
| | | export function treeDevice(query) { |
| | | return request({ |
| | | url: "/deviceScope/treeDevice", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è®¾å¤è¯¦æ
å表 |
| | | export function selectDeviceParameter(query) { |
| | | return request({ |
| | | url: "/deviceScope/selectDeviceParameter", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è·åå®éªå®¤åç§° |
| | | export function obtainItemParameterList(query) { |
| | | return request({ |
| | | url: "/laboratoryScope/obtainItemParameterList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤å·¥å
·æç»å¯¼åº |
| | | export function exportEquipmentDetails(query) { |
| | | return request({ |
| | | url: "/deviceScope/exportEquipmentDetails", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤éé¢éæ©æ£éªé¡¹ç®(æ å½¢ç»æ) |
| | | export function getInsProduction(query) { |
| | | return request({ |
| | | url: "/capacityScope/getInsProduction", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹è®¾å¤è¯¦æ
åæ° |
| | | export function upDeviceParameter(data) { |
| | | return request({ |
| | | url: "/deviceScope/upDeviceParameter", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ·»å 设å¤è¯¦æ
åæ° |
| | | export function addDeviceParameter(data) { |
| | | return request({ |
| | | url: "/deviceScope/addDeviceParameter", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç»´æ¤æ°éé
ç½® |
| | | export function numberCollect(data) { |
| | | return request({ |
| | | url: "/deviceScope/numberCollect", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //设å¤é¢çº¦æ¥å£-å表 |
| | | export function getDeviceParameter(query) { |
| | | return request({ |
| | | url: "/deviceScope/selectDeviceParameter", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤è¯¦æ
åæ° |
| | | export function delDeviceParameter(query) { |
| | | return request({ |
| | | url: "/deviceScope/delDeviceParameter", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢æ°éé
ç½® |
| | | export function queryDataAcquisitionConfiguration(query) { |
| | | return request({ |
| | | url: "/deviceScope/queryDataAcquisitionConfiguration", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ç»´æ¤æ°éé
ç½® |
| | | export function saveDataAcquisitionConfiguration(data) { |
| | | return request({ |
| | | url: "/deviceScope/saveDataAcquisitionConfiguration", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å 餿°éé
ç½® |
| | | export function deleteDataAcquisitionConfiguration(data) { |
| | | return request({ |
| | | url: "/deviceScope/deleteDataAcquisitionConfiguration", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //cnas设å¤ä½¿ç¨è®°å½å页æ¥è¯¢ |
| | | export function deviceRecordPage(query) { |
| | | return request({ |
| | | url: "/deviceRecord/deviceRecordPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 设å¤ä½¿ç¨è®°å½ä¿å |
| | | export function saveDeviceRecord(data) { |
| | | return request({ |
| | | url: "/deviceRecord/saveDeviceRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 设å¤ä½¿ç¨è®°å½ç¼è¾ |
| | | export function updateDeviceRecord(data) { |
| | | return request({ |
| | | url: "/deviceRecord/updateDeviceRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤ä½¿ç¨è®°å½ |
| | | export function deleteDeviceRecord(query) { |
| | | return request({ |
| | | url: "/deviceRecord/deleteDeviceRecord", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //使ç¨è®°å½ å¯¼åº |
| | | export function exportUseRecord(query) { |
| | | return request({ |
| | | url: "/deviceRecord/exportUseRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ°å¢è®¾å¤æ¡£æ¡ |
| | | export function addDocument(data) { |
| | | return request({ |
| | | url: "/documents/add", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // è·åç¸å
³ææ¡£æ°æ®çapi-æ´æ° |
| | | export function updateDocument(data) { |
| | | return request({ |
| | | url: "/documents/updateDocument", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤æ¡£æ¡ |
| | | export function deleteDocumentById(query) { |
| | | return request({ |
| | | url: "/documents/delete", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | // |
| | | |
| | | //设å¤éªæ¶å表 |
| | | export function pageDeviceAcceptance(query) { |
| | | return request({ |
| | | url: "/deviceAcceptance/pageDeviceAcceptance", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤éªæ¶éä»¶å表 |
| | | export function getDeviceAcceptanceFileList(query) { |
| | | return request({ |
| | | url: "/deviceAcceptance/getDeviceAcceptanceFileList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤éªæ¶éä»¶å é¤ |
| | | export function delDeviceAcceptanceFileList(query) { |
| | | return request({ |
| | | url: "/deviceAcceptance/delDeviceAcceptanceFileList", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤éªæ¶ï¼è£
å¤ï¼å¯¼åº |
| | | export function exportDeviceAcceptance(query) { |
| | | return request({ |
| | | url: "/deviceAcceptance/exportDeviceAcceptance", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤éªæ¶ |
| | | export function delDeviceAcceptance(query) { |
| | | return request({ |
| | | url: "/deviceAcceptance/delDeviceAcceptance", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è®¾å¤éªæ¶ |
| | | export function getDeviceAcceptance(query) { |
| | | return request({ |
| | | url: "/deviceAcceptance/getDeviceAcceptance", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤éªæ¶ |
| | | export function addDeviceAcceptance(data) { |
| | | return request({ |
| | | url: "/deviceAcceptance/addDeviceAcceptance", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç¼è¾è®¾å¤éªæ¶ |
| | | export function updateDeviceAcceptance(data) { |
| | | return request({ |
| | | url: "/deviceAcceptance/updateDeviceAcceptance", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ ¡å å页æ¥è¯¢ |
| | | export function deviceMetricRecordPage(query) { |
| | | return request({ |
| | | url: "/deviceMetricRecord/deviceMetricRecordPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // è®¾å¤æ ¡å æ°å¢ æ´æ°-æ ¡åè®°å½ |
| | | export function addOrUpdateDeviceMetricRecord(data) { |
| | | return request({ |
| | | url: "/deviceMetricRecord/addOrUpdateDeviceMetricRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | //è®¾å¤æ ¡å æ°å¢ æ´æ°-æäº¤é¡¹ç®æ ¡åç»´æ¤ |
| | | export function saveOrUpdateDeviceMetric(data) { |
| | | return request({ |
| | | url: "/deviceMetrics/saveOrUpdateDeviceMetric", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ ¡å æ¥è¯¢æ ¡åæ¡ç® |
| | | export function showDeviceMetricsCopy(query) { |
| | | return request({ |
| | | url: "/deviceMetricRecord/showDeviceMetricsCopy", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ ¡å å é¤ |
| | | export function deleteDeviceMetricRecord(query) { |
| | | return request({ |
| | | url: "/deviceMetricRecord/deleteDeviceMetricRecord", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //è®¾å¤æ ¡å å¯¼åº |
| | | export function deviceMetricRecordExport(query) { |
| | | return request({ |
| | | url: "/deviceMetricRecord/deviceMetricRecordExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ ¡å 设å¤ç»´æ¤è¡¨ æ¥è¯¢ |
| | | export function selectDeviceMetric(query) { |
| | | return request({ |
| | | url: "/deviceMetrics/selectDeviceMetric", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ ¡å å é¤ |
| | | export function deleteDeviceMetrics(query) { |
| | | return request({ |
| | | url: "/deviceMetrics/deleteDeviceMetrics", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //å é¤ è®¾å¤æ ¡å-éä»¶ |
| | | export function delDeviceCalibrationFile(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/delDeviceCalibrationFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //è®¾å¤æ ¡åæ¥è¯¢-éä»¶ |
| | | export function getDeviceCalibrationFile(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getDeviceCalibrationFile", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //è®¾å¤æ ¡å导åº-éä»¶ |
| | | export function downLoadDeviceCalibrationFile(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/downLoadDeviceCalibrationFile", |
| | | method: "get", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | |
| | | //å 餿件 |
| | | export function deleteCNASFile(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/deleteCNASFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è®¾å¤æ¡£æ¡å表 |
| | | export function getListByDId(query) { |
| | | return request({ |
| | | url: '/documents/getListByDId', |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ¡£æ¡å¯¼åº |
| | | export function exportDeviceFile(query) { |
| | | return request({ |
| | | url: "/deviceScope/exportDeviceFile", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤ä¿å
»åæ¡å¯¼åº |
| | | export function exportMaintenanceRecord(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/exportMaintenanceRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤ç»´æ¤å é¤ |
| | | export function deleteDeviceMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/deleteDeviceMaintenance", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤ç»´æ¤å é¤ |
| | | export function deviceMaintenanceExport(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/deviceMaintenanceExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤ç»´æ¤ä¿å
» |
| | | export function addDeviceMaintenance(data) { |
| | | return request({ |
| | | url: "/deviceMaintain/addDeviceMaintenance", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | //设å¤ç»´æ¤è¡¨ æ¥è¯¢ |
| | | export function getDeviceMaintenancePage(query) { |
| | | return request({ |
| | | url: "/deviceMaintain/getDeviceMaintenancePage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // åç¨-ä¿å |
| | | export function saveDeviceBorrow(data) { |
| | | return request({ |
| | | url: "/deviceBorrow/saveDeviceBorrow", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //åç¨-æ¥ç |
| | | export function getDeviceBorrow(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/getDeviceBorrow", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //åç¨-å¯¼åº |
| | | export function deviceBorrowExport(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/deviceBorrowExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //åç¨-å é¤ |
| | | export function deleteDeviceBorrow(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/deleteDeviceBorrow", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //åç¨-å表 |
| | | export function deviceBorrowPage(query) { |
| | | return request({ |
| | | url: "/deviceBorrow/deviceBorrowPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 设å¤å¯ç¨/åç¨ ä¿åï¼æäº¤ï¼é©³åï¼éè¿æ¥å£ |
| | | export function saveDeviceState(data) { |
| | | return request({ |
| | | url: "/deviceState/saveDeviceState", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //éè¿è®¾å¤ç¼å·è·å设å¤å表 |
| | | export function selectDeviceByCode(query) { |
| | | return request({ |
| | | url: "/deviceScope/selectDeviceByCode", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤åå¯ç¨åæ¡å¯¼åº |
| | | export function exportDeviceStatus(query) { |
| | | return request({ |
| | | url: "/deviceState/exportDeviceStatus", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤å¯ç¨/åç¨ å é¤ |
| | | export function deleteDeviceState(query) { |
| | | return request({ |
| | | url: "/deviceState/deleteDeviceState", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤ç¶æå¯¼åº |
| | | export function deviceStateExport(query) { |
| | | return request({ |
| | | url: "/deviceState/deviceStateExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤å¯ç¨/åç¨ å页 |
| | | export function getDeviceStatePage(query) { |
| | | return request({ |
| | | url: "/deviceState/getDeviceStatePage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ¥åºç³è¯·å表 |
| | | export function pageDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/pageDeviceScrapped", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å¯¼åº |
| | | export function exportDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/exportDeviceScrapped", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤æ¥åºç³è¯· |
| | | export function delDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/delDeviceScrapped", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è®¾å¤æ¥åºç³è¯· |
| | | export function getDeviceScrapped(query) { |
| | | return request({ |
| | | url: "/deviceScrapped/getDeviceScrapped", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | export function addDeviceScrapped(data) { |
| | | return request({ |
| | | url: "/deviceScrapped/addDeviceScrapped", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //è®¾å¤æ
éç»´ä¿®å表 |
| | | export function pageDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/pageDeviceBreakdownMaintenance", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // è®¾å¤æ
éä¸ç»´ä¿®-å¯¼åº |
| | | export function exportDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/exportDeviceBreakdownMaintenance", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤æ
éç»´ä¿® |
| | | export function delDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/delDeviceBreakdownMaintenance", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è®¾å¤æ
éç»´ä¿® |
| | | export function getDeviceBreakdownMaintenance(query) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/getDeviceBreakdownMaintenance", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤æ
éç»´ä¿® |
| | | export function addDeviceBreakdownMaintenance(data) { |
| | | return request({ |
| | | url: "/deviceBreakdownMaintenance/addDeviceBreakdownMaintenance", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | export function getDeviceInspectionRecordByPage(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/getDeviceInspectionRecordByPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导åºè®¾å¤ç¹æ£è®°å½ |
| | | export function exportDeviceInspectionRecord(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/exportDeviceInspectionRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤ç¹æ£è®°å½ |
| | | export function deleteDeviceInspectionRecord(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/deleteDeviceInspectionRecord", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤ç¹æ£è®°å½è¯¦æ
|
| | | export function getDeviceInspectionRecord(query) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/getDeviceInspectionRecord", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤ç¹æ£è®°å½ |
| | | export function addDeviceInspectionRecord(data) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/addDeviceInspectionRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹è®¾å¤ç¹æ£è®°å½ |
| | | export function updateDeviceInspectionRecord(data) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/updateDeviceInspectionRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 夿 ¸è®¾å¤ç¹æ£è®°å½ |
| | | export function reviewDeviceInspectionRecord(data) { |
| | | return request({ |
| | | url: "/deviceInspectionRecord/reviewDeviceInspectionRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //设å¤äºæ
æ¥åå表 |
| | | export function pageDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/pageDeviceAccidentReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导åºè®¾å¤äºæ
|
| | | export function exportDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/exportDeviceAccidentReport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤è®¾å¤äºæ
æ¥å |
| | | export function delDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/delDeviceAccidentReport", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è®¾å¤äºæ
æ¥å |
| | | export function getDeviceAccidentReport(query) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/getDeviceAccidentReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤äºæ
æ¥å |
| | | export function addDeviceAccidentReport(data) { |
| | | return request({ |
| | | url: "/deviceAccidentReport/addDeviceAccidentReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | //ä½ä¸æå¯¼ä¹¦æ¥è¯¢ |
| | | export function pageByPageQueryOfHomeworkInstructions(query) { |
| | | return request({ |
| | | url: "/instruction/pageByPageQueryOfHomeworkInstructions", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //ä½ä¸æå¯¼ä¹¦ å®¡æ¹ |
| | | export function approvalOfHomeworkInstructionManual(data) { |
| | | return request({ |
| | | url: "/instruction/approvalOfHomeworkInstructionManual", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //ä½ä¸æå¯¼ä¹¦ å é¤ |
| | | export function homeworkGuidebook(query) { |
| | | return request({ |
| | | url: "/instruction/homeworkGuidebook", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä½ä¸æå¯¼ä¹¦ ç¼è¾æ¥è¯¢ |
| | | export function homeworkGuidebookEditor(query) { |
| | | return request({ |
| | | url: "/instruction/homeworkGuidebookEditor", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä½ä¸æå¯¼ä¹¦æ°å¢ |
| | | export function newHomeworkGuidebookAdded(data) { |
| | | return request({ |
| | | url: "/instruction/newHomeworkGuidebookAdded", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //ä½ä¸æå¯¼ä¹¦åæ§æä»¶å é¤ |
| | | export function deleteHomeworkGuidebook(query) { |
| | | return request({ |
| | | url: "/instruction/deleteHomeworkGuidebook", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤é¢çº¦æ¥å£ |
| | | export function reservationSelectDevice(query) { |
| | | return request({ |
| | | url: "/reservation/selectDeviceParameter", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤é¢çº¦æ¥å£ å é¤ |
| | | export function reservationDelete(query) { |
| | | return request({ |
| | | url: "/reservation/delete", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤é¢çº¦æ¥å£ ä¿å |
| | | export function reservationSave(query) { |
| | | return request({ |
| | | url: "/reservation/save", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | //设å¤é¢çº¦æ¥å£ |
| | | export function selectReservationParameterPage(query) { |
| | | return request({ |
| | | url: "/reservation/selectReservationParameterPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // 设å¤è¿è¡æ»è§-æ ¹æ®idè·åè®¾å¤æ
éæ°æ® |
| | | export function device(query) { |
| | | return request({ |
| | | url: "/deviceFaults/device", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤éªæ¶ä¸å个tableè¡¨æ ¼çå é¤åè½ |
| | | export function deleteIncidentReportAll(query) { |
| | | return request({ |
| | | url: "/incidentReport/deleteIncidentReportAll", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤éªæ¶ä¸å个tableè¡¨æ ¼çå é¤åè½ |
| | | export function deleteIncidentReport(query) { |
| | | return request({ |
| | | url: "/incidentReport/deleteIncidentReport", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //设å¤éªæ¶ ä¿åï¼æäº¤ï¼é©³åï¼éè¿æ¥å£ |
| | | export function saveIncidentReportData(query) { |
| | | return request({ |
| | | url: "/incidentReport/saveIncidentReportData", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | //设å¤éªæ¶ ä¿åï¼æäº¤ï¼é©³åï¼éè¿æ¥å£ |
| | | export function incidentReportPage(query) { |
| | | return request({ |
| | | url: "/incidentReport/incidentReportPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤éªæ¶ ä¿åï¼æäº¤ï¼é©³åï¼éè¿æ¥å£ |
| | | export function getShowIncidentReport(query) { |
| | | return request({ |
| | | url: "/incidentReport/getShowIncidentReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //设å¤éªæ¶å¯¼åº |
| | | export function incidentReportExport(query) { |
| | | return request({ |
| | | url: "/incidentReport/incidentReportExport", |
| | | method: "get", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | //æ·»å è®¾å¤æ
é |
| | | export function addOrUpdateDeviceFaultOne(query) { |
| | | return request({ |
| | | url: "/deviceFaultOne/addOrUpdateDeviceFaultOne", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | //è®¾å¤æ
é表 å页æ¥è¯¢ |
| | | export function deviceFaultOnePage(query) { |
| | | return request({ |
| | | url: "/deviceFaultOne/deviceFaultOnePage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //è®¾å¤æ
éå¯¼åº |
| | | export function exportRewardAndPunishmentRecords(query) { |
| | | return request({ |
| | | url: "/deviceFaultOne/exportRewardAndPunishmentRecords", |
| | | method: "get", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | |
| | | //å é¤ è®¾å¤æ
é |
| | | export function deleteDeviceFaultOne(query) { |
| | | return request({ |
| | | url: "/deviceFaultOne/deleteDeviceFaultOne", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | // éè¿æ åæ æ¥è¯¢å¯¹åºçæ£éªé¡¹ç® |
| | | export function selectStandardProductList(query) { |
| | | return request({ |
| | | url: "/standardTree/selectStandardProductList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢åå§è®°å½æ¨¡æ¿æä¸¾ |
| | | export function getStandardTemplate(query) { |
| | | return request({ |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // è·åæ åæ ä¸æ åæ¹æ³æä¸¾ |
| | | export function selectStandardMethodEnum() { |
| | | return request({ |
| | | url: "/standardTree/selectStandardMethodEnum", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // è·åæ åæ (æ£éªä¸å) |
| | | export function selectStandardTreeList2() { |
| | | return request({ |
| | | url: "/standardTree/selectStandardTreeList2", |
| | | method: "get", |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | // è·åå½åç»å½äººåé¨é¨ |
| | | export function selectUserDepartmentLimsName(query) { |
| | | export function selectUserDepartmentLimsName() { |
| | | return request({ |
| | | url: "/system/newUser/selectUserDepartmentLimsName", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // è·åå®éªå®¤ä¸çæ£éªåå表 |
| | | export function getLaboratoryPersonList() { |
| | | return request({ |
| | | url: "/system/newUser/getLaboratoryPersonList", |
| | | method: "get", |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | > .el-submenu__title |
| | | .el-submenu__icon-arrow { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | /* å
¨å±è¡¨æ ¼æ ·å¼ */ |
| | | .el-table th.el-table__cell, |
| | | .has-gutter .el-table__cell { |
| | | background-color: #f0f1f5 !important; |
| | | color: #333; |
| | | } |
| | | |
| | | /* è¡¨æ ¼è¡éä¸èæ¯è² */ |
| | | .el-table__body tr.current-row>td.el-table__cell, |
| | | .el-table__body tr.selection-row>td.el-table__cell { |
| | | background-color: #c1ddf1; |
| | | } |
| | | |
| | | .el-table__header .has-gutter .el-table__cell .cell { |
| | | font-size: 14px !important; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .cell { |
| | | color: #333; |
| | | padding: 0 15px !important; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .cell span { |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .el-table .el-table__cell { |
| | | padding: 0 0; |
| | | } |
| | | |
| | | .el-table .el-table__row { |
| | | height: 41px; |
| | | } |
| | | |
| | | .el-table th.el-table__cell>.cell { |
| | | font-size: 14px; |
| | | font-weight: 400; |
| | | color: #333; |
| | | padding: 6px 15px !important; |
| | | } |
| | |
| | | |
| | | .bg-1 { |
| | | width: 100%; |
| | | height: calc(100% - 50px); |
| | | min-height: calc(100vh - 90px); |
| | | overflow-y: auto; |
| | | padding: 20px 10px 10px; |
| | | // padding: 20px 10px 10px; |
| | | background: rgb(245, 247, 251); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="echart_size" :id="id" :style="`height:${config.height};width:${config.width}`"></div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import * as echarts from 'echarts' |
| | | import ResizeListener from 'element-resize-detector'; |
| | | import { iuCharts } from '@/utils/echarts' |
| | | export default { |
| | | props: { |
| | | id: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | config: { |
| | | type: Object, |
| | | default: () => { } |
| | | }, |
| | | datas: { |
| | | type: Object, |
| | | default: () => { } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | } |
| | | }, |
| | | watch: { |
| | | /* 妿å¾è¡¨æ°æ®æ¯åå°è·åçï¼çå¬ç¶ç»ä»¶ä¸çæ°æ®ååï¼éæ°è§¦åEcharts */ |
| | | datas: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.init(); |
| | | }) |
| | | }, |
| | | }, |
| | | }, |
| | | created() { |
| | | this.$nextTick(() => { |
| | | this.init() |
| | | }) |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.windowResizeListener); |
| | | this.chartEleResizeListener(); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return; |
| | | } |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // å®ä¾å对象 |
| | | this.chart = echarts.init(document.getElementById(this.id)) |
| | | this.chart.showLoading({ |
| | | text: 'loading', |
| | | color: '#3A7BFA', |
| | | textColor: '#000', |
| | | maskColor: 'rgba(255, 255, 255, 0.2)', |
| | | zlevel: 0, |
| | | }); |
| | | if (this.config.isLoading) { |
| | | this.chart.hideLoading(); |
| | | switch (this.config.type) { |
| | | case 'bar': |
| | | iuCharts.drawBar(this.chart, this.datas) |
| | | break; |
| | | case 'line': |
| | | iuCharts.drawLine(this.chart, this.datas) |
| | | break; |
| | | case 'pie': |
| | | iuCharts.drawPie(this.chart, this.datas) |
| | | break; |
| | | case 'gauge': |
| | | iuCharts.drawGauge(this.chart, this.datas) |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | setTimeout(() => { |
| | | this.chart.resize() |
| | | }, 200) |
| | | } |
| | | }, |
| | | /* 对chartå
ç´ å°ºå¯¸è¿è¡çå¬ï¼å½åçååæ¶åæ¥æ´æ°echartè§å¾ */ |
| | | chartEleResizeListener() { |
| | | const chartInstance = ResizeListener({ |
| | | strategy: 'scroll', |
| | | callOnAdd: true |
| | | }); |
| | | chartInstance.listenTo(this.$el, () => { |
| | | if (!this.chart) return; |
| | | this.chart.resize(); |
| | | }); |
| | | }, |
| | | /* å½çªå£ç¼©æ¾æ¶ï¼echartå¨æè°æ´èªèº«å¤§å° */ |
| | | windowResizeListener() { |
| | | if (!this.chart) return; |
| | | this.chart.resize(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .echart_size { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | |
| | | <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> |
| | | |
| | |
| | | <template> |
| | | <div> |
| | | <!-- è¡¨æ ¼ --> |
| | | <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" :height="height" |
| | | :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" |
| | | :row-key="rowKey" :span-method="spanMethod" stripe style="width: 100%" tooltip-effect="dark" @row-click="rowClick" |
| | | @current-change="currentChange" @selection-change="handleSelectionChange" class="lims-table"> |
| | | <el-table-column align="center" type="selection" width="55" v-if="isSelection" /> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" :index="indexMethod" /> |
| | | <el-table |
| | | ref="multipleTable" |
| | | v-loading="tableLoading" |
| | | :border="border" |
| | | :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | :height="height" |
| | | :highlight-current-row="highlightCurrentRow" |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | :span-method="spanMethod" |
| | | :stripe="stripe" |
| | | style="width: 100%" |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | class="lims-table" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | type="selection" |
| | | width="55" |
| | | v-if="isSelection" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | label="åºå·" |
| | | type="index" |
| | | width="60" |
| | | :index="indexMethod" |
| | | /> |
| | | |
| | | <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" |
| | | :sortable="item.sortable ? true : false" :type="item.type" |
| | | :width="item.dataType === 'action' ? getWidth(item.operation) : item.width" align="center"> |
| | | <el-table-column |
| | | v-for="(item, index) in column" |
| | | :key="index" |
| | | :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" |
| | | :filtered-value="item.filteredValue" |
| | | :filters="item.filters" |
| | | :fixed="item.fixed" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :prop="item.prop" |
| | | :show-overflow-tooltip=" |
| | | item.dataType === 'action' || item.dataType === 'slot' ? false : true |
| | | " |
| | | :sortable="item.sortable ? true : false" |
| | | :type="item.type" |
| | | :width=" |
| | | item.dataType === 'action' ? getWidth(item.operation) : item.width |
| | | " |
| | | align="center" |
| | | > |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | | <template |
| | | v-if="item.hasOwnProperty('colunmTemplate')" |
| | | :slot="item.colunmTemplate" |
| | | slot-scope="scope" |
| | | > |
| | | <slot |
| | | v-if="item.theadSlot" |
| | | :index="index" |
| | | :name="item.theadSlot" |
| | | :row="scope.row" |
| | | /> |
| | | </template> |
| | | |
| | | <template slot-scope="scope"> |
| | | <!-- ææ§½ --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot v-if="item.slot" :index="scope.$index" :name="item.slot" :row="scope.row" /> |
| | | <slot |
| | | v-if="item.slot" |
| | | :index="scope.$index" |
| | | :name="item.slot" |
| | | :row="scope.row" |
| | | /> |
| | | </div> |
| | | <!-- è¿åº¦æ¡ --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | |
| | | </div> |
| | | <!-- å¾ç --> |
| | | <div v-else-if="item.dataType == 'image'"> |
| | | <img :src="javaApi + '/img/' + scope.row[item.prop]" alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" /> |
| | | <img |
| | | :src="javaApi + '/img/' + scope.row[item.prop]" |
| | | alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" |
| | | /> |
| | | </div> |
| | | |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | <el-tag v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " :key="index" :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)">{{ |
| | | <el-tag |
| | | v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" |
| | | v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " |
| | | :key="index" |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)" |
| | | >{{ |
| | | item.tagGroup |
| | | ? tag[item.tagGroup.label] |
| | | ? tag[item.tagGroup.label] |
| | | : tag |
| | | : tag |
| | | }}</el-tag> |
| | | <el-tag v-else :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-else |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | </div> |
| | | |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain" |
| | | :style="{ color: o.name === 'å é¤' ? '#f56c6c' : o.color }" :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" :key="key"> |
| | | <el-button |
| | | v-show="o.type != 'upload'" |
| | | size="mini" |
| | | v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :icon="iconFn(o)" |
| | | :plain="o.plain" |
| | | :style="{ color: o.name === 'å é¤' ? '#f56c6c' : o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" |
| | | :key="key" |
| | | > |
| | | {{ o.name }} |
| | | </el-button> |
| | | <!-- <el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)" |
| | | size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload' && o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError" |
| | | <el-upload |
| | | :action=" |
| | | javaApi + |
| | | o.url |
| | | " |
| | | size="mini" |
| | | ref="upload" |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload' && o.url" |
| | | style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :data="o.data ? o.data(scope.row) : {}" |
| | | :before-upload="o.beforeUpload ? o.beforeUpload(scope.row) : () => true" |
| | | :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | </el-upload> --> |
| | | <el-upload :action="javaApi + o.url" |
| | | size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload' && o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError" |
| | | :data="o.data ? o.data(scope.row) : {}" |
| | | :before-upload="o.beforeUpload ? o.beforeUpload(scope.row) : () => true" |
| | | :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | :headers="uploadHeader" |
| | | :on-error="onError" |
| | | :on-exceed="onExceed" |
| | | :on-success="handleSuccessUp" |
| | | :show-file-list="false" |
| | | :key="key" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | </el-upload> |
| | | <el-upload action="#" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload' && !o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed" |
| | | :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | <el-upload |
| | | action="#" |
| | | :on-change=" |
| | | (file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload' && !o.url" |
| | | style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false" |
| | | :key="key" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | <!-- å¯ç¹å»çæå --> |
| | | <div v-else-if="item.dataType == 'link'" class="cell link" style="width: 100%" |
| | | @click="goLink(scope.row, item.linkMethod)"> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <div |
| | | v-else-if="item.dataType == 'link'" |
| | | class="cell" |
| | | style="width: 100%" |
| | | @click="goLink(scope.row, item.linkEvent)" |
| | | > |
| | | <span class="link" v-if="!item.formatData"> |
| | | {{ scope.row[item.prop] }} |
| | | </span> |
| | | </div> |
| | | <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> |
| | | <div v-else class="cell" style="width: 100%"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current" |
| | | :limit.sync="page.size" @pagination="pagination" style="background-color: #fff;" /> |
| | | <pagination |
| | | v-if="page" |
| | | v-show="page.total > 0" |
| | | :total="page.total" |
| | | :layout="page.layout" |
| | | :page.sync="page.current" |
| | | :limit.sync="page.size" |
| | | @pagination="pagination" |
| | | style="background-color: #fff" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | name: "ZTTable", |
| | | filters: { |
| | | typeFn(val, row) { |
| | | // console.log(val, row, '11111111'); |
| | | if (typeof val === "function") { |
| | | return val(row); |
| | | } else return val; |
| | |
| | | handleSelectionChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { }; |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | rowClick: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { }; |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | currentChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { }; |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | border: { |
| | |
| | | default: true, |
| | | }, |
| | | highlightCurrentRow: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | stripe: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | |
| | | }, |
| | | rowClassName: { |
| | | type: Function, |
| | | default: () => { }, |
| | | default: () => {}, |
| | | }, |
| | | rowStyle: { |
| | | type: Function, |
| | |
| | | return (this.page.current - 1) * this.page.size + index + 1; |
| | | }, |
| | | // ç¹å»åå
æ ¼linkäºä»¶ |
| | | goLink(row, linkMethod) { |
| | | if (!linkMethod) { |
| | | goLink(row, linkEvent) { |
| | | if (!linkEvent) { |
| | | return this.$message.warning("请é
ç½®lingkäºä»¶"); |
| | | } |
| | | this.$parent[linkMethod](row); |
| | | linkEvent.vueComponent[linkEvent.method](row); |
| | | }, |
| | | // åå¹¶åå
æ ¼ |
| | | calculateSpanInfo() { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-table>>>.el-table__empty-text { |
| | | .el-table >>> .el-table__empty-text { |
| | | text-align: center; |
| | | } |
| | | |
| | | >>>.cell { |
| | | >>> .cell { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | |
| | | cursor: pointer; |
| | | } |
| | | |
| | | >>>.el-table__body-wrapper::-webkit-scrollbar { |
| | | >>> .el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 14px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | |
| | | <!-- 坿ä½è¡è¿è¡ç¹å»äºä»¶ --> |
| | | <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('ä¸ä¼ æå'); |
| | |
| | | </div> |
| | | <div class="right-menu"> |
| | | <div class="avatar-wrapper"> |
| | | <img :src="avatar" class="user-avatar" /> |
| | | <!-- <img :src="avatar" class="user-avatar" /> --> |
| | | <el-avatar :size="28">{{ nickName.substring(0, 1) }}</el-avatar> |
| | | <span class="userName">{{ nickName }}</span> |
| | | <img |
| | | class="logoout" |
| | |
| | | <template> |
| | | <div id="tags-view-container" class="tags-view-container"> |
| | | <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> |
| | | <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> |
| | | <scroll-pane |
| | | ref="scrollPane" |
| | | class="tags-view-wrapper" |
| | | @scroll="handleScroll" |
| | | > |
| | | <hamburger |
| | | id="hamburger-container" |
| | | :is-active="sidebar.opened" |
| | | class="hamburger-container" |
| | | @toggleClick="toggleSideBar" |
| | | /> |
| | | <router-link |
| | | v-for="tag in visitedViews" |
| | | ref="tag" |
| | | :key="tag.path" |
| | | :class="isActive(tag)?'active':''" |
| | | :class="isActive(tag) ? 'active' : ''" |
| | | :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" |
| | | tag="span" |
| | | class="tags-view-item" |
| | | :style="activeStyle(tag)" |
| | | @click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''" |
| | | @contextmenu.prevent.native="openMenu(tag,$event)" |
| | | @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" |
| | | @contextmenu.prevent.native="openMenu(tag, $event)" |
| | | > |
| | | {{ tag.title }} |
| | | <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" /> |
| | | <span |
| | | v-if="!isAffix(tag)" |
| | | class="el-icon-close" |
| | | @click.prevent.stop="closeSelectedTag(tag)" |
| | | /> |
| | | </router-link> |
| | | </scroll-pane> |
| | | <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu"> |
| | | <li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> å·æ°é¡µé¢</li> |
| | | <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> å
³éå½å</li> |
| | | <li @click="closeOthersTags"><i class="el-icon-circle-close"></i> å
³éå
¶ä»</li> |
| | | <li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> å
³é左侧</li> |
| | | <li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> å
³éå³ä¾§</li> |
| | | <li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> å
¨é¨å
³é</li> |
| | | <ul |
| | | v-show="visible" |
| | | :style="{ left: left + 'px', top: top + 'px' }" |
| | | class="contextmenu" |
| | | > |
| | | <li @click="refreshSelectedTag(selectedTag)"> |
| | | <i class="el-icon-refresh-right"></i> å·æ°é¡µé¢ |
| | | </li> |
| | | <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"> |
| | | <i class="el-icon-close"></i> å
³éå½å |
| | | </li> |
| | | <li @click="closeOthersTags"> |
| | | <i class="el-icon-circle-close"></i> å
³éå
¶ä» |
| | | </li> |
| | | <li v-if="!isFirstView()" @click="closeLeftTags"> |
| | | <i class="el-icon-back"></i> å
³é左侧 |
| | | </li> |
| | | <li v-if="!isLastView()" @click="closeRightTags"> |
| | | <i class="el-icon-right"></i> å
³éå³ä¾§ |
| | | </li> |
| | | <li @click="closeAllTags(selectedTag)"> |
| | | <i class="el-icon-circle-close"></i> å
¨é¨å
³é |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScrollPane from './ScrollPane' |
| | | import path from 'path' |
| | | import ScrollPane from "./ScrollPane"; |
| | | import path from "path"; |
| | | import Hamburger from "@/components/Hamburger/index.vue"; |
| | | import {mapGetters} from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | components: {Hamburger, ScrollPane }, |
| | | components: { Hamburger, ScrollPane }, |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | top: 0, |
| | | left: 0, |
| | | selectedTag: {}, |
| | | affixTags: [] |
| | | } |
| | | affixTags: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | | 'sidebar', |
| | | ]), |
| | | ...mapGetters(["sidebar"]), |
| | | visitedViews() { |
| | | return this.$store.state.tagsView.visitedViews |
| | | return this.$store.state.tagsView.visitedViews; |
| | | }, |
| | | routes() { |
| | | return this.$store.state.permission.routes |
| | | return this.$store.state.permission.routes; |
| | | }, |
| | | theme() { |
| | | return this.$store.state.settings.theme; |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | $route() { |
| | | this.addTags() |
| | | this.moveToCurrentTag() |
| | | this.addTags(); |
| | | this.moveToCurrentTag(); |
| | | }, |
| | | visible(value) { |
| | | if (value) { |
| | | document.body.addEventListener('click', this.closeMenu) |
| | | document.body.addEventListener("click", this.closeMenu); |
| | | } else { |
| | | document.body.removeEventListener('click', this.closeMenu) |
| | | document.body.removeEventListener("click", this.closeMenu); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.initTags() |
| | | this.addTags() |
| | | this.initTags(); |
| | | this.addTags(); |
| | | }, |
| | | methods: { |
| | | toggleSideBar() { |
| | | this.$store.dispatch('app/toggleSideBar') |
| | | this.$store.dispatch("app/toggleSideBar"); |
| | | }, |
| | | isActive(route) { |
| | | return route.path === this.$route.path |
| | | return route.path === this.$route.path; |
| | | }, |
| | | activeStyle(tag) { |
| | | if (!this.isActive(tag)) return {}; |
| | | return { |
| | | "background-color": this.theme, |
| | | "border-color": this.theme |
| | | "border-color": this.theme, |
| | | }; |
| | | }, |
| | | isAffix(tag) { |
| | | return tag.meta && tag.meta.affix |
| | | return tag.meta && tag.meta.affix; |
| | | }, |
| | | isFirstView() { |
| | | try { |
| | | return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath |
| | | return ( |
| | | this.selectedTag.fullPath === "/index" || |
| | | this.selectedTag.fullPath === this.visitedViews[1].fullPath |
| | | ); |
| | | } catch (err) { |
| | | return false |
| | | return false; |
| | | } |
| | | }, |
| | | isLastView() { |
| | | try { |
| | | return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath |
| | | return ( |
| | | this.selectedTag.fullPath === |
| | | this.visitedViews[this.visitedViews.length - 1].fullPath |
| | | ); |
| | | } catch (err) { |
| | | return false |
| | | return false; |
| | | } |
| | | }, |
| | | filterAffixTags(routes, basePath = '/') { |
| | | let tags = [] |
| | | routes.forEach(route => { |
| | | filterAffixTags(routes, basePath = "/") { |
| | | let tags = []; |
| | | routes.forEach((route) => { |
| | | if (route.meta && route.meta.affix) { |
| | | const tagPath = path.resolve(basePath, route.path) |
| | | const tagPath = path.resolve(basePath, route.path); |
| | | tags.push({ |
| | | fullPath: tagPath, |
| | | path: tagPath, |
| | | name: route.name, |
| | | meta: { ...route.meta } |
| | | }) |
| | | meta: { ...route.meta }, |
| | | }); |
| | | } |
| | | if (route.children) { |
| | | const tempTags = this.filterAffixTags(route.children, route.path) |
| | | const tempTags = this.filterAffixTags(route.children, route.path); |
| | | if (tempTags.length >= 1) { |
| | | tags = [...tags, ...tempTags] |
| | | tags = [...tags, ...tempTags]; |
| | | } |
| | | } |
| | | }) |
| | | return tags |
| | | }); |
| | | return tags; |
| | | }, |
| | | initTags() { |
| | | const affixTags = this.affixTags = this.filterAffixTags(this.routes) |
| | | const affixTags = (this.affixTags = this.filterAffixTags(this.routes)); |
| | | for (const tag of affixTags) { |
| | | // Must have tag name |
| | | if (tag.name) { |
| | | this.$store.dispatch('tagsView/addVisitedView', tag) |
| | | this.$store.dispatch("tagsView/addVisitedView", tag); |
| | | } |
| | | } |
| | | }, |
| | | addTags() { |
| | | const { name } = this.$route |
| | | const { name } = this.$route; |
| | | if (name) { |
| | | this.$store.dispatch('tagsView/addView', this.$route) |
| | | this.$store.dispatch("tagsView/addView", this.$route); |
| | | } |
| | | }, |
| | | moveToCurrentTag() { |
| | | const tags = this.$refs.tag |
| | | const tags = this.$refs.tag; |
| | | this.$nextTick(() => { |
| | | for (const tag of tags) { |
| | | if (tag.to.path === this.$route.path) { |
| | | this.$refs.scrollPane.moveToTarget(tag) |
| | | this.$refs.scrollPane.moveToTarget(tag); |
| | | // when query is different then update |
| | | if (tag.to.fullPath !== this.$route.fullPath) { |
| | | this.$store.dispatch('tagsView/updateVisitedView', this.$route) |
| | | this.$store.dispatch("tagsView/updateVisitedView", this.$route); |
| | | } |
| | | break |
| | | break; |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | refreshSelectedTag(view) { |
| | | this.$tab.refreshPage(view); |
| | | if (this.$route.meta.link) { |
| | | this.$store.dispatch('tagsView/delIframeView', this.$route) |
| | | this.$store.dispatch("tagsView/delIframeView", this.$route); |
| | | } |
| | | }, |
| | | closeSelectedTag(view) { |
| | | this.$tab.closePage(view).then(({ visitedViews }) => { |
| | | if (this.isActive(view)) { |
| | | this.toLastView(visitedViews, view) |
| | | this.toLastView(visitedViews, view); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | closeRightTags() { |
| | | this.$tab.closeRightPage(this.selectedTag).then(visitedViews => { |
| | | if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews) |
| | | this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => { |
| | | if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | closeLeftTags() { |
| | | this.$tab.closeLeftPage(this.selectedTag).then(visitedViews => { |
| | | if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews) |
| | | this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => { |
| | | if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) { |
| | | this.toLastView(visitedViews); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | closeOthersTags() { |
| | | this.$router.push(this.selectedTag.fullPath).catch(()=>{}); |
| | | this.$router.push(this.selectedTag.fullPath).catch(() => {}); |
| | | this.$tab.closeOtherPage(this.selectedTag).then(() => { |
| | | this.moveToCurrentTag() |
| | | }) |
| | | this.moveToCurrentTag(); |
| | | }); |
| | | }, |
| | | closeAllTags(view) { |
| | | this.$tab.closeAllPage().then(({ visitedViews }) => { |
| | | if (this.affixTags.some(tag => tag.path === this.$route.path)) { |
| | | return |
| | | if (this.affixTags.some((tag) => tag.path === this.$route.path)) { |
| | | return; |
| | | } |
| | | this.toLastView(visitedViews, view) |
| | | }) |
| | | this.toLastView(visitedViews, view); |
| | | }); |
| | | }, |
| | | toLastView(visitedViews, view) { |
| | | const latestView = visitedViews.slice(-1)[0] |
| | | const latestView = visitedViews.slice(-1)[0]; |
| | | if (latestView) { |
| | | this.$router.push(latestView.fullPath) |
| | | this.$router.push(latestView.fullPath); |
| | | } else { |
| | | // now the default is to redirect to the home page if there is no tags-view, |
| | | // you can adjust it according to your needs. |
| | | if (view.name === 'Dashboard') { |
| | | if (view.name === "Dashboard") { |
| | | // to reload home page |
| | | this.$router.replace({ path: '/redirect' + view.fullPath }) |
| | | this.$router.replace({ path: "/redirect" + view.fullPath }); |
| | | } else { |
| | | this.$router.push('/') |
| | | this.$router.push("/"); |
| | | } |
| | | } |
| | | }, |
| | | openMenu(tag, e) { |
| | | const menuMinWidth = 105 |
| | | const offsetLeft = this.$el.getBoundingClientRect().left // container margin left |
| | | const offsetWidth = this.$el.offsetWidth // container width |
| | | const maxLeft = offsetWidth - menuMinWidth // left boundary |
| | | const left = e.clientX - offsetLeft + 15 // 15: margin right |
| | | const menuMinWidth = 105; |
| | | const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left |
| | | const offsetWidth = this.$el.offsetWidth; // container width |
| | | const maxLeft = offsetWidth - menuMinWidth; // left boundary |
| | | const left = e.clientX - offsetLeft + 15; // 15: margin right |
| | | |
| | | if (left > maxLeft) { |
| | | this.left = maxLeft |
| | | this.left = maxLeft; |
| | | } else { |
| | | this.left = left |
| | | this.left = left; |
| | | } |
| | | |
| | | this.top = e.clientY |
| | | this.visible = true |
| | | this.selectedTag = tag |
| | | this.top = e.clientY; |
| | | this.visible = true; |
| | | this.selectedTag = tag; |
| | | }, |
| | | closeMenu() { |
| | | this.visible = false |
| | | this.visible = false; |
| | | }, |
| | | handleScroll() { |
| | | this.closeMenu() |
| | | } |
| | | } |
| | | } |
| | | this.closeMenu(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | z-index: 1000; /* ç¡®ä¿å¤´é¨å¨å
¶ä»å
容ä¹ä¸ */ |
| | | background: #fff; |
| | | border-bottom: 1px solid #d8dce5; |
| | | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); |
| | | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04); |
| | | .tags-view-wrapper { |
| | | .hamburger-container { |
| | | display: inline-block; |
| | | line-height: 46px; |
| | | height: 100%; |
| | | cursor: pointer; |
| | | transition: background .3s; |
| | | -webkit-tap-highlight-color:transparent; |
| | | transition: background 0.3s; |
| | | -webkit-tap-highlight-color: transparent; |
| | | padding: 0 10px !important; |
| | | |
| | | &:hover { |
| | | background: rgba(0, 0, 0, .025) |
| | | background: rgba(0, 0, 0, 0.025); |
| | | } |
| | | } |
| | | .tags-view-item { |
| | |
| | | color: #fff; |
| | | border-color: #42b983; |
| | | &::before { |
| | | content: ''; |
| | | content: ""; |
| | | background: #fff; |
| | | display: inline-block; |
| | | width: 8px; |
| | |
| | | } |
| | | } |
| | | .contextmenu { |
| | | margin: 0; |
| | | margin: -20px; |
| | | background: #fff; |
| | | z-index: 3000; |
| | | position: absolute; |
| | |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | color: #333; |
| | | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3); |
| | | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3); |
| | | li { |
| | | margin: 0; |
| | | padding: 7px 16px; |
| | |
| | | vertical-align: 2px; |
| | | border-radius: 50%; |
| | | text-align: center; |
| | | transition: all .3s cubic-bezier(.645, .045, .355, 1); |
| | | transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
| | | transform-origin: 100% 50%; |
| | | &:before { |
| | | transform: scale(.6); |
| | | transform: scale(0.6); |
| | | display: inline-block; |
| | | vertical-align: -3px; |
| | | } |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | import errorCode from "@/utils/errorCode"; |
| | | import { blobValidate } from "@/utils/ruoyi"; |
| | | import Vue from "vue"; |
| | | |
| | | const baseURL = process.env.VUE_APP_BASE_API; |
| | | let downloadLoadingInstance; |
| | |
| | | // å°æä»¶è½¬æ¢ä¸º Blob |
| | | const blob = await response.blob(); |
| | | // ä½¿ç¨ saveAs ä¿åæä»¶ |
| | | saveAs(blob, filename); |
| | | saveAs(blob, name); |
| | | Message.success("æ°æ®å¯¼åºæå"); |
| | | } catch (error) { |
| | | Message.error(error); |
| | |
| | | permissions: ['business:order'], |
| | | children: [ |
| | | { |
| | | // éææä¸å |
| | | // æ°å¢å§æåé¡µé¢ |
| | | path: 'addOrder', |
| | | component: () => import('@/views/business/inspectionOrder/add'), |
| | | name: 'addOrder', |
| | | meta: { title: 'æ°å¢å§æå', activeMenu: '/business/inspectionOrder' } |
| | | }, |
| | | { |
| | | // æ¥çå§æå详æ
é¡µé¢ |
| | | path: 'showDetails', |
| | | component: () => import('@/views/business/inspectionOrder/add'), |
| | | name: 'showDetails', |
| | | meta: { title: 'å§æå详æ
', activeMenu: '/business/inspectionOrder' } |
| | | } |
| | | ] |
| | | }, |
| | |
| | | avatar: (state) => state.user.avatar, |
| | | name: (state) => state.user.name, |
| | | nickName: (state) => state.user.nickName, |
| | | companyName: (state) => state.user.companyName, |
| | | loginUserInfo: (state) => state.user.loginUserInfo, |
| | | userId: (state) => state.user.id, |
| | | introduction: (state) => state.user.introduction, |
| | | roles: (state) => state.user.roles, |
| | |
| | | name: "", |
| | | avatar: "", |
| | | nickName: "", |
| | | companyName: "", |
| | | loginUserInfo: {}, |
| | | roles: [], |
| | | permissions: [], |
| | | }, |
| | |
| | | }, |
| | | SET_NICKNAME: (state, nickName) => { |
| | | state.nickName = nickName; |
| | | }, |
| | | SET_COMPANYNAME: (state, companyName) => { |
| | | state.companyName = companyName; |
| | | }, |
| | | SET_LOGINUSERINFO: (state, loginUserInfo) => { |
| | | state.loginUserInfo = loginUserInfo; |
| | | }, |
| | | SET_ROLES: (state, roles) => { |
| | | state.roles = roles; |
| | |
| | | return new Promise((resolve, reject) => { |
| | | getInfo() |
| | | .then((res) => { |
| | | console.log("store-->",res); |
| | | const user = res.user; |
| | | let avatar = user.avatar || ""; |
| | | if (!isHttp(avatar)) { |
| | |
| | | } else { |
| | | commit("SET_ROLES", ["ROLE_DEFAULT"]); |
| | | } |
| | | commit("SET_LOGINUSERINFO", user); |
| | | commit("SET_ID", user.userId); |
| | | commit("SET_NAME", user.userName); |
| | | commit("SET_AVATAR", avatar); |
| | | commit("SET_NICKNAME", user.nickName); |
| | | commit("SET_COMPANYNAME", user.companyName); |
| | | resolve(res); |
| | | }) |
| | | .catch((error) => { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import * as echarts from "echarts"; |
| | | |
| | | const iuCharts = { |
| | | drawBar: function (chart, params) { |
| | | var color = ["#4379EE", "#FEC53D", "#65789B", "#F6BD16"]; |
| | | let series = params.yData.map((m, i) => { |
| | | let obj = { |
| | | name: m.title, |
| | | type: "bar", |
| | | barWidth: "16%", |
| | | barGap: "30%", |
| | | itemStyle: { |
| | | normal: { |
| | | color: color[i], |
| | | barBorderRadius: [50, 50, 0, 0], |
| | | }, |
| | | }, |
| | | data: m.data, |
| | | }; |
| | | return obj; |
| | | }); |
| | | var option = { |
| | | backgroundColor: "#fff", |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | lineStyle: { |
| | | color: "#4379EE", |
| | | }, |
| | | }, |
| | | }, |
| | | grid: { |
| | | top: "25px", |
| | | left: "40px", |
| | | right: "3%", |
| | | bottom: "40px", |
| | | // containLabel: true |
| | | }, |
| | | legend: { |
| | | show: true, |
| | | orient: "horizontal", |
| | | y: -2, |
| | | right: 15, |
| | | itemWidth: 12, |
| | | itemHeight: 12, |
| | | itemGap: 24, |
| | | textStyle: { |
| | | color: "rgba(43,48,52)", |
| | | fontSize: "14px", |
| | | }, |
| | | }, |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | color: "rgba(43,48,52, 0.4)", |
| | | margin: 20, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | splitLine: { |
| | | show: false, |
| | | }, |
| | | boundaryGap: false, |
| | | data: params.xData, |
| | | }, |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | minInterval: 1, |
| | | type: "value", |
| | | min: 0, |
| | | splitNumber: 4, |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: "rgba(43,48,52, 0.1)", |
| | | }, |
| | | }, |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | color: "rgba(43,48,52, 0.4)", |
| | | margin: 20, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | ], |
| | | series: series, |
| | | }; |
| | | chart.setOption(option); |
| | | }, |
| | | drawLine: function (chart, params) { |
| | | let series = []; |
| | | params.yData.forEach((m) => { |
| | | series.push({ |
| | | name: m.title, |
| | | type: "line", |
| | | showAllSymbol: true, |
| | | symbol: "circle", |
| | | symbolSize: 10, |
| | | lineStyle: { |
| | | normal: { |
| | | color: "#4379EE", |
| | | width: 3, |
| | | }, |
| | | }, |
| | | areaStyle: { |
| | | normal: { |
| | | color: new echarts.graphic.LinearGradient( |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | [ |
| | | { |
| | | offset: 0, |
| | | color: "rgba(67,121,238,0.3)", |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "rgba(67,121,238,0)", |
| | | }, |
| | | ], |
| | | false |
| | | ), |
| | | }, |
| | | }, |
| | | data: m.data, |
| | | }); |
| | | }); |
| | | let option = { |
| | | backgroundColor: "#fff", |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | lineStyle: { |
| | | color: "#4379EE", |
| | | }, |
| | | }, |
| | | }, |
| | | grid: { |
| | | top: "25px", |
| | | left: "40px", |
| | | right: "3%", |
| | | bottom: "40px", |
| | | // containLabel: true |
| | | }, |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | color: "rgba(43,48,52, 0.4)", |
| | | margin: 20, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | splitLine: { |
| | | show: false, |
| | | }, |
| | | boundaryGap: false, |
| | | data: params.xData, |
| | | }, |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | minInterval: 1, |
| | | type: "value", |
| | | min: 0, |
| | | splitNumber: 4, |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: "rgba(43,48,52, 0.1)", |
| | | }, |
| | | }, |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | color: "rgba(43,48,52, 0.4)", |
| | | margin: 20, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | ], |
| | | series: series, |
| | | }; |
| | | chart.setOption(option); |
| | | }, |
| | | drawPie: function (chart, params) { |
| | | let option = { |
| | | color: params.color, |
| | | backgroundColor: "#fff", |
| | | tooltip: { |
| | | trigger: "item", |
| | | formatter: "{a} <br/>{b} : {c}", |
| | | }, |
| | | title: { |
| | | text: params.percentage, |
| | | textStyle: { |
| | | color: "#4379EE", |
| | | fontSize: 14, |
| | | align: "center", |
| | | fontWeight: "normal", |
| | | }, |
| | | x: "center", |
| | | y: "center", |
| | | }, |
| | | grid: { |
| | | top: 20, |
| | | bottom: 20, |
| | | left: 0, |
| | | right: 0, |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | }, |
| | | series: [ |
| | | // 主è¦å±ç¤ºå±ç |
| | | { |
| | | radius: ["55%", "90%"], |
| | | center: ["50%", "50%"], |
| | | type: "pie", |
| | | label: { |
| | | show: false, |
| | | }, |
| | | name: params.title, |
| | | data: params.data, |
| | | }, |
| | | // è¾¹æ¡ç设置 |
| | | { |
| | | radius: ["55%", "65%"], |
| | | center: ["50%", "50%"], |
| | | type: "pie", |
| | | label: { |
| | | normal: { |
| | | show: false, |
| | | }, |
| | | emphasis: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | normal: { |
| | | show: false, |
| | | }, |
| | | emphasis: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | animation: false, |
| | | tooltip: { |
| | | show: false, |
| | | }, |
| | | data: [ |
| | | { |
| | | value: 1, |
| | | itemStyle: { |
| | | color: "rgba(250,250,250,0.3)", |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }; |
| | | chart.setOption(option); |
| | | }, |
| | | drawGauge: function (chart, params) { |
| | | let option = { |
| | | tooltip: { |
| | | formatter: "{a} <br/>{b} : {c}%", |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | restore: {}, |
| | | saveAsImage: {}, |
| | | }, |
| | | }, |
| | | series: [ |
| | | { |
| | | type: "gauge", |
| | | axisLine: { |
| | | lineStyle: { |
| | | width: 28, |
| | | color: [ |
| | | [0.3, "#67e0e3"], |
| | | [0.7, "#37a2da"], |
| | | [1, "#fd666d"], |
| | | ], |
| | | }, |
| | | }, |
| | | pointer: { |
| | | itemStyle: { |
| | | color: "auto", |
| | | }, |
| | | }, |
| | | axisTick: { |
| | | distance: -28, |
| | | length: 8, |
| | | lineStyle: { |
| | | color: "#fff", |
| | | width: 2, |
| | | }, |
| | | }, |
| | | splitLine: { |
| | | distance: -28, |
| | | length: 28, |
| | | lineStyle: { |
| | | color: "#fff", |
| | | width: 4, |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | color: "inherit", |
| | | distance: 40, |
| | | fontSize: 14, |
| | | }, |
| | | detail: { |
| | | valueAnimation: true, |
| | | formatter: "{value} %", |
| | | color: "inherit", |
| | | textStyle: { |
| | | fontSize: 30, |
| | | align: "center", |
| | | }, |
| | | }, |
| | | data: [ |
| | | { |
| | | value: 70, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }; |
| | | chart.setOption(option, true); |
| | | }, |
| | | }; |
| | | |
| | | export { iuCharts }; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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) { |
| | | let flag = true |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | flag = false |
| | | } |
| | | if (!flag) { |
| | | return Promise.reject(flag); //æ£ç¡®çç»æ¢ |
| | | } |
| | | }, |
| | | 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() { |
| | | // æä»¶ç¶æ |
| | | this.getDicts("personnl_type").then((response) => { |
| | | this.personnelClassification = this.dictToValue(response.data); |
| | | this.checkList = this.form.personnelClassification ? 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, getList(), queryParams.name = '', multipleSelection = []">æ°å»º</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" style="display: flex;"> |
| | | <div class="search_label">ç¨æ·åï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="queryParams.name" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="getList()" style="width: 150px;"></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-if="selectUserDia" class="body" style="height: 60vh;"> |
| | | <lims-table :tableData="personTableData" :column="column" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" :page="personPage" :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange"></lims-table> |
| | | </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 limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | getEmployees, |
| | | basicInformationOfPersonnelSelectPage, |
| | | delUserDepardLimsId, |
| | | upUserDepardLimsId, |
| | | exportPersonBasicInfo, |
| | | exportPersonBasicInfoById, |
| | | selectUserList, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | name: 'PersonnelList', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { limsTable }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | currentCompaniesList: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | entity: {}, |
| | | multipleSelection: [], |
| | | synchronousLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | outLoading: false, |
| | | tableLoading: false, |
| | | tableData: [], // äººåæ»åè¡¨æ°æ® |
| | | selectUserDia: false, // æ·»å 人åå¼¹æ¡, |
| | | stateList: [ |
| | | { |
| | | value: 1, |
| | | type: 'success', |
| | | label: 'å¯ç¨' |
| | | }, |
| | | { |
| | | value: 0, |
| | | type: 'danger', |
| | | label: 'åç¨' |
| | | } |
| | | ], |
| | | queryParams: { |
| | | name: '' |
| | | }, |
| | | personTableData: [], |
| | | column: [ |
| | | { label: "å§å", prop: "name" }, |
| | | { label: "è´¦å·", prop: "account" }, |
| | | { |
| | | label: "è§è²", |
| | | prop: "roleName", |
| | | }, |
| | | { |
| | | label: "ç¶æ", prop: "state", dataType: "tag", |
| | | formatData: (params) => { |
| | | let index = this.stateList.findIndex( |
| | | (item) => item.value == params |
| | | ); |
| | | if (index > -1) { |
| | | return this.stateList[index].label; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | let index = this.stateList.findIndex( |
| | | (item) => item.value == params |
| | | ); |
| | | if (index > -1) { |
| | | return this.stateList[index].type; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | { label: "çµè¯å·ç ", prop: "phone" }, |
| | | ], |
| | | personPage: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | }; |
| | | }, |
| | | 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.departmentId = this.departId; |
| | | let params = { ...this.page, ...this.entity } |
| | | delete params.total |
| | | basicInformationOfPersonnelSelectPage(params).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(); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | selectUser() { |
| | | if (!this.currentCompaniesList.length > 0) { |
| | | this.$message.warning("è¯·éæ©é¨é¨ï¼") |
| | | return; |
| | | } |
| | | let selects = this.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') |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.personPage }; |
| | | delete param.total; |
| | | selectUserList({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.personTableData = res.data; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.personPage.current = page; |
| | | this.personPage.size = limit; |
| | | this.getList(); |
| | | }, |
| | | handleDown() { |
| | | this.outLoading = true; |
| | | let entity = this.HaveJson(this.entity) |
| | | 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="queryParams.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;"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'" |
| | | :page="page" @pagination="pagination" :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange"></lims-table> |
| | | <!-- <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, |
| | | selectUserList, |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | name: 'Edit', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { 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: [], |
| | | multipleSelections: [], |
| | | userList: [], |
| | | stateList: [ |
| | | { |
| | | value: 1, |
| | | type: 'success', |
| | | label: 'å¯ç¨' |
| | | }, |
| | | { |
| | | value: 0, |
| | | type: 'danger', |
| | | label: 'åç¨' |
| | | } |
| | | ], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "å§å", prop: "name" }, |
| | | { label: "è´¦å·", prop: "account" }, |
| | | { |
| | | label: "è§è²", |
| | | prop: "roleName", |
| | | }, |
| | | { |
| | | label: "ç¶æ", prop: "state", dataType: "tag", |
| | | formatData: (params) => { |
| | | let index = this.stateList.findIndex( |
| | | (item) => item.value == params |
| | | ); |
| | | if (index > -1) { |
| | | return this.stateList[index].label; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | let index = this.stateList.findIndex( |
| | | (item) => item.value == params |
| | | ); |
| | | if (index > -1) { |
| | | return this.stateList[index].type; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | { label: "çµè¯å·ç ", prop: "phone" }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | }; |
| | | }, |
| | | 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("æä½æåï¼") |
| | | } |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | selectUserList({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelections = val |
| | | }, |
| | | addPerson() { |
| | | this.isSelectedList = this.trainingTableData.map(item => item.userId) |
| | | this.getList() |
| | | this.selectUserDia = true; |
| | | }, |
| | | selectUser() { |
| | | let selects = this.multipleSelections; |
| | | 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> |
| | | .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-top: 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .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: flex-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> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" |
| | | title="仪å¨è®¾å¤éªæ¶å" width="80%" @close="resetForm"> |
| | | <el-form ref="modelForm" :model="form" :rules="rules" label-width="180px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°è´§æ¥æï¼" prop="arrivalDate"> |
| | | <el-date-picker v-model="form.arrivalDate" type="date" placeholder="éæ©æ¥æ" size="small" format="yyyy-MM-dd" |
| | | style="width: 100%" value-format="yyyy-MM-dd" :disabled="operationType === 'view'"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éé¢ï¼" prop="goldAmount"> |
| | | <el-input v-model="form.goldAmount" :disabled="operationType === 'view'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»´ä¿®åä½ï¼" prop="maintenanceunit"> |
| | | <el-input v-model="form.maintenanceunit" :disabled="operationType === 'view'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¶è®¾å¤ä¸»æºåå¤ä»¶æ
åµï¼" prop="spareParts"> |
| | | <el-input v-model="form.spareParts" :disabled="operationType === 'view'" clearable size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®è£
ãè°è¯æ
åµï¼" prop="installationDebugging"> |
| | | <el-input v-model="form.installationDebugging" :disabled="operationType === 'view'" clearable size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éªæ¶æ
åµï¼" prop="checkSituation"> |
| | | <el-input v-model="form.checkSituation" :disabled="operationType === 'view'" clearable size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ¶ç¾åï¼" prop="receivingSignature"> |
| | | <el-input v-model="form.receivingSignature" :disabled="operationType === 'view'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å家代表ï¼" prop="producer"> |
| | | <el-input v-model="form.producer" :disabled="operationType === 'view'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ¶äººï¼" prop="recipient"> |
| | | <el-input v-model="form.recipient" :disabled="operationType === 'view'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ¶æ¥æï¼" prop="recipientDate"> |
| | | <el-date-picker v-model="form.recipientDate" type="date" placeholder="éæ©æ¥æ" size="small" format="yyyy-MM-dd" |
| | | style="width: 100%" value-format="yyyy-MM-dd" :disabled="operationType === 'view'"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetForm">å æ¶</el-button> |
| | | <el-button v-if="operationType !== 'view'" :loading="submitFormLoading" type="primary" @click="submitForm">ç¡® |
| | | 认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDeviceAcceptance, |
| | | addDeviceAcceptance, |
| | | updateDeviceAcceptance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | name: "acceptance-form", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | dialogVisible: false, |
| | | submitFormLoading: false, |
| | | form: { |
| | | arrivalDate: '', |
| | | goldAmount: '', |
| | | maintenanceunit: '', |
| | | spareParts: '', |
| | | installationDebugging: '', |
| | | checkSituation: '', |
| | | receivingSignature: '', |
| | | producer: '', |
| | | recipient: '', |
| | | recipientDate: '', |
| | | deviceId: '', |
| | | }, |
| | | operationType: '', |
| | | rules: { |
| | | arrivalDate: [{ required: true, message: 'è¯·éæ©å°è´§æ¥æ', trigger: 'change' }], |
| | | }, |
| | | userList: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDialog(type, id, deviceId) { |
| | | this.dialogVisible = true |
| | | this.operationType = type |
| | | this.form.acceptanceId = id |
| | | this.form.deviceId = deviceId |
| | | this.getUserList() |
| | | if (this.form.acceptanceId) { |
| | | this.searchInfo() |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo() { |
| | | getDeviceAcceptance({ acceptanceId: this.form.acceptanceId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form = { ...res.data } |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | // æäº¤è¡¨å |
| | | submitForm() { |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | if (this.operationType === 'add') { |
| | | addDeviceAcceptance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æ°å¢æå') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | | }).catch(err => { |
| | | this.submitFormLoading = false |
| | | }) |
| | | } else { |
| | | updateDeviceAcceptance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | | }).catch(err => { |
| | | this.submitFormLoading = false |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | resetForm() { |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.userList = data |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="data-acquisition-config"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">æ°éé
ç½®</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="fileConfiguration">æä»¶é
ç½®</el-button> |
| | | <el-button size="small" @click="$parent.closeDataVue()"> |
| | | <span style="color: #3A7BFA;">è¿å</span> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table :data="tableList.slice( |
| | | (page.current - 1) * page.size, |
| | | page.current * page.size |
| | | ) |
| | | " border tooltip-effect="dark" style="width: 74%;" height="100%" :span-method="spanMethod"> |
| | | <el-table-column type="index" label="åºå·" align="center" width="65"></el-table-column> |
| | | <el-table-column prop="deviceName" align="center" min-width="100" label="设å¤åç§°"></el-table-column> |
| | | <el-table-column prop="fileType" align="center" label="æä»¶åç¼"></el-table-column> |
| | | <el-table-column prop="collectUrl" align="center" min-width="100" show-overflow-tooltip |
| | | label="ééå°å"></el-table-column> |
| | | <el-table-column prop="storageUrl" align="center" min-width="100" show-overflow-tooltip |
| | | label="åå¨å°å"></el-table-column> |
| | | <el-table-column prop="ip" align="center" label="IPå°å" min-width="100"></el-table-column> |
| | | <el-table-column prop="sample" align="center" label="æ£éªå¯¹è±¡" show-overflow-tooltip |
| | | min-width="150"></el-table-column> |
| | | <el-table-column prop="inspectionItemClass" align="center" label="æ£éªé¡¹åç±»" min-width="120"></el-table-column> |
| | | <el-table-column prop="inspectionItem" align="center" label="æ£éªé¡¹" min-width="100"></el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" align="center" label="æ£éªå项" min-width="100"></el-table-column> |
| | | <el-table-column prop="referx" align="center" label="åç
§X" min-width="100"></el-table-column> |
| | | <el-table-column prop="x" align="center" label="X"></el-table-column> |
| | | <el-table-column prop="refery" align="center" label="åç
§Y" min-width="100"></el-table-column> |
| | | <el-table-column prop="y" align="center" label="Y"></el-table-column> |
| | | <el-table-column prop="anotherName" align="center" label="å«å" min-width="100"></el-table-column> |
| | | <el-table-column prop="matchingName" align="center" label="å¹é
åç§°" min-width="100"></el-table-column> |
| | | <el-table-column prop="formula" align="center" label="å
¬å¼"></el-table-column> |
| | | <el-table-column prop="section" fixed="right" label="æä½" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="dataConfig(scope.row)">æ°éé
ç½®</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="page" v-if="tableList.length > 0"> |
| | | <el-pagination @size-change="sizeChange" @current-change="currentChange" :current-page="page.current" |
| | | :page-sizes="[10, 20, 30, 50, 100]" :page-size="page.size" layout="total, sizes, prev, pager, next, jumper" |
| | | :total="tableList.length"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog title="æ°éé
ç½®" :visible.sync="dialogVisible3" width="920px" :before-close="closeForm"> |
| | | <el-form :model="configForm" label-position="top" size="small" ref="configForm" label-width="100px" |
| | | class="demo-ruleForm"> |
| | | <el-table :data="domains" style="width: 100%" height="300"> |
| | | <el-table-column label="åºå·" type="index" width="80"> |
| | | <template v-slot="scope"> |
| | | {{ getIndexWithAlphabet(scope.$index) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="referx" label="åç
§X" min-width="140"> |
| | | <template v-slot="scope"> |
| | | <el-input style="width: 100%" v-model="scope.row.referx"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="x" label="X" min-width="100"> |
| | | <template v-slot="scope"> |
| | | <el-input style="width: 100%" v-model="scope.row.x"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="refery" label="åç
§Y" min-width="140"> |
| | | <template v-slot="scope"> |
| | | <el-input style="width: 100%" v-model="scope.row.refery"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="y" label="Y" min-width="100"> |
| | | <template v-slot="scope"> |
| | | <el-input style="width: 100%" v-model="scope.row.y"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="anotherName" label="å«å" min-width="140"> |
| | | <template v-slot="scope"> |
| | | <el-input style="width: 100%" v-model="scope.row.anotherName"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="matchingName" label="å¹é
åç§°" min-width="140"> |
| | | <template v-slot="scope"> |
| | | <el-input style="width: 100%" v-model="scope.row.matchingName"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="150"> |
| | | <template v-slot="scope"> |
| | | <el-button @click.prevent="removeDomain(scope.row)" size="small" type="text">å é¤</el-button> |
| | | <el-button @click="addDomain" size="small" type="text">æ°å¢</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="fomItem2"> |
| | | <el-form-item class="fomItemInput1"> |
| | | <template v-slot="label"> |
| | | å
¬å¼ï¼ |
| | | <el-tooltip v-for="(formula, key) in formulas" class="itemFomItem" effect="dark" |
| | | :content="formula.content" :key="key" placement="top"> |
| | | <label>{{ formula.label }}()</label> |
| | | </el-tooltip> |
| | | <el-input type="textarea" autosi:autosize="{ minRows: 2, maxRows: 4}" ze placeholder="请è¾å
¥å
容" |
| | | v-model="configForm.formula" @change="evalResult"> |
| | | </el-input> |
| | | </template> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="closeForm">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm3" :loading="upLoad3">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æ°éé
ç½®" :visible.sync="dialogVisible4" width="400px"> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"> |
| | | <span style="color:red;margin-right: 4px;">*</span>IPï¼ |
| | | </div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.ip"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"> |
| | | <span style="color:red;margin-right: 4px;">*</span>ééå°åï¼ |
| | | </div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.collectUrl"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label">å¨åå°åï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.storageUrl"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"> |
| | | <span style="color:red;margin-right: 4px;">*</span>æä»¶åç¼ï¼ |
| | | </div> |
| | | <el-select v-model="configForm.fileType" size="small" placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option v-for="item in fileTypeOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label">å§æåæ®µï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.entrustCode"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label">æ ·ååæ®µï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.sampleCode"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="configForm.dbFileName"></el-input> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="dialogVisible4 = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm4" :loading="upLoad4">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | queryDataAcquisitionConfiguration, |
| | | saveDataAcquisitionConfiguration, |
| | | deleteDataAcquisitionConfiguration, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | name: "dataAcquisitionConfig", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | props: { |
| | | deviceId: { |
| | | type: Number, |
| | | default: () => [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formulas: [ |
| | | { |
| | | label: "MAX", |
| | | content: "æ±åæ°æå¤§å¼ï¼åæ°ä¸ªæ°æå°ä¸¤ä¸ªï¼å¦ï¼MAX(A1,B2)" |
| | | }, |
| | | { |
| | | label: "MIN", |
| | | content: "æ±åæ°æå°å¼ï¼åæ°ä¸ªæ°æå°ä¸¤ä¸ªï¼å¦ï¼MIN(A1,B2)" |
| | | }, |
| | | { |
| | | label: "SUM", |
| | | content: "æ±åï¼åæ°ä¸ªæ°æå°ä¸¤ä¸ªï¼å¦ï¼SUM(A1,B2)" |
| | | }, |
| | | { |
| | | label: "ABS", |
| | | content: "æ±ç»å¯¹å¼ï¼åæ°ä¸ªæ°æå°ä¸ä¸ªï¼å¦ï¼ABS(A1)" |
| | | }, |
| | | { |
| | | label: "AVERAGE", |
| | | content: "æ±å¹³åå¼ï¼åæ°ä¸ªæ°æå°ä¸¤ä¸ªä¸ªï¼å¦ï¼AVERAGE(A1,B2)" |
| | | }, |
| | | { |
| | | label: "MEDIAN", |
| | | content: "æ±ä¸å¼ï¼åæ°ä¸ªæ°æå°ä¸¤ä¸ªä¸ªï¼å¦ï¼MEDIAN(A1,B2)" |
| | | }, |
| | | ], |
| | | dialogVisible4: false, |
| | | tableList: [], |
| | | page: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | dialogVisible3: false, |
| | | configForm: { |
| | | formula: "", |
| | | collectUrl: "", |
| | | storageUrl: "", |
| | | entrustCode: "", |
| | | sampleCode: "", |
| | | dbFileName: "", |
| | | fiberOpticRibbon: "" |
| | | }, |
| | | domains: [ |
| | | { |
| | | referx: "", |
| | | refery: "", |
| | | x: "", |
| | | y: "", |
| | | anotherName: "", |
| | | matchingName: "" |
| | | } |
| | | ], |
| | | upLoad3: false, |
| | | upLoad4: false, |
| | | fileTypeOptions: [ |
| | | { label: "csv", value: ".csv" }, |
| | | { label: "db", value: ".db" }, |
| | | { label: "mdb", value: ".mdb" }, |
| | | { label: "word", value: ".docx" }, |
| | | { label: "excel", value: ".xlsx" }, |
| | | { label: "txt", value: ".txt" }, |
| | | { label: "png", value: ".png" } |
| | | ], |
| | | spanList: [], |
| | | specialSpanList: [], |
| | | spanConfig: { |
| | | special: { |
| | | main: "inspectionItemSubclass", |
| | | rows: [ |
| | | { |
| | | name: "deviceName", |
| | | index: 1 |
| | | }, |
| | | { |
| | | name: "fileType", |
| | | index: 2 |
| | | }, |
| | | { |
| | | name: "collectUrl", |
| | | index: 3 |
| | | }, |
| | | { |
| | | name: "storageUrl", |
| | | index: 4 |
| | | }, |
| | | { |
| | | name: "ip", |
| | | index: 5 |
| | | }, |
| | | { |
| | | name: "inspectionItem", |
| | | index: 6 |
| | | }, |
| | | { |
| | | name: "inspectionItemSubclass", |
| | | index: 7 |
| | | }, |
| | | { |
| | | name: "formula", |
| | | index: 13 |
| | | }, |
| | | { |
| | | name: "section", |
| | | index: 14 |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | deleteList: [] |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | getIndexWithAlphabet(index) { |
| | | const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
| | | const letterIndex = index % 26; |
| | | return alphabet.charAt(letterIndex) + (index + 1); |
| | | }, |
| | | rowspan(spanArr, position, spanName) { |
| | | this.tableList.forEach((item, index) => { |
| | | if (index === 0) { |
| | | spanArr.push(1); |
| | | position = 0; |
| | | } else { |
| | | if ( |
| | | this.tableList[index][spanName] === |
| | | this.tableList[index - 1][spanName] |
| | | ) { |
| | | spanArr[position] += 1; |
| | | spanArr.push(0); |
| | | } else { |
| | | spanArr.push(1); |
| | | position = index; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | spanMethod({ row, column, rowIndex, columnIndex }) { |
| | | // ä¸è¬çåå¹¶è¡ |
| | | if ( |
| | | this.spanConfig != undefined && |
| | | this.spanConfig.rows && |
| | | this.spanConfig.rows.length > 0 |
| | | ) { |
| | | let i = null; |
| | | let obj = this.spanConfig.rows.find((item, index) => { |
| | | i = index; |
| | | return item.index == columnIndex; |
| | | }); |
| | | if (obj) { |
| | | const _row = this.spanList[i].arr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | }; |
| | | } |
| | | } |
| | | // ç¹æ®çåå¹¶è¡ |
| | | if ( |
| | | this.spanConfig != undefined && |
| | | this.spanConfig.special && |
| | | this.spanConfig.special.main && |
| | | this.spanConfig.special.rows && |
| | | this.spanConfig.special.rows.length > 0 |
| | | ) { |
| | | let i = null; |
| | | let obj = this.spanConfig.special.rows.find((item, index) => { |
| | | i = index; |
| | | return item.index == columnIndex; |
| | | }); |
| | | if (obj) { |
| | | const _row = this.specialSpanList[i].arr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | }; |
| | | } |
| | | } |
| | | }, |
| | | fileConfiguration() { |
| | | this.dialogVisible4 = true; |
| | | if (this.tableList[0]) { |
| | | this.$set(this.configForm, "fileType", this.tableList[0].fileType); |
| | | this.$set(this.configForm, "collectUrl", this.tableList[0].collectUrl); |
| | | this.$set(this.configForm, "storageUrl", this.tableList[0].storageUrl); |
| | | this.$set(this.configForm, "ip", this.tableList[0].ip); |
| | | this.$set( |
| | | this.configForm, |
| | | "entrustCode", |
| | | this.tableList[0].entrustCode |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "sampleCode", |
| | | this.tableList[0].sampleCode |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "dbFileName", |
| | | this.tableList[0].dbFileName |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "fiberOpticRibbon", |
| | | this.tableList[0].fiberOpticRibbon |
| | | ) |
| | | } |
| | | }, |
| | | init() { |
| | | queryDataAcquisitionConfiguration({ deviceId: this.deviceId, isDevice: false }).then(res => { |
| | | this.tableList = res.data; |
| | | this.tableList.forEach(i => { |
| | | let isIncludes = false |
| | | if (i.formula && i.formula != "") { |
| | | this.formulas.forEach(j => { |
| | | if (i.formula.includes(j.label)) { |
| | | isIncludes = true |
| | | } |
| | | }) |
| | | } |
| | | if (!isIncludes && i.formula) { |
| | | i.formula = i.formula.slice(1, -1) |
| | | } |
| | | i.sample = i.sample |
| | | .replace(/"/g, "") |
| | | .replace(/],/g, "ï¼") |
| | | .replace(/\[/g, "") |
| | | .replace(/]/g, ""); |
| | | }); |
| | | if (this.tableList[0]) { |
| | | this.$set(this.configForm, "fileType", this.tableList[0].fileType); |
| | | this.$set( |
| | | this.configForm, |
| | | "collectUrl", |
| | | this.tableList[0].collectUrl |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "storageUrl", |
| | | this.tableList[0].storageUrl |
| | | ); |
| | | this.$set(this.configForm, "ip", this.tableList[0].ip); |
| | | this.$set( |
| | | this.configForm, |
| | | "entrustCode", |
| | | this.tableList[0].entrustCode |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "sampleCode", |
| | | this.tableList[0].sampleCode |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "dbFileName", |
| | | this.tableList[0].dbFileName |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "fiberOpticRibbon", |
| | | this.tableList[0].fiberOpticRibbon |
| | | ) |
| | | } |
| | | // ä¸è¬çåå¹¶è¡ |
| | | if ( |
| | | this.spanConfig != undefined && |
| | | this.spanConfig.rows && |
| | | this.spanConfig.rows.length > 0 |
| | | ) { |
| | | this.spanList = []; |
| | | this.spanConfig.rows.forEach((item, index) => { |
| | | this.spanList.push({ |
| | | arr: [], |
| | | position: 0 |
| | | }); |
| | | this.rowspan( |
| | | this.spanList[index].arr, |
| | | this.spanList[index].position, |
| | | item.name |
| | | ); |
| | | }); |
| | | } |
| | | // ç¹æ®çåå¹¶è¡ |
| | | if ( |
| | | this.spanConfig != undefined && |
| | | this.spanConfig.special && |
| | | this.spanConfig.special.main && |
| | | this.spanConfig.special.rows && |
| | | this.spanConfig.special.rows.length > 0 |
| | | ) { |
| | | this.specialSpanList = []; |
| | | this.spanConfig.special.rows.forEach((item, index) => { |
| | | this.specialSpanList.push({ |
| | | arr: [], |
| | | position: 0 |
| | | }); |
| | | this.rowspan( |
| | | this.specialSpanList[index].arr, |
| | | this.specialSpanList[index].position, |
| | | this.spanConfig.special.main |
| | | ); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | submitForm4() { |
| | | const obj = Object.assign({ |
| | | deviceId: this.deviceId, |
| | | fileType: this.configForm.fileType, |
| | | collectUrl: this.configForm.collectUrl, |
| | | storageUrl: this.configForm.storageUrl, |
| | | ip: this.configForm.ip, |
| | | isDevice: true, |
| | | entrustCode: this.configForm.entrustCode, |
| | | sampleCode: this.configForm.sampleCode, |
| | | dbFileName: this.configForm.dbFileName, |
| | | fiberOpticRibbon: this.configForm.fiberOpticRibbon |
| | | }); |
| | | this.upLoad4 = true; |
| | | saveDataAcquisitionConfiguration({ deviceId: this.deviceId, ...obj }).then(res => { |
| | | if (res.code == 200) { |
| | | // this.tableList = res.data; |
| | | this.dialogVisible4 = false; |
| | | this.init(); |
| | | this.$message.success("æä½æå"); |
| | | } |
| | | this.upLoad4 = false; |
| | | }) |
| | | .catch(err => { |
| | | this.upLoad4 = false; |
| | | }); |
| | | }, |
| | | dataConfig(row) { |
| | | this.configForm = { |
| | | deviceId: row.deviceId, |
| | | inspectionItem: row.inspectionItem.trim(), |
| | | inspectionItemSubclass: row.inspectionItemSubclass, |
| | | structureItemParameterId: row.structureItemParameterId, |
| | | inspectionItemClass: row.inspectionItemClass, |
| | | }; |
| | | this.dialogVisible3 = true; |
| | | queryDataAcquisitionConfiguration({ |
| | | deviceId: this.deviceId, |
| | | inspectionItem: row.inspectionItem.trim(), |
| | | isDevice: true, |
| | | inspectionItemSubclass: row.inspectionItemSubclass.trim(), |
| | | inspectionItemClass: row.inspectionItemClass.trim(), |
| | | structureItemParameterId: row.structureItemParameterId |
| | | }).then(res => { |
| | | const data = res.data; |
| | | if (data[0]) { |
| | | this.domains.splice(0, 1); |
| | | let formula = data[0].formula |
| | | let isIncludes = false |
| | | if (formula && formula != "") { |
| | | for (let key in this.formulas) { |
| | | if (formula.includes(this.formulas[key].label)) { |
| | | isIncludes = true |
| | | } |
| | | } |
| | | } |
| | | if (!isIncludes && formula) { |
| | | let formulaValue = formula.slice(1, -1) |
| | | this.$set(this.configForm, "formula", formulaValue); |
| | | } else { |
| | | this.$set(this.configForm, "formula", data[0].formula); |
| | | } |
| | | data.forEach(i => { |
| | | this.domains.push({ |
| | | referx: i.referx, |
| | | refery: i.refery, |
| | | x: i.x, |
| | | y: i.y, |
| | | anotherName: i.anotherName, |
| | | matchingName: i.matchingName, |
| | | id: i.id |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | submitForm3() { |
| | | this.$refs.configForm.validate(valid => { |
| | | // è¡¨åæ ¡éª |
| | | if (valid) { |
| | | this.domains.forEach(item => { |
| | | const isEmpty = Object.values(item).every(val => val === ""); |
| | | if (isEmpty) { |
| | | this.$message.error("请填ååç
§æ°æ®"); |
| | | } |
| | | }); |
| | | this.domains.forEach((i, index) => { |
| | | let isIncludes = false |
| | | if (this.configForm.formula && this.configForm.formula !== "") { |
| | | for (let formula in this.formulas) { |
| | | if (this.configForm.formula.includes(this.formulas[formula].label)) { |
| | | isIncludes = true |
| | | } |
| | | } |
| | | } |
| | | if (isIncludes === false && this.configForm.formula !== "" && this.configForm.formula !== undefined) { |
| | | i.formula = "(" + this.configForm.formula + ")"; |
| | | } else { |
| | | i.formula = this.configForm.formula; |
| | | } |
| | | i.deviceId = this.deviceId; |
| | | i.inspectionItem = this.configForm.inspectionItem; |
| | | i.inspectionItemSubclass = this.configForm.inspectionItemSubclass; |
| | | i.structureItemParameterId = this.configForm.structureItemParameterId; |
| | | i.inspectionItemClass = this.configForm.inspectionItemClass; |
| | | i.serialNumber = this.getIndexWithAlphabet(index) |
| | | }); |
| | | saveDataAcquisitionConfiguration({ |
| | | deviceId: this.deviceId, |
| | | dataConfigList: this.domains, |
| | | isDevice: false |
| | | }).then(res => { |
| | | this.dialogVisible3 = false; |
| | | this.domains = [ |
| | | { |
| | | referx: "", |
| | | refery: "", |
| | | x: "", |
| | | y: "", |
| | | id: "" |
| | | } |
| | | ]; |
| | | if (this.deleteList.length > 0) { |
| | | deleteDataAcquisitionConfiguration({ ids: this.deleteList.join() }).then(res => { |
| | | if (res.code == 200) { |
| | | this.init(); |
| | | } |
| | | }); |
| | | } |
| | | this.init(); |
| | | this.$message.success("æ·»å æå"); |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | removeDomain(item) { |
| | | // å é¤å
¬å¼formItem |
| | | const index = this.domains.indexOf(item); |
| | | if (index !== -1 && this.domains.length > 1) { |
| | | if (item.id) { |
| | | this.deleteList.push(item.id); |
| | | this.domains.splice(index, 1); |
| | | } else { |
| | | this.domains.splice(index, 1); |
| | | } |
| | | } else { |
| | | this.$message.error("ä¸å
许å 餿å䏿¡æ°æ®ï¼"); |
| | | } |
| | | }, |
| | | addDomain() { |
| | | // æ·»å å
¬å¼formItem |
| | | this.domains.push({ |
| | | referx: "", |
| | | refery: "", |
| | | x: "", |
| | | y: "", |
| | | id: "" |
| | | }); |
| | | }, |
| | | evalResult(val) { |
| | | this.configForm.formula = val; |
| | | // æ ¹æ®å
¬å¼è®¡ç®åºç»æ |
| | | }, |
| | | sizeChange(val) { |
| | | this.page.size = val; |
| | | }, |
| | | currentChange(val) { |
| | | this.page.current = val; |
| | | }, |
| | | closeForm() { |
| | | this.deleteList = []; |
| | | this.domains = [ |
| | | { |
| | | referx: "", |
| | | refery: "", |
| | | x: "", |
| | | y: "", |
| | | id: "" |
| | | } |
| | | ]; |
| | | this.dialogVisible3 = false; |
| | | this.$refs.configForm.resetFields(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .itemFomItem { |
| | | margin-left: 20px; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .data-acquisition-config { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: hidden; |
| | | overflow-x: hidden; |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | } |
| | | |
| | | .page { |
| | | width: 100%; |
| | | height: 30px; |
| | | text-align: right; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100vw - 1em); |
| | | height: calc(100vh - 18em); |
| | | } |
| | | |
| | | .fomItem1 { |
| | | display: flex; |
| | | height: 74px; |
| | | } |
| | | |
| | | .fomItem2 { |
| | | display: flex; |
| | | width: 100%; |
| | | } |
| | | |
| | | .fomItemInput { |
| | | width: 180px; |
| | | margin-right: 6px; |
| | | } |
| | | |
| | | .fomItemInput1 { |
| | | width: 100%; |
| | | margin-right: 6px; |
| | | } |
| | | |
| | | >>>.el-form-item__label { |
| | | padding-bottom: 0 !important; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 设å¤åç¨ --> |
| | | <template> |
| | | <div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æµç¨ç¼å·ï¼</div> |
| | | <div><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.processNumber" |
| | | @keyup.enter.native="refreshTable()"></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="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" @click="add">æ°å¢</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="tables" style="margin-top: 10px;"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | <!-- <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage" |
| | | :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" /> --> |
| | | </div> |
| | | <el-dialog title="仪å¨è®¾å¤é¢(å)ç¨ç»è®°" top="5vh" :visible.sync="dialogVisible" width="60%"> |
| | | <el-steps :active="currentStep" finish-status="success" align-center> |
| | | <el-step style="cursor:pointer" v-for="(v, i) in steps" :title="v" :key="i" |
| | | @click.native="choiceStep(i)"></el-step> |
| | | </el-steps> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="130px"> |
| | | <div v-show="currentStepClick === 0"> |
| | | <el-card style="margin-top: 1em; height: 51vh; overflow-y: scroll;"> |
| | | <!-- æ°å¢è®¾å¤äºè®°å½å¡ç --> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å·ï¼" prop="processNumber"> |
| | | <el-input v-model="form.processNumber" size="small" :disabled="currentStep > 0"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°ï¼"> |
| | | <el-input v-model="form.deviceName" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="管çç¼å·ï¼" prop="unifyNumber"> |
| | | <el-input v-model="form.unifyNumber" size="small" :disabled="currentStep > 0"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨äººï¼" prop="recipientUser"> |
| | | <el-select v-model="form.recipientUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 100%;" :disabled="currentStep > 0"> |
| | | <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="åç¨äººèç³»æ¹å¼ï¼" prop="borrowerContactInformation" label-width="150px"> |
| | | <el-input v-model="form.borrowerContactInformation" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨æ¥æï¼" prop="recipientTime"> |
| | | <el-date-picker v-model="form.recipientTime" type="date" placeholder="éæ©æ¥æ" size="small" |
| | | format="yyyy-MM-dd" style="width: 100%" value-format="yyyy-MM-dd" :disabled="currentStep > 0"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨æ¶ç¶æï¼"> |
| | | <el-radio-group v-model="form.recipientState" :disabled="currentStep !== 0"> |
| | | <el-radio :label="0">åæ ¼</el-radio> |
| | | <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="24"> |
| | | <el-form-item label="ç¸å
³éä»¶ï¼" prop="fileName"> |
| | | <el-input v-model="form.fileName" disabled size="small" |
| | | :style="`width: ${currentStep == 0 ? '88%' : '100%'};`"> |
| | | <el-button slot="append" v-if="currentStep === 0" icon="el-icon-delete-solid" |
| | | @click="deleteFile"></el-button> |
| | | </el-input> |
| | | <el-upload ref="upload" style="float: right;" :action="action" :show-file-list="false" |
| | | :on-success="onSuccess" :disabled="currentStep !== 0" :headers="uploadHeader"> |
| | | <el-button style="position: relative;top: -4px" class="uploadFile" slot="trigger" size="small" |
| | | type="primary" v-if="currentStep === 0">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¯è责任人ï¼" prop="nextUser"> |
| | | <el-select v-model="form.nextUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 100%;" :disabled="currentStep !== 0"> |
| | | <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-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.submitOperationUser }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.submitOperationTime }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-show="currentStepClick === 1"> |
| | | <el-card style="margin-top: 1em; height: 51vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½è¿äººï¼" prop="rebackUser" |
| | | :rules="[{ required: currentStep === 1, message: '请è¾å
¥å½è¿äºº', trigger: 'change' }]"> |
| | | <!-- <el-input v-model="form.rebackUser" size="small" :disabled="currentStep !== 1"></el-input> --> |
| | | <el-select v-model="form.rebackUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 50%;" :disabled="currentStep !== 1"> |
| | | <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="å½è¿æ¥æï¼" prop="rebackTime" |
| | | :rules="[{ required: currentStep === 1, message: 'è¯·éæ©å½è¿æ¥æ', trigger: 'change' }]"> |
| | | <el-date-picker v-model="form.rebackTime" :disabled="currentStep !== 1" type="date" placeholder="éæ©æ¥æ" |
| | | size="small" format="yyyy-MM-dd HH:mm:ss" 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-radio-group v-model="form.receiveState" :disabled="currentStep !== 1"> |
| | | <el-radio :label="0">åæ ¼</el-radio> |
| | | <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="12"> |
| | | <el-form-item label="设å¤è´è´£äººï¼" prop="deviceUser" |
| | | :rules="[{ required: currentStep === 1, message: 'è¯·éæ©è®¾å¤è´è´£äºº', trigger: 'change' }]"> |
| | | <!-- <el-input v-model="form.deviceUser" size="small" :disabled="currentStep !== 1"></el-input> --> |
| | | <el-select v-model="form.deviceUser" filterable placeholder="è¯·éæ©" clearable size="small" |
| | | style="width: 50%;" :disabled="currentStep !== 1"> |
| | | <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="24"> |
| | | <el-form-item label="夿³¨ï¼"> |
| | | <el-input type="textarea" v-model="form.note" :disabled="currentStep !== 1" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.receiveOperationUser }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.receiveOperationTime }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="submitForm('3reject')" v-if="currentStep !== 0 && currentStep !== 2">驳å</el-button> |
| | | <el-button @click="submitForm('2save')" v-if="currentStep === 0">ä¿å</el-button> |
| | | <el-button type="primary" v-if="currentStep !== 2" @click="submitForm('1submit')">{{ currentStep === 0 ? 'æäº¤' : |
| | | 'éè¿' |
| | | }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æµç¨è·è¸ª" top="5vh" :visible.sync="dialogVisible0" width="60%"> |
| | | <el-table :data="deviceLogs" style="width: 100%"> |
| | | <el-table-column type="index" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="operator" label="æä½äºº" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="operationTime" label="æä½æ¥æ" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="operationType" label="æäº¤ç±»å"> |
| | | </el-table-column> |
| | | <el-table-column prop="operationContent" label="æä½å
容"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { dateFormat } from '@/utils/date' |
| | | import { |
| | | saveDeviceBorrow, |
| | | deleteCNASFile, |
| | | getDeviceBorrow, |
| | | deviceBorrowExport, |
| | | deleteDeviceBorrow, |
| | | deviceBorrowPage, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | dialogVisible0: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | currentStepClick: 0, // ç¹å»æ¥éª¤æ¡åå |
| | | steps: ['ååº', 'åç¨'], |
| | | responsibleOptions: [], // ä¸ç¯èè´è´£äººlist |
| | | form: { |
| | | processNumber: null, |
| | | deviceName: null, |
| | | unifyNumber: null, |
| | | recipientUser: null, |
| | | recipientTime: null, |
| | | nextUser: null, |
| | | rebackUser: null, |
| | | rebackTime: null, |
| | | receiveState: null, |
| | | deviceUser: null, |
| | | fileName: null, |
| | | }, |
| | | rules: { |
| | | processNumber: [{ required: true, message: '请è¾å
¥ç¼å·', trigger: 'blur' }], |
| | | deviceName: [{ required: true, message: '请è¾å
¥è®¾å¤åç§°', trigger: 'blur' }], |
| | | unifyNumber: [{ required: true, message: '请è¾å
¥ç®¡çç¼å·', trigger: 'blur' }], |
| | | recipientUser: [{ required: true, message: '请è¾å
¥åç¨äºº', trigger: 'blur' }], |
| | | borrowerContactInformation: [{ required: true, message: '请è¾å
¥åç¨äººèç³»æ¹å¼', trigger: 'blur' }], |
| | | recipientTime: [{ required: true, message: 'è¯·éæ©åç¨æ¥æ', trigger: 'change' }], |
| | | nextUser: [{ required: true, message: 'è¯·éæ©ä¸ç¯èè´è´£äºº', trigger: 'change' }], |
| | | }, |
| | | deviceLogs: [], |
| | | outLoading: false, |
| | | recipientStateList: [{ |
| | | value: 0, |
| | | type: 'success', |
| | | label: 'åæ ¼' |
| | | }, { |
| | | value: 1, |
| | | type: 'warning', |
| | | label: 'ç»´ä¿®' |
| | | }, { |
| | | value: 2, |
| | | type: 'info', |
| | | label: 'åç¨' |
| | | }, { |
| | | value: 3, |
| | | type: 'danger', |
| | | label: 'æ¥åº' |
| | | }], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æµç¨ç¼å·", prop: "processNumber" }, |
| | | { label: "设å¤åç§°", prop: "deviceName" }, |
| | | { |
| | | label: "管çç¼å·", |
| | | prop: "unifyNumber" |
| | | }, |
| | | { label: "åç¨äºº", prop: "recipientUser" }, |
| | | { label: "åç¨äººèç³»æ¹å¼", prop: "borrowerContactInformation", width: '140px' }, |
| | | { label: "åç¨æ¥æ", prop: "recipientTime" }, |
| | | { |
| | | label: "åç¨æ¶ç¶æ", prop: "recipientState", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.recipientStateList.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.recipientStateList.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { label: "ååºäºº", prop: "submitUser" }, |
| | | { label: "ååºæ¥æ", prop: "createTime" }, |
| | | { |
| | | label: "å½åç¶æ", prop: "nowState" |
| | | }, |
| | | { label: "å½å责任人", prop: "nowUser" }, |
| | | { label: "éä»¶", prop: "fileName" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.lookDetail(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æµç¨è·è¸ª", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLookList(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | thisqueryParams.deviceId = this.clickNodeVal.value |
| | | this.refreshTable() |
| | | } |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = {} |
| | | this.currentStep = 0 // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | this.currentStepClick = 0 // ç¹å»æ¥éª¤æ¡åå |
| | | this.$refs['form'].clearValidate() |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.queryParams.deviceId = this.clickNodeVal.value |
| | | this.getUserList() |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | deviceBorrowPage({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | choiceStep(index) { |
| | | this.currentStepClick = index |
| | | }, |
| | | //æäº¤è¡¨å |
| | | 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.submitOperationUser = this.nickName |
| | | this.form.submitOperationTime = dateTime |
| | | break |
| | | case 1: |
| | | this.form.receiveOperationUser = this.nickName |
| | | this.form.receiveOperationTime = dateTime |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | // è·åå½åç¯èè´è´£äºº |
| | | switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) { |
| | | case 0: |
| | | this.form.nowUser = this.form.nextUser |
| | | 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.nowState = currentStepAction === 2 ? 'å
³é' : this.steps[currentStepAction] |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | delete this.form.deviceLogs |
| | | saveDeviceBorrow(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.dialogVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } else { |
| | | let step = this.steps[this.currentStep] |
| | | this.$message.warning(step + ' æµç¨ä¸æå¿
填项æªå¡«ï¼'); |
| | | } |
| | | }); |
| | | }, |
| | | deleteFile() { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteCNASFile({ fileName: this.form.fileName }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿åï¼') |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | if (response.code == 200) { |
| | | // å¨ä¿åèµå¼æ°æä»¶ |
| | | this.form.fileName = file.name |
| | | this.form.url = response.data |
| | | } else { |
| | | this.$message.error(response.message) |
| | | } |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | // æ¥ç详æ
|
| | | lookDetail(row) { |
| | | getDeviceBorrow({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.form = res.data |
| | | this.form.deviceName = this.clickNodeVal.label |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | this.deviceLogs = res.data.deviceLogs |
| | | let i = this.steps.findIndex(item => item == row.nowState) |
| | | if (i == -1) { |
| | | this.currentStep = 2 |
| | | this.currentStepClick = 0 |
| | | } else { |
| | | this.currentStep = i |
| | | this.currentStepClick = i |
| | | } |
| | | console.log(this.currentStepClick) |
| | | this.dialogVisible = true |
| | | } |
| | | }) |
| | | }, |
| | | // æ°å¢ |
| | | add() { |
| | | this.dialogVisible = true |
| | | this.form = { |
| | | processNumber: null, |
| | | deviceName: null, |
| | | unifyNumber: null, |
| | | recipientUser: null, |
| | | recipientTime: null, |
| | | nextUser: null, |
| | | rebackUser: null, |
| | | rebackTime: null, |
| | | receiveState: null, |
| | | deviceUser: null, |
| | | fileName: null, |
| | | } |
| | | this.form.deviceName = this.clickNodeVal.label |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | }, |
| | | //å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | deviceBorrowExport({ deviceId: this.clickNodeVal.value }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | const filename = decodeURI(this.clickNodeVal.label + '设å¤ååºç»è®¡' + '.xlsx') |
| | | this.$download.saveAs(blob, filename) |
| | | }) |
| | | }, |
| | | handleLookList(row) { |
| | | getDeviceBorrow({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.deviceLogs = res.data.deviceLogs |
| | | this.dialogVisible0 = true |
| | | } |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | deleteDeviceBorrow({ id: row.id }).then((res) => { |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | h4 { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | h4 .line { |
| | | display: inline-block; |
| | | width: 3px; |
| | | height: 16px; |
| | | background: #3A7BFA; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .tables { |
| | | width: 100%; |
| | | height: calc(100vh - 15em); |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 40px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | |
| | | .btns_thing { |
| | | position: absolute; |
| | | right: 230px; |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | |
| | | .form .search_label { |
| | | width: 120px; |
| | | } |
| | | |
| | | .el-radio { |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .el-radio-group { |
| | | width: 100%; |
| | | display: flex; |
| | | margin-top: 12px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- è®¾å¤æ ¡å --> |
| | | <template> |
| | | <div> |
| | | <div class="btnS"> |
| | | <el-button size="small" type="primary" @click="calibrationMaintenance()">æ ¡å项ç®ç»´æ¤</el-button> |
| | | <el-button size="small" type="primary" @click="add('add')">æ·»å æ ¡åè®°å½</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown">导åºExcel</el-button> |
| | | </div> |
| | | <div class="tables" style="margin-top: 16px;"> |
| | | <el-table :data="tableData" height="calc(100vh - 20em)"> |
| | | <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="150" prop="processNumber"></el-table-column> |
| | | <el-table-column label="æ ¡åæºæ" min-width="150" prop="unitOfMeasure" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="æ ¡åç»è®º" min-width="150" prop="status"> |
| | | <template v-slot="scope"> |
| | | {{ scope.row.status === '0yes' ? 'åæ ¼' : scope.row.status === '1no' ? 'ä¸åæ ¼' : 'å
¶ä»' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ ¡åè¯ä¹¦ç¼å·" min-width="150" prop="certificateSerialNumber"></el-table-column> |
| | | <el-table-column label="说æ" min-width="150" prop="remark" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="æ ¡åæ¥æ" min-width="150" prop="calibrationDate"></el-table-column> |
| | | <el-table-column label="䏿¬¡æ ¡åæ¥æ" min-width="150" prop="nextCalibrationDate"></el-table-column> |
| | | <el-table-column label="ç¡®è®¤æ¥æ" min-width="150" prop="confirmDate"></el-table-column> |
| | | <el-table-column label="ç»è®°äºº" min-width="150" prop="createUser"></el-table-column> |
| | | <el-table-column label="ç»è®°æ¥æ" min-width="150" prop="createTime"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" min-width="150"> |
| | | <template #default="{ row }"> |
| | | <el-button size="small" type="text" @click="handleAttachmentClick(row)">éä»¶</el-button> |
| | | <!-- <el-button size="small" type="text" @click="handleViewClick('view', row)">æ¥ç</el-button> --> |
| | | <el-button size="small" type="text" @click="handleViewClick('add', row)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" @click="handleDeleteClick(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" style="margin-right: 5%;" |
| | | @size-change="handleSizeChange" @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </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="dialogVisibleFile" |
| | | width="60%" |
| | | > |
| | | <el-upload |
| | | ref="upload" |
| | | style="margin-top: 5px;margin-bottom: 10px;" |
| | | :action="action" |
| | | :data="uploadData" |
| | | :headers="uploadHeader" |
| | | :before-upload="beforeUpload" |
| | | :on-success="onSuccess" |
| | | > |
| | | <el-button type="primary" size="small" :loading="upLoading">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload> |
| | | <el-table |
| | | :data="fileData" |
| | | border |
| | | height="400px" |
| | | style="width: 100%"> |
| | | <el-table-column label="åºå·" type="index" width="240px"> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶åç§°" prop="fileName"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="preview(scope.row)">é¢è§</el-button> |
| | | <el-button type="text" @click="download(scope.row)">ä¸è½½</el-button> |
| | | <el-button type="text" @click="delFile(scope.row)" style="color: red;">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogVisibleFile = false">å
³ é</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | <!-- æ ¡å项ç®ç»´æ¤ --> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible0" title="æ ¡å项ç®ç»´æ¤" |
| | | top="5vh" width="70%"> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"><span class="line"></span><span>è®¾å¤æ ¡ååæ°ç»´æ¤</span></span> |
| | | <el-button :loading="addCalibrateLoading" size="small" type="primary" @click="addCalibrate">æ·» å </el-button> |
| | | </h4> |
| | | <div> |
| | | <el-form ref="form0" :model="form0" :rules="form0Rules" |
| | | label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计éåæ°:" prop="measurementParameter"> |
| | | <el-input v-model="form0.measurementParameter" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éç¨èå´:" prop="rangeOfMeasurement"> |
| | | <el-input v-model="form0.rangeOfMeasurement" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æå¤§å
许误差:" prop="maxPermissibleError"> |
| | | <el-input v-model="form0.maxPermissibleError" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¤å®æ å:" prop="judgmentCriteria"> |
| | | <el-input v-model="form0.judgmentCriteria" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"><span class="line"></span><span>è®¾å¤æ ¡ååæ°</span></span> |
| | | </h4> |
| | | <!-- è®¾å¤æ ¡ååæ°è¡¨æ ¼ --> |
| | | <el-table ref="calibrateTable" v-loading="calibrateParamsLoading" :data="calibrateParams" |
| | | max-height="450" |
| | | stripe style="width: 100%"> |
| | | <el-table-column label="ç¼å·" type="index" width="80"></el-table-column> |
| | | <el-table-column label="计éåæ°" prop="measurementParameter"></el-table-column> |
| | | <el-table-column label="éç¨èå´" prop="rangeOfMeasurement"></el-table-column> |
| | | <el-table-column label="æå¤§å
许误差" prop="maxPermissibleError"></el-table-column> |
| | | <el-table-column label="å¤å®æ å" prop="judgmentCriteria"></el-table-column> |
| | | <el-table-column label="å建人" prop="createdBy"></el-table-column> |
| | | <el-table-column label="å建æ¶é´" prop="creationTime"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <!-- æ·»å æ ¡åè®°å½ --> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible1" title="æ ¡åè®°å½" |
| | | top="5vh" |
| | | width="80%" @close="resetCalibrationRecord"> |
| | | <div style="height: 70vh;overflow-y: auto;overflow-x: hidden;"> |
| | | <h4> |
| | | <div style="display: flex;align-items: center;"> |
| | | <span class="line"></span> |
| | | <span>æ·»å è®¾å¤æ ¡åè®°å½</span> |
| | | </div> |
| | | </h4> |
| | | <el-form ref="calibrationRecord" :model="calibrationRecord" |
| | | :rules="formRules" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ ¡åæå¡æºæ:" prop="unitOfMeasure"> |
| | | <el-input v-model="calibrationRecord.unitOfMeasure" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ ¡åæ¥æ:" prop="calibrationDate"> |
| | | <el-date-picker v-model="calibrationRecord.calibrationDate" :disabled="operationType === 'view'" |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 90%" type="date" |
| | | value-format="yyyy-MM-dd" @change="getNextCalibrationDate"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="䏿¬¡æ ¡åæ¥æ:" label-width="140px"> |
| | | <el-date-picker v-model="calibrationRecord.nextCalibrationDate" disabled |
| | | format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" style="width: 90%" |
| | | type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计ç®å¨å
·:" prop="calculatingApparatus"> |
| | | <el-input v-model="calibrationRecord.calculatingApparatus" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è®¡ç®æ åéç¨:" prop="standardRange"> |
| | | <el-input v-model="calibrationRecord.standardRange" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è®¡éæ åä¸ç¡®å®åº¦:" label-width="140px" prop="calibrationStandardUncertainty"> |
| | | <el-input v-model="calibrationRecord.calibrationStandardUncertainty" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æä¾æ®æä»¶:" prop="byDocument"> |
| | | <el-input v-model="calibrationRecord.byDocument" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä¹¦ç¼å·:" prop="certificateSerialNumber"> |
| | | <el-input v-model="calibrationRecord.certificateSerialNumber" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ç¶æ:" label-width="140px" prop="status" required> |
| | | <el-radio-group v-model="calibrationRecord.status" :disabled="operationType === 'view'"> |
| | | <el-radio label="0yes">åæ ¼</el-radio> |
| | | <el-radio label="1no">ä¸åæ ¼</el-radio> |
| | | <el-radio label="2other">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ç¡®è®¤æ¥æ:"> |
| | | <el-date-picker v-model="calibrationRecord.confirmDate" :disabled="operationType === 'view'" |
| | | 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="24"> |
| | | <el-form-item label="夿³¨:"> |
| | | <el-input v-model="calibrationRecord.remark" :disabled="operationType === 'view'" :rows="3" size="small" style="width: 96%" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"> |
| | | <span class="line"></span><span>æ ¡åæ¡ç®ç¡®è®¤ç»æ</span> |
| | | </span> |
| | | </h4> |
| | | <el-table ref="calibrateTable" :data="calibrateParams" border> |
| | | <el-table-column label="ç¼å·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="计éåæ°" prop="measurementParameter"></el-table-column> |
| | | <el-table-column label="éç¨èå´" prop="rangeOfMeasurement"></el-table-column> |
| | | <el-table-column label="æå¤§å
许误差" prop="maxPermissibleError"></el-table-column> |
| | | <el-table-column label="å¤å®æ å" prop="judgmentCriteria"></el-table-column> |
| | | <el-table-column label="æ¯å¦æ ¡å" prop="isCalibration"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <span class="required-span">* </span>æ¯å¦æ ¡å |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <el-radio-group v-model="scope.row.isCalibration" :disabled="operationType === 'view'"> |
| | | <el-radio label="0yes">æ¯</el-radio> |
| | | <el-radio label="1no">å¦</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤å®ç»æ" min-width="140" prop="result"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <span class="required-span">* </span>å¤å®ç»æ |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <el-radio-group v-model="scope.row.result" :disabled="operationType === 'view'" @input="checkRadio()"> |
| | | <el-radio label="0yes">åæ ¼</el-radio> |
| | | <el-radio label="1no">ä¸åæ ¼</el-radio> |
| | | <el-radio label="2other">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åé¡¹ç»æè¯´æ" prop="singleResultStatement"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.singleResultStatement" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType === 'add'" @click="dialogVisible1 = false">å æ¶</el-button> |
| | | <el-button v-if="operationType === 'add'" :loading="addRecordLoading" type="primary" |
| | | @click="addRecord">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | deviceMetricRecordPage, |
| | | showDeviceMetricsCopy, |
| | | deleteDeviceMetricRecord, |
| | | deviceMetricRecordExport, |
| | | deleteCNASFile, |
| | | selectDeviceMetric, |
| | | deleteDeviceMetrics, |
| | | addOrUpdateDeviceMetricRecord, |
| | | saveOrUpdateDeviceMetric, downLoadDeviceCalibrationFile, getDeviceCalibrationFile, delDeviceCalibrationFile |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { mapGetters } from "vuex"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | export default { |
| | | components: {filePreview}, |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | value: "", |
| | | calibrateParams: [], |
| | | calibrateParamsLoading: false, |
| | | addCalibrateLoading: false, |
| | | previewFile: '', |
| | | lookDialogVisible: false, |
| | | recordId: null, |
| | | uploadData: {}, |
| | | fileData: [], |
| | | dialogVisibleFile: false, |
| | | calibrationRecord: { |
| | | unitOfMeasure: '', // 计éåä½ |
| | | calibrationDate: null, // æ ¡åæ¥æ |
| | | nextCalibrationDate: null, // 䏿¬¡æ ¡åæ¥æ |
| | | calculatingApparatus: '', // 计ç®å¨å
· |
| | | confirmDate: null, // ç¡®è®¤æ¥æ |
| | | standardRange: '', // è®¡ç®æ åéç¨ |
| | | calibrationStandardUncertainty: '', // è®¡éæ åä¸ç¡®å®åº¦ |
| | | byDocument: '', // 便®æä»¶ |
| | | certificateSerialNumber: '', // è¯ä¹¦ç¼å· |
| | | status: '', // ç¶æ |
| | | remark: '', // 夿³¨ |
| | | systemFileName: '', // |
| | | fileName: '', // |
| | | }, |
| | | formRules: { |
| | | unitOfMeasure: [{ required: true, message: '请è¾å
¥æ ¡åæå¡æºæ', trigger: 'blur' }], |
| | | calibrationDate: [{ required: true, message: 'è¯·éæ©æ ¡åæ¥æ', trigger: 'change' }], |
| | | calculatingApparatus: [{ required: true, message: '请è¾å
¥è®¡ç®å¨å
·', trigger: 'blur' }], |
| | | standardRange: [{ required: true, message: '请è¾å
¥è®¡ç®æ åéç¨', trigger: 'blur' }], |
| | | calibrationStandardUncertainty: [{ required: true, message: '请è¾å
¥è®¡éæ åä¸ç¡®å®åº¦', trigger: 'blur' }], |
| | | byDocument: [{ required: true, message: '请è¾å
¥æä¾æ®æä»¶', trigger: 'blur' }], |
| | | status: [{ required: true, message: 'è¯·éæ©ç¶æ', trigger: 'change' }], |
| | | }, |
| | | tableData: [], |
| | | dialogVisible0: false, |
| | | dialogVisible1: false, |
| | | form0: { |
| | | measurementParameter: '', // 计éåæ° |
| | | rangeOfMeasurement: '', |
| | | maxPermissibleError: '', |
| | | judgmentCriteria: '', |
| | | createdBy: '', |
| | | action: '', |
| | | deviceId: null |
| | | }, |
| | | form0Rules: { |
| | | measurementParameter: [ |
| | | { required: true, message: '请è¾å
¥è®¡éåæ°', trigger: 'blur' } |
| | | ], |
| | | rangeOfMeasurement: [ |
| | | { required: true, message: '请è¾å
¥éç¨èå´', trigger: 'blur' } |
| | | ], |
| | | maxPermissibleError: [ |
| | | { required: true, message: '请è¾å
¥æå¤§å
许误差', trigger: 'blur' } |
| | | ], |
| | | judgmentCriteria: [ |
| | | { required: true, message: '请è¾å
¥å¤å®æ å', trigger: 'blur' } |
| | | ], |
| | | }, |
| | | addRecordLoading: false, |
| | | upLoading: false, |
| | | operationType: '', |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveDeviceCalibrationFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | //è·åæä½è®°å½ä¿¡æ¯ |
| | | this.getTableList(this.clickNodeVal.value) // è·åè®¾å¤æ ¡ååè¡¨æ°æ® |
| | | }, |
| | | methods: { |
| | | preview(row) { |
| | | let list = row.fileUrl.split('.') |
| | | let suffix = list[list.length - 1] |
| | | if(suffix.toLowerCase().includes("pdf")) { |
| | | let link = document.createElement('a') |
| | | let url = this.javaApi + 'word' + row.fileUrl |
| | | console.log(url); |
| | | link.href = url |
| | | link.target= '_blank' |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | document.body.removeChild(link) |
| | | }else{ |
| | | let url = '' |
| | | if(suffix.toLowerCase().includes('docx')) { |
| | | url = this.javaApi + 'word' + row.fileUrl |
| | | }else if(suffix.toLowerCase().includes('xls')) { |
| | | url = this.javaApi + 'excel' + row.fileUrl |
| | | }else{ |
| | | url = this.javaApi + 'img' + row.fileUrl |
| | | } |
| | | this.previewFile = url |
| | | this.$nextTick(() => { |
| | | this.lookDialogVisible = true |
| | | }) |
| | | } |
| | | }, |
| | | download(row) { |
| | | downLoadDeviceCalibrationFile({id: row.id}).then(res => { |
| | | const blob = new Blob([res],{type: row.mime}) |
| | | this.$download.saveAs(blob, row.fileName) |
| | | }) |
| | | }, |
| | | delFile(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delDeviceCalibrationFile({id: row.id}).then(res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getFileData(this.recordId); |
| | | }) |
| | | }) |
| | | }, |
| | | handleAttachmentClick(row) { |
| | | // 模æä¸è½½éä»¶ |
| | | // const imageUrl = this.javaApi + '/img/' + row.systemFileName; // å¾ç URL |
| | | // file.downloadIamge(imageUrl,row.fileName) |
| | | this.recordId = row.id |
| | | this.dialogVisibleFile = true |
| | | this.getFileData(row.id) |
| | | }, |
| | | getFileData(id) { |
| | | getDeviceCalibrationFile({id: id}).then(res =>{ |
| | | this.fileData = res.data |
| | | }) |
| | | }, |
| | | //ç¶æå¤å® |
| | | checkRadio() { |
| | | let resultList = this.calibrateParams.map(ele => ele.result) |
| | | if (resultList && resultList.filter(ele => ele == '1no').length > 0) { |
| | | this.calibrationRecord.status = '1no' |
| | | } else if (resultList && resultList.filter(ele => ele == '2other').length == resultList.length) { |
| | | this.calibrationRecord.status = '2other' |
| | | } else if (resultList && resultList.filter(ele => ele == '0yes').length == resultList.length) { |
| | | this.calibrationRecord.status = '0yes' |
| | | } |
| | | }, |
| | | getNextCalibrationDate(val) { |
| | | let oneYearLaterDate = new Date(val) |
| | | oneYearLaterDate.setFullYear(oneYearLaterDate.getFullYear() + 1); |
| | | oneYearLaterDate.setDate(oneYearLaterDate.getDate() - 1); |
| | | // let obj = oneYearLaterDate.toISOString().split('T')[0]; |
| | | this.calibrationRecord.nextCalibrationDate = oneYearLaterDate |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val |
| | | this.getTableList(this.clickNodeVal.value); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val |
| | | this.getTableList(this.clickNodeVal.value); |
| | | }, |
| | | getTableList(deviceId) { |
| | | deviceMetricRecordPage({ deviceId, type: 'calibrate', ...this.search }).then(res => { |
| | | this.tableData = res.data.records |
| | | this.search.total = res.data.total |
| | | }) |
| | | }, |
| | | // æ·»å æ ¸æ¥è®°å½ |
| | | add(type) { |
| | | this.operationType = type |
| | | this.dialogVisible1 = true |
| | | this.getXmsg() |
| | | }, |
| | | // æ¥çç¼è¾è¯¦æ
|
| | | handleViewClick(type, row) { |
| | | showDeviceMetricsCopy({ id: row.id, type: 'calibrate' }).then(res => { |
| | | this.calibrateParams = res.data |
| | | }) |
| | | this.calibrationRecord = { ...row } |
| | | this.operationType = type |
| | | this.dialogVisible1 = true |
| | | }, |
| | | // è¡¨æ ¼å é¤æä½ |
| | | handleDeleteClick(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteDeviceMetricRecord({ id: row.id }).then(res => { |
| | | this.getTableList(this.clickNodeVal.value) // è·åè®¾å¤æ ¡ååè¡¨æ°æ® |
| | | this.$message.success('å 餿åï¼') |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }) |
| | | }, |
| | | //å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | deviceMetricRecordExport({ |
| | | deviceId: this.clickNodeVal.value, |
| | | type: 'calibrate' |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'è®¾å¤æ ¡å.xlsx') |
| | | }) |
| | | }, |
| | | // æ ¡å项ç®ç»´æ¤ |
| | | calibrationMaintenance() { |
| | | this.dialogVisible0 = true |
| | | this.getXmsg(); |
| | | }, |
| | | // è·åè®¾å¤æ ¡ååæ°tableä¿¡æ¯ |
| | | async getXmsg() { |
| | | this.calibrateParamsLoading = true |
| | | try { |
| | | await selectDeviceMetric({ deviceId: this.clickNodeVal.value, type: 'calibrate' }).then(res => { |
| | | if (res.code == 200) { |
| | | this.calibrateParams = res.data |
| | | } |
| | | this.calibrateParamsLoading = false |
| | | }) |
| | | } catch (e) { |
| | | console.log('getXmsg---', e) |
| | | this.calibrateParamsLoading = false |
| | | } |
| | | }, |
| | | // æ ¡å项ç®ç»´æ¤-å é¤è®¾å¤æ ¡ååæ° |
| | | handleDelete(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteDeviceMetrics({ id: row.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å!'); |
| | | this.getXmsg(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤'); |
| | | }) |
| | | }, |
| | | // æäº¤é¡¹ç®æ ¡åç»´æ¤ |
| | | addCalibrate() { |
| | | this.$refs['form0'].validate((valid) => { |
| | | if (valid) { |
| | | // ä¿å |
| | | this.calibrateParamsLoading = true |
| | | this.addCalibrateLoading = true |
| | | this.form0.deviceId = this.clickNodeVal.value; |
| | | this.form0.createdBy = this.nickName; |
| | | this.form0.type = 'calibrate' |
| | | saveOrUpdateDeviceMetric(this.form0).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('ä¿åæå') |
| | | this.$refs['form0'].resetFields() |
| | | this.getXmsg() // å·æ°è®¾å¤æ ¡ååæ°è¡¨æ ¼ |
| | | } |
| | | this.calibrateParamsLoading = false |
| | | this.addCalibrateLoading = false |
| | | }).catch(() => { |
| | | this.addCalibrateLoading = false |
| | | }) |
| | | } else { |
| | | this.addCalibrateLoading = false |
| | | this.$message.warning('æå¿
填项æªå¡«'); |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤æ ¡åè®°å½ |
| | | addRecord() { |
| | | this.$refs['calibrationRecord'].validate((valid) => { |
| | | if (valid) { |
| | | try { |
| | | if (this.calibrateParams.some(m => m.isCalibration === undefined)) { |
| | | this.$message.error('è¯·éæ©æ¯å¦æ ¡å') |
| | | return |
| | | } |
| | | if (!this.calibrateParams.every(m => m.result !== undefined)) { |
| | | this.$message.error('è¯·éæ©å¤å®ç»æ') |
| | | return |
| | | } |
| | | this.addRecordLoading = true |
| | | this.calibrationRecord.deviceId = this.clickNodeVal.value; |
| | | this.calibrationRecord.createUser = this.nickName |
| | | this.calibrationRecord.type = 'calibrate' |
| | | this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams |
| | | this.calibrationRecord.deviceMetricsCopyList.forEach(m => { |
| | | delete m.creationTime |
| | | }) |
| | | delete this.calibrationRecord.createTime |
| | | addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æ·»å æå') |
| | | this.dialogVisible1 = false |
| | | this.getTableList(this.clickNodeVal.value) |
| | | } |
| | | this.addRecordLoading = false |
| | | }).catch((err) => { |
| | | this.addRecordLoading = false |
| | | }) |
| | | } catch (e) { |
| | | console.log('addRecord---', e) |
| | | this.addRecordLoading = false |
| | | } |
| | | } else { |
| | | this.$message.warning('æå¿
填项æªå¡«'); |
| | | } |
| | | }) |
| | | }, |
| | | resetCalibrationRecord() { |
| | | this.$refs.calibrationRecord.resetFields() |
| | | }, |
| | | // ä¸ä¼ éä»¶ |
| | | handleSuccessUp(response, file) { |
| | | if (response.code == 200) { |
| | | // å¨ä¿åèµå¼æ°æä»¶ |
| | | this.calibrationRecord.fileName = file.name |
| | | this.calibrationRecord.systemFileName = response.data |
| | | this.upLoading = false; |
| | | } else { |
| | | this.upLoading = false; |
| | | this.$message.error(response.message) |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | | let list = file.name.split('.') |
| | | let suffix = list[list.length - 1] |
| | | |
| | | console.log(suffix); |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | this.upLoading = true; |
| | | this.$set(this.uploadData,'id',this.recordId) |
| | | this.$set(this.uploadData,'suffix',suffix) |
| | | return true; |
| | | } |
| | | }, |
| | | onSuccess(response,file,fileList) { |
| | | if(response.code == 200) { |
| | | this.$message.success("ä¸ä¼ æå") |
| | | this.upLoading = false |
| | | this.$refs.upload.clearFiles() |
| | | this.getFileData(this.recordId) |
| | | } else { |
| | | this.$message.error(response.msg) |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | // end |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | this.getTableList(newVal.value); |
| | | } |
| | | }, |
| | | dialogVisible1(newVal) { |
| | | if (newVal === false) { |
| | | this.calibrateParams = [] |
| | | this.calibrationRecord = { |
| | | unitOfMeasure: '', // 计éåä½ |
| | | calibrationDate: null, // æ ¡åæ¥æ |
| | | nextCalibrationDate: null, // 䏿¬¡æ ¡åæ¥æ |
| | | calculatingApparatus: '', // 计ç®å¨å
· |
| | | standardRange: '', // è®¡ç®æ åéç¨ |
| | | calibrationStandardUncertainty: '', // è®¡éæ åä¸ç¡®å®åº¦ |
| | | byDocument: '', // 便®æä»¶ |
| | | certificateSerialNumber: '', // è¯ä¹¦ç¼å· |
| | | status: '', // ç¶æ |
| | | remark: '', // 夿³¨ |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <style scoped> |
| | | .tables { |
| | | width: 100%; |
| | | height: calc(100vh - 230px); |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 40px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .btnS { |
| | | text-align: right; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | h4 { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | h4 .line { |
| | | display: inline-block; |
| | | width: 3px; |
| | | height: 16px; |
| | | background: #3A7BFA; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .check { |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .check_thing { |
| | | flex: 0 0 calc(20% - 10px); |
| | | margin-bottom: 20px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | |
| | | .check_label { |
| | | font-size: 14px; |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .check_data .check_input { |
| | | width: 100%; |
| | | } |
| | | |
| | | .el-table { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | |
| | | .el-table thead { |
| | | background-color: #f5f5f5; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 设å¤éªæ¶ --> |
| | | <template> |
| | | <div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æµç¨ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="search.processNumber" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="getDeviceAList(clickNodeVal.value)"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="resetSearch">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="getDeviceAList(clickNodeVal.value)">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">æ·»å éªæ¶</el-button> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="tables" style="margin-top: 10px;"> |
| | | <el-table ref="table" :data="tableDataAlist" height="100%" v-loading="tableLoading"> |
| | | <el-table-column label="åºå·" type="index" width="60"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æµç¨ç¼å·" min-width="150" prop="processNumber" show-overflow-tooltip/> |
| | | <el-table-column label="设å¤åç§°" min-width="140" prop="deviceName" show-overflow-tooltip/> |
| | | <el-table-column label="管çç¼å·" min-width="140" prop="managementNumber" show-overflow-tooltip/> |
| | | <el-table-column label="åºåå·" min-width="80" prop="serialNumber" /> |
| | | <el-table-column label="æäº¤è
" min-width="100" prop="submitUser" /> |
| | | <el-table-column label="æäº¤æ¥æ" min-width="150" prop="createTime" /> |
| | | <el-table-column label="å½åç¶æ" min-width="140" prop="currentState" /> |
| | | <el-table-column label="å½åè´è´£äºº" min-width="120" prop="currentResponsible" /> |
| | | <el-table-column fixed="right" label="æä½" min-width="140"> |
| | | <template #default="{ row }"> |
| | | <el-button size="small" type="text" @click="handleAttachmentClick(row)">éä»¶</el-button> |
| | | <el-button size="small" type="text" @click="handleViewClick(row)">æ¥ç</el-button> |
| | | <el-button size="small" type="text" @click="handleDeleteClick(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="60%" @open="openRecordAcceptance"> |
| | | <el-steps :active="currentStep" 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 v-show="currentStepClick === 0"> |
| | | <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;"> |
| | | <!-- æ°å¢è®¾å¤äºè®°å½å¡ç --> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æµç¨ç¼å·ï¼" prop="processNumber"> |
| | | <el-input v-model="form.processNumber" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°ï¼"> |
| | | <el-input v-model="form.deviceName" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç产åå®¶ï¼"> |
| | | <el-input v-model="form.manufacturer" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åå·ï¼"> |
| | | <el-input v-model="form.specificationModel" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="管çç¼å·ï¼"> |
| | | <el-input v-model="form.managementNumber" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item :rules="[{ required: currentStep === 0, message: '请è¾å
¥åºåå·', trigger: 'blur' }]" label="åºåå·ï¼" |
| | | prop="serialNumber"> |
| | | <el-input v-model="form.serialNumber" :disabled="currentStep !== 0" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item :rules="[{ required: currentStep === 0, message: '请è¾å
¥è®¾å¤ç±»å«', trigger: 'change' }]" label="设å¤ç±»å«ï¼" |
| | | prop="deviceClass"> |
| | | <el-radio-group v-model="form.deviceClass" :disabled="currentStep !== 0"> |
| | | <el-radio label="0precision">ç²¾å¯å设å¤</el-radio> |
| | | <el-radio label="1conventional">常è§è®¾å¤</el-radio><br /> |
| | | <el-radio label="2auxiliary_class">è¾
å©ç±»è®¾å¤</el-radio> |
| | | <el-radio label="4environmental">ç¯å¢ç±»è®¾å¤</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 0, message: '请è¾å
¥å¼ç®±åæ£æ¥å¤å
è£
ææ ç ´æ', trigger: 'blur' }]" label="å¼ç®±åæ£æ¥å¤å
è£
ææ ç ´æï¼" label-width="220px" |
| | | prop="checkOuterPackaging"> |
| | | <el-input v-model="form.checkOuterPackaging" :disabled="currentStep !== 0" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç¸å
³éä»¶ï¼" prop="fileName"> |
| | | <el-input v-model="form.fileName" :style="`width: ${currentStep == 0 ? '88%' : '100%'};`" disabled |
| | | size="small"> |
| | | <el-button v-if="currentStep === 0" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile"></el-button> |
| | | </el-input> |
| | | <el-upload ref="upload" :action="action" :on-success="onSuccess" :show-file-list="false" |
| | | style="float: right;"> |
| | | <el-button v-if="currentStep === 0" slot="trigger" class="uploadFile" size="small" |
| | | style="position: relative;top: -4px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 0, message: 'è¯·éæ©ä¸ç¯è责任人', trigger: 'change' }]" label="ä¸ç¯è责任人ï¼" |
| | | prop="submitNextPesponsible"> |
| | | <el-select v-model="form.submitNextPesponsible" :disabled="currentStep !== 0" clearable filterable |
| | | placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" style="width: 50%;"> |
| | | <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 :rules="[{ required: currentStep === 0, message: '请è¾å
¥è®¾å¤å¼ç®±éªæ¶ç»è®º', trigger: 'change' }]" label="设å¤å¼ç®±éªæ¶ç»è®ºï¼" label-width="150px" |
| | | prop="unpackingAcceptanceConclusion"> |
| | | <el-radio-group v-model="form.unpackingAcceptanceConclusion" :disabled="currentStep !== 0"> |
| | | <el-radio :label="'0qualified'">åæ ¼</el-radio> |
| | | <el-radio :label="'1unqualified'">ä¸åæ ¼ï¼ç¼ºå°å¤ä»¶ä¾åºåè¡¥å</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div style="margin-bottom: 20px; width: 100%;"> |
| | | <label>å¤ä»¶ç¡®è®¤ï¼</label> |
| | | <el-button v-if="currentStep === 0" size="small" style="float: right;" |
| | | type="primary" @click="addTableRow('sparePartsConfirmationList')">å¢å è¡</el-button> |
| | | </div> |
| | | <el-table :data="form.sparePartsConfirmationList" border stripe style="width: 100%; min-height: 30vh"> |
| | | <el-table-column label="åºå·" prop="åºå·" type="index" width="80" /> |
| | | <el-table-column label="åç§°" min-width="120" prop="name"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 0" v-model="scope.row.name" size="small"></el-input> |
| | | <label v-else>{{ scope.row.name }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ°é" min-width="120" prop="number"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 0" v-model="scope.row.number" size="small"></el-input> |
| | | <label v-else>{{ scope.row.number }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="夿³¨" min-width="120" prop="note"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 0" v-model="scope.row.note" size="small"></el-input> |
| | | <label v-else>{{ scope.row.note }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="currentStep === 0" fixed="right" label="æä½" width="90"> |
| | | <template slot-scope="scope"> |
| | | <el-button icon="el-icon-delete" type="text" |
| | | @click="deleteRow(scope.$index, scope.row, 'sparePartsConfirmationList')">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div style="margin: 20px 0; width: 100%;"> |
| | | <label>æä»¶ç±»ç¡®è®¤ï¼</label> |
| | | <el-button v-if="currentStep === 0" size="small" style="float: right;" |
| | | type="primary" @click="addTableRow('fileClassConfirmationList')">å¢å è¡</el-button> |
| | | </div> |
| | | <el-table :data="form.fileClassConfirmationList" border stripe style="width: 100%; min-height: 30vh"> |
| | | <el-table-column label="åºå·" prop="åºå·" type="index" width="80" /> |
| | | <el-table-column label="åºæåæ°" min-width="120" prop="expectedCopies"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 0" v-model="scope.row.expectedCopies" size="small"></el-input> |
| | | <label v-else>{{ scope.row.expectedCopies }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å®é
æ¶å°åæ°" min-width="120" prop="actualCopies"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 0" v-model="scope.row.actualCopies" size="small"></el-input> |
| | | <label v-else>{{ scope.row.actualCopies }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="currentStep === 0" fixed="right" label="æä½" width="90"> |
| | | <template v-slot="scope"> |
| | | <el-button icon="el-icon-delete" type="text" |
| | | @click="deleteRow(scope.$index, scope.row, 'fileClassConfirmationList')">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-top: 10px;"> |
| | | <el-form-item label="夿³¨ï¼" label-width="90px"> |
| | | <el-input v-model="form.submitRemarks" :disabled="currentStep !== 0" size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.submitOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.submitDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-show="currentStepClick === 1"> |
| | | <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿 ¸æè§ï¼" prop="accidentDescription"> |
| | | <el-input v-model="form.unpackingReviewOpinion" :disabled="currentStep !== 1" size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 1, message: '请è¾å
¥ä¸ç¯è责任人', trigger: 'change' }]" label="ä¸ç¯è责任人ï¼" |
| | | prop="unpackingNextPesponsible"> |
| | | <el-select v-model="form.unpackingNextPesponsible" :disabled="currentStep !== 1" clearable filterable |
| | | placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" style="width: 50%;"> |
| | | <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-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.unpackingOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.unpackingDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-show="currentStepClick === 2"> |
| | | <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 2, message: '请è¾å
¥å®è£
ä½ç½®', trigger: 'blur' }]" label="å®è£
ä½ç½®ï¼" |
| | | prop="installLocation"> |
| | | <el-input v-model="form.installLocation" :disabled="currentStep !== 2" clearable placeholder="请è¾å
¥å®è£
ä½ç½®" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨ï¼"> |
| | | <el-input v-model="form.installRemarks" :disabled="currentStep !== 2" size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 2, message: '请è¾å
¥ä¸ç¯è责任人', trigger: 'blur' }]" label="ä¸ç¯è责任人ï¼" |
| | | prop="installNextPesponsible"> |
| | | <el-select v-model="form.installNextPesponsible" :disabled="currentStep !== 2" clearable filterable |
| | | placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" style="width: 50%;"> |
| | | <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="24"> |
| | | <div style="margin-bottom: 20px; width: 100%;"> |
| | | <label>å®è£
éªæ¶è®°å½</label> |
| | | <el-button v-if="currentStep === 2" size="small" style="float: right;" |
| | | type="primary" @click="addTableRow('installationAcceptanceRecordList')">å¢å è¡</el-button> |
| | | </div> |
| | | <el-table :data="form.installationAcceptanceRecordList" border stripe |
| | | style="width: 100%; min-height: 30vh"> |
| | | <el-table-column label="åºå·" prop="åºå·" type="index" width="80" /> |
| | | <el-table-column label="项ç®" min-width="120" prop="installationProject"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 2" v-model="scope.row.installationProject" |
| | | size="small"></el-input> |
| | | <label v-else>{{ scope.row.installationProject }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å®è£
æ
åµ" min-width="120" prop="installationSituation"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 2" v-model="scope.row.installationSituation" |
| | | size="small"></el-input> |
| | | <label v-else>{{ scope.row.installationSituation }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å®è£
宿" min-width="120" prop="installationCompleted"> |
| | | <template v-slot="scope"> |
| | | <el-select v-if="currentStep === 2" v-model="scope.row.installationCompleted" placeholder="è¯·éæ©"> |
| | | <el-option label="æ¯" value="0yes"></el-option> |
| | | <el-option label="å¦" value="1no"></el-option> |
| | | </el-select> |
| | | <label v-else>{{ scope.row.installationCompleted === '0yes' ? 'æ¯' : |
| | | scope.row.installationCompleted === '1no' ? 'å¦' : '' }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="currentStep === 2" fixed="right" label="æä½" width="90"> |
| | | <template slot-scope="scope"> |
| | | <el-button icon="el-icon-delete" type="text" |
| | | @click="deleteRow(scope.$index, scope.row, 'installationAcceptanceRecordList')">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.installOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.installDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-show="currentStepClick === 3"> |
| | | <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 3, message: '请è¾å
¥å¤åæè§', trigger: 'blur' }]" label="å¤åæè§ï¼" |
| | | prop="installationAcceptanceCompoundOpinion"> |
| | | <el-input v-model="form.installationAcceptanceCompoundOpinion" :disabled="currentStep !== 3" |
| | | size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 3, message: '请è¾å
¥ä¸ç¯èè´è´£äºº', trigger: 'change' }]" label="ä¸ç¯è责任人ï¼" |
| | | prop="installationAcceptanceNextPesponsible"> |
| | | <el-select v-model="form.installationAcceptanceNextPesponsible" :disabled="currentStep !== 3" clearable |
| | | filterable placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" style="width: 50%;"> |
| | | <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-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.installationAcceptanceOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.installationAcceptanceDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-show="currentStepClick === 4"> |
| | | <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;"> |
| | | <div style="margin-bottom: 20px; width: 100%;"> |
| | | <label>éªæ¶æ ¸æ¥è®°å½ï¼</label> |
| | | <el-button v-if="currentStep === 4" size="small" style="float: right;" |
| | | type="primary" @click="addTableRow('acceptanceCheckRecordList')">å¢å è¡</el-button> |
| | | </div> |
| | | <el-table :data="form.acceptanceCheckRecordList" border style="width: 100%; min-height: 30vh"> |
| | | <el-table-column label="åºå·" prop="sequence" width="80"> |
| | | </el-table-column> |
| | | <el-table-column label="ä»ªå¨æ¨¡å" min-width="120" prop="instrumentModule"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 4" v-model="scope.row.instrumentModule" size="small"></el-input> |
| | | <label v-else>{{ scope.row.instrumentModule }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ ¸æ¥åæ°" min-width="120" prop="verificationParameter"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 4" v-model="scope.row.verificationParameter" size="small"></el-input> |
| | | <label v-else>{{ scope.row.verificationParameter }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="坿¥æ¶é" min-width="120" prop="acceptableLimit"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 4" v-model="scope.row.acceptableLimit" size="small"></el-input> |
| | | <label v-else>{{ scope.row.acceptableLimit }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ ¸æ¥ç»æ" min-width="120" prop="verificationResult"> |
| | | <template v-slot="scope"> |
| | | <el-input v-if="currentStep === 4" v-model="scope.row.verificationResult" size="small"></el-input> |
| | | <label v-else>{{ scope.row.verificationResult }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ ¸æ¥ç»è®º" min-width="120" prop="verificationConclusion"> |
| | | <template v-slot="scope"> |
| | | <el-select v-if="currentStep === 4" v-model="scope.row.verificationConclusion" placeholder="è¯·éæ©"> |
| | | <el-option label="符å" value="0accordWith"></el-option> |
| | | <el-option label="ä¸ç¬¦å" value="1inconformity"></el-option> |
| | | </el-select> |
| | | <label v-else>{{ scope.row.verificationConclusion }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="currentStep === 4" fixed="right" label="æä½" width="90"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" |
| | | @click="deleteRow(scope.$index, scope.row, 'acceptanceCheckRecordList')">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-form-item :rules="[{ required: currentStep === 4, message: '请è¾å
¥è®¾å¤å¼ç®±éªæ¶ç»è®º', trigger: 'change' }]" label="设å¤å¼ç®±éªæ¶ç»è®ºï¼" |
| | | label-width="150px" prop="acceptanceCheckUnpackingConclusion"> |
| | | <el-radio-group v-model="form.acceptanceCheckUnpackingConclusion" :disabled="currentStep !== 4"> |
| | | <el-radio :label="'0qualified'">åæ ¼</el-radio> |
| | | <el-radio :label="'1unqualified'">ä¸åæ ¼ï¼ç¼ºå°å¤ä»¶ä¾åºåè¡¥å</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item :rules="[{ required: currentStep === 4, message: '请è¾å
¥ä¸ç¯è责任人', trigger: 'change' }]" label="ä¸ç¯è责任人ï¼" |
| | | prop="acceptanceCheckNextPesponsible"> |
| | | <el-select v-model="form.acceptanceCheckNextPesponsible" :disabled="currentStep !== 4" clearable |
| | | filterable placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" style="width: 50%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.value" :label="item.label" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.acceptanceCheckOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.acceptanceCheckDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-show="currentStepClick === 5"> |
| | | <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item :rules="[{ required: currentStep === 5, message: '请è¾å
¥å®¡æ ¸æè§', trigger: 'blur' }]" label="å®¡æ ¸æè§ï¼" |
| | | prop="acceptanceAuditAuditOpinion"> |
| | | <el-input v-model="form.acceptanceAuditAuditOpinion" :disabled="currentStep !== 5" size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.acceptanceAuditOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.acceptanceAuditDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="currentStep !== 0 && currentStep !== 6" @click="submitForm('3reject')">驳å</el-button> |
| | | <el-button v-if="currentStep === 0" @click="submitForm('2save')">ä¿å</el-button> |
| | | <el-button v-if="currentStep !== 6" type="primary" @click="submitForm('1submit')">{{ currentStep === 0 ? 'æäº¤' : |
| | | 'éè¿' |
| | | }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | <!-- æ¥åç¼è¾æ¡ --> |
| | | </template> |
| | | |
| | | <script> |
| | | import { dateFormat } from '@/utils/date' |
| | | import file from "@/utils/file"; |
| | | import { |
| | | deleteCNASFile, deleteIncidentReport, |
| | | deleteIncidentReportAll, getShowIncidentReport, incidentReportExport, incidentReportPage, |
| | | saveIncidentReportData, |
| | | selectDeviceByCode |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | //äºæ
设å¤ä¿¡æ¯ |
| | | tableDataAlist: [], // æ´æ¹åéåç§° |
| | | tableLoading: false, |
| | | dialogVisible: false, |
| | | rules: { |
| | | quantity: [{ required: true, message: '请è¾å
¥æ°é', trigger: 'blur' }], |
| | | }, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | currentStepClick: 0, // ç¹å»æ¥éª¤æ¡åå |
| | | steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£
éªæ¶æ£æ¥', 'å®è£
éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], |
| | | form: { |
| | | sparePartsConfirmationList: [], // å¤ä»¶ç¡®è®¤List |
| | | fileClassConfirmationList: [], // æä»¶ç¡®è®¤List |
| | | installationAcceptanceRecordList: [], // å®è£
éªæ¶è®°å½ |
| | | acceptanceCheckRecordList: [], // éªæ¶æ ¸æ¥è®°å½ |
| | | fileName: '', // æä»¶åç§° |
| | | systemFileName: '', // ç³»ç»æä»¶åç§° |
| | | }, |
| | | outLoading: false, |
| | | responsibleOptions: [], // ä¸ç¯èè´è´£äººlist |
| | | isUpdate: false, |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | processNumber: '', |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | }, |
| | | ...mapGetters(["nickName"]), |
| | | }, |
| | | mounted() { |
| | | // è·å设å¤äºæ
ä¿¡æ¯ |
| | | this.getDeviceAList(this.clickNodeVal.value); |
| | | window.excelClosed = this.closed |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.search.size = val |
| | | this.getDeviceAList(this.clickNodeVal.value); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val |
| | | this.getDeviceAList(this.clickNodeVal.value); |
| | | }, |
| | | deleteFile() { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteCNASFile({fileName: this.form.systemFileName}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿åï¼') |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | if (response.code == 200) { |
| | | // å¨ä¿åèµå¼æ°æä»¶ |
| | | this.form.fileName = file.name |
| | | this.form.systemFileName = response.data |
| | | } else { |
| | | this.$message.error(response.message) |
| | | } |
| | | }, |
| | | addTableRow(value) { |
| | | switch (value) { |
| | | // å¤ä»¶ç¡®è®¤ |
| | | case 'sparePartsConfirmationList': |
| | | const obj = Object.assign({ |
| | | name: '', |
| | | number: null, |
| | | note: '' |
| | | }) |
| | | this.form.sparePartsConfirmationList.push(obj) |
| | | break |
| | | // æä»¶ç¡®è®¤List |
| | | case 'fileClassConfirmationList': |
| | | const obj1 = Object.assign({ |
| | | expectedCopies: '', |
| | | actualCopies: '', |
| | | }) |
| | | this.form.fileClassConfirmationList.push(obj1) |
| | | break |
| | | // å®è£
éªæ¶è®°å½ |
| | | case 'installationAcceptanceRecordList': |
| | | const obj2 = Object.assign({ |
| | | installationProject: '', |
| | | installationSituation: '', |
| | | installationCompleted: '' |
| | | }) |
| | | this.form.installationAcceptanceRecordList.push(obj2) |
| | | break |
| | | // éªæ¶æ ¸æ¥è®°å½ |
| | | case 'acceptanceCheckRecordList': |
| | | const obj3 = Object.assign({ |
| | | instrumentModule: '', |
| | | verificationParameter: '', |
| | | acceptableLimit: '', |
| | | verificationResult: '', |
| | | verificationConclusion: '' |
| | | }) |
| | | this.form.acceptanceCheckRecordList.push(obj3) |
| | | default: |
| | | break |
| | | } |
| | | }, |
| | | deleteRow(index, row, type) { |
| | | switch (type) { |
| | | // å¤ä»¶ç¡®è®¤ |
| | | case 'sparePartsConfirmationList': |
| | | if (row.sparePartsId) { |
| | | deleteIncidentReportAll({sparePartsId: row.sparePartsId}).then(res => { }); |
| | | } |
| | | this.form.sparePartsConfirmationList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | break |
| | | // æä»¶ç¡®è®¤List |
| | | case 'fileClassConfirmationList': |
| | | if (row.fileId) { |
| | | deleteIncidentReportAll({fileId: row.fileId}).then(res => { }); |
| | | } |
| | | this.form.fileClassConfirmationList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | break |
| | | // å®è£
éªæ¶è®°å½ |
| | | case 'installationAcceptanceRecordList': |
| | | if (row.installId) { |
| | | deleteIncidentReportAll({installId: row.installId}).then(res => { }); |
| | | } |
| | | this.form.installationAcceptanceRecordList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | break |
| | | // éªæ¶æ ¸æ¥è®°å½ |
| | | case 'acceptanceCheckRecordList': |
| | | if (row.acceptanceCheckId) { |
| | | deleteIncidentReportAll({acceptanceCheckId: row.acceptanceCheckId}).then(res => { }); |
| | | } |
| | | this.form.acceptanceCheckRecordList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | default: |
| | | break |
| | | } |
| | | }, |
| | | choiceStep(index) { |
| | | this.currentStepClick = index |
| | | }, |
| | | openRecordAcceptance() { |
| | | // è·å设å¤åºç¡ä¿¡æ¯ |
| | | selectDeviceByCode({id: this.clickNodeVal.value}).then(res => { |
| | | this.form.deviceName = res.data.deviceName |
| | | this.form.manufacturer = res.data.manufacturer |
| | | this.form.specificationModel = res.data.specificationModel |
| | | this.form.managementNumber = res.data.managementNumber |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | }) |
| | | }); |
| | | // è·åè´è´£äººä¿¡æ¯ |
| | | this.getUserList() |
| | | }, |
| | | //æäº¤è¡¨å |
| | | async submitForm(saveState) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // ç»å½åç¯è设置åå»ºäººä¸æ¶é´ |
| | | const dateTime = dateFormat(new Date()) |
| | | // è·åå½åç¯èæä½äººä¸æ¥æ |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.submitOperatingPersonnel = this.nickName |
| | | this.form.submitDate = dateTime |
| | | break |
| | | case 1: |
| | | this.form.unpackingOperatingPersonnel = this.nickName |
| | | this.form.unpackingDate = dateTime |
| | | break |
| | | case 2: |
| | | this.form.installOperatingPersonnel = this.nickName |
| | | this.form.installDate = dateTime |
| | | break |
| | | case 3: |
| | | this.form.installationAcceptanceOperatingPersonnel = this.nickName |
| | | this.form.installationAcceptanceDate = dateTime |
| | | break |
| | | case 4: |
| | | this.form.acceptanceCheckOperatingPersonnel = this.nickName |
| | | this.form.acceptanceCheckDate = dateTime |
| | | break |
| | | case 5: |
| | | this.form.acceptanceAuditOperatingPersonnel = this.nickName |
| | | this.form.acceptanceAuditDate = dateTime |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | // è·åå½åç¯èè´è´£äºº |
| | | switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) { |
| | | case 0: |
| | | this.form.currentResponsible = this.form.submitNextPesponsible |
| | | break |
| | | case 1: |
| | | this.form.currentResponsible = this.form.unpackingNextPesponsible |
| | | break |
| | | case 2: |
| | | this.form.currentResponsible = this.form.installNextPesponsible |
| | | break |
| | | case 3: |
| | | this.form.currentResponsible = this.form.installationAcceptanceNextPesponsible |
| | | break |
| | | case 4: |
| | | this.form.currentResponsible = this.form.acceptanceCheckNextPesponsible |
| | | 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 === 6 ? 'å
³é' : this.steps[currentStepAction] |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | saveIncidentReportData(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.getDeviceAList(this.clickNodeVal.value); |
| | | this.dialogVisible = false |
| | | } |
| | | }) |
| | | } else { |
| | | let step = this.steps[this.currentStep] |
| | | this.$message.warning(step + ' æµç¨ä¸æå¿
填项æªå¡«ï¼'); |
| | | } |
| | | }); |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | resetSearch() { |
| | | this.search = { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | processNumber: '', |
| | | } |
| | | this.getDeviceAList(this.clickNodeVal.value); |
| | | }, |
| | | // è·å设å¤äºæ
ä¿¡æ¯(æ ¹æ®ä»vuexä¸è·åå°ç设å¤åç§°idè¿è¡æ°æ®æ¥è¯¢) |
| | | getDeviceAList(deviceId) { |
| | | this.tableLoading = true |
| | | incidentReportPage({deviceId: deviceId, size:this.search.size, current:this.search.current, processNumber: this.search.processNumber}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code == 200) { |
| | | this.tableDataAlist = res.data.records |
| | | this.search.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | //table äºä»¶å¤çå¼å§å¤ |
| | | // ä¸è½½éä»¶ |
| | | handleAttachmentClick(row) { |
| | | this.$download.saveAs(row.systemFileName, row.fileName) |
| | | }, |
| | | handleViewClick(row) { |
| | | getShowIncidentReport({id: row.id}).then(res => { |
| | | this.form = { ...res.data } |
| | | // å¦æç´¢å¼ä¸º6表示å
¨é¨éè¿ |
| | | this.currentStep = this.steps.indexOf(this.form.currentState) === -1 ? 6 : this.steps.indexOf(this.form.currentState) |
| | | this.currentStepClick = this.currentStep === 6 ? 0 : this.currentStep |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | }) |
| | | }) |
| | | this.dialogVisible = true |
| | | }, |
| | | handleDeleteClick(row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteIncidentReport({id: row.id}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getDeviceAList(this.clickNodeVal.value); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | //å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | incidentReportExport({deviceId: this.clickNodeVal.value}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '设å¤éªæ¶.xlsx') |
| | | }) |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | this.getDeviceAList(newVal.value); |
| | | } |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = { |
| | | sparePartsConfirmationList: [], // å¤ä»¶ç¡®è®¤List |
| | | fileClassConfirmationList: [], // æä»¶ç¡®è®¤List |
| | | installationAcceptanceRecordList: [], // å®è£
éªæ¶è®°å½ |
| | | acceptanceCheckRecordList: [], // éªæ¶æ ¸æ¥è®°å½ |
| | | fileName: '', // æä»¶åç§° |
| | | systemFileName: '', // ç³»ç»æä»¶åç§° |
| | | } |
| | | this.currentStep = 0 // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | this.currentStepClick = 0 // ç¹å»æ¥éª¤æ¡åå |
| | | this.$refs['form'].clearValidate() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | function downloadImage(url) { |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'attachment.jpg'; // æä»¶å |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-radio { |
| | | color: #606266; |
| | | font-weight: 500; |
| | | cursor: pointer; |
| | | margin-right: 0px; |
| | | width: 10em; |
| | | } |
| | | |
| | | .tables { |
| | | width: 100%; |
| | | height: calc(100vh - 17em); |
| | | } |
| | | |
| | | .search { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 40px; |
| | | } |
| | | |
| | | .search_label { |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 40%; |
| | | transform: translate(0, -50%); |
| | | /* text-align: right; */ |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .search_label { |
| | | /* width: 150px; */ |
| | | text-align: right; |
| | | padding-right: 10px; |
| | | } |
| | | |
| | | .search_input { |
| | | flex-grow: 1; |
| | | } |
| | | |
| | | .line { |
| | | width: 20px; |
| | | height: 1px; |
| | | background-color: #ccc; |
| | | display: inline-block; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .form .search_label { |
| | | width: 120px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- è®¾å¤æ ¸æ¥ --> |
| | | <template> |
| | | <div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" @click="calibrationMaintenance()">æ ¸æ¥é¡¹ç®ç»´æ¤</el-button> |
| | | <el-button size="small" type="primary" @click="add('add')">æ·»å æ ¸æ¥è®°å½</el-button> |
| | | <el-button size="small" type="primary" @click="downLoadPost">导åºExcel</el-button> |
| | | </div> |
| | | <div class="tables" style="margin-top: 16px;"> |
| | | <el-table :data="tableData" height="calc(100vh - 20em)"> |
| | | <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="150" prop="processNumber"></el-table-column> |
| | | <el-table-column label="æ ¸æ¥æºæ" min-width="150" prop="calibrationInstitution" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="æ ¸æ¥ç»è®º" min-width="150" prop="status"> |
| | | <template v-slot="scope"> |
| | | {{ scope.row.status === '0yes' ? 'åæ ¼' : scope.row.status === '1no' ? 'ä¸åæ ¼' : 'å
¶ä»' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ ¸æ¥è¯ä¹¦ç¼å·" min-width="150" prop="certificateSerialNumber"></el-table-column> |
| | | <el-table-column label="说æ" min-width="150" prop="remark" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="æ ¸æ¥æ¥æ" min-width="150" prop="calibrationDate"></el-table-column> |
| | | <el-table-column label="䏿¬¡æ ¸æ¥æ¥æ" min-width="150" prop="nextCalibrationDate"></el-table-column> |
| | | <el-table-column label="ç»è®°äºº" min-width="150" prop="createUser"></el-table-column> |
| | | <el-table-column label="ç»è®°æ¥æ" min-width="150" prop="createTime"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" min-width="150"> |
| | | <template #default="{ row }"> |
| | | <el-button size="small" type="text" @click="handleAttachmentClick(row)">éä»¶</el-button> |
| | | <el-button size="small" type="text" @click="handleViewClick('view', row)">æ¥ç</el-button> |
| | | <el-button size="small" type="text" @click="handleDeleteClick(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" style="margin-right: 5%;" |
| | | @size-change="handleSizeChange" @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | |
| | | <!-- æ ¡å项ç®ç»´æ¤ --> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible0" title="æ ¸æ¥é¡¹ç®ç»´æ¤" |
| | | top="5vh" width="70%"> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"><span class="line"></span><span>è®¾å¤æ ¸æ¥åæ°ç»´æ¤</span></span> |
| | | <el-button :loading="addCalibrateLoading" size="small" type="primary" @click="addCalibrate">æ·» å </el-button> |
| | | </h4> |
| | | <div> |
| | | <el-form ref="form0" :model="form0" :rules="form0Rules" |
| | | label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ¸æ¥åæ°:" prop="measurementParameter"> |
| | | <el-input v-model="form0.measurementParameter" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ¸æ¥èå´:" prop="rangeOfMeasurement"> |
| | | <el-input v-model="form0.rangeOfMeasurement" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æå¤§å
许误差:" prop="maxPermissibleError"> |
| | | <el-input v-model="form0.maxPermissibleError" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¤å®æ å:" prop="judgmentCriteria"> |
| | | <el-input v-model="form0.judgmentCriteria" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"><span class="line"></span><span>è®¾å¤æ ¸æ¥åæ°</span></span> |
| | | </h4> |
| | | <!-- è®¾å¤æ ¡ååæ°è¡¨æ ¼ --> |
| | | <el-table ref="calibrateTable" v-loading="calibrateParamsLoading" :data="calibrateParams" |
| | | max-height="450" |
| | | stripe style="width: 100%"> |
| | | <el-table-column label="ç¼å·" type="index" width="80"></el-table-column> |
| | | <el-table-column label="æ ¸æ¥åæ°" prop="measurementParameter"></el-table-column> |
| | | <el-table-column label="æ ¸æ¥èå´" prop="rangeOfMeasurement"></el-table-column> |
| | | <el-table-column label="æå¤§å
许误差" prop="maxPermissibleError"></el-table-column> |
| | | <el-table-column label="å¤å®æ å" prop="judgmentCriteria"></el-table-column> |
| | | <el-table-column label="å建人" prop="createdBy"></el-table-column> |
| | | <el-table-column label="å建æ¶é´" prop="creationTime"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <!-- æ·»å æ ¸æ¥è®°å½ --> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible1" title="æ ¸æ¥è®°å½" :before-close="handleClose" |
| | | top="5vh" |
| | | width="80%" @close="resetcalibrationRecord"> |
| | | <div class="dialog-content"> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"> |
| | | <span class="line"></span> |
| | | <span>æ·»å è®¾å¤æ ¸æ¥è®°å½</span> |
| | | </span> |
| | | </h4> |
| | | <el-form ref="calibrationRecord" :model="calibrationRecord" :rules="formRules" |
| | | label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ ¸æ¥äºº:" prop="unitOfMeasure"> |
| | | <el-input v-model="calibrationRecord.unitOfMeasure" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ ¸æ¥æ¥æ:" prop="calibrationDate"> |
| | | <el-date-picker v-model="calibrationRecord.calibrationDate" :disabled="operationType === 'view'" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 90%" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="䏿¬¡æ ¸æ¥æ¥æ:" label-width="140px" prop="nextCalibrationDate"> |
| | | <el-date-picker v-model="calibrationRecord.nextCalibrationDate" :disabled="operationType === 'view'" :picker-options="{ disabledDate: this.disabledDate }" |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 90%" type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ ¸æ¥å¨å
·:" prop="calculatingApparatus"> |
| | | <el-input v-model="calibrationRecord.calculatingApparatus" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ ¸æ¥æ åéç¨:" prop="standardRange"> |
| | | <el-input v-model="calibrationRecord.standardRange" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ ¸æ¥æ åä¸ç¡®å®åº¦:" label-width="140px" prop="calibrationStandardUncertainty"> |
| | | <el-input v-model="calibrationRecord.calibrationStandardUncertainty" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ ¸æ¥æå¯¼ä¹¦:" prop="byDocument"> |
| | | <el-input v-model="calibrationRecord.byDocument" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ£æ¥æ¥åç¼å·:" prop="certificateSerialNumber"> |
| | | <el-input v-model="calibrationRecord.certificateSerialNumber" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ ¸æ¥æ»ç»è®º:" label-width="140px" prop="status"> |
| | | <el-radio-group v-model="calibrationRecord.status" :disabled="operationType === 'view'"> |
| | | <el-radio label="0yes">åæ ¼</el-radio> |
| | | <el-radio label="1no">ä¸åæ ¼</el-radio> |
| | | <el-radio label="2other">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="23"> |
| | | <el-form-item label="éä»¶ï¼" prop="fileName"> |
| | | <el-input v-model="calibrationRecord.fileName" :style="`width: ${operationType === 'add' ? '90%' : '100%'};}`" disabled |
| | | size="small"> |
| | | <el-button v-if="operationType === 'add'" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile"></el-button> |
| | | </el-input> |
| | | <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" :headers="uploadHeader" |
| | | :limit="1" :on-error="onError" :on-success="handleSuccessUp" |
| | | :show-file-list="false" |
| | | style="float: right;"> |
| | | <el-button :loading="upLoading" size="small" style="position: relative; top: -4px;" |
| | | type="primary">éä»¶ä¸ä¼ |
| | | </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨:"> |
| | | <el-input v-model="calibrationRecord.remark" :disabled="operationType === 'view'" :rows="3" size="small" |
| | | style="width: 96%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"> |
| | | <span class="line"></span><span>æ ¸æ¥æ¡ç®ç¡®è®¤ç»æ</span> |
| | | </span> |
| | | </h4> |
| | | <el-table ref="calibrateTable" :data="calibrateParams" stripe style="width: 100%;"> |
| | | <el-table-column label="ç¼å·" type="index" width="80"></el-table-column> |
| | | <el-table-column label="æ ¸æ¥åæ°" prop="measurementParameter" width="150"></el-table-column> |
| | | <el-table-column label="æ ¸æ¥èå´" prop="rangeOfMeasurement" width="150"></el-table-column> |
| | | <el-table-column label="æå¤§å
许误差" prop="maxPermissibleError" width="150"></el-table-column> |
| | | <el-table-column label="å¤å®æ å" prop="judgmentCriteria" width="150"></el-table-column> |
| | | <el-table-column label="æ¯å¦æ ¸æ¥" prop="isCalibration"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <span class="required-span">* </span>æ¯å¦æ ¸æ¥ |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <el-radio-group v-model="scope.row.isCalibration" :disabled="operationType === 'view'"> |
| | | <el-radio label="0yes">æ¯</el-radio> |
| | | <el-radio label="1no">å¦</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤å®ç»æ" prop="result"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <span class="required-span">* </span>å¤å®ç»æ |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <el-radio-group v-model="scope.row.result" :disabled="operationType === 'view'" @input="checkRadio()"> |
| | | <el-radio label="0yes">åæ ¼</el-radio> |
| | | <el-radio label="1no">ä¸åæ ¼</el-radio> |
| | | <el-radio label="2other">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åé¡¹ç»æè¯´æ" prop="singleResultStatement"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.singleResultStatement" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer" style="float: right;margin-top: 10px"> |
| | | <el-button v-if="operationType === 'add'" @click="handleClose">å æ¶</el-button> |
| | | <el-button v-if="operationType === 'add'" type="primary" @click="addRecord">ç¡® å®</el-button> |
| | | </span> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import file from '@/utils/file'; |
| | | import { mapGetters } from "vuex"; |
| | | import { |
| | | addOrUpdateDeviceMetricRecord, deleteCNASFile, deleteDeviceMetricRecord, deleteDeviceMetrics, |
| | | deviceMetricRecordExport, |
| | | deviceMetricRecordPage, |
| | | saveOrUpdateDeviceMetric, |
| | | selectDeviceMetric, showDeviceMetricsCopy |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | export default { |
| | | components: {}, |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | calibrateParamsLoading: false, |
| | | addCalibrateLoading: false, |
| | | form0: { |
| | | measurementParameter: '', // 计éåæ° |
| | | rangeOfMeasurement: '', |
| | | maxPermissibleError: '', |
| | | judgmentCriteria: '', |
| | | createdBy: '', |
| | | action: '', |
| | | deviceId: null |
| | | }, |
| | | form0Rules: { |
| | | measurementParameter: [ |
| | | { required: true, message: '请è¾å
¥è®¡éåæ°', trigger: 'blur' } |
| | | ], |
| | | rangeOfMeasurement: [ |
| | | { required: true, message: '请è¾å
¥éç¨èå´', trigger: 'blur' } |
| | | ], |
| | | maxPermissibleError: [ |
| | | { required: true, message: '请è¾å
¥æå¤§å
许误差', trigger: 'blur' } |
| | | ], |
| | | judgmentCriteria: [ |
| | | { required: true, message: '请è¾å
¥å¤å®æ å', trigger: 'blur' } |
| | | ], |
| | | }, |
| | | dialogVisible0: false, |
| | | calibrationRecord: { |
| | | unitOfMeasure: '', // æ ¸æ¥äºº |
| | | calibrationDate: '', // æ ¸æ¥æ¥æ |
| | | nextCalibrationDate: '', // 䏿¬¡æ ¸æ¥æ¥æ |
| | | calculatingApparatus: '', // æ ¸æ¥å¨å
· |
| | | standardRange: '', // æ ¸æ¥æ åéç¨ |
| | | calibrationStandardUncertainty: '', // æ ¸æ¥æ åä¸ç¡®å®åº¦ |
| | | byDocument: '', // æ ¸æ¥æå¯¼ä¹¦ |
| | | certificateSerialNumber: '', // æ£æ¥æ¥åæå¯¼ä¹¦ |
| | | fileName: '', // éä»¶ |
| | | status: '', // æ ¸æ¥æ»ç»è®º |
| | | remark: '', // 夿³¨ |
| | | }, |
| | | formRules: { |
| | | unitOfMeasure: [{ required: true, message: '请è¾å
¥æ ¸æ¥äºº', trigger: 'blur' }], |
| | | calibrationDate: [{ required: true, message: 'è¯·éæ©æ ¸æ¥æ¥æ', trigger: 'change' }], |
| | | nextCalibrationDate: [{ required: true, message: 'è¯·éæ©ä¸æ¬¡æ ¸æ¥æ¥æ', trigger: 'change' }], |
| | | calculatingApparatus: [{ required: true, message: '请è¾å
¥æ ¸æ¥å¨å
·', trigger: 'blur' }], |
| | | standardRange: [{ required: true, message: '请è¾å
¥æ ¸æ¥æ åéç¨', trigger: 'blur' }], |
| | | calibrationStandardUncertainty: [{ required: true, message: '请è¾å
¥æ ¸æ¥æ åä¸ç¡®å®åº¦', trigger: 'blur' }], |
| | | byDocument: [{ required: true, message: '请è¾å
¥æ ¸æ¥æå¯¼ä¹¦', trigger: 'blur' }], |
| | | certificateSerialNumber: [{ required: true, message: '请è¾å
¥æ£æ¥æ¥åæå¯¼ä¹¦', trigger: 'blur' }], |
| | | status: [{ required: true, message: 'è¯·éæ©æ ¸æ¥æ»ç»è®º', trigger: 'change' }] |
| | | }, |
| | | calibrateParams: [], |
| | | tableData: [], |
| | | operationType: '', |
| | | dialogVisible1: false, |
| | | formData: { |
| | | person: '', |
| | | data1: '', |
| | | name: '', |
| | | }, |
| | | upLoading: false |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableList(this.clickNodeVal.value) // è·åè®¾å¤æ ¸æ¥åè¡¨æ°æ® |
| | | }, |
| | | methods: { |
| | | //ç¶æå¤å® |
| | | checkRadio() { |
| | | let resultList = this.calibrateParams.map(ele => ele.result) |
| | | if (resultList && resultList.filter(ele => ele == '1no').length > 0) { |
| | | this.calibrationRecord.status = '1no' |
| | | } else if (resultList && resultList.filter(ele => ele == '2other').length == resultList.length) { |
| | | this.calibrationRecord.status = '2other' |
| | | } else if (resultList && resultList.filter(ele => ele == '0yes').length == resultList.length) { |
| | | this.calibrationRecord.status = '0yes' |
| | | } |
| | | }, |
| | | //䏿¬¡æ ¸æ¥æ¥æ:ç¦ç¨å¨æ ¸æ¥æ¥æåçæ¥æ |
| | | disabledDate(time) { |
| | | let selectDate = this.calibrationRecord.calibrationDate |
| | | if (selectDate) { |
| | | let oldDate = new Date(selectDate) |
| | | return time <= oldDate.getTime() |
| | | } |
| | | return false |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val |
| | | this.getTableList(this.clickNodeVal.value); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val |
| | | this.getTableList(this.clickNodeVal.value); |
| | | }, |
| | | // è·åè®¾å¤æ ¡ååæ°tableä¿¡æ¯ |
| | | async getXmsg() { |
| | | this.calibrateParamsLoading = true |
| | | try { |
| | | await selectDeviceMetric({deviceId: this.clickNodeVal.value, type: 'examine'}).then(res => { |
| | | if (res.code == 200) { |
| | | this.calibrateParams = res.data |
| | | } |
| | | this.calibrateParamsLoading = false |
| | | }) |
| | | } catch (e) { |
| | | this.calibrateParamsLoading = false |
| | | } |
| | | }, |
| | | // æ ¡å项ç®ç»´æ¤ |
| | | calibrationMaintenance() { |
| | | this.dialogVisible0 = true |
| | | this.getXmsg(); |
| | | }, |
| | | addCalibrate() { |
| | | this.$refs['form0'].validate((valid) => { |
| | | if (valid) { |
| | | // ä¿å |
| | | this.calibrateParamsLoading = true |
| | | this.addCalibrateLoading = true |
| | | this.form0.deviceId = this.clickNodeVal.value; |
| | | this.form0.createdBy = this.nickName; |
| | | this.form0.type = 'examine' |
| | | saveOrUpdateDeviceMetric(this.form0).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('ä¿åæå') |
| | | this.$refs['form0'].resetFields() |
| | | this.getXmsg() // å·æ°è®¾å¤æ ¡ååæ°è¡¨æ ¼ |
| | | } |
| | | this.calibrateParamsLoading = false |
| | | this.addCalibrateLoading = false |
| | | }) |
| | | } else { |
| | | this.addCalibrateLoading = false |
| | | this.$message.warning('æå¿
填项æªå¡«'); |
| | | } |
| | | }) |
| | | }, |
| | | // æ¥è¯¢è®¾å¤æ ¸æ¥å表 |
| | | getTableList(deviceId) { |
| | | deviceMetricRecordPage({deviceId: deviceId, size: this.search.size, current: this.search.current, type: 'examine'}).then(res => { |
| | | this.tableData = res.data.records |
| | | this.search.total = res.data.total |
| | | }) |
| | | }, |
| | | // æäº¤è¦æ·»å çè®°å½ |
| | | addRecord() { |
| | | this.$refs['calibrationRecord'].validate((valid) => { |
| | | if (valid) { |
| | | try { |
| | | if (this.calibrateParams.some(m => m.isCalibration === undefined)) { |
| | | this.$message.error('è¯·éæ©æ¯å¦æ ¸æ¥') |
| | | return |
| | | } |
| | | if (!this.calibrateParams.every(m => m.result !== undefined)) { |
| | | this.$message.error('è¯·éæ©å¤å®ç»æ') |
| | | return |
| | | } |
| | | this.addRecordLoading = true |
| | | this.calibrationRecord.deviceId = this.clickNodeVal.value; |
| | | this.calibrationRecord.createUser = this.nickName |
| | | this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams |
| | | this.calibrationRecord.deviceMetricsCopyList.forEach(ele => { |
| | | delete ele.creationTime |
| | | }) |
| | | this.calibrationRecord.type = 'examine' |
| | | addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æ·»å æå') |
| | | this.dialogVisible1 = false |
| | | this.getTableList(this.clickNodeVal.value) |
| | | } |
| | | this.addRecordLoading = false |
| | | }) |
| | | } catch (e) { |
| | | console.log('addRecord---', e) |
| | | this.addRecordLoading = false |
| | | } |
| | | } else { |
| | | this.$message.warning('æå¿
填项æªå¡«'); |
| | | } |
| | | }) |
| | | }, |
| | | handleClose(done) { |
| | | this. calibrationRecord = { |
| | | unitOfMeasure: '', // æ ¸æ¥äºº |
| | | calibrationDate: '', // æ ¸æ¥æ¥æ |
| | | nextCalibrationDate: '', // 䏿¬¡æ ¸æ¥æ¥æ |
| | | calculatingApparatus: '', // æ ¸æ¥å¨å
· |
| | | standardRange: '', // æ ¸æ¥æ åéç¨ |
| | | calibrationStandardUncertainty: '', // æ ¸æ¥æ åä¸ç¡®å®åº¦ |
| | | byDocument: '', // æ ¸æ¥æå¯¼ä¹¦ |
| | | certificateSerialNumber: '', // æ£æ¥æ¥åæå¯¼ä¹¦ |
| | | fileName: '', // éä»¶ |
| | | status: '', // æ ¸æ¥æ»ç»è®º |
| | | remark: '', // 夿³¨ |
| | | } |
| | | this.dialogVisible1 = false |
| | | }, |
| | | resetcalibrationRecord() { |
| | | this.$refs.calibrationRecord.resetFields() |
| | | }, |
| | | // éä»¶ä¸ä¼ |
| | | handleSuccessUp(response, file) { |
| | | if (response.code == 200) { |
| | | // å¨ä¿åèµå¼æ°æä»¶ |
| | | this.calibrationRecord.fileName = file.name |
| | | this.calibrationRecord.systemFileName = response.data |
| | | this.upLoading = false; |
| | | } else { |
| | | this.$message.error(response.message) |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | deleteFile() { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteCNASFile({fileName: this.form.systemFileName}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿åï¼') |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // end |
| | | handleAttachmentClick(row) { |
| | | this.$download.saveAs(row.systemFileName, row.fileName) |
| | | }, |
| | | // æ·»å æ ¸æ¥è®°å½ |
| | | add(type) { |
| | | this.operationType = type |
| | | this.dialogVisible1 = true |
| | | this.getXmsg() |
| | | }, |
| | | // æ¥ç详æ
|
| | | handleViewClick(type, row) { |
| | | showDeviceMetricsCopy({id: row.id, type: 'examine'}).then(res => { |
| | | this.calibrateParams = res.data |
| | | }) |
| | | this.calibrationRecord = { ...row } |
| | | this.operationType = type |
| | | this.dialogVisible1 = true |
| | | }, |
| | | |
| | | // è¡¨æ ¼å é¤æä½ |
| | | handleDeleteClick(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteDeviceMetricRecord({id: row.id}).then(res => { |
| | | this.getTableList(this.clickNodeVal.value) // è·åè®¾å¤æ ¡ååè¡¨æ°æ® |
| | | this.$message.success('å 餿åï¼') |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteDeviceMetrics({id: row.id}).then(res => { |
| | | this.getXmsg(); |
| | | this.$message.success('å 餿åï¼') |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }) |
| | | }, |
| | | downLoadPost() { |
| | | this.outLoading = true |
| | | deviceMetricRecordExport({deviceId: this.clickNodeVal.value}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'è®¾å¤æ ¸æ¥.xlsx') |
| | | }) |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | this.getTableList(newVal.value); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | |
| | | function downloadImage(url, name) { |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = name; // æä»¶å |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .dialog-content { |
| | | max-height: 70vh; |
| | | /* 设置æå¤§é«åº¦ */ |
| | | overflow-y: auto; |
| | | /* å¯ç¨åç´æ»å¨ */ |
| | | } |
| | | |
| | | .tables { |
| | | width: 100%; |
| | | height: calc(100vh - 230px); |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 40px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .btns { |
| | | text-align: right; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | h4 { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | h4 .line { |
| | | display: inline-block; |
| | | width: 3px; |
| | | height: 16px; |
| | | background: #3A7BFA; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .check { |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .check_thing { |
| | | flex: 0 0 calc(20% - 10px); |
| | | margin-bottom: 20px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | |
| | | .check_label { |
| | | font-size: 14px; |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .check_data .check_input { |
| | | width: 100%; |
| | | } |
| | | |
| | | .el-table { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | |
| | | .el-table thead { |
| | | background-color: #f5f5f5; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- è®¾å¤æ»è§ --> |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 50px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: left; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100vh - 17em); |
| | | /* padding: 10px; */ |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .card { |
| | | list-style-type: none; |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fit, 380px); |
| | | justify-content: start; |
| | | grid-gap: 16px; |
| | | min-height: 300px; |
| | | } |
| | | |
| | | .card li { |
| | | width: 380px; |
| | | height: 165px; |
| | | border-radius: 8px 8px 8px 8px; |
| | | border: 1px solid #EEEEEE; |
| | | margin: 0 !important; |
| | | display: flex; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | padding: 16px; |
| | | font-size: 14px; |
| | | color: #666666; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .card li .img { |
| | | width: 114px; |
| | | height: 114px; |
| | | border-radius: 16px; |
| | | margin-right: 24px; |
| | | } |
| | | |
| | | .list-left .list-left-info { |
| | | line-height: 36px; |
| | | display: flex; |
| | | } |
| | | |
| | | .text-truncate { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap |
| | | } |
| | | |
| | | .circles { |
| | | position: absolute; |
| | | width: 70px; |
| | | height: 70px; |
| | | right: 0; |
| | | top: 0; |
| | | z-index: 0; |
| | | } |
| | | |
| | | .circles .circle { |
| | | border-radius: 50%; |
| | | opacity: 0.2; |
| | | } |
| | | |
| | | .circle0, |
| | | .circle1, |
| | | .circle2 { |
| | | width: 60px; |
| | | height: 60px; |
| | | position: absolute; |
| | | } |
| | | |
| | | .circle3 { |
| | | width: 16px; |
| | | height: 16px; |
| | | position: absolute; |
| | | } |
| | | |
| | | .circle0 { |
| | | bottom: 6px; |
| | | left: 0; |
| | | } |
| | | |
| | | .circle1 { |
| | | bottom: 0; |
| | | right: -30px; |
| | | } |
| | | |
| | | .circle2 { |
| | | left: 0; |
| | | top: -30px; |
| | | } |
| | | |
| | | .circle3 { |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | .success .circle { |
| | | background: #34BD66; |
| | | } |
| | | |
| | | .danger .circle { |
| | | background: #FF3838; |
| | | } |
| | | |
| | | .warning .circle { |
| | | background: #FBB247; |
| | | } |
| | | .info .circle { |
| | | background: #909399; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="role_manage"> |
| | | <div style="margin-top: 10px"> |
| | | <el-form :model="entity" inline label-position="right"> |
| | | <el-form-item label="ç¶æ:"> |
| | | <el-select v-model="entity.deviceStatus" placeholder="å
¨é¨" size="small" clearable> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤åç§°:"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="entity.deviceName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" |
| | | @click="currentPage = 1, keyMap = {}, list = [], finishLoding = false, refreshTable()">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table" v-loading="loading"> |
| | | <scroll-pagination @load="refreshTable()" :finishLoding="finishLoding" :list="list" |
| | | v-if="list.length > 0 || loading"> |
| | | <ul class="card"> |
| | | <li v-for="(m, i) in list" :key="i"> |
| | | <el-image class="img" :src="javaApi + '/img/' + m.imageUpload"> |
| | | <div slot="error" class="image-error" style="width: 112px; |
| | | height: 112px; |
| | | border-radius: 16px; |
| | | 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="list-left"> |
| | | <div class="list-left-info"> |
| | | <span class="label">设å¤åç§°ï¼</span> |
| | | <span style="color:#3A7BFA; |
| | | font-size: 16px; |
| | | display: inline-block; |
| | | width: 129px; |
| | | word-break: break-all;" class="text-truncate" :title="m.deviceName">{{ m.deviceName ? m.deviceName : 'æ ' }}</span> |
| | | </div> |
| | | <div class="list-left-info"> |
| | | <span class="label">è§æ ¼åå·ï¼</span> |
| | | <span style="color:#333333;font-size: 16px;">{{ m.specificationModel ? m.specificationModel : 'æ ' |
| | | }}</span> |
| | | </div> |
| | | <div class="list-left-info"> |
| | | <span class="label">ç¶æï¼</span> |
| | | <el-tag :type="m.type" v-if="m.deviceStatusName">{{ m.deviceStatusName }}</el-tag> |
| | | <span v-else style="color:#333333;font-size: 16px;">æ </span> |
| | | </div> |
| | | </div> |
| | | <div class="circles" :class="m.type"> |
| | | <div class="circle0 circle"></div> |
| | | <div class="circle1 circle"></div> |
| | | <div class="circle2 circle"></div> |
| | | <div class="circle3 circle"></div> |
| | | </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 {selectDeviceParameter} from "@/api/cnas/resourceDemand/device"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | ScrollPagination |
| | | }, |
| | | data() { |
| | | return { |
| | | entity: { |
| | | deviceStatus: null, |
| | | deviceName: null, |
| | | }, |
| | | options: [], |
| | | list: [], |
| | | currentPage: 1, // å½å页 |
| | | pageSize: 16, // ä¸é¡µ16æ¡ |
| | | total: '', |
| | | loading: true, // ç»ä»¶loadingçå±ç¤º,é»è®¤ä¸ºtrue |
| | | finishLoding: false, // å è½½å®æï¼æ¾ç¤ºå·²ç»æ²¡ææ´å¤äº |
| | | keyMap: {}, |
| | | laboratoryNameIsNull: false, |
| | | } |
| | | }, |
| | | created() { |
| | | this.selectEnumByCategory() |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.clickSidebar(this.clickNodeVal) |
| | | }, |
| | | 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 |
| | | } |
| | | if(this.list.length==0){ |
| | | this.finishLoding = false; |
| | | } |
| | | selectDeviceParameter({ |
| | | laboratoryNameIsNull: this.laboratoryNameIsNull, |
| | | current: this.currentPage, |
| | | size: this.pageSize, |
| | | ...this.entity |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.total = res.data.total |
| | | let list = res.data.records.map(m => { |
| | | switch (m.deviceStatus) { |
| | | case 0: |
| | | // æ£å¸¸ |
| | | m.type = 'success' |
| | | break; |
| | | case 1: |
| | | // ç»´ä¿® |
| | | m.type = 'warning' |
| | | break; |
| | | case 2: |
| | | // åç¨ |
| | | m.type = 'danger' |
| | | break; |
| | | case 3: |
| | | // æ¥åº |
| | | m.type = 'info' |
| | | break; |
| | | } |
| | | this.options.forEach(j => { |
| | | if (m.deviceStatus == j.value) { |
| | | m.deviceStatusName = j.label |
| | | } |
| | | }) |
| | | return m; |
| | | }) |
| | | 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 |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | refresh() { |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.finishLoding = false; |
| | | this.entity = { |
| | | deviceStatus: null, |
| | | deviceName: null, |
| | | orderBy: { field: "id", order: "asc" } |
| | | }; |
| | | this.refreshTable() |
| | | }, |
| | | // è·ååå
¸ |
| | | selectEnumByCategory() { |
| | | // 设å¤ç¶æ |
| | | this.getDicts("device_status").then((response) => { |
| | | this.options = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // ç¹å»ä¾§è¾¹æ å·æ° |
| | | clickSidebar(clickNodeVal) { |
| | | this.laboratoryNameIsNull = false |
| | | // æ¯å¦åå¨valueï¼åå¨value代表为ä¸çº§ |
| | | if (!clickNodeVal.value) { |
| | | this.finishLoding = false; |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.entity.laboratoryName = null |
| | | this.entity.storagePoint = null |
| | | // çäº1代表为æ çä¸çº§ï¼label为é¨é¨ |
| | | if (clickNodeVal.label == 'å
¶ä»') { |
| | | this.laboratoryNameIsNull = true |
| | | this.refreshTable(); |
| | | return |
| | | } |
| | | if (clickNodeVal.level == 1) { |
| | | this.entity.laboratoryName = clickNodeVal.label |
| | | // çäºäºçº§ãlabel为åå¨å°ç¹ |
| | | } else if (clickNodeVal.level == 2) { |
| | | // å
¶ä»è¡¨ç¤ºæ²¡æé
ç½®å®éªå®¤ï¼åªé
ç½®äºå°ç¹ |
| | | if (clickNodeVal.parent.label == 'å
¶ä»') { |
| | | this.laboratoryNameIsNull = true |
| | | } else { |
| | | this.entity.laboratoryName = clickNodeVal.parent.label |
| | | } |
| | | this.entity.storagePoint = clickNodeVal.label |
| | | } |
| | | this.refreshTable(); |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | this.clickSidebar(newVal) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div> |
| | | <div style="margin: 10px 0;text-align: right"> |
| | | <el-button size="small" type="primary" @click="handleForm('add')">æ°å¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-table ref="yearTable" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData" |
| | | height="calc(100vh - 18em)" style="width: 100% ;"> |
| | | <!-- è¡¨æ ¼å --> |
| | | <el-table-column align="center" header-align="center" label="åºå·" prop="prop" type="index" |
| | | width="70"></el-table-column> |
| | | <el-table-column label="å°è´§æ¥æ" min-width="150" prop="arrivalDate"></el-table-column> |
| | | <el-table-column label="éé¢" min-width="100" prop="goldAmount"></el-table-column> |
| | | <el-table-column label="ç»´ä¿®åä½" min-width="150" prop="maintenanceunit"></el-table-column> |
| | | <!-- æä½æé® --> |
| | | <el-table-column align="center" label="æä½" min-width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="handleForm('edit', scope.row.acceptanceId)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" @click="handleForm('view', scope.row.acceptanceId)">æ¥ç</el-button> |
| | | <el-button size="small" type="text" @click="record(scope.row)">éä»¶</el-button> |
| | | <el-button size="small" type="text" @click="handleDownOne(scope.row.acceptanceId)">导åº</el-button> |
| | | <el-button size="small" style="color: #f56c6c" type="text" |
| | | @click="deleteFun(scope.row.acceptanceId)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="pagination1.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <acceptance-form v-if="applicationForm" ref="applicationForm" @closeDialog="closeDialog"></acceptance-form> |
| | | <!--ä¸ä¼ æ¥å--> |
| | | <el-dialog :visible.sync="filesDialogVisible" title="éä»¶" width="80%" @closed="closeFilesLook"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-upload ref='upload' :action="fileAction" :auto-upload="true" :before-upload="fileBeforeUpload" |
| | | :data="{ acceptanceId: acceptanceId }" :headers="uploadHeader" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> |
| | | <el-button size="small" style="height: 38px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <div> |
| | | <limsTable ref="yearTable" :column="columnData" :height="'calc(100vh - 30em)'" :highlightCurrentRow="true" |
| | | :table-data="tableData" :table-loading="tableLoading" style="margin-top: 0.5em;" :page="pagination1"> |
| | | </limsTable> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="fileUrl" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AcceptanceForm from "./acceptanceForm.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { |
| | | pageDeviceAcceptance, |
| | | getDeviceAcceptanceFileList, |
| | | delDeviceAcceptanceFileList, |
| | | exportDeviceAcceptance, |
| | | delDeviceAcceptance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | name: "equipment-acceptance", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { filePreview, limsTable, AcceptanceForm }, |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | pagination1: { |
| | | size: 10, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | yearTableDetailDataLoading: false, |
| | | yearTableDetailData: [], |
| | | applicationForm: false, |
| | | filesDialogVisible: false, |
| | | columnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '100', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'é¢è§', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleLook(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.upload(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delete(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | acceptanceId: '', // ä¸ä¼ éä»¶å½åè¡çid |
| | | currentInfo: {}, |
| | | lookDialogVisible: false, |
| | | fileUrl: '' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getYearTableDetailData(this.clickNodeVal.value) |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢ |
| | | getYearTableDetailData(deviceId) { |
| | | this.yearTableDetailDataLoading = true |
| | | pageDeviceAcceptance({ |
| | | current: this.pagination1.current, |
| | | size: this.pagination1.size, |
| | | deviceId: deviceId, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.yearTableDetailData = res.data.records |
| | | this.pagination1.total = res.data.total |
| | | } |
| | | this.yearTableDetailDataLoading = false |
| | | }).catch(err => { |
| | | this.yearTableDetailDataLoading = false |
| | | }) |
| | | }, |
| | | handleForm(type, id) { |
| | | this.applicationForm = true |
| | | this.$nextTick(() => { |
| | | this.$refs.applicationForm.openDialog(type, id, this.clickNodeVal.value) |
| | | }) |
| | | }, |
| | | closeDialog() { |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData(this.clickNodeVal.value) |
| | | }, |
| | | // æå¼æ¥åå¼¹æ¡ |
| | | record(row) { |
| | | this.filesDialogVisible = true |
| | | this.acceptanceId = row.acceptanceId |
| | | this.searchTableList() |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList() { |
| | | this.tableLoading = true |
| | | getDeviceAcceptanceFileList({ acceptanceId: this.acceptanceId }).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row) { |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | const state = /\.(jpg|jpeg|png|gif)$/i.test(this.currentInfo.fileUrl) |
| | | if (state) { |
| | | this.fileUrl = this.javaApi + '/img/' + this.currentInfo.fileUrl |
| | | } else { |
| | | this.fileUrl = this.javaApi + '/word/' + this.currentInfo.fileUrl |
| | | } |
| | | }, |
| | | // ä¸è½½ |
| | | upload(row) { |
| | | this.$download.saveAs(row.fileUrl, row.fileName) |
| | | }, |
| | | // å é¤ |
| | | delete(row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delDeviceAcceptanceFileList({ acceptanceFileId: row.acceptanceFileId }).then(res => { |
| | | this.tableLoading = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // ä¸ä¼ éä»¶ |
| | | fileBeforeUpload(file) { |
| | | let flag = true |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | flag = false |
| | | } |
| | | if (!flag) { |
| | | return Promise.reject(flag); //æ£ç¡®çç»æ¢ |
| | | } |
| | | }, |
| | | onError(err, file, fileList, type) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response,) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.searchTableList() |
| | | } |
| | | }, |
| | | closeFilesLook() { |
| | | this.filesDialogVisible = false |
| | | }, |
| | | // å页 |
| | | handleSizeChange1(val) { |
| | | this.pagination1.size = val |
| | | this.getYearTableDetailData(this.clickNodeVal.value) |
| | | }, |
| | | // å页 |
| | | handleCurrentChange1(val) { |
| | | this.pagination1.current = val |
| | | this.getYearTableDetailData(this.clickNodeVal.value) |
| | | }, |
| | | // å¯¼åº |
| | | handleDownOne(id) { |
| | | this.outLoading = true |
| | | exportDeviceAcceptance({ acceptanceId: id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '设å¤éªæ¶.doc') |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | deleteFun(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delDeviceAcceptance({ acceptanceId: id }).then(res => { |
| | | this.$message.success('å 餿åï¼'); |
| | | this.getYearTableDetailData(this.clickNodeVal.value); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | this.getYearTableDetailData(newVal.value); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | fileAction() { |
| | | return this.javaApi + '/deviceAcceptance/uploadDeviceAcceptanceFile' |
| | | |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .title-search { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 10px 0; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- è®¾å¤æ
é --> |
| | | <template> |
| | | <div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æµç¨ç¼å·ï¼</div> |
| | | <div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="search.processNumber" style="width: 100%;" |
| | | @keyup.enter.native="getTableList(clickNodeVal.value)"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="resetSearch">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="getTableList(clickNodeVal.value)">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true, addRecode()">æ°å»º</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="tables" style="margin-top: 16px;"> |
| | | <el-table :data="faultParam" style="width: 100%" height="calc(100vh - 20em)"> |
| | | <!-- è¡¨æ ¼å --> |
| | | <el-table-column header-align="center" align="center" width="70" prop="prop" label="åºå·" |
| | | type="index"></el-table-column> |
| | | <el-table-column prop="processNumber" label="æµç¨ç¼å·" min-width="180"></el-table-column> |
| | | <el-table-column prop="deviceName" label="设å¤åç§°" min-width="150"></el-table-column> |
| | | <el-table-column prop="managementNumber" label="ç»ä¸ç¼å·" min-width="150"></el-table-column> |
| | | <el-table-column prop="faultSituation" label="æ
éæ
åµ" min-width="130"></el-table-column> |
| | | <el-table-column prop="submitPerson" label="æäº¤äºº" min-width="130"></el-table-column> |
| | | <el-table-column prop="createTime" label="æäº¤æ¥æ" min-width="150"></el-table-column> |
| | | <el-table-column prop="currentState" label="å½åç¶æ" min-width="130"></el-table-column> |
| | | <el-table-column prop="currentResponsible" label="å½å责任人" width="180"></el-table-column> |
| | | <!-- æä½æé® --> |
| | | <el-table-column label="æä½" fixed="right" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="showDetailsDialog(scope.row)">æ¥ç详æ
</el-button> |
| | | <el-button type="text" size="small" @click="handleDeleteClick(scope.$index, scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" |
| | | style="margin-right: 5%;" :page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" |
| | | layout="->,total, sizes, prev, pager, next, jumper" :total="search.total"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="æ°å¢ç»´ä¿®è®°å½" top="5vh" :visible.sync="dialogVisible" width="60%" @open="openRecordAcceptance" |
| | | :close-on-click-modal="false" :close-on-press-escape="false"> |
| | | <el-steps :active="currentStep" finish-status="success" align-center> |
| | | <el-step v-for="(v, i) in steps" style="cursor:pointer" :title="v" :key="i" |
| | | @click.native="choiceStep(i)"></el-step> |
| | | </el-steps> |
| | | <el-form ref="form" :model="form" label-position="right" label-width="120px"> |
| | | <!-- æäº¤ --> |
| | | <div v-show="currentStepClick == 0"> |
| | | <el-card style="margin-top: 1em;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æµç¨ç¼å·:"> |
| | | <el-input v-model="form.processNumber" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°:"> |
| | | <el-input v-model="form.deviceName" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·:"> |
| | | <el-input v-model="form.specificationModel" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¼å·:"> |
| | | <el-input v-model="form.managementNumber" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å确度éå¼:" prop="measureOfAccuracy" |
| | | :rules="[{ required: currentStep === 0, message: '请è¾å
¥å确度éå¼', trigger: 'blur' }]"> |
| | | <el-input v-model="form.measureOfAccuracy" size="small" :disabled="currentStep !== 0"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ
鿥æ:" prop="faultDate"> |
| | | <el-date-picker v-model="form.faultDate" type="date" placeholder="éæ©æ¥æ" size="small" |
| | | format="yyyy-MM-dd" style="width: 100%" value-format="yyyy-MM-dd" :disabled="currentStep !== 0"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¦æ±ä¿®å¤æ¥æ:" prop="requestRepairDate"> |
| | | <el-date-picker v-model="form.requestRepairDate" :picker-options="{ disabledDate: this.disabledDate }" |
| | | type="date" placeholder="éæ©æ¥æ" size="small" format="yyyy-MM-dd" style="width: 100%" |
| | | value-format="yyyy-MM-dd" :disabled="currentStep !== 0"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ
éæ
åµ:" prop="faultSituation" |
| | | :rules="[{ required: currentStep === 0, message: '请è¾å
¥æ
éæ
åµ', trigger: 'blur' }]"> |
| | | <el-input v-model="form.faultSituation" type="textarea" size="small" |
| | | :disabled="currentStep !== 0"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç¸å
³éä»¶:"> |
| | | <el-input v-model="form.fileName" :disabled="true" size="small" style="width: 80%;"> |
| | | <el-button slot="append" icon="el-icon-delete-solid" @click="deleteFile" |
| | | :disabled="currentStep !== 0"></el-button> |
| | | </el-input> |
| | | <el-upload ref="upload" style="float: right;" :action="action" :show-file-list="false" |
| | | :on-success="handleSuccess"> |
| | | <el-button style="position: relative;top: -4px;" class="uploadFile" slot="trigger" size="small" |
| | | type="primary" :disabled="currentStep !== 0">éä»¶ä¸ä¼ |
| | | </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¯èè´è´£äºº:" prop="submitNextPesponsible" |
| | | :rules="[{ required: currentStep === 0, message: '请è¾å
¥ä¸ç¯èè´è´£äºº', trigger: 'change' }]"> |
| | | <el-select v-model="form.submitNextPesponsible" placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" |
| | | style="width: 100%" :disabled="currentStep !== 0"> |
| | | <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.submitOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.submitDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- 设å¤ç®¡çåæè§ --> |
| | | <div v-show="currentStepClick == 1"> |
| | | <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç»´ä¿®æ¹å¼åè´¹ç¨:" prop="methodCost" |
| | | :rules="[{ required: currentStep === 1, message: '请è¾å
¥ç»´ä¿®æ¹å¼åè´¹ç¨', trigger: 'blur' }]"> |
| | | <el-input v-model="form.methodCost" type="textarea" size="small" |
| | | :disabled="currentStep !== 1"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸æè§:" prop="adminAuditOption" |
| | | :rules="[{ required: currentStep === 1, message: '请è¾å
¥å®¡æ ¸æè§', trigger: 'blur' }]"> |
| | | <el-input v-model="form.adminAuditOption" type="textarea" size="small" |
| | | :disabled="currentStep !== 1"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¯èè´è´£äºº:" prop="adminNextPesponsible" |
| | | :rules="[{ required: currentStep === 1, message: '请è¾å
¥ä¸ç¯èè´è´£äºº', trigger: 'change' }]"> |
| | | <el-select v-model="form.adminNextPesponsible" placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" |
| | | style="width: 100%" :disabled="currentStep !== 1"> |
| | | <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.adminOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.adminDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- ææ¯è´è´£äººæè§ --> |
| | | <div v-show="currentStepClick == 2"> |
| | | <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸æè§:" prop="technicalAuditOption" |
| | | :rules="[{ required: currentStep === 2, message: '请è¾å
¥å®¡æ ¸æè§', trigger: 'blur' }]"> |
| | | <el-input v-model="form.technicalAuditOption" type="textarea" size="small" |
| | | :disabled="currentStep !== 2"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¯èè´è´£äºº:" prop="technicalNextPesponsible" |
| | | :rules="[{ required: currentStep === 2, message: '请è¾å
¥ä¸ç¯èè´è´£äºº', trigger: 'change' }]"> |
| | | <el-select v-model="form.technicalNextPesponsible" placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" |
| | | style="width: 100%" :disabled="currentStep !== 2"> |
| | | <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.technicalOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.technicalDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- ç»´ä¿®æ
åµè®°å½ --> |
| | | <div v-show="currentStepClick == 3"> |
| | | <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç»´ä¿®æ
åµ:" prop="maintainSituation" |
| | | :rules="[{ required: currentStep === 3, message: '请è¾å
¥ç»´ä¿®æ
åµ', trigger: 'blur' }]"> |
| | | <el-input v-model="form.maintainSituation" type="textarea" size="small" |
| | | :disabled="currentStep !== 3"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¯èè´è´£äºº:" prop="maintainNextPesponsible" |
| | | :rules="[{ required: currentStep === 3, message: '请è¾å
¥ä¸ç¯èè´è´£äºº', trigger: 'change' }]"> |
| | | <el-select v-model="form.maintainNextPesponsible" placeholder="è¯·éæ©ä¸ç¯èè´è´£äºº" size="small" |
| | | style="width: 100%" :disabled="currentStep !== 3"> |
| | | <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.maintainOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.maintainDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- ç»´ä¿®åç确认 --> |
| | | <div v-show="currentStepClick == 4"> |
| | | <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="éªæ¶ãç¡®è®¤ãæ ¡åæ
åµ:" prop="checkCalSituation" label-width="200" |
| | | :rules="[{ required: currentStep === 4, message: '请è¾å
¥éªæ¶ãç¡®è®¤ãæ ¡åæ
åµ', trigger: 'blur' }]"> |
| | | <el-input v-model="form.checkCalSituation" type="textarea" size="small" style="width: 100%" |
| | | :disabled="currentStep !== 4"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row style="margin-top: 1em;"> |
| | | <el-col :span="4"> |
| | | æä½äººï¼{{ form.afterMaintenanceOperatingPersonnel }} |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | æ¥æï¼{{ form.afterMaintenanceDate }} |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="submitForm('3reject')" v-if="currentStep !== 0 && currentStep !== 5" |
| | | :loading="sumbitLoading1">驳å</el-button> |
| | | <el-button @click="submitForm('2save')" v-if="currentStep === 0" :loading="sumbitLoading2">ä¿å</el-button> |
| | | <el-button type="primary" v-if="currentStep !== 5" @click="submitForm('1submit')" :loading="sumbitLoading3"> |
| | | {{ currentStep === 0 ? 'æäº¤' : 'éè¿' }} |
| | | </el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { dateFormat } from '@/utils/date' |
| | | import { mapGetters } from "vuex"; |
| | | import { |
| | | addOrUpdateDeviceFaultOne, |
| | | deleteCNASFile, deleteDeviceFaultOne, |
| | | deviceFaultOnePage, exportRewardAndPunishmentRecords, |
| | | selectDeviceByCode |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | processNumber: '' |
| | | }, |
| | | users: [], |
| | | currentStep: 0, |
| | | currentStepClick: 0, |
| | | steps: ['æäº¤', '设å¤ç®¡çåæè§', 'ææ¯è´è´£äººæè§', 'ç»´ä¿®æ
åµè®°å½', 'ç»´ä¿®åç确认'], |
| | | outLoading: false, |
| | | form: {}, |
| | | faultParam: [], |
| | | dialogVisible: false, |
| | | sumbitLoading1: false, |
| | | sumbitLoading2: false, |
| | | sumbitLoading3: false, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableList(this.clickNodeVal.value) |
| | | }, |
| | | methods: { |
| | | //è¦æ±ä¿®å¤æ¥æ:ç¦ç¨å¨æ
鿥æåçæ¥æ |
| | | disabledDate(time) { |
| | | let selectDate = this.form.faultDate |
| | | if (selectDate) { |
| | | let selectTime = new Date(selectDate).getTime() - 28800000 |
| | | return time < selectTime |
| | | } |
| | | return false |
| | | }, |
| | | //æäº¤è¡¨å |
| | | async submitForm(saveState) { |
| | | let currentStepAction; |
| | | // 设置该æä½å¤ææ¯å¦ä¸ºæäº¤ï¼ä¿åï¼é©³åï¼éè¿ å¼å¯loding |
| | | switch (saveState) { |
| | | // æäº¤ï¼éè¿ |
| | | case '1submit': |
| | | currentStepAction = this.currentStep + 1 |
| | | this.sumbitLoading1 = true |
| | | break |
| | | // ä¿å |
| | | case '2save': |
| | | currentStepAction = this.currentStep |
| | | this.sumbitLoading2 = true |
| | | break |
| | | // 驳å |
| | | case '3reject': |
| | | currentStepAction = this.currentStep - 1 |
| | | this.sumbitLoading3 = true |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // ç»å½åç¯è设置åå»ºäººä¸æ¶é´ |
| | | const dateTime = dateFormat(new Date()) |
| | | // è·åå½åç¯èæä½äººä¸æ¥æ |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.submitUser = this.nickName |
| | | this.form.submitOperatingPersonnel = this.nickName |
| | | this.form.submitDate = dateTime |
| | | break |
| | | case 1: |
| | | this.form.adminOperatingPersonnel = this.nickName |
| | | this.form.adminDate = dateTime |
| | | break |
| | | case 2: |
| | | this.form.technicalOperatingPersonnel = this.nickName |
| | | this.form.technicalDate = dateTime |
| | | break |
| | | case 3: |
| | | this.form.maintainOperatingPersonnel = this.nickName |
| | | this.form.maintainDate = dateTime |
| | | break |
| | | case 4: |
| | | this.form.afterMaintenanceOperatingPersonnel = this.nickName |
| | | this.form.afterMaintenanceDate = dateTime |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | // è·åå½åç¯èè´è´£äºº |
| | | switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) { |
| | | case 0: |
| | | this.form.currentResponsible = this.form.submitOperatingPersonnel |
| | | break |
| | | case 1: |
| | | this.form.currentResponsible = this.form.departmentOperatingPersonnel |
| | | break |
| | | case 2: |
| | | this.form.currentResponsible = this.form.measuringRoomOperatingPersonnel |
| | | break |
| | | case 3: |
| | | this.form.currentResponsible = this.form.approvalOperatingPersonnel |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | // è·åå½åç¶æ |
| | | this.form.currentState = currentStepAction === 5 ? 'å
³é' : this.steps[currentStepAction] |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | addOrUpdateDeviceFaultOne(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.getTableList(this.clickNodeVal.value) |
| | | this.dialogVisible = false |
| | | } |
| | | this.closeLoading() |
| | | }) |
| | | } else { |
| | | let step = this.steps[this.currentStep] |
| | | this.$message.warning(step + ' æµç¨ä¸æå¿
填项æªå¡«ï¼'); |
| | | this.closeLoading() |
| | | } |
| | | }); |
| | | }, |
| | | closeLoading() { |
| | | this.sumbitLoading1 = false |
| | | this.sumbitLoading2 = false |
| | | this.sumbitLoading3 = false |
| | | }, |
| | | openRecordAcceptance() { |
| | | // è·å设å¤åºç¡ä¿¡æ¯ |
| | | selectDeviceByCode({id: this.clickNodeVal.value}).then(res => { |
| | | this.form.deviceName = res.data.deviceName |
| | | this.form.manufacturer = res.data.manufacturer |
| | | this.form.specificationModel = res.data.specificationModel |
| | | this.form.managementNumber = res.data.managementNumber |
| | | }); |
| | | // è·åè´è´£äººä¿¡æ¯ |
| | | this.getUserList() |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | this.users = res.data; |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val |
| | | this.getTableList(this.clickNodeVal.value); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val |
| | | this.getTableList(this.clickNodeVal.value); |
| | | }, |
| | | deleteFile() { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteCNASFile({fileName: this.form.systemFileName}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿åï¼') |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | choiceStep(index) { |
| | | this.currentStepClick = index |
| | | }, |
| | | //ææ¡£ |
| | | handleSuccess(response, file, fileList) { |
| | | if (response.code == 200) { |
| | | this.form.fileName = response.data |
| | | this.$message.success('ä¸ä¼ æå') |
| | | } else { |
| | | this.$message.error(response.msg) |
| | | } |
| | | }, |
| | | onError(error, file, fileList) { |
| | | // æä»¶ä¸ä¼ 失败æ¶çå¤çé»è¾ |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | resetSearch() { |
| | | this.search = { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | processNumber: '', |
| | | } |
| | | this.getTableList(this.clickNodeVal.value); |
| | | }, |
| | | //è·åææä¿¡æ¯ |
| | | getTableList(deviceId) { |
| | | const params = { |
| | | deviceId: deviceId, |
| | | size: this.search.size, |
| | | current: this.search.current, |
| | | processNumber: this.search.processNumber, |
| | | } |
| | | deviceFaultOnePage(params).then(res => { |
| | | if (res.code == 200) { |
| | | this.faultParam = res.data.records |
| | | this.search.total = res.data.total |
| | | } |
| | | }) |
| | | }, |
| | | //å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | exportRewardAndPunishmentRecords({deviceId: this.clickNodeVal.value}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$dowmload.saveAs(blob, 'è®¾å¤æ
é表.xlsx') |
| | | }) |
| | | }, |
| | | selectAllByOne(row) { |
| | | this.dialogVisible = true; |
| | | this.formData = this.HaveJson(row); |
| | | }, |
| | | //æ·»å è®°å½æé® |
| | | addRecode() { |
| | | this.currentStep = 0; |
| | | this.currentStepClick = 0; |
| | | }, |
| | | //æ¥ç详æ
|
| | | showDetailsDialog(row) { |
| | | this.form = { ...row } |
| | | this.currentStep = this.steps.indexOf(this.form.currentState) === -1 ? 5 : this.steps.indexOf(this.form.currentState) |
| | | this.currentStepClick = this.currentStep === 5 ? 0 : this.currentStep |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | }) |
| | | this.dialogVisible = true |
| | | }, |
| | | //å é¤æä½ |
| | | handleDeleteClick(index, row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteDeviceFaultOne({id: row.id}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getTableList(this.clickNodeVal.value) |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | this.getTableList(newVal.value); |
| | | } |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = {} |
| | | this.closeLoading() |
| | | this.currentStep = 0 // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | this.currentStepClick = 0 // ç¹å»æ¥éª¤æ¡åå |
| | | this.$refs['form'].clearValidate() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | h4 { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | /* display: flex; |
| | | justify-content: space-between; */ |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | /* |
| | | ä¿åæäº¤æé®æ ·å¼ |
| | | */ |
| | | h4 .title { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | h4 .title .line { |
| | | display: inline-block; |
| | | width: 3px; |
| | | height: 16px; |
| | | background: #3A7BFA; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .tables { |
| | | width: 100%; |
| | | height: calc(100vh - 230px); |
| | | } |
| | | |
| | | .el-from { |
| | | max-width: 400px; |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | .form-row { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .dialogBottom { |
| | | margin-top: 14px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .form-operation { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | margin-right: 100px; |
| | | } |
| | | |
| | | .label { |
| | | margin-right: 20px; |
| | | line-height: 40px; |
| | | } |
| | | |
| | | .value { |
| | | font-weight: normal; |
| | | line-height: 40px; |
| | | } |
| | | |
| | | .form-row .el-form-item { |
| | | flex: 1; |
| | | /* æ¯ä¸ªè¡¨åé¡¹å æ®ç¸åæ¯ä¾çç©ºé´ */ |
| | | margin-right: 100px; |
| | | /* å¯éï¼ä¸ºå³ä¾§å
ç´ æ·»å é´è· */ |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | height: 40px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | |
| | | .form .search_label { |
| | | width: 120px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- è®¾å¤æ¡£æ¡ --> |
| | | <template> |
| | | <div class="page"> |
| | | <div class="page-header"> |
| | | <h4><span class="line"></span><span>è®¾å¤æ¡£æ¡</span></h4> |
| | | <div class="btns"> |
| | | <el-button type="primary" size="small" @click="openEditForm" style="">修订档æ¡</el-button> |
| | | <el-button type="primary" size="small" @click="dialogVisible1 = true" style="">æ·»å éä»¶</el-button> |
| | | <el-button type="primary" size="small" @click="deviceDialog = true" style="">æ¥ç设å¤äºç»´ç </el-button> |
| | | <!-- <el-button type="primary" size="small" @click="handleDownOne" style="">导åº</el-button>--> |
| | | </div> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <div class="main_div"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <!-- å æ¶é´æ³é¿å
æµè§å¨ç¼åé®é¢ --> |
| | | <el-image :src="`${javaApi}/img/${Mdata.imageUpload}`" fit="fill" :key="'personalPicture' + timeStamp" |
| | | style="width: 200px;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 30px;margin-top: 20px;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline" style="font-size: 40px;"></i> |
| | | </div> |
| | | </el-image> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div class="form-item"> |
| | | <label>设å¤åç§°</label> |
| | | <!-- <p>{{ Mdata.deviceName }}</p> --> |
| | | <el-tooltip |
| | | class="item" |
| | | :content="Mdata.deviceName" |
| | | > |
| | | <span class="text-ellipsis" >{{ Mdata.deviceName }}</span> |
| | | </el-tooltip> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>设å¤ç±»å</label> |
| | | <p>{{ Mdata.largeCategory }}</p> |
| | | </div> |
| | | |
| | | <div class="form-item"> |
| | | <label>管çç¼å·</label> |
| | | <p>{{ Mdata.managementNumber }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>æå±é¨é¨</label> |
| | | <p>{{ Mdata.laboratoryName }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>ç产åå®¶</label> |
| | | <!-- <p>{{ Mdata.manufacturer }}</p> --> |
| | | <el-tooltip |
| | | class="item" |
| | | :content="Mdata.manufacturer" |
| | | > |
| | | <span class="text-ellipsis" >{{ Mdata.manufacturer }}</span> |
| | | </el-tooltip> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>èµäº§ç¼ç </label> |
| | | <p class="text-ellipsis">{{ Mdata.assetCode }}</p> |
| | | </div> |
| | | |
| | | <div class="form-item"> |
| | | <label>åºåæ¥æ</label> |
| | | <p>{{ Mdata.acquisitionDate | formaterDateTime }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>å¯ç¨æ¥æ</label> |
| | | <p>{{ Mdata.activationDate | formaterDateTime }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>æ ¸å卿(æ)</label> |
| | | <p>{{ Mdata.calibrationDate }}</p> |
| | | </div> |
| | | |
| | | <div class="form-item"> |
| | | <label>æ¥åºæ¶é´</label> |
| | | <p>{{ handleData() }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>å确度éå¼</label> |
| | | <el-tooltip |
| | | class="item" |
| | | :content="Mdata.technicalIndicators" |
| | | > |
| | | <span class="text-ellipsis">{{ Mdata.technicalIndicators }}</span> |
| | | </el-tooltip> |
| | | <!-- <p>{{ Mdata.technicalIndicators }}</p> --> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>维修记å½</label> |
| | | <p>{{ handleData() }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>被ææäºº</label> |
| | | <p>{{ Mdata.authorizedPersonName }}</p> |
| | | </div> |
| | | |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <div class="form-item"> |
| | | <label>è§æ ¼åå·</label> |
| | | <p>{{ Mdata.specificationModel }}</p> |
| | | </div> |
| | | <!-- <div class="form-item"> |
| | | <label>ç»ç±»</label> |
| | | <p>{{ handleData() }}</p> |
| | | </div> --> |
| | | <div class="form-item"> |
| | | <label>åºåç¼å·</label> |
| | | <p>{{ Mdata.factoryNo }}</p> |
| | | </div> |
| | | <div class="form-items"> |
| | | <label>设å¤ç¶æ</label> |
| | | <el-radio-group v-model="Mdata.deviceStatus" style="margin-left: 10px;"> |
| | | <el-radio :label="0" :disabled="Mdata.deviceStatus != 0">æ£å¸¸</el-radio> |
| | | <el-radio :label="1" :disabled="Mdata.deviceStatus != 1">ç»´ä¿®</el-radio> |
| | | <el-radio :label="2" :disabled="Mdata.deviceStatus != 2">åç¨</el-radio> |
| | | <el-radio :label="3" :disabled="Mdata.deviceStatus != 3">æ¥åº</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>åæ¾ç¹</label> |
| | | <p>{{ Mdata.storagePoint }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>产å°</label> |
| | | <p>{{ Mdata.origin }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>æ£éªé¡¹</label> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="Mdata.insProductItem" |
| | | placement="top" |
| | | > |
| | | <span class="text-ellipsis" >{{ Mdata.insProductItem }}</span> |
| | | </el-tooltip> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>è´ç½®æ¥æ</label> |
| | | <p>{{ Mdata.acquisitionDate | formaterDateTime }}</p> |
| | | </div> |
| | | |
| | | <div class="form-item"> |
| | | <label>æè¿æº¯æºæ¥æ</label> |
| | | <p>{{ Mdata.lastCalibrationDate | formaterDateTime }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>éè´è´¹ç¨(å
)</label> |
| | | <p>{{ Mdata.unitPrice }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>åç¨æ¶é´</label> |
| | | <p>{{ Mdata.nextCalibrationDate | formaterDateTime }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>设å¤è´è´£äºº</label> |
| | | <p>{{ Mdata.equipmentManagerName }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>éªæ¶è®°å½</label> |
| | | <p>{{ handleData() }}</p> |
| | | </div> |
| | | <div class="form-item"> |
| | | <label>æ ¸åè¯ä¹¦</label> |
| | | <p>{{ Mdata.calibrateNo }}</p> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <h4 style="margin-bottom: 10px;margin-top: 10px;"><span class="line"></span><span>éä»¶åç¸å
³ææ¡£</span></h4> |
| | | <el-table height="200px" :data="tableDataA"> |
| | | <el-table-column header-align="center" align="center" prop="prop" label="åºå·" type="index" width="60" /> |
| | | <el-table-column prop="documentType" label="ç±»å" min-width="100"> |
| | | <template v-slot="scope"> |
| | | {{ scope.row.documentType === '0' ? 'éä»¶' : scope.row.documentType === '1' ? 'ææ¡£' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="åç§°" min-width="150" /> |
| | | <el-table-column prop="number" label="ç¼å·" min-width="150" /> |
| | | <el-table-column prop="version" label="çæ¬" min-width="80" /> |
| | | <el-table-column prop="quantity" label="份æ°" min-width="80" /> |
| | | <el-table-column prop="pageCount" label="页ç " min-width="80" /> |
| | | <el-table-column prop="provider" label="æä¾è
" min-width="150" /> |
| | | <el-table-column prop="provideDate" label="æä¾æ¥æ" min-width="150" /> |
| | | <el-table-column prop="comments" label="夿³¨" min-width="150" /> |
| | | <el-table-column fixed="right" label="æä½" min-width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="handleAttachmentClick(scope.row)">ä¸è½½éä»¶</el-button> |
| | | <el-button type="text" size="small" @click="handleViewClick(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small" @click="handleDeleteClick(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- 修订 --> |
| | | <el-dialog title="修订档æ¡" top="5vh" :visible.sync="dialogVisible" width="70%" @open="openFileRevisionDialog" |
| | | :before-close="handleClose"> |
| | | <el-row style="display:flex;justify-content: space-around;"> |
| | | <!-- 左边å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-col> |
| | | <!-- å¾ç --> |
| | | <el-image class="img" style="width:100%;height: 320px;margin-bottom:16px" |
| | | :src="javaApi + '/img/' + editData.imageUpload"> |
| | | <div slot="error" class="image-error" style="width: calc(100% - 2px); |
| | | height: 318px; |
| | | border-radius: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:60px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <!-- 表å --> |
| | | <el-form :model="editData" label-width="120px" ref="rules1" :rules="rules1"> |
| | | <el-form-item label="仪å¨åç§°:" prop="deviceName"> |
| | | <el-input v-model="editData.deviceName" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="仪å¨åç§°EN:" prop="enDeviceName"> |
| | | <el-input v-model="editData.enDeviceName" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è§æ ¼åå·:" prop="specificationModel"> |
| | | <el-input v-model="editData.specificationModel" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åå®¶:"> |
| | | <el-input v-model="editData.manufacturer" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-col> |
| | | <!-- ä¸é´å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-form :model="editData" label-width="116px" ref="rules2" :rules="rules1"> |
| | | <el-form-item label="æ ¡åæå¡æºæ:"> |
| | | <el-input v-model="editData.calibrationServices" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="èµäº§ç¼ç :"> |
| | | <el-input v-model="editData.assetCode" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="产å°:"> |
| | | <el-input v-model="editData.origin" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åºåç¼å·:"> |
| | | <el-input v-model="editData.factoryNo" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管çç¼å·:" prop="managementNumber"> |
| | | <el-input v-model="editData.managementNumber" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è´ç½®æ¥æ:"> |
| | | <el-date-picker style="width:100%" v-model="editData.acquisitionDate" type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="å¯ç¨æ¥æ:" prop="activationDate"> |
| | | <el-date-picker style="width:100%" v-model="editData.activationDate" type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="è´è´£äºº:"> |
| | | <el-select v-model="editData.equipmentManager" placeholder="è¯·éæ©" size="small" style="width:100%"> |
| | | <el-option v-for="item in responsiblePersonList" :key="item.name" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åæ¾ç¹:"> |
| | | <el-input v-model="editData.storagePoint" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ææ¯ææ :"> |
| | | <el-input v-model="editData.technicalIndicators" :rows="7" type="textarea" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <!-- å³è¾¹å¸å± --> |
| | | <el-col :span="7"> |
| | | <el-form :model="editData" label-width="140px" ref="ruleForm" :rules="rules1"> |
| | | <!-- å®éªå®¤å表 --> |
| | | <el-form-item label="æå±é¨é¨:"> |
| | | <el-select v-model="editData.subordinateDepartmentsId" placeholder="è¯·éæ©" size="small" style="width:100%"> |
| | | <el-option v-for="item in subordinateDepartmentsList" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ£æµé¡¹ç®:"> |
| | | <el-cascader v-model="editData.insProductIds" :options="options" :show-all-levels="false" :props="props" |
| | | placeholder="è¯·éæ©" size="small" style="width:100%;" :collapse-tags="true" separator="," filterable |
| | | clearable></el-cascader> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="æè¿æ ¡åæ¥æ:"> |
| | | <el-date-picker style="width:100%" v-model="Mdata.latestTraceability" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" type="date" size="small" placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="䏿¬¡æ ¡åæ¥æ:"> |
| | | <el-date-picker style="width:100%" v-model="Mdata.nextCalibrationDate" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" type="date" size="small" placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> --> |
| | | <el-form-item label="设å¤ç±»å:"> |
| | | <el-select v-model="editData.largeCategory" placeholder="è¯·éæ©" size="small" style="width:100%"> |
| | | <el-option v-for="item in equipmentList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åä»·(ä¸å
):"> |
| | | <el-input v-model="editData.unitPrice" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å½åç¶æ:" prop="deviceStatus"> |
| | | <el-select v-model="editData.deviceStatus" placeholder="è¯·éæ©" size="small" style="width:100%"> |
| | | <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ ¡åå¨æï¼æï¼:" prop="calibrationDate"> |
| | | <el-input v-model="editData.calibrationDate" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="被ææäºº:"> |
| | | <el-select v-model="editData.authorizedPerson" multiple placeholder="è¯·éæ©" size="small" style="width:100%"> |
| | | <el-option v-for="item in responsiblePersonList" :key="item.name" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å¾ç:"> |
| | | <!-- <div |
| | | style="border: 1px solid #DCDFE6;border-radius:4px;height:32px;lineHeight:32px;display:flex;justify-content: space-around;font-size: 13px;"> |
| | | <div v-show="Mdata.imageName" class="picName">{{ Mdata.imageName }}</div> |
| | | <el-upload :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" |
| | | accept='image/jpg,image/jpeg,image/png' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload'> |
| | | <el-button type="text" style="height:30px;padding-top:8px"><span v-if="Mdata.imageName"></span></el-button> |
| | | </el-upload> |
| | | </div> --> |
| | | |
| | | <div> |
| | | <div v-show="editData.imageName" class="picName">{{ editData.imageName }}</div> |
| | | <el-upload :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" |
| | | accept='image/jpg,image/jpeg,image/png' :headers="uploadHeader" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' class="avatar-uploader" |
| | | > |
| | | <img v-if="editData.imageUpload" :src="javaApi + '/img/' + editData.imageUpload" class="avatar"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æ·»å 设å¤éä»¶" top="5vh" v-if="dialogVisible1" :visible.sync="dialogVisible1" width="40%"> |
| | | <el-form ref="form" :model="addFile" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»´æ¤ç±»åï¼"> |
| | | <el-radio-group v-model="addFile.documentType"> |
| | | <el-radio :label="0">éä»¶</el-radio> |
| | | <el-radio :label="1">ææ¡£</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¡£æ¡åç§°ï¼"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addFile.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºå·/èµäº§ç¼å·:"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addFile.number"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ¬ï¼"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addFile.version"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="份æ°ï¼"> |
| | | <el-input-number v-model="addFile.quantity" controls-position="right" style="width: 100%;" size="small" |
| | | :min="0" :max="10"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="页ç ï¼"> |
| | | <el-input-number v-model="addFile.pageCount" controls-position="right" style="width: 100%;" size="small" |
| | | :min="0" :max="10"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æä¾è
ï¼"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addFile.provider"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="彿¡£æ¥æï¼"> |
| | | <el-date-picker type="date" style="width:100%" placeholder="è¯·éæ©æ¥æ" size="small" v-model="addFile.archiveDate" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨ï¼"> |
| | | <el-input type="textarea" :rows="2" size="small" v-model="addFile.comments"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="éä»¶ï¼" style="float: left;"> |
| | | <el-upload class="upload-demo" :action="action" :headers="uploadHeader" ref="uploadFile" :on-error="onError" |
| | | :on-remove="handleRemove" :on-success="onSuccess" :before-remove="beforeRemove" multiple :limit="1" |
| | | :on-exceed="handleExceed" :file-list="fileList"> |
| | | <el-button size="small" type="primary">ç¹å»ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="dialogVisible1 = false" size="small">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveRecord" size="small" :loading="isLoading">{{ isAddFileUpdate == true ? |
| | | 'æ´æ°' : |
| | | 'ç¡® å®' }}</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="设å¤äºç»´ç " :visible.sync="deviceDialog" top="5vh" width="30%"> |
| | | <div style="width:90%;text-align: right;"> |
| | | <el-button type="primary" size="mini" @click="clickGeneratePicture">ä¸è½½å¾ç</el-button> |
| | | <el-button type="primary" size="mini" @click="labelPrint">æ ç¾æå°</el-button> |
| | | </div> |
| | | <div class="device-main" ref="deviceQrCode" id="deviceCode"> |
| | | <div class="device-center"> |
| | | <p class="device-title">{{ Mdata.deviceName }}</p> |
| | | <div class="device-footer"> |
| | | <div> |
| | | <vueQr class="qr-code" |
| | | :text="'https://zttx-lims.ztt.cn:8021/lims/qr/qrScan?code=' + Mdata.managementNumber + '&type=device'" |
| | | :size="200" :margin="10"></vueQr> |
| | | </div> |
| | | <div class="device-number"> |
| | | <span class="device-text">设å¤ç¼ç :</span> |
| | | <span class="device-text">{{ Mdata.managementNumber }}</span> |
| | | </div> |
| | | <div class="device-name"> |
| | | <span class="device-text">设å¤åå·:</span> |
| | | <span class="device-text">{{ Mdata.specificationModel }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { MessageBox } from 'element-ui' |
| | | import fileDownload from '@/utils/file' |
| | | import vueQr from 'vue-qr' |
| | | import PrintJS from 'print-js' |
| | | import domtoimage from 'dom-to-image'; |
| | | import { |
| | | deleteCNASFile, |
| | | updateDocument, |
| | | addDocument, |
| | | deleteDocumentById, |
| | | selectDeviceByCode, |
| | | upDeviceParameter, |
| | | exportDeviceFile, |
| | | getInsProduction, getListByDId, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | import { |
| | | obtainItemParameterList, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | filters: { |
| | | formaterDateTime(dateTime) { |
| | | if (dateTime === undefined || dateTime === null || dateTime === '') { |
| | | return dateTime |
| | | } |
| | | return dateTime.split(" ")[0] |
| | | } |
| | | }, |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | vueQr |
| | | }, |
| | | data() { |
| | | return { |
| | | deviceDialog: false,//æ¥ç设å¤äºç»´ç å¼¹æ¡ |
| | | rules1: { |
| | | deviceName: [ |
| | | { required: true, message: '请è¾å
¥ä»ªå¨åç§°', trigger: 'blur' }, |
| | | ], |
| | | enDeviceName: [ |
| | | { required: true, message: '请è¾å
¥ä»ªå¨åç§°EN', trigger: 'blur' }, |
| | | ], |
| | | specificationModel: [ |
| | | { required: true, message: '请è¾å
¥è§æ ¼åå·', trigger: 'blur' }, |
| | | ], |
| | | managementNumber: [ |
| | | { required: true, message: '请è¾å
¥ç®¡çç¼å·', trigger: 'blur' }, |
| | | ], |
| | | activationDate: [ |
| | | { required: true, message: '请è¾å
¥æ ¡åæææ', trigger: 'blur' }, |
| | | ], |
| | | deviceStatus: [ |
| | | { required: true, message: '请è¾å
¥å½åç¶æ', trigger: 'blur' }, |
| | | ], |
| | | calibrationDate: [ |
| | | { required: true, message: '请è¾å
¥æ ¡å卿(æ)', trigger: 'blur' }, |
| | | ], |
| | | subordinateDepartmentsId: [ |
| | | { required: true, message: 'è¯·éæ©æå±é¨é¨', trigger: 'change' }, |
| | | ] |
| | | }, |
| | | // dateForm: { |
| | | |
| | | // }, |
| | | fileList: [], // æ·»å éä»¶ä¸ä¼ æä»¶å表 |
| | | timeStamp: '', // ç»å¾çæ·»å keyï¼å¨æ¯æ¬¡å 载页é¢çæ¶åæ°å»ºæ¶é´æ³ |
| | | equipmentManager: [], |
| | | formLabelWidth: '100px', |
| | | dialogVisible1: false, |
| | | recordNumber: '', |
| | | inLoading: false, // æ§å¶ä¸ä¼ æé®å è½½ç¶æ |
| | | isLoading: false, // æ§å¶ç¡®å®æé®å è½½ç¶æ |
| | | formData: {}, |
| | | tableDataA: [], |
| | | num: 1, |
| | | //æ·»å éä»¶æ°æ®æ¶é |
| | | addFile: { |
| | | documentType: '', // ç»´æ¤ç±»å |
| | | provideDate: null, // 彿¡£æ¥æ |
| | | name: '', // æ¡£æ¡åç§° |
| | | number: '', // åºå·/èµäº§ç¼å· |
| | | version: '', // çæ¬ |
| | | quantity: 1, // ä»½æ° |
| | | pageCount: 1, // 页ç |
| | | provider: '', // æä¾è
|
| | | comments: "", // 夿³¨ |
| | | fileName: "", // æä»¶ååç§° |
| | | systemFileName: "", // ç³»ç»çæåç§° |
| | | }, |
| | | componentData: { |
| | | entity: { name: "", orderBy: { field: "id", order: "asc" } }, |
| | | page: { current: "1", size: "80" } |
| | | }, |
| | | upIndex: 0, |
| | | dialogVisible: false, |
| | | upLoad: false, |
| | | responsiblePersonList: [], |
| | | subordinateDepartmentsList: [], |
| | | options: [], |
| | | equipmentList: [], |
| | | deviceStatusList: [], |
| | | props: { multiple: true, emitPath: false, value: 'id', label: 'name' }, |
| | | // æ¶éè®¾å¤æ¡£æ¡æ°æ® |
| | | Mdata: { |
| | | deviceName: null |
| | | }, |
| | | isAddFileUpdate: false, |
| | | editData: { |
| | | authorizedPerson: [], |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/deviceScope/uploadFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | // æ¶éæ°æ® |
| | | this.getList(this.clickNodeVal.value) |
| | | // è·åç¸å
³ææ¡£çæ°æ® |
| | | this.getPage() |
| | | this.timeStamp = Date.now() |
| | | }, |
| | | methods: { |
| | | /** |
| | | * å°é¡µé¢æå®èç¹å
容转为å¾ç |
| | | * 1.æ¿å°æ³è¦è½¬æ¢ä¸ºå¾ççå
容èç¹DOMï¼ |
| | | * 2.转æ¢ï¼æ¿å°è½¬æ¢åçcanvas |
| | | * 3.转æ¢ä¸ºå¾ç |
| | | */ |
| | | clickGeneratePicture() { |
| | | const _than = this |
| | | domtoimage.toPng(_than.$refs.deviceQrCode, { quality: 1, width: 440, }).then(function (dataUrl) { |
| | | // å°è½¬æ¢åçå¾åæ°æ®åå¨ä¸º data URL |
| | | fileDownload.downloadIamge(dataUrl, _than.Mdata.deviceName) |
| | | }); |
| | | }, |
| | | //æå°è®¾å¤äºç»´ç |
| | | labelPrint() { |
| | | PrintJS({ |
| | | printable: 'deviceCode',//é¡µé¢ |
| | | type: "html",//ææ¡£ç±»å |
| | | maxWidth: 360, |
| | | css: ['/static/css/device-print.css'], |
| | | style: '@page { size: auto; margin: 0mm;}', |
| | | targetStyles: ["*"], // 使ç¨domçæææ ·å¼ï¼å¾éè¦ |
| | | }); |
| | | }, |
| | | openFileRevisionDialog() { |
| | | // è·åæ¡£æ¡ä¿®è®¢è´è´£äººä¸ææ¡æ°æ® |
| | | this.selectDevicePrincipal() |
| | | // è·åæ¡£æ¡ä¿®è®¢æå±é¨é¨ä¸ææ¡æ°æ® |
| | | this.obtainItemParameterList() |
| | | // è·åæ¡£æ¡ä¿®è®¢è®¾å¤ç¶æä¸ææ¡æ°æ® |
| | | this.selectEnumByCategory() |
| | | // è·åæ¡£æ¡ä¿®è®¢æ£éªé¡¹ç®çº§èå¼¹æ¡æ°æ® |
| | | this.getInsProductIds() |
| | | }, |
| | | //éä»¶åç¸å
³ææ¡£äºä»¶ |
| | | handleAttachmentClick(row) { |
| | | console.log(row) |
| | | if (row.fileName) { |
| | | this.$download.saveAs(row.fileName) |
| | | } else { |
| | | this.$message.warning('æªä¸ä¼ æä»¶ï¼') |
| | | } |
| | | }, |
| | | handleViewClick(row) { |
| | | this.isAddFileUpdate = true |
| | | this.addFile = { ...row } |
| | | this.dialogVisible1 = true |
| | | if (row.fileName) { |
| | | const obj = Object.assign({ |
| | | name: row.fileName, |
| | | url: row.fileName, |
| | | status: 'success', |
| | | uid: Date.now(), |
| | | }) |
| | | this.fileList.push(obj) |
| | | } |
| | | }, |
| | | handleDeleteClick(row) { |
| | | // å é¤é»è¾ |
| | | MessageBox.confirm('ç¡®å®è¦å é¤è¯¥è®°å½åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | deleteDocumentById({ id: row.id }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getPage() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | saveRecord() { |
| | | //è½¬æ¢æ°æ® |
| | | this.addFile.deviceId = this.clickNodeVal.value |
| | | let obj = this.addFile.systemFileName |
| | | this.addFile.systemFileName = obj.name |
| | | this.addFile.fileName = obj.url |
| | | |
| | | // æ´æ° |
| | | if (this.isAddFileUpdate) { |
| | | updateDocument(this.addFile).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æ´æ°æå') |
| | | this.dialogVisible1 = false; |
| | | this.getPage() |
| | | } |
| | | }) |
| | | } else { |
| | | // æ°å¢ |
| | | addDocument(this.addFile).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('ä¿åæå') |
| | | this.dialogVisible1 = false; |
| | | this.getPage() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | if (response.code == 200) { |
| | | this.addFile.systemFileName = response.data |
| | | this.addFile.fileName = file.name |
| | | } else { |
| | | this.$refs.uploadFile.clearFiles() |
| | | this.$message.error('ä¸ä¼ 失败ï¼' + response.message) |
| | | } |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | this.deleteFile(this.addFile.systemFileName) |
| | | }, |
| | | deleteFile(fileName) { |
| | | deleteCNASFile({ fileName }).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | }) |
| | | }, |
| | | handleExceed(files, fileList) { |
| | | this.$message.warning(`å½åéå¶éæ© 1 个æä»¶ï¼æ¬æ¬¡éæ©äº ${files.length} 个æä»¶ï¼å
±éæ©äº ${files.length + fileList.length} 个æä»¶`); |
| | | }, |
| | | beforeRemove(file, fileList) { |
| | | return this.$confirm(`ç¡®å®ç§»é¤ ${file.name}ï¼`); |
| | | }, |
| | | // è·åç¸å
³ææ¡£æ°æ®çapi |
| | | getPage() { |
| | | getListByDId({ id: this.clickNodeVal.value }).then(res => { |
| | | if (res.code == 200) |
| | | this.tableDataA = res.data |
| | | }) |
| | | }, |
| | | // æ¶éæ°æ® |
| | | getList(id) { |
| | | selectDeviceByCode({ id }).then(res => { |
| | | // å°åç±»å表çä¿¡æ¯åèµ·æ¥ |
| | | if (res.code == 200) { |
| | | this.Mdata = res.data; |
| | | this.Mdata.insProductIds = this.Mdata.insProductIds.split(',') |
| | | if (this.Mdata.authorizedPerson) { |
| | | this.Mdata.authorizedPerson = JSON.parse(this.Mdata.authorizedPerson) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | handleData(m) { |
| | | if (m) { |
| | | return m |
| | | } else { |
| | | return '-' |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.dialogVisible = false |
| | | }, |
| | | //æå¼ä¿®è®¢æ¡£æ¡å¼¹æ¡ |
| | | openEditForm() { |
| | | this.editData = JSON.parse(JSON.stringify(this.Mdata)) |
| | | this.$nextTick(() => { |
| | | this.dialogVisible = true |
| | | }) |
| | | }, |
| | | //ä¿®è®¢æ¡£æ¡ |
| | | submitForm() { |
| | | let flag = true |
| | | this.$refs['rules1'].validate((valid) => { |
| | | if (!valid) { |
| | | flag = false; |
| | | return false; |
| | | } |
| | | }); |
| | | this.$refs['rules2'].validate((valid) => { |
| | | if (!valid) { |
| | | flag = false; |
| | | return false; |
| | | } |
| | | }); |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (!valid) { |
| | | flag = false; |
| | | return false; |
| | | } |
| | | }); |
| | | if (!flag) { |
| | | return; |
| | | } |
| | | delete this.editData.createTime |
| | | delete this.editData.updateTime |
| | | delete this.editData.createUser |
| | | delete this.editData.updateUser |
| | | delete this.editData.orderBy |
| | | const formData = this.HaveJson(this.editData) |
| | | formData.userAllow = this.equipmentManager.toString(); |
| | | formData.insProductIds = Array.isArray(formData.insProductIds) ? formData.insProductIds.join(',') : ''; |
| | | if (formData.authorizedPerson.length === 0) { |
| | | formData.authorizedPerson = '' |
| | | } else { |
| | | formData.authorizedPerson = JSON.stringify(formData.authorizedPerson) |
| | | } |
| | | this.upLoad = true; |
| | | upDeviceParameter(formData).then(res => { |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.upLoad = false |
| | | this.getList(this.clickNodeVal.value) |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | | this.$message.error('ä¿®æ¹å¤±è´¥') |
| | | this.dialogVisible = false |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDownOne(row) { |
| | | this.outLoading = true |
| | | exportDeviceFile({ deviceId: this.clickNodeVal.value }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'è®¾å¤æ¡£æ¡å¡.doc') |
| | | }) |
| | | }, |
| | | handleSuccessUpImg2(response) { |
| | | if (response.code == 200) { |
| | | this.$nextTick(() => { |
| | | this.editData.imageUpload = response.data.url; |
| | | this.editData.imageName = response.data.name; |
| | | console.log(this.javaApi + 'img/' + this.editData.imageUpload); |
| | | |
| | | }) |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | // è·åè´è´£äººå表 |
| | | selectDevicePrincipal() { |
| | | selectUserCondition().then(res => { |
| | | this.responsiblePersonList = res.data; |
| | | }) |
| | | }, |
| | | obtainItemParameterList() { |
| | | obtainItemParameterList().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.laboratoryName, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.subordinateDepartmentsList = data |
| | | }) |
| | | }, |
| | | getInsProductIds() { |
| | | getInsProduction().then(res => { |
| | | this.options = res.data.map((m, i) => { |
| | | m.id = m.name; |
| | | return m |
| | | }) |
| | | this.options.forEach(item => { |
| | | if (item.children.length == 0) { |
| | | item.children = null; |
| | | } else { |
| | | item.children.forEach(m => { |
| | | if (m.children.length == 0) { |
| | | m.children = null; |
| | | } else { |
| | | m.children.forEach(n => { |
| | | if (n.children && n.children.length == 0) { |
| | | n.children = null; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | // è·ååå
¸ |
| | | selectEnumByCategory() { |
| | | // 设å¤ç¶æ |
| | | this.getDicts("device_status").then((response) => { |
| | | this.deviceStatusList = this.dictToValue(response.data) |
| | | this.deviceStatusList.forEach(a => { |
| | | if (!isNaN(a.value)) { |
| | | a.value = parseInt(a.value) |
| | | } |
| | | }) |
| | | }); |
| | | // 设å¤åç±» |
| | | this.getDicts("device_type").then((response) => { |
| | | this.equipmentList = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal(newVal) { |
| | | if (newVal.value) { |
| | | this.getList(newVal.value) |
| | | this.getPage() |
| | | } |
| | | }, |
| | | dialogVisible1(newVal) { |
| | | if (newVal == false) { |
| | | this.isAddFileUpdate = false |
| | | this.addFile = {} |
| | | this.fileList = [] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main_div { |
| | | height: calc(100vh - 15em); |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .page { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .page-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | h4 { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | h4 .line { |
| | | display: inline-block; |
| | | width: 3px; |
| | | height: 16px; |
| | | background: #3A7BFA; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .tables { |
| | | width: 100%; |
| | | } |
| | | |
| | | .el-image { |
| | | position: relative; |
| | | } |
| | | |
| | | .el-icon-picture-outline { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | |
| | | .form-item { |
| | | line-height: 34px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .text-ellipsis { |
| | | display: inline-block; |
| | | width: 200px; |
| | | /* æè
æ¨å¯ä»¥è®¾ç½®ä¸ä¸ªå
·ä½çå®½åº¦å¼ */ |
| | | box-sizing: border-box; |
| | | /* ç¡®ä¿paddingåborderä¸å½±åå
ç´ çæ»å®½åº¦ */ |
| | | white-space: nowrap; |
| | | /* ç¦æ¢ææ¬æ¢è¡ */ |
| | | text-overflow: ellipsis; |
| | | /* 使ç¨çç¥å·è¡¨ç¤ºè¢«æªæçææ¬ */ |
| | | overflow: hidden; |
| | | /* éèè¶
åºå®¹å¨çå
容 */ |
| | | } |
| | | |
| | | .form-items { |
| | | line-height: 34px; |
| | | /* display: flex; */ |
| | | /* align-items: center; */ |
| | | margin-left: 15%; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | |
| | | .form-item label { |
| | | min-width: 130px; |
| | | display: inline-block; |
| | | text-align: right; |
| | | margin-right: 20px; |
| | | color: #999; |
| | | } |
| | | |
| | | .form-item p { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 3; |
| | | /* è¿éè®¾ç½®ä½ æ³è¦çè¡æ° */ |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | |
| | | .btns { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing, |
| | | .check_thing { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | gap: 1rem; |
| | | } |
| | | |
| | | .search_label, |
| | | .check_label { |
| | | width: 120px; |
| | | } |
| | | |
| | | .search_input, |
| | | .check_data, |
| | | .check_input { |
| | | flex-grow: 1; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #190505; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 178px; |
| | | height: 178px; |
| | | line-height: 178px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 178px; |
| | | height: 178px; |
| | | display: block; |
| | | } |
| | | |
| | | .device-main { |
| | | width: 90%; |
| | | margin: 0px 5%; |
| | | height: 500px; |
| | | padding: 25px 0px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .device-center { |
| | | width: 90%; |
| | | height: 490px; |
| | | margin: 0px 5%; |
| | | border-radius: 15px; |
| | | background-color: #fff; |
| | | overflow: hidden; |
| | | /* box-shadow: 3px 3px 8px 0 rgba(0, 0, 0, 0.3); */ |
| | | filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.3)) |
| | | } |
| | | |
| | | .device-title { |
| | | position: relative; |
| | | top: 20px; |
| | | z-index: 2; |
| | | font-size: clamp(1rem, 0.582rem + 1.59vw, 1.475rem); |
| | | font-weight: bold; |
| | | color: #4f6ab2; |
| | | width: 100%; |
| | | height: 90px; |
| | | line-height: 100px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .device-footer { |
| | | width: 100%; |
| | | height: 420px; |
| | | background-color: #3361d0; |
| | | position: relative |
| | | } |
| | | |
| | | .device-footer::after { |
| | | content: ""; |
| | | width: 100%; |
| | | height: 70px; |
| | | position: absolute; |
| | | top: -30px; |
| | | border-radius: 0 0 50% 50%; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .device-footer .qr-code { |
| | | width: 55%; |
| | | height: 200px; |
| | | position: relative; |
| | | top: 60px; |
| | | left: 22.5%; |
| | | background-color: #fff; |
| | | border-radius: 15px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .device-number { |
| | | width: 80%; |
| | | height: 20px; |
| | | margin-left: 20%; |
| | | position: relative; |
| | | top: 80px; |
| | | } |
| | | |
| | | .device-text { |
| | | color: #fff; |
| | | font-weight: bold; |
| | | font-size: 100%; |
| | | } |
| | | |
| | | .device-name { |
| | | width: 80%; |
| | | margin-left: 20%; |
| | | height: 20px; |
| | | position: relative; |
| | | top: 90px; |
| | | } |
| | | </style> |
| src/views/CNAS/resourceDemand/device/component/maintenance.vue
src/views/CNAS/resourceDemand/device/component/management.vue
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
src/views/CNAS/resourceDemand/device/component/operationOverview.vue
src/views/CNAS/resourceDemand/device/component/record.vue
src/views/CNAS/resourceDemand/device/component/resource-reservation.vue
src/views/CNAS/resourceDemand/device/component/state.vue
src/views/CNAS/resourceDemand/device/index.vue
src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
src/views/business/inspectionOrder/add.vue
src/views/business/inspectionOrder/index.vue
src/views/standard/standardLibrary/index.vue
src/views/structural/capabilityAndLaboratory/capability/index.vue
src/views/structural/capabilityAndLaboratory/laboratory/index.vue |