| | |
| | | }, |
| | | "dependencies": { |
| | | "@riophae/vue-treeselect": "0.4.0", |
| | | "@vue-office/docx": "^1.6.3", |
| | | "@vue-office/excel": "^1.7.14", |
| | | "@vue/composition-api": "^1.7.2", |
| | | "axios": "0.28.1", |
| | | "clipboard": "2.0.8", |
| | | "core-js": "3.37.1", |
| | |
| | | "file-saver": "2.0.5", |
| | | "fuse.js": "6.4.3", |
| | | "highlight.js": "9.18.5", |
| | | "html2canvas": "^1.4.1", |
| | | "js-beautify": "1.13.0", |
| | | "js-cookie": "3.0.1", |
| | | "jsencrypt": "3.0.0-rc.1", |
| | | "jspdf": "^3.0.0", |
| | | "mammoth": "^1.9.0", |
| | | "moment": "^2.30.1", |
| | | "nprogress": "0.2.0", |
| | | "print-js": "^1.6.0", |
| | | "quill": "2.0.2", |
| | |
| | | "vue": "2.6.12", |
| | | "vue-count-to": "1.0.13", |
| | | "vue-cropper": "0.5.5", |
| | | "vue-demi": "^0.14.10", |
| | | "vue-meta": "2.4.0", |
| | | "vue-router": "3.4.9", |
| | | "vuedraggable": "2.24.3", |
| | | "vuex": "3.6.0" |
| | | "vuex": "3.6.0", |
| | | "worker-loader": "^3.0.8" |
| | | }, |
| | | "devDependencies": { |
| | | "@vue/cli-plugin-babel": "4.4.6", |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // çº æ£æªæ½ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //æ¥è¯¢çç£çº æ£æªæ½å表 |
| | | export function pageSuperviseDetailCorrect(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/pageSuperviseDetailCorrect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºçç£çº æ£æªæ½ |
| | | export function exportSuperviseDetaillCorrect(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/exportSuperviseDetaillCorrect", |
| | | method: "get", |
| | | headers: { |
| | | responseType: "blob", |
| | | }, |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çç£çº æ£æªæ½éä»¶ |
| | | export function getSuperviseDetailCorrectFileList(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/getSuperviseDetailCorrectFileList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤çç£çº æ£æªæ½éä»¶ |
| | | export function delSuperviseDetailCorrectFile(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/delSuperviseDetailCorrectFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çç£çº æ£å¤ç |
| | | export function getSuperviseDetailCorrect(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/getSuperviseDetailCorrect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢ä»å¹´äººåå¹è®ä¿¡æ¯ |
| | | export function getThisYearTrainingDetailed(query) { |
| | | return request({ |
| | | url: "/personTraining/getThisYearTrainingDetailed", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // å®¢æ·æ»¡æåº¦ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //å®¢æ·æ»¡æåº¦è°æ¥å表 |
| | | export function pageClientSatisfaction(query) { |
| | | return request({ |
| | | url: "/clientSatisfaction/pageClientSatisfaction", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢å®¢æ·åæéä»¶ |
| | | export function pageAnalyseFile(query) { |
| | | return request({ |
| | | url: "/clientSatisfaction/pageAnalyseFile", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å 餿°å¢å®¢æ·æ»¡æåº¦è°æ¥ |
| | | export function delClientSatisfaction(query) { |
| | | return request({ |
| | | url: "/clientSatisfaction/delClientSatisfaction", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤å®¢æ·åæéä»¶ |
| | | export function delAnalyseFile(query) { |
| | | return request({ |
| | | url: "/clientSatisfaction/delAnalyseFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢å®¢æ·æ»¡æåº¦è°æ¥ |
| | | export function addClientSatisfaction(data) { |
| | | return request({ |
| | | url: "/clientSatisfaction/addClientSatisfaction", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹æ°å¢å®¢æ·æ»¡æåº¦è°æ¥ |
| | | export function updateClientSatisfaction(data) { |
| | | return request({ |
| | | url: "/clientSatisfaction/updateClientSatisfaction", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // ä½ç³»æä»¶æ§å¶ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // æä»¶æ¸
å-éä»¶ä¸ä¼ |
| | | export function uploadFileManageDocumentList(data) { |
| | | return request({ |
| | | url: "/manageDocumentList/uploadFileManageDocumentList", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶æ¸
å-å表 |
| | | export function pageManageDocumentList(query) { |
| | | return request({ |
| | | url: "/manageDocumentList/pageManageDocumentList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶æ¸
å-å é¤ |
| | | export function delManageDocumentList(query) { |
| | | return request({ |
| | | url: "/manageDocumentList/delManageDocumentList", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶æ¸
å-ç¼è¾ |
| | | export function doManageDocumentList(data) { |
| | | return request({ |
| | | url: "/manageDocumentList/doManageDocumentList", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ§-æ°å¢ |
| | | export function addManageDocumentControlled(data) { |
| | | return request({ |
| | | url: "/manageDocumentControlled/addManageDocumentControlled", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ§-ä¿®æ¹ |
| | | export function doManageDocumentControlled(data) { |
| | | return request({ |
| | | url: "/manageDocumentControlled/doManageDocumentControlled", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ§-è·åpdfæä»¶æµ |
| | | export function checkManageDocumentControlledPdf(query) { |
| | | return request({ |
| | | url: "/manageDocumentControlled/checkManageDocumentControlledPdf", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ§-å®¡æ ¸ |
| | | export function checkManageDocumentControlled(data) { |
| | | return request({ |
| | | url: "/manageDocumentControlled/checkManageDocumentControlled", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ§-å é¤ |
| | | export function delManageDocumentControlled(query) { |
| | | return request({ |
| | | url: "/manageDocumentControlled/delManageDocumentControlled", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ§-å表 |
| | | export function pageManageDocumentControlled(query) { |
| | | return request({ |
| | | url: "/manageDocumentControlled/pageManageDocumentControlled", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä½åº-å表 |
| | | export function pageManageDocumentCancel(query) { |
| | | return request({ |
| | | url: "/manageDocumentCancel/pageManageDocumentCancel", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ¾åæ¶-å¯¼åº |
| | | export function exportManageDocumentIssueRecycle(query) { |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/exportManageDocumentIssueRecycle", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ¾åæ¶-æ°å¢ |
| | | export function addManageDocumentIssueRecycle(data) { |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/addManageDocumentIssueRecycle", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ¾åæ¶-ç¼è¾ |
| | | export function doManageDocumentIssueRecycle(data) { |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/doManageDocumentIssueRecycle", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ¾åæ¶-å®¡æ ¸ |
| | | export function checkManageDocumentIssueRecycle(data) { |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/checkManageDocumentIssueRecycle", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ¾åæ¶-å表 |
| | | export function pageManageDocumentIssueRecycle(query) { |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/pageManageDocumentIssueRecycle", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ¾åæ¶-å表 |
| | | export function delManageDocumentIssueRecycle(query) { |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/delManageDocumentIssueRecycle", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ´-å¯¼åº |
| | | export function exportManageDocumentAlter(query) { |
| | | return request({ |
| | | url: "/manageDocumentAlter/exportManageDocumentAlter", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ´-æ°å¢ |
| | | export function addManageDocumentAlter(data) { |
| | | return request({ |
| | | url: "/manageDocumentAlter/addManageDocumentAlter", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ´-ç¼è¾ |
| | | export function doManageDocumentAlter(data) { |
| | | return request({ |
| | | url: "/manageDocumentAlter/doManageDocumentAlter", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ´-è½¬æ¢æµ |
| | | export function checkManageDocumentAlterPdf(query) { |
| | | return request({ |
| | | url: "/manageDocumentAlter/checkManageDocumentAlterPdf", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ´-å®¡æ ¸ |
| | | export function checkManageDocumentAlter(data) { |
| | | return request({ |
| | | url: "/manageDocumentAlter/checkManageDocumentAlter", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ´-å é¤ |
| | | export function delManageDocumentAlter(query) { |
| | | return request({ |
| | | url: "/manageDocumentAlter/delManageDocumentAlter", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ´-å表 |
| | | export function pageManageDocumentAlter(query) { |
| | | return request({ |
| | | url: "/manageDocumentAlter/pageManageDocumentAlter", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä½åº-æ°å¢ |
| | | export function addManageDocumentCancel(data) { |
| | | return request({ |
| | | url: "/manageDocumentCancel/addManageDocumentCancel", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä½åº-ç¼è¾ |
| | | export function doManageDocumentCancel(data) { |
| | | return request({ |
| | | url: "/manageDocumentCancel/doManageDocumentCancel", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä½åº-å®¡æ ¸ |
| | | export function checkManageDocumentCancel(data) { |
| | | return request({ |
| | | url: "/manageDocumentCancel/checkManageDocumentCancel", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä½åº-å¯¼åº |
| | | export function exportManageDocumentCancel(query) { |
| | | return request({ |
| | | url: "/manageDocumentCancel/exportManageDocumentCancel", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä½åº-å é¤ |
| | | export function delManageDocumentCancel(query) { |
| | | return request({ |
| | | url: "/manageDocumentCancel/delManageDocumentCancel", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // ä½ç³»æä»¶è®°å½ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // æä»¶å®¡æ¹è®°å½-æ°å¢ |
| | | export function addManageRecordCheck(data) { |
| | | return request({ |
| | | url: "/manageRecordCheck/addManageRecordCheck", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶å®¡æ¹è®°å½-ä¿®æ¹ |
| | | export function doManageRecordCheck(data) { |
| | | return request({ |
| | | url: "/manageRecordCheck/doManageRecordCheck", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶å®¡æ¹è®°å½-å¯¼åº |
| | | export function exportOutManageRecordCheck(query) { |
| | | return request({ |
| | | url: "/manageRecordCheck/exportOutManageRecordCheck", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶å®¡æ¹è®°å½-å®¡æ ¸ |
| | | export function checkManageRecordCheck(data) { |
| | | return request({ |
| | | url: "/manageRecordCheck/checkManageRecordCheck", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶å®¡æ¹è®°å½-æ¹å |
| | | export function ratifyManageRecordCheck(data) { |
| | | return request({ |
| | | url: "/manageRecordCheck/ratifyManageRecordCheck", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶å®¡æ¹è®°å½-å é¤ |
| | | export function delManageRecordCheck(query) { |
| | | return request({ |
| | | url: "/manageRecordCheck/delManageRecordCheck", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶å®¡æ¹è®°å½-å表 |
| | | export function pageManageRecordCheck(query) { |
| | | return request({ |
| | | url: "/manageRecordCheck/pageManageRecordCheck", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 夿¥æä»¶ç¡®è®¤è®°å½-æ°å¢ |
| | | export function addManageRecordVerify(data) { |
| | | return request({ |
| | | url: "/manageRecordVerify/addManageRecordVerify", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //夿¥æä»¶ç¡®è®¤è®°å½-å¡«å--å表 |
| | | export function pageManageRecordVerify(query) { |
| | | return request({ |
| | | url: "/manageRecordVerify/pageManageRecordVerify", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 夿¥æä»¶ç¡®è®¤è®°å½-åå²--æäº¤ |
| | | export function submitManageRecordTotal(data) { |
| | | return request({ |
| | | url: "/manageRecordTotal/submitManageRecordTotal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 夿¥æä»¶ç¡®è®¤è®°å½-åå²--å®¡æ ¸ |
| | | export function ratifyManageRecordTotal(data) { |
| | | return request({ |
| | | url: "/manageRecordTotal/ratifyManageRecordTotal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //夿¥æä»¶ç¡®è®¤è®°å½-å¡«å--å é¤ |
| | | export function delManageRecordVerify(query) { |
| | | return request({ |
| | | url: "/manageRecordVerify/delManageRecordVerify", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //夿¥æä»¶ç¡®è®¤è®°å½-åå²--å表 |
| | | export function pageManageRecordTotal(query) { |
| | | return request({ |
| | | url: "/manageRecordTotal/pageManageRecordTotal", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 夿¥æä»¶ç¡®è®¤è®°å½-å¡«å--ä¿®æ¹ |
| | | export function doManageRecordVerify(data) { |
| | | return request({ |
| | | url: "/manageRecordVerify/doManageRecordVerify", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ¾åæ¶è®°å½-å¯¼åº |
| | | export function exportOutManageRecordIssueRecycle(query) { |
| | | return request({ |
| | | url: "/manageRecordIssueRecycle/exportOutManageRecordIssueRecycle", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ¾åæ¶è®°å½-æ°å¢ |
| | | export function addManageRecordIssueRecycle(data) { |
| | | return request({ |
| | | url: "/manageRecordIssueRecycle/addManageRecordIssueRecycle", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶åæ¾åæ¶è®°å½-ç¼è¾ |
| | | export function doManageRecordIssueRecycle(data) { |
| | | return request({ |
| | | url: "/manageRecordIssueRecycle/doManageRecordIssueRecycle", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢CNAS人åä¾§è¾¹æ |
| | | export function selectCNSAPersonTree(query) { |
| | | return request({ |
| | | url: "/personBasicInfo/selectCNSAPersonTree", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ¾åæ¶è®°å½-å表 |
| | | export function pageManageRecordIssueRecycle(query) { |
| | | return request({ |
| | | url: "/manageRecordIssueRecycle/pageManageRecordIssueRecycle", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶åæ¾åæ¶è®°å½-å é¤ |
| | | export function delManageRecordIssueRecycle(query) { |
| | | return request({ |
| | | url: "/manageRecordIssueRecycle/delManageRecordIssueRecycle", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä¿®è®¢-导åºå表 |
| | | export function exportOutManageRecordAudit(query) { |
| | | return request({ |
| | | url: "/manageRecordAudit/exportOutManageRecordAudit", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä¿®è®¢-æ°å¢ |
| | | export function addManageRecordAudit(data) { |
| | | return request({ |
| | | url: "/manageRecordAudit/addManageRecordAudit", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä¿®è®¢-ç¼è¾ |
| | | export function doManageRecordAudit(data) { |
| | | return request({ |
| | | url: "/manageRecordAudit/doManageRecordAudit", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä¿®è®¢-æ¹å |
| | | export function ratifyManageRecordAudit(data) { |
| | | return request({ |
| | | url: "/manageRecordAudit/ratifyManageRecordAudit", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä¿®è®¢-å表 |
| | | export function pageManageRecordAudit(query) { |
| | | return request({ |
| | | url: "/manageRecordAudit/pageManageRecordAudit", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä¿®è®¢-å é¤ |
| | | export function delManageRecordAudit(query) { |
| | | return request({ |
| | | url: "/manageRecordAudit/delManageRecordAudit", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶å®æå®¡æ¥è®°å½-å¯¼åº |
| | | export function exportOutManageRecordIntervals(query) { |
| | | return request({ |
| | | url: "/manageRecordIntervals/exportOutManageRecordIntervals", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶å®æå®¡æ¥è®°å½-æ°å¢ |
| | | export function addManageRecordIntervals(data) { |
| | | return request({ |
| | | url: "/manageRecordIntervals/addManageRecordIntervals", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶å®æå®¡æ¥è®°å½-ç¼è¾ |
| | | export function doManageRecordIntervals(data) { |
| | | return request({ |
| | | url: "/manageRecordIntervals/doManageRecordIntervals", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶å®æå®¡æ¥è®°å½-åå²è®°å½-æ¹å |
| | | export function ratifyManageRecordIntervalsTotal(data) { |
| | | return request({ |
| | | url: "/manageRecordIntervalsTotal/ratifyManageRecordIntervalsTotal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶å®æå®¡æ¥è®°å½-åå²è®°å½-æäº¤ |
| | | export function submitManageRecordIntervalsTotal(data) { |
| | | return request({ |
| | | url: "/manageRecordIntervalsTotal/submitManageRecordIntervalsTotal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶å®æå®¡æ¥è®°å½-å表 |
| | | export function pageManageRecordIntervals(query) { |
| | | return request({ |
| | | url: "/manageRecordIntervals/pageManageRecordIntervals", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶å®æå®¡æ¥è®°å½-åå²è®°å½-å表 |
| | | export function pageManageRecordIntervalsTotal(query) { |
| | | return request({ |
| | | url: "/manageRecordIntervalsTotal/pageManageRecordIntervalsTotal", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶å®æå®¡æ¥è®°å½-å é¤ |
| | | export function delManageRecordIntervals(query) { |
| | | return request({ |
| | | url: "/manageRecordIntervals/delManageRecordIntervals", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä½åºè®°å½-å¯¼åº |
| | | export function exportOutManageRecordCancel(query) { |
| | | return request({ |
| | | url: "/manageRecordCancel/exportOutManageRecordCancel", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä½åºè®°å½-æ°å¢ |
| | | export function addManageRecordCancel(data) { |
| | | return request({ |
| | | url: "/manageRecordCancel/addManageRecordCancel", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä½åºè®°å½-ç¼è¾ |
| | | export function doManageRecordCancel(data) { |
| | | return request({ |
| | | url: "/manageRecordCancel/doManageRecordCancel", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æä»¶ä½åºè®°å½-æ¹å |
| | | export function ratifyManageRecordCancel(data) { |
| | | return request({ |
| | | url: "/manageRecordCancel/ratifyManageRecordCancel", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä½åºè®°å½-å é¤ |
| | | export function delManageRecordCancel(query) { |
| | | return request({ |
| | | url: "/manageRecordCancel/delManageRecordCancel", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æä»¶ä½åºè®°å½-å表 |
| | | export function pageManageRecordCancel(query) { |
| | | return request({ |
| | | url: "/manageRecordCancel/pageManageRecordCancel", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // å
审管çç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //年度计å-å页 |
| | | export function pageInternalPlan(query) { |
| | | return request({ |
| | | url: "/internalPlan/pageInternalPlan", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //年度计å-å é¤ |
| | | export function delInternalPlan(query) { |
| | | return request({ |
| | | url: "/internalPlan/delInternalPlan", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //年度计å-å¯¼åº |
| | | export function exportInternalPlan(query) { |
| | | return request({ |
| | | url: "/internalPlan/exportInternalPlan", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //年度计å详æ
|
| | | export function getInternalPlanOne(query) { |
| | | return request({ |
| | | url: "/internalPlan/getInternalPlanOne", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 年度计å-æ°å¢ |
| | | export function addInternalPlan(data) { |
| | | return request({ |
| | | url: "/internalPlan/addInternalPlan", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 年度计å-ä¿®æ¹ |
| | | export function updateInternalPlan(data) { |
| | | return request({ |
| | | url: "/internalPlan/updateInternalPlan", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 年度计å-å®¡æ ¸ |
| | | export function examineInternalPlan(data) { |
| | | return request({ |
| | | url: "/internalPlan/examineInternalPlan", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 年度计å-æ¹å |
| | | export function ratifyInternalPlan(data) { |
| | | return request({ |
| | | url: "/internalPlan/ratifyInternalPlan", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å
审宿½è®¡åå页æ¥è¯¢ |
| | | export function pageInternalImplement(query) { |
| | | return request({ |
| | | url: "/internalImplement/pageInternalImplement", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å
审宿½è®¡åå é¤ |
| | | export function delInternalImplement(query) { |
| | | return request({ |
| | | url: "/internalImplement/delInternalImplement", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºå
审宿½è®¡å |
| | | export function exportInternalImplement(query) { |
| | | return request({ |
| | | url: "/internalImplement/exportInternalImplement", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å
审宿½è®¡å详æ
|
| | | export function getInternalImplementOne(query) { |
| | | return request({ |
| | | url: "/internalImplement/getInternalImplementOne", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å
审宿½è®¡åæ°å¢ |
| | | export function addInternalImplement(data) { |
| | | return request({ |
| | | url: "/internalImplement/addInternalImplement", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å
审宿½è®¡åä¿®æ¹ |
| | | export function updateInternalImplement(data) { |
| | | return request({ |
| | | url: "/internalImplement/updateInternalImplement", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å
审宿½è®¡åä¿®æ¹ |
| | | export function ratifyInternalImplement(data) { |
| | | return request({ |
| | | url: "/internalImplement/ratifyInternalImplement", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //ä¼è®®ç¾å°æ¥è¯¢ |
| | | export function pageInternalMeeting(query) { |
| | | return request({ |
| | | url: "/internalMeeting/pageInternalMeeting", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ä¼è®®ç¾å°å é¤ |
| | | export function delInternalMeeting(query) { |
| | | return request({ |
| | | url: "/internalMeeting/delInternalMeeting", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºå
审ä¼è®® |
| | | export function exportInternalMeeting(query) { |
| | | return request({ |
| | | url: "/internalMeeting/exportInternalMeeting", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä¼è®®ç¾å°æ¥è¯¢è¯¦æ
|
| | | export function getInternalMeetingOne(query) { |
| | | return request({ |
| | | url: "/internalMeeting/getInternalMeetingOne", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢ä¼è®®ç¾å° |
| | | export function addInternalMeeting(data) { |
| | | return request({ |
| | | url: "/internalMeeting/addInternalMeeting", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¼è®®ç¾å°ä¿®æ¹ |
| | | export function updateInternalMeeting(data) { |
| | | return request({ |
| | | url: "/internalMeeting/updateInternalMeeting", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å
å®¡æ£æ¥å页æ¥è¯¢ |
| | | export function pageInternalCheck(query) { |
| | | return request({ |
| | | url: "/internalCheck/pageInternalCheck", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å
å®¡æ£æ¥å é¤ |
| | | export function delInternalCheck(query) { |
| | | return request({ |
| | | url: "/internalCheck/delInternalCheck", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºå
å®¡æ£æ¥ |
| | | export function exportInternalCheck(query) { |
| | | return request({ |
| | | url: "/internalCheck/exportInternalCheck", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å
å®¡æ£æ¥è¯¦æ
|
| | | export function getInternalCheckOne(query) { |
| | | return request({ |
| | | url: "/internalCheck/getInternalCheckOne", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å
å®¡æ£æ¥æ°å¢ |
| | | export function addInternalCheck(data) { |
| | | return request({ |
| | | url: "/internalCheck/addInternalCheck", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å
å®¡æ£æ¥ä¿®æ¹ |
| | | export function updateInternalCheck(data) { |
| | | return request({ |
| | | url: "/internalCheck/updateInternalCheck", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å
å®¡æ£æ¥æ¹å |
| | | export function ratifyInternalCheck(data) { |
| | | return request({ |
| | | url: "/internalCheck/ratifyInternalCheck", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢å
审管ççº æ£æªæ½å表 |
| | | export function pageInternalCorrect(query) { |
| | | return request({ |
| | | url: "/internalCorrect/pageInternalCorrect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºå
审管ççº æ£æªæ½éä»¶ |
| | | export function exportInternalCorrect(query) { |
| | | return request({ |
| | | url: "/internalCorrect/exportInternalCorrect", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢å
审管ççº æ£å¤ç详æ
|
| | | export function getInternalCorrect(query) { |
| | | return request({ |
| | | url: "/internalCorrect/getInternalCorrect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æäº¤å
审管ççº æ£æªæ½å表 |
| | | export function addInternalCorrect(data) { |
| | | return request({ |
| | | url: "/internalCorrect/addInternalCorrect", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å
审æ¥åå é¤ |
| | | export function delInternalReport(query) { |
| | | return request({ |
| | | url: "/internalReport/delInternalReport", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å
审æ¥åå页æ¥è¯¢ |
| | | export function pageInternalReport(query) { |
| | | return request({ |
| | | url: "/internalReport/pageInternalReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºå
审æ¥å |
| | | export function exportInternalReport(query) { |
| | | return request({ |
| | | url: "/internalReport/exportInternalReport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å
审æ¥å详æ
|
| | | export function getInternalReportOne(query) { |
| | | return request({ |
| | | url: "/internalReport/getInternalReportOne", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å
审æ¥åæ°å¢ |
| | | export function addInternalReport(data) { |
| | | return request({ |
| | | url: "/internalReport/addInternalReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å
审æ¥åä¿®æ¹ |
| | | export function updateInternalReport(data) { |
| | | return request({ |
| | | url: "/internalReport/updateInternalReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å
审æ¥åå®¡æ ¸ |
| | | export function examineInternalReport(data) { |
| | | return request({ |
| | | url: "/internalReport/examineInternalReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å
审æ¥åè´è´£äººå¡«å |
| | | export function qualityInternalReport(data) { |
| | | return request({ |
| | | url: "/internalReport/qualityInternalReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢å
审管ççº æ£æªæ½éä»¶ |
| | | export function getInternalCorrectFileList(query) { |
| | | return request({ |
| | | url: "/internalCorrect/getInternalCorrectFileList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤å
审管ççº æ£æªæ½éä»¶ |
| | | export function delInternalCorrectFile(query) { |
| | | return request({ |
| | | url: "/internalCorrect/delInternalCorrectFile", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 管çè¯å®¡ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // 管ç计å-ä¸ä¼ éä»¶ |
| | | export function addReviewProgramFile(data) { |
| | | return request({ |
| | | url: "/manageReviewProgramFile/addReviewProgramFile", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //管ç计å-éä»¶å表 |
| | | export function selectReviewProgramFile(query) { |
| | | return request({ |
| | | url: "/manageReviewProgramFile/selectReviewProgramFile", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //管ç计å-æ¥è¯¢ç®¡çè¯å®¡è®¡å |
| | | export function getPageReviewProgram(query) { |
| | | return request({ |
| | | url: "/manageReviewProgram/getPageReviewProgram", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //管ç计å-å é¤ç®¡çè¯å®¡è®¡å |
| | | export function deleteReviewProgram(query) { |
| | | return request({ |
| | | url: "/manageReviewProgram/deleteReviewProgram", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //管ç计å |
| | | export function exportReviewProgram(query) { |
| | | return request({ |
| | | url: "/manageReviewProgram/exportReviewProgram", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 管ç计å-ç¼è¾ç®¡çè¯å®¡è®¡å |
| | | export function modifyReviewProgram(data) { |
| | | return request({ |
| | | url: "/manageReviewProgram/modifyReviewProgram", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //ä¼è®®è®°å½-æ¥è¯¢ç®¡çè¯å®¡ä¼è®®è®°å½ |
| | | export function getPageMeeting(query) { |
| | | return request({ |
| | | url: "/manageMeeting/getPageMeeting", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä¼è®®è®°å½-å é¤ç®¡çè¯å®¡ä¼è®®è®°å½ |
| | | export function deleteMeeting(query) { |
| | | return request({ |
| | | url: "/manageMeeting/deleteMeeting", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä¼è®®è®°å½-ä¸è½½ç®¡çè¯å®¡ä¼è®®è®°å½ |
| | | export function exportMeeting(query) { |
| | | return request({ |
| | | url: "/manageMeeting/exportMeeting", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 管ç计å-æ°å¢ç®¡çè¯å®¡ä¼è®®è®°å½ |
| | | export function addMeeting(data) { |
| | | return request({ |
| | | url: "/manageMeeting/addMeeting", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 管ç计å-ä¿®æ¹ç®¡çè¯å®¡ä¼è®®è®°å½ |
| | | export function modifyMeeting(data) { |
| | | return request({ |
| | | url: "/manageMeeting/modifyMeeting", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //è¯å®¡ä¼è®®æ¥å-æ¥è¯¢ç®¡çè¯å®¡ä¼è®®æ¥å |
| | | export function getPageReviewReport(query) { |
| | | return request({ |
| | | url: "/manageReviewReport/getPageReviewReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è¯å®¡ä¼è®®æ¥å-å é¤ç®¡çè¯å®¡ä¼è®®æ¥å |
| | | export function deleteReviewReport(query) { |
| | | return request({ |
| | | url: "/manageReviewReport/deleteReviewReport", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è¯å®¡ä¼è®®æ¥å-ä¸è½½ |
| | | export function exportReviewReport(query) { |
| | | return request({ |
| | | url: "/manageReviewReport/exportReviewReport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // è¯å®¡ä¼è®®æ¥å-ç¼è¾ç®¡çè¯å®¡ä¼è®®æ¥å |
| | | export function modifyReviewReport(data) { |
| | | return request({ |
| | | url: "/manageReviewReport/modifyReviewReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // è¯å®¡ä¼è®®æ¥å-æ°å¢ç®¡çè¯å®¡ä¼è®®æ¥å |
| | | export function addReviewReport(data) { |
| | | return request({ |
| | | url: "/manageReviewReport/addReviewReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // è¯å®¡ä¼è®®æ¥å-æ°å¢ç®¡çè¯å®¡è®¡å |
| | | export function addReviewProgram(data) { |
| | | return request({ |
| | | url: "/manageReviewProgram/addReviewProgram", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // åºå¯¹é£é©çæªæ½ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å页 |
| | | export function getPageResults(query) { |
| | | return request({ |
| | | url: "/manageRiskAssessmentResults/getPageResults", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å®¡æ¹ |
| | | export function dangerousRiskApproval(data) { |
| | | return request({ |
| | | url: "/manageRiskAssessmentResults/dangerousRiskApproval", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ æ¹å |
| | | export function hazardIdentificationAndRiskApproval(data) { |
| | | return request({ |
| | | url: "/manageRiskAssessmentResults/hazardIdentificationAndRiskApproval", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å é¤ |
| | | export function removeRiskFactors(query) { |
| | | return request({ |
| | | url: "/manageRiskAssessmentResults/removeRiskFactors", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ æ°å¢ |
| | | export function addNewRiskFactors(data) { |
| | | return request({ |
| | | url: "/manageRiskAssessmentResults/addNewRiskFactors", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å¯¼åº |
| | | export function exportHazardFactorIdentification(query) { |
| | | return request({ |
| | | url: "/manageRiskAssessmentResults/exportHazardFactorIdentification", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å页 |
| | | export function getPageList(query) { |
| | | return request({ |
| | | url: "/manageControlPlanList/getPageList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å®¡æ ¸ |
| | | export function riskAnalysisApprovalOfControlPlanChecklist(data) { |
| | | return request({ |
| | | url: "/manageControlPlanList/riskAnalysisApprovalOfControlPlanChecklist", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å æ¹å |
| | | export function approvalOfControlPlanChecklist(data) { |
| | | return request({ |
| | | url: "/manageControlPlanList/approvalOfControlPlanChecklist", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å é¤ |
| | | export function deleteSignificantRiskFactorAnalysis(query) { |
| | | return request({ |
| | | url: "/manageControlPlanList/deleteSignificantRiskFactorAnalysis", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å æ°å¢ |
| | | export function analysisOfMajorRiskFactorsAdded(data) { |
| | | return request({ |
| | | url: "/manageControlPlanList/analysisOfMajorRiskFactorsAdded", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å¯¼åº |
| | | export function exportSignificantRiskFactors(query) { |
| | | return request({ |
| | | url: "/manageControlPlanList/exportSignificantRiskFactors", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢å®¢æ·å表 |
| | | export function selectStandardTemplatePageList(data) { |
| | | export function selectStandardTemplatePageList(query) { |
| | | return request({ |
| | | url: "/StandardTemplate/selectStandardTemplatePageList", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 模çå¤å¶ |
| | | export function copyStandardTemplate(data) { |
| | | return request({ |
| | | url: "/StandardTemplate/copyStandardTemplate", |
| | | method: "post", |
| | | data: data, |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // å 餿£éªæ¨¡æ¿ |
| | | export function delStandardTemplate(data) { |
| | | export function delStandardTemplate(query) { |
| | | return request({ |
| | | url: "/StandardTemplate/delStandardTemplate", |
| | | method: "post", |
| | | data: data, |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | import { parseStrEmpty } from "@/utils/ruoyi"; |
| | | |
| | | // æ¥è¯¢ç¨æ·å表 |
| | | export function listUser(query) { |
| | | return request({ |
| | | url: '/system/user/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/system/user/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢ç¨æ·è¯¦ç» |
| | | export function getUser(userId) { |
| | | return request({ |
| | | url: '/system/user/' + parseStrEmpty(userId), |
| | | method: 'get' |
| | | }) |
| | | url: "/system/user/" + parseStrEmpty(userId), |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢ç¨æ· |
| | | export function addUser(data) { |
| | | return request({ |
| | | url: '/system/user', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/system/user", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹ç¨æ· |
| | | export function updateUser(data) { |
| | | return request({ |
| | | url: '/system/user', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | url: "/system/user", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å é¤ç¨æ· |
| | | export function delUser(userId) { |
| | | return request({ |
| | | url: '/system/user/' + userId, |
| | | method: 'delete' |
| | | }) |
| | | url: "/system/user/" + userId, |
| | | method: "delete", |
| | | }); |
| | | } |
| | | |
| | | // ç¨æ·å¯ç éç½® |
| | | export function resetUserPwd(userId, password) { |
| | | const data = { |
| | | userId, |
| | | password |
| | | } |
| | | password, |
| | | }; |
| | | return request({ |
| | | url: '/system/user/resetPwd', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | url: "/system/user/resetPwd", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç¨æ·ç¶æä¿®æ¹ |
| | | export function changeUserStatus(userId, status) { |
| | | const data = { |
| | | userId, |
| | | status |
| | | } |
| | | status, |
| | | }; |
| | | return request({ |
| | | url: '/system/user/changeStatus', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | url: "/system/user/changeStatus", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢ç¨æ·ä¸ªäººä¿¡æ¯ |
| | | export function getUserProfile() { |
| | | return request({ |
| | | url: '/system/user/profile', |
| | | method: 'get' |
| | | }) |
| | | url: "/system/user/profile", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹ç¨æ·ä¸ªäººä¿¡æ¯ |
| | | export function updateUserProfile(data) { |
| | | return request({ |
| | | url: '/system/user/profile', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | url: "/system/user/profile", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç¨æ·å¯ç éç½® |
| | | export function updateUserPwd(oldPassword, newPassword) { |
| | | const data = { |
| | | oldPassword, |
| | | newPassword |
| | | } |
| | | newPassword, |
| | | }; |
| | | return request({ |
| | | url: '/system/user/profile/updatePwd', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | url: "/system/user/profile/updatePwd", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç¨æ·å¤´åä¸ä¼ |
| | | export function uploadAvatar(data) { |
| | | return request({ |
| | | url: '/system/user/profile/avatar', |
| | | method: 'post', |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
| | | data: data |
| | | }) |
| | | url: "/system/user/profile/avatar", |
| | | method: "post", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢ææè§è² |
| | | export function getAuthRole(userId) { |
| | | return request({ |
| | | url: '/system/user/authRole/' + userId, |
| | | method: 'get' |
| | | }) |
| | | url: "/system/user/authRole/" + userId, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // ä¿åææè§è² |
| | | export function updateAuthRole(data) { |
| | | return request({ |
| | | url: '/system/user/authRole', |
| | | method: 'put', |
| | | params: data |
| | | }) |
| | | url: "/system/user/authRole", |
| | | method: "put", |
| | | params: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢é¨é¨ä¸ææ ç»æ |
| | | export function deptTreeSelect() { |
| | | return request({ |
| | | url: '/system/user/deptTree', |
| | | method: 'get' |
| | | }) |
| | | url: "/system/user/deptTree", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // è·å人äºç³»ç»ç»ç» |
| | | export function selectCompaniesList() { |
| | | return request({ |
| | | url: '/companies/selectCompaniesList', |
| | | method: 'get' |
| | | }) |
| | | url: "/companies/selectCompaniesList", |
| | | method: "get", |
| | | }); |
| | | } |
| | | // è·å人äºç³»ç»ç»ç»ä¸ç人å |
| | | export function selectSimpleList(data) { |
| | | return request({ |
| | | url: '/companies/selectSimpleList', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | url: "/companies/selectSimpleList", |
| | | method: "post", |
| | | params: data, |
| | | }); |
| | | } |
| | | // è·å人äºç³»ç»ç»ç»ä¸ç人å |
| | | export function addPersonUser(data) { |
| | | return request({ |
| | | url: '/companies/addPersonUser', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | url: "/companies/addPersonUser", |
| | | method: "post", |
| | | params: data, |
| | | }); |
| | | } |
| | | // è·åè§è² |
| | | export function selectRoleList() { |
| | | return request({ |
| | | url: '/role/selectRoleList', |
| | | method: 'get', |
| | | }) |
| | | url: "/role/selectRoleList", |
| | | method: "get", |
| | | }); |
| | | } |
| | | // è·ååä½ |
| | | export function selectCustomEnum() { |
| | | return request({ |
| | | url: '/user/selectCustomEnum', |
| | | method: 'get', |
| | | }) |
| | | url: "/user/selectCustomEnum", |
| | | method: "get", |
| | | }); |
| | | } |
| | | // æäº¤æ·»å æ¶æä¿¡æ¯ |
| | | export function addDepartment(params) { |
| | | return request({ |
| | | url: '/department/addDepartment', |
| | | method: 'post', |
| | | params: params |
| | | }) |
| | | url: "/department/addDepartment", |
| | | method: "post", |
| | | params: params, |
| | | }); |
| | | } |
| | | |
| | | // è·åç¨æ·å表 |
| | | export function selectUserCondition(query) { |
| | | return request({ |
| | | url: "/system/newUser/selectUserCondition", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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" style="color: #3a7bfa;" target="_blank">ä¸è½½ PDF æä»¶</a></p> |
| | | </object> |
| | | </div> |
| | | <div v-if="isDoc"> |
| | | <p v-if="!isDocShow">ææ¡£æ æ³ç´æ¥é¢è§ï¼è¯·ä¸è½½æ¥çã</p> |
| | | <a :href="fileUrl" v-if="!isDocShow" target="_blank">ä¸è½½æä»¶</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" target="_blank">ä¸è½½æä»¶</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" target="_blank">ä¸è½½æä»¶</a> |
| | | </div> |
| | | <div v-if="isCsv"> |
| | | <p v-if="csvList.length == 0">CSV æä»¶æ æ³ç´æ¥é¢è§ï¼è¯·ä¸è½½æ¥çã</p> |
| | | <a :href="fileUrl" v-if="csvList.length == 0" target="_blank">ä¸è½½æä»¶</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') |
| | | } |
| | | console.log(11111, this.imgUrl) |
| | | 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> |
| | |
| | | <template> |
| | | <div> |
| | | <!-- è¡¨æ ¼ --> |
| | | <el-table |
| | | ref="multipleTable" |
| | | v-loading="tableLoading" |
| | | :border="border" |
| | | :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | :height="height" |
| | | :highlight-current-row="highlightCurrentRow" |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | stripe |
| | | style="width: 100%" |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <template v-if="isSelection"> |
| | | <el-table-column type="selection" width="55" /> |
| | | </template> |
| | | <template> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | </template> |
| | | <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" :height="height" |
| | | :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" |
| | | :row-key="rowKey" :span-method="spanMethod" stripe style="width: 100%" tooltip-effect="dark" @row-click="rowClick" |
| | | @current-change="currentChange" @selection-change="handleSelectionChange" class="lims-table"> |
| | | <el-table-column align="center" type="selection" width="55" v-if="isSelection" /> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" :index="indexMethod" /> |
| | | |
| | | <template v-for="(item, index) in column"> |
| | | <el-table-column |
| | | :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" |
| | | :filtered-value="item.filteredValue" |
| | | :filters="item.filters" |
| | | :fixed="item.fixed" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :prop="item.prop" |
| | | :show-overflow-tooltip="item.showOverflowTooltip" |
| | | :sortable="item.sortable ? true : false" |
| | | :type="item.type" |
| | | :width="item.width" |
| | | align="center" |
| | | > |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template |
| | | v-if="item.hasOwnProperty('colunmTemplate')" |
| | | :slot="item.colunmTemplate" |
| | | slot-scope="scope" |
| | | > |
| | | <slot |
| | | v-if="item.theadSlot" |
| | | :index="index" |
| | | :name="item.theadSlot" |
| | | :row="scope.row" |
| | | /> |
| | | </template> |
| | | <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" |
| | | :sortable="item.sortable ? true : false" :type="item.type" |
| | | :width="item.dataType === 'action' ? getWidth(item.operation) : item.width" align="center"> |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | | </template> |
| | | |
| | | <template slot-scope="scope"> |
| | | <!-- ææ§½ --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot |
| | | v-if="item.slot" |
| | | :index="scope.$index" |
| | | :name="item.slot" |
| | | :row="scope.row" |
| | | /> |
| | | </div> |
| | | <!-- è¿åº¦æ¡ --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | | <el-progress :percentage="Number(scope.row[item.prop])" /> |
| | | </div> |
| | | <template slot-scope="scope"> |
| | | <!-- ææ§½ --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot v-if="item.slot" :index="scope.$index" :name="item.slot" :row="scope.row" /> |
| | | </div> |
| | | <!-- è¿åº¦æ¡ --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | | <el-progress :percentage="Number(scope.row[item.prop])" /> |
| | | </div> |
| | | <!-- å¾ç --> |
| | | <div v-else-if="item.dataType == 'image'"> |
| | | <img :src="javaApi + '/img/' + scope.row[item.prop]" alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" /> |
| | | </div> |
| | | |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag |
| | | v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" |
| | | v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " |
| | | :key="index" |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)" |
| | | >{{ |
| | | item.tagGroup |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | <el-tag v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " :key="index" :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)">{{ |
| | | item.tagGroup |
| | | ? tag[item.tagGroup.label] |
| | | ? tag[item.tagGroup.label] |
| | | ? tag[item.tagGroup.label] |
| | | : tag |
| | | : tag |
| | | }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-else |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</el-tag |
| | | > |
| | | </div> |
| | | : tag |
| | | }}</el-tag> |
| | | <el-tag v-else :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | </div> |
| | | |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button |
| | | v-if="o.type != 'upload'" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :icon="o.icon | iconFn(scope.row)" |
| | | :plain="o.plain" |
| | | :size="o.size" |
| | | :style="{ color: o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" |
| | | > |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload |
| | | action="#" |
| | | :on-change=" |
| | | (file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload'" |
| | | style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> |
| | | <div v-else> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-else>{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain" |
| | | :style="{ color: o.name === 'å é¤' ? '#f56c6c' : o.color }" :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" :key="key"> |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)" |
| | | size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload' && o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError" |
| | | :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | </el-upload> |
| | | <el-upload action="#" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload' && !o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed" |
| | | :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | <!-- å¯ç¹å»çæå --> |
| | | <div v-else-if="item.dataType == 'link'" class="cell link" style="width: 100%" |
| | | @click="goLink(scope.row, item.linkMethod)"> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | </div> |
| | | <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> |
| | | <div v-else class="cell" style="width: 100%"> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-else>{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | v-show="page.total > 0" |
| | | :total="page.total" |
| | | :page.sync="page.current" |
| | | :limit.sync="page.size" |
| | | @pagination="pagination" |
| | | /> |
| | | <pagination v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current" |
| | | :limit.sync="page.size" @pagination="pagination" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | name: "ZTTable", |
| | | filters: { |
| | | iconFn(val, row) { |
| | | if (typeof val === "function") { |
| | | return val(row); |
| | | } else return val; |
| | | }, |
| | | typeFn(val, row) { |
| | | // console.log(val, row, '11111111'); |
| | | if (typeof val === "function") { |
| | |
| | | handleSelectionChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => {}; |
| | | return () => { }; |
| | | }, |
| | | }, |
| | | rowClick: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => {}; |
| | | return () => { }; |
| | | }, |
| | | }, |
| | | currentChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => {}; |
| | | return () => { }; |
| | | }, |
| | | }, |
| | | border: { |
| | | type: Boolean, |
| | | default: false, |
| | | default: true, |
| | | }, |
| | | highlightCurrentRow: { |
| | | type: Boolean, |
| | |
| | | }, |
| | | rowClassName: { |
| | | type: Function, |
| | | default: () => {}, |
| | | default: () => { }, |
| | | }, |
| | | rowStyle: { |
| | | type: Object || Function, |
| | | default: () => {}, |
| | | default: () => { }, |
| | | }, |
| | | tableData: { |
| | | type: Array, |
| | |
| | | total: 0, |
| | | current: 0, |
| | | size: 10, |
| | | layout: "total, sizes, prev, pager, next, jumper", |
| | | }; |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | spanList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.calculateSpanInfo(); |
| | | }, |
| | | methods: { |
| | | getWidth(row) { |
| | | let count = 0; |
| | | row.forEach((a) => { |
| | | if (a.showHide !== undefined && a.showHide()) { |
| | | count += a.name.length; |
| | | } else if (!a.showHide) { |
| | | count += a.name.length; |
| | | } |
| | | }); |
| | | return count * 15 + 70 + "px"; |
| | | }, |
| | | iconFn(row) { |
| | | if (row.name === "ç¼è¾" || row.name === "ä¿®æ¹") { |
| | | return "el-icon-edit"; |
| | | } else if (row.name === "å é¤") { |
| | | return "el-icon-delete"; |
| | | } else if (row.name === "æ¥ç") { |
| | | return "el-icon-view"; |
| | | } else { |
| | | return row.icon; |
| | | } |
| | | // if (typeof (val) === 'function') { |
| | | // return val(row); |
| | | // } else return val; |
| | | }, |
| | | formatType(val, format) { |
| | | if (typeof format === "function") { |
| | | return format(val); |
| | |
| | | setCurrent(row) { |
| | | this.$refs.multipleTable.setCurrentRow(); |
| | | }, |
| | | handleSuccessUp(response, label) { |
| | | if (typeof label === "string") { |
| | | if (response.code == 200) { |
| | | this.upData[label] = response.data.url; |
| | | } |
| | | } else { |
| | | if (response.code == 200) { |
| | | this.$message.success("ä¸ä¼ æå"); |
| | | } |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error("ä¸ä¼ 失败"); |
| | | this.$refs.upload.clearFiles(); |
| | | this.uploading = false; |
| | | }, |
| | | onExceed() { |
| | | this.$message.warning("è¶
åºæä»¶ä¸ªæ°"); |
| | | }, |
| | | pagination(page, limit) { |
| | | this.$emit("pagination", { pageNum: page, pageSize: limit }); |
| | | pagination({ page, limit }) { |
| | | this.$emit("pagination", { page: page, limit: limit }); |
| | | }, |
| | | indexMethod(index) { |
| | | // return index * 2; |
| | | return (this.page.current - 1) * this.page.size + index + 1; |
| | | }, |
| | | // ç¹å»åå
æ ¼linkäºä»¶ |
| | | goLink(row, linkMethod) { |
| | | if (!linkMethod) { |
| | | return this.$message.warning("请é
ç½®lingkäºä»¶"); |
| | | } |
| | | this.$parent[linkMethod](row); |
| | | }, |
| | | // åå¹¶åå
æ ¼ |
| | | calculateSpanInfo() { |
| | | // åå§åæ¯åçåå¹¶ä¿¡æ¯ |
| | | this.spanList = []; |
| | | this.column.forEach((m, i) => { |
| | | if (m.mergeCol) { |
| | | this.spanList.push({ |
| | | arr: [], |
| | | position: 0, |
| | | name: m.prop, |
| | | index: i + 1, |
| | | }); |
| | | } |
| | | }); |
| | | this.spanList.forEach((item, i) => { |
| | | this.rowspan( |
| | | this.spanList[i].arr, |
| | | this.spanList[i].position, |
| | | item.name |
| | | ); |
| | | }); |
| | | }, |
| | | rowspan(spanArr, position, spanName) { |
| | | this.tableData.forEach((item, index) => { |
| | | if (index === 0) { |
| | | spanArr.push(1); |
| | | position = 0; |
| | | } else { |
| | | if ( |
| | | this.tableData[index][spanName] === |
| | | this.tableData[index - 1][spanName] |
| | | ) { |
| | | spanArr[position] += 1; |
| | | spanArr.push(0); |
| | | } else { |
| | | spanArr.push(1); |
| | | position = index; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // åå¹¶åå
æ ¼ |
| | | spanMethod({ row, column, rowIndex, columnIndex }) { |
| | | // ä¸è¬çåå¹¶è¡ |
| | | if (this.column.find((m) => m.mergeCol)) { |
| | | let i = null; |
| | | let obj = this.spanList.find((item, index) => { |
| | | i = index; |
| | | return item.index == columnIndex; |
| | | }); |
| | | if (obj) { |
| | | const _row = this.spanList[i].arr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col, |
| | | }; |
| | | } |
| | | } |
| | | // // ç¹æ®çåå¹¶è¡ |
| | | // if ( |
| | | // this.data.spanConfig != undefined && |
| | | // this.data.spanConfig.special && |
| | | // this.data.spanConfig.special.main && |
| | | // this.data.spanConfig.special.rows && |
| | | // this.data.spanConfig.special.rows.length > 0 |
| | | // ) { |
| | | // let i = null; |
| | | // let obj = this.data.spanConfig.special.rows.find((item, index) => { |
| | | // i = index; |
| | | // return item.index == columnIndex; |
| | | // }); |
| | | // if (obj) { |
| | | // const _row = this.specialSpanList[i].arr[rowIndex]; |
| | | // const _col = _row > 0 ? 1 : 0; |
| | | // return { |
| | | // rowspan: _row, |
| | | // colspan: _col, |
| | | // }; |
| | | // } |
| | | // } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-table >>> .el-table__empty-text { |
| | | .el-table>>>.el-table__empty-text { |
| | | text-align: center; |
| | | } |
| | | |
| | | >>>.cell { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | | .cell { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | padding-right: 4px !important; |
| | | padding-left: 10px !important; |
| | | } |
| | | |
| | | .link { |
| | | color: rgb(64, 158, 255); |
| | | cursor: pointer; |
| | | } |
| | | |
| | | >>>.el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 14px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | | </style> |
| | | <style> |
| | | .lims-table .highlight-warning-row-border td:first-child { |
| | | border-left: 4px solid #ffcd29; |
| | | } |
| | | |
| | | .lims-table .highlight-warning-row-border td:last-child { |
| | | border-right: 4px solid #ffcd29; |
| | | } |
| | | |
| | | /* .lims-table .highlight-danger-row-border td { |
| | | border-top: 2px solid red; |
| | | border-bottom: 2px solid red; |
| | | } */ |
| | | |
| | | .lims-table .highlight-danger-row-border td:first-child { |
| | | border-left: 4px solid #f56c6c; |
| | | } |
| | | |
| | | .lims-table .highlight-danger-row-border td:last-child { |
| | | border-right: 4px solid #f56c6c; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="up-pdf-stamp"> |
| | | <div class="work" style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;" |
| | | v-if="isUpFile"> |
| | | <input type="file" @change="handleFileUpload" accept="application/pdf" ref="fileInput" /> |
| | | </div> |
| | | <p style="color: red;font-size: 12px;margin: 16px 0;" v-if="canvasNumPages > 0">æç¤ºï¼å¨æä»¶èå´å
ï¼åå»é¼ æ çç« ï¼åå»é¼ æ å·²çå¥½ç« å¤å¯å é¤å½åç« </p> |
| | | <canvas ref="pdfCanvas" @click="e => handleCanvasClick(e, index)" style="border: 1px solid #000;" |
| | | @dblclick="e => removeStamp(e, index)" v-for="(item, index) in canvasNumPages" :key="index"></canvas> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import jsPDF from "jspdf"; |
| | | import file from '@/utils/file.js' |
| | | export default { |
| | | props: ['isUpFile'], |
| | | data() { |
| | | return { |
| | | pdfDoc: null, // åå¨ä¸ä¼ ç PDF æ°æ® |
| | | stamps: [], // è®°å½çç« çä½ç½® |
| | | contextList: [],//canvaså表 |
| | | canvasNumPages: 0,// åå¨ PDF æ»é¡µæ° |
| | | stampWidth: 120, // çç« å®½åº¦ |
| | | stampHeight: 80, // çç« é«åº¦ |
| | | stampsName: '', |
| | | stampsList: ['主任', 'è´¨éè´è´£äºº', 'ææ¯è´è´£äºº', '综å室', 'éä¿¡', 'çµå', 'è£
å¤', 'å¨è½', 'å°é¢'], |
| | | fileName: 'æä»¶å' |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleFileUpload(event) { |
| | | const file = event.target.files[0]; |
| | | if (file.size > 20 * 1024 * 1024) { |
| | | this.$refs.fileInput.value = ""; // æ¸
空æä»¶è¾å
¥æ¡å
容 |
| | | return this.$message.error('æä»¶å¤§å°ä¸è½è¶
è¿20M') |
| | | } |
| | | this.lookFile(file) |
| | | }, |
| | | lookFile(file, currentStamp) { |
| | | this.fileName = file.name |
| | | if (currentStamp) { |
| | | this.stampsName = currentStamp |
| | | } else { |
| | | const index = this.stampsList.indexOf(m => file.name.includes(m)) |
| | | if (index > -1) { |
| | | this.stampsName = this.stampsList[index] |
| | | } else { |
| | | this.stampsName = '综å室' |
| | | } |
| | | } |
| | | if (file && file.type === 'application/pdf') { |
| | | const reader = new FileReader(); |
| | | reader.onload = (e) => { |
| | | const typedArray = new Uint8Array(e.target.result); |
| | | this.loadPDF(typedArray); |
| | | }; |
| | | reader.readAsArrayBuffer(file); |
| | | } else { |
| | | this.$message.error('è¯·éæ© PDF æä»¶'); |
| | | } |
| | | }, |
| | | loadPDF(typedArray) { |
| | | pdfjsLib.getDocument(typedArray).promise.then(pdfDoc_ => { |
| | | this.pdfDoc = pdfDoc_; |
| | | this.canvasNumPages = this.pdfDoc._pdfInfo.numPages |
| | | this.stamps = [] |
| | | this.contextList = [] |
| | | for (let i = 1; i <= this.canvasNumPages; i++) { |
| | | this.$nextTick(() => { |
| | | this.renderPage(i); // 渲æé¡µé¢ |
| | | }); |
| | | this.stamps.push([]) |
| | | } |
| | | }); |
| | | }, |
| | | // 渲ææå®é¡µé¢ |
| | | renderPage(pageNum) { |
| | | this.pdfDoc.getPage(pageNum).then(page => { |
| | | const canvas = this.$refs.pdfCanvas[pageNum - 1]; |
| | | this.contextList.push(canvas.getContext("2d")) |
| | | const viewport = page.getViewport({ scale: 1.5 }); |
| | | |
| | | canvas.width = viewport.width; |
| | | canvas.height = viewport.height; |
| | | |
| | | page.render({ |
| | | canvasContext: this.contextList[pageNum - 1], |
| | | viewport: viewport |
| | | }).promise.then(() => { |
| | | this.stamps[pageNum - 1].forEach(m => { |
| | | this.drawStamps(m.x, m.y, pageNum - 1) |
| | | }) |
| | | }); |
| | | }); |
| | | }, |
| | | // åå»--æ·»å ç« |
| | | handleCanvasClick(event, i) { |
| | | const x = event.offsetX; |
| | | const y = event.offsetY; |
| | | const index = this.stamps[i].findIndex(stamp => { |
| | | let x0 = x - stamp.x; |
| | | let y0 = y - stamp.y; |
| | | return x0 > 0 && x0 < this.stampWidth && y0 > 0 && y0 < this.stampHeight; |
| | | }); |
| | | if (index > -1) return; |
| | | this.drawStamps(x, y, i) |
| | | this.stamps[i].push({ x, y }); |
| | | }, |
| | | // åå»--å é¤çç« |
| | | removeStamp(event, i) { |
| | | const x = event.offsetX; |
| | | const y = event.offsetY; |
| | | // æ¥æ¾è¢«åå»ççç« |
| | | const index = this.stamps[i].findIndex(stamp => { |
| | | let x0 = x - stamp.x; |
| | | let y0 = y - stamp.y; |
| | | return x0 > 0 && x0 < this.stampWidth && y0 > 0 && y0 < this.stampHeight; |
| | | }); |
| | | if (index === -1) return; |
| | | this.stamps[i].splice(index, 1); // å 餿å®ççç« |
| | | this.contextList[i].clearRect(0, 0, this.contextList[i].width, this.contextList[i].height); |
| | | this.renderPage(i + 1) |
| | | }, |
| | | // 渲æç« |
| | | drawStamps(x, y, index) { |
| | | var img = new Image(); |
| | | console.log(this.stampsName) |
| | | // 设置å¾çæº |
| | | img.src = require("@/assets/stamps/" + this.stampsName + ".png"); // æ¿æ¢ä¸ºä½ çå¾ç龿¥ |
| | | let that = this |
| | | img.onload = function () { |
| | | // å¾çå è½½å®æåï¼å°å¾çç»å¶å°canvasä¸ |
| | | that.contextList[index].drawImage(img, x, y, that.stampWidth, that.stampHeight); |
| | | }; |
| | | }, |
| | | // çæ PDF ç彿° |
| | | async generatePDF() { |
| | | if (this.contextList.length === 0) { |
| | | this.$message({ message: '请å
ä¸ä¼ PDFæä»¶', type: 'error' }); |
| | | this.$emit('uploadPDFErr') |
| | | return false |
| | | } |
| | | const pdf = new jsPDF("p", "mm", "a4"); |
| | | for (let i = 0; i < this.contextList.length; i++) { |
| | | const imgData = this.$refs.pdfCanvas[i].toDataURL('image/jpeg', 0.7); |
| | | const pdfWidth = pdf.internal.pageSize.getWidth(); |
| | | const pdfHeight = (this.$refs.pdfCanvas[i].height * pdfWidth) / this.$refs.pdfCanvas[i].width; |
| | | pdf.addImage(imgData, "JPEG", 0, 0, pdfWidth, pdfHeight); // å°å¾çæ·»å å° PDF |
| | | if (i !== this.contextList.length - 1) { |
| | | pdf.addPage(); // æ·»å æ°çä¸é¡µ |
| | | } |
| | | } |
| | | |
| | | // å° PDF æä»¶ä¿åæä¸ä¼ |
| | | const pdfOutput = pdf.output('blob'); // è·å PDF æä»¶ç Blob 对象 |
| | | |
| | | // ä¸ä¼ å°å端 |
| | | return this.$emit('uploadPDF', pdfOutput, this.fileName) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | |
| | | import Vue from 'vue' |
| | | import Vue from "vue"; |
| | | |
| | | import Cookies from 'js-cookie' |
| | | import Cookies from "js-cookie"; |
| | | |
| | | import Element from 'element-ui' |
| | | import './assets/styles/element-variables.scss' |
| | | import Element from "element-ui"; |
| | | import "./assets/styles/element-variables.scss"; |
| | | |
| | | import '@/assets/styles/index.scss' // global css |
| | | import '@/assets/styles/ruoyi.scss' // ruoyi css |
| | | import App from './App' |
| | | import store from './store' |
| | | import router from './router' |
| | | import directive from './directive' // directive |
| | | import plugins from './plugins' // plugins |
| | | import { download } from '@/utils/request' |
| | | import "@/assets/styles/index.scss"; // global css |
| | | import "@/assets/styles/ruoyi.scss"; // ruoyi css |
| | | import App from "./App"; |
| | | import store from "./store"; |
| | | import router from "./router"; |
| | | import directive from "./directive"; // directive |
| | | import plugins from "./plugins"; // plugins |
| | | import { download } from "@/utils/request"; |
| | | |
| | | import './assets/icons' // icon |
| | | import './permission' // permission control |
| | | import "./assets/icons"; // icon |
| | | import "./permission"; // permission control |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { getConfigKey } from "@/api/system/config"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; |
| | | import { |
| | | parseTime, |
| | | resetForm, |
| | | addDateRange, |
| | | selectDictLabel, |
| | | selectDictLabels, |
| | | handleTree, |
| | | } from "@/utils/ruoyi"; |
| | | import { dictToValue } from "@/utils/index"; |
| | | // å页ç»ä»¶ |
| | | import Pagination from "@/components/Pagination"; |
| | | // èªå®ä¹è¡¨æ ¼å·¥å
·ç»ä»¶ |
| | | import RightToolbar from "@/components/RightToolbar" |
| | | import RightToolbar from "@/components/RightToolbar"; |
| | | // 坿æ¬ç»ä»¶ |
| | | import Editor from "@/components/Editor" |
| | | import Editor from "@/components/Editor"; |
| | | // æä»¶ä¸ä¼ ç»ä»¶ |
| | | import FileUpload from "@/components/FileUpload" |
| | | import FileUpload from "@/components/FileUpload"; |
| | | // å¾çä¸ä¼ ç»ä»¶ |
| | | import ImageUpload from "@/components/ImageUpload" |
| | | import ImageUpload from "@/components/ImageUpload"; |
| | | // å¾çé¢è§ç»ä»¶ |
| | | import ImagePreview from "@/components/ImagePreview" |
| | | import ImagePreview from "@/components/ImagePreview"; |
| | | // åå
¸æ ç¾ç»ä»¶ |
| | | import DictTag from '@/components/DictTag' |
| | | import DictTag from "@/components/DictTag"; |
| | | // 头鍿 ç¾ç»ä»¶ |
| | | import VueMeta from 'vue-meta' |
| | | import VueMeta from "vue-meta"; |
| | | // åå
¸æ°æ®ç»ä»¶ |
| | | import DictData from '@/components/DictData' |
| | | import DictData from "@/components/DictData"; |
| | | import { checkPermi } from "@/utils/permission"; // æé夿彿° |
| | | import { getToken } from "@/utils/auth"; |
| | | // æ¶é´è½¬æ¢ |
| | | import Moment from "moment"; |
| | | |
| | | // å
¨å±æ¹æ³æè½½ |
| | | Vue.prototype.getDicts = getDicts |
| | | Vue.prototype.getConfigKey = getConfigKey |
| | | Vue.prototype.parseTime = parseTime |
| | | Vue.prototype.resetForm = resetForm |
| | | Vue.prototype.addDateRange = addDateRange |
| | | Vue.prototype.selectDictLabel = selectDictLabel |
| | | Vue.prototype.selectDictLabels = selectDictLabels |
| | | Vue.prototype.download = download |
| | | Vue.prototype.handleTree = handleTree |
| | | Vue.prototype.getDicts = getDicts; |
| | | Vue.prototype.getConfigKey = getConfigKey; |
| | | Vue.prototype.parseTime = parseTime; |
| | | Vue.prototype.resetForm = resetForm; |
| | | Vue.prototype.addDateRange = addDateRange; |
| | | Vue.prototype.selectDictLabel = selectDictLabel; |
| | | Vue.prototype.selectDictLabels = selectDictLabels; |
| | | Vue.prototype.download = download; |
| | | Vue.prototype.handleTree = handleTree; |
| | | Vue.prototype.dictToValue = dictToValue; |
| | | Vue.prototype.HaveJson = (val) => { |
| | | return JSON.parse(JSON.stringify(val)) |
| | | } |
| | | return JSON.parse(JSON.stringify(val)); |
| | | }; |
| | | Vue.prototype.javaApi = process.env.VUE_APP_BASE_API |
| | | ? process.env.VUE_APP_BASE_API |
| | | : "http://192.168.0.104:8002"; |
| | | Vue.prototype.checkPermi = checkPermi; |
| | | Vue.prototype.uploadHeader = { |
| | | Authorization: "Bearer " + getToken(), |
| | | }; |
| | | // è§£å³el-radio-groupåéæ¡èªèº«çbug |
| | | Vue.directive("removeAriaHidden", { |
| | | bind(el, binding) { |
| | | let ariaEls = el.querySelectorAll(".el-radio__original"); |
| | | ariaEls.forEach((item) => { |
| | | item.removeAttribute("aria-hidden"); |
| | | }); |
| | | }, |
| | | }); |
| | | Vue.use(Moment); |
| | | Vue.prototype.$moment = Moment; |
| | | |
| | | // å
¨å±ç»ä»¶æè½½ |
| | | Vue.component('DictTag', DictTag) |
| | | Vue.component('Pagination', Pagination) |
| | | Vue.component('RightToolbar', RightToolbar) |
| | | Vue.component('Editor', Editor) |
| | | Vue.component('FileUpload', FileUpload) |
| | | Vue.component('ImageUpload', ImageUpload) |
| | | Vue.component('ImagePreview', ImagePreview) |
| | | Vue.component("DictTag", DictTag); |
| | | Vue.component("Pagination", Pagination); |
| | | Vue.component("RightToolbar", RightToolbar); |
| | | Vue.component("Editor", Editor); |
| | | Vue.component("FileUpload", FileUpload); |
| | | Vue.component("ImageUpload", ImageUpload); |
| | | Vue.component("ImagePreview", ImagePreview); |
| | | |
| | | Vue.use(directive) |
| | | Vue.use(plugins) |
| | | Vue.use(VueMeta) |
| | | DictData.install() |
| | | Vue.use(directive); |
| | | Vue.use(plugins); |
| | | Vue.use(VueMeta); |
| | | DictData.install(); |
| | | |
| | | /** |
| | | * If you don't want to use mock-server |
| | |
| | | */ |
| | | |
| | | Vue.use(Element, { |
| | | size: Cookies.get('size') || 'medium' // set element-ui default size |
| | | }) |
| | | size: Cookies.get("size") || "medium", // set element-ui default size |
| | | }); |
| | | |
| | | Vue.config.productionTip = false |
| | | Vue.config.productionTip = false; |
| | | |
| | | new Vue({ |
| | | el: '#app', |
| | | el: "#app", |
| | | router, |
| | | store, |
| | | render: h => h(App) |
| | | }) |
| | | render: (h) => h(App), |
| | | }); |
| | |
| | | import axios from 'axios' |
| | | import {Loading, Message} from 'element-ui' |
| | | import { saveAs } from 'file-saver' |
| | | import { getToken } from '@/utils/auth' |
| | | import errorCode from '@/utils/errorCode' |
| | | import axios from "axios"; |
| | | import { Loading, Message } from "element-ui"; |
| | | import { saveAs } from "file-saver"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import errorCode from "@/utils/errorCode"; |
| | | import { blobValidate } from "@/utils/ruoyi"; |
| | | |
| | | const baseURL = process.env.VUE_APP_BASE_API |
| | | const baseURL = process.env.VUE_APP_BASE_API; |
| | | let downloadLoadingInstance; |
| | | |
| | | export default { |
| | | name(name, isDelete = true) { |
| | | var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete |
| | | var url = |
| | | baseURL + |
| | | "/common/download?fileName=" + |
| | | encodeURIComponent(name) + |
| | | "&delete=" + |
| | | isDelete; |
| | | axios({ |
| | | method: 'get', |
| | | method: "get", |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | responseType: "blob", |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data]) |
| | | this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) |
| | | const blob = new Blob([res.data]); |
| | | this.saveAs(blob, decodeURIComponent(res.headers["download-filename"])); |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | resource(resource) { |
| | | var url = baseURL + "/common/download/resource?resource=" + encodeURIComponent(resource); |
| | | var url = |
| | | baseURL + |
| | | "/common/download/resource?resource=" + |
| | | encodeURIComponent(resource); |
| | | axios({ |
| | | method: 'get', |
| | | method: "get", |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | responseType: "blob", |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data]) |
| | | this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) |
| | | const blob = new Blob([res.data]); |
| | | this.saveAs(blob, decodeURIComponent(res.headers["download-filename"])); |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | zip(url, name) { |
| | | var url = baseURL + url |
| | | downloadLoadingInstance = Loading.service({ text: "æ£å¨ä¸è½½æ°æ®ï¼è¯·ç¨å", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", }) |
| | | var url = baseURL + url; |
| | | downloadLoadingInstance = Loading.service({ |
| | | text: "æ£å¨ä¸è½½æ°æ®ï¼è¯·ç¨å", |
| | | spinner: "el-icon-loading", |
| | | background: "rgba(0, 0, 0, 0.7)", |
| | | }); |
| | | axios({ |
| | | method: 'get', |
| | | method: "get", |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data], { type: 'application/zip' }) |
| | | this.saveAs(blob, name) |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | } |
| | | downloadLoadingInstance.close(); |
| | | }).catch((r) => { |
| | | console.error(r) |
| | | Message.error('ä¸è½½æä»¶åºç°é误ï¼è¯·è系管çåï¼') |
| | | downloadLoadingInstance.close(); |
| | | responseType: "blob", |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | }) |
| | | .then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data], { type: "application/zip" }); |
| | | this.saveAs(blob, name); |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | } |
| | | downloadLoadingInstance.close(); |
| | | }) |
| | | .catch((r) => { |
| | | console.error(r); |
| | | Message.error("ä¸è½½æä»¶åºç°é误ï¼è¯·è系管çåï¼"); |
| | | downloadLoadingInstance.close(); |
| | | }); |
| | | }, |
| | | saveAs(text, name, opts) { |
| | | saveAs(text, name, opts); |
| | | if (typeof text === "string") { |
| | | // è·¯å¾ä¸è½½ |
| | | saveAs(text, name, opts); |
| | | Message.success("æ°æ®å¯¼åºæå"); |
| | | } else { |
| | | // æµä¸è½½ |
| | | blobToText(text) |
| | | .then((result) => { |
| | | Message.error(result.msg); |
| | | }) |
| | | .catch(() => { |
| | | saveAs(text, name, opts); |
| | | Message.success("æ°æ®å¯¼åºæå"); |
| | | }); |
| | | } |
| | | }, |
| | | async printErrMsg(data) { |
| | | const resText = await data.text(); |
| | | const rspObj = JSON.parse(resText); |
| | | const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] |
| | | const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode["default"]; |
| | | Message.error(errMsg); |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | |
| | | // å°blobè½¬æææ¬ |
| | | function blobToText(blob) { |
| | | return new Promise((resolve, reject) => { |
| | | const fileReader = new FileReader(); |
| | | fileReader.readAsText(blob); |
| | | fileReader.onload = function () { |
| | | try { |
| | | const result = JSON.parse(this.result); |
| | | if (result && result["code"] !== 200) { |
| | | resolve(result); |
| | | } else { |
| | | reject(); |
| | | } |
| | | } catch (e) { |
| | | reject(); |
| | | } |
| | | }; |
| | | }); |
| | | } |
| | |
| | | const getters = { |
| | | sidebar: state => state.app.sidebar, |
| | | size: state => state.app.size, |
| | | device: state => state.app.device, |
| | | dict: state => state.dict.dict, |
| | | visitedViews: state => state.tagsView.visitedViews, |
| | | cachedViews: state => state.tagsView.cachedViews, |
| | | token: state => state.user.token, |
| | | avatar: state => state.user.avatar, |
| | | name: state => state.user.name, |
| | | introduction: state => state.user.introduction, |
| | | roles: state => state.user.roles, |
| | | permissions: state => state.user.permissions, |
| | | permission_routes: state => state.permission.routes, |
| | | topbarRouters:state => state.permission.topbarRouters, |
| | | defaultRoutes:state => state.permission.defaultRoutes, |
| | | sidebarRouters:state => state.permission.sidebarRouters, |
| | | } |
| | | export default getters |
| | | sidebar: (state) => state.app.sidebar, |
| | | size: (state) => state.app.size, |
| | | device: (state) => state.app.device, |
| | | dict: (state) => state.dict.dict, |
| | | visitedViews: (state) => state.tagsView.visitedViews, |
| | | cachedViews: (state) => state.tagsView.cachedViews, |
| | | token: (state) => state.user.token, |
| | | avatar: (state) => state.user.avatar, |
| | | name: (state) => state.user.name, |
| | | nickName: (state) => state.user.nickName, |
| | | userId: (state) => state.user.id, |
| | | introduction: (state) => state.user.introduction, |
| | | roles: (state) => state.user.roles, |
| | | permissions: (state) => state.user.permissions, |
| | | permission_routes: (state) => state.permission.routes, |
| | | topbarRouters: (state) => state.permission.topbarRouters, |
| | | defaultRoutes: (state) => state.permission.defaultRoutes, |
| | | sidebarRouters: (state) => state.permission.sidebarRouters, |
| | | }; |
| | | export default getters; |
| | |
| | | import { login, logout, getInfo } from '@/api/login' |
| | | import { getToken, setToken, removeToken } from '@/utils/auth' |
| | | import { isHttp, isEmpty } from "@/utils/validate" |
| | | import defAva from '@/assets/images/profile.jpg' |
| | | import { login, logout, getInfo } from "@/api/login"; |
| | | import { getToken, setToken, removeToken } from "@/utils/auth"; |
| | | import { isHttp, isEmpty } from "@/utils/validate"; |
| | | import defAva from "@/assets/images/profile.jpg"; |
| | | |
| | | const user = { |
| | | state: { |
| | | token: getToken(), |
| | | id: '', |
| | | name: '', |
| | | avatar: '', |
| | | id: "", |
| | | name: "", |
| | | avatar: "", |
| | | nickName: "", |
| | | roles: [], |
| | | permissions: [] |
| | | permissions: [], |
| | | }, |
| | | |
| | | mutations: { |
| | | SET_TOKEN: (state, token) => { |
| | | state.token = token |
| | | state.token = token; |
| | | }, |
| | | SET_ID: (state, id) => { |
| | | state.id = id |
| | | state.id = id; |
| | | }, |
| | | SET_NAME: (state, name) => { |
| | | state.name = name |
| | | state.name = name; |
| | | }, |
| | | SET_AVATAR: (state, avatar) => { |
| | | state.avatar = avatar |
| | | state.avatar = avatar; |
| | | }, |
| | | SET_NICKNAME: (state, nickName) => { |
| | | state.nickName = nickName; |
| | | }, |
| | | SET_ROLES: (state, roles) => { |
| | | state.roles = roles |
| | | state.roles = roles; |
| | | }, |
| | | SET_PERMISSIONS: (state, permissions) => { |
| | | state.permissions = permissions |
| | | } |
| | | state.permissions = permissions; |
| | | }, |
| | | }, |
| | | |
| | | actions: { |
| | | // ç»å½ |
| | | Login({ commit }, userInfo) { |
| | | const username = userInfo.username.trim() |
| | | const password = userInfo.password |
| | | const code = userInfo.code |
| | | const uuid = userInfo.uuid |
| | | const username = userInfo.username.trim(); |
| | | const password = userInfo.password; |
| | | const code = userInfo.code; |
| | | const uuid = userInfo.uuid; |
| | | return new Promise((resolve, reject) => { |
| | | login(username, password, code, uuid).then(res => { |
| | | setToken(res.token) |
| | | commit('SET_TOKEN', res.token) |
| | | resolve() |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | login(username, password, code, uuid) |
| | | .then((res) => { |
| | | setToken(res.token); |
| | | commit("SET_TOKEN", res.token); |
| | | resolve(); |
| | | }) |
| | | .catch((error) => { |
| | | reject(error); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // è·åç¨æ·ä¿¡æ¯ |
| | | GetInfo({ commit, state }) { |
| | | return new Promise((resolve, reject) => { |
| | | getInfo().then(res => { |
| | | const user = res.user |
| | | let avatar = user.avatar || "" |
| | | if (!isHttp(avatar)) { |
| | | avatar = (isEmpty(avatar)) ? defAva : process.env.VUE_APP_BASE_API + avatar |
| | | } |
| | | if (res.roles && res.roles.length > 0) { // éªè¯è¿åçrolesæ¯å¦æ¯ä¸ä¸ªé空æ°ç» |
| | | commit('SET_ROLES', res.roles) |
| | | commit('SET_PERMISSIONS', res.permissions) |
| | | } else { |
| | | commit('SET_ROLES', ['ROLE_DEFAULT']) |
| | | } |
| | | commit('SET_ID', user.userId) |
| | | commit('SET_NAME', user.userName) |
| | | commit('SET_AVATAR', avatar) |
| | | resolve(res) |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | getInfo() |
| | | .then((res) => { |
| | | const user = res.user; |
| | | let avatar = user.avatar || ""; |
| | | if (!isHttp(avatar)) { |
| | | avatar = isEmpty(avatar) |
| | | ? defAva |
| | | : process.env.VUE_APP_BASE_API + avatar; |
| | | } |
| | | if (res.roles && res.roles.length > 0) { |
| | | // éªè¯è¿åçrolesæ¯å¦æ¯ä¸ä¸ªé空æ°ç» |
| | | commit("SET_ROLES", res.roles); |
| | | commit("SET_PERMISSIONS", res.permissions); |
| | | } else { |
| | | commit("SET_ROLES", ["ROLE_DEFAULT"]); |
| | | } |
| | | commit("SET_ID", user.userId); |
| | | commit("SET_NAME", user.userName); |
| | | commit("SET_AVATAR", avatar); |
| | | commit("SET_NICKNAME", user.nickName); |
| | | resolve(res); |
| | | }) |
| | | .catch((error) => { |
| | | reject(error); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // éåºç³»ç» |
| | | LogOut({ commit, state }) { |
| | | return new Promise((resolve, reject) => { |
| | | logout(state.token).then(() => { |
| | | commit('SET_TOKEN', '') |
| | | commit('SET_ROLES', []) |
| | | commit('SET_PERMISSIONS', []) |
| | | removeToken() |
| | | resolve() |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | logout(state.token) |
| | | .then(() => { |
| | | commit("SET_TOKEN", ""); |
| | | commit("SET_ROLES", []); |
| | | commit("SET_PERMISSIONS", []); |
| | | removeToken(); |
| | | resolve(); |
| | | }) |
| | | .catch((error) => { |
| | | reject(error); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // å端 ç»åº |
| | | FedLogOut({ commit }) { |
| | | return new Promise(resolve => { |
| | | commit('SET_TOKEN', '') |
| | | removeToken() |
| | | resolve() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | return new Promise((resolve) => { |
| | | commit("SET_TOKEN", ""); |
| | | removeToken(); |
| | | resolve(); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | export default user |
| | | export default user; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import html2canvas from "html2canvas"; |
| | | import jsPDF from "jspdf"; |
| | | |
| | | export async function exportHtmlToPDF(element, name = "exported") { |
| | | try { |
| | | // å° HTML å
ç´ è½¬æ¢ä¸º canvas |
| | | console.log("æ£å¨å° HTML 转æ¢ä¸º canvas...", element); |
| | | const canvas = await html2canvas(element, { useCORS: true }); |
| | | const imgData = canvas.toDataURL("image/png"); |
| | | |
| | | // å建 PDF |
| | | const pdf = new jsPDF("p", "mm", "a4"); |
| | | const pdfWidth = pdf.internal.pageSize.getWidth(); |
| | | const pdfHeight = (canvas.height * pdfWidth) / canvas.width; |
| | | |
| | | pdf.addImage(imgData, "PNG", 10, 10, pdfWidth - 20, pdfHeight - 20); |
| | | pdf.save(name + ".pdf"); |
| | | console.log("PDF å¯¼åºæåï¼"); |
| | | } catch (error) { |
| | | console.error("å¯¼åº PDF 失败ï¼", error); |
| | | } |
| | | } |
| | |
| | | import { parseTime } from './ruoyi' |
| | | import { parseTime } from "./ruoyi"; |
| | | |
| | | /** |
| | | * è¡¨æ ¼æ¶é´æ ¼å¼å |
| | | */ |
| | | export function formatDate(cellValue) { |
| | | if (cellValue == null || cellValue == "") return ""; |
| | | var date = new Date(cellValue) |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 |
| | | var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
| | | var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() |
| | | var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() |
| | | var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() |
| | | return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds |
| | | var date = new Date(cellValue); |
| | | var year = date.getFullYear(); |
| | | var month = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(); |
| | | var minutes = |
| | | date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); |
| | | var seconds = |
| | | date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); |
| | | return ( |
| | | year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds |
| | | ); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {string} |
| | | */ |
| | | export function formatTime(time, option) { |
| | | if (('' + time).length === 10) { |
| | | time = parseInt(time) * 1000 |
| | | if (("" + time).length === 10) { |
| | | time = parseInt(time) * 1000; |
| | | } else { |
| | | time = +time |
| | | time = +time; |
| | | } |
| | | const d = new Date(time) |
| | | const now = Date.now() |
| | | const d = new Date(time); |
| | | const now = Date.now(); |
| | | |
| | | const diff = (now - d) / 1000 |
| | | const diff = (now - d) / 1000; |
| | | |
| | | if (diff < 30) { |
| | | return 'åå' |
| | | return "åå"; |
| | | } else if (diff < 3600) { |
| | | // less 1 hour |
| | | return Math.ceil(diff / 60) + 'åéå' |
| | | return Math.ceil(diff / 60) + "åéå"; |
| | | } else if (diff < 3600 * 24) { |
| | | return Math.ceil(diff / 3600) + 'å°æ¶å' |
| | | return Math.ceil(diff / 3600) + "å°æ¶å"; |
| | | } else if (diff < 3600 * 24 * 2) { |
| | | return '1天å' |
| | | return "1天å"; |
| | | } |
| | | if (option) { |
| | | return parseTime(time, option) |
| | | return parseTime(time, option); |
| | | } else { |
| | | return ( |
| | | d.getMonth() + |
| | | 1 + |
| | | 'æ' + |
| | | "æ" + |
| | | d.getDate() + |
| | | 'æ¥' + |
| | | "æ¥" + |
| | | d.getHours() + |
| | | 'æ¶' + |
| | | "æ¶" + |
| | | d.getMinutes() + |
| | | 'å' |
| | | ) |
| | | "å" |
| | | ); |
| | | } |
| | | } |
| | | |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function getQueryObject(url) { |
| | | url = url == null ? window.location.href : url |
| | | const search = url.substring(url.lastIndexOf('?') + 1) |
| | | const obj = {} |
| | | const reg = /([^?&=]+)=([^?&=]*)/g |
| | | url = url == null ? window.location.href : url; |
| | | const search = url.substring(url.lastIndexOf("?") + 1); |
| | | const obj = {}; |
| | | const reg = /([^?&=]+)=([^?&=]*)/g; |
| | | search.replace(reg, (rs, $1, $2) => { |
| | | const name = decodeURIComponent($1) |
| | | let val = decodeURIComponent($2) |
| | | val = String(val) |
| | | obj[name] = val |
| | | return rs |
| | | }) |
| | | return obj |
| | | const name = decodeURIComponent($1); |
| | | let val = decodeURIComponent($2); |
| | | val = String(val); |
| | | obj[name] = val; |
| | | return rs; |
| | | }); |
| | | return obj; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function byteLength(str) { |
| | | // returns the byte length of an utf8 string |
| | | let s = str.length |
| | | let s = str.length; |
| | | for (var i = str.length - 1; i >= 0; i--) { |
| | | const code = str.charCodeAt(i) |
| | | if (code > 0x7f && code <= 0x7ff) s++ |
| | | else if (code > 0x7ff && code <= 0xffff) s += 2 |
| | | if (code >= 0xDC00 && code <= 0xDFFF) i-- |
| | | const code = str.charCodeAt(i); |
| | | if (code > 0x7f && code <= 0x7ff) s++; |
| | | else if (code > 0x7ff && code <= 0xffff) s += 2; |
| | | if (code >= 0xdc00 && code <= 0xdfff) i--; |
| | | } |
| | | return s |
| | | return s; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Array} |
| | | */ |
| | | export function cleanArray(actual) { |
| | | const newArray = [] |
| | | const newArray = []; |
| | | for (let i = 0; i < actual.length; i++) { |
| | | if (actual[i]) { |
| | | newArray.push(actual[i]) |
| | | newArray.push(actual[i]); |
| | | } |
| | | } |
| | | return newArray |
| | | return newArray; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Array} |
| | | */ |
| | | export function param(json) { |
| | | if (!json) return '' |
| | | if (!json) return ""; |
| | | return cleanArray( |
| | | Object.keys(json).map(key => { |
| | | if (json[key] === undefined) return '' |
| | | return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) |
| | | Object.keys(json).map((key) => { |
| | | if (json[key] === undefined) return ""; |
| | | return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]); |
| | | }) |
| | | ).join('&') |
| | | ).join("&"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function param2Obj(url) { |
| | | const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') |
| | | const search = decodeURIComponent(url.split("?")[1]).replace(/\+/g, " "); |
| | | if (!search) { |
| | | return {} |
| | | return {}; |
| | | } |
| | | const obj = {} |
| | | const searchArr = search.split('&') |
| | | searchArr.forEach(v => { |
| | | const index = v.indexOf('=') |
| | | const obj = {}; |
| | | const searchArr = search.split("&"); |
| | | searchArr.forEach((v) => { |
| | | const index = v.indexOf("="); |
| | | if (index !== -1) { |
| | | const name = v.substring(0, index) |
| | | const val = v.substring(index + 1, v.length) |
| | | obj[name] = val |
| | | const name = v.substring(0, index); |
| | | const val = v.substring(index + 1, v.length); |
| | | obj[name] = val; |
| | | } |
| | | }) |
| | | return obj |
| | | }); |
| | | return obj; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {string} |
| | | */ |
| | | export function html2Text(val) { |
| | | const div = document.createElement('div') |
| | | div.innerHTML = val |
| | | return div.textContent || div.innerText |
| | | const div = document.createElement("div"); |
| | | div.innerHTML = val; |
| | | return div.textContent || div.innerText; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function objectMerge(target, source) { |
| | | if (typeof target !== 'object') { |
| | | target = {} |
| | | if (typeof target !== "object") { |
| | | target = {}; |
| | | } |
| | | if (Array.isArray(source)) { |
| | | return source.slice() |
| | | return source.slice(); |
| | | } |
| | | Object.keys(source).forEach(property => { |
| | | const sourceProperty = source[property] |
| | | if (typeof sourceProperty === 'object') { |
| | | target[property] = objectMerge(target[property], sourceProperty) |
| | | Object.keys(source).forEach((property) => { |
| | | const sourceProperty = source[property]; |
| | | if (typeof sourceProperty === "object") { |
| | | target[property] = objectMerge(target[property], sourceProperty); |
| | | } else { |
| | | target[property] = sourceProperty |
| | | target[property] = sourceProperty; |
| | | } |
| | | }) |
| | | return target |
| | | }); |
| | | return target; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function toggleClass(element, className) { |
| | | if (!element || !className) { |
| | | return |
| | | return; |
| | | } |
| | | let classString = element.className |
| | | const nameIndex = classString.indexOf(className) |
| | | let classString = element.className; |
| | | const nameIndex = classString.indexOf(className); |
| | | if (nameIndex === -1) { |
| | | classString += '' + className |
| | | classString += "" + className; |
| | | } else { |
| | | classString = |
| | | classString.substr(0, nameIndex) + |
| | | classString.substr(nameIndex + className.length) |
| | | classString.substr(nameIndex + className.length); |
| | | } |
| | | element.className = classString |
| | | element.className = classString; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Date} |
| | | */ |
| | | export function getTime(type) { |
| | | if (type === 'start') { |
| | | return new Date().getTime() - 3600 * 1000 * 24 * 90 |
| | | if (type === "start") { |
| | | return new Date().getTime() - 3600 * 1000 * 24 * 90; |
| | | } else { |
| | | return new Date(new Date().toDateString()) |
| | | return new Date(new Date().toDateString()); |
| | | } |
| | | } |
| | | |
| | |
| | | * @return {*} |
| | | */ |
| | | export function debounce(func, wait, immediate) { |
| | | let timeout, args, context, timestamp, result |
| | | let timeout, args, context, timestamp, result; |
| | | |
| | | const later = function() { |
| | | const later = function () { |
| | | // æ®ä¸ä¸æ¬¡è§¦åæ¶é´é´é |
| | | const last = +new Date() - timestamp |
| | | const last = +new Date() - timestamp; |
| | | |
| | | // 䏿¬¡è¢«å
è£
彿°è¢«è°ç¨æ¶é´é´é last å°äºè®¾å®æ¶é´é´é wait |
| | | if (last < wait && last > 0) { |
| | | timeout = setTimeout(later, wait - last) |
| | | timeout = setTimeout(later, wait - last); |
| | | } else { |
| | | timeout = null |
| | | timeout = null; |
| | | // å¦æè®¾å®ä¸ºimmediate===trueï¼å 为å¼å§è¾¹çå·²ç»è°ç¨è¿äºæ¤å¤æ éè°ç¨ |
| | | if (!immediate) { |
| | | result = func.apply(context, args) |
| | | if (!timeout) context = args = null |
| | | result = func.apply(context, args); |
| | | if (!timeout) context = args = null; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | return function(...args) { |
| | | context = this |
| | | timestamp = +new Date() |
| | | const callNow = immediate && !timeout |
| | | return function (...args) { |
| | | context = this; |
| | | timestamp = +new Date(); |
| | | const callNow = immediate && !timeout; |
| | | // 妿延æ¶ä¸åå¨ï¼éæ°è®¾å®å»¶æ¶ |
| | | if (!timeout) timeout = setTimeout(later, wait) |
| | | if (!timeout) timeout = setTimeout(later, wait); |
| | | if (callNow) { |
| | | result = func.apply(context, args) |
| | | context = args = null |
| | | result = func.apply(context, args); |
| | | context = args = null; |
| | | } |
| | | |
| | | return result |
| | | } |
| | | return result; |
| | | }; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function deepClone(source) { |
| | | if (!source && typeof source !== 'object') { |
| | | throw new Error('error arguments', 'deepClone') |
| | | if (!source && typeof source !== "object") { |
| | | throw new Error("error arguments", "deepClone"); |
| | | } |
| | | const targetObj = source.constructor === Array ? [] : {} |
| | | Object.keys(source).forEach(keys => { |
| | | if (source[keys] && typeof source[keys] === 'object') { |
| | | targetObj[keys] = deepClone(source[keys]) |
| | | const targetObj = source.constructor === Array ? [] : {}; |
| | | Object.keys(source).forEach((keys) => { |
| | | if (source[keys] && typeof source[keys] === "object") { |
| | | targetObj[keys] = deepClone(source[keys]); |
| | | } else { |
| | | targetObj[keys] = source[keys] |
| | | targetObj[keys] = source[keys]; |
| | | } |
| | | }) |
| | | return targetObj |
| | | }); |
| | | return targetObj; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Array} |
| | | */ |
| | | export function uniqueArr(arr) { |
| | | return Array.from(new Set(arr)) |
| | | return Array.from(new Set(arr)); |
| | | } |
| | | |
| | | /** |
| | | * @returns {string} |
| | | */ |
| | | export function createUniqueString() { |
| | | const timestamp = +new Date() + '' |
| | | const randomNum = parseInt((1 + Math.random()) * 65536) + '' |
| | | return (+(randomNum + timestamp)).toString(32) |
| | | const timestamp = +new Date() + ""; |
| | | const randomNum = parseInt((1 + Math.random()) * 65536) + ""; |
| | | return (+(randomNum + timestamp)).toString(32); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {boolean} |
| | | */ |
| | | export function hasClass(ele, cls) { |
| | | return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) |
| | | return !!ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)")); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param {string} cls |
| | | */ |
| | | export function addClass(ele, cls) { |
| | | if (!hasClass(ele, cls)) ele.className += ' ' + cls |
| | | if (!hasClass(ele, cls)) ele.className += " " + cls; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function removeClass(ele, cls) { |
| | | if (hasClass(ele, cls)) { |
| | | const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') |
| | | ele.className = ele.className.replace(reg, ' ') |
| | | const reg = new RegExp("(\\s|^)" + cls + "(\\s|$)"); |
| | | ele.className = ele.className.replace(reg, " "); |
| | | } |
| | | } |
| | | |
| | | export function makeMap(str, expectsLowerCase) { |
| | | const map = Object.create(null) |
| | | const list = str.split(',') |
| | | const map = Object.create(null); |
| | | const list = str.split(","); |
| | | for (let i = 0; i < list.length; i++) { |
| | | map[list[i]] = true |
| | | map[list[i]] = true; |
| | | } |
| | | return expectsLowerCase |
| | | ? val => map[val.toLowerCase()] |
| | | : val => map[val] |
| | | return expectsLowerCase ? (val) => map[val.toLowerCase()] : (val) => map[val]; |
| | | } |
| | | |
| | | export const exportDefault = 'export default ' |
| | | export const exportDefault = "export default "; |
| | | |
| | | export const beautifierConf = { |
| | | html: { |
| | | indent_size: '2', |
| | | indent_char: ' ', |
| | | max_preserve_newlines: '-1', |
| | | indent_size: "2", |
| | | indent_char: " ", |
| | | max_preserve_newlines: "-1", |
| | | preserve_newlines: false, |
| | | keep_array_indentation: false, |
| | | break_chained_methods: false, |
| | | indent_scripts: 'separate', |
| | | brace_style: 'end-expand', |
| | | indent_scripts: "separate", |
| | | brace_style: "end-expand", |
| | | space_before_conditional: true, |
| | | unescape_strings: false, |
| | | jslint_happy: false, |
| | | end_with_newline: true, |
| | | wrap_line_length: '110', |
| | | wrap_line_length: "110", |
| | | indent_inner_html: true, |
| | | comma_first: false, |
| | | e4x: true, |
| | | indent_empty_lines: true |
| | | indent_empty_lines: true, |
| | | }, |
| | | js: { |
| | | indent_size: '2', |
| | | indent_char: ' ', |
| | | max_preserve_newlines: '-1', |
| | | indent_size: "2", |
| | | indent_char: " ", |
| | | max_preserve_newlines: "-1", |
| | | preserve_newlines: false, |
| | | keep_array_indentation: false, |
| | | break_chained_methods: false, |
| | | indent_scripts: 'normal', |
| | | brace_style: 'end-expand', |
| | | indent_scripts: "normal", |
| | | brace_style: "end-expand", |
| | | space_before_conditional: true, |
| | | unescape_strings: false, |
| | | jslint_happy: true, |
| | | end_with_newline: true, |
| | | wrap_line_length: '110', |
| | | wrap_line_length: "110", |
| | | indent_inner_html: true, |
| | | comma_first: false, |
| | | e4x: true, |
| | | indent_empty_lines: true |
| | | } |
| | | } |
| | | indent_empty_lines: true, |
| | | }, |
| | | }; |
| | | |
| | | // é¦åæ¯å¤§å° |
| | | export function titleCase(str) { |
| | | return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) |
| | | return str.replace(/( |^)[a-z]/g, (L) => L.toUpperCase()); |
| | | } |
| | | |
| | | // ä¸å转驼峰 |
| | | export function camelCase(str) { |
| | | return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase()) |
| | | return str.replace(/_[a-z]/g, (str1) => str1.substr(-1).toUpperCase()); |
| | | } |
| | | |
| | | export function isNumberStr(str) { |
| | | return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) |
| | | return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str); |
| | | } |
| | | |
| | | // ä¿®æ£åå
¸ç»æ |
| | | export function dictToValue(arr) { |
| | | return arr.map((m) => { |
| | | return { |
| | | value: m.dictValue, |
| | | label: m.dictLabel, |
| | | type: m.listClass, |
| | | }; |
| | | }); |
| | | } |
| | |
| | | import axios from 'axios' |
| | | import { Notification, MessageBox, Message, Loading } from 'element-ui' |
| | | import store from '@/store' |
| | | import { getToken } from '@/utils/auth' |
| | | import errorCode from '@/utils/errorCode' |
| | | import axios from "axios"; |
| | | import { Notification, MessageBox, Message, Loading } from "element-ui"; |
| | | import store from "@/store"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import errorCode from "@/utils/errorCode"; |
| | | import { tansParams, blobValidate } from "@/utils/ruoyi"; |
| | | import cache from '@/plugins/cache' |
| | | import { saveAs } from 'file-saver' |
| | | import cache from "@/plugins/cache"; |
| | | import { saveAs } from "file-saver"; |
| | | |
| | | let downloadLoadingInstance; |
| | | // æ¯å¦æ¾ç¤ºéæ°ç»å½ |
| | | export let isRelogin = { show: false }; |
| | | |
| | | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' |
| | | axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8"; |
| | | // å建axioså®ä¾ |
| | | const service = axios.create({ |
| | | // axiosä¸è¯·æ±é
ç½®æbaseURLé项ï¼è¡¨ç¤ºè¯·æ±URLå
Œ
±é¨å |
| | | baseURL: process.env.VUE_APP_BASE_API, |
| | | // è¶
æ¶ |
| | | timeout: 10000 |
| | | }) |
| | | timeout: 10000 * 60, |
| | | }); |
| | | |
| | | // requestæ¦æªå¨ |
| | | service.interceptors.request.use(config => { |
| | | // æ¯å¦éè¦è®¾ç½® token |
| | | const isToken = (config.headers || {}).isToken === false |
| | | // æ¯å¦éè¦é²æ¢æ°æ®éå¤æäº¤ |
| | | const isRepeatSubmit = (config.headers || {}).repeatSubmit === false |
| | | if (getToken() && !isToken) { |
| | | config.headers['Authorization'] = 'Bearer ' + getToken() // 让æ¯ä¸ªè¯·æ±æºå¸¦èªå®ä¹token è¯·æ ¹æ®å®é
æ
åµèªè¡ä¿®æ¹ |
| | | } |
| | | // getè¯·æ±æ å°paramsåæ° |
| | | if (config.method === 'get' && config.params) { |
| | | let url = config.url + '?' + tansParams(config.params); |
| | | url = url.slice(0, -1); |
| | | config.params = {}; |
| | | config.url = url; |
| | | } |
| | | if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) { |
| | | const requestObj = { |
| | | url: config.url, |
| | | data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data, |
| | | time: new Date().getTime() |
| | | service.interceptors.request.use( |
| | | (config) => { |
| | | // æ¯å¦éè¦è®¾ç½® token |
| | | const isToken = (config.headers || {}).isToken === false; |
| | | // æ¯å¦éè¦é²æ¢æ°æ®éå¤æäº¤ |
| | | const isRepeatSubmit = (config.headers || {}).repeatSubmit === false; |
| | | if (getToken() && !isToken) { |
| | | config.headers["Authorization"] = "Bearer " + getToken(); // 让æ¯ä¸ªè¯·æ±æºå¸¦èªå®ä¹token è¯·æ ¹æ®å®é
æ
åµèªè¡ä¿®æ¹ |
| | | } |
| | | const requestSize = Object.keys(JSON.stringify(requestObj)).length; // è¯·æ±æ°æ®å¤§å° |
| | | const limitSize = 5 * 1024 * 1024; // éå¶åæ¾æ°æ®5M |
| | | if (requestSize >= limitSize) { |
| | | console.warn(`[${config.url}]: ` + 'è¯·æ±æ°æ®å¤§å°è¶
åºå
许ç5Méå¶ï¼æ æ³è¿è¡é²éå¤æäº¤éªè¯ã') |
| | | return config; |
| | | // getè¯·æ±æ å°paramsåæ° |
| | | if (config.method === "get" && config.params) { |
| | | let url = config.url + "?" + tansParams(config.params); |
| | | url = url.slice(0, -1); |
| | | config.params = {}; |
| | | config.url = url; |
| | | } |
| | | const sessionObj = cache.session.getJSON('sessionObj') |
| | | if (sessionObj === undefined || sessionObj === null || sessionObj === '') { |
| | | cache.session.setJSON('sessionObj', requestObj) |
| | | } else { |
| | | const s_url = sessionObj.url; // 请æ±å°å |
| | | const s_data = sessionObj.data; // è¯·æ±æ°æ® |
| | | const s_time = sessionObj.time; // è¯·æ±æ¶é´ |
| | | const interval = 1000; // é´éæ¶é´(ms)ï¼å°äºæ¤æ¶é´è§ä¸ºéå¤æäº¤ |
| | | if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) { |
| | | const message = 'æ°æ®æ£å¨å¤çï¼è¯·å¿éå¤æäº¤'; |
| | | console.warn(`[${s_url}]: ` + message) |
| | | return Promise.reject(new Error(message)) |
| | | if ( |
| | | !isRepeatSubmit && |
| | | (config.method === "post" || config.method === "put") |
| | | ) { |
| | | const requestObj = { |
| | | url: config.url, |
| | | data: |
| | | typeof config.data === "object" |
| | | ? JSON.stringify(config.data) |
| | | : config.data, |
| | | time: new Date().getTime(), |
| | | }; |
| | | const requestSize = Object.keys(JSON.stringify(requestObj)).length; // è¯·æ±æ°æ®å¤§å° |
| | | const limitSize = 5 * 1024 * 1024; // éå¶åæ¾æ°æ®5M |
| | | if (requestSize >= limitSize) { |
| | | console.warn( |
| | | `[${config.url}]: ` + |
| | | "è¯·æ±æ°æ®å¤§å°è¶
åºå
许ç5Méå¶ï¼æ æ³è¿è¡é²éå¤æäº¤éªè¯ã" |
| | | ); |
| | | return config; |
| | | } |
| | | const sessionObj = cache.session.getJSON("sessionObj"); |
| | | if ( |
| | | sessionObj === undefined || |
| | | sessionObj === null || |
| | | sessionObj === "" |
| | | ) { |
| | | cache.session.setJSON("sessionObj", requestObj); |
| | | } else { |
| | | cache.session.setJSON('sessionObj', requestObj) |
| | | const s_url = sessionObj.url; // 请æ±å°å |
| | | const s_data = sessionObj.data; // è¯·æ±æ°æ® |
| | | const s_time = sessionObj.time; // è¯·æ±æ¶é´ |
| | | const interval = 1000; // é´éæ¶é´(ms)ï¼å°äºæ¤æ¶é´è§ä¸ºéå¤æäº¤ |
| | | if ( |
| | | s_data === requestObj.data && |
| | | requestObj.time - s_time < interval && |
| | | s_url === requestObj.url |
| | | ) { |
| | | const message = "æ°æ®æ£å¨å¤çï¼è¯·å¿éå¤æäº¤"; |
| | | console.warn(`[${s_url}]: ` + message); |
| | | return Promise.reject(new Error(message)); |
| | | } else { |
| | | cache.session.setJSON("sessionObj", requestObj); |
| | | } |
| | | } |
| | | } |
| | | return config; |
| | | }, |
| | | (error) => { |
| | | console.log(error); |
| | | Promise.reject(error); |
| | | } |
| | | return config |
| | | }, error => { |
| | | console.log(error) |
| | | Promise.reject(error) |
| | | }) |
| | | ); |
| | | |
| | | // ååºæ¦æªå¨ |
| | | service.interceptors.response.use(res => { |
| | | service.interceptors.response.use( |
| | | (res) => { |
| | | // æªè®¾ç½®ç¶æç åé»è®¤æåç¶æ |
| | | const code = res.data.code || 200; |
| | | // è·åéè¯¯ä¿¡æ¯ |
| | | const msg = errorCode[code] || res.data.msg || errorCode['default'] |
| | | const msg = errorCode[code] || res.data.msg || errorCode["default"]; |
| | | // äºè¿å¶æ°æ®åç´æ¥è¿å |
| | | if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { |
| | | return res.data |
| | | if ( |
| | | res.request.responseType === "blob" || |
| | | res.request.responseType === "arraybuffer" |
| | | ) { |
| | | return res.data; |
| | | } |
| | | if (code === 401) { |
| | | if (!isRelogin.show) { |
| | | isRelogin.show = true; |
| | | MessageBox.confirm('ç»å½ç¶æå·²è¿æï¼æ¨å¯ä»¥ç»§ç»çå¨è¯¥é¡µé¢ï¼æè
éæ°ç»å½', 'ç³»ç»æç¤º', { confirmButtonText: 'éæ°ç»å½', cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { |
| | | isRelogin.show = false; |
| | | store.dispatch('LogOut').then(() => { |
| | | location.href = '/index'; |
| | | MessageBox.confirm( |
| | | "ç»å½ç¶æå·²è¿æï¼æ¨å¯ä»¥ç»§ç»çå¨è¯¥é¡µé¢ï¼æè
éæ°ç»å½", |
| | | "ç³»ç»æç¤º", |
| | | { |
| | | confirmButtonText: "éæ°ç»å½", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | isRelogin.show = false; |
| | | store.dispatch("LogOut").then(() => { |
| | | location.href = "/index"; |
| | | }); |
| | | }) |
| | | }).catch(() => { |
| | | isRelogin.show = false; |
| | | }); |
| | | } |
| | | return Promise.reject('æ æçä¼è¯ï¼æè
ä¼è¯å·²è¿æï¼è¯·éæ°ç»å½ã') |
| | | .catch(() => { |
| | | isRelogin.show = false; |
| | | }); |
| | | } |
| | | return Promise.reject("æ æçä¼è¯ï¼æè
ä¼è¯å·²è¿æï¼è¯·éæ°ç»å½ã"); |
| | | } else if (code === 500) { |
| | | Message({ message: msg, type: 'error' }) |
| | | return Promise.reject(new Error(msg)) |
| | | Message({ message: msg, type: "error" }); |
| | | return Promise.reject(new Error(msg)); |
| | | } else if (code === 601) { |
| | | Message({ message: msg, type: 'warning' }) |
| | | return Promise.reject('error') |
| | | Message({ message: msg, type: "warning" }); |
| | | return Promise.reject("error"); |
| | | } else if (code !== 200) { |
| | | Notification.error({ title: msg }) |
| | | return Promise.reject('error') |
| | | Notification.error({ title: msg }); |
| | | return Promise.reject("error"); |
| | | } else { |
| | | return res.data |
| | | return res.data; |
| | | } |
| | | }, |
| | | error => { |
| | | console.log('err' + error) |
| | | (error) => { |
| | | console.log("err" + error); |
| | | let { message } = error; |
| | | if (message == "Network Error") { |
| | | message = "å端æ¥å£è¿æ¥å¼å¸¸"; |
| | |
| | | } else if (message.includes("Request failed with status code")) { |
| | | message = "ç³»ç»æ¥å£" + message.substr(message.length - 3) + "å¼å¸¸"; |
| | | } |
| | | Message({ message: message, type: 'error', duration: 5 * 1000 }) |
| | | return Promise.reject(error) |
| | | Message({ message: message, type: "error", duration: 5 * 1000 }); |
| | | return Promise.reject(error); |
| | | } |
| | | ) |
| | | ); |
| | | |
| | | // éç¨ä¸è½½æ¹æ³ |
| | | export function download(url, params, filename, config) { |
| | | downloadLoadingInstance = Loading.service({ text: "æ£å¨ä¸è½½æ°æ®ï¼è¯·ç¨å", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", }) |
| | | return service.post(url, params, { |
| | | transformRequest: [(params) => { return tansParams(params) }], |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
| | | responseType: 'blob', |
| | | ...config |
| | | }).then(async (data) => { |
| | | const isBlob = blobValidate(data); |
| | | if (isBlob) { |
| | | const blob = new Blob([data]) |
| | | saveAs(blob, filename) |
| | | } else { |
| | | const resText = await data.text(); |
| | | const rspObj = JSON.parse(resText); |
| | | const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] |
| | | Message.error(errMsg); |
| | | } |
| | | downloadLoadingInstance.close(); |
| | | }).catch((r) => { |
| | | console.error(r) |
| | | Message.error('ä¸è½½æä»¶åºç°é误ï¼è¯·è系管çåï¼') |
| | | downloadLoadingInstance.close(); |
| | | }) |
| | | downloadLoadingInstance = Loading.service({ |
| | | text: "æ£å¨ä¸è½½æ°æ®ï¼è¯·ç¨å", |
| | | spinner: "el-icon-loading", |
| | | background: "rgba(0, 0, 0, 0.7)", |
| | | }); |
| | | return service |
| | | .post(url, params, { |
| | | transformRequest: [ |
| | | (params) => { |
| | | return tansParams(params); |
| | | }, |
| | | ], |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | responseType: "blob", |
| | | ...config, |
| | | }) |
| | | .then(async (data) => { |
| | | const isBlob = blobValidate(data); |
| | | if (isBlob) { |
| | | const blob = new Blob([data]); |
| | | saveAs(blob, filename); |
| | | } else { |
| | | const resText = await data.text(); |
| | | const rspObj = JSON.parse(resText); |
| | | const errMsg = |
| | | errorCode[rspObj.code] || rspObj.msg || errorCode["default"]; |
| | | Message.error(errMsg); |
| | | } |
| | | downloadLoadingInstance.close(); |
| | | }) |
| | | .catch((r) => { |
| | | console.error(r); |
| | | Message.error("ä¸è½½æä»¶åºç°é误ï¼è¯·è系管çåï¼"); |
| | | downloadLoadingInstance.close(); |
| | | }); |
| | | } |
| | | |
| | | export default service |
| | | export default service; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="{ superviseDetailsCorrectId: info.superviseDetailsCorrectId }" :headers="uploadHeader" |
| | | :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> |
| | | <el-button size="small" style="height: 38px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <div> |
| | | <limsTable ref="yearTable" :column="columnData" :height="'calc(100vh - 30em)'" :highlightCurrentRow="true" |
| | | :table-data="tableData" :table-loading="tableLoading" style="margin-top: 0.5em;"> |
| | | </limsTable> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.fileUrl" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | getSuperviseDetailCorrectFileList, |
| | | delSuperviseDetailCorrectFile, |
| | | } from '@/api/cnas/systemManagement/correctiveAction.js' |
| | | export default { |
| | | name: 'ViewTestRecord', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { filePreview, 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.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 |
| | | getSuperviseDetailCorrectFileList({ superviseDetailsCorrectId: this.info.superviseDetailsCorrectId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | 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 |
| | | this.$download.saveAs(url, row.fileName); |
| | | } else { |
| | | url = this.javaApi + '/word/' + row.fileUrl |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | }, |
| | | // å é¤ |
| | | delete(row) { |
| | | this.tableLoading = true |
| | | delSuperviseDetailCorrectFile({ superviseDetailsCorrectFileId: row.superviseDetailsCorrectFileId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | 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 + '/qualitySupervise/uploadSuperviseDetailCorrectFile' |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="çº æ£æªæ½å¤çå" |
| | | width="60%" @close="closeProcessingDia"> |
| | | <div style="height: 660px; overflow-y: auto"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>å¹è®è®¡åï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-select v-model="form.personTrainingDetailedId" clearable filterable style="width: 100%" disabled |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="item in yearTrainingDetailed" :key="item.id" :label="item.trainingObjectives" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>ä¸åæ ¼æå离äºå®çæè¿°ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.raiseResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æåºäººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.raiseUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æåºé¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.raiseDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.raiseTime }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>åå åæï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.causeResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>åå åæäººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.causeUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.causeDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>åå åææ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.causeTime }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>çº æ£æªæ½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.correctResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æåºè¦æ±é¨é¨ç¡®è®¤ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.raiseDepartmentAffirm }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>çº æ£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.correctUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.correctDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>çº æ£æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.correctTime }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>宿½éªè¯ç»æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.validationResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>éªè¯äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.validationUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.validationDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>éªè¯æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.validationTime }} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getSuperviseDetailCorrect, |
| | | getThisYearTrainingDetailed, |
| | | } from '@/api/cnas/systemManagement/correctiveAction.js' |
| | | export default { |
| | | name: 'correctiveInfo', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | yearTrainingDetailed: [], |
| | | form: { |
| | | superviseDetailsId: '', |
| | | raiseResult: '', |
| | | vdeRaiseResult: '', |
| | | causeUserId: '', |
| | | raiseUserName: '', |
| | | raiseDepartment: '', |
| | | raiseTime: '', |
| | | causeResult: '', |
| | | causeUserName: '', |
| | | causeDepartment: '', |
| | | causeTime: '', |
| | | correctUserId: '', |
| | | correctResult: '', |
| | | raiseDepartmentAffirm: '', |
| | | correctUserName: '', |
| | | correctDepartment: '', |
| | | correctTime: '', |
| | | validationUserId: '', |
| | | validationResult: '', |
| | | validationUserName: '', |
| | | validationDepartment: '', |
| | | validationTime: '', |
| | | }, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.getYearTrainingDetailed() // è·åå¹è®è®¡å |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | getSuperviseDetailCorrect({ superviseDetailsId: row.superviseDetailsId }).then(res => { |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | getYearTrainingDetailed() { |
| | | getThisYearTrainingDetailed().then(res => { |
| | | this.yearTrainingDetailed = res.data |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeProcessingDia() { |
| | | this.formDia = false |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 5vh auto 50px !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info { |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info1 { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 150px">ä¸åæ ¼æè¿°ï¼</span> |
| | | <el-input v-model="searchForm.raiseResult" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="small" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <div> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 17em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination" |
| | | :page="page"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | <corrective-info v-if="correctiveInfo" ref="correctiveInfo"></corrective-info> |
| | | <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import CorrectiveInfo from './components/correctiveInfo.vue'; |
| | | // import QualityInfo from '../do/a7-nonconforming-item/qualityInfo.vue'; |
| | | import ViewTestRecord from './components/ViewTestRecord.vue'; |
| | | import { |
| | | pageSuperviseDetailCorrect, |
| | | exportSuperviseDetaillCorrect, |
| | | } from '@/api/cnas/systemManagement/correctiveAction.js' |
| | | |
| | | export default { |
| | | name: 'a8-corrective-action', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { |
| | | // QualityInfo, |
| | | CorrectiveInfo, |
| | | limsTable, |
| | | TableCard, |
| | | ViewTestRecord |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | raiseResult: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'ä¸åæ ¼æå离äºå®çæè¿°', |
| | | prop: 'raiseResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åå åæ', |
| | | prop: 'causeResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'çº æ£æªæ½', |
| | | prop: 'correctResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '宿½éªè¯ç»æ', |
| | | prop: 'validationResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '60', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewInfo(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¥çéä»¶', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewFiles(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | correctiveInfo: false, |
| | | viewTestRecordDialog: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = { |
| | | raiseResult: this.searchForm.raiseResult, |
| | | } |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageSuperviseDetailCorrect({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportSuperviseDetaillCorrect({ superviseDetailsCorrectId: row.superviseDetailsCorrectId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'çç£çº æ£æªæ½' + '.docx'); |
| | | }) |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.raiseResult = ''; |
| | | this.searchList() |
| | | }, |
| | | // æ¥ç详æ
|
| | | viewInfo(row) { |
| | | this.correctiveInfo = true |
| | | this.$nextTick(() => { |
| | | this.$refs.correctiveInfo.openDia(row) |
| | | }) |
| | | }, |
| | | // æ¥çéä»¶ |
| | | viewFiles(row) { |
| | | this.viewTestRecordDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.viewTestRecordDialog.openDia(row) |
| | | }) |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .view-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 60px; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | .search-background { |
| | | width: 100%; |
| | | height: 80px; |
| | | line-height: 80px; |
| | | background-color: #ffffff; |
| | | display: flex; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | |
| | | .table { |
| | | background-color: #ffffff; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div>客æ·åºæ¬ä¿¡æ¯ç®¡ç</div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="å®¢æ·æ»¡æåº¦è°æ¥è¡¨" |
| | | width="70%" @close="closeFormDia"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>åä½åç§°ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.unitName" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-date-picker v-model="form.fillDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>å§åï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-model="form.userName" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-model="form.department" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>èç³»çµè¯ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-model="form.contactNumber" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æå¡æåº¦ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.serviceAttitude" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.serviceAttitudeSuggestion" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>ææ¯è½åï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.technicalCompetence" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.technicalCompetenceSuggestion" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ£æµå·¥ä½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.inspectionWork" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.inspectionWorkSuggestion" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¶è´¹åçæ§ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.reasonableFees" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.reasonableFeesSuggestion" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¨å¯¹æä»¬ç叿ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="5"> |
| | | <el-input v-model="form.remark" :rows="4" placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeFormDia">å æ¶</el-button> |
| | | <el-button :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addClientSatisfaction, |
| | | updateClientSatisfaction |
| | | } from '@/api/cnas/systemManagement/customerSatisfaction.js' |
| | | export default { |
| | | name: 'formDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | unitName: '', |
| | | fillDate: '', |
| | | userName: '', |
| | | department: '', |
| | | contactNumber: '', |
| | | serviceAttitude: '', |
| | | technicalCompetence: '', |
| | | technicalCompetenceSuggestion: '', |
| | | inspectionWork: '', |
| | | inspectionWorkSuggestion: '', |
| | | reasonableFees: '', |
| | | reasonableFeesSuggestion: '', |
| | | remark: '', |
| | | clientSatisfactionId: '', |
| | | }, |
| | | operationType: '', |
| | | editLoad: false, |
| | | |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(type, row) { |
| | | this.formDia = true; |
| | | this.operationType = type |
| | | if (this.operationType === 'edit') { |
| | | this.form = { ...row } |
| | | } |
| | | }, |
| | | handleEdit() { |
| | | if (!this.form.unitName) { |
| | | this.$message.warning('请填ååä½åç§°') |
| | | return |
| | | } |
| | | if (!this.form.department) { |
| | | this.$message.warning('请填åé¨é¨') |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | if (this.operationType === 'add') { |
| | | addClientSatisfaction(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeFormDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | updateClientSatisfaction(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeFormDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } |
| | | }, |
| | | closeFormDia() { |
| | | this.formDia = false; |
| | | this.$emit('closeFormDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 10vh auto 50px !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info { |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info1 { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span v-if="tabIndex === '0'" class="search-group"> |
| | | <span style="width: 150px">åä½åç§°ï¼</span> |
| | | <el-input v-model="searchForm.unitName" clearable size="small"></el-input> |
| | | </span> |
| | | <span v-if="tabIndex === '1'" class="search-group"> |
| | | <span style="width: 150px">æä»¶åç§°ï¼</span> |
| | | <el-input v-model="searchForm1.fileName" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="small" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <div class="btn"> |
| | | <el-button v-if="tabIndex === '0'" size="small" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | <el-upload v-if="tabIndex === '1'" ref='upload' :action="action" :before-upload="beforeUpload" |
| | | :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'> |
| | | <el-button :loading="upLoading" size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <div class="table-tab"> |
| | | <el-radio-group v-model="tabIndex" @change="searchList" size="small"> |
| | | <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> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 22em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination" |
| | | :page="page"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div v-if="tabIndex === '1'"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <limsTable :column="tableColumn1" :height="'calc(100vh - 22em)'" :table-data="tableData1" |
| | | :table-loading="tableLoading1" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination0"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.fileUrl" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | <FormDialog v-if="formDialog" ref="formDialog" @closeFormDia="closeFormDia"></FormDialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import FormDialog from './components/formDialog.vue'; |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | pageClientSatisfaction, |
| | | pageAnalyseFile, |
| | | delClientSatisfaction, |
| | | delAnalyseFile, |
| | | } from '@/api/cnas/systemManagement/customerSatisfaction.js' |
| | | |
| | | export default { |
| | | name: 'a8-customer-satisfaction', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { filePreview, FormDialog, limsTable, TableCard }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | unitName: '', |
| | | }, |
| | | searchForm1: { |
| | | fileName: '', |
| | | }, |
| | | tabIndex: '0', |
| | | tableColumn: [ |
| | | { |
| | | label: 'åä½åç§°', |
| | | prop: 'unitName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ¥æ', |
| | | prop: 'fillDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å§å', |
| | | prop: 'userName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'é¨é¨', |
| | | prop: 'department', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'èç³»çµè¯', |
| | | prop: 'contactNumber', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '80', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | tableColumn1: [ |
| | | { |
| | | label: 'éä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | | prop: 'userName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '50', |
| | | label: 'æä½', |
| | | 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.delFile(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | page1: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | formDialog: false, |
| | | upLoading: false, |
| | | currentInfo: {}, |
| | | lookDialogVisible: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = this.tabIndex === '0' ? this.searchForm : this.searchForm1 |
| | | const page = this.tabIndex === '0' ? this.page : this.page1 |
| | | if (this.tabIndex === '0') { |
| | | this.tableLoading = true |
| | | pageClientSatisfaction({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | } else { |
| | | this.tableLoading1 = true |
| | | pageAnalyseFile({ ...entity, ...page }).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 201) return |
| | | this.tableData1 = res.data.records |
| | | this.page1.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading1 = false |
| | | }) |
| | | } |
| | | }, |
| | | openFormDia(type, row) { |
| | | this.formDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDialog.openDia(type, row); |
| | | }) |
| | | }, |
| | | closeFormDia() { |
| | | this.formDialog = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.unitName = ''; |
| | | this.searchForm1.fileName = ''; |
| | | this.searchList() |
| | | }, |
| | | // 导å
¥æµç¨ |
| | | 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() |
| | | } |
| | | }, |
| | | // å é¤å®¢æ·æ»¡æåº¦ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delClientSatisfaction({ clientSatisfactionId: row.clientSatisfactionId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row) { |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | // ä¸è½½å®¢æ·ç¦å»º |
| | | upload(row) { |
| | | let url = ''; |
| | | if (row.type == 1) { |
| | | url = this.javaApi + '/img/' + row.fileUrl |
| | | this.$download.saveAs(url, row.fileName); |
| | | } else { |
| | | url = this.javaApi + '/word/' + row.fileUrl |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | }, |
| | | // å é¤å®¢æ·åæéä»¶ |
| | | delFile(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delAnalyseFile({ analyseFileId: row.analyseFileId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å页 |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | // å页 |
| | | pagination0({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/clientSatisfaction/uploadAnalyseFile' |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .view-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 60px; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | .search-background { |
| | | width: 100%; |
| | | height: 80px; |
| | | line-height: 80px; |
| | | background-color: #ffffff; |
| | | display: flex; |
| | | position: relative; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | |
| | | .table { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .table-tab { |
| | | margin: 0 20px 20px 20px; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | top: 16px; |
| | | right: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶åæ§ç³è¯· --> |
| | | <div class="controlled-file-application" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç³è¯·æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <!-- <div class="search_thing"> |
| | | <div class="search_label">ç³è¯·äººï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="queryParams.createUserName" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> --> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns" style="padding-left: 30px;"> |
| | | <el-button size="small" type="primary" |
| | | @click="addDialogVisible = true, addInfo = {}, file = null">æä»¶åæ§ç³è¯·</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog title="æä»¶åæ§ç³è¯·" :visible.sync="addDialogVisible" width="800px" top="10vh"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>ç³è¯·ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.documentCode"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">责任人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.dutyUser" size="small" style="width: 100%;" filterable> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç±»å«ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.type" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in fileType" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.name"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶çæ¬ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.version"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¸ä¼ éä»¶ï¼</div> |
| | | <div class="search_input"><el-upload style="margin: 8px 0 0px 50px;" action="#" :auto-upload="false" |
| | | :multiple="false" accept='.pdf' :on-change="handleChangeUpload" v-if="addDialogVisible"> |
| | | <el-button size="small" type="primary">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä½è
ï¼</div> |
| | | <div class="search_input"> |
| | | <!-- <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.writer"></el-input> --> |
| | | <el-select v-model="addInfo.writer" size="small" style="width: 100%;" filterable> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.label"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æäº¤æ¥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.submitDate" type="date" size="small" placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">说æï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.instructions" |
| | | type="textarea" :rows="2"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æ¥çéä»¶" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | <el-dialog title="å®¡æ ¸" :visible.sync="checkDialogVisible" width="1000px" top="5vh"> |
| | | <UpPdfStamp ref="UpPdfStamp" v-if="checkDialogVisible" @uploadPDF="uploadPDF" :isUpFile="false"></UpPdfStamp> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleCheckSub('ä¸éè¿')" :loading="noCheckLoading">ä¸éè¿</el-button> |
| | | <el-button type="primary" @click="handleCheckSub('éè¿')" :loading="checkLoading">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="éæ©åæ§ç« " :visible.sync="checkStampDialogVisible" width="600px" top="5vh"> |
| | | <div class="stamp-list"> |
| | | <img :src="require('@/assets/stamps/' + item + '.png')" alt="" v-for="(item, index) in stampsList" :key="index" |
| | | style="width: 120px;height: 80px;margin: 6px;" class="stamp" :class="{ active: currentStamp == item }" |
| | | @click="currentStamp = item"> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="checkStampDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleCheck0(currentInfo)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import UpPdfStamp from '@/components/UpPdfStamp/index.vue' |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | addManageDocumentControlled, |
| | | doManageDocumentControlled, |
| | | checkManageDocumentControlledPdf, |
| | | delManageDocumentControlled, |
| | | pageManageDocumentControlled, |
| | | checkManageDocumentControlled, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | filePreview, |
| | | UpPdfStamp, |
| | | limsTable |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | upLoading: false, |
| | | addPower: false, |
| | | addDialogVisible: false, |
| | | addLoading: false, |
| | | lookDialogVisible: false, |
| | | checkDialogVisible: false, |
| | | checkStampDialogVisible: false, |
| | | addInfo: {}, |
| | | personList: [], |
| | | fileType: [], |
| | | file: null, |
| | | currentInfo: {}, |
| | | checkLoading: false, |
| | | noCheckLoading: false, |
| | | type: '', |
| | | stampsList: ['主任', 'è´¨éè´è´£äºº', 'ææ¯è´è´£äºº', '综å室', 'éä¿¡', 'çµå', 'è£
å¤', 'å¨è½', 'å°é¢'], |
| | | currentStamp: '主任', |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "ç³è¯·æä»¶ç¼å·", prop: "documentCode" }, |
| | | { |
| | | label: "æä»¶ç±»å«", prop: "type", width: "120px", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.fileType.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.fileType.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { |
| | | label: "ç³è¯·äºº", |
| | | prop: "createUserName", |
| | | }, |
| | | { label: "ç³è¯·æ¶é´", prop: "createTime" }, |
| | | { label: "说æ", prop: "instructions" }, |
| | | { label: "æäº¤æ¥æ", prop: "submitDate" }, |
| | | { label: "责任人", prop: "dutyUserName" }, |
| | | { |
| | | label: "ç³è¯·ç¶æ", prop: "state", dataType: "tag", |
| | | formatData: (params) => { |
| | | return params; |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 'éè¿') { |
| | | return 'success' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleUpdate(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.state == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.dutyUserName.includes(this.nickName) || row.state == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¥çéä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.state == 'éè¿' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | this.getAuthorizedPerson() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageDocumentControlled({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let del = false |
| | | let add = false |
| | | // let check = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageDocumentControlled') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addManageDocumentControlled') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageDocumentControlled') { |
| | | del = true |
| | | } |
| | | // if (power[i].menuMethod == 'checkManageDocumentControlled') { |
| | | // check = true |
| | | // } |
| | | } |
| | | // if (!check) { |
| | | // this.componentData.do.splice(2, 1) |
| | | // } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | selectEnumByCategory() { |
| | | // æä»¶ç±»å« |
| | | this.getDicts("document_type").then((response) => { |
| | | this.fileType = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // æäº¤ |
| | | handleAdd() { |
| | | if (!this.addInfo.documentCode) return this.$message({ type: 'error', message: "请è¾å
¥ç¼å·" }) |
| | | if (!this.addInfo.id) { |
| | | // æ°å¢ |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if (this.file) { |
| | | fd.append("file", this.file.raw); |
| | | } |
| | | for (let m in this.addInfo) { |
| | | fd.append(m, this.addInfo[m]) |
| | | } |
| | | this.addLoading = true |
| | | addManageDocumentControlled(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ·»å æå' |
| | | }) |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ·»å 失败' |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | // ä¿®æ¹ |
| | | let { id, documentCode, dutyUser, type, name, version, writer, submitDate, instructions } = this.addInfo |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if (this.file) { |
| | | fd.append("file", this.file.raw); |
| | | } |
| | | fd.append("id", id); |
| | | fd.append("documentCode", documentCode); |
| | | fd.append("dutyUser", dutyUser); |
| | | fd.append("type", type); |
| | | fd.append("name", name); |
| | | fd.append("version", version); |
| | | fd.append("writer", writer); |
| | | fd.append("submitDate", submitDate); |
| | | fd.append("instructions", instructions); |
| | | this.addLoading = true |
| | | doManageDocumentControlled(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ·»å 失败' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | handleChangeUpload(file, fileLists) { |
| | | this.file = file |
| | | this.$set(this.addInfo, 'name', file.name) |
| | | }, |
| | | // ç¼è¾ |
| | | handleUpdate(row) { |
| | | this.title = 'æä»¶åæ´ç³è¯·' |
| | | this.addInfo = this.HaveJson(row) |
| | | this.addDialogVisible = true |
| | | }, |
| | | // æ¥çéä»¶ |
| | | handleLook(row) { |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | | this.title = 'å®¡æ ¸' |
| | | this.currentInfo = row |
| | | if (!row.url) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | this.checkStampDialogVisible = true |
| | | }, |
| | | handleCheck0(row) { |
| | | this.checkStampDialogVisible = false |
| | | this.checkDialogVisible = true |
| | | checkManageDocumentControlledPdf({ id: row.id }).then(res => { |
| | | const blob = new Blob([res]); |
| | | const file = new File([blob], row.name, { type: 'application/pdf' }) |
| | | this.$refs.UpPdfStamp.lookFile(file, this.currentStamp) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | handleDown(row) { |
| | | if (!row.url) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, row.url); |
| | | }, |
| | | async uploadPDF(pdfBlob) { |
| | | const formData = new FormData(); |
| | | formData.append('file', pdfBlob, this.fileName + '.pdf'); // æä»¶å段 |
| | | formData.append('id', this.currentInfo.id); // æä»¶ååæ®µ |
| | | formData.append('state', this.type); // æä»¶ååæ®µ |
| | | formData.append('writer', this.currentInfo.writer); // æä»¶ååæ®µ |
| | | |
| | | try { |
| | | let res = await checkManageDocumentControlled(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'æä½æå', type: 'success' }); |
| | | this.checkDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: 'æä½å¤±è´¥', type: 'error' }); |
| | | return false |
| | | } |
| | | } catch (e) { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | } |
| | | |
| | | |
| | | }, |
| | | handleCheckSub(type) { |
| | | this.type = type |
| | | if (type == 'éè¿') { |
| | | this.checkLoading = true |
| | | } else { |
| | | this.noCheckLoading = true |
| | | } |
| | | this.addLoading = true |
| | | this.$refs['UpPdfStamp'].generatePDF() |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageDocumentControlled({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | |
| | | .stamp { |
| | | cursor: pointer; |
| | | border: #fff 1px solid; |
| | | } |
| | | |
| | | .stamp:hover { |
| | | border: #3A7BFA 1px solid; |
| | | box-shadow: inset 0px 0px 15px #3A7BFA; |
| | | } |
| | | |
| | | .stamp.active { |
| | | border: #3A7BFA 1px solid; |
| | | box-shadow: inset 0px 0px 15px #3A7BFA; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- åæ¾åæ¶è®°å½ --> |
| | | <div class="distribution-collection-record" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="queryParams.documentCode" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input v-model="queryParams.name" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns" style="padding-left: 30px;"> |
| | | <el-button v-if="addPower" size="small" type="primary" |
| | | @click="addDialogVisible = true, addInfo = {}, radio = 'åæ¾'">æ·»å åæ¾è®°å½</el-button> |
| | | <el-button v-if="outPower" :loading="outLoading" size="small" type="primary" @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="'æ·»å ' + radio + 'è®°å½'" :visible.sync="addDialogVisible" top="10vh" width="800px"> |
| | | <el-row v-if="addDialogVisible"> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>ç³è¯·ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" :disabled="radio == 'åæ¶'" allow-create clearable filterable |
| | | size="small" style="width: 100%;" @change="changeFileList"> |
| | | <el-option v-for="item in fileList" :key="item.documentCode" :label="item.documentCode" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-if="radio == 'åæ¾'" :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>åæ¾äººï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.issueUser" filterable size="small" style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-else :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>åæ¶äººï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.recycleUser" filterable size="small" style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>审æ¹äººï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.receiveUser" :disabled="radio != 'åæ¾'" filterable size="small" |
| | | style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.name" :disabled="radio == 'åæ¶'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶çæ¬ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.version" :disabled="radio == 'åæ¶'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¶æï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.state" :disabled="radio == 'åæ¶'" size="small" style="width: 100%;"> |
| | | <el-option v-for="(item, index) in fileState" :key="index" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-if="radio == 'åæ¾'" :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åæ¾ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.issueCode" clearable placeholder="请è¾å
¥" |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-else :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åæ¶ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.recycleCode" clearable placeholder="请è¾å
¥" |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-if="radio == 'åæ¾'" :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åæ¾æ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.issueDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 100%;" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-else :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åæ¶æ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.recycleDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 100%;" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-if="radio == 'åæ¾'" :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åæ¾è¯´æï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.issueNote" :rows="2" clearable placeholder="请è¾å
¥" |
| | | size="small" type="textarea"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-else :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åæ¶è¯´æï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.recycleNote" :rows="2" clearable placeholder="请è¾å
¥" |
| | | size="small" type="textarea"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-if="radio == 'åæ¾'" :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¸ä¼ éä»¶ï¼</div> |
| | | <div class="search_input"><el-upload :auto-upload="false" :multiple="false" :on-change="handleChangeUpload" |
| | | accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;"> |
| | | <el-button size="small" type="primary">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button :loading="addLoading" type="primary" @click="handleAdd">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.url" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | pageManageDocumentList, |
| | | pageManageDocumentCancel, |
| | | exportManageDocumentIssueRecycle, |
| | | addManageDocumentIssueRecycle, |
| | | doManageDocumentIssueRecycle, |
| | | checkManageDocumentIssueRecycle, |
| | | pageManageDocumentIssueRecycle, |
| | | delManageDocumentIssueRecycle, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | filePreview, |
| | | limsTable |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | ddPower: false, |
| | | outPower: true, |
| | | addInfo: {}, |
| | | addPower: true, |
| | | addLoading: false, |
| | | addDialogVisible: false, |
| | | outLoading: false, |
| | | personList: [], |
| | | fileList: [], |
| | | fileList0: [], |
| | | radio: 'åæ¾', |
| | | fileState: [], |
| | | file: null, |
| | | currentInfo: {}, |
| | | lookDialogVisible: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶ç¼å·", prop: "documentCode" }, |
| | | { label: "æä»¶åç§°", prop: "name" }, |
| | | { |
| | | label: "æä»¶çæ¬", |
| | | prop: "version", |
| | | }, |
| | | { label: "æä»¶ç¶æ", prop: "documentState" }, |
| | | { label: "åæ¾ç¼å·", prop: "issueCode" }, |
| | | { label: "åæ¾äºº", prop: "issueUserName" }, |
| | | { label: "åæ¾æ¥æ", prop: "issueDate" }, |
| | | { label: "åæ¶äºº", prop: "recycleUserName" }, |
| | | { label: "åæ¶æ¥æ", prop: "recycleDate" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "åæ¶è®°å½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleUpdate(row); |
| | | } |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | return row.documentState == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¥çéä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | return row.receiveUser != this.userId || row.documentState == 'éè¿' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | this.getAuthorizedPerson() |
| | | this.getFileList() |
| | | this.getFileList0() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let out = false |
| | | let del = false |
| | | let add = false |
| | | // let check = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'exportManageDocumentIssueRecycle') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'addManageDocumentIssueRecycle') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageDocumentIssueRecycle') { |
| | | del = true |
| | | } |
| | | // if (power[i].menuMethod == 'checkManageDocumentControlled') { |
| | | // check = true |
| | | // } |
| | | } |
| | | // if (!check) { |
| | | // this.componentData.do.splice(2, 1) |
| | | // } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageDocumentIssueRecycle({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | selectEnumByCategory() { |
| | | // æä»¶ç¶æ |
| | | this.getDicts("document_state").then((response) => { |
| | | this.fileState = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // è·å人åå表 |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList() { |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.records |
| | | }).catch(err => { }) |
| | | }, |
| | | // è·åæä»¶å表--ä½åºæä»¶ |
| | | getFileList0() { |
| | | pageManageDocumentCancel({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList0 = res.data.records |
| | | }).catch(err => { }) |
| | | }, |
| | | // å¯¼åº |
| | | handleOut() { |
| | | this.outLoading = true |
| | | // queryParams |
| | | exportManageDocumentIssueRecycle(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'åæ¾åæ¶è®°å½.xlsx'); |
| | | }) |
| | | }, |
| | | changeFileList(e) { |
| | | if (e) { |
| | | let obj = this.fileList.find(a => a.documentCode == e) |
| | | if (obj) { |
| | | this.addInfo.name = obj.name |
| | | this.addInfo.version = obj.version |
| | | this.addInfo.state = obj.state |
| | | } |
| | | } |
| | | }, |
| | | // æäº¤ |
| | | handleAdd() { |
| | | if (!this.addInfo.documentCode) { |
| | | this.$message.error('è¯·éæ©æä»¶') |
| | | return |
| | | } |
| | | if (!this.addInfo.receiveUser) { |
| | | this.$message.error('è¯·éæ©å®¡æ¹äºº') |
| | | return |
| | | } |
| | | if (this.radio == 'åæ¾') { |
| | | if (!this.addInfo.issueUser) { |
| | | this.$message.error('è¯·éæ©åæ¾äºº') |
| | | return |
| | | } |
| | | } else { |
| | | if (!this.addInfo.recycleUser) { |
| | | this.$message.error('è¯·éæ©åæ¶äºº') |
| | | return |
| | | } |
| | | } |
| | | this.addLoading = true; |
| | | if (!this.addInfo.id) { |
| | | // æ°å¢åæ¾è®°å½ |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if (this.file) { |
| | | fd.append("file", this.file.raw); |
| | | } |
| | | for (let key in this.addInfo) { |
| | | fd.append(key, this.addInfo[key]) |
| | | } |
| | | addManageDocumentIssueRecycle(fd).then(res => { |
| | | this.addLoading = false; |
| | | if (res.code == 200) { |
| | | this.$message.success('åæ¾æå') |
| | | this.addDialogVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } else { |
| | | let { documentCode, id, issueUser, recycleUser, receiveUser, name, version, documentState, issueCode, recycleCode, issueDate, recycleDate, issueNote, recycleNote } = this.addInfo |
| | | // æ·»å åæ¶è®°å½ |
| | | doManageDocumentIssueRecycle({ |
| | | documentCode, |
| | | id, |
| | | issueUser, |
| | | recycleUser, |
| | | receiveUser, |
| | | name, |
| | | version, |
| | | documentState, |
| | | issueCode, |
| | | recycleCode, |
| | | issueDate, |
| | | recycleDate, |
| | | issueNote, |
| | | recycleNote |
| | | }).then(res => { |
| | | this.addLoading = false; |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.addDialogVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // æ·»å åæ¶ |
| | | handleUpdate(row) { |
| | | this.addInfo = this.HaveJson(row) |
| | | this.radio = 'åæ¶' |
| | | this.addDialogVisible = true |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | | this.$confirm('æ¯å¦å®¡æ ¸éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | checkManageDocumentIssueRecycle({ id: row.id, documentState: 'éè¿' }).then(res => { |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | checkManageDocumentIssueRecycle({ id: row.id, documentState: 'ä¸éè¿' }).then(res => { |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handleChangeUpload(file, fileLists) { |
| | | this.file = file |
| | | this.$set(this.addInfo, 'name', file.name) |
| | | }, |
| | | // æ¥çéä»¶ |
| | | handleLook(row) { |
| | | this.currentInfo = this.HaveJson(row) |
| | | this.lookDialogVisible = true |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageDocumentIssueRecycle({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶åæ´ç³è¯· --> |
| | | <div class="file-change-request" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç³è¯·æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="queryParams.code" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" |
| | | @click="addDialogVisible = true, addInfo = {}, currentFile = {}, title = 'æä»¶åæ´ç³è¯·'">æä»¶åæ´ç³è¯·</el-button> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" top="0vh" width="950px"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>ç³è¯·ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.code" :disabled="title == 'å®¡æ ¸'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">审æ¹äººï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.checkUser" :disabled="title == 'å®¡æ ¸'" filterable size="small" |
| | | style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ææåæ´æ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.expectAlterDate" :disabled="title == 'å®¡æ ¸'" format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" size="small" style="width: 100%;" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å®é
åæ´æ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.actuallyAlterDate" :disabled="title == 'å®¡æ ¸'" format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" size="small" style="width: 100%;" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">éæ©æä»¶ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.alterBeforeCode" :disabled="title == 'å®¡æ ¸'" allow-create clearable filterable |
| | | size="small" style="width: 100%;" @change="getCurrentFile"> |
| | | <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <h4 class="title">å½åæä»¶ä¿¡æ¯</h4> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="currentFile.documentCode" :disabled="title == 'å®¡æ ¸'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input v-model="currentFile.name" :disabled="title == 'å®¡æ ¸'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">æä»¶çæ¬ï¼</div> |
| | | <div class="search_input"><el-input v-model="currentFile.version" :disabled="title == 'å®¡æ ¸'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">æäº¤äººï¼</div> |
| | | <div class="search_input"><el-select v-model="currentFile.createUser" disabled filterable size="small" |
| | | style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select></div> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">å®¡æ ¸äººï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.version" disabled></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">ä½åºäººï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.version" disabled></el-input></div> |
| | | </div> |
| | | </el-col> --> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">æäº¤æ¶é´ï¼</div> |
| | | <div class="search_input"><el-input v-model="currentFile.createTime" clearable disabled placeholder="请è¾å
¥" |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">å®¡æ ¸æ¶é´ï¼</div> |
| | | <div class="search_input"><el-input v-model="currentFile.effectiveDate" clearable disabled placeholder="请è¾å
¥" |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">ä½åºæ¶é´ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.version" disabled></el-input></div> |
| | | </div> |
| | | </el-col> --> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">æä»¶ç¶æï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="currentFile.state" disabled size="small" style="width: 100%;"> |
| | | <el-option v-for="item in fileState" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">æä»¶è¯´æï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.instructions" type="textarea" |
| | | :rows="2" disabled></el-input></div> |
| | | </div> |
| | | </el-col> --> |
| | | <el-col :span="24"> |
| | | <h4 class="title">æä»¶åæ´ç³è¯·</h4> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">åæ´åç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.alterAfterCode" :disabled="title == 'å®¡æ ¸'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">åæ´ååç§°ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.alterAfterName" :disabled="title == 'å®¡æ ¸'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">åä¸çæ¬å¤çï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.method" :disabled="title == 'å®¡æ ¸'" size="small" style="width: 100%;"> |
| | | <el-option label="ä½åº" value="ä½åº"></el-option> |
| | | <el-option label="åæ¡£ä¸å¯ç¨" value="åæ¡£ä¸å¯ç¨"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">åæ´åçæ¬ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.alterAfterVersion" :disabled="title == 'å®¡æ ¸'" clearable |
| | | placeholder="请è¾å
¥" size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="16" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">åæ´è¯´æï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.alterNote" :disabled="title == 'å®¡æ ¸'" :rows="2" |
| | | clearable placeholder="请è¾å
¥" size="small" type="textarea"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col v-if="title != 'å®¡æ ¸'" :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 100%;"> |
| | | <div class="search_label">ç¸å
³éä»¶ï¼</div> |
| | | <div class="search_input"><el-upload v-if="addDialogVisible" :auto-upload="false" :multiple="false" |
| | | :on-change="handleChangeUpload" accept='.pdf' action="#" style="margin: 8px 0 0px 50px;"> |
| | | <el-button size="small" type="primary">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload></div> |
| | | </div> |
| | | </el-col> |
| | | <UpPdfStamp v-if="title == 'å®¡æ ¸' && addDialogVisible" ref="UpPdfStamp" :isUpFile="false" @uploadPDF="uploadPDF"> |
| | | </UpPdfStamp> |
| | | </el-row> |
| | | <span v-if="title != 'å®¡æ ¸'" slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button :loading="addLoading" type="primary" @click="handleAdd">ç¡® å®</el-button> |
| | | </span> |
| | | <span v-else slot="footer" class="dialog-footer"> |
| | | <el-button :loading="noCheckLoading" @click="handleCheckSub('ä¸éè¿')">ä¸éè¿</el-button> |
| | | <el-button :loading="checkLoading" type="primary" @click="handleCheckSub('éè¿')">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.alterAfterUrl" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import UpPdfStamp from '@/components/UpPdfStamp/index.vue' |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | exportManageDocumentAlter, |
| | | pageManageDocumentList, |
| | | addManageDocumentAlter, |
| | | doManageDocumentAlter, |
| | | checkManageDocumentAlterPdf, |
| | | checkManageDocumentAlter, |
| | | delManageDocumentAlter, |
| | | pageManageDocumentAlter, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | filePreview, |
| | | UpPdfStamp, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä»¶åæ´ç³è¯·', |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | addDialogVisible: false, |
| | | addInfo: {}, |
| | | addPower: false, |
| | | outPower: false, |
| | | outLoading: false, |
| | | personList: [], |
| | | fileList: [], |
| | | currentFile: {}, |
| | | fileState: [], |
| | | file: null, |
| | | addLoading: false, |
| | | lookDialogVisible: false, |
| | | currentInfo: { |
| | | }, |
| | | type: null, |
| | | fileName: null, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "ç³è¯·ç¼å·", prop: "code" }, |
| | | { label: "ç³è¯·äºº", prop: "createUserName", width: "120px" }, |
| | | { |
| | | label: "åæ´è¯´æ", |
| | | prop: "alterNote", |
| | | }, |
| | | { label: "ææåæ´æ¶é´", prop: "expectAlterDate" }, |
| | | { label: "å®é
åæ´æ¶é´", prop: "actuallyAlterDate" }, |
| | | { |
| | | label: "ç¶æ", prop: "state", dataType: "tag", |
| | | formatData: (params) => { |
| | | return params; |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 'éè¿') { |
| | | return 'success' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleUpdate(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.state == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.state == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.checkUser != this.userId || row.state == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¥çéä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½éä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | this.getAuthorizedPerson() |
| | | this.getFileList() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let del = false |
| | | let add = false |
| | | let out = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageDocumentAlter') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addManageDocumentAlter') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageDocumentAlter') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportManageDocumentAlter') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageDocumentAlter({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | // å¯¼åº |
| | | handleOut() { |
| | | this.outLoading = true |
| | | exportManageDocumentAlter(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æä»¶åæ´è®°å½.xlsx') |
| | | }) |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList() { |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.records.map(m => { |
| | | m.title = m.documentCode + ':' + m.name |
| | | return m |
| | | }) |
| | | }).catch(err => { }) |
| | | }, |
| | | // å½åæä»¶ |
| | | getCurrentFile(e) { |
| | | this.currentFile = this.fileList.find(m => m.documentCode == e) |
| | | if (!this.currentFile) { |
| | | this.currentFile = {} |
| | | } |
| | | }, |
| | | selectEnumByCategory() { |
| | | // æä»¶ç¶æ |
| | | this.getDicts("document_state").then((response) => { |
| | | this.fileState = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | handleChangeUpload(file, fileLists) { |
| | | this.file = file |
| | | this.$set(this.addInfo, 'alterAfterName', file.name) |
| | | }, |
| | | handleAdd() { |
| | | if (!this.addInfo.code) return this.$message({ type: 'error', message: "请è¾å
¥ç³è¯·ç¼å·" }) |
| | | if (!this.addInfo.id) { |
| | | // æ°å¢ |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if (this.file) { |
| | | fd.append("file", this.file.raw); |
| | | } |
| | | for (let m in this.addInfo) { |
| | | fd.append(m, this.addInfo[m]) |
| | | } |
| | | let { name, version, documentCode } = this.currentFile; |
| | | fd.append("alterBeforeName", name); |
| | | fd.append("alterBeforeVersion", version); |
| | | // fd.append("alterBeforeCode",documentCode); |
| | | this.addLoading = true |
| | | addManageDocumentAlter(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ·»å æå' |
| | | }) |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ·»å 失败' |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | // ä¿®æ¹ |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if (this.file) { |
| | | fd.append("file", this.file.raw); |
| | | } |
| | | let { name, version } = this.currentFile; |
| | | fd.append("alterBeforeName", name); |
| | | fd.append("alterBeforeVersion", version); |
| | | let { code, checkUser, expectAlterDate, actuallyAlterDate, alterAfterCode, method, alterAfterVersion, alterNote, alterAfterName, id } = this.addInfo |
| | | fd.append("code", code); |
| | | fd.append("checkUser", checkUser); |
| | | fd.append("expectAlterDate", expectAlterDate); |
| | | fd.append("actuallyAlterDate", actuallyAlterDate); |
| | | fd.append("alterAfterCode", alterAfterCode); |
| | | fd.append("method", method); |
| | | fd.append("alterAfterVersion", alterAfterVersion); |
| | | fd.append("alterNote", alterNote); |
| | | fd.append("alterAfterName", alterAfterName); |
| | | fd.append("id", id); |
| | | this.addLoading = true |
| | | doManageDocumentAlter(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ä¿®æ¹æå' |
| | | }) |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'ä¿®æ¹å¤±è´¥' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // ç¼è¾ |
| | | handleUpdate(row) { |
| | | this.title = 'æä»¶åæ´ç³è¯·' |
| | | this.addInfo = this.HaveJson(row) |
| | | let alterBeforeCode = this.addInfo.alterBeforeCode |
| | | this.getCurrentFile(alterBeforeCode) |
| | | this.addDialogVisible = true |
| | | }, |
| | | // é¢è§ |
| | | handleLook(row) { |
| | | this.currentInfo = this.HaveJson(row) |
| | | this.lookDialogVisible = true |
| | | }, |
| | | // ä¸è½½éä»¶ |
| | | handleDown(row) { |
| | | if (!row.alterAfterUrl) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | let url = this.javaApi + '/word/' + row.alterAfterUrl |
| | | this.$download.saveAs(url, row.alterAfterUrl) |
| | | }, |
| | | // æå¼å®¡æ ¸å¼¹æ¡ |
| | | handleCheck(row) { |
| | | this.title = 'å®¡æ ¸' |
| | | this.fileName = row.alterAfterName |
| | | if (!row.alterAfterUrl) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | this.addInfo = this.HaveJson(row) |
| | | let alterBeforeCode = this.addInfo.alterBeforeCode |
| | | this.getCurrentFile(alterBeforeCode) |
| | | this.addDialogVisible = true |
| | | checkManageDocumentAlterPdf({ id: row.id }).then(res => { |
| | | // |
| | | const blob = new Blob([res]); |
| | | const file = new File([blob], row.name, { type: 'application/pdf' }) |
| | | this.$refs.UpPdfStamp.lookFile(file) |
| | | this.currentInfo = row |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // å®¡æ ¸ä¿å |
| | | async uploadPDF(pdfBlob) { |
| | | const formData = new FormData(); |
| | | formData.append('file', pdfBlob, this.fileName + '.pdf'); // æä»¶å段 |
| | | formData.append('id', this.currentInfo.id); // æä»¶ååæ®µ |
| | | formData.append('state', this.type); // æä»¶ååæ®µ |
| | | |
| | | let res = await checkManageDocumentAlter(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'æä½æå', type: 'success' }); |
| | | this.addDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: 'æä½å¤±è´¥', type: 'error' }); |
| | | return false |
| | | } |
| | | }, |
| | | // æäº¤å®¡æ ¸ |
| | | handleCheckSub(type) { |
| | | this.type = type |
| | | if (type == 'éè¿') { |
| | | this.checkLoading = true |
| | | } else { |
| | | this.noCheckLoading = true |
| | | } |
| | | this.addLoading = true |
| | | this.$refs['UpPdfStamp'].generatePDF() |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageDocumentAlter({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | |
| | | h4.title { |
| | | position: relative; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | box-sizing: border-box; |
| | | padding-left: 16px; |
| | | margin-left: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | h4.title::after { |
| | | content: ''; |
| | | width: 4px; |
| | | height: 20px; |
| | | background: #3A7BFA; |
| | | position: absolute; |
| | | top: 5px; |
| | | left: 0; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶æ¸
å --> |
| | | <div class="file-list" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.name" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¶æï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="queryParams.state" size="small" @change="refreshTable()"> |
| | | <el-option :label="item.label" :value="item.value" v-for="(item, index) in fileState" |
| | | :key="index"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns" style="padding-left: 30px;"> |
| | | <el-upload :action="action" :multiple="false" accept='.xls,.xlsx' :headers="uploadHeader" |
| | | :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" |
| | | :show-file-list="false"> |
| | | <el-button size="small" type="primary" :loading="upLoading">导å
¥</el-button></el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog title="ä¸ä¼ " :visible.sync="addDialogVisible" width="1000px" top="3vh"> |
| | | <UpPdfStamp ref="UpPdfStamp" v-if="addDialogVisible" @uploadPDF="uploadPDF" :isUpFile="true" |
| | | @uploadPDFErr="uploadPDFErr"></UpPdfStamp> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" v-loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æ¥çéä»¶" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}" |
| | | style="max-height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | <!-- æ°å¢/ç¼è¾ --> |
| | | <el-dialog :title="title" :visible.sync="addDia" width="500px"> |
| | | <el-form :model="currentInfo" ref="currentInfoForm" :rules="rules" label-position="right" label-width="120px"> |
| | | <el-form-item label="æä»¶ç¼å·" prop="documentCode"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="currentInfo.documentCode"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å«" prop="type"> |
| | | <el-select v-model="currentInfo.type" size="small" clearable placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="item in fileType" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="currentInfo.name"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä»¶çæ¬" prop="version"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="currentInfo.version"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä½è
" prop="writer"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="currentInfo.writer"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="çææ¥æ" prop="effectiveDate"> |
| | | <el-date-picker v-model="currentInfo.effectiveDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" |
| | | size="small" placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æä»¶ç¶æ" prop="state"> |
| | | <el-select v-model="currentInfo.state" size="small" clearable placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="item in fileState" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDia = false">å æ¶</el-button> |
| | | <el-button :loading="uploading" type="primary" @click="submitProduct('currentInfoForm')">确 认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import UpPdfStamp from '@/components/UpPdfStamp/index.vue' |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | uploadFileManageDocumentList, |
| | | pageManageDocumentList, |
| | | delManageDocumentList, |
| | | doManageDocumentList, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | export default { |
| | | components: { |
| | | UpPdfStamp, |
| | | filePreview, |
| | | limsTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | addDialogVisible: false, |
| | | lookDialogVisible: false, |
| | | addPower: false, |
| | | upLoading: false, |
| | | addLoading: false, |
| | | currentInfo: {}, |
| | | fileType: [], |
| | | fileState: [], |
| | | title: 'æ°å¢', |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶ç¼å·", prop: "documentCode" }, |
| | | { |
| | | label: "ç±»å«", prop: "type", width: "120px", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.fileType.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.fileType.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { |
| | | label: "åç§°", |
| | | prop: "name", |
| | | }, |
| | | { label: "æä»¶çæ¬", prop: "version" }, |
| | | { label: "ä½è
", prop: "writer" }, |
| | | { label: "çææ¥æ", prop: "effectiveDate" }, |
| | | { |
| | | label: "æä»¶ç¶æ", prop: "state", dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.fileState.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.fileState.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.openAdd("ç¼è¾", row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸ä¼ ", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleUp(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¥çéä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | addDia: false, |
| | | rules: { |
| | | documentCode: [{ required: true, message: "请è¾å
¥æä»¶ç¼å·", trigger: "blur" }], |
| | | }, |
| | | uploading: false, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageDocumentList/exportManageDocumentList' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageDocumentList({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | openAdd(title, row) { |
| | | this.title = title; |
| | | if (row) { |
| | | this.currentInfo = row; |
| | | } else { |
| | | this.currentInfo = {}; |
| | | } |
| | | this.addDia = true; |
| | | }, |
| | | // ä¸è½½æä»¶ |
| | | handleDown(row) { |
| | | if (!row.url) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, row.url); |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row) { |
| | | if (!row.url) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let upFile = false |
| | | let add = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'doManageDocumentList') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'exportManageDocumentList') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'uploadFileManageDocumentList') { |
| | | upFile = true |
| | | } |
| | | } |
| | | if (!upFile) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // ä¸ä¼ æä»¶ |
| | | handleUp(row) { |
| | | this.currentInfo = row |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // æäº¤ä¸ä¼ |
| | | handleAdd() { |
| | | this.addLoading = true |
| | | this.$refs['UpPdfStamp'].generatePDF() |
| | | }, |
| | | uploadPDFErr() { |
| | | this.addLoading = false |
| | | }, |
| | | 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.refreshTable() |
| | | }else { |
| | | this.$message.error(response.msg); |
| | | } |
| | | }, |
| | | selectEnumByCategory() { |
| | | // æä»¶ç±»å« |
| | | this.getDicts("document_type").then((response) => { |
| | | this.fileType = this.dictToValue(response.data); |
| | | }); |
| | | // æä»¶ç¶æ |
| | | this.getDicts("document_state").then((response) => { |
| | | this.fileState = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | async uploadPDF(pdfBlob, fileName) { |
| | | const formData = new FormData(); |
| | | formData.append('file', pdfBlob, fileName); // æä»¶å段 |
| | | formData.append('id', this.currentInfo.id); // æä»¶ååæ®µ |
| | | |
| | | try { |
| | | let res = await uploadFileManageDocumentList(formData) |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'ä¸ä¼ æå', type: 'success' }); |
| | | this.addDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: 'ä¸ä¼ 失败', type: 'error' }); |
| | | return false |
| | | } |
| | | } catch (e) { |
| | | this.addLoading = false |
| | | } |
| | | |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageDocumentList({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | submitProduct(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.uploading = true; |
| | | doManageDocumentList(this.currentInfo) |
| | | .then((res) => { |
| | | this.uploading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.refresh(); |
| | | this.addDia = false; |
| | | }) |
| | | .catch((err) => { |
| | | this.uploading = false; |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶ä½åºç³è¯· --> |
| | | <div class="file-obsoletion-request" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="queryParams.documentCode" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns" style="padding-left: 30px;"> |
| | | <el-button size="small" type="primary" @click="addDialogVisible = true, addInfo = {}">æä»¶ä½åºç³è¯·</el-button> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :visible.sync="addDialogVisible" title="æä»¶ä½åºç³è¯·" top="10vh" width="800px"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>ç³è¯·ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" allow-create clearable filterable size="small" |
| | | style="width: 100%;" @change="changeFileList"> |
| | | <el-option v-for="item in fileList" :key="item.documentCode" :label="item.documentCode" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">审æ¹äººï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.checkUser" filterable size="small" style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.name" clearable placeholder="请è¾å
¥" |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶çæ¬ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.version" clearable placeholder="请è¾å
¥" |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¶æï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.state" size="small" style="width: 100%;"> |
| | | <el-option v-for="(item, index) in fileState" :key="index" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä½åºæ¹å¼ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.method" size="small" style="width: 100%;"> |
| | | <el-option label="ä½åº" value="ä½åº"></el-option> |
| | | <el-option label="æ æ" value="æ æ"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> --> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ææä½åºæ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.expectCancelDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 100%;" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å®é
ä½åºæ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.actuallyCancelDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 100%;" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä½åºè¯´æï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.cancelNote" :rows="2" clearable placeholder="请è¾å
¥" |
| | | size="small" type="textarea"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button :loading="addLoading" type="primary" @click="handleAdd">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | addManageDocumentCancel, |
| | | pageManageDocumentList, |
| | | doManageDocumentCancel, |
| | | checkManageDocumentCancel, |
| | | exportManageDocumentCancel, |
| | | delManageDocumentCancel, |
| | | pageManageDocumentCancel, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: false, |
| | | outPower: false, |
| | | addInfo: {}, |
| | | addLoading: false, |
| | | addDialogVisible: false, |
| | | personList: [], |
| | | fileList: [], |
| | | outLoading: false, |
| | | fileState: [], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶ç¼å·", prop: "documentCode" }, |
| | | { label: "ç³è¯·äºº", prop: "createUserName", width: "120px" }, |
| | | { |
| | | label: "ä½åºè¯´æ", |
| | | prop: "cancelNote", |
| | | }, |
| | | { label: "ææä½åºæ¶é´", prop: "expectCancelDate" }, |
| | | { label: "å®é
ä½åºæ¥æ", prop: "actuallyCancelDate" }, |
| | | { |
| | | label: "ä½åºç¶æ", prop: "state", dataType: "tag", |
| | | formatData: (params) => { |
| | | return params; |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 'éè¿') { |
| | | return 'success' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleUpdate(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.state == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.state == 'éè¿' |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.checkUser != this.userId || row.state == 'éè¿' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | this.getAuthorizedPerson() |
| | | this.getFileList() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let out = false |
| | | let del = false |
| | | let add = false |
| | | // let check = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'exportManageDocumentCancel') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'addManageDocumentCancel') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageDocumentCancel') { |
| | | del = true |
| | | } |
| | | // if (power[i].menuMethod == 'checkManageDocumentControlled') { |
| | | // check = true |
| | | // } |
| | | } |
| | | // if (!check) { |
| | | // this.componentData.do.splice(2, 1) |
| | | // } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageDocumentCancel({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | selectEnumByCategory() { |
| | | // æä»¶ç¶æ |
| | | this.getDicts("document_state").then((response) => { |
| | | this.fileState = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // è·å人åå表 |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | // è·åæä»¶å表 |
| | | getFileList() { |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.records |
| | | }).catch(err => { }) |
| | | }, |
| | | // æäº¤ |
| | | handleAdd() { |
| | | if (!this.addInfo.documentCode) { |
| | | this.$message.error('请è¾å
¥ç³è¯·ç¼å·') |
| | | return false |
| | | } |
| | | this.addInfo.method = 'ä½åº' |
| | | this.addLoading = true |
| | | if (!this.addInfo.id) { |
| | | // æ°å¢ |
| | | addManageDocumentCancel(this.addInfo).then(res => { |
| | | this.addLoading = false |
| | | this.refreshTable() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | this.addDialogVisible = false |
| | | }).catch(err => { }) |
| | | } else { |
| | | // ç¼è¾ |
| | | doManageDocumentCancel({ |
| | | id: this.addInfo.id, |
| | | method: 'ä½åº', |
| | | documentCode: this.addInfo.documentCode, |
| | | checkUser: this.addInfo.checkUser, |
| | | name: this.addInfo.name, |
| | | version: this.addInfo.version, |
| | | documentState: this.addInfo.documentState, |
| | | expectCancelDate: this.addInfo.expectCancelDate, |
| | | actuallyCancelDate: this.addInfo.actuallyCancelDate, |
| | | cancelNote: this.addInfo.cancelNote, |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | this.refreshTable() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | this.addDialogVisible = false |
| | | }).catch(err => { }) |
| | | } |
| | | |
| | | }, |
| | | // é䏿件 |
| | | changeFileList(e) { |
| | | if (e) { |
| | | let obj = this.fileList.find(a => a.documentCode == e) |
| | | if (obj) { |
| | | this.addInfo.name = obj.name |
| | | this.addInfo.version = obj.version |
| | | this.addInfo.documentState = obj.state |
| | | } |
| | | } |
| | | }, |
| | | handleUpdate(row) { |
| | | this.addInfo = this.HaveJson(row) |
| | | this.addDialogVisible = true |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | | this.$confirm('æ¯å¦å®¡æ ¸éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | checkManageDocumentCancel({ id: row.id, state: 'éè¿' }).then(res => { |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | checkManageDocumentCancel({ id: row.id, state: 'ä¸éè¿' }).then(res => { |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleOut() { |
| | | this.outLoading = true |
| | | exportManageDocumentCancel(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æä»¶ä½åºè¡¨.xlsx') |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageDocumentCancel({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="file-handling"> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;"> |
| | | <el-tab-pane :label="item.name" :name="item.component" v-for="(item, index) in tabList" :key="index" |
| | | style="height: 100%;"> |
| | | <component :is="item.component" :key="item.component"></component> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import FileList from './components/FileList.vue' |
| | | import ControlledFileApplication from './components/ControlledFileApplication.vue' |
| | | import DistributionCollectionRecord from './components/DistributionCollectionRecord.vue' |
| | | import FileChangeRequest from './components/FileChangeRequest.vue' |
| | | import FileObsoletionRequest from './components/FileObsoletionRequest.vue' |
| | | export default { |
| | | components: { |
| | | FileList, |
| | | ControlledFileApplication, |
| | | DistributionCollectionRecord, |
| | | FileChangeRequest, |
| | | FileObsoletionRequest |
| | | }, |
| | | data() { |
| | | return { |
| | | tabList: [ |
| | | { |
| | | name: 'æä»¶æ¸
å', |
| | | component: 'FileList' |
| | | }, |
| | | { |
| | | name: 'æä»¶åæ§ç³è¯·', |
| | | component: 'ControlledFileApplication' |
| | | }, |
| | | { |
| | | name: 'åæ¾åæ¶è®°å½', |
| | | component: 'DistributionCollectionRecord' |
| | | }, |
| | | { |
| | | name: 'æä»¶åæ´ç³è¯·', |
| | | component: 'FileChangeRequest' |
| | | }, |
| | | { |
| | | name: 'æä»¶ä½åºç³è¯·', |
| | | component: 'FileObsoletionRequest' |
| | | }, |
| | | ], |
| | | activeName: 'FileList' |
| | | }; |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .file-handling { |
| | | margin-top: 10px; |
| | | height: calc(100% - 20px); |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: 100%; |
| | | padding: 0; |
| | | padding-top: 10px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶å®¡æ¹è®°å½ --> |
| | | <div class="DocumentApprovalRecords"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btn"> |
| | | <el-button size="small" type="primary" @click="openAdd('æ°å¢')">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' |
| | | :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' |
| | | :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="small">导å
¥</el-button></el-upload> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" |
| | | style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <!-- æ°å¢/ç¼è¾ --> |
| | | <el-dialog :title="title" :visible.sync="addDia" width="500px"> |
| | | <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px"> |
| | | <el-form-item label="æä»¶åç§°" prop="documentName"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.documentName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä»¶ç¼å·" prop="documentCode"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.documentCode"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç/次" prop="documentVersion"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.documentVersion"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç¼å¶" prop="writeUser"> |
| | | <el-select v-model="addForm.writeUser" size="small" clearable placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å®¡æ ¸" prop="checkUser"> |
| | | <el-select v-model="addForm.checkUser" size="small" clearable placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¹å" prop="ratifyUser"> |
| | | <el-select v-model="addForm.ratifyUser" size="small" clearable placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¹åæ¥æ" prop="ratifyDate"> |
| | | <el-date-picker v-model="addForm.ratifyDate" style="width: 100%" value-format="yyyy-MM-dd" ormat="yyyy-MM-dd" |
| | | type="date" size="small"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input size="small" placeholder="请è¾å
¥" type="textarea" :rows="2" clearable v-model="addForm.remarks"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDia = false">å æ¶</el-button> |
| | | <el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">确 认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | addManageRecordCheck, |
| | | doManageRecordCheck, |
| | | exportOutManageRecordCheck, |
| | | checkManageRecordCheck, |
| | | ratifyManageRecordCheck, |
| | | delManageRecordCheck, |
| | | pageManageRecordCheck |
| | | } from '@/api/cnas/systemManagement/documentRecords.js' |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: true, |
| | | outPower: true, |
| | | upPower: true, |
| | | outLoading: false, |
| | | personList: [], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶åç§°", prop: "documentName" }, |
| | | { label: "æä»¶ç¼å·", prop: "documentCode", width: "120px" }, |
| | | { |
| | | label: "ç/次", |
| | | prop: "documentVersion", |
| | | }, |
| | | { label: "ç¼å¶", prop: "writeUser" }, |
| | | { label: "å®¡æ ¸", prop: "checkUser" }, |
| | | { label: "æ¹å", prop: "ratifyUser" }, |
| | | { label: "æ¹åæ¥æ", prop: "ratifyDate" }, |
| | | { label: "夿³¨", prop: "remark" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.openAdd("ç¼è¾", row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.checkState == 'éè¿' || row.ratifyState == 'éè¿' |
| | | }, |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.checkState == 'éè¿' || row.ratifyState == 'éè¿' |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleApproval(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.checkState == 'éè¿' || row.ratifyState == 'éè¿' |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | title: "æ°å¢", |
| | | addDia: false, |
| | | addForm: {}, |
| | | addRules: { |
| | | documentName: [{ required: true, message: "请è¾å
¥æä»¶åç§°", trigger: "blur" }], |
| | | }, |
| | | uploading: false, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageRecordCheck/exportInManageRecordCheck' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let check = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordCheck') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordCheck') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordCheck') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'checkManageRecordCheck') { |
| | | check = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordCheck') { |
| | | ratify = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordCheck') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!check) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageRecordCheck({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | // æ°å¢/ç¼è¾ |
| | | openAdd(title, row) { |
| | | this.title = title |
| | | if (row) { |
| | | this.addForm = row |
| | | } else { |
| | | this.addForm = {} |
| | | } |
| | | this.addDia = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | // queryParams |
| | | exportOutManageRecordCheck(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导åºå¤±è´¥') |
| | | let url = this.javaApi + '/word/' + res.message |
| | | this.$download.saveAs(url, 'æä»¶å®¡æ¹è®°å½') |
| | | }) |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | this.refreshTable()() |
| | | }) |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | | this.$confirm('æ¯å¦å®¡æ ¸éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | checkManageRecordCheck({ id: row.id, checkState: 'éè¿' }).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | checkManageRecordCheck({ id: row.id, checkState: 'ä¸éè¿' }).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | console.log("åæ¶æé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row) { |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | ratifyManageRecordCheck({ id: row.id, ratifyState: 'éè¿' }).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | ratifyManageRecordCheck({ id: row.id, ratifyState: 'ä¸éè¿' }).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | 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.refreshTable()() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | // æ°å¢/ä¿®æ¹ |
| | | submitProduct(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.uploading = true; |
| | | if (this.title == "æ°å¢") { |
| | | addManageRecordCheck(this.addForm) |
| | | .then((res) => { |
| | | this.uploading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.refresh(); |
| | | this.addDia = false; |
| | | }) |
| | | .catch((err) => { |
| | | this.uploading = false; |
| | | }); |
| | | } else { |
| | | doManageRecordCheck(this.addForm) |
| | | .then((res) => { |
| | | this.uploading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.refresh(); |
| | | this.addDia = false; |
| | | }) |
| | | .catch((err) => { |
| | | this.uploading = false; |
| | | }); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageRecordCheck({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | right: 16px; |
| | | top: 20px; |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- ä½åºæä»¶éæ¯è®°å½ --> |
| | | <div class="ObsoleteDocumentDestructionRecords"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btn"> |
| | | <el-button size="small" type="primary" @click="openAdd">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' |
| | | :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' |
| | | :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="small">导å
¥</el-button></el-upload> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" |
| | | style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" |
| | | allow-create clearable filterable> |
| | | <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.documentName"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ°éï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.qty"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">鿝åå ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.reason"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">夿³¨ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.remark" |
| | | type="textarea" :rows="2"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | exportOutManageRecordCancel, |
| | | addManageRecordCancel, |
| | | doManageRecordCancel, |
| | | ratifyManageRecordCancel, |
| | | delManageRecordCancel, |
| | | pageManageRecordCancel |
| | | } from '@/api/cnas/systemManagement/documentRecords.js' |
| | | import { |
| | | pageManageDocumentList, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: true, |
| | | outPower: true, |
| | | upPower: true, |
| | | outLoading: false, |
| | | addLoading: false, |
| | | addInfo: {}, |
| | | title: 'æ°å¢', |
| | | addInfo: {}, |
| | | addDialogVisible: false, |
| | | fileList: [], |
| | | personList: [], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶ç¼å·", prop: "documentCode" }, |
| | | { label: "æä»¶åç§°", prop: "documentName", width: "120px" }, |
| | | { |
| | | label: "æ°é", |
| | | prop: "qty", |
| | | }, |
| | | { label: "鿝åå ", prop: "reason" }, |
| | | { label: "ç³è¯·äºº", prop: "createUserName" }, |
| | | { label: "ç³è¯·æ¥æ", prop: "createTime" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { label: "æ¹åæ¥æ", prop: "ratifyTime" }, |
| | | { label: "夿³¨", prop: "remark" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleEdit0(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleRatify(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageRecordCancel/exportInManageRecordCancel' |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getList() |
| | | this.getAuthorizedPerson() |
| | | this.getFileList() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordCancel') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordCancel') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordCancel') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordCancel') { |
| | | ratify = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordCancel') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | openAdd() { |
| | | this.addInfo = {} |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleEdit0(row) { |
| | | this.addInfo = row |
| | | this.title = 'ä¿®æ¹' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | exportOutManageRecordCancel(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导åºå¤±è´¥') |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, "ä½åºæä»¶éæ¯è®°å½"); |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageRecordCancel({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | 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.refreshTable()() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList() { |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.records.map(m => { |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err => { }) |
| | | }, |
| | | handleAdd() { |
| | | if (!this.addInfo.documentCode) return this.$message.error('请è¾å
¥æä»¶ç¼å·') |
| | | this.addLoading = true |
| | | let obj = {} |
| | | if (this.title == 'æ°å¢') { |
| | | obj = this.HaveJson(this.addInfo) |
| | | } else { |
| | | let { id, documentCode, documentName, qty, reason, remark } = this.addInfo |
| | | obj = { id, documentCode, documentName, qty, reason, remark } |
| | | } |
| | | if (this.title == 'æ°å¢') { |
| | | addManageRecordCancel(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } else { |
| | | doManageRecordCancel(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } |
| | | }, |
| | | getCurrentFile(e) { |
| | | let obj = this.fileList.find(m => m.documentCode == e) |
| | | if (obj) { |
| | | this.$set(this.addInfo, 'documentName', obj.name) |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | handleRatify(row) { |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | ratifyManageRecordCancel({ id: row.id, ratifyState: 'éè¿' }).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | ratifyManageRecordCancel({ id: row.id, ratifyState: 'ä¸éè¿' }).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | console.log("åæ¶æé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageRecordCancel({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 16px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æææä»¶ï¼å
ãå¤é¨æä»¶ï¼çåæ¾ä¸åæ¶è®°å½ --> |
| | | <div class="DistributionRetrievalRecordsAllDocuments"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btn"> |
| | | <el-button size="small" type="primary" @click="openAdd">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' |
| | | :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' |
| | | :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="small">导å
¥</el-button></el-upload> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" |
| | | style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" |
| | | allow-create clearable filterable> |
| | | <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.documentName"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">çå·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.documentVersion"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">份æ°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.pages"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç±»å«ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentType" placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in fileType" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ååå·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.number"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥å人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.receiveUser" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | filterable=""> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥æ¶é¨é¨ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.departLims" placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in list" :key="item.name" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥åæ¥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.receiveDate" type="date" size="small" placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | getYearAndMonthAndDays |
| | | } from '@/utils/date' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | exportOutManageRecordIssueRecycle, |
| | | doManageRecordIssueRecycle, |
| | | addManageRecordIssueRecycle, |
| | | selectCNSAPersonTree, |
| | | pageManageRecordIssueRecycle, |
| | | delManageRecordIssueRecycle, |
| | | } from '@/api/cnas/systemManagement/documentRecords.js' |
| | | import { |
| | | pageManageDocumentList, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: true, |
| | | outPower: true, |
| | | upPower: true, |
| | | outLoading: false, |
| | | addLoading: false, |
| | | title: 'æ°å¢', |
| | | addDialogVisible: false, |
| | | addInfo: {}, |
| | | personList: [], |
| | | fileType: [], |
| | | fileList: [], |
| | | list: [], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶ç¼å·", prop: "documentCode" }, |
| | | { label: "æä»¶åç§°", prop: "documentName", width: "120px" }, |
| | | { |
| | | label: "çå·", |
| | | prop: "documentVersion", |
| | | }, |
| | | { label: "份æ°", prop: "pages" }, |
| | | { label: "æä»¶ç±»å«", prop: "documentType" }, |
| | | { label: "ååå·", prop: "number" }, |
| | | { label: "æ¥å人", prop: "receiveUserName" }, |
| | | { label: "æ¥æ¶é¨é¨", prop: "departLims" }, |
| | | { label: "æ¥åæ¥æ", prop: "receiveDate" }, |
| | | { label: "ç¾æ¶äºº", prop: "signedUserName" }, |
| | | { label: "ç¾æ¶æ¥æ", prop: "signedDate" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleEdit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.signedUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "åæ¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleBack(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.signedUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.signedUser |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle' |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getList() |
| | | this.getAuthorizedPerson() |
| | | this.selectEnumByCategory() |
| | | this.getFileList() |
| | | // TODO é¨é¨æ¥å£éè¦éå |
| | | // this.selectTreeList() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let edit = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordIssueRecycle') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordIssueRecycle') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordIssueRecycle') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'doManageRecordIssueRecycle') { |
| | | edit = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordIssueRecycle') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | // æ°å¢ |
| | | openAdd() { |
| | | // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle); |
| | | this.addInfo = {} |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleEdit(row) { |
| | | this.addInfo = row |
| | | this.title = 'ç¼è¾' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | exportOutManageRecordIssueRecycle(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导åºå¤±è´¥') |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, 'æä»¶åæ¾ä¸åæ¶è®°å½') |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageRecordIssueRecycle({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | 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.refreshTable()() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | selectEnumByCategory() { |
| | | // æä»¶ç±»å« |
| | | this.getDicts("document_type").then((response) => { |
| | | this.fileType = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList() { |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.records.map(m => { |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err => { }) |
| | | }, |
| | | getCurrentFile(e) { |
| | | let obj = this.fileList.find(m => m.documentCode == e) |
| | | if (obj) { |
| | | this.$set(this.addInfo, 'documentName', obj.name) |
| | | this.$set(this.addInfo, 'documentVersion', obj.version) |
| | | this.$set(this.addInfo, 'documentType', obj.type) |
| | | } |
| | | }, |
| | | handleAdd() { |
| | | if (!this.addInfo.documentCode) return this.$message.error('请è¾å
¥æä»¶ç¼å·') |
| | | this.addLoading = true |
| | | let obj = {} |
| | | if (this.title == 'æ°å¢') { |
| | | obj = this.HaveJson(this.addInfo) |
| | | } else { |
| | | let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = this.addInfo |
| | | obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } |
| | | } |
| | | if (this.title == 'æ°å¢') { |
| | | addManageRecordIssueRecycle(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } else { |
| | | doManageRecordIssueRecycle(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } |
| | | }, |
| | | // åæ¶ |
| | | handleBack(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤åæ¶?', "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | let obj = {} |
| | | let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = row |
| | | obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: this.userId } |
| | | doManageRecordIssueRecycle(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | }).catch(() => { }) |
| | | }, |
| | | // æ¥è¯¢æ å½¢å表 |
| | | selectTreeList() { |
| | | selectCNSAPersonTree().then((res) => { |
| | | this.list = res.data[0].children; |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageRecordIssueRecycle({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- 夿¥æä»¶ç¡®è®¤è®°å½ --> |
| | | <div class="ExternalDocumentConfirmationRecords"> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;"> |
| | | <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;"> |
| | | <el-button size="small" type="primary" @click="openAdd('æ°å¢')" style="margin-left: 20px;">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' |
| | | :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' |
| | | :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button size="small" type="primary" :loading="upLoading">导å
¥</el-button></el-upload> |
| | | </div> |
| | | <div class="table" style="height: calc(100% - 200px)"> |
| | | <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify" |
| | | :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify" |
| | | :upUrl="$api.manageRecordTotal.doManageRecordVerify" /> --> |
| | | <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0" |
| | | :height="'calc(100vh - 270px)'" @pagination="pagination0"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="queryParams.year" type="year" placeholder="鿩年" format="yyyy" value-format="yyyy" |
| | | size="small" @change="refreshTable()"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 280px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- 详æ
/ä¸è½½/å®¡æ ¸ --> |
| | | <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == 'ä¸è½½' }" |
| | | :modal="title0 != 'ä¸è½½'" top="5vh"> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}" |
| | | style="max-height: 70vh;overflow-y: auto;" /> |
| | | <span slot="footer" class="dialog-footer" v-if="title0 == 'å®¡æ ¸' || title0 == 'æ¹å'"> |
| | | <el-button @click="submitCheck('ä¸éè¿')" :loading="noCheckLoading">ä¸éè¿</el-button> |
| | | <el-button type="primary" @click="submitCheck('éè¿')" :loading="checkLoading">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ°å¢/ç¼è¾ --> |
| | | <el-dialog :title="title" :visible.sync="addDia" width="500px"> |
| | | <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px"> |
| | | <el-form-item label="夿¥æä»¶åç§°" prop="documentName"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.documentName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä»¶ç¼å·" prop="documentCode"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.documentCode"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ åè§èåç§°" prop="standardName"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.standardName"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ åå·" prop="standardCode"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="addForm.standardCode"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="çææ¥æ" prop="effectiveDate"> |
| | | <el-date-picker v-model="addForm.effectiveDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 100%" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="ä½åºæ¥æ" prop="cancelDate"> |
| | | <el-date-picker v-model="addForm.cancelDate" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 100%" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨" prop="note"> |
| | | <el-input size="small" placeholder="请è¾å
¥" type="textarea" :rows="2" clearable v-model="addForm.note"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDia = false">å æ¶</el-button> |
| | | <el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">确 认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | addManageRecordVerify, |
| | | pageManageRecordVerify, |
| | | submitManageRecordTotal, |
| | | ratifyManageRecordTotal, |
| | | delManageRecordVerify, |
| | | pageManageRecordTotal, |
| | | doManageRecordVerify |
| | | } from '@/api/cnas/systemManagement/documentRecords.js' |
| | | export default { |
| | | components: { |
| | | filePreview, |
| | | limsTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | title0: 'æ¥ç', |
| | | activeName: 'å¡«å', |
| | | lookDialogVisible: false, |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | addPower: true, |
| | | upPower: true, |
| | | currentInfo: {}, |
| | | upLoading: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "年份", prop: "year" }, |
| | | { label: "æ»æ°é", prop: "totalNum", width: "120px" }, |
| | | { |
| | | label: "æå¶äºº", |
| | | prop: "submitUserName", |
| | | }, |
| | | { label: "æå¶æ¥æ", prop: "submitDate" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { label: "æ¹åæ¥æ", prop: "ratifyDate" }, |
| | | { label: "æ¹åç»æ", prop: "ratifyState" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.url |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown0(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.url |
| | | }, |
| | | }, |
| | | { |
| | | name: "æäº¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleSubmit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.submitUserName |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (handleApproval) => { |
| | | this.handleSubmit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.submitUserName || !!row.ratifyUserName |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | tableData0: [], |
| | | column0: [ |
| | | { label: "夿¥æä»¶åç§°", prop: "documentName" }, |
| | | { label: "æä»¶ç¼å·", prop: "documentCode", width: "120px" }, |
| | | { |
| | | label: "æ åè§èåç§°", |
| | | prop: "standardName", |
| | | }, |
| | | { label: "æ åå·", prop: "standardCode" }, |
| | | { label: "çææ¥æ", prop: "effectiveDate" }, |
| | | { label: "ä½åºæ¥æ", prop: "cancelDate" }, |
| | | { label: "夿³¨", prop: "note" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.openAdd("ç¼è¾", row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading0: false, |
| | | title: 'æ°å¢', |
| | | addForm: {}, |
| | | addDia: false, |
| | | addRules: { |
| | | documentName: [{ required: true, message: "请è¾å
¥å¤æ¥æä»¶åç§°", trigger: "blur" }], |
| | | documentCode: [ |
| | | { required: true, message: "请è¾å
¥æä»¶ç¼å·", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | uploading: false, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageRecordVerify/exportManageRecordVerify' |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getList() |
| | | this.getList0() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let sub = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordVerify') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordVerify') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportManageRecordVerify') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'submitManageRecordTotal') { |
| | | sub = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordTotal') { |
| | | ratify = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!sub) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData0.do.splice(1, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData0.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.upPower = up |
| | | }, |
| | | openAdd(title, row) { |
| | | this.title = title; |
| | | if (row) { |
| | | this.addForm = row; |
| | | } else { |
| | | this.addForm = {}; |
| | | } |
| | | this.addDia = true; |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageRecordTotal({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | getList0() { |
| | | this.tableLoading0 = true; |
| | | let param = { ...this.page0 }; |
| | | delete param.total; |
| | | pageManageRecordVerify({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading0 = false; |
| | | if (res.code === 200) { |
| | | this.tableData0 = res.data.records; |
| | | this.page0.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading0 = false; |
| | | }); |
| | | }, |
| | | pagination0({ page, limit }) { |
| | | this.pag0.current = page; |
| | | this.page0.size = limit; |
| | | this.getList0(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | 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.getList0(); |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | submitCheck(type) { }, |
| | | // æ¥ç |
| | | handleLook(row) { |
| | | this.title0 = 'æ¥ç' |
| | | this.commonFun(row) |
| | | }, |
| | | // å
¬ç¨æ¹æ³ |
| | | commonFun(row, callbanck) { |
| | | this.currentInfo = row |
| | | pageManageRecordVerify({ |
| | | current: -1, |
| | | size: -1, |
| | | manageRecordTotalId: row.id |
| | | }).then(res => { |
| | | this.currentInfo.arr = res.data.records |
| | | this.lookDialogVisible = true |
| | | if (callbanck) { |
| | | callbanck() |
| | | } |
| | | }).catch(err => { }); |
| | | }, |
| | | handleDown0(row) { |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, '夿¥æä»¶ç¡®è®¤è®°å½') |
| | | }, |
| | | // æäº¤ |
| | | handleSubmit(row) { |
| | | this.$confirm('æ¯å¦æäº¤ ' + row.year + ' å¹´çæ°æ®', 'æäº¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | submitManageRecordTotal({ |
| | | id: row.id |
| | | }).then(res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.refreshTable()() |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row) { |
| | | this.title0 = 'æ¹å' |
| | | this.commonFun(row) |
| | | }, |
| | | // æäº¤å®¡æ ¸/æ¹å |
| | | submitCheck(state) { |
| | | if (state == 'éè¿') { |
| | | this.checkLoading = true |
| | | } else { |
| | | this.noCheckLoading = true |
| | | } |
| | | ratifyManageRecordTotal({ |
| | | id: this.currentInfo.id, |
| | | ratifyState: state |
| | | }).then(res => { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable()() |
| | | this.lookDialogVisible = false |
| | | }).catch(err => { }); |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageRecordVerify({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.getList0() |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | submitProduct(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.uploading = true; |
| | | if (this.title == "æ°å¢") { |
| | | addManageRecordVerify(this.addForm) |
| | | .then((res) => { |
| | | this.uploading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.getList0() |
| | | this.addDia = false; |
| | | }) |
| | | .catch((err) => { |
| | | this.uploading = false; |
| | | }); |
| | | } else { |
| | | doManageRecordVerify(this.addForm) |
| | | .then((res) => { |
| | | this.uploading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.$message.success("æäº¤æå"); |
| | | this.getList0() |
| | | this.addDia = false; |
| | | }) |
| | | .catch((err) => { |
| | | this.uploading = false; |
| | | }); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 30px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: 100%; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶å®æå®¡æ¥è®°å½ --> |
| | | <div class="PeriodicDocumentReviewRecords"> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="queryParams.documentName" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' |
| | | :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" |
| | | :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="small">导å
¥</el-button></el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="queryParams0.year" type="year" placeholder="鿩年" format="yyyy" |
| | | value-format="yyyy" size="small" @change="refreshTable(1)"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh(1)">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable(1)">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" |
| | | allow-create clearable filterable> |
| | | <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.documentName"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">çæ¬å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.documentVersion"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">修订å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.revision"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">é宿§ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.suitability" placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">夿³¨ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.remark" |
| | | type="textarea" :rows="2"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 详æ
/å®¡æ ¸ --> |
| | | <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" top="5vh"> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}" |
| | | style="max-height: 70vh;overflow-y: auto;" /> |
| | | <span slot="footer" class="dialog-footer" v-if="title0 == 'å®¡æ ¸' || title0 == 'æ¹å'"> |
| | | <el-button @click="submitCheck('ä¸éè¿')" :loading="noCheckLoading">ä¸éè¿</el-button> |
| | | <el-button type="primary" @click="submitCheck('éè¿')" :loading="checkLoading">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | exportOutManageRecordIntervals, |
| | | addManageRecordIntervals, |
| | | doManageRecordIntervals, |
| | | ratifyManageRecordIntervalsTotal, |
| | | submitManageRecordIntervalsTotal, |
| | | pageManageRecordIntervals, |
| | | pageManageRecordIntervalsTotal, |
| | | delManageRecordIntervals, |
| | | } from '@/api/cnas/systemManagement/documentRecords.js' |
| | | import { |
| | | pageManageDocumentList, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | filePreview |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName: 'å¡«å', |
| | | title0: 'æ°å¢', |
| | | addPower: true, |
| | | outPower: true, |
| | | upPower: true, |
| | | outLoading: false, |
| | | addLoading: false, |
| | | lookDialogVisible: false, |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | componentData: { |
| | | entity: { |
| | | documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'handleEdit', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleEdit', |
| | | field: [], |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | }], |
| | | tagField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | selectField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | addUpload: ['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker: ['receiveDate'], |
| | | noHead: ['signedUserName', 'signedDate', 'departLims'],//ä¸å䏿°å¢ç¼è¾çåæ®µ |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | componentData0: { |
| | | entity: { |
| | | year: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: 'æ¥ç', |
| | | type: 'text', |
| | | method: 'handleLook', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, { |
| | | id: 'handleDown0', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDown0', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | { |
| | | id: 'handleSubmit', |
| | | font: 'æäº¤', |
| | | type: 'text', |
| | | method: 'handleSubmit', |
| | | disabFun: (row, index) => { |
| | | return !!row.submitUserName |
| | | } |
| | | }, { |
| | | id: 'handleApproval', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleApproval', |
| | | disabFun: (row, index) => { |
| | | return !row.submitUserName || !!row.ratifyUserName |
| | | } |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | entityCopy: {}, |
| | | entityCopy0: {}, |
| | | upIndex: 0, |
| | | addInfo: {}, |
| | | title: 'æ°å¢', |
| | | addInfo: {}, |
| | | addDialogVisible: false, |
| | | fileList: [], |
| | | typeList: [], |
| | | currentInfo: {}, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶åç§°", prop: "documentName" }, |
| | | { label: "æä»¶ç¼å·", prop: "documentCode", width: "120px" }, |
| | | { |
| | | label: "çæ¬å·", |
| | | prop: "documentVersion", |
| | | }, |
| | | { label: "修订å·", prop: "revision" }, |
| | | { label: "é宿§", prop: "suitability" }, |
| | | { label: "夿³¨", prop: "remark" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleEdit(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | queryParams0: {}, |
| | | tableData0: [], |
| | | column0: [ |
| | | { label: "年份", prop: "year" }, |
| | | { label: "æ»æ°é", prop: "totalNum", width: "120px" }, |
| | | { |
| | | label: "æå¶äºº", |
| | | prop: "submitUserName", |
| | | }, |
| | | { label: "æå¶æ¥æ", prop: "submitDate" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { label: "æ¹åæ¥æ", prop: "ratifyDate" }, |
| | | { label: "æ¹åç»æ", prop: "ratifyState" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.url |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown0(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.url |
| | | }, |
| | | }, |
| | | { |
| | | name: "æäº¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleSubmit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.submitUserName && row.ratifyState != 'ä¸éè¿' |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleApproval(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return (!row.submitUserName || !!row.ratifyUserName) && row.ratifyState != 'ä¸éè¿' |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageRecordIntervals/exportInManageRecordIntervals' |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | // this.entityCopy0 = this.HaveJson(this.componentData0.entity); |
| | | this.getList() |
| | | this.getList0() |
| | | this.getFileList() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let submit = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordIntervals') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordIntervals') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordIntervals') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordIntervals') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'submitManageRecordIntervalsTotal') { |
| | | submit = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordIntervalsTotal') { |
| | | ratify = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData0.do.splice(3, 1) |
| | | } |
| | | if (!submit) { |
| | | this.componentData0.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | // æ°å¢ |
| | | openAdd() { |
| | | // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle); |
| | | this.addInfo = {} |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | exportOutManageRecordIntervals(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导åºå¤±è´¥') |
| | | let url = this.javaApi + 'word/' + res.message |
| | | this.$download.saveAs(url, "æä»¶å®æå®¡æ¥è®°å½"); |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageRecordIntervals({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | getList0() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams0, ...this.page0 }; |
| | | delete param.total; |
| | | pageManageRecordIntervalsTotal({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData0 = res.data.records; |
| | | this.page0.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination0({ page, limit }) { |
| | | this.page0.current = page; |
| | | this.page0.size = limit; |
| | | this.getList0(); |
| | | }, |
| | | refreshTable(num) { |
| | | if (num) { |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | } else { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | } |
| | | }, |
| | | refresh(num) { |
| | | if (num) { |
| | | this.queryParams0 = {}; |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | } else { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | } |
| | | }, |
| | | 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.refreshTable()() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | getCurrentFile(e) { |
| | | let obj = this.fileList.find(m => m.documentCode == e) |
| | | if (obj) { |
| | | this.$set(this.addInfo, 'documentName', obj.name) |
| | | this.$set(this.addInfo, 'documentVersion', obj.version) |
| | | // this.addInfo.documentName = obj.name |
| | | // this.addInfo.documentVersion = obj.version |
| | | } |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList() { |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.records.map(m => { |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err => { }) |
| | | }, |
| | | selectEnumByCategory() { |
| | | // æä»¶ç±»å« |
| | | this.getDicts("suitability").then((response) => { |
| | | this.typeList = this.dictToValue(response.data); |
| | | }); |
| | | }, |
| | | // æäº¤ |
| | | handleAdd() { |
| | | if (!this.addInfo.documentCode) return this.$message.error('请è¾å
¥æä»¶ç¼å·') |
| | | this.addLoading = true |
| | | let obj = {} |
| | | if (this.title == 'æ°å¢') { |
| | | obj = this.HaveJson(this.addInfo) |
| | | } else { |
| | | let { id, documentCode, documentName, documentVersion, revision, suitability, remark } = this.addInfo |
| | | obj = { id, documentCode, documentName, documentVersion, revision, suitability, remark } |
| | | } |
| | | if (this.title == 'æ°å¢') { |
| | | addManageRecordIntervals(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } else { |
| | | doManageRecordIntervals(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } |
| | | }, |
| | | // ä¿®æ¹ |
| | | handleEdit(row) { |
| | | this.addInfo = row |
| | | this.title = 'ç¼è¾' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | submitCheck(state) { |
| | | if (state == 'éè¿') { |
| | | this.checkLoading = true |
| | | } else { |
| | | this.noCheckLoading = true |
| | | } |
| | | ratifyManageRecordIntervalsTotal({ |
| | | id: this.currentInfo.id, |
| | | ratifyState: state |
| | | }).then(res => { |
| | | this.checkLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.noCheckLoading = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable(1); |
| | | this.lookDialogVisible = false |
| | | }).catch(err => { }); |
| | | }, |
| | | // æ¥ç |
| | | handleLook(row) { |
| | | this.title0 = 'æ¥ç' |
| | | this.commonFun(row) |
| | | }, |
| | | commonFun(row, callbanck) { |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | if (callbanck) { |
| | | callbanck() |
| | | } |
| | | }, |
| | | handleDown0(row) { |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, "æææä»¶å®ææ£æ¥è®°å½"); |
| | | }, |
| | | // æäº¤ |
| | | handleSubmit(row) { |
| | | this.$confirm('æ¯å¦æäº¤ ' + row.year + ' å¹´çæ°æ®', 'æäº¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | submitManageRecordIntervalsTotal({ |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.refreshTable(1); |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row) { |
| | | this.title0 = 'æ¹å' |
| | | this.commonFun(row) |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageRecordIntervals({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refreshTable(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 140px); |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: 100%; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ --> |
| | | <div class="DocumentRevisionRequestApprovalRecords"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btn"> |
| | | <el-button size="small" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" |
| | | style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="800px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç³è¯·ç±»åï¼</div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="addInfo.method" size="small" :disabled="title.includes('æè§')"> |
| | | <el-radio label="修订">修订</el-radio> |
| | | <el-radio label="ä½åº">ä½åº</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" |
| | | allow-create clearable filterable :disabled="title.includes('æè§')"> |
| | | <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.documentName" |
| | | :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç« èå·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.capter" |
| | | :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">页ç ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.pages" |
| | | :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¿®æ¹æ¬¡æ°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.number" |
| | | :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¿®æ¹åçæ¬å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.beforeVersion" |
| | | :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¿®æ¹åçæ¬å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.afterVersion" |
| | | :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">修订人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.alterUser" placeholder="è¯·éæ©" size="small" style="width: 100%;" filterable |
| | | :disabled="title.includes('æè§')"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åååé¨é¨ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.beforeDepart" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="title.includes('æè§')"> |
| | | <el-option v-for="item in list" :key="item.name" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">修订åååé¨é¨ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.afterDepart" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="title.includes('æè§')"> |
| | | <el-option v-for="item in list" :key="item.name" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col><el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.date" type="date" size="small" placeholder="éæ©æ¥æ" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 90%;"> |
| | | <div class="search_label">ä¿®æ¹å
容ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.alterThing" |
| | | type="textarea" :rows="2" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 90%;"> |
| | | <div class="search_label">åååå ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.reason" |
| | | type="textarea" :rows="2" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¸ä¼ éä»¶ï¼</div> |
| | | <div class="search_input"><el-upload style="margin: 8px 0 0px 50px;" action="#" :auto-upload="false" |
| | | :multiple="false" accept='.pdf' :on-change="handleChangeUpload" |
| | | v-if="addDialogVisible && !title.includes('æè§')"> |
| | | <el-button size="small" type="primary">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('æè§')"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç³è¯·é¨é¨ä¸»ç®¡æè§ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.applicant" |
| | | type="textarea" :rows="2" :disabled="title != 'ç³è¯·é¨é¨ä¸»ç®¡æè§'"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('æè§')"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åå®å¶é¨é¨æè§ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.formulation" |
| | | type="textarea" :rows="2" :disabled="title != 'åå®å¶é¨é¨æè§'"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('æè§')"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åå®¡æ ¸é¨é¨æè§ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.audit" |
| | | type="textarea" :rows="2" :disabled="title != 'åå®¡æ ¸é¨é¨æè§'"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :title="title0" :visible.sync="detailDialogVisible" width="900px" top="20px" |
| | | :class="{ downPdf: title0 == 'ä¸è½½' }" :modal="title0 != 'ä¸è½½'"> |
| | | <div style="max-height: 75vh;overflow-y: auto;"> |
| | | <div id="dialogBody"> |
| | | <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;"> |
| | | <span style="font-size: 20px;">æä»¶æ´æ¹/ä½åºç³è¯·è¡¨</span> |
| | | <span>Application for alteration/cancellation of Document</span> |
| | | </h4> |
| | | <p style="display: flex;justify-content: space-between;margin-top: 16px;"> |
| | | <span>{{ currentInfo.documentCode }}</span> |
| | | <span>{{ currentInfo.method }}</span> |
| | | </p> |
| | | <table border="1" class="tables" cellpadding="10"> |
| | | <tr> |
| | | <td> |
| | | <p>ç³è¯·é¨é¨</p> |
| | | <p class="en">Application department</p> |
| | | </td> |
| | | <td>{{ currentInfo.createUserDepart }}</td> |
| | | <td> |
| | | <p>ç³è¯·äºº</p> |
| | | <p>Proposer</p> |
| | | </td> |
| | | <td>{{ currentInfo.createUserName }}</td> |
| | | <td> |
| | | <p>ç³è¯·æ¶é´</p> |
| | | <p class="en">Application date</p> |
| | | </td> |
| | | <td>{{ currentInfo.createTime }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>æä»¶åç§°</p> |
| | | <p class="en">File name</p> |
| | | </td> |
| | | <td colspan="3">{{ currentInfo.documentName }}</td> |
| | | <td> |
| | | <p>æä»¶ç¼å·</p> |
| | | <p class="en">Document number</p> |
| | | </td> |
| | | <td>{{ currentInfo.documentCode }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>ä¿®æ¹åçæ¬¡</p> |
| | | <p class="en">Modify previous editions</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.beforeVersion }}</td> |
| | | <td> |
| | | <p>ä¿®æ¹åçæ¬¡</p> |
| | | <p class="en">Revised edition</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.afterVersion }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>åååå </p> |
| | | <p class="en">Changing reason</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <div class="user-content"> |
| | | <p style="text-align: left;line-height: 26px;">{{ currentInfo.reason }}</p> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>åæå
容</p> |
| | | <p class="en">Original content</p> |
| | | </td> |
| | | <td colspan="2">è§éä»¶</td> |
| | | <td> |
| | | <p>æä¿®è®¢å
容</p> |
| | | <p class="en">Content be revised</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.alterThing }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>修订åååé¨é¨</p> |
| | | <p class="en">Distribute to the department after revision</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.afterDepart }}</td> |
| | | <td> |
| | | <p>ååæ¾é¨é¨</p> |
| | | <p class="en">The original distribution department</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.beforeDepart }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>ç³è¯·é¨é¨ä¸»ç®¡æè§</p> |
| | | <p class="en">Opinion of the head of the applicant department</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <p>åå¶å®é¨é¨æè§</p> |
| | | <p class="en">Original formulation of the department's opinion</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <p>åå®¡æ ¸é¨é¨æè§</p> |
| | | <p class="en">Opinion of the original audit department</p> |
| | | </td> |
| | | <td> |
| | | <p>æ¹å</p> |
| | | <p class="en">Ratify</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | {{ currentInfo.applicant }} |
| | | </td> |
| | | <td colspan="2"> |
| | | {{ currentInfo.formulation }} |
| | | </td> |
| | | <td colspan="2"> |
| | | {{ currentInfo.audit }} |
| | | </td> |
| | | <td> |
| | | <img :src="javaApi + 'img/' + currentInfo.ratifyUserUrl" style="width: 100%;" alt="æ¹å人ç¾å"> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="æä»¶é¢è§" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen> |
| | | <h4>修订å
容</h4> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.afterUrl" :currentFile="{}" /> |
| | | <h4>åå
容</h4> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.beforeUrl" :currentFile="{}" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { exportHtmlToPDF } from '@/utils/downHtmlToPDF' |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | exportOutManageRecordAudit, |
| | | addManageRecordAudit, |
| | | doManageRecordAudit, |
| | | selectCNSAPersonTree, |
| | | ratifyManageRecordAudit, |
| | | pageManageRecordAudit, |
| | | delManageRecordAudit, |
| | | } from '@/api/cnas/systemManagement/documentRecords.js' |
| | | import { |
| | | pageManageDocumentList, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | export default { |
| | | components: { |
| | | filePreview, |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: true, |
| | | outPower: true, |
| | | outLoading: false, |
| | | lookDialogVisible: false, |
| | | addLoading: false, |
| | | title: 'æ°å¢', |
| | | addInfo: { |
| | | method: '修订', |
| | | }, |
| | | addDialogVisible: false, |
| | | detailDialogVisible: false, |
| | | fileList: [], |
| | | personList: [], |
| | | list: [], |
| | | file: null, |
| | | title0: 'æ¥ç', |
| | | currentInfo: {}, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æä»¶ç¼å·", prop: "documentCode" }, |
| | | { label: "ç« èå·", prop: "capter", width: "120px" }, |
| | | { |
| | | label: "页ç ", |
| | | prop: "pages", |
| | | }, |
| | | { label: "修订次æ°", prop: "number" }, |
| | | { label: "ä¿®æ¹åçæ¬å·", prop: "beforeVersion" }, |
| | | { label: "ä¿®æ¹åçæ¬å·", prop: "afterVersion" }, |
| | | { label: "ä¿®æ¹å
容", prop: "alterThing" }, |
| | | { label: "修订人", prop: "alterUserName" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { label: "æ¥æ", prop: "date" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æä»¶é¢è§", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook0(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleOut(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleEdit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleRatify(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "ç³è¯·æè§", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handlework0(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "åå®å¶æè§", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handlework1(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "åå®¡æ ¸æè§", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handlework2(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList() |
| | | this.getFileList() |
| | | this.getAuthorizedPerson() |
| | | this.selectTreeList() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let out = false; |
| | | let ratify = false |
| | | let audit1 = false |
| | | let audit2 = false |
| | | let audit3 = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordAudit') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordAudit') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordAudit') { |
| | | ratify = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordAudit') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit1') { |
| | | audit1 = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit2') { |
| | | audit2 = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit3') { |
| | | audit3 = true |
| | | } |
| | | } |
| | | if (!audit3) { |
| | | this.componentData.do.splice(8, 1) |
| | | } |
| | | if (!audit2) { |
| | | this.componentData.do.splice(7, 1) |
| | | } |
| | | if (!audit1) { |
| | | this.componentData.do.splice(6, 1) |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(5, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | }, |
| | | openAdd() { |
| | | this.addInfo = { |
| | | method: '修订', |
| | | } |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown() { |
| | | this.outLoading = true |
| | | exportOutManageRecordAudit(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导åºå¤±è´¥') |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, "æä»¶ä¿®è®¢è¡¨"); |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageRecordAudit({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList() { |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.records.map(m => { |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err => { }) |
| | | }, |
| | | getCurrentFile(e) { }, |
| | | handleAdd() { |
| | | if (!this.addInfo.documentCode) return this.$message({ type: 'error', message: "请è¾å
¥æä»¶ç¼å·" }) |
| | | if (!this.addInfo.id) { |
| | | // æ°å¢ |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if (this.file) { |
| | | fd.append("file", this.file.raw); |
| | | } |
| | | for (let m in this.addInfo) { |
| | | fd.append(m, this.addInfo[m]) |
| | | } |
| | | this.addLoading = true |
| | | addManageRecordAudit(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ·»å æå' |
| | | }) |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ·»å 失败' |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | // ä¿®æ¹ |
| | | let { id, method, documentCode, documentName, capter, pages, beforeVersion, afterVersion, alterUser, alterThing, reason, beforeDepart, afterDepart, number, applicant, formulation, audit, date } = this.addInfo |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if (this.file) { |
| | | fd.append("file", this.file.raw); |
| | | } |
| | | let obj = { id, method, documentCode, documentName, capter, pages, beforeVersion, afterVersion, alterUser, alterThing, reason, beforeDepart, afterDepart, number, applicant, formulation, audit, date } |
| | | for (let m in obj) { |
| | | if (this.addInfo[m]) { |
| | | fd.append(m, this.addInfo[m]) |
| | | } |
| | | } |
| | | this.addLoading = true |
| | | doManageRecordAudit(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ·»å 失败' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | // æ¥è¯¢æ å½¢å表 |
| | | selectTreeList() { |
| | | selectCNSAPersonTree().then((res) => { |
| | | this.list = res.data[0].children; |
| | | }); |
| | | }, |
| | | handleChangeUpload(file, fileLists) { |
| | | this.file = file |
| | | // this.$set(this.addInfo,'name',file.name) |
| | | }, |
| | | handleEdit(row) { |
| | | this.addInfo = row |
| | | this.title = 'ä¿®æ¹' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å®¡æ¹ |
| | | handleRatify(row) { |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æ¹å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | ratifyManageRecordAudit({ id: row.id }).then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('æä½æå'); |
| | | this.refreshTable(); |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error('æä½å¤±è´¥'); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | handlework0(row) { |
| | | this.addInfo = row |
| | | this.title = 'ç³è¯·é¨é¨ä¸»ç®¡æè§' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handlework1(row) { |
| | | this.addInfo = row |
| | | this.title = 'åå®å¶é¨é¨æè§' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handlework2(row) { |
| | | this.addInfo = row |
| | | this.title = 'åå®¡æ ¸é¨é¨æè§' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleLook(row) { |
| | | this.title0 = 'æ¥ç' |
| | | this.currentInfo = row |
| | | this.detailDialogVisible = true; |
| | | }, |
| | | handleOut(row) { |
| | | this.currentInfo = row |
| | | this.title0 = 'ä¸è½½' |
| | | this.detailDialogVisible = true; |
| | | setTimeout(() => { |
| | | this.$nextTick(() => { |
| | | const element = document.getElementById("dialogBody"); |
| | | exportHtmlToPDF(element, 'æä»¶' + row.method + 'ç³è¯·è¡¨').then(res => { |
| | | this.detailDialogVisible = false; |
| | | }) |
| | | }) |
| | | }, 500); |
| | | }, |
| | | handleLook0(row) { |
| | | this.currentInfo = row; |
| | | this.lookDialogVisible = true |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageRecordAudit({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | border-collapse: collapse; |
| | | } |
| | | |
| | | .tables td { |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | |
| | | .en { |
| | | font-size: 12px; |
| | | word-break: break-word; |
| | | /* èªå¨æè¡ */ |
| | | overflow-wrap: break-word; |
| | | /* 鲿¢æº¢åº */ |
| | | white-space: normal; |
| | | /* é»è®¤æ¢è¡ */ |
| | | } |
| | | |
| | | .heads td { |
| | | border: 1px dashed black; |
| | | /* åå
æ ¼çè线 */ |
| | | padding: 8px; |
| | | text-align: left; |
| | | } |
| | | |
| | | .downPdf { |
| | | opacity: 0 !important; |
| | | } |
| | | |
| | | h4.title { |
| | | position: relative; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | box-sizing: border-box; |
| | | padding-left: 16px; |
| | | margin-left: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | h4.title::after { |
| | | content: ''; |
| | | width: 4px; |
| | | height: 20px; |
| | | background: #3A7BFA; |
| | | position: absolute; |
| | | top: 5px; |
| | | left: 0; |
| | | } |
| | | |
| | | >>>.el-dialog__body { |
| | | height: auto; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 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="{ correctId: info.correctId }" :headers="uploadHeader" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> |
| | | <el-button size="small" style="height: 38px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <div> |
| | | <limsTable ref="yearTable" :column="columnData" :height="'calc(100vh - 30em)'" :highlightCurrentRow="true" |
| | | :table-data="tableData" :table-loading="tableLoading" style="margin-top: 0.5em;" :page="page"> |
| | | </limsTable> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.fileUrl" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | getInternalCorrectFileList, |
| | | delInternalCorrectFile, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | export default { |
| | | name: 'ViewTestRecord', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { filePreview, 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.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, |
| | | page: { |
| | | total: 0, |
| | | size: -1, |
| | | current: -1, |
| | | }, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.filesDialogVisible = true |
| | | this.info = row |
| | | this.searchTableList() |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList() { |
| | | this.tableLoading = true |
| | | getInternalCorrectFileList({ correctId: this.info.correctId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | 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 |
| | | this.$download.saveAs(url, row.fileName) |
| | | } else { |
| | | url = this.javaApi + '/word/' + row.fileUrl |
| | | this.$download.saveAs(url, row.fileName) |
| | | } |
| | | }, |
| | | // å é¤ |
| | | delete(row) { |
| | | this.tableLoading = true |
| | | delInternalCorrectFile({ correctFileId: row.correctFileId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | 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() |
| | | } else { |
| | | this.$message.error(response.message); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | fileAction() { |
| | | return this.javaApi + '/internalCorrect/uploadInternalCorrectFile' |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">å审é¨é¨ï¼</span> |
| | | <el-input v-model="searchForm.department" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | <audit-inspection-dia v-if="auditInspectionDia" ref="auditInspectionDia" |
| | | @closeImplementDia="closeImplementDia"></audit-inspection-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import AuditInspectionDia from './auditInspectionDia.vue'; |
| | | import { |
| | | pageInternalCheck, |
| | | delInternalCheck, |
| | | exportInternalCheck |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | |
| | | export default { |
| | | name: 'auditInspection', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { AuditInspectionDia, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | department: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'å审é¨é¨', |
| | | prop: 'department', |
| | | }, |
| | | { |
| | | label: 'é¨é¨è´è´£äºº', |
| | | prop: 'departmentHead', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸å', |
| | | prop: 'auditor', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ¥æ', |
| | | prop: 'reviewDate', |
| | | }, { |
| | | 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: 'ratifyRemark', |
| | | minWidth: '140' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('ratify', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | auditInspectionDia: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageInternalCheck({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.auditInspectionDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.auditInspectionDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeImplementDia() { |
| | | this.auditInspectionDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.department = ''; |
| | | this.searchList() |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delInternalCheck({ checkId: row.checkId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportInternalCheck({ checkId: row.checkId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å
å®¡æ£æ¥' + '.docx'); |
| | | }) |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="å
é¨å®¡æ ¸å®æ½è®¡å" width="80%" @close="closeImplementDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="auto"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å审é¨é¨" prop="department"> |
| | | <el-input v-model="form.department" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é¨é¨è´è´£äºº" prop="departmentHead"> |
| | | <el-input v-model="form.departmentHead" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸å" prop="auditor"> |
| | | <el-input v-model="form.auditor" :disabled="operationType === 'ratify'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸æ¥æ" prop="reviewDate"> |
| | | <el-date-picker v-model="form.reviewDate" :disabled="operationType === 'ratify'" clearable |
| | | 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-form> |
| | | <div v-if="operationType !== 'ratify'" 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> |
| | | <el-table :data="checkDetailList" border height="300" style="width: 100%"> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column header-align="center" label="æ¶åè¦ç´ åè´¨éä½ç³»æä»¶æ¡æ¬¾" prop="element"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.element" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="å®¡æ ¸å
容" prop="content"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.content" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="å®¡æ ¸æ¹å¼" prop="method"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.method" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="å®¡æ ¸ç»æè®°å½" prop="resultRecords" width="180"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.resultRecords" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="ä¸ç¬¦åæ§è´¨" prop="nonNature" width="180"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.nonNature" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" @click="ratify(0)">䏿¹å</el-button> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="ratify(1)">æ¹ |
| | | å</el-button> |
| | | <el-button v-if="operationType !== 'ratify'" @click="closeImplementDia">å æ¶</el-button> |
| | | <el-button v-if="operationType !== 'ratify'" :loading="loading" type="primary" @click="handleEdit">æ |
| | | 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="approvalDialog" title="æ¹å" width="30%" @close="approvalDialog = false"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="ratifyRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="approvalLoading" @click="approvalDialog = false">å æ¶</el-button> |
| | | <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getInternalCheckOne, |
| | | addInternalCheck, |
| | | updateInternalCheck, |
| | | ratifyInternalCheck, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | export default { |
| | | name: 'auditInspectionDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | department: '', |
| | | departmentHead: '', |
| | | auditor: '', |
| | | reviewDate: '', |
| | | }, |
| | | rules: { |
| | | department: [{ required: true, message: '请填åå审é¨é¨', trigger: 'blur' }], |
| | | departmentHead: [{ required: true, message: '请填åé¨é¨è´è´£äºº', trigger: 'blur' }], |
| | | auditor: [{ required: true, message: '请填åå®¡æ ¸å', trigger: 'blur' }], |
| | | reviewDate: [{ required: true, message: '请填åå®¡æ ¸æ¥æ', trigger: 'blur' }], |
| | | }, |
| | | checkDetailList: [], |
| | | operationType: '', |
| | | approvalDialog: false, |
| | | approvalLoading: false, |
| | | ratifyRemark: '', |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo(row) { |
| | | this.diaLoading = true |
| | | getInternalCheckOne({ checkId: row.checkId }).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | this.checkDetailList = this.form.checkDetailList |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.checkDetailList.length === 0) { |
| | | this.$message.warning('请添å è¡¨æ ¼æ°æ®') |
| | | return |
| | | } |
| | | this.loading = true |
| | | const internalCheckDto = this.HaveJson(this.form) |
| | | internalCheckDto.checkDetailList = this.HaveJson(this.checkDetailList) |
| | | if (this.operationType === 'add') { |
| | | addInternalCheck(internalCheckDto).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | updateInternalCheck(internalCheckDto).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | ratify(ratifyStatus) { |
| | | // 䏿¹åéè¦å¡«åæ¹åå
容 |
| | | if (ratifyStatus === 0) { |
| | | this.approvalDialog = true |
| | | } else { |
| | | this.handleApproval(ratifyStatus) |
| | | } |
| | | }, |
| | | // æäº¤æ¹åä¿¡æ¯ |
| | | handleApproval(ratifyStatus) { |
| | | this.approvalLoading = true |
| | | const internalCheckDto = this.HaveJson(this.form) |
| | | internalCheckDto.ratifyStatus = ratifyStatus |
| | | internalCheckDto.ratifyRemark = ratifyStatus === 0 ? this.ratifyRemark : '' |
| | | ratifyInternalCheck(internalCheckDto).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.closeImplementDia(this.departId); |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | // å¢å è¡¨æ ¼è¡æ°æ® |
| | | addRow() { |
| | | this.checkDetailList.push({ |
| | | element: '', |
| | | content: '', |
| | | method: '', |
| | | resultRecords: '', |
| | | nonNature: '', |
| | | }) |
| | | }, |
| | | // æ¸
ç©ºè¡¨æ ¼æ°æ® |
| | | clearTable() { |
| | | this.checkDetailList = [] |
| | | }, |
| | | closeImplementDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeImplementDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">æ¶é´ï¼</span> |
| | | <el-input v-model="searchForm.meetingDate" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | <audit-meeting-sign-dia v-if="auditMeetingSignDia" ref="auditMeetingSignDia" |
| | | @closeYearDia="closeYearDia"></audit-meeting-sign-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import AuditMeetingSignDia from './auditMeetingSignDia.vue'; |
| | | import { |
| | | pageInternalMeeting, |
| | | delInternalMeeting, |
| | | exportInternalMeeting, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | |
| | | export default { |
| | | name: 'auditMeetingSign', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { AuditMeetingSignDia, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | meetingDate: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ¶é´', |
| | | prop: 'meetingDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '主æäºº', |
| | | prop: 'compere', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å°ç¹', |
| | | prop: 'place', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¼è®®ä¸»é¢', |
| | | prop: 'subject', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åä¼äººå', |
| | | prop: 'participantName', |
| | | minWidth: '120' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | auditMeetingSignDia: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageInternalMeeting({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾å¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.auditMeetingSignDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.auditMeetingSignDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeYearDia() { |
| | | this.auditMeetingSignDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.meetingDate = ''; |
| | | this.searchList() |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delInternalMeeting({ meetingId: row.meetingId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportInternalMeeting({ meetingId: row.meetingId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å
审ä¼è®®ç¾å°' + '.docx'); |
| | | }) |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="å
审ä¼è®®ç¾å°è¡¨" width="1000px" @close="closeYearDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¶é´" prop="meetingDate"> |
| | | <el-date-picker v-model="form.meetingDate" clearable 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="compere"> |
| | | <el-input v-model="form.compere" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°ç¹" prop="place"> |
| | | <el-input v-model="form.place" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¼è®®ä¸»é¢" prop="subject"> |
| | | <el-input v-model="form.subject" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åä¼äººå" prop="participant"> |
| | | <el-select v-model="form.participant" clearable filterable multiple placeholder="è¯·éæ©" size="small" |
| | | style="width: 100%;"> |
| | | <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeYearDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { |
| | | getInternalMeetingOne, |
| | | addInternalMeeting, |
| | | updateInternalMeeting, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | export default { |
| | | name: 'auditMeetingSignDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | meetingDate: '', |
| | | compere: '', |
| | | place: '', |
| | | subject: '', |
| | | participant: [], |
| | | }, |
| | | rules: { |
| | | meetingDate: [{ required: true, message: '请填åä¼è®®æ¶é´', trigger: 'blur' }], |
| | | compere: [{ required: true, message: '请填å主æäºº', trigger: 'blur' }], |
| | | place: [{ required: true, message: '请填åå°ç¹', trigger: 'blur' }], |
| | | subject: [{ required: true, message: '请填åä¼è®®ä¸»é¢', trigger: 'blur' }], |
| | | participant: [{ required: true, message: 'è¯·éæ©åå 人å', trigger: 'change' }], |
| | | }, |
| | | operationType: '', |
| | | personList: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | this.getAuthorizedPerson() |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo(row) { |
| | | this.diaLoading = true |
| | | getInternalMeetingOne({ meetingId: row.meetingId }).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | this.form.participant = this.form.participant.split(',').map(Number) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const internalMeeting = this.HaveJson(this.form) |
| | | internalMeeting.participant = internalMeeting.participant.join(',') |
| | | if (this.operationType === 'add') { |
| | | addInternalMeeting(internalMeeting).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | updateInternalMeeting(internalMeeting).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeYearDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeYearDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .table td { |
| | | height: 34px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 4px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">å®¡æ ¸ç®çï¼</span> |
| | | <el-input v-model="searchForm.purposes" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | <audit-report-dia v-if="auditReportDia" ref="auditReportDia" |
| | | @closeImplementDia="closeImplementDia"></audit-report-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import AuditReportDia from './auditReportDia.vue'; |
| | | import { |
| | | delInternalReport, |
| | | pageInternalReport, |
| | | exportInternalReport, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | export default { |
| | | name: 'auditReport', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { AuditReportDia, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | purposes: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'å®¡æ ¸ç®ç', |
| | | prop: 'purposes', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸ä¾æ®', |
| | | prop: 'basis', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ¥æ', |
| | | prop: 'reviewDate', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ¹æ³', |
| | | prop: 'method', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸èå´', |
| | | prop: 'scope', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸è´£ä»»è
', |
| | | prop: 'responsible', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸ç»é¿', |
| | | prop: 'leader', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸å', |
| | | prop: 'auditor', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸ç»åå·¥æ
åµ', |
| | | prop: 'division', |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'å®¡æ ¸ç¶æ', |
| | | prop: 'examineStatus', |
| | | 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: 'examineRemark', |
| | | minWidth: '140' |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'è´¨éè´è´£äººç¶æ', |
| | | prop: 'qualityStatus', |
| | | 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: 'qualityRemark', |
| | | minWidth: '140' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.examineStatus === 1 || row.examineStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å®¡æ ¸', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('examine', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.examineStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æè§', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('ratify', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.qualityStatus === 1 || row.examineStatus === 0 || row.examineStatus === null) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.qualityStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | auditReportDia: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageInternalReport({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.auditReportDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.auditReportDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeImplementDia() { |
| | | this.auditReportDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.purposes = ''; |
| | | this.searchList() |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delInternalReport({ reportId: row.reportId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportInternalReport({ reportId: row.reportId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å
审æ¥å' + '.docx'); |
| | | }) |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="å
é¨å®¡æ ¸æ¥å" width="80%" @close="closeImplementDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸ç®ç" prop="purposes"> |
| | | <el-input v-model="form.purposes" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸ä¾æ®" prop="basis"> |
| | | <el-input v-model="form.basis" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸æ¥æ" prop="reviewDate"> |
| | | <el-date-picker v-model="form.reviewDate" |
| | | :disabled="operationType === 'examine' || operationType === 'ratify'" clearable 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="24"> |
| | | <el-form-item label="å®¡æ ¸æ¹æ³" prop="method"> |
| | | <el-input v-model="form.method" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸èå´" prop="scope"> |
| | | <el-input v-model="form.scope" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸è´£ä»»è
" prop="responsible"> |
| | | <el-input v-model="form.responsible" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸ç»é¿" prop="leader"> |
| | | <el-input v-model="form.leader" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸å" prop="auditor"> |
| | | <el-input v-model="form.auditor" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸ç»åå·¥æ
åµ" prop="division"> |
| | | <el-input v-model="form.division" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸æ¦åµ" prop="overview"> |
| | | <el-input v-model="form.overview" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å
审ç»å¯¹ä¸å¿ç®¡çä½ç³»çç»è®ºæ§è¯ä»·" prop="conclusion"> |
| | | <el-input v-model="form.conclusion" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ¹è¿æè§" prop="suggest"> |
| | | <el-input v-model="form.suggest" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="é¢è®¡åå®¡æ ¸é¨é¨å®æçº æ£æªæ½æéæ¶é´" prop="actionDate"> |
| | | <el-input v-model="form.actionDate" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ä¸ç¬¦åæ
嵿´æ¹æ»ä½è·è¿ç¡®è®¤äºº" prop="followUser"> |
| | | <el-input v-model="form.followUser" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ä¸ç¬¦åæ
嵿´æ¹æ»ä½è·è¿ç¡®è®¤è®°å½" prop="followRecord"> |
| | | <el-input v-model="form.followRecord" |
| | | :disabled="operationType === 'examine' || operationType === 'ratify'" :rows="3" clearable size="small" |
| | | type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ¬æ¥ååæ¾èå´" prop="reportScope"> |
| | | <el-input v-model="form.reportScope" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="operationType === 'ratify'" :span="24"> |
| | | <el-form-item label="è´¨éè´è´£äººæè§" prop="qualityRemark"> |
| | | <el-input v-model="form.qualityRemark" :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType === 'examine'" :loading="loading" @click="examine(0)">ä¸éè¿</el-button> |
| | | <el-button v-if="operationType === 'examine'" :loading="loading" type="primary" @click="examine(1)">é |
| | | è¿</el-button> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" @click="handleApproval(0)">䏿¹å</el-button> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="handleApproval(1)">æ¹ |
| | | å</el-button> |
| | | <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" @click="closeImplementDia">å |
| | | æ¶</el-button> |
| | | <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" :loading="loading" type="primary" |
| | | @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="examineDialog" title="å®¡æ ¸" width="30%" @close="examineDialog = false"> |
| | | <span> |
| | | å®¡æ ¸å¤æ³¨ï¼ |
| | | <el-input v-model="examineRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="examineLoading" @click="examineDialog = false">å æ¶</el-button> |
| | | <el-button :loading="examineLoading" type="primary" @click="handleExamine(0)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <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="approvalDialog = false">å æ¶</el-button> |
| | | <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getInternalReportOne, |
| | | addInternalReport, |
| | | updateInternalReport, |
| | | examineInternalReport, |
| | | qualityInternalReport, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | export default { |
| | | name: 'auditReportDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | purposes: '', |
| | | basis: '', |
| | | reviewDate: '', |
| | | method: '', |
| | | scope: '', |
| | | responsible: '', |
| | | leader: '', |
| | | auditor: '', |
| | | division: '', |
| | | overview: '', |
| | | conclusion: '', |
| | | suggest: '', |
| | | actionDate: '', |
| | | followUser: '', |
| | | followRecord: '', |
| | | reportScope: '', |
| | | qualityRemark: '', |
| | | }, |
| | | rules: { |
| | | purposes: [{ required: true, message: '请填åå®¡æ ¸ç®ç', trigger: 'blur' }], |
| | | basis: [{ required: true, message: '请填åå®¡æ ¸ä¾æ®', trigger: 'blur' }], |
| | | reviewDate: [{ required: true, message: '请填åå®¡æ ¸æ¥æ', trigger: 'change' }], |
| | | method: [{ required: true, message: '请填åå®¡æ ¸æ¹æ³', trigger: 'blur' }], |
| | | scope: [{ required: true, message: '请填åå®¡æ ¸èå´', trigger: 'blur' }], |
| | | responsible: [{ required: true, message: '请填åå®¡æ ¸è´£ä»»è
', trigger: 'blur' }], |
| | | leader: [{ required: true, message: '请填åå®¡æ ¸ç»é¿', trigger: 'blur' }], |
| | | auditor: [{ required: true, message: '请填åå®¡æ ¸å', trigger: 'blur' }], |
| | | division: [{ required: true, message: '请填åå®¡æ ¸ç»åå·¥æ
åµ', trigger: 'blur' }], |
| | | overview: [{ required: true, message: '请填åå®¡æ ¸æ¦åµ', trigger: 'blur' }], |
| | | conclusion: [{ required: true, message: '请填å', trigger: 'blur' }], |
| | | suggest: [{ required: true, message: '请填å', trigger: 'blur' }], |
| | | actionDate: [{ required: true, message: '请填å', trigger: 'blur' }], |
| | | followUser: [{ required: true, message: '请填å', trigger: 'blur' }], |
| | | followRecord: [{ required: true, message: '请填å', trigger: 'blur' }], |
| | | reportScope: [{ required: true, message: '请填å', trigger: 'blur' }], |
| | | qualityRemark: [{ required: true, message: '请填å', trigger: 'blur' }], |
| | | }, |
| | | operationType: '', |
| | | approvalDialog: false, |
| | | approvalLoading: false, |
| | | examineDialog: false, |
| | | examineLoading: false, |
| | | qualityRemark: '', |
| | | examineRemark: '', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo(row) { |
| | | this.diaLoading = true |
| | | getInternalReportOne({ reportId: row.reportId }).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const internalReport = this.HaveJson(this.form) |
| | | if (this.operationType === 'add') { |
| | | addInternalReport(internalReport).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | updateInternalReport(internalReport).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // å®¡æ ¸æµç¨ |
| | | examine(examineStatus) { |
| | | if (examineStatus === 0) { |
| | | this.examineDialog = true |
| | | } else { |
| | | this.handleExamine(examineStatus) |
| | | } |
| | | }, |
| | | handleExamine(examineStatus) { |
| | | this.examineLoading = true |
| | | const internalReport = this.HaveJson(this.form) |
| | | internalReport.examineStatus = examineStatus |
| | | examineInternalReport(internalReport).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.closeImplementDia(this.departId); |
| | | } |
| | | this.examineLoading = false |
| | | }).catch(() => { |
| | | this.examineLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å®¡æ ¸ä¿¡æ¯ |
| | | handleApproval(qualityStatus) { |
| | | this.approvalLoading = true |
| | | const internalReport = this.HaveJson(this.form) |
| | | internalReport.qualityStatus = qualityStatus |
| | | qualityInternalReport(internalReport).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.closeImplementDia(this.departId); |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | closeImplementDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeImplementDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | |
| | | >>>.el-dialog__body { |
| | | max-height: 42em; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | >>>.is-required { |
| | | margin-bottom: 6px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 200px">ä¸åæ ¼æè¿°ï¼</span> |
| | | <el-input v-model="searchForm.raiseResult" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | <corrective-action-d-ia v-if="correctiveActionDIa" ref="correctiveActionDIa" |
| | | @closeRectifyDia="closeRectifyDia"></corrective-action-d-ia> |
| | | <view-test-record v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></view-test-record> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import CorrectiveActionDIa from './correctiveActionDIa.vue'; |
| | | import ViewTestRecord from './ViewTestRecord.vue'; |
| | | import { |
| | | pageInternalCorrect, |
| | | exportInternalCorrect, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | |
| | | export default { |
| | | name: 'correctiveAction', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { CorrectiveActionDIa, limsTable, TableCard, ViewTestRecord }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | raiseResult: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'ä¸åæ ¼æå离äºå®çæè¿°', |
| | | prop: 'raiseResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åå åæ', |
| | | prop: 'causeResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'çº æ£æªæ½', |
| | | prop: 'correctResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '宿½éªè¯ç»æ', |
| | | prop: 'validationResult', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'çº æ£', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('rectify', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¥çéä»¶', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewFiles(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | correctiveActionDIa: false, |
| | | viewTestRecordDialog: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = { |
| | | raiseResult: this.searchForm.raiseResult, |
| | | } |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageInternalCorrect({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.raiseResult = ''; |
| | | this.searchList() |
| | | }, |
| | | // æ¥çéä»¶ |
| | | viewFiles(row) { |
| | | this.viewTestRecordDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.viewTestRecordDialog.openDia(row) |
| | | }) |
| | | }, |
| | | openFormDia(type, row) { |
| | | this.correctiveActionDIa = true |
| | | this.$nextTick(() => { |
| | | this.$refs.correctiveActionDIa.openDia(type, row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportInternalCorrect({ correctId: row.correctId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å
å®¡çº æ£æªæ½' + '.docx'); |
| | | }) |
| | | }, |
| | | closeRectifyDia() { |
| | | this.correctiveActionDIa = false |
| | | this.searchList() |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="çº æ£æªæ½å¤çå" |
| | | width="60%" @close="closeRectifyDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="ä¸åæ ¼æå离äºå®çæè¿°" @click.native="setStep(0)"></el-step> |
| | | <el-step title="åå åæ" @click.native="setStep(1)"></el-step> |
| | | <el-step title="çº æ£æªæ½" @click.native="setStep(2)"></el-step> |
| | | <el-step title="宿½éªè¯ç»æ" @click.native="setStep(3)"></el-step> |
| | | </el-steps> |
| | | <div> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>ä¸åæ ¼æå离äºå®çæè¿°ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.raiseResult" :rows="4" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.raiseResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td v-if="currentStep === 0" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 0" class="td-info" colspan="3"> |
| | | <el-select v-model="form.causeUserId" clearable filterable placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0 && currentStep !== 0"> |
| | | <td class="td-title"> |
| | | <p>æåºäººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.raiseUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æåºé¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.raiseDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0 && currentStep !== 0"> |
| | | <td class="td-title"> |
| | | <p>æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.raiseTime }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>åå åæï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 1 && currentStep === 1" v-model="form.causeResult" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.causeResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1 && currentStep !== 1"> |
| | | <td class="td-title"> |
| | | <p>åå åæäººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.causeUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.causeDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1 && currentStep !== 1"> |
| | | <td class="td-title"> |
| | | <p>åå åææ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.causeTime }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td v-if="currentStep === 1" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-info" colspan="3"> |
| | | <el-select v-model="form.correctUserId" clearable filterable placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>çº æ£æªæ½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.correctResult" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.correctResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>æåºè¦æ±é¨é¨ç¡®è®¤ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.raiseDepartmentAffirm" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.raiseDepartmentAffirm }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2 && currentStep !== 2"> |
| | | <td class="td-title"> |
| | | <p>çº æ£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.correctUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.correctDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2 && currentStep !== 2"> |
| | | <td class="td-title"> |
| | | <p>çº æ£æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.correctTime }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td v-if="currentStep === 2" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 2" class="td-info" colspan="3"> |
| | | <el-select v-model="form.validationUserId" clearable filterable placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>宿½éªè¯ç»æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 3 && currentStep === 3" v-model="form.validationResult" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 3 && currentStep !== 3" class="td-info1"> {{ form.validationResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3 && currentStep !== 3"> |
| | | <td class="td-title"> |
| | | <p>éªè¯äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.validationUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>责任é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.validationDepartment }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3 && currentStep !== 3"> |
| | | <td class="td-title"> |
| | | <p>éªè¯æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | {{ form.validationTime }} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeRectifyDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep !== 4" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getInternalCorrect, |
| | | addInternalCorrect, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | export default { |
| | | name: 'correctiveActionDIa', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | showStep: 0, |
| | | form: { |
| | | superviseDetailsId: '', |
| | | raiseResult: '', |
| | | vdeRaiseResult: '', |
| | | causeUserId: '', |
| | | raiseUserName: '', |
| | | raiseDepartment: '', |
| | | raiseTime: '', |
| | | causeResult: '', |
| | | causeUserName: '', |
| | | causeDepartment: '', |
| | | causeTime: '', |
| | | correctUserId: '', |
| | | correctResult: '', |
| | | raiseDepartmentAffirm: '', |
| | | correctUserName: '', |
| | | correctDepartment: '', |
| | | correctTime: '', |
| | | validationUserId: '', |
| | | validationResult: '', |
| | | validationUserName: '', |
| | | validationDepartment: '', |
| | | validationTime: '', |
| | | }, |
| | | editLoad: false, |
| | | personList: [], |
| | | supervisedUserList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | } |
| | | this.getAuthorizedPerson() // è·å人åå表 |
| | | this.getSupervisedUserList() // è·åå½åé¨é¨äººå |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | getInternalCorrect({ correctId: row.correctId }).then(res => { |
| | | if (res.code === 201) return |
| | | if (res.data.superviseDetailsCorrectId === null) { |
| | | this.showStep = 0 |
| | | this.currentStep = 0 |
| | | } else { |
| | | this.form = res.data |
| | | if (res.data.isFinish === 0) { |
| | | if (res.data.causeUserId) { |
| | | this.showStep = 1 |
| | | this.currentStep = 1 |
| | | } |
| | | if (res.data.correctUserId) { |
| | | this.showStep = 2 |
| | | this.currentStep = 2 |
| | | } |
| | | if (res.data.validationUserId) { |
| | | this.showStep = 3 |
| | | this.currentStep = 3 |
| | | } |
| | | } else { |
| | | this.currentStep = 4 |
| | | this.showStep = 3 |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit() { |
| | | if (this.currentStep === 0) { |
| | | if (!this.form.raiseResult) { |
| | | this.$message.warning('请填åä¸åæ ¼æè¿°') |
| | | return |
| | | } |
| | | if (!this.form.causeUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 1) { |
| | | if (!this.form.causeResult) { |
| | | this.$message.warning('请填ååå åæ') |
| | | return |
| | | } |
| | | if (!this.form.correctUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 2) { |
| | | if (!this.form.correctResult) { |
| | | this.$message.warning('请填åçº æ£æªæ½') |
| | | return |
| | | } |
| | | if (!this.form.validationUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 3) { |
| | | if (!this.form.validationResult) { |
| | | this.$message.warning('请填å宿½éªè¯ç»æ') |
| | | return |
| | | } |
| | | } |
| | | this.editLoad = true |
| | | this.form.supervisedTime = '' |
| | | this.form.flowType = this.currentStep |
| | | addInternalCorrect(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeRectifyDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeRectifyDia() { |
| | | this.formDia = false |
| | | this.$emit('closeRectifyDia') |
| | | }, |
| | | setStep(step) { |
| | | this.showStep = step |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | getSupervisedUserList() { |
| | | selectUserCondition({ type: 2 }).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.supervisedUserList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 10vh auto 50px !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info { |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info1 { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="å
é¨å®¡æ ¸å®æ½è®¡å" width="80%" @close="closeImplementDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="auto"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸ç®ç" prop="purposes"> |
| | | <el-input v-model="form.purposes" :disabled="operationType === 'ratify'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸æ§è´¨" prop="nature"> |
| | | <el-input v-model="form.nature" :disabled="operationType === 'ratify'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸èå´" prop="scope"> |
| | | <el-input v-model="form.scope" :disabled="operationType === 'ratify'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®¡æ ¸ä¾æ®" prop="basis"> |
| | | <el-input v-model="form.basis" :disabled="operationType === 'ratify'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸ç»é¿" prop="teamLeader"> |
| | | <el-input v-model="form.teamLeader" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
审å" prop="internalAuditor"> |
| | | <el-input v-model="form.internalAuditor" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸æ¥æ" prop="reviewDate"> |
| | | <el-date-picker v-model="form.reviewDate" :disabled="operationType === 'ratify'" clearable |
| | | 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="å®¡æ ¸æ¹æ³" prop="auditMethod"> |
| | | <el-input v-model="form.auditMethod" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="馿¬¡ä¼è®®æ¶é´" prop="firstMeetingTime"> |
| | | <el-date-picker v-model="form.firstMeetingTime" :disabled="operationType === 'ratify'" clearable |
| | | 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="æ«æ¬¡ä¼è®®æ¶é´" prop="lastMeetingTime"> |
| | | <el-date-picker v-model="form.lastMeetingTime" :disabled="operationType === 'ratify'" clearable |
| | | 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="å®¡æ ¸æ¥åæäº¤æ¥æ" prop="submitTime"> |
| | | <el-date-picker v-model="form.submitTime" :disabled="operationType === 'ratify'" clearable |
| | | 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="å®¡æ ¸æ¥ååæ¾èå´" prop="submitScope"> |
| | | <el-input v-model="form.submitScope" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <div v-if="operationType !== 'ratify'" 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> |
| | | <el-table :data="implementDetailList" border height="300" style="width: 100%"> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column header-align="center" label="æ¶é´" prop="implement"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.implement" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="åå®¡æ ¸é¨é¨" prop="department"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.department" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="责任人" prop="responsible"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.responsible" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="å®¡æ ¸å" prop="auditor" width="180"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.auditor" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="å®¡æ ¸å
容" prop="reviewContent" width="180"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.reviewContent" :disabled="operationType === 'ratify'" size="small" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" @click="ratify(0)">䏿¹å</el-button> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="ratify(1)">æ¹ |
| | | å</el-button> |
| | | <el-button v-if="operationType !== 'ratify'" @click="closeImplementDia">å æ¶</el-button> |
| | | <el-button v-if="operationType !== 'ratify'" :loading="loading" type="primary" @click="handleEdit">æ |
| | | 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="approvalDialog" title="æ¹å" width="30%" @close="approvalDialog = false"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="ratifyRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="approvalLoading" @click="approvalDialog = false">å æ¶</el-button> |
| | | <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getInternalImplementOne, |
| | | addInternalImplement, |
| | | updateInternalImplement, |
| | | ratifyInternalImplement, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | export default { |
| | | name: 'implementPlanDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | purposes: '', |
| | | nature: '', |
| | | scope: '', |
| | | basis: '', |
| | | teamLeader: '', |
| | | internalAuditor: '', |
| | | reviewDate: '', |
| | | auditMethod: '', |
| | | firstMeetingTime: '', |
| | | lastMeetingTime: '', |
| | | submitTime: '', |
| | | submitScope: '', |
| | | }, |
| | | rules: { |
| | | purposes: [{ required: true, message: '请填åå®¡æ ¸ç®ç', trigger: 'blur' }], |
| | | nature: [{ required: true, message: '请填åå®¡æ ¸æ§è´¨', trigger: 'blur' }], |
| | | scope: [{ required: true, message: '请填åå®¡æ ¸èå´', trigger: 'blur' }], |
| | | basis: [{ required: true, message: '请填åå®¡æ ¸ä¾æ®', trigger: 'blur' }], |
| | | teamLeader: [{ required: true, message: '请填åå®¡æ ¸ç»é¿', trigger: 'blur' }], |
| | | internalAuditor: [{ required: true, message: '请填åå
审å', trigger: 'blur' }], |
| | | reviewDate: [{ required: true, message: '请填åå®¡æ ¸æ¶é´', trigger: 'blur' }], |
| | | auditMethod: [{ required: true, message: '请填åå®¡æ ¸æ¹æ³', trigger: 'blur' }], |
| | | firstMeetingTime: [{ required: true, message: '请填å馿¬¡ä¼è®®æ¶é´', trigger: 'blur' }], |
| | | lastMeetingTime: [{ required: true, message: 'è¯·å¡«åæ«æ¬¡ä¼è®®æ¶é´', trigger: 'blur' }], |
| | | submitTime: [{ required: true, message: '请填åå®¡æ ¸æ¥åæäº¤æ¥æ', trigger: 'blur' }], |
| | | submitScope: [{ required: true, message: '请填åå®¡æ ¸æ¥ååæ¾èå´', trigger: 'blur' }], |
| | | }, |
| | | implementDetailList: [], |
| | | operationType: '', |
| | | approvalDialog: false, |
| | | approvalLoading: false, |
| | | ratifyRemark: '', |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo(row) { |
| | | this.diaLoading = true |
| | | getInternalImplementOne({ implementId: row.implementId }).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | this.implementDetailList = this.form.implementDetailList |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.implementDetailList.length === 0) { |
| | | this.$message.warning('请添å è¡¨æ ¼æ°æ®') |
| | | return |
| | | } |
| | | this.loading = true |
| | | const internalImplementDto = this.HaveJson(this.form) |
| | | internalImplementDto.implementDetailList = this.HaveJson(this.implementDetailList) |
| | | if (this.operationType === 'add') { |
| | | addInternalImplement(internalImplementDto).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | updateInternalImplement(internalImplementDto).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | ratify(ratifyStatus) { |
| | | // 䏿¹åéè¦å¡«åæ¹åå
容 |
| | | if (ratifyStatus === 0) { |
| | | this.approvalDialog = true |
| | | } else { |
| | | this.handleApproval(ratifyStatus) |
| | | } |
| | | }, |
| | | // æäº¤æ¹åä¿¡æ¯ |
| | | handleApproval(ratifyStatus) { |
| | | this.approvalLoading = true |
| | | const internalImplementDto = this.HaveJson(this.form) |
| | | internalImplementDto.ratifyStatus = ratifyStatus |
| | | internalImplementDto.ratifyRemark = ratifyStatus === 0 ? this.ratifyRemark : '' |
| | | ratifyInternalImplement(internalImplementDto).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.closeImplementDia(this.departId); |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | // å¢å è¡¨æ ¼è¡æ°æ® |
| | | addRow() { |
| | | this.implementDetailList.push({ |
| | | implement: '', |
| | | department: '', |
| | | responsible: '', |
| | | auditor: '', |
| | | reviewContent: '', |
| | | }) |
| | | }, |
| | | // æ¸
ç©ºè¡¨æ ¼æ°æ® |
| | | clearTable() { |
| | | this.implementDetailList = [] |
| | | }, |
| | | closeImplementDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeImplementDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 10vh auto 50px !important; |
| | | } |
| | | |
| | | >>>.el-dialog__body { |
| | | max-height: 38em; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">å®¡æ ¸ç®çï¼</span> |
| | | <el-input v-model="searchForm.purposes" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" @pagination="pagination" :page="page"> |
| | | </limsTable> |
| | | </div> |
| | | <implement-plan-dia v-if="implementPlanDia" ref="implementPlanDia" |
| | | @closeImplementDia="closeImplementDia"></implement-plan-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | pageInternalImplement, |
| | | delInternalImplement, |
| | | exportInternalImplement, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import ImplementPlanDia from './implementPlanDia.vue'; |
| | | |
| | | export default { |
| | | name: 'implementationPlan', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ImplementPlanDia, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | purposes: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'å®¡æ ¸ç®ç', |
| | | prop: 'purposes', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ§è´¨', |
| | | prop: 'nature', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸èå´', |
| | | prop: 'scope', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸ä¾æ®', |
| | | prop: 'basis', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸ç»é¿', |
| | | prop: 'teamLeader', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
审å', |
| | | prop: 'internalAuditor', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ¥æ', |
| | | prop: 'reviewDate', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ¹æ³', |
| | | prop: 'auditMethod', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | label: '馿¬¡ä¼è®®æ¶é´', |
| | | prop: 'firstMeetingTime', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | label: 'æ«æ¬¡ä¼è®®æ¶é´', |
| | | prop: 'lastMeetingTime', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ¥åæäº¤æ¥æ', |
| | | prop: 'submitTime', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | label: 'å®¡æ ¸æ¥ååæ¾èå´', |
| | | prop: 'submitScope', |
| | | 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: 'ratifyRemark', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('ratify', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | implementPlanDia: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageInternalImplement({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.implementPlanDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.implementPlanDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeImplementDia() { |
| | | this.implementPlanDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.purposes = ''; |
| | | this.searchList() |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delInternalImplement({ implementId: row.implementId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportInternalImplement({ implementId: row.implementId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å
审宿½è®¡å' + '.docx'); |
| | | }) |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">å
审ç®çï¼</span> |
| | | <el-input v-model="searchForm.purpose" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" @pagination="pagination" :page="page"> |
| | | </limsTable> |
| | | </div> |
| | | <year-plan-dia v-if="yearPlanDia" ref="yearPlanDia" @closeYearDia="closeYearDia"></year-plan-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import YearPlanDia from './yearPlanDia.vue'; |
| | | import { |
| | | pageInternalPlan, |
| | | delInternalPlan, |
| | | exportInternalPlan, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | |
| | | export default { |
| | | name: 'yearPlan', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { YearPlanDia, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | purpose: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'å
审ç®ç', |
| | | prop: 'purpose', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
审èå´', |
| | | prop: 'scope', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
审便®', |
| | | prop: 'basis', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ç»é¿', |
| | | prop: 'leader', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ç»å', |
| | | prop: 'crew', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'å®¡æ ¸ç¶æ', |
| | | prop: 'examineStatus', |
| | | 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: 'examineRemark', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å®¡æ ¸äºº', |
| | | prop: 'examineUserName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å®¡æ ¸æ¥æ', |
| | | prop: 'examineTime', |
| | | minWidth: '160' |
| | | }, { |
| | | 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: 'ratifyRemark', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'æ¹å人', |
| | | prop: 'ratifyUserName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'æ¹åæ¥æ', |
| | | prop: 'ratifyTime', |
| | | minWidth: '160' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å®¡æ ¸', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('examine', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.examineStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('ratify', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1 || row.examineStatus === 0 || row.examineStatus === null) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | yearPlanDia: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageInternalPlan({ ...entity, ...page }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delInternalPlan({ planId: row.planId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.yearPlanDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.yearPlanDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportInternalPlan({ planId: row.planId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å
审年度计å' + '.docx'); |
| | | }) |
| | | }, |
| | | closeYearDia() { |
| | | this.yearPlanDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.purpose = ''; |
| | | this.searchList() |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="å
é¨å®¡æ ¸å¹´åº¦è®¡å" width="1000px" @close="closeYearDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å
审ç®ç" prop="purpose"> |
| | | <el-input v-model="form.purpose" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å
审èå´" prop="scope"> |
| | | <el-input v-model="form.scope" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | :rows="3" clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å
审便®" prop="basis"> |
| | | <el-input v-model="form.basis" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»é¿" prop="leader"> |
| | | <el-input v-model="form.leader" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»å" prop="crew"> |
| | | <el-input v-model="form.crew" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <table border="1" cellspacing="10" class="table"> |
| | | <tr> |
| | | <td class="div-with-line"> |
| | | <span style="float: left;">é¨é¨</span> |
| | | <span style="float: right;">æä»½</span> |
| | | </td> |
| | | <th v-for="(item, index) in dic1" :key="index">{{ item }}</th> |
| | | </tr> |
| | | <tr v-for="(item, index) in planDetailList" :key="index"> |
| | | <td>{{ item.department }}</td> |
| | | <th> |
| | | <el-input v-model="item.january" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.february" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.march" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.april" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.may" :disabled="operationType === 'examine' || operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.june" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.july" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.august" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.september" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.october" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.november" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | <th> |
| | | <el-input v-model="item.december" :disabled="operationType === 'examine' || operationType === 'ratify'" |
| | | clearable size="small"></el-input> |
| | | </th> |
| | | </tr> |
| | | </table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType === 'examine'" :loading="loading" @click="examine(0)">ä¸éè¿</el-button> |
| | | <el-button v-if="operationType === 'examine'" :loading="loading" type="primary" @click="examine(1)">é |
| | | è¿</el-button> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" @click="approval(0)">䏿¹å</el-button> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="handleApproval(1)">æ¹ |
| | | å</el-button> |
| | | <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" @click="closeYearDia">å |
| | | æ¶</el-button> |
| | | <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" :loading="loading" type="primary" |
| | | @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="examineDialog" title="å®¡æ ¸" width="30%" @close="examineDialog = false"> |
| | | <span> |
| | | å®¡æ ¸å¤æ³¨ï¼ |
| | | <el-input v-model="examineRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="examineLoading" @click="examineDialog = false">å æ¶</el-button> |
| | | <el-button :loading="examineLoading" type="primary" @click="handleExamine(0)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="approvalDialog" title="æ¹å" width="30%" @close="approvalDialog = false"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="ratifyRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="approvalLoading" @click="approvalDialog = false">å æ¶</el-button> |
| | | <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getInternalPlanOne, |
| | | addInternalPlan, |
| | | updateInternalPlan, |
| | | examineInternalPlan, |
| | | ratifyInternalPlan, |
| | | } from '@/api/cnas/systemManagement/internalAuditManagement.js' |
| | | export default { |
| | | name: 'yearPlanDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | purpose: '', |
| | | scope: '', |
| | | basis: '', |
| | | leader: '', |
| | | crew: '', |
| | | }, |
| | | rules: { |
| | | purpose: [{ required: true, message: '请填åå
审ç®ç', trigger: 'blur' }], |
| | | scope: [{ required: true, message: '请填åå
审èå´', trigger: 'blur' }], |
| | | basis: [{ required: true, message: '请填åå
审便®', trigger: 'blur' }], |
| | | leader: [{ required: true, message: '请填åç»é¿', trigger: 'blur' }], |
| | | crew: [{ required: true, message: '请填åç»å', trigger: 'blur' }], |
| | | }, |
| | | operationType: '', |
| | | approvalDialog: false, |
| | | approvalLoading: false, |
| | | examineDialog: false, |
| | | examineLoading: false, |
| | | ratifyRemark: '', |
| | | examineRemark: '', |
| | | dic1: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], |
| | | planDetailList: [{ department: 'è£
å¤çµç¼å®éªå®¤' }, { department: 'é信产åå®éªå®¤' }, { department: 'çµå产åå®éªå®¤' }, { department: 'å¨è½äº§åå®éªå®¤' }, { department: 'å°é¢çº¿ç¼å®éªå®¤' }], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo(row) { |
| | | this.diaLoading = true |
| | | getInternalPlanOne({ planId: row.planId }).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | this.planDetailList = this.form.planDetailList |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const internalPlan = this.HaveJson(this.form) |
| | | internalPlan.planDetailList = this.HaveJson(this.planDetailList) |
| | | if (this.operationType === 'add') { |
| | | addInternalPlan(internalPlan).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | updateInternalPlan(internalPlan).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // å®¡æ ¸æµç¨ |
| | | examine(examineStatus) { |
| | | if (examineStatus === 0) { |
| | | this.examineDialog = true |
| | | } else { |
| | | this.handleExamine(examineStatus) |
| | | } |
| | | }, |
| | | handleExamine(examineStatus) { |
| | | this.examineLoading = true |
| | | const internalReport = this.HaveJson(this.form) |
| | | internalReport.examineStatus = examineStatus |
| | | internalReport.examineRemark = this.examineRemark |
| | | examineInternalPlan(internalReport).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.closeYearDia(this.departId); |
| | | } |
| | | this.examineLoading = false |
| | | }).catch(() => { |
| | | this.examineLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤æ¹åä¿¡æ¯ |
| | | approval(ratifyStatus) { |
| | | if (ratifyStatus === 0) { |
| | | this.approvalDialog = true |
| | | } else { |
| | | this.handleApproval(ratifyStatus) |
| | | } |
| | | }, |
| | | handleApproval(ratifyStatus) { |
| | | this.approvalLoading = true |
| | | const internalReport = this.HaveJson(this.form) |
| | | internalReport.ratifyStatus = ratifyStatus |
| | | internalReport.ratifyRemark = this.ratifyRemark |
| | | ratifyInternalPlan(internalReport).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.closeYearDia(this.departId); |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | closeYearDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeYearDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | |
| | | >>>.el-dialog__body { |
| | | max-height: 42em; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | >>>.is-required { |
| | | margin-bottom: 6px; |
| | | } |
| | | |
| | | .table { |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .table th { |
| | | width: 70px; |
| | | } |
| | | |
| | | .table td { |
| | | width: 70px; |
| | | height: 70px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .div-with-line { |
| | | width: 70px; |
| | | height: 70px; |
| | | position: relative; |
| | | /*overflow: hidden; /* éèæº¢åºå
容 */ |
| | | } |
| | | |
| | | .div-with-line::after { |
| | | content: ''; |
| | | position: absolute; |
| | | bottom: 0; |
| | | height: 1px; |
| | | background-color: #000000; |
| | | left: 50%; |
| | | transform: translateX(-50%) rotate(45deg); |
| | | transform-origin: center 50%; |
| | | top: 50%; |
| | | width: 100px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <el-tabs v-model="activeName" class="tab-panel" type="border-card"> |
| | | <el-tab-pane label="年度计å" name="yearPlan"> |
| | | <year-plan></year-plan> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å
é¨å®æ½è®¡å" name="implementationPlan"> |
| | | <implementation-plan></implementation-plan> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å
审ä¼è®®ç¾å°" name="meetingSignIn"> |
| | | <audit-meeting-sign></audit-meeting-sign> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å
å®¡æ£æ¥" name="auditInspection"> |
| | | <audit-inspection></audit-inspection> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="çº æ£æªæ½" name="correctiveAction"> |
| | | <corrective-action></corrective-action> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å
审æ¥å" name="auditReport"> |
| | | <audit-report></audit-report> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import YearPlan from './components/yearPlan.vue'; |
| | | import implementationPlan from './components/implementationPlan.vue'; |
| | | import AuditInspection from './components/auditInspection.vue'; |
| | | import AuditReport from './components/auditReport.vue'; |
| | | import AuditMeetingSign from './components/auditMeetingSign.vue'; |
| | | import CorrectiveAction from './components/correctiveAction.vue'; |
| | | |
| | | export default { |
| | | name: 'InternalAuditManagement', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { CorrectiveAction, AuditMeetingSign, AuditReport, AuditInspection, YearPlan, implementationPlan }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | activeName: 'yearPlan', |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: {} |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main { |
| | | padding: 15px 0; |
| | | } |
| | | |
| | | .tab-panel { |
| | | background: #fff; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="管çè¯å®¡è®¡å" width="80%" @close="closeImplementDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¯å®¡æ¶é´" prop="reviewTime"> |
| | | <el-date-picker v-model="form.reviewTime" :disabled="operationType === 'ratify'" clearable |
| | | 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="judgingLocation"> |
| | | <el-input v-model="form.judgingLocation" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯å®¡ç®ç" prop="judgingPurpose"> |
| | | <el-input v-model="form.judgingPurpose" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯å®¡æ¹å¼" prop="judgingMethod"> |
| | | <el-input v-model="form.judgingMethod" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åå 人å" prop="participants"> |
| | | <!-- <el-input v-model="form.participants" :disabled="operationType === 'ratify'" clearable size="small"></el-input> --> |
| | | <el-select v-model="form.participants" size="small" style="width: 100%;" filterable |
| | | :disabled="operationType === 'ratify'" clearable multiple> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯å®¡èå´" prop="judgingScope"> |
| | | <el-input v-model="form.judgingScope" :disabled="operationType === 'ratify'" clearable |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯å®¡ä¾æ®" prop="judgingBasis"> |
| | | <el-input v-model="form.judgingBasis" :disabled="operationType === 'ratify'" :rows="3" clearable |
| | | size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯å®¡ä¸»è¦å
容" prop="mainContext"> |
| | | <el-input v-model="form.mainContext" :disabled="operationType === 'ratify'" :rows="3" clearable |
| | | size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åå¤å·¥ä½è¦æ±" prop="preparationRequirements"> |
| | | <el-input v-model="form.preparationRequirements" :disabled="operationType === 'ratify'" :rows="3" |
| | | clearable size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeImplementDia">å æ¶</el-button> |
| | | <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="handleApproval(1)">æ¹ |
| | | å</el-button> |
| | | <el-button v-if="operationType !== 'ratify'" :loading="loading" type="primary" @click="handleEdit">æ |
| | | 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <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="approvalDialog = false">å æ¶</el-button> |
| | | <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addReviewProgram, |
| | | modifyReviewProgram, |
| | | } from '@/api/cnas/systemManagement/managementReview.js' |
| | | import { dateFormat } from '@/utils/date' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | name: 'managementFormDIa', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | id: '', |
| | | reviewTime: '', |
| | | judgingLocation: '', |
| | | judgingPurpose: '', |
| | | judgingMethod: '', |
| | | participants: [], |
| | | judgingScope: '', |
| | | judgingBasis: '', |
| | | mainContext: '', |
| | | preparationRequirements: '', |
| | | }, |
| | | rules: { |
| | | reviewTime: [{ required: true, message: 'è¯·éæ©è¯å®¡æ¶é´', trigger: 'blur' }], |
| | | judgingLocation: [{ required: true, message: '请填åè¯å®¡å°ç¹', trigger: 'blur' }], |
| | | judgingPurpose: [{ required: true, message: '请填åè¯å®¡ç®ç', trigger: 'blur' }], |
| | | judgingMethod: [{ required: true, message: '请填åè¯å®¡æ¹å¼', trigger: 'blur' }], |
| | | participants: [{ required: true, message: '请填ååå 人å', trigger: 'change' }], |
| | | judgingScope: [{ required: true, message: '请填åè¯å®¡èå´', trigger: 'blur' }], |
| | | judgingBasis: [{ required: true, message: '请填åè¯å®¡ä¾æ®', trigger: 'blur' }], |
| | | mainContext: [{ required: true, message: '请填åè¯å®¡ä¸»è¦å
容', trigger: 'blur' }], |
| | | preparationRequirements: [{ required: true, message: '请填ååå¤å·¥ä½è¦æ±', trigger: 'blur' }], |
| | | }, |
| | | operationType: '', |
| | | approvalDialog: false, |
| | | approvalLoading: false, |
| | | qualityRemark: '', |
| | | personList: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['nickName']) |
| | | }, |
| | | mounted() { |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.form = row |
| | | this.form.participants = row.participants ? row.participants.split(',').map(m => Number(m)) : [] |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | // searchInfo (row) { |
| | | // this.diaLoading = true |
| | | // this.$axios(this.$api.internalReport.getInternalReportOne + '?reportId=' + row.reportId).then(res => { |
| | | // this.diaLoading = false |
| | | // if (res.code === 201) return |
| | | // this.form = res.data |
| | | // }).catch(err => { |
| | | // console.log(err) |
| | | // this.diaLoading = false |
| | | // }) |
| | | // }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const internalReport = this.HaveJson(this.form) |
| | | internalReport.participants = internalReport.participants.join(',') |
| | | if (this.operationType === 'add') { |
| | | addReviewProgram(internalReport).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | modifyReviewProgram(internalReport).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeImplementDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // æäº¤æ¹åä¿¡æ¯ |
| | | handleApproval(qualityStatus) { |
| | | this.approvalLoading = true |
| | | const internalReport = this.HaveJson(this.form) |
| | | internalReport.approve = this.nickName |
| | | internalReport.approveDate = dateFormat(new Date()) |
| | | internalReport.participants = internalReport.participants.join(',') |
| | | modifyReviewProgram(internalReport).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æäº¤æåï¼'); |
| | | this.approvalDialog = false |
| | | this.closeImplementDia(this.departId); |
| | | } |
| | | this.approvalLoading = false |
| | | }).catch(() => { |
| | | this.approvalLoading = false |
| | | }) |
| | | }, |
| | | closeImplementDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeImplementDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">è¯å®¡å°ç¹ï¼</span> |
| | | <el-input v-model="searchForm.judgingLocation" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | <management-form-d-ia v-if="managementFormDIa" ref="managementFormDIa" |
| | | @closeImplementDia="closeImplementDia"></management-form-d-ia> |
| | | <el-dialog :visible.sync="listDialogVisible" title="æä»¶æ¥ç" top="15vh" width="400px"> |
| | | <div style="max-height:60vh;overflow-y: auto;"> |
| | | <p v-for="(item, index) in fileList" :key="index"> |
| | | <span>{{ item.fileName }}</span> |
| | | <el-button icon="el-icon-view" size="small" style="margin-left: 20px;" type="text" |
| | | @click="lookFile(item.url, item.fileName)">é¢è§</el-button> |
| | | <el-button icon="el-icon-bottom" size="small" style="margin-left: 20px;" type="text" |
| | | @click="handleDown0(item.url, item.fileName)">ä¸è½½</el-button> |
| | | </p> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.url" |
| | | style="height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import ManagementFormDIa from './managementFormDIa.vue'; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { |
| | | addReviewProgramFile, |
| | | selectReviewProgramFile, |
| | | getPageReviewProgram, |
| | | deleteReviewProgram, |
| | | exportReviewProgram, |
| | | } from '@/api/cnas/systemManagement/managementReview.js' |
| | | |
| | | export default { |
| | | name: 'managementReviewPlan', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ManagementFormDIa, limsTable, filePreview }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | judgingLocation: '', |
| | | }, |
| | | listDialogVisible: false, |
| | | lookDialogVisible: false, |
| | | fileList: [], |
| | | currentInfo: {}, |
| | | tableColumn: [ |
| | | { |
| | | label: 'è¯å®¡æ¶é´', |
| | | prop: 'reviewTime', |
| | | }, |
| | | { |
| | | label: 'è¯å®¡å°ç¹', |
| | | prop: 'judgingLocation', |
| | | }, |
| | | { |
| | | label: 'è¯å®¡ç®ç', |
| | | prop: 'judgingPurpose', |
| | | }, |
| | | { |
| | | label: 'è¯å®¡æ¹å¼', |
| | | prop: 'judgingMethod', |
| | | }, |
| | | { |
| | | label: 'è¯å®¡èå´', |
| | | prop: 'judgingScope', |
| | | }, |
| | | // { |
| | | // dataType: 'tag', |
| | | // label: 'æ¹åç¶æ', |
| | | // prop: 'approve', |
| | | // 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: '110', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.approve |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ä¸ä¼ ', |
| | | type: 'upload', |
| | | multiple: true, |
| | | limit: 20, |
| | | accept: '.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.pdf', |
| | | clickFun: async (row, file, fileList) => { |
| | | const formData = new FormData(); |
| | | formData.append('file', file.raw); // æä»¶å段 |
| | | formData.append('id', row.id); // æä»¶ååæ®µ |
| | | let res = await addReviewProgramFile(formData) |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'ä¸ä¼ æå', type: 'success' }); |
| | | // this.searchList() |
| | | return |
| | | } else { |
| | | this.$message({ message: 'ä¸ä¼ 失败', type: 'error' }); |
| | | return |
| | | } |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.approve |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¥çéä»¶', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | selectReviewProgramFile({ id: row.id }).then(res => { |
| | | this.listDialogVisible = true; |
| | | this.fileList = res.data.fileList |
| | | }); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('ratify', row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.approve |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.qualityStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | managementFormDIa: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | this.tableLoading = true |
| | | getPageReviewProgram({ |
| | | judgingLocation: this.searchForm.judgingLocation, |
| | | pages: this.page.current, |
| | | size: this.page.size |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.managementFormDIa = true |
| | | this.$nextTick(() => { |
| | | this.$refs.managementFormDIa.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeImplementDia() { |
| | | this.managementFormDIa = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.judgingLocation = ''; |
| | | this.searchList() |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | deleteReviewProgram({ id: row.id }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å页 |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | handleDown(row) { |
| | | exportReviewProgram({ id: row.id }).then(res => { |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'è¯å®¡è®¡å.docx'); |
| | | }) |
| | | }, |
| | | lookFile(url, name) { |
| | | this.currentInfo.url = url |
| | | this.currentInfo.name = name |
| | | this.lookDialogVisible = true |
| | | }, |
| | | handleDown0(url, name) { |
| | | if (!url) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | let url0 = this.javaApi + '/word/' + url |
| | | this.$download.saveAs(url0, name); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">ä¼è®®å°ç¹ï¼</span> |
| | | <el-input v-model="searchForm.place" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | <meeting-records-dia v-if="meetingRecordsDia" ref="meetingRecordsDia" |
| | | @closeYearDia="closeYearDia"></meeting-records-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import MeetingRecordsDia from './meetingRecordsDia.vue'; |
| | | import ManagementFormDIa from './managementFormDIa.vue'; |
| | | import { |
| | | getPageMeeting, |
| | | deleteMeeting, |
| | | exportMeeting, |
| | | } from '@/api/cnas/systemManagement/managementReview.js' |
| | | |
| | | export default { |
| | | name: 'meetingRecords', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ManagementFormDIa, MeetingRecordsDia, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | place: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ¶é´', |
| | | prop: 'meetingTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '主æäºº', |
| | | prop: 'compere', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¼è®®å°ç¹', |
| | | prop: 'place', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¼è®®å
容æè¦', |
| | | prop: 'content', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '120', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | meetingRecordsDia: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | this.tableLoading = true |
| | | getPageMeeting({ place: this.searchForm.place, pages: this.page.current, size: this.page.size }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾å¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.meetingRecordsDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.meetingRecordsDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeYearDia() { |
| | | this.meetingRecordsDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.place = ''; |
| | | this.searchList() |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | deleteMeeting({ id: row.id }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | handleDown(row) { |
| | | exportMeeting({ id: row.id }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message.error(res.message) |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'ä¼è®®è®°å½.docx'); |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="管çè¯å®¡ä¼è®®è®°å½" width="1000px" @close="closeYearDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¶é´" prop="meetingTime"> |
| | | <el-date-picker v-model="form.meetingTime" clearable 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="place"> |
| | | <el-input v-model="form.place" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="主æäºº" prop="compere"> |
| | | <el-input v-model="form.compere" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¼è®®å
容æè¦" prop="content"> |
| | | <el-input v-model="form.content" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åä¼äººå" prop="participant"> |
| | | <el-select v-model="form.participant" clearable filterable multiple placeholder="è¯·éæ©" size="small" |
| | | style="width: 100%;"> |
| | | <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeYearDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addMeeting, |
| | | modifyMeeting, |
| | | } from '@/api/cnas/systemManagement/managementReview.js' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | export default { |
| | | name: 'meetingRecordsDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | id: '', |
| | | meetingTime: '', |
| | | compere: '', |
| | | place: '', |
| | | content: '', |
| | | participant: [], |
| | | }, |
| | | rules: { |
| | | meetingTime: [{ required: true, message: '请填åä¼è®®æ¶é´', trigger: 'blur' }], |
| | | compere: [{ required: true, message: '请填å主æäºº', trigger: 'blur' }], |
| | | place: [{ required: true, message: '请填åå°ç¹', trigger: 'blur' }], |
| | | content: [{ required: true, message: '请填åä¼è®®å
容æè¦', trigger: 'blur' }], |
| | | participant: [{ required: true, message: 'è¯·éæ©åå 人å', trigger: 'change' }], |
| | | }, |
| | | operationType: '', |
| | | personList: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.operationType = type |
| | | this.getAuthorizedPerson() |
| | | if (type !== 'add') { |
| | | this.form = row |
| | | this.form.participant = row.participant.split(',').map(a => { |
| | | a = Number(a) |
| | | return a |
| | | }) |
| | | } |
| | | this.formDia = true |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const internalMeeting = this.HaveJson(this.form) |
| | | internalMeeting.participant = internalMeeting.participant.join(',') |
| | | if (this.operationType === 'add') { |
| | | addMeeting(internalMeeting).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | modifyMeeting(internalMeeting).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeYearDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeYearDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">å°ç¹ï¼</span> |
| | | <el-input v-model="searchForm.place" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> |
| | | </limsTable> |
| | | </div> |
| | | <review-report-dia v-if="reviewReportDia" ref="reviewReportDia" @closeYearDia="closeYearDia"></review-report-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import ReviewReportDia from './reviewReportDia.vue'; |
| | | import { |
| | | getPageReviewReport, |
| | | deleteReviewReport, |
| | | exportReviewReport, |
| | | modifyReviewReport, |
| | | } from '@/api/cnas/systemManagement/managementReview.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | name: 'reviewReport', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ReviewReportDia, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | place: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'ç®ç', |
| | | prop: 'objective', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å°ç¹', |
| | | prop: 'place', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '主æäºº', |
| | | prop: 'compere', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è®°å½äºº', |
| | | prop: 'recordPeople', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ¥æ', |
| | | prop: 'date', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '页次', |
| | | prop: 'page', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è¯å®¡æ¹å¼', |
| | | prop: 'judgingMethod', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è¯å®¡ä¾æ®', |
| | | prop: 'reviewBasis', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '160', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.audit || !!row.approval |
| | | } |
| | | }, |
| | | { |
| | | name: 'å®¡æ ¸', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.$confirm('ç¡®å®å®¡æ ¸éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.submit('audit', row) |
| | | }).catch(() => { |
| | | }); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.audit |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.$confirm('ç¡®å®æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.submit('approval', row) |
| | | }).catch(() => { |
| | | }); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.audit || !!row.approval |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | reviewReportDia: false, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['nickName']) |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | this.tableLoading = true |
| | | getPageReviewReport({ place: this.searchForm.place, pages: this.page.current, size: this.page.size }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾å¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.reviewReportDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.reviewReportDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeYearDia() { |
| | | this.reviewReportDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.place = ''; |
| | | this.searchList() |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | deleteReviewReport({ id: row.id }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.searchList(); |
| | | }, |
| | | handleDown(row) { |
| | | exportReviewReport({ id: row.id }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message.error(res.message) |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'è¯å®¡æ¥å.docx'); |
| | | }) |
| | | }, |
| | | submit(type, row) { |
| | | let obj = row |
| | | obj[type] = this.nickNamee; |
| | | modifyReviewReport(obj).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="管çè¯å®¡ä¼è®®è®°å½" width="1000px" @close="closeYearDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç®ç" prop="objective"> |
| | | <el-input v-model="form.objective" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°ç¹" prop="place"> |
| | | <el-input v-model="form.place" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="主æäºº" prop="compere"> |
| | | <el-input v-model="form.compere" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è®°å½äºº" prop="recordPeople"> |
| | | <el-input v-model="form.recordPeople" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ" prop="date"> |
| | | <el-date-picker v-model="form.date" clearable 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="page"> |
| | | <el-input v-model="form.page" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¯å®¡æ¹å¼" prop="judgingMethod"> |
| | | <el-input v-model="form.judgingMethod" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¯å®¡ä¾æ®" prop="reviewBasis"> |
| | | <el-input v-model="form.reviewBasis" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åºå¸äººå" prop="attendess"> |
| | | <!-- <el-input v-model="form.attendess " clearable size="small"></el-input> --> |
| | | <el-select v-model="form.attendess" size="small" style="width: 100%;" filterable clearable multiple> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯å®¡è¾å
¥æ
åµ" prop="reviewInputs"> |
| | | <el-input v-model="form.reviewInputs" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯å®¡è¿ç¨æ¦åµ" prop="reviewProcess"> |
| | | <el-input v-model="form.reviewProcess" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="主è¦è®®é¢æ¦è¿°" prop="mainTopic"> |
| | | <el-input v-model="form.mainTopic" :rows="5" clearable placeholder="请è¾å
¥å
容ï¼å¯è¾å
¥å åå" size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="äºé¡¹" prop="matters"> |
| | | <el-input v-model="form.matters" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è´è´£äºº" prop="head"> |
| | | <el-input v-model="form.head" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å®ææ¥æ" prop="completionDate"> |
| | | <el-date-picker v-model="form.completionDate" clearable format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è·è¸ªç¡®è®¤äºº" prop="trackingConfirmed"> |
| | | <el-input v-model="form.trackingConfirmed" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è·è¸ªæ
åµç¡®è®¤è®°å½" prop="follerUp"> |
| | | <el-input v-model="form.follerUp" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ä½ç³»è¯ä»·" prop="overallEvaluation"> |
| | | <el-input v-model="form.overallEvaluation" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeYearDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addReviewReport, |
| | | modifyReviewReport, |
| | | } from '@/api/cnas/systemManagement/managementReview.js' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | export default { |
| | | name: 'reviewReportDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | id: '', |
| | | objective: '', |
| | | place: '', |
| | | compere: '', |
| | | recordPeople: '', |
| | | date: '', |
| | | page: '', |
| | | judgingMethod: '', |
| | | reviewBasis: '', |
| | | attendess: [], |
| | | reviewInputs: '', |
| | | reviewProcess: '', |
| | | mainTopic: '', |
| | | matters: '', |
| | | head: '', |
| | | completionDate: '', |
| | | trackingConfirmed: '', |
| | | follerUp: '', |
| | | overallEvaluation: '', |
| | | }, |
| | | rules: { |
| | | objective: [{ required: true, message: '请填åç®ç', trigger: 'blur' }], |
| | | place: [{ required: true, message: '请填åå°ç¹', trigger: 'blur' }], |
| | | compere: [{ required: true, message: '请填å主æäºº', trigger: 'blur' }], |
| | | recordPeople: [{ required: true, message: '请填åè®°å½äºº', trigger: 'blur' }], |
| | | date: [{ required: true, message: 'è¯·éæ©æ¥æ', trigger: 'change' }], |
| | | completionDate: [{ required: true, message: 'è¯·éæ©å®ææ¥æ', trigger: 'change' }], |
| | | page: [{ required: true, message: '请填å页次', trigger: 'blur' }], |
| | | judgingMethod: [{ required: true, message: '请填åè¯å®¡æ¹å¼', trigger: 'blur' }], |
| | | reviewBasis: [{ required: true, message: '请填åè¯å®¡ä¾æ®', trigger: 'blur' }], |
| | | attendess: [{ required: true, message: '请填ååºå¸äººå', trigger: 'change' }], |
| | | reviewInputs: [{ required: true, message: '请填åè¯å®¡è¾å
¥æ
åµ', trigger: 'blur' }], |
| | | reviewProcess: [{ required: true, message: '请填åè¯å®¡è¾å
¥æ
åµ', trigger: 'blur' }], |
| | | mainTopic: [{ required: true, message: '请填å主è¦è®®é¢æ¦è¿°', trigger: 'blur' }], |
| | | matters: [{ required: true, message: '请填å主è¦è®®é¢æ¦è¿°', trigger: 'blur' }], |
| | | head: [{ required: true, message: '请填åè´è´£äºº', trigger: 'blur' }], |
| | | trackingConfirmed: [{ required: true, message: '请填åè·è¸ªç¡®è®¤äºº', trigger: 'blur' }], |
| | | follerUp: [{ required: true, message: '请填åè·è¸ªç¡®è®¤äºº', trigger: 'blur' }], |
| | | overallEvaluation: [{ required: true, message: '请填åä½ç³»è¯ä»·', trigger: 'blur' }], |
| | | }, |
| | | operationType: '', |
| | | personList: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | this.getAuthorizedPerson() |
| | | if (type !== 'add') { |
| | | this.form = row |
| | | this.form.attendess = this.form.attendess ? this.form.attendess.split(',').map(m => Number(m)) : [] |
| | | } |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const internalMeeting = this.HaveJson(this.form) |
| | | internalMeeting.attendess = internalMeeting.attendess ? internalMeeting.attendess.join(',') : '' |
| | | if (this.operationType === 'add') { |
| | | addReviewReport(internalMeeting).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | modifyReviewReport(internalMeeting).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeYearDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeYearDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 4vh auto 50px !important; |
| | | } |
| | | |
| | | >>>.el-dialog__body { |
| | | max-height: 600px; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <el-tabs v-model="activeName" class="tab-panel" type="border-card"> |
| | | <el-tab-pane label="管çè¯å®¡è®¡å" name="yearPlan"> |
| | | <management-review-plan></management-review-plan> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ä¼è®®è®°å½" name="implementationPlan"> |
| | | <meeting-records></meeting-records> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="è¯å®¡æ¥å" name="meetingSignIn"> |
| | | <review-report></review-report> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ManagementReviewPlan from './components/managementReviewPlan.vue'; |
| | | import MeetingRecords from './components/meetingRecords.vue'; |
| | | import ReviewReport from './components/reviewReport.vue'; |
| | | |
| | | export default { |
| | | name: 'a9-management-review', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ReviewReport, MeetingRecords, ManagementReviewPlan }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | activeName: 'yearPlan', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: {} |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main { |
| | | padding: 15px 0; |
| | | } |
| | | |
| | | .tab-panel { |
| | | background: #fff; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="padding: 10px"> |
| | | <div class="header"> |
| | | <span></span> |
| | | <div style="min-width: 200px"> |
| | | <el-button type="primary" size="small" @click="addFun">æ° å¢</el-button> |
| | | <el-button type="primary" size="small" @click="approvalFun">审 æ¹</el-button> |
| | | <el-button type="primary" size="small" @click="approveFun">æ¹ å</el-button> |
| | | <el-upload style="display: inline-block; padding: 0 6px" :headers="uploadHeader" :action="action" |
| | | :on-error="onError" :show-file-list="false" :on-success="onSuccess"> |
| | | <el-button size="small" type="primary">导 å
¥</el-button> |
| | | </el-upload> |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table1"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (page.current - 1) * page.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="venue" label="å°ç¹/æ´»å¨" min-width="180"></el-table-column> |
| | | <el-table-column prop="hazard" label="å±é©å ç´ " width="testDate" min-width="180"></el-table-column> |
| | | <el-table-column prop="accidents" label="å¯è½å¯¼è´çäºæ
" min-width="180"></el-table-column> |
| | | <el-table-column prop="injury" label="对人å¯è½é æçå±å®³" min-width="180"></el-table-column> |
| | | <el-table-column label="é£é©è¯ä»·" align="center" min-width="180"> |
| | | <template> |
| | | <el-table-column prop="riskL" label="L" min-width="80"></el-table-column> |
| | | <el-table-column prop="riskE" label="E" min-width="80"></el-table-column> |
| | | <el-table-column prop="riskC" label="C" min-width="80"></el-table-column> |
| | | <el-table-column prop="riskD" label="D" min-width="80"></el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="level" label="é£é©ç级" min-width="180"></el-table-column> |
| | | <el-table-column prop="measures" label="æ§å¶æªæ½" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorName" label="ç¼å¶äººå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorDate" label="ç¼å¶æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalName" label="审æ¹äººå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalDate" label="å®¡æ¹æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalStatus" label="审æ¹ç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approvalStatus === 1 ? 'éè¿' : row.approvalStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveName" label="æ¹å人å§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approveStatus" label="æ¹åç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approveStatus === 1 ? 'éè¿' : row.approveStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveDate" label="æ¹åæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="editClick(scope.row)">ç¼è¾</el-button> |
| | | <el-button @click="deleteClick(scope.row)" type="text" size="small">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" :total="page.total" |
| | | layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | <el-dialog title="æç¤º" :visible.sync="dialogVisible" width="50%"> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°ç¹/æ´»å¨"> |
| | | <el-input v-model="form.venue" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å±é©å ç´ "> |
| | | <el-input v-model="form.hazard" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¯è½å¯¼è´çäºæ
"> |
| | | <el-input v-model="form.accidents" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="对人å¯è½é æçå±å®³" label-width="140px"> |
| | | <el-input v-model="form.injury" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/L"> |
| | | <el-input v-model="form.riskL" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/E"> |
| | | <el-input v-model="form.riskE" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/C"> |
| | | <el-input v-model="form.riskC" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/D"> |
| | | <el-input v-model="form.riskD" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©ç级"> |
| | | <el-input v-model="form.level" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ§å¶æªæ½"> |
| | | <el-input v-model="form.measures" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addApi" :loading="loading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getToken } from "@/utils/auth"; |
| | | import { |
| | | getPageResults, |
| | | dangerousRiskApproval, |
| | | hazardIdentificationAndRiskApproval, |
| | | removeRiskFactors, |
| | | addNewRiskFactors, |
| | | exportHazardFactorIdentification, |
| | | } from '@/api/cnas/systemManagement/measuresDealRisks.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | form: {}, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1, |
| | | }, |
| | | tableData: [], |
| | | loading: false |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageRiskAssessmentResults/riskAssessmentImport' |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val; |
| | | this.initData(); |
| | | }, |
| | | // åé¡µè¡¨æ ¼åå§å |
| | | initData() { |
| | | this.tableData = [] |
| | | getPageResults(this.page).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | }); |
| | | }, |
| | | // å®¡æ¹ |
| | | approvalFun() { |
| | | this.$confirm('æ¯å¦å®¡æ¹éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approvalApi(this.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approvalApi(this.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å®¡æ¹æ¥å£ |
| | | approvalApi(userId, status) { |
| | | dangerousRiskApproval({ approval: userId, status: status }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¹å |
| | | approveFun() { |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approveApi(this.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approveApi(this.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹åæ¥å£ |
| | | approveApi(userId, status) { |
| | | hazardIdentificationAndRiskApproval({ approve: userId, status: status }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | // æä»¶ä¸ä¼ 失败 |
| | | onError() { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æä½å¤±è´¥!' |
| | | }); |
| | | }, |
| | | // æä»¶ä¸ä¼ æå |
| | | onSuccess(response) { |
| | | if (response.code == 201) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: response.message, |
| | | }); |
| | | return |
| | | } |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }, |
| | | addFun() { |
| | | this.form = {} |
| | | this.dialogVisible = true |
| | | }, |
| | | // å é¤ |
| | | deleteClick(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | removeRiskFactors({ id: row.id }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | addApi() { |
| | | this.loading = true |
| | | addNewRiskFactors(this.form).then(res => { |
| | | if (res.code === 201) return; |
| | | this.dialogVisible = false |
| | | this.loading = false |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }); |
| | | }, |
| | | // ç¼è¾ |
| | | editClick(row) { |
| | | this.form = { ...row } |
| | | this.dialogVisible = true |
| | | }, |
| | | // å¯¼åº |
| | | openDownloadDia() { |
| | | exportHazardFactorIdentification().then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§' + '.docx'); |
| | | }) |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="padding: 10px"> |
| | | <div class="header"> |
| | | <div></div> |
| | | <div style="min-width: 200px"> |
| | | <el-button type="primary" size="small" @click="addFun">æ° å¢</el-button> |
| | | <el-button type="primary" size="small" @click="approvalFun">审 æ¹</el-button> |
| | | <el-button type="primary" size="small" @click="approveFun">æ¹ å</el-button> |
| | | <el-upload style="display: inline-block; padding: 0 6px" :action="action" :headers="uploadHeader" |
| | | :on-error="onError" :show-file-list="false" :on-success="onSuccess"> |
| | | <el-button size="small" type="primary">导 å
¥</el-button> |
| | | </el-upload> |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table0"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="jobActivity" label="ä½ä¸æ´»å¨" min-width="180"></el-table-column> |
| | | <el-table-column prop="category" label="é£é©å ç´ ç±»å«" width="testDate" min-width="180"></el-table-column> |
| | | <el-table-column prop="description" label="é£é©å ç´ æè¿°" min-width="180"></el-table-column> |
| | | <el-table-column prop="result" label="å¯å¯¼è´çäºæ
" min-width="180"></el-table-column> |
| | | <el-table-column prop="intolerable" label="æ¯å¦ä¸å¯æ¿åé£é©" min-width="180"></el-table-column> |
| | | <el-table-column prop="plan" label="æ§å¶è®¡å" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorName" label="ç¼å¶äººå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorDate" label="ç¼å¶æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalName" label="审æ¹å§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalDate" label="å®¡æ¹æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalStatus" label="审æ¹ç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approvalStatus === 1 ? 'éè¿' : row.approvalStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveName" label="æ¹åå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approveStatus" label="æ¹åç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approveStatus === 1 ? 'éè¿' : row.approveStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveDate" label="æ¹åäººæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="editClick(scope.row)">ç¼è¾</el-button> |
| | | <el-button @click="deleteClick(scope.row)" type="text" size="small">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" :total="search.total" |
| | | layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | <el-dialog title="æç¤º" :visible.sync="dialogVisible" width="50%"> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä½ä¸æ´»å¨"> |
| | | <el-input v-model="form.jobActivity" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©å ç´ ç±»å«"> |
| | | <el-input v-model="form.category" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©å ç´ æè¿°"> |
| | | <el-input v-model="form.description" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¯å¯¼è´çäºæ
"> |
| | | <el-input v-model="form.result" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¯å¦ä¸å¯æ¿åé£é©" label-width="130px"> |
| | | <el-input v-model="form.intolerable" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ§å¶è®¡å"> |
| | | <el-input v-model="form.plan" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addApi" :loading="loading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getPageList, |
| | | riskAnalysisApprovalOfControlPlanChecklist, |
| | | approvalOfControlPlanChecklist, |
| | | deleteSignificantRiskFactorAnalysis, |
| | | analysisOfMajorRiskFactorsAdded, |
| | | exportSignificantRiskFactors, |
| | | } from '@/api/cnas/systemManagement/measuresDealRisks.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | form: {}, |
| | | loading: false, |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | tableData: [], |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/manageControlPlanList/importControlPlanList' |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.initData(); |
| | | }, |
| | | initData() { |
| | | getPageList(this.search).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }); |
| | | }, |
| | | // å®¡æ¹ |
| | | approvalFun() { |
| | | this.$confirm('æ¯å¦å®¡æ¹éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approvalApi(this.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approvalApi(this.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å®¡æ¹æ¥å£ |
| | | approvalApi(userId, status) { |
| | | riskAnalysisApprovalOfControlPlanChecklist({ approval: userId, status }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¹å |
| | | approveFun() { |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approveApi(this.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approveApi(this.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹åæ¥å£ |
| | | approveApi(userId, status) { |
| | | approvalOfControlPlanChecklist({ approve: userId, status }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | onError() { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æä½å¤±è´¥!' |
| | | }); |
| | | }, |
| | | onSuccess(response) { |
| | | if (response.code == 201) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: response.message, |
| | | }); |
| | | return |
| | | } |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }, |
| | | addFun() { |
| | | this.form = {} |
| | | this.dialogVisible = true |
| | | }, |
| | | // å é¤ |
| | | deleteClick(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteSignificantRiskFactorAnalysis({ id: row.id }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | addApi() { |
| | | this.loading = true |
| | | analysisOfMajorRiskFactorsAdded(this.form).then(res => { |
| | | if (res.code === 201) return; |
| | | this.dialogVisible = false |
| | | this.loading = false |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }); |
| | | }, |
| | | // ç¼è¾ |
| | | editClick(row) { |
| | | this.form = { ...row } |
| | | this.dialogVisible = true |
| | | }, |
| | | // å¯¼åº |
| | | openDownloadDia() { |
| | | exportSignificantRiskFactors().then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å' + '.docx'); |
| | | }) |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <el-tabs v-model="activeName" type="border-card" :lazy="true"> |
| | | <el-tab-pane label="å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§" name="å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§"> |
| | | <HazardIdentificationRiskAssessment v-if="activeName === 'å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§'" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å" name="é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å"> |
| | | <listRiskAnalysisControlPlans v-if="activeName === 'é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å'" /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import HazardIdentificationRiskAssessment |
| | | from "./components/hazardIdentificationRiskAssessment.vue"; |
| | | import listRiskAnalysisControlPlans |
| | | from "./components//listRiskAnalysisControlPlans.vue"; |
| | | export default { |
| | | components: { HazardIdentificationRiskAssessment, listRiskAnalysisControlPlans }, |
| | | data() { |
| | | return { |
| | | activeName: 'å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§', |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main { |
| | | width: 100%; |
| | | } |
| | | |
| | | /deep/ .el-tabs--border-card>.el-tabs__content { |
| | | height: calc(100vh - 9em); |
| | | padding: 0; |
| | | } |
| | | </style> |
| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">模æ¿åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | <el-input v-model="queryParams.name" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btn"> |
| | | <el-button |
| | | v-if="checkPermi(['standard:model:add'])" |
| | | size="small" |
| | | type="primary" |
| | | @click="openAdd" |
| | | >æ°å¢</el-button |
| | | > |
| | | <!-- <el-button |
| | | v-if="checkPermi(['standard:model:copy'])" |
| | | size="small" |
| | | @click="copyTemplate" |
| | | >å¤å¶æ¨¡ç</el-button |
| | | > --> |
| | | <el-button v-if="checkPermi(['standard:model:add'])" size="small" type="primary" @click="openAdd">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 240px)'" |
| | | style="padding: 20px; padding-top: 0" |
| | | @pagination="pagination" |
| | | ></lims-table> |
| | | <el-dialog |
| | | :before-close="isClose" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="isShow" |
| | | title="模æ¿ç¼å¶" |
| | | width="85%" |
| | | > |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 240px)'" style="padding: 20px; padding-top: 0" @pagination="pagination"></lims-table> |
| | | <el-dialog :before-close="isClose" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="isShow" title="模æ¿ç¼å¶" width="85%"> |
| | | <div v-if="isShow" style="width: 100%; height: 82vh; overflow: auto"> |
| | | <Excel |
| | | v-loading="loading" |
| | | :data="row.thing" |
| | | :execlTitle="row.name" |
| | | ></Excel> |
| | | <Excel v-loading="loading" :data="row.thing" :execlTitle="row.name"></Excel> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :before-close="closeCopyTem" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="isShowCopyTem" |
| | | :title="title" |
| | | width="35%" |
| | | > |
| | | <el-form |
| | | ref="copyForm" |
| | | :model="copyForm" |
| | | :rules="copyFormRules" |
| | | label-position="right" |
| | | label-width="80px" |
| | | > |
| | | <el-dialog :before-close="closeCopyTem" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="isShowCopyTem" :title="title" width="35%"> |
| | | <el-form ref="copyForm" :model="copyForm" :rules="copyFormRules" label-position="right" label-width="80px"> |
| | | <el-form-item label="模çç¼å·" prop="number"> |
| | | <el-input v-model="copyForm.number" clearable size="small"></el-input> |
| | | </el-form-item> |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeCopyTem">å æ¶</el-button> |
| | | <el-button |
| | | :loading="submitCopyInfoLoading" |
| | | type="primary" |
| | | @click="submitCopyInfo" |
| | | >ç¡® å®</el-button |
| | | > |
| | | <el-button :loading="submitCopyInfoLoading" type="primary" @click="submitCopyInfo">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | import Excel from "@/components/Excel/luckysheet.vue"; |
| | | import { |
| | | selectStandardTemplatePageList, |
| | | copyStandardTemplate, |
| | | addStandardTemplate, |
| | | upStandardTemplate, |
| | | delStandardTemplate, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name: "å¤å¶æ¨¡æ¿", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.copyTemplate(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi(["standard:model:copy"]); |
| | | }, |
| | | }, |
| | | { |
| | | name: "模æ¿ç¼å¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination(current, size) { |
| | | this.page.current = current; |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refreshTable(e) { |
| | |
| | | this.title = "æ°å¢"; |
| | | this.copyForm = {}; |
| | | this.isShowCopyTem = true; |
| | | }, |
| | | // å¤å¶æ¨¡ç |
| | | copyTemplate(row) { |
| | | this.title = "å¤å¶æ¨¡ç"; |
| | | this.isShowCopyTem = true; |
| | | this.copyForm.id = row.id; |
| | | }, |
| | | // æ°å¢/ç¼è¾/å¤å¶æ¨¡æ¿ |
| | | submitCopyInfo() { |
| | |
| | | this.submitCopyInfoLoading = false; |
| | | }); |
| | | break; |
| | | case "å¤å¶æ¨¡ç": |
| | | copyStandardTemplate(params) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | this.isShowCopyTem = false; |
| | | this.submitCopyInfoLoading = false; |
| | | this.$message.success("å¤å¶æå"); |
| | | this.refreshTable("page"); |
| | | }) |
| | | .catch((err) => { |
| | | console.log("copyTemplate----", err); |
| | | this.submitCopyInfoLoading = false; |
| | | }); |
| | | break; |
| | | } |
| | | } else { |
| | | console.log("error submit!!"); |
| | |
| | | this.refreshTable("page"); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }, |
| | | templateWrite(row) { |
| | | getEditTemplatePreparation({ id: row.id }).then((res) => { |
| | |
| | | .then(() => { |
| | | this.closed(); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }, |
| | | closed() { |
| | | this.loading = true; |
| | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | right: 14px; |
| | |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: `http://127.0.0.1:8002`, |
| | | target: `http://192.168.0.104:8002`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ["^" + process.env.VUE_APP_BASE_API]: "", |