Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
已修改16个文件
已重命名2个文件
已添加41个文件
| | |
| | | "jsencrypt": "3.0.0-rc.1", |
| | | "jspdf": "^3.0.0", |
| | | "mammoth": "^1.9.0", |
| | | "moment": "^2.30.1", |
| | | "nprogress": "0.2.0", |
| | | "pako": "^2.1.0", |
| | | "print-js": "^1.6.0", |
| | |
| | | // Create version of divisor with leading zero. |
| | | bz.unshift(0); |
| | | |
| | | // Add zeros to make remainder as long as divisor. |
| | | // CommunicateAdd zeros to make remainder as long as divisor. |
| | | for (; rl++ < bl; ) r.push(0); |
| | | |
| | | do { |
| | |
| | | } |
| | | } |
| | | |
| | | // Add the digit n to the result array. |
| | | // CommunicateAdd the digit n to the result array. |
| | | qc[qi++] = cmp ? n : ++n; |
| | | |
| | | // Update the remainder. |
| | |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function deleteProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesList/deleteProcurementSuppliesList', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function exportProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesList/exportProcurementSuppliesList", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | export function addProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesList/addProcurementSuppliesList', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | export function selectEnumByCategory(query) { |
| | | return request({ |
| | | url: '/enum/selectEnumByCategory', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | export function updateProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesList/updateProcurementSuppliesList', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // æå¡åä¾åºåéè´ |
| | | export function selectSupplierManagementAll(query) { |
| | | return request({ |
| | | url: '/supplierManagement/selectSupplierManagementAll', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function addProcurementSuppliesExpends(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesExpends/addProcurementSuppliesExpends', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | export function deleteProcurementSuppliesExpends(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesExpends/deleteProcurementSuppliesExpends', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function procurementSuppliesExpendlist(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesExpends/procurementSuppliesExpendlist/', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function exportProcurementSuppliesStoreExcel(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/exportExcel', |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢èç¹ |
| | | export function addSuppliersDirectoryContents(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/addSuppliersDirectoryContents', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // ç¼è¾èç¹ |
| | | export function updateSuppliersDirectoryContents(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/updateSuppliersDirectoryContents', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // å é¤èç¹ |
| | | export function deleteSuppliersDirectoryContentsById(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/deleteSuppliersDirectoryContentsById', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // éè´ç©èµç®å½å é¤ |
| | | export function deleteProcurementSuppliesContentById(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesContents/deleteProcurementSuppliesContentById', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ææèç¹ |
| | | export function getSuppliersDirectoryContentsNodeNames(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/getSuppliersDirectoryContentsNodeNames', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // éè´ç©èµç®å½è·åèç¹åç§° |
| | | export function getProcurementSuppliesContentsNodeNames(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesContents/getNodeNames', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | //è·åç¨æ·å表 |
| | | export function selectUserCondition(query) { |
| | | return request({ |
| | | url: "/system/newUser/selectUserCondition", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // éè´ç©èµç®å½è¯¦æ
|
| | | export function selectProcurementSuppliesContentById(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesContents/selectProcurementSuppliesContentById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // éè´ç©èµç®å½å表 |
| | | export function directoryListing(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesContents/directoryListing", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // èæå
¥åºä¿®æ¹ |
| | | export function updateStore(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/updateStore', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // èæå
¥åºæ°å¢ |
| | | export function addStore(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/addStore', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®idæ¥è¯¢èæå
¥åº |
| | | export function selectStoreById(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesStore/selectStoreById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // èæå
¥åºå表 |
| | | export function storeList(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesStore/storeList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // èæå
¥åºå é¤ |
| | | export function deleteStore(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/deleteStore', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // éè´ç©èµç®å½æ°å¢ |
| | | export function addProcurementSuppliesContents(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesContents/addProcurementSuppliesContents', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢å²ä½èè´£ |
| | | export function personJobResponsibilitiesSelect(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesSelect", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // æ°å¢å²ä½èè´£ |
| | | export function personJobResponsibilitiesSave(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesSave", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // 导åºå²ä½èè´£ |
| | | export function exportPersonJobResponsibilities(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/exportPersonJobResponsibilities", |
| | | method: "post", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // å é¤å²ä½èè´£ |
| | | export function personJobResponsibilitiesDelete(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesDelete", |
| | | method: "delete ", |
| | | params: query |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢äººåæ²éè®°å½ |
| | | 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", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // æ°å¢-ç¼è¾äººåæ²éè®°å½ |
| | | export function addOrUpdatePersonCommunicationAbility(query) { |
| | | return request({ |
| | | url: "/personCommunicationAbility/addOrUpdatePersonCommunicationAbility", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢äººåè½å |
| | | export function personPersonnelCapacityPage(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/personPersonnelCapacityPage", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // æ°å¢ç¼è¾äººåè½å |
| | | export function addOrUpdatePersonPersonnelCapacity(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/addOrUpdatePersonPersonnelCapacity", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // æ°å¢ç¼è¾äººåè½å |
| | | export function submitConfirmPersonnelCapability(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/submitConfirmPersonnelCapability", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // 确认人åè½å |
| | | export function confirmPersonnelCapability(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/confirmPersonnelCapability", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // å é¤äººåè½å |
| | | export function deletePersonPersonnelCapacity(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/deletePersonPersonnelCapacity", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
| | | // 导åºäººåè½å |
| | | export function exportPersonnelCapacity(query) { |
| | | return request({ |
| | | url: "/personPersonnelCapacity/exportPersonnelCapacity", |
| | | method: "get", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // ä»»èææè®°å½æ¥è¯¢è¡¨æ ¼ |
| | | 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 |
| | | }); |
| | | } |
| | | // ä»»èææå¯¼åº |
| | | export function exportPersonPostAuthorizationRecord(query) { |
| | | return request({ |
| | | url: "/personPostAuthorizationRecord/exportPersonPostAuthorizationRecord", |
| | | method: "get", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // ä»»èææå¯¼åº |
| | | export function addOrUpdatePersonPostAuthorizationRecord(query) { |
| | | return request({ |
| | | url: "/personPostAuthorizationRecord/addOrUpdatePersonPostAuthorizationRecord", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // 人å - 奿©è®°å½ å页æ¥è¯¢ |
| | | export function rewardPunishmentPage(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/rewardPunishmentPage", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // 人å - 奿©è®°å½ å¯¼åº |
| | | export function rewardPunishmentExport(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/rewardPunishmentExport", |
| | | method: "get", |
| | | params: query, |
| | | responseType: 'blob' |
| | | }); |
| | | } |
| | | // 人å - 奿©è®°å½ æ°å¢/æ´æ° |
| | | export function addOrUpdateRewardPunishment(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/addOrUpdateRewardPunishment", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // 人å - 奿©è®°å½ æ°å¢/æ´æ° |
| | | export function deleteRewardPunishment(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/deleteRewardPunishment", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // 导åºå¹è®è®°å½ |
| | | export function exportTrainingRecord(query) { |
| | | return request({ |
| | | url: "/personTrainingRecord/exportTrainingRecord", |
| | | method: "get", |
| | | params: query, |
| | | responseType: 'blob' |
| | | }); |
| | | } |
| | | // æ¥è¯¢äººå å¹è®è®°å½ |
| | | 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 delUserDepardLimsId(query) { |
| | | return request({ |
| | | url: "/system/newUser/delUserDepardLimsId", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | // ä¿®æ¹äººåæç»æå¨ç»ç»æ¶æ |
| | | export function upUserDepardLimsId(query) { |
| | | return request({ |
| | | url: "/system/newUser/upUserDepardLimsId", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å¯¼åº |
| | | export function exportPersonBasicInfo(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/exportPersonBasicInfo", |
| | | method: "get", |
| | | data: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // å¯¼åº |
| | | export function exportPersonBasicInfoById(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/exportPersonBasicInfoById", |
| | | method: "get", |
| | | data: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // è·å人åå表 |
| | | export function basicInformationOfPersonnelSelectPage(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/basicInformationOfPersonnelSelectPage", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // å é¤é¨é¨ |
| | | export function delDepartmentLims(query) { |
| | | return request({ |
| | | url: "/department/delDepartmentLims", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
| | | // æ·»å é¨é¨ |
| | | export function addDepartmentLims(query) { |
| | | return request({ |
| | | url: "/department/addDepartmentLims", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // æ¥è¯¢CNAS人åä¾§è¾¹æ |
| | | export function selectCNSAPersonTree() { |
| | | return request({ |
| | | url: "/personBasicInfo/selectCNSAPersonTree", |
| | | method: "get" |
| | | }); |
| | | } |
| | | // 人åå¹è®åºæ¬ä¿¡æ¯éä»¶å表 |
| | | export function getBasicInfoFileList(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getBasicInfoFileList", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // å é¤éä»¶ |
| | | export function delBasicInfoFileList(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/delBasicInfoFileList", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
| | | // 人åå¹è®åºæ¬ä¿¡æ¯å·¥ä½ç»åæ°å¢ |
| | | export function addBasicInfoWork(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/addBasicInfoWork", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // 人åå¹è®åºæ¬ä¿¡æ¯å·¥ä½ç»åä¿®æ¹ |
| | | export function updateBasicInfoWorkList(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/updateBasicInfoWorkList", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // 人åå¹è®åºæ¬ä¿¡æ¯å·¥ä½ç»åå é¤ |
| | | export function delBasicInfoWorkList(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/delBasicInfoWorkList", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
| | | // 人åå¹è®åºæ¬ä¿¡æ¯å·¥ä½ç»åæ¥è¯¢ |
| | | export function getBasicInfoWorkList(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getBasicInfoWorkList", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // è·åéä»¶ |
| | | export function getAnnex(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getAnnex", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // æ´æ°éä»¶ |
| | | export function updateAnnex(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/updateAnnex", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // æ´æ°éä»¶ |
| | | export function getAnnexByUserId(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getAnnexByUserId", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // æ·»å éä»¶ |
| | | export function addAnnex(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/addAnnex", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // å é¤éä»¶ |
| | | export function deleteAnnex(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/deleteAnnex", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
| | | // 人ååºæ¬ä¿¡æ¯æ¥è¯¢ |
| | | export function getCNASPersonnelInfo(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/getCNASPersonnelInfo", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // 人ååºæ¬ä¿¡æ¯ä¿å |
| | | export function saveCNASPersonnelInfo(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/saveCNASPersonnelInfo", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // å 餿件 |
| | | export function deleteCNASFile(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/deleteCNASFile", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢äººåå¹è® |
| | | export function personTraining(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(query) { |
| | | return request({ |
| | | url: "/personTraining/reviewAnnualPersonnelTraining", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // æ¹å 年度人åå¹è® |
| | | export function approveAnnualPersonnelTraining(query) { |
| | | return request({ |
| | | url: "/personTraining/approveAnnualPersonnelTraining", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // 导åºäººåå¹è® |
| | | export function exportPersonTraining(query) { |
| | | return request({ |
| | | url: "/personTraining/exportPersonTraining", |
| | | method: "get", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // 导åºäººåå¹è®ä¸èæ ¸è®°å½ |
| | | export function exportPersonTrainingRecord(query) { |
| | | return request({ |
| | | url: "/personTraining/exportPersonTrainingRecord", |
| | | method: "get", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // æ¹éå é¤ å¹´åº¦è®¡åæç»è¡¨ |
| | | export function deleteAnnualPlanDetailTable(query) { |
| | | return request({ |
| | | url: "/personTraining/deleteAnnualPlanDetailTable", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
| | | // æ¹éå é¤ å¹´åº¦è®¡åæç»è¡¨ |
| | | export function addOrUpdatePersonTrainingDetailed(query) { |
| | | return request({ |
| | | url: "/personTraining/addOrUpdatePersonTrainingDetailed", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // å¹è®ä¸èæ ¸è®°å½ æ¥è¯¢ |
| | | export function trainingAndAssessmentRecordsPage(query) { |
| | | return request({ |
| | | url: "/personTraining/trainingAndAssessmentRecordsPage", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // å¹è®ä¸èæ ¸ å¤±ç¦æ´æ° |
| | | export function outOfFocusPreservation(query) { |
| | | return request({ |
| | | url: "/personTraining/outOfFocusPreservation", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // å¹è®ä¸èæ ¸ æ°å¢äººå |
| | | export function newPersonnelAddedToTrainingRecords(query) { |
| | | return request({ |
| | | url: "/personTraining/newPersonnelAddedToTrainingRecords", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // å¹è®ä¸èæ ¸ å é¤äººå |
| | | export function deleteTrainingAndAssessmentRecords(query) { |
| | | return request({ |
| | | url: "/personTraining/deleteTrainingAndAssessmentRecords", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
| | | // å¹è®ä¸èæ ¸è®°å½ æäº¤ |
| | | export function trainingAndAssessmentRecordsAdded(query) { |
| | | return request({ |
| | | url: "/personTraining/trainingAndAssessmentRecordsAdded", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // å¹è®ä¸èæ ¸è®°å½ æäº¤è¯ä»· |
| | | export function trainingAndAssessmentRecordsEvaluate(query) { |
| | | return request({ |
| | | url: "/personTraining/trainingAndAssessmentRecordsEvaluate", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | |
| | | // 人åå¹è®è¯¦æ
éä»¶å表 |
| | | export function getTrainingDetailedFileList(query) { |
| | | return request({ |
| | | url: "/personTraining/getTrainingDetailedFileList", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // 人åå¹è®è¯¦æ
éä»¶å é¤ |
| | | export function delTrainingDetailedFileList(query) { |
| | | return request({ |
| | | url: "/personTraining/delTrainingDetailedFileList", |
| | | method: "delete", |
| | | params: query |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // å®éªå®¤çæ£æµè½åæ¡£æ¡ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //æ åæ¹æ³æ´æ°éªè¯å表 |
| | | export function pagesMethodVerify(query) { |
| | | return request({ |
| | | url: "/processMethodVerify/pagesMethodVerify", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è·åç¨æ·å表 |
| | | export function selectUserCondition(query) { |
| | | return request({ |
| | | url: "/system/newUser/selectUserCondition", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢æ åæ¹æ³éªè¯è¯¦æ
|
| | | export function getMethodVerifyOne(query) { |
| | | return request({ |
| | | url: "/processMethodVerify/getMethodVerifyOne", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // éè¿è®¾å¤åç±»è·å设å¤å表 |
| | | export function deviceScopeSearch(query) { |
| | | return request({ |
| | | url: '/deviceScope/search', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢æ åæ¹æ³éªè¯ |
| | | export function addMethodVerify(data) { |
| | | return request({ |
| | | url: "/processMethodVerify/addMethodVerify", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹æ åæ¹æ³éªè¯ |
| | | export function updateMethodVerify(data) { |
| | | return request({ |
| | | url: "/processMethodVerify/updateMethodVerify", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å¯¼åºæ åæ¹æ³æ´æ°éªè¯ |
| | | export function exportMethodVerify(query) { |
| | | return request({ |
| | | url: '/processMethodVerify/exportMethodVerify', |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }) |
| | | } |
| | | |
| | | // éªè¯ç¡®è®¤ |
| | | export function methodVerifyAffirm(query) { |
| | | return request({ |
| | | url: '/processMethodVerify/methodVerifyAffirm', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // å 餿 åæ¹æ³æ´æ°éªè¯ |
| | | export function delMethodVerify(query) { |
| | | return request({ |
| | | url: '/processMethodVerify/delMethodVerify', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // åå§è®°å½å表 |
| | | export function getVerifyMethodFileList(query) { |
| | | return request({ |
| | | url: '/processMethodVerify/getVerifyMethodFileList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // å é¤éªè¯åå§è®°å½å表 |
| | | export function delVerifyMethodFileList(query) { |
| | | return request({ |
| | | url: '/processMethodVerify/delVerifyMethodFileList', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // å®éªå®¤çæ£æµè½åæ¡£æ¡ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ 忥æ°å表 |
| | | export function pageMethodSearchNew(query) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/pageMethodSearchNew", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢åæ¡£ |
| | | export function pageSearchNewArchived(query) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/pageSearchNewArchived", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢æ 忥æ°å®¡æ¹æµç¨ |
| | | export function addSearchNewArchived(data) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/addSearchNewArchived", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢æ åæ¥æ° |
| | | export function addMethodSearchNew(data) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/addMethodSearchNew", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹æ åæ¥æ° |
| | | export function updateMethodSearchNew(data) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/updateMethodSearchNew", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // åæ¡£æ¹å |
| | | export function ratifySearchNewArchivedr(data) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/ratifySearchNewArchivedr", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢åæ¡£å¤ä»½å表 |
| | | export function pageSearchNewBackups(query) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/pageSearchNewBackups", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å¯¼åºæ åæ¥æ° |
| | | export function exportMethodSearchNew(query) { |
| | | return request({ |
| | | url: "/processMethodSearchNew/exportMethodSearchNew", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // è·åç¨æ·å表 |
| | | export function selectUserCondition(query) { |
| | | return request({ |
| | | url: "/system/newUser/selectUserCondition", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | height: 32px; |
| | | margin-bottom: 10px; |
| | | margin-top: 15px; |
| | | padding: 10px 20px !important; |
| | | padding: 0 20px !important; |
| | | } |
| | | |
| | | /* tree border */ |
| | |
| | | <style scoped> |
| | | .pagination-container { |
| | | background: #fff; |
| | | padding: 32px 16px; |
| | | padding: 28px 16px; |
| | | margin-top: 10px; |
| | | } |
| | | .pagination-container.hidden { |
| | | display: none; |
| | |
| | | import DictData from "@/components/DictData"; |
| | | import { checkPermi } from "@/utils/permission"; // æé夿彿° |
| | | import { getToken } from "@/utils/auth"; |
| | | // æ¶é´è½¬æ¢ |
| | | import Moment from "moment"; |
| | | |
| | | // å
¨å±æ¹æ³æè½½ |
| | | Vue.prototype.getDicts = getDicts; |
| | |
| | | }); |
| | | }, |
| | | }); |
| | | Vue.use(Moment); |
| | | Vue.prototype.$moment = Moment; |
| | | |
| | | // å
¨å±ç»ä»¶æè½½ |
| | | Vue.component("DictTag", DictTag); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Add class to element |
| | | * CommunicateAdd class to element |
| | | * @param {HTMLElement} elm |
| | | * @param {string} cls |
| | | */ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="dialogTitle" |
| | | width="60%" |
| | | :visible.sync="dialogVisible" |
| | | > |
| | | <el-form :model="model" label-width="100px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项ç®åç§°"> |
| | | <el-select |
| | | v-model="model.name" |
| | | placeholder="è¯·éæ©é¡¹ç®åç§°" |
| | | style="width: 100%" |
| | | :disabled="row ? true:false" |
| | | @change="handleSelect" |
| | | > |
| | | <el-option |
| | | v-for="(v, i) in consumableOptions" |
| | | :label="v.consumablesName" |
| | | :value="v" |
| | | :key="i" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¶èæ°é"> |
| | | <el-input-number v-model="model.amount" :min="0" :step="1" placeholder="请è¾å
¥æ¶èæ°é"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="sumbit">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { |
| | | addProcurementSuppliesExpends, |
| | | procurementSuppliesList |
| | | } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogTitle: "", |
| | | dialogVisible: false, |
| | | model: { |
| | | listId: undefined, |
| | | name: "" |
| | | }, |
| | | consumableOptions: [], |
| | | row: undefined |
| | | } |
| | | }, |
| | | created() { |
| | | this.fetchConsumableOptions() |
| | | }, |
| | | methods: { |
| | | fetchConsumableOptions() { |
| | | procurementSuppliesList().then(res => { |
| | | if (res.code === 200) { |
| | | this.consumableOptions = res.data.records |
| | | } |
| | | }) |
| | | }, |
| | | openDialog(row) { |
| | | if(row) { |
| | | console.log(row, 'true') |
| | | this.dialogTitle = `${row.consumablesName}æ·»å æ¶è项` |
| | | this.row = row |
| | | this.model.listId = row.id |
| | | this.model.name = row.consumablesName |
| | | } else { |
| | | this.dialogTitle = 'æ·»å æ¶è项' |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | handleSelect(item) { |
| | | console.log(item) |
| | | this.model.listId = item.id |
| | | this.model.name = item.consumablesName |
| | | }, |
| | | sumbit() { |
| | | addProcurementSuppliesExpends(this.model).then(res => { |
| | | if (res.code === 200) { |
| | | this.dialogVisible = false |
| | | this.$emit('submit') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <TableCard :showTitle="false"> |
| | | <template slot="form"> |
| | | <div class="action-box"> |
| | | <div></div> |
| | | <div class="flex"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="showDialog(undefined)"> |
| | | æ°å»º |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" size="small" @click="exportExcel"> |
| | | 导åºExcel |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable |
| | | :column="columns" |
| | | :currentChange="rowClick" |
| | | :height="'25vh'" |
| | | :highlightCurrentRow="true" |
| | | :isSelection="false" |
| | | :rowStyle="tableRowStyle" |
| | | :table-data="tableData" |
| | | rowKey="id" |
| | | style="margin-top: 18px; padding: 0 15px;" |
| | | > |
| | | <template v-slot:consumablesTypeSlot="{row}"> |
| | | {{ findType(row.consumablesType) }} |
| | | </template> |
| | | <template v-slot:operation="scope"> |
| | | <el-button size="small" type="text" @click="showDialog(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" style="color: #f56c6c" type="text" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </limsTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="pagination.pageSize" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="pagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleCurrent" |
| | | @size-change="handleSize" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | <el-divider></el-divider> |
| | | <div> |
| | | <ConsumableProject ref="consumableProject"></ConsumableProject> |
| | | </div> |
| | | <Edit ref="editRef" :contentsId="contentsId" @submit="fetchData"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from './index.vue'; |
| | | import Edit from "./Edit.vue" |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | deleteProcurementSuppliesList, |
| | | procurementSuppliesList, |
| | | exportProcurementSuppliesList |
| | | } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro"; |
| | | import ConsumableProject from "./ConsumableProject.vue" |
| | | |
| | | export default { |
| | | dicts: ["consumables_type"], |
| | | components: { |
| | | TableCard, limsTable,Edit, ConsumableProject |
| | | }, |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | required: true, |
| | | } |
| | | }, |
| | | watch: { |
| | | contentsId(newVal, oldVal) { |
| | | if (newVal !== 0) { |
| | | this.fetchData() |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | label: "è´§å·", |
| | | prop: "itemNumber" |
| | | }, |
| | | { |
| | | label: "ç±»å«", |
| | | prop: "consumablesType", |
| | | dataType: "slot", |
| | | slot: "consumablesTypeSlot" |
| | | }, |
| | | { |
| | | label: "åç§°", |
| | | prop: "consumablesName" |
| | | }, |
| | | { |
| | | label: "è§æ ¼", |
| | | prop: "specifications" |
| | | }, |
| | | { |
| | | label: "åèä¾åºå", |
| | | prop: "supplierName" |
| | | }, |
| | | { |
| | | label: "åºåä¸é", |
| | | prop: "lowerLimit" |
| | | }, |
| | | { |
| | | label: "å½ååºå", |
| | | prop: "currentAmount" |
| | | }, |
| | | { |
| | | label: "计éåä½", |
| | | prop: "unit" |
| | | }, |
| | | { |
| | | label: "夿³¨", |
| | | prop: "remark" |
| | | }, |
| | | { |
| | | label: "è´è´£äºº", |
| | | prop: "personInChargeName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°äºº", |
| | | prop: "updateUserName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°æ¥æ", |
| | | prop: "updateTime" |
| | | }, |
| | | { |
| | | fixed: 'right', |
| | | label: "æä½", |
| | | width: 120, |
| | | dataType: "slot", |
| | | slot: "operation" |
| | | } |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | options: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.fetchData() |
| | | this.options = this.dict.type.consumables_type; |
| | | }, |
| | | methods: { |
| | | async fetchData() { |
| | | procurementSuppliesList({ contentId: this.contentsId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | | if (this.tableData.length > 0) { |
| | | this.rowClick(this.tableData[0]) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | findType(val) { |
| | | this.$nextTick() |
| | | let res |
| | | const e = this.options.find(item => item.value == val) |
| | | if(e) { |
| | | res = e.label |
| | | } else { |
| | | res = '-' |
| | | } |
| | | return res |
| | | }, |
| | | showDialog(row) { |
| | | this.$refs.editRef.openDialog(row); |
| | | }, |
| | | async exportExcel() { |
| | | exportProcurementSuppliesList({parentId:this.contentsId}).then(res => { |
| | | const blob = new Blob([res], {type: 'application/octet-stream'}); |
| | | this.$download.saveAs(blob, 'èæå表.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | handleCurrent() { |
| | | }, |
| | | handleSize() { |
| | | }, |
| | | handleDelete(row) { |
| | | deleteProcurementSuppliesList({ id:row.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.fetchData() |
| | | } |
| | | }) |
| | | }, |
| | | rowClick(row) { |
| | | this.$refs.consumableProject.fetchListId(row) |
| | | }, |
| | | tableRowStyle({row}) { |
| | | if(row.currentAmount <= row.lowerLimit) { |
| | | return { background: '#ffcaca' } |
| | | } else { |
| | | return {} |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style scoped> |
| | | .flex { |
| | | display: flex; |
| | | } |
| | | |
| | | .action-box { |
| | | width: 100%; |
| | | padding-top: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | padding-top: 15px; |
| | | padding-right: 10px; |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | </style> |
| | |
| | | import TableCard from './index.vue'; |
| | | import { procurementSuppliesList } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro" |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import axios from "axios"; |
| | | |
| | | export default { |
| | | components: { CardPanel, TableCard, limsTable }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <TableCard :showTitle="false"> |
| | | <template slot="form"> |
| | | <div class="action-box"> |
| | | <div></div> |
| | | <div class="flex"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="showDialog"> |
| | | æ·»å é¡¹ç® |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" size="small" @click="exportExcel"> |
| | | å¯¼åº |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable |
| | | :column="columns" |
| | | :height="'25vh'" |
| | | :isSelection="true" |
| | | :table-data="tableData" |
| | | style="margin-top: 18px; padding: 0 15px;" |
| | | > |
| | | <template v-slot:operation="scope"> |
| | | <el-button size="small" type="text" @click="deleteData(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </limsTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="pagination.pageSize" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="pagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleCurrent" |
| | | @size-change="handleSize" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | <AddProject ref="AddProjectRef" @submit="fetchData"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from './index.vue'; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import Edit from "./Edit.vue" |
| | | import AddProject from './AddProject.vue'; |
| | | import { |
| | | deleteProcurementSuppliesExpends, |
| | | procurementSuppliesExpendlist |
| | | } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro"; |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, limsTable, Edit, AddProject |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | // { |
| | | // label: "ç¼å·" |
| | | // }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "listName" |
| | | }, |
| | | { |
| | | label: "æ¶èæ°é", |
| | | prop: "amount" |
| | | }, |
| | | { |
| | | label: "å½å
¥äºº", |
| | | prop: "enterUserName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°äºº", |
| | | prop: "updateUserName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°æ¥æ", |
| | | prop: "updateTime" |
| | | }, |
| | | { |
| | | label: "æä½", |
| | | dataType: "slot", |
| | | slot: "operation" |
| | | } |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | listId: 0, |
| | | row: undefined |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.fetchData() |
| | | }, |
| | | methods: { |
| | | fetchListId(row) { |
| | | if(row) { |
| | | this.listId = row.id |
| | | this.row = row |
| | | } |
| | | this.fetchData() |
| | | }, |
| | | async fetchData() { |
| | | if (this.listId === 0) return |
| | | procurementSuppliesExpendlist({ |
| | | procurementSuppliesListId:this.listId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data |
| | | } |
| | | }) |
| | | }, |
| | | showDialog() { |
| | | this.$refs.AddProjectRef.openDialog(this.row); |
| | | }, |
| | | deleteData(row) { |
| | | deleteProcurementSuppliesExpends({ expendId:row.expendId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.fetchData() |
| | | } |
| | | }) |
| | | }, |
| | | handleCurrent() { |
| | | }, |
| | | handleSize() { |
| | | }, |
| | | exportExcel() { |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .flex { |
| | | display: flex; |
| | | } |
| | | |
| | | .action-box { |
| | | width: 100%; |
| | | padding-top: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | padding-top: 15px; |
| | | padding-right: 10px; |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | title="æ·»å èæé¡¹ç®ä¿¡æ¯" |
| | | width="70%" |
| | | > |
| | | <el-form ref="modelForm" :model="model" :rules="rules" label-width="100px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èæç±»å" prop="consumablesType"> |
| | | <el-select v-model="model.consumablesType" placeholder="è¯·éæ©èæç±»å" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in dict.type.consumables_type" :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="è´§å·"> |
| | | <el-input v-model="model.itemNumber" placeholder="请è¾å
¥è´§å·" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èæåç§°"> |
| | | <el-input v-model="model.consumablesName" placeholder="请è¾å
¥èæåç§°" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼"> |
| | | <el-input v-model="model.specifications" placeholder="请è¾å
¥è§æ ¼" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计éåä½"> |
| | | <el-input v-model="model.unit" placeholder="请è¾å
¥è®¡éåä½" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åèä»·æ ¼"> |
| | | <el-input-number v-model="model.referencePrice" :min="0" :precision="2" :step="0.01" placeholder="请è¾å
¥åèä»·æ ¼" |
| | | size="small"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åæ¾ä½ç½®"> |
| | | <el-select v-model="model.contentId" placeholder="è¯·éæ©åæ¾ä½ç½®" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in procurementSuppliesContentOptions" :key="i" :label="v.nodeName" |
| | | :value="v.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´è´£äºº"> |
| | | <el-select v-model="model.personInCharge" placeholder="è¯·éæ©è´è´£äºº" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in userOptions" :key="i" :label="v.name" :value="v.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºåä¸é"> |
| | | <el-input-number v-model="model.upperLimit" :min="0" :step="1" placeholder="请è¾å
¥åºåä¸é" size="small"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºåä¸é"> |
| | | <el-input-number v-model="model.lowerLimit" :min="0" :step="1" placeholder="请è¾å
¥åºåä¸é" size="small"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ä¾åºå"> |
| | | <el-select v-model="model.supplier" placeholder="è¯·éæ©ä¾åºå" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in supplierOptions" :key="i" :label="v.supplierName" |
| | | :value="v.supplierManagementId"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="èæå¾æ "> |
| | | <div class="rows"> |
| | | <el-input v-model="model.consumablesIcon" placeholder="请è¾å
¥èæå¾æ " size="small" style="width: 90%;"/> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="action" |
| | | :headers="uploadHeader" |
| | | :on-success="onSuccessIcon" |
| | | :show-file-list="false" |
| | | style="float: left; margin: 0 12px 0 20px;" |
| | | > |
| | | <el-button slot="trigger" class="uploadFile" size="small" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="èæéä»¶"> |
| | | <div class="rows"> |
| | | <el-input v-model="model.attachment" placeholder="请è¾å
¥èæéä»¶" size="small" style="width: 90%;"/> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="action" |
| | | :on-success="onSuccessFile" |
| | | :show-file-list="false" |
| | | :headers="uploadHeader" |
| | | style="float: left; margin: 0 12px 0 20px;" |
| | | > |
| | | <el-button slot="trigger" class="uploadFile" size="small" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input |
| | | v-model="model.remark" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | size="small" |
| | | type="textarea" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetForm">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addProcurementSuppliesList, |
| | | updateProcurementSuppliesList, |
| | | selectSupplierManagementAll, |
| | | getProcurementSuppliesContentsNodeNames, |
| | | selectUserCondition |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | model: { |
| | | consumablesType: undefined, |
| | | consumablesIcon: undefined, |
| | | attachment: undefined, |
| | | }, |
| | | procurementSuppliesContentOptions: [], |
| | | userOptions: [], |
| | | supplierOptions: [], |
| | | rules: { |
| | | consumablesType: [{ required: true, message: 'è¯·éæ©èæç±»å', trigger: 'blur' }], |
| | | }, |
| | | } |
| | | }, |
| | | dicts: ["consumables_type"], |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | required: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.findProcurementSuppliesContentOptions() |
| | | this.findUserOptions() |
| | | this.findSupplierOptions() |
| | | }, |
| | | methods: { |
| | | // é置表å |
| | | resetForm() { |
| | | this.$refs.modelForm.resetFields(); |
| | | this.dialogVisible = false |
| | | }, |
| | | openDialog(row) { |
| | | if (row) { |
| | | console.log("row", row) |
| | | this.model = row |
| | | } else { |
| | | this.model = {} |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | findProcurementSuppliesContentOptions() { |
| | | getProcurementSuppliesContentsNodeNames().then(res => { |
| | | if (res.code === 200) { |
| | | this.procurementSuppliesContentOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | findUserOptions() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 200) { |
| | | this.userOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | findSupplierOptions() { |
| | | selectSupplierManagementAll().then(res => { |
| | | if (res.code === 200) { |
| | | this.supplierOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | async onSuccessIcon(response) { |
| | | this.$set(this.model, "consumablesIcon", response.data) |
| | | }, |
| | | async onSuccessFile(response) { |
| | | this.$set(this.model, "attachment", response.data) |
| | | }, |
| | | submit() { |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | if (this.model.id) { |
| | | updateProcurementSuppliesList(this.model).then(res => { |
| | | if (res.code === 200) { |
| | | this.dialogVisible = false |
| | | } |
| | | }) |
| | | } else { |
| | | addProcurementSuppliesList(this.model).then(res => { |
| | | if (res.code === 200) { |
| | | this.dialogVisible = false |
| | | this.$emit('submit') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | >>> .el-dialog__body { |
| | | max-height: 42em; |
| | | overflow-y: auto; |
| | | } |
| | | .rows { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | >>>.el-form-item__content { |
| | | line-height: 39px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div style=" |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | margin-right: 20px; |
| | | margin-bottom: 20px; |
| | | "> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateStore('add')">æ·»å |
| | | </el-button> |
| | | <el-button icon="el-icon-download" size="small" @click="importExcel"> |
| | | 导åºexcel |
| | | </el-button> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable |
| | | :column="tableColumn" |
| | | :height="'calc(100vh - 20em)'" |
| | | :table-data="storageTableData" |
| | | :table-loading="tableLoading" |
| | | style="padding: 0 10px;margin-bottom: 16px" |
| | | :page="page" |
| | | @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | |
| | | <!-- ç¼è¾-æ°å¢å¼¹æ¡ --> |
| | | <el-dialog :before-close="handleClose" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" :title="title" |
| | | :visible.sync="dialogVisible" width="70%"> |
| | | <!-- å
¥åºå --> |
| | | <div> |
| | | <div style="display: flex; align-items: center"> |
| | | <span style="margin-left: 10px">å
¥åºå</span> |
| | | </div> |
| | | <el-form ref="formModel" :model="form" label-width="auto"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºåå·"> |
| | | <el-input v-model="form.oddNumbers" placeholder="请è¾å
¥å
¥åºåå·" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºåºå"> |
| | | <el-input v-model="form.inventory" placeholder="请è¾å
¥å
¥åºåºå" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºæ»éé¢"> |
| | | <el-input v-model="form.totalAmount" placeholder="请è¾å
¥å
¥åºæ»éé¢" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºæ¥æ"> |
| | | <el-date-picker v-model="form.storageTime" format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | 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="å
¥åºäºº"> |
| | | <el-select v-model="form.storageUser" size="small" style="width: 100%"> |
| | | <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºè¯´æ"> |
| | | <el-input v-model="form.remark" :rows="2" placeholder="请è¾å
¥å
容" type="textarea"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </div> |
| | | <!-- å
¥åºæç» --> |
| | | <div> |
| | | <div>å
¥åºæç»</div> |
| | | <div class="input-form"> |
| | | <div> |
| | | <div> |
| | | <span>èæåç§°:</span> |
| | | <el-select v-model="formTwo.id" filterable placeholder="è¯·éæ©èæåç§°" size="small" style="width: 70%"> |
| | | <el-option v-for="(v, i) in consumableOptions" :key="i" :label="v.consumablesName" |
| | | :value="v.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div> |
| | | <span>åä»·:</span> |
| | | <el-input v-model="formTwo.unitPrice" placeholder="请è¾å
¥åä»·" size="small" style="width: 70%"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div> |
| | | <span>å
¥åºæ°é:</span> |
| | | <el-input v-model="formTwo.storeNumber" placeholder="请è¾å
¥å
¥åºæ°é" size="small" style="width: 70%"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div> |
| | | <span>æ»ä»·:</span> |
| | | <el-input v-model="formTwo.totalPrice" placeholder="请è¾å
¥æ»ä»·" size="small" style="width: 70%"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <el-button size="mini" type="primary" |
| | | @click="addTableData">æ·»å |
| | | </el-button> |
| | | </div> |
| | | <el-table :data="consumables" style="margin-top: 10px"> |
| | | <el-table-column label="ç¼å·" type="index" width="120px"></el-table-column> |
| | | <el-table-column label="è´§å·" prop="itemNumber"></el-table-column> |
| | | <el-table-column label="ç±»å«" prop="type"></el-table-column> |
| | | <el-table-column label="åç§°" prop="consumablesName"></el-table-column> |
| | | <el-table-column label="è§æ ¼" prop="specifications"></el-table-column> |
| | | <el-table-column label="åèä¾åºå" prop="supplier"></el-table-column> |
| | | <el-table-column label="计éåä½" prop="unit"></el-table-column> |
| | | <el-table-column label="åä»·" prop="unitPrice"></el-table-column> |
| | | <el-table-column label="å
¥åºæ°é" prop="storeNumber"></el-table-column> |
| | | <el-table-column label="æ»ä»·" prop="totalPrice"></el-table-column> |
| | | <el-table-column label="æä½" width="80px"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" style="color: #f56c6c" type="text" @click="deleteTableData(scope.$index)">å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button type="primary" :loading="saveLoading" @click="save">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addStore, |
| | | deleteStore, |
| | | exportProcurementSuppliesStoreExcel, |
| | | procurementSuppliesList, |
| | | selectStoreById, |
| | | selectUserCondition, |
| | | storeList, |
| | | updateStore |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | |
| | | export default { |
| | | computed: { |
| | | title() { |
| | | return this.dialogType == "add" ? "æ°å»ºå
¥åº" : "ç¼è¾å
¥åº"; |
| | | }, |
| | | }, |
| | | dicts: ["consumables_type"], |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | default: 0 |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | mutiList: [], |
| | | consumables: [], |
| | | users: [], |
| | | form: { |
| | | oddNumbers: null, |
| | | inventory: null, |
| | | totalAmount: null, |
| | | storageTime: null, |
| | | storageUser: null, |
| | | remark: null, |
| | | }, |
| | | formTwo: { |
| | | consumablesName: null, |
| | | unitPrice: null, |
| | | storeNumber: null, |
| | | totalPrice: null, |
| | | }, |
| | | dialogVisible: false, |
| | | dialogType: "", |
| | | upIndex: 0, |
| | | tableColumn: [ |
| | | { |
| | | label: 'å
¥åºåå·', |
| | | prop: 'oddNumbers', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'èæåç§°', |
| | | prop: 'consumablesName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
¥åºæ°é', |
| | | prop: 'storeNumber', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
¥åºæ»ä»·', |
| | | prop: 'totalPrice', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
¥åºäºº', |
| | | prop: 'storageUserName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å
¥åºæ¥æ', |
| | | prop: 'storageTime', |
| | | minWidth: '100' |
| | | }, { |
| | | label: '说æ', |
| | | prop: 'remark', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç»è®°äºº', |
| | | prop: 'registrantName', |
| | | minWidth: '160' |
| | | },{ |
| | | label: 'ç»è®°æ¥æ', |
| | | prop: 'registrantTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '120', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.addOrUpdateStore('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteStore(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | consumableOptions: [], |
| | | options: [], |
| | | storageTableData: [], |
| | | searchForm: { |
| | | orderBy: { |
| | | field: "id", |
| | | order: "desc", |
| | | }, |
| | | }, |
| | | saveLoading: false, |
| | | }; |
| | | }, |
| | | components: { |
| | | limsTable, |
| | | }, |
| | | mounted() { |
| | | this.searchList(); |
| | | this.getUserList(); |
| | | this.fetchListOptions() |
| | | this.options = this.dict.type.consumables_type |
| | | }, |
| | | methods: { |
| | | // ä¿å |
| | | save() { |
| | | let data = { |
| | | store: this.form, |
| | | consumables: this.consumables, |
| | | }; |
| | | this.saveLoading = true; |
| | | if (this.dialogType === "update") { |
| | | updateStore(data).then((res) => { |
| | | this.saveLoading = false |
| | | if (res.code == 200) { |
| | | this.$message.success("ä¿®æ¹æå"); |
| | | this.handleClose(); |
| | | // this.$refs.selectList() |
| | | this.searchList() |
| | | } |
| | | }).catch((err) => { |
| | | this.saveLoading = false |
| | | }) |
| | | } else { |
| | | addStore(data).then((res) => { |
| | | this.saveLoading = false |
| | | if (res.code == 200) { |
| | | this.$message.success("æ°å¢æå"); |
| | | this.handleClose(); |
| | | // this.$refs.selectList() |
| | | this.searchList() |
| | | } |
| | | }).catch((err) => { |
| | | this.saveLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | findType(val) { |
| | | console.log(val) |
| | | return this.options.find(item => item.value === val).label |
| | | }, |
| | | // æ·»å è¡¨æ ¼æ°æ® |
| | | addTableData() { |
| | | this.$nextTick() |
| | | console.log('this.consumableOptions',this.consumableOptions) |
| | | this.consumableOptions.forEach(item => { |
| | | if (item.id === this.formTwo.id) { |
| | | this.consumables.push({ |
| | | itemNumber: null, |
| | | type: this.findType(item.consumablesType), |
| | | consumablesName: item.consumablesName, |
| | | specifications: item.specifications, |
| | | supplier: item.supplierName, |
| | | unit: item.unit, |
| | | unitPrice: this.formTwo.unitPrice, |
| | | storeNumber: this.formTwo.storeNumber, |
| | | totalPrice: this.formTwo.totalPrice, |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | deleteTableData(index) { |
| | | this.consumables.splice(index, 1); |
| | | }, |
| | | // æå¼å¼¹æ¡ |
| | | addOrUpdateStore(type,row) { |
| | | if (type === 'edit') { |
| | | this.dialogType = "update"; |
| | | selectStoreById({id:row.id}).then(res => { |
| | | if (res.code === 201) return |
| | | this.consumables = res.data.consumables |
| | | this.form = {...res.data.store} |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | } else { |
| | | this.dialogType = "add"; |
| | | } |
| | | this.dialogVisible = true; |
| | | }, |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | this.tableLoading = true |
| | | storeList({...this.page,...this.searchForm}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.storageTableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // 导åºexcel |
| | | async importExcel() { |
| | | exportProcurementSuppliesStoreExcel({parentId:this.contentsId}).then(res => { |
| | | const blob = new Blob([res], {type: 'application/octet-stream'}); |
| | | this.$download.saveAs(blob, 'èæå
¥åº.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.form = { |
| | | oddNumbers: null, |
| | | inventory: null, |
| | | totalAmount: null, |
| | | storageTime: null, |
| | | storageUser: null, |
| | | remark: null, |
| | | }; |
| | | this.formTwo = { |
| | | consumablesName: null, |
| | | unitPrice: null, |
| | | storeNumber: null, |
| | | totalPrice: null, |
| | | }; |
| | | this.consumables = []; |
| | | this.dialogVisible = false; |
| | | }, |
| | | viewIssued(row) { |
| | | console.log(row); |
| | | }, |
| | | // è·åææç¨æ· |
| | | getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | this.users = res.data; |
| | | }); |
| | | }, |
| | | async fetchListOptions() { |
| | | procurementSuppliesList({contentsId: this.contentsId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.consumableOptions = res.data.records |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | // å é¤ |
| | | deleteStore (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | console.log('row>>>>>>>>>>>>>>s',row) |
| | | deleteStore({ |
| | | id:row.id, |
| | | consumablesId:row.consumablesId |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | .el-dialog__body { |
| | | max-height: 42em; |
| | | overflow-y: auto; |
| | | } |
| | | .input-form { |
| | | display: flex; |
| | | margin: 10px 0; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="parent-class"> |
| | | <div style="display: flex; justify-content: flex-end; margin-right: 20px"> |
| | | <el-button |
| | | type="primary" |
| | | @click="addContents" |
| | | size="small" |
| | | icon="el-icon-plus" |
| | | >æ·»å åèç¹</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | @click="deletetContents" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | >å é¤åèç¹</el-button |
| | | > |
| | | <el-button |
| | | type="warning" |
| | | @click="updateContents" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | >æ´æ°åèç¹</el-button |
| | | > |
| | | </div> |
| | | <el-form label-width="100px"> |
| | | <el-form-item label="èç¹åç§°"> |
| | | <el-input |
| | | v-model="form.nodeName" |
| | | style="width: 200px" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="代å·"> |
| | | <el-input |
| | | v-model="form.code" |
| | | style="width: 200px" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ°äºº"> |
| | | <el-select v-model="form.updateUser"> |
| | | <el-option |
| | | v-for="item in users" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ°æ¶é´"> |
| | | <el-input |
| | | v-model="form.updateTime" |
| | | style="width: 200px" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- æ°å¢å¼¹æ¡ --> |
| | | <el-dialog title="æ·»å èç¹" :visible.sync="dialogVisible" width="40%"> |
| | | <el-form |
| | | label-width="100px" |
| | | :model="addForm" |
| | | ref="addForm" |
| | | :rules="rules" |
| | | > |
| | | <el-form-item label="ç¶èç¹åç§°"> |
| | | <!-- <el-select v-model="addForm.parentId"> |
| | | <el-option v-for="(item,index) in nodeNames" :key="index" :label="item.nodeName" :value="item.id"></el-option> |
| | | </el-select> --> |
| | | <el-cascader |
| | | v-model="addForm.parentId" |
| | | :options="treeData" |
| | | :props="{ checkStrictly: true, value: 'id', label: 'nodeName' }" |
| | | clearable |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="èç¹åç§°" prop="nodeName"> |
| | | <el-input |
| | | v-model="addForm.nodeName" |
| | | style="width: 200px" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="代å·"> |
| | | <el-input |
| | | v-model="addForm.code" |
| | | style="width: 200px" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | |
| | | import { |
| | | addSuppliersDirectoryContents, |
| | | updateSuppliersDirectoryContents, |
| | | deleteSuppliersDirectoryContentsById, |
| | | getSuppliersDirectoryContentsNodeNames, |
| | | selectUserCondition, |
| | | selectProcurementSuppliesContentById, |
| | | getProcurementSuppliesContentsNodeNames, |
| | | addProcurementSuppliesContents, deleteProcurementSuppliesContentById |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | export default { |
| | | props: { |
| | | id: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | treeData: { |
| | | type: Array, |
| | | default: () => [], |
| | | }, |
| | | from: { |
| | | type: String, |
| | | default: "èææ " |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | nodeNames: [], |
| | | users: [], |
| | | dialogVisible: false, |
| | | form: { |
| | | nodeName: "", |
| | | code: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | }, |
| | | addForm: { |
| | | nodeName: "", |
| | | code: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | parentId: null, |
| | | }, |
| | | rules: { |
| | | nodeName: [ |
| | | { required: true, message: "请è¾å
¥èç¹åç§°", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | if (this.id !== 0) { |
| | | this.getContentsDetail(); |
| | | } |
| | | this.getNodeNames(); |
| | | this.getUserList(); |
| | | }, |
| | | watch: { |
| | | id(newVal, oldVal) { |
| | | if (newVal !== 0) { |
| | | console.log(newVal, oldVal); |
| | | this.getContentsDetail(); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // è·åç®å½è¯¦æ
|
| | | getContentsDetail() { |
| | | selectProcurementSuppliesContentById({id:this.id}) |
| | | .then((res) => { |
| | | if (res.data == null) { |
| | | this.form = { |
| | | nodeName: "", |
| | | code: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | }; |
| | | return; |
| | | } |
| | | this.form = res.data; |
| | | }); |
| | | }, |
| | | // æ°å»º |
| | | addContents() { |
| | | this.dialogVisible = true; |
| | | this.resetForm(); |
| | | }, |
| | | resetForm() { |
| | | this.addForm = { |
| | | nodeName: "", |
| | | code: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | parentId: null, |
| | | }; |
| | | }, |
| | | async submitForm() { |
| | | let flag = true; |
| | | this.$refs.addForm.validate((valid) => { |
| | | if (!valid) { |
| | | flag = false; |
| | | return false; |
| | | } |
| | | }); |
| | | if (this.addForm.parentId) { |
| | | this.addForm.parentId = |
| | | this.addForm.parentId[this.addForm.parentId.length - 1]; |
| | | } |
| | | if (!flag) { |
| | | return; |
| | | } |
| | | try { |
| | | let res = null |
| | | console.log('this.from',this.from) |
| | | if(this.from == 'èææ ' ){ |
| | | console.log('111') |
| | | res = await addProcurementSuppliesContents(this.addForm) |
| | | }else { |
| | | console.log('222') |
| | | res = await addSuppliersDirectoryContents(this.addForm) |
| | | } |
| | | if (res.code === 200) { |
| | | this.$message.success("æ·»å æå"); |
| | | this.dialogVisible = false; |
| | | this.$emit("contentsUpdate", res.data); |
| | | this.getContentsDetail(); |
| | | } |
| | | }catch (error){ |
| | | this.$message.error("æ·»å 失败"); |
| | | } |
| | | }, |
| | | // æ´æ° |
| | | updateContents() { |
| | | Object.keys(this.form).forEach((key) => { |
| | | if (key == "children") { |
| | | delete this.form[key]; |
| | | } |
| | | }); |
| | | updateSuppliersDirectoryContents(this.form).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("æ´æ°æå"); |
| | | this.$emit("contentsUpdate", this.id); |
| | | this.dialogVisible = false; |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | }, |
| | | // å é¤ |
| | | deletetContents() { |
| | | if ( |
| | | this.form.id == null || |
| | | this.form.id == "" || |
| | | this.form.id == undefined |
| | | ) { |
| | | this.$message.error("è¯·éæ©è¦å é¤çèç¹"); |
| | | return; |
| | | } |
| | | this.$confirm("æ¤æä½å°å é¤è¯¥èç¹, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | if(this.from == 'èææ '){ |
| | | deleteProcurementSuppliesContentById({id:this.form.id}).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.$emit("contentsUpdate", this.form.parentId, true); |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | }else { |
| | | deleteSuppliersDirectoryContentsById({id:this.form.id}).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.$emit("contentsUpdate", this.form.parentId, true); |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // è·åææç®å½èç¹ |
| | | getNodeNames() { |
| | | if(this.from == 'èææ '){ |
| | | getProcurementSuppliesContentsNodeNames().then(res => { |
| | | this.nodeNames = res.data; |
| | | }) |
| | | }else { |
| | | getSuppliersDirectoryContentsNodeNames().then(res => { |
| | | this.nodeNames = res.data; |
| | | }) |
| | | } |
| | | }, |
| | | // è·åææç¨æ· |
| | | getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | this.users = res.data; |
| | | }) |
| | | }, |
| | | }, |
| | | created() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .parent-class { |
| | | margin-top: 20px; |
| | | } |
| | | </style> |
| | |
| | | <el-tab-pane label="èææ»è§" name="first" :lazy="true"> |
| | | <ConsumableOverview v-if="activeName == 'first'" :contentsId="contentsId"></ConsumableOverview> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="èæå表" name="second" :lazy="true">--> |
| | | <!-- <ConsumableList v-if="activeName == 'second'" :contentsId="contentsId"></ConsumableList>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="èæå
¥åº" name="third" :lazy="true">--> |
| | | <!-- <Store v-if="activeName == 'third'" :contentsId="contentsId"></Store>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="ç®å½ç»´æ¤" name="fourth" :lazy="true">--> |
| | | <!-- <Contents--> |
| | | <!-- v-if="activeName == 'fourth'"--> |
| | | <!-- :id="contentsId"--> |
| | | <!-- @contentsUpdate="contentsUpdate"--> |
| | | <!-- :treeData="treeData"--> |
| | | <!-- from="èææ "--> |
| | | <!-- ></Contents>--> |
| | | <!-- </el-tab-pane>--> |
| | | <el-tab-pane label="èæå表" name="second" :lazy="true"> |
| | | <ConsumableList v-if="activeName == 'second'" :contentsId="contentsId"></ConsumableList> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="èæå
¥åº" name="third" :lazy="true"> |
| | | <Store v-if="activeName == 'third'" :contentsId="contentsId"></Store> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ç®å½ç»´æ¤" name="fourth" :lazy="true"> |
| | | <Contents |
| | | v-if="activeName == 'fourth'" |
| | | :id="contentsId" |
| | | @contentsUpdate="contentsUpdate" |
| | | :treeData="treeData" |
| | | from="èææ " |
| | | ></Contents> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | // import Contents from "@/components/do/a6.service-and-supply-purchase/contents.vue"; |
| | | // import Store from "@/components/do/a6.service-and-supply-purchase/store.vue"; |
| | | import ConsumableOverview from "../serviceAndSupplyPro/component/ConsumableOverview.vue"; |
| | | // import ConsumableList from "@/components/do/a6.service-and-supply-purchase/ConsumableList.vue" |
| | | import Contents from "./component/contents.vue"; |
| | | import Store from "./component/Store.vue"; |
| | | import ConsumableOverview from "./component/ConsumableOverview.vue"; |
| | | import ConsumableList from "./component/ConsumableList.vue" |
| | | import { |
| | | directoryListing |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | }; |
| | | }, |
| | | components: { |
| | | // Contents, |
| | | // Store, |
| | | ConsumableOverview |
| | | // ConsumableList |
| | | Contents, |
| | | Store, |
| | | ConsumableOverview, |
| | | ConsumableList |
| | | }, |
| | | watch: { |
| | | contentsId(newVal, oldVal) { |
| | |
| | | }, |
| | | // æ¥è¯¢ææç®å½ |
| | | getTreeData() { |
| | | this.$axios |
| | | .get(this.$api.procurementSuppliesContents.directoryListing) |
| | | .then((res) => { |
| | | directoryListing().then((res) => { |
| | | this.treeData = res.data; |
| | | }); |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="addTrainingPlanDia" title="æ°å¢å¹è®è®¡å" width="50%" @close="closeAdd"> |
| | | <div class="body"> |
| | | <el-form ref="trainingPlanForm" :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" |
| | | placeholder="éæ©æ¥æ" size="small" value-format="yyyy-MM" |
| | | type="month" style="width: 100%"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="课æ¶:" prop="classHour"> |
| | | <el-input type="number" v-model="trainingPlan.classHour" label="æè¿°æå" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®ç®æ :" prop="trainingObjectives"> |
| | | <el-input v-model="trainingPlan.trainingObjectives" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå 对象:" prop="participants"> |
| | | <el-input v-model="trainingPlan.participants" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®å
容:" prop="trainingContent"> |
| | | <el-input v-model="trainingPlan.trainingContent" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®è®²å¸:" prop="trainingLecturerId"> |
| | | <el-select v-model="trainingPlan.trainingLecturerId" |
| | | clearable filterable |
| | | placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹è®æ¹å¼:" prop="trainingMode"> |
| | | <el-input v-model="trainingPlan.trainingMode" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="举åé¨é¨:" prop="holdingDepartment"> |
| | | <el-input v-model="trainingPlan.holdingDepartment" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="夿³¨:" prop="remarks"> |
| | | <el-input v-model="trainingPlan.remarks" placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeAdd">å æ¶</el-button> |
| | | <el-button type="primary" :loading="submitAddLoading" @click="submitAdd">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {addOrUpdatePersonTrainingDetailed} from "@/api/cnas/personal/personalTraining"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | |
| | | export default { |
| | | props: { |
| | | currentChangeRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | }, |
| | | name: 'Add', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | addTrainingPlanDia: false, |
| | | submitAddLoading: false, |
| | | trainingPlan: { |
| | | planId: '', |
| | | id: '', |
| | | trainingDate: '', |
| | | classHour: '', |
| | | trainingObjectives: '', |
| | | participants: '', |
| | | trainingContent: '', |
| | | trainingLecturerId: '', |
| | | trainingMode: '', |
| | | holdingDepartment: '', |
| | | remarks: '', |
| | | }, |
| | | trainingPlanRules: { |
| | | trainingDate: [{ required: true, message: 'è¯·éæ©å¹è®æ¥æ', trigger: 'change' }], |
| | | trainingContent: [{ required: true, message: '请è¾å
¥å¹è®å
容', trigger: 'blur' }], |
| | | trainingLecturerId: [{ required: true, message: 'è¯·éæ©å¹è®è®²å¸', trigger: 'blur' }], |
| | | }, |
| | | responsibleOptions: [], |
| | | operationType: '' |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | showDialog(id, type, row) { |
| | | this.addTrainingPlanDia = true; |
| | | this.operationType = type |
| | | if (this.operationType === 'edit') { |
| | | this.trainingPlan = this.HaveJson(row) |
| | | } else { |
| | | this.trainingPlan = { |
| | | id: '', |
| | | trainingDate: '', |
| | | classHour: '', |
| | | trainingObjectives: '', |
| | | participants: '', |
| | | trainingContent: '', |
| | | trainingLecturerId: '', |
| | | trainingMode: '', |
| | | holdingDepartment: '', |
| | | remarks: '', |
| | | } |
| | | } |
| | | this.trainingPlan.planId = id |
| | | this.getUserList() |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | submitAdd() { |
| | | this.$refs.trainingPlanForm.validate((valid) => { |
| | | if (valid) { |
| | | this.submitAddLoading = true |
| | | this.trainingPlan.planId = this.currentChangeRow.id |
| | | const personTrainingDetailed = this.trainingPlan |
| | | addOrUpdatePersonTrainingDetailed(personTrainingDetailed).then(res => { |
| | | this.submitAddLoading = false |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå'); |
| | | this.closeAdd(); |
| | | } |
| | | }).catch(() => { |
| | | this.submitAddLoading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeAdd() { |
| | | this.$refs['trainingPlanForm'].resetFields(); |
| | | this.$emit('search') |
| | | this.addTrainingPlanDia = false; |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | </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(3)" v-if="this.currentRow.state !== 1">æ¤é</el-button> |
| | | <el-button size="small" type="primary" @click="submitForm(0)" v-if="this.currentRow.state !== 1">æäº¤</el-button> |
| | | <el-button size="small" @click="$emit('goBack')">è¿å</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="form_title"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <span class="form_label">å¹è®å
容ï¼</span> |
| | | <span> {{ trainingForm.trainingContent }} </span> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <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-col> |
| | | <el-col :span="4"> |
| | | <span class="form_label">å¹è®è®²å¸ï¼</span> |
| | | <span> {{ trainingForm.trainingLecturerName }} </span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin: 15px 0"> |
| | | <el-form> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="å¹è®æ¥æ:"> |
| | | <el-date-picker v-model="trainingForm.openingTime" format="yyyy-MM-dd" :disabled="currentRow.state !== 3" |
| | | placeholder="éæ©æ¥æ" size="small" value-format="yyyy-MM-dd" |
| | | type="date" style="width: 60%"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å¹è®å°ç¹"> |
| | | <el-input v-model="trainingForm.placeTraining" :disabled="currentRow.state !== 3" :rows="2" placeholder="请è¾å
¥" |
| | | size="small" style="width: 60%" type="text"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="è¯ä»·äºº"> |
| | | <el-select v-model="trainingForm.assessmentUserId" :disabled="currentRow.state !== 3" placeholder="è¯·éæ©" size="small" style="width: 50%"> |
| | | <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-input v-model="trainingForm.assessmentMethod" :disabled="currentRow.state !== 3" :rows="2" placeholder="请è¾å
¥" |
| | | size="small" style="width: 79%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¯ä»·æ¶é´"> |
| | | <el-date-picker v-model="trainingForm.assessmentDate" :disabled="currentRow.state !== 2 || isDisabled" |
| | | 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.comprehensiveAssessment" :disabled="currentRow.state !== 2 || isDisabled" :rows="2" placeholder="请è¾å
¥" |
| | | size="small" style="width: 68%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-row> |
| | | </div> |
| | | <el-divider>人å详æ
</el-divider> |
| | | <div> |
| | | <div class="items_center"> |
| | | <span>å§å</span> |
| | | <el-input v-model="userName" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getInfo">æ¥è¯¢</el-button> |
| | | </div> |
| | | <div class="items_btn"> |
| | | <el-button :disabled="currentRow.state === 1" size="small" type="primary" @click="addPerson">æ°å¢äººå</el-button> |
| | | <el-button :disabled="currentRow.state === 1" size="small" @click="batchDelete">æ¹éå é¤</el-button> |
| | | </div> |
| | | <el-table :data="trainingTableData" height="calc(100vh - 30em)" stripe style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="å§å" prop="userName"></el-table-column> |
| | | <el-table-column label="å·¥å·" prop="account"></el-table-column> |
| | | <el-table-column label="è§è²" prop="roleName"></el-table-column> |
| | | <el-table-column label="çµè¯å·ç " prop="phone"></el-table-column> |
| | | <el-table-column label="èæ ¸ç»æ" prop="examinationResults"> |
| | | <template v-slot="scope"> |
| | | <el-input v-model="scope.row.examinationResults" :disabled="currentRow.state === 1" clearable size="small" style="width: 100%" @blur="updatePersonResult(scope.row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog :visible.sync="selectUserDia" title="éæ©ç¨æ·" width="70%"> |
| | | <div class="search" style="margin-bottom: 9px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¨æ·åï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="addUserTableInfo.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="selectUserList" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-if="selectUserDia" class="body" style="height: 60vh;"> |
| | | <lims-table :tableData="tableData1" :column="column1" |
| | | :isSelection="true" :handleSelectionChange="selectMethod" |
| | | @pagination="pagination1" :height="'calc(100vh - 290px)'" |
| | | :page="page1" :tableLoading="tableLoading1"></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 {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | import {mapGetters} from "vuex"; |
| | | import { |
| | | newPersonnelAddedToTrainingRecords, |
| | | outOfFocusPreservation, trainingAndAssessmentRecordsAdded, trainingAndAssessmentRecordsEvaluate, |
| | | trainingAndAssessmentRecordsPage |
| | | } from "@/api/cnas/personal/personalTraining"; |
| | | |
| | | export default { |
| | | name: 'Edit', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {limsTable}, |
| | | props: { |
| | | currentRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | isSelectedList: [], // ç¦ç¨çå¤é |
| | | userName: undefined, |
| | | trainingForm: { |
| | | code: '111111', |
| | | date: '2024-10-10', |
| | | }, |
| | | trainingColumn: [ |
| | | { |
| | | label: 'å§å', |
| | | prop: 'userName' |
| | | }, |
| | | { |
| | | label: 'å·¥å·', |
| | | prop: 'account' |
| | | }, |
| | | { |
| | | label: 'è§è²', |
| | | prop: 'roleName' |
| | | }, |
| | | { |
| | | label: 'çµè¯å·ç ', |
| | | prop: 'phone' |
| | | }, |
| | | { |
| | | label: 'èæ ¸ç»æ', |
| | | prop: 'result' |
| | | } |
| | | ], |
| | | trainingTableData: [], |
| | | trainingLoading: false, |
| | | isDisabled: false, |
| | | selectUserDia: false, // æ·»å 人åå¼¹æ¡ |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | column1: [ |
| | | {label: 'å§å', prop: 'name'}, |
| | | {label: 'è´¦å·', prop: 'account'}, |
| | | {label: 'è§è²', prop: 'roleName'}, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç¶æ', |
| | | prop: 'status', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'å¯ç¨' |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'success' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | } |
| | | }, |
| | | {label: 'çµè¯å·ç ', prop: 'phone'}, |
| | | ], |
| | | page1: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | addUserTableInfo: { |
| | | name: null, |
| | | }, |
| | | multipleSelection: [], |
| | | userList: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | mounted() { |
| | | this.trainingForm = this.currentRow |
| | | this.getInfo() |
| | | this.getUserList() |
| | | this.isDisabled = this.trainingForm.assessmentUserId !== this.userId |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // è·åå½åæ°æ® |
| | | async getInfo() { |
| | | this.trainingLoading = true |
| | | await trainingAndAssessmentRecordsPage({ |
| | | trainingDetailedId: this.currentRow.id, |
| | | userName: this.userName |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.trainingTableData = res.data |
| | | } |
| | | this.trainingLoading = false |
| | | }) |
| | | }, |
| | | updatePersonResult(row) { |
| | | outOfFocusPreservation(row).then(res => { |
| | | this.$message.success("æä½æåï¼") |
| | | }) |
| | | }, |
| | | addPerson() { |
| | | this.isSelectedList = this.trainingTableData.map(item => item.userId) |
| | | this.selectUserDia = true; |
| | | }, |
| | | selectUserList () { |
| | | this.tableLoading1 = true |
| | | selectUserCondition({...this.addUserTableInfo}).then(res => { |
| | | this.tableData1 = res.data.records |
| | | this.page1.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | }, |
| | | pagination1 (page) { |
| | | this.page1.size = page.limit |
| | | this.selectUserList() |
| | | }, |
| | | // è¡¨æ ¼éæ©æ¹æ³ |
| | | selectMethod(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | selectUser() { |
| | | let selects = this.multipleSelection; |
| | | if (selects.length == 0) { |
| | | this.$message.error('æªéæ©æ°æ®'); |
| | | return; |
| | | } |
| | | let list = [] |
| | | selects.forEach(a => { |
| | | const obj = { |
| | | courseId: this.currentRow.id, |
| | | examinationResults: "", |
| | | userId: a.id |
| | | } |
| | | list.push(obj) |
| | | }); |
| | | newPersonnelAddedToTrainingRecords(list).then(res => { |
| | | this.isSelectedList = [] |
| | | this.selectUserDia = false; |
| | | this.getInfo() |
| | | }) |
| | | }, |
| | | // æ¹éå é¤ |
| | | handleSelectionChange(list) { |
| | | this.multipleSelection = list |
| | | }, |
| | | batchDelete() { |
| | | 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(status) { |
| | | let state = this.currentRow.state |
| | | if (this.trainingForm.assessmentUserId) { |
| | | state = 2 |
| | | } |
| | | if (this.trainingForm.comprehensiveAssessment) { |
| | | state = 1 |
| | | } |
| | | if (status === 3) { |
| | | state = 3 |
| | | } |
| | | let data = { |
| | | assessmentMethod: this.trainingForm.assessmentMethod, |
| | | openingTime: this.trainingForm.openingTime, |
| | | placeTraining: this.trainingForm.placeTraining, |
| | | comprehensiveAssessment: this.trainingForm.comprehensiveAssessment, |
| | | trainingDetailedId: this.trainingForm.id, |
| | | assessmentUserId: this.trainingForm.assessmentUserId, |
| | | assessmentDate: this.trainingForm.assessmentDate, |
| | | state: state |
| | | } |
| | | let code = {} |
| | | if (state === 2) { |
| | | code = await trainingAndAssessmentRecordsAdded(data) |
| | | } else { |
| | | code = await trainingAndAssessmentRecordsEvaluate(data) |
| | | } |
| | | this.isDisabled = this.trainingForm.assessmentUserId !== this.userId |
| | | if(code.code === 200) { |
| | | this.currentRow.state = state |
| | | this.$message.success("æä½æå") |
| | | } |
| | | }, |
| | | getUserList(){ |
| | | selectUserCondition({ type: 0 }).then((res) => { |
| | | this.userList = res.data; |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </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> |
| | | <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="{trainingDetailedId: info.id}" |
| | | :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> |
| | | <lims-table :tableData="tableData" :column="columnData" |
| | | :height="'calc(100vh - 47em)'" |
| | | :highlightCurrentRow="true" |
| | | :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="lookDialogVisible" |
| | | fullscreen |
| | | title="æ¥çéä»¶" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" |
| | | :fileUrl="javaApi+'/word/'+currentInfo.fileUrl" style="height: 90vh;overflow-y: auto;top: 0"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import file from '@/utils/file'; |
| | | import filePreview from '@/components/Preview/filePreview.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {delTrainingDetailedFileList, getTrainingDetailedFileList} from "@/api/cnas/personal/personalTraining"; |
| | | import {delCustomById} from "@/api/system/customer"; |
| | | |
| | | export default { |
| | | name: 'ViewRecord', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {limsTable, filePreview }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | filesDialogVisible: false, |
| | | tableLoading: false, |
| | | filesLookInfo: {}, |
| | | 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: [], |
| | | info: {}, |
| | | currentInfo:{}, |
| | | lookDialogVisible: false, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.filesDialogVisible = true |
| | | this.info = row |
| | | this.searchTableList() |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList () { |
| | | this.tableLoading = true |
| | | getTrainingDetailedFileList({trainingDetailedId: this.info.id}).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | closeFilesLook () { |
| | | this.filesDialogVisible = false |
| | | }, |
| | | // ä¸è½½ |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | }, |
| | | // å é¤ |
| | | delete (row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delTrainingDetailedFileList({detailedFileId: row.detailedFileId}).then(res => { |
| | | this.tableLoading = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // ä¸ä¼ éªè¯ |
| | | 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() |
| | | } |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row){ |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | }, |
| | | computed: { |
| | | fileAction() { |
| | | return this.javaApi + '/personTraining/uploadTrainingDetailedFile' |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template><div class="add"> |
| | | <el-dialog |
| | | :title="isEdit ?'ç¼è¾éä»¶èµæ':'æ°å¢éä»¶èµæ'" |
| | | :visible.sync="dialogVisible" |
| | | width="40%" |
| | | > |
| | | <el-form |
| | | :model="form" |
| | | ref="form" |
| | | :rules="rules" |
| | | label-width="80px" |
| | | size="small" |
| | | > |
| | | <el-form-item label="æ²é人" prop="userId"> |
| | | <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="æ²éæ¶é´" prop="communicationTime"> |
| | | <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="æ²éå°ç¹" prop="communicationPlace"> |
| | | <el-input v-model="form.communicationPlace" placeholder="è¯·å¡«åæ²éå°ç¹"></el-input> |
| | | </el-form-item > |
| | | <el-form-item label="æ²éå
容" prop="communicationContent"> |
| | | <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 {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | import {addOrUpdatePersonCommunicationAbility} from "@/api/cnas/personal/personPersonCommunicationAbilityPage"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | form: { |
| | | id: '', |
| | | userId: [], |
| | | communicationTime: undefined, |
| | | communicationPlace: undefined, |
| | | communicationContent: undefined |
| | | }, |
| | | rules: { |
| | | userId: [{ required: true, message: 'è¯·éæ©æ²é人', trigger: 'change' }], |
| | | communicationTime: [{ required: true, message: 'è¯·éæ©æ²éæ¶é´', trigger: 'change' }], |
| | | communicationPlace: [{ required: true, message: 'è¯·å¡«åæ²éå°ç¹', trigger: 'blur' }], |
| | | communicationContent: [{ required: true, message: 'è¯·å¡«åæ²éå
容', trigger: 'blur' }], |
| | | }, |
| | | 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.form.id = '' |
| | | this.resetForm('form') |
| | | } |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | this.userList = res.data; |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const params = { |
| | | id: this.form.id, |
| | | userId: this.form.userId.join(','), |
| | | communicationTime: this.form.communicationTime, |
| | | communicationPlace: this.form.communicationPlace, |
| | | communicationContent: this.form.communicationContent, |
| | | } |
| | | addOrUpdatePersonCommunicationAbility(params).then((res) => { |
| | | this.loading = false |
| | | this.resetForm('form') |
| | | this.$emit('submit') |
| | | this.dialogVisible = false |
| | | }).catch((err) => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </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="130px" |
| | | 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" |
| | | :headers="uploadHeader" |
| | | :show-file-list="false" |
| | | :on-success="onSuccess"> |
| | | <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 {deleteCNASFile} from "@/api/cnas/personal/personalList"; |
| | | import {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | import {addOrUpdatePersonPostAuthorizationRecord} from "@/api/cnas/personal/personPostAuthorizationRecord"; |
| | | |
| | | 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: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | methods: { |
| | | onSuccess(response, file, fileList) { |
| | | this.$set(this.form, "systemFileName", response.data) |
| | | }, |
| | | deleteFile(fileName) { |
| | | deleteCNASFile({fileName: 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.resetForm('ruleForm') |
| | | } |
| | | }, |
| | | closeDialog() { |
| | | this.resetForm('ruleForm') |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | this.userList = res.data; |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | submitForm() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if(valid) { |
| | | const params = { |
| | | 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 |
| | | } |
| | | this.loading = true |
| | | addOrUpdatePersonPostAuthorizationRecord(params).then(res => { |
| | | this.loading = false |
| | | this.closeDialog() |
| | | this.$emit('refresh') |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc ä¸ä¼ æä»¶ |
| | | */ |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | this.form.fileList = [file] |
| | | this.form.fileName = file.name |
| | | return true; |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | .add >>> .el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </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="[22]" |
| | | :expand-on-click-node="false" |
| | | :filter-node-method="filterNode" |
| | | :props="{ children: 'children', label: 'name' }" |
| | | highlight-current |
| | | node-key="id" |
| | | style="height:calc(100% - 70px);overflow-y: scroll;scrollbar-width: none;" |
| | | @node-click="handleNodeClick" |
| | | @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" |
| | | > |
| | | <div slot-scope="{ node, data }" class="custom-tree-node"> |
| | | <el-row style="width: 100%;"> |
| | | <el-col :span="22" style="text-align: left;"> |
| | | <span><i |
| | | :class="`node_i ${data.children != undefined&&data.children.length>0 ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> |
| | | {{ data.name }}</span> |
| | | </el-col> |
| | | <el-col v-if="node.level>1 && data.id !== null" :span="2" style="text-align: right;"> |
| | | <el-button size="mini" type="text" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div class="main_right"> |
| | | <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" |
| | | :departId="departId" :isDepartment="isDepartment"></PersonnelTraining> |
| | | </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="奿©è®°å½"> |
| | | <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="ä»»èææè®°å½"> |
| | | <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> |
| | | </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 PersonnelList from './tabs/personnel-list.vue' |
| | | import personnelInformation from './tabs/personnel-information.vue' |
| | | import PersonnelTraining from './tabs/personnelTraining'; |
| | | import JobResponsibilities from './tabs/job-responsibilities.vue'; |
| | | import rewardPunishmentRecord from "./tabs/reward-punishment-record.vue"; |
| | | import TrainingRecord from './tabs/training-record.vue'; |
| | | import Mandate from './tabs/mandate.vue'; |
| | | import PersonnelCapacity from './tabs/personnel-capacity.vue'; |
| | | import Communicate from './tabs/communicate.vue' |
| | | import {addDepartmentLims, delDepartmentLims, selectCNSAPersonTree} from "@/api/cnas/personal/personalList"; |
| | | export default { |
| | | components: { |
| | | PersonnelList, personnelInformation, PersonnelTraining, JobResponsibilities, rewardPunishmentRecord, TrainingRecord, Mandate, PersonnelCapacity, Communicate |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowAll: true, // æ¯å¦å±ç¤ºæ ç¾æ |
| | | activeName: '人ååºæ¬ä¿¡æ¯', |
| | | departId: 1, |
| | | 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(() => { |
| | | delDepartmentLims({ |
| | | id: data.id |
| | | }).then(res => { |
| | | 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 => { |
| | | 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; |
| | | } |
| | | }); |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder'); |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened'); |
| | | }, |
| | | handleNodeClick(val, node, el) { |
| | | //æ çå¼ |
| | | this.clickNodeVal = val; |
| | | // åå¨ç¶çº§èç¹çº§æ° |
| | | if (node) { |
| | | this.getNodeParent(node); |
| | | this.clickNodeVal.level = node.level; |
| | | this.clickNodeVal.parent = node.parent.data; |
| | | } |
| | | this.entity.departLimsId = val.id; |
| | | this.addOb.fatherId = val.id; |
| | | // æ¯å¦æ¾ç¤ºè®¾å¤è¯¦æ
|
| | | this.isShowAll = val.id !== null; |
| | | if (val.id) { // 妿æ¯å®éªå®¤ |
| | | this.departId = val.id; |
| | | this.isDepartment = true; |
| | | } |
| | | if (val.userId) { // æ¯äººå |
| | | this.departId = val.userId; |
| | | this.isDepartment = false |
| | | } |
| | | }, |
| | | getNodeParent(val) { |
| | | if (val.parent != null) { |
| | | this.currentCompaniesList[val.level - 1] = val.data.id; |
| | | this.selectTree += ' - ' + val.label; |
| | | this.getNodeParent(val.parent); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 14px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | .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; |
| | | } |
| | | |
| | | .main { |
| | | display: flex; |
| | | padding: 15px 0; |
| | | } |
| | | |
| | | .main_left { |
| | | background: #ffffff; |
| | | text-align: center; |
| | | height: calc(100vh - 8em); |
| | | width: 270px; |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .main_right { |
| | | width: calc(100% - 288px); |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .div_left_input { |
| | | margin: 15px 0; |
| | | width: 90%; |
| | | } |
| | | |
| | | >>> .el-tabs--border-card > .el-tabs__header .el-tabs__item { |
| | | border: 0 none; |
| | | } |
| | | |
| | | >>> .el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active { |
| | | color: black; |
| | | } |
| | | |
| | | >>> .el-tabs--border-card > .el-tabs__header { |
| | | border-bottom: none; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div v-if="isDepartment" style="display: flex;justify-content: space-between;margin-bottom: 10px"> |
| | | <el-button size="small" type="primary" @click="getTableData">å·æ°</el-button> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog">æ°å¢</el-button> |
| | | </div> |
| | | <lims-table :tableData="tableData" :column="columnData" |
| | | @pagination="page" :height="'calc(100vh - 18em)'" |
| | | :page="pagination" :tableLoading="loading"></lims-table> |
| | | <Add ref="communicateModal" @submit="getTableData"></Add> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import CommunicateAdd from "../components/communicateAdd.vue" |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | deletePersonCommunicationAbility, exportPersonCommunicationAbility, |
| | | personPersonCommunicationAbilityPage |
| | | } from "@/api/cnas/personal/personPersonCommunicationAbilityPage"; |
| | | |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | Add: CommunicateAdd |
| | | }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columnData: [ |
| | | { |
| | | 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: [], |
| | | pagination: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | openDialog(row, type=false) { |
| | | this.$refs.communicateModal.openDialog(row, type) |
| | | }, |
| | | getTableData() { |
| | | this.loading = true |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.size |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.size |
| | | } |
| | | personPersonCommunicationAbilityPage(params).then(res => { |
| | | this.loading = false |
| | | this.tableData = res.data.records |
| | | this.pagination.total = res.data.total |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | page (page) { |
| | | this.pagination.size = page.limit |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc å 餿²éè®°å½ |
| | | */ |
| | | delPerson(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | deletePersonCommunicationAbility({id: id}).then(res => { |
| | | this.$message.success('å 餿å!'); |
| | | this.getTableData() |
| | | }) |
| | | }) |
| | | }, |
| | | async handleDown(row){ |
| | | exportPersonCommunicationAbility({id:row.id}).then(res => { |
| | | 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> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- å²ä½èè´£ --> |
| | | <template> |
| | | <div class="view"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form ref="page" size="small" :inline="true"> |
| | | <el-form-item label="åå·¥"> |
| | | <el-input v-model="userName" clearable placeholder="请è¾å
¥åå·¥" size="small" style="width: 20vh;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="refreshTable">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="addPost">æ°å¢</el-button> |
| | | <!-- <el-button size="small" type="primary">导åºexcel</el-button>--> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table :data="tableData" v-loading="tableLoading" height="66.5vh" 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" align="center"> |
| | | <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" style="color: #f56c6c" 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" |
| | | background |
| | | style="margin-top: 10px" |
| | | @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 { |
| | | exportPersonJobResponsibilities, personJobResponsibilitiesDelete, |
| | | personJobResponsibilitiesSave, |
| | | personJobResponsibilitiesSelect |
| | | } from "@/api/cnas/personal/personJobResponsibilities"; |
| | | import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | userName: '', |
| | | tableData: [], |
| | | tableLoading: false, |
| | | 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 params = this.isDepartment ? { |
| | | userName: this.userName, |
| | | departmentId: this.search.userId, |
| | | size: this.search.size, |
| | | current: this.search.current, |
| | | }: { |
| | | userName: this.userName, |
| | | userId: this.search.userId, |
| | | size: this.search.size, |
| | | current: this.search.current, |
| | | } |
| | | this.tableLoading = true |
| | | personJobResponsibilitiesSelect(params).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | //æäº¤è¡¨å |
| | | async submitForm(saveState) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // ç»å½åç¯è设置åå»ºäººä¸æ¶é´ |
| | | let user = this.nickName; |
| | | 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'); |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // å é¤å²ä½èè´£ |
| | | 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() { |
| | | selectUserCondition().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); |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['nickName']) |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div> |
| | | <div v-if="isDepartment" style="display: flex;justify-content: space-between;margin-bottom: 10px"> |
| | | <el-button size="small" type="primary" @click="getTableData">å·æ°</el-button> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog">æ°å¢</el-button> |
| | | </div> |
| | | <lims-table :tableData="tableData" :column="columnData" |
| | | @pagination="page" :height="'calc(100vh - 18em)'" |
| | | :page="pagination" :tableLoading="loading"></lims-table> |
| | | </div> |
| | | <Add ref="mandateModal" @refresh="getTableData"></Add> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Add from "../components/mandateAdd.vue" |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | deletePersonPostAuthorizationRecord, exportPersonPostAuthorizationRecord, |
| | | PersonPostAuthorizationRecordPage |
| | | } from "@/api/cnas/personal/personPostAuthorizationRecord"; |
| | | import {delCustomById} from "@/api/system/customer"; |
| | | |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | Add |
| | | }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columnData: [ |
| | | { |
| | | label: 'åºå·', |
| | | prop: 'id' |
| | | }, { |
| | | label: 'è¯ä¹¦ç¼å·', |
| | | prop: 'certificateNumber' |
| | | }, { |
| | | label: '被任è人å', |
| | | prop: 'userName' |
| | | }, { |
| | | label: 'ä»»èå²ä½', |
| | | prop: 'post' |
| | | }, { |
| | | label: 'ç论èè¯æç»©', |
| | | prop: 'num1', |
| | | width: 120 |
| | | },{ |
| | | label: 'æä½æè½èè¯æç»©', |
| | | prop: 'num2', |
| | | width: 150 |
| | | },{ |
| | | label: 'æä½æ¶é´', |
| | | prop: 'updateTime' |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks', |
| | | width: 300 |
| | | }, { |
| | | label: 'æä½', |
| | | dataType: 'action', |
| | | width: 160, |
| | | fixed: 'right', |
| | | 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: [], |
| | | pagination: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | openDialog(row, type=false) { |
| | | this.$refs.mandateModal.openDialog(row, type) |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢è¡¨æ ¼æ°æ® |
| | | */ |
| | | async getTableData() { |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.pageSize |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.pageSize |
| | | } |
| | | this.loading = true |
| | | PersonPostAuthorizationRecordPage(params).then(res => { |
| | | this.loading = false |
| | | this.tableData = res.data.records |
| | | this.pagination.total = res.data.total |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | page (page) { |
| | | this.pagination.size = page.limit |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc å é¤ä»»èè®°å½ |
| | | */ |
| | | deleteNotify(id) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | deletePersonPostAuthorizationRecord({id: id}).then(res => { |
| | | this.$message.success('å 餿å') |
| | | this.getTableData() |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | handleDown(row){ |
| | | exportPersonPostAuthorizationRecord({id:row.id}).then(res => { |
| | | 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> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 人åè½å --> |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form ref="page" size="small" :inline="true"> |
| | | <el-form-item label="å§å"> |
| | | <el-input v-model="userName" placeholder="请è¾å
¥å§å" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="refreshTable">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button v-if="!isDepartment" size="small" type="primary" @click="addAppointPost('add')">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <lims-table :tableData="tableData" :column="yearColumnData" |
| | | @pagination="pagination" :height="'calc(100vh - 20em)'" |
| | | :page="search" :tableLoading="yearLoading"> |
| | | <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> |
| | | </lims-table> |
| | | <!--æ°å¢è½å认å®å¼¹æ¡--> |
| | | <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 clearable |
| | | filterable 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="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' || operationType === 'confirm'" 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' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <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' || operationType === 'confirm'" 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' || operationType === 'confirm'" 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' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <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' || operationType === 'confirm'" 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' || operationType === 'confirm'" 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' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <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' || operationType === 'confirm'" |
| | | 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' || operationType === 'confirm'" 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' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <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' || operationType === 'confirm'" |
| | | 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' || operationType === 'confirm'" 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' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <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' || operationType === 'confirm'" 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' || operationType === 'confirm'" |
| | | @change="selectResponsibilities"> |
| | | <el-checkbox v-for="city in dict.type.responsibilities_list" :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' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <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' || operationType === 'confirm'" |
| | | 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' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <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-col :span="24"> |
| | | <el-form-item prop="confirmOperatingPersonnelId" label="确认人ï¼"> |
| | | <el-select v-model="form.confirmOperatingPersonnelId" clearable :disabled="operationType === 'view' || operationType === 'confirm'" |
| | | filterable size="small" style="width: 50%;"> |
| | | <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-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType !== 'view'" @click="resetForm">åæ¶</el-button> |
| | | <el-button v-if="operationType !== 'view' && operationType !== 'confirm'" type="primary" @click="submitForm">ä¿å</el-button> |
| | | <el-button v-if="operationType !== 'view' && operationType !== 'confirm'" type="primary" @click="submitForm1">æäº¤å¹¶éç¥</el-button> |
| | | <el-button v-if="operationType === 'confirm'" type="primary" @click="verifyGet">确认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addOrUpdatePersonPersonnelCapacity, |
| | | confirmPersonnelCapability, |
| | | deletePersonPersonnelCapacity, |
| | | exportPersonnelCapacity, |
| | | personPersonnelCapacityPage, |
| | | submitConfirmPersonnelCapability |
| | | } from "@/api/cnas/personal/personPersonnelCapacity"; |
| | | import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | components: { |
| | | limsTable |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | dicts: ['responsibilities_list'], |
| | | 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: 'professionalTitle', |
| | | minWidth: '100' |
| | | }, { |
| | | 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: 'confirmOperatingPersonnelName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¡®è®¤æ¥æ', |
| | | prop: 'confirmDate', |
| | | minWidth: '160' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleViewClick('edit', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.confirmDate) { |
| | | 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.handleViewClick('confirm', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.confirmDate || this.userId != row.confirmOperatingPersonnelId) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deletePost(row.id); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.confirmDate) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearLoading: false, |
| | | dialogVisible: false, |
| | | verifyGetId: '', |
| | | form: { |
| | | jobResponsibilitiesTem: [] |
| | | }, |
| | | responsibleOptions: [], |
| | | rules: { |
| | | confirmOperatingPersonnelId: [{ required: true, message: 'è¯·éæ©ç¡®è®¤äºº', trigger: 'change' }], |
| | | 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 params = this.isDepartment ? |
| | | { |
| | | departmentId: this.search.userId, |
| | | size: this.search.size, |
| | | current: this.search.current, |
| | | userName: this.userName, |
| | | }: { |
| | | userId: this.search.userId, |
| | | size: this.search.size, |
| | | current: this.search.current, |
| | | userName: this.userName, |
| | | } |
| | | this.yearLoading = true |
| | | personPersonnelCapacityPage(params).then(res => { |
| | | this.yearLoading = false |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }).catch(err => { |
| | | console.log(err); |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | pagination (page) { |
| | | this.search.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | selectResponsibilities(arr) { |
| | | let arrTem = []; |
| | | arr.map(val => { |
| | | const index = this.dict.type.responsibilities_list.findIndex(item => item.label === val); |
| | | if (index > -1) { |
| | | arrTem.push(this.dict.type.responsibilities_list[index].value); |
| | | } |
| | | }); |
| | | this.form.jobResponsibilities = arrTem.join(','); |
| | | }, |
| | | 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.form.userId = this.departId |
| | | this.getUserList(); |
| | | |
| | | }, |
| | | // ç¼è¾/æ¥ç |
| | | handleViewClick(type, row) { |
| | | this.operationType = type; |
| | | this.verifyGetId = row.id |
| | | 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(); |
| | | }, |
| | | // ä¿å |
| | | 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.dialogVisible = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // æäº¤å¹¶éç¥ |
| | | submitForm1() { |
| | | this.$refs.infoForm.validate((valid) => { |
| | | if (valid) { |
| | | submitConfirmPersonnelCapability(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå'); |
| | | this.getList(this.departId); |
| | | this.dialogVisible = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | verifyGet () { |
| | | confirmPersonnelCapability({id: this.verifyGetId}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('确认æå'); |
| | | this.resetForm() |
| | | this.getList(this.departId); |
| | | } |
| | | }); |
| | | }, |
| | | // å é¤å²ä½èè´£ |
| | | deletePost(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å 餿¤æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deletePersonPersonnelCapacity({id: id}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getList(this.departId); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message.error('å é¤å¤±è´¥'); |
| | | }); |
| | | }, |
| | | resetForm() { |
| | | this.$refs.infoForm.resetFields(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | getUserList(){ |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | this.getList(newId); |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | >>> .el-dialog__body { |
| | | max-height: 74vh; |
| | | 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="downPerson">ä¸è½½æ¡£æ¡</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">人ååç±»</el-button> |
| | | <el-button :loading="saveLoading" size="small" type="primary" @click="save">ä¿å</el-button> |
| | | </div> |
| | | <div> |
| | | <div style="display: flex;flex-direction: row;"> |
| | | <div style="width: 12em"> |
| | | <el-image :src="javaApi + '/img/' + form.pictureUrl" fit="fill" |
| | | style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline" style="font-size: 40px;"></i> |
| | | </div> |
| | | </el-image> |
| | | <el-image :src="javaApi + '/img/' + form.signatureUrl" fit="fill" |
| | | style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline" style="font-size: 40px;"></i> |
| | | </div> |
| | | </el-image> |
| | | </div> |
| | | <div style="height: calc(100vh - 14em);overflow-y: auto"> |
| | | <el-form ref="form" :model="form" label-width="110px"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å§å"> |
| | | <el-input disabled v-model="form.name" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å·¥å·"> |
| | | <el-input disabled 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-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-input v-model="form.corporateName" 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.postName" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¥é墿¶é´"> |
| | | <el-date-picker v-model="form.groupTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å³å¨å
³ç³»"> |
| | | <el-radio-group v-model="form.laborRelations"> |
| | | <el-radio :label=0 size="mini">ååå·¥</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¬å¸é®ç®±"> |
| | | <el-input v-model="form.email" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="工使¶é´"> |
| | | <el-date-picker v-model="form.workingTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ååå°ææ¶é´"> |
| | | <el-date-picker v-model="form.contractLifeTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="èç§°"> |
| | | <el-input v-model="form.professionalTitle" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="16" 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" |
| | | @change="getAge" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç±è´¯"> |
| | | <el-input v-model="form.nativePlace" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ°æ"> |
| | | <el-input v-model="form.nation" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="身份è¯å·"> |
| | | <el-input v-model="form.identityCard" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¹´é¾"> |
| | | <el-input-number v-model="form.age" :max="130" :min="1" |
| | | controls-position="right" size="small" style="width: 99%;"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å©å§»ç¶åµ"> |
| | | <el-radio-group v-model="form.maritalStatus"> |
| | | <el-radio :label=0 size="mini">å·²å©</el-radio> |
| | | <el-radio :label=1 size="mini">æªå©</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶æææ"> |
| | | <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶å°å"> |
| | | <el-input v-model="form.idAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¿æ²»é¢è²"> |
| | | <el-input v-model="form.politicalStatus" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¥å
/墿¶é´"> |
| | | <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææºå·"> |
| | | <el-input v-model="form.telephone" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æé«å¦å"> |
| | | <el-input v-model="form.officialAcademicRedentials" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æé«å¦ä½"> |
| | | <el-input v-model="form.highestDegree" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸é¢æ ¡1"> |
| | | <el-input v-model="form.graduatedInstitutions1" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸ä¸1"> |
| | | <el-input v-model="form.major1" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸æ¶é´1"> |
| | | <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸é¢æ ¡2"> |
| | | <el-input v-model="form.graduatedInstitutions2" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸ä¸2"> |
| | | <el-input v-model="form.major2" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸æ¶é´2"> |
| | | <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç»è®°æ¶é´"> |
| | | <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input type="textarea" v-model="form.remarks" clearable size="small"></el-input> |
| | | </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-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> |
| | | <lims-table :tableData="annexList" :column="columnData2" style="width: 96%;margin-left: 34px" |
| | | height="200" :tableLoading="tableLoading2"></lims-table> |
| | | <el-row style="margin-top: 10px"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="éä»¶èµæ" > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-upload ref='upload' |
| | | :action="fileAction" |
| | | :auto-upload="true" :data="{userId: clickNodeVal.userId}" |
| | | :before-upload="fileBeforeUpload" |
| | | :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" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <lims-table :tableData="tableData" :column="columnData" style="width: 96%;float: right;" |
| | | height="200" :tableLoading="tableLoading"></lims-table> |
| | | <el-row style="margin-top: 10px"> |
| | | <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="annexAdd1('add')">æ°å¢</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="tableData1" border height="200" style="width: 96%;float: right;" v-loading="tableLoading1"> |
| | | <el-table-column label="åºå·" type="index" width="55px" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½ç»å" prop="workExperience"> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="mini" @click="annexAdd1('edit',scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="mini" @click="deleteAnnex1(scope.row)" style="color: #f56c6c">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form> |
| | | </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 dict.type.personnl_type" :key="v.value" |
| | | :label="v.value"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickPersonnelClassificationSure">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- æ°å¢éä»¶èµæ --> |
| | | <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" @open="getComparisonList"> |
| | | <el-form ref="annex" :model="annex" :rules="rules" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-form-item label="è¯ä»¶å·" prop="idNumber"> |
| | | <el-input v-model="annex.idNumber" clearable size="small" style="width: 100%;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="åè¯åä½" prop="issueUnit"> |
| | | <el-input v-model="annex.issueUnit" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="级å«"> |
| | | <el-input v-model="annex.level" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="æææ" prop="periodValidity"> |
| | | <el-input v-model="annex.periodValidity" clearable size="small"></el-input> |
| | | <!-- <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="å¤å°ä»¶"> |
| | | <el-input v-model="annex.copy" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="åä»¶"> |
| | | <el-input v-model="annex.original" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="æä»¶"> |
| | | <el-upload |
| | | :action="action" |
| | | :before-upload="beforeAvatarUpload" |
| | | :headers="uploadHeader" |
| | | :on-success="(response,file,fileList) => onSuccess(response, file, fileList, 'fileName')" |
| | | :show-file-list="false"> |
| | | <span v-if="annex.fileName">{{annex.fileName}}</span> |
| | | <!-- <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">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ°å¢å·¥ä½ç»å --> |
| | | <el-dialog @close="handleClose2" title="æ·»å å·¥ä½ç»å" :visible.sync="dialogVisible2" width="40%"> |
| | | <el-form ref="annex2" :model="annex2" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-form-item label="å·¥ä½ç»å" prop="idNumber"> |
| | | <el-input type="textarea" v-model="annex2.workExperience" clearable size="small" style="width: 100%;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose2">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm2">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import fileDownload from '@/utils/file' |
| | | import { |
| | | addAnnex, |
| | | addBasicInfoWork, |
| | | delBasicInfoFileList, |
| | | delBasicInfoWorkList, |
| | | deleteAnnex, deleteCNASFile, |
| | | exportPersonBasicInfoById, |
| | | getAnnex, |
| | | getAnnexByUserId, |
| | | getBasicInfoFileList, |
| | | getBasicInfoWorkList, |
| | | getCNASPersonnelInfo, |
| | | saveCNASPersonnelInfo, |
| | | updateAnnex, |
| | | updateBasicInfoWorkList |
| | | } from "@/api/cnas/personal/personalList"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { return {} } |
| | | }, |
| | | }, |
| | | dicts: ['personnl_type'], |
| | | data() { |
| | | return { |
| | | operationType: '', |
| | | basicInfoWorkId: '', |
| | | dialogVisible2: false, |
| | | annex2: { |
| | | workExperience: '' |
| | | }, |
| | | tableLoading: false, |
| | | tableData: [], |
| | | columnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '100', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.upload(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delete(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | columnData2: [ |
| | | { |
| | | label: 'è¯ä»¶å·', |
| | | prop: 'idNumber', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'åè¯åä½', |
| | | prop: 'issueUnit', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '200px' |
| | | },{ |
| | | label: '级å«', |
| | | prop: 'level', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'æææ', |
| | | prop: 'periodValidity', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'æ·»å æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '130', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downloadFile(row.fileName) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.annexAdd(1,row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteAnnex(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableLoading1: false, |
| | | tableLoading2: false, |
| | | tableData1: [], |
| | | 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: false, message: 'è¯·éæ©æææ', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | dialogVisible1: false, |
| | | form: { |
| | | userId: '', |
| | | name: '', |
| | | account: '', |
| | | currentState: '', |
| | | sex: '', |
| | | corporateName: '', |
| | | department: '', |
| | | departLimsId: [], |
| | | postName: '', |
| | | groupTime: '', |
| | | laborRelations: '', |
| | | workingTime: '', |
| | | contractLifeTime: '', |
| | | personnelClassification: '', |
| | | dateBirth: '', |
| | | nativePlace: '', |
| | | nation: '', |
| | | identityCard: '', |
| | | age: '', |
| | | validityPeriod: '', |
| | | maritalStatus: '', |
| | | idAddress: '', |
| | | idDetailAddress: '', |
| | | politicalStatus: '', |
| | | dumplingTime: '', |
| | | telephone: '', |
| | | email: '', |
| | | officialAcademicRedentials: '', |
| | | highestDegree: '', |
| | | graduatedInstitutions1: '', |
| | | major1: '', |
| | | graduationTime1: '', |
| | | graduatedInstitutions2: '', |
| | | major2: '', |
| | | graduationTime2: '', |
| | | lastUpdateTime: '', |
| | | pictureUrl: '', |
| | | signatureUrl: '', |
| | | professionalTitle: '', |
| | | remarks: '', |
| | | }, |
| | | department: [], |
| | | saveLoading: false, |
| | | dialogVisible: false, |
| | | checkList: [], |
| | | successFileList: [], // 鲿¢å端åºç°èæ°æ® |
| | | isSave: false, |
| | | } |
| | | }, |
| | | components: {limsTable, fileDownload}, |
| | | created() { |
| | | this.init() |
| | | this.searchTableList() |
| | | this.searchTableList2() |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | }, |
| | | fileAction() { |
| | | return this.javaApi + '/personBasicInfo/uploadBasicInfoFile' |
| | | }, |
| | | }, |
| | | methods: { |
| | | // ä¸è½½æ¡£æ¡ |
| | | downPerson(){ |
| | | exportPersonBasicInfoById({id: this.clickNodeVal.userId}).then(res => { |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'äººåæ¡£æ¡.docx'); |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // ä¸ä¼ éªè¯ |
| | | 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() |
| | | } else { |
| | | this.$message.error(response.message); |
| | | } |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList () { |
| | | this.tableLoading = true |
| | | getBasicInfoFileList({userId: this.clickNodeVal.userId}).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // ä¸è½½ |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | fileDownload.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | }, |
| | | // å é¤ |
| | | delete (row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delBasicInfoFileList({basicInfoFileId: row.basicInfoFileId}).then(res => { |
| | | this.tableLoading = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList(); |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }) |
| | | }, |
| | | // æå¼å·¥ä½ç»åæ¢åµ |
| | | annexAdd1 (type, row) { |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.basicInfoWorkId = row.basicInfoWorkId |
| | | this.annex2.workExperience = row.workExperience |
| | | } else { |
| | | this.basicInfoWorkId = '' |
| | | this.annex2.workExperience = '' |
| | | } |
| | | this.dialogVisible2 = true |
| | | }, |
| | | // æäº¤å·¥ä½ç»å |
| | | submitForm2 () { |
| | | const params = { |
| | | workExperience: this.annex2.workExperience, |
| | | userId: this.clickNodeVal.userId, |
| | | basicInfoWorkId: this.basicInfoWorkId |
| | | } |
| | | this.tableLoading1 = true |
| | | if (this.operationType === 'add') { |
| | | addBasicInfoWork(params).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code == 200) { |
| | | this.dialogVisible2 = false |
| | | this.$message.success('æ°å¢æå') |
| | | this.searchTableList2(); |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | } else { |
| | | updateBasicInfoWorkList(params).then(res => { |
| | | this.tableLoading1 = false |
| | | this.dialogVisible2 = false |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.searchTableList2(); |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | } |
| | | }, |
| | | // å
³éå·¥ä½ç»åå¼¹æ¡ |
| | | handleClose2 () { |
| | | this.dialogVisible2 = false |
| | | this.annex2.workExperience = '' |
| | | }, |
| | | // å é¤å·¥ä½ç»å |
| | | deleteAnnex1 (row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading1 = true |
| | | delBasicInfoWorkList({basicInfoWorkId: row.basicInfoWorkId}).then(res => { |
| | | this.tableLoading1 = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList2(); |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¥è¯¢å·¥ä½ç»åå表 |
| | | searchTableList2 () { |
| | | this.tableLoading1 = true |
| | | getBasicInfoWorkList({userId: this.clickNodeVal.userId}).then(res => { |
| | | this.tableLoading1 = false |
| | | this.tableData1 = res.data |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | 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() { |
| | | this.$refs['annex'].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.imageUrl = '' |
| | | this.resetForm('annex') |
| | | this.annexList = res.data |
| | | this.dialogVisible1 = false |
| | | 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.imageUrl = '' |
| | | this.resetForm('annex') |
| | | this.annexList = res.data |
| | | this.dialogVisible1 = false |
| | | this.$message.success('ä¿åæå') |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | deleteAnnex(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteAnnex({id: 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) { |
| | | let state = /\.(jpg|jpeg|png|gif)$/i.test(fileName) |
| | | if (state) { |
| | | let url = this.javaApi + '/img/' + fileName; |
| | | fileDownload.downloadIamge(url, fileName) |
| | | } else { |
| | | const url = this.javaApi + '/word/' + fileName |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = fileName; |
| | | link.click(); |
| | | this.$message.success('ä¸è½½æå') |
| | | } |
| | | }, |
| | | async onSuccess(response, file, fileList, entityVal) { |
| | | if(entityVal == 'fileName') { |
| | | this.annex.fileName = 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: 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) |
| | | }) |
| | | }, |
| | | 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() { |
| | | if (this.checkList.length > 0) { |
| | | this.form.personnelClassification = this.checkList.split('ï¼') |
| | | } |
| | | }, |
| | | clickPersonnelClassificationSure() { |
| | | this.dialogVisible = false |
| | | this.form.personnelClassification = this.checkList.filter(m=>m).join('ï¼') |
| | | }, |
| | | async deleteFile(fileName, entityVal) { |
| | | await deleteCNASFile({fileName: fileName}).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.$set(this.form, entityVal, null) |
| | | let index = this.successFileList.indexOf(fileName) |
| | | if (index != -1) { |
| | | this.successFileList.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | 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(); |
| | | }, |
| | | getAge (val) { |
| | | this.form.age = this.calculateAge(val) |
| | | }, |
| | | calculateAge(birthDateString) { |
| | | // è§£æåºçæ¥æåç¬¦ä¸²ä¸ºæ¥æå¯¹è±¡ |
| | | const birthDate = new Date(birthDateString); |
| | | |
| | | // è·åå½åæ¥æ |
| | | const currentDate = new Date(); |
| | | |
| | | // 计ç®å¹´ä»½å·® |
| | | let age = currentDate.getFullYear() - birthDate.getFullYear(); |
| | | |
| | | // æ£æ¥æ¯å¦å·²ç»è¿äºä»å¹´ççæ¥ |
| | | const currentMonth = currentDate.getMonth(); |
| | | const currentDay = currentDate.getDate(); |
| | | const birthMonth = birthDate.getMonth(); |
| | | const birthDay = birthDate.getDate(); |
| | | |
| | | if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) { |
| | | // å¦æè¿æ²¡å°ä»å¹´ççæ¥ï¼å¹´é¾å1 |
| | | age--; |
| | | } |
| | | |
| | | return age; |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal: { |
| | | handler(newVal, oldVal) { |
| | | if (newVal.userId) { |
| | | this.getUserBasisInfo(newVal.userId) |
| | | this.searchTableList() |
| | | this.searchTableList2() |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 12px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | | >>>.el-form-item { |
| | | margin-bottom: 3px; |
| | | } |
| | | |
| | | .el-input { |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .el-icon-picture-outline { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | |
| | | .uploadFile { |
| | | margin-top: 2px; |
| | | float: left; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #0f8bf1; |
| | | width: 178px; |
| | | height: 50px; |
| | | text-align: center; |
| | | border: 1px solid #d9d9d9; |
| | | } |
| | | .avatar { |
| | | width: 178px; |
| | | height: 178px; |
| | | display: block; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="人ååç§°"> |
| | | <el-input v-model="entity.name" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" style="margin-left: 10px" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button |
| | | :loading="outLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="handleDown">导åº</el-button> |
| | | <el-button size="small" type="primary" @click="openSelectUserDia">æ°å»º</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="search-table"> |
| | | <el-table v-loading="tableLoading" :data="tableData" border height="calc(100vh - 21em)" style="width: 100%;"> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="åå·¥ç¼å·" prop="account" width="150"></el-table-column> |
| | | <el-table-column label="å§å" prop="name" width="120"></el-table-column> |
| | | <el-table-column label="ç±è´¯" prop="nativePlace" width="120"></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 fixed="right" label="æä½" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="$emit('updatePerson', scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" @click="deletePerson(scope.row)" style="color: #f56c6c">å é¤</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" |
| | | background |
| | | layout="->,total, sizes, prev, pager, next, jumper" |
| | | style="margin-top: 10px" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog :visible.sync="selectUserDia" title="éæ©ç¨æ·" width="70%"> |
| | | <div class="search" style="margin-bottom: 9px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¨æ·åï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="addUserTableInfo.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @change="selectUserList" |
| | | ></el-input> |
| | | </div> |
| | | <el-button size="small" style="margin-left: 10px" type="primary" @click="selectUserList">æ¥è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div v-if="selectUserDia" class="body" style="height: 60vh;"> |
| | | <lims-table :tableData="tableData1" :column="column1" |
| | | :isSelection="true" :handleSelectionChange="selectMethod" |
| | | :height="'calc(100vh - 290px)'" |
| | | :tableLoading="tableLoading1"></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 {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | basicInformationOfPersonnelSelectPage, |
| | | delUserDepardLimsId, |
| | | exportPersonBasicInfo, |
| | | upUserDepardLimsId |
| | | } from "@/api/cnas/personal/personalList"; |
| | | import store from "@/store"; |
| | | import {Message} from "element-ui"; |
| | | |
| | | 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 { |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | outLoading: false, |
| | | tableLoading: false, |
| | | tableData: [], // äººåæ»åè¡¨æ°æ® |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | column1: [ |
| | | {label: 'å§å', prop: 'name'}, |
| | | {label: 'è´¦å·', prop: 'account'}, |
| | | {label: 'è§è²', prop: 'roleName'}, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç¶æ', |
| | | prop: 'status', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'å¯ç¨' |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'success' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | } |
| | | }, |
| | | {label: 'çµè¯å·ç ', prop: 'phone'}, |
| | | ], |
| | | page1: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | selectUserDia: false, // æ·»å 人åå¼¹æ¡ |
| | | entity: { |
| | | name: '', |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | addUserTableInfo: { |
| | | name: null, |
| | | isCustom: 0, |
| | | }, |
| | | multipleSelection: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.refreshTable(); |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | /** |
| | | * @desc è·å设å¤id |
| | | */ |
| | | // éç½® |
| | | refresh() { |
| | | this.page = { |
| | | size: 20, |
| | | current: 1, |
| | | }; |
| | | this.entity.name = '' |
| | | this.refreshTable(); |
| | | }, |
| | | // æ¥è¯¢äººååè¡¨æ°æ® |
| | | refreshTable() { |
| | | this.tableLoading = true; |
| | | this.entity.departLimsId = this.departId; |
| | | const params = { |
| | | size: this.page.size, |
| | | current: this.page.current, |
| | | departmentId: this.entity.departLimsId, |
| | | name: this.entity.name, |
| | | } |
| | | basicInformationOfPersonnelSelectPage(params).then(res => { |
| | | this.tableLoading = false; |
| | | this.page.total = res.data.total; |
| | | this.tableData = res.data.records; |
| | | }).catch(err => { |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | // å é¤äººå |
| | | deletePerson(row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delUserDepardLimsId({id: row.userId}).then(res => { |
| | | this.$message.success('å 餿å'); |
| | | this.refreshTable(); |
| | | this.$emit('refreshTree') |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥'); |
| | | }); |
| | | }).catch(() => { |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | | this.refreshTable(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val; |
| | | this.refreshTable(); |
| | | }, |
| | | // æå¼æ°å¢äººåå¼¹æ¡ |
| | | openSelectUserDia () { |
| | | this.selectUserDia = true; |
| | | this.selectUserList() |
| | | }, |
| | | // æ¥è¯¢æ°å¢å¼¹æ¡ç人åå表 |
| | | selectUserList () { |
| | | this.tableLoading1 = true |
| | | selectUserCondition().then(res => { |
| | | this.tableLoading1 = false |
| | | this.tableData1 = res.data |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | }, |
| | | // è¡¨æ ¼éæ©æ¹æ³ |
| | | selectMethod(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | // æäº¤éè¦æ·»å ç人å |
| | | selectUser() { |
| | | if (!this.currentCompaniesList.length > 0) { |
| | | this.$message.warning("è¯·éæ©é¨é¨ï¼") |
| | | return; |
| | | } |
| | | let selects = this.HaveJson(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 + ','; |
| | | } |
| | | }); |
| | | upUserDepardLimsId({ |
| | | ids: JSON.stringify(ids), |
| | | id: str |
| | | }).then(res => { |
| | | this.selectUserDia = false; |
| | | this.$message.success('æ·»å æå'); |
| | | this.refreshTable(); |
| | | this.$emit('refreshTree') |
| | | }); |
| | | }, |
| | | // 导åºäººåä¿¡æ¯ |
| | | handleDown() { |
| | | this.outLoading = true; |
| | | let entity = this.HaveJson(this.entity) |
| | | delete entity.orderBy; |
| | | exportPersonBasicInfo({...entity}).then(res => { |
| | | this.outLoading = false; |
| | | const blob = new Blob([res], {type: 'application/octet-stream'}); |
| | | this.$download.saveAs(blob, '人åä¿¡æ¯.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (newId) { |
| | | this.page.current = 1 |
| | | this.refreshTable(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 人åå¹è® --> |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div v-if="!editPlanShow && isDepartment"> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计å</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="page" ref="page" size="small" :inline="true"> |
| | | <el-form-item label="ç¼å¶äºº"> |
| | | <el-input v-model="page.compilerName" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="getYearPlanList(departId)">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="uploadDia = true, getUserList()">导å
¥</el-button> |
| | | </div> |
| | | </div> |
| | | <lims-table :tableData="yearPlanTableData" :column="yearPlanColumn" |
| | | :currentChange="currentChange" |
| | | @pagination="pagination" height="40vh" |
| | | :page="page" :tableLoading="yearLoading"></lims-table> |
| | | </div> |
| | | <div v-if="!editPlanShow" class="table"> |
| | | <div> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计åæç»</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="inDetailForm" ref="inDetailForm" size="small" :inline="true"> |
| | | <el-form-item label="å¹è®è®²å¸"> |
| | | <el-input v-model="inDetailForm.trainingLecturerName" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å¹è®æ¥æ"> |
| | | <el-date-picker v-model="inDetailForm.trainingDate" clearable |
| | | format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | type="date" value-format="yyyy-MM-dd"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="searchTable">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" @click="batchDelete">æ¹éå é¤</el-button> |
| | | <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" type="primary" @click="addTrainingPlan('add')">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <lims-table :tableData="inDetailPlanTableData" :column="inDetailPlanColumn" |
| | | :height="isDepartment ? '40vh' : '62vh' " |
| | | :isSelection="true" :handleSelectionChange="handleSelectionChange" |
| | | @pagination="pagination1" |
| | | :page="inDetailPagination" :tableLoading="yearDetailLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | <Add ref="addPlan" :currentChangeRow="currentChangeRow" @search="getInDetailPlan(currentRowId, departId)"></Add> |
| | | <Edit |
| | | v-if="editPlanShow" |
| | | ref="editPlan" |
| | | :currentRow="currentRow" |
| | | @del="getInDetailPlan(currentRowId, departId)" |
| | | @goBack="goBack" |
| | | ></Edit> |
| | | <el-dialog :visible.sync="reviewDialog" title="å®¡æ ¸" width="30%" @close="auditRemarks = ''"> |
| | | <span> |
| | | å®¡æ ¸å¤æ³¨ï¼ |
| | | <el-input v-model="auditRemarks" type="textarea"></el-input> |
| | | </span> |
| | | <span style="margin-top: 10px;display: inline-block"> |
| | | æ¹åäººï¼ |
| | | <el-select v-model="approverId" clearable |
| | | filterable size="small" style="width: 70%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </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="display: flex;align-items: center;"> |
| | | <div style="width: 70px">年份ï¼</div> |
| | | <el-date-picker |
| | | v-model="planYear" |
| | | type="year" |
| | | value-format="yyyy" |
| | | clearable |
| | | size="small" |
| | | format="yyyy" |
| | | placeholder="鿩年"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div style="display: flex;align-items: center;margin: 10px 0"> |
| | | <div style="width: 70px">å®¡æ ¸äººï¼</div> |
| | | <el-select v-model="reviewerId" clearable |
| | | filterable size="small" style="width: 50%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div style="margin: 0 auto;"> |
| | | <el-upload ref="upload" :action="javaApi + '/personTraining/personTrainingImport' + '?planYear=' + planYear + '&reviewerId=' + reviewerId" |
| | | :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 > |
| | | <view-record v-if="ViewRecord" ref="ViewRecord"></view-record> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Add from '../components/AddInDetail.vue'; |
| | | import Edit from '../components/Edit.vue'; |
| | | import ViewRecord from "../components/ViewRecord.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {mapGetters} from "vuex"; |
| | | import { |
| | | approveAnnualPersonnelTraining, deleteAnnualPlanDetailTable, exportPersonTraining, exportPersonTrainingRecord, |
| | | personTraining, |
| | | personTrainingDelete, |
| | | queryTheAnnualPlanDetailsTable, reviewAnnualPersonnelTraining |
| | | } from "@/api/cnas/personal/personalTraining"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | |
| | | export default { |
| | | name: 'PersonnelTraining', |
| | | components: {limsTable, ViewRecord, Add, Edit }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | planYear: '', |
| | | reviewerId: '', |
| | | responsibleOptions: [], |
| | | search: {}, |
| | | superviseForm: {}, |
| | | inDetailForm: { |
| | | trainingLecturerName: '', |
| | | trainingDate: '', |
| | | }, |
| | | yearLoading: false, |
| | | yearDetailLoading: false, |
| | | yearPlanTableData: [], // 年度计åè¡¨æ°æ® |
| | | yearPlanColumn: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | width: '160px', |
| | | prop: 'fileName' |
| | | }, { |
| | | label: 'å建æ¶é´', |
| | | width: '160px', |
| | | prop: 'createTime' |
| | | },{ |
| | | 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 || this.userId != row.reviewerId) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.handleCheck(row.id); |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if(row.approvalStatus === 1 || this.userId != row.approverId || row.reviewerStatus != 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.handleApprove(row.id); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteFun(row.id); |
| | | }, |
| | | disabled: (row) => { |
| | | if(row.reviewerStatus === 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | } |
| | | ] |
| | | }], |
| | | inDetailPlanTableData: [], // 年度计åæç»è¡¨è¡¨æ°æ® |
| | | inDetailPlanColumn: [ |
| | | { |
| | | label: 'å¹è®ç®æ ', |
| | | prop: 'trainingObjectives', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®å
容', |
| | | prop: 'trainingContent', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®æ¹å¼', |
| | | prop: 'trainingMode', |
| | | width: '100px', |
| | | }, { |
| | | dataType: 'tag', |
| | | label: '课ç¨ç¶æ', |
| | | width: '100px', |
| | | prop: 'state', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return '已宿'; |
| | | } else if (params == 2) { |
| | | return 'å¾
è¯ä»·'; |
| | | } else if (params == 3) { |
| | | return 'æªå¼å§'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success'; |
| | | } else if (params == 2) { |
| | | return 'warning'; |
| | | } else if (params == 3) { |
| | | return 'primary'; |
| | | } else if (params == 4) { |
| | | return 'info'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, { |
| | | label: 'åå 对象', |
| | | prop: 'participants', |
| | | width: '100px', |
| | | }, { |
| | | label: '举åé¨é¨', |
| | | prop: 'holdingDepartment', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®è®²å¸', |
| | | prop: 'trainingLecturerName', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¹è®æ¥æ', |
| | | prop: 'trainingDate', |
| | | width: '100px', |
| | | }, { |
| | | label: 'å¼å§æ¶é´', |
| | | prop: 'openingTime', |
| | | width: '100px', |
| | | }, { |
| | | label: '课æ¶', |
| | | prop: 'classHour', |
| | | width: '100px', |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks', |
| | | width: '100px', |
| | | }, { |
| | | dataType: 'action', |
| | | width: '200', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.addTrainingPlan('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ç»ææç»', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editInDetail(row); |
| | | }, |
| | | showHide: () => { |
| | | if (this.isDepartment) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | name: 'éä»¶', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewRecord(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadInDetail(row); |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | }], |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1, |
| | | compilerName: "" |
| | | }, |
| | | inDetailPagination: { |
| | | total:0, |
| | | size:10, |
| | | current:1, |
| | | }, |
| | | editPlanShow: false, |
| | | currentRow: {}, |
| | | currentRowId: null, // å½åé䏿°æ®çid |
| | | auditRemarks: '', // å®¡æ ¸å¤æ³¨ |
| | | reviewDialog: false, // å®¡æ ¸å¼¹æ¡ |
| | | reviewLoading: false, // å®¡æ ¸æäº¤æé® |
| | | approvalRemarks: '', // å®¡æ ¸å¤æ³¨ |
| | | approvalDialog: false, // å®¡æ ¸å¼¹æ¡ |
| | | approvalLoading: false, // å®¡æ ¸æäº¤æé® |
| | | multipleSelection: [], // 年度æç»è¡¨éä¸çæ°æ® |
| | | uploadDia: false, |
| | | uploading: false, |
| | | isOperation: false, |
| | | ViewRecord: false, |
| | | fileList: [], |
| | | currentChangeRow: {}, |
| | | approverId: '' |
| | | }; |
| | | }, |
| | | mounted() { |
| | | if (this.isDepartment) { |
| | | this.getYearPlanList(this.departId) |
| | | } else { |
| | | this.getInDetailPlan('', this.departId) |
| | | } |
| | | }, |
| | | methods: { |
| | | searchTable () { |
| | | this.getInDetailPlan(this.currentRowId) |
| | | }, |
| | | // æ¥è¯¢-年度计å表 |
| | | getYearPlanList(userId) { |
| | | this.yearLoading = true |
| | | const params = this.isDepartment ? |
| | | { |
| | | departmentId: userId, |
| | | size: this.page.size, |
| | | current: this.page.current, |
| | | compilerName: this.page.compilerName, |
| | | }: { |
| | | userId: userId, |
| | | size: this.page.size, |
| | | current: this.page.current, |
| | | compilerName: this.page.compilerName, |
| | | } |
| | | personTraining(params).then(res => { |
| | | this.yearLoading = false |
| | | this.yearPlanTableData = res.data.records; |
| | | this.pagination.total = res.data.total; |
| | | if (this.yearPlanTableData.length > 0) { |
| | | this.currentRowId = this.yearPlanTableData[0].id |
| | | this.currentChange(this.yearPlanTableData[0]) |
| | | } |
| | | }).catch(err => { |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.limit |
| | | this.getYearPlanList() |
| | | }, |
| | | currentChange (row) { |
| | | const now = new Date(); |
| | | const currentYear = now.getFullYear(); |
| | | if (row) { |
| | | this.currentChangeRow = row |
| | | this.currentRowId = row.id |
| | | if (row.createTime.slice(0,4) == currentYear) { |
| | | this.isOperation = true; |
| | | } else { |
| | | this.isOperation = false; |
| | | } |
| | | this.getInDetailPlan(row.id) |
| | | } |
| | | }, |
| | | getInDetailPlan (id) { |
| | | if (this.inDetailForm.trainingDate === null) { |
| | | this.inDetailForm.trainingDate = '' |
| | | } |
| | | const userId = this.isDepartment ? '' : this.departId |
| | | const params = |
| | | { |
| | | userId: userId, |
| | | size: this.inDetailPagination.pageSize, |
| | | current: this.inDetailPagination.current, |
| | | id: id, |
| | | trainingLecturerName: this.inDetailForm.trainingLecturerName, |
| | | trainingDate: this.inDetailForm.trainingDate, |
| | | } |
| | | this.yearDetailLoading = true |
| | | queryTheAnnualPlanDetailsTable(params).then(res => { |
| | | this.yearDetailLoading = false |
| | | this.inDetailPlanTableData = res.data.records; |
| | | this.inDetailPagination.total = res.data.total; |
| | | }).catch(err => { |
| | | this.yearDetailLoading = false |
| | | }) |
| | | }, |
| | | pagination1 (page) { |
| | | this.inDetailPagination.size = page.limit |
| | | this.getInDetailPlan(this.currentRowId) |
| | | }, |
| | | // æ°å¢å¹´åº¦è®¡åæç»è¡¨ |
| | | addTrainingPlan(type, row) { |
| | | if (!this.currentRowId) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®¡åè¿è¡æ°å¢') |
| | | return |
| | | } |
| | | this.$refs.addPlan.showDialog(this.currentRowId, type, row); |
| | | }, |
| | | // 年度计å表-å é¤ |
| | | deleteFun(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | personTrainingDelete({id: id}).then(res => { |
| | | this.$message.success('å 餿åï¼'); |
| | | this.getYearPlanList(this.departId); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // 年度计å表-å®¡æ ¸ |
| | | handleCheck(id) { |
| | | this.currentRowId = id |
| | | this.reviewDialog = true |
| | | this.getUserList() |
| | | }, |
| | | // æäº¤å®¡æ ¸ |
| | | handleReview (status) { |
| | | const personTrainingUpdateDto = { |
| | | id: this.currentRowId, |
| | | auditRemarks: this.auditRemarks, |
| | | reviewerStatus: status, |
| | | approverId: this.approverId |
| | | } |
| | | 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, |
| | | approvalRemarks: this.approvalRemarks, |
| | | approvalStatus: 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') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // 年度计å-导å
¥ |
| | | 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 != 200) { |
| | | this.$message.error(response.msg) |
| | | 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; |
| | | } |
| | | }, |
| | | // 年度计åæç»è¡¨-ç¼è¾ |
| | | editInDetail(row) { |
| | | this.editPlanShow = true; |
| | | this.currentRow = row |
| | | }, |
| | | // |
| | | goBack() { |
| | | this.editPlanShow = false; |
| | | this.getInDetailPlan(this.currentRowId) |
| | | }, |
| | | viewRecord (row) { |
| | | this.ViewRecord = true |
| | | this.$nextTick(() => { |
| | | this.$refs.ViewRecord.openDia(row) |
| | | }) |
| | | }, |
| | | // 年度计åæç»è¡¨-ä¸è½½ |
| | | downLoadInDetail(row) { |
| | | exportPersonTrainingRecord({id: row.id}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | this.$download.saveAs(blob, '人åå¹è®ä¸èæ ¸è®°å½.docx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // 年度计åæç»è¡¨-å¤é |
| | | 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('è¯·éæ©éè¦å é¤çæ°æ®') |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.inDetailPagination.size = val; |
| | | this.getInDetailPlan(this.currentChangeRow.id) |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.inDetailPagination.current = val; |
| | | this.getInDetailPlan(this.currentChangeRow.id) |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (this.isDepartment) { |
| | | this.getYearPlanList(newId); |
| | | } else { |
| | | this.getInDetailPlan('') |
| | | } |
| | | } |
| | | }, |
| | | currentRowId: { |
| | | handler(newId, oldId) { |
| | | if (newId) { |
| | | console.log('newId', newId); |
| | | this.inDetailPagination.current = 1 |
| | | this.getInDetailPlan(this.currentChangeRow.id) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | height: 80vh; |
| | | flex-direction: column; |
| | | overflow: auto; |
| | | justify-content: space-between; |
| | | } |
| | | .search { |
| | | width: 150px; |
| | | margin: 0 16px; |
| | | } |
| | | .title { |
| | | position: relative; |
| | | font-size: 16px; |
| | | color: #333; |
| | | font-weight: 400; |
| | | padding-left: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .title::before { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 4px; |
| | | content: ''; |
| | | width: 4px; |
| | | height: 16px; |
| | | background-color: #3A7BFA; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 奿©è®°å½ --> |
| | | <template> |
| | | <div> |
| | | <div class="view"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="search" ref="page" size="small" :inline="true"> |
| | | <el-form-item label="å§å"> |
| | | <el-input v-model="search.userName" clearable placeholder="请è¾å
¥å
³é®å" size="small" style="width: 20vh;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item 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: 100%" |
| | | type="daterange" |
| | | unlink-panels |
| | | value-format="yyyy-MM-dd 00:00:00"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">导åº</el-button> |
| | | <el-button size="small" type="primary" @click="addRow">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table :data="tableData" v-loading="tableLoading" height="66.5vh" 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" align="center"> |
| | | <template v-slot="scope"> |
| | | <el-button size="small" type="text" @click="editForm(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" style="color: #f56c6c" @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" |
| | | background |
| | | style="margin-top: 10px" |
| | | @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="userId"> |
| | | <el-select v-model="form.userId" placeholder="è¯·éæ©" size="small" style="width: 100%" value-key="id" |
| | | @change="selectUserChange" :disabled="!isDepartment"> |
| | | <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="奿©çº§å«" 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 { |
| | | addOrUpdateRewardPunishment, deleteRewardPunishment, |
| | | rewardPunishmentExport, |
| | | rewardPunishmentPage |
| | | } from "@/api/cnas/personal/personRewardPunishmentRecord"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | import {delCustomById} from "@/api/system/customer"; |
| | | |
| | | export default { |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | tableLoading: false, |
| | | 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: { |
| | | userId: [{ |
| | | 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 params = { |
| | | userId: this.isDepartment ? '' : this.departId, |
| | | departmentId: this.isDepartment ? this.departId : '', |
| | | current: this.search.curent, |
| | | size: this.search.size, |
| | | userName: this.search.userName, |
| | | startTime: this.search.searchTimeList && this.search.searchTimeList[0], |
| | | endTime: this.search.searchTimeList && this.search.searchTimeList[1], |
| | | } |
| | | this.tableLoading = true |
| | | rewardPunishmentPage(params).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records |
| | | this.search.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | addRow () { |
| | | this.dialogVisible = true |
| | | if (!this.isDepartment) { |
| | | this.form.userId = this.departId |
| | | this.selectUserChange(this.form.userId) |
| | | } |
| | | }, |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | 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] |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | this.$download.saveAs(blob, '奿©è®°å½.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }); |
| | | }, |
| | | selectUserChange(val) { |
| | | const index = this.responsibleOptions.findIndex(item => item.id === val) |
| | | if (index > -1) { |
| | | this.form.userName = this.responsibleOptions[index].name |
| | | this.form.account = this.responsibleOptions[index].account |
| | | } |
| | | }, |
| | | // æå¼è¡¨åå¼¹æ¡ |
| | | editForm(row) { |
| | | this.dialogVisible = true |
| | | this.form = {...row}; |
| | | }, |
| | | // æäº¤è¡¨åæ°æ® |
| | | saveOrUpdate() { |
| | | this.$refs.form.validate(async (valid) => { |
| | | if (valid) { |
| | | addOrUpdateRewardPunishment(this.form).then(res => { |
| | | this.dialogVisible = false |
| | | this.$message.success("æä½æå") |
| | | this.getPersonnelTraining(this.departId); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | deleteRow(row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | deleteRewardPunishment({id: row.id}).then(res => { |
| | | if (res.code === 500) { |
| | | return |
| | | } |
| | | this.$message.success('å 餿å') |
| | | this.getPersonnelTraining(this.departId); |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => {}) |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | this.getPersonnelTraining(newId); |
| | | } |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (newVal === false) { |
| | | this.form = {} |
| | | this.$refs['form'].resetFields() |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- å¹è®è®°å½ --> |
| | | <template> |
| | | <div> |
| | | <div class="flex_table"> |
| | | <div v-if="isDepartment" style="width: 49%"> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计å</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="trainingPagination" ref="trainingPagination" size="small" :inline="true"> |
| | | <el-form-item label="å§å"> |
| | | <el-input v-model="trainingPagination.userName" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <lims-table :tableData="trainingTableData" :column="trainingColumn" |
| | | ref="trainingTableData" |
| | | :currentChange="currentChange" :highlightCurrentRow="true" |
| | | @pagination="pagination" :height="'calc(100vh - 22em)'" |
| | | :page="trainingPagination" :tableLoading="trainingLoading"></lims-table> |
| | | </div> |
| | | <div :style="`width: ${isDepartment ? '49%' : '100%'};`"> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计åæç»</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="年份"> |
| | | <el-date-picker |
| | | v-model="searchForm.trainingDate" |
| | | clearable |
| | | format="yyyy" |
| | | placeholder="鿩年" |
| | | size="small" |
| | | type="year" |
| | | value-format="yyyy"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="queryPersonnelDetailsPage(currentChangeRow.userId)">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openDownloadDia(currentChangeRow)">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <lims-table :tableData="trainingPersonTableData" :column="trainingPersonColumn" |
| | | :height="'calc(100vh - 22em)'" @pagination="pagination1" |
| | | :page="trainingPersonPagination" :tableLoading="trainingPersonLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | exportTrainingRecord, |
| | | queryPersonnelDetails, |
| | | trainingSelectTrainingRecord |
| | | } from "@/api/cnas/personal/personTrainingRecord"; |
| | | |
| | | export default { |
| | | components: {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.personal.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') |
| | | } |
| | | 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 params = { |
| | | departmentId: departId, |
| | | size: this.trainingPagination.size, |
| | | current: this.trainingPagination.current, |
| | | userName: this.trainingPagination.userName, |
| | | } |
| | | this.trainingLoading = true |
| | | trainingSelectTrainingRecord(params).then(res => { |
| | | this.trainingLoading = false |
| | | this.trainingTableData = res.data.records; |
| | | this.trainingPagination.total = res.data.total; |
| | | if (this.trainingTableData.length > 0) { |
| | | this.$refs.trainingTableData.setCurrentRow(this.trainingTableData[0]) |
| | | } |
| | | }).catch(err => { |
| | | this.trainingLoading = false |
| | | }) |
| | | }, |
| | | // è·å个人-å¹è®è®¡ååè¡¨ä¿¡æ¯ |
| | | 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 = '' |
| | | } |
| | | const params = { |
| | | userId: userId, |
| | | size: this.trainingPersonPagination.size, |
| | | current: this.trainingPersonPagination.current, |
| | | trainingDate: this.searchForm.trainingDate, |
| | | } |
| | | this.trainingPersonLoading = true |
| | | queryPersonnelDetails(params).then(res => { |
| | | this.trainingPersonLoading = false |
| | | this.trainingPersonTableData = res.data.records; |
| | | this.trainingPersonPagination.total = res.data.total; |
| | | }).catch(err => { |
| | | this.trainingPersonLoading = false |
| | | }) |
| | | }, |
| | | // å页 |
| | | pagination(page) { |
| | | this.trainingPagination.size = page.limit; |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | // å页 |
| | | pagination1(page) { |
| | | this.trainingPersonPagination.size = page.limit; |
| | | this.queryPersonnelDetailsPage(this.currentChangeRow.userId); |
| | | }, |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (this.isDepartment) { |
| | | this.getPersonnelTraining(newId); |
| | | } else { |
| | | this.queryPersonnelDetailsPage(newId) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .flex_table { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | } |
| | | .title { |
| | | position: relative; |
| | | font-size: 16px; |
| | | color: #333; |
| | | font-weight: 400; |
| | | padding-left: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .title::before { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 4px; |
| | | content: ''; |
| | | width: 4px; |
| | | height: 16px; |
| | | background-color: #3A7BFA; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="viewDeviceDialog" title="æ¥ç设å¤" width="80%" @close="closeDia"> |
| | | <div style="text-align: right;margin-bottom: 10px"> |
| | | <el-button size="small" type="primary" @click="addRow">æ·»å </el-button> |
| | | <el-button size="small" type="danger" @click="clearTable">æ¸
空</el-button> |
| | | </div> |
| | | <div> |
| | | <el-table :data="machineAttachmentList" border height="500" style="width: 100%"> |
| | | <el-table-column header-align="center" label="åç§°" prop="machineName" width="200"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <p>åç§°</p> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.machineName" |
| | | class="table_input" |
| | | clearable |
| | | filterable |
| | | placeholder="设å¤åç§°" |
| | | size="small" @change="(val)=>changeMachineName(val, scope.$index)"> |
| | | <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | | {{item.label + item.value}} |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="åå·è§æ ¼" prop="machineSpecification" width="180"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <p>åå·è§æ ¼</p> |
| | | </template> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.machineSpecification" size="small"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="æµéèå´" prop="machineMeasuringRange"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <p>æµéèå´</p> |
| | | </template> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.machineMeasuringRange" size="small" type="textarea"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="â æ©å±ä¸ç¡®å®åº¦â¡æå¤§å
å·®â¢å确度ç级" prop="other"> |
| | | <template slot="header" slot-scope="scope"> |
| | | <p>â æ©å±ä¸ç¡®å®åº¦â¡æå¤§å
å·®â¢å确度ç级</p> |
| | | </template> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.other" size="small" type="textarea"/> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleDeviceInfo">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { deviceScopeSearch } from '@/api/cnas/process/method/standardMethodsChange' |
| | | |
| | | export default { |
| | | name: 'ViewDeviceDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | viewDeviceDialog: false, |
| | | machineAttachmentList: [], |
| | | equipOptions: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(info) { |
| | | this.viewDeviceDialog = true |
| | | this.machineAttachmentList = info.machineAttachmentList |
| | | this.getEquipOptions() |
| | | }, |
| | | // å¢å è¡¨æ ¼è¡æ°æ® |
| | | addRow () { |
| | | this.machineAttachmentList.push({ |
| | | machineName: '', |
| | | machineSpecification: '', |
| | | machineMeasuringRange: '', |
| | | other: '', |
| | | }) |
| | | }, |
| | | // æ¸
ç©ºè¡¨æ ¼æ°æ® |
| | | clearTable () { |
| | | this.machineAttachmentList = [] |
| | | }, |
| | | // éæ©è®¾å¤çåè° |
| | | changeMachineName (val, index) { |
| | | const index1 = this.equipOptions.findIndex(item => item.value === val); |
| | | if (index1 !== -1) { |
| | | this.machineAttachmentList[index].deviceId = this.equipOptions[index1].id; |
| | | this.machineAttachmentList[index].machineName = this.equipOptions[index1].deviceName; |
| | | } |
| | | this.machineAttachmentList[index].machineSpecification = val |
| | | }, |
| | | // æäº¤è®¾å¤ä¿¡æ¯ |
| | | handleDeviceInfo () { |
| | | if (this.machineAttachmentList.length === 0) { |
| | | this.$message.warning('请添å ä¿¡æ¯') |
| | | return |
| | | } |
| | | this.viewDeviceDialog = false |
| | | this.$emit('handleDeviceInfo', this.machineAttachmentList) |
| | | }, |
| | | closeDia () { |
| | | this.viewDeviceDialog = false |
| | | this.$emit('closDeviceDia') |
| | | }, |
| | | // è·åææè®¾å¤ |
| | | getEquipOptions() { |
| | | this.equipOptions = [] |
| | | deviceScopeSearch({status:'0'}).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.equipOptions = res.data.map(m => { |
| | | m.value = m.managementNumber |
| | | m.label = m.deviceName |
| | | return m |
| | | }) |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <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="{methodVerifyId: info.methodVerifyId}" |
| | | :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> |
| | | <lims-table |
| | | ref="yearTable" |
| | | :column="columnData" |
| | | :height="'calc(100vh - 47em)'" |
| | | :highlightCurrentRow="true" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="margin-top: 0.5em;"> |
| | | </lims-table> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import file from "@/utils/file"; |
| | | import { delVerifyMethodFileList, getVerifyMethodFileList } from '@/api/cnas/process/method/standardMethodsChange' |
| | | |
| | | export default { |
| | | name: 'ViewTestRecord', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | filesDialogVisible: false, |
| | | tableLoading: false, |
| | | filesLookInfo: {}, |
| | | columnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '100', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.upload(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delete(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | info: {} |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.filesDialogVisible = true |
| | | this.info = row |
| | | if (this.info === undefined) { |
| | | this.info = { |
| | | methodVerifyId: '' |
| | | } |
| | | } |
| | | this.searchTableList() |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList () { |
| | | this.tableLoading = true |
| | | getVerifyMethodFileList({methodVerifyId:this.info.methodVerifyId}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.tableData = res.data |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | closeFilesLook () { |
| | | this.filesDialogVisible = false |
| | | }, |
| | | // ä¸è½½ |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | }, |
| | | // å é¤ |
| | | delete (row) { |
| | | this.tableLoading = true |
| | | delVerifyMethodFileList({methodFileId:row.methodFileId}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList() |
| | | } |
| | | |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // ä¸ä¼ éªè¯ |
| | | 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() |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | fileAction() { |
| | | return this.javaApi + '/processMethodVerify/uploadVerifyMethodFile' |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="filesDialogVisible" title="æ¥çæ ¡åè¯ä¹¦" width="80%" @closed="closeFilesLook"> |
| | | <div> |
| | | <limsTable |
| | | ref="yearTable" |
| | | :column="columnData" |
| | | :height="'calc(100vh - 47em)'" |
| | | :highlightCurrentRow="true" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="margin-top: 0.5em;"> |
| | | </limsTable> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="lookDialogVisible" |
| | | fullscreen |
| | | title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" |
| | | :fileUrl="javaApi+'/img/'+currentInfo.fileUrl" style="max-height: 90vh;overflow-y: auto;"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import filePreview from '@/views/tool/file-preview.vue'; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import file from '@/utils/file'; |
| | | |
| | | export default { |
| | | name: 'calibrationsFileDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { limsTable, filePreview }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | filesDialogVisible: false, |
| | | tableLoading: false, |
| | | filesLookInfo: {}, |
| | | columnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | label: '设å¤åç§°', |
| | | prop: 'deviceName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | label: '设å¤ç¼å·', |
| | | prop: 'managementNumber', |
| | | 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) |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | info: {}, |
| | | currentInfo:{}, |
| | | lookDialogVisible: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.filesDialogVisible = true |
| | | this.info = row |
| | | this.tableData = this.info.calibrationsFileList |
| | | }, |
| | | closeFilesLook () { |
| | | this.filesDialogVisible = false |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row){ |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | // ä¸è½½ |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :title="operationType === 'edit' ? 'ç¼è¾' : 'æ°å¢'" |
| | | :visible.sync="formDia" |
| | | width="90%" @close="closeDia"> |
| | | <div v-if="operationType === 'edit'" style="text-align: right"> |
| | | <el-button :disabled="form.confirmDate !== '' && form.confirmDate !== null && form.confirmDate !== undefined" size="medium" type="primary" @click="validation">éªè¯ç¡®è®¤</el-button> |
| | | </div> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td> |
| | | <p>æ åæ¹æ³</p> |
| | | </td> |
| | | <td> |
| | | <p>éªè¯åå </p> |
| | | </td> |
| | | <td> |
| | | <p>ä¸»è¦ææ¯åå</p> |
| | | </td> |
| | | <td> |
| | | <p>æ¶åæ¹é¢</p> |
| | | </td> |
| | | <td> |
| | | <p>æ åè¦æ±</p> |
| | | </td> |
| | | <td> |
| | | <p>å夿
åµ</p> |
| | | </td> |
| | | <td> |
| | | <p>æ¯å¦æ»¡è¶³</p> |
| | | </td> |
| | | <td> |
| | | <p>夿³¨</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td rowspan="9"> |
| | | <el-input v-model="form.methodName" :rows="6" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | </td> |
| | | <td rowspan="9"> |
| | | <el-input v-model="form.verifyReason" :rows="6" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | </td> |
| | | <td rowspan="9"> |
| | | <el-input v-model="form.technologyChange" :rows="6" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>人ï¼</td> |
| | | <td> |
| | | <el-input v-model="form.personRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.personReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.personIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-link type="primary" @click="viewWorkPermit">æ¥çä¸å²è¯</el-link> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>æºï¼</td> |
| | | <td> |
| | | <el-input v-model="form.machineRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.machineReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.machineIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-link type="primary" @click="viewDevice">æ¥ç设å¤</el-link> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>æï¼</td> |
| | | <td> |
| | | <el-input v-model="form.materialRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.materialReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.materialIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.materialRemark" size="small"></el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>æ³ï¼</td> |
| | | <td> |
| | | <el-input v-model="form.methodRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.methodReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.methodIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-link type="primary" @click="viewTestRecord">æ¥çæ£æµè®°å½</el-link> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>ç¯ï¼</td> |
| | | <td> |
| | | <el-input v-model="form.environmentRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.environmentReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.environmentIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.traceabilityRemark" size="small"></el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>æµéæº¯æºæ§ï¼</td> |
| | | <td> |
| | | <el-input v-model="form.traceabilityRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.traceabilityReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.traceabilityIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-link type="primary" @click="viewCalibrationsFileDia">æ¥çæ ¡åè¯ä¹¦</el-link> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>æ ·å管çéæ±ï¼</td> |
| | | <td> |
| | | <el-input v-model="form.managementRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.managementReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.managementIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.managementRemark" size="small"></el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>å
¶ä»ï¼</td> |
| | | <td> |
| | | <el-input v-model="form.otherRequirements" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.otherReadiness" size="small" type="textarea"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-radio-group v-model="form.otherIsSatisfied" v-removeAriaHidden> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="form.otherRemark" size="small"></el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="3"> |
| | | <p>æ¯å¦å¼ç¨æ¤æ åå¼å±æ£æµ:</p> |
| | | </td> |
| | | <td colspan="3">å¯ä»¥å¼ç¨æ¤æ åå¼å±æ£æµ</td> |
| | | <td> |
| | | <p>确认æ¶é´:</p> |
| | | </td> |
| | | <td>{{form.confirmDate}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="3"> |
| | | <p>åå 确认人ç¾å:</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-select v-model="form.confirmUser" multiple placeholder="è¯·éæ©" size="small" style="width: 100%" :multiple-limit="5"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <ViewDeviceDialog v-if="viewDeviceDialog" ref="viewDeviceDialog" @closDeviceDia="closDeviceDia" @handleDeviceInfo="handleDeviceInfo"></ViewDeviceDialog> |
| | | <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord> |
| | | <ViewWorkPermitDia v-if="viewWorkPermitDia" ref="viewWorkPermitDia"></ViewWorkPermitDia> |
| | | <calibrations-file-dia v-if="calibrationsFileDia" ref="calibrationsFileDia"></calibrations-file-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { dateFormat } from '@/utils/date' |
| | | import ViewTestRecord from '../component/ViewTestRecord.vue'; |
| | | import ViewDeviceDialog from '../component/ViewDeviceDialog.vue'; |
| | | import ViewWorkPermitDia from '../component/viewWorkPermitDia.vue'; |
| | | import CalibrationsFileDia from '../component/calibrationsFileDia.vue'; |
| | | import { |
| | | addMethodVerify, deviceScopeSearch, |
| | | getMethodVerifyOne, |
| | | selectUserCondition, |
| | | updateMethodVerify |
| | | } from '@/api/cnas/process/method/standardMethodsChange' |
| | | |
| | | export default { |
| | | name: 'formDIaChange', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { CalibrationsFileDia, ViewWorkPermitDia, ViewDeviceDialog, ViewTestRecord }, |
| | | props: { |
| | | operationType: { |
| | | type: String, |
| | | default: () => '' |
| | | } |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | methodName: '', |
| | | verifyReason: '', |
| | | technologyChange: '', |
| | | personRequirements: '', |
| | | personReadiness: '', |
| | | personIsSatisfied: '', |
| | | personRemark: '', |
| | | machineRequirements: '', |
| | | machineReadiness: '', |
| | | machineIsSatisfied: '', |
| | | materialRequirements: '', |
| | | materialReadiness: '', |
| | | materialIsSatisfied: '', |
| | | materialRemark: '', |
| | | methodRequirements: '', |
| | | methodReadiness: '', |
| | | methodIsSatisfied: '', |
| | | environmentRequirements: '', |
| | | environmentReadiness: '', |
| | | environmentIsSatisfied: '', |
| | | traceabilityRequirements: '', |
| | | traceabilityReadiness: '', |
| | | traceabilityIsSatisfied: '', |
| | | traceabilityRemark: '', |
| | | managementRequirements: '', |
| | | managementReadiness: '', |
| | | managementIsSatisfied: '', |
| | | managementRemark: '', |
| | | otherRequirements: '', |
| | | otherReadiness: '', |
| | | otherIsSatisfied: '', |
| | | otherRemark: '', |
| | | machineAttachmentList: [] |
| | | }, |
| | | editLoad: false, |
| | | info: { |
| | | methodVerifyId: '' |
| | | }, |
| | | userList: [], |
| | | viewDeviceDialog: false, |
| | | viewTestRecordDialog: false, |
| | | viewWorkPermitDia: false, |
| | | calibrationsFileDia: false, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.info = row |
| | | this.getUserList() |
| | | if (this.operationType === 'edit') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
ä¿¡æ¯ |
| | | searchInfo (row) { |
| | | getMethodVerifyOne({methodVerifyId:row.methodVerifyId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.form = {...res.data} |
| | | if (this.form.confirmUser) { |
| | | this.form.confirmUser = this.form.confirmUser.split(',').map(Number) |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit() { |
| | | this.editLoad = true |
| | | const processMethodSearchNews = this.HaveJson(this.form) |
| | | processMethodSearchNews.confirmUser = processMethodSearchNews.confirmUser && processMethodSearchNews.confirmUser.join(',') |
| | | processMethodSearchNews.operationType = 0 |
| | | if (this.operationType === 'edit') { |
| | | this.editInfo(processMethodSearchNews) |
| | | } else { |
| | | this.addInfo(processMethodSearchNews) |
| | | } |
| | | }, |
| | | // æ¥çä¸å²è¯ |
| | | viewWorkPermit () { |
| | | this.viewWorkPermitDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.viewWorkPermitDia.openDia(this.form) |
| | | }) |
| | | }, |
| | | // æ¥çæ ¡åè¯ä¹¦ |
| | | viewCalibrationsFileDia () { |
| | | this.calibrationsFileDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.calibrationsFileDia.openDia(this.form) |
| | | }) |
| | | }, |
| | | // æ¥çè®¾å¤ |
| | | viewDevice () { |
| | | this.viewDeviceDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.viewDeviceDialog.openDia(this.form) |
| | | }) |
| | | }, |
| | | // å
³é设å¤å¼¹æ¡ |
| | | closDeviceDia () { |
| | | this.viewDeviceDialog = false |
| | | }, |
| | | // æäº¤è®¾å¤ä¿¡æ¯ |
| | | handleDeviceInfo (machineAttachmentList) { |
| | | this.viewDeviceDialog = false |
| | | this.form.machineAttachmentList = machineAttachmentList |
| | | }, |
| | | // æ¥çæ£æµè®°å½ |
| | | viewTestRecord () { |
| | | this.viewTestRecordDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.viewTestRecordDialog.openDia(this.info) |
| | | }) |
| | | }, |
| | | // æäº¤ç¼è¾ |
| | | editInfo (processMethodSearchNews) { |
| | | updateMethodVerify(processMethodSearchNews).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 200){ |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | addInfo (processMethodSearchNews) { |
| | | addMethodVerify(processMethodSearchNews).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 200) { |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // éªè¯ç¡®è®¤ |
| | | validation () { |
| | | deviceScopeSearch({methodVerifyId:this.info.methodVerifyId}).then(res => { |
| | | if (res.code === 200){ |
| | | this.form.confirmDate = dateFormat(new Date()) |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia() { |
| | | this.formDia = false |
| | | this.$emit('closeDia'); |
| | | }, |
| | | getUserList(){ |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 200) { |
| | | this.userList = res.data |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin-top: 2vh !important; |
| | | } |
| | | >>>.el-dialog__body { |
| | | max-height: 720px; |
| | | overflow-y: auto; |
| | | } |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | .tables td { |
| | | height: 34px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 4px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="filesDialogVisible" title="æ¥çä¸å²è¯" width="80%" @closed="closeFilesLook"> |
| | | <div> |
| | | <limsTable |
| | | ref="yearTable" |
| | | :column="columnData" |
| | | :height="'calc(100vh - 400px)'" |
| | | :highlightCurrentRow="true" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="margin-top: 0.5em;"> |
| | | </limsTable> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="lookDialogVisible" |
| | | fullscreen |
| | | title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" |
| | | :fileUrl="javaApi+'/img/'+currentInfo.fileUrl" style="max-height: 90vh;overflow-y: auto;"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import file from '@/utils/file'; |
| | | import filePreview from '@/views/tool/file-preview.vue'; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | |
| | | export default { |
| | | name: 'viewWorkPermitDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { filePreview, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | filesDialogVisible: false, |
| | | tableLoading: false, |
| | | filesLookInfo: {}, |
| | | columnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | label: 'ææäºº', |
| | | prop: 'userName', |
| | | 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) |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | info: {}, |
| | | currentInfo:{}, |
| | | lookDialogVisible: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.filesDialogVisible = true |
| | | this.info = row |
| | | this.tableData = this.info.workFileList |
| | | }, |
| | | closeFilesLook () { |
| | | this.filesDialogVisible = false |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row){ |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | // ä¸è½½ |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="æ åæ¹æ³" prop="methodName"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.methodName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <div> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | <formDIaChange v-if="formDIa" ref="formDIa" :operationType="operationType" @closeDia="closeDia"></formDIaChange> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '@/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue'; |
| | | import formDIaChange from './component/formDIaChange.vue'; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | delMethodVerify, |
| | | exportMethodVerify, |
| | | pagesMethodVerify |
| | | } from '@/api/cnas/process/method/standardMethodsChange' |
| | | |
| | | export default { |
| | | name: 'a7-changes-standard-methods', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { limsTable, formDIaChange, TableCard }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | methodName: '', |
| | | operationType: 0, |
| | | }, |
| | | options: [ |
| | | { label: 'ä¸åå¹´', value: '1' }, |
| | | { label: 'ä¸åå¹´', value: '2' }, |
| | | ], |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ åæ¹æ³', |
| | | prop: 'methodName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'éªè¯åå ', |
| | | prop: 'verifyReason', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¸»è¦ææ¯åå', |
| | | prop: 'technologyChange', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '60', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteRow(row); |
| | | }, |
| | | } |
| | | |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 10, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | formDIa: false, |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = { |
| | | methodName: this.searchForm.methodName, |
| | | operationType: this.searchForm.operationType, |
| | | } |
| | | this.tableLoading = true |
| | | pagesMethodVerify({... this.page,...entity}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | deleteRow (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delMethodVerify({methodVerifyId:row.methodVerifyId}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }) |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.methodName = ''; |
| | | this.searchList() |
| | | }, |
| | | openFormDia (type, row) { |
| | | this.formDIa = true |
| | | this.operationType = type |
| | | this.$nextTick(() => { |
| | | this.$refs.formDIa.openDia(row) |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia () { |
| | | this.formDIa = false |
| | | this.searchList() |
| | | }, |
| | | // å¯¼åº |
| | | downLoadPost(row) { |
| | | this.outLoading = true |
| | | exportMethodVerify({methodVerifyId:row.methodVerifyId}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'æ åï¼æ¹æ³ï¼ç¡®è®¤è®°å½.docx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="formDia" title="ç¼è¾" width="80%" @close="closeDia"> |
| | | <el-form ref="form" :model="form" :rules="formRules" label-width="auto"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ ååç§°ï¼" prop="methodName"> |
| | | <el-input v-model="form.methodName" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ åå·ï¼" prop="standardNo"> |
| | | <el-input v-model="form.standardNo" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æä»¶ç¼å·ï¼" prop="fileNo"> |
| | | <el-input v-model="form.fileNo" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯å¦æ¯æ°æ åï¼" prop="isNewStandard"> |
| | | <el-radio-group v-model="form.isNewStandard"> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¥æ°è®°å½æ¥æºï¼" prop="searchNewSource"> |
| | | <el-radio-group v-model="form.searchNewSource"> |
| | | <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="8"> |
| | | <el-form-item label="夿³¨ï¼" prop="remark"> |
| | | <el-select v-model="form.remark" |
| | | clearable size="small"> |
| | | <el-option :value="0" label="ä½åº"></el-option> |
| | | <el-option :value="1" label="æ¿æ¢"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="form.isNewStandard == 1" :span="8"> |
| | | <el-form-item label="æ°æ ååç§°ï¼" prop="newMethodName"> |
| | | <el-input v-model="form.newMethodName" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="form.isNewStandard == 1" :span="8"> |
| | | <el-form-item label="æ°æ åå·ï¼" prop="newStandardNo"> |
| | | <el-input v-model="form.newStandardNo" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | updateMethodSearchNew |
| | | } from '@/api/cnas/process/method/standardNoveltyRetrieval' |
| | | |
| | | export default { |
| | | name: 'FormDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | methodName: '', |
| | | standardNo: '', |
| | | isNewStandard: '', |
| | | newMethodName: '', |
| | | newStandardNo: '', |
| | | searchNewSource: '', |
| | | remark: '', |
| | | fileNo: '', |
| | | }, |
| | | formRules: { |
| | | methodName: [{required: true, message: 'è¯·å¡«åæ ååç§°',trigger: 'blur'}], |
| | | standardNo: [{required: true, message: 'è¯·å¡«åæ åå·',trigger: 'blur'}], |
| | | isNewStandard: [{required: true, message: 'è¯·éæ©æ¯å¦æ¯æ°æ å',trigger: 'change'}], |
| | | newMethodName: [{required: false, message: 'è¯·å¡«åæ°æ ååç§°',trigger: 'blur'}], |
| | | newStandardNo: [{required: false, message: 'è¯·å¡«åæ°æ åå·',trigger: 'blur'}], |
| | | searchNewSource: [{required: true, message: 'è¯·éæ©æ¥æ°è®°å½æ¥æº',trigger: 'change'}], |
| | | fileNo: [{required: true, message: '请填åæä»¶å·',trigger: 'blur'}], |
| | | }, |
| | | editLoad: false, |
| | | info: {}, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.form = {...row} |
| | | }, |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.editLoad = true |
| | | const processMethodSearchNews = this.HaveJson(this.form) |
| | | delete processMethodSearchNews.createTime |
| | | updateMethodSearchNew(processMethodSearchNews).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 200){ |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeEditDia'); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-info { |
| | | display: inline-block; |
| | | max-height: 600px; |
| | | overflow-y: auto; |
| | | } |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="formDia" title="æ°å¢" width="80%" @close="closeDia"> |
| | | <el-form ref="form" :model="form" :rules="formRules" label-width="auto"> |
| | | <el-button size="small" type="primary" @click="addBtn">æ·»å 䏿¡</el-button> |
| | | <div class="form-info"> |
| | | <div v-for="(items,index) in form.taskRel" :key="index"> |
| | | <el-col :span="12"> |
| | | <el-form-item :prop="`taskRel.${index}.newMethodName`" :rules="{required: true, message: 'è¯·å¡«åæ ååç§°',trigger: 'blur',}" label="æ°æ ååç§°ï¼"> |
| | | <el-input v-model="items.newMethodName" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item :prop="`taskRel.${index}.newStandardNo`" :rules="{required: true,message: 'è¯·å¡«åæ åå·',trigger: 'blur',}" label="æ°æ åå·ï¼"> |
| | | <el-input v-model="items.newStandardNo" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item :prop="`taskRel.${index}.searchNewSource`" :rules="{required: true,message: 'è¯·éæ©æ¥æ°è®°å½æ¥æº',trigger: 'change',}" label="æ¥æ°è®°å½æ¥æºï¼"> |
| | | <el-radio-group v-model="items.searchNewSource"> |
| | | <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="8"> |
| | | <el-form-item :prop="`taskRel.${index}.remark`" :rules="{required: false,message: 'è¯·éæ©å¤æ³¨',trigger: 'change',}" label="夿³¨ï¼"> |
| | | <el-select v-model="items.remark" :prop="`taskRel.${index}.remark`" |
| | | :rules="{required: false,message: 'è¯·éæ©å¤æ³¨',trigger: 'change',}" |
| | | clearable size="small"> |
| | | <el-option :value="0" label="ä½åº"></el-option> |
| | | <el-option :value="1" label="æ¿æ¢"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button v-if="index !== 0" circle icon="el-icon-delete" size="small" type="danger" @click="deleteHeaderRow(index)"></el-button> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-divider></el-divider> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { addMethodSearchNew } from '@/api/cnas/process/method/standardNoveltyRetrieval' |
| | | |
| | | export default { |
| | | name: 'FormDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | taskRel: [ |
| | | { |
| | | newMethodName: '', |
| | | newStandardNo: '', |
| | | searchNewSource: '', |
| | | remark: '', |
| | | } |
| | | ] |
| | | }, |
| | | formRules: {}, |
| | | editLoad: false, |
| | | info: {}, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia (row) { |
| | | this.formDia = true |
| | | }, |
| | | // æ·»å 䏿¡ |
| | | addBtn() { |
| | | this.form.taskRel.push({ newMethodName: '', newStandardNo:'', searchNewSource: '', remark: ''}); |
| | | }, |
| | | // å é¤ä¸æ¡ |
| | | deleteHeaderRow (index) { |
| | | this.form.taskRel.splice(index, 1); |
| | | }, |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.editLoad = true |
| | | addMethodSearchNew(this.form.taskRel).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeDia'); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-info { |
| | | display: inline-block; |
| | | max-height: 42em; |
| | | overflow-y: auto; |
| | | } |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="æ åå·" prop="standardNo"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.standardNo"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="medium" type="primary" @click="openApprovalDialog1">建 档</el-button> |
| | | <el-upload ref='upload' :action="action" |
| | | :before-upload="beforeUpload" :headers="headers" :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="display: inline-block; margin-left: 10px;"> |
| | | <el-button :loading="upLoading" size="medium" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | <el-button size="medium" style="margin-left: 10px;" type="primary" @click="openFormDia">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="table"> |
| | | <div class="table-tab"> |
| | | <el-radio-group v-model="tabIndex" @input="searchList"> |
| | | <el-radio-button label="0">ä»å¹´æ åè®°å½</el-radio-button> |
| | | <el-radio-button label="1">å岿¡£æ¡</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-if="tabIndex === '0'"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <lims-table |
| | | :column="tableColumn" |
| | | :height="'calc(100vh - 26em)'" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | :page="page" |
| | | @pagination="pagination"> |
| | | </lims-table> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div v-if="tabIndex === '1'"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <lims-table |
| | | :column="oldTableColumn" |
| | | :height="'calc(100vh - 20em)'" |
| | | :table-data="oldTableData" |
| | | :table-loading="oldTableLoading" |
| | | :page="oldPage" |
| | | @pagination="oldPagination"> |
| | | </lims-table> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | <!-- å岿¡£æ¡æ¹åå¼¹æ¡--> |
| | | <el-dialog :visible.sync="approvalDialog" title="æ¹å" width="30%" @close="approvalDialog = false"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="qualityRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="approvalLoading" @click="handleApproval(0)">䏿¹å</el-button> |
| | | <el-button :loading="approvalLoading" type="primary" @click="handleApproval(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="approvalDialog1" title="建档" width="30%" @close="approvalDialog1 = false"> |
| | | <span> |
| | | æ¡£æ¡åç§°ï¼ |
| | | <el-input v-model="archivedName" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="approvalLoading" @click="approvalDialog1 = false, archivedName = ''">å æ¶</el-button> |
| | | <el-button :loading="approvalLoading" type="primary" @click="handleApproval1()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <FormDialog v-if="formDialog" ref="formDialog" @closeDia="closeDia"></FormDialog> |
| | | <EditFormDia v-if="editFormDialog" ref="editFormDialog" @closeEditDia="closeEditDia"></EditFormDia> |
| | | <el-dialog :visible.sync="viewRocordDia" title="详æ
" width="80%" @close="approvalDialog = false"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <limsTable |
| | | :column="tableColumn1" |
| | | :height="'calc(100vh - 26em)'" |
| | | :table-data="tableData1" |
| | | :table-loading="tableLoading1" |
| | | style="padding: 0 15px;margin-bottom: 16px" |
| | | :page="page1" |
| | | @pagination="pagination1"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import TableCard from '@/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue'; |
| | | import FormDialog from './component/FormDialog.vue'; |
| | | import EditFormDia from './component/EditFormDia.vue'; |
| | | import { |
| | | addSearchNewArchived, exportMethodSearchNew, |
| | | pageMethodSearchNew, pageSearchNewArchived, pageSearchNewBackups, ratifySearchNewArchivedr |
| | | } from '@/api/cnas/process/method/standardNoveltyRetrieval' |
| | | |
| | | export default { |
| | | name: 'a7-standard-novelty-retrieval', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { |
| | | FormDialog, |
| | | TableCard, |
| | | limsTable, |
| | | EditFormDia |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | year: '', |
| | | standardNo: '', |
| | | }, |
| | | options: [ |
| | | {label: 'ä¸åå¹´', value: '1'}, |
| | | {label: 'ä¸åå¹´', value: '2'}, |
| | | ], |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ ååç§°', |
| | | prop: 'methodName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ åå·', |
| | | prop: 'standardNo', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æä»¶ç¼å·', |
| | | prop: 'fileNo', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'æ¯å¦æ¯æ°æ å', |
| | | prop: 'isNewStandard', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'å¦'; |
| | | } else if (params == 1) { |
| | | return 'æ¯'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'danger'; |
| | | } else if (params == 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ°æ ååç§°', |
| | | prop: 'newMethodName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ°æ åå·', |
| | | prop: 'newStandardNo', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'æ¥è¯¢è®°å½æ¥æº', |
| | | prop: 'searchNewSource', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'æ åç½'; |
| | | } else if (params == 1) { |
| | | return 'å§ææ
æ¥'; |
| | | } else if (params == 2) { |
| | | return 'æ åæ°'; |
| | | } else if (params == 3) { |
| | | return 'å
¶ä»'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'success'; |
| | | } else if (params == 1) { |
| | | return 'danger'; |
| | | } else if (params == 2) { |
| | | return 'warning'; |
| | | } else if (params == 3) { |
| | | return 'info'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'ä½åº'; |
| | | } else if (params == 1) { |
| | | return 'æ¿æ¢'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'danger'; |
| | | } else if (params == 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '100', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openEditFormDia(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableColumn1: [ |
| | | { |
| | | label: 'æ ååç§°', |
| | | prop: 'methodName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ åå·', |
| | | prop: 'standardNo', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æä»¶ç¼å·', |
| | | prop: 'fileNo', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'æ¯å¦æ¯æ°æ å', |
| | | prop: 'isNewStandard', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'å¦'; |
| | | } else if (params == 1) { |
| | | return 'æ¯'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'danger'; |
| | | } else if (params == 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ°æ ååç§°', |
| | | prop: 'newMethodName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ°æ åå·', |
| | | prop: 'newStandardNo', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'æ¥è¯¢è®°å½æ¥æº', |
| | | prop: 'searchNewSource', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'æ åç½'; |
| | | } else if (params == 1) { |
| | | return 'å§ææ
æ¥'; |
| | | } else if (params == 2) { |
| | | return 'æ åæ°'; |
| | | } else if (params == 3) { |
| | | return 'å
¶ä»'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'success'; |
| | | } else if (params == 1) { |
| | | return 'danger'; |
| | | } else if (params == 2) { |
| | | return 'warning'; |
| | | } else if (params == 3) { |
| | | return 'info'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'ä½åº'; |
| | | } else if (params == 1) { |
| | | return 'æ¿æ¢'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'danger'; |
| | | } else if (params == 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableData1: [], |
| | | tableLoading: false, |
| | | tableLoading1: false, |
| | | page: { |
| | | size: 10, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | page1: { |
| | | size: 10, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | oldPage: { |
| | | size: 10, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | oldTableColumn: [ |
| | | { |
| | | label: 'åæ¡£åç§°', |
| | | prop: 'archivedName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'writeName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ç¼å¶æ¶é´', |
| | | prop: 'writeTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ¹å人', |
| | | prop: 'ratifyName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ¹åä¿¡æ¯', |
| | | prop: 'ratifyRemark', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'æ¹åç¶æ', |
| | | prop: 'ratifyStatus', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'ä¸éè¿'; |
| | | } else if (params == 1) { |
| | | return 'éè¿'; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'danger'; |
| | | } else if (params == 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ¹åæ¶é´', |
| | | prop: 'ratifyTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '100', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openApprovalDialog(row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openViewDia(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleOut(row); |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | oldTableData: [], |
| | | oldTableLoading: false, |
| | | tabIndex: '0', |
| | | formDialog: false, |
| | | editFormDialog: false, |
| | | upLoading:false, |
| | | outLoading:false, |
| | | ratifyInfo: { |
| | | writeUserId: '', |
| | | ratifyUserId: '', |
| | | writeDate: '', |
| | | ratifyDate: '', |
| | | }, |
| | | userList: [], |
| | | approvalDialog: false, |
| | | approvalDialog1: false, |
| | | viewRocordDia: false, |
| | | approvalLoading: false, |
| | | qualityRemark: '', |
| | | archivedName: '', |
| | | archivedId: '', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | let params = {} |
| | | if (this.tabIndex === '0') { |
| | | params = { |
| | | entity: { |
| | | standardNo: this.searchForm.standardNo, |
| | | }, |
| | | page: this.page |
| | | } |
| | | } else { |
| | | params = { |
| | | entity: {}, |
| | | page: this.oldPage |
| | | } |
| | | } |
| | | if (this.tabIndex === '0') { |
| | | this.tableLoading = true |
| | | pageMethodSearchNew({...params.oldPage,...params.entity}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | } else { |
| | | this.oldTableLoading = true |
| | | pageSearchNewArchived({ |
| | | ...params.page,...params.entity |
| | | }).then(res => { |
| | | this.oldTableLoading = false |
| | | if (res.code === 200){ |
| | | console.log('res>>>>>>>>>>>>',res) |
| | | this.oldTableData = res.data.records |
| | | this.oldPage.total = res.data.total |
| | | } |
| | | |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.oldTableLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | // æå¼å岿¡£æ¡è¯¦æ
å¼¹æ¡ |
| | | openViewDia (row) { |
| | | this.archivedId = row.archivedId |
| | | this.viewRocordDia = true |
| | | this.pageSearchNewBackups() |
| | | }, |
| | | pageSearchNewBackups () { |
| | | const entity = { |
| | | archivedId: this.archivedId, |
| | | } |
| | | this.tableLoading1 = true |
| | | pageSearchNewBackups({...this.page1,...entity}).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 200){ |
| | | this.tableData1 = res.data.records |
| | | this.page1.total = res.data.total |
| | | } |
| | | |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading1 = false |
| | | }) |
| | | }, |
| | | // æå¼æ¹åå¼¹æ¡ |
| | | openApprovalDialog (row) { |
| | | this.approvalDialog = true |
| | | this.archivedId = row.archivedId |
| | | }, |
| | | // æå¼æ¹åå¼¹æ¡ |
| | | openApprovalDialog1 (row) { |
| | | this.approvalDialog1 = true |
| | | this.archivedId = row.archivedId |
| | | }, |
| | | // æäº¤æ¹å |
| | | handleApproval (status) { |
| | | this.approvalLoading = true |
| | | let internalReport = { |
| | | archivedId: this.archivedId, |
| | | ratifyStatus: status, |
| | | ratifyRemark: this.ratifyRemark |
| | | } |
| | | ratifySearchNewArchivedr(internalReport).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.searchList() |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤æ¹å |
| | | handleApproval1 (status) { |
| | | this.approvalLoading = true |
| | | let internalReport = { |
| | | archivedName: this.archivedName, |
| | | } |
| | | addSearchNewArchived(internalReport).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog1 = false |
| | | this.searchList() |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm () { |
| | | this.searchForm.standardNo = ''; |
| | | this.searchList() |
| | | }, |
| | | // æä½æ°å¢æ¡ |
| | | openFormDia (row) { |
| | | this.formDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDialog.openDia(row) |
| | | }) |
| | | }, |
| | | // å
³éæ°å¢å¼¹æ¡ |
| | | closeDia () { |
| | | this.formDialog = false |
| | | this.searchList() |
| | | }, |
| | | // æå¼ä¿®æ¹å¼¹æ¡ |
| | | openEditFormDia (row) { |
| | | this.editFormDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.editFormDialog.openDia(row) |
| | | }) |
| | | }, |
| | | // |
| | | closeEditDia () { |
| | | this.editFormDialog = false |
| | | this.searchList() |
| | | }, |
| | | // å¯¼åº |
| | | handleOut (row) { |
| | | this.outLoading = true |
| | | exportMethodSearchNew({archivedId:row.archivedId}).then(res => { |
| | | const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æ 忥æ°å¯¼åº.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // 导å
¥ |
| | | 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() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.searchList() |
| | | } |
| | | }, |
| | | // å页 |
| | | pagination(page){ |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | pagination1(page){ |
| | | this.page1.size = page.limit |
| | | this.pageSearchNewBackups(); |
| | | }, |
| | | oldPagination(page){ |
| | | this.oldPage.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | // |
| | | getUserList(){ |
| | | this.$axios.post(this.$api.user.selectUserList, { |
| | | page: {current: -1, size: -1,}, |
| | | entity: {name: null} |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.userList = res.data.body.records |
| | | }) |
| | | }, |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + '/processMethodSearchNew/importMethodSearchNew' |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .table-tab { |
| | | margin-bottom: 10px; |
| | | } |
| | | </style> |
| | |
| | | this.getDicts("inspection_task_state").then((response) => { |
| | | this.inspectionTaskState = this.dictToValue(response.data); |
| | | }); |
| | | this.refreshTable(); |
| | | |
| | | }, |
| | | mounted() { |
| | | this.queryParams.userId = this.userId; |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | getList() { |
| | |
| | | } |
| | | }, |
| | | goback() { |
| | | this.$tab.closeOpenPage({ path: "/business/inspectionTask" }); |
| | | this.$router.go(-1) |
| | | } |
| | | }, |
| | | }; |
| | |
| | | </div> |
| | | <!--å¾
ä¸å--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination" |
| | | :height="'calc(100vh - 290px)'" key="tableData" :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | v-if="tabIndex === 0" @pagination="pagination" |
| | | :rowClassName="changeRowClass" |
| | | :height="'calc(100vh - 290px)'" key="tableData" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <!--æ£éªä¸--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true" |
| | | :handleSelectionChange="selectMethod" @pagination="pagination1" :height="'calc(100vh - 290px)'" |
| | | key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> |
| | | <lims-table :tableData="tableData1" :column="column1" |
| | | v-if="tabIndex === 1" :isSelection="true" |
| | | :rowClassName="changeRowClass" |
| | | :handleSelectionChange="selectMethod" @pagination="pagination1" :height="'calc(100vh - 290px)'" |
| | | key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> |
| | | </div> |
| | | <!--å·²æ£éª--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true" |
| | | :rowClassName="changeRowClass" |
| | | :handleSelectionChange="selectMethod" @pagination="pagination2" :height="'calc(100vh - 290px)'" |
| | | key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table> |
| | | </div> |
| | | <!--å
¨é¨--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true" |
| | | :rowClassName="changeRowClass" |
| | | :handleSelectionChange="selectMethod" @pagination="pagination3" :height="'calc(100vh - 290px)'" |
| | | key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table> |
| | | </div> |
| | | <!--å£åº¦æ£éª--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData4" :column="column4" v-if="tabIndex === 4" :isSelection="true" |
| | | :rowClassName="changeRowClass" |
| | | :handleSelectionChange="selectMethod" @pagination="pagination4" :height="'calc(100vh - 290px)'" |
| | | key="tableData4" :page="page4" :tableLoading="tableLoading4"></lims-table> |
| | | </div> |
| | |
| | | selectMethod(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | changeRowClass({row, rowIndex}) { |
| | | if (row.isFirst == 1) { |
| | | return 'highlight-danger-row-border' |
| | | } |
| | | return '' |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | this.getCompanyList() |
| | | }, |
| | | getCompanyList () { |
| | | selectCustomPageList().then(res => { |
| | | selectCustomPageList({...this.page1}).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 200) { |
| | | this.tableData1 = res.data.records |
| | |
| | | // å¾
æ¥æ£ãå¾
ä¸åæ¥è¯¢ |
| | | getWarehouseSubmitApi () { |
| | | this.tableLoading = true |
| | | const params = {...this.componentData, isInspect: this.tabIndex, state: this.tabIndex === 0 ? null : 0} |
| | | const params = {...this.componentData, isInspect: this.tabIndex, state: this.tabIndex === 0 ? null : 0, ...this.page} |
| | | getWarehouseSubmit(params).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | |
| | | // 已宿鍿¥è¯¢ |
| | | getIfsByFinishList () { |
| | | this.tableLoading1 = true |
| | | getIfsByFinish({...this.componentData}).then(res => { |
| | | getIfsByFinish({...this.componentData, ...this.page1}).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 200) { |
| | | this.tableData1 = res.data.records |
| | |
| | | // å
¨é¨æ¥è¯¢ |
| | | getIfsByAllList () { |
| | | this.tableLoading1 = true |
| | | getIfsByAll({...this.componentData}).then(res => { |
| | | getIfsByAll({...this.componentData, ...this.page1}).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 200) { |
| | | this.tableData1 = res.data.records |
| | |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.title = "ç¼è¾"; |
| | | this.copyForm = row; |
| | | this.copyForm = this.HaveJson(row); |
| | | this.isShowCopyTem = true; |
| | | }, |
| | | showHide: (row) => { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div v-if="isImage"> |
| | | <img :src="imgUrl" alt="Image Preview" /> |
| | | </div> |
| | | <div v-if="isPdf"> |
| | | <object :data="fileUrl" type="application/pdf" width="100%" height="750px"> |
| | | <p>æ¨çæµè§å¨ä¸æ¯æ PDF é¢è§ã<a :href="fileUrl">ä¸è½½ PDF æä»¶</a></p> |
| | | </object> |
| | | </div> |
| | | <div v-if="isDoc"> |
| | | <p v-if="!isDocShow">ææ¡£æ æ³ç´æ¥é¢è§ï¼è¯·ä¸è½½æ¥çã</p> |
| | | <a :href="fileUrl" v-if="!isDocShow">ä¸è½½æä»¶</a> |
| | | <vue-office-docx v-else |
| | | :src="fileUrl" |
| | | style="height: 100vh;" |
| | | @rendered="renderedHandler" |
| | | @error="errorHandler" |
| | | /> |
| | | </div> |
| | | <div v-if="isXls"> |
| | | <p v-if="!isDocShow">ææ¡£æ æ³ç´æ¥é¢è§ï¼è¯·ä¸è½½æ¥çã</p> |
| | | <a :href="fileUrl" v-if="!isDocShow">ä¸è½½æä»¶</a> |
| | | <vue-office-excel v-else |
| | | :src="fileUrl" |
| | | :options="options" |
| | | style="height: 100vh;" |
| | | @rendered="renderedHandler" |
| | | @error="errorHandler" |
| | | /> |
| | | </div> |
| | | <div v-if="isZipOrRar"> |
| | | <p>å缩æä»¶æ æ³ç´æ¥é¢è§ï¼è¯·ä¸è½½æ¥çã</p> |
| | | <a :href="fileUrl">ä¸è½½æä»¶</a> |
| | | </div> |
| | | <div v-if="isCsv"> |
| | | <p v-if="csvList.length==0">CSV æä»¶æ æ³ç´æ¥é¢è§ï¼è¯·ä¸è½½æ¥çã</p> |
| | | <a :href="fileUrl" v-if="csvList.length==0">ä¸è½½æä»¶</a> |
| | | <el-tabs type="border-card" v-if="csvList.length>0" tab-position="bottom"> |
| | | <el-tab-pane :label="item.sheetName" v-for="(item,index) in csvList" :key="index"> |
| | | <el-table :data="item.tableData" height="75vh"> |
| | | <el-table-column :label="m.label" :prop="m.prop" v-for="(m,i) in item.column" :key="i" min-width="120px" show-overflow-tooltip> |
| | | <template slot-scope="scope" slot="header"> |
| | | <div> |
| | | <el-tooltip :content="m.label" placement="top"> |
| | | <div class="oneLine"> |
| | | <span>{{m.label}}</span> |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <div v-if="!isSupported"> |
| | | <p>䏿¯æçæä»¶æ ¼å¼</p> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import VueOfficeDocx from '@vue-office/docx' |
| | | //å¼å
¥ç¸å
³æ ·å¼ |
| | | import '@vue-office/docx/lib/index.css' |
| | | import VueOfficeExcel from '@vue-office/excel' |
| | | //å¼å
¥ç¸å
³æ ·å¼ |
| | | import '@vue-office/excel/lib/index.css' |
| | | export default { |
| | | components: { |
| | | VueOfficeDocx, |
| | | VueOfficeExcel, |
| | | }, |
| | | props: { |
| | | fileUrl: { |
| | | type: String, |
| | | required: true |
| | | }, |
| | | currentFile: { |
| | | type: Object, |
| | | required: true |
| | | }, |
| | | }, |
| | | data(){ |
| | | return { |
| | | isDocShow:true, |
| | | options:{ |
| | | xls: false, //é¢è§xlsxæä»¶è®¾ä¸ºfalseï¼é¢è§xlsæä»¶è®¾ä¸ºtrue |
| | | minColLength: 0, // excelæå°æ¸²æå¤å°åï¼å¦ææ³å®ç°xlsxæä»¶å
容æå åï¼å°±æ¸²æå åï¼å¯ä»¥å°æ¤å¼è®¾ç½®ä¸º0. |
| | | minRowLength: 0, // excelæå°æ¸²æå¤å°è¡ï¼å¦ææ³å®ç°æ ¹æ®xlsxå®é
彿°æ¸²æï¼å¯ä»¥å°æ¤å¼è®¾ç½®ä¸º0. |
| | | widthOffset: 10, //å¦ææ¸²æåºæ¥çç»ææè§åå
æ ¼å®½åº¦ä¸å¤ï¼å¯ä»¥å¨é»è®¤æ¸²æçå表宽度ä¸åå Npx宽 |
| | | heightOffset: 10, //å¨é»è®¤æ¸²æçå表é«åº¦ä¸åå Npxé« |
| | | beforeTransformData: (workbookData) => {return workbookData}, //åºå±éè¿exceljsè·åexcelæä»¶å
容ï¼éè¿è¯¥é©å彿°ï¼å¯ä»¥å¯¹è·åçexcelæä»¶å
容è¿è¡ä¿®æ¹ï¼æ¯å¦æä¸ªåå
æ ¼çæ°æ®æ¾ç¤ºä¸æ£ç¡®ï¼å¯ä»¥å¨æ¤èªè¡ä¿®æ¹æ¯ä¸ªåå
æ ¼çvalueå¼ã |
| | | transformData: (workbookData) => {return workbookData}, //å°è·åå°çexcelæ°æ®è¿è¡å¤çä¹å䏿¸²æå°é¡µé¢ä¹åï¼å¯éè¿transformData对å³å°æ¸²æçæ°æ®åæ ·å¼è¿è¡ä¿®æ¹ï¼æ¤æ¶æ¯ä¸ªåå
æ ¼çtextå¼å°±æ¯å³å°æ¸²æå°é¡µé¢ä¸çå
容 |
| | | }, |
| | | csvList:[],//csvæä»¶æ°æ® |
| | | imgUrl:'' |
| | | } |
| | | }, |
| | | computed: { |
| | | isImage() { |
| | | let state = /\.(jpg|jpeg|png|gif)$/i.test(this.fileUrl) |
| | | this.imgUrl = this.fileUrl |
| | | if(state){ |
| | | this.imgUrl = this.fileUrl.replaceAll('word', 'img') |
| | | } |
| | | return state; |
| | | }, |
| | | isPdf() { |
| | | return /\.pdf$/i.test(this.fileUrl); |
| | | }, |
| | | isDoc() { |
| | | return /\.(doc|docx)$/i.test(this.fileUrl); |
| | | }, |
| | | isXls(){ |
| | | let state = /\.(xls|xlsx)$/i.test(this.fileUrl) |
| | | if(state){ |
| | | if(/\.(xlsx)$/i.test(this.fileUrl)){ |
| | | this.options.xls = false |
| | | }else{ |
| | | this.options.xls = true |
| | | } |
| | | } |
| | | return state; |
| | | }, |
| | | isZipOrRar() { |
| | | return /\.(zip|rar)$/i.test(this.fileUrl); |
| | | }, |
| | | isCsv() { |
| | | let state = /\.csv$/i.test(this.fileUrl) |
| | | if(state){ |
| | | this.loadCSVData(); |
| | | // this.main() |
| | | } |
| | | return state; |
| | | }, |
| | | isSupported() { |
| | | return this.isImage || this.isPdf || this.isDoc || this.isZipOrRar || this.isCsv||this.isXls; |
| | | } |
| | | }, |
| | | methods:{ |
| | | renderedHandler() { |
| | | console.log("渲æå®æ") |
| | | this.isDocShow = true |
| | | this.resetStyle() |
| | | }, |
| | | errorHandler() { |
| | | console.log("渲æå¤±è´¥") |
| | | this.isDocShow = false |
| | | }, |
| | | async loadCSVData() { |
| | | this.$axios.post(this.$api.insOrderPlan.preview, { |
| | | id: this.currentFile.id, |
| | | }).then( res => { |
| | | let arr = res.data |
| | | arr = arr.map(m=>{ |
| | | let obj = { |
| | | sheetName:m.sheetName, |
| | | tableData:[], |
| | | column:[] |
| | | } |
| | | obj.tableData = this.formatCSVToTable(m.content.replaceAll('null',' ')) |
| | | // .replaceAll('MIN','=MIN').replaceAll('MAX','=MAX').replaceAll('AVERAGE','=AVERAGE') |
| | | for (let item in obj.tableData[0]) { |
| | | obj.column.push({ |
| | | label: item, |
| | | prop: item, |
| | | }) |
| | | } |
| | | return obj |
| | | }) |
| | | this.csvList = arr |
| | | }).catch( err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | formatCSVToTable(str){ |
| | | const result = []; |
| | | const jsonObj = str.split("\n"); |
| | | let arrHeader = []; |
| | | for (const i in jsonObj) { |
| | | if (typeof jsonObj[i] === 'string' && jsonObj[i].length > 0) { |
| | | const row = `${jsonObj[i]}`; |
| | | if (row.trim().length > 0) { |
| | | const kv = jsonObj[i].split(','); |
| | | if (i == 0) { |
| | | // è·åcolumn表头 |
| | | arrHeader = kv; |
| | | } else { |
| | | const obj = {}; |
| | | for (let index = 0; index < arrHeader.length; index++) { |
| | | // ç»è£
è¡¨æ ¼æ°æ® |
| | | const name = String(arrHeader[index]); |
| | | if (!arrHeader[index]) continue |
| | | if (!obj[name]) { |
| | | try { |
| | | if (kv[index]) { |
| | | obj[name] = String(kv[index]); |
| | | } else { |
| | | obj[name] = ''; |
| | | } |
| | | } catch (err) { |
| | | obj[name] = ''; |
| | | } |
| | | } |
| | | } |
| | | result.push(obj); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return result |
| | | }, |
| | | resetStyle(){ |
| | | const elements = document.querySelectorAll('[style*="pt"]'); |
| | | for (const element of elements) { |
| | | const style = element.getAttribute('style'); |
| | | if (!!style) { |
| | | element.setAttribute('style', style.replace(/pt/g, 'px')); |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | img { |
| | | max-width: 100%; |
| | | } |
| | | |
| | | .oneLine { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | </style> |