| | |
| | | </body> |
| | | <script src="<%= BASE_URL %>luckysheet/plugins/js/plugin.js"></script> |
| | | <script src="<%= BASE_URL %>luckysheet/luckysheet.umd.js"></script> |
| | | <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.min.js"></script> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // æè¯æ±æ»è¡¨ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // æè¯å¤çæ°å¢ |
| | | export function addProcessComplain(data) { |
| | | return request({ |
| | | url: "/processComplain/addProcessComplain", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æè¯å¤ç详æ
|
| | | export function getProcessComplain(query) { |
| | | return request({ |
| | | url: "/processComplain/getProcessComplain", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æè¯å¤çä¿®æ¹ |
| | | export function doProcessComplain(data) { |
| | | return request({ |
| | | url: "/processComplain/doProcessComplain", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æè¯å¤çå¯¼åº |
| | | export function exportProcessComplain(query) { |
| | | return request({ |
| | | url: "/processComplain/exportProcessComplain", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æè¯å¤çå页 |
| | | export function pageProcessComplain(query) { |
| | | return request({ |
| | | url: "/processComplain/pageProcessComplain", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æè¯å¤çå é¤ |
| | | export function delProcessComplain(query) { |
| | | return request({ |
| | | url: "/processComplain/delProcessComplain", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // è´¨éçæ§è®¡å页é¢ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //çæ§å¹´åº¦è®¡åå表 |
| | | export function pageQualityMonitor(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/pageQualityMonitor", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // çæ§è®¡åå®¡æ ¸ |
| | | export function examineQualityMonitor(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/examineQualityMonitor", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // çæ§è®¡åæ¹å |
| | | export function ratifyQualityMonitor(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/ratifyQualityMonitor", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //导åºçæ§è®¡å |
| | | export function exportQualityMonitorDetail(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/exportQualityMonitorDetail", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //çæ§è®¡åå é¤ |
| | | export function delQualitySupervise(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/delQualitySupervise", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //çæ§è®¡å详æ
å表 |
| | | export function pageQualityMonitorDetail(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/pageQualityMonitorDetail", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è´¨éçæ§å®æ½è®¡åå¯¼åº |
| | | export function exportQualityMonitorRatify(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/exportQualityMonitorRatify", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è´¨éçæ§è¯ä»·å¯¼åº |
| | | export function exportQualityMonitorEvaluate(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/exportQualityMonitorEvaluate", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤çæ§è®¡å详æ
|
| | | export function delQualityMonitorDetail(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/delQualityMonitorDetail", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | export function getQualityMonitorRatify(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/getQualityMonitorRatify", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | export function addQualityMonitorRatify(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/addQualityMonitorRatify", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æäº¤çæ§è®¡å详æ
æ¹åæè§ |
| | | export function addQualityMonitorRatifyOpinion(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/addQualityMonitorRatifyOpinion", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çæ§è®¡å详æ
|
| | | export function addQualityMonitorDetail(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/addQualityMonitorDetail", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹çæ§è®¡å详æ
|
| | | export function updateQualityMonitorDetail(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/updateQualityMonitorDetail", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çæ§è¯ä»· |
| | | export function getQualityMonitorEvaluate(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/getQualityMonitorEvaluate", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çæ§è¯ä»·æ¹å |
| | | export function addMonitorEvaluateOpinion(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/addMonitorEvaluateOpinion", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çæ§è¯ä»· |
| | | export function addQualityMonitorEvaluate(data) { |
| | | return request({ |
| | | url: "/qualityMonitor/addQualityMonitorEvaluate", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤çæ§è¯ä»·éä»¶å表 |
| | | export function delVerifyEvaluateFileList(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/delVerifyEvaluateFileList", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çæ§è¯ä»·éä»¶å表 |
| | | export function getEvaluateFileList(query) { |
| | | return request({ |
| | | url: "/qualityMonitor/getEvaluateFileList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // è´¨éçç£è®¡å页é¢ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //è´¨éçç£å¹´è®¡åå表 |
| | | export function pageQualitySupervise(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/pageQualitySupervise", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // çç£è®¡åæ¹å |
| | | export function ratifyQualitySupervise(data) { |
| | | return request({ |
| | | url: "/qualitySupervise/ratifyQualitySupervise", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //导åºçç£è®¡å |
| | | export function exportQualitySupervise(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/exportQualitySupervise", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤çç£è®¡å |
| | | export function delQualitySupervise(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/delQualitySupervise", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //è´¨éçç£å¹´è®¡åå表 |
| | | export function pageQualitySuperviseDetail(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/pageQualitySuperviseDetail", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºè´¨éçç£è®¡åè®°å½å |
| | | export function exportSuperviseDetailRecord(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/exportSuperviseDetailRecord", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºä¸ç¬¦å项 |
| | | export function superviseDetailAccordingExport(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/superviseDetailAccordingExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºçç£çº æ£æªæ½ |
| | | export function exportSuperviseDetaillCorrect(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/exportSuperviseDetaillCorrect", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å é¤çç£è®¡å详æ
|
| | | export function delQualitySuperviseDetail(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/delQualitySuperviseDetail", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çç£è®¡å详æ
|
| | | export function addQualitySuperviseDetail(data) { |
| | | return request({ |
| | | url: "/qualitySupervise/addQualitySuperviseDetail", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹çç£è®¡å详æ
|
| | | export function updateQualitySuperviseDetail(data) { |
| | | return request({ |
| | | url: "/qualitySupervise/updateQualitySuperviseDetail", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çç£è®°å½ä¸ç¬¦åæ§å¶ä¿¡æ¯ |
| | | export function getSuperviseDetailAccording(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/getSuperviseDetailAccording", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çç£è®°å½ä¸ç¬¦åæ§å¶ä¿¡æ¯ |
| | | export function addSuperviseDetailAccording(data) { |
| | | return request({ |
| | | url: "/qualitySupervise/addSuperviseDetailAccording", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çç£è®¡åè®°å½æµç¨è¯¦æ
|
| | | export function getSuperviseDetailRecord(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/getSuperviseDetailRecord", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çç£è®°å½ä¿¡æ¯ |
| | | export function addSuperviseDetailRecord(data) { |
| | | return request({ |
| | | url: "/qualitySupervise/addSuperviseDetailRecord", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æäº¤çç£è®°å½æ¹å |
| | | export function addSuperviseRecordOpinion(data) { |
| | | return request({ |
| | | url: "/qualitySupervise/addSuperviseRecordOpinion", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çç£çº æ£å¤ç |
| | | export function getSuperviseDetailCorrect(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/getSuperviseDetailCorrect", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢çç£çº æ£å¤ç |
| | | export function addSuperviseDetailCorrect(data) { |
| | | return request({ |
| | | url: "/qualitySupervise/addSuperviseDetailCorrect", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // ä¸ç¬¦åå·¥ä½ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //æ¥è¯¢çç£è®°å½ä¸ç¬¦åæ§å¶ä¿¡æ¯å表 |
| | | export function pageSuperviseDetailAccording(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/pageSuperviseDetailAccording", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºä¸ç¬¦å项 |
| | | export function superviseDetailAccordingExport(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/superviseDetailAccordingExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢çç£è®°å½ä¸ç¬¦åæ§å¶ä¿¡æ¯ |
| | | export function getSuperviseDetailAccording(query) { |
| | | return request({ |
| | | url: "/qualitySupervise/getSuperviseDetailAccording", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä¸ç¬¦å项çåå¸å页æ¥è¯¢ |
| | | export function pageInconsistentDistribution(query) { |
| | | return request({ |
| | | url: "/inconsistentDistribution/pageInconsistentDistribution", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä¸ç¬¦å项çåå¸å é¤ |
| | | export function delInconsistentDistribution(query) { |
| | | return request({ |
| | | url: "/inconsistentDistribution/delInconsistentDistribution", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //导åºä¸ç¬¦å项çåå¸ |
| | | export function exportInconsistentDistribution(query) { |
| | | return request({ |
| | | url: "/inconsistentDistribution/exportInconsistentDistribution", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //ä¸ç¬¦å项çåå¸è¯¦æ
|
| | | export function getInconsistentDistributionOne(query) { |
| | | return request({ |
| | | url: "/inconsistentDistribution/getInconsistentDistributionOne", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ä¸ç¬¦å项çå叿°å¢ |
| | | export function addInconsistentDistribution(data) { |
| | | return request({ |
| | | url: "/inconsistentDistribution/addInconsistentDistribution", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¸ç¬¦å项çåå¸ä¿®æ¹ |
| | | export function updateInconsistentDistribution(data) { |
| | | return request({ |
| | | url: "/inconsistentDistribution/updateInconsistentDistribution", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ¥åç»æç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //8æ¥åç»æ-å¯¼åº |
| | | export function exportProcessReport(data) { |
| | | return request({ |
| | | url: "/processReport/exportProcessReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 8æ¥åç»æ-æ°å¢ |
| | | export function addProcessReport(data) { |
| | | return request({ |
| | | url: "/processReport/addProcessReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 8æ¥åç»æ-ä¿®æ¹ |
| | | export function doProcessReport(data) { |
| | | return request({ |
| | | url: "/processReport/doProcessReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //8æ¥åç»æ-å é¤ |
| | | export function delProcessReport(query) { |
| | | return request({ |
| | | url: "/processReport/delProcessReport", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //8æ¥åç»æ-å表 |
| | | export function pageProcessReport(query) { |
| | | return request({ |
| | | url: "/processReport/pageProcessReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ£æµææ ¡åç©åçå¤ç½® |
| | | import request from "@/utils/request"; |
| | | |
| | | // ä¿®æ¹ |
| | | export function doProcessDeal(data) { |
| | | return request({ |
| | | url: "/processDeal/doProcessDeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢ |
| | | export function addProcessDeal(data) { |
| | | return request({ |
| | | url: "/processDeal/addProcessDeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æäº¤åå² ä¼ åid |
| | | export function submitProcessTotaldeal(data) { |
| | | return request({ |
| | | url: "/processTotaldeal/submitProcessTotaldeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ¥è¯¢è¯¦æ
å页æ¥è¯¢éé¢totaldealId ä¼ ååå²çid |
| | | export function pageProcessDeal(query) { |
| | | return request({ |
| | | url: "/processDeal/pageProcessDeal", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å®¡æ ¸ ä¼ åidåéè¿ä¸éè¿state(䏿) |
| | | export function checkProcessTotaldeal(data) { |
| | | return request({ |
| | | url: "/processTotaldeal/checkProcessTotaldeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¹å ä¼ åidåéè¿ä¸éè¿state(䏿) |
| | | export function ratifyProcessTotaldeal(data) { |
| | | return request({ |
| | | url: "/processTotaldeal/ratifyProcessTotaldeal", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤ |
| | | export function delProcessDeal(query) { |
| | | return request({ |
| | | url: "/processDeal/delProcessDeal", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥çåå² |
| | | export function pageProcessTotaldeal(query) { |
| | | return request({ |
| | | url: "/processTotaldeal/pageProcessTotaldeal", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ ·åæ¥æ¶-ä¿®æ¹ |
| | | export function doProcessSample(data) { |
| | | return request({ |
| | | url: "/processSample/doProcessSample", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ ·åæ¥æ¶-æ°å¢ |
| | | export function addProcessSample(data) { |
| | | return request({ |
| | | url: "/processSample/addProcessSample", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ ·åæ¥æ¶-æäº¤åå² |
| | | export function submitProcessTotalSample(data) { |
| | | return request({ |
| | | url: "/processTotalSample/submitProcessTotalSample", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ ·åæ¥æ¶-æ¥è¯¢è¯¦æ
|
| | | export function pageProcessSample(query) { |
| | | return request({ |
| | | url: "/processSample/pageProcessSample", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ ·åæ¥æ¶-å®¡æ ¸ |
| | | export function checkProcessTotalSample(data) { |
| | | return request({ |
| | | url: "/processTotalSample/checkProcessTotalSample", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ ·åæ¥æ¶-æ¹å |
| | | export function ratifyProcessTotalSample(data) { |
| | | return request({ |
| | | url: "/processTotalSample/ratifyProcessTotalSample", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //æ ·åæ¥æ¶-å é¤ |
| | | export function delProcessSample(query) { |
| | | return request({ |
| | | url: "/processSample/delProcessSample", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ ·åæ¥æ¶-æ¥çåå² |
| | | export function pageProcessTotalSample(query) { |
| | | return request({ |
| | | url: "/processTotalSample/pageProcessTotalSample", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // ä¸ç¡®å®åº¦è¯å®ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //å¯¼åº |
| | | export function exportProcessEvaluate(query) { |
| | | return request({ |
| | | url: "/processEvaluate/exportProcessEvaluate", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å¡«å (主è¦ä¸ä¼ idå夿³¨note就好äº) |
| | | export function doProcessEvaluate(data) { |
| | | return request({ |
| | | url: "/processEvaluate/doProcessEvaluate", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤ |
| | | export function delProcessEvaluate(query) { |
| | | return request({ |
| | | url: "/processEvaluate/delProcessEvaluate", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //å页 |
| | | export function pageProcessEvaluate(query) { |
| | | return request({ |
| | | url: "/processEvaluate/pageProcessEvaluate", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // è·åå½åç»å½äººåé¨é¨ |
| | | export function selectUserDepartmentLimsName(query) { |
| | | return request({ |
| | | url: "/system/newUser/selectUserDepartmentLimsName", |
| | | method: "get", |
| | | }); |
| | | } |
| | |
| | | @import './variables.scss'; |
| | | @import './mixin.scss'; |
| | | @import './transition.scss'; |
| | | @import './element-ui.scss'; |
| | | @import './sidebar.scss'; |
| | | @import './btn.scss'; |
| | | @import "./variables.scss"; |
| | | @import "./mixin.scss"; |
| | | @import "./transition.scss"; |
| | | @import "./element-ui.scss"; |
| | | @import "./sidebar.scss"; |
| | | @import "./btn.scss"; |
| | | |
| | | body { |
| | | height: 100%; |
| | | -moz-osx-font-smoothing: grayscale; |
| | | -webkit-font-smoothing: antialiased; |
| | | text-rendering: optimizeLegibility; |
| | | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; |
| | | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, |
| | | Microsoft YaHei, Arial, sans-serif; |
| | | } |
| | | |
| | | label { |
| | |
| | | display: block; |
| | | line-height: 32px; |
| | | font-size: 16px; |
| | | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; |
| | | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, |
| | | Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; |
| | | color: #2c3e50; |
| | | -webkit-font-smoothing: antialiased; |
| | | -moz-osx-font-smoothing: grayscale; |
| | |
| | | } |
| | | |
| | | .text-center { |
| | | text-align: center |
| | | text-align: center; |
| | | } |
| | | |
| | | .sub-navbar { |
| | |
| | | text-align: right; |
| | | padding-right: 20px; |
| | | transition: 600ms ease position; |
| | | background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); |
| | | background: linear-gradient( |
| | | 90deg, |
| | | rgba(32, 182, 249, 1) 0%, |
| | | rgba(32, 182, 249, 1) 0%, |
| | | rgba(33, 120, 241, 1) 100%, |
| | | rgba(33, 120, 241, 1) 100% |
| | | ); |
| | | |
| | | .subtitle { |
| | | font-size: 20px; |
| | |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | |
| | | table { |
| | | border-collapse: collapse; /* å
³é®å±æ§ï¼åå¹¶è¾¹æ¡ */ |
| | | } |
| | | |
| | | .required-span { |
| | | color: red; |
| | | } |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current" |
| | | <pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current" |
| | | :limit.sync="page.size" @pagination="pagination" /> |
| | | </div> |
| | | </template> |
| | |
| | | <style scoped> |
| | | .value-table { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | .value-table { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .table { |
| | | width: 100%; |
| | | height: calc(100% - 42px); |
| | | } |
| | | .table { |
| | | width: 100%; |
| | | height: calc(100% - 42px); |
| | | } |
| | | |
| | | .page { |
| | | width: 100%; |
| | | height: 30px; |
| | | text-align: right; |
| | | margin-top: 10px; |
| | | } |
| | | .page { |
| | | width: 100%; |
| | | height: 30px; |
| | | text-align: right; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .down-left { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .down-left { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .down-right { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .down-right { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .body { |
| | | overflow-x: hidden; |
| | | } |
| | | .body { |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .handleBtn { |
| | | border: none; |
| | | padding: 0; |
| | | color: #409EFF; |
| | | background: transparent; |
| | | } |
| | | .handleBtn { |
| | | border: none; |
| | | padding: 0; |
| | | color: #409EFF; |
| | | background: transparent; |
| | | } |
| | | |
| | | .handleBtn:hover { |
| | | background: transparent; |
| | | } |
| | | .handleBtn:hover { |
| | | background: transparent; |
| | | } |
| | | |
| | | .handleBtn.is-disabled { |
| | | color: #C0C4CC; |
| | | } |
| | | .red{ |
| | | color: red !important; |
| | | } |
| | | >>>.el-loading-parent--relative { |
| | | z-index: 1 !important; |
| | | } |
| | | >>> .el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 14px; /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | | .handleBtn.is-disabled { |
| | | color: #C0C4CC; |
| | | } |
| | | |
| | | .red { |
| | | color: red !important; |
| | | } |
| | | |
| | | >>>.el-loading-parent--relative { |
| | | z-index: 1 !important; |
| | | } |
| | | |
| | | >>>.el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 14px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | | </style> |
| | | <style> |
| | | /* .value-table .highlight-warning-row-border td { |
| | | /* .value-table .highlight-warning-row-border td { |
| | | border-top: 2px solid #ffcd29; |
| | | border-bottom: 2px solid #ffcd29; |
| | | } */ |
| | | |
| | | .value-table .highlight-warning-row-border td:first-child { |
| | | border-left: 4px solid #ffcd29; |
| | | } |
| | | .value-table .highlight-warning-row-border td:first-child { |
| | | border-left: 4px solid #ffcd29; |
| | | } |
| | | |
| | | .value-table .highlight-warning-row-border td:last-child { |
| | | border-right: 4px solid #ffcd29; |
| | | } |
| | | .value-table .highlight-warning-row-border td:last-child { |
| | | border-right: 4px solid #ffcd29; |
| | | } |
| | | |
| | | /* .value-table .highlight-danger-row-border td { |
| | | /* .value-table .highlight-danger-row-border td { |
| | | border-top: 2px solid red; |
| | | border-bottom: 2px solid red; |
| | | } */ |
| | | |
| | | .value-table .highlight-danger-row-border td:first-child { |
| | | border-left: 4px solid #f56c6c; |
| | | } |
| | | .value-table .highlight-danger-row-border td:first-child { |
| | | border-left: 4px solid #f56c6c; |
| | | } |
| | | |
| | | .value-table .highlight-danger-row-border td:last-child { |
| | | border-right: 4px solid #f56c6c; |
| | | } |
| | | .value-table .highlight-danger-row-border td:last-child { |
| | | border-right: 4px solid #f56c6c; |
| | | } |
| | | |
| | | .value-table .el-upload { |
| | | width: 100%; |
| | | } |
| | | .value-table .el-upload { |
| | | width: 100%; |
| | | } |
| | | |
| | | .value-table .el-upload-dragger { |
| | | width: 100%; |
| | | } |
| | | .value-table .el-upload-dragger { |
| | | width: 100%; |
| | | } |
| | | |
| | | .value-table .handleBtn.is-disabled .el-upload:focus { |
| | | color: #C0C4CC !important; |
| | | } |
| | | .value-table .handleBtn.is-disabled .el-upload:focus { |
| | | color: #C0C4CC !important; |
| | | } |
| | | |
| | | .value-table .avatar-uploader .el-upload { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .el-table__empty-text{ |
| | | text-align: left; |
| | | width: 100%; |
| | | display: inline-block; |
| | | margin-left: 200px; |
| | | } |
| | | .value-table .avatar-uploader .el-upload { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .el-table__empty-text { |
| | | text-align: left; |
| | | width: 100%; |
| | | display: inline-block; |
| | | margin-left: 200px; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="value-table"> |
| | | <div :style="data.isPage!=undefined&&data.isPage!=true?'height:100%':''" class="table"> |
| | | <el-table :key="specialKey" ref="eltable" v-loading="loading" :current-row-key="data.currentId" :data="tableData" :highlight-current-row="data.highlight===undefined||data.highlight" |
| | | :row-class-name="tableRowClassName" :row-key="record=>record[rowKey]" :show-summary="data.countFleid!=undefined && data.countFleid.length > 0" :span-method="spanMethod" |
| | | :summary-method="getSummaries" |
| | | height="100%" style="width: 100%;" tooltip-effect="dark" |
| | | @select="select" @selection-change="selectChange" |
| | | @sort-change="sortChange" @row-click="rowClick"> |
| | | <div :style="data.isPage != undefined && data.isPage != true ? 'height:100%' : ''" class="table"> |
| | | <el-table :key="specialKey" ref="eltable" v-loading="loading" :current-row-key="data.currentId" :data="tableData" |
| | | :highlight-current-row="data.highlight === undefined || data.highlight" :row-class-name="tableRowClassName" |
| | | :row-key="record => record[rowKey]" :show-summary="data.countFleid != undefined && data.countFleid.length > 0" |
| | | :span-method="spanMethod" :summary-method="getSummaries" height="100%" style="width: 100%;" |
| | | tooltip-effect="dark" @select="select" @selection-change="selectChange" @sort-change="sortChange" |
| | | @row-click="rowClick"> |
| | | <el-table-column v-if="data.showSelect" :key="Math.random()" :width="selectionWidth" type="selection"> |
| | | </el-table-column> |
| | | <el-table-column v-if="data.isIndex" :key="Math.random()" :width="selectionWidth" align="center" label="åºå·" type="index"> |
| | | <el-table-column v-if="data.isIndex" :key="Math.random()" :width="selectionWidth" align="center" label="åºå·" |
| | | type="index"> |
| | | </el-table-column> |
| | | <el-table-column v-for="(a, ai) in tableHead" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))" :key="ai+'bbbbb'" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero" |
| | | :label="a.value" :min-width="columnMinWidth" :prop="a.label" :sortable="a.sort === 'custom' ? 'custom' : false" show-overflow-tooltip> |
| | | <el-table-column v-for="(a, ai) in tableHead" |
| | | v-if="!data.headNoShow || (data.headNoShow && data.headNoShow.length == 0) || (data.headNoShow && data.headNoShow.length > 0 && !data.headNoShow.find(d => d == a.label))" |
| | | :key="ai + 'bbbbb'" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero" :label="a.value" |
| | | :min-width="columnMinWidth" :prop="a.label" :sortable="a.sort === 'custom' ? 'custom' : false" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div v-if="showType(a.label, data.tagField) != null"> |
| | | <template v-if="typeof(scope.row[a.label]) == 'object'"> |
| | | <template v-if="typeof (scope.row[a.label]) == 'object'"> |
| | | <template v-for="(param, i) in scope.row[a.label]"> |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-if="b.value == param" :key="bi+'cccc'" |
| | | :type="b.type" size="medium" style="margin-right: 5px;">{{b.label}}</el-tag> |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-if="b.value == param" :key="bi + 'cccc'" |
| | | :type="b.type" size="medium" style="margin-right: 5px;">{{ b.label }}</el-tag> |
| | | </template> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-show="b.value == scope.row[a.label]" :key="bi+'ddddd'" |
| | | :type="b.type" size="medium">{{b.label}}</el-tag> |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" v-show="b.value == scope.row[a.label]" |
| | | :key="bi + 'ddddd'" :type="b.type" size="medium">{{ b.label }}</el-tag> |
| | | </template> |
| | | </div> |
| | | <!-- 坿ä½è¡è¿è¡ç¹å»äºä»¶ --> |
| | | <span v-else-if="data.linkEvent&&showLink(a.label, data.linkEvent)" style="color:#409EFF;cursor: pointer;" |
| | | @click="handleLinkEvent(scope.row,data.linkEvent[a.label])">{{scope.row[a.label]}}</span> |
| | | <img v-else-if="showUpload(a.label)&&scope.row[a.label]" :src="javaApi+'/img/'+scope.row[a.label]" |
| | | alt="" style="width: 40px;height: 40px;margin-top: 10px;"> |
| | | <span v-else :class="{red:getRedColor(a.label,scope.row)}" >{{scope.row[a.label]}}</span> |
| | | <span v-else-if="data.linkEvent && showLink(a.label, data.linkEvent)" style="color:#409EFF;cursor: pointer;" |
| | | @click="handleLinkEvent(scope.row, data.linkEvent[a.label])">{{ scope.row[a.label] }}</span> |
| | | <img v-else-if="showUpload(a.label) && scope.row[a.label]" :src="javaApi + '/img/' + scope.row[a.label]" alt="" |
| | | style="width: 40px;height: 40px;margin-top: 10px;"> |
| | | <span v-else :class="{ red: getRedColor(a.label, scope.row) }">{{ scope.row[a.label] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="data.do.length > 0" :width="getWidth()" align="center" fixed="right" label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-for="(a, ai) in data.do" :key="ai |
| | | +'qqqq'" :disabled="a.disabFun ? a.disabFun(scope.row,scope.$index) : false" |
| | | :type="a.type" class="handleBtn" |
| | | @click="main(scope.row, a)"> |
| | | <span v-if="a.type!='upload'">{{a.font}}</span> |
| | | <el-upload v-else ref='upload' |
| | | :accept='a.uploadConfig.accept' :action="javaApi+a.uploadConfig.url+'?id='+ (a.uploadConfig.uploadIdFun ? a.uploadConfig.uploadIdFun(scope.row) : scope.row.id)" |
| | | :disabled="a.disabFun ? a.disabFun(scope.row,scope.$index) : false" :headers="token" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" |
| | | name="file" style="background: transparent;"> |
| | | <span>{{a.font}}</span> |
| | | + 'qqqq'" :disabled="a.disabled ? a.disabled(scope.row, scope.$index) : false" :type="a.type" |
| | | class="handleBtn" @click="main(scope.row, a)"> |
| | | <span v-if="a.type != 'upload'">{{ a.font }}</span> |
| | | <el-upload v-else ref='upload' :accept='a.uploadConfig.accept' |
| | | :action="javaApi + a.uploadConfig.url + '?id=' + (a.uploadConfig.uploadIdFun ? a.uploadConfig.uploadIdFun(scope.row) : scope.row.id)" |
| | | :disabled="a.disabled ? a.disabled(scope.row, scope.$index) : false" :headers="token" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" name="file" style="background: transparent;"> |
| | | <span>{{ a.font }}</span> |
| | | </el-upload> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div v-if="data.isPage==undefined||data.isPage" class="page"> |
| | | <div v-if="data.isPage == undefined || data.isPage" class="page"> |
| | | <el-pagination :current-page="page.current" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="sizeChange" |
| | | @current-change="currentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog :close-on-click-modal="false" :visible.sync="upDia" |
| | | :width="data.row==1?'500px':540+data.row * 200 + 'px'" |
| | | append-to-body title="ç¼è¾"> |
| | | :width="data.row == 1 ? '500px' : 540 + data.row * 200 + 'px'" append-to-body title="ç¼è¾"> |
| | | <div class="body" style="max-height: 600px;overflow-y: auto;padding: 5px 10px 5px 0;"> |
| | | <div v-if="data.row > 1"> |
| | | <div v-for="(a, ai) in upHead" :key="ai+'ffff'" style="line-height: 50px;"> |
| | | <el-col :offset="1" :span="6/data.row" style="text-align: right;"> |
| | | <span v-if="showUpReq(a.label)" class="required-span">* </span>{{a.value}}ï¼ |
| | | <div v-for="(a, ai) in upHead" :key="ai + 'ffff'" style="line-height: 50px;"> |
| | | <el-col :offset="1" :span="6 / data.row" style="text-align: right;"> |
| | | <span v-if="showUpReq(a.label)" class="required-span">* </span>{{ a.value }}ï¼ |
| | | </el-col> |
| | | <el-col :span="16/data.row"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`请è¾å
¥${a.value}`" |
| | | clearable |
| | | <el-col :span="16 / data.row"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`请è¾å
¥${a.value}`" clearable |
| | | size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :allow-create="data.selectField[a.label].allowCreate" |
| | | :default-first-option="data.selectField[a.label].defaultFirstOption" |
| | | :disabled="isDisabled(a.label)" |
| | | :multiple="data.selectField[a.label].choose" clearable filterable |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'eeeee'" :label="b.label" |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | | :allow-create="data.selectField[a.label].allowCreate" |
| | | :default-first-option="data.selectField[a.label].defaultFirstOption" :disabled="isDisabled(a.label)" |
| | | :multiple="data.selectField[a.label].choose" clearable filterable size="small" style="width: 100%;"> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'eeeee'" :label="b.label" |
| | | :value="b.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' |
| | | :accept='data.addUploadConfig.accept' :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false" |
| | | :on-error="onError" :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" |
| | | name="file" |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar" |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`è¯·éæ©${a.value}`" |
| | | :props="data.cascaderField.props" :show-all-levels="false" :value="upData[a.label]" |
| | | clearable filterable size="small" |
| | | style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" |
| | | :placeholder="`è¯·éæ©${a.value}`" :props="data.cascaderField.props" :show-all-levels="false" |
| | | :value="upData[a.label]" clearable filterable size="small" style="width: 100%;" |
| | | @change="m => handleCascader(m, a.label)"></el-cascader> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <el-row v-for="(a, ai) in upHead" :key="ai+'ggggg'" style="line-height: 50px;"> |
| | | <el-row v-for="(a, ai) in upHead" :key="ai + 'ggggg'" style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <span v-if="showUpReq(a.label)" class="required-span">* </span>{{a.value}}ï¼ |
| | | <span v-if="showUpReq(a.label)" class="required-span">* </span>{{ a.value }}ï¼ |
| | | </el-col> |
| | | <el-col :offset="1" :span="16"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`请è¾å
¥${a.value}`" |
| | | clearable |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :disabled="isDisabled(a.label)" :placeholder="`请è¾å
¥${a.value}`" clearable |
| | | size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :disabled="isDisabled(a.label)" |
| | | :multiple="data.selectField[a.label].choose" clearable filterable |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | | :disabled="isDisabled(a.label)" :multiple="data.selectField[a.label].choose" clearable filterable |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'fffff'" :label="b.label" |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'fffff'" :label="b.label" |
| | | :value="b.value"></el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar" |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`è¯·éæ©${a.value}`" |
| | | :props="data.cascaderField.props" :show-all-levels="false" :value="upData[a.label]" clearable |
| | | filterable size="small" style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" |
| | | :placeholder="`è¯·éæ©${a.value}`" :props="data.cascaderField.props" :show-all-levels="false" |
| | | :value="upData[a.label]" clearable filterable size="small" style="width: 100%;" |
| | | @change="m => handleCascader(m, a.label)"></el-cascader> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :close-on-click-modal="false" :visible.sync="addDia" |
| | | :width="data.row==1?'500px':540+data.row * 200 + 'px'" |
| | | append-to-body title="æ°å¢"> |
| | | :width="data.row == 1 ? '500px' : 540 + data.row * 200 + 'px'" append-to-body title="æ°å¢"> |
| | | <div v-if="addDia" class="body" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;"> |
| | | <div v-if="data.row > 1"> |
| | | <div v-for="(a, ai) in upHead" :key="ai+'yyyyy'" style="line-height: 50px;"> |
| | | <el-col :offset="1" :span="6/data.row" style="text-align: right;"><span v-if="showAddReq(a.label)" |
| | | <div v-for="(a, ai) in upHead" :key="ai + 'yyyyy'" style="line-height: 50px;"> |
| | | <el-col :offset="1" :span="6 / data.row" style="text-align: right;"><span v-if="showAddReq(a.label)" |
| | | class="required-span">* |
| | | </span>{{a.value}}ï¼</el-col> |
| | | <el-col :span="16/data.row"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :placeholder="`请è¾å
¥${a.value}`" clearable |
| | | size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" |
| | | :placeholder="`è¯·éæ©${a.value}`" |
| | | clearable filterable size="small" style="width: 100%;"> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'hhhh'" :label="b.label" |
| | | </span>{{ a.value }}ï¼</el-col> |
| | | <el-col :span="16 / data.row"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :placeholder="`请è¾å
¥${a.value}`" clearable size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | | :multiple="data.selectField[a.label].choose" :placeholder="`è¯·éæ©${a.value}`" clearable filterable |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'hhhh'" :label="b.label" |
| | | :value="b.value"></el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' |
| | | :accept='data.addUploadConfig.accept' :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false" |
| | | :on-error="onError" :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" |
| | | name="file" |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar" |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`è¯·éæ©${a.value}`" |
| | | :props="data.cascaderField.props" :show-all-levels="false" clearable filterable |
| | | size="small" style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" |
| | | :placeholder="`è¯·éæ©${a.value}`" :props="data.cascaderField.props" :show-all-levels="false" clearable |
| | | filterable size="small" style="width: 100%;" @change="m => handleCascader(m, a.label)"></el-cascader> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <el-row v-for="(a, ai) in upHead" :key="ai+'jjjjj'" style="line-height: 50px;"> |
| | | <el-row v-for="(a, ai) in upHead" :key="ai + 'jjjjj'" style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"><span v-if="showAddReq(a.label)" class="required-span">* |
| | | </span>{{a.value}}ï¼</el-col> |
| | | </span>{{ a.value }}ï¼</el-col> |
| | | <el-col :offset="1" :span="16"> |
| | | <el-input v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" v-model="upData[a.label]" :placeholder="`请è¾å
¥${a.value}`" clearable |
| | | size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" |
| | | :placeholder="`è¯·éæ©${a.value}`" |
| | | clearable size="small" style="width: 100%;"> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'mmmmmm'" :label="b.label" |
| | | <el-input v-if="showType(a.label, data.selectField) == null && !showUpload(a.label) && !showCascader(a.label)" |
| | | v-model="upData[a.label]" :placeholder="`请è¾å
¥${a.value}`" clearable size="small"></el-input> |
| | | <el-select v-if="showType(a.label, data.selectField) != null" v-model="upData[a.label]" |
| | | :multiple="data.selectField[a.label].choose" :placeholder="`è¯·éæ©${a.value}`" clearable size="small" |
| | | style="width: 100%;"> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi + 'mmmmmm'" :label="b.label" |
| | | :value="b.value"></el-option> |
| | | </el-select> |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' |
| | | :accept='data.addUploadConfig.accept' :action="javaApi+data.addUploadConfig.url" :headers="token" :multiple="false" |
| | | :on-error="onError" :on-success="m=>handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" |
| | | name="file" |
| | | <el-upload v-if="showUpload(a.label)" ref='upload' :accept='data.addUploadConfig.accept' |
| | | :action="javaApi + data.addUploadConfig.url" :headers="token" :multiple="false" :on-error="onError" |
| | | :on-success="m => handleSuccessUp(m, a.label)" :show-file-list="false" class="avatar-uploader" name="file" |
| | | style="background: transparent;width: 80px;height: 80px;border: 1px solid #DCDFE6;border-radius: 6px;margin: 10px 0;"> |
| | | <img v-if="upData[a.label]" :src="javaApi+'/img/'+upData[a.label]" class="avatar" |
| | | <img v-if="upData[a.label]" :src="javaApi + '/img/' + upData[a.label]" class="avatar" |
| | | style="width: 80px;height: 80px;border-radius: 6px;"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" :placeholder="`è¯·éæ©${a.value}`" |
| | | :props="data.cascaderField.props" :show-all-levels="false" clearable filterable |
| | | size="small" style="width: 100%;" @change="m=>handleCascader(m,a.label)"></el-cascader> |
| | | <el-cascader v-if="showCascader(a.label)" :options="data.cascaderField[a.label].tree" |
| | | :placeholder="`è¯·éæ©${a.value}`" :props="data.cascaderField.props" :show-all-levels="false" clearable |
| | | filterable size="small" style="width: 100%;" @change="m => handleCascader(m, a.label)"></el-cascader> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="uploadDia" title="æ°æ®å¯¼å
¥" width="500px"> |
| | | <div style="margin: 0 auto;"> |
| | | <el-upload ref="upload" :accept="data.accept===undefined?'.csv':data.accept" :action="javaApi + inputUrl" :auto-upload="false" :data="{param: data.uploadStr}" :file-list="fileList" |
| | | :headers="token" :limit="1" :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" |
| | | drag name="file"> |
| | | <el-upload ref="upload" :accept="data.accept === undefined ? '.csv' : data.accept" :action="javaApi + inputUrl" |
| | | :auto-upload="false" :data="{ param: data.uploadStr }" :file-list="fileList" :headers="token" :limit="1" |
| | | :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" drag name="file"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | selectionWidth: { |
| | | type: String, |
| | | default: () => '65' |
| | | }, |
| | | columnMinWidth: { |
| | | type: String, |
| | | default: () => '155' |
| | | }, |
| | | isColumnWidth: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | isShowZero: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | tableRowClassName: { |
| | | type: Function |
| | | }, |
| | | rowKey: { |
| | | type: String, |
| | | default: ()=>{ |
| | | return 'id' |
| | | } |
| | | }, |
| | | url: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | upUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | delUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | downUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | inputUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | componentData: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | entity: { |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: false, |
| | | showSelect: false, |
| | | select: true, |
| | | row: 1, |
| | | do: [{ |
| | | id: 'update', |
| | | font: 'ç¼è¾', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }], |
| | | doDiy: true, |
| | | tagField: [{ |
| | | label: 'state', |
| | | select: [{ |
| | | value: '1', |
| | | type: 'success', |
| | | label: 'å¯ç¨' |
| | | }, { |
| | | value: '0', |
| | | type: 'danger', |
| | | label: 'åç¨' |
| | | }] |
| | | }] |
| | | } |
| | | } |
| | | export default { |
| | | props: { |
| | | selectionWidth: { |
| | | type: String, |
| | | default: () => '65' |
| | | }, |
| | | columnMinWidth: { |
| | | type: String, |
| | | default: () => '155' |
| | | }, |
| | | isColumnWidth: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | isShowZero: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | tableRowClassName: { |
| | | type: Function |
| | | }, |
| | | rowKey: { |
| | | type: String, |
| | | default: () => { |
| | | return 'id' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | data: { |
| | | url: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | upUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | delUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | downUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | inputUrl: { |
| | | type: String, |
| | | default: () => null |
| | | }, |
| | | componentData: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | entity: { |
| | | orderBy: { |
| | | field: 'id', |
| | |
| | | showSelect: false, |
| | | select: true, |
| | | row: 1, |
| | | isPage: true, // |
| | | do: [{ |
| | | id: 'update', |
| | | font: 'ç¼è¾', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text' |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }], |
| | | type: [], |
| | | uploadStr: "", |
| | | currentId: '', //å½åé«äº®çID |
| | | }, |
| | | tableHead: [], |
| | | tableData: [], |
| | | multipleSelection: [], |
| | | user: {}, |
| | | page: { |
| | | current: 1, |
| | | size: 20, |
| | | }, |
| | | total: 0, |
| | | loading: false, |
| | | upDia: false, |
| | | upData: {}, |
| | | upHead: [], |
| | | upLoad: false, |
| | | addDia: false, |
| | | addUrl: null, |
| | | addLoad: false, |
| | | dataCopy: {}, |
| | | downDia: false, |
| | | uploadDia: false, |
| | | token: null, |
| | | fileList: [], |
| | | init: true, |
| | | spanList: [ |
| | | // { |
| | | // arr:[], |
| | | // position:0 |
| | | // } |
| | | ], |
| | | specialSpanList: [ |
| | | // { |
| | | // arr:[], |
| | | // position:0 |
| | | // } |
| | | ], |
| | | param: {}, |
| | | specialKey:'table-' |
| | | doDiy: true, |
| | | tagField: [{ |
| | | label: 'state', |
| | | select: [{ |
| | | value: '1', |
| | | type: 'success', |
| | | label: 'å¯ç¨' |
| | | }, { |
| | | value: '0', |
| | | type: 'danger', |
| | | label: 'åç¨' |
| | | }] |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | beforeUpdate() { |
| | | this.$nextTick(() => { |
| | | this.$refs.eltable.doLayout() |
| | | }) |
| | | }, |
| | | mounted() { |
| | | this.data = this.componentData |
| | | this.dataCopy = this.HaveJson(this.componentData) |
| | | if (this.data.init === undefined || this.data.init === true) { |
| | | this.selectList() |
| | | } |
| | | this.token = { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | this.specialKey = this.specialKey+Math.random()*100; |
| | | }, |
| | | methods: { |
| | | 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; |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | data: { |
| | | entity: { |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }); |
| | | }, |
| | | isIndex: false, |
| | | showSelect: false, |
| | | select: true, |
| | | row: 1, |
| | | isPage: true, // |
| | | do: [{ |
| | | font: 'å é¤', |
| | | type: 'text' |
| | | }], |
| | | type: [], |
| | | uploadStr: "", |
| | | currentId: '', //å½åé«äº®çID |
| | | }, |
| | | spanMethod({ |
| | | row, |
| | | column, |
| | | rowIndex, |
| | | columnIndex |
| | | }) { |
| | | // ä¸è¬çåå¹¶è¡ |
| | | if (this.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length > 0) { |
| | | let i = null; |
| | | let obj = this.data.spanConfig.rows.find((item, index) => { |
| | | i = index; |
| | | return item.index == columnIndex |
| | | }) |
| | | if (obj) { |
| | | const _row = this.spanList[i].arr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col, |
| | | }; |
| | | tableHead: [], |
| | | tableData: [], |
| | | multipleSelection: [], |
| | | user: {}, |
| | | page: { |
| | | current: 1, |
| | | size: 20, |
| | | }, |
| | | total: 0, |
| | | loading: false, |
| | | upDia: false, |
| | | upData: {}, |
| | | upHead: [], |
| | | upLoad: false, |
| | | addDia: false, |
| | | addUrl: null, |
| | | addLoad: false, |
| | | dataCopy: {}, |
| | | downDia: false, |
| | | uploadDia: false, |
| | | token: null, |
| | | fileList: [], |
| | | init: true, |
| | | spanList: [ |
| | | // { |
| | | // arr:[], |
| | | // position:0 |
| | | // } |
| | | ], |
| | | specialSpanList: [ |
| | | // { |
| | | // arr:[], |
| | | // position:0 |
| | | // } |
| | | ], |
| | | param: {}, |
| | | specialKey: 'table-' |
| | | } |
| | | }, |
| | | beforeUpdate() { |
| | | this.$nextTick(() => { |
| | | this.$refs.eltable.doLayout() |
| | | }) |
| | | }, |
| | | mounted() { |
| | | this.data = this.componentData |
| | | this.dataCopy = this.HaveJson(this.componentData) |
| | | if (this.data.init === undefined || this.data.init === true) { |
| | | this.selectList() |
| | | } |
| | | this.token = { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | this.specialKey = this.specialKey + Math.random() * 100; |
| | | }, |
| | | methods: { |
| | | 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.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length > 0) { |
| | | let i = null; |
| | | let obj = this.data.spanConfig.rows.find((item, index) => { |
| | | i = index; |
| | | return item.index == columnIndex |
| | | }) |
| | | if (obj) { |
| | | const _row = this.spanList[i].arr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col, |
| | | }; |
| | | } |
| | | } |
| | | // ç¹æ®çåå¹¶è¡ |
| | | if (this.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, |
| | | }; |
| | | } |
| | | } |
| | | }, |
| | | selectChange(val) { |
| | | if (this.data.select) { |
| | | this.multipleSelection = val; |
| | | } else { |
| | | this.multipleSelection = val[val.length - 1]; |
| | | } |
| | | if (this.data.selectMethod != undefined) { |
| | | if (this.$parent.$el.className.indexOf('el-') == 0) { |
| | | this.$parent.$parent[this.data.selectMethod](val) |
| | | } else { |
| | | this.$parent[this.data.selectMethod](val) |
| | | } |
| | | } |
| | | }, |
| | | select(val, row) { |
| | | if (!this.data.select) { |
| | | this.$refs['eltable'].clearSelection() |
| | | this.$refs['eltable'].toggleRowSelection(row, true) |
| | | } |
| | | }, |
| | | rowClick(row, column, event) { |
| | | if (this.data.select) { |
| | | this.$refs['eltable'].toggleRowSelection(row) |
| | | } else { |
| | | this.$refs['eltable'].clearSelection() |
| | | this.$refs['eltable'].toggleRowSelection(row, true) |
| | | } |
| | | }, |
| | | sizeChange(val) { |
| | | this.page.size = val |
| | | this.selectList('page') |
| | | }, |
| | | currentChange(val) { |
| | | this.page.current = val |
| | | this.selectList('page') |
| | | }, |
| | | // è°åè¡¨æ ¼æ¥è¯¢æ¥å£ |
| | | selectList(val) { |
| | | // console.log('val---', val) |
| | | // console.log('this.page---', this.page) |
| | | // this.loading = true |
| | | if (val === undefined) { |
| | | this.page.current = 1; |
| | | } |
| | | if (val === 'lastPage') { |
| | | this.page.current = this.page.current - 1 // ä¾å¦å 餿¬é¡µæå䏿¡æ°æ®ï¼å°å½å页é¢å®ä¸ºä¸ä¸é¡µï¼é¤ç¬¬ä¸é¡µå¤ |
| | | } |
| | | // ä¸è¦å页就å
¨æ¥ |
| | | if (this.data.isPage != undefined && this.data.isPage != true) { |
| | | this.page = { |
| | | current: -1, |
| | | size: -1, |
| | | } |
| | | } |
| | | this.$axios.post(this.url, { |
| | | page: this.page, |
| | | entity: this.data.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.loading = false |
| | | return |
| | | } |
| | | this.total = res.data.body.total |
| | | this.tableHead = res.data.head |
| | | this.tableData = res.data.body.records |
| | | if (this.data.needSort !== undefined) { |
| | | // æ ¹æ®ç¶ç»ä»¶ä¼ 忥çneedSortæ°ç»ï¼å¤æåªäºå段éè¦æåºåè½ |
| | | for (var i = 0; i < this.data.needSort.length; i++) { |
| | | this.tableHead.forEach(item => { |
| | | if (item.label === this.data.needSort[i]) { |
| | | item.sort = 'custom' |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | if (this.isShowZero) { |
| | | // å·¥æ¶ç®¡ç-å·¥æ¶ç»è®¡æ²¡ææ¶é´çå°±å±ç¤º0 |
| | | this.tableData.map(item => { |
| | | Object.keys(item).forEach(val => { |
| | | if (item[val] === null && (val.includes('Hours') || val === 'total')) { |
| | | item[val] = 0 |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | if (this.tableData.length === 0 && this.page.current > 1) { |
| | | this.selectList('lastPage') |
| | | } |
| | | // if (this.isColumnWidth) { |
| | | // this.tableHead.forEach(item => { |
| | | // if(!item.width){ |
| | | // if (item.value.length === 4) { |
| | | // item.width = 120 |
| | | // } else if (item.value.length === 3){ |
| | | // item.width = item.label.includes('Hours') ? 50 : 100 |
| | | // } else if (item.value.length === 5){ |
| | | // item.width = 130 |
| | | // } else if (item.value.length === 7){ |
| | | // item.width = 160 |
| | | // } else if (item.value.length === 6){ |
| | | // item.width = 150 |
| | | // } else if (item.value.length === 2){ |
| | | // item.width = item.label.includes('Hours') ? 52 : 86 |
| | | // } else { |
| | | // item.width = item.label.includes('Hours') ? 46 : 86 |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData)) |
| | | for (var a in this.data.selectField) { |
| | | if (this.data.selectField[a].choose == true) { |
| | | this.tableData.map(b => { |
| | | try { |
| | | b[a] = JSON.parse(b[a]) |
| | | } catch (e) { } |
| | | }) |
| | | } |
| | | } |
| | | // ä¸è¬çåå¹¶è¡ |
| | | if (this.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length > |
| | | 0) { |
| | | this.spanList = []; |
| | | this.data.spanConfig.rows.forEach((item, index) => { |
| | | this.spanList.push({ |
| | | arr: [], |
| | | position: 0 |
| | | }) |
| | | this.rowspan(this.spanList[index].arr, this.spanList[index].position, item.name); |
| | | }) |
| | | } |
| | | // ç¹æ®çåå¹¶è¡ |
| | | if (this.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 (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) { |
| | | this.specialSpanList = [] |
| | | this.data.spanConfig.special.rows.forEach((item, index) => { |
| | | this.specialSpanList.push({ |
| | | arr: [], |
| | | position: 0 |
| | | }) |
| | | this.rowspan(this.specialSpanList[index].arr, this.specialSpanList[index].position, this.data |
| | | .spanConfig.special.main); |
| | | }) |
| | | if (obj) { |
| | | const _row = this.specialSpanList[i].arr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col, |
| | | }; |
| | | } |
| | | } |
| | | }, |
| | | selectChange(val) { |
| | | if (this.data.select) { |
| | | this.multipleSelection = val; |
| | | } else { |
| | | this.multipleSelection = val[val.length - 1]; |
| | | this.loading = false |
| | | }).catch(e => { |
| | | console.log('è¯·å·æ°é¡µé¢åå°è¯---', e) |
| | | this.loading = false |
| | | this.$message.error('è¯·å·æ°é¡µé¢åå°è¯') |
| | | }) |
| | | }, |
| | | sortChange(ob) { |
| | | this.data.entity.orderBy = {} |
| | | this.data.entity.orderBy.field = ob.prop |
| | | if (ob.order == 'ascending') { |
| | | this.data.entity.orderBy.order = 'asc' |
| | | } else if (ob.order == 'descending') { |
| | | this.data.entity.orderBy.order = 'desc' |
| | | } else { |
| | | if (this.componentData.entity.orderBy != undefined) { |
| | | this.data.entity.orderBy = this.HaveJson(this.dataCopy.entity.orderBy) |
| | | } |
| | | if (this.data.selectMethod != undefined) { |
| | | if (this.$parent.$el.className.indexOf('el-') == 0) { |
| | | this.$parent.$parent[this.data.selectMethod](val) |
| | | } else { |
| | | this.$parent[this.data.selectMethod](val) |
| | | } |
| | | } |
| | | this.selectList() |
| | | }, |
| | | // å±ç¤ºtag |
| | | showType(val, ob) { |
| | | var str = ob[val] |
| | | return str == undefined ? null : ob[val].select |
| | | }, |
| | | // å±ç¤ºæä½æ |
| | | showLink(val, ob) { |
| | | var str = ob[val] |
| | | return str == undefined ? null : ob[val].method |
| | | }, |
| | | showAddReq(label) { |
| | | if (this.data.requiredAdd == undefined) { |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredAdd.length; i++) { |
| | | if (label == this.data.requiredAdd[i]) { |
| | | return true |
| | | } |
| | | }, |
| | | select(val, row) { |
| | | if (!this.data.select) { |
| | | this.$refs['eltable'].clearSelection() |
| | | this.$refs['eltable'].toggleRowSelection(row, true) |
| | | } |
| | | return false |
| | | }, |
| | | showUpReq(label) { |
| | | if (this.data.requiredUp == undefined) { |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredUp.length; i++) { |
| | | if (label == this.data.requiredUp[i]) { |
| | | return true |
| | | } |
| | | }, |
| | | rowClick(row, column, event) { |
| | | if (this.data.select) { |
| | | this.$refs['eltable'].toggleRowSelection(row) |
| | | } else { |
| | | this.$refs['eltable'].clearSelection() |
| | | this.$refs['eltable'].toggleRowSelection(row, true) |
| | | } |
| | | return false |
| | | }, |
| | | showUpload(label) { |
| | | if (this.data.addUpload && this.data.addUpload.find(m => m == label)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | showCascader(label) { |
| | | if (this.data.cascaderField && this.data.cascaderField[label]) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | handleTree(arr, value) { |
| | | let label = '' |
| | | for (let i = 0; i < arr.length; i++) { |
| | | if (arr[i].id == value) { |
| | | label = arr[i].name |
| | | return label |
| | | } else if (arr[i].children) { |
| | | label = this.handleTree(arr[i].children, value) |
| | | } |
| | | }, |
| | | sizeChange(val) { |
| | | this.page.size = val |
| | | this.selectList('page') |
| | | }, |
| | | currentChange(val) { |
| | | this.page.current = val |
| | | this.selectList('page') |
| | | }, |
| | | // è°åè¡¨æ ¼æ¥è¯¢æ¥å£ |
| | | selectList(val) { |
| | | // console.log('val---', val) |
| | | // console.log('this.page---', this.page) |
| | | // this.loading = true |
| | | if(val===undefined){ |
| | | this.page.current = 1; |
| | | } |
| | | if (val === 'lastPage') { |
| | | this.page.current = this.page.current - 1 // ä¾å¦å 餿¬é¡µæå䏿¡æ°æ®ï¼å°å½å页é¢å®ä¸ºä¸ä¸é¡µï¼é¤ç¬¬ä¸é¡µå¤ |
| | | } |
| | | // ä¸è¦å页就å
¨æ¥ |
| | | if (this.data.isPage != undefined && this.data.isPage != true) { |
| | | this.page = { |
| | | current: -1, |
| | | size: -1, |
| | | } |
| | | } |
| | | this.$axios.post(this.url, { |
| | | page: this.page, |
| | | entity: this.data.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.loading = false |
| | | return |
| | | } |
| | | this.total = res.data.body.total |
| | | this.tableHead = res.data.head |
| | | this.tableData = res.data.body.records |
| | | if (this.data.needSort !== undefined) { |
| | | // æ ¹æ®ç¶ç»ä»¶ä¼ 忥çneedSortæ°ç»ï¼å¤æåªäºå段éè¦æåºåè½ |
| | | for (var i = 0; i < this.data.needSort.length; i++) { |
| | | this.tableHead.forEach(item => { |
| | | if (item.label === this.data.needSort[i]) { |
| | | item.sort = 'custom' |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | if (this.isShowZero) { |
| | | // å·¥æ¶ç®¡ç-å·¥æ¶ç»è®¡æ²¡ææ¶é´çå°±å±ç¤º0 |
| | | this.tableData.map(item => { |
| | | Object.keys(item).forEach(val => { |
| | | if (item[val] === null && (val.includes('Hours') || val === 'total')) { |
| | | item[val] = 0 |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | if (this.tableData.length === 0 && this.page.current > 1) { |
| | | this.selectList('lastPage') |
| | | } |
| | | // if (this.isColumnWidth) { |
| | | // this.tableHead.forEach(item => { |
| | | // if(!item.width){ |
| | | // if (item.value.length === 4) { |
| | | // item.width = 120 |
| | | // } else if (item.value.length === 3){ |
| | | // item.width = item.label.includes('Hours') ? 50 : 100 |
| | | // } else if (item.value.length === 5){ |
| | | // item.width = 130 |
| | | // } else if (item.value.length === 7){ |
| | | // item.width = 160 |
| | | // } else if (item.value.length === 6){ |
| | | // item.width = 150 |
| | | // } else if (item.value.length === 2){ |
| | | // item.width = item.label.includes('Hours') ? 52 : 86 |
| | | // } else { |
| | | // item.width = item.label.includes('Hours') ? 46 : 86 |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData)) |
| | | for (var a in this.data.selectField) { |
| | | if (this.data.selectField[a].choose == true) { |
| | | this.tableData.map(b => { |
| | | try { |
| | | b[a] = JSON.parse(b[a]) |
| | | } catch (e) {} |
| | | }) |
| | | } |
| | | } |
| | | // ä¸è¬çåå¹¶è¡ |
| | | if (this.data.spanConfig != undefined && this.data.spanConfig.rows && this.data.spanConfig.rows.length > |
| | | 0) { |
| | | this.spanList = []; |
| | | this.data.spanConfig.rows.forEach((item, index) => { |
| | | this.spanList.push({ |
| | | arr: [], |
| | | position: 0 |
| | | }) |
| | | this.rowspan(this.spanList[index].arr, this.spanList[index].position, item.name); |
| | | }) |
| | | } |
| | | // ç¹æ®çåå¹¶è¡ |
| | | if (this.data.spanConfig != undefined && this.data.spanConfig.special && this.data.spanConfig.special |
| | | .main && this.data.spanConfig.special.rows && this.data.spanConfig.special.rows.length > 0) { |
| | | this.specialSpanList = [] |
| | | this.data.spanConfig.special.rows.forEach((item, index) => { |
| | | this.specialSpanList.push({ |
| | | arr: [], |
| | | position: 0 |
| | | }) |
| | | this.rowspan(this.specialSpanList[index].arr, this.specialSpanList[index].position, this.data |
| | | .spanConfig.special.main); |
| | | }) |
| | | } |
| | | this.loading = false |
| | | }).catch(e => { |
| | | console.log('è¯·å·æ°é¡µé¢åå°è¯---', e) |
| | | this.loading = false |
| | | this.$message.error('è¯·å·æ°é¡µé¢åå°è¯') |
| | | }) |
| | | }, |
| | | sortChange(ob) { |
| | | this.data.entity.orderBy = {} |
| | | this.data.entity.orderBy.field = ob.prop |
| | | if (ob.order == 'ascending') { |
| | | this.data.entity.orderBy.order = 'asc' |
| | | } else if (ob.order == 'descending') { |
| | | this.data.entity.orderBy.order = 'desc' |
| | | } else { |
| | | if (this.componentData.entity.orderBy != undefined) { |
| | | this.data.entity.orderBy = this.HaveJson(this.dataCopy.entity.orderBy) |
| | | } |
| | | } |
| | | this.selectList() |
| | | }, |
| | | // å±ç¤ºtag |
| | | showType(val, ob) { |
| | | var str = ob[val] |
| | | return str == undefined ? null : ob[val].select |
| | | }, |
| | | // å±ç¤ºæä½æ |
| | | showLink(val, ob) { |
| | | var str = ob[val] |
| | | return str == undefined ? null : ob[val].method |
| | | }, |
| | | showAddReq(label) { |
| | | if (this.data.requiredAdd == undefined) { |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredAdd.length; i++) { |
| | | if (label == this.data.requiredAdd[i]) { |
| | | return true |
| | | } |
| | | } |
| | | return false |
| | | }, |
| | | showUpReq(label) { |
| | | if (this.data.requiredUp == undefined) { |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredUp.length; i++) { |
| | | if (label == this.data.requiredUp[i]) { |
| | | return true |
| | | } |
| | | } |
| | | return false |
| | | }, |
| | | showUpload(label) { |
| | | if (this.data.addUpload && this.data.addUpload.find(m => m == label)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | showCascader(label) { |
| | | if (this.data.cascaderField && this.data.cascaderField[label]) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | handleTree(arr, value) { |
| | | let label = '' |
| | | for (let i = 0; i < arr.length; i++) { |
| | | if (arr[i].id == value) { |
| | | label = arr[i].name |
| | | return label |
| | | } else if (arr[i].children) { |
| | | label = this.handleTree(arr[i].children, value) |
| | | } |
| | | } |
| | | return label |
| | | }, |
| | | main(row, val) { |
| | | if (val.method == undefined) return |
| | | else if (val.method == 'doDiy') { |
| | | if (val.id == 'update') { // ç¼è¾æä½ |
| | | this.upDia = true, |
| | | } |
| | | return label |
| | | }, |
| | | main(row, val) { |
| | | if (val.method == undefined) return |
| | | else if (val.method == 'doDiy') { |
| | | if (val.id == 'update') { // ç¼è¾æä½ |
| | | this.upDia = true, |
| | | this.upData = this.HaveJson(row) |
| | | this.upHead = this.HaveJson(this.tableHead) |
| | | this.upHead.forEach((item, index) => { |
| | | if (this.data.cascaderField && this.data.cascaderField[item.label]) { |
| | | if (this.upData[item.label]) { |
| | | this.upData[item.label] = JSON.parse(this.upData[item.label]) |
| | | } else { |
| | | this.upData[item.label] = [] |
| | | } |
| | | } |
| | | }) |
| | | this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime') |
| | | delete this.upData.orderBy |
| | | delete this.upData.createTime |
| | | delete this.upData.updateTime |
| | | delete this.upData.createUser |
| | | delete this.upData.updateUser |
| | | val.field.forEach(a => { |
| | | if (this.upData[a] === undefined) { |
| | | this.upHead.push({ |
| | | value: a.split('=')[0], |
| | | label: a.split('=')[1] |
| | | }) |
| | | this.upHead = this.HaveJson(this.tableHead) |
| | | this.upHead.forEach((item, index) => { |
| | | if (this.data.cascaderField && this.data.cascaderField[item.label]) { |
| | | if (this.upData[item.label]) { |
| | | this.upData[item.label] = JSON.parse(this.upData[item.label]) |
| | | } else { |
| | | delete this.upData[a] |
| | | for (var i = 0; i < this.upHead.length; i++) { |
| | | if (this.upHead[i].label == a) { |
| | | this.upHead.splice(i, 1); |
| | | i-- |
| | | break |
| | | } |
| | | } |
| | | this.upData[item.label] = [] |
| | | } |
| | | }) |
| | | } else if (val.id == 'delete') { // å é¤æä½ |
| | | if (this.delUrl == null) { |
| | | this.$message.error('请ç»å é¤è¯·æ±å°å') |
| | | return |
| | | } |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.delUrl, { |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('å 餿å') |
| | | this.selectList('page') |
| | | this.$emit('delete') |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime') |
| | | delete this.upData.orderBy |
| | | delete this.upData.createTime |
| | | delete this.upData.updateTime |
| | | delete this.upData.createUser |
| | | delete this.upData.updateUser |
| | | val.field.forEach(a => { |
| | | if (this.upData[a] === undefined) { |
| | | this.upHead.push({ |
| | | value: a.split('=')[0], |
| | | label: a.split('=')[1] |
| | | }) |
| | | }).catch(() => {}) |
| | | } |
| | | } else if (val.id === 'parent') { |
| | | delete row.orderBy |
| | | this.$parent.$parent[val.method](row) |
| | | } else { |
| | | delete row.orderBy |
| | | this.$parent[val.method](row) |
| | | } |
| | | }, |
| | | saveUpData() { |
| | | if (this.upUrl == null) { |
| | | this.$message.error('请ç»ä¿®æ¹è¯·æ±å°å') |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredUp.length; i++) { |
| | | // å¿
å¡«æ ¡éª |
| | | if (this.upData[this.data.requiredUp[i]] === null || this.upData[this.data.requiredUp[i]] === '') { |
| | | var list = this.upHead.filter(a => { |
| | | if (a.label == this.data.requiredUp[i]) return a |
| | | }) |
| | | if (list[0].value == undefined) continue |
| | | this.$message.error(list[0].value + 'æ¯å¿
填项') |
| | | return |
| | | } |
| | | } |
| | | for (var a in this.data.selectField) { |
| | | if (this.data.selectField[a].choose == true) { |
| | | this.upData[a] = JSON.stringify(this.upData[a]) |
| | | } |
| | | } |
| | | for (var i = 0; i < this.upHead.length; i++) { |
| | | if(this.upHead[i].label == 'password'){ |
| | | if(this.upData[this.upHead[i].label]){ |
| | | const reg2 =/^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?])[a-zA-Z\d~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?]*$/; |
| | | if (!reg2.test(this.upData[this.upHead[i].label])) { |
| | | this.$message.error('å¯ç å¿
é¡»å
æ¬æ°åã大å°å忝以åç¹æ®å符') |
| | | return |
| | | } |
| | | } |
| | | } |
| | | if (this.data.cascaderField && this.data.cascaderField[this.upHead[i].label]) { |
| | | if (this.upData[this.upHead[i].label]) { |
| | | this.upData[this.upHead[i].label] = JSON.stringify(this.upData[this.upHead[i].label]) |
| | | } else { |
| | | this.upData[this.upHead[i].label] = '' |
| | | } |
| | | } |
| | | } |
| | | this.upLoad = true |
| | | this.$axios.post(this.upUrl, this.upData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | | return |
| | | } |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.upDia = false |
| | | this.selectList('page') |
| | | this.$refs.eltable.doLayout(); |
| | | this.upLoad = false |
| | | }).catch(e => { |
| | | this.$message.error('ä¿®æ¹å¤±è´¥') |
| | | this.upDia = false |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // æå¼æ°å¢å¼¹æ¡åè° |
| | | openAddDia(addUrl, param) { |
| | | this.addDia = true |
| | | this.addUrl = addUrl |
| | | this.param = param |
| | | this.upData = {} |
| | | this.tableHead.forEach((k, v) => { |
| | | if (k.label != 'orderBy' && k.label != 'createTime' && k.label != 'updateTime' && k.label != 'createUser' && k.label != 'updateUser') |
| | | this.upData[k.label] = null |
| | | }) |
| | | this.upData = this.HaveJson(this.upData) |
| | | this.upHead = this.HaveJson(this.tableHead) |
| | | this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime') |
| | | var val = this.data.do.filter(a => a.id == 'update')[0] |
| | | if (val == undefined) { |
| | | val = { |
| | | field: [] |
| | | } |
| | | } |
| | | val.field.forEach(a => { |
| | | if (JSON.stringify(this.upData[a]) === undefined) { |
| | | this.upHead.push({ |
| | | value: a.split('=')[0], |
| | | label: a.split('=')[1] |
| | | }) |
| | | } else { |
| | | delete this.upData[a] |
| | | for (var i = 0; i < this.upHead.length; i++) { |
| | | if (this.upHead[i].label == a) { |
| | | this.upHead.splice(i, 1); |
| | | i-- |
| | | break |
| | | delete this.upData[a] |
| | | for (var i = 0; i < this.upHead.length; i++) { |
| | | if (this.upHead[i].label == a) { |
| | | this.upHead.splice(i, 1); |
| | | i-- |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ°å¢åè° |
| | | saveAddData() { |
| | | if (this.addUrl == null) { |
| | | this.$message.error('è¯·ç»æ·»å 请æ±å°å') |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredAdd.length; i++) { |
| | | if (this.upData[this.data.requiredAdd[i]] === null || this.upData[this.data.requiredAdd[i]] === '') { |
| | | var list = this.upHead.filter(a => { |
| | | if (a.label == this.data.requiredAdd[i]) return a |
| | | }) |
| | | if (list[0].value == undefined) continue |
| | | this.$message.error(list[0].value + 'æ¯å¿
填项') |
| | | }) |
| | | } else if (val.id == 'delete') { // å é¤æä½ |
| | | if (this.delUrl == null) { |
| | | this.$message.error('请ç»å é¤è¯·æ±å°å') |
| | | return |
| | | } |
| | | } |
| | | this.addLoad = true |
| | | for (var a in this.data.selectField) { |
| | | if (this.data.selectField[a].choose == true) { |
| | | this.upData[a] = JSON.stringify(this.upData[a]) |
| | | } |
| | | } |
| | | this.upHead.forEach((item, index) => { |
| | | if (this.data.cascaderField && this.data.cascaderField[item.label]) { |
| | | if (this.upData[item.label]) { |
| | | this.upData[item.label] = JSON.stringify(this.upData[item.label]) |
| | | } else { |
| | | this.upData[item.label] = '' |
| | | } |
| | | } |
| | | }) |
| | | if (this.param !== undefined && this.param !== null) { |
| | | for (let i in this.param) { |
| | | this.upData[i] = this.param[i] |
| | | } |
| | | } |
| | | this.$axios.post(this.addUrl, this.upData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.addLoad = false |
| | | return |
| | | } |
| | | this.$message.success('æ·»å æå') |
| | | this.addDia = false |
| | | this.selectList('page') |
| | | this.addLoad = false |
| | | }).catch(e => { |
| | | this.addDia = false |
| | | this.addLoad = false |
| | | }) |
| | | }, |
| | | openDownDia() { |
| | | this.downDia = true |
| | | }, |
| | | downFile(type) { |
| | | if (this.downUrl == null) { |
| | | this.$message.error('请ç»å¯¼åºè¯·æ±å°å') |
| | | return |
| | | } |
| | | var page = this.HaveJson(this.page) |
| | | if (!type) { |
| | | page.current = 0 |
| | | page.size = this.total |
| | | } |
| | | this.loading = true |
| | | this.$axios.post(this.downUrl, { |
| | | page: page, |
| | | entity: this.data.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.loading = false |
| | | return |
| | | } |
| | | this.downDia = false |
| | | this.loading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | let eleLink = document.createElement('a') |
| | | eleLink.style.display = 'none' |
| | | eleLink.download = res.data |
| | | eleLink.href = this.javaApi + '/outPath/' + res.data |
| | | document.body.appendChild(eleLink) |
| | | eleLink.click() |
| | | document.body.removeChild(eleLink) |
| | | }).catch(e => { |
| | | console.log(e); |
| | | this.loading = false |
| | | this.$message.error('è¯·å·æ°é¡µé¢åå°è¯') |
| | | }) |
| | | }, |
| | | openUpload() { |
| | | if (this.inputUrl == null) { |
| | | this.$message.error('请ç»å¯¼å
¥è¯·æ±å°å') |
| | | return |
| | | } |
| | | this.uploadDia = true |
| | | }, |
| | | beforeUpload(file, fileList) { |
| | | console.log(file.raw.type); |
| | | if (file.raw.type != (this.data.inputType===undefined?'text/csv':this.data.inputType)) { |
| | | this.$message.error('ä¸ä¼ æä»¶æ ¼å¼ä¸æ£ç¡®'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } |
| | | }, |
| | | submitUpload() { |
| | | if (this.$refs.upload.uploadFiles.length == 0) { |
| | | this.$message.error('æªéæ©æä»¶') |
| | | return |
| | | } |
| | | this.uploading = true |
| | | this.$refs.upload.submit(); |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | this.$refs.upload.clearFiles() |
| | | this.uploadDia = false |
| | | this.uploading = false |
| | | if (response.code == 201) { |
| | | this.$message.error(response.message) |
| | | return |
| | | } |
| | | this.$message.success('ä¸ä¼ æå') |
| | | this.selectList() |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | this.uploading = false |
| | | }, |
| | | // æä½æé®ç½®ç°å¤æ |
| | | isDisabled(label) { |
| | | if (this.data.disabledUp == undefined) { |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.disabledUp.length; i++) { |
| | | if (label == this.data.disabledUp[i]) { |
| | | return true |
| | | } |
| | | } |
| | | return false |
| | | }, |
| | | getSummaries(param) { |
| | | const { |
| | | columns, |
| | | data |
| | | } = param; |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = 'å计'; |
| | | return; |
| | | } |
| | | const values = data.map(item => Number(item[column.property])); |
| | | if (this.data.countFleid == undefined) { |
| | | sums[index] = '' |
| | | return |
| | | } |
| | | if (this.data.countFleid.filter(str => { |
| | | return str === column.property |
| | | }).length > 0) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr); |
| | | if (!isNaN(value)) { |
| | | return prev + curr; |
| | | } else { |
| | | return prev; |
| | | } |
| | | }, 0); |
| | | sums[index] += ''; |
| | | } else { |
| | | sums[index] = ''; |
| | | } |
| | | }); |
| | | return sums; |
| | | }, |
| | | handleLinkEvent(row, val) { |
| | | if (val.method == 'doDiy') { |
| | | this.main(row, val) |
| | | } else { |
| | | this.$parent[val.method](row) |
| | | } |
| | | }, |
| | | getWidth() { |
| | | let count = 0 |
| | | this.data.do.forEach(a => { |
| | | count += a.font.length |
| | | }) |
| | | return count * 15 + 60 + 'px' |
| | | }, |
| | | 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('ä¸ä¼ æå') |
| | | this.selectList() |
| | | } |
| | | } |
| | | }, |
| | | handleCascader(e, label) { |
| | | this.upData[label] = e; |
| | | }, |
| | | // æ¹éå é¤ |
| | | batchDelete() { |
| | | if (this.multipleSelection && this.multipleSelection.length > 0) { |
| | | this.$confirm('æ¯å¦å é¤éä¸çæ°æ®?', "è¦å", { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.delUrl, { |
| | | ids: JSON.stringify(this.multipleSelection.map(item => item.id)) |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('å 餿å') |
| | | this.selectList('page') |
| | | this.$emit('delete') |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => {}) |
| | | } else { |
| | | this.$message.error('è¯·éæ©è¦å é¤çæ°æ®') |
| | | }).catch(() => { }) |
| | | } |
| | | }, |
| | | // æ¥å·¥æ¶ç®¡çè¾
å©å·¥æ¶--æ¹éå®¡æ ¸åæ¹å |
| | | batchCheck(e) { |
| | | if (this.multipleSelection && this.multipleSelection.length > 0) { |
| | | const list = JSON.parse(JSON.stringify(this.multipleSelection)) |
| | | const state = e === 0 ? '䏿¹å' : 'å·²æ¹å' |
| | | let auxiliaryWorkingHoursDays = [] |
| | | list.forEach(item => { |
| | | delete item.orderBy |
| | | item.state = state |
| | | auxiliaryWorkingHoursDays.push(item) |
| | | } else if (val.id === 'parent') { |
| | | delete row.orderBy |
| | | this.$parent.$parent[val.method](row) |
| | | } else { |
| | | delete row.orderBy |
| | | this.$parent[val.method](row) |
| | | } |
| | | }, |
| | | saveUpData() { |
| | | if (this.upUrl == null) { |
| | | this.$message.error('请ç»ä¿®æ¹è¯·æ±å°å') |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredUp.length; i++) { |
| | | // å¿
å¡«æ ¡éª |
| | | if (this.upData[this.data.requiredUp[i]] === null || this.upData[this.data.requiredUp[i]] === '') { |
| | | var list = this.upHead.filter(a => { |
| | | if (a.label == this.data.requiredUp[i]) return a |
| | | }) |
| | | this.$axios.post(this.$api.auxiliaryWorkingHoursDay.approve, {auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays |
| | | },{ |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | if (list[0].value == undefined) continue |
| | | this.$message.error(list[0].value + 'æ¯å¿
填项') |
| | | return |
| | | } |
| | | } |
| | | for (var a in this.data.selectField) { |
| | | if (this.data.selectField[a].choose == true) { |
| | | this.upData[a] = JSON.stringify(this.upData[a]) |
| | | } |
| | | } |
| | | for (var i = 0; i < this.upHead.length; i++) { |
| | | if (this.upHead[i].label == 'password') { |
| | | if (this.upData[this.upHead[i].label]) { |
| | | const reg2 = /^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?])[a-zA-Z\d~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?]*$/; |
| | | if (!reg2.test(this.upData[this.upHead[i].label])) { |
| | | this.$message.error('å¯ç å¿
é¡»å
æ¬æ°åã大å°å忝以åç¹æ®å符') |
| | | return |
| | | } |
| | | ).then(res => { |
| | | } |
| | | } |
| | | if (this.data.cascaderField && this.data.cascaderField[this.upHead[i].label]) { |
| | | if (this.upData[this.upHead[i].label]) { |
| | | this.upData[this.upHead[i].label] = JSON.stringify(this.upData[this.upHead[i].label]) |
| | | } else { |
| | | this.upData[this.upHead[i].label] = '' |
| | | } |
| | | } |
| | | } |
| | | this.upLoad = true |
| | | this.$axios.post(this.upUrl, this.upData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | | return |
| | | } |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.upDia = false |
| | | this.selectList('page') |
| | | this.$refs.eltable.doLayout(); |
| | | this.upLoad = false |
| | | }).catch(e => { |
| | | this.$message.error('ä¿®æ¹å¤±è´¥') |
| | | this.upDia = false |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // æå¼æ°å¢å¼¹æ¡åè° |
| | | openAddDia(addUrl, param) { |
| | | this.addDia = true |
| | | this.addUrl = addUrl |
| | | this.param = param |
| | | this.upData = {} |
| | | this.tableHead.forEach((k, v) => { |
| | | if (k.label != 'orderBy' && k.label != 'createTime' && k.label != 'updateTime' && k.label != 'createUser' && k.label != 'updateUser') |
| | | this.upData[k.label] = null |
| | | }) |
| | | this.upData = this.HaveJson(this.upData) |
| | | this.upHead = this.HaveJson(this.tableHead) |
| | | this.upHead = this.upHead.filter(a => a.label != 'createTime' && a.label != 'updateTime') |
| | | var val = this.data.do.filter(a => a.id == 'update')[0] |
| | | if (val == undefined) { |
| | | val = { |
| | | field: [] |
| | | } |
| | | } |
| | | val.field.forEach(a => { |
| | | if (JSON.stringify(this.upData[a]) === undefined) { |
| | | this.upHead.push({ |
| | | value: a.split('=')[0], |
| | | label: a.split('=')[1] |
| | | }) |
| | | } else { |
| | | delete this.upData[a] |
| | | for (var i = 0; i < this.upHead.length; i++) { |
| | | if (this.upHead[i].label == a) { |
| | | this.upHead.splice(i, 1); |
| | | i-- |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ°å¢åè° |
| | | saveAddData() { |
| | | if (this.addUrl == null) { |
| | | this.$message.error('è¯·ç»æ·»å 请æ±å°å') |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredAdd.length; i++) { |
| | | if (this.upData[this.data.requiredAdd[i]] === null || this.upData[this.data.requiredAdd[i]] === '') { |
| | | var list = this.upHead.filter(a => { |
| | | if (a.label == this.data.requiredAdd[i]) return a |
| | | }) |
| | | if (list[0].value == undefined) continue |
| | | this.$message.error(list[0].value + 'æ¯å¿
填项') |
| | | return |
| | | } |
| | | } |
| | | this.addLoad = true |
| | | for (var a in this.data.selectField) { |
| | | if (this.data.selectField[a].choose == true) { |
| | | this.upData[a] = JSON.stringify(this.upData[a]) |
| | | } |
| | | } |
| | | this.upHead.forEach((item, index) => { |
| | | if (this.data.cascaderField && this.data.cascaderField[item.label]) { |
| | | if (this.upData[item.label]) { |
| | | this.upData[item.label] = JSON.stringify(this.upData[item.label]) |
| | | } else { |
| | | this.upData[item.label] = '' |
| | | } |
| | | } |
| | | }) |
| | | if (this.param !== undefined && this.param !== null) { |
| | | for (let i in this.param) { |
| | | this.upData[i] = this.param[i] |
| | | } |
| | | } |
| | | this.$axios.post(this.addUrl, this.upData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.addLoad = false |
| | | return |
| | | } |
| | | this.$message.success('æ·»å æå') |
| | | this.addDia = false |
| | | this.selectList('page') |
| | | this.addLoad = false |
| | | }).catch(e => { |
| | | this.addDia = false |
| | | this.addLoad = false |
| | | }) |
| | | }, |
| | | openDownDia() { |
| | | this.downDia = true |
| | | }, |
| | | downFile(type) { |
| | | if (this.downUrl == null) { |
| | | this.$message.error('请ç»å¯¼åºè¯·æ±å°å') |
| | | return |
| | | } |
| | | var page = this.HaveJson(this.page) |
| | | if (!type) { |
| | | page.current = 0 |
| | | page.size = this.total |
| | | } |
| | | this.loading = true |
| | | this.$axios.post(this.downUrl, { |
| | | page: page, |
| | | entity: this.data.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.loading = false |
| | | return |
| | | } |
| | | this.downDia = false |
| | | this.loading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | let eleLink = document.createElement('a') |
| | | eleLink.style.display = 'none' |
| | | eleLink.download = res.data |
| | | eleLink.href = this.javaApi + '/outPath/' + res.data |
| | | document.body.appendChild(eleLink) |
| | | eleLink.click() |
| | | document.body.removeChild(eleLink) |
| | | }).catch(e => { |
| | | console.log(e); |
| | | this.loading = false |
| | | this.$message.error('è¯·å·æ°é¡µé¢åå°è¯') |
| | | }) |
| | | }, |
| | | openUpload() { |
| | | if (this.inputUrl == null) { |
| | | this.$message.error('请ç»å¯¼å
¥è¯·æ±å°å') |
| | | return |
| | | } |
| | | this.uploadDia = true |
| | | }, |
| | | beforeUpload(file, fileList) { |
| | | console.log(file.raw.type); |
| | | if (file.raw.type != (this.data.inputType === undefined ? 'text/csv' : this.data.inputType)) { |
| | | this.$message.error('ä¸ä¼ æä»¶æ ¼å¼ä¸æ£ç¡®'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } |
| | | }, |
| | | submitUpload() { |
| | | if (this.$refs.upload.uploadFiles.length == 0) { |
| | | this.$message.error('æªéæ©æä»¶') |
| | | return |
| | | } |
| | | this.uploading = true |
| | | this.$refs.upload.submit(); |
| | | }, |
| | | onSuccess(response, file, fileList) { |
| | | this.$refs.upload.clearFiles() |
| | | this.uploadDia = false |
| | | this.uploading = false |
| | | if (response.code == 201) { |
| | | this.$message.error(response.message) |
| | | return |
| | | } |
| | | this.$message.success('ä¸ä¼ æå') |
| | | this.selectList() |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | this.uploading = false |
| | | }, |
| | | // æä½æé®ç½®ç°å¤æ |
| | | isDisabled(label) { |
| | | if (this.data.disabledUp == undefined) { |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.disabledUp.length; i++) { |
| | | if (label == this.data.disabledUp[i]) { |
| | | return true |
| | | } |
| | | } |
| | | return false |
| | | }, |
| | | getSummaries(param) { |
| | | const { |
| | | columns, |
| | | data |
| | | } = param; |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = 'å计'; |
| | | return; |
| | | } |
| | | const values = data.map(item => Number(item[column.property])); |
| | | if (this.data.countFleid == undefined) { |
| | | sums[index] = '' |
| | | return |
| | | } |
| | | if (this.data.countFleid.filter(str => { |
| | | return str === column.property |
| | | }).length > 0) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr); |
| | | if (!isNaN(value)) { |
| | | return prev + curr; |
| | | } else { |
| | | return prev; |
| | | } |
| | | }, 0); |
| | | sums[index] += ''; |
| | | } else { |
| | | sums[index] = ''; |
| | | } |
| | | }); |
| | | return sums; |
| | | }, |
| | | handleLinkEvent(row, val) { |
| | | if (val.method == 'doDiy') { |
| | | this.main(row, val) |
| | | } else { |
| | | this.$parent[val.method](row) |
| | | } |
| | | }, |
| | | getWidth() { |
| | | let count = 0 |
| | | this.data.do.forEach(a => { |
| | | count += a.font.length |
| | | }) |
| | | return count * 15 + 60 + 'px' |
| | | }, |
| | | 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('ä¸ä¼ æå') |
| | | this.selectList() |
| | | } |
| | | } |
| | | }, |
| | | handleCascader(e, label) { |
| | | this.upData[label] = e; |
| | | }, |
| | | // æ¹éå é¤ |
| | | batchDelete() { |
| | | if (this.multipleSelection && this.multipleSelection.length > 0) { |
| | | this.$confirm('æ¯å¦å é¤éä¸çæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.delUrl, { |
| | | ids: JSON.stringify(this.multipleSelection.map(item => item.id)) |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$parent.submitBatchCheckDialog() |
| | | this.$message.success('æä½æå') |
| | | this.$message.success('å 餿å') |
| | | this.selectList('page') |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | } else { |
| | | this.$message.error('è¯·éæ©è³å°ä¸æ¡æ°æ®') |
| | | }).catch(() => { }) |
| | | } else { |
| | | this.$message.error('è¯·éæ©è¦å é¤çæ°æ®') |
| | | } |
| | | }, |
| | | // æ¥å·¥æ¶ç®¡çè¾
å©å·¥æ¶--æ¹éå®¡æ ¸åæ¹å |
| | | batchCheck(e) { |
| | | if (this.multipleSelection && this.multipleSelection.length > 0) { |
| | | const list = JSON.parse(JSON.stringify(this.multipleSelection)) |
| | | const state = e === 0 ? '䏿¹å' : 'å·²æ¹å' |
| | | let auxiliaryWorkingHoursDays = [] |
| | | list.forEach(item => { |
| | | delete item.orderBy |
| | | item.state = state |
| | | auxiliaryWorkingHoursDays.push(item) |
| | | }) |
| | | this.$axios.post(this.$api.auxiliaryWorkingHoursDay.approve, { |
| | | auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | } |
| | | }, |
| | | getRedColor(label,row){ |
| | | if(this.data.cellSpecialStyle&&this.data.cellSpecialStyle.redColorByKey&&label.includes(this.data.cellSpecialStyle.redColorByKey)&&row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]){ |
| | | return true |
| | | }else{ |
| | | return false |
| | | } |
| | | ).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$parent.submitBatchCheckDialog() |
| | | this.$message.success('æä½æå') |
| | | }) |
| | | } else { |
| | | this.$message.error('è¯·éæ©è³å°ä¸æ¡æ°æ®') |
| | | } |
| | | }, |
| | | getRedColor(label, row) { |
| | | if (this.data.cellSpecialStyle && this.data.cellSpecialStyle.redColorByKey && label.includes(this.data.cellSpecialStyle.redColorByKey) && row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div> |
| | | <el-dialog title="æ°æ®æ¥ç" :visible.sync="isShow" width="80%" @closed="$emit('closeDataLook')"> |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in dataVisibleTitle" :key="i" :class="{active:i===dataVisibleIndex}" @click="handleDataVisibleTab(m,i)">{{m.label}}</li> |
| | | <li v-for="(m, i) in dataVisibleTitle" :key="i" :class="{ active: i === dataVisibleIndex }" |
| | | @click="handleDataVisibleTab(m, i)">{{ m.label }}</li> |
| | | </ul> |
| | | <div style="height: 70vh;overflow-y: auto;"> |
| | | <ValueTable ref="ValueTableDataLook" :url="$api.insOrder.selectSampleAndProductByOrderId" |
| | | :key="upIndex" |
| | | :componentData="componentDataDataLook"/> |
| | | <ValueTable ref="ValueTableDataLook" :url="$api.insOrder.selectSampleAndProductByOrderId" :key="upIndex" |
| | | :componentData="componentDataDataLook" /> |
| | | </div> |
| | | </el-dialog> |
| | | <un-pass-retest-result :retestVisible="retestVisible" :retestInfo="retestInfo" @closeRetestLook="closeRetestLook" v-if="retestVisible"></un-pass-retest-result> |
| | | <un-pass-retest-result :retestVisible="retestVisible" :retestInfo="retestInfo" @closeRetestLook="closeRetestLook" |
| | | v-if="retestVisible"></un-pass-retest-result> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | name: "dataLookVisible", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {UnPassRetestResult, ValueTable}, |
| | | components: { UnPassRetestResult, ValueTable }, |
| | | props: { |
| | | dataDialogVisible: { |
| | | type: Boolean, |
| | |
| | | }, |
| | | dataLookInfo: { |
| | | type: Object, |
| | | default: () => {} |
| | | default: () => { } |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | font: 'ä¸åæ ¼å¤æµæ¥ç', |
| | | type: 'text', |
| | | method: 'getRetestResult', |
| | | disabFun: (row, index) => { |
| | | return row.insResult!=0 |
| | | disabled: (row, index) => { |
| | | return row.insResult != 0 |
| | | } |
| | | } |
| | | ], |
| | |
| | | value: 1, |
| | | label: 'åæ ¼', |
| | | type: 'success' |
| | | },{ |
| | | }, { |
| | | value: 0, |
| | | label: 'ä¸åæ ¼', |
| | | type: 'danger' |
| | | },{ |
| | | }, { |
| | | value: 3, |
| | | label: 'ä¸å¤å®', |
| | | type: '' |
| | |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // åæ¢æ°æ®æ¥çtabæ |
| | | handleDataVisibleTab (m, i) { |
| | | handleDataVisibleTab(m, i) { |
| | | this.dataVisibleIndex = i |
| | | this.refreshTable() |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | // æ¥çä¸åæ ¼å¤æµç»æ |
| | | getRetestResult (row) { |
| | | this.$axios.get(this.$api.insOrder.getRetestResult+'?insProductId='+row.insProductId).then(res => { |
| | | getRetestResult(row) { |
| | | this.$axios.get(this.$api.insOrder.getRetestResult + '?insProductId=' + row.insProductId).then(res => { |
| | | if (res.code == 201) return |
| | | this.retestVisible = true |
| | | this.retestInfo = res.data |
| | | }) |
| | | }, |
| | | closeRetestLook () { |
| | | closeRetestLook() { |
| | | this.retestVisible = false |
| | | }, |
| | | }, |
| | |
| | | <div> |
| | | <el-dialog title="æ°æ®æ¥ç" :visible.sync="isShow" width="80%" @closed="$emit('closeDataLook')"> |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in dataVisibleTitle" :key="i" :class="{active:i===dataVisibleIndex}" @click="handleDataVisibleTab(m,i)">{{m.label}}</li> |
| | | <li v-for="(m, i) in dataVisibleTitle" :key="i" :class="{ active: i === dataVisibleIndex }" |
| | | @click="handleDataVisibleTab(m, i)">{{ m.label }}</li> |
| | | </ul> |
| | | <div style="height: 70vh;overflow-y: auto;"> |
| | | <ValueTable ref="ValueTableDataLook" :url="$api.insOrder.selectSampleAndProductByOrderId" |
| | | :key="upIndex" |
| | | :componentData="componentDataDataLook"/> |
| | | <ValueTable ref="ValueTableDataLook" :url="$api.insOrder.selectSampleAndProductByOrderId" :key="upIndex" |
| | | :componentData="componentDataDataLook" /> |
| | | </div> |
| | | </el-dialog> |
| | | <un-pass-retest-result :retestVisible="retestVisible" :retestInfo="retestInfo" @closeRetestLook="closeRetestLook" v-if="retestVisible"></un-pass-retest-result> |
| | | <un-pass-retest-result :retestVisible="retestVisible" :retestInfo="retestInfo" @closeRetestLook="closeRetestLook" |
| | | v-if="retestVisible"></un-pass-retest-result> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | name: "dataLookVisible", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {UnPassRetestResult, ValueTable}, |
| | | components: { UnPassRetestResult, ValueTable }, |
| | | props: { |
| | | dataDialogVisible: { |
| | | type: Boolean, |
| | |
| | | }, |
| | | dataLookInfo: { |
| | | type: Object, |
| | | default: () => {} |
| | | default: () => { } |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | font: 'ä¸åæ ¼å¤æµæ¥ç', |
| | | type: 'text', |
| | | method: 'getRetestResult', |
| | | disabFun: (row, index) => { |
| | | return row.insResult!=0 |
| | | disabled: (row, index) => { |
| | | return row.insResult != 0 |
| | | } |
| | | } |
| | | ], |
| | |
| | | value: 1, |
| | | label: 'åæ ¼', |
| | | type: 'success' |
| | | },{ |
| | | }, { |
| | | value: 0, |
| | | label: 'ä¸åæ ¼', |
| | | type: 'danger' |
| | | },{ |
| | | }, { |
| | | value: 3, |
| | | label: 'ä¸å¤å®', |
| | | type: '' |
| | |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // åæ¢æ°æ®æ¥çtabæ |
| | | handleDataVisibleTab (m, i) { |
| | | handleDataVisibleTab(m, i) { |
| | | this.dataVisibleIndex = i |
| | | this.refreshTable() |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | // æ¥çä¸åæ ¼å¤æµç»æ |
| | | getRetestResult (row) { |
| | | this.$axios.get(this.$api.insOrder.getRetestResult+'?insProductId='+row.insProductId).then(res => { |
| | | getRetestResult(row) { |
| | | this.$axios.get(this.$api.insOrder.getRetestResult + '?insProductId=' + row.insProductId).then(res => { |
| | | if (res.code == 201) return |
| | | this.retestVisible = true |
| | | this.retestInfo = res.data |
| | | }) |
| | | }, |
| | | closeRetestLook () { |
| | | closeRetestLook() { |
| | | this.retestVisible = false |
| | | }, |
| | | }, |
| | |
| | | Vue.prototype.uploadHeader = { |
| | | Authorization: "Bearer " + getToken(), |
| | | }; |
| | | |
| | | // è§£å³el-radio-groupåéæ¡èªèº«çbug |
| | | Vue.directive("removeAriaHidden", { |
| | | bind(el, binding) { |
| | |
| | | import { getToken, setToken, removeToken } from "@/utils/auth"; |
| | | import { isHttp, isEmpty } from "@/utils/validate"; |
| | | import defAva from "@/assets/images/profile.jpg"; |
| | | import Vue from "vue"; |
| | | |
| | | const user = { |
| | | state: { |
| | |
| | | .then((res) => { |
| | | setToken(res.token); |
| | | commit("SET_TOKEN", res.token); |
| | | Vue.prototype.uploadHeader = { |
| | | Authorization: "Bearer " + res.token, |
| | | }; |
| | | resolve(); |
| | | }) |
| | | .catch((error) => { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="Complaint"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ ·åç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="queryParams.sampleCode" 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.complainName" 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="btn"> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">导åº</el-button> |
| | | <el-button size="small" type="primary" @click="openAdd">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :visible.sync="addDialogVisible" title="æ°å¢" width="400px"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æè¯æ¹åç§°ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.complainName" clearable placeholder="请è¾å
¥" |
| | | size="small"></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 v-model="addInfo.code" clearable placeholder="请è¾å
¥" size="small"></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 v-model="addInfo.sampleCode" clearable placeholder="请è¾å
¥" |
| | | size="small"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æè¯æ¹å¼ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.complainMethod" clearable placeholder="请è¾å
¥" |
| | | size="small"></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> |
| | | <el-dialog :class="{ downPdf: title == '导åº' }" :modal="title != '导åº'" :title="title" |
| | | :visible.sync="handleDialogVisible" width="800px"> |
| | | <div class="dialog-body"> |
| | | <div id="dialogBody"> |
| | | <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;"> |
| | | <span style="font-size: 20px;">å®¢æ·æè¯åçå</span> |
| | | <span>Customer complaint receipts</span> |
| | | </h4> |
| | | <p style="display: flex;justify-content: space-between;margin-top: 16px;"> |
| | | <span>{{ currentInfo0.complainNo }}</span> |
| | | <span>NO:</span> |
| | | </p> |
| | | <table border="1" cellpadding="10" class="tables"> |
| | | <tr> |
| | | <td colspan="3"> |
| | | <p>æè¯æ¹åç§°</p> |
| | | <p class="en">Name of the complaining party</p> |
| | | </td> |
| | | <td colspan="3">{{ currentInfo0.complainName }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>æ£æµæ¥åç¼å·</p> |
| | | <p class="en">Test report number</p> |
| | | </td> |
| | | <td colspan="3">{{ currentInfo0.code }}</td> |
| | | <td> |
| | | <p>æ ·åç¼å·</p> |
| | | <p class="en">Sample number</p> |
| | | </td> |
| | | <td>{{ currentInfo0.sampleCode }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>æè¯äºº</p> |
| | | <p class="en">Complainant</p> |
| | | </td> |
| | | <td>{{ currentInfo0.createUser }}</td> |
| | | <td> |
| | | <p>çµè¯</p> |
| | | <p class="en">Phone</p> |
| | | </td> |
| | | <td>{{ currentInfo0.phone }}</td> |
| | | <td> |
| | | <p>E-Mail</p> |
| | | <p class="en">E-mail</p> |
| | | </td> |
| | | <td>{{ currentInfo0.email }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>æè¯æ¹å¼</p> |
| | | <p class="en">Complaint method</p> |
| | | </td> |
| | | <td colspan="3">{{ currentInfo0.complainMethod }}</td> |
| | | <td> |
| | | <p>æè¯æ¥æ</p> |
| | | <p class="en">Date of complaint</p> |
| | | </td> |
| | | <td>{{ currentInfo0.createTime ? currentInfo0.createTime.split(' ')[0] : '' }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>é®é¢è®°å½</p> |
| | | <p class="en">Problem logging</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <div class="user-content"> |
| | | <el-input v-if="title == 'å¤çæè¯'" v-model="currentInfo0.problemRecords" :rows="3" placeholder="请è¾å
¥å
容" |
| | | type="textarea"> |
| | | </el-input> |
| | | <p v-else style="text-align: left;line-height: 26px;">{{ currentInfo0.problemRecords }}</p> |
| | | </div> |
| | | <div v-if="title != 'å¤çæè¯'" class="user-info"> |
| | | <div style="width: 200px;margin-right: 10px;"> |
| | | <p style="text-align: end;">è´¨éè´è´£äºº:</p> |
| | | <p class="en" style="text-align: end;">Quality Manager:</p> |
| | | </div> |
| | | <span>{{ currentInfo0.problemRecordsUserName }}</span> |
| | | <div style="width: 70px;"> |
| | | <p>æ¥æ:</p> |
| | | <p class="en">Date:</p> |
| | | </div> |
| | | <span style="margin-right: 16px;">{{ currentInfo0.problemRecordsTime }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>责任å½å±åæè¯æ¯å¦æç«</p> |
| | | <p class="en">Attribution of responsibility and whether the complaint is established</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <div class="user-content"> |
| | | <el-input v-if="title == 'å¤çæè¯'" v-model="currentInfo0.dutyOwnership" :rows="3" placeholder="请è¾å
¥å
容" |
| | | type="textarea"> |
| | | </el-input> |
| | | <p v-else style="text-align: left;line-height: 26px;">{{ currentInfo0.dutyOwnership }}</p> |
| | | </div> |
| | | <div v-if="title != 'å¤çæè¯'" class="user-info"> |
| | | <div style="width: 200px;margin-right: 10px;"> |
| | | <p style="text-align: end;">è´¨éè´è´£äºº:</p> |
| | | <p class="en" style="text-align: end;">Quality Manager:</p> |
| | | </div> |
| | | <span>{{ currentInfo0.dutyOwnershipUserName }}</span> |
| | | <div style="width: 70px;"> |
| | | <p>æ¥æ:</p> |
| | | <p class="en">Date:</p> |
| | | </div> |
| | | <span style="margin-right: 16px;">{{ currentInfo0.dutyOwnershipTime }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>åå åæ</p> |
| | | <p class="en">Cause analysis</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <div class="user-content"> |
| | | <el-input v-if="title == 'å¤çæè¯'" v-model="currentInfo0.causeAnalysis" :rows="3" placeholder="请è¾å
¥å
容" |
| | | type="textarea"> |
| | | </el-input> |
| | | <p v-else style="text-align: left;line-height: 26px;">{{ currentInfo0.causeAnalysis }}</p> |
| | | </div> |
| | | <div v-if="title != 'å¤çæè¯'" class="user-info"> |
| | | <div style="width: 200px;margin-right: 10px;"> |
| | | <p style="text-align: end;">责任é¨é¨è´è´£äºº:</p> |
| | | <p class="en" style="text-align: end;">Head of Responsible Department:</p> |
| | | </div> |
| | | <span>{{ currentInfo0.causeAnalysisUserName }}</span> |
| | | <div style="width: 70px;"> |
| | | <p>æ¥æ:</p> |
| | | <p class="en">Date:</p> |
| | | </div> |
| | | <span style="margin-right: 16px;">{{ currentInfo0.causeAnalysisTime }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>çº æ£æªæ½</p> |
| | | <p class="en">Corrective actions</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <div class="user-content"> |
| | | <el-input v-if="title == 'å¤çæè¯'" v-model="currentInfo0.correctiveAction" :rows="3" placeholder="请è¾å
¥å
容" |
| | | type="textarea"> |
| | | </el-input> |
| | | <p v-else style="text-align: left;line-height: 26px;">{{ currentInfo0.correctiveAction }}</p> |
| | | </div> |
| | | <div v-if="title != 'å¤çæè¯'" class="user-info"> |
| | | <div style="width: 200px;margin-right: 10px;"> |
| | | <p style="text-align: end;">责任é¨é¨è´è´£äºº:</p> |
| | | <p class="en" style="text-align: end;">Head of Responsible Department:</p> |
| | | </div> |
| | | <span>{{ currentInfo0.correctiveActionUserName }}</span> |
| | | <div style="width: 70px;"> |
| | | <p>æ¥æ:</p> |
| | | <p class="en">Date:</p> |
| | | </div> |
| | | <span style="margin-right: 16px;">{{ currentInfo0.correctiveActionTime }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>çº æ£æªæ½ç¡®è®¤</p> |
| | | <p class="en">Corrective actions confirmation</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <div class="user-content"> |
| | | <el-input v-if="title == 'å¤çæè¯'" v-model="currentInfo0.correctiveActionConfirmation" :rows="3" |
| | | placeholder="请è¾å
¥å
容" type="textarea"> |
| | | </el-input> |
| | | <p v-else style="text-align: left;line-height: 26px;">{{ currentInfo0.correctiveActionConfirmation }} |
| | | </p> |
| | | </div> |
| | | <div v-if="title != 'å¤çæè¯'" class="user-info"> |
| | | <div style="width: 200px;margin-right: 10px;"> |
| | | <p style="text-align: end;">è´¨éè´è´£äºº:</p> |
| | | <p class="en" style="text-align: end;">Quality Manager:</p> |
| | | </div> |
| | | <span>{{ currentInfo0.correctiveActionConfirmationUserName }}</span> |
| | | <div style="width: 70px;"> |
| | | <p>æ¥æ:</p> |
| | | <p class="en">Date:</p> |
| | | </div> |
| | | <span style="margin-right: 16px;">{{ currentInfo0.correctiveActionConfirmationTime }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <span v-if="title == 'å¤çæè¯'" slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleDialogVisible = false">å æ¶</el-button> |
| | | <el-button :loading="addLoading" type="primary" @click="submit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { getYearAndMonthAndDays } from '@/utils/date' |
| | | import { exportHtmlToPDF } from '@/utils/downHtmlToPDF' |
| | | import { |
| | | addProcessComplain, |
| | | getProcessComplain, |
| | | doProcessComplain, |
| | | exportProcessComplain, |
| | | pageProcessComplain, |
| | | delProcessComplain |
| | | } from '@/api/cnas/process/complaint.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: false, |
| | | outLoading: false, |
| | | addDialogVisible: false, |
| | | addLoading: false, |
| | | handleDialogVisible: false, |
| | | title: 'å¤çæè¯', |
| | | addInfo: {},//æ°å¢ä¿¡æ¯ |
| | | currentInfo: null,//æ¥å£è¯·æ±åæ¥çä¿¡æ¯ |
| | | currentInfo0: {},//ç¨æ·ç¼è¾è¿åçä¿¡æ¯ |
| | | outPower: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æè¯åç§°", prop: "complainName" }, |
| | | { label: "æè¯äºº", prop: "complainant" }, |
| | | { label: "æè¯æ¥æ", prop: "createTime" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å¤ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleWork(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "导åº", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleOut(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getList() |
| | | }, |
| | | 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 == 'doProcessComplain') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addProcessComplain') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delProcessComplain') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportProcessComplain') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | this.outPower = out |
| | | this.addPower = add |
| | | }, |
| | | openAdd() { |
| | | this.addInfo = {} |
| | | this.addDialogVisible = true |
| | | }, |
| | | handleAdd() { |
| | | this.addLoading = true |
| | | addProcessComplain(this.addInfo).then((res) => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ°å¢å¤±è´¥' |
| | | }) |
| | | return |
| | | } |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æå' |
| | | }) |
| | | this.addDialogVisible = false |
| | | this.refresh() |
| | | }) |
| | | }, |
| | | // å¤çæè¯ |
| | | handleWork(row) { |
| | | getProcessComplain({ id: row.id }).then((res) => { |
| | | this.currentInfo = res.data |
| | | this.currentInfo0 = this.HaveJson(res.data) |
| | | this.title = 'å¤çæè¯' |
| | | this.handleDialogVisible = true |
| | | }) |
| | | }, |
| | | submit() { |
| | | this.handleParam('problemRecords') |
| | | this.handleParam('dutyOwnership') |
| | | this.handleParam('causeAnalysis') |
| | | this.handleParam('correctiveAction') |
| | | this.handleParam('correctiveActionConfirmation') |
| | | this.addLoading = true |
| | | for (let i in this.currentInfo0) { |
| | | if (!this.currentInfo0[i]) { |
| | | delete this.currentInfo0[i] |
| | | } |
| | | } |
| | | doProcessComplain(this.currentInfo0).then((res) => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æäº¤å¤±è´¥' |
| | | }) |
| | | return |
| | | } |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | this.handleDialogVisible = false |
| | | this.refresh() |
| | | }) |
| | | }, |
| | | /** |
| | | * å¤çåæ° |
| | | * |
| | | * @param {string} type - éè¦å¤ççåæ°ç±»å |
| | | */ |
| | | handleParam(type) { |
| | | if (this.currentInfo0[type] != this.currentInfo[type]) { |
| | | this.currentInfo0[type + 'User'] = this.userId |
| | | this.currentInfo0[type + 'Time'] = getYearAndMonthAndDays() |
| | | } |
| | | }, |
| | | // æ¥çæè¯ |
| | | handleLook(row) { |
| | | addProcessComplain({ id: row.id }).then((res) => { |
| | | this.currentInfo = res.data |
| | | this.currentInfo0 = this.HaveJson(res.data) |
| | | this.title = 'æ¥çæè¯' |
| | | this.handleDialogVisible = true |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageProcessComplain({ ...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(); |
| | | }, |
| | | handleDown() { |
| | | this.outLoading = true |
| | | exportProcessComplain(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æè¯æ
嵿±æ»è¡¨.xlsx'); |
| | | }) |
| | | }, |
| | | handleOut(row) { |
| | | getProcessComplain({ id: row.id }).then((res) => { |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.currentInfo = res.data |
| | | this.currentInfo0 = this.HaveJson(res.data) |
| | | this.title = '导åº' |
| | | this.handleDialogVisible = true |
| | | setTimeout(() => { |
| | | this.$nextTick(() => { |
| | | const element = document.getElementById("dialogBody"); |
| | | exportHtmlToPDF(element, 'æè¯è¯¦æ
').then(res => { |
| | | this.handleDialogVisible = false |
| | | }) |
| | | }) |
| | | }, 500); |
| | | }) |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProcessComplain({ 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 { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .dialog-body { |
| | | max-height: 75vh; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | } |
| | | |
| | | .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; |
| | | /* é»è®¤æ¢è¡ */ |
| | | } |
| | | |
| | | .user-info { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .user-content { |
| | | min-height: 60px; |
| | | } |
| | | |
| | | .downPdf { |
| | | opacity: 0 !important; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | top: 16px; |
| | | right: 20px; |
| | | } |
| | | </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="{ detailsEvaluateId: info.detailsEvaluateId }" :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 - 47em)'" :highlightCurrentRow="true" |
| | | :table-data="tableData" :table-loading="tableLoading" style="margin-top: 0.5em;"> |
| | | </limsTable> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="lookDialogVisible" fullscreen title="æ¥çéä»¶" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.fileUrl" |
| | | style="height: 90vh;overflow-y: auto;top: 0" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { |
| | | delVerifyEvaluateFileList, |
| | | getEvaluateFileList, |
| | | } from '@/api/cnas/process/ensureResults/ensureResultsValidity.js' |
| | | export default { |
| | | name: 'ViewRecord', |
| | | // 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 |
| | | console.log(1111, row) |
| | | this.info = row |
| | | this.searchTableList() |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList() { |
| | | this.tableLoading = true |
| | | getEvaluateFileList({ detailsEvaluateId: this.info.detailsEvaluateId }).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 |
| | | }, |
| | | // ä¸è½½ |
| | | 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.fileUrlrow.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName) |
| | | } |
| | | }, |
| | | // å é¤ |
| | | delete(row) { |
| | | this.tableLoading = true |
| | | delVerifyEvaluateFileList({ evaluateFileId: row.evaluateFileId }).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() |
| | | } |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row) { |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | }, |
| | | computed: { |
| | | fileAction() { |
| | | return this.javaApi + '/qualityMonitor/uploadEvaluateFile' |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </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="closeCarryOutDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="宿½"></el-step> |
| | | <el-step title="æ¹å"></el-step> |
| | | </el-steps> |
| | | <div style="height: 620px;overflow-y: auto"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>çæ§é¡¹ç®ï¼</p> |
| | | </td> |
| | | <td colspan="3"> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorProject" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.monitorProject }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>çæ§æ¶é´ï¼</p> |
| | | </td> |
| | | <td colspan="3"> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorData" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.monitorData }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>çæ§ç®çï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorPurpose" :rows="3" placeholder="请è¾å
¥å
容" |
| | | size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.monitorPurpose }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>çæ§æ¹æ³ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorMethod" :rows="4" placeholder="请è¾å
¥å
容" |
| | | size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.monitorMethod }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>åå 人åï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.participant" :rows="3" placeholder="请è¾å
¥å
容" size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.participant }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>è¿ç¨æ§å¶ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.processControl" :rows="3" placeholder="请è¾å
¥å
容" |
| | | size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.processControl }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>ç»æè¯ä»·æ åï¼å¦ä½è¯ä»·ï¼ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.howEvaluate" :rows="3" placeholder="请è¾å
¥å
容" size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.howEvaluate }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>ç»è´¹é¢ç®ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.budget" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.budget }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="4"> |
| | | <div> |
| | | <p>æ£æµé¨é¨ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.inspectionDepartment" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.inspectionDepartment }}</span> |
| | | </div> |
| | | </td> |
| | | <td colspan="4"> |
| | | <div v-if="currentStep == 0"> |
| | | <div>éæ©æ¹å人ï¼</div> |
| | | <div> |
| | | <el-select v-if="currentStep == 0" v-model="form.ratifyUserId" 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> |
| | | <span v-else class="td-info2"> {{ form.ratifyName }}</span> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <div> |
| | | <p>æ¹åæè§ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 1" v-model="form.ratifyOpinion" :rows="3" placeholder="请è¾å
¥å
容" |
| | | size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="currentStep == 2" class="td-info2"> {{ form.ratifyOpinion }}</span> |
| | | <span v-if="currentStep == 2" class="td-info3"> {{ 'æ¹å人ï¼' + form.ratifyName }}</span> |
| | | </div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeCarryOutDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep != 2" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getQualityMonitorRatify, |
| | | addQualityMonitorRatify, |
| | | addQualityMonitorRatifyOpinion, |
| | | } from '@/api/cnas/process/ensureResults/ensureResultsValidity.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | name: 'carryOutDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | form: { |
| | | monitorProject: '', |
| | | monitorData: '', |
| | | monitorPurpose: '', |
| | | monitorMethod: '', |
| | | participant: '', |
| | | processControl: '', |
| | | howEvaluate: '', |
| | | budget: '', |
| | | inspectionDepartment: '', |
| | | ratifyUserId: '', |
| | | ratifyOpinion: '', |
| | | qualityMonitorDetailsId: '', |
| | | ratifyName: '', |
| | | }, |
| | | personList: [], |
| | | editLoad: false, |
| | | isCarryOut: false, // æ¯å¦ä¸ºå®æ½ |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | getQualityMonitorRatify({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => { |
| | | if (res.code === 201) return |
| | | // ædetailsRatifyIdå说ææäº¤è¿å®æ½ä¿¡æ¯ |
| | | if (res.data.detailsRatifyId) { |
| | | // æ¯å¦ç»æ0:æªç»æ, 1:å·²ç»æ |
| | | if (res.data.isFinish == 0) { |
| | | this.currentStep = 1 |
| | | } else if (res.data.isFinish == 1) { |
| | | this.currentStep = 2 |
| | | } |
| | | } else { |
| | | this.currentStep = 0 |
| | | } |
| | | this.form = res.data |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit() { |
| | | this.editLoad = true |
| | | if (this.currentStep == 0) { |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo() |
| | | } |
| | | }, |
| | | // æäº¤å®æ½ |
| | | addInfo() { |
| | | addQualityMonitorRatify(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeCarryOutDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤æ¹å |
| | | editInfo() { |
| | | addQualityMonitorRatifyOpinion(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeCarryOutDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeCarryOutDia() { |
| | | this.formDia = false |
| | | this.$emit('closeCarryOutDia') |
| | | }, |
| | | 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: 20px auto 50px !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .td-title { |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | |
| | | .td-info2 { |
| | | display: inline-block; |
| | | width: 90%; |
| | | text-align: left; |
| | | font-size: 16px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | margin-left: 20px; |
| | | } |
| | | |
| | | .tables td { |
| | | height: 40px; |
| | | width: 100px; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info3 { |
| | | width: 90%; |
| | | display: inline-block; |
| | | text-align: right; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog title="ç¼è¾" :visible.sync="formDia" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | width="80%" @close="closeDia"> |
| | | <el-form :model="form" :rules="rules" ref="form" label-width="140px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§ç®ç" prop="monitorPurpose"> |
| | | <el-input v-model="form.monitorPurpose" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计åå¼å±æ¶é´" prop="plannedTime"> |
| | | <el-input v-model="form.plannedTime" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§é¡¹ç®" prop="monitorProject"> |
| | | <el-input v-model="form.monitorProject" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå åä½ï¼äººåï¼" prop="participant"> |
| | | <el-input v-model="form.participant" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é¢ç®ï¼å
ï¼" prop="budget"> |
| | | <el-input v-model="form.budget" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»ç»äººå" prop="organization"> |
| | | <el-input v-model="form.organization" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§æ¹å¼" prop="monitorWay"> |
| | | <el-input v-model="form.monitorWay" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addQualityMonitorDetail, |
| | | updateQualityMonitorDetail, |
| | | } from '@/api/cnas/process/ensureResults/ensureResultsValidity.js' |
| | | export default { |
| | | name: 'detailFormDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | props: ['qualityMonitorId'], |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | qualityMonitorDetailsId: '', |
| | | monitorPurpose: '', |
| | | plannedTime: '', |
| | | monitorProject: '', |
| | | participant: '', |
| | | budget: '', |
| | | organization: '', |
| | | monitorWay: '', |
| | | }, |
| | | rules: { |
| | | monitorPurpose: [{ required: true, message: '请è¾å
¥çæ§ç®ç', trigger: 'blur' }], |
| | | monitorProject: [{ required: true, message: '请è¾å
¥çæ§é¡¹ç®', trigger: 'blur' }], |
| | | }, |
| | | upLoad: false, |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | searchInfo(row) { |
| | | this.form = { ...row } |
| | | }, |
| | | // æäº¤è¡¨å |
| | | submitForm() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.operationType === 'add') { |
| | | this.handleAdd() |
| | | } else { |
| | | this.handleEdit() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | handleAdd() { |
| | | let entity = this.HaveJson(this.form) |
| | | entity.qualityMonitorId = this.qualityMonitorId |
| | | this.upLoad = true |
| | | addQualityMonitorDetail(entity).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤ä¿®æ¹ |
| | | handleEdit() { |
| | | const entity = this.HaveJson(this.form) |
| | | this.upLoad = true |
| | | updateQualityMonitorDetail(entity).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog__body { |
| | | max-height: 720px; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="è´¨éçæ§è¯ä»·" |
| | | width="60%" @close="closeEvaDia"> |
| | | <div style="text-align: right"> |
| | | <el-button size="small" type="primary" @click="viewTestRecord">éä»¶ä¸ä¼ </el-button> |
| | | </div> |
| | | <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-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.reviewPurpose" placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewPurpose }}</span> |
| | | </td> |
| | | </tr> |
| | | <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.reviewUser" placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewUser }}</span> |
| | | </td> |
| | | </tr> |
| | | <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.reviewTime" placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewTime }}</span> |
| | | </td> |
| | | </tr> |
| | | <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.implementCondition" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.implementCondition }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p>宿½é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <span> {{ form.implementDepartment }}</span> |
| | | </td> |
| | | <td v-if="currentStep === 0" class="td-title"> |
| | | <p>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 0" class="td-info"> |
| | | <el-select v-model="form.implementUserId" 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 === 1"> |
| | | <td class="td-title"> |
| | | <p>çæ§ç»æè¯ä»·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | <el-input v-if="showStep === 1 && currentStep === 1" v-model="form.implementResult" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.implementResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | {{ form.implementName }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td v-if="currentStep === 1" class="td-title"> |
| | | <p>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-info" colspan="4"> |
| | | <el-select v-model="form.ratifyUserId" 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>è¯å®¡ç»è®ºï¼æ¯å¦éåæªæ½ï¼ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.ratifyOpinion" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.ratifyOpinion }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | {{ form.ratifyUserName }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>å®¡æ¹æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | {{ form.ratifyTime }} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeEvaDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep !== 3" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <view-record v-if="ViewRecord" ref="ViewRecord"></view-record> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ViewRecord from './ViewRecord.vue'; |
| | | import { |
| | | getQualityMonitorEvaluate, |
| | | addMonitorEvaluateOpinion, |
| | | addQualityMonitorEvaluate, |
| | | } from '@/api/cnas/process/ensureResults/ensureResultsValidity.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | import { selectUserDepartmentLimsName } from "@/api/system/user"; |
| | | export default { |
| | | name: 'evaluateDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ViewRecord }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | showStep: 0, |
| | | form: { |
| | | implementDepartment: '', |
| | | reviewPurpose: '', |
| | | reviewUser: '', |
| | | reviewTime: '', |
| | | implementCondition: '', |
| | | implementName: '', |
| | | implementUserId: '', |
| | | implementResult: '', |
| | | ratifyUserName: '', |
| | | ratifyUserId: '', |
| | | ratifyOpinion: '', |
| | | qualityMonitorDetailsId: '', |
| | | ratifyTime: '', |
| | | detailsEvaluateId: '', |
| | | }, |
| | | editLoad: false, |
| | | personList: [], |
| | | ViewRecord: false, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.getAuthorizedPerson() |
| | | this.getDepartment() |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | getQualityMonitorEvaluate({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => { |
| | | if (res.code === 201) return |
| | | if (res.data === null) { |
| | | this.showStep = 0 |
| | | this.currentStep = 0 |
| | | } else { |
| | | this.form = res.data |
| | | if (res.data.isFinish === 0) { |
| | | if (res.data.implementUserId && !res.data.ratifyUserId) { |
| | | this.showStep = 1 |
| | | this.currentStep = 1 |
| | | } else if (res.data.implementUserId && res.data.ratifyUserId) { |
| | | this.showStep = 2 |
| | | this.currentStep = 2 |
| | | } |
| | | } else { |
| | | this.currentStep = 3 |
| | | this.showStep = 2 |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit() { |
| | | if (this.currentStep === 2) { |
| | | addMonitorEvaluateOpinion(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeEvaDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | if (!this.form.reviewPurpose) { |
| | | this.$message.warning('请填åè¯å®¡ç®ç') |
| | | return |
| | | } |
| | | if (!this.form.reviewUser) { |
| | | this.$message.warning('请填åè¯å®¡äººå') |
| | | return |
| | | } |
| | | if (!this.form.reviewTime) { |
| | | this.$message.warning('请填åè¯å®¡æ¥æ') |
| | | return |
| | | } |
| | | if (!this.form.implementCondition) { |
| | | this.$message.warning('请填åçæ§è®¡å宿½æ
åµ') |
| | | return |
| | | } |
| | | if (!this.form.implementUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | if (this.currentStep === 1) { |
| | | if (!this.form.ratifyUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } |
| | | addQualityMonitorEvaluate(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeEvaDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeEvaDia() { |
| | | this.formDia = false |
| | | this.$emit('closeEvaDia') |
| | | }, |
| | | setStep(step) { |
| | | this.showStep = step |
| | | }, |
| | | viewTestRecord() { |
| | | this.ViewRecord = true |
| | | this.$nextTick(() => { |
| | | this.$refs.ViewRecord.openDia(this.form) |
| | | }) |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | getDepartment() { |
| | | selectUserDepartmentLimsName().then(res => { |
| | | if (res.code === 201) return |
| | | this.form.implementDepartment = res.data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .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> |
| | | <!-- 7.7è´¨éçæ§è®¡å--> |
| | | <div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计å表" style="margin-top: 10px;"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>计ååç§°ï¼</span> |
| | | <el-input v-model="yearForm.monitorName" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearYear">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-upload ref='upload' :action="action" :before-upload="beforeUpload" :headers="uploadHeader" |
| | | :on-error="onError" :data="uploadData" :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> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable ref="yearTable" :column="yearColumnData" :height="'28vh'" :highlightCurrentRow="true" |
| | | :rowClick="rowClick" :table-data="yearTableData" :table-loading="yearLoading" |
| | | style="margin-top: 0.5em;padding: 0 15px;" :page="yearPage" @pagination="pagination"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计åæç»è¡¨" style="margin-top: 10px;"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>çæ§ç®çï¼</span> |
| | | <el-input v-model="yearDetailForm.monitorPurpose" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <span>çæ§é¡¹ç®ï¼</span> |
| | | <el-input v-model="yearDetailForm.monitorProject" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearDetailPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearDetail">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="showDialog('add')">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="yearDetailColumnData" :height="'28vh'" :table-data="yearDetailTableData" |
| | | :table-loading="yearDetailLoading" style="margin-top: 18px; padding: 0 15px;" :page="yearDetailPage" |
| | | @pagination="pagination1"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <!--æ°å¢ä¿®æ¹å¼¹æ¡--> |
| | | <detail-form-dialog v-if="formDia" ref="formDia" :qualityMonitorId="qualityMonitorId" |
| | | @closeDia="closeDia"></detail-form-dialog> |
| | | <!--宿½æµç¨å¼¹æ¡--> |
| | | <carry-out-dialog v-if="carryOutDia" ref="carryOutDia" :qualityMonitorId="qualityMonitorId" |
| | | @closeDia="closeCarryOutDia"></carry-out-dialog> |
| | | <!--è¯ä»·æµç¨å¼¹æ¡--> |
| | | <evaluate-dialog v-if="evaluateDialog" ref="evaluateDialog" @closeEvaDia="closeEvaDia"></evaluate-dialog> |
| | | <el-dialog :visible.sync="examineDialog" title="å®¡æ ¸" width="30%" @close="closeExamineDia"> |
| | | <span> |
| | | å®¡æ ¸å¤æ³¨ï¼ |
| | | <el-input v-model="examineInfo.examineRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="examineLoading" @click="handleReview(0)">ä¸éè¿</el-button> |
| | | <el-button :loading="examineLoading" type="primary" @click="handleReview(1)">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="ratifyDialog" title="æ¹å" width="30%" @close="closeRatifyDia"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="ratifyInfo.ratifyRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="ratifyLoading" @click="handleRatify(0)">䏿¹å</el-button> |
| | | <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="downloadDialog" title="导åº" width="600px"> |
| | | <span> |
| | | <el-button plain type="primary" @click="controlDown">宿½è®¡å导åº</el-button> |
| | | <el-button plain type="primary" @click="processingDown">è¯ä»·å¯¼åº</el-button> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="downloadDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import DetailFormDialog from './components/detailFormDialog.vue'; |
| | | import CarryOutDialog from './components/carryOutDialog.vue'; |
| | | import EvaluateDialog from './components/evaluateDialog.vue'; |
| | | import { |
| | | pageQualityMonitor, |
| | | examineQualityMonitor, |
| | | ratifyQualityMonitor, |
| | | exportQualityMonitorDetail, |
| | | delQualitySupervise, |
| | | pageQualityMonitorDetail, |
| | | exportQualityMonitorRatify, |
| | | exportQualityMonitorEvaluate, |
| | | delQualityMonitorDetail, |
| | | } from '@/api/cnas/process/ensureResults/ensureResultsValidity.js' |
| | | |
| | | export default { |
| | | name: 'a7-Ensure-results-validity', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { EvaluateDialog, CarryOutDialog, DetailFormDialog, limsTable, TableCard }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | uploadData: {}, |
| | | yearForm: { |
| | | monitorName: '', |
| | | }, |
| | | yearPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | yearColumnData: [ |
| | | { |
| | | label: '计ååç§°', |
| | | prop: 'monitorName', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'writeName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¼å¶æ¥æ', |
| | | prop: 'writeTime', |
| | | minWidth: '160' |
| | | }, { |
| | | 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: 'examineName', |
| | | 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: 'ratifyName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'æ¹åæ¥æ', |
| | | prop: 'ratifyTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'createUser', |
| | | minWidth: '100' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '170', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'å®¡æ ¸', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.examineStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.examinePlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1 || row.examineStatus !== 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.approvalPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearTableData: [], // 年表 |
| | | yearLoading: false, |
| | | yearDetailForm: { |
| | | monitorPurpose: '', |
| | | monitorProject: '' |
| | | }, |
| | | yearDetailColumnData: [ |
| | | { |
| | | label: 'çæ§ç®ç', |
| | | prop: 'monitorPurpose', |
| | | width: '150px', |
| | | showOverflowTooltip: true, |
| | | }, { |
| | | label: '计åå¼å±æ¶é´', |
| | | prop: 'plannedTime', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'çæ§é¡¹ç®', |
| | | prop: 'monitorProject', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'åå åä½ï¼äººåï¼', |
| | | prop: 'participant', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'é¢ç®ï¼å
ï¼', |
| | | prop: 'budget', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'ç»ç»äººå', |
| | | prop: 'organization', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'çæ§æ¹å¼', |
| | | prop: 'monitorWay', |
| | | minWidth: '150px' |
| | | }, { |
| | | dataType: 'action', |
| | | width: '180', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.showDialog('edit', row) |
| | | } |
| | | }, |
| | | { |
| | | name: '宿½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.carryOut(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'è¯ä»·', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.evaluate(row) |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlanDetail(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | yearDetailTableData: [], // å¹´æç»è¡¨ |
| | | yearDetailLoading: false, |
| | | yearDetailPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | formDia: false, |
| | | qualityMonitorId: '', |
| | | carryOutDia: false, |
| | | evaluateDialog: false, |
| | | examineDialog: false, |
| | | examineLoading: false, |
| | | ratifyDialog: false, |
| | | ratifyLoading: false, |
| | | examineInfo: {}, |
| | | ratifyInfo: {}, |
| | | upLoading: false, |
| | | downloadDialog: false, |
| | | download: {}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å¹´åº¦è®¡å表 |
| | | getYearPlanList() { |
| | | const entity = { |
| | | monitorName: this.yearForm.monitorName, |
| | | } |
| | | const page = this.yearPage |
| | | this.yearLoading = true |
| | | pageQualityMonitor({ ...entity, ...page }).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.yearTableData = res.data.records |
| | | this.yearPage.total = res.data.total |
| | | if (this.yearTableData.length > 0) { |
| | | this.rowClick(this.yearTableData[0]) |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | clearYear() { |
| | | this.yearForm.monitorName = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // 导å
¥æµç¨ |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | this.upLoading = true; |
| | | let list = file.name.split(".") |
| | | let suffix = list[list.length - 1] |
| | | this.$set(this.uploadData, 'suffix', suffix) |
| | | 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.getYearPlanList() |
| | | } |
| | | }, |
| | | // å®¡æ ¸ |
| | | examinePlan(row) { |
| | | this.examineDialog = true |
| | | this.examineInfo = row |
| | | }, |
| | | handleReview(examineStatus) { |
| | | // å®¡æ ¸ç¶æ , 0 ä¸éè¿, 1éè¿ |
| | | this.examineInfo.examineStatus = examineStatus |
| | | this.examineLoading = true |
| | | examineQualityMonitor(this.examineInfo).then(res => { |
| | | this.examineLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeExamineDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.examineLoading = false |
| | | }) |
| | | }, |
| | | closeExamineDia() { |
| | | this.examineDialog = false |
| | | this.examineInfo.examineRemark = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¹å |
| | | approvalPlan(row) { |
| | | this.ratifyDialog = true |
| | | this.ratifyInfo = row |
| | | }, |
| | | handleRatify(ratifyStatus) { |
| | | // æ¹åç¶æ , 0 ä¸éè¿, 1éè¿ |
| | | this.ratifyInfo.ratifyStatus = ratifyStatus |
| | | this.ratifyLoading = true |
| | | ratifyQualityMonitor(this.ratifyInfo).then(res => { |
| | | this.ratifyLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRatifyDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.ratifyLoading = false |
| | | }) |
| | | }, |
| | | closeRatifyDia() { |
| | | this.ratifyDialog = false |
| | | this.ratifyInfo.ratifyRemark = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportQualityMonitorDetail({ qualityMonitorId: row.qualityMonitorId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, row.monitorName + '.docx') |
| | | }) |
| | | }, |
| | | // å é¤è¿åº¦è®¡å表 |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearLoading = true |
| | | delQualitySupervise({ qualityMonitorId: row.qualityMonitorId }).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearPlanList(); |
| | | |
| | | }).catch(err => { |
| | | this.yearLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // 年度计åè¡¨æ ¼ï¼ç¹å»è¡æ°æ®åå·æ°è¯¦æ
|
| | | rowClick(row) { |
| | | this.qualityMonitorId = row.qualityMonitorId |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // è·å年度æç»è¡¨ |
| | | getYearDetailPlanList() { |
| | | const entity = { |
| | | qualityMonitorId: this.qualityMonitorId, |
| | | monitorPurpose: this.yearDetailForm.monitorPurpose, |
| | | monitorProject: this.yearDetailForm.monitorProject, |
| | | } |
| | | const page = this.yearDetailPage |
| | | this.yearDetailLoading = true |
| | | pageQualityMonitorDetail({ ...entity, ...page }).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.yearDetailTableData = res.data.records |
| | | this.yearDetailPage.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearDetailLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æç»è¡¨ |
| | | clearDetail() { |
| | | this.yearDetailForm = { |
| | | monitorPurpose: '', |
| | | monitorProject: '' |
| | | } |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æç»è¡¨å®æ½ |
| | | carryOut(row) { |
| | | this.carryOutDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.carryOutDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeCarryOutDia() { |
| | | this.carryOutDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼è¯ä»·å¼¹æ¡ |
| | | evaluate(row) { |
| | | this.evaluateDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.evaluateDialog.openDia(row) |
| | | }) |
| | | }, |
| | | closeEvaDia() { |
| | | this.evaluateDialog = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼å¯¼åºå¼¹æ¡ |
| | | downLoadPost(row) { |
| | | this.downloadDialog = true |
| | | this.download = row |
| | | }, |
| | | // æå¼å¹´åº¦æç»æ°å¢ãä¿®æ¹å¼¹æ¡ |
| | | showDialog(type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeDia() { |
| | | this.formDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æ§å¶åå¯¼åº |
| | | controlDown() { |
| | | exportQualityMonitorRatify({ |
| | | qualityMonitorDetailsId: this.download.qualityMonitorDetailsId |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'è´¨éçæ§å®æ½è®¡å.docx') |
| | | }) |
| | | }, |
| | | // å¤çåå¯¼åº |
| | | processingDown() { |
| | | exportQualityMonitorEvaluate({ qualityMonitorDetailsId: this.download.qualityMonitorDetailsId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'è´¨éçæ§è¯ä»·.docx') |
| | | }) |
| | | }, |
| | | delYearPlanDetail(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearDetailLoading = true |
| | | delQualityMonitorDetail({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearDetailPlanList() |
| | | }).catch(err => { |
| | | this.yearDetailLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }) |
| | | }, |
| | | // 年计åå页 |
| | | pagination({ page, limit }) { |
| | | this.yearPage.current = page; |
| | | this.yearPage.size = limit; |
| | | this.getYearPlanList(); |
| | | }, |
| | | // å¹´æç»è®¡åå页 |
| | | pagination1({ page, limit }) { |
| | | this.yearDetailPage.current = page; |
| | | this.yearDetailPage.size = limit; |
| | | this.getYearDetailPlanList(); |
| | | }, |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/qualityMonitor/importQualityMonitor' |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table-card { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .flex_column { |
| | | display: flex; |
| | | height: 80vh; |
| | | flex-direction: column; |
| | | overflow: auto; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :title="operationType === 'edit' ? 'ç¼è¾' : 'æ°å¢'" :visible.sync="formDia" width="80%" @close="closeDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="140px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£æ¥æ" prop="superviseTime"> |
| | | <el-date-picker v-model="form.superviseTime" 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="supervisePurpose"> |
| | | <el-input v-model="form.supervisePurpose" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§é¡¹ç®" prop="superviseProject"> |
| | | <el-input v-model="form.superviseProject" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="被çç£äººå" prop="supervisee"> |
| | | <el-input v-model="form.supervisee" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£åå " prop="superviseReason"> |
| | | <el-input v-model="form.superviseReason" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="upLoad" type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addQualitySuperviseDetail, |
| | | updateQualitySuperviseDetail, |
| | | } from '@/api/cnas/process/ensureResults/qualityControlPlan.js' |
| | | export default { |
| | | name: 'detailFormDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | props: ['superviseId'], |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | qualityMonitorDetailsId: '', |
| | | superviseTime: '', |
| | | supervisePurpose: '', |
| | | superviseProject: '', |
| | | supervisee: '', |
| | | superviseReason: '', |
| | | remark: '', |
| | | superviseDetailsId: '', |
| | | }, |
| | | rules: { |
| | | superviseTime: [{ required: true, message: '请è¾å
¥çç£æ¥æ', trigger: 'blur' }], |
| | | supervisePurpose: [{ required: true, message: '请è¾å
¥çç£ç®ç', trigger: 'blur' }], |
| | | superviseProject: [{ required: true, message: '请è¾å
¥çæ§é¡¹ç®', trigger: 'blur' }], |
| | | }, |
| | | upLoad: false, |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | searchInfo(row) { |
| | | this.form = { ...row } |
| | | }, |
| | | // æäº¤è¡¨å |
| | | submitForm() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.operationType === 'add') { |
| | | this.handleAdd() |
| | | } else { |
| | | this.handleEdit() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | handleAdd() { |
| | | let entity = this.HaveJson(this.form) |
| | | entity.superviseId = this.superviseId |
| | | this.upLoad = true |
| | | addQualitySuperviseDetail({ ...entity }).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤ä¿®æ¹ |
| | | handleEdit() { |
| | | const entity = this.HaveJson(this.form) |
| | | this.upLoad = true |
| | | updateQualitySuperviseDetail(entity).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia() { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog__body { |
| | | max-height: 720px; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="ä¸ç¬¦å工使§å¶å" |
| | | width="60%" @close="closeProcessingDia"> |
| | | <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>åçé¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.occurrenceDepartment" |
| | | placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.occurrenceDepartment }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>é¨é¨è´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.headDepartment" placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.headDepartment }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>ä¸ç¬¦åå·¥ä½åç°éå¾ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-radio-group v-model="form.findWay" v-removeAriaHidden :disabled="showStep === 0 && currentStep !== 0"> |
| | | <el-radio :label="0">管çè¯å®¡</el-radio> |
| | | <el-radio :label="1">å
é¨å®¡æ ¸</el-radio> |
| | | <el-radio :label="2">æ£æµè¿ç¨æ§å¶</el-radio> |
| | | <el-radio :label="3">å
é¨è´¨éæ§å¶</el-radio> |
| | | <el-radio :label="4">å
é¨çç£</el-radio> |
| | | <el-radio :label="5">å¤é¨è¯å®¡</el-radio> |
| | | <el-radio :label="6">å¤é¨æè¯</el-radio> |
| | | <el-radio :label="7">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p>ä¸ç¬¦åå·¥ä½ç详ç»è®°å½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.recordDetail" :rows="4" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.recordDetail }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p>ä¸ç¬¦åå·¥ä½ç以ååæ¡æ¬¾å·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.recordAccording" :rows="4" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.recordAccording }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>被çç£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-select v-if="showStep === 0 && currentStep === 0" v-model="form.supervisedUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item, i) in supervisedUserList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.supervisedUserName }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>被çç£æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-date-picker v-if="showStep === 0 && currentStep === 0" v-model="form.supervisedTime" |
| | | format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" style="width: 80%" type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.supervisedTime }}</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"> |
| | | <el-select v-model="form.actionsUserId" 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.foundDepartment }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.recordTime }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0 && currentStep !== 0"> |
| | | <td class="td-title"> |
| | | <p>è®°å½äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.recordUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>è®°å½æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.recordTime }} |
| | | </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.eliminateMeasure" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.eliminateMeasure }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.actionsUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.actionsTime }} |
| | | </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-radio-group v-model="form.isCorrect" v-removeAriaHidden |
| | | :disabled="showStep === 2 && currentStep !== 2"> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </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.correctContent" :rows="5" |
| | | placeholder="请è¾å
¥å
容" size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.correctContent }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.correctUserName }} |
| | | </td> |
| | | <td v-if="showStep === 2 && currentStep !== 2" class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td v-if="showStep === 2 && currentStep !== 2" class="td-info"> |
| | | {{ form.correctTime }} |
| | | </td> |
| | | <td v-if="currentStep === 2" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 2" class="td-info"> |
| | | <el-select v-model="form.qualityManagerUserId" 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 rowspan="3"> |
| | | <p>æ¯å¦éç¥å®¢æ·å坿¢å¤å·¥ä½</p> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>éç¥å®¢æ·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.notifyCustomer" v-removeAriaHidden |
| | | :disabled="showStep === 3 && currentStep !== 3"> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ¢å¤å·¥ä½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.backToWork" v-removeAriaHidden |
| | | :disabled="showStep === 3 && currentStep !== 3"> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 3"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.qualityManagerUserName }} |
| | | </td> |
| | | <td v-if="showStep === 3 && currentStep !== 3" class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td v-if="showStep === 3 && currentStep !== 2" class="td-info"> |
| | | {{ form.qualityManagerTime }} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeProcessingDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep !== 4" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getSuperviseDetailAccording, |
| | | addSuperviseDetailAccording, |
| | | } from '@/api/cnas/process/ensureResults/qualityControlPlan.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | name: 'processingSheet', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | showStep: 0, |
| | | form: { |
| | | occurrenceDepartment: '', |
| | | headDepartment: '', |
| | | findWay: '', |
| | | recordDetail: '', |
| | | recordAccording: '', |
| | | supervisedUserId: '', |
| | | supervisedUserName: '', |
| | | supervisedTime: '', |
| | | actionsUserId: '', |
| | | actionsUserName: '', |
| | | eliminateMeasure: '', |
| | | correctUserId: '', |
| | | correctUserName: '', |
| | | isCorrect: '', |
| | | qualityManagerUserId: '', |
| | | correctContent: '', |
| | | superviseDetailsId: '', |
| | | superviseDetailsAccordingId: '', |
| | | flowType: '', |
| | | recordUserName: '', |
| | | recordTime: '', |
| | | foundDepartment: '', |
| | | actionsTime: '', |
| | | correctTime: '', |
| | | notifyCustomer: '', |
| | | backToWork: '', |
| | | qualityManagerUserName: '', |
| | | qualityManagerTime: '', |
| | | }, |
| | | editLoad: false, |
| | | personList: [], |
| | | supervisedUserList: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.getAuthorizedPerson() // è·å人åå表 |
| | | this.getSupervisedUserList() // è·åå½åé¨é¨äººå |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | getSuperviseDetailAccording({ superviseDetailsId: row.superviseDetailsId }).then(res => { |
| | | if (res.code === 201) return |
| | | if (res.data.superviseDetailsAccordingId === null) { |
| | | this.showStep = 0 |
| | | this.currentStep = 0 |
| | | } else { |
| | | this.form = res.data |
| | | if (res.data.isFinish === 0) { |
| | | if (res.data.actionsUserId) { |
| | | this.showStep = 1 |
| | | this.currentStep = 1 |
| | | } |
| | | if (res.data.correctUserId) { |
| | | this.showStep = 2 |
| | | this.currentStep = 2 |
| | | } |
| | | if (res.data.qualityManagerUserId) { |
| | | 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.findWay === null) { |
| | | this.$message.warning('è¯·éæ©ä¸ç¬¦åå·¥ä½åç°éå¾') |
| | | return |
| | | } |
| | | if (!this.form.supervisedUserId) { |
| | | this.$message.warning('è¯·éæ©è¢«çç£äºº') |
| | | return |
| | | } |
| | | if (!this.form.supervisedTime) { |
| | | this.$message.warning('è¯·éæ©è¢«çç£æ¶é´') |
| | | return |
| | | } |
| | | if (!this.form.actionsUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 1) { |
| | | if (!this.form.supervisedUserId) { |
| | | this.$message.warning('è¯·å¡«åæ¶é¤ä¸ç¬¦å工使éåçæªæ½') |
| | | return |
| | | } |
| | | if (!this.form.correctUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 2) { |
| | | if (this.form.isCorrect === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦éè¦éåçº æ£æªæ½') |
| | | return |
| | | } |
| | | if (!this.form.qualityManagerUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } else if (this.currentStep === 3) { |
| | | if (this.form.notifyCustomer === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦éç¥å®¢æ·') |
| | | return |
| | | } |
| | | if (this.form.backToWork === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦æ¢å¤å·¥ä½') |
| | | return |
| | | } |
| | | } |
| | | this.editLoad = true |
| | | this.form.supervisedTime = '' |
| | | this.form.flowType = this.currentStep |
| | | delete this.form.recordTime |
| | | delete this.form.actionsTime |
| | | delete this.form.correctTime |
| | | addSuperviseDetailAccording(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeProcessingDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeProcessingDia() { |
| | | this.formDia = false |
| | | this.$emit('closeProcessingDia') |
| | | }, |
| | | 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().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 :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="æ£æµå·¥ä½çç£è®°å½è¡¨" |
| | | width="70%" @close="closeRecordsDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="宿½"></el-step> |
| | | <el-step title="æ¹å"></el-step> |
| | | </el-steps> |
| | | <div style="height: 570px;overflow-y: auto"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ£æµäººåï¼</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-input v-if="currentStep === 0" v-model="form.testMember" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.testMember }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>çç£åï¼</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-input v-if="currentStep === 0" v-model="form.supervisor" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.supervisor }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ£æµé¡¹ç®ï¼</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="currentStep === 0" v-model="form.testItem" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.testItem }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ ·åç¼å·ï¼</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="currentStep === 0" v-model="form.sampleNumber" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.sampleNumber }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ£æµæ¥æï¼</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="currentStep === 0" v-model="form.testDate" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.testDate }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>人åï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.personnel" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.personnel }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>仪å¨è®¾å¤ï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.device" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.device }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>å·¥ä½ç¯å¢ï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.environment" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.environment }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ ·åééï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.sampleCollection" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.sampleCollection }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ ·åçåå¤ï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.samplePreparation" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.samplePreparation }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ£æµæ¹æ³ï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.detectionMethod" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.detectionMethod }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ£æµè®°å½ï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.inspectionRecord" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.inspectionRecord }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>æ£æµæ¥åï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.examiningReport" placeholder="请è¾å
¥å
容" size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.examiningReport }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>çç£æ
åµè¯ä»·ï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.supervisionEvaluation" :rows="4" placeholder="请è¾å
¥å
容" |
| | | size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.supervisionEvaluation }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>ä¸ç¬¦åå¤çæè§ï¼</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <el-input v-if="currentStep === 0" v-model="form.handlingAdvice" :rows="4" placeholder="请è¾å
¥å
容" |
| | | size="small" type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.handlingAdvice }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td v-if="currentStep === 0" class="td-title"> |
| | | <p><span class="required-span">* </span>è¯·éæ©ä¸ä¸æ¥æ¹å人ï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 0" colspan="5"> |
| | | <el-select v-model="form.ratifyUserId" 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> |
| | | <td v-if="currentStep === 1" class="td-title"> |
| | | <p>æ¹åè´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-info" colspan="5"> |
| | | {{ form.ratifyUserName }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="currentStep === 1 || currentStep === 2"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>审æ¹ç»è®ºï¼</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-input v-if="currentStep === 1" v-model="form.ratifyOpinion" :rows="4" placeholder="请è¾å
¥å
容" size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="currentStep === 2" class="td-info"> {{ form.ratifyOpinion }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p v-if="currentStep === 1">è¯·éæ©æ¯å¦ç¬¦åï¼</p> |
| | | <p v-if="currentStep === 2">æ¯å¦ç¬¦åï¼</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <el-radio-group v-if="currentStep === 1" v-model="form.isAccording"> |
| | | <el-radio :label="0">ä¸ç¬¦å</el-radio> |
| | | <el-radio :label="1">符å</el-radio> |
| | | </el-radio-group> |
| | | <span v-if="currentStep === 2" class="td-info"> {{ form.isAccording === 0 ? 'ä¸ç¬¦å' : '符å' }}</span> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeRecordsDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getSuperviseDetailRecord, |
| | | addSuperviseDetailRecord, |
| | | addSuperviseRecordOpinion, |
| | | } from '@/api/cnas/process/ensureResults/qualityControlPlan.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | name: 'recordsDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | superviseDetailsId: '', |
| | | superviseDetailsRecordId: '', |
| | | testMember: '', |
| | | supervisor: '', |
| | | testItem: '', |
| | | sampleNumber: '', |
| | | testDate: '', |
| | | personnel: '', |
| | | device: '', |
| | | environment: '', |
| | | sampleCollection: '', |
| | | samplePreparation: '', |
| | | detectionMethod: '', |
| | | inspectionRecord: '', |
| | | examiningReport: '', |
| | | supervisionEvaluation: '', |
| | | handlingAdvice: '', |
| | | ratifyUserId: '', |
| | | ratifyUserName: '', |
| | | ratifyOpinion: '', |
| | | isAccording: '', |
| | | }, |
| | | currentStep: 0, |
| | | editLoad: false, |
| | | personList: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | // æ¥è¯¢çç£è®¡å详æ
è®°å½æµç¨ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | getSuperviseDetailRecord({ superviseDetailsId: row.superviseDetailsId }).then(res => { |
| | | if (res.code === 201) return |
| | | // æsuperviseDetailsRecordId说ææäº¤è¿è®°å½ |
| | | if (res.data.superviseDetailsRecordId) { |
| | | // æ¯å¦ç»æ0:æªç»æ, 1:å·²ç»æ |
| | | if (res.data.isFinish === 0) { |
| | | this.currentStep = 1 |
| | | } else if (res.data.isFinish === 1) { |
| | | this.currentStep = 2 |
| | | } |
| | | } else { |
| | | this.currentStep = 0 |
| | | } |
| | | this.form = res.data |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤æµç¨ |
| | | handleEdit() { |
| | | if (!this.form.testMember || !this.form.supervisor || !this.form.testItem || !this.form.sampleNumber |
| | | || !this.form.testDate) { |
| | | this.$message.warning('请填å宿´') |
| | | return |
| | | } |
| | | if (this.currentStep === 0) { |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo() |
| | | } |
| | | }, |
| | | // æäº¤è®°å½ |
| | | addInfo() { |
| | | if (!this.form.ratifyUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥æ¹å人') |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | addSuperviseDetailRecord(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRecordsDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤æ¹å |
| | | editInfo() { |
| | | if (!this.form.ratifyOpinion) { |
| | | this.$message.warning('请填åå®¡æ¹æè§') |
| | | return |
| | | } |
| | | console.log('this.form.isAccording---', this.form.isAccording); |
| | | if (this.form.isAccording === null) { |
| | | this.$message.warning('è¯·éæ©æ¯å¦ç¬¦å') |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | addSuperviseRecordOpinion(this.form).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRecordsDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeRecordsDia() { |
| | | this.formDia = false |
| | | this.$emit('closeRecordsDia') |
| | | }, |
| | | 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: 20px auto 50px !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .td-title { |
| | | height: 40px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info { |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | |
| | | .tables td { |
| | | height: 40px; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | </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 { |
| | | getSuperviseDetailCorrect, |
| | | addSuperviseDetailCorrect, |
| | | } from '@/api/cnas/process/ensureResults/qualityControlPlan.js' |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | name: 'rectifyDialog', |
| | | // 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: [], |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.getAuthorizedPerson() // è·å人åå表 |
| | | this.getSupervisedUserList() // è·åå½åé¨é¨äººå |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | getSuperviseDetailCorrect({ superviseDetailsId: row.superviseDetailsId }).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 |
| | | delete this.form.recordTime |
| | | delete this.form.actionsTime |
| | | delete this.form.correctTime |
| | | addSuperviseDetailCorrect(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().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> |
| | | <!-- 7.7è´¨éçç£è®¡å--> |
| | | <div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计å表" style="margin-top: 10px;"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>计ååç§°ï¼</span> |
| | | <el-input v-model="yearForm.superviseName" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearYear">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-upload 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> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable ref="yearTable" :column="yearColumnData" :height="'28vh'" :highlightCurrentRow="true" |
| | | :rowClick="rowClick" :table-data="yearTableData" :table-loading="yearLoading" |
| | | style="margin-top: 0.5em;padding: 0 15px;" :page="yearPage" @pagination="pagination"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计åæç»è¡¨" style="margin-top: 10px;"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>çç£ç®çï¼</span> |
| | | <el-input v-model="yearDetailForm.supervisePurpose" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <span>çç£é¡¹ç®ï¼</span> |
| | | <el-input v-model="yearDetailForm.superviseProject" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearDetailPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearDetail">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="showDialog('add')">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="yearDetailColumnData" :height="'28vh'" :table-data="yearDetailTableData" |
| | | :table-loading="yearDetailLoading" style="margin-top: 18px; padding: 0 15px;" :page="yearDetailPage" |
| | | @pagination="pagination1"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <!--æ°å¢ä¿®æ¹å¼¹æ¡--> |
| | | <detail-form-dialog v-if="formDia" ref="formDia" :superviseId="superviseId" |
| | | @closeDia="closeDia"></detail-form-dialog> |
| | | <!--è®°å½æµç¨å¼¹æ¡--> |
| | | <records-dialog v-if="recordsDia" ref="recordsDia" :superviseId="superviseId" |
| | | @closeRecordsDia="closeRecordsDia"></records-dialog> |
| | | <!--ä¸ç¬¦åå¤çæµç¨å¼¹æ¡--> |
| | | <processing-sheet v-if="processingDia" ref="processingDia" :superviseId="superviseId" |
| | | @closeProcessingDia="closeProcessingDia"></processing-sheet> |
| | | <!--çº æ£å¤çæµç¨å¼¹æ¡--> |
| | | <rectify-dialog v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId" |
| | | @closeProcessingDia="closeRectifyDia"></rectify-dialog> |
| | | <el-dialog :visible.sync="ratifyDialog" title="æ¹å" width="30%" @close="closeRatifyDia"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="ratifyInfo.ratifyRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="ratifyLoading" @click="handleRatify(0)">䏿¹å</el-button> |
| | | <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="downloadDialog" title="导åº" width="600px"> |
| | | <span> |
| | | <el-button plain type="primary" @click="controlDown">è®°å½å导åº</el-button> |
| | | <el-button plain type="primary" @click="processingDown">å¤çå导åº</el-button> |
| | | <el-button plain type="primary" @click="supervisoryDown">çº æ£å导åº</el-button> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="downloadDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import DetailFormDialog from './components/detailFormDialog.vue'; |
| | | import RecordsDialog from './components/recordsDialog.vue'; |
| | | import ProcessingSheet from './components/processingSheet.vue'; |
| | | import RectifyDialog from './components/rectifyDialog.vue'; |
| | | import { |
| | | pageQualitySupervise, |
| | | ratifyQualitySupervise, |
| | | exportQualitySupervise, |
| | | delQualitySupervise, |
| | | pageQualitySuperviseDetail, |
| | | exportSuperviseDetailRecord, |
| | | superviseDetailAccordingExport, |
| | | exportSuperviseDetaillCorrect, |
| | | delQualitySuperviseDetail, |
| | | } from '@/api/cnas/process/ensureResults/qualityControlPlan.js' |
| | | export default { |
| | | name: 'a7-quality-control-plan', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { RectifyDialog, ProcessingSheet, RecordsDialog, DetailFormDialog, TableCard, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | yearForm: { |
| | | superviseName: '', |
| | | }, |
| | | yearPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | yearColumnData: [ |
| | | { |
| | | label: '计ååç§°', |
| | | prop: 'superviseName', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'writeUserName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¼å¶æ¥æ', |
| | | prop: 'writeTime', |
| | | 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' |
| | | }, { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'createUser', |
| | | minWidth: '100' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '170', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.approvalPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearTableData: [], // 年表 |
| | | yearLoading: false, |
| | | yearDetailForm: { |
| | | supervisePurpose: '', |
| | | superviseProject: '' |
| | | }, |
| | | yearDetailColumnData: [ |
| | | { |
| | | label: 'çç£æ¥æ', |
| | | prop: 'superviseTime', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'çç£ç®ç', |
| | | prop: 'supervisePurpose', |
| | | minWidth: '150px', |
| | | showOverflowTooltip: true, |
| | | }, { |
| | | label: 'çæ§é¡¹ç®', |
| | | prop: 'superviseProject', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: '被çç£äººå', |
| | | prop: 'supervisee', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'çç£åå ', |
| | | prop: 'superviseReason', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '150px' |
| | | }, { |
| | | dataType: 'action', |
| | | width: '260', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.showDialog('edit', row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'è®°å½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.records(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å¤ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.processing(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.isAccording === 1 || row.isAccording === null) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: 'çº æ£', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.rectify(row) |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.isAccording === 1 || row.isAccording === null || row.isCorrect === null || row.isCorrect === 0) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDownloadDia(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlanDetail(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | yearDetailTableData: [], // å¹´æç»è¡¨ |
| | | yearDetailLoading: false, |
| | | yearDetailPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | superviseId: '', |
| | | formDia: false, |
| | | recordsDia: false, |
| | | processingDia: false, |
| | | rectifyDia: false, |
| | | ratifyDialog: false, |
| | | ratifyLoading: false, |
| | | ratifyInfo: {}, |
| | | upLoading: false, |
| | | downloadDialog: false, |
| | | download: {}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å¹´åº¦è®¡å表 |
| | | getYearPlanList() { |
| | | const entity = { |
| | | superviseName: this.yearForm.superviseName, |
| | | } |
| | | const page = this.yearPage |
| | | this.yearLoading = true |
| | | pageQualitySupervise({ ...entity, ...page }).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.yearTableData = res.data.records |
| | | this.yearPage.total = res.data.total |
| | | if (this.yearTableData.length > 0) { |
| | | this.rowClick(this.yearTableData[0]) |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | clearYear() { |
| | | this.yearForm.superviseName = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // 导å
¥æµç¨ |
| | | 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.getYearPlanList() |
| | | } |
| | | }, |
| | | // æ¹å |
| | | approvalPlan(row) { |
| | | this.ratifyDialog = true |
| | | this.ratifyInfo = row |
| | | }, |
| | | handleRatify(ratifyStatus) { |
| | | // æ¹åç¶æ , 0 ä¸éè¿, 1éè¿ |
| | | this.ratifyInfo.ratifyStatus = ratifyStatus |
| | | this.ratifyLoading = true |
| | | ratifyQualitySupervise(this.ratifyInfo).then(res => { |
| | | this.ratifyLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRatifyDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.ratifyLoading = false |
| | | }) |
| | | }, |
| | | closeRatifyDia() { |
| | | this.ratifyDialog = false |
| | | this.ratifyInfo.ratifyRemark = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportQualitySupervise({ superviseId: row.superviseId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, row.superviseName + '.docx') |
| | | }) |
| | | }, |
| | | // å é¤è¿åº¦è®¡å表 |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearLoading = true |
| | | delQualitySupervise({ superviseId: row.superviseId }).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearPlanList() |
| | | }).catch(err => { |
| | | this.yearLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // 年度计åè¡¨æ ¼ï¼ç¹å»è¡æ°æ®åå·æ°è¯¦æ
|
| | | rowClick(row) { |
| | | this.superviseId = row.superviseId |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // è·å年度æç»è¡¨ |
| | | getYearDetailPlanList() { |
| | | const entity = { |
| | | superviseId: this.superviseId, |
| | | supervisePurpose: this.yearDetailForm.supervisePurpose, |
| | | superviseProject: this.yearDetailForm.superviseProject, |
| | | } |
| | | const page = this.yearDetailPage |
| | | this.yearDetailLoading = true |
| | | pageQualitySuperviseDetail({ ...entity, ...page }).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.yearDetailTableData = res.data.records |
| | | this.yearDetailPage.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearDetailLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æç»è¡¨ |
| | | clearDetail() { |
| | | this.yearDetailForm = { |
| | | supervisePurpose: '', |
| | | superviseProject: '' |
| | | } |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼å¹´åº¦æç»æ°å¢ãä¿®æ¹å¼¹æ¡ |
| | | showDialog(type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeDia() { |
| | | this.formDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // è®°å½æµç¨ |
| | | records(row) { |
| | | this.recordsDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.recordsDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeRecordsDia() { |
| | | this.recordsDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // ä¸ç¬¦åæµç¨å¼¹æ¡ |
| | | processing(row) { |
| | | this.processingDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.processingDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeProcessingDia() { |
| | | this.processingDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // çº æ£æµç¨å¼¹æ¡ |
| | | rectify(row) { |
| | | this.rectifyDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.rectifyDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeRectifyDia() { |
| | | this.rectifyDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼å¯¼åºå¼¹æ¡ |
| | | openDownloadDia(row) { |
| | | this.downloadDialog = true |
| | | this.download = row |
| | | }, |
| | | // 导åºè®°å½ |
| | | controlDown() { |
| | | exportSuperviseDetailRecord({ superviseDetailsId: this.download.superviseDetailsId }).then(res => { |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'è®°å½å¯¼åº' + '.docx') |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // å¤çåå¯¼åº |
| | | processingDown() { |
| | | superviseDetailAccordingExport({ |
| | | superviseDetailsId: this.download.superviseDetailsId |
| | | }).then(res => { |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'ä¸ç¬¦å项导åº' + '.docx') |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // çº æ£åå¯¼åº |
| | | supervisoryDown() { |
| | | exportSuperviseDetaillCorrect({ |
| | | superviseDetailsCorrectId: this.download.superviseDetailsCorrectId |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'çç£çº æ£æªæ½' + '.docx') |
| | | }) |
| | | }, |
| | | // å é¤å¹´åº¦è¯¦æ
å表 |
| | | delYearPlanDetail(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearDetailLoading = true |
| | | delQualitySuperviseDetail({ |
| | | superviseDetailsId: row.superviseDetailsId |
| | | }).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearDetailPlanList() |
| | | }).catch(err => { |
| | | this.yearDetailLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }) |
| | | }, |
| | | // 年计åå页 |
| | | pagination({ page, limit }) { |
| | | this.yearPage.current = page; |
| | | this.yearPage.size = limit; |
| | | this.getYearPlanList(); |
| | | }, |
| | | // å¹´æç»è®¡åå页 |
| | | pagination1({ page, limit }) { |
| | | this.yearDetailPage.current = page; |
| | | this.yearDetailPage.size = limit; |
| | | this.getYearDetailPlanList(); |
| | | }, |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/qualitySupervise/importQualitySupervise' |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table-card { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .flex_column { |
| | | display: flex; |
| | | height: 80vh; |
| | | flex-direction: column; |
| | | overflow: auto; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" title="ä¸ç¬¦å项çåå¸" width="90%" @close="closeDia"> |
| | | <table border="1" cellspacing="10" class="table"> |
| | | <tr> |
| | | <td>ç« èå·</td> |
| | | <th class="div-with-line"> |
| | | <span style="float: left;">è¦ç´ </span> |
| | | <span style="float: right;">é¨é¨</span> |
| | | </th> |
| | | <th>主任</th> |
| | | <th>ææ¯è´è´£äºº</th> |
| | | <th>è´¨éè´è´£äºº</th> |
| | | <th>综å室</th> |
| | | <th>è¯éªå®¤</th> |
| | | <th>å计</th> |
| | | <th>å %</th> |
| | | </tr> |
| | | <tr v-for="(item, index) in distributionDetailList" :key="item.value"> |
| | | <td>{{ item.chapterNumber }}</td> |
| | | <th>{{ item.essentials }}</th> |
| | | <th> |
| | | <el-input-number v-model="item.director" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.technology" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.quality" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.comprehensive" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.testing" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | {{ item.total }} |
| | | </th> |
| | | <th> |
| | | {{ (item.proportion ? item.proportion : 0) + '%' }} |
| | | </th> |
| | | </tr> |
| | | <tr> |
| | | <td> </td> |
| | | <th> |
| | | å æ¯ |
| | | </th> |
| | | <th> |
| | | {{ (distributionProportion.director ? distributionProportion.director : 0) + '%' }} |
| | | </th> |
| | | <th> |
| | | {{ (distributionProportion.technology ? distributionProportion.technology : 0) + '%' }} |
| | | </th> |
| | | <th> |
| | | {{ (distributionProportion.quality ? distributionProportion.quality : 0) + '%' }} |
| | | </th> |
| | | <th> |
| | | {{ (distributionProportion.comprehensive ? distributionProportion.comprehensive : 0) + '%' }} |
| | | </th> |
| | | <th> |
| | | {{ (distributionProportion.testing ? distributionProportion.testing : 0) + '%' }} |
| | | </th> |
| | | <th> |
| | | {{ distributionProportion.total ? distributionProportion.total : 0 }} |
| | | </th> |
| | | <th> </th> |
| | | </tr> |
| | | </table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getInconsistentDistributionOne, |
| | | addInconsistentDistribution, |
| | | updateInconsistentDistribution |
| | | } from '@/api/cnas/process/nonconformingWork.js' |
| | | export default { |
| | | name: 'formDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | distributionDetailList: [], |
| | | form: { |
| | | |
| | | }, |
| | | distributionProportion: {} |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } else { |
| | | this.selectEnumByCategory() |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo(row) { |
| | | this.diaLoading = true |
| | | getInconsistentDistributionOne({ distributionId: row.distributionId }).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | this.distributionDetailList = this.form.distributionDetailList |
| | | this.distributionProportion = this.form.distributionProportion |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit() { |
| | | const date = new Date(); |
| | | const year = date.getFullYear(); |
| | | this.loading = true |
| | | const internalPlan = this.HaveJson(this.form) |
| | | internalPlan.distributionYear = year |
| | | internalPlan.distributionDetailList = this.HaveJson(this.distributionDetailList) |
| | | if (this.operationType === 'add') { |
| | | addInconsistentDistribution(internalPlan).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | updateInconsistentDistribution(internalPlan).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }, |
| | | closeDia() { |
| | | this.formDia = false |
| | | this.$emit('closeDia') |
| | | }, |
| | | selectEnumByCategory() { |
| | | this.distributionDetailList = [] |
| | | // è¦ç´ |
| | | this.getDicts("essential").then((response) => { |
| | | let arr = this.dictToValue(response.data) |
| | | arr.map((item) => { |
| | | const obj = Object.assign({ |
| | | essentials: item.label, |
| | | chapterNumber: item.value, |
| | | }) |
| | | this.distributionDetailList.push(obj) |
| | | }) |
| | | }); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | |
| | | >>>.el-dialog__body { |
| | | max-height: 68vh; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | >>>.is-required { |
| | | margin-bottom: 6px; |
| | | } |
| | | |
| | | .table { |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .table td { |
| | | width: 30px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .table th { |
| | | 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> |
| | | <div> |
| | | <!-- <div class="view-title"> |
| | | <span>ä¸ç¬¦å项çåå¸</span> |
| | | <span> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> --> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 120px">年份ï¼</span> |
| | | <el-input v-model="searchForm.distributionYear" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <div class="btn"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <div> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <limsTable :column="tableColumn" :height="'calc(100vh - 19em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" :page="page" |
| | | @pagination="pagination"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <form-dia v-if="formDia" ref="formDia" @closeDia="closeDia"></form-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import FormDia from './components/formDia.vue'; |
| | | import { |
| | | pageInconsistentDistribution, |
| | | delInconsistentDistribution, |
| | | exportInconsistentDistribution, |
| | | } from '@/api/cnas/process/nonconformingWork.js' |
| | | |
| | | export default { |
| | | name: 'a7-distribution-of-nonconforming', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { FormDia, TableCard, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | distributionYear: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: '年份', |
| | | prop: 'distributionYear', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | | prop: 'createUserName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹äºº', |
| | | prop: 'updateUserName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹æ¶é´', |
| | | prop: 'updateTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | formDia: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageInconsistentDistribution({ ...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 |
| | | delInconsistentDistribution({ distributionId: row.distributionId }).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.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(row) { |
| | | exportInconsistentDistribution({ distributionId: row.distributionId }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'ä¸ç¬¦å项çåå¸' + '.docx'); |
| | | }) |
| | | }, |
| | | closeDia() { |
| | | this.formDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.distributionYear = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页 |
| | | 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; |
| | | position: relative; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | |
| | | .table { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 16px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="ä¸ç¬¦å工使§å¶å" |
| | | width="80%" @close="closeProcessingDia"> |
| | | <div style="height: 660px; overflow-y: auto"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="first-title" rowspan="8"> |
| | | <p>ä¸ç¬¦å工使
åµè®°å½</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>åçé¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <span class="td-info1"> {{ form.occurrenceDepartment }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>é¨é¨è´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <span class="td-info1"> {{ form.headDepartment }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>ä¸ç¬¦åå·¥ä½åç°éå¾ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-radio-group v-model="form.findWay" v-removeAriaHidden disabled> |
| | | <el-radio :label="0">管çè¯å®¡</el-radio> |
| | | <el-radio :label="1">å
é¨å®¡æ ¸</el-radio> |
| | | <el-radio :label="2">æ£æµè¿ç¨æ§å¶</el-radio> |
| | | <el-radio :label="3">å
é¨è´¨éæ§å¶</el-radio> |
| | | <el-radio :label="4">å
é¨çç£</el-radio> |
| | | <el-radio :label="5">å¤é¨è¯å®¡</el-radio> |
| | | <el-radio :label="6">å¤é¨æè¯</el-radio> |
| | | <el-radio :label="7">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>ä¸ç¬¦åå·¥ä½ç详ç»è®°å½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.recordDetail }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>ä¸ç¬¦åå·¥ä½ç以ååæ¡æ¬¾å·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.recordAccording }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>被çç£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <span class="td-info1"> {{ form.supervisedUserName }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>被çç£æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <span class="td-info1"> {{ form.supervisedTime }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>åç°é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.foundDepartment }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.recordTime }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>è®°å½äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.recordUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>è®°å½æ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.recordTime }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="first-title" rowspan="3"> |
| | | <p>å¤çæªæ½</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¶é¤ä¸ç¬¦å工使éåçæªæ½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.eliminateMeasure }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>è´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.actionsUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.actionsTime }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="first-title" rowspan="4"> |
| | | <p>çº æ£æªæ½</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¯å¦éè¦éåçº æ£æªæ½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-radio-group v-model="form.isCorrect" v-removeAriaHidden disabled> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>çº æ£æªæ½å¤çåè·è¸ªï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <span class="td-info1"> {{ form.correctContent }}</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.correctTime }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="first-title" rowspan="4"> |
| | | <p>æ¯å¦éç¥å®¢æ·å坿¢å¤å·¥ä½</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>éç¥å®¢æ·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-radio-group v-model="form.notifyCustomer" v-removeAriaHidden disabled> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¢å¤å·¥ä½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-radio-group v-model="form.backToWork" v-removeAriaHidden disabled> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>è´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.qualityManagerUserName }} |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>å¤çæ¶é´ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | {{ form.qualityManagerTime }} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getSuperviseDetailAccording |
| | | } from '@/api/cnas/process/nonconformingWork.js' |
| | | export default { |
| | | name: 'qualityInfo', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | occurrenceDepartment: '', |
| | | headDepartment: '', |
| | | findWay: '', |
| | | recordDetail: '', |
| | | recordAccording: '', |
| | | supervisedUserName: '', |
| | | supervisedTime: '', |
| | | actionsUserName: '', |
| | | eliminateMeasure: '', |
| | | correctUserName: '', |
| | | isCorrect: '', |
| | | correctContent: '', |
| | | recordUserName: '', |
| | | recordTime: '', |
| | | foundDepartment: '', |
| | | actionsTime: '', |
| | | correctTime: '', |
| | | notifyCustomer: '', |
| | | backToWork: '', |
| | | qualityManagerUserName: '', |
| | | qualityManagerTime: '', |
| | | }, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | getSuperviseDetailAccording({ superviseDetailsId: row.superviseDetailsId }).then(res => { |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeProcessingDia() { |
| | | this.formDia = false |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 5vh auto 50px !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .first-title { |
| | | display: table-cell; |
| | | width: 100px; |
| | | /* 设置ä¸ä¸ªåºå®å®½åº¦ */ |
| | | height: 200px; |
| | | /* 设置ä¸ä¸ªåºå®é«åº¦ */ |
| | | text-align: center; |
| | | /* æ°´å¹³å±
ä¸ */ |
| | | vertical-align: middle; |
| | | /* åç´å±
ä¸ */ |
| | | writing-mode: vertical-rl; |
| | | /* æåç«ç´æå */ |
| | | padding: 10px 0; |
| | | } |
| | | |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | |
| | | .td-info { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .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 class="search-group"> |
| | | <span style="width: 120px">åçé¨é¨ï¼</span> |
| | | <el-input v-model="searchForm.occurrenceDepartment" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" 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 - 19em)'" :table-data="tableData" |
| | | :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" :page="page" |
| | | @pagination="pagination"> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <quality-info v-if="qualityInfo" ref="qualityInfo"></quality-info> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import QualityInfo from './components/qualityInfo.vue'; |
| | | import { |
| | | pageSuperviseDetailAccording, |
| | | superviseDetailAccordingExport |
| | | } from '@/api/cnas/process/nonconformingWork.js' |
| | | |
| | | export default { |
| | | name: 'a7-nonconforming-item', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { QualityInfo, TableCard, limsTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | occurrenceDepartment: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'åçé¨é¨', |
| | | prop: 'occurrenceDepartment', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'é¨é¨è´è´£äºº', |
| | | prop: 'headDepartment', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åç°éå¾', |
| | | prop: 'findWay', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '详ç»è®°å½', |
| | | prop: 'recordDetail', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '便®åæ¡æ¬¾å·', |
| | | prop: 'recordAccording', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åç°é¨é¨', |
| | | prop: 'foundDepartment', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '被çç£äºº', |
| | | prop: 'supervisedUserName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '60', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewInfo(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDownloadDia(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | qualityInfo: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | const entity = { |
| | | occurrenceDepartment: this.searchForm.occurrenceDepartment, |
| | | } |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | pageSuperviseDetailAccording({ ...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.occurrenceDepartment = ''; |
| | | this.searchList() |
| | | }, |
| | | viewInfo(row) { |
| | | this.qualityInfo = true |
| | | this.$nextTick(() => { |
| | | this.$refs.qualityInfo.openDia(row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | openDownloadDia(row) { |
| | | superviseDetailAccordingExport({ superviseDetailsId: row.superviseDetailsId }).then(res => { |
| | | const blob = new Blob([res], { type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'ä¸ç¬¦å项导åº' + '.docx'); |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // å页 |
| | | 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 class="report-results"> |
| | | <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.insReportCode" |
| | | @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="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower">导åº</el-button> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'" |
| | | :page="page" @pagination="pagination" :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange"></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">æ£éªæ¥åç¼å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.insReportCode"></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-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-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.send"></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.method"></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-date-picker v-model="addInfo.sendTime" 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"> |
| | | <div class="search_label">åé人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.sendUser" placeholder="è¯·éæ©" 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="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¾æ¶äººï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.signatory" placeholder="è¯·éæ©" size="small" style="width: 100%;" multiple> |
| | | <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-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 { |
| | | exportProcessReport, |
| | | doProcessReport, |
| | | addProcessReport, |
| | | pageProcessReport, |
| | | delProcessReport |
| | | } from '@/api/cnas/process/reportResults.js' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/system/user.js"; |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | outLoading: false, |
| | | addPower: true, |
| | | outPower: true, |
| | | personList: [], |
| | | title: 'æ°å¢', |
| | | addDialogVisible: false, |
| | | addInfo: { |
| | | signatory: [] |
| | | }, |
| | | addLoading: false, |
| | | mutilSelect: [], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æ£éªæ¥åç¼å·", prop: "insReportCode" }, |
| | | { label: "页æ°", prop: "pages", width: "120px" }, |
| | | { |
| | | label: "åé份æ°", |
| | | prop: "number", |
| | | }, |
| | | { label: "åå¾ä½å¤", prop: "send" }, |
| | | { label: "åéæ¹å¼", prop: "method" }, |
| | | { label: "å鿥æ", prop: "sendTime" }, |
| | | { label: "åé人", prop: "sendUserName" }, |
| | | { label: "ç¾æ¶äºº", prop: "signatoryName" }, |
| | | { label: "夿³¨", prop: "remark" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleWork(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getList() |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | 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 == 'doProcessReport') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addProcessReport') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delProcessReport') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportProcessReport') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.outPower = out |
| | | this.addPower = add |
| | | }, |
| | | handleDown() { |
| | | if (this.mutilSelect.length == 0) { |
| | | this.$message.warning('è¯·éæ©è¦å¯¼åºçæ°æ®') |
| | | return |
| | | } |
| | | this.outLoading = true |
| | | exportProcessReport({ ids: this.mutilSelect.map(m => m.id) }).then(res => { |
| | | this.outLoading = false |
| | | if (res.code === 201) return |
| | | const url = this.javaApi + '/word/' + res.data; |
| | | this.$download.saveAs(url, "æ¥åç»æ"); |
| | | }) |
| | | }, |
| | | openAdd() { |
| | | this.title = 'æ°å¢' |
| | | this.addInfo = { |
| | | signatory: [] |
| | | } |
| | | this.addDialogVisible = true; |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageProcessReport({ ...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(); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.mutilSelect = val |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | handleAdd() { |
| | | this.addLoading = true |
| | | delete this.addInfo.createTime |
| | | delete this.addInfo.createUser |
| | | delete this.addInfo.updateTime |
| | | delete this.addInfo.signatoryUrl |
| | | delete this.addInfo.updateUserer |
| | | delete this.addInfo.sendUserName |
| | | let addInfo = this.HaveJson(this.addInfo) |
| | | addInfo.signatory = addInfo.signatory.join(',') |
| | | if (this.title == 'æ°å¢') { |
| | | addProcessReport(addInfo).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } else { |
| | | doProcessReport(addInfo).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } |
| | | }, |
| | | handleWork(row) { |
| | | this.title = 'ä¿®æ¹' |
| | | this.addInfo = row |
| | | console.log(this.addInfo) |
| | | this.addInfo.signatory = this.addInfo.signatory ? this.addInfo.signatory.split(',').map(m => Number(m)) : [] |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleChangeTask(list) { |
| | | this.mutilSelect = list |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProcessReport({ 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); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | } |
| | | |
| | | .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; |
| | | /* é»è®¤æ¢è¡ */ |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | top: 16px; |
| | | right: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="sample-disposal"> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="queryParams.totaldealId = ''"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;" :key="1"> |
| | | <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;">æ°å¢</el-button> |
| | | <div class="table" style="height: calc(100% - 200px)" v-if="activeName == 'å¡«å'"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;" :key="2"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="queryParams0.month" type="month" placeholder="éæ©æ" format="yyyy-MM" |
| | | value-format="yyyy-MM" 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="tableData0" :column="column0" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 300px)'" :page="page0" @pagination="pagination0"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- æ°å¢æ ·å --> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px"> |
| | | <el-row> |
| | | <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.sampleName"></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.sampleCode"></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.sampleSupplier" size="small"> |
| | | <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList" |
| | | :key="item.id"></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.num"></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.dealMethod"></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-date-picker v-model="addInfo.dealTime" 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="submitAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 详æ
/ä¸è½½/å®¡æ ¸/æ¹å --> |
| | | <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> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { selectCustomPageList } from "@/api/system/customer"; |
| | | import { |
| | | doProcessDeal, |
| | | addProcessDeal, |
| | | submitProcessTotaldeal, |
| | | pageProcessDeal, |
| | | checkProcessTotaldeal, |
| | | ratifyProcessTotaldeal, |
| | | delProcessDeal, |
| | | pageProcessTotaldeal, |
| | | } from "@/api/cnas/process/sampleDisposal"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | filePreview, |
| | | }, |
| | | name: "SampleDisposal", |
| | | data() { |
| | | return { |
| | | activeName: 'å¡«å', |
| | | title: 'æ°å¢', |
| | | addDialogVisible: false, |
| | | addLoading: false, |
| | | outLoading: false, |
| | | editDialogVisible: false, |
| | | lookDialogVisible: false, |
| | | title0: 'æ¥ç', |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | // åå²å表 |
| | | addInfo: {},//æ°å¢æ ·å |
| | | customPageList: [], |
| | | currentInfo: { |
| | | arr: [] |
| | | },//æ¥çç详æ
|
| | | outPower: false, |
| | | addPower: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æ ·ååç§°", prop: "sampleName" }, |
| | | { label: "æ ·åç¼å·", prop: "sampleCode" }, |
| | | { label: "便 ·åä½", prop: "sampleSupplier" }, |
| | | { label: "æ°é", prop: "num" }, |
| | | { label: "å¤çæ¹å¼", prop: "dealMethod" }, |
| | | { label: "æ¶é´", prop: "dealTime" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleAdd0(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | queryParams0: {}, |
| | | tableData0: [], |
| | | column0: [ |
| | | { label: "æä»½", prop: "month" }, |
| | | { label: "æ»æ°é", prop: "totalNum" }, |
| | | { label: "æäº¤äºº", prop: "submitUserName" }, |
| | | { label: "å®¡æ ¸äºº", prop: "examineUserName" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | 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.submitState && row.submitState != 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.examineState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleApproval(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getCustomPageList() |
| | | this.getList() |
| | | this.getList0() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let out = false |
| | | let submitProcessTotaldeal = false |
| | | let checkProcessTotaldeal = false |
| | | let ratifyProcessTotaldeal = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addProcessDeal') { |
| | | add = true |
| | | } |
| | | // if (power[i].menuMethod == 'exportProcessEvaluate') { |
| | | // out = true |
| | | // } |
| | | if (power[i].menuMethod == 'submitProcessTotaldeal') { |
| | | submitProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'checkProcessTotaldeal') { |
| | | checkProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyProcessTotaldeal') { |
| | | ratifyProcessTotaldeal = true |
| | | } |
| | | } |
| | | if (!ratifyProcessTotaldeal) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!checkProcessTotaldeal) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!submitProcessTotaldeal) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData0.do.splice(1, 1) |
| | | this.componentData0.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // è·åéæ ·åä½å表 |
| | | getCustomPageList() { |
| | | selectCustomPageList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.customPageList = res.data.records |
| | | }).catch(err => { }); |
| | | }, |
| | | handleDown() { }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageProcessDeal({ ...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.queryParams0 = {}; |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | refreshTable() { |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | getList0() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams0, ...this.page }; |
| | | delete param.total; |
| | | pageProcessTotaldeal({ ...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(); |
| | | }, |
| | | // å¡«å |
| | | // handleAdd(row){ |
| | | // this.componentData0.entity.totaldealId = row.id |
| | | // this.editDialogVisible = true |
| | | // }, |
| | | // æå¼æ°å¢çé¢ |
| | | handleAdd0(row) { |
| | | if (row) { |
| | | this.addInfo = this.HaveJson(row) |
| | | this.title = 'ç¼è¾' |
| | | } else { |
| | | this.title = 'æ°å¢' |
| | | this.addInfo = {} |
| | | } |
| | | this.addDialogVisible = true |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | submitAdd() { |
| | | if (this.addInfo.id) { |
| | | // ç¼è¾ |
| | | this.addLoading = true |
| | | doProcessDeal({ |
| | | totaldealId: this.queryParams.totaldealId, |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ç¼è¾æå!' |
| | | }); |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }).catch(err => { }); |
| | | } else { |
| | | // æ°å¢ |
| | | this.addLoading = true |
| | | addProcessDeal({ |
| | | totaldealId: this.queryParams.totaldealId, |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æå!' |
| | | }); |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }).catch(err => { }); |
| | | } |
| | | }, |
| | | // æäº¤ |
| | | handleSubmit(row) { |
| | | this.$confirm('æ¯å¦æäº¤ ' + row.month + ' æä»½çæ°æ®', 'æäº¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | submitProcessTotaldeal({ |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | | // æ¥ç |
| | | handleLook(row) { |
| | | // console.log(row) |
| | | // this.title0 = 'æ¥ç' |
| | | // this.commonFun(row) |
| | | this.activeName = 'å¡«å' |
| | | this.queryParams.totaldealId = row.id |
| | | this.$nextTick(() => { |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }) |
| | | }, |
| | | commonFun(row, callbanck) { |
| | | this.currentInfo = row |
| | | this.queryParams.totaldealId = row.id |
| | | pageProcessDeal({ |
| | | current: -1, |
| | | size: -1, ...this.queryParams |
| | | }).then(res => { |
| | | this.lookDialogVisible = true |
| | | this.currentInfo.arr = res.data.records |
| | | if (callbanck) { |
| | | callbanck() |
| | | } |
| | | }).catch(err => { }); |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | | this.title0 = 'å®¡æ ¸' |
| | | this.commonFun(row) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row) { |
| | | this.title0 = 'æ¹å' |
| | | this.commonFun(row) |
| | | }, |
| | | // æäº¤å®¡æ ¸/æ¹å |
| | | submitCheck(state) { |
| | | if (state == 'éè¿') { |
| | | this.checkLoading = true |
| | | } else { |
| | | this.noCheckLoading = true |
| | | } |
| | | if (this.title0 == 'å®¡æ ¸') { |
| | | checkProcessTotaldeal({ |
| | | id: this.currentInfo.id, |
| | | state: 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 => { }); |
| | | } else if (this.title0 == 'æ¹å') { |
| | | ratifyProcessTotaldeal({ |
| | | id: this.currentInfo.id, |
| | | state: 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 => { }); |
| | | } |
| | | }, |
| | | // 导åºè¯¦æ
|
| | | handleDown0(row) { |
| | | // å端ä¸è½½ |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, row.month + ' æ ·åå¤çç³è¯·è¡¨'); |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProcessDeal({ 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 - 140px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .downPdf { |
| | | opacity: 0 !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | } |
| | | |
| | | .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; |
| | | /* é»è®¤æ¢è¡ */ |
| | | } |
| | | |
| | | .user-info { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-evenly; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .user-info .el-button { |
| | | margin: 0; |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: 100%; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="sample-registration"> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="queryParams.totalSampleId = ''"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;" :key="1"> |
| | | <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" |
| | | v-if="addPower">æ°å¢</el-button> |
| | | <div class="table" style="height: calc(100% - 200px)" v-if="activeName == 'å¡«å'"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;" :key="2"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="queryParams0.month" type="month" placeholder="éæ©æ" format="yyyy-MM" |
| | | value-format="yyyy-MM" 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="tableData0" :column="column0" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" :page="page0" @pagination="pagination0"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- æ°å¢æ ·å --> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px"> |
| | | <el-row> |
| | | <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.sampleName"></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.sampleCode"></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.sampleSupplier" size="small"> |
| | | <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList" |
| | | :key="item.id"></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.num"></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-date-picker v-model="addInfo.leaveDate" 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"> |
| | | <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-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.sampleState"></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-date-picker v-model="addInfo.dealTime" 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="submitAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 详æ
/ä¸è½½/å®¡æ ¸/æ¹å --> |
| | | <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> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | import { selectCustomPageList } from "@/api/system/customer"; |
| | | import { |
| | | doProcessSample, |
| | | addProcessSample, |
| | | submitProcessTotalSample, |
| | | pageProcessSample, |
| | | checkProcessTotalSample, |
| | | ratifyProcessTotalSample, |
| | | delProcessSample, |
| | | pageProcessTotalSample, |
| | | } from "@/api/cnas/process/sampleDisposal"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | filePreview, |
| | | }, |
| | | name: "SampleDisposal", |
| | | data() { |
| | | return { |
| | | activeName: 'å¡«å', |
| | | title: 'æ°å¢', |
| | | addDialogVisible: false, |
| | | addLoading: false, |
| | | outLoading: false, |
| | | editDialogVisible: false, |
| | | lookDialogVisible: false, |
| | | title0: 'æ¥ç', |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | addInfo: {},//æ°å¢æ ·å |
| | | customPageList: [], |
| | | currentInfo: { |
| | | arr: [] |
| | | },//æ¥çç详æ
|
| | | outPower: true, |
| | | addPower: true, |
| | | // æ ·åå表 |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æ¶æ ·æ¥æ", prop: "receiveDate" }, |
| | | { label: "æ ·åç¼å·", prop: "sampleCode" }, |
| | | { |
| | | label: "æ ·ååç§°", |
| | | prop: "sampleName", |
| | | }, |
| | | { label: "æ ·åæ°é", prop: "num" }, |
| | | { label: "æ¥æ ·åä½", prop: "sampleSupplier" }, |
| | | { label: "çæ ·æ¥æ", prop: "leaveDate" }, |
| | | { label: "æ ·åç¶æ", prop: "sampleState" }, |
| | | { label: "éæ ·ç¾æ¶/å¤çæ¥æ", prop: "dealTime" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleAdd0(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | // åå²å表 |
| | | queryParams0: {}, |
| | | tableData0: [], |
| | | column0: [ |
| | | { label: "æä»½", prop: "month" }, |
| | | { label: "æ»æ°é", prop: "totalNum" }, |
| | | { |
| | | label: "æäº¤äºº", |
| | | prop: "submitUserName", |
| | | }, |
| | | { label: "å®¡æ ¸äºº", prop: "examineUserName" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | 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.submitState && row.submitState != 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.examineState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleApproval(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | }; |
| | | }, |
| | | watch: { |
| | | activeName(val) { |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getCustomPageList() |
| | | this.getList0() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let out = false |
| | | let submitProcessTotaldeal = false |
| | | let checkProcessTotaldeal = false |
| | | let ratifyProcessTotaldeal = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addProcessDeal') { |
| | | add = true |
| | | } |
| | | // if (power[i].menuMethod == 'exportProcessEvaluate') { |
| | | // out = true |
| | | // } |
| | | if (power[i].menuMethod == 'submitProcessTotaldeal') { |
| | | submitProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'checkProcessTotaldeal') { |
| | | checkProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyProcessTotaldeal') { |
| | | ratifyProcessTotaldeal = true |
| | | } |
| | | } |
| | | if (!ratifyProcessTotaldeal) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!checkProcessTotaldeal) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!submitProcessTotaldeal) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData0.do.splice(1, 1) |
| | | this.componentData0.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // è·åéæ ·åä½å表 |
| | | getCustomPageList() { |
| | | selectCustomPageList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.customPageList = res.data.records |
| | | }).catch(err => { }); |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageProcessSample({ ...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; |
| | | pageProcessTotalSample({ ...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(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams0 = {}; |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | refreshTable() { |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | // æå¼æ°å¢çé¢ |
| | | handleAdd0(row) { |
| | | if (row) { |
| | | this.addInfo = this.HaveJson(row) |
| | | this.title = 'ç¼è¾' |
| | | } else { |
| | | this.title = 'æ°å¢' |
| | | this.addInfo = {} |
| | | } |
| | | this.addDialogVisible = true |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | submitAdd() { |
| | | if (this.addInfo.id) { |
| | | // ç¼è¾ |
| | | this.addLoading = true |
| | | doProcessSample({ |
| | | totalSampleId: this.queryParams.totalSampleId, |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ç¼è¾æå!' |
| | | }); |
| | | this.page.current = 1; |
| | | this.getList() |
| | | }).catch(err => { }); |
| | | } else { |
| | | // æ°å¢ |
| | | this.addLoading = true |
| | | addProcessSample({ |
| | | totalSampleId: this.queryParams.totalSampleId, |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æå!' |
| | | }); |
| | | this.page.current = 1; |
| | | this.getList() |
| | | }).catch(err => { }); |
| | | } |
| | | }, |
| | | // æäº¤ |
| | | handleSubmit(row) { |
| | | this.$confirm('æ¯å¦æäº¤ ' + row.month + ' æä»½çæ°æ®', 'æäº¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | submitProcessTotalSample({ id: row.id }).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | | // æ¥ç |
| | | handleLook(row) { |
| | | this.activeName = 'å¡«å' |
| | | this.queryParams.totalSampleId = row.id |
| | | this.page.current = 1; |
| | | this.getList() |
| | | }, |
| | | commonFun(row, callbanck) { |
| | | this.currentInfo = row |
| | | this.queryParams.totalSampleId = row.id |
| | | pageProcessSample({ |
| | | current: -1, |
| | | size: -1, |
| | | totalSampleId: row.id |
| | | }).then(res => { |
| | | this.currentInfo.arr = res.data.body.records |
| | | this.lookDialogVisible = true |
| | | if (callbanck) { |
| | | callbanck() |
| | | } |
| | | }).catch(err => { }); |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | | this.title0 = 'å®¡æ ¸' |
| | | this.commonFun(row) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row) { |
| | | this.title0 = 'æ¹å' |
| | | this.commonFun(row) |
| | | }, |
| | | // æäº¤å®¡æ ¸/æ¹å |
| | | submitCheck(state) { |
| | | if (state == 'éè¿') { |
| | | this.checkLoading = true |
| | | } else { |
| | | this.noCheckLoading = true |
| | | } |
| | | if (this.title0 == 'å®¡æ ¸') { |
| | | checkProcessTotalSample({ |
| | | id: this.currentInfo.id, |
| | | state: 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 => { }); |
| | | } else if (this.title0 == 'æ¹å') { |
| | | ratifyProcessTotalSample({ |
| | | id: this.currentInfo.id, |
| | | state: 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 => { }); |
| | | } |
| | | }, |
| | | // 导åºè¯¦æ
|
| | | handleDown0(row) { |
| | | // å端ä¸è½½ |
| | | this.$download.saveAs(url, row.month + ' æ ·åæ¥æ¶è¡¨') |
| | | }, |
| | | // å é¤ |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProcessSample({ id: row.id }).then((res) => { |
| | | console.log('res', res) |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.page.current = 1; |
| | | this.getList() |
| | | } |
| | | }); |
| | | }) |
| | | .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 - 140px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .downPdf { |
| | | opacity: 0 !important; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .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; |
| | | /* é»è®¤æ¢è¡ */ |
| | | } |
| | | |
| | | .user-info { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-evenly; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .user-info .el-button { |
| | | margin: 0; |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: 100%; |
| | | padding: 0; |
| | | padding-top: 10px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="uncertainty-evaluation"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥ååç§°ï¼</div> |
| | | <div class="search_input"><el-input v-model="queryParams.reportName" 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="btn"> |
| | | <el-button :loading="outLoading" size="small" style="margin-right: 16px;margin-top: 3px;" type="primary" |
| | | @click="handleDown0">导åº</el-button> |
| | | <el-upload ref='upload' :action="action" :headers="uploadHeader" :on-change="beforeUpload" :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"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :visible.sync="addDialogVisible" title="è¯ä»·" width="400px"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">è¯ä»·ï¼</div> |
| | | <div class="search_input"><el-input v-model="addInfo.note" clearable placeholder="请è¾å
¥" |
| | | size="small"></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-date-picker v-model="addInfo.evaluateTime" 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-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.reportUrl" |
| | | style="max-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 { |
| | | exportProcessEvaluate, |
| | | doProcessEvaluate, |
| | | delProcessEvaluate, |
| | | pageProcessEvaluate, |
| | | } from '@/api/cnas/process/uncertainty.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | filePreview |
| | | }, |
| | | data() { |
| | | return { |
| | | addPower: false, |
| | | outPower: false, |
| | | outLoading: false, |
| | | upLoading: false, |
| | | addDialogVisible: false, |
| | | addInfo: {}, |
| | | addLoading: false, |
| | | currentInfo: {}, |
| | | lookDialogVisible: false, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "æ¥ååç§°", prop: "reportName" }, |
| | | { label: "è¯ä»·äºº", prop: "evaluateUserName" }, |
| | | { label: "è¯ä»·æ¥æ", prop: "evaluateTime" }, |
| | | { label: "夿³¨", prop: "note" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "è¯ä»·", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleTell(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¥çéä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | action() { |
| | | return this.javaApi + '/processEvaluate/addProcessEvaluate' |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getList() |
| | | }, |
| | | 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 == 'doProcessEvaluate') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addProcessEvaluate') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delProcessEvaluate') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportProcessEvaluate') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.outPower = out |
| | | this.addPower = add |
| | | }, |
| | | handleDown0() { |
| | | this.outLoading = true |
| | | exportProcessEvaluate(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code === 201) return |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æµéä¸ç¡®å®åº¦çè¯å®.xlsx'); |
| | | }) |
| | | }, |
| | | handleDown(row) { |
| | | let url = this.javaApi + '/word/' + row.reportUrl |
| | | this.$download.saveAs(url, row.reportName); |
| | | }, |
| | | 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() |
| | | } |
| | | }, |
| | | handleTell(row) { |
| | | this.addInfo = row; |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleAdd() { |
| | | this.addLoading = true; |
| | | doProcessEvaluate({ |
| | | id: this.addInfo.id, |
| | | note: this.addInfo.note, |
| | | evaluateTime: this.addInfo.evaluateTime, |
| | | evaluateUser: this.userId |
| | | }).then((res) => { |
| | | this.addLoading = false; |
| | | if (res.code == 201) { |
| | | this.$message.error('è¯ä»·å¤±è´¥'); |
| | | return; |
| | | } |
| | | this.$message.success('è¯ä»·æå'); |
| | | this.addDialogVisible = false; |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageProcessEvaluate({ ...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(); |
| | | }, |
| | | handleLook(row) { |
| | | this.currentInfo = row; |
| | | this.lookDialogVisible = true; |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delProcessEvaluate({ 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: 80px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 80px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | top: 16px; |
| | | right: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | </style> |
| | |
| | | handleUpdate(row) { |
| | | this.title = 'æä»¶åæ´ç³è¯·' |
| | | this.addInfo = this.HaveJson(row) |
| | | this.file = null |
| | | this.addDialogVisible = true |
| | | }, |
| | | // æ¥çéä»¶ |
| | |
| | | </div> |
| | | <div class="btns" style="padding-left: 30px;"> |
| | | <el-button v-if="addPower" size="small" type="primary" |
| | | @click="addDialogVisible = true, addInfo = {}, radio = 'åæ¾'">æ·»å åæ¾è®°å½</el-button> |
| | | @click="addDialogVisible = true, addInfo = {}, radio = 'åæ¾', file = null">æ·»å åæ¾è®°å½</el-button> |
| | | <el-button v-if="outPower" :loading="outLoading" size="small" type="primary" @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | <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;"> |
| | | accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;" ref="upload"> |
| | | <el-button size="small" type="primary">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload></div> |
| | | </div> |
| | |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | disabled: (row, index) => { |
| | | return row.documentState == 'éè¿' |
| | | } |
| | | }, |
| | |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | disabled: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabFun: (row, index) => { |
| | | disabled: (row, index) => { |
| | | return row.receiveUser != this.userId || row.documentState == 'éè¿' |
| | | } |
| | | }, |
| | |
| | | this.addInfo = this.HaveJson(row) |
| | | this.radio = 'åæ¶' |
| | | this.addDialogVisible = true |
| | | this.file = null |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row) { |
| | |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="small" type="primary" |
| | | @click="addDialogVisible = true, addInfo = {}, currentFile = {}, title = 'æä»¶åæ´ç³è¯·'">æä»¶åæ´ç³è¯·</el-button> |
| | | @click="addDialogVisible = true, addInfo = {}, currentFile = {}, title = 'æä»¶åæ´ç³è¯·', file = null">æä»¶åæ´ç³è¯·</el-button> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | this.addInfo = this.HaveJson(row) |
| | | let alterBeforeCode = this.addInfo.alterBeforeCode |
| | | this.getCurrentFile(alterBeforeCode) |
| | | this.file = null |
| | | this.addDialogVisible = true |
| | | }, |
| | | // é¢è§ |
| | |
| | | this.addInfo = this.HaveJson(row) |
| | | let alterBeforeCode = this.addInfo.alterBeforeCode |
| | | this.getCurrentFile(alterBeforeCode) |
| | | this.file = null |
| | | this.addDialogVisible = true |
| | | checkManageDocumentAlterPdf({ id: row.id }).then(res => { |
| | | // |
| | |
| | | <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> |
| | | <component :is="item.component" :key="item.component" v-if="activeName == item.component"></component> |
| | | <!-- <FileList v-if="item.component == 'FileList'" /> |
| | | <ControlledFileApplication v-if="item.component == 'ControlledFileApplication'" /> |
| | | <DistributionCollectionRecord v-if="item.component == 'DistributionCollectionRecord'" /> |
| | | <FileChangeRequest v-if="item.component == 'FileChangeRequest'" /> |
| | | <FileObsoletionRequest v-if="item.component == 'FileObsoletionRequest'" /> --> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | |
| | | exportOutManageRecordCheck(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导åºå¤±è´¥') |
| | | let url = this.javaApi + '/word/' + res.message |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, 'æä»¶å®¡æ¹è®°å½') |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | // å®¡æ ¸ |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (handleApproval) => { |
| | | this.handleSubmit(row); |
| | | clickFun: (row) => { |
| | | this.handleApproval(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.submitUserName || !!row.ratifyUserName |
| | |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | this.lookDialogVisible = false |
| | | }).catch(err => { }); |
| | | }, |
| | |
| | | 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: {}, |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | } else { |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | |
| | | method: '修订', |
| | | } |
| | | this.title = 'æ°å¢' |
| | | this.file = null |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | |
| | | handleEdit(row) { |
| | | this.addInfo = row |
| | | this.title = 'ä¿®æ¹' |
| | | this.file = null |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å®¡æ¹ |
| | |
| | | this.addInfo = row |
| | | this.title = 'ç³è¯·é¨é¨ä¸»ç®¡æè§' |
| | | this.addDialogVisible = true; |
| | | this.file = null |
| | | }, |
| | | handlework1(row) { |
| | | this.addInfo = row |
| | | this.title = 'åå®å¶é¨é¨æè§' |
| | | this.addDialogVisible = true; |
| | | this.file = null |
| | | }, |
| | | handlework2(row) { |
| | | this.addInfo = row |
| | | this.title = 'åå®¡æ ¸é¨é¨æè§' |
| | | this.addDialogVisible = true; |
| | | this.file = null |
| | | }, |
| | | handleLook(row) { |
| | | this.title0 = 'æ¥ç' |
| | |
| | | }, |
| | | submit(type, row) { |
| | | let obj = row |
| | | obj[type] = this.nickNamee; |
| | | obj[type] = this.nickName; |
| | | modifyReviewReport(obj).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |