From b64d6db597d332c699f84e4928f6d3e5551851f1 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期二, 04 三月 2025 16:43:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/views/structural/premises/index.vue | 7 src/views/CNAS/process/method/methodVerification/index.vue | 198 + src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue | 103 src/views/business/unpass/components/unPassDialog.vue | 21 src/views/business/productOrder/index.vue | 581 +- src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue | 75 src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue | 1 src/views/monitor/logininfor/index.vue | 90 src/views/monitor/operlog/index.vue | 68 src/views/business/inspectionTask/index.vue | 34 src/api/index/report.js | 26 src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue | 137 src/views/business/materialOrder/copperOrder.vue | 21 src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue | 1 src/views/structural/capabilityAndLaboratory/capability/index.vue | 55 src/views/business/rawMaterialInspection/index.vue | 275 src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue | 58 src/assets/images/bg1.png | 0 src/views/business/productOrder/components/add.vue | 520 +- src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue | 284 src/views/business/inspectionTask/inspection.vue | 21 src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue | 1 src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue | 38 src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue | 70 src/views/CNAS/process/demand/index.vue | 248 src/api/system/customer.js | 2 src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue | 1 src/views/system/role/index.vue | 2 src/views/standard/standardLibrary/index.vue | 50 src/views/CNAS/resourceDemand/device/component/state.vue | 101 src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue | 68 src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue | 4 src/views/statisticalCharts/qualificationRateStatistics/index.vue | 448 ++ src/api/cnas/process/method/methodVerification.js | 66 src/views/CNAS/process/method/methodVerification/component/formDIa.vue | 457 ++ src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue | 1 src/views/CNAS/externalService/supplierManage/index.vue | 23 src/views/CNAS/systemManagement/customerSatisfaction/index.vue | 8 src/views/business/materialOrder/customsInspection.vue | 13 src/views/CNAS/resourceDemand/device/component/fault.vue | 16 src/assets/images/bg2.png | 0 src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue | 56 src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue | 1 src/api/system/user.js | 168 src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue | 1 src/views/system/dept/index.vue | 106 src/views/CNAS/resourceDemand/device/component/check.vue | 15 src/views/business/reportPreparation/index.vue | 256 src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue | 1 src/views/business/materialOrder/index.vue | 43 src/views/CNAS/resourceDemand/device/component/borrow.vue | 261 src/views/CNAS/resourceDemand/device/component/operationInstruction.vue | 80 src/views/CNAS/process/method/standardMethodsChange/index.vue | 23 src/views/statisticalCharts/itemInspectionAnalysis/index.vue | 535 +++ src/plugins/download.js | 131 src/components/echarts/echart.vue | 119 src/components/Preview/filePreview.vue | 2 src/views/CNAS/systemManagement/correctiveAction/index.vue | 1 src/views/index.vue | 523 +- src/api/cnas/resourceDemand/device.js | 392 ++ src/views/CNAS/resourceDemand/device/index.vue | 18 src/views/CNAS/resourceDemand/device/component/inspectionForm.vue | 46 src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue | 1 src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue | 12 src/views/CNAS/resourceDemand/standardMaterial/index.vue | 35 src/views/CNAS/systemManagement/documentControl/components/FileList.vue | 2 src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue | 101 src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue | 164 src/views/CNAS/resourceDemand/device/component/accidentForm.vue | 23 src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue | 1 src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue | 1 src/views/business/productSamplingInfo/index.vue | 185 src/components/Table/lims-table.vue | 17 src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue | 155 src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue | 45 src/router/index.js | 2 src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue | 1 src/views/performance/manHour/workTimeManagement.vue | 388 - src/main.js | 2 src/views/business/finishedProductSampling/index.vue | 44 src/views/CNAS/resourceDemand/device/component/failureForm.vue | 28 src/components/echarts/DataComparison.vue | 507 +++ src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue | 1 src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue | 56 src/views/system/dict/index.vue | 18 src/views/business/productOrder/components/auxiliaryWireCore.vue | 12 src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue | 160 src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue | 77 src/views/CNAS/resourceDemand/device/component/files.vue | 1 src/components/echarts/echarts.vue | 238 + src/layout/components/Navbar.vue | 13 src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue | 1 src/views/CNAS/resourceDemand/device/component/calibration.vue | 59 src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue | 115 src/views/business/inspectionTask/components/EditInspectionItem.vue | 31 src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue | 1 src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue | 1 src/api/statisticalCharts/dataAnalysis.js | 73 src/views/CNAS/resourceDemand/device/component/maintenance.vue | 50 src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue | 38 src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue | 88 src/views/CNAS/process/reportResults/index.vue | 1 src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue | 28 src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue | 1 src/views/system/user/index.vue | 7 src/views/CNAS/resourceDemand/device/component/record.vue | 9 src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue | 1 src/views/performance/manHour/workTimeConfig.vue | 8 108 files changed, 6,025 insertions(+), 3,748 deletions(-) diff --git a/src/api/cnas/process/method/methodVerification.js b/src/api/cnas/process/method/methodVerification.js new file mode 100644 index 0000000..671363e --- /dev/null +++ b/src/api/cnas/process/method/methodVerification.js @@ -0,0 +1,66 @@ +// 瀹為獙瀹ょ殑妫�娴嬭兘鍔涙。妗堢浉鍏虫帴鍙� +import request from "@/utils/request"; + +// 鏍囧噯鏂规硶鏇存柊楠岃瘉鍒楄〃 +export function pagesMethodVerify(query) { + return request({ + url: "/processMethodVerify/pagesMethodVerify", + method: "get", + params: query, + }); +} + +// 鍒犻櫎鏍囧噯鏂规硶鏇存柊楠岃瘉 +export function delMethodVerify(query) { + return request({ + url: '/processMethodVerify/delMethodVerify', + method: 'delete', + params: query + }) +} + +// 瀵煎嚭鏍囧噯鏂规硶鏇存柊楠岃瘉 +export function exportMethodVerify(query) { + return request({ + url: '/processMethodVerify/exportMethodVerify', + method: "get", + responseType: "blob", + params: query, + }) +} + +//鏌ヨ鏍囧噯鏂规硶楠岃瘉璇︽儏 +export function getMethodVerifyOne(query) { + return request({ + url: "/processMethodVerify/getMethodVerifyOne", + method: "get", + params: query, + }); +} + +// 淇敼鏍囧噯鏂规硶楠岃瘉 +export function updateMethodVerify(data) { + return request({ + url: "/processMethodVerify/updateMethodVerify", + method: "post", + data: data, + }); +} + +// 鏂板鏍囧噯鏂规硶楠岃瘉 +export function addMethodVerify(data) { + return request({ + url: "/processMethodVerify/addMethodVerify", + method: "post", + data: data, + }); +} + +// 楠岃瘉纭 +export function methodVerifyAffirm(query) { + return request({ + url: '/processMethodVerify/methodVerifyAffirm', + method: 'get', + params: query + }) +} diff --git a/src/api/cnas/resourceDemand/device.js b/src/api/cnas/resourceDemand/device.js index f66e93b..137a598 100644 --- a/src/api/cnas/resourceDemand/device.js +++ b/src/api/cnas/resourceDemand/device.js @@ -647,6 +647,15 @@ params: query, }); } +//浣跨敤璁板綍 瀵煎嚭 +export function exportUseRecord(query) { + return request({ + url: "/deviceRecord/exportUseRecord", + method: "get", + responseType: "blob", + params: query, + }); +} //鏂板璁惧妗f export function addDocument(data) { @@ -704,9 +713,9 @@ } //璁惧楠屾敹锛堣澶囷級瀵煎嚭 -export function exportUseRecord(query) { +export function exportDeviceAcceptance(query) { return request({ - url: "/deviceRecord/exportUseRecord", + url: "/deviceAcceptance/exportDeviceAcceptance", method: "get", responseType: "blob", params: query, @@ -758,12 +767,12 @@ }); } -//璁惧鎿嶄綔鏃ュ織鍜岃褰� -export function deviceLog(query) { +//璁惧鏍″噯 鏂板 鏇存柊 +export function saveOrUpdateDeviceMetric(data) { return request({ - url: "/api/deviceLog/" + query, - method: "get", - // params: query, + url: "/deviceMetrics/saveOrUpdateDeviceMetric", + method: "post", + data: data, }); } @@ -852,11 +861,83 @@ } //璁惧缁存姢鍒犻櫎 -export function deviceMaintainDelete(query) { +export function deleteDeviceMaintenance(query) { return request({ - url: "/deviceMaintain/delete/" + query, + url: "/deviceMaintain/deleteDeviceMaintenance", method: "delete", - // params: query, + params: query, + }); +} + +// 鏂板璁惧缁存姢淇濆吇 +export function addDeviceMaintenance(data) { + return request({ + url: "/deviceMaintain/addDeviceMaintenance", + method: "post", + data: data, + }); +} +//璁惧缁存姢琛� 鏌ヨ +export function getDeviceMaintenancePage(query) { + return request({ + url: "/deviceMaintain/getDeviceMaintenancePage", + method: "get", + params: query, + }); +} + +// 鍊熺敤-淇濆瓨 +export function saveDeviceBorrow(data) { + return request({ + url: "/deviceBorrow/saveDeviceBorrow", + method: "post", + data: data, + }); +} + +//鍊熺敤-鏌ョ湅 +export function getDeviceBorrow(query) { + return request({ + url: "/deviceBorrow/getDeviceBorrow", + method: "get", + params: query, + }); +} + +//鍊熺敤-瀵煎嚭 +export function deviceBorrowExport(query) { + return request({ + url: "/deviceBorrow/deviceBorrowExport", + method: "get", + responseType: "blob", + params: query, + }); +} + +//鍊熺敤-鍒犻櫎 +export function deleteDeviceBorrow(query) { + return request({ + url: "/deviceBorrow/deleteDeviceBorrow", + method: "delete", + params: query, + }); +} + +//鍊熺敤-鍒楄〃 +export function deviceBorrowPage(query) { + return request({ + url: "/deviceBorrow/deviceBorrowPage", + method: "get", + params: query, + }); +} + +// 璁惧鍚敤/鍋滅敤 淇濆瓨锛屾彁浜わ紝椹冲洖锛岄�氳繃鎺ュ彛 +export function saveDeviceState(data) { + return request({ + url: "/deviceState/saveDeviceState", + method: "post", + data: data, }); } @@ -869,11 +950,296 @@ }); } -// 鍊熺敤-淇濆瓨 -export function saveDeviceBorrow(data) { +//璁惧鍋滃惎鐢ㄥ崟鏉″鍑� +export function exportDeviceStatus(query) { return request({ - url: "/deviceBorrow/saveDeviceBorrow", + url: "/deviceState/exportDeviceStatus", + method: "get", + responseType: "blob", + params: query, + }); +} + +//璁惧鍚敤/鍋滅敤 鍒犻櫎 +export function deleteDeviceState(query) { + return request({ + url: "/deviceState/deleteDeviceState", + method: "delete", + params: query, + }); +} + +//璁惧鐘舵�佸鍑� +export function deviceStateExport(query) { + return request({ + url: "/deviceState/deviceStateExport", + method: "get", + responseType: "blob", + params: query, + }); +} + +//璁惧鍚敤/鍋滅敤 鍒嗛〉 +export function getDeviceStatePage(query) { + return request({ + url: "/deviceState/getDeviceStatePage", + method: "get", + params: query, + }); +} + +//璁惧鎶ュ簾鐢宠鍒楄〃 +export function pageDeviceScrapped(query) { + return request({ + url: "/deviceScrapped/pageDeviceScrapped", + method: "get", + params: query, + }); +} + +// 瀵煎嚭 +export function exportDeviceScrapped(query) { + return request({ + url: "/deviceScrapped/exportDeviceScrapped", + method: "get", + responseType: "blob", + params: query, + }); +} + +//鍒犻櫎璁惧鎶ュ簾鐢宠 +export function delDeviceScrapped(query) { + return request({ + url: "/deviceScrapped/delDeviceScrapped", + method: "delete", + params: query, + }); +} + +//鏌ヨ璁惧鎶ュ簾鐢宠 +export function getDeviceScrapped(query) { + return request({ + url: "/deviceScrapped/getDeviceScrapped", + method: "get", + params: query, + }); +} + +// 鏂板璁惧鎶ュ簾鐢宠 +export function addDeviceScrapped(data) { + return request({ + url: "/deviceScrapped/addDeviceScrapped", method: "post", data: data, }); } + +//璁惧鏁呴殰缁翠慨鍒楄〃 +export function pageDeviceBreakdownMaintenance(query) { + return request({ + url: "/deviceBreakdownMaintenance/pageDeviceBreakdownMaintenance", + method: "get", + params: query, + }); +} + +// 璁惧鏁呴殰涓庣淮淇�-瀵煎嚭 +export function exportDeviceBreakdownMaintenance(query) { + return request({ + url: "/deviceBreakdownMaintenance/exportDeviceBreakdownMaintenance", + method: "get", + responseType: "blob", + params: query, + }); +} + +//鍒犻櫎璁惧鏁呴殰缁翠慨 +export function delDeviceBreakdownMaintenance(query) { + return request({ + url: "/deviceBreakdownMaintenance/delDeviceBreakdownMaintenance", + method: "delete", + params: query, + }); +} + +//鏌ヨ璁惧鏁呴殰缁翠慨 +export function getDeviceBreakdownMaintenance(query) { + return request({ + url: "/deviceBreakdownMaintenance/getDeviceBreakdownMaintenance", + method: "get", + params: query, + }); +} + +// 鏂板璁惧鏁呴殰缁翠慨 +export function addDeviceBreakdownMaintenance(data) { + return request({ + url: "/deviceBreakdownMaintenance/addDeviceBreakdownMaintenance", + method: "post", + data: data, + }); +} + +//鍒嗛〉鏌ヨ璁惧鐐规璁板綍 +export function getDeviceInspectionRecordByPage(query) { + return request({ + url: "/deviceInspectionRecord/getDeviceInspectionRecordByPage", + method: "get", + params: query, + }); +} + +// 瀵煎嚭璁惧鐐规璁板綍 +export function exportDeviceInspectionRecord(query) { + return request({ + url: "/deviceInspectionRecord/exportDeviceInspectionRecord", + method: "get", + responseType: "blob", + params: query, + }); +} + +//鍒犻櫎璁惧鐐规璁板綍 +export function deleteDeviceInspectionRecord(query) { + return request({ + url: "/deviceInspectionRecord/deleteDeviceInspectionRecord", + method: "delete", + params: query, + }); +} + +//璁惧鐐规璁板綍璇︽儏 +export function getDeviceInspectionRecord(query) { + return request({ + url: "/deviceInspectionRecord/getDeviceInspectionRecord", + method: "get", + params: query, + }); +} + +// 鏂板璁惧鐐规璁板綍 +export function addDeviceInspectionRecord(data) { + return request({ + url: "/deviceInspectionRecord/addDeviceInspectionRecord", + method: "post", + data: data, + }); +} + +// 淇敼璁惧鐐规璁板綍 +export function updateDeviceInspectionRecord(data) { + return request({ + url: "/deviceInspectionRecord/updateDeviceInspectionRecord", + method: "post", + data: data, + }); +} + +// 澶嶆牳璁惧鐐规璁板綍 +export function reviewDeviceInspectionRecord(data) { + return request({ + url: "/deviceInspectionRecord/reviewDeviceInspectionRecord", + method: "post", + data: data, + }); +} + +//璁惧浜嬫晠鎶ュ憡鍒楄〃 +export function pageDeviceAccidentReport(query) { + return request({ + url: "/deviceAccidentReport/pageDeviceAccidentReport", + method: "get", + params: query, + }); +} + +// 瀵煎嚭璁惧浜嬫晠 +export function exportDeviceAccidentReport(query) { + return request({ + url: "/deviceAccidentReport/exportDeviceAccidentReport", + method: "get", + responseType: "blob", + params: query, + }); +} + +//鍒犻櫎璁惧浜嬫晠鎶ュ憡 +export function delDeviceAccidentReport(query) { + return request({ + url: "/deviceAccidentReport/delDeviceAccidentReport", + method: "delete", + params: query, + }); +} + +//鏌ヨ璁惧浜嬫晠鎶ュ憡 +export function getDeviceAccidentReport(query) { + return request({ + url: "/deviceAccidentReport/getDeviceAccidentReport", + method: "get", + params: query, + }); +} + +// 鏂板璁惧浜嬫晠鎶ュ憡 +export function addDeviceAccidentReport(data) { + return request({ + url: "/deviceAccidentReport/addDeviceAccidentReport", + method: "post", + data: data, + }); +} + +//浣滀笟鎸囧涔� 瀹℃壒 +export function approvalOfHomeworkInstructionManual(data) { + return request({ + url: "/deviceInstruction/approvalOfHomeworkInstructionManual", + method: "post", + data: data, + }); +} + +//浣滀笟鎸囧涔� 鍒犻櫎 +export function homeworkGuidebook(query) { + return request({ + url: "/deviceInstruction/homeworkGuidebook", + method: "delete", + params: query, + }); +} + +//浣滀笟鎸囧涔� 缂栬緫鏌ヨ +export function homeworkGuidebookEditor(query) { + return request({ + url: "/deviceInstruction/homeworkGuidebookEditor", + method: "get", + params: query, + }); +} + +//浣滀笟鎸囧涔︽柊澧� +export function newHomeworkGuidebookAdded(data) { + return request({ + url: "/deviceInstruction/newHomeworkGuidebookAdded", + method: "post", + data: data, + }); +} + +//浣滀笟鎸囧涔﹀彈鎺ф枃浠跺垹闄� +export function deleteHomeworkGuidebook(query) { + return request({ + url: "/deviceInstruction/deleteHomeworkGuidebook", + method: "delete", + params: query, + }); +} + +//浣滀笟鎸囧涔� 鏌ヨ +export function pageByPageQueryOfHomeworkInstructions(query) { + return request({ + url: "/deviceInstruction/pageByPageQueryOfHomeworkInstructions", + method: "get", + params: query, + }); +} diff --git a/src/api/index/report.js b/src/api/index/report.js new file mode 100644 index 0000000..47c6b23 --- /dev/null +++ b/src/api/index/report.js @@ -0,0 +1,26 @@ +// 棣栭〉鐩稿叧鎺ュ彛 +import request from '@/utils/request' + +//棣栭〉-->鏃ュ巻浠诲姟鍥� +export function calendarWorkByWeek() { + return request({ + url: '/report/calendarWorkByWeek', + method: 'get' + }) +} +//棣栭〉-->棣栭〉宸ユ椂缁熻 +export function manHourByStation(query) { + return request({ + url: '/report/manHourByStation', + method: 'get', + params: query + }) +} +//棣栭〉-->棣栭〉宸ユ椂缁熻 +export function manHourByPerson() { + return request({ + url: '/report/manHourByPerson', + method: 'get', + params: query + }) +} diff --git a/src/api/statisticalCharts/dataAnalysis.js b/src/api/statisticalCharts/dataAnalysis.js new file mode 100644 index 0000000..0775c06 --- /dev/null +++ b/src/api/statisticalCharts/dataAnalysis.js @@ -0,0 +1,73 @@ +// 缁熻鍥捐〃 +import request from "@/utils/request"; + +//鍚堟牸鐜囩粺璁� +export function getRawPassRateByBarChart(query) { + return request({ + url: "/dataAnalysis/getRawPassRateByBarChart", + method: "get", + params: query, + }); +} +//鍘熸潗鏂欑粺璁� +export function getRawPassRateByCake(query) { + return request({ + url: "/dataAnalysis/getRawPassRateByCake", + method: "get", + params: query, + }); +} +//鏈湀妫�楠岀被鍨嬫暟閲� +export function getOrderTypeCookie() { + return request({ + url: "/dataAnalysis/getOrderTypeCookie", + method: "get", + }); +} +//鏈湀妫�楠岀被鍨嬫暟閲� +export function getRawUpMonth() { + return request({ + url: "/dataAnalysis/getRawUpMonth", + method: "get", + }); +} +//鏌ヨ鍘熸潗鏂欓」妫�鍒嗘瀽 +export function getRawProductAnalysis(query) { + return request({ + url: "/dataAnalysis/getRawProductAnalysis", + method: "post", + data: query, + }); +} +//鏌ヨ鍘熸潗鏂欓」妫�鍒嗘瀽鍚堟牸鐜� +export function getRawProductAnalysisRawPass(query) { + return request({ + url: "/dataAnalysis/getRawProductAnalysisRawPass", + method: "post", + data: query, + }); +} +//鏌ヨ鍘熸潗鏂欓」妫�鍒嗘瀽鍒楄〃 +export function getRawProductAnalysisAllList(query) { + return request({ + url: "/dataAnalysis/getRawProductAnalysisAllList", + method: "post", + data: query, + }); +} +//鏌ヨ妫�楠岄」 +export function getRawItemNames(query) { + return request({ + url: "/dataAnalysis/getRawItemNames", + method: "get", + params: query, + }); +} +//鏌ヨ鍘熸潗鏂欓」妫�鍜屽巶瀹舵暟鎹姣� +export function getRawSupplierCompare(query) { + return request({ + url: "/dataAnalysis/getRawSupplierCompare", + method: "post", + data: query, + }); +} diff --git a/src/api/system/customer.js b/src/api/system/customer.js index 2399a5f..5b61333 100644 --- a/src/api/system/customer.js +++ b/src/api/system/customer.js @@ -28,7 +28,7 @@ export function delCustomById(query) { return request({ url: '/system/custom/delCustomById', - method: 'post', + method: 'delete', params: query }) } diff --git a/src/api/system/user.js b/src/api/system/user.js index 8ecfc5a..752aa45 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -1,191 +1,191 @@ -import request from '@/utils/request' +import request from "@/utils/request"; import { parseStrEmpty } from "@/utils/ruoyi"; // 鏌ヨ鐢ㄦ埛鍒楄〃 export function listUser(query) { return request({ - url: '/system/user/list', - method: 'get', - params: query - }) + url: "/system/user/list", + method: "get", + params: query, + }); } // 鏌ヨ鐢ㄦ埛璇︾粏 export function getUser(userId) { return request({ - url: '/system/user/' + parseStrEmpty(userId), - method: 'get' - }) + url: "/system/user/" + parseStrEmpty(userId), + method: "get", + }); } // 鏂板鐢ㄦ埛 export function addUser(data) { return request({ - url: '/system/user', - method: 'post', - data: data - }) + url: "/system/user", + method: "post", + data: data, + }); } // 淇敼鐢ㄦ埛 export function updateUser(data) { return request({ - url: '/system/user', - method: 'put', - data: data - }) + url: "/system/user", + method: "put", + data: data, + }); } // 鍒犻櫎鐢ㄦ埛 export function delUser(userId) { return request({ - url: '/system/user/' + userId, - method: 'delete' - }) + url: "/system/user/" + userId, + method: "delete", + }); } // 鐢ㄦ埛瀵嗙爜閲嶇疆 export function resetUserPwd(userId, password) { const data = { userId, - password - } + password, + }; return request({ - url: '/system/user/resetPwd', - method: 'put', - data: data - }) + url: "/system/user/resetPwd", + method: "put", + data: data, + }); } // 鐢ㄦ埛鐘舵�佷慨鏀� export function changeUserStatus(userId, status) { const data = { userId, - status - } + status, + }; return request({ - url: '/system/user/changeStatus', - method: 'put', - data: data - }) + url: "/system/user/changeStatus", + method: "put", + data: data, + }); } // 鏌ヨ鐢ㄦ埛涓汉淇℃伅 export function getUserProfile() { return request({ - url: '/system/user/profile', - method: 'get' - }) + url: "/system/user/profile", + method: "get", + }); } // 淇敼鐢ㄦ埛涓汉淇℃伅 export function updateUserProfile(data) { return request({ - url: '/system/user/profile', - method: 'put', - data: data - }) + url: "/system/user/profile", + method: "put", + data: data, + }); } // 鐢ㄦ埛瀵嗙爜閲嶇疆 export function updateUserPwd(oldPassword, newPassword) { const data = { oldPassword, - newPassword - } + newPassword, + }; return request({ - url: '/system/user/profile/updatePwd', - method: 'put', - data: data - }) + url: "/system/user/profile/updatePwd", + method: "put", + data: data, + }); } // 鐢ㄦ埛澶村儚涓婁紶 export function uploadAvatar(data) { return request({ - url: '/system/user/profile/avatar', - method: 'post', - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - data: data - }) + url: "/system/user/profile/avatar", + method: "post", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + data: data, + }); } // 鏌ヨ鎺堟潈瑙掕壊 export function getAuthRole(userId) { return request({ - url: '/system/user/authRole/' + userId, - method: 'get' - }) + url: "/system/user/authRole/" + userId, + method: "get", + }); } // 淇濆瓨鎺堟潈瑙掕壊 export function updateAuthRole(data) { return request({ - url: '/system/user/authRole', - method: 'put', - params: data - }) + url: "/system/user/authRole", + method: "put", + params: data, + }); } // 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� export function deptTreeSelect() { return request({ - url: '/system/user/deptTree', - method: 'get' - }) + url: "/system/user/deptTree", + method: "get", + }); } // 鑾峰彇浜轰簨绯荤粺缁勭粐 export function selectCompaniesList() { return request({ - url: '/companies/selectCompaniesList', - method: 'get' - }) + url: "/companies/selectCompaniesList", + method: "get", + }); } // 鑾峰彇浜轰簨绯荤粺缁勭粐涓嬬殑浜哄憳 export function selectSimpleList(data) { return request({ - url: '/companies/selectSimpleList', - method: 'post', - params: data - }) + url: "/companies/selectSimpleList", + method: "post", + params: data, + }); } // 鑾峰彇浜轰簨绯荤粺缁勭粐涓嬬殑浜哄憳 export function addPersonUser(data) { return request({ - url: '/companies/addPersonUser', - method: 'post', - params: data - }) + url: "/companies/addPersonUser", + method: "post", + params: data, + }); } // 鑾峰彇瑙掕壊 export function selectRoleList() { return request({ - url: '/role/selectRoleList', - method: 'get', - }) + url: "/role/selectRoleList", + method: "get", + }); } // 鑾峰彇鍗曚綅 export function selectCustomEnum() { return request({ - url: '/system/custom/selectCustomEnum', - method: 'get', - }) + url: "/system/custom/selectCustomEnum", + method: "get", + }); } // 鎻愪氦娣诲姞鏋舵瀯淇℃伅 -export function addDepartment(params) { +export function addDepartment(data) { return request({ - url: '/department/addDepartment', - method: 'post', - params: params - }) + url: "/department/addDepartment", + method: "post", + data: data, + }); } // 鑾峰彇褰撳墠鐧诲綍浜哄憳閮ㄩ棬 export function selectUserDepartmentLimsName(query) { return request({ - url: '/system/newUser/selectUserDepartmentLimsName', - method: 'get' - }) + url: "/system/newUser/selectUserDepartmentLimsName", + method: "get", + }); } // 鑾峰彇鐢ㄦ埛鍒楄〃 export function selectUserCondition(query) { diff --git a/src/assets/images/bg1.png b/src/assets/images/bg1.png new file mode 100644 index 0000000..4f7824e --- /dev/null +++ b/src/assets/images/bg1.png Binary files differ diff --git a/src/assets/images/bg2.png b/src/assets/images/bg2.png new file mode 100644 index 0000000..68afb4f --- /dev/null +++ b/src/assets/images/bg2.png Binary files differ diff --git a/src/components/Preview/filePreview.vue b/src/components/Preview/filePreview.vue index 1105afc..8588bc6 100644 --- a/src/components/Preview/filePreview.vue +++ b/src/components/Preview/filePreview.vue @@ -5,7 +5,7 @@ </div> <div v-if="isPdf"> <object :data="fileUrl" type="application/pdf" width="100%" height="750px"> - <p>鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 PDF 棰勮銆�<a :href="fileUrl" style="color: #3a7bfa;">涓嬭浇 PDF 鏂囦欢</a></p> + <p>鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 PDF 棰勮銆�<a :href="fileUrl" style="color: #3a7bfa;" target="_blank">涓嬭浇 PDF 鏂囦欢</a></p> </object> </div> <div v-if="isDoc"> diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue index abe65a0..aed6f4c 100644 --- a/src/components/Table/lims-table.vue +++ b/src/components/Table/lims-table.vue @@ -13,8 +13,7 @@ :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" - :sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType === 'action' ? getWidth(item.operation) : item.width - " align="center"> + :sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType === 'action' ? getWidth(item.operation) : item.width" align="center"> <!-- <div class="123" v-if="item.type == ''"> --> <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> @@ -31,7 +30,8 @@ </div> <!-- 鍥剧墖 --> <div v-else-if="item.dataType == 'image'"> - <img :src="javaApi + '/img/' + item.prop" alt="" style="width: 40px; height: 40px; margin-top: 10px" /> + <img :src="javaApi + '/img/' + scope.row[item.prop]" alt="" + style="width: 40px; height: 40px; margin-top: 10px" /> </div> <!-- tag --> @@ -261,12 +261,19 @@ }, mounted() { this.calculateSpanInfo(); + this.$nextTick(() => { + this.$refs.multipleTable.doLayout(); + }); }, methods: { getWidth(row) { let count = 0; row.forEach((a) => { - count += a.name.length; + if (a.showHide!==undefined && a.showHide()) { + count += a.name.length; + } else if(!a.showHide) { + count += a.name.length; + } }); return count * 15 + 70 + "px"; }, @@ -439,7 +446,7 @@ } >>>.el-table__body-wrapper::-webkit-scrollbar { - height: 14px; + height: 10px; /* 璁剧疆婊氬姩鏉″搴� */ } </style> diff --git a/src/components/echarts/DataComparison.vue b/src/components/echarts/DataComparison.vue new file mode 100644 index 0000000..b69b49d --- /dev/null +++ b/src/components/echarts/DataComparison.vue @@ -0,0 +1,507 @@ +<template> + <div> + <div> + <el-row class="title"> + <el-col :span="6" style="padding-left: 20px;text-align: left;">鏁版嵁鍒嗘瀽</el-col> + <el-col :span="18" style="text-align: right;"> + <el-button size="medium" @click="$emit('goBack')">杩斿洖</el-button> + </el-col> + </el-row> + </div> + <div class="container"> + <div> + <div style="padding: 0 0 10px 10px">濉啓鍘傚鏁版嵁</div> + <el-form ref="supplierForm" :model="supplierForm" :rules="rules" class="demo-ruleForm" label-width="40px"> + <el-row :gutter="20"> + <el-col :span="3"> + <el-form-item label="1锛�" prop="one"> + <el-input v-model="supplierForm.one" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="3"> + <el-form-item label="2锛�" prop="two"> + <el-input v-model="supplierForm.two" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="3"> + <el-form-item label="3锛�" prop="three"> + <el-input v-model="supplierForm.three" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="3"> + <el-form-item label="4锛�" prop="four"> + <el-input v-model="supplierForm.four" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="3"> + <el-form-item label="5锛�" prop="five"> + <el-input v-model="supplierForm.five" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="4"> + <el-form-item> + <el-button size="small" type="primary" @click="submitForm()">鏁版嵁鍒嗘瀽</el-button> + <el-button size="small" @click="resetForm()">閲嶇疆</el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <table :border='true' class="table"> + <tr> + <th class="thTitle"> </th> + <th class="thTitle">1</th> + <th class="thTitle">2</th> + <th class="thTitle">3</th> + <th class="thTitle">4</th> + <th class="thTitle">5</th> + <th class="thTitle">骞冲潎鍊�</th> + <th class="thTitle">鏍囧噯鍋忓樊</th> + <th class="thTitle">鐩稿鍋忓樊</th> + <th class="thTitle">骞冲潎鏍囧噯鍋忓樊</th> + </tr> + <tr> + <td class="thBack">鍘傚妫�娴嬫暟鎹�</td> + <td v-for="(item,index) in supplierData" :key="index" class="tdData">{{item}}</td> + </tr> + <tr> + <td class="thBack">妫�娴嬩腑蹇冩暟鎹�</td> + <td v-for="(item,index) in localData" :key="index" class="tdData">{{item}}</td> + </tr> + <tr> + <td class="thBack">缁濆鍋忓樊</td> + <td v-for="(item,index) in absoluteDeviation" :key="index" class="tdData">{{item}}</td> + </tr> + <tr> + <td class="thBack">骞冲潎鍊�</td> + <td v-for="(item,index) in average" :key="index" class="tdData">{{item}}</td> + </tr> + <tr> + <td class="thBack2">鍘傚</td> + </tr> + <tr> + <td class="thBack">UCL</td> + <td v-for="(item,index) in supplierULC" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'a' + index" class="tdData"></td> + </tr> + <tr> + <td class="thBack">LCL</td> + <td v-for="(item,index) in supplierLCL" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'b' + index" class="tdData"></td> + </tr> + <tr> + <td class="thBack">骞冲潎鍊�</td> + <td v-for="(item,index) in supplierAverage" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'c' + index" class="tdData"></td> + </tr> + <tr> + <td class="thBack">鏋佸樊</td> + <td v-for="(item,index) in supplierRange" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'d' + index" class="tdData"></td> + </tr> + <tr> + <td class="thBack2">妫�娴嬩腑蹇�</td> + </tr> + <tr> + <td class="thBack">UCL</td> + <td v-for="(item,index) in localULC" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'e' + index" class="tdData"></td> + </tr> + <tr> + <td class="thBack">LCL</td> + <td v-for="(item,index) in localLCL" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'f' + index" class="tdData"></td> + </tr> + <tr> + <td class="thBack">骞冲潎鍊�</td> + <td v-for="(item,index) in localAverage" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'g' + index" class="tdData"></td> + </tr> + <tr> + <td class="thBack">鏋佸樊</td> + <td v-for="(item,index) in localRange" :key="index" class="tdData">{{item}}</td> + <td v-for="(item,index) in empty" :key="'h' + index" class="tdData"></td> + </tr> + </table> + <el-row> + <el-col :span="12"> + <div class="inspection-card"> + <div class="echartsTitle">妫�娴嬫暟鎹姣�</div> + <Echarts ref="chart" + :grid="grid" + :legend="legend" + :lineColors="lineColors" + :series="echartsSeries" + :tooltip="tooltip" + :xAxis="xAxis" + :yAxis="yAxis" + style="height: 40vh;"></Echarts> + </div> + </el-col> + <el-col :span="12"> + <div class="inspection-card"> + <div class="echartsTitle">娴嬮噺鏁版嵁鏍囧噯宸姣�</div> + <Echarts ref="chart" + :barColors="barColors" + :chartStyle="chartStyle" + :grid="grid" + :legend="legend1" + :series="echartsSeries1" + :tooltip="tooltip" + :xAxis="xAxis1" + :yAxis="yAxis1" + style="height: 40vh;"></Echarts> + </div> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <div class="inspection-card"> + <div class="echartsTitle">鍋忓樊鍒嗘瀽</div> + <Echarts ref="chart" + :grid="grid" + :legend="legend2" + :lineColors="lineColors" + :series="echartsSeries2" + :tooltip="tooltip" + :xAxis="xAxis" + :yAxis="yAxis2" + style="height: 40vh;"></Echarts> + </div> + </el-col> + <el-col :span="12"> + <div class="inspection-card"> + <div class="echartsTitle">妫�娴嬩腑蹇冩暟鎹�</div> + <Echarts ref="chart" + :grid="grid" + :legend="legend" + :lineColors="lineColors" + :series="echartsSeries3" + :tooltip="tooltip" + :xAxis="xAxis" + :yAxis="yAxis" + style="height: 40vh;"></Echarts> + </div> + </el-col> + </el-row> + </div> + </div> +</template> + +<script> +import Echarts from "./echarts.vue"; + +export default { + name: "DataComparison", + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {Echarts}, + props: { + comparisonData : { + type: Object, + default: () => {} + }, + selectRow : { + type: Object, + default: () => {} + } + }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + supplierForm: { + one: '', + two: '', + three: '', + four: '', + five: '', + }, + rules: { + one: [{ required: true, message: '蹇呭~', trigger: 'blur' }], + two: [{ required: true, message: '蹇呭~', trigger: 'blur' }], + three: [{ required: true, message: '蹇呭~', trigger: 'blur' }], + four: [{ required: true, message: '蹇呭~', trigger: 'blur' }], + five: [{ required: true, message: '蹇呭~', trigger: 'blur' }], + }, + comparisonData1: {}, + supplierData: [], // 鍘傚鏁版嵁 + localData: [], // 妫�娴嬩腑蹇冩娴嬫暟鎹� + absoluteDeviation: [], // 缁濆鍋忓樊 + average: [], // 骞冲潎鍊� + supplierULC: [], // 鍘傚UCL + supplierLCL: [], // 鍘傚LCL + supplierAverage: [], // 鍘傚骞冲潎鍊� + supplierRange: [], // 鍘傚鏋佸樊 + localULC: [], // 妫�娴嬩腑蹇僓CL + localLCL: [], // 妫�娴嬩腑蹇僉CL + localAverage: [], // 妫�娴嬩腑蹇冨钩鍧囧�� + localRange: [], // 妫�娴嬩腑蹇冩瀬宸� + manufacturerData: [], + manufacturer: [ + {value: '1.1'}, + {value: '2.2'}, + {value: '3.3'}, + {value: '4.4'}, + {value: '5.5'}, + ], + testCenter: [ + {value: '1.2'}, + {value: '2.33'}, + {value: '3.64'}, + {value: '4.3'}, + {value: '5.9'}, + ], + empty: [ + {data: '1'}, + {data: '2'}, + {data: '3'}, + {data: '4'}, + ], + lineColors: ['#ed7d31', '#409EFF'], + barColors: ['#ed7d31', '#409EFF', '#a5a5a5'], + chartStyle: { + width: '100%', + height: '96%' // 璁剧疆鍥捐〃瀹瑰櫒鐨勯珮搴� + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + legend: { + data: ['鍘傚妫�娴嬫暟鎹�','妫�娴嬩腑蹇冩娴嬫暟鎹�'] + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + xAxis: [{ + type: 'category', + data: ['1', '2', '3', '4', '5'] + }], + yAxis: [{ + type: 'value' + }], + echartsSeries: [ + { + name: '鍘傚妫�娴嬫暟鎹�', + type: 'line', + label: { + show: true, + position: 'top', + }, + data: [] + }, + { + name: '妫�娴嬩腑蹇冩娴嬫暟鎹�', + type: 'line', + label: { + show: true, + position: 'top', + }, + data: [] + } + ], + xAxis1: [{ + type: 'category', + data: ['鍘傚', '妫�娴嬩腑蹇�'] + }], + legend1: { + data: ['UCL','LCL', '骞冲潎鍊�'] + }, + yAxis1: [ + { + type: 'value', + }, + ], + echartsSeries1: [ + { + name: 'UCL', + type: 'bar', + label: { + show: true, + position: 'top' + }, + data: [] + }, + { + name: 'LCL', + type: 'bar', + label: { + show: true, + position: 'top' + }, + data: [] + }, + { + name: '骞冲潎鍊�', + type: 'bar', + label: { + show: true, + position: 'top' + }, + data: [] + }, + ], + legend2: { + data: ['骞冲潎鍊�','缁濆鍋忓樊'] + }, + yAxis2: [{ + type: 'value', + min: 0, + max: 1, + }], + echartsSeries2: [ + { + name: '骞冲潎鍊�', + type: 'line', + label: { + show: true, + position: 'top', + formatter: (params) => Math.round(params.value * 1000) / 10 + '%' + }, + data: [], + }, + { + name: '缁濆鍋忓樊', + type: 'line', + label: { + show: true, + position: 'top', + formatter: (params) => Math.round(params.value * 1000) / 10 + '%' + }, + data: [], + } + ], + echartsSeries3: [ + { + name: '妫�娴嬩腑蹇冩娴嬫暟鎹�', + type: 'line', + data: [] + } + ], + } + }, + mounted() { + this.getInfo() + }, + // 鏂规硶闆嗗悎 + methods: { + getInfo () { + this.localData = this.comparisonData.localData === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData.localData + this.localData = this.localData.map((number, index) => index === 7 ? `${Math.round(number * 100)}%` : number) + this.echartsSeries3[0].data = this.localData.slice(0, 5) + this.localULC = this.comparisonData.localULC + this.localLCL = this.comparisonData.localLCL + this.localAverage = this.comparisonData.localAverage + this.localRange = this.comparisonData.localRange + }, + getInfo1 () { + this.echartsSeries1[0].data = [] + this.supplierData = this.comparisonData1.supplierData === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.supplierData + this.localData = this.comparisonData1.localData === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.localData + this.localData = this.localData.map((number, index) => index === 7 ? `${Math.round(number * 100)}%` : number) + this.echartsSeries3[0].data = this.localData.slice(0, 5) + this.echartsSeries[0].data = this.supplierData + this.echartsSeries[1].data = this.localData + this.absoluteDeviation = this.comparisonData1.absoluteDeviation === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.absoluteDeviation + this.echartsSeries2[1].data = this.absoluteDeviation + this.absoluteDeviation = this.absoluteDeviation.map(number => `${Math.round(number * 100)}%`) // 缁濆鍋忓樊鐧惧垎姣旇浆鎹� + this.average = this.comparisonData1.average === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.average + this.echartsSeries2[0].data = this.average + this.average = this.average.map(number => `${Math.round(number * 100)}%`) // 骞冲潎鍊肩櫨鍒嗘瘮杞崲 + this.supplierULC = this.comparisonData1.supplierULC === null ? ['', '', '', '', ''] : this.comparisonData1.supplierULC + this.echartsSeries1[0].data.push(this.supplierULC[0]) // 娴嬮噺鏁版嵁鏍囧噯宸姣旀煴鐘跺浘鏁版嵁 + this.supplierLCL = this.comparisonData1.supplierLCL === null ? ['', '', '', '', ''] : this.comparisonData1.supplierLCL + this.echartsSeries1[1].data.push(this.supplierLCL[0]) // 娴嬮噺鏁版嵁鏍囧噯宸姣旀煴鐘跺浘鏁版嵁 + this.supplierAverage = this.comparisonData1.supplierAverage === null ? ['', '', '', '', ''] : this.comparisonData1.supplierAverage + this.echartsSeries1[2].data.push(this.supplierAverage[0]) // 娴嬮噺鏁版嵁鏍囧噯宸姣旀煴鐘跺浘鏁版嵁 + this.supplierRange = this.comparisonData1.supplierRange === null ? ['', '', '', '', ''] : this.comparisonData1.supplierRange + this.localULC = this.comparisonData1.localULC + this.echartsSeries1[0].data.push(this.localULC[0]) // 娴嬮噺鏁版嵁鏍囧噯宸姣旀煴鐘跺浘鏁版嵁 + this.localLCL = this.comparisonData1.localLCL + this.echartsSeries1[1].data.push(this.localLCL[0]) // 娴嬮噺鏁版嵁鏍囧噯宸姣旀煴鐘跺浘鏁版嵁 + this.localAverage = this.comparisonData1.localAverage + this.echartsSeries1[2].data.push(this.localAverage[0]) // 娴嬮噺鏁版嵁鏍囧噯宸姣旀煴鐘跺浘鏁版嵁 + this.localRange = this.comparisonData1.localRange + }, + submitForm () { + this.$refs['supplierForm'].validate((valid) => { + if (valid) { + const params = { + orderIds: this.selectRow.orderIds, + itemNames: this.selectRow.itemNames, + supplierDataList: Object.values(this.supplierForm) + } + this.$axios.post(this.$api.dataAnalysis.getRawSupplierCompare, params, { + headers: { + 'Content-Type': 'application/json' + }, + noQs: true + }).then(res => { + if (res.code === 201) { + return + } + this.comparisonData1 = res.data + this.getInfo1() + }) + } else { + console.log('error submit!!'); + return false; + } + }); + }, + resetForm () { + this.$refs['supplierForm'].resetFields(); + }, + }, +} +</script> + +<style scoped> +.title { + height: 60px; + line-height: 60px; +} +.container { + width: calc(100% - 20px); + height: calc(100vh - 170px); + background-color: #fff; + padding: 10px; + overflow-y: auto; +} +.table { + width: 100%; +} +.thTitle { + background-color: #e0eaf5; + padding: 6px 2px; +} +.thBack { + text-align: center; + background-color: #e0eaf5; + padding: 2px; +} +.thBack2 { + text-align: center; + background-color: #e4f2da; + padding: 2px; +} +.tdData { + padding: 4px; + text-align: center; + font-size: 13px; + width: 10%; +} +.inspection-card{ + width: 100%; + background: #FFFFFF; + margin-top: 10px; +} +.echartsTitle { + text-align: center; + padding-bottom: 10px; +} +</style> diff --git a/src/components/echarts/echart.vue b/src/components/echarts/echart.vue new file mode 100644 index 0000000..5825330 --- /dev/null +++ b/src/components/echarts/echart.vue @@ -0,0 +1,119 @@ + +<template> + <div> + <div class="echart_size" :id="id" :style="`height:${config.height};width:${config.width}`"></div> + </div> +</template> +<script> +import * as echarts from 'echarts' +import ResizeListener from 'element-resize-detector'; +import {iuCharts} from '@/utils/echarts' +export default { + props: { + id: { + type: String, + default: '' + }, + config:{ + type: Object, + default: () => {} + }, + datas: { + type: Object, + default: () => {} + } + }, + data() { + return { + chart:null, + } + }, + watch: { + /* 濡傛灉鍥捐〃鏁版嵁鏄悗鍙拌幏鍙栫殑锛岀洃鍚埗缁勪欢涓殑鏁版嵁鍙樺寲锛岄噸鏂拌Е鍙慐charts */ + datas: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.init(); + }) + }, + }, + }, + created() { + this.$nextTick(() => { + this.init() + }) + }, + mounted() { + window.addEventListener('resize', this.windowResizeListener); + this.chartEleResizeListener(); + }, + beforeDestroy() { + if (!this.chart) { + return; + } + this.chart.dispose(); + this.chart = null; + }, + methods: { + init() { + // 瀹炰緥鍖栧璞� + this.chart = echarts.init(document.getElementById(this.id)) + this.chart.showLoading({ + text: 'loading', + color: '#3A7BFA', + textColor: '#000', + maskColor: 'rgba(255, 255, 255, 0.2)', + zlevel: 0, + }); + if (this.config.isLoading) { + this.chart.hideLoading(); + switch (this.config.type){ + case 'bar': + iuCharts.drawBar(this.chart,this.datas) + break; + case 'line': + iuCharts.drawLine(this.chart,this.datas) + break; + case 'pie': + iuCharts.drawPie(this.chart,this.datas) + break; + case 'gauge': + iuCharts.drawGauge(this.chart,this.datas) + break; + case 'pie0': + iuCharts.drawPie0(this.chart,this.datas) + default: + break; + } + setTimeout(()=>{ + this.chart.resize() + },200) + } + }, + /* 瀵筩hart鍏冪礌灏哄杩涜鐩戝惉锛屽綋鍙戠敓鍙樺寲鏃跺悓姝ユ洿鏂癳chart瑙嗗浘 */ + chartEleResizeListener() { + const chartInstance = ResizeListener({ + strategy: 'scroll', + callOnAdd: true + }); + chartInstance.listenTo(this.$el, () => { + if (!this.chart) return; + this.chart.resize(); + }); + }, + /* 褰撶獥鍙g缉鏀炬椂锛宔chart鍔ㄦ�佽皟鏁磋嚜韬ぇ灏� */ + windowResizeListener() { + if (!this.chart) return; + this.chart.resize(); + } + } +} +</script> +<style scoped> +.echart_size{ + width: 100%; + height: 100%; +} +</style> diff --git a/src/components/echarts/echarts.vue b/src/components/echarts/echarts.vue new file mode 100644 index 0000000..7b8e67c --- /dev/null +++ b/src/components/echarts/echarts.vue @@ -0,0 +1,238 @@ +<template> + <div> + <div id="id" ref="chart" :style="chartStyle"></div> + </div> +</template> + +<script> +import * as echarts from 'echarts' +import ResizeListener from 'element-resize-detector'; + +export default { + name: 'EChart', + props: { + options: { + type: Object, + default: () => ({}) + }, + chartStyle: { + type: Object, + default: () => ({ + height: '80%', + width: '100%' + }) + }, + dataset: { + type: Object, + default: () => {} + }, + xAxis: { + type: Array, + default: () => [] + }, + yAxis: { + type: Array, + default: () => [] + }, + series: { + type: Array, + default: () => [] + }, + grid: { + type: Object, + default: () => ({}) + }, + legend: { + type: Object, + default: () => ({}) + }, + tooltip: { + type: Object, + default: () => ({}) + }, + lineColors: { + type: Array, + default: () => ['#00BAFF', '#3DE7C9', '#CCEDF0', '#FFB71C', '#FF5A5A'] + }, + barColors: { + type: Array, + default: () => ['#ff8800', '#3DE7C9', '#CCEDF0', '#FFB71C', '#FF5A5A'] + }, + loadingOption: { + type: Object, + default: () => ({ + text: '鏁版嵁鍔犺浇涓�...', + color: '#00BAFF', + textColor: '#000', + maskColor: 'rgba(255, 255, 255, 0.8)', + zlevel: 0 + }) + } + }, + data() { + return { + chartInstance: null, + } + }, + watch: { + options: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + series: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + dataset: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + xAxis: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + yAxis: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + grid: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + legend: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + tooltip: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + lineColors: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + barColors: { + deep: true, + // immediate: true, + handler(val) { + this.$nextTick(() => { + this.renderChart() + }) + }, + }, + }, + mounted() { + this.chartInstance = echarts.init(this.$refs.chart) + this.renderChart() + window.addEventListener('resize', this.windowResizeListener); + }, + beforeDestroy() { + this.dispose() + }, + methods: { + /* 褰撶獥鍙g缉鏀炬椂锛宔chart鍔ㄦ�佽皟鏁磋嚜韬ぇ灏� */ + windowResizeListener() { + if (!this.chartInstance) return; + this.dispose() + this.chartInstance = echarts.init(this.$refs.chart) + this.renderChart() + this.chartInstance.resize(); + }, + renderChart() { + const option = { + backgroundColor: this.options.backgroundColor || '#fff', + xAxis: this.xAxis, + yAxis: this.yAxis, + dataset: this.dataset, + series: this.series, + grid: this.grid, + legend: this.legend, + tooltip: this.tooltip + } + // 鏍规嵁浼犲叆鐨勬暟鎹拰閰嶇疆鍙傛暟鐢熸垚鍥捐〃 + this.generateChart(option) + }, + + generateChart(option) { + // 閰嶇疆鎶樼嚎鍥惧拰鏌辩姸鍥剧殑鏍峰紡 + if (option.series && option.series.length > 0) { + option.series.forEach((s, index) => { + if (s.type === 'line') { + s.itemStyle = { + color: this.lineColors[index] || this.lineColors[0] + } + s.lineStyle = { + color: this.lineColors[index] || this.lineColors[0] + } + } else if (s.type === 'bar') { + s.itemStyle = { + color: this.barColors[index] || this.barColors[0] + } + } + }) + } + this.chartInstance.clear() + + // 娓叉煋鍥捐〃 + this.chartInstance.setOption(option) + }, + + dispose() { + if (this.chartInstance) { + window.removeEventListener('resize', this.chartInstance.resize);//閿�姣佸浘琛ㄧ洃鍚簨浠� + this.chartInstance.dispose() + this.chartInstance = null + } + } + }, +} +</script> + +<style scoped> +/* 鍦ㄨ繖閲屽彲浠ュ啓鏍峰紡锛屾瘮濡傝缃浘琛ㄥ鍣ㄧ殑瀹藉害鍜岄珮搴� */ +</style> diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index da89cf9..e9566ab 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -12,6 +12,16 @@ <div class="avatar-wrapper"> <img :src="avatar" class="user-avatar" /> <span class="userName">{{ nickName }}</span> + <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> + <div class="avatar-wrapper"> + <i class="el-icon-caret-bottom" /> + </div> + <el-dropdown-menu slot="dropdown"> + <router-link to="/user/profile"> + <el-dropdown-item>涓汉涓績</el-dropdown-item> + </router-link> + </el-dropdown-menu> + </el-dropdown> <img class="logoout" src="@/assets/images/logoout.png" @@ -211,9 +221,6 @@ } } - .avatar-container { - margin-right: 30px; - } } } </style> diff --git a/src/main.js b/src/main.js index 0736a8c..96827ef 100644 --- a/src/main.js +++ b/src/main.js @@ -68,7 +68,7 @@ }; Vue.prototype.javaApi = process.env.VUE_APP_BASE_API ? process.env.VUE_APP_BASE_API - : "http://192.168.0.170:8002"; + : "http://192.168.1.36:8002"; Vue.prototype.checkPermi = checkPermi; Vue.prototype.uploadHeader = { Authorization: "Bearer " + getToken(), diff --git a/src/plugins/download.js b/src/plugins/download.js index 42acd00..c0c1878 100644 --- a/src/plugins/download.js +++ b/src/plugins/download.js @@ -1,79 +1,126 @@ -import axios from 'axios' -import {Loading, Message} from 'element-ui' -import { saveAs } from 'file-saver' -import { getToken } from '@/utils/auth' -import errorCode from '@/utils/errorCode' +import axios from "axios"; +import { Loading, Message } from "element-ui"; +import { saveAs } from "file-saver"; +import { getToken } from "@/utils/auth"; +import errorCode from "@/utils/errorCode"; import { blobValidate } from "@/utils/ruoyi"; -const baseURL = process.env.VUE_APP_BASE_API +const baseURL = process.env.VUE_APP_BASE_API; let downloadLoadingInstance; export default { name(name, isDelete = true) { - var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete + var url = + baseURL + + "/common/download?fileName=" + + encodeURIComponent(name) + + "&delete=" + + isDelete; axios({ - method: 'get', + method: "get", url: url, - responseType: 'blob', - headers: { 'Authorization': 'Bearer ' + getToken() } + responseType: "blob", + headers: { Authorization: "Bearer " + getToken() }, }).then((res) => { const isBlob = blobValidate(res.data); if (isBlob) { - const blob = new Blob([res.data]) - this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) + const blob = new Blob([res.data]); + this.saveAs(blob, decodeURIComponent(res.headers["download-filename"])); } else { this.printErrMsg(res.data); } - }) + }); }, resource(resource) { - var url = baseURL + "/common/download/resource?resource=" + encodeURIComponent(resource); + var url = + baseURL + + "/common/download/resource?resource=" + + encodeURIComponent(resource); axios({ - method: 'get', + method: "get", url: url, - responseType: 'blob', - headers: { 'Authorization': 'Bearer ' + getToken() } + responseType: "blob", + headers: { Authorization: "Bearer " + getToken() }, }).then((res) => { const isBlob = blobValidate(res.data); if (isBlob) { - const blob = new Blob([res.data]) - this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) + const blob = new Blob([res.data]); + this.saveAs(blob, decodeURIComponent(res.headers["download-filename"])); } else { this.printErrMsg(res.data); } - }) + }); }, zip(url, name) { - var url = baseURL + url - downloadLoadingInstance = Loading.service({ text: "姝e湪涓嬭浇鏁版嵁锛岃绋嶅��", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", }) + var url = baseURL + url; + downloadLoadingInstance = Loading.service({ + text: "姝e湪涓嬭浇鏁版嵁锛岃绋嶅��", + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }); axios({ - method: 'get', + method: "get", url: url, - responseType: 'blob', - headers: { 'Authorization': 'Bearer ' + getToken() } - }).then((res) => { - const isBlob = blobValidate(res.data); - if (isBlob) { - const blob = new Blob([res.data], { type: 'application/zip' }) - this.saveAs(blob, name) - } else { - this.printErrMsg(res.data); - } - downloadLoadingInstance.close(); - }).catch((r) => { - console.error(r) - Message.error('涓嬭浇鏂囦欢鍑虹幇閿欒锛岃鑱旂郴绠$悊鍛橈紒') - downloadLoadingInstance.close(); + responseType: "blob", + headers: { Authorization: "Bearer " + getToken() }, }) + .then((res) => { + const isBlob = blobValidate(res.data); + if (isBlob) { + const blob = new Blob([res.data], { type: "application/zip" }); + this.saveAs(blob, name); + } else { + this.printErrMsg(res.data); + } + downloadLoadingInstance.close(); + }) + .catch((r) => { + console.error(r); + Message.error("涓嬭浇鏂囦欢鍑虹幇閿欒锛岃鑱旂郴绠$悊鍛橈紒"); + downloadLoadingInstance.close(); + }); }, saveAs(text, name, opts) { - saveAs(text, name, opts); + if (typeof text === "string") { + // 璺緞涓嬭浇 + saveAs(text, name, opts); + Message.success("鏁版嵁瀵煎嚭鎴愬姛"); + } else { + // 娴佷笅杞� + blobToText(text) + .then((result) => { + Message.error(result.msg); + }) + .catch(() => { + saveAs(text, name, opts); + Message.success("鏁版嵁瀵煎嚭鎴愬姛"); + }); + } }, async printErrMsg(data) { const resText = await data.text(); const rspObj = JSON.parse(resText); - const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] + const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode["default"]; Message.error(errMsg); - } -} + }, +}; +// 灏哹lob杞垚鏂囨湰 +function blobToText(blob) { + return new Promise((resolve, reject) => { + const fileReader = new FileReader(); + fileReader.readAsText(blob); + fileReader.onload = function () { + try { + const result = JSON.parse(this.result); + if (result && result["code"] !== 200) { + resolve(result); + } else { + reject(); + } + } catch (e) { + reject(); + } + }; + }); +} diff --git a/src/router/index.js b/src/router/index.js index eb196f1..180cdb2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -149,7 +149,7 @@ path: "inspection", component: () => import("@/views/business/inspectionTask/inspection"), name: "inspection", - meta: { title: "妫�楠屽崟璇︽儏", activeMenu: "/business/inspectionTask" }, + meta: { title: "妫�楠屽崟璇︽儏", activeMenu: "/business/inspectionTask", keepAlive: false }, }, ], }, diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue index 189ccd3..d6d0f60 100644 --- a/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue +++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue @@ -15,18 +15,10 @@ </div> </template> <template v-slot:table> - <limsTable - :column="columns" - :currentChange="rowClick" - :height="'25vh'" - :highlightCurrentRow="true" - :isSelection="false" - :rowStyle="tableRowStyle" - :table-data="tableData" - rowKey="id" - style="margin-top: 18px; padding: 0 15px;" - > - <template v-slot:consumablesTypeSlot="{row}"> + <limsTable :column="columns" :currentChange="rowClick" :height="'25vh'" :highlightCurrentRow="true" + :isSelection="false" :rowStyle="tableRowStyle" :table-data="tableData" rowKey="id" + style="margin-top: 18px; padding: 0 15px;"> + <template v-slot:consumablesTypeSlot="{ row }"> {{ findType(row.consumablesType) }} </template> <template v-slot:operation="scope"> @@ -36,14 +28,8 @@ </limsTable> <div class="pagination"> <div></div> - <el-pagination - :page-size="pagination.pageSize" - :page-sizes="[10, 20, 30, 40]" - :total="pagination.total" - layout="total, sizes, prev, pager, next, jumper" - @current-change="handleCurrent" - @size-change="handleSize" - > + <el-pagination :page-size="pagination.pageSize" :page-sizes="[10, 20, 30, 40]" :total="pagination.total" + layout="total, sizes, prev, pager, next, jumper" @current-change="handleCurrent" @size-change="handleSize"> </el-pagination> </div> </template> @@ -52,7 +38,7 @@ <div> <ConsumableProject ref="consumableProject"></ConsumableProject> </div> - <Edit ref="editRef" :contentsId="contentsId" @submit="fetchData"/> + <Edit ref="editRef" :contentsId="contentsId" @submit="fetchData" /> </div> </template> @@ -70,7 +56,7 @@ export default { dicts: ["consumables_type"], components: { - TableCard, limsTable,Edit, ConsumableProject + TableCard, limsTable, Edit, ConsumableProject }, props: { contentsId: { @@ -161,7 +147,7 @@ }, methods: { async fetchData() { - procurementSuppliesList({ contentId: this.contentsId}).then(res => { + procurementSuppliesList({ contentId: this.contentsId }).then(res => { if (res.code === 200) { this.tableData = res.data.records if (this.tableData.length > 0) { @@ -174,7 +160,7 @@ this.$nextTick() let res const e = this.options.find(item => item.value == val) - if(e) { + if (e) { res = e.label } else { res = '-' @@ -185,10 +171,9 @@ this.$refs.editRef.openDialog(row); }, async exportExcel() { - exportProcurementSuppliesList({parentId:this.contentsId}).then(res => { - const blob = new Blob([res], {type: 'application/octet-stream'}); + exportProcurementSuppliesList({ parentId: this.contentsId }).then(res => { + const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鑰楁潗鍒楄〃.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, handleCurrent() { @@ -196,7 +181,7 @@ handleSize() { }, handleDelete(row) { - deleteProcurementSuppliesList({ id:row.id }).then(res => { + deleteProcurementSuppliesList({ id: row.id }).then(res => { if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.fetchData() @@ -206,8 +191,8 @@ rowClick(row) { this.$refs.consumableProject.fetchListId(row) }, - tableRowStyle({row}) { - if(row.currentAmount <= row.lowerLimit) { + tableRowStyle({ row }) { + if (row.currentAmount <= row.lowerLimit) { return { background: '#ffcaca' } } else { return {} diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue index 1951036..9ddb399 100644 --- a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue +++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue @@ -13,21 +13,14 @@ </el-button> </div> <div class="table"> - <limsTable - :column="tableColumn" - :height="'calc(100vh - 20em)'" - :table-data="storageTableData" - :table-loading="tableLoading" - style="padding: 0 10px;margin-bottom: 16px" - :page="page" - @pagination="pagination"> + <limsTable :column="tableColumn" :height="'calc(100vh - 20em)'" :table-data="storageTableData" + :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> </limsTable> </div> <!-- 缂栬緫-鏂板寮规 --> - <el-dialog :before-close="handleClose" :close-on-click-modal="false" - :close-on-press-escape="false" :title="title" - :visible.sync="dialogVisible" width="70%"> + <el-dialog :before-close="handleClose" :close-on-click-modal="false" :close-on-press-escape="false" :title="title" + :visible.sync="dialogVisible" width="70%"> <!-- 鍏ュ簱鍗� --> <div> <div style="display: flex; align-items: center"> @@ -51,19 +44,17 @@ </el-col> <el-col :span="12"> <el-form-item label="鍏ュ簱鏃ユ湡"> - <el-date-picker v-model="form.storageTime" format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" type="date" value-format="yyyy-MM-dd"></el-date-picker> + <el-date-picker v-model="form.storageTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 100%" type="date" value-format="yyyy-MM-dd"></el-date-picker> </el-form-item> </el-col> - <el-col :span="12"> - <el-form-item label="鍏ュ簱浜�"> - <el-select v-model="form.storageUser" size="small" style="width: 100%"> - <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option> - </el-select> - </el-form-item> - </el-col> + <el-col :span="12"> + <el-form-item label="鍏ュ簱浜�"> + <el-select v-model="form.storageUser" size="small" style="width: 100%"> + <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </el-form-item> + </el-col> <el-col :span="12"> <el-form-item label="鍏ュ簱璇存槑"> <el-input v-model="form.remark" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" type="textarea"> @@ -106,8 +97,7 @@ </el-input> </div> </div> - <el-button size="mini" type="primary" - @click="addTableData">娣诲姞 + <el-button size="mini" type="primary" @click="addTableData">娣诲姞 </el-button> </div> <el-table :data="consumables" style="margin-top: 10px"> @@ -225,7 +215,7 @@ label: '鐧昏浜�', prop: 'registrantName', minWidth: '160' - },{ + }, { label: '鐧昏鏃ユ湡', prop: 'registrantTime', minWidth: '100' @@ -322,7 +312,7 @@ // 娣诲姞琛ㄦ牸鏁版嵁 addTableData() { this.$nextTick() - console.log('this.consumableOptions',this.consumableOptions) + console.log('this.consumableOptions', this.consumableOptions) this.consumableOptions.forEach(item => { if (item.id === this.formTwo.id) { this.consumables.push({ @@ -343,13 +333,13 @@ this.consumables.splice(index, 1); }, // 鎵撳紑寮规 - addOrUpdateStore(type,row) { + addOrUpdateStore(type, row) { if (type === 'edit') { this.dialogType = "update"; - selectStoreById({id:row.id}).then(res => { + selectStoreById({ id: row.id }).then(res => { if (res.code === 201) return this.consumables = res.data.consumables - this.form = {...res.data.store} + this.form = { ...res.data.store } }).catch(err => { console.log('err---', err); }) @@ -359,11 +349,11 @@ this.dialogVisible = true; }, // 鏌ヨ鍒楄〃 - searchList () { + searchList() { this.tableLoading = true - storeList({...this.page,...this.searchForm}).then(res => { + storeList({ ...this.page, ...this.searchForm }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.storageTableData = res.data.records this.page.total = res.data.total } @@ -374,10 +364,9 @@ }, // 瀵煎嚭excel async importExcel() { - exportProcurementSuppliesStoreExcel({parentId:this.contentsId}).then(res => { - const blob = new Blob([res], {type: 'application/octet-stream'}); + exportProcurementSuppliesStoreExcel({ parentId: this.contentsId }).then(res => { + const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鑰楁潗鍏ュ簱.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, handleClose() { @@ -404,11 +393,11 @@ // 鑾峰彇鎵�鏈夌敤鎴� getUserList() { selectUserCondition().then((res) => { - this.users = res.data; - }); + this.users = res.data; + }); }, async fetchListOptions() { - procurementSuppliesList({contentsId: this.contentsId}).then(res => { + procurementSuppliesList({ contentsId: this.contentsId }).then(res => { if (res.code === 200) { this.consumableOptions = res.data.records } @@ -416,20 +405,20 @@ }, // 鍒犻櫎 - deleteStore (row) { + deleteStore(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - console.log('row>>>>>>>>>>>>>>s',row) + console.log('row>>>>>>>>>>>>>>s', row) deleteStore({ - id:row.id, - consumablesId:row.consumablesId + id: row.id, + consumablesId: row.consumablesId }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.searchList() } @@ -457,10 +446,12 @@ .el-dialog { margin: 6vh auto 50px !important; } + .el-dialog__body { max-height: 42em; overflow-y: auto; } + .input-form { display: flex; margin: 10px 0; diff --git a/src/views/CNAS/externalService/supplierManage/index.vue b/src/views/CNAS/externalService/supplierManage/index.vue index 5480937..b16a2a7 100644 --- a/src/views/CNAS/externalService/supplierManage/index.vue +++ b/src/views/CNAS/externalService/supplierManage/index.vue @@ -19,7 +19,7 @@ </div> <div class="table"> <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" - :page="page" :tableLoading="tableLoading"></lims-table> + :page="page" :tableLoading="tableLoading"></lims-table> </div> <form-dia ref="formDia" v-if="formDia" @closeDia="closeDia"></form-dia> </div> @@ -115,17 +115,17 @@ async getTableData() { this.tableLoading = true; selectQualifiedSupplierManagementPage(this.searchForm).then(res => { - this.tableLoading = false; - if(res.code === 200) { - this.tableData = res.data.records; - this.page.total = res.data.total - } + this.tableLoading = false; + if (res.code === 200) { + this.tableData = res.data.records; + this.page.total = res.data.total + } }).catch(err => { this.tableLoading = false }) }, // 閲嶇疆 - resetSearchForm () { + resetSearchForm() { this.pagination.current = 1 this.pagination.pageSize = 20 this.searchForm.supplierName = '' @@ -144,18 +144,18 @@ }) }, // 鍏抽棴寮规 - closeDia () { + closeDia() { this.formDia = false this.getTableData() }, // 鍒犻櫎璁板綍 - deleteRow (row) { + deleteRow(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - delSupplierManagement({supplierManagementId:row.supplierManagementId}).then(res => { + delSupplierManagement({ supplierManagementId: row.supplierManagementId }).then(res => { if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛锛�') this.getTableData() @@ -170,10 +170,9 @@ }, // 瀵煎嚭excel async exportExcel() { - exportSupplierManagement({deviceId:this.clickNodeVal.value}).then(res => { + exportSupplierManagement({ deviceId: this.clickNodeVal.value }).then(res => { const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鍚堟牸渚涘簲鍟�.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) } }, diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue b/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue index 1ae74e8..4cf3cb1 100644 --- a/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue +++ b/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue @@ -30,31 +30,28 @@ <el-table-column fixed="right" label="鎿嶄綔" width="140" align="center"> <template v-slot="scope"> <el-button v-if="!isDepartment || scope.row.currentState === '鍏抽棴'" size="small" type="text" - @click="handleViewClick(scope.row, 'view')">鏌ョ湅 + @click="handleViewClick(scope.row, 'view')">鏌ョ湅 </el-button> <el-button v-if="isDepartment && scope.row.currentState !== '鍏抽棴'" size="small" type="text" - @click="handleViewClick(scope.row, 'edit')">缂栬緫 + @click="handleViewClick(scope.row, 'edit')">缂栬緫 </el-button> <el-button size="small" type="text" @click="downLoadPost(scope.row)">瀵煎嚭</el-button> - <el-button v-if="isDepartment" size="small" style="color: #f56c6c" type="text" @click="deletePost(scope.row)">鍒犻櫎</el-button> + <el-button v-if="isDepartment" size="small" style="color: #f56c6c" type="text" + @click="deletePost(scope.row)">鍒犻櫎</el-button> </template> </el-table-column> </el-table> <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" - background - style="margin-top: 10px" - @size-change="handleSizeChange" - @current-change="handleCurrentChange"> + :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" background style="margin-top: 10px" + @size-change="handleSizeChange" @current-change="handleCurrentChange"> </el-pagination> </div> <!-- 鏂板宀椾綅鑱岃矗 --> - <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" - title="鏂板宀椾綅鑱岃矗" - width="50%" @close="resetForm"> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" title="鏂板宀椾綅鑱岃矗" + width="50%" @close="resetForm"> <el-steps :active="currentStep" align-center finish-status="success"> <el-step v-for="(v, i) in steps" :key="i" :title="v" style="cursor:pointer" - @click.native="choiceStep(i)"></el-step> + @click.native="choiceStep(i)"></el-step> </el-steps> <el-form ref="form" :model="form" :rules="rules" label-width="130px"> <div> @@ -64,44 +61,36 @@ <el-col :span="12"> <el-form-item label="宀椾綅鍚嶇О锛�" prop="postName"> <el-input v-model="form.postName" :disabled="currentStep !== 0 || operationType === 'view'" - size="small"></el-input> + size="small"></el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="宸ヤ綔鐩爣锛�" prop="jobObjective"> <el-input v-model="form.jobObjective" :disabled="currentStep !== 0 || operationType === 'view'" - size="small" - type="textarea"></el-input> + size="small" type="textarea"></el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="宀椾綅鑱岃矗锛�" prop="jobResponsibilities"> <el-input v-model="form.jobResponsibilities" :disabled="currentStep !== 0 || operationType === 'view'" - size="small" - type="textarea"></el-input> + size="small" type="textarea"></el-input> </el-form-item> </el-col> <el-col v-if="currentStep === 0 || operationType === 'view'" :span="12"> - <el-form-item - :rules="[{ required: currentStep === 0, message: '璇烽�夋嫨浠昏亴浜�', trigger: 'change' }]" - label="浠昏亴浜猴細" - prop="incumbentId"> - <el-select v-model="form.incumbentId" :disabled="operationType === 'view'" clearable - filterable - placeholder="璇烽�夋嫨浠昏亴浜�" size="small" style="width: 100%;"> + <el-form-item :rules="[{ required: currentStep === 0, message: '璇烽�夋嫨浠昏亴浜�', trigger: 'change' }]" + label="浠昏亴浜猴細" prop="incumbentId"> + <el-select v-model="form.incumbentId" :disabled="operationType === 'view'" clearable filterable + placeholder="璇烽�夋嫨浠昏亴浜�" size="small" style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> <el-col v-if="currentStep === 1 || operationType === 'view'" :span="12"> - <el-form-item - :rules="[{ required: currentStep === 1, message: '璇烽�夋嫨涓荤', trigger: 'blur' }]" - label="涓荤锛�" + <el-form-item :rules="[{ required: currentStep === 1, message: '璇烽�夋嫨涓荤', trigger: 'blur' }]" label="涓荤锛�" prop="supervisorId"> <el-select v-model="form.supervisorId" :disabled="currentStep !== 1 || operationType === 'view'" - clearable filterable - placeholder="璇烽�夋嫨涓荤" size="small" style="width: 100%;"> + clearable filterable placeholder="璇烽�夋嫨涓荤" size="small" style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -122,8 +111,9 @@ <span slot="footer" class="dialog-footer"> <el-button v-if="currentStep !== 0 && currentStep !== 3" @click="submitForm('3reject')">椹冲洖</el-button> <el-button v-if="currentStep === 0" @click="submitForm('2save')">淇濆瓨</el-button> - <el-button v-if="currentStep !== 3" type="primary" - @click="submitForm('1submit')">{{ currentStep === 0 ? '鎻愪氦' : '閫氳繃' }}</el-button> + <el-button v-if="currentStep !== 3" type="primary" @click="submitForm('1submit')">{{ currentStep === 0 ? '鎻愪氦' : + '閫氳繃' + }}</el-button> </span> </el-dialog> </div> @@ -136,8 +126,8 @@ personJobResponsibilitiesSave, personJobResponsibilitiesSelect } from "@/api/cnas/personal/personJobResponsibilities"; -import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; -import {mapGetters} from "vuex"; +import { selectUserCondition } from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; +import { mapGetters } from "vuex"; export default { data() { @@ -212,7 +202,7 @@ departmentId: this.search.userId, size: this.search.size, current: this.search.current, - }: { + } : { userName: this.userName, userId: this.search.userId, size: this.search.size, @@ -330,10 +320,9 @@ }, // 涓嬭浇宀椾綅鑱岃矗 downLoadPost(row) { - exportPersonJobResponsibilities({id:row.id}).then(res => { - const blob = new Blob([res],{ type: 'application/octet-stream' }); - this.$download.saveAs(blob, row.incumbentName+'-宀椾綅鑱岃矗'+'.docx'); - this.$message.success('瀵煎嚭鎴愬姛') + exportPersonJobResponsibilities({ id: row.id }).then(res => { + const blob = new Blob([res], { type: 'application/octet-stream' }); + this.$download.saveAs(blob, row.incumbentName + '-宀椾綅鑱岃矗' + '.docx'); }) }, // 鍒犻櫎宀椾綅鑱岃矗 @@ -343,7 +332,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - personJobResponsibilitiesDelete({id: row.id}).then(res => { + personJobResponsibilitiesDelete({ id: row.id }).then(res => { if (res.code == 200) { this.$message.success('鍒犻櫎鎴愬姛'); this.getPostList(this.departId); @@ -391,5 +380,4 @@ }, }; </script> -<style scoped> -</style> +<style scoped></style> diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue index 2b71f75..7df2ab0 100644 --- a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue +++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue @@ -1,7 +1,7 @@ <template> <div> <div style="text-align: right;margin-bottom: 10px"> -<!-- <el-button size="small" @click="$emit('goBackList')">杩斿洖</el-button>--> + <!-- <el-button size="small" @click="$emit('goBackList')">杩斿洖</el-button>--> <el-button size="small" type="primary" @click="downPerson">涓嬭浇妗f</el-button> <el-button size="small" type="primary" @click="dialogVisible = true">浜哄憳鍒嗙被</el-button> <el-button :loading="saveLoading" size="small" type="primary" @click="save">淇濆瓨</el-button> @@ -10,13 +10,13 @@ <div style="display: flex;flex-direction: row;"> <div style="width: 12em"> <el-image :src="javaApi + '/img/' + form.pictureUrl" fit="fill" - style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;"> + style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;"> <div slot="error" class="image-slot"> <i class="el-icon-picture-outline" style="font-size: 40px;"></i> </div> </el-image> <el-image :src="javaApi + '/img/' + form.signatureUrl" fit="fill" - style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;"> + style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;"> <div slot="error" class="image-slot"> <i class="el-icon-picture-outline" style="font-size: 40px;"></i> </div> @@ -61,7 +61,9 @@ </el-col> <el-col :span="8"> <el-form-item label="鎵�灞為儴闂�"> - <el-cascader v-model="form.departLimsId" :options="department" :props="{ label: 'name', value: 'id',checkStrictly: true }" filterable style="width: 100%;"></el-cascader> + <el-cascader v-model="form.departLimsId" :options="department" + :props="{ label: 'name', value: 'id', checkStrictly: true }" filterable + style="width: 100%;"></el-cascader> </el-form-item> </el-col> </el-row> @@ -74,7 +76,7 @@ <el-col :span="8"> <el-form-item label="鍏ラ泦鍥㈡椂闂�"> <el-date-picker v-model="form.groupTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" - style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -95,14 +97,14 @@ <el-col :span="8"> <el-form-item label="宸ヤ綔鏃堕棿"> <el-date-picker v-model="form.workingTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" - style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="鍚堝悓鍒版湡鏃堕棿"> <el-date-picker v-model="form.contractLifeTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" - style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -123,8 +125,7 @@ <el-col :span="8"> <el-form-item label="鍑虹敓鏃ユ湡"> <el-date-picker v-model="form.dateBirth" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" - @change="getAge" - style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + @change="getAge" style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -147,8 +148,8 @@ </el-col> <el-col :span="8"> <el-form-item label="骞撮緞"> - <el-input-number v-model="form.age" :max="130" :min="1" - controls-position="right" size="small" style="width: 99%;"></el-input-number> + <el-input-number v-model="form.age" :max="130" :min="1" controls-position="right" size="small" + style="width: 99%;"></el-input-number> </el-form-item> </el-col> <el-col :span="8"> @@ -163,9 +164,8 @@ <el-row> <el-col :span="8"> <el-form-item label="璇佷欢鏈夋晥鏈�"> - <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" - size="small" style="width: 99%;" type="date" - value-format="yyyy-MM-dd HH:mm:ss"> + <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -188,9 +188,8 @@ </el-col> <el-col :span="8"> <el-form-item label="鍏ュ厷/鍥㈡椂闂�"> - <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" - size="small" style="width: 99%;" type="date" - value-format="yyyy-MM-dd HH:mm:ss"> + <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -225,9 +224,8 @@ </el-col> <el-col :span="8"> <el-form-item label="姣曚笟鏃堕棿1"> - <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" - size="small" style="width: 99%;" type="date" - value-format="yyyy-MM-dd HH:mm:ss"> + <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -245,9 +243,8 @@ </el-col> <el-col :span="8"> <el-form-item label="姣曚笟鏃堕棿2"> - <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" - size="small" style="width: 99%;" type="date" - value-format="yyyy-MM-dd HH:mm:ss"> + <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -255,9 +252,8 @@ <el-row> <el-col :span="8"> <el-form-item label="鐧昏鏃堕棿"> - <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" - size="small" style="width: 99%;" type="date" - value-format="yyyy-MM-dd HH:mm:ss"> + <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -272,20 +268,18 @@ <el-form-item label="涓汉鐓х墖"> <el-input v-model="form.pictureUrl" disabled size="small"> <el-button v-if="form.pictureUrl" slot="append" icon="el-icon-delete-solid" - @click="deleteFile(form.pictureUrl, 'pictureUrl')"></el-button> + @click="deleteFile(form.pictureUrl, 'pictureUrl')"></el-button> </el-input> </el-form-item> </el-col> <el-col :span="6"> - <el-upload ref="upload" :action="action" - :headers="uploadHeader" - :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'pictureUrl')" - :show-file-list="false" - style="float: left; margin: 0 10px 0 10px;"> + <el-upload ref="upload" :action="action" :headers="uploadHeader" + :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'pictureUrl')" + :show-file-list="false" style="float: left; margin: 0 10px 0 10px;"> <el-button slot="trigger" class="uploadFile" size="mini" type="primary">涓婁紶</el-button> </el-upload> - <el-button v-if="form.pictureUrl" class="uploadFile" size="mini" - type="primary" @click="downloadFile(form.pictureUrl)">涓嬭浇</el-button> + <el-button v-if="form.pictureUrl" class="uploadFile" size="mini" type="primary" + @click="downloadFile(form.pictureUrl)">涓嬭浇</el-button> </el-col> </el-row> <el-row> @@ -293,60 +287,57 @@ <el-form-item label="鐢靛瓙绛惧悕"> <el-input v-model="form.signatureUrl" disabled size="small"> <el-button v-if="form.signatureUrl" slot="append" icon="el-icon-delete-solid" - @click="deleteFile(form.signatureUrl, 'signatureUrl')"></el-button> + @click="deleteFile(form.signatureUrl, 'signatureUrl')"></el-button> </el-input> </el-form-item> </el-col> <el-col :span="6"> - <el-upload ref="upload" :action="action" - :headers="uploadHeader" - :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'signatureUrl')" - :show-file-list="false" - style="float: left; margin: 0 10px 0 10px;"> + <el-upload ref="upload" :action="action" :headers="uploadHeader" + :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'signatureUrl')" + :show-file-list="false" style="float: left; margin: 0 10px 0 10px;"> <el-button slot="trigger" class="uploadFile" size="small" type="primary">涓婁紶</el-button> </el-upload> - <el-button v-if="form.signatureUrl" class="uploadFile" size="small" - type="primary" @click="downloadFile(form.signatureUrl)">涓嬭浇</el-button> + <el-button v-if="form.signatureUrl" class="uploadFile" size="small" type="primary" + @click="downloadFile(form.signatureUrl)">涓嬭浇</el-button> </el-col> </el-row> <el-row> <el-col :span="20"> - <el-form-item label="璇佷功璧勬枡" > + <el-form-item label="璇佷功璧勬枡"> </el-form-item> </el-col> <el-col :span="4"> - <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd(0)">鏂板</el-button> + <el-button size="mini" style="float: right;margin-right: 25px" type="primary" + @click="annexAdd(0)">鏂板</el-button> </el-col> </el-row> - <lims-table :tableData="annexList" :column="columnData2" style="width: 96%;margin-left: 34px" - height="200" :tableLoading="tableLoading2"></lims-table> + <lims-table :tableData="annexList" :column="columnData2" style="width: 96%;margin-left: 34px" height="200" + :tableLoading="tableLoading2"></lims-table> <el-row style="margin-top: 10px"> <el-col :span="20"> - <el-form-item label="闄勪欢璧勬枡" > + <el-form-item label="闄勪欢璧勬枡"> </el-form-item> </el-col> <el-col :span="4"> - <el-upload ref='upload' - :action="fileAction" - :auto-upload="true" :data="{userId: clickNodeVal.userId}" - :before-upload="fileBeforeUpload" - :headers="uploadHeader" :on-error="onError" - :on-success="handleSuccessUp" - :show-file-list="false" - accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> + <el-upload ref='upload' :action="fileAction" :auto-upload="true" :data="{ userId: clickNodeVal.userId }" + :before-upload="fileBeforeUpload" :headers="uploadHeader" :on-error="onError" + :on-success="handleSuccessUp" :show-file-list="false" + accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' + style="width: 80px !important;"> <el-button size="small" type="primary">闄勪欢涓婁紶</el-button> </el-upload> </el-col> </el-row> - <lims-table :tableData="tableData" :column="columnData" style="width: 96%;float: right;" - height="200" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="columnData" style="width: 96%;float: right;" height="200" + :tableLoading="tableLoading"></lims-table> <el-row style="margin-top: 10px"> <el-col :span="20"> - <el-form-item label="宸ヤ綔缁忓巻" > + <el-form-item label="宸ヤ綔缁忓巻"> </el-form-item> </el-col> <el-col :span="4"> - <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd1('add')">鏂板</el-button> + <el-button size="mini" style="float: right;margin-right: 25px" type="primary" + @click="annexAdd1('add')">鏂板</el-button> </el-col> </el-row> <el-table :data="tableData1" border height="200" style="width: 96%;float: right;" v-loading="tableLoading1"> @@ -356,8 +347,9 @@ </el-table-column> <el-table-column align="center" label="鎿嶄綔"> <template slot-scope="scope"> - <el-button type="text" size="mini" @click="annexAdd1('edit',scope.row)">缂栬緫</el-button> - <el-button type="text" size="mini" @click="deleteAnnex1(scope.row)" style="color: #f56c6c">鍒犻櫎</el-button> + <el-button type="text" size="mini" @click="annexAdd1('edit', scope.row)">缂栬緫</el-button> + <el-button type="text" size="mini" @click="deleteAnnex1(scope.row)" + style="color: #f56c6c">鍒犻櫎</el-button> </template> </el-table-column> </el-table> @@ -374,8 +366,7 @@ </el-col> <el-col :span="20" style="text-align: left;"> <el-checkbox-group v-model="checkList"> - <el-checkbox v-for="v in dict.type.personnl_type" :key="v.value" - :label="v.value"></el-checkbox> + <el-checkbox v-for="v in dict.type.personnl_type" :key="v.value" :label="v.value"></el-checkbox> </el-checkbox-group> </el-col> </el-row> @@ -387,7 +378,8 @@ </el-dialog> <!-- 鏂板闄勪欢璧勬枡 --> - <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" @open="getComparisonList"> + <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" + @open="getComparisonList"> <el-form ref="annex" :model="annex" :rules="rules" label-width="100px"> <el-row> <el-col :span="16"> @@ -414,9 +406,9 @@ <el-col :span="16"> <el-form-item label="鏈夋晥鏈�" prop="periodValidity"> <el-input v-model="annex.periodValidity" clearable size="small"></el-input> -<!-- <el-date-picker v-model="annex.periodValidity" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"--> -<!-- style="width: 99%;" type="date" value-format="yyyy-MM-dd">--> -<!-- </el-date-picker>--> + <!-- <el-date-picker v-model="annex.periodValidity" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"--> + <!-- style="width: 99%;" type="date" value-format="yyyy-MM-dd">--> + <!-- </el-date-picker>--> </el-form-item> </el-col> </el-row> @@ -438,14 +430,11 @@ <el-row style="margin-top: 15px"> <el-col :span="16"> <el-form-item label="鏂囦欢"> - <el-upload - :action="action" - :before-upload="beforeAvatarUpload" - :headers="uploadHeader" - :on-success="(response,file,fileList) => onSuccess(response, file, fileList, 'fileName')" + <el-upload :action="action" :before-upload="beforeAvatarUpload" :headers="uploadHeader" + :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'fileName')" :show-file-list="false"> - <span v-if="annex.fileName">{{annex.fileName}}</span> -<!-- <img v-if="imageUrl" :src="imageUrl" class="avatar">--> + <span v-if="annex.fileName">{{ annex.fileName }}</span> + <!-- <img v-if="imageUrl" :src="imageUrl" class="avatar">--> <i v-else class="el-icon-upload avatar-uploader-icon"></i> </el-upload> </el-form-item> @@ -463,7 +452,8 @@ <el-row> <el-col :span="16"> <el-form-item label="宸ヤ綔缁忓巻" prop="idNumber"> - <el-input type="textarea" v-model="annex2.workExperience" clearable size="small" style="width: 100%;"></el-input> + <el-input type="textarea" v-model="annex2.workExperience" clearable size="small" + style="width: 100%;"></el-input> </el-form-item> </el-col> </el-row> @@ -549,23 +539,23 @@ label: '璇佷欢鍙�', prop: 'idNumber', minWidth: '150px' - },{ + }, { label: '鍙戣瘉鍗曚綅', prop: 'issueUnit', minWidth: '150px' - },{ + }, { label: '鏂囦欢鍚嶇О', prop: 'fileName', minWidth: '200px' - },{ + }, { label: '绾у埆', prop: 'level', minWidth: '150px' - },{ + }, { label: '鏈夋晥鏈�', prop: 'periodValidity', minWidth: '150px' - },{ + }, { label: '娣诲姞鏃堕棿', prop: 'createTime', minWidth: '150px' @@ -587,7 +577,7 @@ name: '缂栬緫', type: 'text', clickFun: (row) => { - this.annexAdd(1,row) + this.annexAdd(1, row) } }, { @@ -680,7 +670,7 @@ isSave: false, } }, - components: {limsTable, fileDownload}, + components: { limsTable, fileDownload }, created() { this.init() this.searchTableList() @@ -696,11 +686,10 @@ }, methods: { // 涓嬭浇妗f - downPerson(){ - exportPersonBasicInfoById({id: this.clickNodeVal.userId}).then(res => { - const blob = new Blob([res],{ type: 'application/msword' }); + downPerson() { + exportPersonBasicInfoById({ id: this.clickNodeVal.userId }).then(res => { + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '浜哄憳妗f.docx'); - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 涓婁紶楠岃瘉 @@ -715,11 +704,11 @@ return Promise.reject(flag); //姝g‘鐨勭粓姝� } }, - onError(err, file, fileList,type) { + onError(err, file, fileList, type) { this.$message.error('涓婁紶澶辫触') this.$refs.upload.clearFiles() }, - handleSuccessUp(response, ) { + handleSuccessUp(response,) { this.upLoading = false; if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); @@ -729,9 +718,9 @@ } }, // 鏌ヨ闄勪欢鍒楄〃 - searchTableList () { + searchTableList() { this.tableLoading = true - getBasicInfoFileList({userId: this.clickNodeVal.userId}).then(res => { + getBasicInfoFileList({ userId: this.clickNodeVal.userId }).then(res => { this.tableLoading = false this.tableData = res.data }).catch(err => { @@ -740,13 +729,13 @@ }) }, // 涓嬭浇 - upload (row) { + upload(row) { let url = ''; - if(row.type==1){ - url = this.javaApi+'/img/'+row.fileUrl - fileDownload.downloadIamge(url,row.fileName) - }else{ - url = this.javaApi+'/word/'+row.fileUrl + if (row.type == 1) { + url = this.javaApi + '/img/' + row.fileUrl + fileDownload.downloadIamge(url, row.fileName) + } else { + url = this.javaApi + '/word/' + row.fileUrl const link = document.createElement('a'); link.href = url; link.download = row.fileName; @@ -754,14 +743,14 @@ } }, // 鍒犻櫎 - delete (row) { + delete(row) { this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - delBasicInfoFileList({basicInfoFileId: row.basicInfoFileId}).then(res => { + delBasicInfoFileList({ basicInfoFileId: row.basicInfoFileId }).then(res => { this.tableLoading = false this.$message.success('鍒犻櫎鎴愬姛') this.searchTableList(); @@ -776,7 +765,7 @@ }) }, // 鎵撳紑宸ヤ綔缁忓巻鎺㈠喌 - annexAdd1 (type, row) { + annexAdd1(type, row) { this.operationType = type if (type === 'edit') { this.basicInfoWorkId = row.basicInfoWorkId @@ -788,7 +777,7 @@ this.dialogVisible2 = true }, // 鎻愪氦宸ヤ綔缁忓巻 - submitForm2 () { + submitForm2() { const params = { workExperience: this.annex2.workExperience, userId: this.clickNodeVal.userId, @@ -818,19 +807,19 @@ } }, // 鍏抽棴宸ヤ綔缁忓巻寮规 - handleClose2 () { + handleClose2() { this.dialogVisible2 = false this.annex2.workExperience = '' }, // 鍒犻櫎宸ヤ綔缁忓巻 - deleteAnnex1 (row) { + deleteAnnex1(row) { this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading1 = true - delBasicInfoWorkList({basicInfoWorkId: row.basicInfoWorkId}).then(res => { + delBasicInfoWorkList({ basicInfoWorkId: row.basicInfoWorkId }).then(res => { this.tableLoading1 = false this.$message.success('鍒犻櫎鎴愬姛') this.searchTableList2(); @@ -845,9 +834,9 @@ }); }, // 鏌ヨ宸ヤ綔缁忓巻鍒楄〃 - searchTableList2 () { + searchTableList2() { this.tableLoading1 = true - getBasicInfoWorkList({userId: this.clickNodeVal.userId}).then(res => { + getBasicInfoWorkList({ userId: this.clickNodeVal.userId }).then(res => { this.tableLoading1 = false this.tableData1 = res.data }).catch(err => { @@ -855,15 +844,15 @@ console.log('err---', err); }) }, - annexAdd(type,row) { - if(type === 1) { + annexAdd(type, row) { + if (type === 1) { this.title = '缂栬緫闄勪欢璧勬枡' this.addOrupdate = 1 - getAnnex({id: row.id}).then(res => { + getAnnex({ id: row.id }).then(res => { this.annex = res.data this.imageUrl = this.javaApi + '/img/' + res.data.fileName }) - }else { + } else { this.title = '鏂板闄勪欢璧勬枡' this.addOrupdate = 2 } @@ -879,15 +868,15 @@ }) }, addAnnex() { - if(this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) { + if (this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) { this.$message.error("璇蜂笂浼犳枃浠�") return } this.annex.userId = this.clickNodeVal.userId - if(this.addOrupdate === 1) { + if (this.addOrupdate === 1) { updateAnnex(this.annex).then(res => { - if(res.code == 200) { - getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => { + if (res.code == 200) { + getAnnexByUserId({ userId: this.clickNodeVal.userId }).then(res => { this.imageUrl = '' this.resetForm('annex') this.annexList = res.data @@ -896,11 +885,11 @@ }) } }) - }else { + } else { this.annex.id = null addAnnex(this.annex).then(res => { - if(res.code == 200) { - getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => { + if (res.code == 200) { + getAnnexByUserId({ userId: this.clickNodeVal.userId }).then(res => { this.imageUrl = '' this.resetForm('annex') this.annexList = res.data @@ -917,7 +906,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteAnnex({id: row.id}).then(res => { + deleteAnnex({ id: row.id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.annexList = this.annexList.filter(item => item.id != row.id) }) @@ -949,7 +938,7 @@ } }, async onSuccess(response, file, fileList, entityVal) { - if(entityVal == 'fileName') { + if (entityVal == 'fileName') { this.annex.fileName = response.data } // 鍦ㄤ繚瀛樿祴鍊兼柊鏂囦欢 @@ -967,7 +956,7 @@ } }, getUserBasisInfo(userId) { - getCNASPersonnelInfo({userId: userId}).then(res => { + getCNASPersonnelInfo({ userId: userId }).then(res => { this.form = res.data.PersonBasicInfoDto this.department = res.data.department this.annexList = res.data.annexList @@ -977,10 +966,10 @@ async save() { this.saveLoading = true this.form.userId = this.clickNodeVal.userId - if(Array.isArray(this.form.departLimsId)) { - if(this.form.departLimsId.length > 0) { + if (Array.isArray(this.form.departLimsId)) { + if (this.form.departLimsId.length > 0) { this.form.departLimsId = this.form.departLimsId.join(',').trim() + ',' - }else { + } else { this.form.departLimsId = '' } } @@ -999,10 +988,10 @@ }, clickPersonnelClassificationSure() { this.dialogVisible = false - this.form.personnelClassification = this.checkList.filter(m=>m).join('锛�') + this.form.personnelClassification = this.checkList.filter(m => m).join('锛�') }, async deleteFile(fileName, entityVal) { - await deleteCNASFile({fileName: fileName}).then(res => { + await deleteCNASFile({ fileName: fileName }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.$set(this.form, entityVal, null) let index = this.successFileList.indexOf(fileName) @@ -1033,7 +1022,7 @@ resetForm(formName) { this.$refs[formName].resetFields(); }, - getAge (val) { + getAge(val) { this.form.age = this.calculateAge(val) }, calculateAge(birthDateString) { @@ -1080,36 +1069,39 @@ height: 12px; /* 璁剧疆婊氬姩鏉″搴� */ } + >>>.el-form-item { - margin-bottom: 3px; + margin-bottom: 3px; } .el-input { - border-radius: 15px; + border-radius: 15px; } .el-icon-picture-outline { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); } .uploadFile { - margin-top: 2px; - float: left; + margin-top: 2px; + float: left; } - .avatar-uploader-icon { - font-size: 28px; - color: #0f8bf1; - width: 178px; - height: 50px; - text-align: center; - border: 1px solid #d9d9d9; - } - .avatar { - width: 178px; - height: 178px; - display: block; - } + +.avatar-uploader-icon { + font-size: 28px; + color: #0f8bf1; + width: 178px; + height: 50px; + text-align: center; + border: 1px solid #d9d9d9; +} + +.avatar { + width: 178px; + height: 178px; + display: block; +} </style> diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue index 92e0233..9f955ca 100644 --- a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue +++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue @@ -11,11 +11,7 @@ </el-form-item> </el-form> <div> - <el-button - :loading="outLoading" - size="small" - type="primary" - @click="handleDown">瀵煎嚭</el-button> + <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button> <el-button size="small" type="primary" @click="openSelectUserDia">鏂板缓</el-button> </div> </div> @@ -40,18 +36,10 @@ </template> </el-table-column> </el-table> - <el-pagination - :current-page="1" - :current-page.sync="page.current" - :page-size="page.size" - :page-sizes="[10, 20, 30, 50, 100]" - :total="page.total" - background - layout="->,total, sizes, prev, pager, next, jumper" - style="margin-top: 10px" - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - > + <el-pagination :current-page="1" :current-page.sync="page.current" :page-size="page.size" + :page-sizes="[10, 20, 30, 50, 100]" :total="page.total" background + layout="->,total, sizes, prev, pager, next, jumper" style="margin-top: 10px" @size-change="handleSizeChange" + @current-change="handleCurrentChange"> </el-pagination> </div> <el-dialog :visible.sync="selectUserDia" title="閫夋嫨鐢ㄦ埛" width="70%"> @@ -59,22 +47,15 @@ <div class="search_thing"> <div class="search_label">鐢ㄦ埛鍚嶏細</div> <div class="search_input"> - <el-input - v-model="addUserTableInfo.name" - clearable - placeholder="璇疯緭鍏�" - size="small" - @change="selectUserList" - ></el-input> + <el-input v-model="addUserTableInfo.name" clearable placeholder="璇疯緭鍏�" size="small" + @change="selectUserList"></el-input> </div> <el-button size="small" style="margin-left: 10px" type="primary" @click="selectUserList">鏌ヨ</el-button> </div> </div> <div v-if="selectUserDia" class="body" style="height: 60vh;"> - <lims-table :tableData="tableData1" :column="column1" - :isSelection="true" :handleSelectionChange="selectMethod" - :height="'calc(100vh - 290px)'" - :tableLoading="tableLoading1"></lims-table> + <lims-table :tableData="tableData1" :column="column1" :isSelection="true" :handleSelectionChange="selectMethod" + :height="'calc(100vh - 290px)'" :tableLoading="tableLoading1"></lims-table> </div> <span slot="footer" class="dialog-footer"> <el-button @click="selectUserDia = false">鍙� 娑�</el-button> @@ -85,7 +66,7 @@ </template> <script> -import {selectUserCondition} from "@/api/business/inspectionTask"; +import { selectUserCondition } from "@/api/business/inspectionTask"; import limsTable from "@/components/Table/lims-table.vue"; import { basicInformationOfPersonnelSelectPage, @@ -94,12 +75,12 @@ upUserDepardLimsId } from "@/api/cnas/personal/personalList"; import store from "@/store"; -import {Message} from "element-ui"; +import { Message } from "element-ui"; export default { name: 'PersonnelList', // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: {limsTable}, + components: { limsTable }, props: { departId: { type: Number, @@ -129,9 +110,9 @@ tableData1: [], tableLoading1: false, column1: [ - {label: '濮撳悕', prop: 'name'}, - {label: '璐﹀彿', prop: 'account'}, - {label: '瑙掕壊', prop: 'roleName'}, + { label: '濮撳悕', prop: 'name' }, + { label: '璐﹀彿', prop: 'account' }, + { label: '瑙掕壊', prop: 'roleName' }, { dataType: 'tag', label: '鐘舵��', @@ -151,12 +132,12 @@ } } }, - {label: '鐢佃瘽鍙风爜', prop: 'phone'}, + { label: '鐢佃瘽鍙风爜', prop: 'phone' }, ], page1: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, selectUserDia: false, // 娣诲姞浜哄憳寮规 entity: { @@ -215,7 +196,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - delUserDepardLimsId({id: row.userId}).then(res => { + delUserDepardLimsId({ id: row.userId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛'); this.refreshTable(); this.$emit('refreshTree') @@ -234,12 +215,12 @@ this.refreshTable(); }, // 鎵撳紑鏂板浜哄憳寮规 - openSelectUserDia () { + openSelectUserDia() { this.selectUserDia = true; this.selectUserList() }, // 鏌ヨ鏂板寮规鐨勪汉鍛樺垪琛� - selectUserList () { + selectUserList() { this.tableLoading1 = true selectUserCondition().then(res => { this.tableLoading1 = false @@ -288,11 +269,10 @@ this.outLoading = true; let entity = this.HaveJson(this.entity) delete entity.orderBy; - exportPersonBasicInfo({...entity}).then(res => { + exportPersonBasicInfo({ ...entity }).then(res => { this.outLoading = false; - const blob = new Blob([res], {type: 'application/octet-stream'}); + const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '浜哄憳淇℃伅.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, }, diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue index 46c637d..cb850e2 100644 --- a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue +++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue @@ -18,10 +18,8 @@ <el-button size="small" type="primary" @click="uploadDia = true, getUserList()">瀵煎叆</el-button> </div> </div> - <lims-table :tableData="yearPlanTableData" :column="yearPlanColumn" - :currentChange="currentChange" - @pagination="pagination" height="40vh" - :page="page" :tableLoading="yearLoading"></lims-table> + <lims-table :tableData="yearPlanTableData" :column="yearPlanColumn" :currentChange="currentChange" + @pagination="pagination" height="40vh" :page="page" :tableLoading="yearLoading"></lims-table> </div> <div v-if="!editPlanShow" class="table"> <div> @@ -31,37 +29,32 @@ <div style="display: flex;justify-content: space-between;"> <el-form :model="inDetailForm" ref="inDetailForm" size="small" :inline="true"> <el-form-item label="鍩硅璁插笀"> - <el-input v-model="inDetailForm.trainingLecturerName" class="search" clearable placeholder="璇疯緭鍏�" size="small"></el-input> + <el-input v-model="inDetailForm.trainingLecturerName" class="search" clearable placeholder="璇疯緭鍏�" + size="small"></el-input> </el-form-item> <el-form-item label="鍩硅鏃ユ湡"> - <el-date-picker v-model="inDetailForm.trainingDate" clearable - format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" - type="date" value-format="yyyy-MM-dd"></el-date-picker> + <el-date-picker v-model="inDetailForm.trainingDate" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" type="date" value-format="yyyy-MM-dd"></el-date-picker> </el-form-item> <el-form-item> <el-button size="small" type="primary" @click="searchTable">鏌� 璇�</el-button> </el-form-item> </el-form> <div> - <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" @click="batchDelete">鎵归噺鍒犻櫎</el-button> - <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" type="primary" @click="addTrainingPlan('add')">鏂板</el-button> + <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" + @click="batchDelete">鎵归噺鍒犻櫎</el-button> + <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" type="primary" + @click="addTrainingPlan('add')">鏂板</el-button> </div> </div> <lims-table :tableData="inDetailPlanTableData" :column="inDetailPlanColumn" - :height="isDepartment ? '40vh' : '62vh' " - :isSelection="true" :handleSelectionChange="handleSelectionChange" - @pagination="pagination1" - :page="inDetailPagination" :tableLoading="yearDetailLoading"></lims-table> + :height="isDepartment ? '40vh' : '62vh'" :isSelection="true" :handleSelectionChange="handleSelectionChange" + @pagination="pagination1" :page="inDetailPagination" :tableLoading="yearDetailLoading"></lims-table> </div> </div> <Add ref="addPlan" :currentChangeRow="currentChangeRow" @search="getInDetailPlan(currentRowId, departId)"></Add> - <Edit - v-if="editPlanShow" - ref="editPlan" - :currentRow="currentRow" - @del="getInDetailPlan(currentRowId, departId)" - @goBack="goBack" - ></Edit> + <Edit v-if="editPlanShow" ref="editPlan" :currentRow="currentRow" @del="getInDetailPlan(currentRowId, departId)" + @goBack="goBack"></Edit> <el-dialog :visible.sync="reviewDialog" title="瀹℃牳" width="30%" @close="auditRemarks = ''"> <span> 瀹℃牳澶囨敞锛� @@ -69,8 +62,7 @@ </span> <span style="margin-top: 10px;display: inline-block"> 鎵瑰噯浜猴細 - <el-select v-model="approverId" clearable - filterable size="small" style="width: 70%;"> + <el-select v-model="approverId" clearable filterable size="small" style="width: 70%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -93,29 +85,22 @@ <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px"> <div style="display: flex;align-items: center;"> <div style="width: 70px">骞翠唤锛�</div> - <el-date-picker - v-model="planYear" - type="year" - value-format="yyyy" - clearable - size="small" - format="yyyy" + <el-date-picker v-model="planYear" type="year" value-format="yyyy" clearable size="small" format="yyyy" placeholder="閫夋嫨骞�"> </el-date-picker> </div> <div style="display: flex;align-items: center;margin: 10px 0"> <div style="width: 70px">瀹℃牳浜猴細</div> - <el-select v-model="reviewerId" clearable - filterable size="small" style="width: 50%;"> + <el-select v-model="reviewerId" clearable filterable size="small" style="width: 50%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </div> <div style="margin: 0 auto;"> - <el-upload ref="upload" :action="javaApi + '/personTraining/personTrainingImport' + '?planYear=' + planYear + '&reviewerId=' + reviewerId" - :auto-upload="false" :before-upload="beforeUpload" :file-list="fileList" :headers="uploadHeader" - :limit="1" :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag - name="file"> + <el-upload ref="upload" + :action="javaApi + '/personTraining/personTrainingImport' + '?planYear=' + planYear + '&reviewerId=' + reviewerId" + :auto-upload="false" :before-upload="beforeUpload" :file-list="fileList" :headers="uploadHeader" :limit="1" + :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag name="file"> <i class="el-icon-upload"></i> <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> </el-upload> @@ -124,7 +109,7 @@ <el-button @click="uploadDia = false">鍙� 娑�</el-button> <el-button :loading="uploading" type="primary" @click="submitUpload()">涓� 浼�</el-button> </span> - </el-dialog > + </el-dialog> <view-record v-if="ViewRecord" ref="ViewRecord"></view-record> </div> </template> @@ -134,18 +119,18 @@ import Edit from '../components/Edit.vue'; import ViewRecord from "../components/ViewRecord.vue"; import limsTable from "@/components/Table/lims-table.vue"; -import {mapGetters} from "vuex"; +import { mapGetters } from "vuex"; import { approveAnnualPersonnelTraining, deleteAnnualPlanDetailTable, exportPersonTraining, exportPersonTrainingRecord, personTraining, personTrainingDelete, queryTheAnnualPlanDetailsTable, reviewAnnualPersonnelTraining } from "@/api/cnas/personal/personalTraining"; -import {selectUserCondition} from "@/api/system/user"; +import { selectUserCondition } from "@/api/system/user"; export default { name: 'PersonnelTraining', - components: {limsTable, ViewRecord, Add, Edit }, + components: { limsTable, ViewRecord, Add, Edit }, props: { departId: { type: Number, @@ -184,7 +169,7 @@ label: '鍒涘缓鏃堕棿', width: '160px', prop: 'createTime' - },{ + }, { label: '缂栧埗浜�', prop: 'compilerName' }, { @@ -251,7 +236,7 @@ formatType: (params) => { if (params == 1) { return 'success'; - } else if (params == 2) { + } else if (params == 2) { return 'danger'; } else { return null @@ -271,7 +256,7 @@ name: '瀵煎嚭', type: 'text', disabled: (row) => { - if(row.approvalStatus === 1 && row.reviewerStatus === 1) { + if (row.approvalStatus === 1 && row.reviewerStatus === 1) { return false; } else { return true; @@ -285,7 +270,7 @@ name: '瀹℃牳', type: 'text', disabled: (row) => { - if(row.reviewerStatus === 1 || this.userId != row.reviewerId) { + if (row.reviewerStatus === 1 || this.userId != row.reviewerId) { return true; } else { return false; @@ -299,7 +284,7 @@ name: '鎵瑰噯', type: 'text', disabled: (row) => { - if(row.approvalStatus === 1 || this.userId != row.approverId || row.reviewerStatus != 1) { + if (row.approvalStatus === 1 || this.userId != row.approverId || row.reviewerStatus != 1) { return true; } else { return false; @@ -317,7 +302,7 @@ this.deleteFun(row.id); }, disabled: (row) => { - if(row.reviewerStatus === 1) { + if (row.reviewerStatus === 1) { return true; } else { return false; @@ -328,7 +313,7 @@ }], inDetailPlanTableData: [], // 骞村害璁″垝鏄庣粏琛ㄨ〃鏁版嵁 inDetailPlanColumn: [ - { + { label: '鍩硅鐩爣', prop: 'trainingObjectives', width: '100px', @@ -442,15 +427,15 @@ ] }], page: { - total:0, - size:10, - current:1, + total: 0, + size: 10, + current: 1, compilerName: "" }, inDetailPagination: { - total:0, - size:10, - current:1, + total: 0, + size: 10, + current: 1, }, editPlanShow: false, currentRow: {}, @@ -479,19 +464,19 @@ } }, methods: { - searchTable () { + searchTable() { this.getInDetailPlan(this.currentRowId) }, // 鏌ヨ-骞村害璁″垝琛� getYearPlanList(userId) { this.yearLoading = true const params = this.isDepartment ? - { - departmentId: userId, - size: this.page.size, - current: this.page.current, - compilerName: this.page.compilerName, - }: { + { + departmentId: userId, + size: this.page.size, + current: this.page.current, + compilerName: this.page.compilerName, + } : { userId: userId, size: this.page.size, current: this.page.current, @@ -509,17 +494,17 @@ this.yearLoading = false }) }, - pagination (page) { + pagination(page) { this.page.size = page.limit this.getYearPlanList() }, - currentChange (row) { + currentChange(row) { const now = new Date(); const currentYear = now.getFullYear(); if (row) { this.currentChangeRow = row this.currentRowId = row.id - if (row.createTime.slice(0,4) == currentYear) { + if (row.createTime.slice(0, 4) == currentYear) { this.isOperation = true; } else { this.isOperation = false; @@ -527,20 +512,20 @@ this.getInDetailPlan(row.id) } }, - getInDetailPlan (id) { + getInDetailPlan(id) { if (this.inDetailForm.trainingDate === null) { this.inDetailForm.trainingDate = '' } const userId = this.isDepartment ? '' : this.departId const params = - { - userId: userId, - size: this.inDetailPagination.pageSize, - current: this.inDetailPagination.current, - id: id, - trainingLecturerName: this.inDetailForm.trainingLecturerName, - trainingDate: this.inDetailForm.trainingDate, - } + { + userId: userId, + size: this.inDetailPagination.pageSize, + current: this.inDetailPagination.current, + id: id, + trainingLecturerName: this.inDetailForm.trainingLecturerName, + trainingDate: this.inDetailForm.trainingDate, + } this.yearDetailLoading = true queryTheAnnualPlanDetailsTable(params).then(res => { this.yearDetailLoading = false @@ -550,7 +535,7 @@ this.yearDetailLoading = false }) }, - pagination1 (page) { + pagination1(page) { this.inDetailPagination.size = page.limit this.getInDetailPlan(this.currentRowId) }, @@ -569,7 +554,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - personTrainingDelete({id: id}).then(res => { + personTrainingDelete({ id: id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�'); this.getYearPlanList(this.departId); }); @@ -587,7 +572,7 @@ this.getUserList() }, // 鎻愪氦瀹℃牳 - handleReview (status) { + handleReview(status) { const personTrainingUpdateDto = { id: this.currentRowId, auditRemarks: this.auditRemarks, @@ -612,7 +597,7 @@ this.approvalDialog = true }, // 鎻愪氦鎵瑰噯 - handleApproval (status) { + handleApproval(status) { const personTrainingUpdateDto = { id: this.currentRowId, approvalRemarks: this.approvalRemarks, @@ -632,11 +617,10 @@ }, // 骞村害璁″垝琛�-涓嬭浇 downLoadPost(row) { - exportPersonTraining({id: row.id}).then(res => { + exportPersonTraining({ id: row.id }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, row.fileName + '.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 骞村害璁″垝-瀵煎叆 @@ -684,7 +668,7 @@ this.editPlanShow = false; this.getInDetailPlan(this.currentRowId) }, - viewRecord (row) { + viewRecord(row) { this.ViewRecord = true this.$nextTick(() => { this.$refs.ViewRecord.openDia(row) @@ -692,11 +676,10 @@ }, // 骞村害璁″垝鏄庣粏琛�-涓嬭浇 downLoadInDetail(row) { - exportPersonTrainingRecord({id: row.id}).then(res => { + exportPersonTrainingRecord({ id: row.id }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '浜哄憳鍩硅涓庤�冩牳璁板綍.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 骞村害璁″垝鏄庣粏琛�-澶氶�� @@ -704,7 +687,7 @@ this.multipleSelection = list }, // 骞村害鏄庣粏琛�-鍒犻櫎 - batchDelete () { + batchDelete() { if (this.multipleSelection.length > 0) { let ids = [] this.multipleSelection.forEach(item => { @@ -715,7 +698,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteAnnualPlanDetailTable({ids: ids.join(',')}).then(res => { + deleteAnnualPlanDetailTable({ ids: ids.join(',') }).then(res => { if (res.code == 200) { this.$message.success('鍒犻櫎鎴愬姛'); this.getInDetailPlan(this.currentRowId); @@ -776,10 +759,12 @@ overflow: auto; justify-content: space-between; } + .search { width: 150px; margin: 0 16px; } + .title { position: relative; font-size: 16px; diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue b/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue index 40b2f82..7b55725 100644 --- a/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue +++ b/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue @@ -5,23 +5,13 @@ <div style="display: flex;justify-content: space-between;"> <el-form :model="search" ref="page" size="small" :inline="true"> <el-form-item label="濮撳悕"> - <el-input v-model="search.userName" clearable placeholder="璇疯緭鍏ュ叧閿瓧" size="small" style="width: 20vh;"></el-input> + <el-input v-model="search.userName" clearable placeholder="璇疯緭鍏ュ叧閿瓧" size="small" + style="width: 20vh;"></el-input> </el-form-item> <el-form-item label="濂栨儵鏃ユ湡"> - <el-date-picker - v-model="search.searchTimeList" - :picker-options="pickerOptions" - align="right" - clearable - end-placeholder="缁撴潫鏃ユ湡" - format="yyyy-MM-dd" - range-separator="鑷�" - size="small" - start-placeholder="寮�濮嬫棩鏈�" - style="width: 100%" - type="daterange" - unlink-panels - value-format="yyyy-MM-dd 00:00:00"> + <el-date-picker v-model="search.searchTimeList" :picker-options="pickerOptions" align="right" clearable + end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" + style="width: 100%" type="daterange" unlink-panels value-format="yyyy-MM-dd 00:00:00"> </el-date-picker> </el-form-item> <el-form-item> @@ -64,20 +54,12 @@ </template> </el-table-column> </el-table> - <el-pagination :current-page="1" :page-size="search.size" - :page-sizes="[10, 20, 30, 50, 100]" - :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" - background - style="margin-top: 10px" - @size-change="handleSizeChange" - @current-change="handleCurrentChange"> + <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" + :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" background style="margin-top: 10px" + @size-change="handleSizeChange" @current-change="handleCurrentChange"> </el-pagination> </div> - <el-dialog - :visible.sync="dialogVisible" - title="濂栨儵璁板綍" - width="50%" - @open="getUserList"> + <el-dialog :visible.sync="dialogVisible" title="濂栨儵璁板綍" width="50%" @open="getUserList"> <div style="height: 40vh"> <el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-col :span="12"> @@ -88,7 +70,7 @@ <el-col :span="12"> <el-form-item label="鍛樺伐濮撳悕" prop="userId"> <el-select v-model="form.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%" value-key="id" - @change="selectUserChange" :disabled="!isDepartment"> + @change="selectUserChange" :disabled="!isDepartment"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -106,14 +88,8 @@ </el-col> <el-col :span="12"> <el-form-item label="濂栨儵鏃堕棿" prop="rewardPunishTime"> - <el-date-picker - v-model="form.rewardPunishTime" - format="yyyy-MM-dd HH:mm:ss" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="datetime" - value-format="yyyy-MM-dd HH:mm:ss"> + <el-date-picker v-model="form.rewardPunishTime" format="yyyy-MM-dd HH:mm:ss" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 100%" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -143,8 +119,8 @@ rewardPunishmentExport, rewardPunishmentPage } from "@/api/cnas/personal/personRewardPunishmentRecord"; -import {selectUserCondition} from "@/api/system/user"; -import {delCustomById} from "@/api/system/customer"; +import { selectUserCondition } from "@/api/system/user"; +import { delCustomById } from "@/api/system/customer"; export default { props: { @@ -235,12 +211,12 @@ async getPersonnelTraining() { const params = { userId: this.isDepartment ? '' : this.departId, - departmentId: this.isDepartment ? this.departId : '', - current: this.search.curent, - size: this.search.size, - userName: this.search.userName, - startTime: this.search.searchTimeList && this.search.searchTimeList[0], - endTime: this.search.searchTimeList && this.search.searchTimeList[1], + departmentId: this.isDepartment ? this.departId : '', + current: this.search.curent, + size: this.search.size, + userName: this.search.userName, + startTime: this.search.searchTimeList && this.search.searchTimeList[0], + endTime: this.search.searchTimeList && this.search.searchTimeList[1], } this.tableLoading = true rewardPunishmentPage(params).then(res => { @@ -251,14 +227,14 @@ this.tableLoading = false }) }, - addRow () { + addRow() { this.dialogVisible = true if (!this.isDepartment) { this.form.userId = this.departId this.selectUserChange(this.form.userId) } }, - handleDown(){ + handleDown() { this.outLoading = true rewardPunishmentExport({ userId: this.isDepartment ? '' : this.departId, @@ -272,7 +248,6 @@ type: 'application/force-download' }) this.$download.saveAs(blob, '濂栨儵璁板綍.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鑾峰彇璐熻矗浜轰俊鎭帴鍙� @@ -293,7 +268,7 @@ // 鎵撳紑琛ㄥ崟寮规 editForm(row) { this.dialogVisible = true - this.form = {...row}; + this.form = { ...row }; }, // 鎻愪氦琛ㄥ崟鏁版嵁 saveOrUpdate() { @@ -313,7 +288,7 @@ cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - deleteRewardPunishment({id: row.id}).then(res => { + deleteRewardPunishment({ id: row.id }).then(res => { if (res.code === 500) { return } @@ -322,7 +297,7 @@ }).catch(e => { this.$message.error('鍒犻櫎澶辫触') }) - }).catch(() => {}) + }).catch(() => { }) } }, diff --git a/src/views/CNAS/process/demand/index.vue b/src/views/CNAS/process/demand/index.vue index 9667ffa..da42835 100644 --- a/src/views/CNAS/process/demand/index.vue +++ b/src/views/CNAS/process/demand/index.vue @@ -4,19 +4,19 @@ <el-form :model="entitySearch" ref="entitySearch" size="small" :inline="true"> <el-form-item label="璇曟牱鍚嶇О" prop="sampleName"> <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entitySearch.sampleName" - @keyup.enter.native="refreshTable"></el-input> + @keyup.enter.native="refreshTable"></el-input> </el-form-item> <el-form-item label="濮旀墭鍗曚綅" prop="commissionUnit"> <el-input v-model="entitySearch.commissionUnit" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable()"></el-input> + @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item label="鐢熶骇鍗曚綅" prop="production"> <el-input v-model="entitySearch.production" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable()"></el-input> + @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item label="濮旀墭浜�" prop="commissionUser"> <el-input v-model="entitySearch.commissionUser" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable()"></el-input> + @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button> @@ -57,28 +57,26 @@ <el-button size="mini" type="text" @click="handleLook(scope.row)">鏌ョ湅</el-button> <el-button size="mini" style="color:#F56C6C" type="text" @click="deleteOrder(scope.row)">鍒犻櫎</el-button> <el-button size="mini" type="text" @click="openDownloadDia(scope.row)">涓嬭浇</el-button> - <el-upload ref='upload' - :action="action" - :data="{inspectionOrderId: scope.row.inspectionOrderId}" :headers="uploadHeader" - :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx' - name="file" style="background: transparent;display: inline;margin-left: 4px"> + <el-upload ref='upload' :action="action" :data="{ inspectionOrderId: scope.row.inspectionOrderId }" + :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" + accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx' name="file" + style="background: transparent;display: inline;margin-left: 4px"> <span style="color: #409EFF">涓婁紶</span> </el-upload> </template> </el-table-column> </el-table> - <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="total1" layout="->,total, sizes, prev, pager, next" - style="margin-top: 10px" background - @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> + <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total1" + layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange1" + @current-change="handleCurrentChange1"> </el-pagination> </div> - <el-dialog - :close-on-click-modal="false" :close-on-press-escape="false" - :visible.sync="orderRowsVisible" title="鏂板妫�楠屼换鍔″崟" width="1000px"> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="orderRowsVisible" + title="鏂板妫�楠屼换鍔″崟" width="1000px"> <div style="display: flex; align-items: center;margin-bottom: 10px"> <span style="width: 80px">濮旀墭缂栧彿锛�</span> - <el-input v-model="entity.entrustCode" clearable size="small" style="width: 300px;margin-right: 10px"></el-input> + <el-input v-model="entity.entrustCode" clearable size="small" + style="width: 300px;margin-right: 10px"></el-input> <el-button size="small" type="primary" @click="searchTableData">鏌ヨ</el-button> <el-button size="small" @click="refreshTableData">閲� 缃�</el-button> </div> @@ -92,16 +90,13 @@ </template> </el-table-column> </el-table> - <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="total" layout="->,total, sizes, prev, pager, next" - style="margin-top: 10px" background - @size-change="handleSizeChange" @current-change="handleCurrentChange"> + <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total" + layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange" + @current-change="handleCurrentChange"> </el-pagination> </el-dialog> - <el-dialog - :class="{downPdf:title=='涓嬭浇'}" :close-on-click-modal="false" - :close-on-press-escape="false" - :modal="title!='涓嬭浇'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px"> + <el-dialog :class="{ downPdf: title == '涓嬭浇' }" :close-on-click-modal="false" :close-on-press-escape="false" + :modal="title != '涓嬭浇'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px"> <div style="max-height: 75vh;overflow-y: auto;"> <div id="dialogBody"> <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;"> @@ -132,27 +127,23 @@ <span style="width: 100px">濮旀墭缂栧彿锛�</span> <el-input v-model="currentInfo.entrustCode" clearable size="small"></el-input> </p> - <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{ currentInfo.entrustCode }}</p> + <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{ + currentInfo.entrustCode }} + </p> <table border="1" cellpadding="10" class="tables"> <tr> <td colspan="2"> <p>璇曟牱鍚嶇О</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.sampleName }}</td> <td> <p>濮旀墭鏃堕棿</p> </td> <td v-if="operationType !== 'view'"> - <el-date-picker - v-model="currentInfo.commissionDate" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="currentInfo.commissionDate" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> @@ -161,37 +152,46 @@ <td colspan="2"> <p>鍨� 鍙�</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable + size="small"></el-input> + </td> <td v-if="operationType === 'view'">{{ currentInfo.modelNo }}</td> <td> <p>濮旀墭鍗曚綅</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.commissionUnit }}</td> </tr> <tr> <td colspan="2"> <p>鐢熶骇鍗曚綅</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.production }}</td> <td> <p>濮旀墭浜�</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.commissionUser }}</td> </tr> <tr> <td colspan="2"> <p>鏍峰搧鏁伴噺</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.quantity }}</td> <td> <p>鏍峰搧鐘舵��</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable size="small"></el-input></td> - <td v-if="operationType === 'view'">{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable + size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ + insStateList.find(m => m.value == currentInfo.sampleStatus) ? insStateList.find(m => m.value == currentInfo.sampleStatus).label:'/' + }}</td> </tr> <tr> <td colspan="2"> @@ -204,7 +204,7 @@ </el-radio-group> </td> <td v-if="operationType === 'view'"> - <span v-if="currentInfo.isLeave==1">鏄�</span> + <span v-if="currentInfo.isLeave == 1">鏄�</span> <span v-else>鍚�</span> </td> <td> @@ -217,7 +217,7 @@ </el-radio-group> </td> <td v-if="operationType === 'view'"> - <span v-if="currentInfo.processing==0">濮旀墭鍗曚綅鍙栧洖</span> + <span v-if="currentInfo.processing == 0">濮旀墭鍗曚綅鍙栧洖</span> <span v-else>瀹為獙瀹ゅ鐞�</span> </td> </tr> @@ -226,15 +226,8 @@ <p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p> </td> <td v-if="operationType !== 'view'"> - <el-date-picker - v-model="currentInfo.appointed" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="currentInfo.appointed" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.appointed }}</td> @@ -248,11 +241,12 @@ </el-radio-group> </td> <td v-if="operationType === 'view'"> - <span v-if="currentInfo.send==1">鑷彇</span> + <span v-if="currentInfo.send == 1">鑷彇</span> <span v-else>鍏朵粬</span> </td> </tr> - <el-button size="small" type="primary" @click="addOrderDetailList" v-if="operationType !== 'view'">娣诲姞</el-button> + <el-button size="small" type="primary" @click="addOrderDetailList" + v-if="operationType !== 'view'">娣诲姞</el-button> <tr> <td> <p>搴忓彿</p> @@ -270,15 +264,21 @@ <p>澶囨敞</p> </td> </tr> - <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" > - <td>{{ index+1 }}</td> - <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable size="small"></el-input></td> + <tr v-for="(item, index) in currentInfo.orderDetailList" :key="index"> + <td>{{ index + 1 }}</td> + <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable + size="small"></el-input> + </td> <td v-if="operationType === 'view'">{{ item.sampleNumber }}</td> - <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input> + </td> <td v-if="operationType === 'view'">{{ item.testItem }}</td> - <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable + size="small"></el-input> + </td> <td v-if="operationType === 'view'">{{ item.testStandard }}</td> - <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input> + </td> <td v-if="operationType === 'view'">{{ item.remark }}</td> </tr> <tr> @@ -290,35 +290,30 @@ <el-radio :label="0">涓嶈�冭檻涓嶇‘瀹氬害</el-radio> <el-radio :label="1">鑰冭檻涓嶇‘瀹氬害</el-radio> </el-radio-group> - <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>%</span> + <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark" + clearable size="small" style="width: 60px"></el-input>%</span> </td> <td v-if="operationType === 'view'" colspan="3"> - <span v-if="currentInfo.criterionRule===0">涓嶈�冭檻涓嶇‘瀹氬害</span> - <span v-if="currentInfo.criterionRule===1">鑰冭檻涓嶇‘瀹氬害</span> - <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span> + <span v-if="currentInfo.criterionRule === 0">涓嶈�冭檻涓嶇‘瀹氬害</span> + <span v-if="currentInfo.criterionRule === 1">鑰冭檻涓嶇‘瀹氬害</span> + <span v-if="currentInfo.criterionRule === 1">{{ currentInfo.criterionRuleRemark + '%' }}</span> </td> </tr> <tr> <td colspan="2"> <p>濮旀墭浜虹鍚�</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'"> - {{currentInfo.commissionUser}} + {{ currentInfo.commissionUser }} </td> <td> <p>濮旀墭鏃ユ湡</p> </td> <td v-if="operationType !== 'view'"> - <el-date-picker - v-model="currentInfo.commissionDate" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="currentInfo.commissionDate" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> @@ -327,28 +322,23 @@ <td colspan="2"> <p>濮旀墭浜鸿仈绯荤數璇�</p> </td> - <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'" colspan="3">{{ currentInfo.commissionPhone }}</td> </tr> <tr> <td colspan="2"> <p>缁煎悎瀹ょ鍚�</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input></td> - <td v-if="operationType === 'view'">{{currentInfo.generalOfficeUser}}</td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable + size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.generalOfficeUser }}</td> <td> <p>鎺ユ敹鏃ユ湡</p> </td> <td v-if="operationType !== 'view'"> - <el-date-picker - v-model="currentInfo.receiptData" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="currentInfo.receiptData" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.receiptData }}</td> @@ -357,21 +347,15 @@ <td colspan="2"> <p>棰嗘牱鍛樼鍚�</p> </td> - <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input></td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable + size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.sampleTakerUser }}</td> <td> <p>棰嗘牱鏃ユ湡</p> </td> <td v-if="operationType !== 'view'"> - <el-date-picker - v-model="currentInfo.sampleData" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="currentInfo.sampleData" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.sampleData }}</td> @@ -400,8 +384,10 @@ </div> <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer"> <el-button @click="detailDialogVisible = false">鍙� 娑�</el-button> - <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">纭� 瀹�</el-button> - <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭� 瀹�</el-button> + <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">纭� + 瀹�</el-button> + <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭� + 瀹�</el-button> </span> </el-dialog> <el-dialog :visible.sync="downloadDialog" title="涓嬭浇" width="600px"> @@ -424,22 +410,22 @@ updateInspectionOrder } from "@/api/cnas/process/demand/demand"; import limsTable from "@/components/Table/lims-table.vue"; -import {selectUserCondition} from "@/api/business/inspectionTask"; +import { selectUserCondition } from "@/api/business/inspectionTask"; export default { name: "a7-Inspection-Order-Form", - components: {limsTable}, + components: { limsTable }, data() { return { - title:'妫�楠屽鎵樺崟', - detailDialogVisible:false, - addLoading:false, - outLoading:false, - currentInfo:{ + title: '妫�楠屽鎵樺崟', + detailDialogVisible: false, + addLoading: false, + outLoading: false, + currentInfo: { orderDetailList: [] }, - personList:[], - insStateList:[ + personList: [], + insStateList: [ { label: '寰呭鏍�', value: 0 @@ -501,7 +487,7 @@ } }, methods: { - addOrderDetailList () { + addOrderDetailList() { if (this.currentInfo.orderDetailList == null) { this.currentInfo.orderDetailList = [] } @@ -542,14 +528,14 @@ this.refreshTable() }, // 鎵撳紑鏂板寮规 - goAdd () { + goAdd() { this.operationType = 'add' this.title = '鏂板妫�楠屽鎵樺崟'; this.orderRowsVisible = true this.searchTableData() }, // 鏌ヨ鍙柊澧炵殑妫�楠屽崟 - searchTableData () { + searchTableData() { this.tableLoading = true getInsOrderOnInspection({ ...this.tableSearch, @@ -563,7 +549,7 @@ }) }, // 閲嶇疆妫�楠屽崟鍒楄〃 - refreshTableData () { + refreshTableData() { this.entity = { entrustCode: '' } @@ -592,7 +578,7 @@ this.refreshTable(); }, // 鎻愪氦鏂板 - handleAdd () { + handleAdd() { this.buttonLoading = true addInspectionOrder(this.currentInfo).then(res => { this.buttonLoading = false @@ -605,7 +591,7 @@ }) }, // 鎻愪氦淇敼 - handleEdit () { + handleEdit() { this.buttonLoading = true updateInspectionOrder(this.currentInfo).then(res => { this.buttonLoading = false @@ -619,8 +605,8 @@ }) }, // 鏌ヨ闇�瑕佹柊澧炵殑濮旀墭鍗曡鎯� - goAddOrder (row) { - getInspectionOrderByInsOderId({insOrderId: row.id}).then(res => { + goAddOrder(row) { + getInspectionOrderByInsOderId({ insOrderId: row.id }).then(res => { this.currentInfo = res.data this.title = '鏂板妫�楠屽鎵樺崟'; this.detailDialogVisible = true @@ -629,9 +615,9 @@ }) }, // 鎵撳紑缂栬緫寮规 - goUpdate (row) { + goUpdate(row) { this.operationType = 'edit' - getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { + getInspectionOrderOne({ inspectionOrderId: row.inspectionOrderId }).then(res => { this.currentInfo = res.data this.title = '缂栬緫妫�楠屽鎵樺崟'; this.detailDialogVisible = true @@ -640,9 +626,9 @@ }) }, // 鏌ョ湅 - handleLook(row){ + handleLook(row) { this.operationType = 'view' - getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { + getInspectionOrderOne({ inspectionOrderId: row.inspectionOrderId }).then(res => { this.currentInfo = res.data this.title = '鏌ョ湅妫�楠屽鎵樺崟'; this.detailDialogVisible = true @@ -651,13 +637,13 @@ }) }, // 鍒犻櫎 - deleteOrder (row) { + deleteOrder(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - delInspectionOrder({inspectionOrderId: row.inspectionOrderId}).then(res => { + delInspectionOrder({ inspectionOrderId: row.inspectionOrderId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�'); this.refreshTable(); }); @@ -669,12 +655,12 @@ }); }, // 鎵撳紑涓嬭浇寮规 - openDownloadDia (row) { + openDownloadDia(row) { this.downloadDialog = true this.download = row }, // 濮旀墭鍗曚笅杞� - orderFormDown () { + orderFormDown() { let url = this.download.fileUrl; const link = document.createElement('a'); link.href = this.javaApi + url; @@ -683,20 +669,19 @@ link.click(); }, // 濮旀墭鎶ュ憡涓嬭浇 - orderReportDown () { + orderReportDown() { this.outLoading = true; - exportInspectionOrder({inspectionOrderId: this.download.inspectionOrderId}).then(res => { + exportInspectionOrder({ inspectionOrderId: this.download.inspectionOrderId }).then(res => { this.outLoading = false; const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '妫�楠屽鎵樺崟.docx') - this.$message.success('瀵煎嚭鎴愬姛'); }).catch(err => { this.outLoading = false; }) }, // 涓婁紶 - handleSuccessUp(response, ) { + handleSuccessUp(response,) { if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); this.refreshTable() @@ -733,5 +718,4 @@ } </script> -<style scoped> -</style> +<style scoped></style> diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue index 024cb58..16690fe 100644 --- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue +++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue @@ -5,9 +5,8 @@ <div style="display: flex;justify-content: space-between;"> <el-form :model="yearForm" ref="yearForm" size="small" :inline="true"> <el-form-item label="璁″垝鍚嶇О" prop="monitorName"> - <el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="yearForm.monitorName" - @keyup.enter.native="getYearPlanList"></el-input> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="yearForm.monitorName" + @keyup.enter.native="getYearPlanList"></el-input> </el-form-item> <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="clearYear">閲� 缃�</el-button> @@ -19,8 +18,7 @@ </div> </div> <lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading" - height="40vh" @pagination="pagination" :rowClick="rowClick" - key="yearTableData"></lims-table> + height="40vh" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table> </div> <div style="margin-top: 20px"> <div style="display: flex;justify-content: space-between;"> @@ -40,14 +38,16 @@ <el-button size="small" type="primary" @click="showDialog('add')">鏂板</el-button> </div> </div> - <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage" :tableLoading="yearDetailLoading" - height="40vh" @pagination="pagination1" - key="yearDetailTableData"></lims-table> + <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage" + :tableLoading="yearDetailLoading" height="40vh" @pagination="pagination1" + key="yearDetailTableData"></lims-table> </div> <!--鏂板淇敼寮规--> - <detail-form-dialog v-if="formDia" ref="formDia" :qualityMonitorId="qualityMonitorId" @closeDia="closeDia"></detail-form-dialog> + <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> + <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"> @@ -57,8 +57,7 @@ </span> <span style="margin-top: 10px;display: inline-block"> 鎵瑰噯浜猴細 - <el-select v-model="examineInfo.ratifyUserId" clearable - filterable size="small" style="width: 70%;"> + <el-select v-model="examineInfo.ratifyUserId" clearable filterable size="small" style="width: 70%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -79,16 +78,13 @@ </span> </el-dialog> <!--棰勮鎶ュ憡--> - <el-dialog - :visible.sync="lookDialogVisible" - fullscreen - title="鏌ョ湅闄勪欢" top="5vh" width="800px"> + <el-dialog :visible.sync="lookDialogVisible" fullscreen title="鏌ョ湅闄勪欢" top="5vh" width="800px"> <filePreview v-if="lookDialogVisible" :currentFile="{}" - :fileUrl="javaApi+'/word/' + currentInfo.finishReportUrl" style="height: 70vh;overflow-y: auto;"/> + :fileUrl="javaApi + '/word/' + currentInfo.finishReportUrl" style="height: 70vh;overflow-y: auto;" /> <div> 鎵瑰噯鐘舵�侊細 - <el-tag v-if="this.ratifyStatus === 1" type="success">鎵瑰噯</el-tag> - <el-tag v-if="this.ratifyStatus === 0" type="danger">涓嶆壒鍑�</el-tag> + <el-tag v-if="this.ratifyStatus === 1" type="success">鎵瑰噯</el-tag> + <el-tag v-if="this.ratifyStatus === 0" type="danger">涓嶆壒鍑�</el-tag> </div> <div> 鎵瑰噯鎰忚锛� @@ -101,42 +97,36 @@ </el-dialog> <el-dialog :visible.sync="downloadDialog" title="瀵煎嚭" width="600px"> <span> - <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId" @click="controlDown">瀹炴柦璁″垝瀵煎嚭</el-button> - <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId" @click="processingDown">璇勪环瀵煎嚭</el-button> + <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId" + @click="controlDown">瀹炴柦璁″垝瀵煎嚭</el-button> + <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId" + @click="processingDown">璇勪环瀵煎嚭</el-button> </span> <span slot="footer" class="dialog-footer"> <el-button @click="downloadDialog = false">鍙� 娑�</el-button> </span> </el-dialog> <!--瀵煎叆璁″垝--> - <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px" :close-on-click-modal="false" :close-on-press-escape="false"> + <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px" :close-on-click-modal="false" + :close-on-press-escape="false"> <div style="display: flex; align-items: center;"> <span style="width: 60px">骞翠唤锛�</span> - <el-date-picker - v-model="planYear" - type="year" - value-format="yyyy" - clearable - size="small" - format="yyyy" + <el-date-picker v-model="planYear" type="year" value-format="yyyy" clearable size="small" format="yyyy" placeholder="閫夋嫨骞�"> </el-date-picker> </div> <div style="display: flex;align-items: center;margin: 10px 0"> <div style="width: 60px">瀹℃牳浜猴細</div> - <el-select v-model="examineUserId" clearable - filterable size="small" style="width: 50%;"> + <el-select v-model="examineUserId" clearable filterable size="small" style="width: 50%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </div> <div style="margin: 0 auto;"> - <el-upload ref="upload" :action="action" :auto-upload="false" :file-list="fileList" - :headers="uploadHeader" :limit="1" - accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' - :on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag - :data="{planYear: planYear, examineUserId: examineUserId}" - name="file"> + <el-upload ref="upload" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader" + :limit="1" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' + :on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag + :data="{ planYear: planYear, examineUserId: examineUserId }" name="file"> <i class="el-icon-upload"></i> <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> </el-upload> @@ -153,11 +143,10 @@ <el-input v-model="ratifyRemark" :disabled="this.ratifyStatus === 1" type="textarea"></el-input> </div> <div style="margin: 0 auto;"> - <el-upload ref="upload1" :action="action1" :auto-upload="false" :data="{qualityMonitorDetailsId: qualityMonitorDetailsId}" :file-list="fileList1" :headers="uploadHeader" - :limit="1" - :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx' - drag - name="file"> + <el-upload ref="upload1" :action="action1" :auto-upload="false" + :data="{ qualityMonitorDetailsId: qualityMonitorDetailsId }" :file-list="fileList1" :headers="uploadHeader" + :limit="1" :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx' drag + name="file"> <i class="el-icon-upload"></i> <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> </el-upload> @@ -183,13 +172,13 @@ pageQualityMonitor, pageQualityMonitorDetail, ratifyFinishReport, ratifyQualityMonitor } from "@/api/cnas/process/ensureResults/qualityMonitor"; -import {selectUserCondition} from "@/api/performance/class"; -import {mapGetters} from "vuex"; +import { selectUserCondition } from "@/api/performance/class"; +import { mapGetters } from "vuex"; export default { name: 'a7-Ensure-results-validity', // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: {limsTable, filePreview, EvaluateDialog, CarryOutDialog, DetailFormDialog }, + components: { limsTable, filePreview, EvaluateDialog, CarryOutDialog, DetailFormDialog }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { @@ -251,7 +240,7 @@ label: '瀹℃牳鏃ユ湡', prop: 'examineTime', minWidth: '160' - },{ + }, { dataType: 'tag', label: '鎵瑰噯鐘舵��', prop: 'ratifyStatus', @@ -274,15 +263,15 @@ return null; } } - },{ + }, { label: '鎵瑰噯鍐呭', prop: 'ratifyRemark', minWidth: '100' - },{ + }, { label: '鎵瑰噯浜�', prop: 'ratifyName', minWidth: '100' - },{ + }, { label: '鎵瑰噯鏃ユ湡', prop: 'ratifyTime', minWidth: '160' @@ -342,7 +331,7 @@ this.delPlan(row) }, disabled: (row) => { - if(row.examineStatus === 1) { + if (row.examineStatus === 1) { return true; } else { return false; @@ -379,11 +368,11 @@ label: '棰勭畻锛堝厓锛�', prop: 'budget', minWidth: '150px' - },{ + }, { label: '缁勭粐浜哄憳', prop: 'organization', minWidth: '150px' - },{ + }, { label: '鐩戞帶鏂瑰紡', prop: 'monitorWay', minWidth: '150px' @@ -480,7 +469,7 @@ // 鏂规硶闆嗗悎 methods: { // 鏌ヨ骞村害璁″垝琛� - getYearPlanList () { + getYearPlanList() { const entity = { monitorName: this.yearForm.monitorName, } @@ -498,7 +487,7 @@ this.yearLoading = false }) }, - clearYear () { + clearYear() { this.yearForm.monitorName = '' this.getYearPlanList() }, @@ -512,7 +501,7 @@ this.yearDetailPage.size = limit; this.getYearPlanList(); }, - leadInto () { + leadInto() { this.uploadDia = true this.getUserList() }, @@ -545,7 +534,7 @@ this.$message.error(response.msg) } }, - submitUpload () { + submitUpload() { if (!this.planYear) { this.$message.warning('璇烽�夋嫨骞翠唤') return; @@ -558,12 +547,12 @@ }, // end // 瀹℃牳 - examinePlan (row) { + examinePlan(row) { this.examineDialog = true this.examineInfo = row this.getUserList() }, - handleReview (examineStatus) { + handleReview(examineStatus) { // 瀹℃牳鐘舵�� , 0 涓嶉�氳繃, 1閫氳繃 this.examineInfo.examineStatus = examineStatus this.examineLoading = true @@ -576,17 +565,17 @@ this.examineLoading = false }) }, - closeExamineDia () { + closeExamineDia() { this.examineDialog = false this.examineInfo.examineRemark = '' this.getYearPlanList() }, // 鎵瑰噯 - approvalPlan (row) { + approvalPlan(row) { this.ratifyDialog = true this.ratifyInfo = row }, - handleRatify (ratifyStatus) { + handleRatify(ratifyStatus) { // 鎵瑰噯鐘舵�� , 0 涓嶉�氳繃, 1閫氳繃 this.ratifyInfo.ratifyStatus = ratifyStatus this.ratifyLoading = true @@ -599,13 +588,13 @@ this.ratifyLoading = false }) }, - closeRatifyDia () { + closeRatifyDia() { this.ratifyDialog = false this.ratifyInfo.ratifyRemark = '' this.getYearPlanList() }, // 鎵瑰噯鎶ュ憡 - handleApproval (status) { + handleApproval(status) { const personTrainingUpdateDto = { qualityMonitorDetailsId: this.currentInfo.qualityMonitorDetailsId, ratifyRemark: this.ratifyRemark, @@ -624,23 +613,22 @@ }) }, // 瀵煎嚭 - handleDown (row) { - exportQualityMonitorDetail({qualityMonitorId: row.qualityMonitorId}).then(res => { + handleDown(row) { + exportQualityMonitorDetail({ qualityMonitorId: row.qualityMonitorId }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, row.monitorName + '.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鍒犻櫎杩涘害璁″垝琛� - delPlan (row) { + delPlan(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.yearLoading = true - delQualitySupervise({qualityMonitorId: row.qualityMonitorId}).then(res => { + delQualitySupervise({ qualityMonitorId: row.qualityMonitorId }).then(res => { this.yearLoading = false this.$message.success('鍒犻櫎鎴愬姛') this.getYearPlanList() @@ -661,7 +649,7 @@ this.getYearDetailPlanList() }, // 鑾峰彇骞村害鏄庣粏琛� - getYearDetailPlanList () { + getYearDetailPlanList() { const entity = { qualityMonitorId: this.qualityMonitorId, monitorPurpose: this.yearDetailForm.monitorPurpose, @@ -679,7 +667,7 @@ }) }, // 閲嶇疆鏄庣粏琛� - clearDetail () { + clearDetail() { this.yearDetailForm = { monitorPurpose: '', monitorProject: '' @@ -687,18 +675,18 @@ this.getYearDetailPlanList() }, // 鏄庣粏琛ㄥ疄鏂� - carryOut (row) { + carryOut(row) { this.carryOutDia = true this.$nextTick(() => { this.$refs.carryOutDia.openDia(row) }) }, - closeCarryOutDia () { + closeCarryOutDia() { this.carryOutDia = false this.getYearDetailPlanList() }, // 鎵撳紑瀹屾垚鎶ュ憡寮规 - record (row) { + record(row) { this.qualityMonitorDetailsId = row.qualityMonitorDetailsId this.ratifyRemark = row.ratifyRemark if (row.finishReportUrl) { @@ -745,58 +733,56 @@ }, // end // 鎵撳紑璇勪环寮规 - evaluate (row) { + evaluate(row) { this.evaluateDialog = true this.$nextTick(() => { this.$refs.evaluateDialog.openDia(row) }) }, - closeEvaDia () { + closeEvaDia() { this.evaluateDialog = false this.getYearDetailPlanList() }, // 鎵撳紑瀵煎嚭寮规 - downLoadPost (row) { + downLoadPost(row) { this.downloadDialog = true this.download = row }, // 鎵撳紑骞村害鏄庣粏鏂板銆佷慨鏀瑰脊妗� - showDialog (type, row) { + showDialog(type, row) { this.formDia = true this.$nextTick(() => { this.$refs.formDia.openDia(type, row) }) }, - closeDia () { + closeDia() { this.formDia = false this.getYearDetailPlanList() }, // 鎺у埗鍗曞鍑� controlDown() { - exportQualityMonitorRatify({qualityMonitorDetailsId: this.download.qualityMonitorDetailsId}).then(res => { + exportQualityMonitorRatify({ qualityMonitorDetailsId: this.download.qualityMonitorDetailsId }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '璐ㄩ噺鐩戞帶瀹炴柦璁″垝.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 澶勭悊鍗曞鍑� processingDown() { - exportQualityMonitorEvaluate({qualityMonitorDetailsId: this.download.qualityMonitorDetailsId}).then(res => { + exportQualityMonitorEvaluate({ qualityMonitorDetailsId: this.download.qualityMonitorDetailsId }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '璐ㄩ噺鐩戞帶璇勪环.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, - delYearPlanDetail (row) { + delYearPlanDetail(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.yearDetailLoading = true - delQualityMonitorDetail({qualityMonitorDetailsId: row.qualityMonitorDetailsId}).then(res => { + delQualityMonitorDetail({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => { this.yearDetailLoading = false this.$message.success('鍒犻櫎鎴愬姛') this.getYearDetailPlanList() @@ -829,6 +815,4 @@ }; </script> -<style scoped> - -</style> +<style scoped></style> diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue index f25e0a1..895265f 100644 --- a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue +++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue @@ -5,9 +5,8 @@ <div style="display: flex;justify-content: space-between;"> <el-form :model="yearForm" ref="yearForm" size="small" :inline="true"> <el-form-item label="璁″垝鍚嶇О" prop="superviseName"> - <el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="yearForm.superviseName" - @keyup.enter.native="getYearPlanList"></el-input> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="yearForm.superviseName" + @keyup.enter.native="getYearPlanList"></el-input> </el-form-item> <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="clearYear">閲� 缃�</el-button> @@ -19,8 +18,7 @@ </div> </div> <lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading" - height="40vh" @pagination="pagination" :rowClick="rowClick" - key="yearTableData"></lims-table> + height="40vh" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table> </div> <div style="margin-top: 20px"> <div style="display: flex;justify-content: space-between;"> @@ -46,18 +44,22 @@ <el-button size="small" type="primary" @click="showDialog('add')">鏂板</el-button> </div> </div> - <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage" :tableLoading="yearDetailLoading" - height="40vh" @pagination="pagination1" - key="yearDetailTableData"></lims-table> + <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage" + :tableLoading="yearDetailLoading" height="40vh" @pagination="pagination1" + key="yearDetailTableData"></lims-table> </div> <!--鏂板淇敼寮规--> - <detail-form-dialog v-if="formDia" ref="formDia" :superviseId="superviseId" @closeDia="closeDia"></detail-form-dialog> + <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> + <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> + <processing-sheet v-if="processingDia" ref="processingDia" :superviseId="superviseId" + @closeProcessingDia="closeProcessingDia"></processing-sheet> <!--绾犳澶勭悊娴佺▼寮规--> - <rectify-dialog-new v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId" @closeProcessingDia="closeRectifyDia"></rectify-dialog-new> + <rectify-dialog-new v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId" + @closeProcessingDia="closeRectifyDia"></rectify-dialog-new> <el-dialog :visible.sync="ratifyDialog" title="鎵瑰噯" width="30%" @close="closeRatifyDia"> <span> 鎵瑰噯澶囨敞锛� @@ -68,54 +70,43 @@ <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> + <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-button @click="downloadDialog = false">鍙� 娑�</el-button> + </span> </el-dialog> <!--瀵煎叆璁″垝--> - <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px" - :close-on-click-modal="false" :close-on-press-escape="false"> + <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px" :close-on-click-modal="false" + :close-on-press-escape="false"> <div style="display: flex; align-items: center;"> <span style="width: 80px">骞翠唤锛�</span> - <el-date-picker - v-model="superviseYear" - type="year" - value-format="yyyy" - clearable - size="small" - format="yyyy" + <el-date-picker v-model="superviseYear" type="year" value-format="yyyy" clearable size="small" format="yyyy" placeholder="閫夋嫨骞�"> </el-date-picker> - <span style="width: 110px">鐩戠潱鍛橈細</span> - <el-select v-model="recordUserIds" placeholder="璇烽�夋嫨" size="small" - @change="splitList" - :multiple-limit="2" filterable multiple style="width: 100%"> + <span style="width: 110px">鐩戠潱鍛橈細</span> + <el-select v-model="recordUserIds" placeholder="璇烽�夋嫨" size="small" @change="splitList" :multiple-limit="2" + filterable multiple style="width: 100%"> <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> </el-select> </div> <div style="display: flex;align-items: center;margin: 10px 0"> <div style="width: 60px">鎵瑰噯浜猴細</div> - <el-select v-model="ratifyUserId" clearable - filterable size="small" style="width: 50%;"> + <el-select v-model="ratifyUserId" clearable filterable size="small" style="width: 50%;"> <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </div> <div style="margin: 0 auto;"> - <el-upload ref="upload1" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader" :limit="1" - accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' - :on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag - :data="{recordUserIds: recordUserIds1, superviseYear: superviseYear, ratifyUserId: ratifyUserId}" - name="file"> + <el-upload ref="upload1" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader" + :limit="1" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' + :on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag + :data="{ recordUserIds: recordUserIds1, superviseYear: superviseYear, ratifyUserId: ratifyUserId }" + name="file"> <i class="el-icon-upload"></i> <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> </el-upload> @@ -141,13 +132,13 @@ ratifyQualitySupervise, superviseDetailAccordingExport, exportSuperviseDetaillCorrect } from "@/api/cnas/process/ensureResults/qualitySupervise"; -import {selectUserCondition} from "@/api/business/inspectionTask"; -import {mapGetters} from "vuex"; +import { selectUserCondition } from "@/api/business/inspectionTask"; +import { mapGetters } from "vuex"; export default { name: 'a7-quality-control-plan', // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: {limsTable, RectifyDialogNew, ProcessingSheet, RecordsDialog, DetailFormDialog}, + components: { limsTable, RectifyDialogNew, ProcessingSheet, RecordsDialog, DetailFormDialog }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { @@ -195,15 +186,15 @@ return null; } } - },{ + }, { label: '鎵瑰噯鍐呭', prop: 'ratifyRemark', minWidth: '100' - },{ + }, { label: '鎵瑰噯浜�', prop: 'ratifyUserName', minWidth: '100' - },{ + }, { label: '鎵瑰噯鏃ユ湡', prop: 'ratifyTime', minWidth: '160' @@ -287,11 +278,11 @@ label: '鐩戠潱鍘熷洜', prop: 'superviseReason', minWidth: '150px' - },{ + }, { label: '澶囨敞', prop: 'remark', minWidth: '150px' - },{ + }, { dataType: 'action', width: '260', label: '鎿嶄綔', @@ -390,7 +381,7 @@ // 鏂规硶闆嗗悎 methods: { // 鏌ヨ骞村害璁″垝琛� - getYearPlanList () { + getYearPlanList() { const entity = { superviseName: this.yearForm.superviseName, } @@ -408,7 +399,7 @@ this.yearLoading = false }) }, - clearYear () { + clearYear() { this.yearForm.superviseName = '' this.getYearPlanList() }, @@ -446,7 +437,7 @@ }, 1000) } }, - splitList (val) { + splitList(val) { const string = this.HaveJson(val) this.recordUserIds1 = string.join(','); console.log(this.recordUserIds1) @@ -469,7 +460,7 @@ this.$refs.upload1.submit(); }, // 鍏抽棴瀵煎叆寮规 - closeUploadDia () { + closeUploadDia() { this.uploadDia = false; this.recordUserIds = [] this.ratifyUserId = '' @@ -477,21 +468,21 @@ this.getYearPlanList() }, // 鎵撳紑鎶ュ憡寮规 - record (row) { + record(row) { this.uploadDia = true this.getUserList() }, - getUserList(){ + getUserList() { selectUserCondition({ type: 0 }).then((res) => { this.userList = res.data; }) }, // 鎵瑰噯 - approvalPlan (row) { + approvalPlan(row) { this.ratifyDialog = true this.ratifyInfo = row }, - handleRatify (ratifyStatus) { + handleRatify(ratifyStatus) { // 鎵瑰噯鐘舵�� , 0 涓嶉�氳繃, 1閫氳繃 this.ratifyInfo.ratifyStatus = ratifyStatus this.ratifyLoading = true @@ -504,33 +495,32 @@ this.ratifyLoading = false }) }, - closeRatifyDia () { + closeRatifyDia() { this.ratifyDialog = false this.ratifyInfo.ratifyRemark = '' this.getYearPlanList() }, // 瀵煎嚭 - handleDown (row) { - exportQualitySupervise({superviseId: row.superviseId}).then(res => { + handleDown(row) { + exportQualitySupervise({ superviseId: row.superviseId }).then(res => { try { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, row.superviseName + '.docx') - this.$message.success('瀵煎嚭鎴愬姛') } catch (error) { console.error('鍒涘缓Blob瀵硅薄鏃跺嚭閿�:', error); } }) }, // 鍒犻櫎杩涘害璁″垝琛� - delPlan (row) { + delPlan(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.yearLoading = true - delQualitySupervise({superviseId: row.superviseId}).then(res => { + delQualitySupervise({ superviseId: row.superviseId }).then(res => { this.yearLoading = false this.$message.success('鍒犻櫎鎴愬姛') this.getYearPlanList() @@ -551,7 +541,7 @@ this.getYearDetailPlanList() }, // 鑾峰彇骞村害鏄庣粏琛� - getYearDetailPlanList () { + getYearDetailPlanList() { const entity = { superviseId: this.superviseId, supervisePurpose: this.yearDetailForm.supervisePurpose, @@ -570,7 +560,7 @@ }) }, // 閲嶇疆鏄庣粏琛� - clearDetail () { + clearDetail() { this.yearDetailForm = { supervisePurpose: '', superviseProject: '' @@ -578,91 +568,88 @@ this.getYearDetailPlanList() }, // 鎵撳紑骞村害鏄庣粏鏂板銆佷慨鏀瑰脊妗� - showDialog (type, row) { + showDialog(type, row) { this.formDia = true this.$nextTick(() => { this.$refs.formDia.openDia(type, row) }) }, - closeDia () { + closeDia() { this.formDia = false this.getYearDetailPlanList() }, // 璁板綍娴佺▼ - records (row) { + records(row) { this.recordsDia = true this.$nextTick(() => { this.$refs.recordsDia.openDia(row) }) }, - closeRecordsDia () { + closeRecordsDia() { this.recordsDia = false this.getYearDetailPlanList() }, // 涓嶇鍚堟祦绋嬪脊妗� - processing (row) { + processing(row) { this.processingDia = true this.$nextTick(() => { this.$refs.processingDia.openDia(row) }) }, - closeProcessingDia () { + closeProcessingDia() { this.processingDia = false this.getYearDetailPlanList() }, // 绾犳娴佺▼寮规 - rectify (row) { + rectify(row) { this.rectifyDia = true this.$nextTick(() => { this.$refs.rectifyDia.openDia(row) }) }, - closeRectifyDia () { + closeRectifyDia() { this.rectifyDia = false this.getYearDetailPlanList() }, // 鎵撳紑瀵煎嚭寮规 - openDownloadDia (row) { + openDownloadDia(row) { this.downloadDialog = true this.download = row }, // 瀵煎嚭璁板綍 - controlDown () { - exportSuperviseDetailRecord({superviseDetailsId: this.download.superviseDetailsId}).then(res => { + controlDown() { + exportSuperviseDetailRecord({ superviseDetailsId: this.download.superviseDetailsId }).then(res => { const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '璁板綍瀵煎嚭.docx') - this.$message.success('瀵煎嚭鎴愬姛') }).catch(err => { console.log('err---', err); }) }, // 澶勭悊鍗曞鍑� - processingDown () { - superviseDetailAccordingExport({superviseDetailsId: this.download.superviseDetailsId}).then(res => { + processingDown() { + superviseDetailAccordingExport({ superviseDetailsId: this.download.superviseDetailsId }).then(res => { const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '涓嶇鍚堥」瀵煎嚭.docx') - this.$message.success('瀵煎嚭鎴愬姛') }).catch(err => { console.log('err---', err); }) }, // 绾犳鍗曞鍑� - supervisoryDown () { - exportSuperviseDetaillCorrect({superviseDetailsCorrectId: this.download.superviseDetailsCorrectId}).then(res => { + supervisoryDown() { + exportSuperviseDetaillCorrect({ superviseDetailsCorrectId: this.download.superviseDetailsCorrectId }).then(res => { const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鐩戠潱绾犳鎺柦.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鍒犻櫎骞村害璇︽儏鍒楄〃 - delYearPlanDetail (row) { + delYearPlanDetail(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.yearDetailLoading = true - delQualitySuperviseDetail({superviseDetailsId: row.superviseDetailsId}).then(res => { + delQualitySuperviseDetail({ superviseDetailsId: row.superviseDetailsId }).then(res => { this.yearDetailLoading = false this.$message.success('鍒犻櫎鎴愬姛') this.getYearDetailPlanList() @@ -687,6 +674,7 @@ .table-card { background-color: #ffffff; } + .flex_column { display: flex; height: 80vh; diff --git a/src/views/CNAS/process/method/methodVerification/component/formDIa.vue b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue new file mode 100644 index 0000000..fef565e --- /dev/null +++ b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue @@ -0,0 +1,457 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :title="operationType === 'edit' ? '缂栬緫' : '鏂板'" + :visible.sync="formDia" + width="90%" @close="closeDia"> + <div v-if="operationType === 'edit'" style="text-align: right"> + <el-button :disabled="form.confirmDate" size="medium" type="primary" @click="validation">楠岃瘉纭</el-button> + </div> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td> + <p>鏍囧噯鏂规硶</p> + </td> + <td> + <p>楠岃瘉鍘熷洜</p> + </td> + <td> + <p>涓昏鎶�鏈彉鍖�</p> + </td> + <td> + <p>娑夊強鏂归潰</p> + </td> + <td> + <p>鏍囧噯瑕佹眰</p> + </td> + <td> + <p>鍑嗗鎯呭喌</p> + </td> + <td> + <p>鏄惁婊¤冻</p> + </td> + <td> + <p>澶囨敞</p> + </td> + </tr> + <tr> + <td rowspan="9"> + <el-input v-model="form.methodName" :rows="6" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + </td> + <td rowspan="9"> + <el-input v-model="form.verifyReason" :rows="6" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + </td> + <td rowspan="9"> + <el-input v-model="form.technologyChange" :rows="6" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + </td> + </tr> + <tr> + <td>浜猴細</td> + <td> + <el-input v-model="form.personRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.personReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.personIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-link type="primary" @click="viewWorkPermit">鏌ョ湅涓婂矖璇�</el-link> + </td> + </tr> + <tr> + <td>鏈猴細</td> + <td> + <el-input v-model="form.machineRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.machineReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.machineIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-link type="primary" @click="viewDevice">鏌ョ湅璁惧</el-link> + </td> + </tr> + <tr> + <td>鏂欙細</td> + <td> + <el-input v-model="form.materialRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.materialReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.materialIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-input v-model="form.materialRemark" size="small"></el-input> + </td> + </tr> + <tr> + <td>娉曪細</td> + <td> + <el-input v-model="form.methodRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.methodReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.methodIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-link type="primary" @click="viewTestRecord">鏌ョ湅妫�娴嬭褰�</el-link> + </td> + </tr> + <tr> + <td>鐜細</td> + <td> + <el-input v-model="form.environmentRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.environmentReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.environmentIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-input v-model="form.traceabilityRemark" size="small"></el-input> + </td> + </tr> + <tr> + <td>娴嬮噺婧簮鎬э細</td> + <td> + <el-input v-model="form.traceabilityRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.traceabilityReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.traceabilityIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-link type="primary" @click="viewCalibrationsFileDia">鏌ョ湅鏍″噯璇佷功</el-link> + </td> + </tr> + <tr> + <td>鏍峰搧绠$悊闇�姹傦細</td> + <td> + <el-input v-model="form.managementRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.managementReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.managementIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-input v-model="form.managementRemark" size="small"></el-input> + </td> + </tr> + <tr> + <td>鍏朵粬锛�</td> + <td> + <el-input v-model="form.otherRequirements" size="small" type="textarea"></el-input> + </td> + <td> + <el-input v-model="form.otherReadiness" size="small" type="textarea"></el-input> + </td> + <td> + <el-radio-group v-model="form.otherIsSatisfied" v-removeAriaHidden> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + <td> + <el-input v-model="form.otherRemark" size="small"></el-input> + </td> + </tr> + <tr> + <td colspan="3"> + <p>鏄惁寮曠敤姝ゆ爣鍑嗗紑灞曟娴�:</p> + </td> + <td colspan="3">鍙互寮曠敤姝ゆ爣鍑嗗紑灞曟娴�</td> + <td> + <p>纭鏃堕棿:</p> + </td> + <td>{{form.confirmDate}}</td> + </tr> + <tr> + <td colspan="3"> + <p>鍙傚姞纭浜虹鍚�:</p> + </td> + <td colspan="5"> + <el-select v-model="form.confirmUser" multiple placeholder="璇烽�夋嫨" size="small" style="width: 100%" :multiple-limit="5"> + <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </td> + </tr> + </table> + <span slot="footer" class="dialog-footer"> + <el-button @click="closeDia">鍙� 娑�</el-button> + <el-button :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button> + </span> + </el-dialog> + <ViewDeviceDialog v-if="viewDeviceDialog" ref="viewDeviceDialog" @closDeviceDia="closDeviceDia" @handleDeviceInfo="handleDeviceInfo"></ViewDeviceDialog> + <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord> + <ViewWorkPermitDia v-if="viewWorkPermitDia" ref="viewWorkPermitDia"></ViewWorkPermitDia> + <calibrations-file-dia v-if="calibrationsFileDia" ref="calibrationsFileDia"></calibrations-file-dia> + </div> +</template> + +<script> +import { dateFormat } from '@/utils/date' +import ViewDeviceDialog from '../../standardMethodsChange/component/ViewDeviceDialog.vue'; +import ViewTestRecord from '../../standardMethodsChange/component/ViewTestRecord.vue'; +import ViewWorkPermitDia from '../../standardMethodsChange/component/viewWorkPermitDia.vue'; +import CalibrationsFileDia from '../../standardMethodsChange/component/calibrationsFileDia.vue'; +import { + addMethodVerify, + getMethodVerifyOne, + methodVerifyAffirm, + updateMethodVerify +} from '@/api/cnas/process/method/methodVerification' +import { selectUserCondition } from '@/api/cnas/process/method/standardMethodsChange' +export default { + name: 'formDIa', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { CalibrationsFileDia, ViewWorkPermitDia, ViewTestRecord, ViewDeviceDialog }, + props: { + operationType: { + type: String, + default: () => '' + } + }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + form: { + methodName: '', + verifyReason: '', + technologyChange: '', + personRequirements: '', + personReadiness: '', + personIsSatisfied: '', + personRemark: '', + machineRequirements: '', + machineReadiness: '', + machineIsSatisfied: '', + materialRequirements: '', + materialReadiness: '', + materialIsSatisfied: '', + materialRemark: '', + methodRequirements: '', + methodReadiness: '', + methodIsSatisfied: '', + environmentRequirements: '', + environmentReadiness: '', + environmentIsSatisfied: '', + traceabilityRequirements: '', + traceabilityReadiness: '', + traceabilityIsSatisfied: '', + traceabilityRemark: '', + managementRequirements: '', + managementReadiness: '', + managementIsSatisfied: '', + managementRemark: '', + otherRequirements: '', + otherReadiness: '', + otherIsSatisfied: '', + otherRemark: '', + machineAttachmentList: [] + }, + editLoad: false, + info: { + methodVerifyId: '' + }, + userList: [], + viewDeviceDialog: false, + viewTestRecordDialog: false, + viewWorkPermitDia: false, + calibrationsFileDia: false, + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia(row) { + this.formDia = true + this.info = row + this.getUserList() + if (this.operationType === 'edit') { + this.searchInfo(row) + } + }, + // 鏌ヨ璇︽儏淇℃伅 + searchInfo (row) { + getMethodVerifyOne({methodVerifyId:row.methodVerifyId}).then(res => { + if (res.code === 200){ + this.form = {...res.data} + if (this.form.confirmUser) { + this.form.confirmUser = this.form.confirmUser.split(',').map(Number) + } + } + }).catch(err => { + console.log('err---', err); + }) + }, + // 鎻愪氦 + handleEdit() { + this.editLoad = true + const processMethodSearchNews = this.HaveJson(this.form) + processMethodSearchNews.confirmUser = processMethodSearchNews.confirmUser && processMethodSearchNews.confirmUser.join(',') + processMethodSearchNews.operationType = 1 + if (this.operationType === 'edit') { + this.editInfo(processMethodSearchNews) + } else { + this.addInfo(processMethodSearchNews) + } + }, + // 鏌ョ湅涓婂矖璇� + viewWorkPermit () { + this.viewWorkPermitDia = true + this.$nextTick(() => { + this.$refs.viewWorkPermitDia.openDia(this.form) + }) + }, + // 鏌ョ湅鏍″噯璇佷功 + viewCalibrationsFileDia () { + this.calibrationsFileDia = true + this.$nextTick(() => { + this.$refs.calibrationsFileDia.openDia(this.form) + }) + }, + // 鏌ョ湅璁惧 + viewDevice () { + this.viewDeviceDialog = true + this.$nextTick(() => { + this.$refs.viewDeviceDialog.openDia(this.form) + }) + }, + // 鍏抽棴璁惧寮规 + closDeviceDia () { + this.viewDeviceDialog = false + }, + // 鎻愪氦璁惧淇℃伅 + handleDeviceInfo (machineAttachmentList) { + this.viewDeviceDialog = false + this.form.machineAttachmentList = machineAttachmentList + }, + // 鏌ョ湅妫�娴嬭褰� + viewTestRecord () { + this.viewTestRecordDialog = true + this.$nextTick(() => { + this.$refs.viewTestRecordDialog.openDia(this.info) + }) + }, + // 鎻愪氦缂栬緫 + editInfo (processMethodSearchNews) { + updateMethodVerify(processMethodSearchNews).then(res => { + this.editLoad = false + if (res.code === 200){ + this.$message.success('鎿嶄綔鎴愬姛') + this.closeDia() + } + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + }, + // 鎻愪氦鏂板 + addInfo (processMethodSearchNews) { + addMethodVerify(processMethodSearchNews).then(res => { + this.editLoad = false + if (res.code === 200){ + this.$message.success('鎿嶄綔鎴愬姛') + this.closeDia() + } + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + }, + // 楠岃瘉纭 + validation (){ + methodVerifyAffirm({methodVerifyId:this.info.methodVerifyId}).then(res => { + if (res.code === 200){ + this.form.confirmDate = dateFormat(new Date()) + } + + }).catch(err => { + console.log('err---', err); + }) + }, + // 鍏抽棴寮规 + closeDia() { + this.formDia = false + this.$emit('closeDia'); + }, + getUserList(){ + selectUserCondition().then(res => { + if (res.code === 200) { + this.userList = res.data + } + }) + }, + } +}; +</script> + +<style scoped> +>>>.el-dialog { + margin-top: 2vh !important; +} +>>>.el-dialog__body { + max-height: 720px; + overflow-y: auto; +} +.tables { + table-layout: fixed; + width: 100%; + margin-top: 10px; +} +.tables td { + height: 34px; + width: 100px; + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + padding: 4px; +} +</style> diff --git a/src/views/CNAS/process/method/methodVerification/index.vue b/src/views/CNAS/process/method/methodVerification/index.vue new file mode 100644 index 0000000..48b43b0 --- /dev/null +++ b/src/views/CNAS/process/method/methodVerification/index.vue @@ -0,0 +1,198 @@ +<template> + <div class="capacity-scope"> + <div class="search"> + <div> + <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> + <el-form-item label="鏍囧噯鏂规硶" prop="methodName"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.methodName"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">鏌� 璇�</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button> + </el-form-item> + </el-form> + </div> + <div> + <el-button size="medium" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button> + </div> + </div> + <div class="table"> + <div> + <TableCard :showForm="false" :showTitle="false"> + <template v-slot:table> + <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" + :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" :page="page" + @pagination="pagination"> + </limsTable> + </template> + </TableCard> + </div> + </div> + <formDIa v-if="formDIa" ref="formDIa" :operationType="operationType" @closeDia="closeDia"></formDIa> + </div> +</template> + +<script> +import limsTable from '@/components/Table/lims-table.vue' +import TableCard from '@/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue'; +import formDIa from './component/formDIa.vue'; +import { delMethodVerify, exportMethodVerify, pagesMethodVerify } from '@/api/cnas/process/method/methodVerification' + +export default { + name: 'a7-method-verification', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { TableCard, limsTable, formDIa }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + searchForm: { + methodName: '', + operationType: 1, + }, + options: [ + { label: '涓婂崐骞�', value: '1' }, + { label: '涓嬪崐骞�', value: '2' }, + ], + tableColumn: [ + { + label: '鏍囧噯鏂规硶', + prop: 'methodName', + minWidth: '100' + }, + { + label: '楠岃瘉鍘熷洜', + prop: 'verifyReason', + minWidth: '100' + }, + { + label: '涓昏鎶�鏈彉鍖�', + prop: 'technologyChange', + minWidth: '100' + }, + { + dataType: 'action', + minWidth: '60', + label: '鎿嶄綔', + operation: [ + { + name: '缂栬緫', + type: 'text', + clickFun: (row) => { + this.openFormDia('edit', row); + }, + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadPost(row); + }, + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.deleteRow(row); + }, + } + + ] + } + ], + tableData: [], + tableLoading: false, + page: { + size: 20, + current: 1, + }, + total: 0, + formDIa: false, + operationType: '', + }; + }, + mounted() { + this.searchList() + }, + // 鏂规硶闆嗗悎 + methods: { + // 鏌ヨ鍒楄〃 + searchList() { + const entity = { + methodName: this.searchForm.methodName, + operationType: this.searchForm.operationType, + } + const page = this.page + this.tableLoading = true + pagesMethodVerify({ ...page, ...entity }).then(res => { + this.tableLoading = false + if (res.code === 200) { + this.tableData = res.data.records + this.page.total = res.data.total + } + }).catch(err => { + console.log('err---', err); + this.tableLoading = false + }) + }, + // 鍒犻櫎 + deleteRow(row) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.tableLoading = true + delMethodVerify({ methodVerifyId: row.methodVerifyId }).then(res => { + this.tableLoading = false + if (res.code === 200) { + this.$message.success('鍒犻櫎鎴愬姛') + this.searchList() + } + }).catch(err => { + this.tableLoading = false + console.log('err---', err); + }) + }) + }, + // 閲嶇疆鏌ヨ鏉′欢 + resetSearchForm() { + this.searchForm.methodName = ''; + this.searchList() + }, + openFormDia(type, row) { + this.formDIa = true + this.operationType = type + this.$nextTick(() => { + this.$refs.formDIa.openDia(row) + }) + }, + // 瀵煎嚭 + downLoadPost(row) { + exportMethodVerify({ methodVerifyId: row.methodVerifyId }).then(res => { + this.outLoading = false + const blob = new Blob([res], { type: 'application/msword' }); + this.$download.saveAs(blob, '鏍囧噯锛堟柟娉曪級纭璁板綍.docx') + }) + }, + // 鍏抽棴寮规 + closeDia() { + this.formDIa = false + this.searchList() + }, + // 鍒嗛〉鍒囨崲 + pagination(page) { + this.page.size = page.limit + this.searchList(); + }, + } +}; +</script> + +<style scoped> +.search { + height: 46px; + display: flex; + justify-content: space-between; +} +</style> diff --git a/src/views/CNAS/process/method/standardMethodsChange/index.vue b/src/views/CNAS/process/method/standardMethodsChange/index.vue index 9a4ac26..ec0b8fd 100644 --- a/src/views/CNAS/process/method/standardMethodsChange/index.vue +++ b/src/views/CNAS/process/method/standardMethodsChange/index.vue @@ -20,8 +20,8 @@ <div> <TableCard :showForm="false" :showTitle="false"> <template v-slot:table> - <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" - :page="page" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" + @pagination="pagination" :page="page" :tableLoading="tableLoading"></lims-table> </template> </TableCard> </div> @@ -125,9 +125,9 @@ operationType: this.searchForm.operationType, } this.tableLoading = true - pagesMethodVerify({... this.page,...entity}).then(res => { + pagesMethodVerify({ ... this.page, ...entity }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.tableData = res.data.records this.page.total = res.data.total } @@ -137,16 +137,16 @@ }) }, // 鍒犻櫎 - deleteRow (row) { + deleteRow(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - delMethodVerify({methodVerifyId:row.methodVerifyId}).then(res => { + delMethodVerify({ methodVerifyId: row.methodVerifyId }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.searchList() } @@ -161,7 +161,7 @@ this.searchForm.methodName = ''; this.searchList() }, - openFormDia (type, row) { + openFormDia(type, row) { this.formDIa = true this.operationType = type this.$nextTick(() => { @@ -169,18 +169,17 @@ }) }, // 鍏抽棴寮规 - closeDia () { + closeDia() { this.formDIa = false this.searchList() }, // 瀵煎嚭 downLoadPost(row) { this.outLoading = true - exportMethodVerify({methodVerifyId:row.methodVerifyId}).then(res => { + exportMethodVerify({ methodVerifyId: row.methodVerifyId }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鏍囧噯锛堟柟娉曪級纭璁板綍.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鍒嗛〉鍒囨崲 diff --git a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue index 5822548..4321fb6 100644 --- a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue +++ b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue @@ -14,11 +14,11 @@ </div> <div> <el-button size="medium" type="primary" @click="openApprovalDialog1">寤� 妗�</el-button> - <el-upload ref='upload' :action="action" - :before-upload="beforeUpload" :headers="headers" :on-error="onError" - :on-success="handleSuccessUp" :show-file-list="false" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' - style="display: inline-block; margin-left: 10px;"> - <el-button :loading="upLoading" size="medium" type="primary">瀵煎叆</el-button> + <el-upload ref='upload' :action="action" :before-upload="beforeUpload" :headers="headers" :on-error="onError" + :on-success="handleSuccessUp" :show-file-list="false" + accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' + style="display: inline-block; margin-left: 10px;"> + <el-button :loading="upLoading" size="medium" type="primary">瀵煎叆</el-button> </el-upload> <el-button size="medium" style="margin-left: 10px;" type="primary" @click="openFormDia">鏂� 澧�</el-button> </div> @@ -34,13 +34,8 @@ <div v-if="tabIndex === '0'"> <TableCard :showForm="false" :showTitle="false"> <template v-slot:table> - <lims-table - :column="tableColumn" - :height="'calc(100vh - 26em)'" - :table-data="tableData" - :table-loading="tableLoading" - :page="page" - @pagination="pagination"> + <lims-table :column="tableColumn" :height="'calc(100vh - 26em)'" :table-data="tableData" + :table-loading="tableLoading" :page="page" @pagination="pagination"> </lims-table> </template> </TableCard> @@ -48,13 +43,8 @@ <div v-if="tabIndex === '1'"> <TableCard :showForm="false" :showTitle="false"> <template v-slot:table> - <lims-table - :column="oldTableColumn" - :height="'calc(100vh - 20em)'" - :table-data="oldTableData" - :table-loading="oldTableLoading" - :page="oldPage" - @pagination="oldPagination"> + <lims-table :column="oldTableColumn" :height="'calc(100vh - 20em)'" :table-data="oldTableData" + :table-loading="oldTableLoading" :page="oldPage" @pagination="oldPagination"> </lims-table> </template> </TableCard> @@ -86,13 +76,8 @@ <el-dialog :visible.sync="viewRocordDia" title="璇︽儏" width="80%" @close="approvalDialog = false"> <TableCard :showForm="false" :showTitle="false"> <template v-slot:table> - <limsTable - :column="tableColumn1" - :height="'calc(100vh - 26em)'" - :table-data="tableData1" - :table-loading="tableLoading1" - style="padding: 0 15px;margin-bottom: 16px" - :page="page1" + <limsTable :column="tableColumn1" :height="'calc(100vh - 26em)'" :table-data="tableData1" + :table-loading="tableLoading1" style="padding: 0 15px;margin-bottom: 16px" :page="page1" @pagination="pagination1"> </limsTable> </template> @@ -129,8 +114,8 @@ standardNo: '', }, options: [ - {label: '涓婂崐骞�', value: '1'}, - {label: '涓嬪崐骞�', value: '2'}, + { label: '涓婂崐骞�', value: '1' }, + { label: '涓嬪崐骞�', value: '2' }, ], tableColumn: [ { @@ -475,8 +460,8 @@ tabIndex: '0', formDialog: false, editFormDialog: false, - upLoading:false, - outLoading:false, + upLoading: false, + outLoading: false, ratifyInfo: { writeUserId: '', ratifyUserId: '', @@ -499,7 +484,7 @@ // 鏂规硶闆嗗悎 methods: { // 鏌ヨ鍒楄〃 - searchList () { + searchList() { let params = {} if (this.tabIndex === '0') { params = { @@ -516,9 +501,9 @@ } if (this.tabIndex === '0') { this.tableLoading = true - pageMethodSearchNew({...params.oldPage,...params.entity}).then(res => { + pageMethodSearchNew({ ...params.oldPage, ...params.entity }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.tableData = res.data.records this.page.total = res.data.total } @@ -529,11 +514,11 @@ } else { this.oldTableLoading = true pageSearchNewArchived({ - ...params.page,...params.entity + ...params.page, ...params.entity }).then(res => { this.oldTableLoading = false - if (res.code === 200){ - console.log('res>>>>>>>>>>>>',res) + if (res.code === 200) { + console.log('res>>>>>>>>>>>>', res) this.oldTableData = res.data.records this.oldPage.total = res.data.total } @@ -545,19 +530,19 @@ } }, // 鎵撳紑鍘嗗彶妗f璇︽儏寮规 - openViewDia (row) { + openViewDia(row) { this.archivedId = row.archivedId this.viewRocordDia = true this.pageSearchNewBackups() }, - pageSearchNewBackups () { + pageSearchNewBackups() { const entity = { archivedId: this.archivedId, } this.tableLoading1 = true - pageSearchNewBackups({...this.page1,...entity}).then(res => { + pageSearchNewBackups({ ...this.page1, ...entity }).then(res => { this.tableLoading1 = false - if (res.code === 200){ + if (res.code === 200) { this.tableData1 = res.data.records this.page1.total = res.data.total } @@ -568,17 +553,17 @@ }) }, // 鎵撳紑鎵瑰噯寮规 - openApprovalDialog (row) { + openApprovalDialog(row) { this.approvalDialog = true this.archivedId = row.archivedId }, // 鎵撳紑鎵瑰噯寮规 - openApprovalDialog1 (row) { + openApprovalDialog1(row) { this.approvalDialog1 = true this.archivedId = row.archivedId }, // 鎻愪氦鎵瑰噯 - handleApproval (status) { + handleApproval(status) { this.approvalLoading = true let internalReport = { archivedId: this.archivedId, @@ -597,7 +582,7 @@ }) }, // 鎻愪氦鎵瑰噯 - handleApproval1 (status) { + handleApproval1(status) { this.approvalLoading = true let internalReport = { archivedName: this.archivedName, @@ -614,41 +599,40 @@ }) }, // 閲嶇疆鏌ヨ鏉′欢 - resetSearchForm () { + resetSearchForm() { this.searchForm.standardNo = ''; this.searchList() }, // 鎿嶄綔鏂板妗� - openFormDia (row) { + openFormDia(row) { this.formDialog = true this.$nextTick(() => { this.$refs.formDialog.openDia(row) }) }, // 鍏抽棴鏂板寮规 - closeDia () { + closeDia() { this.formDialog = false this.searchList() }, // 鎵撳紑淇敼寮规 - openEditFormDia (row) { + openEditFormDia(row) { this.editFormDialog = true this.$nextTick(() => { this.$refs.editFormDialog.openDia(row) }) }, // - closeEditDia () { + closeEditDia() { this.editFormDialog = false this.searchList() }, // 瀵煎嚭 - handleOut (row) { + handleOut(row) { this.outLoading = true - exportMethodSearchNew({archivedId:row.archivedId}).then(res => { - const blob = new Blob([res],{ type: 'application/octet-stream' }); + exportMethodSearchNew({ archivedId: row.archivedId }).then(res => { + const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鏍囧噯鏌ユ柊瀵煎嚭.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 瀵煎叆 @@ -674,23 +658,23 @@ } }, // 鍒嗛〉 - pagination(page){ + pagination(page) { this.page.size = page.limit this.searchList(); }, - pagination1(page){ + pagination1(page) { this.page1.size = page.limit this.pageSearchNewBackups(); }, - oldPagination(page){ + oldPagination(page) { this.oldPage.size = page.limit this.searchList(); }, // - getUserList(){ + getUserList() { this.$axios.post(this.$api.user.selectUserList, { - page: {current: -1, size: -1,}, - entity: {name: null} + page: { current: -1, size: -1, }, + entity: { name: null } }, { headers: { 'Content-Type': 'application/json' @@ -723,6 +707,7 @@ display: flex; justify-content: space-between; } + .table-tab { margin-bottom: 10px; } diff --git a/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue b/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue index c958c5b..8a39ebc 100644 --- a/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue +++ b/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue @@ -178,7 +178,6 @@ handleDown(row) { exportInconsistentDistribution({ distributionId: row.distributionId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '涓嶇鍚堥」鐨勫垎甯�' + '.docx'); }) diff --git a/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue b/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue index d828e06..4c0e60b 100644 --- a/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue +++ b/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue @@ -151,7 +151,6 @@ // 瀵煎嚭 openDownloadDia(row) { superviseDetailAccordingExport({ superviseDetailsId: row.superviseDetailsId }).then(res => { - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '涓嶇鍚堥」瀵煎嚭' + '.docx'); }).catch(err => { diff --git a/src/views/CNAS/process/reportResults/index.vue b/src/views/CNAS/process/reportResults/index.vue index f87bb11..08ad966 100644 --- a/src/views/CNAS/process/reportResults/index.vue +++ b/src/views/CNAS/process/reportResults/index.vue @@ -223,7 +223,6 @@ exportProcessReport({ ids: this.mutilSelect.map(m => m.id) }).then(res => { this.outLoading = false if (res.code === 201) return - this.$message.success('瀵煎嚭鎴愬姛') const url = this.javaApi + '/word/' + res.data; this.$download.saveAs(url, "鎶ュ憡缁撴灉"); }) diff --git a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue index 102085b..6349287 100644 --- a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue +++ b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue @@ -96,6 +96,10 @@ <script> import { selectUserCondition } from "@/api/business/inspectionTask"; +import { + getDeviceAccidentReport, + addDeviceAccidentReport, +} from '@/api/cnas/resourceDemand/device.js' export default { name: "accident-form", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -150,7 +154,7 @@ }, // 鏌ヨ璇︽儏 searchInfo() { - this.$axios.get(this.$api.deviceAccidentReport.getDeviceAccidentReport + '?accidentReportId=' + this.form.accidentReportId).then(res => { + getDeviceAccidentReport({ accidentReportId: this.form.accidentReportId }).then(res => { if (res.code === 200) { this.form = { ...res.data } if (res.data.isFinish === 0) { @@ -187,13 +191,7 @@ this.form.flowType = this.currentStep this.$refs.modelForm.validate((valid) => { if (valid) { - this.$axios.post(this.$api.deviceAccidentReport.addDeviceAccidentReport, - this.form, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true - }).then(res => { + addDeviceAccidentReport(this.form).then(res => { if (res.code == 200) { this.$message.success('鏂板鎴愬姛') this.resetForm() @@ -212,14 +210,7 @@ }, getUserList() { selectUserCondition().then(res => { - let data = []; - res.data.forEach((a) => { - data.push({ - label: a.name, - value: a.id, - }); - }); - this.userList = data + this.userList = res.data }) }, }, diff --git a/src/views/CNAS/resourceDemand/device/component/borrow.vue b/src/views/CNAS/resourceDemand/device/component/borrow.vue index fba75bc..a3e98ee 100644 --- a/src/views/CNAS/resourceDemand/device/component/borrow.vue +++ b/src/views/CNAS/resourceDemand/device/component/borrow.vue @@ -4,7 +4,7 @@ <div class="search"> <div class="search_thing"> <div class="search_label">娴佺▼缂栧彿锛�</div> - <div><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.processNumber" + <div><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.processNumber" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing" style="padding-left: 30px;"> @@ -17,8 +17,10 @@ </div> </div> <div class="tables" style="margin-top: 10px;"> - <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage" - :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" /> + <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'" + :page="page" @pagination="pagination"></lims-table> + <!-- <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage" + :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" /> --> </div> <el-dialog title="浠櫒璁惧棰�(鍊�)鐢ㄧ櫥璁�" top="5vh" :visible.sync="dialogVisible" width="60%"> <el-steps :active="currentStep" finish-status="success" align-center> @@ -197,13 +199,18 @@ </template> <script> -import ValueTable from '@/components/Table/value-table.vue' +import limsTable from "@/components/Table/lims-table.vue"; import { dateFormat } from '@/utils/date' import { saveDeviceBorrow, deleteCNASFile, + getDeviceBorrow, + deviceBorrowExport, + deleteDeviceBorrow, + deviceBorrowPage, } from '@/api/cnas/resourceDemand/device.js' import { selectUserCondition } from "@/api/business/inspectionTask"; +import { mapGetters } from "vuex"; export default { props: { clickNodeVal: { @@ -214,72 +221,12 @@ } }, components: { - ValueTable + limsTable }, data() { return { dialogVisible: false, dialogVisible0: false, - //琛ㄥご鏄剧ず - componentData: { - entity: { - processNumber: null, - deviceId: null, - orderBy: { - field: 'id', - order: 'asc' - } - }, - isIndex: true, - showSelect: false, - select: false, - do: [ - { - id: 'show', - font: '鏌ョ湅', - type: 'text', - method: 'lookDetail' - }, - { - id: 'delete', - font: '鍒犻櫎', - type: 'text', - method: 'doDiy' - }, - { - id: '111', - font: '娴佺▼璺熻釜', - type: 'text', - method: 'handleLookList' - }], - init: false, - tagField: { - recipientState: { - select: [{ - value: 0, - type: 'success', - label: '鍚堟牸' - }, { - value: 1, - type: 'warning', - label: '缁翠慨' - }, { - value: 2, - type: 'info', - label: '鍋滅敤' - }, { - value: 3, - type: 'danger', - label: '鎶ュ簾' - }] - } - }, - selectField: {}, - requiredAdd: [], - requiredUp: [], - }, - upIndex: 0, - entityCopy: null, currentStep: 0, // 姝ラ鏉℃樉绀虹鍑犳 currentStepClick: 0, // 鐐瑰嚮姝ラ鏉″彉鍖� steps: ['鍊熷嚭', '鍊熺敤'], @@ -307,15 +254,94 @@ nextUser: [{ required: true, message: '璇烽�夋嫨涓嬬幆鑺傝礋璐d汉', trigger: 'change' }], }, deviceLogs: [], - outLoading: false + outLoading: false, + recipientStateList: [{ + value: 0, + type: 'success', + label: '鍚堟牸' + }, { + value: 1, + type: 'warning', + label: '缁翠慨' + }, { + value: 2, + type: 'info', + label: '鍋滅敤' + }, { + value: 3, + type: 'danger', + label: '鎶ュ簾' + }], + queryParams: {}, + tableData: [], + column: [ + { label: "娴佺▼缂栧彿", prop: "processNumber" }, + { label: "璁惧鍚嶇О", prop: "deviceName" }, + { + label: "绠$悊缂栧彿", + prop: "unifyNumber" + }, + { label: "鍊熺敤浜�", prop: "recipientUser" }, + { label: "鍊熺敤浜鸿仈绯绘柟寮�", prop: "borrowerContactInformation", width: '140px' }, + { label: "鍊熺敤鏃ユ湡", prop: "recipientTime" }, + { + label: "鍊熺敤鏃剁姸鎬�", prop: "recipientState", dataType: "tag", + formatData: (params) => { + return this.recipientStateList.find((m) => m.value == params).label; + }, + formatType: (params) => { + return this.recipientStateList.find((m) => m.value == params).type; + }, + }, + { label: "鍊熷嚭浜�", prop: "submitUser" }, + { label: "鍊熷嚭鏃ユ湡", prop: "createTime" }, + { + label: "褰撳墠鐘舵��", prop: "nowState" + }, + { label: "褰撳墠璐d换浜�", prop: "nowUser" }, + { label: "闄勪欢", prop: "fileName" }, + { + dataType: "action", + fixed: "right", + label: "鎿嶄綔", + operation: [ + { + name: "鏌ョ湅", + type: "text", + clickFun: (row) => { + this.lookDetail(row); + }, + }, + { + name: "鍒犻櫎", + type: "text", + clickFun: (row) => { + this.handleDelete(row); + }, + }, + { + name: "娴佺▼璺熻釜", + type: "text", + clickFun: (row) => { + this.handleLookList(row); + }, + }, + ], + }, + ], + page: { + total: 0, + size: 10, + current: 0, + }, + tableLoading: false, } }, watch: { // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 clickNodeVal(newVal) { if (newVal.value) { - this.componentData.entity.deviceId = this.clickNodeVal.value - this.entityCopy = this.HaveJson(this.componentData.entity) + thisqueryParams.deviceId = this.clickNodeVal.value this.refreshTable() } }, @@ -329,25 +355,46 @@ } }, computed: { + ...mapGetters(["nickName"]), action() { return this.javaApi + '/personBasicInfo/saveCNASFile' } }, mounted() { - this.componentData.entity.deviceId = this.clickNodeVal.value - this.entityCopy = this.HaveJson(this.componentData.entity) - // console.log(333,this.clickNodeVal) + this.queryParams.deviceId = this.clickNodeVal.value this.getUserList() this.refreshTable() }, methods: { - refreshTable(e) { - this.$refs['ValueTable'].selectList(e) + getList() { + this.tableLoading = true; + let param = { ...this.queryParams, ...this.page }; + delete param.total; + deviceBorrowPage({ ...param }) + .then((res) => { + this.tableLoading = false; + if (res.code === 200) { + this.tableData = res.data.records; + this.page.total = res.data.total; + } + }) + .catch((err) => { + this.tableLoading = false; + }); + }, + pagination({ page, limit }) { + this.page.current = page; + this.page.size = limit; + this.getList(); }, refresh() { - this.componentData.entity = this.HaveJson(this.entityCopy) - this.refreshTable() - // this.upIndex++ + this.queryParams = {}; + this.page.current = 1; + this.getList(); + }, + refreshTable() { + this.page.current = 1; + this.getList(); }, choiceStep(index) { this.currentStepClick = index @@ -362,11 +409,11 @@ // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡 switch (this.currentStep) { case 0: - this.form.submitOperationUser = user.name + this.form.submitOperationUser = this.nickName this.form.submitOperationTime = dateTime break case 1: - this.form.receiveOperationUser = user.name + this.form.receiveOperationUser = this.nickName this.form.receiveOperationTime = dateTime break default: @@ -452,7 +499,7 @@ }, // 鏌ョ湅璇︽儏 lookDetail(row) { - this.$axios.get(this.$api.deviceBorrow.getDeviceBorrow + '?id=' + row.id).then(res => { + getDeviceBorrow({ id: row.id }).then(res => { if (res.code == 200) { this.form = res.data this.form.deviceName = this.clickNodeVal.label @@ -493,56 +540,38 @@ //瀵煎嚭 handleDown() { this.outLoading = true - this.$axios.post(this.$api.deviceBorrow.deviceBorrowExport, { deviceId: this.clickNodeVal.value }, { responseType: 'blob' }).then(res => { + deviceBorrowExport({ deviceId: this.clickNodeVal.value }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/force-download' }) const filename = decodeURI(this.clickNodeVal.label + '璁惧鍊熷嚭缁熻' + '.xlsx') - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠� - const elink = document.createElement('a') - elink.download = filename - elink.style.display = 'none' - elink.href = URL.createObjectURL(blob) - document.body.appendChild(elink) - elink.click(); - URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄 - document.body.removeChild(elink) - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠� - const elink = document.createElement('a') - elink.download = filename - elink.style.display = 'none' - elink.href = URL.createObjectURL(blob) - document.body.appendChild(elink) - elink.click(); - URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄 - document.body.removeChild(elink) - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, filename) }) }, handleLookList(row) { - this.$axios.get(this.$api.deviceBorrow.getDeviceBorrow + '?id=' + row.id).then(res => { + getDeviceBorrow({ id: row.id }).then(res => { if (res.code == 200) { this.deviceLogs = res.data.deviceLogs this.dialogVisible0 = true } }) - } + }, + handleDelete(row) { + this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(() => { + deleteDeviceBorrow({ id: row.id }).then((res) => { + if (res.code == 201) return; + this.$message.success("鍒犻櫎鎴愬姛"); + this.refresh(); + }); + }) + .catch(() => { }); + }, }, } </script> diff --git a/src/views/CNAS/resourceDemand/device/component/calibration.vue b/src/views/CNAS/resourceDemand/device/component/calibration.vue index 655c2b4..0a83361 100644 --- a/src/views/CNAS/resourceDemand/device/component/calibration.vue +++ b/src/views/CNAS/resourceDemand/device/component/calibration.vue @@ -4,7 +4,7 @@ <div class="btnS"> <el-button size="small" type="primary" @click="calibrationMaintenance()">鏍″噯椤圭洰缁存姢</el-button> <el-button size="small" type="primary" @click="add('add')">娣诲姞鏍″噯璁板綍</el-button> - <el-button size="small" type="primary" @click="handleDown">瀵煎嚭Excel</el-button> + <!-- <el-button size="small" type="primary" @click="handleDown">瀵煎嚭Excel</el-button> --> </div> <div class="tables" style="margin-top: 10px;"> <el-table :data="tableData" height="calc(100vh - 20em)"> @@ -240,20 +240,6 @@ </template> </el-table-column> </el-table> - <!-- 鎿嶄綔鏃ュ織 --> - <!-- <h4>--> - <!-- <div style="display: flex;--> - <!-- align-items: center;">--> - <!-- <span class="line"></span><span>鏈褰曠姸鎬佸拰鎿嶄綔鏃ュ織</span>--> - <!-- </div>--> - <!-- </h4>--> - <!-- <el-table :data="tableDataOperate" style="width: 100%">--> - <!-- <el-table-column type="index" label="搴忓彿" width="100"></el-table-column>--> - <!-- <el-table-column prop="operator" label="鎿嶄綔浜�" width="120"></el-table-column>--> - <!-- <el-table-column prop="operationTime" label="鎿嶄綔鏃堕棿" width="180"></el-table-column>--> - <!-- <el-table-column prop="operationType" label="鎿嶄綔绫诲瀷" width="120"></el-table-column>--> - <!-- <el-table-column prop="operationContent" label="鎿嶄綔鍐呭"></el-table-column>--> - <!-- </el-table>--> </div> <span slot="footer" class="dialog-footer"> <el-button v-if="operationType === 'add'" @click="dialogVisible1 = false">鍙� 娑�</el-button> @@ -265,10 +251,8 @@ </template> <script> -import fileDownload from "@/utils/file"; import { deviceMetricRecordPage, - deviceLog, showDeviceMetricsCopy, deleteDeviceMetricRecord, deviceMetricRecordExport, @@ -276,7 +260,9 @@ selectDeviceMetric, deleteDeviceMetrics, addOrUpdateDeviceMetricRecord, + saveOrUpdateDeviceMetric } from '@/api/cnas/resourceDemand/device.js' +import { mapGetters } from "vuex"; export default { props: { clickNodeVal: { @@ -343,7 +329,6 @@ ], }, addRecordLoading: false, - tableDataOperate: [], // 鏈褰曠姸鎬佸拰鎿嶄綔鏃ュ織 upLoading: false, operationType: '', search: { @@ -355,13 +340,13 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { + ...mapGetters(["nickName"]), action() { return this.javaApi + '/personBasicInfo/saveCNASFile' } }, mounted() { //鑾峰彇鎿嶄綔璁板綍淇℃伅 - this.getOperateMsg(); this.getTableList(this.clickNodeVal.value) // 鑾峰彇璁惧鏍″噯鍒楄〃鏁版嵁 }, methods: { @@ -397,11 +382,6 @@ this.search.total = res.data.total }) }, - getOperateMsg() { - deviceLog(this.clickNodeVal.value).then(res => { - this.tableDataOperate = res.data - }) - }, // 娣诲姞鏍告煡璁板綍 add(type) { this.operationType = type @@ -410,7 +390,7 @@ }, // 鏌ョ湅璇︽儏 handleViewClick(type, row) { - showDeviceMetricsCopy({ id: row.id, type: calibrate }).then(res => { + showDeviceMetricsCopy({ id: row.id, type: 'calibrate' }).then(res => { this.calibrateParams = res.data }) this.calibrationRecord = { ...row } @@ -439,14 +419,10 @@ let state = /\.(jpg|jpeg|png|gif)$/i.test(row.systemFileName) if (state) { let url = this.javaApi + '/img/' + row.systemFileName; - fileDownload.downloadIamge(url, row.systemFileName) + this.$download.saveAs(url, row.systemFileName) } else { const url = this.javaApi + '/word/' + row.systemFileName - const link = document.createElement('a'); - link.href = url; - link.download = row.systemFileName; - link.click(); - this.$message.success('涓嬭浇鎴愬姛') + this.$download.saveAs(url, row.systemFileName) } }, //瀵煎嚭 @@ -454,12 +430,11 @@ this.outLoading = true deviceMetricRecordExport({ deviceId: this.clickNodeVal.value, - type: calibrate + type: 'calibrate' }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '璁惧鏍″噯.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, deleteFile() { @@ -527,10 +502,9 @@ this.calibrateParamsLoading = true this.addCalibrateLoading = true this.form0.deviceId = this.clickNodeVal.value; - const user = JSON.parse(localStorage.getItem('user')) - this.form0.createdBy = user.name; + this.form0.createdBy = this.nickName; this.form0.type = 'calibrate' - deleteDeviceMetrics(this.form0).then(res => { + saveOrUpdateDeviceMetric(this.form0).then(res => { if (res.code == 200) { this.$message.success('淇濆瓨鎴愬姛') this.$refs['form0'].resetFields() @@ -559,8 +533,7 @@ } this.addRecordLoading = true this.calibrationRecord.deviceId = this.clickNodeVal.value; - let user = JSON.parse(localStorage.getItem('user')) - this.calibrationRecord.createUser = user.name + this.calibrationRecord.createUser = this.nickName this.calibrationRecord.type = 'calibrate' this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => { @@ -636,16 +609,6 @@ } } } -} - -function downloadImage(url) { - const link = document.createElement('a'); - link.href = url; - link.target = "_blank" - link.download = 'attachment.jpg'; // 鏂囦欢鍚� - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); } </script> diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue index 10c378d..362cbfd 100644 --- a/src/views/CNAS/resourceDemand/device/component/check.vue +++ b/src/views/CNAS/resourceDemand/device/component/check.vue @@ -177,7 +177,7 @@ @click="deleteFile"></el-button> </el-input> <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" - :headers="headers" :limit="1" :on-error="onError" :on-success="handleSuccessUp" + :headers="uploadHeader" :limit="1" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" style="float: right;"> <el-button :loading="upLoading" size="small" style="position: relative; top: -4px;" type="primary">闄勪欢涓婁紶 @@ -247,6 +247,7 @@ <script> import ValueTable from "@/components/Table/value-table.vue"; import file from '@/utils/file'; +import { mapGetters } from "vuex"; export default { components: { ValueTable @@ -330,11 +331,7 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'token': sessionStorage.getItem('token') - } - }, + ...mapGetters(["nickName"]), action() { return this.javaApi + this.$api.personnel.saveCNASFile } @@ -397,8 +394,7 @@ this.calibrateParamsLoading = true this.addCalibrateLoading = true this.form0.deviceId = this.clickNodeVal.value; - const user = JSON.parse(localStorage.getItem('user')) - this.form0.createdBy = user.name; + this.form0.createdBy = this.nickName; this.form0.type = 'examine' this.$axios.post(this.$api.deviceCheck.saveOrUpdateDeviceMetric, this.form0, { headers: { @@ -441,8 +437,7 @@ } this.addRecordLoading = true this.calibrationRecord.deviceId = this.clickNodeVal.value; - let user = JSON.parse(localStorage.getItem('user')) - this.calibrationRecord.createUser = user.name + this.calibrationRecord.createUser = this.nickName this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams this.calibrationRecord.type = 'examine' this.$axios.post(this.$api.deviceCheck.addOrUpdateDeviceMetricRecord, this.calibrationRecord, { diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue index 5946df7..8dcd2c2 100644 --- a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue +++ b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue @@ -63,7 +63,7 @@ pageDeviceAcceptance, getDeviceAcceptanceFileList, delDeviceAcceptanceFileList, - exportUseRecord, + exportDeviceAcceptance, delDeviceAcceptance, } from '@/api/cnas/resourceDemand/device.js' export default { @@ -200,13 +200,10 @@ let url = ''; if (row.type == 1) { url = this.javaApi + '/img/' + row.fileUrl - file.downloadIamge(url, row.fileName) + this.$download.saveAs(url, row.fileName) } else { url = this.javaApi + '/word/' + row.fileUrl - const link = document.createElement('a'); - link.href = url; - link.download = row.fileName; - link.click(); + this.$download.saveAs(url, row.fileName) } }, // 鍒犻櫎 @@ -272,11 +269,10 @@ // 瀵煎嚭 handleDownOne(id) { this.outLoading = true - exportUseRecord({ acceptanceId: id }).then(res => { + exportDeviceAcceptance({ acceptanceId: id }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '璁惧楠屾敹.doc') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鍒犻櫎 diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue b/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue index e914e36..b836c06 100644 --- a/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue +++ b/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue @@ -40,7 +40,11 @@ <script> import AccidentForm from "./accidentForm.vue"; - +import { + pageDeviceAccidentReport, + exportDeviceAccidentReport, + delDeviceAccidentReport, +} from '@/api/cnas/resourceDemand/device.js' export default { name: "equipment-accident", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -73,19 +77,10 @@ // 鏌ヨ getYearTableDetailData(deviceId) { this.yearTableDetailDataLoading = true - this.$axios.post(this.$api.deviceAccidentReport.pageDeviceAccidentReport, { - page: { - current: this.pagination1.current, - size: this.pagination1.size, - }, - entity: { - deviceId: deviceId, - } - }, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true + pageDeviceAccidentReport({ + current: this.pagination1.current, + size: this.pagination1.size, + deviceId: deviceId, }).then(res => { if (res.code == 200) { this.yearTableDetailData = res.data.records @@ -119,37 +114,10 @@ // 瀵煎嚭 handleDownOne(id) { this.outLoading = true - this.$axios.get(this.$api.deviceAccidentReport.exportDeviceAccidentReport + '?accidentReportId=' + id, { - responseType: "blob" - }).then(res => { + exportDeviceAccidentReport({ accidentReportId: id }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '浠櫒璁惧浜嬫晠鎶ュ憡鍗�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '浠櫒璁惧浜嬫晠鎶ュ憡鍗�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '浠櫒璁惧浜嬫晠鎶ュ憡鍗�.doc') }) }, // 鍒犻櫎 @@ -159,7 +127,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - this.$axios.get(this.$api.deviceAccidentReport.delDeviceAccidentReport + '?accidentReportId=' + id).then(res => { + delDeviceAccidentReport({ accidentReportId: id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�'); this.getYearTableDetailData(this.clickNodeVal.value); }); diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue b/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue index 6ebd342..8cb1224 100644 --- a/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue +++ b/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue @@ -38,7 +38,11 @@ <script> import FailureForm from "./failureForm.vue"; - +import { + pageDeviceBreakdownMaintenance, + exportDeviceBreakdownMaintenance, + delDeviceBreakdownMaintenance, +} from '@/api/cnas/resourceDemand/device.js' export default { name: "equipment-failure", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -71,19 +75,10 @@ // 鏌ヨ getYearTableDetailData(deviceId) { this.yearTableDetailDataLoading = true - this.$axios.post(this.$api.deviceBreakdownMaintenance.pageDeviceBreakdownMaintenance, { - page: { - current: this.pagination1.current, - size: this.pagination1.size, - }, - entity: { - deviceId: deviceId, - } - }, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true + pageDeviceBreakdownMaintenance({ + current: this.pagination1.current, + size: this.pagination1.size, + deviceId: deviceId, }).then(res => { if (res.code == 200) { this.yearTableDetailData = res.data.records @@ -117,37 +112,12 @@ // 瀵煎嚭 handleDownOne(id) { this.outLoading = true - this.$axios.get(this.$api.deviceBreakdownMaintenance.exportDeviceBreakdownMaintenance + '?maintenanceId=' + id, { - responseType: "blob" + exportDeviceBreakdownMaintenance({ + maintenanceId: id }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '浠櫒璁惧淇悊鐢宠琛�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '浠櫒璁惧淇悊鐢宠琛�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '浠櫒璁惧淇悊鐢宠琛�.doc') }) }, // 鍒犻櫎 @@ -157,7 +127,9 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - this.$axios.get(this.$api.deviceBreakdownMaintenance.delDeviceBreakdownMaintenance + '?maintenanceId=' + id).then(res => { + delDeviceBreakdownMaintenance({ + maintenanceId: id + }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�'); this.getYearTableDetailData(this.clickNodeVal.value); }); diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue b/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue index 4a85d99..bb2f783 100644 --- a/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue +++ b/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue @@ -7,41 +7,48 @@ </div> <div> <el-table ref="yearTable" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData" - height="calc(100vh - 18em)" - style="width: 100% ;"> + height="calc(100vh - 18em)" style="width: 100% ;"> <!-- 琛ㄦ牸鍒� --> - <el-table-column align="center" header-align="center" label="搴忓彿" prop="prop" type="index" width="70"></el-table-column> -<!-- <el-table-column label="浠櫒鍚嶇О" min-width="150" prop="unitName"></el-table-column>--> -<!-- <el-table-column label="鍨嬪彿" min-width="100" prop="address"></el-table-column>--> + <el-table-column align="center" header-align="center" label="搴忓彿" prop="prop" type="index" + width="70"></el-table-column> + <!-- <el-table-column label="浠櫒鍚嶇О" min-width="150" prop="unitName"></el-table-column>--> + <!-- <el-table-column label="鍨嬪彿" min-width="100" prop="address"></el-table-column>--> <el-table-column label="閰嶄欢" min-width="150" prop="parts"></el-table-column> <el-table-column label="缂栧彿" min-width="100" prop="number"></el-table-column> <el-table-column label="鎶ュ簾鐞嗙敱" min-width="150" prop="reasonsForScrap"></el-table-column> <!-- 鎿嶄綔鎸夐挳 --> <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="120"> <template slot-scope="scope"> - <el-button :disabled="scope.row.ratifyStatus === 1" size="small" type="text" @click="handleForm(scope.row.scrappedId)">鎿嶄綔</el-button> + <el-button :disabled="scope.row.ratifyStatus === 1" size="small" type="text" + @click="handleForm(scope.row.scrappedId)">鎿嶄綔</el-button> <el-button size="small" type="text" @click="handleDownOne(scope.row.scrappedId)">瀵煎嚭</el-button> - <el-button size="small" style="color: #f56c6c" type="text" @click="deleteFun(scope.row.scrappedId)">鍒犻櫎</el-button> + <el-button size="small" style="color: #f56c6c" type="text" + @click="deleteFun(scope.row.scrappedId)">鍒犻櫎</el-button> </template> </el-table-column> </el-table> <el-pagination :current-page="1" :page-size="pagination1.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange1" - @current-change="handleCurrentChange1"> + :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" + @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> </el-pagination> </div> </div> - <scrap-application-form v-if="applicationForm" ref="applicationForm" @closeDialog="closeDialog"></scrap-application-form> + <scrap-application-form v-if="applicationForm" ref="applicationForm" + @closeDialog="closeDialog"></scrap-application-form> </div> </template> <script> import scrapApplicationForm from "./scrapApplicationForm.vue"; - +import { + pageDeviceScrapped, + exportDeviceScrapped, + delDeviceScrapped, +} from '@/api/cnas/resourceDemand/device.js' export default { name: "equipment-scrap", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: {scrapApplicationForm}, + components: { scrapApplicationForm }, props: { clickNodeVal: { type: Object, @@ -68,21 +75,12 @@ // 鏂规硶闆嗗悎 methods: { // 鏌ヨ - getYearTableDetailData (deviceId) { + getYearTableDetailData(deviceId) { this.yearTableDetailDataLoading = true - this.$axios.post(this.$api.deviceScrapped.pageDeviceScrapped,{ - page: { - current: this.pagination1.current, - size: this.pagination1.size, - }, - entity: { - deviceId: deviceId, - } - }, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true + pageDeviceScrapped({ + current: this.pagination1.current, + size: this.pagination1.size, + deviceId: deviceId, }).then(res => { if (res.code == 200) { this.yearTableDetailData = res.data.records @@ -93,13 +91,13 @@ this.yearTableDetailDataLoading = false }) }, - handleForm (id) { + handleForm(id) { this.applicationForm = true this.$nextTick(() => { this.$refs.applicationForm.openDialog(id, this.clickNodeVal.value) }) }, - closeDialog () { + closeDialog() { this.applicationForm = false this.getYearTableDetailData(this.clickNodeVal.value) }, @@ -116,37 +114,10 @@ // 瀵煎嚭 handleDownOne(id) { this.outLoading = true - this.$axios.get(this.$api.deviceScrapped.exportDeviceScrapped + '?scrappedId=' + id, { - responseType: "blob" - }).then(res => { + exportDeviceScrapped({ scrappedId: id }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '浠櫒璁惧鎶ュ簾鐢宠琛�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '浠櫒璁惧鎶ュ簾鐢宠琛�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '浠櫒璁惧鎶ュ簾鐢宠琛�.doc') }) }, // 鍒犻櫎 @@ -156,7 +127,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - this.$axios.get(this.$api.deviceScrapped.delDeviceScrapped + '?scrappedId=' + id).then(res => { + delDeviceScrapped({ scrappedId: id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�'); this.getYearTableDetailData(this.clickNodeVal.value); }); @@ -185,6 +156,7 @@ justify-content: space-between; align-items: center; } + .title-search { display: flex; align-items: center; diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue index a7f5436..236ca34 100644 --- a/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue +++ b/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue @@ -581,7 +581,6 @@ this.outLoading = true exportReviewExamineRecordContrast({ planDetailsId: this.downRow.planDetailsId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '浠櫒璁惧鏈熼棿鏍告煡姣斿璁板綍琛�.doc') }) diff --git a/src/views/CNAS/resourceDemand/device/component/failureForm.vue b/src/views/CNAS/resourceDemand/device/component/failureForm.vue index f8fb193..70d0cf4 100644 --- a/src/views/CNAS/resourceDemand/device/component/failureForm.vue +++ b/src/views/CNAS/resourceDemand/device/component/failureForm.vue @@ -67,6 +67,11 @@ </template> <script> +import { + getDeviceBreakdownMaintenance, + addDeviceBreakdownMaintenance, +} from '@/api/cnas/resourceDemand/device.js' +import { selectUserCondition } from "@/api/business/inspectionTask"; export default { name: "failure-form", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -115,7 +120,9 @@ }, // 鏌ヨ璇︽儏 searchInfo() { - this.$axios.get(this.$api.deviceBreakdownMaintenance.getDeviceBreakdownMaintenance + '?maintenanceId=' + this.form.maintenanceId).then(res => { + getDeviceBreakdownMaintenance({ + maintenanceId: this.form.maintenanceId + }).then(res => { if (res.code === 200) { this.form = { ...res.data } if (this.form.isFinish === 0) { @@ -144,13 +151,7 @@ this.form.flowType = this.currentStep this.$refs.modelForm.validate((valid) => { if (valid) { - this.$axios.post(this.$api.deviceBreakdownMaintenance.addDeviceBreakdownMaintenance, - this.form, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true - }).then(res => { + addDeviceBreakdownMaintenance(this.form).then(res => { if (res.code == 200) { this.$message.success('鏂板鎴愬姛') this.resetForm() @@ -168,18 +169,11 @@ this.$emit('closeDialog') }, getUserList() { - this.$axios.post(this.$api.user.selectUserList, { - page: { current: -1, size: -1, }, - entity: { name: null } - }, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { + selectUserCondition().then(res => { if (res.code === 201) { return } - this.userList = res.data.records + this.userList = res.data }) }, }, diff --git a/src/views/CNAS/resourceDemand/device/component/fault.vue b/src/views/CNAS/resourceDemand/device/component/fault.vue index ed75e85..a229fa7 100644 --- a/src/views/CNAS/resourceDemand/device/component/fault.vue +++ b/src/views/CNAS/resourceDemand/device/component/fault.vue @@ -277,7 +277,7 @@ <script> import { dateFormat } from '@/utils/date' - +import { mapGetters } from "vuex"; export default { props: { clickNodeVal: { @@ -308,6 +308,7 @@ } }, computed: { + ...mapGetters(["nickName"]), action() { return this.javaApi + this.$api.personnel.saveCNASFile } @@ -351,29 +352,28 @@ this.$refs.form.validate((valid) => { if (valid === true || saveState !== '1submit') { // 缁欏綋鍓嶇幆鑺傝缃垱寤轰汉涓庢椂闂� - let user = JSON.parse(localStorage.getItem('user')) const dateTime = dateFormat(new Date()) // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡 switch (this.currentStep) { case 0: - this.form.submitUser = user.name - this.form.submitOperatingPersonnel = user.name + this.form.submitUser = this.nickName + this.form.submitOperatingPersonnel = this.nickName this.form.submitDate = dateTime break case 1: - this.form.adminOperatingPersonnel = user.name + this.form.adminOperatingPersonnel = this.nickName this.form.adminDate = dateTime break case 2: - this.form.technicalOperatingPersonnel = user.name + this.form.technicalOperatingPersonnel = this.nickName this.form.technicalDate = dateTime break case 3: - this.form.maintainOperatingPersonnel = user.name + this.form.maintainOperatingPersonnel = this.nickName this.form.maintainDate = dateTime break case 4: - this.form.afterMaintenanceOperatingPersonnel = user.name + this.form.afterMaintenanceOperatingPersonnel = this.nickName this.form.afterMaintenanceDate = dateTime break default: diff --git a/src/views/CNAS/resourceDemand/device/component/files.vue b/src/views/CNAS/resourceDemand/device/component/files.vue index a81d492..2ec826d 100644 --- a/src/views/CNAS/resourceDemand/device/component/files.vue +++ b/src/views/CNAS/resourceDemand/device/component/files.vue @@ -809,7 +809,6 @@ this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '璁惧妗f鍗�.doc') - this.$message.success('瀵煎嚭鎴愬姛') }) }, handleSuccessUpImg2(response) { diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue index 6b6b36b..5e33adc 100644 --- a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue +++ b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue @@ -136,6 +136,13 @@ </template> <script> +import { + getDeviceInspectionRecord, + addDeviceInspectionRecord, + updateDeviceInspectionRecord, + reviewDeviceInspectionRecord, +} from '@/api/cnas/resourceDemand/device.js' +import { selectUserCondition } from "@/api/business/inspectionTask"; export default { name: "inspection-form", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -181,7 +188,9 @@ } }, searchInfo() { - this.$axios.get(this.$api.deviceInspectionRecord.getDeviceInspectionRecord + '?inspectionRecordId=' + this.form.inspectionRecordId).then(res => { + getDeviceInspectionRecord({ + inspectionRecordId: this.form.inspectionRecordId + }).then(res => { if (res.code === 200) { this.form = { ...res.data } this.details = this.form.details || [] @@ -198,13 +207,7 @@ this.form.details = this.HaveJson(this.details) this.submitFormLoading = true if (this.operationType === 'add') { - this.$axios.post(this.$api.deviceInspectionRecord.addDeviceInspectionRecord, - this.form, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true - }).then(res => { + addDeviceInspectionRecord(this.form).then(res => { if (res.code == 200) { this.$message.success('鏂板鎴愬姛') this.resetForm() @@ -214,13 +217,7 @@ this.submitFormLoading = false }) } else { - this.$axios.post(this.$api.deviceInspectionRecord.updateDeviceInspectionRecord, - this.form, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true - }).then(res => { + updateDeviceInspectionRecord(this.form).then(res => { if (res.code == 200) { this.$message.success('鏂板鎴愬姛') this.resetForm() @@ -236,13 +233,7 @@ inspectionRecordId: this.form.inspectionRecordId, status: status, } - this.$axios.post(this.$api.deviceInspectionRecord.reviewDeviceInspectionRecord, - params, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true - }).then(res => { + reviewDeviceInspectionRecord(params).then(res => { if (res.code == 200) { this.$message.success('瀹℃牳鎴愬姛') this.resetForm() @@ -257,18 +248,11 @@ this.$emit('closeDialog') }, getUserList() { - this.$axios.post(this.$api.user.selectUserList, { - page: { current: -1, size: -1, }, - entity: { name: null } - }, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { + selectUserCondition().then(res => { if (res.code === 201) { return } - this.userList = res.data.records + this.userList = res.data }) }, }, diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue b/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue index 78709ed..83af6ff 100644 --- a/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue +++ b/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue @@ -48,7 +48,11 @@ <script> import InspectionForm from "./inspectionForm.vue"; - +import { + getDeviceInspectionRecordByPage, + exportDeviceInspectionRecord, + deleteDeviceInspectionRecord, +} from '@/api/cnas/resourceDemand/device.js' export default { name: "inspection-of-equipment", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -81,19 +85,10 @@ // 鏌ヨ getYearTableDetailData(deviceId) { this.yearTableDetailDataLoading = true - this.$axios.post(this.$api.deviceInspectionRecord.getDeviceInspectionRecordByPage, { - page: { - current: this.pagination1.current, - size: this.pagination1.size, - }, - entity: { - deviceId: deviceId, - } - }, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true + getDeviceInspectionRecordByPage({ + current: this.pagination1.current, + size: this.pagination1.size, + deviceId: deviceId, }).then(res => { if (res.code == 200) { this.yearTableDetailData = res.data.records @@ -127,37 +122,12 @@ // 瀵煎嚭 handleDownOne(id) { this.outLoading = true - this.$axios.get(this.$api.deviceInspectionRecord.exportDeviceInspectionRecord + '?inspectionRecordId=' + id, { - responseType: "blob" + exportDeviceInspectionRecord({ + inspectionRecordId: id }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧鐐规璁板綍琛�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧鐐规璁板綍琛�.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '璁惧鐐规璁板綍琛�.doc') }) }, // 鍒犻櫎 @@ -167,7 +137,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - this.$axios.get(this.$api.deviceInspectionRecord.deleteDeviceInspectionRecord + '?inspectionRecordId=' + id).then(res => { + deleteDeviceInspectionRecord({ inspectionRecordId: id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�'); this.getYearTableDetailData(this.clickNodeVal.value); }); diff --git a/src/views/CNAS/resourceDemand/device/component/maintenance.vue b/src/views/CNAS/resourceDemand/device/component/maintenance.vue index 8510263..9ea4f5a 100644 --- a/src/views/CNAS/resourceDemand/device/component/maintenance.vue +++ b/src/views/CNAS/resourceDemand/device/component/maintenance.vue @@ -118,8 +118,10 @@ <script> import { exportMaintenanceRecord, - deviceMaintainDelete, + deleteDeviceMaintenance, selectDeviceByCode, + addDeviceMaintenance, + getDeviceMaintenancePage, } from '@/api/cnas/resourceDemand/device.js' export default { props: { @@ -180,33 +182,7 @@ exportMaintenanceRecord({ deviceId: this.clickNodeVal.value }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - this.$message.success('瀵煎嚭鎴愬姛') - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧缁存姢淇濆吇璁板綍.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧缁存姢淇濆吇璁板綍.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '璁惧缁存姢淇濆吇璁板綍.doc') }) }, //鎿嶄綔璇︽儏鍒犻櫎 @@ -216,9 +192,10 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deviceMaintainDelete(row.id).then(res => { + deleteDeviceMaintenance({ id: row.id }).then(res => { }) - this.MaintainParam.splice(index, 1); + // this.MaintainParam.splice(index, 1); + this.getAllMessage(this.clickNodeVal.value) this.$message({ type: 'success', message: '鍒犻櫎鎴愬姛!' @@ -246,15 +223,15 @@ this.$refs['form'].validate((valid) => { if (valid) { this.formData.deviceId = this.clickNodeVal.value; - this.$axios.post(this.$api.deviceCheck.deviceMaintainAdd, this.formData).then(res => { + addDeviceMaintenance(this.formData).then(res => { if (res.code == 200) { this.$message.success('娣诲姞鎴愬姛'); this.getAllMessage(this.clickNodeVal.value) + this.dialogVisible = false; + this.formData = {}; //娓呯┖琛ㄥ崟 } }) - this.MaintainParam.push(this.formData) - this.dialogVisible = false; - this.formData = {}; //娓呯┖琛ㄥ崟 + // this.MaintainParam.push(this.formData) } }) }, @@ -269,7 +246,10 @@ }, //鑾峰彇琛ㄥ崟璁惧缁存姢淇℃伅 getAllMessage(deviceId) { - this.$axios.get(this.$api.deviceCheck.getDeviceMaintenancePage + "?deviceId=" + deviceId + "&size=" + this.search.size + "¤t=" + this.search.current + "&deviceNumber=" + this.search.deviceNumber).then(res => { + getDeviceMaintenancePage({ + deviceId, + ...this.search + }).then(res => { if (res.code == 200) { this.MaintainParam = res.data.records this.search.total = res.data.total diff --git a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue index 318eca1..8ab8536 100644 --- a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue +++ b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue @@ -1,16 +1,9 @@ <!-- 浣滀笟鎸囧涔� --> <template> <div> - <div style="width:100%;height:30px;margin:5px 0px"> - <el-row> - <el-col :span="12" style="text-align: left;"> - <p style="line-height: 30px;">浣滀笟鎸囧涔�</p> - </el-col> - <el-col :span="12" style="text-align: right;"> - <el-button size="small" type="primary" @click="getList">鍒锋柊</el-button> - <el-button size="small" type="primary" @click="dialogVisible = true">鍙楁帶鐢宠</el-button> - </el-col> - </el-row> + <div style="margin: 10px 0;text-align: right"> + <el-button size="small" type="primary" @click="getList">鍒锋柊</el-button> + <el-button size="small" type="primary" @click="dialogVisible = true">鍙楁帶鐢宠</el-button> </div> <el-table :data="tableData" border height="calc(100vh - 18em)"> <el-table-column type="index" label="搴忓彿" width="120"> @@ -58,8 +51,8 @@ </el-form-item> <el-form-item label="闄勪欢锛�" style="float: left;"> <el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList1" - :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove1" - :on-success="onSuccess1" class="upload-demo" multiple> + :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed" + :on-remove="handleRemove1" :on-success="onSuccess1" class="upload-demo" multiple> <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> </el-upload> </el-form-item> @@ -86,7 +79,7 @@ <el-button size="small" @click="delFile">鍒犻櫎</el-button> </div> <el-table :data="documentTableData" border style="width: 100%;" tooltip-effect="dark" :row-key="getRowKey" - @selection-change="handleSelectionChange" height="30em"> + @selection-change="handleSelectionChange" height="29em"> <el-table-column type="selection" width="55%"> </el-table-column> <el-table-column label="搴忓彿" prop="id" type="index" width="60"></el-table-column> @@ -165,8 +158,8 @@ <el-col :span="24"> <el-form-item label="闄勪欢锛�" style="float: left;"> <el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList" - :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove" - :on-success="onSuccess" class="upload-demo" multiple> + :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed" + :on-remove="handleRemove" :on-success="onSuccess" class="upload-demo" multiple> <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> </el-upload> </el-form-item> @@ -184,7 +177,15 @@ <script> import fileDownload from "@/utils/file"; - +import { + approvalOfHomeworkInstructionManual, + homeworkGuidebook, + homeworkGuidebookEditor, + newHomeworkGuidebookAdded, + deleteHomeworkGuidebook, + pageByPageQueryOfHomeworkInstructions, + selectDeviceParameter, +} from '@/api/cnas/resourceDemand/device.js' export default { props: { clickNodeVal: { @@ -275,13 +276,14 @@ }); }, approvalFun(id, status) { - this.$axios.get(this.$api.deviceCheck.approvalOfHomeworkInstructionManual + "?id=" + id + "&status=" + status).then(res => { + approvalOfHomeworkInstructionManual({ id, status }).then(res => { this.getList() + this.$message({ + type: 'success', + message: '鎿嶄綔鎴愬姛!' + }); }) - this.$message({ - type: 'success', - message: '鎿嶄綔鎴愬姛!' - }); + }, getRowKey(row) { return row.index @@ -292,7 +294,10 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - this.$axios.get(this.$api.deviceCheck.homeworkGuidebook + "?id=" + row.id + "&instructionId=" + row.instructionId).then(res => { + homeworkGuidebook({ + id: row.id, + instructionId: row.instructionId + }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.getList() }) @@ -319,7 +324,7 @@ }, instructionEditFun(row) { this.dialogVisible = true - this.$axios.get(this.$api.deviceCheck.homeworkGuidebookEditor + "?instructionId=" + row.instructionId).then(res => { + homeworkGuidebookEditor({ instructionId: row.instructionId }).then(res => { if (res.code == 200) { this.instructionForm = res.data.instruction; if (this.instructionForm.fileSystemName) { @@ -345,11 +350,7 @@ this.$refs.form1.validate((valid) => { if (valid) { this.instructionForm.feTempHumRecordList = this.documentTableData - this.$axios.post(this.$api.deviceCheck.newHomeworkGuidebookAdded, this.instructionForm, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { + newHomeworkGuidebookAdded(this.instructionForm).then(res => { if (res.code == 200) { this.$message.success('鎿嶄綔鎴愬姛锛�') this.dialogVisible = false @@ -445,7 +446,7 @@ .filter(item => item.id !== undefined) .map(item => item.id).join(','); //鏈夐敊璇� - const res = await this.$axios.get(this.$api.deviceCheck.deleteHomeworkGuidebook + '?ids=' + ids); + const res = await deleteHomeworkGuidebook({ ids }); if (res.code === 200) { // 鍒犻櫎瑙嗗浘鐨勬暟鎹� for (const resKey in this.selectedRow) { @@ -483,7 +484,7 @@ this.$message.warning(`褰撳墠闄愬埗閫夋嫨 1 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠躲�俙); }, getList() { - this.$axios.get(this.$api.deviceCheck.pageByPageQueryOfHomeworkInstructions + "?size=" + this.search.size + "¤t=" + this.search.current).then(res => { + pageByPageQueryOfHomeworkInstructions({ ...this.search }).then(res => { if (res.code == 200) { this.tableData = res.data.records; this.search.total = res.data.total @@ -491,17 +492,7 @@ }) }, getAllDevice() { - this.$axios.post(this.$api.deviceScope.selectDeviceParameter + "?laboratoryNameIsNull=" + this.laboratoryNameIsNull, { - page: { - current: 1, - size: -1 - }, - entity: this.entity - }, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { + selectDeviceParameter({ laboratoryNameIsNull: this.laboratoryNameIsNull }).then(res => { if (res.code == 200) { this.devices = res.data.records; this.updateDeviceNameOptions(); @@ -527,13 +518,8 @@ }, }, computed: { - headers() { - return { - 'token': sessionStorage.getItem('token') - } - }, action() { - return this.javaApi + this.$api.personnel.saveCNASFile + return this.javaApi + '/personBasicInfo/saveCNASFile' } }, } diff --git a/src/views/CNAS/resourceDemand/device/component/record.vue b/src/views/CNAS/resourceDemand/device/component/record.vue index 6558776..7b61015 100644 --- a/src/views/CNAS/resourceDemand/device/component/record.vue +++ b/src/views/CNAS/resourceDemand/device/component/record.vue @@ -350,14 +350,7 @@ }, getUserList() { selectUserCondition().then(res => { - let data = []; - res.data.forEach((a) => { - data.push({ - label: a.name, - value: a.id, - }); - }); - this.userList = data + this.userList = res.data }) }, }, diff --git a/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue b/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue index a01adbf..62fcbbc 100644 --- a/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue +++ b/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue @@ -73,6 +73,11 @@ </template> <script> +import { + getDeviceScrapped, + addDeviceScrapped, +} from '@/api/cnas/resourceDemand/device.js' +import { selectUserCondition } from "@/api/business/inspectionTask"; export default { name: "scrapApplicationForm", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -122,7 +127,9 @@ }, // 鏌ヨ璇︽儏 searchInfo() { - this.$axios.get(this.$api.deviceScrapped.getDeviceScrapped + '?scrappedId=' + this.form.scrappedId).then(res => { + getDeviceScrapped({ + scrappedId: this.form.scrappedId + }).then(res => { if (res.code === 200) { this.form = { ...res.data } if (this.form.isFinish === 0) { @@ -155,13 +162,7 @@ this.form.flowType = this.currentStep this.$refs.modelForm.validate((valid) => { if (valid) { - this.$axios.post(this.$api.deviceScrapped.addDeviceScrapped, - this.form, { - headers: { - 'Content-Type': 'application/json' - }, - noQs: true - }).then(res => { + addDeviceScrapped(this.form).then(res => { if (res.code == 200) { this.$message.success('鏂板鎴愬姛') this.resetForm() @@ -179,18 +180,11 @@ this.$emit('closeDialog') }, getUserList() { - this.$axios.post(this.$api.user.selectUserList, { - page: { current: -1, size: -1, }, - entity: { name: null } - }, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { + selectUserCondition().then(res => { if (res.code === 201) { return } - this.userList = res.data.records + this.userList = res.data }) }, }, diff --git a/src/views/CNAS/resourceDemand/device/component/state.vue b/src/views/CNAS/resourceDemand/device/component/state.vue index 9994f65..7bbe1e3 100644 --- a/src/views/CNAS/resourceDemand/device/component/state.vue +++ b/src/views/CNAS/resourceDemand/device/component/state.vue @@ -237,7 +237,17 @@ </div> </template> <script> +import { + saveDeviceState, + selectDeviceByCode, + exportDeviceStatus, + deleteDeviceState, + deviceStateExport, + getDeviceStatePage, +} from '@/api/cnas/resourceDemand/device.js' +import { selectUserCondition } from "@/api/business/inspectionTask"; import { dateFormat } from '@/utils/date' +import { mapGetters } from "vuex"; export default { props: { clickNodeVal: { @@ -246,6 +256,9 @@ return {}; } } + }, + computed: { + ...mapGetters(["nickName"]), }, data() { return { @@ -311,25 +324,24 @@ this.$refs.form.validate((valid) => { if (valid === true || saveState !== '1submit') { // 缁欏綋鍓嶇幆鑺傝缃垱寤轰汉涓庢椂闂� - let user = JSON.parse(localStorage.getItem('user')) const dateTime = dateFormat(new Date()) // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡 switch (this.currentStep) { case 0: - this.form.createUser = user.name - this.form.submitOperatingPersonnel = user.name + this.form.createUser = this.nickName + this.form.submitOperatingPersonnel = this.nickName this.form.submitDate = dateTime break case 1: - this.form.departmentOperatingPersonnel = user.name + this.form.departmentOperatingPersonnel = this.nickName this.form.departmentDate = dateTime break case 2: - this.form.measuringRoomOperatingPersonnel = user.name + this.form.measuringRoomOperatingPersonnel = this.nickName this.form.measuringRoomDate = dateTime break case 3: - this.form.approvalOperatingPersonnel = user.name + this.form.approvalOperatingPersonnel = this.nickName this.form.approvalDate = dateTime break default: @@ -355,11 +367,7 @@ // 鑾峰彇褰撳墠鐘舵�� this.form.currentState = currentStepAction === 4 ? '鍏抽棴' : this.steps[currentStepAction] this.form.deviceId = this.clickNodeVal.value - this.$axios.post(this.$api.deviceCheck.saveDeviceState, this.form, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { + saveDeviceState(this.form).then(res => { if (res.code == 200) { this.$message.success('鎻愪氦鎴愬姛') this.getDeviceStatePage(this.clickNodeVal.value) @@ -385,7 +393,7 @@ }, openRecordAcceptance() { // 鑾峰彇璁惧鍩虹淇℃伅 - this.$axios.get(this.$api.deviceScope.selectDeviceByCode + '?id=' + this.clickNodeVal.value).then(res => { + selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => { this.form.deviceName = res.data.deviceName this.form.specificationModel = res.data.specificationModel this.form.managementNumber = res.data.managementNumber @@ -398,7 +406,7 @@ }, // 鑾峰彇璐熻矗浜轰俊鎭帴鍙� getUserList() { - this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { + selectUserCondition().then(res => { if (res.code == 200) { this.responsibleOptions = res.data } @@ -418,37 +426,10 @@ // 瀵煎嚭 handleDownOne(row) { this.outLoading = true - this.$axios.get(this.$api.deviceCheck.exportDeviceStatus + '?deviceId=' + row.deviceId + '&processNumber=' + row.processNumber, { - responseType: "blob" - }).then(res => { + exportDeviceStatus({ deviceId: row.deviceId, processNumber: row.processNumber }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧鍋�/鍚敤.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧鍋�/鍚敤.doc'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '璁惧鍋�/鍚敤.doc') }) }, // 鍒犻櫎 @@ -458,7 +439,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - this.$axios.delete(this.$api.deviceCheck.deleteDeviceState + '?stateId=' + row.stateId).then(res => { + deleteDeviceState({ stateId: row.stateId }).then(res => { if (res.code == 200) { this.$message.success('鍒犻櫎鎴愬姛') this.getDeviceStatePage(this.clickNodeVal.value) @@ -470,43 +451,17 @@ message: '宸插彇娑堝垹闄�' }); }); - }, //瀵煎嚭 handleDown() { this.outLoading = true - this.$axios.post(this.$api.deviceCheck.deviceStateExport, { + deviceStateExport({ deviceId: this.clickNodeVal.value, processNumber: this.search.processNumber - }, { responseType: "blob" }).then(res => { + }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧鍋滅敤/鍚敤.xlsx'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '璁惧鍋滅敤/鍚敤.xlsx'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '璁惧鍋滅敤/鍚敤.xlsx') }).finally(() => { this.outLoading = false }) @@ -521,7 +476,7 @@ this.getDeviceStatePage(this.clickNodeVal.value); }, getDeviceStatePage(deviceId) { - this.$axios.get(this.$api.deviceCheck.getDeviceStatePage + '?deviceId=' + deviceId + "&size=" + this.search.size + "¤t=" + this.search.current + "&processNumber=" + this.search.processNumber).then(res => { + getDeviceStatePage({ deviceId, ...this.search }).then(res => { if (res.code == 200) { this.tableDatalist = res.data.records this.search.total = res.data.total diff --git a/src/views/CNAS/resourceDemand/device/index.vue b/src/views/CNAS/resourceDemand/device/index.vue index 6a23ed4..0720819 100644 --- a/src/views/CNAS/resourceDemand/device/index.vue +++ b/src/views/CNAS/resourceDemand/device/index.vue @@ -97,29 +97,37 @@ <!-- <check v-if="tabListActiveName == '璁惧鏍告煡'" :clickNodeVal="clickNodeVal"/>--> <!-- </el-tab-pane>--> <el-tab-pane label="璁惧缁存姢" name="璁惧缁存姢"> + <!-- 瀹屾垚鎺ュ彛 --> <maintenance v-if="tabListActiveName == '璁惧缁存姢'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> <el-tab-pane label="璁惧鍊熺敤" name="璁惧鍊熺敤"> + <!-- 瀹屾垚鎺ュ彛 --> <borrow v-if="tabListActiveName == '璁惧鍊熺敤'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> <!-- <el-tab-pane label="璁惧鏁呴殰" name="璁惧鏁呴殰">--> <!-- <fault v-if="tabListActiveName == '璁惧鏁呴殰'" :clickNodeVal="clickNodeVal" />--> <!-- </el-tab-pane>--> + <!-- 瀹屾垚鎺ュ彛 --> <el-tab-pane label="浣跨敤璁板綍" name="浣跨敤璁板綍"> <record v-if="tabListActiveName == '浣跨敤璁板綍'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> + <!-- 瀹屾垚鎺ュ彛 --> <el-tab-pane label="璁惧鍋滅敤/鍚敤" name="璁惧鍋滅敤/鍚敤"> <state v-if="tabListActiveName == '璁惧鍋滅敤/鍚敤'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> + <!-- 瀹屾垚鎺ュ彛 --> <el-tab-pane label="璁惧鎶ュ簾" name="璁惧鎶ュ簾"> <equipment-scrap v-if="tabListActiveName == '璁惧鎶ュ簾'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> + <!-- 瀹屾垚鎺ュ彛 --> <el-tab-pane label="璁惧鏁呴殰涓庣淮淇�" name="璁惧鏁呴殰涓庣淮淇�"> <equipment-failure v-if="tabListActiveName == '璁惧鏁呴殰涓庣淮淇�'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> + <!-- 瀹屾垚鎺ュ彛 --> <el-tab-pane label="璁惧鐐规" name="璁惧鐐规"> <inspection-of-equipment v-if="tabListActiveName == '璁惧鐐规'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> + <!-- 瀹屾垚鎺ュ彛 --> <el-tab-pane label="璁惧浜嬫晠" name="璁惧浜嬫晠"> <equipment-accident v-if="tabListActiveName == '璁惧浜嬫晠'" :clickNodeVal="clickNodeVal" /> </el-tab-pane> @@ -233,13 +241,13 @@ } }, nodeOpen(data, node, el) { - $($(el.$el).find(".node_i")[0]).attr( - "class", - "node_i el-icon-folder-opened" - ); + // $($(el.$el).find(".node_i")[0]).attr( + // "class", + // "node_i el-icon-folder-opened" + // ); }, nodeClose(data, node, el) { - $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); + // $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); }, } }; diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue index 3c32a22..04a2e27 100644 --- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue +++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue @@ -4,14 +4,8 @@ <div> <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> <el-form-item label="鏃ユ湡" prop="registerDate"> - <el-date-picker v-model="searchForm.registerDate" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="searchForm.registerDate" 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-form-item> @@ -27,9 +21,10 @@ </div> <div class="table"> <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" - :page="page" :tableLoading="tableLoading"></lims-table> + :page="page" :tableLoading="tableLoading"></lims-table> </div> - <personnel-management-dia v-if="threeWastesDia" ref="threeWastesDia" @closeThreeWastesDia="closeThreeWastesDia"></personnel-management-dia> + <personnel-management-dia v-if="threeWastesDia" ref="threeWastesDia" + @closeThreeWastesDia="closeThreeWastesDia"></personnel-management-dia> </div> </template> @@ -46,7 +41,7 @@ export default { name: 'Personnel-management', // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: { limsTable, PersonnelManagementDia}, + components: { limsTable, PersonnelManagementDia }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { @@ -135,14 +130,14 @@ // 鏂规硶闆嗗悎 methods: { // 鏌ヨ鍒楄〃 - searchList () { + searchList() { this.tableLoading = true pageForeignRegister({ ...this.page, ...this.searchForm }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.tableData = res.data.records this.page.total = res.data.total } @@ -153,16 +148,16 @@ }) }, // 鍒犻櫎 - delPlan (row) { + delPlan(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - delForeignRegister({registerId:row.registerId}).then(res =>{ + delForeignRegister({ registerId: row.registerId }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.searchList() } @@ -178,26 +173,25 @@ }); }, // 鏂板锛岀紪杈戯紝鎵瑰噯寮规 - openFormDia (type, row) { + openFormDia(type, row) { this.threeWastesDia = true this.$nextTick(() => { this.$refs.threeWastesDia.openDia(type, row) }) }, // 瀵煎嚭 - handleDown () { + handleDown() { exportForeignRegister(this.searchForm).then(res => { - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '澶栨潵浜哄憳鐧昏.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, - closeThreeWastesDia () { + closeThreeWastesDia() { this.threeWastesDia = false this.searchList() }, // 閲嶇疆鏌ヨ鏉′欢 - resetSearchForm () { + resetSearchForm() { this.searchForm.registerDate = ''; this.searchList() }, diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue index a9c7baa..28a7b60 100644 --- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue +++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue @@ -6,10 +6,7 @@ <el-button size="small" type="primary" @click="clickAdd">鏂� 澧�</el-button> </div> </div> - <el-table - :data="tableData" - height="calc(100vh - 18em)" - style="width: 100%"> + <el-table :data="tableData" height="calc(100vh - 18em)" style="width: 100%"> <el-table-column label="搴忓彿" type="index" width="120"> <template v-slot="scope"> <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> @@ -32,44 +29,29 @@ </template> </el-table-column> </el-table> - <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" - @size-change="handleSizeChange" - @current-change="handleCurrentChange"> + <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" :total="search.total" + layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" + @current-change="handleCurrentChange"> </el-pagination> - <el-dialog - :visible.sync="dialogVisible" - title="鏂板" - width="50%" - @open="openDialog"> + <el-dialog :visible.sync="dialogVisible" title="鏂板" width="50%" @open="openDialog"> <div style="height: 50vh; overflow-y: auto"> <el-form ref="form" :model="form" label-width="120px"> <el-row> <el-col :span="12"> <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ユ祴璇曞湴鐐�', trigger: 'change' }]" label="娴嬭瘯鏃ユ湡" - prop="testDate"> - <el-date-picker - v-model="form.testDate" - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + prop="testDate"> + <el-date-picker v-model="form.testDate" 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 :rules="[{ required: true, message: '璇疯緭鍏ヨ澶囧悕绉�', trigger: 'change' }]" label="璁惧鍚嶇О" - prop="deviceId"> - <el-select v-model="form.deviceId" - class="table_input" - clearable - filterable - placeholder="璁惧鍚嶇О" - size="small" @change="getCalibrationDateFun"> - <el-option v-for="item in equipOptions" :key="item.id" :label="item.deviceName" :value="item.id"> - {{item.deviceName + item.managementNumber}} + prop="deviceId"> + <el-select v-model="form.deviceId" class="table_input" clearable filterable placeholder="璁惧鍚嶇О" + size="small" @change="getCalibrationDateFun"> + <el-option v-for="item in equipOptions" :key="item.id" :label="item.deviceName" :value="item.id"> + {{ item.deviceName + item.managementNumber }} </el-option> </el-select> </el-form-item> @@ -91,8 +73,8 @@ </el-col> <el-col :span="12"> <el-form-item label="妫�娴嬭��" prop="recipientUser"> - <el-select v-model="form.testerId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;"> + <el-select v-model="form.testerId" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -100,8 +82,8 @@ </el-col> <el-col :span="12"> <el-form-item label="鏍告煡浜�" prop="recipientUser"> - <el-select v-model="form.checkerId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;" > + <el-select v-model="form.checkerId" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -109,11 +91,7 @@ </el-col> <el-col :span="24"> <el-form-item label="缁撹"> - <el-input - v-model="form.conclusion" - :rows="2" - placeholder="璇疯緭鍏ュ唴瀹�" - type="textarea"> + <el-input v-model="form.conclusion" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" type="textarea"> </el-input> </el-form-item> </el-col> @@ -123,25 +101,14 @@ <el-button size="small" type="primary" @click="feMeasuredQuantityListAdd">鏂板</el-button> </div> <div> - <el-table - :data="form.illuminationDetectionAreaList" - height="40vh" - style="width: 100%; margin: auto"> + <el-table :data="form.illuminationDetectionAreaList" height="40vh" style="width: 100%; margin: auto"> <el-table-column label="搴忓彿" type="index" width="80"></el-table-column> - <el-table-column - align="center" - label="妫�娴嬪尯鍩熷悕绉�" - min-width="180" - prop="detectionAreaLabel"> + <el-table-column align="center" label="妫�娴嬪尯鍩熷悕绉�" min-width="180" prop="detectionAreaLabel"> <template #default="{ row }"> <el-input v-model="row.detectionAreaLabel" :rows="1" type="textarea"></el-input> </template> </el-table-column> - <el-table-column - align="center" - label="妫�娴嬪��" - min-width="300" - prop="name"> + <el-table-column align="center" label="妫�娴嬪��" min-width="300" prop="name"> <template> <el-table-column align="center" label="绗竴娆�" min-width="100" prop="valueOne"> <template #default="{ row }"> @@ -165,19 +132,12 @@ </el-table-column> </template> </el-table-column> - <el-table-column - align="center" - label="澶囨敞" - min-width="180" - prop="detectionAreaLabel"> + <el-table-column align="center" label="澶囨敞" min-width="180" prop="detectionAreaLabel"> <template #default="{ row }"> <el-input v-model="row.remark" :rows="1" type="textarea"></el-input> </template> </el-table-column> - <el-table-column - fixed="right" - label="鎿嶄綔" - width="100"> + <el-table-column fixed="right" label="鎿嶄綔" width="100"> <template slot-scope="scope"> <el-button size="small" type="text" @click="feMeasuredQuantityListDelete(scope.row, scope.$index)"> 鍒犻櫎 @@ -190,9 +150,9 @@ </el-form> </div> <span slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible = false">鍙� 娑�</el-button> - <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability">纭� 瀹�</el-button> - </span> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability">纭� 瀹�</el-button> + </span> </el-dialog> </div> </template> @@ -256,22 +216,22 @@ if (!isNaN(row.valueOne) && !isNaN(row.valueTwo) && !isNaN(row.valueThree)) { const avg = Number(row.valueOne) + Number(row.valueTwo) + Number(row.valueThree) console.log(avg) - row.average = Math.round(avg/3); + row.average = Math.round(avg / 3); } else { this.$message.warning("蹇呴』涓烘暟瀛楋紒") } } }, edit(row) { - getFeIlluminationDetectionArea({intensityIlluminationId:row.intensityIlluminationId}).then(res => { - this.form = {...row} + getFeIlluminationDetectionArea({ intensityIlluminationId: row.intensityIlluminationId }).then(res => { + this.form = { ...row } this.form.illuminationDetectionAreaList = res.data; this.dialogVisible = true }); }, initData() { - getFeLightningProtection({...this.search}).then(res => { - if (res.code === 200){ + getFeLightningProtection({ ...this.search }).then(res => { + if (res.code === 200) { this.tableData = res.data.records; this.search.total = res.data.total; } @@ -291,7 +251,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteFeLightningProtection({intensityIlluminationId: row.intensityIlluminationId}).then(res => { + deleteFeLightningProtection({ intensityIlluminationId: row.intensityIlluminationId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.initData() }) @@ -299,8 +259,8 @@ }, feMeasuredQuantityListDelete(row, index) { if (row.detectionAreaId) { - deleteFeIlluminationDetectionArea({detectionAreaId:row.detectionAreaId}).then(res => { - if (res.code === 200){ + deleteFeIlluminationDetectionArea({ detectionAreaId: row.detectionAreaId }).then(res => { + if (res.code === 200) { this.form.illuminationDetectionAreaList.splice(index, 1) this.$message.success('鍒犻櫎鎴愬姛锛�') } @@ -326,7 +286,7 @@ // 鑾峰彇鎵�鏈夎澶� getEquipOptions() { this.equipOptions = [] - deviceScopeSearch({status:'0'}).then(res => { + deviceScopeSearch({ status: '0' }).then(res => { if (res.code === 200 && res.data) { this.equipOptions = res.data } @@ -379,11 +339,10 @@ }, // 瀵煎嚭 downLoadPost(row) { - exportFeIllumination({intensityIlluminationId: row.intensityIlluminationId}).then(res => { + exportFeIllumination({ intensityIlluminationId: row.intensityIlluminationId }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鐓у害璁板綍.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, } diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue index 9e290ea..ba593ac 100644 --- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue +++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue @@ -6,10 +6,7 @@ <el-button size="small" type="primary" @click="openAddDia">鏂� 澧�</el-button> </div> </div> - <el-table - :data="tableData" - height="calc(100vh - 18em)" - style="width: 100%"> + <el-table :data="tableData" height="calc(100vh - 18em)" style="width: 100%"> <el-table-column label="搴忓彿" type="index" width="120"> <template v-slot="scope"> <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> @@ -33,50 +30,35 @@ </template> </el-table-column> </el-table> - <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" - @size-change="handleSizeChange" - @current-change="handleCurrentChange"> + <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" :total="search.total" + layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" + @current-change="handleCurrentChange"> </el-pagination> - <el-dialog - :visible.sync="dialogVisible" - title="鏂板" - width="50%" - @open="openDialog"> + <el-dialog :visible.sync="dialogVisible" title="鏂板" width="50%" @open="openDialog"> <div style="height: 50vh; overflow-y: auto"> <el-form ref="form" :model="form" label-width="120px"> <el-row> <el-col :span="12"> <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ユ祴璇曞湴鐐�', trigger: 'blur' }]" label="娴嬭瘯鍦扮偣" - prop="testLocation"> + prop="testLocation"> <el-input v-model="form.testLocation" size="small"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ユ祴璇曟棩鏈�', trigger: 'change' }]" label="娴嬭瘯鏃ユ湡" - prop="testDate"> - <el-date-picker - v-model="form.testDate" - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> + prop="testDate"> + <el-date-picker v-model="form.testDate" 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 :rules="[{ required: true, message: '璇疯緭鍏ヨ澶囧悕绉�', trigger: 'change' }]" label="璁惧鍚嶇О" - prop="deviceId"> - <el-select v-model="form.deviceId" - class="table_input" - clearable - filterable - placeholder="璁惧鍚嶇О" - size="small" @change="getCalibrationDateFun"> - <el-option v-for="item in equipOptions" :key="item.id" :label="item.deviceName" :value="item.id"> - {{item.deviceName + item.managementNumber}} + prop="deviceId"> + <el-select v-model="form.deviceId" class="table_input" clearable filterable placeholder="璁惧鍚嶇О" + size="small" @change="getCalibrationDateFun"> + <el-option v-for="item in equipOptions" :key="item.id" :label="item.deviceName" :value="item.id"> + {{ item.deviceName + item.managementNumber }} </el-option> </el-select> </el-form-item> @@ -98,8 +80,8 @@ </el-col> <el-col :span="12"> <el-form-item label="妫�娴嬭��" prop="recipientUser"> - <el-select v-model="form.testerId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;"> + <el-select v-model="form.testerId" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -107,8 +89,8 @@ </el-col> <el-col :span="12"> <el-form-item label="鏍告煡浜�" prop="recipientUser"> - <el-select v-model="form.checkerId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;" > + <el-select v-model="form.checkerId" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -116,11 +98,7 @@ </el-col> <el-col :span="24"> <el-form-item label="缁撹"> - <el-input - v-model="form.conclusion" - :rows="2" - placeholder="璇疯緭鍏ュ唴瀹�" - type="textarea"> + <el-input v-model="form.conclusion" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" type="textarea"> </el-input> </el-form-item> </el-col> @@ -130,25 +108,14 @@ <el-button size="small" type="primary" @click="feMeasuredQuantityListAdd">鏂板</el-button> </div> <div> - <el-table - :data="form.feMeasuredQuantityList" - height="40vh" - style="width: 100%; margin: auto"> + <el-table :data="form.feMeasuredQuantityList" height="40vh" style="width: 100%; margin: auto"> <el-table-column label="搴忓彿" type="index" width="80"></el-table-column> - <el-table-column - align="center" - label="娴嬪畾閲忓悕绉�" - min-width="180" - prop="measuredQuantityLabel"> + <el-table-column align="center" label="娴嬪畾閲忓悕绉�" min-width="180" prop="measuredQuantityLabel"> <template #default="{ row }"> <el-input v-model="row.measuredQuantityLabel" :rows="1" type="textarea"></el-input> </template> </el-table-column> - <el-table-column - align="center" - label="鍊�" - min-width="300" - prop="name"> + <el-table-column align="center" label="鍊�" min-width="300" prop="name"> <template> <el-table-column align="center" label="A" min-width="100" prop="valueA"> <template #default="{ row }"> @@ -167,10 +134,7 @@ </el-table-column> </template> </el-table-column> - <el-table-column - fixed="right" - label="鎿嶄綔" - width="100"> + <el-table-column fixed="right" label="鎿嶄綔" width="100"> <template slot-scope="scope"> <el-button size="small" type="text" @click="feMeasuredQuantityListDelete(scope.row, scope.$index)"> 鍒犻櫎 @@ -250,7 +214,7 @@ getLaboratoryFacilityPowerStablePage({ ...this.search }).then(res => { - if (res.code === 200){ + if (res.code === 200) { this.tableData = res.data.records; this.search.total = res.data.total; } @@ -271,20 +235,20 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteLaboratoryFacilityPowerStable({powerStableId:row.powerStableId}).then(res => { + deleteLaboratoryFacilityPowerStable({ powerStableId: row.powerStableId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.initData() }) }) }, - openAddDia () { + openAddDia() { this.dialogVisible = true this.getEquipOptions() }, // 鑾峰彇鎵�鏈夎澶� getEquipOptions() { this.equipOptions = [] - deviceScopeSearch({status:'0'}).then(res => { + deviceScopeSearch({ status: '0' }).then(res => { if (res.code === 200 && res.data) { this.equipOptions = res.data } @@ -314,7 +278,7 @@ // 鐢垫簮绋冲畾鎬�-娴嬪畾閲忓脊妗嗕腑琛ㄦ牸鐨勫垹闄よ feMeasuredQuantityListDelete(row, index) { if (row.measuredQuantityId) { - deleteFeMeasuredQuantity({measuredQuantityId:row.measuredQuantityId}).then(res => { + deleteFeMeasuredQuantity({ measuredQuantityId: row.measuredQuantityId }).then(res => { if (res.code === 201) return this.form.feMeasuredQuantityList.splice(index, 1) this.$message.success('鍒犻櫎鎴愬姛锛�') @@ -353,17 +317,16 @@ }, // 瀵煎嚭 downLoadPost(row) { - exportFePowerStable({powerStableId: row.powerStableId}).then(res => { + exportFePowerStable({ powerStableId: row.powerStableId }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鐢垫簮绋冲畾鎬�.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鐢垫簮绋冲畾鎬� 鐐瑰嚮琛岀紪杈戣Е鍙� edit(row) { - getFeMeasuredQuantityService({powerStableId: row.powerStableId}).then((res => { - this.form = {...row} + getFeMeasuredQuantityService({ powerStableId: row.powerStableId }).then((res => { + this.form = { ...row } this.form.feMeasuredQuantityList = res.data; this.dialogVisible = true })) diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue index 2dbe82a..7452234 100644 --- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue +++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue @@ -11,12 +11,8 @@ <el-button size="small" type="primary" @click="clickAdd">鏂� 澧�</el-button> </div> </div> - <el-table - :data="tableData" - height="calc(100vh - 18em)" - highlight-current-row - style="width: 100%" - @row-click="clickRow"> + <el-table :data="tableData" height="calc(100vh - 18em)" highlight-current-row style="width: 100%" + @row-click="clickRow"> <el-table-column label="搴忓彿" type="index" width="60" align="center"></el-table-column> <el-table-column label="鏈堝害鏃堕棿" min-width="180" prop="monthDate"></el-table-column> <el-table-column label="璇曢獙鍖哄煙鍚嶇О" min-width="180" prop="testAreaName"></el-table-column> @@ -31,33 +27,32 @@ <template v-slot="scope"> <el-button size="small" type="text" @click="downLoadPost(scope.row)">瀵煎嚭</el-button> <el-button size="small" type="text" @click="edit(scope.row)">缂栬緫</el-button> - <el-button :disabled="scope.row.isAffirm === '1'" size="small" type="text" @click="openApprovalDialog(scope.row)">纭</el-button> + <el-button :disabled="scope.row.isAffirm === '1'" size="small" type="text" + @click="openApprovalDialog(scope.row)">纭</el-button> <el-button size="small" type="text" @click="deleteRowFun(scope.row)">鍒犻櫎</el-button> </template> </el-table-column> </el-table> <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" - @size-change="handleSizeChange" - @current-change="handleCurrentChange"> + :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" + @current-change="handleCurrentChange"> </el-pagination> </el-col> <el-col :span="12"> <div class="header"> <div>娓╂箍搴﹁褰曪細{{ saveRow.monthDate }}</div> <div> - <el-button v-if="saveRow.monthDate" size="small" type="primary" @click="dialogVisible1 = true">鏂� 澧�</el-button> + <el-button v-if="saveRow.monthDate" size="small" type="primary" @click="dialogVisible1 = true">鏂� + 澧�</el-button> </div> </div> - <el-table - :data="tableData1" - height="calc(100vh - 18em)" - style="width: 100%"> + <el-table :data="tableData1" height="calc(100vh - 18em)" style="width: 100%"> <el-table-column label="搴忓彿" type="index" width="60" align="center"></el-table-column> <el-table-column label="鏃ユ湡" min-width="100" prop="recordDate"></el-table-column> <el-table-column align="center" label="涓婂崍" min-width="200"> <template> - <el-table-column label="鏃堕棿" min-width="110" prop="morningTestTime" show-overflow-tooltip></el-table-column> + <el-table-column label="鏃堕棿" min-width="110" prop="morningTestTime" + show-overflow-tooltip></el-table-column> <el-table-column label="娓╁害" min-width="80" prop="morningTemp" show-overflow-tooltip></el-table-column> <el-table-column label="婀垮害" min-width="80" prop="morningHum" show-overflow-tooltip></el-table-column> </template> @@ -80,36 +75,26 @@ </el-table-column> </el-table> <el-pagination :current-page="1" :page-size="search1.size" :page-sizes="[10, 20, 30, 50, 100]" - :total="search1.total" layout="->,total, sizes, prev, pager, next, jumper" - @size-change="handleSizeChange1" - @current-change="handleCurrentChange1"> + :total="search1.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange1" + @current-change="handleCurrentChange1"> </el-pagination> </el-col> </el-row> - <el-dialog - :visible.sync="dialogVisible" - title="鎻愮ず" - width="50%"> + <el-dialog :visible.sync="dialogVisible" title="鎻愮ず" width="50%"> <div style="height: 20vh;"> <el-form ref="form" :model="form" label-width="80px"> <el-row> <el-col :span="24"> <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ユ湀搴︽椂闂�', trigger: 'blur' }]" label="鏈堝害鏃堕棿" - prop="monthDate"> - <el-date-picker - v-model="form.monthDate" - format="yyyy-MM" - placeholder="閫夋嫨鏈堜唤" - size="small" - style="width: 100%" - type="month" - value-format="yyyy-MM"> + prop="monthDate"> + <el-date-picker v-model="form.monthDate" format="yyyy-MM" placeholder="閫夋嫨鏈堜唤" size="small" + style="width: 100%" type="month" value-format="yyyy-MM"> </el-date-picker> </el-form-item> </el-col> <el-col :span="24"> <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ヨ瘯楠屽尯鍩�', trigger: 'blur' }]" label="璇曢獙鍖哄煙" - prop="testAreaName"> + prop="testAreaName"> <el-input v-model="form.testAreaName"></el-input> </el-form-item> </el-col> @@ -117,40 +102,25 @@ </el-form> </div> <span slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible = false">鍙� 娑�</el-button> - <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability">纭� 瀹�</el-button> - </span> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability">纭� 瀹�</el-button> + </span> </el-dialog> - <el-dialog - :visible.sync="dialogVisible1" - title="鎻愮ず" - width="50%" - @open="openDialog"> + <el-dialog :visible.sync="dialogVisible1" title="鎻愮ず" width="50%" @open="openDialog"> <div style="height: 40vh;"> <el-form ref="form1" :model="form1" label-width="120px"> <el-row> <el-col :span="24"> <el-form-item label="鏃ユ湡"> - <el-date-picker - v-model="form1.recordDate" - format="yyyy-MM-dd" - placeholder="璇烽�夋嫨鏃ユ湡" - size="small" - style="width: 50%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="form1.recordDate" format="yyyy-MM-dd" placeholder="璇烽�夋嫨鏃ユ湡" size="small" + style="width: 50%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="涓婂崍鏃堕棿"> - <el-time-picker - v-model="form1.morningTestTime" - size="small" - value-format="HH:mm:ss" - format="HH:mm:ss" - style="width: 100%" - placeholder="璇烽�夋嫨鏃堕棿"> + <el-time-picker v-model="form1.morningTestTime" size="small" value-format="HH:mm:ss" format="HH:mm:ss" + style="width: 100%" placeholder="璇烽�夋嫨鏃堕棿"> </el-time-picker> </el-form-item> </el-col> @@ -166,8 +136,8 @@ </el-col> <el-col :span="12"> <el-form-item label="涓婂崍璁板綍鍛�"> - <el-select v-model="form1.morningRecorderId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;"> + <el-select v-model="form1.morningRecorderId" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -175,13 +145,8 @@ </el-col> <el-col :span="12"> <el-form-item label="涓嬪崍鏃堕棿"> - <el-time-picker - v-model="form1.afternoonTime" - size="small" - value-format="HH:mm:ss" - format="HH:mm:ss" - style="width: 100%" - placeholder="璇烽�夋嫨鏃堕棿"> + <el-time-picker v-model="form1.afternoonTime" size="small" value-format="HH:mm:ss" format="HH:mm:ss" + style="width: 100%" placeholder="璇烽�夋嫨鏃堕棿"> </el-time-picker> </el-form-item> </el-col> @@ -197,8 +162,8 @@ </el-col> <el-col :span="12"> <el-form-item label="涓嬪崍璁板綍鍛�"> - <el-select v-model="form1.afternoonRecorderId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;"> + <el-select v-model="form1.afternoonRecorderId" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;"> <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> @@ -206,11 +171,7 @@ </el-col> <el-col :span="24"> <el-form-item label="澶囨敞"> - <el-input - v-model="form1.note" - :rows="2" - placeholder="璇疯緭鍏ュ唴瀹�" - type="textarea"> + <el-input v-model="form1.note" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" type="textarea"> </el-input> </el-form-item> </el-col> @@ -218,9 +179,9 @@ </el-form> </div> <span slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible1 = false">鍙� 娑�</el-button> - <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability1">纭� 瀹�</el-button> - </span> + <el-button @click="dialogVisible1 = false">鍙� 娑�</el-button> + <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability1">纭� 瀹�</el-button> + </span> </el-dialog> <el-dialog :visible.sync="approvalDialog" title="纭" width="30%" @close="subjoin = ''"> <span> @@ -295,11 +256,11 @@ } }, methods: { - openApprovalDialog (row) { + openApprovalDialog(row) { this.approvalDialog = true this.approvalRow = row }, - handleApproval () { + handleApproval() { this.approvalLoading = true const params = { dateId: this.approvalRow.dateId, @@ -367,7 +328,7 @@ this.initData1(row.dateId) }, edit(row) { - this.form = {...row} + this.form = { ...row } this.dialogVisible = true }, deleteRowFun(row) { @@ -376,23 +337,22 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteFeTempHumDate({dateId:row.dateId}).then(res => { + deleteFeTempHumDate({ dateId: row.dateId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.initData() }) }) }, edit1(row) { - this.form1 = {...row} + this.form1 = { ...row } this.dialogVisible1 = true }, // 瀵煎嚭 downLoadPost(row) { - exportTemperatureAndHumidityRecords({dateId:row.dateId}).then(res => { + exportTemperatureAndHumidityRecords({ dateId: row.dateId }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '娓╂箍搴﹁褰�.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, deleteRowFun1(row) { @@ -401,7 +361,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteFeTempHumRecord({tempHumId:row.tempHumId}).then(res => { + deleteFeTempHumRecord({ tempHumId: row.tempHumId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.initData1(this.saveRow.dateId) }) @@ -410,8 +370,9 @@ initData() { getFeTempHumDate({ ...this.search, - ...this.search}).then(res => { - if (res.code === 200){ + ...this.search + }).then(res => { + if (res.code === 200) { this.tableData = res.data.records; this.search.total = res.data.total; if (res.data.records.length === 0) { @@ -423,12 +384,12 @@ }) }, initData1(dateId) { - let form = {dateId: dateId} + let form = { dateId: dateId } getFeTempHumRecordPage({ ...this.search1, ...form }).then(res => { - if (res.code === 200){ + if (res.code === 200) { this.tableData1 = res.data.records; this.search1.total = res.data.total; } diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue index 81ead8f..1075ed4 100644 --- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue +++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue @@ -4,12 +4,12 @@ <div> <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> <el-form-item label="澶囨敞" prop="remark"> - <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.remark"> - </el-input> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.remark"> + </el-input> </el-form-item> <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">鏌� 璇�</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button> + <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">鏌� 璇�</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button> </el-form-item> </el-form> </div> @@ -20,9 +20,10 @@ </div> <div class="table"> <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" - :page="page" :tableLoading="tableLoading"></lims-table> + :page="page" :tableLoading="tableLoading"></lims-table> </div> - <three-wastes-dialog v-if="threeWastesDia" ref="threeWastesDia" @closeThreeWastesDia="closeThreeWastesDia"></three-wastes-dialog> + <three-wastes-dialog v-if="threeWastesDia" ref="threeWastesDia" + @closeThreeWastesDia="closeThreeWastesDia"></three-wastes-dialog> </div> </template> @@ -121,11 +122,11 @@ // 鏂规硶闆嗗悎 methods: { // 鏌ヨ鍒楄〃 - searchList () { + searchList() { this.tableLoading = true - pageInternalWastes({...this.page,...this.searchForm}).then(res => { + pageInternalWastes({ ...this.page, ...this.searchForm }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.tableData = res.data.records this.page.total = res.data.total } @@ -135,16 +136,16 @@ }) }, // 鍒犻櫎 - delPlan (row) { + delPlan(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - removeStandardSubstance({wastesId:row.wastesId}).then(res => { + removeStandardSubstance({ wastesId: row.wastesId }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.searchList() } @@ -160,27 +161,26 @@ }); }, // 鏂板锛岀紪杈戯紝鎵瑰噯寮规 - openFormDia (type, row) { + openFormDia(type, row) { this.threeWastesDia = true this.$nextTick(() => { this.$refs.threeWastesDia.openDia(type, row) }) }, // 瀵煎嚭 - handleDown (row) { - exportInternalWastes({wastesId:row.wastesId}).then(res =>{ + handleDown(row) { + exportInternalWastes({ wastesId: row.wastesId }).then(res => { this.outLoading = false - const blob = new Blob([res],{ type: 'application/msword' }); + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '涓夊簾澶勭悊瀵煎嚭.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, - closeThreeWastesDia () { + closeThreeWastesDia() { this.threeWastesDia = false this.searchList() }, // 閲嶇疆鏌ヨ鏉′欢 - resetSearchForm () { + resetSearchForm() { this.searchForm.remark = ''; this.searchList() }, diff --git a/src/views/CNAS/resourceDemand/standardMaterial/index.vue b/src/views/CNAS/resourceDemand/standardMaterial/index.vue index c23d9f9..2ad23f6 100644 --- a/src/views/CNAS/resourceDemand/standardMaterial/index.vue +++ b/src/views/CNAS/resourceDemand/standardMaterial/index.vue @@ -5,11 +5,11 @@ <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> <el-form-item label="鏍囧噯鐗╄川鍚嶇О" prop="name"> <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.name" - @keyup.enter.native="searchList"></el-input> + @keyup.enter.native="searchList"></el-input> </el-form-item> <el-form-item label="鐢熶骇鍘傚" prop="factoryManufacturer"> <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.factoryManufacturer" - @keyup.enter.native="searchList"></el-input> + @keyup.enter.native="searchList"></el-input> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">鏌� 璇�</el-button> @@ -24,7 +24,7 @@ </div> <div class="table"> <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" - :page="page" :tableLoading="tableLoading"></lims-table> + :page="page" :tableLoading="tableLoading"></lims-table> </div> <form-dia v-if="formDia" ref="formDia" @closeYearDia="closeYearDia"></form-dia> <borrow-dia v-if="borrowDia" ref="borrowDia" @closeYearDia="closeBorrowDia"></borrow-dia> @@ -177,39 +177,38 @@ mounted() { this.searchList() }, - methods :{ + methods: { exportFun() { this.outLoading = true - exportOfStandardSubstanceList(this.searchForm).then(res =>{ + exportOfStandardSubstanceList(this.searchForm).then(res => { this.outLoading = false - const blob = new Blob([res], {type: 'application/octet-stream'},false); + const blob = new Blob([res], { type: 'application/octet-stream' }, false); this.$download.saveAs(blob, '鏍囧噯鐗╄川娓呭崟.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鏌ヨ鍒楄〃 - searchList () { + searchList() { this.tableLoading = true getPageStandardSubstance({ ...this.page, ...this.searchForm }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.tableData = res.data.records this.page.total = res.data.total } }) }, // 鍒犻櫎 - delPlan (row) { + delPlan(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - removeStandardSubstance({id:row.id}).then(res => { + removeStandardSubstance({ id: row.id }).then(res => { this.tableLoading = false if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') @@ -226,40 +225,40 @@ }); }, // 鏂板锛岀紪杈戯紝鎵瑰噯寮规 - openFormDia (type, row) { + openFormDia(type, row) { this.formDia = true this.$nextTick(() => { this.$refs.formDia.openDia(type, row) }) }, - closeYearDia () { + closeYearDia() { this.formDia = false this.searchList() }, // 鍊熺敤 - borrow (row) { + borrow(row) { this.borrowDia = true this.$nextTick(() => { this.$refs.borrowDia.openDia(row) }) }, - closeBorrowDia () { + closeBorrowDia() { this.borrowDia = false this.searchList() }, // 褰掕繕 - return (row) { + return(row) { this.returnDia = true this.$nextTick(() => { this.$refs.returnDia.openDia(row) }) }, - closeReturnDia () { + closeReturnDia() { this.returnDia = false this.searchList() }, // 閲嶇疆鏌ヨ鏉′欢 - resetSearchForm () { + resetSearchForm() { this.searchForm.name = ''; this.searchForm.factoryManufacturer = ''; this.searchList() diff --git a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue index fe9ee04..7d4585a 100644 --- a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue +++ b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue @@ -142,7 +142,6 @@ exportFeStandardSubstanceAcceptance().then(res => { const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鏍囧噯鐗╄川楠屾敹.xlsx'); - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鍒嗛〉鍒囨崲 diff --git a/src/views/CNAS/systemManagement/correctiveAction/index.vue b/src/views/CNAS/systemManagement/correctiveAction/index.vue index bb41fae..9360848 100644 --- a/src/views/CNAS/systemManagement/correctiveAction/index.vue +++ b/src/views/CNAS/systemManagement/correctiveAction/index.vue @@ -141,7 +141,6 @@ handleDown(row) { exportSuperviseDetaillCorrect({ superviseDetailsCorrectId: row.superviseDetailsCorrectId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鐩戠潱绾犳鎺柦' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue index a85c943..4a1900c 100644 --- a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue +++ b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue @@ -144,8 +144,8 @@ page: { size: 20, current: 1, + total: 0, }, - total: 0, tableColumn1: [ { label: '闄勪欢鍚嶇О', @@ -197,8 +197,8 @@ page1: { size: 20, current: 1, + total: 0, }, - total1: 0, formDialog: false, upLoading: false, currentInfo: {}, @@ -220,7 +220,7 @@ this.tableLoading = false if (res.code === 201) return this.tableData = res.data.records - this.total = res.data.total + this.page.total = res.data.total }).catch(err => { console.log('err---', err); this.tableLoading = false @@ -231,7 +231,7 @@ this.tableLoading1 = false if (res.code === 201) return this.tableData1 = res.data.records - this.total1 = res.data.total + this.page1.total = res.data.total }).catch(err => { console.log('err---', err); this.tableLoading1 = false diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue index 765c0d3..88bc13d 100644 --- a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue +++ b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue @@ -317,6 +317,8 @@ if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); this.refreshTable() + }else { + this.$message.error(response.msg); } }, selectEnumByCategory() { diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue b/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue index 4bd35e0..85e23d6 100644 --- a/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue +++ b/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue @@ -427,7 +427,6 @@ this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鏂囦欢浣滃簾琛�.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, handleDelete(row) { diff --git a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue index 8431ad9..7ec4c3a 100644 --- a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue @@ -284,7 +284,6 @@ exportOutManageRecordCheck(this.queryParams).then(res => { this.outLoading = false if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触') - this.$message.success('瀵煎嚭鎴愬姛') let url = this.javaApi + '/word/' + res.message this.$download.saveAs(url, '鏂囦欢瀹℃壒璁板綍') }) diff --git a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue index e766d78..29112da 100644 --- a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue @@ -244,7 +244,6 @@ exportOutManageRecordCancel(this.queryParams).then(res => { this.outLoading = false if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触') - this.$message.success('瀵煎嚭鎴愬姛') let url = this.javaApi + '/word/' + res.data this.$download.saveAs(url, "浣滃簾鏂囦欢閿�姣佽褰�"); }) diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue index f4fcca0..bd992eb 100644 --- a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue @@ -301,7 +301,6 @@ exportOutManageRecordIssueRecycle(this.queryParams).then(res => { this.outLoading = false if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触') - this.$message.success('瀵煎嚭鎴愬姛') let url = this.javaApi + '/word/' + res.data this.$download.saveAs(url, '鏂囦欢鍙戞斁涓庡洖鏀惰褰�') }) diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue index 79763f5..53f1e11 100644 --- a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue @@ -450,7 +450,6 @@ exportOutManageRecordIntervals(this.queryParams).then(res => { this.outLoading = false if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触') - this.$message.success('瀵煎嚭鎴愬姛') let url = this.javaApi + 'word/' + res.message this.$download.saveAs(url, "鏂囦欢瀹氭湡瀹℃煡璁板綍"); }) diff --git a/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue index c281b47..61ac164 100644 --- a/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue @@ -550,7 +550,6 @@ exportOutManageRecordAudit(this.queryParams).then(res => { this.outLoading = false if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触') - this.$message.success('瀵煎嚭鎴愬姛') let url = this.javaApi + '/word/' + res.data this.$download.saveAs(url, "鏂囦欢淇琛�"); }) diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue index ecbc0cf..8b851ca 100644 --- a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue +++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue @@ -223,7 +223,6 @@ handleDown(row) { exportInternalCheck({ checkId: row.checkId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鍐呭妫�鏌�' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue index 1ea5e3a..f18a42f 100644 --- a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue +++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue @@ -171,7 +171,6 @@ handleDown(row) { exportInternalMeeting({ meetingId: row.meetingId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鍐呭浼氳绛惧埌' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue index 1eb6332..6909f5e 100644 --- a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue +++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue @@ -281,7 +281,6 @@ handleDown(row) { exportInternalReport({ reportId: row.reportId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鍐呭鎶ュ憡' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue index 86acfd3..58b1b4b 100644 --- a/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue +++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue @@ -147,7 +147,6 @@ handleDown(row) { exportInternalCorrect({ correctId: row.correctId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鍐呭绾犳鎺柦' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue index 92f721f..e1810e9 100644 --- a/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue +++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue @@ -261,7 +261,6 @@ handleDown(row) { exportInternalImplement({ implementId: row.implementId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鍐呭瀹炴柦璁″垝' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue index 77b898f..edd31a9 100644 --- a/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue +++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue @@ -274,7 +274,6 @@ handleDown(row) { exportInternalPlan({ planId: row.planId }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鍐呭骞村害璁″垝' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue b/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue index 20cd3c2..14dc270 100644 --- a/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue +++ b/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue @@ -271,10 +271,6 @@ }, handleDown(row) { exportReviewProgram({ id: row.id }).then(res => { - if (res.code == 201) { - this.$message.error(res.message) - return - } const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '璇勫璁″垝.docx'); }) diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue index b0c63c5..cdc0c7a 100644 --- a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue +++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue @@ -310,7 +310,6 @@ openDownloadDia() { exportHazardFactorIdentification().then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '鍗遍櫓鍥犵礌杈ㄨ瘑涓庨闄╄瘎浠风粨鏋滀竴瑙�' + '.docx'); }) diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue index ca6e916..bf9e244 100644 --- a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue +++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue @@ -277,7 +277,6 @@ openDownloadDia() { exportSignificantRiskFactors().then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '閲嶅ぇ椋庨櫓鍥犵礌鍒嗘瀽鍙婃帶鍒惰鍒掓竻鍗�' + '.docx'); }) diff --git a/src/views/business/finishedProductSampling/index.vue b/src/views/business/finishedProductSampling/index.vue index b4f9986..d5d732d 100644 --- a/src/views/business/finishedProductSampling/index.vue +++ b/src/views/business/finishedProductSampling/index.vue @@ -350,31 +350,29 @@ this.tableLoading = true this.stockList = [] const newReqParam = this.getFinalParam() - getIfsStock(newReqParam) - .then((response) => { - const resData = response.data - this.queryReport.total = resData.total - const resStockList = resData.data - resStockList.forEach((item) => { - this.stockList.push({ - partNo: item.PART_NO, - partName: item.PART_DESC, - warehouseName: item.WAREHOUSE_ID, - locationName: item.LOCATION_DESC, - locationNo: item.LOCATION_NO, - partBatchNo: item.LOT_BATCH_NO, - stockQuantity: item.QTY_ONHAND, - availableStockQuantity: item.QTY_AVAILABLE, - outerColor: item.ATTR4, - customerOrderNo: item.ATTR6, - inSource: item.ATTR23, - }) + getIfsStock(newReqParam).then((response) => { + this.tableLoading = false + const resData = response.data + this.queryReport.total = resData.total + const resStockList = resData.data + resStockList.forEach((item) => { + this.stockList.push({ + partNo: item.PART_NO, + partName: item.PART_DESC, + warehouseName: item.WAREHOUSE_ID, + locationName: item.LOCATION_DESC, + locationNo: item.LOCATION_NO, + partBatchNo: item.LOT_BATCH_NO, + stockQuantity: item.QTY_ONHAND, + availableStockQuantity: item.QTY_AVAILABLE, + outerColor: item.ATTR4, + customerOrderNo: item.ATTR6, + inSource: item.ATTR23, }) - this.tableLoading = false }) - .catch(() => { - this.tableLoading = false - }) + }).catch(() => { + this.tableLoading = false + }) }, getFinalParam() { const newReqParam = { diff --git a/src/views/business/inspectionTask/components/EditInspectionItem.vue b/src/views/business/inspectionTask/components/EditInspectionItem.vue index c3116f0..b38e59c 100644 --- a/src/views/business/inspectionTask/components/EditInspectionItem.vue +++ b/src/views/business/inspectionTask/components/EditInspectionItem.vue @@ -6,20 +6,15 @@ width="80%" @close="editInspectionDia = false" > - <TableCard :showTitle="false"> - <template v-slot:table> - <lims-table - :column="editColumn" - :table-data="editTableData" - :table-loading="editLoading" - :page="page" - height="600" - style="padding: 0 15px" - @pagination="pagination" - > - </lims-table> - </template> - </TableCard> + <lims-table + :column="editColumn" + :table-data="editTableData" + :table-loading="editLoading" + :page="page" + height="560" + @pagination="pagination" + > + </lims-table> </el-dialog> <el-dialog :visible.sync="editAskDia" title="淇敼" width="50%"> <el-form ref="form" :model="editForm" label-width="100px"> @@ -60,7 +55,6 @@ </template> <script> -import TableCard from "@/components/TableCard/index.vue"; import limsTable from "@/components/Table/lims-table.vue"; import { selectSampleAndProductByOrderId, @@ -69,7 +63,7 @@ export default { name: "EditInspectionItem", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: { TableCard, limsTable }, + components: { limsTable }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { @@ -187,9 +181,8 @@ }) .then((res) => { this.editLoading = false; - if (res.code === 201) return; - this.editTableData = res.data.body.records; - this.page.total = res.data.body.total; + this.editTableData = res.data.records; + this.page.total = res.data.total; }) .catch(() => { this.editLoading = false; diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue index 521864b..d9ded15 100644 --- a/src/views/business/inspectionTask/index.vue +++ b/src/views/business/inspectionTask/index.vue @@ -196,7 +196,7 @@ 鏂板 </el-button> </div> - <el-table :data="bindTableData" style="width: 100%" height="70vh"> + <el-table :data="bindTableData" style="width: 100%" height="70vh" v-loading="bindTableDataLoading"> <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" width="150"> </el-table-column> <el-table-column prop="inspectionItem" label="妫�楠岄」" width="150"> @@ -268,6 +268,7 @@ InspectionKey: 1, bindDialogVisible: false, bindAddDialogVisible: false, + bindTableDataLoading: false, bindTableData: [], bindAddTableData: [], chooseBindAddList: [], @@ -522,13 +523,15 @@ if (obj) { return this.insResultList.find((m) => m.value == params).label; } else { - return '' + return null } }, formatType: (params) => { let obj = this.insResultList.find((m) => m.value == params) if (obj) { return this.insResultList.find((m) => m.value == params).type; + } else { + return null } }, }, @@ -573,10 +576,12 @@ this.inspectionTaskState = this.dictToValue(response.data); }); this.refreshTable(); - }, mounted() { this.queryParams.userId = this.userId; + }, + activated() { + this.refreshTable(); }, methods: { getList() { @@ -949,10 +954,6 @@ }) .then((res) => { this.loading = false; - if (res.code == 201) { - this.$message.error("缁戝畾澶辫触"); - return; - } this.$message.success("缁戝畾鎴愬姛"); this.bindAddDialogVisible = false; this.getBinding(this.bindCurrentInfo); @@ -967,17 +968,14 @@ cancelButtonText: "鍙栨秷", type: "warning", }).then(async () => { - delProductTreeByProductId({ productId: row.id }) - .then((res) => { - if (res.coe == 201) { - // this.$message.error('鏈粦瀹氭楠岄」') - return; - } - this.getBinding(this.bindCurrentInfo); - }) - .catch((error) => { - console.error(error); - }); + this.bindTableDataLoading = true + delProductTreeByProductId({ productId: row.id }).then((res) => { + this.bindTableDataLoading = false + this.getBinding(this.bindCurrentInfo); + }).catch((error) => { + this.bindTableDataLoading = false + console.error(error); + }); }); }, }, diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue index 8b844ee..e4b841e 100644 --- a/src/views/business/inspectionTask/inspection.vue +++ b/src/views/business/inspectionTask/inspection.vue @@ -19,9 +19,10 @@ <el-col :span="16" style="text-align: right"> <el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button> <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button> - <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary" @click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button> - <el-button size="small" type="primary" @click="sampleVisible = true;uploadSample();">鏍峰搧鍒囨崲</el-button> -<!-- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>--> + <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary" + @click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button> + <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">鏍峰搧鍒囨崲</el-button> + <!-- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>--> <el-button v-if="state == 1" size="small" type="primary" @click="addVerifyDia = true">鎻愪氦</el-button> <!-- 澶嶆牳 --> <el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">閫氳繃</el-button> @@ -514,7 +515,7 @@ <script> import excelFunction from "@/utils/excelFountion"; import limsTable from "@/components/Table/lims-table.vue"; -import UnPassDialog from "../unpass/components/addUnPass.vue"; +import UnPassDialog from "../unpass/components/unPassDialog.vue"; import AddUnPass from "../unpass/components/addUnPass.vue"; import InspectionWord from "./components/InspectionWord.vue"; import PurchaseVerification from "../unpass/components/PurchaseVerification.vue"; @@ -542,7 +543,7 @@ import html2canvas from "html2canvas"; import { mapGetters } from "vuex"; export default { - name: 'inspection', + name: 'Inspection', components: { PurchaseVerification, AddUnPass, @@ -788,6 +789,16 @@ // this.getList0() // 浠诲姟鍒囨崲 this.scrollInit(); }, + activated() { + this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」 + this.getInsStateDicts(); + this.getComparisonList(); + this.getAuthorizedPerson(); + // this.getPower(); + this.startWorker(); + // this.getList0() // 浠诲姟鍒囨崲 + this.scrollInit(); + }, watch: { // 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭� id(val) { diff --git a/src/views/business/materialOrder/copperOrder.vue b/src/views/business/materialOrder/copperOrder.vue index 9e264b3..12f55f1 100644 --- a/src/views/business/materialOrder/copperOrder.vue +++ b/src/views/business/materialOrder/copperOrder.vue @@ -617,12 +617,19 @@ mounted() { this.active = this.$route.query.active this.currentId = this.$route.query.currentId - this.getUserNowInfo() - this.selectStandardTreeList() - this.selectStandardMethods() - this.getInfo() // 鑾峰彇鏁版嵁 + }, + activated() { + if (this.active==1) { + this.getInfoRow(); + } }, methods: { + getInfoRow() { + this.getUserNowInfo() + this.selectStandardTreeList() + this.selectStandardMethods() + this.getInfo() // 鑾峰彇鏁版嵁 + }, // 鎷嗗垎 handleSplitCountNum () { this.sample.joinName = null @@ -1782,7 +1789,11 @@ }, goBack () { - this.$router.go(-1) + if (this.active == 1) { + this.$router.go(-1) + } else { + this.closeOpenPage() + } }, closeOpenPage() { this.$router.go(-1) diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue index 939ad23..b8c03af 100644 --- a/src/views/business/materialOrder/customsInspection.vue +++ b/src/views/business/materialOrder/customsInspection.vue @@ -639,6 +639,13 @@ this.currentId = this.$route.query.currentId this.isReport = this.$route.query.isReport this.customsInspection = this.$route.query.customsInspection + }, + activated() { + if (this.active==1) { + this.getInfo(); + } + }, + getInfo() { this.getUserNowList() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 this.selectStandardMethods() // 鑾峰彇妫�楠屾爣鍑嗕笅鎷夋鏁版嵁 this.getInfo() // 鑾峰彇鏁版嵁 @@ -1832,7 +1839,11 @@ return row[property] === value; }, goBack () { - this.$router.go(-1) + if (this.active == 1) { + this.$router.go(-1) + } else { + this.closeOpenPage() + } }, closeOpenPage() { this.$router.go(-1) diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue index 3c09dec..783010f 100644 --- a/src/views/business/materialOrder/index.vue +++ b/src/views/business/materialOrder/index.vue @@ -59,7 +59,8 @@ <div class="table-tab"> <div> <ul class="tab"> - <li v-for="(m, i) in tabList" :key="m.value" :class="{ active: m.value === tabIndex }" @click="handleTab(m)"> + <li v-for="(m, i) in tabList" :key="m.value" :class="{ active: m.value === tabIndex }" + @click="handleTab(m)"> {{ m.label }}</li> </ul> </div> @@ -72,40 +73,33 @@ </div> <!--寰呬笅鍗�--> <div class="table"> - <lims-table :tableData="tableData" :column="column" - v-if="tabIndex === 0" @pagination="pagination" - :rowClassName="changeRowClass" - :height="'calc(100vh - 290px)'" key="tableData" - :page="page" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination" + :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'" key="tableData" :page="page" + :tableLoading="tableLoading"></lims-table> </div> <!--妫�楠屼腑--> <div class="table"> - <lims-table :tableData="tableData1" :column="column1" - v-if="tabIndex === 1" :isSelection="true" - :rowClassName="changeRowClass" - :handleSelectionChange="selectMethod" @pagination="pagination1" :height="'calc(100vh - 290px)'" - key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> + <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true" + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination1" + :height="'calc(100vh - 290px)'" key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> </div> <!--宸叉楠�--> <div class="table"> <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true" - :rowClassName="changeRowClass" - :handleSelectionChange="selectMethod" @pagination="pagination2" :height="'calc(100vh - 290px)'" - key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table> + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination2" + :height="'calc(100vh - 290px)'" key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table> </div> <!--鍏ㄩ儴--> <div class="table"> <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true" - :rowClassName="changeRowClass" - :handleSelectionChange="selectMethod" @pagination="pagination3" :height="'calc(100vh - 290px)'" - key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table> + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination3" + :height="'calc(100vh - 290px)'" key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table> </div> <!--瀛e害妫�楠�--> <div class="table"> <lims-table :tableData="tableData4" :column="column4" v-if="tabIndex === 4" :isSelection="true" - :rowClassName="changeRowClass" - :handleSelectionChange="selectMethod" @pagination="pagination4" :height="'calc(100vh - 290px)'" - key="tableData4" :page="page4" :tableLoading="tableLoading4"></lims-table> + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination4" + :height="'calc(100vh - 290px)'" key="tableData4" :page="page4" :tableLoading="tableLoading4"></lims-table> </div> </div> </div> @@ -125,8 +119,8 @@ </el-dialog> <!-- 鎾ら攢鎶ユ --> <el-dialog :visible.sync="declareDialogVisible" title="鎶ユ鎾ら攢" width="30%"> - <p style="font-size:16px;color:#333333">鎵瑰彿<span - style="color:#34BD66">{{ this.insOrderRow.updateBatchNo }}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span> + <p style="font-size:16px;color:#333333">鎵瑰彿<span style="color:#34BD66">{{ this.insOrderRow.updateBatchNo + }}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span> </p> <span slot="footer" class="dialog-footer"> <el-row> @@ -1081,9 +1075,8 @@ let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, } delete entity.orderBy this.outLoading = true - rawAllExport({entity: entity}).then(res => { + rawAllExport({ entity: entity }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') let url = this.javaApi + '/word/' + res.data this.$download.saveAs(url, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx'); }) @@ -1116,7 +1109,7 @@ selectMethod(val) { this.multipleSelection = val }, - changeRowClass({row, rowIndex}) { + changeRowClass({ row, rowIndex }) { if (row.isFirst == 1) { return 'highlight-danger-row-border' } diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/add.vue index fd462b8..ccd6a25 100644 --- a/src/views/business/productOrder/components/add.vue +++ b/src/views/business/productOrder/components/add.vue @@ -50,10 +50,10 @@ </el-select> </el-form-item> <el-form-item label="鍒跺崟浜�:"> - <el-input v-model="addObj.custom" disabled size="small"></el-input> + <el-input v-model="addObj.custom" disabled size="small" clearable></el-input> </el-form-item> <el-form-item label="濮旀墭鍗曚綅:" prop="company"> - <el-input v-model="addObj.company" disabled placeholder="閫夋嫨濮旀墭鍗曚綅" size="small" style="width: 200px"> + <el-input v-model="addObj.company" disabled placeholder="閫夋嫨濮旀墭鍗曚綅" size="small" style="width: 208px"> <template slot="append"> <el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" @click="openCompanyList"></el-button> @@ -69,14 +69,14 @@ </el-select> </el-form-item> <el-form-item label="鏍峰搧鍚嶇О:" prop="sample"> - <el-input v-model="addObj.sample" disabled size="small" style="width: 178px"> + <el-input v-model="addObj.sample" disabled size="small" style="width: 208px"> <template slot="append"><el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" @click="selectStandardTree = true"></el-button></template> </el-input> </el-form-item> - <el-form-item label="鏍峰搧鏁伴噺:" prop="sampleNum"> + <el-form-item label="鏍峰搧鏁伴噺:" prop="sampleNum" style="margin-right: 0"> <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0" - size="small" style="width: 65%;" @change="addStandardTree"></el-input-number> + size="small" @change="addStandardTree"></el-input-number> </el-form-item> <el-form-item label="鏍峰搧鐘舵��:" prop="sampleStatus"> <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small"> @@ -87,21 +87,9 @@ <el-input v-model="addObj.testQuantity" :disabled="active>1&&tabIndex!=4" clearable size="small"></el-input> </el-form-item> <el-form-item label="鏉ユ牱鏂瑰紡:" prop="formType"> - <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small"> + <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small" clearable> <el-option v-for="(a,ai) in dict.type.form_type" :key="ai" :label="a.label" :value="a.value"></el-option> </el-select> - </el-form-item> - <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:"> - <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4"> - <el-radio :label="1">鑷彇</el-radio> - <el-radio :label="0">鍏朵粬</el-radio> - </el-radio-group> - </el-form-item> - <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:"> - <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4"> - <el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio> - <el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio> - </el-radio-group> </el-form-item> <el-form-item label="鐢熶骇鍗曚綅:" prop="production"> <el-input v-model="addObj.production" :disabled="active>1&&tabIndex!=4" clearable placeholder="璇疯緭鍏�" @@ -111,10 +99,22 @@ <el-input v-model="addObj.productionEn" :disabled="active>1&&tabIndex!=4" clearable placeholder="璇疯緭鍏�" size="small"></el-input> </el-form-item> + <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:"> + <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini"> + <el-radio :label="0" border style="margin-right: 0">濮旀墭鍗曚綅鍙栧洖</el-radio> + <el-radio :label="1" border>瀹為獙瀹ゅ鐞�</el-radio> + </el-radio-group> + </el-form-item> <el-form-item label="鏄惁鐣欐牱:"> - <el-radio-group v-model="addObj.isLeave" :disabled="active>1&&tabIndex!=4"> - <el-radio :label="0">涓嶇暀鏍�</el-radio> - <el-radio :label="1">鐣欐牱</el-radio> + <el-radio-group v-model="addObj.isLeave" border :disabled="active>1&&tabIndex!=4" size="mini"> + <el-radio :label="0" border style="margin-right: 0">涓嶇暀鏍�</el-radio> + <el-radio :label="1" border>鐣欐牱</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:"> + <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4" size="mini"> + <el-radio :label="1" border style="margin-right: 0">鑷彇</el-radio> + <el-radio :label="0" border>鍏朵粬</el-radio> </el-radio-group> </el-form-item> <el-form-item label="濮旀墭浜�:"> @@ -125,7 +125,7 @@ </el-form-item> <el-form-item label="澶囨敞:"> <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable - size="small" type="textarea"></el-input> + size="small" style="width: 100%" type="textarea"></el-input> </el-form-item> <el-form-item label="澶囨敞鑻辨枃:"> <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable @@ -176,10 +176,9 @@ </el-form-item> </el-form> </div> - <div style="display: flex;align-items: center"> + <div style="display: flex;align-items: center;margin-bottom: 10px"> <span style="width: 150px;font-size: 14px;text-align: right;">鐗规畩鏍囧噯锛�</span> - <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable - size="small"></el-input> + <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable size="small"></el-input> <el-button v-show="active==1" size="small" style="margin-left: 10px" type="primary" @click="editSpecial">缂栬緫</el-button> </div> @@ -567,235 +566,244 @@ AuxiliaryWireCore }, dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'], - data() { - return { - active: '', - tabIndex: '', - currentId: '', - sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁 - editTable:[], - template: null, - templates: [], - addObj: { - entrustCode: null, - custom: null, - company: null, - userId: null, - type: '0', - code: null, - appointed: null, - remark: null, // 澶囨敞 - remarkEn: null, // 澶囨敞鑻辨枃 - sample: null, - factory: null, - laboratory: null, - sampleType: null, - sampleNum: 1, - unit: null, - model: null, - method: null, - phone: null, - processing: 1, - isLeave: 0, - orderType: null, - send: 1, - formType: '閫佹', // 鏉ユ牱鏂瑰紡 - sampleStatus: 'In good condition', // 鏍峰搧鐘舵�� - testQuantity: '', // 鏍峰搧鐘舵�� - production: null, - productionEn: null, - companyId: null, - prepareUser:null, // 濮旀墭浜� - prepareUserEn:null, // 濮旀墭浜鸿嫳鏂� - prepareCode: '', // 濮旀墭浜哄伐鍙� - quarterItemId: '', - sampleView: '', // 鏍峰搧鍚嶇О锛堟姤鍛婂睍绀哄瓧娈碉級 - sampleViewEn: '', // 鏍峰搧鍚嶇О鑻辨枃锛堟姤鍛婂睍绀哄瓧娈碉級 - }, - addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯 - orderType: [ - { required: true, message: '璇烽�夋嫨妫�楠岀被鍒�', trigger: 'change' } - ], - company: [ - { required: true, message: '璇烽�夋嫨濮旀墭鍗曚綅', trigger: 'change' } - ], - phone: [ - { required: true, message: '璇峰~鍐欒仈绯绘柟寮�', trigger: 'blur' } - ], - type: [ - { required: true, message: '璇烽�夋嫨绱ф�ョ▼搴�', trigger: 'change' } - ], - sample: [ - { required: true, message: '璇烽�夋嫨鏍峰搧鍚嶇О', trigger: 'change' } - ], - sampleNum: [ - { required: true, message: '璇峰~鍐欐牱鍝佹暟閲�', trigger: 'blur' } - ], - sampleStatus: [ - { required: true, message: '璇烽�夋嫨鏍峰搧鐘舵��', trigger: 'change' } - ], - formType: [ - { required: true, message: '璇烽�夋嫨鏉ユ牱鏂瑰紡', trigger: 'change' } - ], - testQuantity: [ - { required: true, message: '璇峰~鍐欐娊妫�鏁伴噺', trigger: 'blur' } - ], - production: [ - { required: true, message: '璇峰~鍐欑敓浜у崟浣�', trigger: 'blur' } - ], - productionEn: [ - { required: true, message: '璇峰~鍐欑敓浜у崟浣岴N', trigger: 'blur' } - ], - }, - sample: { - sampleCode: null, - laboratory: null, - factory: null, - sampleType: null, - sample: null, - model: null, - modelNum: null, - sampleNum: 1, - isLeave: 0, - unit: null - }, - type: [], - selectUserDia: false, - tableData1: [], - tableLoading1: false, - multipleSelection: [], - column1: [ - {label: '瀹㈡埛鍚嶇О', prop: 'company'}, - {label: '瀹㈡埛鍗曚綅EN', prop: 'companyEn'}, - {label: '鍗曚綅鍦板潃', prop: 'address'}, - {label: '鍗曚綅鍦板潃EN', prop: 'addressEn'}, - {label: '鍗曚綅鐢佃瘽', prop: 'phone'}, - {label: '鍔犳�ラ搴�', prop: 'num'}, - {label: '瀹㈡埛缂栧彿', prop: 'code2'}, - {label: '宸ュ巶鍩�', prop: 'code'} - ], - page1: { - total:0, - size:10, - current:1 - }, - selectStandardTree: false, - search: null, - list: [], - selectStandardTreeLoading: false, - selectTree: null, - sampleViewEn: null, - expandedKeys: [], - sampleList: [], - sampleIds: [], - methodList: [], - addSampleDia: false, - count: 1, - productList: [], - productList0: [], - bsm1DiaList: [], - productIds: [], - getProductLoad: false, - saveLoad: false, - templateDia: false, - templateLoading: false, - templateName: '', - issuedDialogVisible: false, - distributeData: { - appointed: '', - userId: '', - sonLaboratory:'' - }, - personList: [], - upLoad: false, - models: [], - methods: [], - methodLoad: false, - noDialogVisible: false, - tell: '', - noLoading: false, - orderType: [], - filters: [], - formType: [], - currentMethod: null, - isAskOnlyRead: false, - sampleId: null, - bsmRow: null, - bsm1: false, - bsm1Val: null, - bsm1DiaAll: false, - cableConfigShow: false, - auxiliaryShow: false, - bsm3Dia: false, - // total: 0, - RTS: '', - totalArr: [], - addObj1: {}, + data() { + return { + active: '', + tabIndex: '', + currentId: '', + sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁 + editTable:[], + template: null, + templates: [], + addObj: { + entrustCode: null, + custom: null, + company: null, + userId: null, + type: '0', + code: null, + appointed: null, + remark: null, // 澶囨敞 + remarkEn: null, // 澶囨敞鑻辨枃 + sample: null, + factory: null, + laboratory: null, + sampleType: null, + sampleNum: 1, + unit: null, model: null, - standardMethodListId: null, - symbolList:['RTS'], - inspectionItem:null, - inspectionItemSubclass:null, - methodS:null, - isBsm2Val2:false, - temperatureEngList: [], - isShowInput: false, - temId: '', - sonLaboratoryList:[], - selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃 - quarterItemOptions: [], // 鏌ヨ瀛e害淇℃伅 - specialStandardMethod: '', - isSpecial: false, - } + method: null, + phone: null, + processing: 1, + isLeave: 0, + orderType: null, + send: 1, + formType: '閫佹', // 鏉ユ牱鏂瑰紡 + sampleStatus: 'In good condition', // 鏍峰搧鐘舵�� + testQuantity: '', // 鏍峰搧鐘舵�� + production: null, + productionEn: null, + companyId: null, + prepareUser:null, // 濮旀墭浜� + prepareUserEn:null, // 濮旀墭浜鸿嫳鏂� + prepareCode: '', // 濮旀墭浜哄伐鍙� + quarterItemId: '', + sampleView: '', // 鏍峰搧鍚嶇О锛堟姤鍛婂睍绀哄瓧娈碉級 + sampleViewEn: '', // 鏍峰搧鍚嶇О鑻辨枃锛堟姤鍛婂睍绀哄瓧娈碉級 + }, + addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯 + orderType: [ + { required: true, message: '璇烽�夋嫨妫�楠岀被鍒�', trigger: 'change' } + ], + company: [ + { required: true, message: '璇烽�夋嫨濮旀墭鍗曚綅', trigger: 'change' } + ], + phone: [ + { required: true, message: '璇峰~鍐欒仈绯绘柟寮�', trigger: 'blur' } + ], + type: [ + { required: true, message: '璇烽�夋嫨绱ф�ョ▼搴�', trigger: 'change' } + ], + sample: [ + { required: true, message: '璇烽�夋嫨鏍峰搧鍚嶇О', trigger: 'change' } + ], + sampleNum: [ + { required: true, message: '璇峰~鍐欐牱鍝佹暟閲�', trigger: 'blur' } + ], + sampleStatus: [ + { required: true, message: '璇烽�夋嫨鏍峰搧鐘舵��', trigger: 'change' } + ], + formType: [ + { required: true, message: '璇烽�夋嫨鏉ユ牱鏂瑰紡', trigger: 'change' } + ], + testQuantity: [ + { required: true, message: '璇峰~鍐欐娊妫�鏁伴噺', trigger: 'blur' } + ], + production: [ + { required: true, message: '璇峰~鍐欑敓浜у崟浣�', trigger: 'blur' } + ], + productionEn: [ + { required: true, message: '璇峰~鍐欑敓浜у崟浣岴N', trigger: 'blur' } + ], + }, + sample: { + sampleCode: null, + laboratory: null, + factory: null, + sampleType: null, + sample: null, + model: null, + modelNum: null, + sampleNum: 1, + isLeave: 0, + unit: null + }, + type: [], + selectUserDia: false, + tableData1: [], + tableLoading1: false, + multipleSelection: [], + column1: [ + {label: '瀹㈡埛鍚嶇О', prop: 'company'}, + {label: '瀹㈡埛鍗曚綅EN', prop: 'companyEn'}, + {label: '鍗曚綅鍦板潃', prop: 'address'}, + {label: '鍗曚綅鍦板潃EN', prop: 'addressEn'}, + {label: '鍗曚綅鐢佃瘽', prop: 'phone'}, + {label: '鍔犳�ラ搴�', prop: 'num'}, + {label: '瀹㈡埛缂栧彿', prop: 'code2'}, + {label: '宸ュ巶鍩�', prop: 'code'} + ], + page1: { + total:0, + size:10, + current:1 + }, + selectStandardTree: false, + search: null, + list: [], + selectStandardTreeLoading: false, + selectTree: null, + sampleViewEn: null, + expandedKeys: [], + sampleList: [], + sampleIds: [], + methodList: [], + addSampleDia: false, + count: 1, + productList: [], + productList0: [], + bsm1DiaList: [], + productIds: [], + getProductLoad: false, + saveLoad: false, + templateDia: false, + templateLoading: false, + templateName: '', + issuedDialogVisible: false, + distributeData: { + appointed: '', + userId: '', + sonLaboratory:'' + }, + personList: [], + upLoad: false, + models: [], + methods: [], + methodLoad: false, + noDialogVisible: false, + tell: '', + noLoading: false, + orderType: [], + filters: [], + formType: [], + currentMethod: null, + isAskOnlyRead: false, + sampleId: null, + bsmRow: null, + bsm1: false, + bsm1Val: null, + bsm1DiaAll: false, + cableConfigShow: false, + auxiliaryShow: false, + bsm3Dia: false, + // total: 0, + RTS: '', + totalArr: [], + addObj1: {}, + model: null, + standardMethodListId: null, + symbolList:['RTS'], + inspectionItem:null, + inspectionItemSubclass:null, + methodS:null, + isBsm2Val2:false, + temperatureEngList: [], + isShowInput: false, + temId: '', + sonLaboratoryList:[], + selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃 + quarterItemOptions: [], // 鏌ヨ瀛e害淇℃伅 + specialStandardMethod: '', + isSpecial: false, + } + }, + watch: { + sampleList() { + this.addObj.method = null + this.productList = [] }, - watch: { - sampleList() { - this.addObj.method = null - this.productList = [] - }, - productList: { - deep: true, - handler(val) { - if (val && val.length > 0) { - let arr = []; - val.forEach(item => { - if (item.sonLaboratory && !arr.find(a => a.value == item.sonLaboratory)) { - arr.push({ - text: item.sonLaboratory, - value: item.sonLaboratory - }) - } - }) - this.filters = arr - } - } - }, - sampleList: { - deep: true, - handler(val) { - this.getTotal() - } - }, - 'addObj.sample'(val) { - this.model = null - this.standardMethodListId = null - }, - 'addObj.sampleNum'(val) { - this.model = null - this.standardMethodListId = null - }, - tabIndex(val){ - if(val==4&&this.active==2){ - this.isSpecial = true - }else{ - this.isSpecial = false + productList: { + deep: true, + handler(val) { + if (val && val.length > 0) { + let arr = []; + val.forEach(item => { + if (item.sonLaboratory && !arr.find(a => a.value == item.sonLaboratory)) { + arr.push({ + text: item.sonLaboratory, + value: item.sonLaboratory + }) + } + }) + this.filters = arr } } }, - mounted() { - this.active = this.$route.query.active - this.tabIndex = this.$route.query.tabIndex - this.currentId = this.$route.query.currentId + sampleList: { + deep: true, + handler(val) { + this.getTotal() + } + }, + 'addObj.sample'(val) { + this.model = null + this.standardMethodListId = null + }, + 'addObj.sampleNum'(val) { + this.model = null + this.standardMethodListId = null + }, + tabIndex(val){ + if(val==4&&this.active==2){ + this.isSpecial = true + }else{ + this.isSpecial = false + } + } + }, + mounted() { + this.active = this.$route.query.active + this.tabIndex = this.$route.query.tabIndex + this.currentId = this.$route.query.currentId + this.getInfo() + }, + activated() { + if (this.active==1) { + this.getInfo(); + } + }, + methods: { + getInfo() { this.getUserNowData() this.selectStandardTreeList() this.getAuthorizedPerson(); @@ -830,12 +838,11 @@ this.isSpecial = false } }, - methods: { - getPrepareUser () { + getPrepareUser () { // this.addObj.prepareUser = JSON.parse(localStorage.getItem("user")).name; // this.addObj.prepareUserEn = JSON.parse(localStorage.getItem("user")).nameEn // this.addObj.prepareCode = JSON.parse(localStorage.getItem("user")).account - }, + }, // 缂栬緫瑕佹眰鍊艰〃鏍� editSpecial () { this.isSpecial = true @@ -1699,6 +1706,9 @@ this.productList = row.insProduct this.productList0 = JSON.parse(JSON.stringify(this.productList)) this.$refs.sampleTable.setCurrentRow(row) + this.$nextTick(() => { + this.$refs.productTable.doLayout(); + }); setTimeout(() => { this.productList.forEach(a => { if (a.state == 1) this.toggleSelection(a) @@ -2140,7 +2150,11 @@ this.productList0.splice(index,1) }, goBack () { - this.$router.go(-1) + if (this.active == 1) { + this.$router.go(-1) + } else { + this.closeOpenPage() + } }, closeOpenPage() { this.$router.go(-1) diff --git a/src/views/business/productOrder/components/auxiliaryWireCore.vue b/src/views/business/productOrder/components/auxiliaryWireCore.vue index 926ee8c..d8034f5 100644 --- a/src/views/business/productOrder/components/auxiliaryWireCore.vue +++ b/src/views/business/productOrder/components/auxiliaryWireCore.vue @@ -17,13 +17,11 @@ </el-select> </el-form-item> <el-form-item label="妫�楠屾爣鍑�" prop="standardMethodListId"> - <el-select v-model="auxiliaryWireCore.standardMethodListId" allow-create - clearable - default-first-option - filterable - multiple - size="small"> - <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option> + <el-select v-model="auxiliaryWireCore.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�" + size="small" + @change="(value)=>methodChange(value)"> + <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id"> + </el-option> </el-select> </el-form-item> </el-form> diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index 135973f..f26f4dd 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -3,47 +3,42 @@ <div class="search"> <el-form :model="entity" ref="entity" size="small" :inline="true"> <el-form-item label="濮旀墭缂栧彿" prop="entrustCode"> - <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> + <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName"> <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable"></el-input> + @keyup.enter.native="refreshTable"></el-input> </el-form-item> <el-form-item label="鏍峰搧鍨嬪彿" prop="sampleModel"> - <el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�" - size="small" @keyup.enter.native="refreshTable()"></el-input> + <el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item> - <el-button :icon="!more?'el-icon-arrow-down':'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" @click="more=!more">{{!more?'鏇村':'鏀惰捣'}}</el-button> + <el-button :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" + @click="more = !more">{{ !more ? '鏇村' : '鏀惰捣' }}</el-button> <el-button size="small" @click="refresh()">閲� 缃�</el-button> <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> </el-form-item> <el-form-item label="鏍峰搧缂栧彿" prop="sampleCode" v-if="more"> <el-input v-model="entity.sampleCode" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable"> + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> <el-form-item label="涓嬪崟鏃堕棿" prop="createTime" v-if="more"> - <el-date-picker v-model="entity.createTime" clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width:100%" - type="date" - value-format="yyyy-MM-dd HH:mm:ss"> + <el-date-picker v-model="entity.createTime" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width:100%" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> <el-form-item label="濮旀墭浜�" prop="prepareUser" v-if="more"> <el-input v-model="entity.prepareUser" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable"> + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> <el-form-item label="濮旀墭鍗曚綅" prop="company" v-if="more"> <el-input v-model="entity.company" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="refreshTable"> + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> </el-form> @@ -51,62 +46,63 @@ <div class="table-tab"> <div> <ul class="tab"> - <li v-for="(m,i) in tabList" :key="i+'afgh'" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> + <li v-for="(m, i) in tabList" :key="i + 'afgh'" :class="{ active: i == tabIndex }" @click="handleTab(m, i)">{{ m.label }} + </li> </ul> </div> <div> - <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small" @click="downLoad">瀵煎嚭</el-button> + <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small" + @click="downLoad">瀵煎嚭</el-button> <el-button v-if="tabIndex === 1" size="small" type="primary" @click="openAddIns">娣诲姞妫�楠岄」</el-button> <el-button size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button> <el-button size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button> </div> </div> <div class="table"> - <lims-table :tableData="tableData" :column="column" - :isSelection="true" :handleSelectionChange="selectMethod" - @pagination="pagination" :height="'calc(100vh - 280px)'" key="tableData" - :page="page" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="column" :isSelection="true" :handleSelectionChange="selectMethod" + @pagination="pagination" :height="'calc(100vh - 280px)'" :key="upIndex" :page="page" + :tableLoading="tableLoading"></lims-table> </div> <div> <!-- 瀹℃牳 --> <el-dialog :before-close="handleClose" :visible.sync="verifyDialogVisible" title="涓嬪崟瀹℃牳" width="30%"> <p v-if="!isPass" style="font-size:16px;color:#333333">濮旀墭缂栧彿<span - style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚﹂�氳繃</p> + style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚﹂�氳繃</p> <el-form v-else ref="ruleForm" :label-position="labelPosition" :model="formData" label-width="150px"> <el-form-item label="璇疯緭鍏ユ牱鍝佸簱浣嶅彿锛�"> <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input> </el-form-item> </el-form> <span slot="footer" class="dialog-footer"> - <el-row v-if="!isPass"> - <el-button @click="handleClose">閫� 鍥�</el-button> - <el-button :loading="upLoad" type="primary" @click="submitForm">閫� 杩�</el-button> - </el-row> - <el-row v-else> - <el-button @click="handleClose">杩� 鍥�</el-button> - <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button> - </el-row> - </span> + <el-row v-if="!isPass"> + <el-button @click="handleClose">閫� 鍥�</el-button> + <el-button :loading="upLoad" type="primary" @click="submitForm">閫� 杩�</el-button> + </el-row> + <el-row v-else> + <el-button @click="handleClose">杩� 鍥�</el-button> + <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button> + </el-row> + </span> </el-dialog> <!-- 鎾ら攢 --> <el-dialog :before-close="handleClose" :visible.sync="quashDialogVisible" title="涓嬪崟鎾ら攢" width="30%"> <p v-if="!isQuash" style="font-size:16px;color:#333333">濮旀墭缂栧彿<span - style="color:#34BD66">{{this.insOrderRow.entrustCode}}</span>鐨勪俊鎭槸鍚︽挙閿�</p> + style="color:#34BD66">{{ this.insOrderRow.entrustCode }}</span>鐨勪俊鎭槸鍚︽挙閿�</p> <el-form v-else ref="ruleForm" :label-position="labelPosition" :model="formData" label-width="150px"> <el-form-item label="璇疯緭鍏ユ挙閿�鍘熷洜锛�"> <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input> </el-form-item> </el-form> <span slot="footer" class="dialog-footer"> - <el-row v-if="!isQuash"> - <el-button @click="handleClose">鍙� 娑�</el-button> - <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button> - </el-row> - <el-row v-else> - <el-button @click="handleClose">杩� 鍥�</el-button> - <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button> - </el-row> - </span> + <el-row v-if="!isQuash"> + <el-button @click="handleClose">鍙� 娑�</el-button> + <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button> + </el-row> + <el-row v-else> + <el-button @click="handleClose">杩� 鍥�</el-button> + <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button> + </el-row> + </span> </el-dialog> <!-- 涓嬪彂 --> <el-dialog :before-close="handleClose" :visible.sync="issuedDialogVisible" title="妫�楠屽垎閰�" width="400px"> @@ -116,24 +112,27 @@ <div class="search_label"><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div> <div class="search_input"> <el-date-picker v-model="distributeData.appointed" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" - style="width: 100%;" type="date" value-format="yyyy-MM-dd"> + style="width: 100%;" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </div> </el-col> <el-col class="search_thing" style="width: 95%;"> <div class="search_label"><span class="required-span">* </span>鎸囨淳浜哄憳锛�</div> <div class="search_input"> - <el-select v-model="distributeData.userId" clearable filterable placeholder="璇烽�夋嫨" size="small" style="width: 100%;" @change="changeUser"> - <el-option v-for="(item,i) in personList" :key="i+'gbnm.'" :label="item.label" :value="item.value"> + <el-select v-model="distributeData.userId" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;" @change="changeUser"> + <el-option v-for="(item, i) in personList" :key="i + 'gbnm.'" :label="item.label" :value="item.value"> </el-option> </el-select> </div> </el-col> <el-col class="search_thing" style="width: 95%;"> - <div class="search_label"><span class="required-span" >* </span>璇曢獙瀹わ細</div> + <div class="search_label"><span class="required-span">* </span>璇曢獙瀹わ細</div> <div class="search_input"> - <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> - <el-option v-for="(item,i) in sonLaboratoryList" :key="i+'oooo'" :label="item.label" :value="item.value"> + <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="璇烽�夋嫨" size="small" + style="width: 100%;"> + <el-option v-for="(item, i) in sonLaboratoryList" :key="i + 'oooo'" :label="item.label" + :value="item.value"> </el-option> </el-select> </div> @@ -141,37 +140,36 @@ </el-row> </div> <span slot="footer" class="dialog-footer"> - <el-row> - <el-button @click="handleClose2">鍙� 娑�</el-button> - <el-button :loading="upLoad" type="primary" @click="submitForm2">纭� 瀹�</el-button> - </el-row> - </span> + <el-row> + <el-button @click="handleClose2">鍙� 娑�</el-button> + <el-button :loading="upLoad" type="primary" @click="submitForm2">纭� 瀹�</el-button> + </el-row> + </span> </el-dialog> <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%"> <div v-if="dataDialogVisible"> - <lims-table :tableData="tableDataLook" :column="tableDataLookColumn" - @pagination="tableDataLookPagination" height="500px" key="tableDataLook" - :page="tableDataLookPage" :tableLoading="tableDataLookTableLoading"></lims-table> + <lims-table :tableData="tableDataLook" :column="tableDataLookColumn" @pagination="tableDataLookPagination" + height="500px" key="tableDataLook" :page="tableDataLookPage" + :tableLoading="tableDataLookTableLoading"></lims-table> </div> </el-dialog> <el-dialog :visible.sync="filesDialogVisible" title="闄勪欢鏌ョ湅" width="80%"> <div v-if="filesDialogVisible"> - <lims-table :tableData="tableDataFile" :column="columnFile" - @pagination="paginationFile" height="500px" key="tableDataFile" - :page="pageFile" :tableLoading="tableLoadingFile"></lims-table> + <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px" + key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table> </div> </el-dialog> <el-dialog :title="deleteTilte" :visible.sync="deleteDialogVisible" width="80%"> <div v-if="deleteDialogVisible" style="height: 70vh;overflow-y: auto;"> - <lims-table :tableData="componentDataDelete" :column="columnDelete" - :isSelection="true" :handleSelectionChange="selectDelete" - @pagination="paginationDelete" height="500px" key="componentDataDelete" - :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table> + <lims-table :tableData="componentDataDelete" :column="columnDelete" :isSelection="true" + :handleSelectionChange="selectDelete" @pagination="paginationDelete" height="500px" + key="componentDataDelete" :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table> </div> <span slot="footer" class="dialog-footer"> <el-row> - <el-button @click="handleNo">{{deleteTilte=='鎾ら攢'?'鍙� 娑�':'涓嶉�氳繃'}}</el-button> - <el-button :loading="printLoading" type="primary" @click="submitDelete">{{deleteTilte=='鎾ら攢'?'纭� 瀹�':'閫� 杩�'}}</el-button> + <el-button @click="handleNo">{{ deleteTilte == '鎾ら攢' ? '鍙� 娑�' : '涓嶉�氳繃' }}</el-button> + <el-button :loading="printLoading" type="primary" @click="submitDelete">{{ deleteTilte == '鎾ら攢' ? '纭� 瀹�' : '閫� + 杩�'}}</el-button> </el-row> </span> </el-dialog> @@ -179,17 +177,15 @@ <el-dialog :visible.sync="printDialogVisible" title="鏍囩鎵撳嵃" top="5vh" width="40%"> <div v-loading="loadPint" style="width:100%;height: 400px;overflow-y: auto;"> <div class="dia_body"> - <el-checkbox - v-model="checkAll" - :indeterminate="isIndeterminate" - style="margin: 10px 5px;" + <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" style="margin: 10px 5px;" @change="handleCheckAllChange">鍏ㄩ��</el-checkbox> <el-checkbox-group v-model="checkIndexList" @change="changePrintCode()"> - <el-card v-for="(item, i) in qrData" :key="i+'wwwww'" class="box-card" style="margin-bottom: 15px; font-size: 16px !important;"> + <el-card v-for="(item, i) in qrData" :key="i + 'wwwww'" class="box-card" + style="margin-bottom: 15px; font-size: 16px !important;"> <el-checkbox :key="i" :label="i" style="position: relative;top:-20px;left:5px"><br></el-checkbox> <div> <el-row style="font-size: 14px;padding-left: 20px;"> - <el-col style="font-weight: bold;">{{ item.pName }}</el-col> + <el-col style="font-weight: bold;">{{ item.pName }}</el-col> </el-row> <div style="display: flex;"> <div> @@ -199,27 +195,29 @@ </div> <div style="margin-left: 50px;width: 100%;"> <el-row> - <el-col style="font-weight: bold;font-size: 14px;"><span>鏍峰搧缂栧彿: </span>{{ item.sampleCode }}</el-col> + <el-col style="font-weight: bold;font-size: 14px;"><span>鏍峰搧缂栧彿: </span>{{ item.sampleCode + }}</el-col> </el-row> <el-row style="margin-top: 1px;font-size: 14px;"> - <el-col style="font-weight: bold;"><span>濮旀墭鍗曞彿: </span>{{ item.code }}</el-col> + <el-col style="font-weight: bold;"><span>濮旀墭鍗曞彿: </span>{{ item.code }}</el-col> </el-row> <el-row style="margin-top: 1px;font-size: 14px;"> - <el-col style="font-weight: bold;"><span>瑙勬牸鍨嬪彿: </span>{{ item.model }}</el-col> + <el-col style="font-weight: bold;"><span>瑙勬牸鍨嬪彿: </span>{{ item.model }}</el-col> </el-row> <el-row style="margin-top: 1px;font-size: 14px;"> - <el-col style="font-weight: bold;"><span>鏍峰搧鍚嶇О: </span>{{ item.sample }}</el-col> + <el-col style="font-weight: bold;"><span>鏍峰搧鍚嶇О: </span>{{ item.sample }}</el-col> </el-row> <el-row class="ellipsis-multiline" style="margin-top: 1px;font-size: 14px;"> - <el-col style="font-weight: bold;"><span>妫�娴嬮」鐩�: </span>{{ item.item }}</el-col> + <el-col style="font-weight: bold;"><span>妫�娴嬮」鐩�: </span>{{ item.item }}</el-col> </el-row> <el-row style="margin-top: 3px;font-size: 14px;"> - <el-col style="font-weight: bold;display: flex;align-items: center;"><span>鏍峰搧鐘舵��: </span> + <el-col style="font-weight: bold;display: flex;align-items: center;"><span>鏍峰搧鐘舵��: </span> <el-radio-group :value="item.insState" disabled style="margin-top: 7px;margin-left: 4px;"> <el-radio :label="0" style="font-weight: bold;margin-right: 7px;">寰呮</el-radio> <el-radio :label="1" style="font-weight: bold;margin-right: 7px;">鍦ㄦ</el-radio> <el-radio :label="2" style="font-weight: bold;margin-right: 7px;">宸叉</el-radio> - </el-radio-group><el-radio v-model="item.isLeave" :label="1" disabled style="font-weight: bold;margin-top: 7px;">鐣欐牱</el-radio></el-col> + </el-radio-group><el-radio v-model="item.isLeave" :label="1" disabled + style="font-weight: bold;margin-top: 7px;">鐣欐牱</el-radio></el-col> </el-row> </div> </div> @@ -230,14 +228,16 @@ </div> <span slot="footer" class="dialog-footer"> <el-row> - <el-button @click="printDialogVisible=false">鍙� 娑�</el-button> + <el-button @click="printDialogVisible = false">鍙� 娑�</el-button> <el-button :loading="printLoading" type="primary" @click="submitPrint">鎵� 鍗�</el-button> </el-row> </span> </el-dialog> - <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;"> + <div class="el-dialog__body" + style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;"> <div id="printMOrder" ref="printMOrder" class="printMOrder"> - <el-card v-for="(item, i) in checkDataList" :key="i+'uuuuu'" class="box-card" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;"> + <el-card v-for="(item, i) in checkDataList" :key="i + 'uuuuu'" class="box-card" + style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;"> <div style="display: flex;"> <div> <el-col :offset="2" :span="10"> @@ -246,7 +246,8 @@ </div> <div style="margin-left: 0.32cm;line-height: 0.22cm;"> <el-row> - <el-col class="single-line-ellipsis" style="font-size: 0.20cm;width: 4cm;"><span>鏍峰搧缂栧彿: </span>{{ item.sampleCode }}</el-col> + <el-col class="single-line-ellipsis" style="font-size: 0.20cm;width: 4cm;"><span>鏍峰搧缂栧彿: </span>{{ + item.sampleCode }}</el-col> </el-row> <el-row style="font-size: 0.20cm;"> <el-col><span>濮旀墭鍗曞彿: </span>{{ item.code }}</el-col> @@ -255,18 +256,19 @@ <el-col><span>瑙勬牸鍨嬪彿: </span>{{ item.model }}</el-col> </el-row> <el-row style="font-size: 0.20cm;"> - <el-col ><span>鏍峰搧鍚嶇О: </span>{{ item.sample }}</el-col> + <el-col><span>鏍峰搧鍚嶇О: </span>{{ item.sample }}</el-col> </el-row> <el-row style="font-size: 0.20cm;width: 4cm;"> <el-col class="ellipsis-multiline"><span>妫�娴嬮」鐩�: </span>{{ item.item }}</el-col> </el-row> <el-row style="margin-top: 0.01cm;font-size: 0.20cm;"> - <el-col style="display: flex;align-items: center;"><span>鏍峰搧鐘舵��: + <el-col style="display: flex;align-items: center;"><span>鏍峰搧鐘舵��: </span> - <span style="white-space: nowrap;"><span v-if="item.insState==0">鈭�</span><span v-if="item.insState!=0" class="scor"></span>寰呮 - <span v-if="item.insState==1">鈭�</span><span v-if="item.insState!=1" class="scor"></span>鍦ㄦ - <span v-if="item.insState==2">鈭�</span><span v-if="item.insState!=2" class="scor"></span>宸叉 - <span v-if="item.isLeave==1">鈭�</span><span v-if="item.isLeave!=1" class="scor"></span>鐣欐牱</span> + <span style="white-space: nowrap;"><span v-if="item.insState == 0">鈭�</span><span v-if="item.insState != 0" + class="scor"></span>寰呮 + <span v-if="item.insState == 1">鈭�</span><span v-if="item.insState != 1" class="scor"></span>鍦ㄦ + <span v-if="item.insState == 2">鈭�</span><span v-if="item.insState != 2" class="scor"></span>宸叉 + <span v-if="item.isLeave == 1">鈭�</span><span v-if="item.isLeave != 1" class="scor"></span>鐣欐牱</span> <!-- <el-radio-group :value="item.insState" style="margin-top: 3px;margin-left: 1px;" disabled> <el-radio :label="0" style="margin-right: 3px;font-size: 6px;">寰呮</el-radio> <el-radio :label="1" style="margin-right: 3px;font-size: 6px;">鍦ㄦ</el-radio> @@ -288,14 +290,13 @@ </span> </el-dialog> <!--鏍囩鎵撳嵃寮规--> - <print-dialog v-if="printDialog" ref="printDialog" - :printDialog="printDialog" - @closePrintDialog="closePrintDialog"></print-dialog> + <print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog" + @closePrintDialog="closePrintDialog"></print-dialog> <!--娣诲姞閬楁紡妫�楠岄」寮规--> <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia> -<!-- <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"--> -<!-- :sonLaboratory="sonLaboratory" :state="state"--> -<!-- :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>--> + <!-- <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"--> + <!-- :sonLaboratory="sonLaboratory" :state="state"--> + <!-- :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>--> </div> </template> @@ -313,8 +314,8 @@ updateInspected, updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2 } from "@/api/business/productOrder"; -import {selectUserCondition} from "@/api/performance/class"; -import {downFile, getFileList, selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder"; +import { selectUserCondition } from "@/api/performance/class"; +import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder"; // import Inspection from "../do/b1-inspect-order-plan/Inspection.vue"; export default { components: { @@ -329,15 +330,16 @@ orderType: '', state: '', }, + upIndex: 0, tableData: [], tableLoading: false, column: [ - {label: '濮旀墭缂栧彿', prop: 'entrustCode'}, - {label: '濮旀墭鍗曚綅', prop: 'company'}, - {label: '鏍峰搧鍚嶇О', prop: 'sampleName'}, - {label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'}, - {label: '鏍峰搧鏁伴噺', prop: 'sampleNum'}, - {label: '妫�楠屼汉', prop: 'testingName'}, + { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, + { label: '濮旀墭鍗曚綅', prop: 'company' }, + { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { label: '鏍峰搧鏁伴噺', prop: 'sampleNum' }, + { label: '妫�楠屼汉', prop: 'testingName' }, { dataType: 'tag', label: '绱ф�ョ▼搴�', @@ -361,9 +363,9 @@ } } }, - {label: '澶囨敞', prop: 'remark'}, - {label: '妫�楠岃繘搴�%', prop: 'insProgress'}, - {label: '绾﹀畾鏃堕棿', prop: 'appointed'}, + { label: '澶囨敞', prop: 'remark' }, + { label: '妫�楠岃繘搴�%', prop: 'insProgress' }, + { label: '绾﹀畾鏃堕棿', prop: 'appointed' }, { dataType: 'tag', label: '妫�楠岀粨鏋�', @@ -386,15 +388,15 @@ return 'danger' } else if (params == 3) { return '' - } else { + } else { return null } } }, - {label: '涓嬪崟鏃堕棿', prop: 'createTime'}, - {label: '涓嬪彂鏃堕棿', prop: 'sendTime'}, - {label: '閫�鍥炵悊鐢�', prop: 'tell'}, - {label: '濮旀墭浜�', prop: 'prepareUser'}, + { label: '涓嬪崟鏃堕棿', prop: 'createTime' }, + { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, + { label: '閫�鍥炵悊鐢�', prop: 'tell' }, + { label: '濮旀墭浜�', prop: 'prepareUser' }, { dataType: 'action', fixed: 'right', @@ -472,7 +474,7 @@ this.handlEquashCheck(row); }, disabled: (row, index) => { - return (row.state != 1 && row.state != 0)||(this.tabIndex!=1)||row.isRevocation!=1 + return (row.state != 1 && row.state != 0) || (this.tabIndex != 1) || row.isRevocation != 1 }, showHide: (row) => { return this.tabIndex === 1 @@ -515,23 +517,23 @@ } ], page: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, - state:0,// 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅 + state: 0,// 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅 InspectionKey: 1, inspectorList: [],//妫�楠屼汉鍛樺垪琛� sonLaboratory: null,// 0:濮旀墭锛�1锛氬師鏉愭枡 typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟 - deleteTilte:'鎾ら攢', + deleteTilte: '鎾ら攢', examine: null, - deleteList:[], - loadPint:false, + deleteList: [], + loadPint: false, checkAll: false, isIndeterminate: true, - printLoading:false, - printDialogVisible:false, + printLoading: false, + printDialogVisible: false, //鏄惁瀹℃牳閫氳繃 true鏄� false涓嶆槸 isPass: false, //鏄惁瀹℃牳鎾ら攢 true鏄� false涓嶆槸 @@ -543,22 +545,22 @@ tableDataLookTableLoading: false, // 鏁版嵁鏌ョ湅寮规 tableDataLook: [], tableDataLookPage: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, tableDataLookColumn: [ - {label: '鏍峰搧缂栧彿', prop: 'sampleCode'}, - {label: '鏍峰搧鍚嶇О', prop: 'sample'}, - {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'}, - {label: '妫�楠岄」', prop: 'inspectionItem'}, - {label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass'}, - {label: '鍗曚綅', prop: 'unit'}, - {label: '鏍峰搧鍨嬪彿', prop: 'model'}, - {label: '鏉′欢', prop: 'radius'}, - {label: '鐢电紗鏍囪瘑', prop: 'cableTag'}, - {label: '璇曢獙瑕佹眰', prop: 'tell'}, - {label: '妫�楠岀粨鏋�', prop: 'lastValue'}, + { label: '鏍峰搧缂栧彿', prop: 'sampleCode' }, + { label: '鏍峰搧鍚嶇О', prop: 'sample' }, + { label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass' }, + { label: '妫�楠岄」', prop: 'inspectionItem' }, + { label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass' }, + { label: '鍗曚綅', prop: 'unit' }, + { label: '鏍峰搧鍨嬪彿', prop: 'model' }, + { label: '鏉′欢', prop: 'radius' }, + { label: '鐢电紗鏍囪瘑', prop: 'cableTag' }, + { label: '璇曢獙瑕佹眰', prop: 'tell' }, + { label: '妫�楠岀粨鏋�', prop: 'lastValue' }, { dataType: 'tag', label: '缁撴灉鍒ゅ畾', @@ -581,7 +583,7 @@ return 'danger' } else if (params == 3) { return '' - } else { + } else { return '' } } @@ -614,9 +616,9 @@ } } }, - {label: '闄勪欢鍚嶇О', prop: 'fileName'}, - {label: '涓婁紶浜�', prop: 'name'}, - {label: '涓婁紶鏃堕棿', prop: 'createTime'}, + { label: '闄勪欢鍚嶇О', prop: 'fileName' }, + { label: '涓婁紶浜�', prop: 'name' }, + { label: '涓婁紶鏃堕棿', prop: 'createTime' }, { dataType: 'action', fixed: 'right', @@ -634,9 +636,9 @@ } ], pageFile: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, formData: {}, formData0: {}, @@ -646,36 +648,36 @@ sampleId: '', appointed: '', userId: '', - sonLaboratory:'' + sonLaboratory: '' }, entrustCodeVisible: false, // 淇敼濮旀墭缂栧彿寮规 entrustCodeInfo: {}, submitCodeLoading: false, // 浜哄憳鍒楄〃 personList: [], - orderId:'', - revocationInsProductIds:'', + orderId: '', + revocationInsProductIds: '', componentDataDelete: [], tableLoadingDelete: false, columnDelete: [ - {label: '鏍峰搧缂栧彿', prop: 'sampleCode'}, - {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'}, - {label: '妫�楠岄」', prop: 'inspectionItem'}, - {label: '妫�楠岄」瀛愮被', prop: 'inspectionItemSubclass'}, - {label: '鏍峰搧鍒嗙被', prop: 'sampleType'}, - {label: '鏍峰搧', prop: 'sample'}, - {label: '鍨嬪彿', prop: 'model'}, - {label: '绾胯姱', prop: 'cableTag'}, - {label: '璇曢獙瀹�', prop: 'sonLaboratory'}, - {label: '瑕佹眰鍊�', prop: 'ask'}, - {label: '瑕佹眰鎻忚堪', prop: 'tell'}, + { label: '鏍峰搧缂栧彿', prop: 'sampleCode' }, + { label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass' }, + { label: '妫�楠岄」', prop: 'inspectionItem' }, + { label: '妫�楠岄」瀛愮被', prop: 'inspectionItemSubclass' }, + { label: '鏍峰搧鍒嗙被', prop: 'sampleType' }, + { label: '鏍峰搧', prop: 'sample' }, + { label: '鍨嬪彿', prop: 'model' }, + { label: '绾胯姱', prop: 'cableTag' }, + { label: '璇曢獙瀹�', prop: 'sonLaboratory' }, + { label: '瑕佹眰鍊�', prop: 'ask' }, + { label: '瑕佹眰鎻忚堪', prop: 'tell' }, ], pageDelete: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, - deleteDialogVisible:false, + deleteDialogVisible: false, upLoad: false, tabList: [ { @@ -709,24 +711,24 @@ tabIndex: 0, active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0 currentId: null, - more:false, - insOrderRow:{}, - checkIndexList:[], - checkDataList:[ + more: false, + insOrderRow: {}, + checkIndexList: [], + checkDataList: [ { - sampleCode:'11111' + sampleCode: '11111' } ], - qrData:[], - multipleSelection:[], - sonLaboratoryList:[], + qrData: [], + multipleSelection: [], + sonLaboratoryList: [], printDialog: false, addInspectionDia: false } }, - watch:{ - printDialogVisible(newVal){ - if(!newVal){ + watch: { + printDialogVisible(newVal) { + if (!newVal) { this.qrData = [] this.checkIndexList = [] this.checkDataList = [] @@ -741,7 +743,7 @@ methods: { // 鏌ヨ鍒楄〃鏁版嵁 refreshTable() { - if (this.tabIndex !== 2 && this.tabIndex !==3) { + if (this.tabIndex !== 2 && this.tabIndex !== 3) { this.entity.orderType = '' } else { if (this.tabIndex === 2) { @@ -750,9 +752,10 @@ this.entity.orderType = '鎶芥' } } - const params = {...this.entity, state: this.tabList[this.tabIndex].value} + const params = { ...this.entity, state: this.tabList[this.tabIndex].value } this.tableLoading = true selectInsOrderParameter(params).then(res => { + this.upIndex++ this.tableLoading = false if (res.code === 200) { this.tableData = res.data.records @@ -766,17 +769,17 @@ this.resetForm('entity') this.refreshTable() }, - pagination (page) { + pagination(page) { this.page.size = page.limit this.refreshTable() }, // 鎵撳紑淇敼濮旀墭缂栧彿寮规 - changeEntrustCode (row) { + changeEntrustCode(row) { this.entrustCodeVisible = true - this.entrustCodeInfo = {...row} + this.entrustCodeInfo = { ...row } }, // 鎻愪氦淇敼濮旀墭缂栧彿 - submitCode () { + submitCode() { this.submitCodeLoading = true updateOrderEntrustCode({ id: this.entrustCodeInfo.id, @@ -792,33 +795,33 @@ this.submitCodeLoading = false }) }, - selectMethod(val){ + selectMethod(val) { this.multipleSelection = val }, //閫夋嫨瑕佹墦鍗扮殑浜岀淮鐮� - changePrintCode(){ + changePrintCode() { let indexList = this.checkIndexList let arr = [] - indexList.forEach(i=>{ + indexList.forEach(i => { arr.push(this.qrData[i]) }) this.checkDataList = arr }, //鍏ㄩ�� handleCheckAllChange(val) { - if(val){ - for(var i=0;i<this.qrData.length;i++){ + if (val) { + for (var i = 0; i < this.qrData.length; i++) { this.checkIndexList.push(i) } this.checkDataList = this.qrData - }else{ + } else { this.checkIndexList = [] this.checkDataList = [] } this.isIndeterminate = false; }, - submitPrint(){ - if(this.checkDataList.length < 1){ + submitPrint() { + if (this.checkDataList.length < 1) { this.$message.warning("璇烽�夋嫨瑕佹墦鍗扮殑浜岀淮鐮�") return } @@ -826,7 +829,7 @@ PrintJS({ printable: 'printMOrder',//椤甸潰 type: "html",//鏂囨。绫诲瀷 - maxWidth:360, + maxWidth: 360, style: `@page { margin:0; size: 400px 75px collapse; @@ -843,13 +846,13 @@ height: 75px; margin:0; }`, - onPrintDialogClose: this.erexcel=false, + onPrintDialogClose: this.erexcel = false, targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕� font_size: '0.20cm', }); }, // 鎵撳紑娣诲姞妫�楠岄」寮规 - openAddIns () { + openAddIns() { if (this.multipleSelection.length === 0) { this.$message.warning('璇烽�夋嫨闇�瑕佹坊鍔犳楠岄」鐨勬暟鎹�') return @@ -864,9 +867,8 @@ }) }, // 瀵煎嚭璁板綍 - downLoad () { - rawAllInsOrderExport({...this.entity}).then(res => { - this.$message.success('瀵煎嚭鎴愬姛') + downLoad() { + rawAllInsOrderExport({ ...this.entity }).then(res => { let url = this.javaApi + '/word/' + res.data this.$download.saveAs(url, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx'); }).catch(err => { @@ -874,7 +876,7 @@ }) }, // 鎵撳紑鏍囩鎵撳嵃寮规 - openPrint () { + openPrint() { if (this.multipleSelection.length > 0) { this.printDialog = true this.$nextTick(() => { @@ -886,12 +888,12 @@ } }, // 鍏抽棴鏍囩鎵撳嵃寮规 - closePrintDialog () { + closePrintDialog() { this.printDialog = false }, // 鑾峰彇鎸囨淳浜哄憳涓嬫媺鍒楄〃 getAuthorizedPerson() { - selectUserCondition({type: 1}).then(res => { + selectUserCondition({ type: 1 }).then(res => { let data = [] res.data.forEach(a => { data.push({ @@ -934,9 +936,9 @@ this.getDataTableList(row) }, // 鏌ヨ鏁版嵁鏌ョ湅鍒楄〃鏁版嵁 - getDataTableList (row) { + getDataTableList(row) { this.tableDataLookTableLoading = true - selectSampleAndProductByOrderId({id: row.id}).then(res => { + selectSampleAndProductByOrderId({ id: row.id }).then(res => { this.tableDataLookTableLoading = false if (res.code === 200) { this.tableDataLook = res.data.records @@ -946,18 +948,18 @@ this.tableDataLookTableLoading = false }) }, - tableDataLookPagination (page) { + tableDataLookPagination(page) { this.tableDataLookPage.size = page.limit this.getDataTableList() }, // 闄勪欢鏌ョ湅 - handleFileLook (row) { + handleFileLook(row) { this.filesDialogVisible = true this.getFileList(row) }, getFileList(row) { this.tableLoadingFile = true - getFileList({insOrderId: row.id}).then(res => { + getFileList({ insOrderId: row.id }).then(res => { this.tableLoadingFile = false if (res.code === 200) { this.tableDataFile = res.data.records @@ -967,22 +969,22 @@ this.tableLoadingFile = false }) }, - paginationFile (page) { + paginationFile(page) { this.pageFile.size = page.limit this.getFileList() }, // 闄勪欢涓嬭浇 - handleDown(row){ + handleDown(row) { downFile({ id: row.id, }).then(res => { if (res.code === 200) { let url = ''; - if(res.data.type==1){ - url = this.javaApi+'/img/'+res.data.fileUrl + if (res.data.type == 1) { + url = this.javaApi + '/img/' + res.data.fileUrl this.$download.saveAs(url, row.fileName); - }else{ - url = this.javaApi+'/word/'+res.data.fileUrl + } else { + url = this.javaApi + '/word/' + res.data.fileUrl this.$download.saveAs(url, row.fileName); } } @@ -992,17 +994,17 @@ }, // 涓嬭浇鎶ュ憡 download(row) { - let url = this.javaApi+'/word/' + row.urlS?row.urlS:row.url; - if(url){ + let url = this.javaApi + '/word/' + row.urlS ? row.urlS : row.url; + if (url) { this.$download.saveAs(url, this.downLoadInfo.fileName); } }, // 鎾ら攢 handlEquash(row) { - if(this.tabIndex!=1){ + if (this.tabIndex != 1) { this.quashDialogVisible = true; - this.insOrderRow=row - }else{ + this.insOrderRow = row + } else { this.orderId = row.id this.revocationInsProductIds = '' this.deleteTilte = '鎾ら攢' @@ -1010,9 +1012,9 @@ this.getDeleteList() } }, - getDeleteList () { + getDeleteList() { this.tableLoadingDelete = true - selectNoProducts({orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds}).then(res => { + selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds }).then(res => { this.tableLoadingDelete = false this.componentDataDelete = res.data.records this.pageDelete.total = res.data.total @@ -1020,54 +1022,54 @@ this.tableLoadingDelete = false }) }, - paginationDelete (page) { + paginationDelete(page) { this.pageDelete.size = page.limit this.getDeleteList() }, - selectDelete(arr){ + selectDelete(arr) { this.deleteList = arr; }, - submitDelete(){ - if(this.deleteTilte=='鎾ら攢'){ - if(this.deleteList.length==0){ + submitDelete() { + if (this.deleteTilte == '鎾ら攢') { + if (this.deleteList.length == 0) { this.$message.error('璇烽�夋嫨瑕佹挙閿�鐨勯」') return } - let ids = this.deleteList.map(m=>m.id).join(',') + let ids = this.deleteList.map(m => m.id).join(',') this.printLoading = true; - updateInspected({ids: ids,orderId: this.orderId}).then(res=>{ - if (res.code===200){ - this.printLoading=false - this.deleteDialogVisible=false + updateInspected({ ids: ids, orderId: this.orderId }).then(res => { + if (res.code === 200) { + this.printLoading = false + this.deleteDialogVisible = false this.refreshTable('page') this.$message.success("鏇存柊鎴愬姛") } }) - }else{ - checkUpdate({orderId: this.orderId, state: 1}).then(res=>{ - if (res.code===200){ - this.printLoading=false - this.deleteDialogVisible=false + } else { + checkUpdate({ orderId: this.orderId, state: 1 }).then(res => { + if (res.code === 200) { + this.printLoading = false + this.deleteDialogVisible = false this.refreshTable('page') this.$message.success("鏇存柊鎴愬姛") } }) } }, - handlEquashCheck(row){ + handlEquashCheck(row) { this.orderId = row.id this.revocationInsProductIds = row.revocationInsProductIds this.deleteTilte = '鎾ら攢瀹℃牳' this.deleteDialogVisible = true; }, - handleNo(){ - if(this.deleteTilte=='鎾ら攢'){ - this.deleteDialogVisible=false - }else{ - checkUpdate({orderId: this.orderId, state: 0}).then(res=>{ - if (res.code===200){ - this.printLoading=false - this.deleteDialogVisible=false + handleNo() { + if (this.deleteTilte == '鎾ら攢') { + this.deleteDialogVisible = false + } else { + checkUpdate({ orderId: this.orderId, state: 0 }).then(res => { + if (res.code === 200) { + this.printLoading = false + this.deleteDialogVisible = false this.refreshTable('page') this.$message.success("鏇存柊鎴愬姛") } @@ -1086,14 +1088,14 @@ this.distributeData.type = row.type }) upPlanUser2({ - orderId:row.id, + orderId: row.id, }).then(res => { - if (res.code === 200&&res.data.length>0) { + if (res.code === 200 && res.data.length > 0) { this.sonLaboratoryList = []; - res.data.forEach(m=>{ + res.data.forEach(m => { this.sonLaboratoryList.push({ - value:m, - label:m + value: m, + label: m }) }) } @@ -1105,11 +1107,11 @@ return } // - if(this.distributeData.userId==null||this.distributeData.userId==''){ + if (this.distributeData.userId == null || this.distributeData.userId == '') { this.$message.error('鎸囨淳浜哄憳鏈~鍐�') return } - if(this.distributeData.userId&&(this.distributeData.sonLaboratory==null||this.distributeData.sonLaboratory=='')){ + if (this.distributeData.userId && (this.distributeData.sonLaboratory == null || this.distributeData.sonLaboratory == '')) { this.$message.error('璇曢獙瀹ゆ湭濉啓') return } @@ -1119,7 +1121,7 @@ sampleId: this.distributeData.sampleId, appointed: this.distributeData.appointed, userId: this.distributeData.userId, - sonLaboratory:this.distributeData.sonLaboratory, + sonLaboratory: this.distributeData.sonLaboratory, }).then(res => { if (res.code === 201) { this.upLoad = false @@ -1136,18 +1138,18 @@ }, submitForm() { this.upLoad = true; - if (this.tabIndex==1){ - updateInspected({id: this.insOrderRow.id}).then(res=>{ - if (res.code===200){ - this.upLoad=false - this.quashDialogVisible=false + if (this.tabIndex == 1) { + updateInspected({ id: this.insOrderRow.id }).then(res => { + if (res.code === 200) { + this.upLoad = false + this.quashDialogVisible = false this.refreshTable() this.$message.success("鏇存柊鎴愬姛") } }) - }else{ - updateStatus({id: this.insOrderRow.id}).then(res=>{ - if (res.code===200){ + } else { + updateStatus({ id: this.insOrderRow.id }).then(res => { + if (res.code === 200) { this.upLoad = false this.quashDialogVisible = false this.refreshTable('page') @@ -1164,25 +1166,25 @@ }, // 涓嬪崟 playOrder(num) { - this.$router.push({ path: "/productOrder/add", query: {examine: 0,active: num, tabIndex: this.tabIndex} }); + this.$router.push({ path: "/productOrder/add", query: { examine: 0, active: num, tabIndex: this.tabIndex } }); }, // 瀹℃牳 handleVerify(row) { - this.$router.push({ path: "/productOrder/add", query: {examine: 1,active: 3, currentId: row.id} }); + this.$router.push({ path: "/productOrder/add", query: { examine: 1, active: 3, currentId: row.id } }); }, handleTab(m, i) { this.tabIndex = i; this.refreshTable() }, // 鏌ョ湅妫�楠屾暟鎹� - viewInspectInfo (row) { + viewInspectInfo(row) { //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃 let inspectorList = [] - if(row.userName){ + if (row.userName) { inspectorList = row.userName.split(',') } let user = JSON.parse(localStorage.getItem('user')) - if(user){ + if (user) { inspectorList.push(user.name) } this.inspectorList = inspectorList @@ -1196,27 +1198,27 @@ this.refreshTable('page') }, // 鍒锋柊椤甸潰 - refreshView () { + refreshView() { this.InspectionKey++ }, - changeUser(){ - if(this.sonLaboratoryList.length>0){ + changeUser() { + if (this.sonLaboratoryList.length > 0) { this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value } }, - handleDelete(row){ + handleDelete(row) { this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - delInsOrder({insOrderId: row.id}).then(res => { + delInsOrder({ insOrderId: row.id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛') this.refreshTable() }).catch(e => { this.$message.error('鍒犻櫎澶辫触') }) - }).catch(() => {}) + }).catch(() => { }) } } } @@ -1227,6 +1229,7 @@ justify-content: space-between; align-items: center; } + .tab { list-style-type: none; display: flex; @@ -1256,10 +1259,12 @@ border-color: #3A7BFA; color: #3A7BFA; } -.box-card >>>.el-radio__inner { + +.box-card>>>.el-radio__inner { border-radius: 2px !important; } -.box-card >>>.el-radio__input.is-checked .el-radio__inner::after { + +.box-card>>>.el-radio__input.is-checked .el-radio__inner::after { content: ''; width: 8px; height: 3px; @@ -1275,13 +1280,16 @@ border-radius: 0px; background: none; } ->>>.el-radio__label{ + +>>>.el-radio__label { color: #000 !important; } -.el-dialog__body >>>.el-radio__label{ + +.el-dialog__body>>>.el-radio__label { font-size: 8px; } -.el-dialog__body >>>.el-radio__input.is-checked .el-radio__inner::after { + +.el-dialog__body>>>.el-radio__input.is-checked .el-radio__inner::after { content: ''; width: 4px; height: 3px; @@ -1297,38 +1305,48 @@ border-radius: 0px; background: none; } ->>>.el-radio__input.is-disabled.is-checked .el-radio__inner{ + +>>>.el-radio__input.is-disabled.is-checked .el-radio__inner { background: #3A7BFA; } -.el-dialog__body >>>.el-radio__input.is-disabled.is-checked .el-radio__inner{ + +.el-dialog__body>>>.el-radio__input.is-disabled.is-checked .el-radio__inner { background: transparent; } -.el-dialog__body >>>.el-radio__inner{ + +.el-dialog__body>>>.el-radio__inner { width: 8px !important; height: 8px !important; } -.el-dialog__body >>>.el-radio__label{ + +.el-dialog__body>>>.el-radio__label { padding-left: 2px !important; } -.el-dialog__body >>>.el-card__body{ + +.el-dialog__body>>>.el-card__body { padding: 0 !important; } -.el-dialog__body >>>.el-card { + +.el-dialog__body>>>.el-card { border: none; } -.el-dialog__body >>>.el-radio__input.is-disabled .el-radio__inner{ + +.el-dialog__body>>>.el-radio__input.is-disabled .el-radio__inner { border-color: #000 !important; } -.el-dialog__body >>>.el-radio__input.is-disabled.is-checked .el-radio__inner{ + +.el-dialog__body>>>.el-radio__input.is-disabled.is-checked .el-radio__inner { border: none !important; } -.scor{ + +.scor { width: 0.01cm; height: 0.01cm; border-radius: 1px; border: 1px solid #000; display: inline-block; } + .ellipsis-multiline { display: -webkit-box; -webkit-line-clamp: 2; @@ -1336,8 +1354,11 @@ overflow: hidden; text-overflow: ellipsis; word-wrap: break-word; - max-height: 3.0em; /* 楂樺害涓哄瓧浣撳ぇ灏忕殑涓ゅ�� */ - line-height: 1.5em; /* 琛岄珮 */ - height: 3.0em; /* 楂樺害涓鸿楂樼殑涓ゅ�� */ + max-height: 3.0em; + /* 楂樺害涓哄瓧浣撳ぇ灏忕殑涓ゅ�� */ + line-height: 1.5em; + /* 琛岄珮 */ + height: 3.0em; + /* 楂樺害涓鸿楂樼殑涓ゅ�� */ } </style> diff --git a/src/views/business/productSamplingInfo/index.vue b/src/views/business/productSamplingInfo/index.vue index a7c2831..bebf98a 100644 --- a/src/views/business/productSamplingInfo/index.vue +++ b/src/views/business/productSamplingInfo/index.vue @@ -3,9 +3,8 @@ <div style="display: flex;justify-content: space-between"> <el-form :model="entity" ref="entity" size="small" :inline="true"> <el-form-item label="缂栧彿" prop="quarterNo" v-show="tabIndex === 0"> - <el-input v-model="entity.quarterNo" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> + <el-input v-model="entity.quarterNo" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> <el-form-item> @@ -20,26 +19,25 @@ <div> <div class="table"> <ul class="tab"> - <li v-for="(m,i) in tabList" :key="i" :class="{active:i===tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> + <li v-for="(m, i) in tabList" :key="i" :class="{ active: i === tabIndex }" @click="handleTab(m, i)">{{ m.label }}</li> </ul> <!--瀛e害--> - <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" - @pagination="pagination" :height="'calc(100vh - 290px)'" - :page="page" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination" + :height="'calc(100vh - 290px)'" :page="page" :tableLoading="tableLoading"></lims-table> <!--骞村害--> - <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" - @pagination="pagination1" :height="'calc(100vh - 290px)'" - key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> + <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" @pagination="pagination1" + :height="'calc(100vh - 290px)'" key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> </div> </div> - <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="yearSampleDia" title="骞村害鎶芥牱" width="70%" - @close="closeYearSampleDia"> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="yearSampleDia" title="骞村害鎶芥牱" + width="70%" @close="closeYearSampleDia"> <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px"> - <div style="width: 30%;display: flex;align-items: center;" > - <el-input v-if="operationType !=='view'" v-model="currentYear" size="small"/> - <span v-if="operationType ==='view'" style="width: 160px;font-size: 18px;font-weight: 600">{{currentYear}}</span> + <div style="width: 30%;display: flex;align-items: center;"> + <el-input v-if="operationType !== 'view'" v-model="currentYear" size="small" /> + <span v-if="operationType === 'view'" + style="width: 160px;font-size: 18px;font-weight: 600">{{ currentYear }}</span> </div> - <div v-if="operationType !== 'view'"> + <div v-if="operationType !== 'view'"> <el-button size="small" type="primary" @click="addQuarter">娣诲姞</el-button> <el-button size="small" type="danger" @click="clearTable">娓呯┖</el-button> </div> @@ -49,174 +47,181 @@ <el-table-column label="绫诲埆" prop="yearType" width="240"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.yearType" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.yearType" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.yearType}}</span> + <span size="small">{{ row.yearType }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="1" prop="january" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.january" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.january" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.january}}</span> + <span size="small">{{ row.january }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="2" prop="february" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.february" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.february" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.february}}</span> + <span size="small">{{ row.february }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="3" prop="march" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.march" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.march" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.march}}</span> + <span size="small">{{ row.march }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="4" prop="april" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.april" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.april" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.april}}</span> + <span size="small">{{ row.april }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="5" prop="may" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.may" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.may" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.may}}</span> + <span size="small">{{ row.may }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="6" prop="june" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.june" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.june" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.june}}</span> + <span size="small">{{ row.june }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="7" prop="july" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.july" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.july" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.july}}</span> + <span size="small">{{ row.july }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="8" prop="august" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.august" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.august" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.august}}</span> + <span size="small">{{ row.august }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="9" prop="september" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.september" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.september" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.september}}</span> + <span size="small">{{ row.september }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="10" prop="october" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.october" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.october" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.october}}</span> + <span size="small">{{ row.october }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="11" prop="november" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.november" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.november" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.november}}</span> + <span size="small">{{ row.november }}</span> </template> </template> </el-table-column> <el-table-column header-align="center" label="12" prop="december" width="160"> <template slot-scope="{row}"> <template v-if="operationType !== 'view'"> - <el-input v-model="row.december" size="small" type="textarea" :rows="4"/> + <el-input v-model="row.december" size="small" type="textarea" :rows="4" /> </template> <template v-else> - <span size="small">{{row.december}}</span> + <span size="small">{{ row.december }}</span> </template> </template> </el-table-column> - <el-table-column v-if="operationType !== 'view'" fixed="right" label="鎿嶄綔" width="100"> + <el-table-column v-if="operationType !== 'view'" fixed="right" label="鎿嶄綔" width="100"> <template slot-scope="scope"> - <el-button size="small" style="color: #f56c6c" type="text" @click="deleteScope(scope.$index)">鍒犻櫎</el-button> + <el-button size="small" style="color: #f56c6c" type="text" + @click="deleteScope(scope.$index)">鍒犻櫎</el-button> </template> </el-table-column> </el-table> </div> <div style="display: flex;align-items: center;margin-top: 10px"> <span style="width: 70px">娉ㄦ剰浜嬮」锛�</span> - <el-input v-model="yearSampleForm.tableRemark" :disabled="operationType === 'view'" size="small" style="width: 50%" type="textarea"></el-input> + <el-input v-model="yearSampleForm.tableRemark" :disabled="operationType === 'view'" size="small" + style="width: 50%" type="textarea"></el-input> </div> <div style="display: flex;align-items: center;margin-top: 10px"> <span style="width: 70px">澶囨敞锛�</span> - <el-input v-model="yearSampleForm.remark" :disabled="operationType === 'view'" size="small" style="width: 50%" type="textarea"></el-input> + <el-input v-model="yearSampleForm.remark" :disabled="operationType === 'view'" size="small" style="width: 50%" + type="textarea"></el-input> </div> <div v-if="operationType !== 'add'"> <el-form ref="form" :model="editYearFormRow" label-width="70px"> <el-col :span="12"> <el-form-item label="缂栧埗浜猴細"> - <el-select v-model="editYearFormRow.writeUser" :disabled="operationType !=='edit'" placeholder="璇烽�夋嫨" size="small" style="width: 100%"> + <el-select v-model="editYearFormRow.writeUser" :disabled="operationType !== 'edit'" placeholder="璇烽�夋嫨" + size="small" style="width: 100%"> <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="浼氱浜猴細"> - <el-select v-model="editYearFormRow.countersignUser" :disabled="operationType !=='edit'" multiple placeholder="璇烽�夋嫨" size="small" style="width: 100%"> + <el-select v-model="editYearFormRow.countersignUser" :disabled="operationType !== 'edit'" multiple + placeholder="璇烽�夋嫨" size="small" style="width: 100%"> <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="瀹℃牳浜猴細"> - <el-select v-model="editYearFormRow.examineUser" :disabled="operationType !=='edit'" placeholder="璇烽�夋嫨" size="small" style="width: 100%"> + <el-select v-model="editYearFormRow.examineUser" :disabled="operationType !== 'edit'" placeholder="璇烽�夋嫨" + size="small" style="width: 100%"> <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="鎵瑰噯浜猴細"> - <el-select v-model="editYearFormRow.ratifyUser" :disabled="operationType !=='edit'" placeholder="璇烽�夋嫨" size="small" style="width: 100%"> + <el-select v-model="editYearFormRow.ratifyUser" :disabled="operationType !== 'edit'" placeholder="璇烽�夋嫨" + size="small" style="width: 100%"> <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> </el-select> </el-form-item> @@ -242,12 +247,12 @@ finalReportSpotCheckYear, getQuarterPage, getSpotCheckYear, getSpotCheckYearPage, updateSpotCheckYear } from "@/api/business/productSamplingInfo"; -import {selectUserCondition} from "@/api/performance/class"; +import { selectUserCondition } from "@/api/performance/class"; export default { name: "b1-product-sampling-info", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: {limsTable, AddQuarterItem}, + components: { limsTable, AddQuarterItem }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { @@ -269,10 +274,10 @@ tableData: [], tableLoading: false, column: [ - {label: '缂栧彿', prop: 'quarterNo'}, - {label: '澶囨敞', prop: 'remark'}, - {label: '鍒涘缓浜�', prop: 'createUserName'}, - {label: '鍒涘缓鏃堕棿', prop: 'createTime'}, + { label: '缂栧彿', prop: 'quarterNo' }, + { label: '澶囨敞', prop: 'remark' }, + { label: '鍒涘缓浜�', prop: 'createUserName' }, + { label: '鍒涘缓鏃堕棿', prop: 'createTime' }, { dataType: 'action', label: '鎿嶄綔', @@ -309,9 +314,9 @@ } ], page: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, tableData1: [], tableLoading1: false, @@ -391,10 +396,10 @@ this.getSpotCheckYearPageList() } }, - getQuarterPageList () { + getQuarterPageList() { this.tableLoading = true getQuarterPage({ - ...this.page,...this.entity + ...this.page, ...this.entity }).then(res => { this.tableLoading = false this.page.total = res.data.total @@ -403,7 +408,7 @@ this.tableLoading = false }) }, - getSpotCheckYearPageList () { + getSpotCheckYearPageList() { this.tableLoading1 = true getSpotCheckYearPage({ ...this.page1 @@ -420,78 +425,76 @@ this.resetForm('entity') this.refreshTable() }, - pagination (page) { + pagination(page) { this.page.size = page.limit this.refreshTable() }, - pagination1 (page) { + pagination1(page) { this.page1.size = page.limit this.refreshTable() }, // 缂栬緫瀛e害鎶芥牱 - editForm (row) { + editForm(row) { this.$refs.addQuarterItem.openDia(row, 'edit') }, // 鏌ョ湅瀛e害鎶芥牱 - viewQuarterInfo (row) { + viewQuarterInfo(row) { this.$refs.addQuarterItem.openDia(row, 'view') }, // 鍒犻櫎瀛e害鎶芥牱 - deleteQuarterInfo (row) { + deleteQuarterInfo(row) { this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - deleteQuarter({quarterId: row.quarterId}).then(res => { + deleteQuarter({ quarterId: row.quarterId }).then(res => { if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.refreshTable() } }) - }).catch(() => {}) + }).catch(() => { }) }, // 瀵煎嚭 - handleDown (row) { + handleDown(row) { let randomNum = Math.random(); - finalReportQuarter({quarterId: row.quarterId, random: randomNum}).then(res => { + finalReportQuarter({ quarterId: row.quarterId, random: randomNum }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '瀛e害鎶芥牱淇℃伅瀵煎嚭.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 骞村害涓嬭浇 download(row) { - finalReportSpotCheckYear({yearId: row.yearId}).then(res => { + finalReportSpotCheckYear({ yearId: row.yearId }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, row.yearHead + '.docx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 鍒犻櫎骞村害鎶芥牱 - deleteYearInfo (row) { + deleteYearInfo(row) { this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - deleteSpotCheckYear({yearId: row.yearId}).then(res => { + deleteSpotCheckYear({ yearId: row.yearId }).then(res => { if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.refreshTable() } }) - }).catch(() => {}) + }).catch(() => { }) }, // 鏌ョ湅骞村害璇︽儏 - viewYearInfo (row) { + viewYearInfo(row) { this.operationType = 'view' this.getUserList() this.yearSampleDia = true this.yearRow = row - getSpotCheckYear({yearId: row.yearId}).then(res => { + getSpotCheckYear({ yearId: row.yearId }).then(res => { if (res.code === 200) { this.currentYear = res.data.yearHead this.yearItems = res.data.yearItems @@ -508,11 +511,11 @@ }) }, // 缂栬緫骞村害鎶芥牱 - editYearForm (row) { + editYearForm(row) { this.operationType = 'edit' this.getUserList() this.yearSampleDia = true - getSpotCheckYear({yearId: row.yearId}).then(res => { + getSpotCheckYear({ yearId: row.yearId }).then(res => { if (res.code === 200) { this.currentYear = res.data.yearHead this.yearItems = res.data.yearItems @@ -529,7 +532,7 @@ }) }, // 鎻愪氦骞村害璁″垝 - handleSample () { + handleSample() { if (this.operationType === 'add') { this.yearSampleForm.yearItems = JSON.parse(JSON.stringify(this.yearItems)) this.yearSampleForm.yearHead = this.currentYear @@ -543,7 +546,7 @@ } }) } else { - const params = {...this.editYearFormRow} + const params = { ...this.editYearFormRow } if (params.countersignUser != null) { params.countersignUser = params.countersignUser.join(',') } @@ -568,22 +571,22 @@ }) } }, - yearSample (type) { + yearSample(type) { this.operationType = type const currentDate = new Date(); this.yearSampleDia = true this.currentYear = currentDate.getFullYear() + '骞村勾搴︽娊妫�璁″垝' }, // 娣诲姞骞村害璁″垝 - addQuarter () { + addQuarter() { this.yearItems.push({}) }, // 娓呯┖鎶芥牱璁″垝 - clearTable () { + clearTable() { this.yearItems = [] }, // 鎵嬪姩鍒犻櫎 - deleteScope (index) { + deleteScope(index) { this.yearItems.splice(index, 1) }, // 鍒囨崲涓嬪崟tab琛ㄦ牸 @@ -594,7 +597,7 @@ } this.refreshTable() }, - closeYearSampleDia () { + closeYearSampleDia() { this.yearSampleForm = { tableRemark: '', remark: '' @@ -602,10 +605,10 @@ this.yearItems = [] this.yearSampleDia = false }, - getStyle(){ - return 'height: calc(100% - '+'44'+'px)' + getStyle() { + return 'height: calc(100% - ' + '44' + 'px)' }, - getUserList(){ + getUserList() { selectUserCondition({ type: 0 }).then((res) => { this.userList = res.data; }) diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue index 7573f89..266c6cd 100644 --- a/src/views/business/rawMaterialInspection/index.vue +++ b/src/views/business/rawMaterialInspection/index.vue @@ -4,59 +4,47 @@ <el-form :model="componentData" ref="componentData" size="small" :inline="true"> <el-row> <el-form-item label="鎵瑰彿" prop="updateBatchNo"> - <el-input v-model="componentData.updateBatchNo" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"></el-input> + <el-input v-model="componentData.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"></el-input> </el-form-item> <el-form-item label="闆朵欢鍙�" prop="partNo"> - <el-input v-model="componentData.partNo" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> + <el-input v-model="componentData.partNo" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> <el-form-item label="闆朵欢鎻忚堪" prop="partDesc"> - <el-input v-model="componentData.partDesc" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> + <el-input v-model="componentData.partDesc" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> <el-form-item label="渚涘簲鍟�" prop="supplierName" v-if="(tabIndex === 3 || tabIndex === 4)"> - <el-input v-model="componentData.supplierName" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> + <el-input v-model="componentData.supplierName" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> <el-form-item> - <el-button v-if="tabIndex === 3 || tabIndex === 4" :icon="!more?'el-icon-arrow-down':'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" @click="more=!more">{{!more?'鏇村':'鏀惰捣'}}</el-button> + <el-button v-if="tabIndex === 3 || tabIndex === 4" :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" + style="color: #3A7BFA;" type="text" @click="more = !more">{{ !more ? '鏇村' : '鏀惰捣' }}</el-button> <el-button size="mini" icon="el-icon-search" type="primary" @click="refreshTable()">鏌� 璇�</el-button> <el-button size="mini" @click="refresh()" icon="el-icon-refresh">閲� 缃�</el-button> </el-form-item> </el-row> <el-row> <el-form-item label="妫�楠岀姸鎬�" prop="inspectStatus" v-if="(tabIndex === 3 || tabIndex === 4) && more"> - <el-select v-model="componentData.inspectStatus" clearable - size="small" style="width: 100%;" @change="refreshTable()"> + <el-select v-model="componentData.inspectStatus" clearable size="small" style="width: 100%;" + @change="refreshTable()"> <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option> </el-select> </el-form-item> <el-form-item label="涓嬪彂鏃堕棿" prop="date" v-if="(tabIndex === 3 || tabIndex === 4) && more"> - <el-date-picker - v-model="componentData.date" - end-placeholder="缁撴潫鏃ユ湡" - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - range-separator="鑷�" - size="small" - start-placeholder="寮�濮嬫棩鏈�" - style="width: 100%;" - type="daterange" + <el-date-picker v-model="componentData.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" style="width: 100%;" type="daterange" value-format="yyyy-MM-dd"> </el-date-picker> </el-form-item> <el-form-item label="濮旀墭缂栧彿" prop="entrustCode" v-if="(tabIndex === 3 || tabIndex === 4) && more"> - <el-input v-model="componentData.entrustCode" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> + <el-input v-model="componentData.entrustCode" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> </el-input> </el-form-item> </el-row> @@ -66,80 +54,88 @@ <div class="table-tab"> <div> <ul class="tab"> - <li v-for="m in tabList" :key="m.value" :class="{active:m.value===tabIndex}" @click="handleTab(m)">{{m.label}}</li> + <li v-for="m in tabList" :key="m.value" :class="{ active: m.value === tabIndex }" @click="handleTab(m)"> + {{ m.label }}</li> </ul> </div> <div> - <el-button v-show="tabIndex === 4" :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button> - <el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary" @click="openIFS">鑾峰彇IFS璁㈠崟</el-button> + <el-button v-show="tabIndex === 4" :loading="outLoading" size="small" type="primary" + @click="handleDown">瀵煎嚭</el-button> + <el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary" + @click="openIFS">鑾峰彇IFS璁㈠崟</el-button> <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">鎶ユ</el-button> <el-button v-if="tabIndex === 0" size="small" type="primary" @click="addDeclare">鏂板鎶ユ淇℃伅</el-button> </div> </div> <!--寰呮姤妫�銆佸緟涓嬪崟--> <div class="table"> - <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0 || tabIndex === 1" - :isSelection="true" :handleSelectionChange="selectMethod" - @pagination="pagination" :height="'calc(100vh - 290px)'" - :page="page" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0 || tabIndex === 1" :isSelection="true" + :handleSelectionChange="selectMethod" @pagination="pagination" :height="'calc(100vh - 290px)'" :page="page" + :tableLoading="tableLoading"></lims-table> </div> <!--宸插畬鎴愩�佸叏閮�--> <div class="table"> <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 3 || tabIndex === 4" - @pagination="pagination1" :height="'calc(100vh - 290px)'" - :page="page1" :tableLoading="tableLoading1"></lims-table> + @pagination="pagination1" :height="'calc(100vh - 290px)'" :page="page1" + :tableLoading="tableLoading1"></lims-table> </div> </div> <!-- 鎵归噺鎶ユ --> <el-dialog :visible.sync="declareDialogSVisible" title="纭鎶ユ" width="30%"> <p style="font-size:16px;color:#333333">鏄惁纭鎶ユ閫夋嫨鐨勬暟鎹紵</p> <span slot="footer" class="dialog-footer"> - <el-row> - <el-button @click="declareDialogSVisible = false">鍙� 娑�</el-button> - <el-button :loading="submitDeclareLoading" type="primary" @click="submitDeclareS">纭� 瀹�</el-button> - </el-row> - </span> + <el-row> + <el-button @click="declareDialogSVisible = false">鍙� 娑�</el-button> + <el-button :loading="submitDeclareLoading" type="primary" @click="submitDeclareS">纭� 瀹�</el-button> + </el-row> + </span> </el-dialog> <!-- 纭鎶ユ --> <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '鏂板鎶ユ淇℃伅' : '鍘熸潗鏂欐姤妫�'" - :visible.sync="declareDialogVisible" - width="800px" @close="resetForm"> - <el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" - label-width="130px" label-position="right"> + :visible.sync="declareDialogVisible" width="800px" @close="resetForm"> + <el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" label-width="130px" + label-position="right"> <el-form-item class="declareObj-form-item" label="璁㈠崟鍙�:" prop="orderNo"> - <el-input v-model="declareObj.orderNo" :disabled="declareType !== 'add'" class="addObj-info" clearable placeholder="" size="small"></el-input> + <el-input v-model="declareObj.orderNo" :disabled="declareType !== 'add'" class="addObj-info" clearable + placeholder="" size="small"></el-input> </el-form-item> <el-form-item class="declareObj-form-item" label="闆朵欢鍙�:" prop="partNo"> - <el-input v-model="declareObj.partNo" :disabled="declareType !== 'add'" class="addObj-info" clearable placeholder="" size="small"></el-input> + <el-input v-model="declareObj.partNo" :disabled="declareType !== 'add'" class="addObj-info" clearable + placeholder="" size="small"></el-input> </el-form-item> <el-form-item class="declareObj-form-item" label="闆朵欢鎻忚堪:" prop="partDesc"> - <el-input v-model="declareObj.partDesc" :disabled="declareType !== 'add'" class="addObj-info" clearable placeholder="" size="small"></el-input> + <el-input v-model="declareObj.partDesc" :disabled="declareType !== 'add'" class="addObj-info" clearable + placeholder="" size="small"></el-input> </el-form-item> <el-form-item class="declareObj-form-item" label="鎶佃揪鐨勯噰璐暟閲�:" prop="qtyArrived"> - <el-input v-model="declareObj.qtyArrived" :disabled="declareType !== 'add'" class="addObj-info" clearable placeholder="" size="small"></el-input> + <el-input v-model="declareObj.qtyArrived" :disabled="declareType !== 'add'" class="addObj-info" clearable + placeholder="" size="small"></el-input> </el-form-item> <el-form-item v-if="declareType !== 'add'" class="declareObj-form-item" label="渚涘簲鍟嗙紪鍙�:" prop="supplierId"> - <el-input v-model="declareObj.supplierId" :disabled="declareType !== 'add'" class="addObj-info" clearable placeholder="" size="small"></el-input> + <el-input v-model="declareObj.supplierId" :disabled="declareType !== 'add'" class="addObj-info" clearable + placeholder="" size="small"></el-input> </el-form-item> <el-form-item class="declareObj-form-item" label="渚涘簲鍟嗗悕绉�:" prop="supplierName"> - <el-input v-model="declareObj.supplierName" :disabled="declareType !== 'add'" class="addObj-info" clearable placeholder="" size="small"></el-input> + <el-input v-model="declareObj.supplierName" :disabled="declareType !== 'add'" class="addObj-info" clearable + placeholder="" size="small"></el-input> </el-form-item> <el-form-item class="declareObj-form-item" label="鎵瑰彿:" prop="updateBatchNo"> <el-input v-model="declareObj.updateBatchNo" class="addObj-info" clearable size="small"></el-input> </el-form-item> <el-form-item v-if="declareType !== 'add'" class="declareObj-form-item" label="搴撲綅鍙�:" prop="locationNo"> - <el-input v-model="declareObj.locationNo" :disabled="declareType !== 'add'" class="addObj-info" clearable size="small"></el-input> + <el-input v-model="declareObj.locationNo" :disabled="declareType !== 'add'" class="addObj-info" clearable + size="small"></el-input> </el-form-item> <el-form-item v-if="declareType !== 'add'" class="declareObj-form-item" label="鎺ユ敹鏃堕棿:" prop="receiverDate"> <el-input v-model="declareObj.receiverDate" class="addObj-info" clearable disabled size="small"></el-input> </el-form-item> <el-form-item class="declareObj-form-item" label="鍗曚綅:" prop="buyUnitMeas"> - <el-input v-model="declareObj.buyUnitMeas" :disabled="declareType !== 'add'" clearable class="addObj-info" size="small"></el-input> + <el-input v-model="declareObj.buyUnitMeas" :disabled="declareType !== 'add'" clearable class="addObj-info" + size="small"></el-input> </el-form-item> <el-form-item class="declareObj-form-item" label="鐗╂枡绫诲瀷锛�" prop="isExpire"> - <el-select v-model="declareObj.isExpire" prop="isExpire" - :disabled="declareType !== 'add'" - clearable size="small"> + <el-select v-model="declareObj.isExpire" prop="isExpire" :disabled="declareType !== 'add'" clearable + size="small"> <el-option :value="1" label="杩囨湡鐗╂枡"></el-option> </el-select> </el-form-item> @@ -155,27 +151,26 @@ <el-dialog :visible.sync="deleteVisible" title="纭鍒犻櫎" width="30%"> <p style="font-size:16px;color:#333333">鏄惁纭鍒犻櫎锛�</p> <span slot="footer" class="dialog-footer"> - <el-row> - <el-button @click="deleteVisible = false">鍙� 娑�</el-button> - <el-button :loading="deleteLoading" type="primary" @click="submitDelete">纭� 瀹�</el-button> - </el-row> - </span> + <el-row> + <el-button @click="deleteVisible = false">鍙� 娑�</el-button> + <el-button :loading="deleteLoading" type="primary" @click="submitDelete">纭� 瀹�</el-button> + </el-row> + </span> </el-dialog> <!-- 鎾ら攢鎶ユ --> <el-dialog :visible.sync="declareDialogVisible1" title="鎶ユ鎾ら攢" width="30%"> <p style="font-size:16px;color:#333333">鎵瑰彿<span - style="color:#34BD66">{{insOrderRow.updateBatchNo}}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span></p> + style="color:#34BD66">{{ insOrderRow.updateBatchNo }}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span></p> <span slot="footer" class="dialog-footer"> - <el-row> - <el-button @click="declareDialogVisible1 = false">鍙� 娑�</el-button> - <el-button :loading="upLoad" type="primary" @click="submitDeclare1">纭� 瀹�</el-button> - </el-row> - </span> + <el-row> + <el-button @click="declareDialogVisible1 = false">鍙� 娑�</el-button> + <el-button :loading="upLoad" type="primary" @click="submitDeclare1">纭� 瀹�</el-button> + </el-row> + </span> </el-dialog> <!--鏁版嵁鏌ョ湅寮规--> - <data-look-visible v-if="dataDialogVisible" ref="dataDialogVisible" - :dataDialogVisible="dataDialogVisible" - :dataLookInfo="dataLookInfo" @closeDataLook="closeDataLook"></data-look-visible> + <data-look-visible v-if="dataDialogVisible" ref="dataDialogVisible" :dataDialogVisible="dataDialogVisible" + :dataLookInfo="dataLookInfo" @closeDataLook="closeDataLook"></data-look-visible> </div> </template> @@ -195,7 +190,7 @@ export default { // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: {limsTable, DataLookVisible}, + components: { limsTable, DataLookVisible }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { @@ -237,12 +232,12 @@ } } }, - {label: '璁㈠崟鍙�', prop: 'orderNo'}, - {label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived',width: '140px',}, - {label: '鎵瑰彿', prop: 'updateBatchNo'}, - {label: '闆朵欢鍙�', prop: 'partNo'}, - {label: '闆朵欢鎻忚堪', prop: 'partDesc'}, - {label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'}, + { label: '璁㈠崟鍙�', prop: 'orderNo' }, + { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived', width: '140px', }, + { label: '鎵瑰彿', prop: 'updateBatchNo' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, + { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, { dataType: 'tag', label: '鐗╂枡绫诲瀷', @@ -262,9 +257,9 @@ } } }, - {label: '鍗曚綅', prop: 'buyUnitMeas'}, - {label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'}, - {label: '鎶ユ鏃堕棿', prop: 'declareDate'}, + { label: '鍗曚綅', prop: 'buyUnitMeas' }, + { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' }, + { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', label: '鎿嶄綔', @@ -303,14 +298,14 @@ } ], page: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, tableData1: [], tableLoading1: false, column1: [ - {label: '濮旀墭缂栧彿', prop: 'entrustCode'}, + { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: '160px' }, { dataType: 'tag', label: '妫�楠岀姸鎬�', @@ -346,18 +341,18 @@ } } }, - {label: '璁㈠崟鍙�', prop: 'orderNo'}, - {label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived'}, - {label: '涓嬪彂鏃堕棿', prop: 'sendTime'}, - {label: '鎵瑰彿', prop: 'updateBatchNo'}, - {label: '闆朵欢鍙�', prop: 'partNo'}, - {label: '闆朵欢鎻忚堪', prop: 'partDesc'}, - {label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'}, - {label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc'}, - {label: '鍏嶆', prop: 'isExemption'}, - {label: '鏍峰搧鍚嶇О', prop: 'sampleName'}, - {label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'}, - {label: '妫�楠屼汉', prop: 'userName'}, + { label: '璁㈠崟鍙�', prop: 'orderNo' }, + { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, + { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, + { label: '鎵瑰彿', prop: 'updateBatchNo' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, + { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, + { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, + { label: '鍏嶆', prop: 'isExemption' }, + { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { label: '妫�楠屼汉', prop: 'userName' }, { dataType: 'tag', label: '鐗╂枡绫诲瀷', @@ -377,9 +372,9 @@ } } }, - {label: '鍗曚綅', prop: 'buyUnitMeas'}, - {label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'}, - {label: '鎶ユ鏃堕棿', prop: 'declareDate'}, + { label: '鍗曚綅', prop: 'buyUnitMeas' }, + { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' }, + { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', fixed: 'right', @@ -425,11 +420,11 @@ } ], page1: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, - more:false, + more: false, declareObj: { id: null, orderNo: '', // 璁㈠崟鍙� @@ -514,13 +509,13 @@ dataLookInfo: {}, // 鏁版嵁鏌ョ湅寮规鏁版嵁 declareType: '', // 鎿嶄綔鎶ユ鐨勭被鍨� queryStatusList: [ - {label: '妫�楠屼腑', value: 0}, - {label: '鍚堟牸', value: 1}, - {label: '涓嶅悎鏍�', value: 2}, - {label: '鏈笅鍗�', value: 3}, - {label: '璁╂鏀捐', value: 4}, + { label: '妫�楠屼腑', value: 0 }, + { label: '鍚堟牸', value: 1 }, + { label: '涓嶅悎鏍�', value: 2 }, + { label: '鏈笅鍗�', value: 3 }, + { label: '璁╂鏀捐', value: 4 }, ], - outLoading:false + outLoading: false } }, mounted() { @@ -547,9 +542,9 @@ } }, // 寰呮姤妫�銆佸緟涓嬪崟鏌ヨ - getWarehouseSubmitApi () { + getWarehouseSubmitApi() { this.tableLoading = true - const params = {...this.componentData, isInspect: this.tabIndex, state: this.tabIndex === 0 ? null : 0, ...this.page} + const params = { ...this.componentData, isInspect: this.tabIndex, state: this.tabIndex === 0 ? null : 0, ...this.page } getWarehouseSubmit(params).then(res => { this.tableLoading = false if (res.code === 200) { @@ -561,9 +556,9 @@ }) }, // 宸插畬鎴愰儴鏌ヨ - getIfsByFinishList () { + getIfsByFinishList() { this.tableLoading1 = true - getIfsByFinish({...this.componentData, ...this.page1}).then(res => { + getIfsByFinish({ ...this.componentData, ...this.page1 }).then(res => { this.tableLoading1 = false if (res.code === 200) { this.tableData1 = res.data.records @@ -574,9 +569,9 @@ }) }, // 鍏ㄩ儴鏌ヨ - getIfsByAllList () { + getIfsByAllList() { this.tableLoading1 = true - getIfsByAll({...this.componentData, ...this.page1}).then(res => { + getIfsByAll({ ...this.componentData, ...this.page1 }).then(res => { this.tableLoading1 = false if (res.code === 200) { this.tableData1 = res.data.records @@ -591,22 +586,22 @@ this.resetForm('componentData') this.refreshTable() }, - pagination (page) { + pagination(page) { this.page.size = page.limit this.refreshTable() }, - pagination1 (page) { + pagination1(page) { this.page1.size = page.limit this.refreshTable() }, // 鎵撳紑鎾ら攢鎶ユ寮规 - cancelDeclare (row) { + cancelDeclare(row) { this.declareDialogVisible1 = true this.insOrderRow = row }, // 鎻愪氦鎾ら攢鎶ユ鐢宠 - submitDeclare1 () { - revokeInspectionReport({id: this.insOrderRow.id}).then(res => { + submitDeclare1() { + revokeInspectionReport({ id: this.insOrderRow.id }).then(res => { if (res.code === 200) { this.declareDialogVisible1 = false this.refreshTable('page') @@ -622,13 +617,13 @@ this.dataDialogVisible = true; }, // 鐩存帴鏀捐 - goPass (row) { + goPass(row) { this.$confirm('鏄惁鏀捐褰撳墠鏁版嵁?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - concessionRelease({ifsInventoryId: row.id}).then(res => { + concessionRelease({ ifsInventoryId: row.id }).then(res => { if (res.code === 200) { this.$message({ type: 'success', @@ -645,13 +640,13 @@ }); }, // 鎻愬墠鍏ュ簱 - advancedGodown (row) { + advancedGodown(row) { this.$confirm('褰撳墠鍘熸潗鏂欐槸鍚︽彁鍓嶅叆搴�?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - advancedGodown({ifsInventoryId: row.id}).then(res => { + advancedGodown({ ifsInventoryId: row.id }).then(res => { if (res.code === 200) { this.$message({ type: 'success', @@ -668,17 +663,17 @@ }); }, // 鍏抽棴鏁版嵁鏌ョ湅寮规 - closeDataLook () { + closeDataLook() { this.dataDialogVisible = false }, // 鎵嬪姩鎶ユ - addDeclare () { + addDeclare() { this.clear() this.declareDialogVisible = true this.declareType = 'add' }, // 閫夋嫨鎶ユ鏁版嵁 - declareS () { + declareS() { if (this.multipleSelection.length > 0) { this.declareDialogSVisible = true } else { @@ -686,13 +681,13 @@ } }, // 鎻愪氦鎵归噺鎶ユ - submitDeclareS () { + submitDeclareS() { let ids = [] this.multipleSelection.forEach(item => { ids.push(item.id) }) this.declareDialogSVisible = true - inspectionReport({ids: ids}).then(res => { + inspectionReport({ ids: ids }).then(res => { if (res.code === 200) { this.declareDialogSVisible = false this.$message.success('鎶ユ鎴愬姛') @@ -706,12 +701,12 @@ }, // 鎵撳紑鎶ユ纭寮规 declare(row) { - this.declareObj = {...row} + this.declareObj = { ...row } this.declareDialogVisible = true this.declareType = 'edit' }, // 鎻愪氦鎶ユ - submitDeclare () { + submitDeclare() { if (this.declareType === 'add') { this.$refs['declareObj'].validate((valid) => { if (valid) { @@ -751,19 +746,19 @@ }); } }, - resetForm () { + resetForm() { this.$refs['declareObj'].resetFields(); this.declareDialogVisible = false }, // 鎵撳紑鍒犻櫎寮规 - deleteMaterial (row) { + deleteMaterial(row) { this.deleteVisible = true this.deleteInfo = row }, // 纭鍒犻櫎 - submitDelete () { + submitDelete() { this.deleteLoading = true - delIfsInventory({id: this.deleteInfo.id}).then(res => { + delIfsInventory({ id: this.deleteInfo.id }).then(res => { this.deleteVisible = false this.$message.success('鍒犻櫎鎴愬姛') this.refreshTable() @@ -789,15 +784,14 @@ }) }, // 鍏ㄩ儴瀵煎嚭 - handleDown(){ - let entity = {...this.componentData} + handleDown() { + let entity = { ...this.componentData } delete entity.orderBy this.outLoading = true rawAllExport({ - entity:entity + entity: entity }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') let url = this.javaApi + '/word/' + res.data this.$download.saveAs(url, "鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx"); }) @@ -827,6 +821,7 @@ display: flex; justify-content: space-between; } + .tab { list-style-type: none; display: flex; diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue index 640fd87..9ca8094 100644 --- a/src/views/business/reportPreparation/index.vue +++ b/src/views/business/reportPreparation/index.vue @@ -3,8 +3,8 @@ <div> <el-form :model="entity" ref="entity" size="small" :inline="true"> <el-form-item label="鎶ュ憡缂栧彿" prop="code"> - <el-input v-model="entity.code" clearable placeholder="璇疯緭鍏�" - size="small" @keyup.enter.native="refreshTable()"></el-input> + <el-input v-model="entity.code" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item label="鐘舵��" prop="queryStatus"> <el-select v-model="entity.queryStatus" clearable size="small" @change="refreshTable()"> @@ -30,26 +30,28 @@ </div> <div> <lims-table :tableData="valueTableData" :column="column" :page="page" :tableLoading="tableLoading" - :isSelection="true" :handleSelectionChange="handleChange" - :height="'calc(100vh - 290px)'" @pagination="pagination" key="valueTableData"> + :isSelection="true" :handleSelectionChange="handleChange" :height="'calc(100vh - 290px)'" + @pagination="pagination" key="valueTableData"> <div slot="action" slot-scope="scope"> <el-button size="small" type="text" @click="viewIssued(scope.row)">鏌ョ湅鎶ュ憡</el-button> - <el-upload ref='upload1' - style="display: inline;margin: 0 6px" - :action="fileAction1 +'?id='+ scope.row.id" - :auto-upload="true" - :before-upload="fileBeforeUpload1" - :headers="uploadHeader" :on-error="onError1" - :on-success="handleSuccessUp1" - :show-file-list="false" - accept='.doc,.docx'> - <el-button size="small" type="text" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName">涓婁紶</el-button> + <el-upload ref='upload1' style="display: inline;margin: 0 6px" :action="fileAction1 + '?id=' + scope.row.id" + :auto-upload="true" :before-upload="fileBeforeUpload1" :headers="uploadHeader" :on-error="onError1" + :on-success="handleSuccessUp1" :show-file-list="false" accept='.doc,.docx'> + <el-button size="small" type="text" + :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName">涓婁紶</el-button> </el-upload> - <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handleRestore(scope.row)">杩樺師</el-button> - <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">閫�鍥炰换鍔�</el-button> - <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handle(scope.row)">鎻愪氦</el-button> - <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || nickName !== scope.row.examineUser" @click="handleIssued(scope.row)">瀹℃牳</el-button> - <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || nickName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">鎵瑰噯</el-button> + <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" + @click="handleRestore(scope.row)">杩樺師</el-button> + <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" + @click="sendBackTask(scope.row)">閫�鍥炰换鍔�</el-button> + <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" + @click="handle(scope.row)">鎻愪氦</el-button> + <el-button type="text" size="small" + :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 1 || nickName !== scope.row.examineUser" + @click="handleIssued(scope.row)">瀹℃牳</el-button> + <el-button type="text" size="small" + :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || nickName !== scope.row.ratifyUser" + @click="handleApprove(scope.row)">鎵瑰噯</el-button> <el-popover placement="bottom" trigger="hover" style="margin-left: 6px"> <template #reference> <el-button link type="text" size="small">鏇村</el-button> @@ -64,31 +66,32 @@ </lims-table> </div> <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="claimVisible" title="鍦ㄧ嚎缂栧埗" - width="22cm"> + width="22cm"> <div class="full-screen"> <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" - @click="fullscreen=true;"></i> - <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;"> + @click="fullscreen = true;"></i> + <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen = false;"> </div> - <Word v-if="claimVisible" ref="Word" :class="{fullscreen:fullscreen}" :value="value" style="height:70vh" /> + <Word v-if="claimVisible" ref="Word" :class="{ fullscreen: fullscreen }" :value="value" style="height:70vh" /> <span slot="footer" class="dialog-footer"> <el-button @click="claimVisible = false">鍙� 娑�</el-button> <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button> </span> </el-dialog> <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="issuedVisible" title="鎶ュ憡瀹℃牳" - width="80vw"> + width="80vw"> <div class="full-screen"> - <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i> - <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" > + <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" + @click="fullscreen = true;"></i> + <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen = false;"> </div> <div v-if="issuedVisible" style="height: 80vh;"> <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> </div> <span slot="footer" class="dialog-footer"> - <el-button :disabled="loadingIssued" @click="issuedReasonVisible=true">涓嶉�氳繃</el-button> - <el-button type="primary" @click="subIssued">閫� 杩�</el-button> - </span> + <el-button :disabled="loadingIssued" @click="issuedReasonVisible = true">涓嶉�氳繃</el-button> + <el-button type="primary" @click="subIssued">閫� 杩�</el-button> + </span> </el-dialog> <el-dialog :modal-append-to-body="false" :visible.sync="issuedReasonVisible" title="涓嶉�氳繃鍘熷洜" width="400px"> <div class="search_thing"> @@ -96,22 +99,24 @@ <div class="search_input"><el-input v-model="reason" clearable placeholder="璇疯緭鍏�" size="small"></el-input></div> </div> <span slot="footer" class="dialog-footer"> - <el-button :disabled="loadingIssuedReason" @click="issuedReasonVisible=false">鍙栨秷</el-button> - <el-button :loading="loadingIssuedReason" type="primary" @click="handleIssuedReason">纭畾</el-button> - </span> + <el-button :disabled="loadingIssuedReason" @click="issuedReasonVisible = false">鍙栨秷</el-button> + <el-button :loading="loadingIssuedReason" type="primary" @click="handleIssuedReason">纭畾</el-button> + </span> </el-dialog> - <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="approveVisible" title="鎶ュ憡鎵瑰噯" width="80vw"> + <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="approveVisible" title="鎶ュ憡鎵瑰噯" + width="80vw"> <div class="full-screen"> - <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i> - <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" > + <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" + @click="fullscreen = true;"></i> + <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen = false;"> </div> <div v-if="approveVisible" style="height: 80vh;"> <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> </div> <span slot="footer" class="dialog-footer"> - <el-button :disabled="loadingApprove" @click="approveReasonVisible=true">涓嶆壒鍑�</el-button> - <el-button :loading="loadingApprove" type="primary" @click="subApprove">鎵� 鍑�</el-button> - </span> + <el-button :disabled="loadingApprove" @click="approveReasonVisible = true">涓嶆壒鍑�</el-button> + <el-button :loading="loadingApprove" type="primary" @click="subApprove">鎵� 鍑�</el-button> + </span> </el-dialog> <el-dialog :modal-append-to-body="false" :visible.sync="approveReasonVisible" title="涓嶆壒鍑嗗師鍥�" width="400px"> <div class="search_thing"> @@ -119,18 +124,17 @@ <div class="search_input"><el-input v-model="reason" clearable placeholder="璇疯緭鍏�" size="small"></el-input></div> </div> <span slot="footer" class="dialog-footer"> - <el-button :disabled="loadingApproveReason" @click="approveReasonVisible=false">鍙栨秷</el-button> - <el-button :loading="loadingApproveReason" type="primary" @click="handleApproveReason">纭畾</el-button> - </span> + <el-button :disabled="loadingApproveReason" @click="approveReasonVisible = false">鍙栨秷</el-button> + <el-button :loading="loadingApproveReason" type="primary" @click="handleApproveReason">纭畾</el-button> + </span> </el-dialog> - <el-dialog :close-on-click-modal="false" :visible.sync="addApproverDia" title="鎸囧畾鎵瑰噯浜哄憳" - width="400px" - @close="closeAddApproverDia"> + <el-dialog :close-on-click-modal="false" :visible.sync="addApproverDia" title="鎸囧畾鎵瑰噯浜哄憳" width="400px" + @close="closeAddApproverDia"> <div class="body" style="display: flex;padding: 10px;align-items: center;"> <div class="search_label" style="width: 150px;"><span class="required-span">*</span>鎵瑰噯浜猴細</div> <div class="search_input" style="width: 100%;"> <el-select v-model="approver" clearable filterable placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> - <el-option v-for="(item,i) in approverList" :key="i" :label="item.label" :value="item.value"> + <el-option v-for="(item, i) in approverList" :key="i" :label="item.label" :value="item.value"> </el-option> </el-select> </div> @@ -140,15 +144,13 @@ <el-button :loading="loadingIssued" type="primary" @click="submitAddApprover">纭� 瀹�</el-button> </span> </el-dialog> - <el-dialog :close-on-click-modal="false" :visible.sync="addVerifyDia" - title="鎸囧畾瀹℃牳浜哄憳" - width="400px" - @close="closeAddVerifyDia"> + <el-dialog :close-on-click-modal="false" :visible.sync="addVerifyDia" title="鎸囧畾瀹℃牳浜哄憳" width="400px" + @close="closeAddVerifyDia"> <div class="body" style="display: flex;padding: 10px;align-items: center;"> <div class="search_label" style="width: 150px;"><span class="required-span">*</span>瀹℃牳浜猴細</div> <div class="search_input" style="width: 100%;"> <el-select v-model="verifyUser" clearable filterable placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> - <el-option v-for="(item,i) in approverList" :key="i" :label="item.label" :value="item.value"> + <el-option v-for="(item, i) in approverList" :key="i" :label="item.label" :value="item.value"> </el-option> </el-select> </div> @@ -159,13 +161,14 @@ </span> </el-dialog> <!--浜т笟閾句俊鎭煡鐪�--> -<!-- <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo>--> + <!-- <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo>--> <!--鎶ュ憡鏌ョ湅--> <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="viewIssuedVisible" title="鎶ュ憡鏌ョ湅" - width="80vw"> + width="80vw"> <div class="full-screen"> - <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i> - <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" > + <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" + @click="fullscreen = true;"></i> + <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen = false;"> </div> <div v-if="viewIssuedVisible" style="height: 80vh;"> <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> @@ -174,19 +177,15 @@ <!--闄勪欢鏌ョ湅--> <el-dialog :visible.sync="filesDialogVisible" title="闄勪欢鏌ョ湅" width="80%" @closed="closeFilesLook"> <div style="margin-bottom: 10px"> - <el-upload ref='upload' - :action="fileAction" - :auto-upload="true" - :before-upload="fileBeforeUpload" :data="{orderId: filesLookInfo.insOrderId}" - :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-upload ref='upload' :action="fileAction" :auto-upload="true" :before-upload="fileBeforeUpload" + :data="{ orderId: filesLookInfo.insOrderId }" :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> <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px" - key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table> + key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table> </el-dialog> </div> </template> @@ -204,12 +203,12 @@ upReportUrl, writeReport } from "@/api/business/insReport"; -import {mapGetters} from "vuex"; -import {selectUserCondition} from "@/api/business/inspectionTask"; +import { mapGetters } from "vuex"; +import { selectUserCondition } from "@/api/business/inspectionTask"; import limsTable from "@/components/Table/lims-table.vue"; -import {delfile, downFile, getFileList} from "@/api/business/rawMaterialOrder"; +import { delfile, downFile, getFileList } from "@/api/business/rawMaterialOrder"; export default { - components: {limsTable, onlyoffice}, + components: { limsTable, onlyoffice }, data() { return { entity: { @@ -237,10 +236,10 @@ value: ``, reason: '', currentInfo: null, - option:null, - mutiList:[], - outLoading:false, - inLoading:false, + option: null, + mutiList: [], + outLoading: false, + inLoading: false, addApproverDia: false, // 鎸囧畾瀹℃壒浜哄憳寮规 approver: '', // 瀹℃壒浜哄憳 approverId: '', // 瀹℃壒浜哄憳 @@ -249,14 +248,14 @@ verifyUser: null, // 瀹℃牳浜哄憳 loadingVerify: false, // 瀹℃牳浜哄憳 typeSourceList: [ - {label: '鎴愬搧涓嬪崟', value: 0}, - {label: '鍘熸潗鏂欎笅鍗�', value: 1}, + { label: '鎴愬搧涓嬪崟', value: 0 }, + { label: '鍘熸潗鏂欎笅鍗�', value: 1 }, ], orderTypeList: [ - {label: '濮旀墭璇曢獙', value: 'Customer-ordered test'}, - {label: '鎶芥', value: '鎶芥'}, - {label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�'}, - {label: '瀛e害妫�楠�', value: 'Quarterly inspection'}, + { label: '濮旀墭璇曢獙', value: 'Customer-ordered test' }, + { label: '鎶芥', value: '鎶芥' }, + { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�' }, + { label: '瀛e害妫�楠�', value: 'Quarterly inspection' }, ], showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪� isReport: 1, @@ -266,9 +265,9 @@ examine: null, viewIssuedVisible: false, queryStatusList: [ - {label: '寰呮彁浜�', value: 0}, - {label: '寰呭鏍�', value: 1}, - {label: '寰呮壒鍑�', value: 2}, + { label: '寰呮彁浜�', value: 0 }, + { label: '寰呭鏍�', value: 1 }, + { label: '寰呮壒鍑�', value: 2 }, ], state: 0, orderId: 0, @@ -404,15 +403,19 @@ formatData: (params) => { if (params == 0) { return "涓嶉�氳繃"; - } else { + } else if (params == 1) { return "閫氳繃"; + } else { + return null } }, formatType: (params) => { if (params == 0) { return "danger"; - } else { + } else if (params == 1) { return "success"; + } else { + return null } }, }, @@ -427,15 +430,19 @@ formatData: (params) => { if (params == 0) { return "涓嶆壒鍑�"; - } else { + } else if (params == 1) { return "鎵瑰噯"; + } else { + return null } }, formatType: (params) => { if (params == 0) { return "danger"; - } else { + } else if (params == 1) { return "success"; + } else { + return null } }, }, @@ -470,7 +477,7 @@ refreshTable() { this.tableLoading = true pageInsReport({ - ...this.page,...this.entity + ...this.page, ...this.entity }).then(res => { this.tableLoading = false this.page.total = res.data.body.total @@ -486,14 +493,14 @@ this.resetForm('entity') this.refreshTable(); }, - handleChange(arr){ + handleChange(arr) { this.mutiList = arr }, // 鏌ョ湅妫�楠屾暟鎹� - viewInspectInfo (row) { + viewInspectInfo(row) { //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃 let inspectorList = [] - if(row.userName){ + if (row.userName) { inspectorList = row.userName.split(',') } inspectorList.push(this.nickName) @@ -509,7 +516,7 @@ }) }, // 鎵撳紑鏌ョ湅闄勪欢寮规 - handleFileLook (row) { + handleFileLook(row) { this.filesLookInfo = row this.filesDialogVisible = true this.getFileList() @@ -517,7 +524,7 @@ // 鏌ヨ闄勪欢鏌ョ湅鍒楄〃鍥炶皟 getFileList() { this.tableLoadingFile = true - getFileList({insOrderId: this.filesLookInfo.insOrderId}).then(res => { + getFileList({ insOrderId: this.filesLookInfo.insOrderId }).then(res => { this.tableLoadingFile = false if (res.code === 200) { this.tableDataFile = res.data.records @@ -531,33 +538,33 @@ this.pageFile.size = page.limit this.getFileList() }, - closeFilesLook () { + closeFilesLook() { this.filesDialogVisible = false }, - handleSuccessUp(response, ) { + handleSuccessUp(response,) { this.upLoading = false; if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); this.getFileList() } }, - handleSuccessUp1(response, ) { + handleSuccessUp1(response,) { if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); } }, // 涓嬭浇闄勪欢鐨勬枃浠� - handleDown(row){ + handleDown(row) { downFile({ id: row.id, }).then(res => { if (res.code === 200) { let url = ''; - if(res.data.type==1){ - url = this.javaApi+'/img/'+res.data.fileUrl + if (res.data.type == 1) { + url = this.javaApi + '/img/' + res.data.fileUrl this.$download.saveAs(url, row.fileName); - }else{ - url = this.javaApi+'/word/'+res.data.fileUrl + } else { + url = this.javaApi + '/word/' + res.data.fileUrl this.$download.saveAs(url, row.fileName); } } @@ -584,31 +591,30 @@ }).catch(() => { }) }, // 鏌ョ湅浜т笟閾句俊鎭� - openInfoDialog (row) { + openInfoDialog(row) { this.showInfoDialog = true this.$nextTick(() => { this.$refs.showInfoDialog.getInfo(row.ifsInventoryId) }) }, - handleDowns(){ - if(this.mutiList.length==0){ + handleDowns() { + if (this.mutiList.length == 0) { this.$message.error('璇烽�夋嫨鎶ュ憡') return } - let str = this.mutiList.map(m=>m.id).join(',') + let str = this.mutiList.map(m => m.id).join(',') this.outLoading = true - downAll({ids: str}).then(res => { + downAll({ ids: str }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') this.$download.saveAs(this.javaApi + res.message, row.fileName); }) }, - beforeUpload(file){ + beforeUpload(file) { const isZip = file.type === 'application/zip' || file.name.endsWith('.zip'); if (!isZip) { this.$message.error('涓婁紶鏂囦欢鍙兘鏄� ZIP 鏍煎紡!'); } - if(isZip){ + if (isZip) { this.inLoading = true; } return isZip; @@ -635,20 +641,20 @@ return Promise.reject(flag); //姝g‘鐨勭粓姝� } }, - handleSuccess(response,){ + handleSuccess(response,) { this.inLoading = false; if (response.code == 200) { this.$message.success('瀵煎叆鎴愬姛') this.refreshTable() - }else{ + } else { this.$message.error(response.message) } }, - onError(err, file, fileList,type) { + onError(err, file, fileList, type) { this.$message.error('涓婁紶澶辫触') this.$refs.upload.clearFiles() }, - onError1(err, file, fileList,type) { + onError1(err, file, fileList, type) { this.$message.error('涓婁紶澶辫触') this.$refs.upload1.clearFiles() }, @@ -696,8 +702,12 @@ } }, download(row) { - let url = this.javaApi+'/word/' + row.urlS ? row.urlS : row.url; - this.$download.saveAs(url, row.fileName); + let url = row.urlS ? row.urlS : row.url; + const link = document.createElement('a'); + link.href = this.javaApi + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); }, // 杩樺師鎿嶄綔 handleRestore(row) { @@ -713,13 +723,13 @@ // 瀹℃牳鎸夐挳 handleIssued(row) { this.currentInfo = row; - let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS + let fileName = (row.urlS === null || row.urlS === '') ? row.url : row.urlS let fileType = "docx" if (row.tempUrlPdf != null || row.tempUrlPdf === '') { fileName = row.tempUrlPdf fileType = "pdf" } - fileName = fileName.replace('/word/','') + fileName = fileName.replace('/word/', '') const userName = this.nickName this.option = { url: this.javaApi + "/word/" + fileName, @@ -737,13 +747,13 @@ // 鏌ョ湅鎶ュ憡 viewIssued(row) { this.currentInfo = row; - let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS + let fileName = (row.urlS === null || row.urlS === '') ? row.url : row.urlS let fileType = "docx" if (row.tempUrlPdf != null || row.tempUrlPdf === '') { fileName = row.tempUrlPdf fileType = "pdf" } - fileName = fileName.replace('/word/','') + fileName = fileName.replace('/word/', '') const userName = this.nickName this.option = { url: this.javaApi + "/word/" + fileName, @@ -766,7 +776,7 @@ type: 'warning' }).then(() => { this.upLoad = true - sendBackTask({id: row.id}).then(res => { + sendBackTask({ id: row.id }).then(res => { this.upLoad = false this.$message.success('閫�鍥炴垚鍔燂紒') this.refreshTable('page') @@ -781,7 +791,7 @@ }); }, // 瀹℃牳閫氳繃 - submitAddApprover () { + submitAddApprover() { if (!this.approver) { this.$message.error('璇烽�夋嫨瀹℃壒浜�') return @@ -803,7 +813,7 @@ this.loadingIssued = false; }) }, - closeAddApproverDia () { + closeAddApproverDia() { this.addApproverDia = false this.approver = '' }, @@ -828,13 +838,13 @@ // 鎵瑰噯鎸夐挳 handleApprove(row) { this.currentInfo = row; - let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS + let fileName = (row.urlS === null || row.urlS === '') ? row.url : row.urlS let fileType = "docx" if (row.tempUrlPdf != null || row.tempUrlPdf === '') { fileName = row.tempUrlPdf fileType = "pdf" } - fileName = fileName.replace('/word/','') + fileName = fileName.replace('/word/', '') const userName = this.nickName this.option = { url: this.javaApi + "/word/" + fileName, @@ -863,7 +873,7 @@ this.approveVisible = false; }) }, - handle (row) { + handle(row) { this.getAuthorizedPerson() this.currentInfo = row; this.addVerifyDia = true @@ -884,7 +894,7 @@ this.$message.error('鎻愪氦澶辫触') }) }, - closeAddVerifyDia () { + closeAddVerifyDia() { this.addVerifyDia = false this.verifyUser = '' }, diff --git a/src/views/business/unpass/components/unPassDialog.vue b/src/views/business/unpass/components/unPassDialog.vue index 39a57b1..abb940f 100644 --- a/src/views/business/unpass/components/unPassDialog.vue +++ b/src/views/business/unpass/components/unPassDialog.vue @@ -62,7 +62,7 @@ </el-form-item> </el-form> <el-upload v-if="type === 'add'" ref="upload" :action="action2" :on-change="beforeUpload" :on-error="onError" - :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="headers" :file-list="unPassFilesList"> + :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="uploadHeader" :file-list="unPassFilesList"> <el-button size="small" type="primary" style="text-align: left">闄勪欢涓婁紶</el-button> </el-upload> <div v-if="type !== 'add'"> @@ -84,6 +84,7 @@ <script> import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler } from '@/api/business/unpass.js' +import {mapGetters} from "vuex"; export default { name: "unPassDialog", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -148,17 +149,17 @@ orderId: this.orderId }).then(res => { if (res.code === 200) { - this.unPassForm.headline = `No.0005-涓ぉ瑁呭鐢电嚎-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${JSON.parse(localStorage.getItem("user")).name}-${new Date().toISOString().substring(0, 10)}` // 鏍囬 - this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 鍘熸潗鏂檌d + this.unPassForm.headline = `No.0005-涓ぉ瑁呭鐢电嚎-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${this.nickName}-${new Date().toISOString().substring(0, 10)}` // 鏍囬 + this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 鎶ユ鏃堕棿 + this.unPassForm.feedbackUser = this.nickName // 鍙嶉浜� this.unPassForm.insOrderId = res.data.insOrder.id // 璁㈠崟id - this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 渚涘簲鍟嗗悕绉� this.unPassForm.materialName = res.data.insOrder.sampleType // 鐗╂枡鍚嶇О + this.unPassForm.specsModels = res.data.insOrder.partDetail // 瑙勬牸鍨嬪彿 + this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 鍘熸潗鏂檌d + this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 渚涘簲鍟嗗悕绉� this.unPassForm.productionBatch = res.data.insOrderTemplate.updateBatchNo // 鐢熶骇鎵规 this.unPassForm.cargoQuantity = res.data.insOrderTemplate.qtyArrived + res.data.insOrderTemplate.buyUnitMeas // 鍒拌揣鏁伴噺 - this.unPassForm.specsModels = res.data.insOrder.partDetail // 瑙勬牸鍨嬪彿 this.unPassForm.inspectTime = res.data.insOrderTemplate.sendTime.substring(0, 10) // 鎶ユ鏃堕棿 - this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 鎶ユ鏃堕棿 - this.unPassForm.feedbackUser = JSON.parse(localStorage.getItem("user")).name // 鍙嶉浜� } }) } else { @@ -256,11 +257,7 @@ }, }, computed: { - headers() { - return { - 'token': sessionStorage.getItem('token') - } - }, + ...mapGetters(["nickName"]), action2() { return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified' } diff --git a/src/views/index.vue b/src/views/index.vue index db59dcc..b540921 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -10,121 +10,122 @@ </div> </div> </div> - <div v-loading="workLoading" class="left-2 card" style="overflow: hidden;"> - <div v-for="(item,index) in workDay" :key="index" class="left-2-item"> + <div class="left-2 card" v-loading="workLoading" style="overflow: hidden;"> + <div class="left-2-item" v-for="(item,index) in workDay" :key="index"> <div class="left-item-title"> <span style="font-size: 18px;">{{ item }}</span> <span style="font-size: 14px;color: #999999;">{{ weekdays[index] }}</span> + <el-tag style="margin-top: 6px;" size="small">{{workList[index].length}} 鏉�</el-tag> </div> <div class="left-item-body"> - <div v-for="(m,i) in workList[index]" :key="i" :class="{color0:m.type==0,color1:m.type==1,color2:m.type==2}" class="body-item"> + <div class="body-item" v-for="(m,i) in workList[index]" :key="i" :class="{color0:m.type==0,color1:m.type==1,color2:m.type==2}" @click="goAddList(m)"> <div> - <span style="font-size: 12px;margin-bottom: 17px;">{{ m.text }}</span> - <div style="display: flex"> - <span class="body-item-name">{{ m.name }}</span> - <span v-if="m.insState == 0" class="body-item-insState" style="background-color: #909399;font-size: 12px;">寰呮楠�</span> - <span v-if="m.insState == 1" class="body-item-insState" style="background-color: #E6A23C;font-size: 12px;">妫�楠屼腑</span> - <span v-if="m.insState == 2" class="body-item-insState" style="background-color: #67C23A;font-size: 12px;">宸叉楠�</span> - <span v-if="m.insState == 3" class="body-item-insState" style="background-color: #E6A23C;font-size: 12px;">寰呭鏍�</span> - <span v-if="m.insState == 4" class="body-item-insState" style="background-color: #F56C6C;font-size: 9px;">澶嶆牳鏈�氳繃</span> - <span v-if="m.insState == 5" class="body-item-insState" style="background-color: #67C23A;font-size: 10px;">澶嶆牳閫氳繃</span> + <span style="font-size: 12px;margin-bottom: 8px;">{{ m.text }}</span> + <div class="tags" style="display: flex;align-items: end;flex-wrap: wrap;margin-bottom: 8px;"> + <el-tooltip class="item" effect="dark" :content="item" placement="top" v-for="(item,index) in m.sample?m.sample.split(','):[]" + :key="index"> + <el-tag + :color="m.type==0?'#70A090':(m.type==1?'#EBD476':'#FF3838')" + effect="dark" size="mini" style="margin: 2px;" class="single-line-ellipsis"> + {{ item }} + </el-tag> + </el-tooltip> </div> + <span style="display: inline-block;height: 22px;width: 70px;border-radius: 10px;line-height: 22px;text-align: center;background: #C0C4CC;color: #fff;font-size: 14px;">{{ m.name }}</span> </div> </div> </div> </div> </div> +<!-- <div v-loading="workLoading" class="left-2 card" style="overflow: hidden;">--> +<!-- <div v-for="(item,index) in workDay" :key="index" class="left-2-item">--> +<!-- <div class="left-item-title">--> +<!-- <span style="font-size: 18px;">{{ item }}</span>--> +<!-- <span style="font-size: 14px;color: #999999;">{{ weekdays[index] }}</span>--> +<!-- </div>--> +<!-- <div class="left-item-body">--> +<!-- <div v-for="(m,i) in workList[index]" :key="i" :class="{color0:m.type==0,color1:m.type==1,color2:m.type==2}" class="body-item">--> +<!-- <div>--> +<!-- <span style="font-size: 12px;margin-bottom: 17px;">{{ m.text }}</span>--> +<!-- <div style="display: flex">--> +<!-- <span class="body-item-name">{{ m.name }}</span>--> +<!-- <span v-if="m.insState == 0" class="body-item-insState" style="background-color: #909399;font-size: 12px;">寰呮楠�</span>--> +<!-- <span v-if="m.insState == 1" class="body-item-insState" style="background-color: #E6A23C;font-size: 12px;">妫�楠屼腑</span>--> +<!-- <span v-if="m.insState == 2" class="body-item-insState" style="background-color: #67C23A;font-size: 12px;">宸叉楠�</span>--> +<!-- <span v-if="m.insState == 3" class="body-item-insState" style="background-color: #E6A23C;font-size: 12px;">寰呭鏍�</span>--> +<!-- <span v-if="m.insState == 4" class="body-item-insState" style="background-color: #F56C6C;font-size: 9px;">澶嶆牳鏈�氳繃</span>--> +<!-- <span v-if="m.insState == 5" class="body-item-insState" style="background-color: #67C23A;font-size: 10px;">澶嶆牳閫氳繃</span>--> +<!-- </div>--> +<!-- </div>--> +<!-- </div>--> +<!-- </div>--> +<!-- </div>--> +<!-- </div>--> </el-col> <el-col :lg="10" :md="10" :sm="24" :xl="10" :xs="24"> - <div class="right-1 card"> - <div class="right-1-item"> - <div class="img"> - <img alt="" src="@/assets/index_image/index-0.svg"> - </div> - <div class="mun"> - <p style="font-size: 20px;">{{getNumberFourTypes.totalNumberOfMessages}}</p> - <p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑寰呭姙</p> - </div> - </div> - <div class="right-1-item"> - <div class="img"> - <img alt="" src="@/assets/index_image/index-1.svg"> - </div> - <div class="mun"> - <p style="font-size: 20px;">{{ getNumberFourTypes.totalNumberOfReadMessages }}</p> - <p style="font-size: 14px;margin-bottom: 10px;">宸插姙浜嬪疁</p> - </div> - </div> - <div class="right-1-item"> - <div class="img"> - <img alt="" src="@/assets/index_image/index-2.svg"> - </div> - <div class="mun"> - <p style="font-size: 20px;">{{ getNumberFourTypes.remainingToDo }}</p> - <p style="font-size: 14px;margin-bottom: 10px;">鍓╀綑寰呭姙</p> - </div> - </div> - <div class="right-1-item"> - <div class="img"> - <img alt="" src="@/assets/index_image/index-3.svg"> - </div> - <div class="mun"> - <p style="font-size: 20px;">{{ getNumberFourTypes.totalNumberOfMessagesInThePastSevenDays }}</p> - <p style="font-size: 14px;margin-bottom: 10px;">杩戞湡浜嬪疁</p> - </div> + <div class="right-2 card"> + <span style="color: #333333;font-size: 16px;">宸ユ椂缁熻</span> + <div> + <el-select v-model="sonLaboratory" placeholder="绔欑偣" size="mini" style="width: 100px;" @change="initEchart"> + <el-option + v-for="item in dict.type.sys_sub_lab" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + <el-radio-group v-model="type" size="mini"> + <el-radio-button label="鍛�" ></el-radio-button> + <el-radio-button label="鏈�"></el-radio-button> + <el-radio-button label="骞�"></el-radio-button> + </el-radio-group> + <el-date-picker + v-model="time.week" + type="week" + format="yyyy 绗� WW 鍛�" + placeholder="閫夋嫨鍛�" size="mini" v-if="type=='鍛�'" @change="m=>changeTime(type,m)" style="width: 130px;"> + </el-date-picker> + <el-date-picker + v-model="time.month" + type="month" + placeholder="閫夋嫨鏈�" size="mini" v-if="type=='鏈�'" @change="m=>changeTime(type,m)" style="width: 130px;"> + </el-date-picker> + <el-date-picker + v-model="time.year" + type="year" + placeholder="閫夋嫨骞�" size="mini" v-if="type=='骞�'" @change="m=>changeTime(type,m)" style="width: 130px;"> + </el-date-picker> </div> </div> - <div class="right-2 card"> - <div class="right-2-title"> - <span style="color: #333333;font-size: 16px;">鎴戠殑鏃ョ▼</span> - <span style="cursor: pointer;font-size: 12px; -color: #3A7BFA;" @click="dialogVisible=true">娣诲姞鎴戠殑鏃ョ▼</span> - </div> - <div class="right-2-body"> - <div class="calendar" style="width: 49%;"> - <div class="control"> - <el-button class="prevm" icon="el-icon-arrow-left" @click="prevMonth(calendarValue)"></el-button> - <span>{{ calendarValue.getFullYear()+'骞�'+(calendarValue.getMonth() + 1)+'鏈�' }}</span> - <el-button class="nextm" icon="el-icon-arrow-right" @click="nextMonth(calendarValue)"></el-button> + <div class="right-2-body"> + <el-row :gutter="10" style="width: 100%;height: 80px;"> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <div style="height: 100%;background: url(~@/assets/images/bg1.png) no-repeat;background-size: 100% 100%;padding: 12px 0;box-sizing: border-box;"> + <p style="text-align: center;font-size: 14px;color: #606266;line-height: 20px;margin-bottom: 4px;">鎬诲伐鏃�(灏忔椂)</p> + <p style="text-align: center;font-family: DIN Alternate, DIN Alternate;font-weight: 700;font-size: 30px;color: #3D3D3D;line-height: 35px;">{{chartData0.total}}</p> </div> - <el-calendar v-model="calendarValue"> - <template - slot="dateCell" - slot-scope="{date, data}"> - <span> - {{ data.day.split('-').slice(2)+'' }} - </span> - <!-- <el-badge v-if="data.isSelected" is-dot class="item"> - </el-badge> --> - </template> - </el-calendar> - </div> - <div v-loading="scheduleLoading" class="right-2-list" style="width: 49%;height: 286px;"> - <div v-for="(m,i) in listScheduleByMe" :key="i" class="list2-item"> - <span>{{ m.scheduleTimes }}</span> - <el-tooltip :content="m.text" effect="dark" placement="top" style="margin-left: 10px;"> - <p class="ellipsis-multiline" >{{ m.text }}</p> - </el-tooltip> + </el-col> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <div style="height: 100%;background: url(~@/assets/images/bg2.png) no-repeat;background-size: 100% 100%;padding: 12px 0;box-sizing: border-box;"> + <p style="text-align: center;font-size: 14px;color: #606266;line-height: 20px;margin-bottom: 4px;">妫�楠屽憳(涓�)</p> + <p style="text-align: center;font-family: DIN Alternate, DIN Alternate;font-weight: 700;font-size: 30px;color: #3D3D3D;line-height: 35px;">{{chartData0.personNum}}</p> </div> - <span v-if="listScheduleByMe.length==0" style="color:rgb(144, 147, 153);font-size: 14px;text-align: center;margin: 120px 0;display: inline-block;width: 100%;">鏆傛棤鏁版嵁</span> - </div> - </div> + </el-col> + </el-row> + <echart-module :id="'index-1'" :config="chartConfig0" :datas="chartData0" style="height: 250px;width: 100%;"></echart-module> </div> <div class="right-3 card" style="overflow: hidden;"> <div class="right-3-tab"> - <!-- <div :class="{active:currentIndex==4}" class="tab-item" style="cursor: pointer;" @click="currentIndex=4">棰勮鎻愰啋</div>--> - <div :class="{active:currentIndex==5}" class="tab-item" style="cursor: pointer;" @click="currentIndexChange">CNAS閫氱煡閫氬憡</div> + <div :class="{active:currentIndex==5}" class="tab-item">寰呭姙浜嬮」</div> </div> <div v-loading="listLoading" class="right-3-list"> <scroll-pagination v-if="list.length>0||listLoading" :finishLoding="finishLoding" :list="list" @load="getList"> <div v-for="(m,i) in list" :key="i" class="list3-item"> <div class="list3-item-title"> - <!-- <img alt="" src="../../../static/img/index-tip.svg">--> <p style="color: #FF7756">{{ m.theme }}</p> </div> <div class="list3-item-info"> <p class="ellipsis-multiline" style="width: 73%;-webkit-line-clamp: 1;cursor: pointer;" @click="goNoticeDetail(m)"> - <!-- 缂栧彿<span style="color:#3A7BFA;"> SB20240101-001 </span>鐨勮澶囧皢浜�2023-09-09 11:11:11杩囨湡 --> {{ m.content }} </p> <p>{{ m.createTime }}</p> @@ -136,59 +137,26 @@ </div> </el-col> </el-row> - <el-dialog :visible.sync="dialogVisible" title="鏃ョ▼娣诲姞" width="400px"> - <div class="body" style="max-height: 60vh;"> - <el-row> - <el-col :span="22" class="search_thing"> - <div class="search_label"><span style="color: red;margin-right: 4px;">*</span>鏃堕棿锛�</div> - <div class="search_input"> - <el-date-picker - v-model="query.time" - format="yyyy-MM-dd HH:mm:ss" - placeholder="閫夋嫨鏃ユ湡鏃堕棿" - size="small" - style="width: 100%;" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> - </el-date-picker> - </div> - </el-col> - <el-col :span="22" class="search_thing"> - <div class="search_label"><span style="color: red;margin-right: 4px;">*</span>鍐呭锛�</div> - <div class="search_input"> - <el-input v-model="query.text" :rows="2" - placeholder="璇疯緭鍏ュ唴瀹�" size="small" type="textarea"></el-input> - </div> - </el-col> - </el-row> - </div> - <span slot="footer" class="dialog-footer"> - <el-row> - <el-button @click="handleCancel">鍙� 娑�</el-button> - <el-button :loading="loading" type="primary" @click="submit">纭� 瀹�</el-button> - </el-row> - </span> - </el-dialog> </div> </template> <script> import {getYearAndMonthAndDays} from '@/utils/date.js' import ScrollPagination from '@/components/index/scroll-paging.vue' +import {calendarWorkByWeek, manHourByPerson, manHourByStation} from "@/api/index/report"; +import EchartModule from '@/components/echarts/echart.vue' export default { components: { - ScrollPagination + ScrollPagination, + EchartModule }, + dicts: ['sys_sub_lab'], data() { return { user: {}, now: null, calendarValue: new Date(), currentIndex:5, - dialogVisible:false, - query:{ - time:'', - text:'' - }, - loading:false, workLoading:false, workList:[], workDay:[], @@ -203,13 +171,26 @@ finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡 timer:null, keyMap:{}, - getNumberFourTypes: {}, + sonLaboratory:null, + chartData0:{ + total:0, + personNum:0, + data:[] + }, + chartConfig0:{ + height: '', + isLoading:false, + type:'pie0' + }, + type:'鏈�', + time:{ + week:'', + month:'', + year:'', + }, } }, watch:{ - calendarValue(val){ - this.getScheduleByMe() - }, currentIndex(){ this.keyMap = {} this.currentPage = 1; @@ -218,7 +199,7 @@ } }, mounted() { - this.user = JSON.parse(localStorage.getItem('user')) + // this.user = JSON.parse(localStorage.getItem('user')) this.nowTime() setInterval(() => { this.nowTime() @@ -229,7 +210,6 @@ this.keyMap = {} this.list = []; this.getList(); - this.getScheduleByMe() this.timer&&clearInterval(this.timer) this.timer = setInterval(() => { this.init(); @@ -237,26 +217,17 @@ this.keyMap = {} this.list = []; this.getList(); - this.getScheduleByMe() },1000*60*10) - this.getNumberFourTypesFun() }, methods: { + // 璺宠浆椤甸潰 + goAddList() { + + }, changeState (val) { if (val == 0) { return '寰呮楠�' } - }, - currentIndexChange () { - this.keyMap = {} - this.currentPage = 1; - this.list = []; - this.getList(); - }, - getNumberFourTypesFun() { - this.$axios.get(this.$api.informationNotification.getNumberFourTypesMessagesHomePage).then(res => { - this.getNumberFourTypes = res.data - }) }, getList(){ const key = `_${this.currentPage}` @@ -273,26 +244,25 @@ if(this.list.length==0){ this.finishLoding = false; } - this.$axios.get(this.$api.informationNotification.page+'?size='+this.pageSize+'¤t='+this.currentPage+'&messageType='+this.currentIndex).then(res => { - if(res.code === 201){ - return - } - let list = res.data.records; - this.total = res.data.total; - if(list.length==0){ - this.finishLoding = true; - }else{ - if(list.length<this.pageSize){ - this.finishLoding = true; - } - this.list = this.list.concat(list) - if(this.total==this.list.length){ - this.finishLoding = true; - } - this.currentPage++; - } - this.listLoading = false - }) + // this.$axios.get(this.$api.informationNotification.page+'?size='+this.pageSize+'¤t='+this.currentPage+'&messageType='+this.currentIndex).then(res => { + // this.listLoading = false + // let list = res.data.records; + // this.total = res.data.total; + // if(list.length==0){ + // this.finishLoding = true; + // }else{ + // if(list.length<this.pageSize){ + // this.finishLoding = true; + // } + // this.list = this.list.concat(list) + // if(this.total==this.list.length){ + // this.finishLoding = true; + // } + // this.currentPage++; + // } + // }).catch(err => { + // this.listLoading = false + // }) }, nowTime() { var date = new Date(); @@ -320,94 +290,10 @@ } this.now = y + "-" + m + "-" + d + " " + h + ":" + min + ":" + s; }, - nextMonth(value) { - let year = this.calendarValue.getFullYear();// 褰撳墠骞翠唤 - let month = this.calendarValue.getMonth() + 1;// 褰撳墠鏈堜唤 - let day = this.calendarValue.getDate();// 褰撳墠澶╂暟 - let nextyear = year; - let nextmonth = parseInt(month) + 1; - // 鍒ゆ柇涓嬩竴鏈堟槸鍚︿細杩涘叆涓嬩竴骞� - if (nextmonth === 13) { - nextyear = parseInt(year) + 1; - nextmonth = 1; - } - // 璁$畻涓嬩竴骞翠笅涓�涓湀鏈夊灏戝ぉ - let nextday = new Date(nextyear, nextmonth, 0); - let nextdays = nextday.getDate(); - if (day > nextdays) { - day = nextdays; - if (day < 10) { - day = '0' + day; - } - } - if (nextmonth < 10) { - nextmonth = '0' + nextmonth; - } - let nexttime = nextyear + '-' + nextmonth + '-' + day; - - // 灏嗗緱鍒扮殑骞存湀鏃ユ牸寮忚浆鎹负鏍囧噯鏃堕棿锛屼笌楗夸簡涔堟椂闂存牸寮忕浉鍚屾墠鑳借仈鍔� - this.calendarValue = new Date(nexttime); - }, - prevMonth(time) { - let year = this.calendarValue.getFullYear();// 褰撳墠骞翠唤 - let month = this.calendarValue.getMonth() + 1;// 褰撳墠鏈堜唤 - let day = this.calendarValue.getDate();// 褰撳墠澶╂暟 - let prevyear = year; - let prevmonth = parseInt(month) - 1; - // 鍒ゆ柇涓婁竴鏈堟槸鍚︿細杩涘叆涓婁竴骞� - if (prevmonth === 0) { - prevyear = parseInt(year) - 1; - prevmonth = 12; - } - // 璁$畻涓婁竴骞翠笂涓�涓湀鏈夊灏戝ぉ - let prevday = new Date(prevyear, prevmonth, 0); - let prevdays = prevday.getDate(); - if (day > prevdays) { - day = prevdays; - if (day < 10) { - day = '0' + day; - } - } - if (prevmonth < 10) { - prevmonth = '0' + prevmonth; - } - let prevtime = prevyear + '-' + prevmonth + '-' + day; - - // 灏嗗緱鍒扮殑骞存湀鏃ユ牸寮忚浆鎹负鏍囧噯鏃堕棿锛屼笌楗夸簡涔堟椂闂存牸寮忕浉鍚屾墠鑳借仈鍔� - this.calendarValue = new Date(prevtime); - }, - handleCancel(){ - this.dialogVisible = false; - this.query = { - time:'', - text:'' - } - }, - submit(){ - if(!this.query.time){ - this.$message.error('鏃堕棿鏈~鍐�') - return - } - if(!this.query.text){ - this.$message.error('鍐呭鏈~鍐�') - return - } - this.loading = true; - this.$axios.post(this.$api.report.addSchedule, this.query).then(res => { - this.loading = false; - if (res.code == 201) { - this.$message.error('鎿嶄綔澶辫触') - return - } - this.$message.success('淇濆瓨鎴愬姛') - this.handleCancel() - this.getScheduleByMe() - }) - }, + // 鑾峰彇鏃ュ巻浠诲姟鍥� init(){ this.workLoading = true; - this.$axios.get(this.$api.report.calendarWorkByWeek).then(res => { - if (res.code == 201) return + calendarWorkByWeek().then(res => { this.workLoading = false; this.workList = []; for(let i=0;i<7;i++){ @@ -417,6 +303,8 @@ let arr = m.split('-') return arr[2] }) + }).catch(err=>{ + this.workLoading = false; }) }, getWeekdaysForNextWeek() { @@ -457,27 +345,6 @@ }) return weekdays; }, - getScheduleByMe(){ - this.scheduleLoading = true; - this.$axios.post(this.$api.report.ScheduleByMe, { - date:getYearAndMonthAndDays(this.calendarValue) - }).then(res => { - this.loading = false; - this.scheduleLoading = false; - if (res.code == 201) { - return - } - this.listScheduleByMe = res.data.map(m=>{ - if(m.scheduleTime){ - let time = m.scheduleTime.split(' ')[1].split(':') - m.scheduleTimes = time[0] + ':' + time[1] - }else{ - m.scheduleTimes = '' - } - return m - }) - }) - }, goNoticeDetail(row){ this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => { row.num = Math.random(100); @@ -491,6 +358,65 @@ },29); }) }, + changeTime(type,m){ + if(m){ + switch(type){ + case '鍛�': + this.startTime = getYearAndMonthAndDays(new Date(this.time.week.getTime() - 24 * 60 * 60 * 1000)) + this.endTime = getYearAndMonthAndDays(new Date(this.time.week.getTime() + 24 * 60 * 60 * 1000 * 5)) + break; + case '鏈�': + const year = new Date(this.time.month).getFullYear(); + const month = new Date(this.time.month).getMonth(); + const day = new Date(year, month + 1, 0).getDate(); // + // 璁剧疆璧峰鏃ユ湡鍜岀粨鏉熸棩鏈� + this.startTime = `${year}-${month + 1}-01` + this.endTime = `${year}-${month + 1}-${day}` // 鏈堟湯 + break; + case '骞�': + const year0 = new Date(this.time.year).getFullYear(); + this.startTime = `${year0}-01-01`; // 骞村垵 + this.endTime = `${year0}-12-31`; // 骞存湯 + break; + } + }else{ + const year = new Date().getFullYear(); + const month = new Date().getMonth(); + + // 璁剧疆璧峰鏃ユ湡鍜岀粨鏉熸棩鏈� + this.startTime = new Date(year, month, 1).toISOString().slice(0, 10); // 鏈堝垵 + this.endTime = new Date(year, month + 1, 0).toISOString().slice(0, 10); // 鏈堟湯 + this.time.month = new Date() + } + this.initEchart() + }, + async initEchart(){ + this.chartConfig0.isLoading = false + const params = { + startTime: this.startTime, + endTime: this.endTime, + sonLaboratory: this.sonLaboratory, + } + let res0 = await manHourByStation(params) + if (res0.code == 500) return + this.chartData0.total = res0.message + let res1 = await manHourByPerson(params) + if (res1.code == 500) return + this.chartData0.personNum = 0 + this.chartData0.data = [] + if(res1.data){ + for(let m in res1.data){ + this.chartData0.personNum ++ + let obj = { + name:m, + value:res1.data[m], + penl:this.chartData0.total>0?((res1.data[m]/this.chartData0.total)*100).toFixed(2):0 + } + this.chartData0.data.push(obj) + } + } + this.chartConfig0.isLoading = true + }, }, deactivated(){ this.timer&&clearInterval(this.timer) @@ -498,13 +424,13 @@ } </script> -<style scoped lang="scss"> +<style scoped> .index { width: 100%; height: calc(100% - 50px); overflow-y: auto; - padding: 20px 10px 10px; - background: rgb(245, 247, 251); + padding: 14px; + background: #F5F7FB; } .left-1 { @@ -565,6 +491,7 @@ display: flex; align-items: center; justify-content: center; + cursor: pointer; } .right-1-item .mun{ @@ -586,9 +513,9 @@ .right-2-body{ width: 100%; margin-top: 20px; - display: flex; - align-items: flex-start; - justify-content: space-between; + /* display: flex; + align-items: start; + justify-content: space-between; */ } >>>.el-calendar__header { display: none; @@ -634,23 +561,17 @@ font-size: 14px; } .right-3-tab{ - display: flex; - align-items: center; + padding: 20px 0 0 20px; + margin-bottom: 16px; } .tab-item{ - width: 50%; - box-sizing: border-box; - text-align: center; - padding: 14px 0; - font-size: 20px; - background: #F5F7FB; - color: #333333; -} -.tab-item.active{ - background: #fff; - color: #FF3838; - padding-left: 16px; + font-weight: 500; + font-size: 18px; + color: #3D3D3D; + line-height: 25px; text-align: left; + font-style: normal; + text-transform: none; } .right-3-list{ padding: 0 12px 8px; @@ -667,7 +588,7 @@ } .list3-item-title{ display: flex; - align-items: flex-start; + align-items: start; margin-bottom: 10px; } .list3-item-info{ @@ -714,6 +635,7 @@ border-radius: 16px; overflow: hidden; margin-bottom: 8px; + cursor: pointer; } .body-item.color0{ background: #70A090; @@ -768,24 +690,7 @@ background: #3A7BFA !important; color: #fff !important; } -.body-item-name { - display: inline-block; - height: 22px;width: 60px; - border-radius: 10px; - line-height: 22px; - text-align: center; - background: #C0C4CC; - color: #fff; - font-size: 14px -} -.body-item-insState { - margin-left: 2px; - display: inline-block; - height: 22px;width: 60px; - border-radius: 10px; - line-height: 22px; - text-align: center; - color: #fff; - font-size: 14px +>>>.el-tag--dark{ + border: 0; } </style> diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue index d844d5d..8d28b99 100644 --- a/src/views/monitor/logininfor/index.vue +++ b/src/views/monitor/logininfor/index.vue @@ -52,51 +52,51 @@ </el-form-item> </el-form> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - v-hasPermi="['monitor:logininfor:remove']" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - @click="handleClean" - v-hasPermi="['monitor:logininfor:remove']" - >娓呯┖</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-unlock" - size="mini" - :disabled="single" - @click="handleUnlock" - v-hasPermi="['monitor:logininfor:unlock']" - >瑙i攣</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['monitor:logininfor:export']" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> +<!-- <el-row :gutter="10" class="mb8">--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="danger"--> +<!-- plain--> +<!-- icon="el-icon-delete"--> +<!-- size="mini"--> +<!-- :disabled="multiple"--> +<!-- @click="handleDelete"--> +<!-- v-hasPermi="['monitor:logininfor:remove']"--> +<!-- >鍒犻櫎</el-button>--> +<!-- </el-col>--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="danger"--> +<!-- plain--> +<!-- icon="el-icon-delete"--> +<!-- size="mini"--> +<!-- @click="handleClean"--> +<!-- v-hasPermi="['monitor:logininfor:remove']"--> +<!-- >娓呯┖</el-button>--> +<!-- </el-col>--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="primary"--> +<!-- plain--> +<!-- icon="el-icon-unlock"--> +<!-- size="mini"--> +<!-- :disabled="single"--> +<!-- @click="handleUnlock"--> +<!-- v-hasPermi="['monitor:logininfor:unlock']"--> +<!-- >瑙i攣</el-button>--> +<!-- </el-col>--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="warning"--> +<!-- plain--> +<!-- icon="el-icon-download"--> +<!-- size="mini"--> +<!-- @click="handleExport"--> +<!-- v-hasPermi="['monitor:logininfor:export']"--> +<!-- >瀵煎嚭</el-button>--> +<!-- </el-col>--> +<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> +<!-- </el-row>--> <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> <el-table-column type="selection" width="55" align="center" /> diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue index a084d92..3756c95 100644 --- a/src/views/monitor/operlog/index.vue +++ b/src/views/monitor/operlog/index.vue @@ -76,40 +76,40 @@ </el-form-item> </el-form> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - v-hasPermi="['monitor:operlog:remove']" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - @click="handleClean" - v-hasPermi="['monitor:operlog:remove']" - >娓呯┖</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['monitor:operlog:export']" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> +<!-- <el-row :gutter="10" class="mb8">--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="danger"--> +<!-- plain--> +<!-- icon="el-icon-delete"--> +<!-- size="mini"--> +<!-- :disabled="multiple"--> +<!-- @click="handleDelete"--> +<!-- v-hasPermi="['monitor:operlog:remove']"--> +<!-- >鍒犻櫎</el-button>--> +<!-- </el-col>--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="danger"--> +<!-- plain--> +<!-- icon="el-icon-delete"--> +<!-- size="mini"--> +<!-- @click="handleClean"--> +<!-- v-hasPermi="['monitor:operlog:remove']"--> +<!-- >娓呯┖</el-button>--> +<!-- </el-col>--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="warning"--> +<!-- plain--> +<!-- icon="el-icon-download"--> +<!-- size="mini"--> +<!-- @click="handleExport"--> +<!-- v-hasPermi="['monitor:operlog:export']"--> +<!-- >瀵煎嚭</el-button>--> +<!-- </el-col>--> +<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> +<!-- </el-row>--> <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> <el-table-column type="selection" width="50" align="center" /> diff --git a/src/views/performance/manHour/workTimeConfig.vue b/src/views/performance/manHour/workTimeConfig.vue index 4fcad16..bcee42c 100644 --- a/src/views/performance/manHour/workTimeConfig.vue +++ b/src/views/performance/manHour/workTimeConfig.vue @@ -277,9 +277,11 @@ }) .then(() => { deleteAuxiliaryWorkingHours({ id: row.id }).then((res) => { - if (res.code == 201) return; - this.$message.success("鍒犻櫎鎴愬姛"); - this.refresh(); + console.log('res',res) + if (res.code == 200){ + this.$message.success("鍒犻櫎鎴愬姛"); + this.refresh(); + } }); }) .catch(() => { }); diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue index b93f8fe..2f10f73 100644 --- a/src/views/performance/manHour/workTimeManagement.vue +++ b/src/views/performance/manHour/workTimeManagement.vue @@ -4,308 +4,146 @@ <div class="search"> <div class="search_thing" style="width: 200px"> <div class="search_label">鏄熸湡锛�</div> - <el-select - v-model="entity.weekDay" - clearable - placeholder="鍏ㄩ儴" - size="small" - @change="refreshTable()" - > - <el-option - v-for="item in weekList" - :key="item.value" - :label="item.label" - :value="item.value" - > + <el-select v-model="entity.weekDay" clearable placeholder="鍏ㄩ儴" size="small" @change="refreshTable()"> + <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </div> <div class="search_thing" style="width: 390px"> <div class="search_label" style="width: 90px">鏃堕棿鑼冨洿锛�</div> <div class="search_input"> - <el-date-picker - v-model="entity.dateTime" - clearable - end-placeholder="缁撴潫鏃ユ湡" - format="yyyy-MM-dd" - range-separator="鑷�" - size="small" - start-placeholder="寮�濮嬫棩鏈�" - style="width: 100%" - type="daterange" - value-format="yyyy-MM-dd" - @change="refreshTable()" - > + <el-date-picker v-model="entity.dateTime" clearable end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" + range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" style="width: 100%" type="daterange" + value-format="yyyy-MM-dd" @change="refreshTable()"> </el-date-picker> </div> </div> <!-- 浠ヤ笅杩欎袱涓负缁勯暱瑙掕壊鐗规湁鐨� --> <div class="search_thing" style="width: 200px"> <div class="search_label">鍚嶅瓧锛�</div> - <el-input - v-model="entity.name" - clearable - placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable()" - ></el-input> + <el-input v-model="entity.name" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> </div> - <div - v-if="currentTable == 'ValueTable1'" - class="search_thing" - style="width: 250px" - > + <div v-if="currentTable == 'ValueTable1'" class="search_thing" style="width: 250px"> <div class="search_label" style="width: 120px">鏍峰搧缂栧彿锛�</div> - <el-input - v-model="entity.sample" - clearable - placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable()" - ></el-input> + <el-input v-model="entity.sample" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> </div> - <div - v-if="currentTable == 'ValueTable0'" - class="search_thing" - style="width: 200px" - > + <div v-if="currentTable == 'ValueTable0'" class="search_thing" style="width: 200px"> <div class="search_label">鐘舵�侊細</div> - <el-select - v-model="entity.state" - placeholder="鍏ㄩ儴" - size="small" - @change="refreshTable()" - clearable - > - <el-option - v-for="item in stateList" - :key="item.value" - :label="item.label" - :value="item.value" - > + <el-select v-model="entity.state" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()" clearable> + <el-option v-for="item in stateList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </div> <div class="search_thing" style="padding-left: 30px; width: 100px"> <el-button size="small" @click="refresh()">閲� 缃�</el-button> - <el-button size="small" type="primary" @click="refreshTable()" - >鏌� 璇�</el-button - > + <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> </div> </div> - <div - style="display: flex; align-items: center; justify-content: space-between" - > + <div style="display: flex; align-items: center; justify-content: space-between"> <el-radio-group :key="'111'" v-model="currentTable" size="small"> <el-radio-button label="ValueTable0"> 杈呭姪宸ユ椂 </el-radio-button> <el-radio-button label="ValueTable1"> 浜ч噺宸ユ椂 </el-radio-button> </el-radio-group> <div style="display: flex; align-items: center"> <p style="font-size: 14px; margin-right: 30px"> - 鎬诲伐鏃舵眹鎬伙細<span - v-if="totalInfo" - style="font-size: 16px; color: #3a7bfa" - >{{ - totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"] - ? Number( - totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"] - ).tofixed(4) - : 0 - }}</span - > 浜ч噺宸ユ椂姹囨�伙細<span - v-if="totalInfo" - style="font-size: 16px; color: #3a7bfa" - >{{ + 鎬诲伐鏃舵眹鎬伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{ + totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"] + ? Number( + totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"] + ).tofixed(4) + : 0 + }}</span> 浜ч噺宸ユ椂姹囨�伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{ totalInfo["浜ч噺宸ユ椂姹囨��"] ? Number(totalInfo["浜ч噺宸ユ椂姹囨��"]).tofixed(4) : 0 - }}</span - > 杈呭姪宸ユ椂姹囨�伙細<span - v-if="totalInfo" - style="font-size: 16px; color: #3a7bfa" - >{{ + }}</span> 杈呭姪宸ユ椂姹囨�伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{ totalInfo["杈呭姪宸ユ椂姹囨��"] ? Number(totalInfo["杈呭姪宸ユ椂姹囨��"]).tofixed(4) : 0 - }}</span - > + }}</span> </p> - <el-button - v-show=" - currentTable == 'ValueTable0' && - checkPermi(['performance:manHour:workTimeManagement:add']) - " - size="small" - type="primary" - @click="openAdd" - >褰曞叆鏁版嵁</el-button - > - <el-button - v-if="down && currentTable === 'ValueTable0'" - :loading="outLoading" - size="small" - type="primary" - @click="handleOut" - >瀵� 鍑�</el-button - > - <el-button - v-if="down && currentTable === 'ValueTable1'" - :loading="outLoading" - size="small" - type="primary" - @click="handleOut1" - >瀵� 鍑�</el-button - > - <el-button - v-show=" - currentTable == 'ValueTable0' && - checkPermi(['performance:manHour:workTimeManagement:add']) - " - size="small" - type="primary" - @click="openBatchCheck(1)" - >鎵归噺鎵瑰噯</el-button - > + <el-button v-show="currentTable == 'ValueTable0' && + checkPermi(['performance:manHour:workTimeManagement:add']) + " size="small" type="primary" @click="openAdd">褰曞叆鏁版嵁</el-button> + <el-button v-if="down && currentTable === 'ValueTable0'" :loading="outLoading" size="small" type="primary" + @click="handleOut">瀵� 鍑�</el-button> + <el-button v-if="down && currentTable === 'ValueTable1'" :loading="outLoading" size="small" type="primary" + @click="handleOut1">瀵� 鍑�</el-button> + <el-button v-show="currentTable == 'ValueTable0' && + checkPermi(['performance:manHour:workTimeManagement:add']) + " size="small" type="primary" @click="openBatchCheck(1)">鎵归噺鎵瑰噯</el-button> </div> </div> <div class="table"> - <lims-table - :tableData="tableData" - :column="column" - :page="page" - :tableLoading="tableLoading" - :height="'calc(100vh - 350px)'" - :isSelection="true" - v-if="currentTable == 'ValueTable0'" - @pagination="pagination" - :handleSelectionChange="handleSelectionChange" - ></lims-table> - <lims-table - :tableData="tableData0" - :column="column0" - :page="page0" - :tableLoading="tableLoading" - :height="'calc(100vh - 350px)'" - v-if="currentTable == 'ValueTable1'" - @pagination="pagination0" - ></lims-table> + <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" + :height="'calc(100vh - 350px)'" :isSelection="true" v-if="currentTable == 'ValueTable0'" + @pagination="pagination" :handleSelectionChange="handleSelectionChange"></lims-table> + <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading" + :height="'calc(100vh - 350px)'" v-if="currentTable == 'ValueTable1'" @pagination="pagination0"></lims-table> </div> - <el-dialog - :before-close="handleClose" - :title="formData.id ? '缂栬緫' : '褰曞叆鏁版嵁'" - :visible.sync="addVisible" - width="600px" - > + <el-dialog :before-close="handleClose" :title="formData.id ? '缂栬緫' : '褰曞叆鏁版嵁'" :visible.sync="addVisible" + width="600px"> <el-row style="display: flex; justify-content: space-around"> <el-col :span="12"> <el-form :model="formData" label-width="90px"> <el-form-item label="褰曞叆鏃堕棿:"> <el-radio-group v-model="formData.dateTime" size="small"> - <el-radio :label="getYearAndMonthAndDays() + ' 00:00:00'" - >浠婂ぉ</el-radio - > - <el-radio - :label=" - getYearAndMonthAndDays( - new Date(new Date().getTime() - 24 * 60 * 60 * 1000) - ) + ' 00:00:00' - " - >鏄ㄥぉ</el-radio - > + <el-radio :label="getYearAndMonthAndDays() + ' 00:00:00'">浠婂ぉ</el-radio> + <el-radio :label="getYearAndMonthAndDays( + new Date(new Date().getTime() - 24 * 60 * 60 * 1000) + ) + ' 00:00:00' + ">鏄ㄥぉ</el-radio> </el-radio-group> </el-form-item> <el-form-item label="骞翠唤:"> - <el-input - v-model="formData.year" - disabled - size="small" - ></el-input> + <el-input v-model="formData.year" disabled size="small"></el-input> </el-form-item> <el-form-item label="鍛ㄦ:"> - <el-input - v-model="formData.week" - disabled - size="small" - ></el-input> + <el-input v-model="formData.week" disabled size="small"></el-input> </el-form-item> <el-form-item label="鏄熸湡:"> <!-- <el-input v-model="formData.weekDay" size="small" disabled></el-input> --> - <el-select - v-model="formData.weekDay" - disabled - placeholder="璇烽�夋嫨" - size="small" - > - <el-option - v-for="item in weekList" - :key="item.value" - :label="item.label" - :value="item.value" - > + <el-select v-model="formData.weekDay" disabled placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-form-item> <el-form-item label="鐝:"> - <el-input - v-model="formData.shift" - disabled - size="small" - ></el-input> + <el-input v-model="formData.shift" disabled size="small"></el-input> </el-form-item> </el-form> </el-col> <el-col :span="12"> <el-form :model="formData" label-width="90px"> <el-form-item label="缂栧彿:" required> - <el-input - v-model="formData.number" - size="small" - @blur="getInfoByCode" - ></el-input> + <el-input v-model="formData.number" size="small" @blur="getInfoByCode"></el-input> </el-form-item> <el-form-item label="鏁伴噺:" required> <el-input v-model="formData.amount" size="small"></el-input> </el-form-item> <el-form-item label="鏍稿噯宸ユ椂:"> - <el-input - v-model="formData.approvedWorkingHour" - disabled - size="small" - ></el-input> + <el-input v-model="formData.approvedWorkingHour" disabled size="small"></el-input> </el-form-item> <el-form-item label="杈呭姪宸ユ椂:"> - <el-input - v-model="formData.nonproductiveTime" - disabled - size="small" - ></el-input> + <el-input v-model="formData.nonproductiveTime" disabled size="small"></el-input> </el-form-item> <el-form-item label="杈呭姪椤圭洰:"> - <el-input - v-model="formData.auxiliaryProject" - disabled - size="small" - ></el-input> + <el-input v-model="formData.auxiliaryProject" disabled size="small"></el-input> </el-form-item> </el-form> </el-col> </el-row> <el-form :model="formData" label-width="90px"> <el-form-item label="杈呭姪璇存槑:"> - <el-input - v-model="formData.remarks" - :rows="3" - size="small" - type="textarea" - ></el-input> + <el-input v-model="formData.remarks" :rows="3" size="small" type="textarea"></el-input> </el-form-item> </el-form> <span slot="footer" class="dialog-footer"> <el-row> <el-button @click="handleClose">鍙� 娑�</el-button> - <el-button :loading="addLoad" type="primary" @click="submitAdd" - >纭� 瀹�</el-button - > + <el-button :loading="addLoad" type="primary" @click="submitAdd">纭� 瀹�</el-button> </el-row> </span> </el-dialog> @@ -315,134 +153,63 @@ <el-col :span="12"> <el-form :model="formData0" label-width="90px"> <el-form-item label="骞翠唤:"> - <el-input - v-model="formData0.year" - :disabled="title == '鎵瑰噯'" - size="small" - ></el-input> + <el-input v-model="formData0.year" :disabled="title == '鎵瑰噯'" size="small"></el-input> </el-form-item> <el-form-item label="鍛ㄦ:"> - <el-input - v-model="formData0.week" - :disabled="title == '鎵瑰噯'" - size="small" - ></el-input> + <el-input v-model="formData0.week" :disabled="title == '鎵瑰噯'" size="small"></el-input> </el-form-item> <el-form-item label="鏄熸湡:"> - <el-select - v-model="formData0.weekDay" - :disabled="title == '鎵瑰噯'" - placeholder="璇烽�夋嫨" - size="small" - > - <el-option - v-for="item in weekList" - :key="item.value" - :label="item.label" - :value="item.value" - > + <el-select v-model="formData0.weekDay" :disabled="title == '鎵瑰噯'" placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-form-item> <el-form-item label="濮撳悕:"> - <el-input - v-model="formData0.name" - disabled - size="small" - ></el-input> + <el-input v-model="formData0.name" disabled size="small"></el-input> </el-form-item> <el-form-item label="鐝:"> - <el-select - v-model="formData0.shift" - :disabled="title == '鎵瑰噯'" - placeholder="璇烽�夋嫨" - size="small" - > - <el-option - v-for="item in classType" - :key="item.value" - :label="item.label" - :value="item.value" - > + <el-select v-model="formData0.shift" :disabled="title == '鎵瑰噯'" placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in classType" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-form-item> <el-form-item label="澶嶆牳璇存槑:"> - <el-input - v-model="formData0.reviewerRemark" - :rows="3" - size="small" - type="textarea" - ></el-input> + <el-input v-model="formData0.reviewerRemark" :rows="3" size="small" type="textarea"></el-input> </el-form-item> </el-form> </el-col> <el-col :span="12"> <el-form :model="formData0" label-width="90px"> <el-form-item label="缂栧彿:" required> - <el-input - v-model="formData0.number" - :disabled="title == '鎵瑰噯'" - size="small" - ></el-input> + <el-input v-model="formData0.number" :disabled="title == '鎵瑰噯'" size="small"></el-input> </el-form-item> <el-form-item label="鏁伴噺:" required> - <el-input - v-model="formData0.amount" - :disabled="title == '鎵瑰噯'" - size="small" - ></el-input> + <el-input v-model="formData0.amount" :disabled="title == '鎵瑰噯'" size="small"></el-input> </el-form-item> <el-form-item label="澶嶆牳鏁伴噺:" required> - <el-input - v-model="formData0.reviewerNumber" - size="small" - ></el-input> + <el-input v-model="formData0.reviewerNumber" size="small"></el-input> </el-form-item> <el-form-item label="鏍稿噯宸ユ椂:"> - <el-input - v-model="formData0.approvedWorkingHour" - disabled - size="small" - ></el-input> + <el-input v-model="formData0.approvedWorkingHour" disabled size="small"></el-input> </el-form-item> <el-form-item label="澶嶆牳宸ユ椂:"> - <el-input - v-model="formData0.reviewerNonproductiveTime" - disabled - size="small" - ></el-input> + <el-input v-model="formData0.reviewerNonproductiveTime" disabled size="small"></el-input> </el-form-item> <el-form-item label="杈呭姪椤圭洰:"> - <el-input - v-model="formData0.auxiliaryProject" - disabled - size="small" - ></el-input> + <el-input v-model="formData0.auxiliaryProject" disabled size="small"></el-input> </el-form-item> </el-form> </el-col> </el-row> <span slot="footer" class="dialog-footer"> <el-row> - <el-button :loading="checkLoadN" @click="submitCheck(0)" - >涓嶆壒鍑�</el-button - > - <el-button - :loading="checkLoadY" - type="primary" - @click="submitCheck(1)" - >鎵� 鍑�</el-button - > + <el-button :loading="checkLoadN" @click="submitCheck(0)">涓嶆壒鍑�</el-button> + <el-button :loading="checkLoadY" type="primary" @click="submitCheck(1)">鎵� 鍑�</el-button> </el-row> </span> </el-dialog> - <el-dialog - :before-close="closeBatchCheckDialog" - :title="batchCheckTitle" - :visible.sync="batchCheckDialog" - width="30%" - > + <el-dialog :before-close="closeBatchCheckDialog" :title="batchCheckTitle" :visible.sync="batchCheckDialog" + width="30%"> <span>{{ batchCheckDialogMessage }}</span> <span slot="footer" class="dialog-footer"> <el-button @click="batchCheck(0)">涓嶆壒鍑�</el-button> @@ -875,7 +642,7 @@ this.refreshTable("page"); }); }) - .catch(() => {}); + .catch(() => { }); }, handleClose() { this.addVisible = false; @@ -1096,7 +863,6 @@ exportAssistantHours({ entity: entity }) .then((res) => { this.outLoading = false; - this.$message.success("瀵煎嚭鎴愬姛"); const blob = new Blob([res]); this.$download.saveAs(blob, "杈呭姪宸ユ椂淇℃伅瀵煎嚭.xlsx"); }) @@ -1115,7 +881,6 @@ exportOutputHours({ entity: entity }) .then((res) => { this.outLoading = false; - this.$message.success("瀵煎嚭鎴愬姛"); const blob = new Blob([res]); this.$download.saveAs(blob, "浜ч噺宸ユ椂淇℃伅瀵煎嚭.xlsx"); }) @@ -1139,6 +904,7 @@ padding-top: 0; /* scrollbar-width: none; */ } + /* .work-time-management::-webkit-scrollbar { display: none; } */ diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue index 180ad2c..713c062 100644 --- a/src/views/standard/standardLibrary/index.vue +++ b/src/views/standard/standardLibrary/index.vue @@ -206,7 +206,8 @@ height: calc(100% - 30px); overflow-y: scroll; scrollbar-width: none; - " @node-click="handleNodeClick" @node-expand="nodeOpen" @node-collapse="nodeClose" @node-drop="handleDrop"> + " @node-click="handleNodeClick" + @node-drop="handleDrop"> <div slot-scope="{ node, data }" class="custom-tree-node"> <el-row style="width: 100%"> <el-col :class="{ sort: node.level > 3 }" :span="19" :title="data.label" style="text-align: left"> @@ -682,10 +683,42 @@ } } }, - filterNode(value, data) { - if (!value) return true; - return data.label.indexOf(value) !== -1; + // 璋冪敤tree杩囨护鏂规硶 涓枃鑻辫繃婊� + filterNode (value, data, node) { + if (!value) {銆�銆�銆�銆�//濡傛灉鏁版嵁涓虹┖锛屽垯杩斿洖true,鏄剧ず鎵�鏈夌殑鏁版嵁椤� + return true + } + // 鏌ヨ鍒楄〃鏄惁鏈夊尮閰嶆暟鎹紝灏嗗�煎皬鍐欙紝鍖归厤鑻辨枃鏁版嵁 + let val = value.toLowerCase() + return this.chooseNode(val, data, node) // 璋冪敤杩囨护浜屽眰鏂规硶 }, + // 杩囨护鐖惰妭鐐� / 瀛愯妭鐐� (濡傛灉杈撳叆鐨勫弬鏁版槸鐖惰妭鐐逛笖鑳藉尮閰嶏紝鍒欒繑鍥炶鑺傜偣浠ュ強鍏朵笅鐨勬墍鏈夊瓙鑺傜偣锛涘鏋滃弬鏁版槸瀛愯妭鐐癸紝鍒欒繑鍥炶鑺傜偣鐨勭埗鑺傜偣銆俷ame鏄腑鏂囧瓧绗︼紝enName鏄嫳鏂囧瓧绗�. + chooseNode (value, data, node) { + if (data.label.indexOf(value) !== -1) { + return true + } + const level = node.level + // 濡傛灉浼犲叆鐨勮妭鐐规湰韬氨鏄竴绾ц妭鐐瑰氨涓嶇敤鏍¢獙浜� + if (level === 1) { + return false + } + // 鍏堝彇褰撳墠鑺傜偣鐨勭埗鑺傜偣 + let parentData = node.parent + // 閬嶅巻褰撳墠鑺傜偣鐨勭埗鑺傜偣 + let index = 0 + while (index < level - 1) { + // 濡傛灉鍖归厤鍒扮洿鎺ヨ繑鍥烇紝姝ゅname鍊兼槸涓枃瀛楃锛宔nName鏄嫳鏂囧瓧绗︺�傚垽鏂尮閰嶄腑鑻辨枃杩囨护 + if (parentData.data.label.indexOf(value) !== -1) { + return true + } + // 鍚﹀垯鐨勮瘽鍐嶅線涓婁竴灞傚仛鍖归厤 + parentData = parentData.parent + index++ + } + // 娌″尮閰嶅埌杩斿洖false + return false + }, + searchFilter() { this.$refs.tree.filter(this.search); }, @@ -764,15 +797,6 @@ item.children && this.deleteStandard(item.children, label); } }); - }, - nodeOpen(data, node, el) { - $($(el.$el).find(".node_i")[0]).attr( - "class", - "node_i el-icon-folder-opened" - ); - }, - nodeClose(data, node, el) { - $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); }, selectEnumByCategoryForFactory() { this.getConfigKey("sys_factory").then((response) => { diff --git a/src/views/statisticalCharts/itemInspectionAnalysis/index.vue b/src/views/statisticalCharts/itemInspectionAnalysis/index.vue new file mode 100644 index 0000000..29616cd --- /dev/null +++ b/src/views/statisticalCharts/itemInspectionAnalysis/index.vue @@ -0,0 +1,535 @@ +<template> + <div class="app-container"> + <div v-if="!isShowDataCom"> + <el-form ref="entity" size="small" :inline="true"> + <el-form-item style="width: 16%;"> + <el-date-picker + v-model="datePicker" + end-placeholder="缁撴潫鏃ユ湡" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + range-separator="鑷�" + size="small" + start-placeholder="寮�濮嬫棩鏈�" + style="width: 100%;" + type="daterange" + value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName"> + <el-input v-model="sampleName" clearable placeholder="璇疯緭鍏ユ牱鍝佸悕绉�" size="small"></el-input> + </el-form-item> + <el-form-item label="鍨嬪彿" prop="modelName"> + <el-input v-model="modelName" clearable placeholder="璇疯緭鍏ュ瀷鍙�" size="small"></el-input> + </el-form-item> + <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName"> + <el-input v-model="supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small"></el-input> + </el-form-item> + <el-form-item label="妫�楠岄」鍚嶇О" prop="supplierName"> + <el-select v-model="itemNames" :loading="selectLoading" clearable multiple placeholder="璇烽�夋嫨" + size="small" style="width: 90%;" @focus="getItemList"> + <el-option + v-for="item in itemNamesList" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-button size="small" type="primary" @click="changeData">鏌ヨ</el-button> + </el-form-item> + </el-form> + </div> + <div v-if="!isShowDataCom" style="overflow-y: auto;height: calc(100% - 70px);overflow-x: hidden"> + <el-row> + <el-col :span="24"> + <div class="inspection-card"> + <div style="display: flex;align-items: center;margin-bottom: 10px;justify-content: space-between;"> + <div>鍘熸潗鏂欓」妫�鍒嗘瀽鍒楄〃</div> + <el-button size="small" type="primary" @click="openShowData">鏌ョ湅鏁版嵁鍒嗘瀽</el-button> + </div> + <lims-table :tableData="editTableData" :column="editColumn" + height="400" key="tableData" :isSelection="true" + :handleSelectionChange="handleSelectionChange" + :tableLoading="editLoading"></lims-table> + </div> + </el-col> + </el-row> + <el-row> + <el-col :span="6" style="padding-top: 14px"> + <div style="display: flex;margin-left: 10px;align-items: center"> + <span style="width: 100px">鍒嗙粍绫诲瀷锛�</span> + <el-select v-model="groupType" clearable placeholder="璇烽�夋嫨" + size="small" + style="width: 90%;" @change="getBarInfo"> + <el-option + v-for="item in groupTypeList" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </div> + </el-col> + </el-row> + <el-row> + <el-col :span="24"> + <div class="inspection-card"> + <div class="title">妫�楠岄」鏁版嵁瀵规瘮</div> + <Echarts ref="chart" + :chartStyle="chartStyle" + :dataset="dataset" + :grid="grid" + :options="echartsOptions" + :series="echartsSeries" + :tooltip="tooltip" + :xAxis="xAxis" + :yAxis="yAxis" + style="height: 40vh;"></Echarts> + </div> + </el-col> + </el-row> + <el-row> + <el-col :span="24"> + <div class="inspection-card"> + <div class="title">鍘熸潗鏂欓」妫�鍚堟牸鐜�</div> + <Echarts ref="chart" + :chartStyle="chartStyle" + :dataset="dataset1" + :grid="grid" + :options="echartsOptions1" + :series="echartsSeries1" + :tooltip="tooltip" + :xAxis="xAxis" + :yAxis="yAxis1" + style="height: 40vh;"></Echarts> + </div> + </el-col> + </el-row> + </div> + <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%"> + <div v-if="dataDialogVisible" style="height: 70vh;overflow-y: auto;"> + <lims-table :tableData="tableData" :column="column" + @pagination="pagination" key="tableData" + :page="page" :tableLoading="tableLoading"></lims-table> + </div> + </el-dialog> + <DataComparison v-if="isShowDataCom" :comparisonData="comparisonData" + :selectRow="selectRow" @goBack="goBack"></DataComparison> + </div> +</template> + +<script> +import Echarts from "@/components/echarts/echarts.vue"; +import DataComparison from '@/components/echarts/DataComparison.vue' +import limsTable from "@/components/Table/lims-table.vue"; +import { + getRawItemNames, + getRawProductAnalysis, + getRawProductAnalysisAllList, + getRawProductAnalysisRawPass, getRawSupplierCompare +} from "@/api/statisticalCharts/dataAnalysis"; +import {selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder"; + +export default { + name: "ItemInspectionAnalysis", + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {limsTable, Echarts, DataComparison}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + selectChangeRows: [], // 閫変腑鐨勬暟鎹� + groupTypeList: [ + {label: '鏍峰搧', value: '0'}, + {label: '鍚屼竴鍘傚, 鍚屼竴鍨嬪彿, 涓嶅悓鎵规', value: '1'}, + {label: '鍚屼竴鍨嬪彿, 涓嶅悓鍘傚', value: '2'}, + ], + itemNames: [], // 妫�楠岄」鍚嶇О + itemNamesList: [], + selectLoading: false, + datePicker: [], // 鏃堕棿 + groupType: '', // 鍒嗙粍 + beginDate: '', + endDate: '', + sampleName: '', // 鏍峰搧鍚嶇О + modelName: '', // 鍨嬪彿 + supplierName: '', // 渚涘簲鍟嗗悕绉� + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + echartsOptions: {}, + echartsOptions1: {}, + dataset: { + dimensions: [], + source: [], + }, + dataset1: { + dimensions: [], + source: [], + }, + xAxis: [{ type: 'category' }], + yAxis: [{}], + yAxis1: [{ + axisLabel: { + formatter: '{value} %' + } + }], + echartsSeries: [], + echartsSeries1: [], + tooltip: {}, + chartStyle: { + width: '100%', + height: '96%' // 璁剧疆鍥捐〃瀹瑰櫒鐨勯珮搴� + }, + editColumn: [ + { + label: '鎵瑰彿', + minWidth: '120px', + prop: 'updateBatchNo' + }, { + label: '濮旀墭缂栧彿', + minWidth: '120px', + prop: 'entrustCode' + }, { + label: '闆朵欢鍙�', + minWidth: '120px', + prop: 'partNo' + }, { + label: '闆朵欢鎻忚堪', + minWidth: '120px', + prop: 'partDesc' + }, { + label: '渚涘簲鍟嗗悕绉�', + minWidth: '120px', + prop: 'supplierName', + }, { + dataType: 'tag', + label: '妫�楠岀姸鎬�', + prop: 'inspectStatus', + minWidth: '120px', + formatData: (params) => { + if (params == 0) { + return '妫�楠屼腑' + } else if (params == 1) { + return '鍚堟牸' + } else if (params == 2) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '鏈笅鍗�' + } else if (params == 4) { + return '璁╂鏀捐' + } + }, + formatType: (params) => { + if (params == 1 || params == 4) { + return 'success' + } else if (params == 3) { + return 'warning' + } else if (params == 0 || params == 2) { + return 'danger' + } + } + }, { + label: '鏍峰搧鍚嶇О', + minWidth: '300px', + prop: 'sampleName' + }, { + label: '鏍峰搧鍨嬪彿', + minWidth: '300px', + prop: 'sampleModel' + },{ + label: '涓嬪彂鏃堕棿', + minWidth: '120px', + prop: 'sendTime' + },{ + label: '鎶佃揪鐨勯噰璐暟閲�', + minWidth: '130px', + prop: 'qtyArrived' + },{ + label: '鍗曚綅', + minWidth: '120px', + prop: 'buyUnitMeas' + }, + { + dataType: 'action', + width: '80px', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '鏁版嵁鏌ョ湅', + type: 'text', + clickFun: (row) => { + this.handleDataLook(row); + }, + }, + ] + } + ], + editTableData: [], + editLoading: false, + dataDialogVisible: false, + tableData: [], + tableLoading: false, + column: [ + {label: '鏍峰搧缂栧彿', prop: 'sampleCode'}, + {label: '鏍峰搧鍚嶇О', prop: 'sample'}, + {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'}, + {label: '妫�楠岄」', prop: 'inspectionItem'}, + {label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass'}, + {label: '鍗曚綅', prop: 'unit'}, + {label: '鏍峰搧鍨嬪彿', prop: 'model'}, + {label: '鏉′欢', prop: 'radius'}, + {label: '鐢电紗鏍囪瘑', prop: 'cableTag'}, + {label: '璇曢獙瑕佹眰', prop: 'tell'}, + {label: '妫�楠岀粨鏋�', prop: 'lastValue'}, + { + dataType: 'tag', + label: '缁撴灉鍒ゅ畾', + prop: 'insResult', + formatData: (params) => { + if (params == 1) { + return '鍚堟牸' + } else if (params == 0) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '涓嶅垽瀹�' + } else { + return null + } + }, + formatType: (params) => { + if (params == 1) { + return 'success' + } else if (params == 0) { + return 'danger' + } else if (params == 3) { + return '' + } else { + return null + } + } + } + ], + page: { + total:0, + size:10, + current:1 + }, + currentRow: {}, + isShowDataCom: false, + comparisonData: {}, + selectRow: {}, + } + }, + mounted() { + // this.getBar() + }, + // 鏂规硶闆嗗悎 + methods: { + getBarInfo (val) { + if (val === '1') { + if (!this.modelName || !this.supplierName) { + this.$message.warning('鍨嬪彿鎴栦緵搴斿晢涓嶈兘涓虹┖') + this.groupType = '' + return + } + } else if (val === '2') { + if (!this.modelName) { + this.$message.warning('鍨嬪彿涓嶈兘涓虹┖') + this.groupType = '' + return + } + if (this.supplierName) { + this.$message.warning('涓嶅彲閫変緵搴斿晢鍚嶇О') + this.groupType = '' + return + } + } + this.getBar() + this.getBar1() + }, + // 鑾峰彇鍚堟牸鐜囧浘琛ㄦ暟鎹� + getBar() { + this.echartsSeries = [] + const params = { + beginDate: this.beginDate, + endDate: this.endDate, + sampleName: this.sampleName, + modelName: this.modelName, + supplierName: this.supplierName, + itemNames: this.itemNames, + groupType: this.groupType, + } + getRawProductAnalysis(params).then((res) => { + if (res.data === null) { + this.$message.warning('鏆傛棤鏁版嵁') + return + } + for (let i = 0; i < res.data.itemNames.length; i++) { + this.echartsSeries.push({type: 'line', label: { + show: true, + position: 'top' + },}) + } + this.dataset.dimensions = this.HaveJson(res.data.itemNames) + this.dataset.dimensions.unshift('product') + this.dataset.source = this.HaveJson(res.data.productList) + + }) + }, + getBar1() { + this.echartsSeries1 = [] + const params = { + beginDate: this.beginDate, + endDate: this.endDate, + sampleName: this.sampleName, + modelName: this.modelName, + supplierName: this.supplierName, + itemNames: this.itemNames, + groupType: this.groupType, + } + getRawProductAnalysisRawPass(params).then((res) => { + if (res.data === null) { + this.$message.warning('鏆傛棤鏁版嵁') + return + } + for (let i = 0; i < res.data.itemNames.length; i++) { + this.echartsSeries1.push({type: 'line',tooltip: { + valueFormatter: function (value) { + return value + '%'; + } + },label: { + show: true, + position: 'top', + formatter: (params) => params.value[params.dimensionNames[params.encode.y[0]]] + '%' + },}) + } + this.dataset1.dimensions = this.HaveJson(res.data.itemNames) + this.dataset1.dimensions.unshift('product') + this.dataset1.source = this.HaveJson(res.data.productList) + + }) + }, + // 鏁版嵁鏌ョ湅 + handleDataLook(row) { + this.dataDialogVisible = true; + this.currentRow = row + this.refreshTable(row) + }, + // 鏌ヨ鍥炶皟 + refreshTable(row) { + selectSampleAndProductByOrderId({id: row.id}).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) { + this.page.size = page.limit + this.refreshTable(this.currentRow) + }, + changeData () { + if (this.datePicker !== null && this.datePicker.length > 0) { + this.beginDate = this.datePicker[0] + ' 00:00:00' + this.endDate = this.datePicker[1] + ' 23:59:59' + } else { + this.beginDate = '' + this.endDate = '' + } + this.getBar() + this.getBar1() + this.getTableData() + }, + getTableData () { + this.editLoading = true + const params = { + beginDate: this.beginDate, + endDate: this.endDate, + sampleName: this.sampleName, + modelName: this.modelName, + supplierName: this.supplierName, + itemNames: this.itemNames, + } + getRawProductAnalysisAllList(params).then(res => { + this.editLoading = false + this.editTableData = res.data + }).catch(() => { + this.editLoading = false + }) + }, + // 鑾峰彇妫�楠岄」涓嬫媺妗� + getItemList () { + this.selectLoading = true + this.itemNamesList = [] + const params = { + beginDate: this.beginDate, + endDate: this.endDate, + sampleName: this.sampleName, + modelName: this.modelName, + supplierName: this.supplierName, + } + getRawItemNames(params).then((res) => { + this.selectLoading = false + res.data.map(val => { + const obj = Object.assign({ + label: val, + value: val, + }) + this.itemNamesList.push(obj) + }) + }).catch(() => { + this.selectLoading = false + }) + }, + goBack () { + this.isShowDataCom = false + }, + openShowData () { + if (this.selectChangeRows.length !== 5) { + this.$message.warning('璇烽�夋嫨5鏉℃暟鎹�') + return + } + if (this.itemNames.length !== 1) { + this.$message.warning('鍙兘閫夋嫨1椤规楠岄」鍚嶇О') + return + } + let ids = [] + let itemNames = [] + this.selectChangeRows.forEach(item => { + ids.push(item.enterOrderId) + }) + this.itemNames.forEach(item => { + itemNames.push(item) + }) + const params = { + orderIds: ids, + itemNames: itemNames + } + getRawSupplierCompare(params).then(res => { + this.comparisonData = res.data + this.selectRow = params + this.isShowDataCom = true + }) + }, + handleSelectionChange (val) { + this.selectChangeRows = val + }, + }, +} +</script> + +<style scoped> +.inspection-card{ + width: 100%; + margin-top: 10px; +} +</style> diff --git a/src/views/statisticalCharts/qualificationRateStatistics/index.vue b/src/views/statisticalCharts/qualificationRateStatistics/index.vue new file mode 100644 index 0000000..4e8ae3c --- /dev/null +++ b/src/views/statisticalCharts/qualificationRateStatistics/index.vue @@ -0,0 +1,448 @@ +<template> + <div class="app-container"> + <el-row> + <el-col :span="4"> + <el-radio-group v-model="dateType" @change="changeDate"> + <el-radio-button label="1">鏈懆</el-radio-button> + <el-radio-button label="2">鏈湀</el-radio-button> + <el-radio-button label="3">浠婂勾</el-radio-button> + </el-radio-group> + </el-col> + <el-col :span="20"> + <el-form ref="entity" size="small" :inline="true"> + <el-form-item style="width: 20%;"> + <el-date-picker + v-model="datePicker" + end-placeholder="缁撴潫鏃ユ湡" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + range-separator="鑷�" + size="small" + start-placeholder="寮�濮嬫棩鏈�" + type="daterange" + style="width: 100%;" + value-format="yyyy-MM-dd" + @change="changeDatePicker"> + </el-date-picker> + </el-form-item> + <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName"> + <el-input v-model="sampleName" clearable placeholder="璇疯緭鍏ユ牱鍝佸悕绉�" size="small" @change="changeDate"></el-input> + </el-form-item> + <el-form-item label="鍨嬪彿" prop="modelName"> + <el-input v-model="modelName" clearable placeholder="璇疯緭鍏ュ瀷鍙�" size="small" @change="changeDate"></el-input> + </el-form-item> + <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName"> + <el-input v-model="supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small" @change="changeDate"></el-input> + </el-form-item> + </el-form> + </el-col> + </el-row> + <el-row :gutter="20"> + <el-col :span="8"> + <div class="pie-card"> + <div class="title">鍘熸潗鏂欏悎鏍肩巼</div> + <span class="data">{{passRate}}</span> + <Echarts ref="chart" + :legend="pieLegend" + :series="materialPieSeries" + :tooltip="pieTooltip" + style="height: 36vh;"></Echarts> + </div> + </el-col> + <el-col :span="8"> + <div class="pie-card"> + <div class="title"><span style="color: #F56C6C">鏈湀</span>妫�楠岀被鍨嬫暟閲�</div> + <Echarts ref="chart" + :chartStyle="chartStyle2" + :legend="pieLegend" + :series="materialPieSeries1" + :tooltip="pieTooltip" + style="height: 36vh;"></Echarts> + </div> + </el-col> + <el-col :span="8"> + <div class="pie-card"> + <div class="title">鍘熸潗鏂�<span style="color: #F56C6C">鏈湀</span>涓�<span style="color: #F56C6C">涓婃湀</span>鍚堟牸鐜囧姣�</div> + <Echarts ref="chart" + :barColors="barColors2" + :chartStyle="chartStyle" + :grid="grid" + :legend="barLegend" + :series="barSeries" + :tooltip="tooltip" + :xAxis="xAxis1" + :yAxis="yAxis1" + style="height: 36vh;"></Echarts> + </div> + </el-col> + </el-row> + <el-row> + <el-col :span="24"> + <div class="inspection-card"> + <div class="title">鍚堟牸鐜�</div> + <Echarts ref="chart" + :barColors="barColors" + :grid="grid" + :legend="legend" + :lineColors="lineColors" + :options="echartsOptions" + :series="echartsSeries" + :tooltip="tooltip" + :xAxis="xAxis" + :yAxis="yAxis" + style="height: 40vh;"></Echarts> + </div> + </el-col> + </el-row> + </div> +</template> + +<script> +import Echarts from "@/components/echarts/echarts.vue"; +import { + getOrderTypeCookie, + getRawPassRateByBarChart, + getRawPassRateByCake, + getRawUpMonth +} from "@/api/statisticalCharts/dataAnalysis"; + +export default { + name: "QualificationRateStatistics", + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {Echarts}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + dateType: '1', + datePicker: [], + beginDate: '', + endDate: '', + sampleName: '', + modelName: '', + supplierName: '', + echartsOptions: { + title: { + text: '绀轰緥鍥捐〃', + left: 'center' + } + }, + xAxis: [ + { + type: 'category', + data: [], + axisPointer: { + type: 'shadow' + } + } + ], + yAxis: [ + { + type: 'value', + name: '鎬绘暟', + min: 0, + }, + { + type: 'value', + name: '鍚堟牸鐜�', + min: 0, + max: 100, + axisLabel: { + formatter: '{value} %' + } + } + ], + echartsSeries: [ + { + name: '鎬绘暟', + type: 'bar', + data: [], + label: { + show: true, + position: 'top' + }, + }, + { + name: '鍚堟牸鐜�', + type: 'line', + smooth: true, + tooltip: { + valueFormatter: function (value) { + return value + ' %'; + } + }, + label: { + show: true, + position: 'top', + formatter: function (value) { + return value.value + ' %'; + }, + distance: 14 + }, + yAxisIndex: 1, + data: [] + }, + ], + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + legend: { + data: ['鎬绘暟','鍚堟牸鐜�'] + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + lineColors: ['#409EFF'], + barColors: ['#E6A23C'], + barColors2: ['#adde8b'], + pieTooltip: { + trigger: 'item' + }, + pieLegend: { + orient: 'vertical', + right: 20, + top: 'middle', + }, + materialPieSeries: [ + { + name: 'Access From', + type: 'pie', + radius: ['40%', '70%'], + right: '22%', + avoidLabelOverlap: false, + itemStyle: { + borderRadius: 5, + borderColor: '#fff', + borderWidth: 2 + }, + label: { + alignTo: 'edge', + formatter: '{name|{b}}\n{time|{c}}', + edgeDistance: 10, + lineHeight: 15, + rich: { + time: { + fontSize: 10, + color: '#999' + } + }, + }, + labelLine: { + length: 20, + length2: 40, + }, + data: [ + { value: 0, name: '涓嶅悎鏍兼暟閲�' }, + { value: 0, name: '鍚堟牸鏁伴噺' }, + ] + } + ], + materialPieSeries1: [ + { + name: 'Access From', + type: 'pie', + radius: ['40%', '70%'], + right: '22%', + avoidLabelOverlap: false, + itemStyle: { + borderRadius: 5, + borderColor: '#fff', + borderWidth: 2 + }, + label: { + alignTo: 'edge', + formatter: '{name|{b}}\n{time|{c}}', + edgeDistance: 10, + lineHeight: 15, + rich: { + time: { + fontSize: 10, + color: '#999' + } + }, + }, + labelLine: { + length: 20, + length2: 50, + }, + data: [ + { value: 0, name: '濮旀墭妫�楠�' }, + { value: 0, name: '杩涘巶妫�楠�' }, + { value: 0, name: '瀛e害妫�楠�' }, + { value: 0, name: '鎶芥牱' }, + ] + } + ], + barLegend: {}, + chartStyle: { + width: '90%', + height: '100%', + }, + chartStyle2: { + width: '90%', + height: '80%', + }, + xAxis1: [ + { + type: 'value', + min: 0, + max: 100, + axisLabel: { + formatter: '{value} %' + } + } + ], + yAxis1: [ + { + type: 'category', + data: [] + } + ], + barSeries: [ + { + type: 'bar', + data: [], + tooltip: { + valueFormatter: function (value) { + return value + ' %'; + } + }, + label: { + show: true, + formatter: (params) => Math.round(params.value * 100) / 100 + '%' + } + }, + ], + tableData: [], + passRate: '', + sum: '', + } + }, + mounted() { + this.getBar() + this.getRawPass() + this.getOrderType() + this.getPassRateCom() + }, + // 鏂规硶闆嗗悎 + methods: { + // 鑾峰彇鍚堟牸鐜囧浘琛ㄦ暟鎹� + getBar() { + const params = { + dateType: this.dateType, + beginDate: this.beginDate, + endDate: this.endDate, + sampleName: this.sampleName, + modelName: this.modelName, + supplierName: this.supplierName, + } + getRawPassRateByBarChart(params).then((res) => { + let lineData = [] + let barData = [] + let xAxis = [] + res.data.forEach(item => { + barData.push(item.sum) + lineData.push(item.passRate) + xAxis.push(item.searchTime) + }) + this.echartsSeries[0].data = barData + this.echartsSeries[1].data = lineData + this.yAxis[0].max = Math.ceil(Math.max.apply(null, barData) / 50) * 50 + this.yAxis[0].interval = this.yAxis[0].max / 5 + this.xAxis[0].data = xAxis + }) + }, + // 鑾峰彇鍘熸潗鏂欏悎鏍肩巼鍥捐〃鏁版嵁 + getRawPass() { + const params = { + dateType: this.dateType, + beginDate: this.beginDate, + endDate: this.endDate, + sampleName: this.sampleName, + modelName: this.modelName, + supplierName: this.supplierName, + } + getRawPassRateByCake(params).then((res) => { + this.materialPieSeries[0].data[0].value = res.data.unQualified + this.materialPieSeries[0].data[1].value = res.data.qualified + this.passRate = res.data.passRate + '%' + }) + }, + // 鑾峰彇鏈湀妫�楠岀被鍨嬫暟閲� + getOrderType() { + getOrderTypeCookie().then((res) => { + if (res.code === 201) return + this.materialPieSeries1[0].data[0].value = res.data.customer // 濮旀墭 + this.materialPieSeries1[0].data[1].value = res.data.enter // 杩涘巶 + this.materialPieSeries1[0].data[2].value = res.data.quarterly // 瀛e害 + this.materialPieSeries1[0].data[3].value = res.data.spotCheck // 鎶芥牱 + }) + }, + // 鏈湀涓庝笂鏈堝悎鏍肩巼瀵规瘮 + getPassRateCom() { + getRawUpMonth().then((res) => { + let month = [] + let barData = [] + res.data.forEach(item => { + month.push(item.month) + barData.push(item.passRate) + }) + this.yAxis1[0].data = month + this.barSeries[0].data = barData + }) + }, + changeDate () { + this.getBar() + this.getRawPass() + // this.getOrderType() + // this.getPassRateCom() + }, + changeDatePicker (val) { + if (val) { + this.beginDate = val[0] + ' 00:00:00' + this.endDate = val[1] + ' 23:59:59' + } else { + this.beginDate = '' + this.endDate = '' + } + this.getBar() + this.getRawPass() + // this.getOrderType() + // this.getPassRateCom() + }, + }, +} +</script> + +<style scoped> +.title { + padding: 10px 0 0 20px; +} +.table { + padding: 0 10px 10px; +} +.pie-card { + width: 100%; + background: #FFFFFF; + margin-top: 10px; + position: relative; +} +.data { + position: absolute; + font-size: 20px; + transform: translate(-50%); + left: 40%; + top: 42%; + z-index: 1; +} +.inspection-card{ + width: 100%; + background: #FFFFFF; + margin-top: 10px; +} +</style> diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue index 1bb6202..713b339 100644 --- a/src/views/structural/capabilityAndLaboratory/capability/index.vue +++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue @@ -33,9 +33,9 @@ v-model="itemParameterForm.inspectionItemSubclass" @keyup.enter.native="refreshTable()"> </el-input> </el-form-item> - <el-form-item label="妫�楠屽璞�" prop="sample"> + <el-form-item label="妫�楠屽璞�" prop="specimenName"> <el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="itemParameterForm.sample" @keyup.enter.native="refreshTable()"> + v-model="itemParameterForm.specimenName" @keyup.enter.native="refreshTable()"> </el-input> </el-form-item> <el-form-item> @@ -123,6 +123,7 @@ import EditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue"; import testObjectEditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue"; import {getToken} from "@/utils/auth"; +import { obtainItemParameterList } from '@/api/structural/laboratoryScope' export default { components: {limsTable, EditForm, testObjectEditForm, BindPartDialog, BindSupplierDensityDialog}, @@ -187,17 +188,23 @@ prop: 'laboratoryId', minWidth: '130', formatData: (params) => { - if (params == 1) { - return '瑁呭鐢电紗璇曢獙瀹�' - } else if (params == 5) { - return '閫氫俊浜у搧瀹為獙瀹�' - } else if (params == 6) { - return '鐢靛姏浜у搧瀹為獙瀹�' - } else if (params == 8) { - return '鍌ㄨ兘浜у搧瀹為獙瀹�' - } else { - return '灏勯绾跨紗瀹為獙瀹�' + let index = this.laboratoryList.findIndex(item => item.value == params) + if(index > -1) { + return this.laboratoryList[index].label + }else { + return null } + // if (params == 1) { + // return '瑁呭鐢电紗璇曢獙瀹�' + // } else if (params == 5) { + // return '閫氫俊浜у搧瀹為獙瀹�' + // } else if (params == 6) { + // return '鐢靛姏浜у搧瀹為獙瀹�' + // } else if (params == 8) { + // return '鍌ㄨ兘浜у搧瀹為獙瀹�' + // } else { + // return '灏勯绾跨紗瀹為獙瀹�' + // } }, formatType: (params) => { if (params == 1) { @@ -209,7 +216,7 @@ } else if (params == 8) { return 'danger' } else { - return '' + return null } } }, @@ -289,7 +296,7 @@ itemParameterForm: { inspectionItem: null, inspectionItemSubclass: null, - sample: null + specimenName: null }, radio: 0, productLoad: false, @@ -361,10 +368,12 @@ currentSupplierDensityRow: {}, // 閫夋嫨闆朵欢缁戝畾鏈潯鏁版嵁鐨勪俊鎭� bindSupplierDensityDialog: false, bindPartDialog: false, - type: null, // 闆朵欢缁戝畾鐨勭被鍨�--0锛氭楠屽璞★紝1锛氫骇鍝佺淮鎶� + type: null, // 闆朵欢缁戝畾鐨勭被鍨�--0锛氭楠屽璞★紝1锛氫骇鍝佺淮鎶�, + laboratoryList:[] } }, created() { + this.getItemParameterList() this.refreshTable() }, computed: { @@ -385,8 +394,8 @@ this.$refs.upload.clearFiles() this.uploadDia = false this.uploading = false - if (response.code === 201) { - this.$message.error(response.message) + if (response.code !== 200) { + this.$message.error(response.msg) return } this.$message.success('涓婁紶鎴愬姛') @@ -636,6 +645,18 @@ closeBindSupplierDensityDialog () { this.bindSupplierDensityDialog = false }, + getItemParameterList(){ + obtainItemParameterList().then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.laboratoryName, + value: a.id + }) + }) + this.laboratoryList = data + }) + } } } </script> diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue index 0cb76e1..708d06f 100644 --- a/src/views/structural/premises/index.vue +++ b/src/views/structural/premises/index.vue @@ -22,9 +22,8 @@ </div> </div> <div class="table"> - <lims-table :tableData="tableData" :column="column" - :height="'calc(100vh - 250px)'" @pagination="pagination" - :page="page" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination" + :page="page" :tableLoading="tableLoading"></lims-table> </div> <!-- 鏂板瀹為獙瀹�--> <el-dialog :title="formTitle" :visible.sync="addDia" width="450px"> @@ -102,7 +101,7 @@ }, computed: { action() { - return this.javaApi + return this.javaApi + '/deviceScope/uploadFile' } }, data() { diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 2483a2b..fa71608 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -2,21 +2,12 @@ <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form-item label="閮ㄩ棬鍚嶇О" prop="deptName"> - <el-input - v-model="queryParams.deptName" - placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> + <el-input v-model="queryParams.deptName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="鐘舵��" prop="status"> <el-select v-model="queryParams.status" placeholder="閮ㄩ棬鐘舵��" clearable> - <el-option - v-for="dict in dict.type.sys_normal_disable" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> + <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" + :value="dict.value" /> </el-select> </el-form-item> <el-form-item> @@ -27,40 +18,22 @@ <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['system:dept:add']" - >鏂板</el-button> + <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" + v-hasPermi="['system:dept:add']">鏂板</el-button> </el-col> <el-col :span="1.5"> - <el-button - type="info" - plain - icon="el-icon-sort" - size="mini" - @click="toggleExpandAll" - >灞曞紑/鎶樺彔</el-button> + <el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">灞曞紑/鎶樺彔</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table - v-if="refreshTable" - v-loading="loading" - :data="deptList" - row-key="deptId" - :default-expand-all="isExpandAll" - :tree-props="{children: 'children', hasChildren: 'hasChildren'}" - > + <el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId" + :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> <el-table-column prop="deptName" label="閮ㄩ棬鍚嶇О" width="260"></el-table-column> <el-table-column prop="orderNum" label="鎺掑簭" width="200"></el-table-column> <el-table-column prop="status" label="鐘舵��" width="100"> <template slot-scope="scope"> - <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> + <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" /> </template> </el-table-column> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="200"> @@ -70,28 +43,12 @@ </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['system:dept:edit']" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-plus" - @click="handleAdd(scope.row)" - v-hasPermi="['system:dept:add']" - >鏂板</el-button> - <el-button - v-if="scope.row.parentId != 0" - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['system:dept:remove']" - >鍒犻櫎</el-button> + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" + v-hasPermi="['system:dept:edit']">淇敼</el-button> + <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" + v-hasPermi="['system:dept:add']">鏂板</el-button> + <el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-delete" + @click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']">鍒犻櫎</el-button> </template> </el-table-column> </el-table> @@ -102,7 +59,8 @@ <el-row> <el-col :span="24" v-if="form.parentId !== 0"> <el-form-item label="涓婄骇閮ㄩ棬" prop="parentId"> - <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="閫夋嫨涓婄骇閮ㄩ棬" /> + <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" + placeholder="閫夋嫨涓婄骇閮ㄩ棬" /> </el-form-item> </el-col> </el-row> @@ -139,11 +97,9 @@ <el-col :span="12"> <el-form-item label="閮ㄩ棬鐘舵��"> <el-radio-group v-model="form.status"> - <el-radio - v-for="dict in dict.type.sys_normal_disable" - :key="dict.value" - :label="dict.value" - >{{dict.label}}</el-radio> + <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ + dict.label + }}</el-radio> </el-radio-group> </el-form-item> </el-col> @@ -280,6 +236,7 @@ this.title = "娣诲姞閮ㄩ棬"; listDept().then(response => { this.deptOptions = this.handleTree(response.data, "deptId"); + this.deptOptions = this.limitTreeDepth(this.deptOptions, 2) }); }, /** 灞曞紑/鎶樺彔鎿嶄綔 */ @@ -303,11 +260,12 @@ const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] }; this.deptOptions.push(noResultsOptions); } + this.deptOptions = this.limitTreeDepth(this.deptOptions, 2) }); }); }, /** 鎻愪氦鎸夐挳 */ - submitForm: function() { + submitForm: function () { this.$refs["form"].validate(valid => { if (valid) { if (this.form.deptId != undefined) { @@ -328,12 +286,26 @@ }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { - this.$modal.confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.deptName + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.deptName + '"鐨勬暟鎹」锛�').then(function () { return delDept(row.deptId); }).then(() => { this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); + }).catch(() => { }); + }, + // 閫掑綊鍑芥暟锛岀敤浜庨檺鍒舵爲鐨勬繁搴� + limitTreeDepth(options, maxDepth, currentDepth = 1) { + return options.map(option => { + const newOption = { ...option }; + if (currentDepth < maxDepth && option.children) { + // 濡傛灉褰撳墠娣卞害灏忎簬鏈�澶ф繁搴︿笖瀛樺湪瀛愯妭鐐癸紝鍒欓�掑綊澶勭悊瀛愯妭鐐� + newOption.children = this.limitTreeDepth(option.children, maxDepth, currentDepth + 1); + } else { + // 鍚﹀垯绉婚櫎瀛愯妭鐐� + delete newOption.children; + } + return newOption; + }); } } }; diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 5609baf..60769cc 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -84,15 +84,15 @@ v-hasPermi="['system:dict:remove']" >鍒犻櫎</el-button> </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['system:dict:export']" - >瀵煎嚭</el-button> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="warning"--> +<!-- plain--> +<!-- icon="el-icon-download"--> +<!-- size="mini"--> +<!-- @click="handleExport"--> +<!-- v-hasPermi="['system:dict:export']"--> +<!-- >瀵煎嚭</el-button>--> </el-col> <el-col :span="1.5"> <el-button diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 93de712..853e45e 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -403,6 +403,8 @@ handleCheckedTreeConnect(value, type) { if (type == 'menu') { this.form.menuCheckStrictly = value ? true : false; + this.menuNodeAll = false + this.$refs.menu.setCheckedNodes([]); } else if (type == 'dept') { this.form.deptCheckStrictly = value ? true : false; } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 95dc281..0d8450a 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -8,8 +8,8 @@ <div class="head-container addButton"> <el-input v-model="deptName" placeholder="閮ㄩ棬鍚嶇О" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" /> - <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle - @click="addSchema"></el-button> + <!-- <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle + @click="addSchema"></el-button> --> </div> <div class="head-container"> <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" @@ -149,7 +149,8 @@ </el-col> <el-col :span="12"> <el-form-item label="褰掑睘閮ㄩ棬" prop="deptId"> - <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" /> + <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true" + placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" /> </el-form-item> </el-col> </el-row> -- Gitblit v1.9.3