From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期二, 29 四月 2025 13:25:29 +0800
Subject: [PATCH] Merge branch 'dev' into dev_tides
---
src/views/CNAS/personnel/personnelInfo/index.vue | 4
src/views/structural/premises/index.vue | 6
vue.config.js | 1
src/views/CNAS/process/disposal/sampleDisposal/index.vue | 564 ++
src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue | 2
src/workers/DataWorker.worker.js | 38
src/views/CNAS/process/method/methodVerification/index.vue | 24
src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue | 38
src/views/business/productOrder/index.vue | 186
src/api/business/insReport.js | 11
src/api/cnas/personal/personPersonnelCapacity.js | 4
src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue | 48
src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue | 22
src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue | 32
src/views/monitor/logininfor/index.vue | 4
src/views/monitor/operlog/index.vue | 4
src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue | 33
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue | 4
src/views/business/inspectionTask/index.vue | 344
src/api/index/report.js | 8
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue | 78
src/views/business/materialOrder/copperOrder.vue | 79
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue | 11
src/views/structural/capabilityAndLaboratory/laboratory/index.vue | 5
src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue | 28
src/views/CNAS/resourceDemand/device/component/checkRecord.vue | 18
src/views/structural/capabilityAndLaboratory/capability/index.vue | 22
src/views/business/unpass/index.vue | 44
src/views/system/customer/index.vue | 45
src/store/modules/user.js | 10
src/views/business/rawMaterialInspection/index.vue | 17
src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue | 2
src/views/statisticalCharts/inspectionItemWarning/index.vue | 290 +
src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue | 5
src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue | 32
src/views/business/inspectionTask/inspection.vue | 28
src/views/business/productOrder/components/addInspectionDia.vue | 4
src/views/CNAS/process/complaint/index.vue | 4
src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue | 4
src/views/CNAS/personnel/personnelInfo/components/mandateAdd.vue | 2
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue | 6
src/views/performance/manHour/workTimeStatistics.vue | 120
src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue | 34
src/api/business/materialInspection.js | 2
src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue | 22
src/views/CNAS/process/demand/index.vue | 30
src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue | 1
src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue | 96
src/views/business/inspectionTask/components/InspectionWord.vue | 32
src/views/system/role/index.vue | 4
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue | 3
src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue | 56
src/views/standard/standardLibrary/index.vue | 5
src/views/CNAS/resourceDemand/device/component/management.vue | 95
src/views/CNAS/resourceDemand/device/component/state.vue | 131
src/views/CNAS/personnel/personalOverview/index.vue | 40
src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue | 26
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue | 27
src/views/CNAS/resourceDemand/device/component/usingExternalInstruments.vue | 31
src/views/CNAS/process/method/standardMethod/index.vue | 70
src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue | 4
src/views/business/costStatistics/index.vue | 36
src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue | 58
src/api/business/rawMaterialOrder.js | 6
src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue | 27
src/views/CNAS/externalService/supplierManage/index.vue | 4
src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue | 4
src/views/system/menu/index.vue | 4
src/views/CNAS/systemManagement/customerSatisfaction/index.vue | 4
src/views/system/dict/data.vue | 4
src/views/CNAS/resourceDemand/device/component/fault.vue | 4
src/api/business/unqualifiedHandler.js | 6
src/views/business/inspectionView/index.vue | 3141 +++++++++++++
src/store/modules/app.js | 14
src/utils/date.js | 27
src/views/CNAS/externalService/serviceAndSupplyPro/index.vue | 4
src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue | 2
src/views/thirdpartylogin.vue | 21
src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue | 14
src/api/system/user.js | 2
src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue | 4
src/views/business/materialOrder/customsInspectionView.vue | 34
src/assets/styles/sidebar.scss | 59
src/views/system/dept/index.vue | 4
src/views/business/materialOrderComponents/materialOrder/showInfo.vue | 6
src/assets/styles/element-ui.scss | 6
src/views/business/reportPreparation/index.vue | 33
src/views/business/costStatistics/components/viewInfoDia.vue | 1
src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue | 478 ++
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue | 8
src/views/business/materialOrder/index.vue | 129
src/api/business/productOrder.js | 8
src/views/CNAS/resourceDemand/device/component/borrow.vue | 98
src/views/standard/model/index.vue | 79
src/api/standard/standardLibrary.js | 16
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue | 2
src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue | 11
src/views/CNAS/resourceDemand/device/component/deviceOverview.vue | 305
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue | 302
src/views/CNAS/resourceDemand/device/component/resourceReservation.vue | 2
src/views/business/unpass/components/PurchaseVerification.vue | 1
src/views/business/productOrder/components/printDialog.vue | 1
src/views/CNAS/process/method/standardMethodsChange/index.vue | 24
src/workers/InspectionWorker.worker.js | 912 ---
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue | 4
src/views/CNAS/systemManagement/correctiveAction/index.vue | 4
src/views/index.vue | 15
src/api/cnas/resourceDemand/device.js | 177
src/views/CNAS/resourceDemand/device/index.vue | 18
src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue | 61
src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue | 9
src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue | 2
src/api/cnas/process/reportResults.js | 1
src/views/CNAS/resourceDemand/standardMaterial/index.vue | 4
src/views/CNAS/systemManagement/documentControl/components/FileList.vue | 6
src/utils/auth.js | 4
src/views/business/materialOrder/copperView.vue | 1786 +++++++
src/views/CNAS/resourceDemand/device/component/equipmentCheck.vue | 14
src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue | 212
src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue | 80
src/views/CNAS/process/disposal/sampleReceipt/index.vue | 340 +
src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue | 25
src/views/system/role/authUser.vue | 4
src/views/CNAS/process/uncertainty/index.vue | 27
src/store/getters.js | 2
src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue | 59
src/views/business/unpass/index-manage.vue | 66
src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue | 4
src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue | 4
src/views/business/productSamplingInfo/index.vue | 43
src/components/Table/lims-table.vue | 162
src/views/CNAS/resourceDemand/standardMaterailRequistion/index.vue | 4
src/permission.js | 3
src/api/cnas/personal/personalList.js | 2
src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue | 53
src/views/system/post/index.vue | 4
src/views/business/productOrder/components/cable-config.vue | 2
src/router/index.js | 49
src/components/Pagination/index.vue | 2
src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue | 4
src/views/performance/manHour/workTimeManagement.vue | 140
src/components/UpPdfStamp/index.vue | 1
src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue | 297 +
src/main.js | 6
src/utils/excelFountion.js | 2
src/components/echarts/DataComparison.vue | 131
src/views/business/productOrder/components/addView.vue | 60
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue | 9
src/views/system/notice/index.vue | 4
src/layout/components/Settings/index.vue | 4
src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue | 2
src/views/system/dict/index.vue | 4
src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue | 234
src/views/system/config/index.vue | 4
src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue | 9
src/views/CNAS/resourceDemand/device/component/files.vue | 7
src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue | 4
src/views/CNAS/personnel/personnelInfo/tabs/training-record.vue | 39
src/layout/components/Navbar.vue | 2
src/views/business/inspectionReview/index.vue | 17
src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue | 4
src/views/CNAS/personnel/personnelInfo/components/AddInDetail.vue | 2
src/views/CNAS/resourceDemand/device/component/calibration.vue | 4
src/views/business/materialOrder/customsInspectionOrder.vue | 50
src/api/cnas/process/ensureResults/qualitySupervise.js | 2
src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue | 4
src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue | 4
src/api/cnas/process/sampleDisposal.js | 60
src/components/index/scroll-paging.vue | 3
src/views/system/role/selectUser.vue | 4
src/views/performance/class/index.vue | 4
src/api/statisticalCharts/dataAnalysis.js | 16
src/layout/components/Sidebar/SidebarItem.vue | 5
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue | 26
src/utils/dict/DictOptions.js | 1
src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue | 2
src/views/business/unpass/components/addUnPass.vue | 39
src/views/CNAS/process/reportResults/index.vue | 76
src/views/monitor/online/index.vue | 4
src/views/CNAS/personnel/personnelInfo/components/Edit.vue | 69
src/views/CNAS/systemManagement/managementReview/components/meetingRecords.vue | 4
/dev/null | 341 -
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue | 10
src/views/system/user/index.vue | 66
src/api/cnas/process/method/standardMethod.js | 8
src/views/login.vue | 77
src/views/business/productOrder/components/addOrder.vue | 101
src/views/CNAS/resourceDemand/device/component/record.vue | 103
package.json | 1
src/api/structural/structureTestObjectPart.js | 2
src/views/performance/manHour/workTimeConfig.vue | 85
src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue | 61
192 files changed, 10,188 insertions(+), 4,127 deletions(-)
diff --git a/package.json b/package.json
index e417754..6ccb0ee 100644
--- a/package.json
+++ b/package.json
@@ -41,6 +41,7 @@
"@vue-office/excel": "^1.7.14",
"@vue/composition-api": "^1.7.2",
"axios": "0.28.1",
+ "big.js": "^6.2.2",
"clipboard": "2.0.8",
"core-js": "3.37.1",
"dom-to-image": "^2.6.0",
diff --git a/src/api/business/insReport.js b/src/api/business/insReport.js
index 896d9b2..50e5a93 100644
--- a/src/api/business/insReport.js
+++ b/src/api/business/insReport.js
@@ -57,3 +57,14 @@
data: query
})
}
+
+// 鎶ュ憡瀵煎嚭
+export function reportAllExport(query) {
+ return request({
+ url: '/insReport/reportAllExport',
+ method: 'get',
+ params: query,
+ responseType: "blob"
+ })
+}
+
diff --git a/src/api/business/materialInspection.js b/src/api/business/materialInspection.js
index 67401a5..2baa72d 100644
--- a/src/api/business/materialInspection.js
+++ b/src/api/business/materialInspection.js
@@ -93,7 +93,7 @@
return request({
url: '/rawMaterialOrder/rawAllExport',
method: 'get',
- data: query,
+ params: query,
responseType: "blob"
})
}
diff --git a/src/api/business/productOrder.js b/src/api/business/productOrder.js
index 8be32b1..881ca80 100644
--- a/src/api/business/productOrder.js
+++ b/src/api/business/productOrder.js
@@ -122,3 +122,11 @@
data: query
})
}
+// 淇敼鏍峰搧鍨嬪彿
+export function updateSampleModel(query) {
+ return request({
+ url: '/insOrder/updateSampleModel',
+ method: 'post',
+ data: query
+ })
+}
diff --git a/src/api/business/rawMaterialOrder.js b/src/api/business/rawMaterialOrder.js
index f307ca8..a37df10 100644
--- a/src/api/business/rawMaterialOrder.js
+++ b/src/api/business/rawMaterialOrder.js
@@ -219,7 +219,7 @@
return request({
url: '/rawMaterialOrder/rawAllExport',
method: 'get',
- data: query,
+ params: query,
responseType: "blob"
})
}
@@ -291,7 +291,7 @@
export function saveUnqualifiedContext(query) {
return request({
url: '/insOrderPlan/saveUnqualifiedContext',
- method: 'delete',
- params: query
+ method: 'post',
+ data: query
})
}
diff --git a/src/api/business/unqualifiedHandler.js b/src/api/business/unqualifiedHandler.js
index d458b42..042d095 100644
--- a/src/api/business/unqualifiedHandler.js
+++ b/src/api/business/unqualifiedHandler.js
@@ -17,11 +17,11 @@
params: query,
});
}
-//鍒犻櫎涓嶅悎鏍煎鐞�
+//鎻愪氦OA娴佺▼
export function pushOA(query) {
return request({
url: "/unqualifiedHandler/pushOA",
- method: "delete",
- params: query,
+ method: "post",
+ data: query,
});
}
diff --git a/src/api/cnas/personal/personPersonnelCapacity.js b/src/api/cnas/personal/personPersonnelCapacity.js
index f5b4503..7cf774f 100644
--- a/src/api/cnas/personal/personPersonnelCapacity.js
+++ b/src/api/cnas/personal/personPersonnelCapacity.js
@@ -28,8 +28,8 @@
export function confirmPersonnelCapability(query) {
return request({
url: "/personPersonnelCapacity/confirmPersonnelCapability",
- method: "get",
- params: query
+ method: "post",
+ data: query
});
}
// 鍒犻櫎浜哄憳鑳藉姏
diff --git a/src/api/cnas/personal/personalList.js b/src/api/cnas/personal/personalList.js
index d6ce381..16bdee1 100644
--- a/src/api/cnas/personal/personalList.js
+++ b/src/api/cnas/personal/personalList.js
@@ -21,7 +21,7 @@
return request({
url: "/personBasicInfo/exportPersonBasicInfo",
method: "get",
- data: query,
+ params: query,
responseType: "blob"
});
}
diff --git a/src/api/cnas/process/ensureResults/qualitySupervise.js b/src/api/cnas/process/ensureResults/qualitySupervise.js
index 9de4337..42328d0 100644
--- a/src/api/cnas/process/ensureResults/qualitySupervise.js
+++ b/src/api/cnas/process/ensureResults/qualitySupervise.js
@@ -22,7 +22,7 @@
return request({
url: '/qualitySupervise/exportQualitySupervise',
method: 'get',
- data: query,
+ params: query,
responseType: "blob"
})
}
diff --git a/src/api/cnas/process/method/standardMethod.js b/src/api/cnas/process/method/standardMethod.js
index 0d64b8b..46bd97e 100644
--- a/src/api/cnas/process/method/standardMethod.js
+++ b/src/api/cnas/process/method/standardMethod.js
@@ -46,11 +46,3 @@
});
}
-// 瀵煎叆鏍囧噯鏄庣粏
-export function importStandardDetails(data) {
- return request({
- url: "/standardMethod/importStandardDetails",
- method: "post",
- data: data,
- });
-}
diff --git a/src/api/cnas/process/reportResults.js b/src/api/cnas/process/reportResults.js
index 0dbeb96..1b1011f 100644
--- a/src/api/cnas/process/reportResults.js
+++ b/src/api/cnas/process/reportResults.js
@@ -7,6 +7,7 @@
url: "/processReport/exportProcessReport",
method: "get",
params: data,
+ responseType: "blob",
});
}
diff --git a/src/api/cnas/process/sampleDisposal.js b/src/api/cnas/process/sampleDisposal.js
index a763edd..68c22a8 100644
--- a/src/api/cnas/process/sampleDisposal.js
+++ b/src/api/cnas/process/sampleDisposal.js
@@ -1,6 +1,6 @@
-// 妫�娴嬫垨鏍″噯鐗╁搧鐨勫缃�
import request from "@/utils/request";
+// 妫�娴嬫垨鏍″噯鐗╁搧鐨勫缃�
// 淇敼
export function doProcessDeal(data) {
return request({
@@ -10,7 +10,7 @@
});
}
-// 鏂板
+// 鏂板璇︽儏
export function addProcessDeal(data) {
return request({
url: "/processDeal/addProcessDeal",
@@ -27,11 +27,19 @@
data: data,
});
}
+// 鎻愪氦鍘嗗彶 浼犲弬id
+export function addProcessTotaldeal(data) {
+ return request({
+ url: "/processTotaldeal/addProcessTotaldeal",
+ method: "post",
+ data: data,
+ });
+}
//鏌ヨ璇︽儏 鍒嗛〉鏌ヨ閲岄潰totaldealId 浼犲弬鍘嗗彶鐨刬d
-export function pageProcessDeal(query) {
+export function getProcessDeal(query) {
return request({
- url: "/processDeal/pageProcessDeal",
+ url: "/processDeal/getProcessDeal",
method: "get",
params: query,
});
@@ -72,3 +80,47 @@
params: query,
});
}
+
+//鏍峰搧澶勭悊瀵煎嚭
+export function exportProcessTotaldeal(query) {
+ return request({
+ url: "/processTotaldeal/exportProcessTotaldeal",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+
+// 鏍峰搧鎺ユ敹-鍒嗛〉鏌ヨ
+export function pageProcessSample(query) {
+ return request({
+ url: "/processSample/pageProcessSample",
+ method: "get",
+ params: query,
+ });
+}
+// 鏍峰搧鎺ユ敹-鏂板/淇敼
+export function addProcessSample(query) {
+ return request({
+ url: "/processSample/addProcessSample",
+ method: "post",
+ data: query,
+ });
+}
+// 鏍峰搧鎺ユ敹-鍒犻櫎
+export function delProcessSample(query) {
+ return request({
+ url: "/processSample/delProcessSample",
+ method: "delete",
+ params: query,
+ });
+}
+// 鏍峰搧鎺ユ敹-瀵煎嚭
+export function exportProcessSample(query) {
+ return request({
+ url: "/processSample/exportProcessSample",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
diff --git a/src/api/cnas/resourceDemand/device.js b/src/api/cnas/resourceDemand/device.js
index 400a1ec..b4055f7 100644
--- a/src/api/cnas/resourceDemand/device.js
+++ b/src/api/cnas/resourceDemand/device.js
@@ -92,10 +92,26 @@
});
}
-//鏌ヨ鏁伴噰閰嶇疆
+// 鏌ヨ鏁伴噰閰嶇疆
export function queryDataAcquisitionConfiguration(query) {
return request({
url: "/deviceScope/queryDataAcquisitionConfiguration",
+ method: "get",
+ params: query,
+ });
+}
+// 鏌ヨ鏁伴噰閰嶇疆
+export function queryProductConfiguration(query) {
+ return request({
+ url: "/deviceScope/queryProductConfiguration",
+ method: "get",
+ params: query,
+ });
+}
+// 鏁伴噰閰嶇疆--鏌ヨ妫�楠岄」
+export function getNoConfigProduct(query) {
+ return request({
+ url: "/deviceScope/getNoConfigProduct",
method: "get",
params: query,
});
@@ -109,13 +125,21 @@
data: data,
});
}
-
-//鍒犻櫎鏁伴噰閰嶇疆
-export function deleteDataAcquisitionConfiguration(data) {
+// 缁存姢鏂囦欢閰嶇疆
+export function saveDeviceFileConfiguration(data) {
return request({
- url: "/deviceScope/deleteDataAcquisitionConfiguration",
+ url: "/deviceScope/saveDeviceFileConfiguration",
method: "post",
data: data,
+ });
+}
+
+//鍒犻櫎鏁伴噰閰嶇疆
+export function deleteDataAcquisitionConfiguration(query) {
+ return request({
+ url: "/deviceScope/deleteDataAcquisitionConfiguration",
+ method: "delete",
+ params: query,
});
}
@@ -850,42 +874,6 @@
});
}
-//璁惧淇濆吇鍗曟潯瀵煎嚭
-export function exportMaintenanceRecord(query) {
- return request({
- url: "/deviceMaintain/exportMaintenanceRecord",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-//璁惧缁存姢鍒犻櫎
-export function deleteDeviceMaintenance(query) {
- return request({
- url: "/deviceMaintain/deleteDeviceMaintenance",
- method: "delete",
- params: query,
- });
-}
-
-// 鏂板璁惧缁存姢淇濆吇
-export function 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({
@@ -1243,3 +1231,110 @@
params: query,
});
}
+//浣滀笟鎸囧涔� 鏌ヨ
+export function getDeviceById(query) {
+ return request({
+ url: "/deviceScope/getDeviceById",
+ method: "get",
+ params: query,
+ });
+}
+//璁惧缁存姢淇濆吇 鏌ヨ
+export function selectDeviceMaintenancePage(query) {
+ return request({
+ url: "/deviceMaintain/selectDeviceMaintenancePage",
+ method: "get",
+ params: query,
+ });
+}
+//璁惧缁存姢淇濆吇 鍒犻櫎
+export function deleteDeviceMaintenance(query) {
+ return request({
+ url: "/deviceMaintain/deleteDeviceMaintenance",
+ method: "delete",
+ params: query,
+ });
+}
+//璁惧缁存姢淇濆吇 鏂板
+export function addDeviceMaintenance(query) {
+ return request({
+ url: "/deviceMaintain/addDeviceMaintenance",
+ method: "post",
+ data: query,
+ });
+}
+
+//浣跨敤璁板綍 瀵煎嚭
+export function exportDeviceMaintenance(query) {
+ return request({
+ url: "/deviceMaintain/exportDeviceMaintenance",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 鍒嗛〉鏌ヨ
+export function selectDeviceImpowerByPage(query) {
+ return request({
+ url: "/deviceImpower/selectDeviceImpowerByPage",
+ method: "get",
+ params: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 鏌ヨ璇︽儏
+export function getImpowerDetail(query) {
+ return request({
+ url: "/deviceImpower/getImpowerDetail",
+ method: "get",
+ params: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 鍒犻櫎
+export function deleteImpower(query) {
+ return request({
+ url: "/deviceImpower/deleteImpower",
+ method: "delete",
+ params: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 瀵煎嚭
+export function exportDeviceImpower(query) {
+ return request({
+ url: "/deviceImpower/exportDeviceImpower",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 鏂板
+export function addImpower(query) {
+ return request({
+ url: "/deviceImpower/addImpower",
+ method: "post",
+ data: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 淇敼
+export function updateImpower(query) {
+ return request({
+ url: "/deviceImpower/updateImpower",
+ method: "post",
+ data: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 鎵瑰噯鎺堟潈
+export function reviewImpowerStatus(query) {
+ return request({
+ url: "/deviceImpower/reviewImpowerStatus",
+ method: "post",
+ data: query,
+ });
+}
+//璁惧浣跨敤鎺堟潈 鎻愪环鎵瑰噯閫氱煡
+export function submitReviewImpowerStatus(query) {
+ return request({
+ url: "/deviceImpower/submitReviewImpowerStatus",
+ method: "post",
+ data: query,
+ });
+}
diff --git a/src/api/index/report.js b/src/api/index/report.js
index c1329ef..e7a3847 100644
--- a/src/api/index/report.js
+++ b/src/api/index/report.js
@@ -24,3 +24,11 @@
params: query
})
}
+//棣栭〉-->淇敼寰呭姙浜嬮」鐘舵��
+export function triggerModificationStatusToRead(query) {
+ return request({
+ url: '/informationNotification/triggerModificationStatusToRead',
+ method: 'post',
+ data: query
+ })
+}
diff --git a/src/api/standard/standardLibrary.js b/src/api/standard/standardLibrary.js
index 785c6fb..832dd1c 100644
--- a/src/api/standard/standardLibrary.js
+++ b/src/api/standard/standardLibrary.js
@@ -156,23 +156,7 @@
});
}
-// 閲嶇疆鏍囧噯搴撳崟浠�
-export function resetTreeOfPrice(data) {
- return request({
- url: "/standardTree/resetTreeOfPrice",
- method: "post",
- data: data,
- });
-}
-// 閲嶇疆鏍囧噯搴撳伐鏃剁郴鏁�
-export function resetTreeOfHour(data) {
- return request({
- url: "/standardTree/resetTreeOfHour",
- method: "post",
- data: data,
- });
-}
// 妫�楠岄」澶嶅埗鎺掑簭
export function copyStandardProductSort(data) {
diff --git a/src/api/statisticalCharts/dataAnalysis.js b/src/api/statisticalCharts/dataAnalysis.js
index 0775c06..1ac9276 100644
--- a/src/api/statisticalCharts/dataAnalysis.js
+++ b/src/api/statisticalCharts/dataAnalysis.js
@@ -71,3 +71,19 @@
data: query,
});
}
+//鏌ヨ棰勮鍒楄〃
+export function selectDeviationWarningPage(query) {
+ return request({
+ url: "/insProductDeviationWarning/selectDeviationWarningPage",
+ method: "get",
+ params: query,
+ });
+}
+//鏌ヨ棰勮鍒楄〃
+export function selectDeviationWarning(query) {
+ return request({
+ url: "/insProductDeviationWarning/selectDeviationWarning",
+ method: "get",
+ params: query,
+ });
+}
diff --git a/src/api/structural/structureTestObjectPart.js b/src/api/structural/structureTestObjectPart.js
index c0a9f0d..41ca1ce 100644
--- a/src/api/structural/structureTestObjectPart.js
+++ b/src/api/structural/structureTestObjectPart.js
@@ -60,7 +60,7 @@
export function deleteProductPart(query) {
return request({
url: '/productPart/deleteProductPart',
- method: 'post',
+ method: 'delete',
params: query
})
}
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 752aa45..ad8d3ce 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -155,7 +155,7 @@
return request({
url: "/companies/addPersonUser",
method: "post",
- params: data,
+ data: data,
});
}
// 鑾峰彇瑙掕壊
diff --git a/src/assets/styles/element-ui.scss b/src/assets/styles/element-ui.scss
index 644d095..6b46245 100644
--- a/src/assets/styles/element-ui.scss
+++ b/src/assets/styles/element-ui.scss
@@ -148,3 +148,9 @@
.el-button--primary {
background: #3a7bfa;
}
+//婊氬姩鏉�
+::-webkit-scrollbar
+{
+ width: 8px !important;
+ height: 8px !important;
+}
diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss
index 0f43008..69f9693 100644
--- a/src/assets/styles/sidebar.scss
+++ b/src/assets/styles/sidebar.scss
@@ -71,34 +71,16 @@
}
.el-menu-item, .el-submenu__title {
- display: flex;
- align-items: center;
- }
- .el-submenu__title span {
- white-space: normal;
- word-break: break-all;
- line-height: 20px;
- flex: 1;
- padding-right: 20px;
- }
-
- .el-menu-item {
- display: flex;
- align-items: center;
- padding-right: 20px !important;
- }
- .el-menu-item span {
- white-space: normal;
- word-break: break-all;
- line-height: 20px;
- flex: 1;
+ overflow: hidden !important;
+ text-overflow: ellipsis !important;
+ white-space: nowrap !important;
}
// menu hover
.submenu-title-noDropdown,
.el-submenu__title {
&:hover {
- background-color: rgba(0, 0, 0, 0.06) !important;
+ background-color: rgba(0, 0, 0, 0.08) !important;
}
}
@@ -111,7 +93,7 @@
min-width: $base-sidebar-width !important;
&:hover {
- background-color: rgba(0, 0, 0, 0.06) !important;
+ background-color: rgba(0, 0, 0, 0.08) !important;
}
}
@@ -127,11 +109,11 @@
.hideSidebar {
.sidebar-container {
- width: 54px !important;
+ width: 70px !important;
}
.main-container {
- margin-left: 54px;
+ margin-left: 70px;
}
.submenu-title-noDropdown {
@@ -142,11 +124,16 @@
padding: 0 !important;
.svg-icon {
- margin-left: 20px;
+ width: 1.5em;
+ height: 1.5em;
+ margin-left: 25px;
}
}
}
-
+ .el-menu-item.is-active,
+ .el-submenu.is-active > .el-submenu__title {
+ background-color: transparent !important;
+ }
.el-submenu {
overflow: hidden;
@@ -154,7 +141,9 @@
padding: 0 !important;
.svg-icon {
- margin-left: 20px;
+ width: 1.5em;
+ height: 1.5em;
+ margin-left: 25px;
}
}
@@ -163,12 +152,16 @@
.el-menu--collapse {
.el-submenu {
&>.el-submenu__title {
+ height: auto; /* 鏍规嵁鍐呭鑷姩璋冩暣楂樺害 */
+ flex-direction: column; /* 鏀瑰彉甯冨眬鏂瑰悜涓哄瀭鐩� */
+ align-items: center; /* 灞呬腑瀵归綈 */
+ margin-bottom: 10px;
&>span {
- height: 0;
- width: 0;
- overflow: hidden;
- visibility: hidden;
- display: inline-block;
+ display: block !important;
+ visibility: visible !important;
+ white-space: normal; /* 鍏佽鎹㈣ */
+ text-align: center; /* 鏂囨湰灞呬腑瀵归綈 */
+ line-height: normal;
}
}
}
diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue
index 9be5ddb..67090db 100644
--- a/src/components/Pagination/index.vue
+++ b/src/components/Pagination/index.vue
@@ -36,7 +36,7 @@
pageSizes: {
type: Array,
default() {
- return [10, 20, 30, 50]
+ return [10, 20, 30, 50, 100]
}
},
// 绉诲姩绔〉鐮佹寜閽殑鏁伴噺绔粯璁ゅ��5
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index f3d7795..2df0ddc 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -11,8 +11,9 @@
<el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey"
:filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue"
- :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop"
- :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true"
+ :filters="item.filters" :fixed="item.fixed" :label="item.label" :prop="item.prop"
+ :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true"
+ :min-width="item.dataType == 'action' ? btnWidth : item.width"
:sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType == 'action' ? btnWidth : item.width" align="center">
<!-- <div class="123" v-if="item.type == ''"> -->
<template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope">
@@ -63,7 +64,7 @@
<!-- 鎸夐挳 -->
<div v-else-if="item.dataType == 'action'"
- :style="`width:${getWidth(item.operation, scope.row)}`">
+ :style="`min-width:${getWidth(item.operation, scope.row)}`">
<template v-for="(o, key) in item.operation">
<el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true"
:disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain"
@@ -72,13 +73,19 @@
{{ o.name }}
</el-button>
<el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)"
- size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1"
+ :key="uploadKeys[scope.$index]"
+ ref="uploadRef"
+ size="mini" :multiple="o.multiple ? o.multiple : false" :limit="1"
:disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept
? o.accept
: '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
" v-if="o.type == 'upload'" style="display: inline-block; width: 50px"
- v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError"
- :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key">
+ v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader"
+ :before-upload="(file) => beforeUpload(file, scope.$index)"
+ :on-change="(file, fileList) => handleChange(file, fileList, scope.$index)"
+ :on-error="(error, file, fileList) => onError(error, file, fileList, scope.$index)"
+ :on-success="(response, file, fileList) => handleSuccessUp(response, file, fileList, scope.$index)"
+ :on-exceed="onExceed" :show-file-list="false">
<el-button :size="o.size ? o.size : 'small'" type="text"
:disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
</el-upload>
@@ -158,7 +165,6 @@
name: "ZTTable",
filters: {
typeFn(val, row) {
- // console.log(val, row, '11111111');
if (typeof val === "function") {
return val(row);
} else return val;
@@ -259,13 +265,32 @@
return {
spanList: [],
btnWidth: "120px",
+ uploadRefs: [],
+ currentFiles: {}, // 鐢ㄤ簬瀛樺偍姣忚鐨勫綋鍓嶆枃浠�
+ uploadKeys: {} // 鐢ㄤ簬鍔ㄦ�侀噸缃粍浠�
};
},
mounted() {
this.calculateSpanInfo();
this.$nextTick(() => {
this.$refs.multipleTable.doLayout();
- });
+ this.tableData.forEach((_, index) => {
+ if (this.$refs.uploadRef) {
+ this.$refs.uploadRef[index] = this.$refs.uploadRef[index] || {};
+ }
+ });
+ })
+ },
+ watch: {
+ tableData: {
+ handler() {
+ // 褰撹〃鏍兼暟鎹彉鍖栨椂锛屽垵濮嬪寲 uploadKeys
+ this.tableData.forEach((_, index) => {
+ this.$set(this.uploadKeys, index, Date.now());
+ });
+ },
+ immediate: true
+ }
},
methods: {
getWidth(row, row0) {
@@ -277,22 +302,32 @@
count += a.name.length;
}
});
- this.btnWidth = count * 15 + 50 + "px";
- return count * 15 + 50 + "px";
+ this.btnWidth = count * 15 + 60 + "px";
+ return count * 15 + 60 + "px";
+ },
+ getTitleWidth(row) {
+ if (row.label.includes('鏃堕棿') || row.label.includes('缂栧彿') || row.label.includes('鏍峰搧鍚嶇О') || row.label.includes('闆朵欢')) {
+ return 160
+ } else if (row.label.includes('鎿嶄綔')) {
+ return row.width
+ } else {
+ const span = document.createElement('span');
+ span.innerText = row.label;
+ document.body.appendChild(span);
+ const width = `${span.offsetWidth + 50}px`;
+ document.body.removeChild(span);
+
+ return width;
+ }
},
iconFn(row) {
if (row.name === "缂栬緫" || row.name === "淇敼") {
return "el-icon-edit";
- } else if (row.name === "鍒犻櫎") {
- return "el-icon-delete";
} else if (row.name === "鏌ョ湅") {
return "el-icon-view";
} else {
return row.icon;
}
- // if (typeof (val) === 'function') {
- // return val(row);
- // } else return val;
},
formatType(val, format) {
if (typeof format === "function") {
@@ -307,21 +342,53 @@
setCurrent(row) {
this.$refs.multipleTable.setCurrentRow();
},
- handleSuccessUp(response, label) {
- if (typeof label === "string") {
- if (response.code == 200) {
- this.upData[label] = response.data.url;
+ handleSuccessUp(response, file, fileList, index) {
+ if (response.code == 200) {
+ // 娓呴櫎鏂囦欢鍒楄〃骞舵洿鏂板綋鍓嶆枃浠�
+ if (this.uploadRefs[index]) {
+ this.uploadRefs[index].clearFiles();
}
+ this.currentFiles[index] = file;
+ this.$message.success("涓婁紶鎴愬姛");
+ // 閲嶇疆缁勪欢鐘舵��
+ this.resetUploadComponent(index);
+
} else {
- if (response.code == 200) {
- this.$message.success("涓婁紶鎴愬姛");
- }
+ this.$message.error(response.message);
}
},
- onError(err, file, fileList) {
- this.$message.error("涓婁紶澶辫触");
- this.$refs.upload.clearFiles();
- this.uploading = false;
+ resetUploadComponent(index) {
+ // 鍔ㄦ�佹敼鍙� key 鏉ュ己鍒堕噸缃粍浠�
+ this.uploadKeys[index] = Date.now(); // 浣跨敤鏃堕棿鎴充綔涓烘柊鐨� key
+ },
+ handleChange(file, fileList, index) {
+ // 濡傛灉鏂囦欢鏁伴噺瓒呰繃闄愬埗锛岀Щ闄ゆ渶鏃╃殑鏂囦欢
+ if (fileList.length > 1) {
+ // 绉婚櫎鏈�鏃╃殑鏂囦欢
+ const earliestFile = fileList[0];
+ this.uploadRefs[index].handleRemove(earliestFile);
+ }
+
+ // 鏇存柊褰撳墠鏂囦欢
+ this.currentFiles[index] = file;
+ },
+ beforeUpload (file, index) {
+ this.currentFiles[index] = {}
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ // this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ return true;
+ }
+ },
+ onError(error, file, fileList, index) {
+ this.$message.error('鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯');
+
+ // 娓呴櫎鏂囦欢鍒楄〃
+ if (this.uploadRefs[index]) {
+ this.uploadRefs[index].clearFiles();
+ }
},
onExceed() {
this.$message.warning("瓒呭嚭鏂囦欢涓暟");
@@ -398,28 +465,6 @@
};
}
}
- // // 鐗规畩鐨勫悎骞惰
- // if (
- // this.data.spanConfig != undefined &&
- // this.data.spanConfig.special &&
- // this.data.spanConfig.special.main &&
- // this.data.spanConfig.special.rows &&
- // this.data.spanConfig.special.rows.length > 0
- // ) {
- // let i = null;
- // let obj = this.data.spanConfig.special.rows.find((item, index) => {
- // i = index;
- // return item.index == columnIndex;
- // });
- // if (obj) {
- // const _row = this.specialSpanList[i].arr[rowIndex];
- // const _col = _row > 0 ? 1 : 0;
- // return {
- // rowspan: _row,
- // colspan: _col,
- // };
- // }
- // }
},
},
};
@@ -430,10 +475,13 @@
text-align: center;
}
+.link {
+ color: rgb(64, 158, 255);
+ cursor: pointer;
+}
>>>.cell {
padding: 0 !important;
}
-
.cell {
white-space: nowrap;
overflow: hidden;
@@ -442,17 +490,6 @@
padding-left: 10px !important;
}
-.link {
- color: rgb(64, 158, 255);
- cursor: pointer;
-}
-
->>>.el-table__body-wrapper::-webkit-scrollbar {
- height: 10px;
- /* 璁剧疆婊氬姩鏉″搴� */
-}
-</style>
-<style>
.lims-table .highlight-warning-row-border td:first-child {
border-left: 4px solid #ffcd29;
}
@@ -460,11 +497,6 @@
.lims-table .highlight-warning-row-border td:last-child {
border-right: 4px solid #ffcd29;
}
-
-/* .lims-table .highlight-danger-row-border td {
- border-top: 2px solid red;
- border-bottom: 2px solid red;
- } */
.lims-table .highlight-danger-row-border td:first-child {
border-left: 4px solid #f56c6c;
diff --git a/src/components/UpPdfStamp/index.vue b/src/components/UpPdfStamp/index.vue
index 844eac4..9e83bc3 100644
--- a/src/components/UpPdfStamp/index.vue
+++ b/src/components/UpPdfStamp/index.vue
@@ -125,7 +125,6 @@
// 娓叉煋绔�
drawStamps(x, y, index) {
var img = new Image();
- console.log(this.stampsName)
// 璁剧疆鍥剧墖婧�
img.src = require("@/assets/stamps/" + this.stampsName + ".png"); // 鏇挎崲涓轰綘鐨勫浘鐗囬摼鎺�
let that = this
diff --git a/src/components/echarts/DataComparison.vue b/src/components/echarts/DataComparison.vue
index 19d65e7..fd62924 100644
--- a/src/components/echarts/DataComparison.vue
+++ b/src/components/echarts/DataComparison.vue
@@ -163,7 +163,7 @@
:legend="legend2"
:lineColors="lineColors"
:series="echartsSeries2"
- :tooltip="tooltip"
+ :tooltip="tooltip1"
:xAxis="xAxis"
:yAxis="yAxis2"
style="height: 40vh;"></Echarts>
@@ -190,6 +190,7 @@
<script>
import Echarts from "./echarts.vue";
+import {getRawSupplierCompare} from "@/api/statisticalCharts/dataAnalysis";
export default {
name: "DataComparison",
@@ -277,6 +278,20 @@
type: 'shadow'
}
},
+ tooltip1: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ },
+ formatter: (params) => {
+ // params 鏄竴涓暟缁勶紝鍖呭惈褰撳墠榧犳爣鎮仠鐨勬墍鏈夌郴鍒楃殑鏁版嵁
+ return params.map(param => {
+ const value = param.value; // 鑾峰彇褰撳墠鏁版嵁鐐圭殑鍊�
+ const name = param.seriesName; // 鑾峰彇绯诲垪鍚嶇О
+ return `${name}: ${Math.round(value)}%`; // 鏍煎紡鍖栦负鐧惧垎姣斿舰寮�
+ }).join('<br>'); // 姣忎釜绯诲垪鍗犱竴琛�
+ }
+ },
xAxis: [{
type: 'category',
data: ['1', '2', '3', '4', '5']
@@ -351,7 +366,10 @@
yAxis2: [{
type: 'value',
min: 0,
- max: 1,
+ max: 100,
+ axisLabel: {
+ formatter: '{value}%' // 鍦ㄦ瘡涓埢搴﹀�煎悗娣诲姞鐧惧垎姣旂鍙�
+ }
}],
echartsSeries2: [
{
@@ -360,7 +378,7 @@
label: {
show: true,
position: 'top',
- formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
+ formatter: (params) => params.value + '%'
},
data: [],
},
@@ -370,7 +388,7 @@
label: {
show: true,
position: 'top',
- formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
+ formatter: (params) => params.value + '%'
},
data: [],
}
@@ -389,43 +407,65 @@
},
// 鏂规硶闆嗗悎
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
+ getInfo() {
+ const { localData, localULC, localLCL, localAverage, localRange } = this.comparisonData;
+ // 鍒濆鍖� localData锛岀‘淇濇湁榛樿鍊�
+ this.localData = localData === null
+ ? ['', '', '', '', '', '', '', '', '']
+ : localData.map((number, index) => index === 7 ? `${Math.round(number * 100)}%` : number);
+ // 鏇存柊鍥捐〃鏁版嵁
+ this.echartsSeries3[0].data = this.localData.slice(0, 5);
+ this.localULC = localULC;
+ this.localLCL = localLCL;
+ this.localAverage = localAverage;
+ this.localRange = 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
+ getInfo1() {
+ const {
+ supplierData,
+ localData,
+ absoluteDeviation,
+ average,
+ supplierULC,
+ supplierLCL,
+ supplierAverage,
+ supplierRange,
+ localULC,
+ localLCL,
+ localAverage,
+ localRange,
+ } = this.comparisonData1;
+ // 杈呭姪鍑芥暟锛氬鐞嗙┖鏁版嵁骞惰浆鎹㈢櫨鍒嗘瘮
+ const processPercentageData = (data, defaultValue = ['', '', '', '', '', '', '', '', '']) =>
+ data === null ? defaultValue : data.map((number, index) => index === 7 ? `${Math.round(number * 100)}%` : number);
+ // 杈呭姪鍑芥暟锛氬鐞嗙┖鏁板�煎瀷鏁版嵁
+ const processNumericData = (data, defaultValue = ['', '', '', '', '']) =>
+ data === null ? defaultValue : data;
+ // 鍒濆鍖栨暟鎹�
+ this.supplierData = processPercentageData(supplierData);
+ this.localData = processPercentageData(localData);
+ this.absoluteDeviation = processPercentageData(absoluteDeviation).map(number => `${Math.round(number * 100)}%`);
+ this.average = processPercentageData(average).map(number => `${Math.round(number * 100)}%`);
+ // 鏇存柊鍥捐〃鏁版嵁
+ this.echartsSeries1[0].data = [];
+ this.echartsSeries3[0].data = this.localData.slice(0, 5);
+ this.echartsSeries[0].data = this.supplierData;
+ this.echartsSeries[1].data = this.localData;
+ this.echartsSeries2[1].data = this.comparisonData1.absoluteDeviation.map(value => value * 100);
+ this.echartsSeries2[0].data = this.comparisonData1.average.map(value => value * 100);
+ // 澶勭悊渚涘簲鍟嗗拰鏈湴鐨勬爣鍑嗗樊瀵规瘮鏁版嵁
+ this.supplierULC = processNumericData(supplierULC);
+ this.supplierLCL = processNumericData(supplierLCL);
+ this.supplierAverage = processNumericData(supplierAverage);
+ this.supplierRange = processNumericData(supplierRange);
+ this.localULC = processNumericData(localULC);
+ this.localLCL = processNumericData(localLCL);
+ this.localAverage = processNumericData(localAverage);
+ this.localRange = processNumericData(localRange);
+ // 鏇存柊娴嬮噺鏁版嵁鏍囧噯宸姣旀煴鐘跺浘鏁版嵁
+ this.echartsSeries1[0].data.push(this.supplierULC[0], this.localULC[0]);
+ this.echartsSeries1[1].data.push(this.supplierLCL[0], this.localLCL[0]);
+ this.echartsSeries1[2].data.push(this.supplierAverage[0], this.localAverage[0]);
},
submitForm () {
this.$refs['supplierForm'].validate((valid) => {
@@ -435,12 +475,7 @@
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 => {
+ getRawSupplierCompare(params).then(res => {
this.comparisonData1 = res.data
this.getInfo1()
})
@@ -459,8 +494,8 @@
<style scoped>
.title {
- height: 60px;
- line-height: 60px;
+ height: 40px;
+ line-height: 40px;
}
.container {
width: calc(100% - 20px);
diff --git a/src/components/index/scroll-paging.vue b/src/components/index/scroll-paging.vue
index ba5e511..16b4de3 100644
--- a/src/components/index/scroll-paging.vue
+++ b/src/components/index/scroll-paging.vue
@@ -34,7 +34,6 @@
deep:true,
handler(){
this.isLoding = false
- console.log(this.isLoding)
}
}
},
@@ -55,9 +54,7 @@
onScroll(){},
scrollFn() {
let content = this.$refs.content
- // console.log(22222,content.scrollTop + content.clientHeight+1,content.scrollHeight)
if (content.scrollTop + content.clientHeight+2 >= content.scrollHeight) {
- // console.log(1111,this.finishLoding)
if(!this.finishLoding){
this.loadMore()
}else{
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 79036de..54e2258 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -6,7 +6,7 @@
<img src="@/assets/logo/ZTTlogo.png" />
</div>
<div class="center-menu">
- <span class="label">LIMS瀹為獙瀹ょ鐞嗙郴缁�</span>
+ <span class="label">瑁呭LIMS瀹為獙瀹ょ鐞嗙郴缁�</span>
</div>
<div class="right-menu">
<div class="avatar-wrapper">
diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue
index bb3c9ce..6fef45c 100644
--- a/src/layout/components/Settings/index.vue
+++ b/src/layout/components/Settings/index.vue
@@ -66,8 +66,8 @@
<el-divider/>
- <el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">淇濆瓨閰嶇疆</el-button>
- <el-button size="small" plain icon="el-icon-refresh" @click="resetSetting">閲嶇疆閰嶇疆</el-button>
+ <el-button size="small" type="primary" plain @click="saveSetting">淇濆瓨閰嶇疆</el-button>
+ <el-button size="small" plain @click="resetSetting">閲嶇疆閰嶇疆</el-button>
</div>
</div>
</el-drawer>
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue
index fabc61e..1a7b1bf 100644
--- a/src/layout/components/Sidebar/SidebarItem.vue
+++ b/src/layout/components/Sidebar/SidebarItem.vue
@@ -97,3 +97,8 @@
}
}
</script>
+<style scoped>
+::v-deep .el-submenu__title i {
+ color: #ffffff !important;
+}
+</style>
diff --git a/src/main.js b/src/main.js
index aa78603..5f56508 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,7 +1,5 @@
import Vue from "vue";
-import Cookies from "js-cookie";
-
import Element from "element-ui";
import "./assets/styles/element-variables.scss";
@@ -66,7 +64,7 @@
Vue.prototype.HaveJson = (val) => {
return JSON.parse(JSON.stringify(val));
};
-Vue.prototype.javaApi = "http://114.132.189.42:7012";
+Vue.prototype.javaApi = "http://192.168.21.53:8001/lims";
Vue.prototype.checkPermi = checkPermi;
Vue.prototype.uploadHeader = {
Authorization: "Bearer " + getToken(),
@@ -108,7 +106,7 @@
*/
Vue.use(Element, {
- size: Cookies.get("size") || "medium", // set element-ui default size
+ size: localStorage.getItem("size") || "medium", // set element-ui default size
});
Vue.config.productionTip = false;
diff --git a/src/permission.js b/src/permission.js
index 1f81da4..fe0d11c 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -9,7 +9,7 @@
NProgress.configure({ showSpinner: false })
-const whiteList = ['/login', '/register', '/callbacklccpn']
+const whiteList = ['/login', '/register', '/thirdpartylogin', '/logindemo', '/callbacklccpn']
const isWhiteList = (path) => {
return whiteList.some(pattern => isPathMatch(pattern, path))
@@ -19,7 +19,6 @@
NProgress.start()
if (getToken()) {
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
- console.log(to.path)
/* has token*/
if (to.path === '/login') {
next({ path: '/' })
diff --git a/src/router/index.js b/src/router/index.js
index a1b609d..bfd49d0 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -117,13 +117,25 @@
permissions: ["business:order"],
children: [
{
- // 鍘熸潗鏂欎笅鍗�
- path: "customsInspection",
+ // 鍘熸潗鏂欎笅鍗�-杩涜涓嬪崟
+ path: "customsInspectionOrder",
component: () =>
- import("@/views/business/materialOrder/customsInspection"),
- name: "CustomsInspection",
+ import("@/views/business/materialOrder/customsInspectionOrder"),
+ name: "CustomsInspectionOrder",
meta: {
- title: "鍘熸潗鏂欎笅鍗曡鎯�",
+ title: "杩涜鍘熸潗鏂欎笅鍗�",
+ activeMenu: "/business/materialOrder",
+ keepAlive: true
+ },
+ },
+ {
+ // 鍘熸潗鏂欎笅鍗�-鏌ョ湅璇︽儏
+ path: "customsInspectionView",
+ component: () =>
+ import("@/views/business/materialOrder/customsInspectionView"),
+ name: "CustomsInspectionView",
+ meta: {
+ title: "鏌ョ湅鍘熸潗鏂欎笅鍗曡鎯�",
activeMenu: "/business/materialOrder",
keepAlive: true
},
@@ -133,7 +145,14 @@
path: "copperOrder",
component: () => import("@/views/business/materialOrder/copperOrder"),
name: "CopperOrder",
- meta: { title: "閾滄潗鏂欎笅鍗�", activeMenu: "/business/materialOrder",keepAlive: true },
+ meta: { title: "杩涜閾滄潗鏂欎笅鍗�", activeMenu: "/business/materialOrder",keepAlive: true },
+ },
+ {
+ // 閾滄潗鏂欎笅鍗�-鏌ョ湅璇︽儏
+ path: "copperView",
+ component: () => import("@/views/business/materialOrder/copperView"),
+ name: "CopperView",
+ meta: { title: "鏌ョ湅閾滄潗鏂欎笅鍗曡鎯�", activeMenu: "/business/materialOrder",keepAlive: true },
},
],
},
@@ -145,12 +164,20 @@
permissions: ["business:productOrder"],
children: [
{
- // 鎴愬搧涓嬪崟璇︽儏
- path: "add",
+ // 鏌ョ湅鎴愬搧涓嬪崟璇︽儏
+ path: "addView",
component: () =>
- import("@/views/business/productOrder/components/add.vue"),
- name: "Add",
- meta: { title: "鎴愬搧涓嬪崟璇︽儏", activeMenu: "/business/productOrder",keepAlive: true },
+ import("@/views/business/productOrder/components/addView.vue"),
+ name: "AddView",
+ meta: { title: "鏌ョ湅鎴愬搧涓嬪崟璇︽儏", activeMenu: "/business/productOrder",keepAlive: true },
+ },
+ {
+ // 杩涜涓嬪崟-鎴愬搧涓嬪崟
+ path: "addOrder",
+ component: () =>
+ import("@/views/business/productOrder/components/addOrder.vue"),
+ name: "AddOrder",
+ meta: { title: "杩涜鎴愬搧涓嬪崟", activeMenu: "/business/productOrder",keepAlive: true },
},
],
},
diff --git a/src/store/getters.js b/src/store/getters.js
index 0d93723..6f9b46b 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -9,6 +9,8 @@
avatar: (state) => state.user.avatar,
name: (state) => state.user.name,
nickName: (state) => state.user.nickName,
+ nameEn: (state) => state.user.nameEn,
+ userName: (state) => state.user.userName,
userId: (state) => state.user.id,
introduction: (state) => state.user.introduction,
roles: (state) => state.user.roles,
diff --git a/src/store/modules/app.js b/src/store/modules/app.js
index 3e22d1c..c93f1f8 100644
--- a/src/store/modules/app.js
+++ b/src/store/modules/app.js
@@ -1,13 +1,11 @@
-import Cookies from 'js-cookie'
-
const state = {
sidebar: {
- opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
+ opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false,
hide: false
},
device: 'desktop',
- size: Cookies.get('size') || 'medium'
+ size: localStorage.getItem('size') || 'medium'
}
const mutations = {
@@ -18,13 +16,13 @@
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
if (state.sidebar.opened) {
- Cookies.set('sidebarStatus', 1)
+ localStorage.setItem('sidebarStatus', 1)
} else {
- Cookies.set('sidebarStatus', 0)
+ localStorage.setItem('sidebarStatus', 0)
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
- Cookies.set('sidebarStatus', 0)
+ localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
},
@@ -33,7 +31,7 @@
},
SET_SIZE: (state, size) => {
state.size = size
- Cookies.set('size', size)
+ localStorage.setItem('size', size)
},
SET_SIDEBAR_HIDE: (state, status) => {
state.sidebar.hide = status
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 71eefef..21024b4 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -11,6 +11,8 @@
name: "",
avatar: "",
nickName: "",
+ nameEn: "",
+ userName: "",
roles: [],
permissions: [],
},
@@ -30,6 +32,12 @@
},
SET_NICKNAME: (state, nickName) => {
state.nickName = nickName;
+ },
+ SET_NAMEEN: (state, nameEn) => {
+ state.nameEn = nameEn;
+ },
+ SET_USERNAME: (state, userName) => {
+ state.userName = userName;
},
SET_ROLES: (state, roles) => {
state.roles = roles;
@@ -101,6 +109,8 @@
commit("SET_NAME", user.userName);
commit("SET_AVATAR", avatar);
commit("SET_NICKNAME", user.nickName);
+ commit("SET_NAMEEN", user.nameEn);
+ commit("SET_USERNAME", user.userName);
resolve(res);
})
.catch((error) => {
diff --git a/src/utils/auth.js b/src/utils/auth.js
index 41bbf84..f37484f 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -5,9 +5,9 @@
}
export function setToken(token) {
- localStorage.setItem(TokenKey, token)
+ return localStorage.setItem(TokenKey, token)
}
export function removeToken() {
- localStorage.removeItem(TokenKey)
+ return localStorage.removeItem(TokenKey)
}
diff --git a/src/utils/date.js b/src/utils/date.js
index 3f4a780..6d2c1a5 100644
--- a/src/utils/date.js
+++ b/src/utils/date.js
@@ -51,4 +51,31 @@
return format
}
return ''
+}
+
+/**
+ * 鑾峰彇骞存湀鏃� 26鍙�+1
+ * @param date
+ * @returns {string}
+ */
+export function getYearAndMonthAndDaysZTZB(date = new Date()) {
+ let year = date.getFullYear();
+ let month = date.getMonth();
+ let days = date.getDate();
+
+ // 鍒ゆ柇鏄惁鏄�26鍙�
+ if (days === 26) {
+ month++;
+ if (month > 11) {
+ month = 0;
+ year++;
+ }
+ }
+
+ month += 1;
+ month = month < 10 ? '0' + month + '-' : month + '-';
+ year = year + '-';
+ days = days < 10 ? '0' + days : days;
+
+ return (year + month + days);
}
\ No newline at end of file
diff --git a/src/utils/dict/DictOptions.js b/src/utils/dict/DictOptions.js
index 338a94e..9eb9daf 100644
--- a/src/utils/dict/DictOptions.js
+++ b/src/utils/dict/DictOptions.js
@@ -8,7 +8,6 @@
* 瀛楀吀璇锋眰锛屾柟娉曠鍚嶄负function(dictMeta: DictMeta): Promise
*/
request: (dictMeta) => {
- console.log(`load dict ${dictMeta.type}`)
return Promise.resolve([])
},
/**
diff --git a/src/utils/excelFountion.js b/src/utils/excelFountion.js
index eced05c..3cd11a9 100644
--- a/src/utils/excelFountion.js
+++ b/src/utils/excelFountion.js
@@ -46,7 +46,6 @@
let min = null;
if (val && val.length > 0) {
val = val.filter((item) => item != null && item !== "");
- // console.log(val)
if (val.length > 0) {
min = Math.min(...val);
}
@@ -255,7 +254,6 @@
fouList.forEach((item) => {
f = f.replace(new RegExp(item, "g"), "");
});
- // console.log('f',f)
let arr = f.split(",").filter((item) => {
return (
item && /[a-zA-Z]/.test(item) && item != "undefined" && item != "null"
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
index ae715cd..f485eed 100644
--- a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
@@ -1,18 +1,13 @@
<template>
<div>
- <div style="
- display: flex;
- justify-content: flex-end;
- margin-right: 20px;
- margin-bottom: 20px;
- ">
+ <div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">
<el-button size="small" type="primary" @click="searchList">鍒锋柊</el-button>
<el-button icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateStore('add')">娣诲姞</el-button>
<el-button icon="el-icon-download" size="small" @click="importExcel">瀵煎嚭excel</el-button>
</div>
<div class="table">
<limsTable :column="tableColumn" :height="'calc(100vh - 20em)'" :table-data="storageTableData"
- :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination">
+ :table-loading="tableLoading" :page="page" @pagination="pagination">
</limsTable>
</div>
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
index 5b93065..4a8cb64 100644
--- a/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
@@ -153,7 +153,6 @@
width: 250px;
height: 100%;
background: #fff;
- margin-right: 10px;
border-radius: 16px;
box-sizing: border-box;
padding: 10px 16px;
@@ -163,9 +162,8 @@
background: #fff;
width: calc(100% - 15em);
height: 100%;
- border-radius: 16px;
box-sizing: border-box;
- padding: 10px 16px;
+ padding: 0 20px 0 10px;
}
.purchase-page {
display: flex;
diff --git a/src/views/CNAS/externalService/supplierManage/index.vue b/src/views/CNAS/externalService/supplierManage/index.vue
index ccbe3fb..35e2f1b 100644
--- a/src/views/CNAS/externalService/supplierManage/index.vue
+++ b/src/views/CNAS/externalService/supplierManage/index.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.supplierName" clearable size="small"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="getTableData">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="getTableData">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/personnel/personalOverview/index.vue b/src/views/CNAS/personnel/personalOverview/index.vue
index 5ed24de..03266c7 100644
--- a/src/views/CNAS/personnel/personalOverview/index.vue
+++ b/src/views/CNAS/personnel/personalOverview/index.vue
@@ -1,15 +1,16 @@
<template>
<div class="capacity-scope">
- <div>
- <el-form :model="entity" ref="entity" size="small" :inline="true">
- <el-form-item label="浜哄憳鍚嶇О">
- <el-input v-model="entity.name" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-button @click="refresh">閲� 缃�</el-button>
- <el-button type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div class="search_box">
+ <div class="search_item">
+ <span class="search_label">浜哄憳鍚嶇О</span>
+ <el-input v-model="entity.name" clearable @keyup.enter.native="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()"></el-input>
+ </div>
+ <div class="search_button">
+ <el-button size="mini" type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">鏌ヨ</el-button>
+ <el-button @click="refresh" size="mini">閲嶇疆</el-button>
+ </div>
+ </div>
</div>
<div class="table" v-loading="loading">
<scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list" v-if="list.length>0||loading">
@@ -199,4 +200,23 @@
line-height: 20px;
color: #fff;
}
+.search_box {
+ display: flex;
+}
+.search_item {
+ margin-bottom: 18px;
+ margin-right: 10px;
+ display: flex;
+ align-items: center;
+ line-height: 32px;
+}
+.search_label {
+ width: 88px;
+ font-size: 14px;
+ font-weight: 700;
+ color: #606266;
+}
+.search_button {
+ line-height: 30px;
+}
</style>
diff --git a/src/views/CNAS/personnel/personnelInfo/components/AddInDetail.vue b/src/views/CNAS/personnel/personnelInfo/components/AddInDetail.vue
index 564fee1..396c5da 100644
--- a/src/views/CNAS/personnel/personnelInfo/components/AddInDetail.vue
+++ b/src/views/CNAS/personnel/personnelInfo/components/AddInDetail.vue
@@ -161,7 +161,7 @@
},
// 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
getUserList() {
- selectUserCondition().then(res => {
+ selectUserCondition({type: 2}).then(res => {
if (res.code == 200) {
this.responsibleOptions = res.data
}
diff --git a/src/views/CNAS/personnel/personnelInfo/components/Edit.vue b/src/views/CNAS/personnel/personnelInfo/components/Edit.vue
index 0076ed3..af8e822 100644
--- a/src/views/CNAS/personnel/personnelInfo/components/Edit.vue
+++ b/src/views/CNAS/personnel/personnelInfo/components/Edit.vue
@@ -28,7 +28,7 @@
<el-row style="margin: 15px 0">
<el-form>
<el-row>
- <el-col :span="5">
+ <el-col :span="6">
<el-form-item label="鍩硅鏃ユ湡:">
<el-date-picker v-model="trainingForm.openingTime" format="yyyy-MM-dd" :disabled="currentRow.state !== 3"
placeholder="閫夋嫨鏃ユ湡" size="small" value-format="yyyy-MM-dd"
@@ -103,25 +103,23 @@
</el-table>
</div>
<el-dialog :visible.sync="selectUserDia" title="閫夋嫨鐢ㄦ埛" width="70%">
- <div class="search" style="margin-bottom: 9px;">
- <div class="search_thing">
- <div class="search_label">鐢ㄦ埛鍚嶏細</div>
- <div class="search_input">
+ <div>
+ <el-form :model="addUserTableInfo" ref="addUserTableInfo" size="small" :inline="true" label-position="left" label-width="100">
+ <el-form-item label="鐢ㄦ埛鍚�" prop="name">
<el-input
v-model="addUserTableInfo.name"
clearable
placeholder="璇疯緭鍏�"
size="small"
- @keyup.enter.native="selectUserList"
+ @input="selectUserList"
></el-input>
- </div>
- </div>
+ </el-form-item>
+ </el-form>
</div>
<div v-if="selectUserDia" class="body" style="height: 60vh;">
<lims-table :tableData="tableData1" :column="column1"
:isSelection="true" :handleSelectionChange="selectMethod"
- @pagination="pagination1" :height="'calc(100vh - 290px)'"
- :page="page1" :tableLoading="tableLoading1"></lims-table>
+ height="500" :tableLoading="tableLoading1"></lims-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="selectUserDia = false">鍙� 娑�</el-button>
@@ -139,7 +137,7 @@
import {
newPersonnelAddedToTrainingRecords,
outOfFocusPreservation, trainingAndAssessmentRecordsAdded, trainingAndAssessmentRecordsEvaluate,
- trainingAndAssessmentRecordsPage
+ trainingAndAssessmentRecordsPage, deleteTrainingAndAssessmentRecords
} from "@/api/cnas/personal/personalTraining";
export default {
@@ -203,7 +201,7 @@
if (params == 0) {
return '鍚敤'
} else {
- return ''
+ return '鍋滅敤'
}
},
formatType: (params) => {
@@ -223,6 +221,7 @@
},
addUserTableInfo: {
name: null,
+ type: 2
},
multipleSelection: [],
userList: [],
@@ -260,19 +259,16 @@
addPerson() {
this.isSelectedList = this.trainingTableData.map(item => item.userId)
this.selectUserDia = true;
+ this.selectUserList()
},
selectUserList () {
this.tableLoading1 = true
selectUserCondition({...this.addUserTableInfo}).then(res => {
- this.tableData1 = res.data.records
- this.page1.total = res.data.total
+ this.tableLoading1 = false
+ this.tableData1 = res.data
}).catch(err => {
this.tableLoading1 = false
})
- },
- pagination1 (page) {
- this.page1.size = page.limit
- this.selectUserList()
},
// 琛ㄦ牸閫夋嫨鏂规硶
selectMethod(val) {
@@ -305,15 +301,13 @@
},
batchDelete() {
if (this.multipleSelection.length > 0) {
- let ids = this.multipleSelection.map(item => item.trainingRecordId)
+ let ids = this.multipleSelection.map(item => item.trainingRecordId).join(',')
this.$confirm('鏄惁纭鍒犻櫎鎵�閫夋嫨鐨勬暟鎹�?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- let formData = new FormData()
- formData.append('ids', ids)
- deleteTrainingAndAssessmentRecords(formData).then(res => {
+ deleteTrainingAndAssessmentRecords({ids: ids}).then(res => {
if (res.code == 200) {
this.$message.success('鍒犻櫎鎴愬姛');
this.getInfo()
@@ -407,32 +401,6 @@
margin-bottom: 10px;
}
-.el-divider {
- margin: 0 1em 1em 0;
-}
-
-.form__input_label {
- width: 90px;
- margin-right: 6px;
- color: #606266;
-}
-
-.form__input_label2 {
- width: 210px;
- margin-right: 6px;
- color: #606266;
-}
-.search_thing {
- display: flex;
- align-items: center
-}
-.search_label {
- width: 120px;
-}
-.pagination {
- display: flex;
- justify-content: space-between
-}
.items_center {
float: left;
@@ -444,10 +412,5 @@
width: 50%;
float: right;
margin-bottom: 1em;
-}
-
-.search {
- width: 180px;
- padding: 0 16px;
}
</style>
diff --git a/src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue b/src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue
index 8ac6ea6..9df925c 100644
--- a/src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue
+++ b/src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue
@@ -100,7 +100,7 @@
* @desc 鑾峰彇鐢ㄦ埛淇℃伅
*/
async getUserList() {
- selectUserCondition().then((res) => {
+ selectUserCondition({type: 2}).then((res) => {
this.userList = res.data;
})
},
diff --git a/src/views/CNAS/personnel/personnelInfo/components/mandateAdd.vue b/src/views/CNAS/personnel/personnelInfo/components/mandateAdd.vue
index 9e77475..51f7254 100644
--- a/src/views/CNAS/personnel/personnelInfo/components/mandateAdd.vue
+++ b/src/views/CNAS/personnel/personnelInfo/components/mandateAdd.vue
@@ -141,7 +141,7 @@
* @desc 鑾峰彇鐢ㄦ埛淇℃伅
*/
async getUserList() {
- selectUserCondition().then((res) => {
+ selectUserCondition({type: 2}).then((res) => {
this.userList = res.data;
})
},
diff --git a/src/views/CNAS/personnel/personnelInfo/index.vue b/src/views/CNAS/personnel/personnelInfo/index.vue
index 3435533..b75b5a1 100644
--- a/src/views/CNAS/personnel/personnelInfo/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/index.vue
@@ -272,10 +272,6 @@
</script>
<style scoped>
->>>.el-table__body-wrapper::-webkit-scrollbar {
- height: 14px;
- /* 璁剧疆婊氬姩鏉″搴� */
-}
.node_i {
color: orange;
font-size: 18px;
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue b/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue
index 7f835ff..c048536 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/job-responsibilities.vue
@@ -1,16 +1,18 @@
<!-- 宀椾綅鑱岃矗 -->
<template>
<div class="view">
- <div style="display: flex;justify-content: space-between;">
- <el-form ref="page" size="small" :inline="true">
- <el-form-item label="鍛樺伐">
- <el-input v-model="userName" clearable placeholder="璇疯緭鍏ュ憳宸�" size="small" style="width: 20vh;"></el-input>
- </el-form-item>
- <el-form-item>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 50px;font-size: 14px;font-weight: 700;color: #606266;">鍛樺伐</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="userName"
+ @keyup.enter.native="refreshTable"></el-input>
+ </div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="refreshTable">鏌ヨ</el-button>
- </el-form-item>
- </el-form>
- <div>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="addPost">鏂板</el-button>
<!-- <el-button size="small" type="primary">瀵煎嚭excel</el-button>-->
</div>
@@ -351,7 +353,7 @@
},
// 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
getUserList() {
- selectUserCondition().then(res => {
+ selectUserCondition({type: 2}).then(res => {
if (res.code == 200) {
this.responsibleOptions = res.data
}
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue
index ac989ea..2dd7789 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue
@@ -1,16 +1,18 @@
<!-- 浜哄憳鑳藉姏 -->
<template>
<div>
- <div style="display: flex;justify-content: space-between;">
- <el-form ref="page" size="small" :inline="true">
- <el-form-item label="濮撳悕">
- <el-input v-model="userName" placeholder="璇疯緭鍏ュ鍚�" size="small" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary" @click="refreshTable">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">濮撳悕</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="userName"
+ @keyup.enter.native="refreshTable"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button v-if="!isDepartment" size="small" type="primary" @click="addAppointPost('add')">鏂板</el-button>
</div>
</div>
@@ -181,13 +183,24 @@
</el-radio-group>
</el-form-item>
</el-col>
- <el-col :span="24">
+ <el-col :span="12">
<el-form-item prop="confirmOperatingPersonnelId" label="纭浜猴細">
<el-select v-model="form.confirmOperatingPersonnelId" clearable :disabled="operationType === 'view' || operationType === 'confirm'"
- filterable size="small" style="width: 50%;">
+ filterable size="small">
<el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item prop="confirmDate" label="纭鏃堕棿锛�">
+ <el-date-picker v-model="form.confirmDate"
+ format="yyyy-MM-dd"
+ :disabled="operationType === 'view' || operationType === 'confirm'"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ type="date"></el-date-picker>
</el-form-item>
</el-col>
</el-form>
@@ -250,33 +263,33 @@
{
label: '宀椾綅',
prop: 'postName',
- minWidth: '100'
+ width: '100'
}, {
label: '濮撳悕',
prop: 'userName',
- minWidth: '100'
+ width: '100'
}, {
label: '瀛﹀巻',
prop: 'academicDegree',
- minWidth: '100'
+ width: '100'
}, {
label: '涓撲笟',
prop: 'major',
- minWidth: '100'
+ width: '100'
}, {
label: '鑱岀О',
prop: 'professionalTitle',
- minWidth: '100'
+ width: '100'
}, {
dataType: 'slot',
label: '宀椾綅鑱岃矗',
prop: 'jobResponsibilities',
- minWidth: '200px',
+ width: '400',
slot: 'jobResponsibilities'
}, {
dataType: 'tag',
label: '缁煎悎璇勪环',
- minWidth: '140px',
+ width: '140px',
prop: 'comprehensiveAssessment',
formatData: (params) => {
if (params == 'Qualified this position') {
@@ -299,14 +312,13 @@
}, {
label: '纭浜�',
prop: 'confirmOperatingPersonnelName',
- minWidth: '100'
+ width: '100'
}, {
label: '纭鏃ユ湡',
prop: 'confirmDate',
- minWidth: '160'
+ width: '160'
}, {
dataType: 'action',
- minWidth: '220',
label: '鎿嶄綔',
fixed: 'right',
operation: [
@@ -378,6 +390,7 @@
responsibleOptions: [],
rules: {
confirmOperatingPersonnelId: [{ required: true, message: '璇烽�夋嫨纭浜�', trigger: 'change' }],
+ confirmDate: [{ required: true, message: '璇烽�夋嫨纭鏃堕棿', trigger: 'change' }],
userId: [{ required: true, message: '璇烽�夋嫨浜哄憳', trigger: 'change' }],
academicDegree: [{ required: true, message: '璇疯緭鍏ュ鍘嗘煡鏍哥粨鏋�', trigger: 'blur' }],
academicConformNot: [{ required: true, message: '璇烽�夋嫨瀛﹀巻绗﹀悎涓庡惁', trigger: 'change' }],
@@ -543,7 +556,7 @@
this.dialogVisible = false;
},
getUserList(){
- selectUserCondition().then(res => {
+ selectUserCondition({type: 2}).then(res => {
if (res.code == 200) {
this.responsibleOptions = res.data
}
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue
index f88158d..0a7c9d5 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue
@@ -1075,11 +1075,6 @@
</script>
<style scoped>
->>>.el-table__body-wrapper::-webkit-scrollbar {
- height: 12px;
- /* 璁剧疆婊氬姩鏉″搴� */
-}
-
>>>.el-form-item {
margin-bottom: 3px;
}
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue
index 3936a69..aac448d 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-list.vue
@@ -1,16 +1,18 @@
<template>
<div>
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="entity" ref="entity" size="small" :inline="true">
- <el-form-item label="浜哄憳鍚嶇О">
- <el-input v-model="entity.name" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-button size="small" style="margin-left: 10px" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">浜哄憳鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.name"
+ @keyup.enter.native="refreshTable"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button>
<el-button size="small" type="primary" @click="openSelectUserDia">鏂板缓</el-button>
</div>
@@ -57,7 +59,7 @@
</div>
<div v-if="selectUserDia" class="body" style="height: 60vh;">
<lims-table :tableData="tableData1" :column="column1" :isSelection="true" :handleSelectionChange="selectMethod"
- height="560" :tableLoading="tableLoading1"></lims-table>
+ height="520" :tableLoading="tableLoading1"></lims-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="selectUserDia = false">鍙� 娑�</el-button>
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
index bb5600a..a003633 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
@@ -5,16 +5,18 @@
<div class="title">
<span style="font-weight: bold">骞村害璁″垝</span>
</div>
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="page" ref="page" size="small" :inline="true">
- <el-form-item label="缂栧埗浜�">
- <el-input v-model="page.compilerName" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary" @click="getYearPlanList(departId)">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">缂栧埗浜�</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="page.compilerName"
+ @keyup.enter.native="getYearPlanList(departId)"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="getYearPlanList(departId)">鏌ヨ</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="uploadDia = true, getUserList()">瀵煎叆</el-button>
</div>
</div>
@@ -26,25 +28,22 @@
<div class="title">
<span style="font-weight: bold">骞村害璁″垝鏄庣粏</span>
</div>
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="inDetailForm" ref="inDetailForm" size="small" :inline="true">
- <el-form-item label="鍩硅璁插笀">
- <el-input v-model="inDetailForm.trainingLecturerName" class="search" clearable placeholder="璇疯緭鍏�"
- size="small"></el-input>
- </el-form-item>
- <el-form-item label="鍩硅鏃ユ湡">
- <el-date-picker v-model="inDetailForm.trainingDate" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
- size="small" type="date" value-format="yyyy-MM-dd"></el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary" @click="searchTable">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鍩硅璁插笀</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="inDetailForm.trainingLecturerName"
+ @keyup.enter.native="searchTable"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button size="mini" type="primary" @click="searchTable">鏌ヨ</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button v-if="isDepartment && currentChangeRow && isOperation" size="small"
- @click="batchDelete">鎵归噺鍒犻櫎</el-button>
+ @click="batchDelete">鎵归噺鍒犻櫎</el-button>
<el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" type="primary"
- @click="addTrainingPlan('add')">鏂板</el-button>
+ @click="addTrainingPlan('add')">鏂板</el-button>
</div>
</div>
<lims-table :tableData="inDetailPlanTableData" :column="inDetailPlanColumn"
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 c51ea52..d902602 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue
@@ -1,27 +1,28 @@
<!-- 濂栨儵璁板綍 -->
<template>
<div>
- <div class="view">
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="search" ref="page" size="small" :inline="true">
- <el-form-item label="濮撳悕">
- <el-input v-model="search.userName" clearable placeholder="璇疯緭鍏ュ叧閿瓧" size="small"
- style="width: 20vh;"></el-input>
- </el-form-item>
- <el-form-item label="濂栨儵鏃ユ湡">
- <el-date-picker v-model="search.searchTimeList" :picker-options="pickerOptions" align="right" clearable
- end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�"
- style="width: 100%" type="daterange" unlink-panels value-format="yyyy-MM-dd 00:00:00">
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">鏌ヨ</el-button>
- </el-form-item>
- </el-form>
- <div>
- <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button>
- <el-button size="small" type="primary" @click="addRow">鏂板</el-button>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">濮撳悕</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="search.userName"
+ @keyup.enter.native="getPersonnelTraining(departId)"></el-input>
</div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">濂栨儵鏃ユ湡</span>
+ <el-date-picker v-model="search.searchTimeList" :picker-options="pickerOptions" align="right" clearable
+ @change="getPersonnelTraining(departId)"
+ 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>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button size="mini" type="primary" @click="getPersonnelTraining(departId)">鏌ヨ</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button>
+ <el-button size="small" type="primary" @click="addRow">鏂板</el-button>
</div>
</div>
<div class="table">
@@ -254,7 +255,7 @@
},
// 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
getUserList() {
- selectUserCondition().then(res => {
+ selectUserCondition({type: 2}).then(res => {
if (res.code == 200) {
this.responsibleOptions = res.data
}
@@ -319,3 +320,8 @@
}
};
</script>
+<style scoped>
+.dateTime >>>.el-form-item__content {
+ width: 260px;
+}
+</style>
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/training-record.vue b/src/views/CNAS/personnel/personnelInfo/tabs/training-record.vue
index a2642b7..52d1c4b 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/training-record.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/training-record.vue
@@ -6,15 +6,18 @@
<div class="title">
<span style="font-weight: bold">骞村害璁″垝</span>
</div>
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="trainingPagination" ref="trainingPagination" size="small" :inline="true">
- <el-form-item label="濮撳悕">
- <el-input v-model="trainingPagination.userName" class="search" clearable placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">濮撳悕</span>
+ <el-input v-model="trainingPagination.userName" class="search"
+ @keyup.enter.native="getPersonnelTraining(departId)"
+ clearable placeholder="璇疯緭鍏�" size="small"></el-input>
+ </div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="getPersonnelTraining(departId)">鏌ヨ</el-button>
- </el-form-item>
- </el-form>
+ </div>
+ </div>
</div>
<lims-table :tableData="trainingTableData" :column="trainingColumn"
ref="trainingTableData"
@@ -34,6 +37,7 @@
clearable
format="yyyy"
placeholder="閫夋嫨骞�"
+ @change="queryPersonnelDetailsPage(currentChangeRow.userId)"
size="small"
type="year"
value-format="yyyy">
@@ -141,9 +145,6 @@
label: '鍩硅鍐呭',
prop: 'trainingContent'
}, {
- label: '鍩硅璇炬椂',
- prop: 'educationBackground'
- }, {
label: '璇炬椂',
prop: 'classHour'
}, {
@@ -168,22 +169,6 @@
this.getPersonnelTraining(this.departId);
},
methods: {
- // exportExcel() {
- // this.outLoading = true;
- // const name = this.isDepartment ? 'departmentId' : 'userId';
- // this.$axios.get(this.$api.personal.personTrackRecordExport + `&${name}=` + this.departId, { responseType: 'blob' }).then(res => {
- // this.outLoading = false;
- // this.$message.success('瀵煎嚭鎴愬姛');
- // const blob = new Blob([res], { type: 'application/octet-stream' });
- // const url = URL.createObjectURL(blob);
- // const link = document.createElement('a');
- // link.href = url;
- // link.download = '鍩硅璁板綍.xlsx';
- // link.click();
- // }).catch(err => {
- // this.outLoading = false;
- // })
- // },
// 鏌ヨ
refreshTable() {
this.getPersonnelTraining(this.departId);
diff --git a/src/views/CNAS/process/complaint/index.vue b/src/views/CNAS/process/complaint/index.vue
index ca806a0..dad8264 100644
--- a/src/views/CNAS/process/complaint/index.vue
+++ b/src/views/CNAS/process/complaint/index.vue
@@ -12,8 +12,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/process/demand/index.vue b/src/views/CNAS/process/demand/index.vue
index ef70abd..e77260c 100644
--- a/src/views/CNAS/process/demand/index.vue
+++ b/src/views/CNAS/process/demand/index.vue
@@ -19,24 +19,24 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
- <div style="text-align: right; margin-bottom: 20px">
- <el-button size="small" type="primary" @click="goAdd">鏂板</el-button>
- </div>
+ </div>
+ <div style="text-align: right; margin-bottom: 10px">
+ <el-button size="small" type="primary" @click="goAdd">鏂板</el-button>
</div>
<div class="table">
<el-table v-loading="tableListLoading" :data="tableList"
- height="630" style="width: 100%" border :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
- <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column>
- <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip width="120"></el-table-column>
- <el-table-column label="濮旀墭缂栧彿" prop="entrustCode" show-overflow-tooltip width="120"></el-table-column>
- <el-table-column label="濮旀墭鏃堕棿" prop="commissionDate" width="120"></el-table-column>
- <el-table-column label="鍨嬪彿" prop="modelNo"></el-table-column>
- <el-table-column label="濮旀墭鍗曚綅" prop="commissionUnit" show-overflow-tooltip width="120"></el-table-column>
- <el-table-column label="鐢熶骇鍗曚綅" prop="production" show-overflow-tooltip width="120"></el-table-column>
+ height="630" border :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
+ <el-table-column align="center" label="搴忓彿" type="index"></el-table-column>
+ <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip></el-table-column>
+ <el-table-column label="濮旀墭缂栧彿" prop="entrustCode" show-overflow-tooltip></el-table-column>
+ <el-table-column label="濮旀墭鏃堕棿" prop="commissionDate" show-overflow-tooltip></el-table-column>
+ <el-table-column label="鍨嬪彿" prop="modelNo" show-overflow-tooltip></el-table-column>
+ <el-table-column label="濮旀墭鍗曚綅" prop="commissionUnit" show-overflow-tooltip></el-table-column>
+ <el-table-column label="鐢熶骇鍗曚綅" prop="production" show-overflow-tooltip></el-table-column>
<el-table-column label="濮旀墭浜�" prop="commissionUser"></el-table-column>
<el-table-column label="鏍峰搧鏁伴噺" prop="quantity"></el-table-column>
<el-table-column label="鏍峰搧鐘舵��" prop="sampleStatus"></el-table-column>
@@ -46,13 +46,13 @@
<span v-if="scope.row.isLeave === 0">鍚�</span>
</template>
</el-table-column>
- <el-table-column label="鏍峰搧澶勭悊鏂瑰紡" prop="processing">
+ <el-table-column label="鏍峰搧澶勭悊鏂瑰紡" prop="processing" width="150">
<template slot-scope="scope">
<span v-if="scope.row.processing === 1">瀹為獙瀹ゅ鐞�</span>
<span v-if="scope.row.processing === 0">濮旀墭鍗曚綅鍙栧洖</span>
</template>
</el-table-column>
- <el-table-column align="center" label="鎿嶄綔" width="240" fixed="right">
+ <el-table-column align="center" label="鎿嶄綔" width="240">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="goUpdate(scope.row)">缂栬緫</el-button>
<el-button size="mini" type="text" @click="handleLook(scope.row)">鏌ョ湅</el-button>
diff --git a/src/views/CNAS/process/disposal/sampleDisposal/index.vue b/src/views/CNAS/process/disposal/sampleDisposal/index.vue
new file mode 100644
index 0000000..1cbcb06
--- /dev/null
+++ b/src/views/CNAS/process/disposal/sampleDisposal/index.vue
@@ -0,0 +1,564 @@
+<template>
+ <div class="capacity-scope">
+ <div style="display: flex;justify-content: space-between;align-items: flex-start">
+ <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true">
+ <el-form-item label="骞存湀" prop="month">
+ <el-date-picker v-model="queryParams0.month" type="month" placeholder="閫夋嫨鏈�" format="yyyy-MM"
+ value-format="yyyy-MM" size="small" @change="refreshTable()">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ <el-button size="small" type="primary" @click="handleAdd0">鏂板</el-button>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading"
+ key="tableData0" :height="'calc(100vh - 240px)'" :page="page0" @pagination="pagination0"></lims-table>
+ </div>
+ <el-dialog title="璇︽儏" :visible.sync="editDialogVisible" width="70%">
+ <el-button size="small" type="primary" @click="handleAdd('add')" style="margin-bottom: 10px">鏂板</el-button>
+ <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading"
+ key="tableData" :height="'calc(100vh - 290px)'">
+ </lims-table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="editDialogVisible = false">鍙栨秷</el-button>
+ </span>
+ </el-dialog>
+ <!-- 鏂板鏍峰搧 -->
+ <el-dialog title="鏂板" :visible.sync="addDialogVisible" width="400px" @close="closeAddDialogVisible">
+ <el-form ref="addInfo" :model="addInfo" :rules="rules" label-width="120px">
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.sampleName"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="鏍峰搧缂栧彿" prop="sampleCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.sampleCode"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="渚涙牱鍗曚綅" prop="sampleSupplier">
+ <el-select v-model="addInfo.sampleSupplier" size="small">
+ <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList"
+ :key="item.id"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="鏁伴噺" prop="num">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.num"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="澶勭悊鏂瑰紡" prop="dealMethod">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.dealMethod"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="鏃堕棿" prop="dealTime">
+ <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeAddDialogVisible">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitAdd" :loading="addLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!-- 鏂板鍘嗗彶 -->
+ <el-dialog title="鏂板" :visible.sync="addDialogVisibleDeal" width="400px" @close="closeDiaDeal">
+ <el-form ref="addInfoDeal" :model="addInfoDeal" :rules="rulesDeal" label-width="80px">
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="鏈堜唤" prop="month">
+ <el-date-picker v-model="addInfoDeal.month" type="month" size="small" placeholder="閫夋嫨鏈堜唤" format="yyyy-MM"
+ value-format="yyyy-MM" style="width: 100%;">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeDiaDeal">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitAddDeal" :loading="addLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!-- 璇︽儏/涓嬭浇/瀹℃牳/鎵瑰噯 -->
+ <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="400px" :class="{ downPdf: title0 == '涓嬭浇' }"
+ :modal="title0 != '涓嬭浇'" top="5vh">
+ <span>鏄惁閫氳繃{{title0}}锛�</span>
+ <span slot="footer" class="dialog-footer" v-if="title0 == '瀹℃牳' || title0 == '鎵瑰噯'">
+ <el-button @click="submitCheck('涓嶉�氳繃')" :loading="noCheckLoading">涓嶉�氳繃</el-button>
+ <el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import filePreview from "@/components/Preview/filePreview.vue";
+import { selectCustomPageList } from "@/api/system/customer";
+import {
+ doProcessDeal,
+ addProcessDeal,
+ submitProcessTotaldeal,
+ checkProcessTotaldeal,
+ ratifyProcessTotaldeal,
+ delProcessDeal,
+ pageProcessTotaldeal, getProcessDeal, addProcessTotaldeal,
+ exportProcessTotaldeal
+} from "@/api/cnas/process/sampleDisposal";
+export default {
+ name: 'SampleDisposal',
+ components: {
+ limsTable,
+ filePreview,
+ },
+ data() {
+ return {
+ title: '鏂板',
+ addDialogVisible: false,
+ addLoading: false,
+ outLoading: false,
+ editDialogVisible: false,
+ queryParams: {},
+ submitState: '',
+ lookDialogVisible: false,
+ title0: '鏌ョ湅',
+ noCheckLoading: false,
+ checkLoading: false,
+ // 鍘嗗彶鍒楄〃
+ addInfo: {},//鏂板鏍峰搧
+ addInfoDeal: {
+ month: ''
+ },//鏂板鏍峰搧
+ addDialogVisibleDeal: false,
+ rules: {
+ sampleName: [{ required: true, message: '璇峰~鍐欐牱鍝佸悕绉�', trigger: 'blur' }],
+ sampleCode: [{ required: true, message: '璇峰~鍐欐牱鍝佺紪鍙�', trigger: 'blur' }],
+ sampleSupplier: [{ required: true, message: '璇烽�夋嫨渚涙牱鍗曚綅', trigger: 'change' }],
+ num: [{ required: true, message: '璇峰~鍐欐暟閲�', trigger: 'blur' }],
+ dealMethod: [{ required: true, message: '璇峰~鍐欏鐞嗘柟寮�', trigger: 'blur' }],
+ dealTime: [{ required: true, message: '璇烽�夋嫨鏃堕棿', trigger: 'change' }],
+ },
+ rulesDeal: {
+ month: [{ required: true, message: '璇烽�夋嫨鏈堜唤', trigger: 'change' }],
+ },
+ customPageList: [],
+ currentInfo: {
+ arr: []
+ },//鏌ョ湅鐨勮鎯�
+ outPower: false,
+ addPower: false,
+ tableData: [],
+ column: [
+ { label: "鏍峰搧鍚嶇О", prop: "sampleName" },
+ { label: "鏍峰搧缂栧彿", prop: "sampleCode" },
+ { label: "渚涙牱鍗曚綅", prop: "sampleSupplier" },
+ { label: "鏁伴噺", prop: "num" },
+ { label: "澶勭悊鏂瑰紡", prop: "dealMethod" },
+ { label: "鏃堕棿", prop: "dealTime" },
+ {
+ dataType: "action",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleAdd('edit',row);
+ },
+ disabled: (row) => {
+ return this.submitState === '宸叉彁浜�'
+ }
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return this.submitState === '宸叉彁浜�'
+ }
+ },
+ ],
+ },
+ ],
+ tableLoading: false,
+ queryParams0: {},
+ tableData0: [],
+ column0: [
+ { label: "鏈堜唤", prop: "month" },
+ { label: "鎻愪氦浜�", prop: "submitUserName" },
+ {
+ dataType: 'tag',
+ label: '鎻愪氦鐘舵��',
+ prop: 'submitState',
+ formatData: (params) => {
+ return params
+ },
+ formatType: (params) => {
+ if (params === '寰呮彁浜�') {
+ return 'danger';
+ } else if (params === '宸叉彁浜�') {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },
+ { label: "瀹℃牳浜�", prop: "examineUserName" },
+ {
+ dataType: 'tag',
+ label: '瀹℃牳鐘舵��',
+ prop: 'examineState',
+ formatData: (params) => {
+ return params
+ },
+ formatType: (params) => {
+ if (params === '涓嶉�氳繃') {
+ return 'danger';
+ } else if (params === '閫氳繃') {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ {
+ dataType: 'tag',
+ label: '鎵瑰噯鐘舵��',
+ prop: 'ratifyState',
+ formatData: (params) => {
+ return params
+ },
+ formatType: (params) => {
+ if (params === '涓嶉�氳繃') {
+ return 'danger';
+ } else if (params === '閫氳繃') {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },
+ {
+ dataType: "action",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook(row);
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDown0(row);
+ }
+ },
+ {
+ name: "鎻愪氦",
+ type: "text",
+ clickFun: (row) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return !!row.submitState && row.submitState != '寰呮彁浜�'
+ }
+ },
+ {
+ name: "瀹℃牳",
+ type: "text",
+ clickFun: (row) => {
+ this.handleCheck(row);
+ },
+ disabled: (row) => {
+ return row.examineState == '閫氳繃' || row.submitState == '寰呮彁浜�'
+ }
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleApproval(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃' || row.submitState == '寰呮彁浜�'
+ }
+ },
+ ],
+ },
+ ],
+ page0: {
+ total: 0,
+ size: 20,
+ current: 1,
+ },
+ operationType: ''
+ };
+ },
+ mounted() {
+ this.getList0()
+ },
+ methods: {
+ // 鑾峰彇閫佹牱鍗曚綅鍒楄〃
+ getCustomPageList() {
+ selectCustomPageList({
+ current: -1,
+ size: -1
+ }).then(res => {
+ this.customPageList = res.data.records
+ }).catch(err => { });
+ },
+ handleDown() { },
+ refresh() {
+ this.queryParams0 = {};
+ this.page0.current = 1;
+ this.getList0();
+ },
+ refreshTable() {
+ this.page0.current = 1;
+ this.getList0();
+ },
+ // 鏌ヨ鍏ㄩ儴璁板綍
+ getList0() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams0, ...this.page0 };
+ delete param.total;
+ pageProcessTotaldeal({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ this.page0.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination0({ page, limit }) {
+ this.page0.current = page;
+ this.page0.size = limit;
+ this.getList0();
+ },
+ // 鎵撳紑鏂板鍘嗗彶鐣岄潰
+ handleAdd0() {
+ this.addDialogVisibleDeal = true
+ this.addInfoDeal.month = ''
+ },
+ closeAddDialogVisible() {
+ this.$refs['addInfo'].resetFields();
+ this.addDialogVisible = false
+ },
+ // 鎻愪氦鏂板-鍘嗗彶
+ submitAddDeal () {
+ this.$refs.addInfoDeal.validate(valid => {
+ if (valid) {
+ // 鏂板
+ this.addLoading = true
+ addProcessTotaldeal({
+ ...this.addInfoDeal
+ }).then(res => {
+ this.addLoading = false
+ this.addDialogVisibleDeal = false
+ this.$message({
+ type: 'success',
+ message: '鏂板鎴愬姛!'
+ });
+ this.getList0()
+ }).catch(err => {
+ this.addLoading = false
+ });
+ }
+ })
+ },
+ closeDiaDeal() {
+ this.$refs['addInfoDeal'].resetFields();
+ this.addDialogVisibleDeal = false
+ },
+ // 鎻愪氦
+ handleSubmit(row) {
+ this.$confirm('鏄惁鎻愪氦 ' + row.month + ' 鏈堜唤鐨勬暟鎹�', '鎻愪氦', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ submitProcessTotaldeal({
+ id: row.id
+ }).then(res => {
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { });
+ })
+ },
+ // 鏌ョ湅
+ handleLook(row) {
+ this.queryParams.id = row.id
+ this.submitState = row.submitState
+ this.$nextTick(() => {
+ this.editDialogVisible = true
+ this.getList();
+ })
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams };
+ getProcessDeal({ ...param }).then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ // 鎵撳紑鏂板璇︽儏寮规
+ handleAdd(type, row) {
+ this.addDialogVisible = true
+ this.getCustomPageList()
+ this.operationType = type
+ if (row) {
+ this.addInfo = {...row}
+ }
+ },
+ // 鎻愪氦-璇︽儏
+ submitAdd() {
+ this.$refs.addInfo.validate(valid => {
+ if (valid) {
+ this.addLoading = true
+ addProcessDeal({
+ totaldealId: this.queryParams.id,
+ ...this.addInfo
+ }).then(res => {
+ this.addLoading = false
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鏂板鎴愬姛!'
+ });
+ this.getList()
+ }).catch(err => {
+ this.addLoading = false
+ });
+ }
+ })
+ },
+ // 鎻愪氦淇敼璇︽儏
+ handleEdit() {
+ if (type === 'submit') {
+ doProcessDeal({
+ id: row.id,
+ ...row
+ }).then(res => {
+ this.$message({
+ type: 'success',
+ message: '缂栬緫鎴愬姛!'
+ });
+ this.getList();
+ }).catch(err => { });
+ }
+ },
+ // 瀹℃牳
+ handleCheck(row) {
+ this.title0 = '瀹℃牳'
+ this.lookDialogVisible = true
+ this.currentInfo = row
+ this.queryParams.id = row.id
+ },
+ // 鎵瑰噯
+ handleApproval(row) {
+ this.title0 = '鎵瑰噯'
+ this.lookDialogVisible = true
+ this.currentInfo = row
+ this.queryParams.id = row.id
+ },
+ // 鎻愪氦瀹℃牳/鎵瑰噯
+ submitCheck(state) {
+ if (state == '閫氳繃') {
+ this.checkLoading = true
+ } else {
+ this.noCheckLoading = true
+ }
+ if (this.title0 == '瀹℃牳') {
+ checkProcessTotaldeal({
+ id: this.currentInfo.id,
+ state: state
+ }).then(res => {
+ this.checkLoading = false
+ this.noCheckLoading = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ this.lookDialogVisible = false
+ }).catch(err => { });
+ } else if (this.title0 == '鎵瑰噯') {
+ ratifyProcessTotaldeal({
+ id: this.currentInfo.id,
+ state: state
+ }).then(res => {
+ this.checkLoading = false
+ this.noCheckLoading = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ this.lookDialogVisible = false
+ }).catch(err => { });
+ }
+ },
+ // 瀵煎嚭璇︽儏
+ handleDown0(row) {
+ exportProcessTotaldeal({ id: row.id }).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '鏍峰搧澶勭悊' + '.docx');
+ })
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(() => {
+ delProcessDeal({ id: row.id }).then((res) => {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.getList();
+ });
+ }).catch(() => { });
+ },
+ },
+}
+</script>
+
+<style scoped>
+>>>.el-dialog__body {
+ padding-top: 10px;
+}
+</style>
diff --git a/src/views/CNAS/process/disposal/sampleReceipt/index.vue b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
new file mode 100644
index 0000000..46ada41
--- /dev/null
+++ b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
@@ -0,0 +1,340 @@
+<template>
+ <div class="capacity-scope">
+ <div style="display: flex;justify-content: space-between;align-items: flex-start">
+ <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true">
+ <el-form-item label="鏀舵牱鏃ユ湡" prop="receiveDate">
+ <el-date-picker v-model="queryParams0.receiveDate" type="date" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" size="small" @change="refreshTable()">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ <el-button size="small" @click="handleDown0">瀵煎嚭</el-button>
+ </div>
+
+ <div class="table">
+ <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading0"
+ key="tableData0"
+ :height="'calc(100vh - 240px)'" :page="page0" @pagination="pagination0">
+ <div slot="action" slot-scope="scope">
+ <el-button type="text" @click="handleAdd(scope.row)">缂栬緫</el-button>
+ <el-button type="text" @click="delRow(scope.row)">
+ <span style="color: #F56C6C">鍒犻櫎</span>
+ </el-button>
+ </div>
+ </lims-table>
+ </div>
+ <!-- 鏂板鏍峰搧 -->
+ <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px">
+ <el-row>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏀舵牱鏃ユ湡锛�</div>
+ <div class="search_input">
+ <el-date-picker v-model="addInfo.receiveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏍峰搧鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.sampleName"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏍峰搧缂栧彿锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.sampleCode"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏁伴噺锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.num"></el-input>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏉ユ牱鍗曚綅锛�</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.sampleSupplier" size="small">
+ <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList"
+ :key="item.id"></el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鐣欐牱鏃ユ湡锛�</div>
+ <div class="search_input">
+ <el-date-picker v-model="addInfo.leaveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏍峰搧鐘舵�侊細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.sampleState"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">澶勭悊鏃ユ湡锛�</div>
+ <div class="search_input">
+ <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitAdd" :loading="addLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!-- 璇︽儏/涓嬭浇/瀹℃牳/鎵瑰噯 -->
+ <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == '涓嬭浇' }"
+ :modal="title0 != '涓嬭浇'" top="5vh">
+ <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
+ style="max-height: 70vh;overflow-y: auto;" />
+ <span slot="footer" class="dialog-footer" v-if="title0 == '瀹℃牳' || title0 == '鎵瑰噯'">
+ <el-button @click="submitCheck('涓嶉�氳繃')" :loading="noCheckLoading">涓嶉�氳繃</el-button>
+ <el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import filePreview from "@/components/Preview/filePreview.vue";
+import { selectCustomPageList } from "@/api/system/customer";
+import {
+ pageProcessSample,
+ delProcessSample,
+ addProcessSample,
+ exportProcessSample
+} from "@/api/cnas/process/sampleDisposal";
+export default {
+ name: 'SampleReceipt',
+ components: {
+ limsTable,
+ filePreview,
+ },
+ data() {
+ return {
+ activeName: '濉啓',
+ title: '鏂板',
+ addDialogVisible: false,
+ addLoading: false,
+ outLoading: false,
+ editDialogVisible: false,
+ lookDialogVisible: false,
+ title0: '鏌ョ湅',
+ noCheckLoading: false,
+ checkLoading: false,
+ // 鍘嗗彶鍒楄〃
+ addInfo: {},//鏂板鏍峰搧
+ customPageList: [],
+ currentInfo: {
+ arr: []
+ },//鏌ョ湅鐨勮鎯�
+ queryParams0: {
+ receiveDate: ''
+ },
+ tableLoading0: false,
+ tableData0: [],
+ column0: [
+ {
+ label: "鏀舵牱鏃ユ湡",
+ prop: "receiveDate",
+ },
+ {
+ label: "鏍峰搧缂栧彿",
+ prop: "sampleCode",
+ },
+ {
+ label: "鏍峰搧鍚嶇О",
+ prop: "sampleName",
+ },
+ {
+ label: "鏍峰搧鏁伴噺",
+ prop: "num",
+ },
+ {
+ label: "鏉ユ牱鍗曚綅",
+ prop: "sampleSupplier",
+ },
+ {
+ label: "鐣欐牱鏃ユ湡",
+ prop: "leaveDate",
+ },
+ {
+ label: "鏍峰搧鐘舵��",
+ prop: "sampleState",
+ },
+ {
+ label: "閫�鏍风鏀�/澶勭悊鏃ユ湡",
+ prop: "dealTime",
+ },
+ {
+ dataType: "slot",
+ slot: "action",
+ label: "鎿嶄綔",
+ }
+ ],
+ page0: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ };
+ },
+ mounted() {
+ this.getList0()
+ },
+ methods: {
+ // 鑾峰彇閫佹牱鍗曚綅鍒楄〃
+ getCustomPageList() {
+ selectCustomPageList({
+ current: -1,
+ size: -1
+ }).then(res => {
+ this.customPageList = res.data.records
+ }).catch(err => { });
+ },
+ refresh() {
+ this.queryParams0 = {};
+ this.page0.current = 1;
+ this.getList0();
+ },
+ refreshTable() {
+ this.page0.current = 1;
+ this.getList0();
+ },
+ // 鏌ヨ琛ㄦ牸鏁版嵁
+ getList0() {
+ this.tableLoading0 = true;
+ let param = { ...this.queryParams0, ...this.page0 };
+ delete param.total;
+ pageProcessSample({ ...param })
+ .then((res) => {
+ this.tableLoading0 = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ this.page0.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading0 = false;
+ });
+ },
+ pagination0({ page, limit }) {
+ this.page0.current = page;
+ this.page0.size = limit;
+ this.getList0();
+ },
+ // 鎵撳紑缂栬緫寮规
+ handleAdd(row) {
+ this.addInfo = this.HaveJson(row)
+ this.title = '缂栬緫'
+ this.addDialogVisible = true
+ this.getCustomPageList()
+ },
+ delRow(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delProcessSample({ id: row.id }).then(res => {
+ if (res.code == 200) {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refreshTable();
+ }
+ }).catch(err => { });
+ })
+ .catch(() => { });
+ },
+ // 鎻愪氦鏂板
+ submitAdd() {
+ // 缂栬緫
+ this.addLoading = true
+ addProcessSample({
+ ...this.addInfo
+ }).then(res => {
+ this.addLoading = false
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '缂栬緫鎴愬姛!'
+ });
+ this.page0.current = 1;
+ this.refreshTable();
+ }).catch(err => { });
+ },
+ // 瀵煎嚭璇︽儏
+ handleDown0() {
+ exportProcessSample({ receiveDate: this.queryParams0.receiveDate }).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '鏍峰搧鎺ユ敹' + '.docx');
+ })
+ },
+ },
+}
+</script>
+
+<style scoped>
+.search_thing {
+ width: 350px;
+ display: flex;
+ align-items: center;
+}
+
+.search_label {
+ width: 110px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 110px);
+}
+
+.downPdf {
+ opacity: 0 !important;
+}
+
+.tables td {
+ height: 40px;
+ width: 100px;
+ text-align: center;
+ font-size: 14px;
+ word-wrap: break-word;
+ white-space: normal;
+}
+
+.user-info .el-button {
+ margin: 0;
+}
+
+>>>.el-tabs__content {
+ height: 100%;
+}
+</style>
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue
index 8f666c5..eebccca 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue
@@ -5,7 +5,7 @@
<el-upload ref='upload'
:action="fileAction"
:auto-upload="true"
- :before-upload="fileBeforeUpload" :data="{detailsEvaluateId: info.detailsEvaluateId}"
+ :before-upload="fileBeforeUpload" :data="{qualityMonitorDetailsId: info.qualityMonitorDetailsId}"
:headers="uploadHeader" :on-error="onError"
:on-success="handleSuccessUp"
:show-file-list="false"
@@ -101,7 +101,7 @@
// 鏌ヨ闄勪欢鍒楄〃
searchTableList () {
this.tableLoading = true
- getEvaluateFileList({detailsEvaluateId:this.info.detailsEvaluateId}).then(res => {
+ getEvaluateFileList({qualityMonitorDetailsId:this.info.qualityMonitorDetailsId}).then(res => {
this.tableLoading = false
if (res.code === 200){
this.tableData = res.data
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
index 7b4f94e..70a291d 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
@@ -1,4 +1,5 @@
<template>
+<!--璐ㄩ噺鐩戞帶-瀹炴柦娴佺▼椤甸潰-->
<div>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="瀹炴柦"
width="60%" @close="closeCarryOutDia">
@@ -144,7 +145,10 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeCarryOutDia">鍙� 娑�</el-button>
- <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 0" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ 杩�</el-button>
</span>
</el-dialog>
</div>
@@ -157,6 +161,7 @@
getQualityMonitorRatify
} from "@/api/cnas/process/ensureResults/qualityMonitor";
import { selectUserCondition } from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
export default {
name: 'carryOutDialog',
@@ -185,7 +190,11 @@
personList: [],
editLoad: false,
isCarryOut: false, // 鏄惁涓哄疄鏂�
+ ratifyUserId: ''
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
@@ -198,9 +207,9 @@
searchInfo(row) {
getQualityMonitorRatify({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => {
// 鏈塪etailsRatifyId鍒欒鏄庢彁浜よ繃瀹炴柦淇℃伅
- if (res.data.detailsRatifyId) {
+ if (res.data.ratifyUserId) {
// 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
- if (res.data.isFinish == 0) {
+ if (res.data.isFinish != 1) {
this.currentStep = 1
} else if (res.data.isFinish == 1) {
this.currentStep = 2
@@ -209,21 +218,18 @@
this.currentStep = 0
}
this.form = res.data
+ this.ratifyUserId = res.data.ratifyUserId
}).catch(err => {
console.log('err---', err);
})
},
// 鎻愪氦
- handleEdit() {
- if (!this.form.ratifyUserId) {
- this.$message.warning('璇烽�夋嫨鎵瑰噯浜�')
- return
- }
+ handleEdit(isFinish) {
this.editLoad = true
if (this.currentStep == 0) {
this.addInfo()
} else {
- this.editInfo()
+ this.editInfo(isFinish)
}
},
// 鎻愪氦瀹炴柦
@@ -238,7 +244,8 @@
})
},
// 鎻愪氦鎵瑰噯
- editInfo() {
+ editInfo(isFinish) {
+ this.form.isFinish = isFinish
addQualityMonitorRatifyOpinion(this.form).then(res => {
this.editLoad = false
this.$message.success('鎿嶄綔鎴愬姛')
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue
index 25d5c22..0d35fc6 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue
@@ -4,9 +4,6 @@
:visible.sync="formDia"
title="璐ㄩ噺鐩戞帶璇勪环"
width="60%" @close="closeEvaDia">
- <div style="text-align: right">
- <el-button size="small" type="primary" @click="viewTestRecord" :disabled="currentStep === 0">闄勪欢涓婁紶</el-button>
- </div>
<el-steps :active="currentStep" align-center finish-status="success">
<el-step title="鐩戞帶璁″垝瀹炴柦鎯呭喌" @click.native="setStep(0)"></el-step>
<el-step title="鐩戞帶缁撴灉璇勪环" @click.native="setStep(1)"></el-step>
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
index e5119d0..efd399a 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
@@ -2,44 +2,50 @@
<!-- 7.7璐ㄩ噺鐩戞帶璁″垝-->
<div class="app-container">
<div class="table-card">
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="yearForm" ref="yearForm" size="small" :inline="true">
- <el-form-item label="璁″垝鍚嶇О" prop="monitorName">
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">璁″垝鍚嶇О</span>
<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>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearPlanList">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ @keyup.enter.native="getYearPlanList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="getYearPlanList">鏌ヨ</el-button>
+ <el-button size="mini" @click="clearYear">閲嶇疆</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="leadInto">瀵煎叆</el-button>
</div>
</div>
<lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading"
- height="40vh" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table>
+ :height="'calc(100vh - 34em)'" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table>
</div>
<div style="margin-top: 20px">
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="yearDetailForm" ref="yearDetailForm" size="small" :inline="true">
- <el-form-item label="鐩戞帶鐩殑" prop="monitorPurpose">
- <el-input v-model="yearDetailForm.monitorPurpose" placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鐩戞帶椤圭洰" prop="monitorProject">
- <el-input v-model="yearDetailForm.monitorProject" placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button icon="el-icon-refresh" size="mini" @click="clearDetail">閲� 缃�</el-button>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearDetailPlanList">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鐩戞帶鐩殑</span>
+ <el-input v-model="yearDetailForm.monitorPurpose" placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getYearDetailPlanList"></el-input>
+ </div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鐩戞帶椤圭洰</span>
+ <el-input v-model="yearDetailForm.monitorProject" placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getYearDetailPlanList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="getYearDetailPlanList">鏌ヨ</el-button>
+ <el-button size="mini" @click="clearDetail">閲嶇疆</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button size="small" type="primary" @click="exportSignatureTemplate">瀵煎嚭绛惧悕妯℃澘</el-button>
<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"
+ :tableLoading="yearDetailLoading" :height="'calc(100vh - 34em)'" @pagination="pagination1" ref="yearDetailTableData"
key="yearDetailTableData"></lims-table>
</div>
<!--鏂板淇敼寮规-->
@@ -47,7 +53,7 @@
@closeDia="closeDia"></detail-form-dialog>
<!--瀹炴柦娴佺▼寮规-->
<carry-out-dialog v-if="carryOutDia" ref="carryOutDia" :qualityMonitorId="qualityMonitorId"
- @closeDia="closeCarryOutDia"></carry-out-dialog>
+ @closeCarryOutDia="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">
@@ -97,9 +103,11 @@
</el-dialog>
<el-dialog :visible.sync="downloadDialog" title="瀵煎嚭" width="600px">
<span>
- <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId"
+ <el-button plain type="primary" :disabled="download.detailsRatifyStatus !== 3"
@click="controlDown">瀹炴柦璁″垝瀵煎嚭</el-button>
- <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId"
+ <el-button plain type="primary" :disabled="!download.finishReportUrl"
+ @click="finishReportExport">瀹屾垚鎶ュ憡瀵煎嚭</el-button>
+ <el-button plain type="primary" :disabled="download.evaluateStatus !== 3"
@click="processingDown">璇勪环瀵煎嚭</el-button>
</span>
<span slot="footer" class="dialog-footer">
@@ -156,6 +164,7 @@
<el-button :loading="uploading1" type="primary" @click="submitUpload1()">涓� 浼�</el-button>
</span>
</el-dialog>
+ <view-record v-if="ViewRecord" ref="ViewRecord"></view-record>
</div>
</template>
@@ -174,14 +183,16 @@
} from "@/api/cnas/process/ensureResults/qualityMonitor";
import { selectUserCondition } from "@/api/performance/class";
import { mapGetters } from "vuex";
+import ViewRecord from "./components/ViewRecord.vue";
export default {
name: 'EnsureResultsValidity',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: { limsTable, filePreview, EvaluateDialog, CarryOutDialog, DetailFormDialog },
+ components: {ViewRecord, limsTable, filePreview, EvaluateDialog, CarryOutDialog, DetailFormDialog },
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
+ ViewRecord: false,
examineUserId: '',
responsibleOptions: [],
yearForm: {
@@ -196,20 +207,20 @@
{
label: '璁″垝鍚嶇О',
prop: 'monitorName',
- minWidth: '150px'
+ width: '150px'
}, {
label: '缂栧埗浜�',
prop: 'writeName',
- minWidth: '100'
+ width: '100'
}, {
label: '缂栧埗鏃ユ湡',
prop: 'writeTime',
- minWidth: '160'
+ width: '160'
}, {
dataType: 'tag',
label: '瀹℃牳鐘舵��',
prop: 'examineStatus',
- minWidth: '100',
+ width: '100',
formatData: (params) => {
if (params === 0) {
return '涓嶉�氳繃';
@@ -231,20 +242,20 @@
}, {
label: '瀹℃牳鍐呭',
prop: 'examineRemark',
- minWidth: '100'
+ width: '100'
}, {
label: '瀹℃牳浜�',
prop: 'examineName',
- minWidth: '100'
+ width: '100'
}, {
label: '瀹℃牳鏃ユ湡',
prop: 'examineTime',
- minWidth: '160'
+ width: '160'
}, {
dataType: 'tag',
label: '鎵瑰噯鐘舵��',
prop: 'ratifyStatus',
- minWidth: '100',
+ width: '100',
formatData: (params) => {
if (params === 0) {
return '涓嶆壒鍑�';
@@ -266,18 +277,17 @@
}, {
label: '鎵瑰噯鍐呭',
prop: 'ratifyRemark',
- minWidth: '100'
+ width: '100'
}, {
label: '鎵瑰噯浜�',
prop: 'ratifyName',
- minWidth: '100'
+ width: '100'
}, {
label: '鎵瑰噯鏃ユ湡',
prop: 'ratifyTime',
- minWidth: '160'
+ width: '160'
}, {
dataType: 'action',
- minWidth: '190',
label: '鎿嶄綔',
fixed: 'right',
operation: [
@@ -355,30 +365,122 @@
}, {
label: '璁″垝寮�灞曟椂闂�',
prop: 'plannedTime',
- minWidth: '150px'
+ width: '150px'
}, {
label: '鐩戞帶椤圭洰',
prop: 'monitorProject',
- minWidth: '150px'
+ width: '150px'
}, {
label: '鍙傚姞鍗曚綅锛堜汉鍛橈級',
prop: 'participant',
- minWidth: '150px'
+ width: '190px'
}, {
label: '棰勭畻锛堝厓锛�',
prop: 'budget',
- minWidth: '150px'
+ width: '150px'
}, {
label: '缁勭粐浜哄憳',
prop: 'organization',
- minWidth: '150px'
+ width: '150px'
}, {
label: '鐩戞帶鏂瑰紡',
prop: 'monitorWay',
- minWidth: '150px'
+ width: '150px'
+ },{
+ dataType: 'tag',
+ label: '瀹炴柦鐘舵��',
+ prop: 'detailsRatifyStatus',
+ width: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '鏈紑濮�';
+ } else if (params === 1) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
+ return '宸叉壒鍑�';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return '';
+ } else if (params === 1) {
+ return 'warning';
+ } else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },{
+ dataType: 'tag',
+ label: '鎶ュ憡鐘舵��',
+ prop: 'reportStatus',
+ width: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '鏈紑濮�';
+ } else if (params === 1) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
+ return '宸叉壒鍑�';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return '';
+ } else if (params === 1) {
+ return 'warning';
+ } else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },{
+ dataType: 'tag',
+ label: '璇勪环鐘舵��',
+ prop: 'evaluateStatus',
+ width: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '鏈紑濮�';
+ } else if (params === 1) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '寰呮壒鍑�';
+ } else if (params === 3) {
+ return '宸叉壒鍑�';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return '';
+ } else if (params === 1) {
+ return 'warning';
+ } else if (params === 2) {
+ return 'info';
+ } else if (params === 3) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
}, {
dataType: 'action',
- width: '280',
label: '鎿嶄綔',
fixed: 'right',
operation: [
@@ -408,6 +510,13 @@
type: 'text',
clickFun: (row) => {
this.evaluate(row)
+ }
+ },
+ {
+ name: '闄勪欢涓婁紶',
+ type: 'text',
+ clickFun: (row) => {
+ this.viewTestRecord(row)
}
},
{
@@ -661,6 +770,7 @@
this.yearDetailLoading = false
this.yearDetailTableData = res.data.records
this.yearDetailPage.total = res.data.total
+ this.$refs.yearDetailTableData.$refs.multipleTable.doLayout()
}).catch(err => {
console.log('err---', err);
this.yearDetailLoading = false
@@ -743,6 +853,13 @@
this.evaluateDialog = false
this.getYearDetailPlanList()
},
+ // 闄勪欢涓婁紶
+ viewTestRecord (row) {
+ this.ViewRecord = true
+ this.$nextTick(() => {
+ this.$refs.ViewRecord.openDia(row)
+ })
+ },
// 鎵撳紑瀵煎嚭寮规
downLoadPost(row) {
this.downloadDialog = true
@@ -766,6 +883,15 @@
const blob = new Blob([res], { type: 'application/msword' });
this.$download.saveAs(blob, '璐ㄩ噺鐩戞帶瀹炴柦璁″垝.docx')
})
+ },
+ // 瀹屾垚鎶ュ憡瀵煎嚭
+ finishReportExport() {
+ let url = this.download.finishReportUrl;
+ const link = document.createElement('a');
+ link.href = this.javaApi +'/word/' + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
},
// 澶勭悊鍗曞鍑�
processingDown() {
@@ -797,6 +923,14 @@
selectUserCondition().then((res) => {
this.responsibleOptions = res.data;
})
+ },
+ exportSignatureTemplate() {
+ let url = '璐ㄩ噺鐩戞帶璁板綍绛惧悕妯℃澘.docx';
+ const link = document.createElement('a');
+ link.href = this.javaApi +'/word/' + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
}
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
index 7672cfe..4a5424e 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
@@ -10,12 +10,12 @@
<el-date-picker
v-model="form.superviseTime"
clearable
- format="yyyy-MM"
+ format="yyyy.M"
placeholder="閫夋嫨鏃ユ湡"
size="small"
style="width: 100%"
type="month"
- value-format="yyyy-MM">
+ value-format="yyyy.M">
</el-date-picker>
</el-form-item>
</el-col>
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue
index 0b7fb4b..c96c0bb 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue
@@ -82,12 +82,6 @@
<p><span class="required-span">* </span>琚洃鐫d汉锛�</p>
</td>
<td class="td-info">
-<!-- <el-select v-if="currentStep === 0" v-model="form.supervisedUserId" clearable-->
-<!-- filterable-->
-<!-- placeholder="璇烽�夋嫨" size="small">-->
-<!-- <el-option v-for="(item,i) in supervisedUserList" :key="i" :label="item.label" :value="item.value">-->
-<!-- </el-option>-->
-<!-- </el-select>-->
<span class="td-info1"> {{ form.supervisedUserName }}</span>
</td>
<td class="td-title">
@@ -303,7 +297,10 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeProcessingDia">鍙� 娑�</el-button>
- <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ 杩�</el-button>
</span>
</el-dialog>
</div>
@@ -315,6 +312,7 @@
getSuperviseDetailAccording
} from "@/api/cnas/process/ensureResults/qualitySupervise";
import {selectUserCondition} from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
export default {
name: 'processingSheet',
@@ -359,42 +357,48 @@
editLoad: false,
personList: [],
supervisedUserList: [],
+ supervisedUserId: '',
+ approverUserId: ''
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
openDia (row) {
this.formDia = true
- this.searchInfo(row)
this.form.superviseDetailsId = row.superviseDetailsId
+ this.supervisedUserId = row.supervisedUserId
+ this.searchInfo(row)
this.form.approveId = row.approveId
this.getAuthorizedPerson() // 鑾峰彇浜哄憳鍒楄〃
// this.getSupervisedUserList() // 鑾峰彇褰撳墠閮ㄩ棬浜哄憳
},
// 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅
searchInfo (row) {
- this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
- getSuperviseDetailAccording({superviseDetailsId: row.superviseDetailsId}).then(res => {
+ getSuperviseDetailAccording({superviseDetailsId: this.form.superviseDetailsId}).then(res => {
this.form.supervisedUserId = res.data.supervisedUserId
this.form.supervisedUserName = res.data.supervisedUserName
- if (res.data.superviseDetailsAccordingId === null) {
- this.currentStep = 0
- } else {
- this.form = res.data
- if (res.data.isFinish === 0) {
- if (res.data.approverUserId) {
- this.currentStep = 1
- }
- } else {
+ if (res.data.approverUserId) {
+ // 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
+ if (res.data.isFinish != 1) {
+ this.currentStep = 1
+ } else if (res.data.isFinish == 1) {
this.currentStep = 2
}
+ } else {
+ this.currentStep = 0
}
+ this.form = res.data
+ this.form.superviseDetailsId = row.superviseDetailsId
+ this.approverUserId = res.data.approverUserId
}).catch(err => {
console.log('err---', err);
})
},
// 鎻愪氦
- handleEdit () {
+ handleEdit (isFinish) {
if (this.currentStep === 0) {
if (this.form.findWay === null) {
this.$message.warning('璇烽�夋嫨涓嶇鍚堝伐浣滃彂鐜伴�斿緞')
@@ -416,10 +420,6 @@
this.$message.warning('璇烽�夋嫨鏄惁闇�瑕侀噰鍙栫籂姝f帾鏂�')
return
}
- if (!this.form.approverUserId) {
- this.$message.warning('璇烽�夋嫨鎵瑰噯浜�')
- return
- }
}
this.editLoad = true
this.form.flowType = this.currentStep
@@ -433,6 +433,7 @@
this.editLoad = false
})
} else {
+ this.form.isFinish = isFinish
approverEquipSuperviseDetailAccording(this.form).then(res => {
this.editLoad = false
this.$message.success('鎵瑰噯鎴愬姛')
@@ -460,18 +461,6 @@
this.personList = data;
});
},
- // getSupervisedUserList () {
- // this.$axios.get(this.$api.user.selectDepartmentLimsUserList).then(res => {
- // let data = []
- // res.data.forEach(a => {
- // data.push({
- // label: a.name,
- // value: a.id
- // })
- // })
- // this.supervisedUserList = data
- // })
- // },
}
};
</script>
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
index 3c57bb1..9a8bf6b 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
@@ -25,8 +25,8 @@
<p><span class="required-span">* </span>鐩戠潱鍛橈細</p>
</td>
<td colspan="2">
- <el-select v-if="currentStep === 0" @change="usePersonName" v-model="form.supervisorId" placeholder="璇烽�夋嫨" size="small" style="width: 100%">
- <el-option v-for="item in recordUserList" :key="item.userId" :label="item.userName" :value="item.userId"></el-option>
+ <el-select v-if="currentStep === 0" @change="usePersonName" v-model="form.supervisor" placeholder="璇烽�夋嫨" size="small" style="width: 100%">
+ <el-option v-for="item in recordUserList" :key="item.userName" :label="item.userName" :value="item.userName"></el-option>
</el-select>
<span v-else class="td-info"> {{ form.supervisor }}</span>
</td>
@@ -235,7 +235,10 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeRecordsDia">鍙� 娑�</el-button>
- <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ 杩�</el-button>
</span>
</el-dialog>
</div>
@@ -248,6 +251,7 @@
getSuperviseDetailRecord
} from "@/api/cnas/process/ensureResults/qualitySupervise";
import {selectUserCondition} from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
export default {
name: 'recordsDialog',
@@ -285,12 +289,18 @@
editLoad: false,
personList: [],
recordUserList: [],
+ supervisedUserId: '',
+ ratifyUserId: '',
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
openDia(row) {
this.formDia = true
+ this.supervisedUserId = row.supervisedUserId
this.searchInfo(row)
this.getAuthorizedPerson()
},
@@ -304,11 +314,11 @@
searchInfo (row) {
getSuperviseDetailRecord({superviseDetailsId: row.superviseDetailsId}).then(res => {
// 鏈塻uperviseDetailsRecordId璇存槑鎻愪氦杩囪褰�
- if (res.data.superviseDetailsRecordId) {
+ if (res.data.ratifyUserId) {
// 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
- if (res.data.isFinish === 0) {
+ if (res.data.isFinish != 1) {
this.currentStep = 1
- } else if (res.data.isFinish === 1) {
+ } else if (res.data.isFinish == 1) {
this.currentStep = 2
}
} else {
@@ -316,13 +326,14 @@
}
this.form = res.data
this.form.superviseDetailsId = row.superviseDetailsId
+ this.ratifyUserId = res.data.ratifyUserId
this.getRecordUser()
}).catch(err => {
console.log('err---', err);
})
},
// 鎻愪氦娴佺▼
- handleEdit () {
+ handleEdit (isFinish) {
if (!this.form.testMember || !this.form.supervisor || !this.form.testItem || !this.form.sampleNumber
|| !this.form.testDate) {
this.$message.warning('璇峰~鍐欏畬鏁�')
@@ -331,15 +342,11 @@
if (this.currentStep === 0) {
this.addInfo()
} else {
- this.editInfo()
+ this.editInfo(isFinish)
}
},
// 鎻愪氦璁板綍
addInfo () {
- if (!this.form.ratifyUserId) {
- this.$message.warning('璇烽�夋嫨涓嬩竴姝ユ壒鍑嗕汉')
- return
- }
this.editLoad = true
addSuperviseDetailRecord(this.form).then(res => {
this.editLoad = false
@@ -351,7 +358,7 @@
})
},
// 鎻愪氦鎵瑰噯
- editInfo () {
+ editInfo (isFinish) {
if (!this.form.ratifyOpinion) {
this.$message.warning('璇峰~鍐欏鎵规剰瑙�')
return
@@ -361,6 +368,7 @@
return
}
this.editLoad = true
+ this.form.isFinish = isFinish
addSuperviseRecordOpinion(this.form).then(res => {
this.editLoad = false
this.$message.success('鎿嶄綔鎴愬姛')
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue
index da1212b..344497c 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue
@@ -38,18 +38,6 @@
<span v-if="currentStep !== 0" class="td-info1"> {{ form.raiseResult }}</span>
</td>
</tr>
-<!-- <tr v-if="showStep === 0">-->
-<!-- <td v-if="currentStep === 0" class="td-title">-->
-<!-- <p><span class="required-span">* </span>璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉锛�</p>-->
-<!-- </td>-->
-<!-- <td v-if="currentStep === 0" class="td-info" colspan="3">-->
-<!-- <el-select v-model="form.causeUserId" clearable filterable-->
-<!-- placeholder="璇烽�夋嫨" size="small">-->
-<!-- <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">-->
-<!-- </el-option>-->
-<!-- </el-select>-->
-<!-- </td>-->
-<!-- </tr>-->
<tr v-if="currentStep !== 0">
<td class="td-title">
<p>鎻愬嚭浜猴細</p>
@@ -130,18 +118,6 @@
{{form.causeTime}}
</td>
</tr>
-<!-- <tr v-if="showStep === 0">-->
-<!-- <td v-if="currentStep === 0" class="td-title">-->
-<!-- <p><span class="required-span">* </span>璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉锛�</p>-->
-<!-- </td>-->
-<!-- <td v-if="currentStep === 0" class="td-info" colspan="3">-->
-<!-- <el-select v-model="form.correctUserId" clearable filterable-->
-<!-- placeholder="璇烽�夋嫨" size="small">-->
-<!-- <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">-->
-<!-- </el-option>-->
-<!-- </el-select>-->
-<!-- </td>-->
-<!-- </tr>-->
<tr>
<td class="td-title">
<p><span class="required-span">* </span>绾犳鎺柦锛�</p>
@@ -266,7 +242,10 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeRectifyDia">鍙� 娑�</el-button>
- <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ 杩�</el-button>
</span>
</el-dialog>
</div>
@@ -279,6 +258,7 @@
} from "@/api/cnas/process/ensureResults/qualitySupervise";
import {selectUserCondition} from "@/api/business/inspectionTask";
import {getThisYearTrainingDetailed} from "@/api/cnas/systemManagement/correctiveAction";
+import {mapGetters} from "vuex";
export default {
name: 'rectifyDialog',
@@ -289,7 +269,6 @@
return {
formDia: false,
currentStep: 0,
- showStep: 0,
form: {
superviseDetailsId: '',
raiseResult: '',
@@ -320,7 +299,12 @@
editLoad: false,
personList: [],
yearTrainingDetailed: [],
+ supervisedUserId: '',
+ approverUserId: ''
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
@@ -329,6 +313,7 @@
this.searchInfo(row)
this.form.superviseDetailsId = row.superviseDetailsId
this.form.approveId = row.approveId
+ this.supervisedUserId = row.supervisedUserId
this.getAuthorizedPerson() // 鑾峰彇浜哄憳鍒楄〃
this.getYearTrainingDetailed() // 鑾峰彇鍩硅璁″垝
},
@@ -336,27 +321,24 @@
searchInfo (row) {
this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
getSuperviseDetailCorrect({superviseDetailsId: row.superviseDetailsId}).then(res => {
- if (res.data.superviseDetailsCorrectId === null) {
- this.showStep = 0
- this.currentStep = 0
- } else {
- this.form = res.data
- if (res.data.isFinish === 0) {
- if (res.data.approverUserId) {
- this.showStep = 1
- this.currentStep = 1
- }
- } else {
+ if (res.data.approverUserId) {
+ // 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
+ if (res.data.isFinish != 1) {
+ this.currentStep = 1
+ } else if (res.data.isFinish == 1) {
this.currentStep = 2
- this.showStep = 1
}
+ } else {
+ this.currentStep = 0
}
+ this.form = res.data
+ this.approverUserId = res.data.approverUserId
}).catch(err => {
console.log('err---', err);
})
},
// 鎻愪氦
- handleEdit () {
+ handleEdit (isFinish) {
if (this.currentStep === 0) {
if (!this.form.raiseResult) {
this.$message.warning('璇峰~鍐欎笉鍚堟牸鎻忚堪')
@@ -387,6 +369,7 @@
this.editLoad = false
})
} else {
+ this.form.isFinish = isFinish
approveEquipSuperviseDetailCorrect(this.form).then(res => {
this.editLoad = false
this.$message.success('鎵瑰噯鎴愬姛')
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
index 36da145..2bcb6aa 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
@@ -2,18 +2,19 @@
<!-- 7.7璐ㄩ噺鐩戠潱璁″垝-->
<div class="app-container">
<div class="table-card">
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="yearForm" ref="yearForm" size="small" :inline="true">
- <el-form-item label="璁″垝鍚嶇О" prop="superviseName">
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">璁″垝鍚嶇О</span>
<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>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearPlanList">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ @keyup.enter.native="getYearPlanList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="getYearPlanList">鏌ヨ</el-button>
+ <el-button size="mini" @click="clearYear">閲嶇疆</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="record">瀵煎叆</el-button>
</div>
</div>
@@ -21,32 +22,35 @@
height="40vh" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table>
</div>
<div style="margin-top: 20px">
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="yearDetailForm" ref="yearDetailForm" size="small" :inline="true">
- <el-form-item>
- <el-radio-group v-model="yearDetailForm.causeType" @change="getYearDetailPlanList" size="small">
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <el-radio-group v-model="yearDetailForm.causeType" @change="getYearDetailPlan" size="small">
<el-radio-button :label="1">瀹氭湡鐩戠潱</el-radio-button>
<el-radio-button :label="2">鍔ㄦ�佺洃鐫�</el-radio-button>
</el-radio-group>
- </el-form-item>
- <el-form-item label="鐩戞帶鐩殑" prop="supervisePurpose">
- <el-input v-model="yearDetailForm.supervisePurpose" placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鐩戞帶椤圭洰" prop="superviseProject">
- <el-input v-model="yearDetailForm.superviseProject" placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button icon="el-icon-refresh" size="mini" @click="clearDetail">閲� 缃�</el-button>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearDetailPlanList">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
- <div>
+ </div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鐩戞帶鐩殑</span>
+ <el-input v-model="yearDetailForm.supervisePurpose" placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getYearDetailPlan"></el-input>
+ </div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鐩戞帶椤圭洰</span>
+ <el-input v-model="yearDetailForm.superviseProject" placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getYearDetailPlan"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="getYearDetailPlan">鏌ヨ</el-button>
+ <el-button size="mini" @click="clearDetail">閲嶇疆</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<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>
+ :tableLoading="yearDetailLoading" height="40vh" @pagination="pagination1" key="yearDetailColumnData"></lims-table>
</div>
<!--鏂板淇敼寮规-->
<detail-form-dialog v-if="formDia" ref="formDia" :superviseId="superviseId"
@@ -59,7 +63,7 @@
@closeProcessingDia="closeProcessingDia"></processing-sheet>
<!--绾犳澶勭悊娴佺▼寮规-->
<rectify-dialog-new v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId"
- @closeProcessingDia="closeRectifyDia"></rectify-dialog-new>
+ @closeRectifyDia="closeRectifyDia"></rectify-dialog-new>
<el-dialog :visible.sync="ratifyDialog" title="鎵瑰噯" width="30%" @close="closeRatifyDia">
<span>
鎵瑰噯澶囨敞锛�
@@ -72,9 +76,9 @@
</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>
+ <el-button plain type="primary" :disabled="download.recordStatus !== 3" @click="controlDown">璁板綍鍗曞鍑�</el-button>
+ <el-button plain type="primary" :disabled="download.accordingStatus !== 3" @click="processingDown">澶勭悊鍗曞鍑�</el-button>
+ <el-button plain type="primary" :disabled="download.correctStatus !== 3" @click="supervisoryDown">绾犳鍗曞鍑�</el-button>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="downloadDialog = false">鍙� 娑�</el-button>
@@ -154,20 +158,19 @@
{
label: '璁″垝鍚嶇О',
prop: 'superviseName',
- minWidth: '150px'
+ width: '150px'
}, {
label: '缂栧埗浜�',
prop: 'writeUserName',
- minWidth: '100'
}, {
label: '缂栧埗鏃ユ湡',
prop: 'writeTime',
- minWidth: '160'
+ width: '160'
}, {
dataType: 'tag',
label: '鎵瑰噯鐘舵��',
prop: 'ratifyStatus',
- minWidth: '100',
+ width: '100',
formatData: (params) => {
if (params === 0) {
return '涓嶆壒鍑�';
@@ -189,19 +192,16 @@
}, {
label: '鎵瑰噯鍐呭',
prop: 'ratifyRemark',
- minWidth: '100'
}, {
label: '鎵瑰噯浜�',
prop: 'ratifyUserName',
- minWidth: '100'
}, {
label: '鎵瑰噯鏃ユ湡',
prop: 'ratifyTime',
- minWidth: '160'
+ width: '160'
}, {
dataType: 'action',
label: '鎿嶄綔',
- fixed: 'right',
operation: [
{
name: '鎵瑰噯',
@@ -259,32 +259,123 @@
{
label: '鐩戠潱鏃ユ湡',
prop: 'superviseTime',
- minWidth: '150px'
+ width: '120px'
}, {
label: '鐩戠潱鐩殑',
prop: 'supervisePurpose',
- minWidth: '150px',
- showOverflowTooltip: true,
+ width: '180px',
}, {
label: '鐩戞帶椤圭洰',
prop: 'superviseProject',
- minWidth: '150px'
+ width: '180px'
}, {
label: '琚洃鐫d汉鍛�',
prop: 'supervisee',
- minWidth: '150px'
+ width: '120px'
}, {
label: '鐩戠潱鍘熷洜',
prop: 'superviseReason',
- minWidth: '150px'
+ width: '150px'
+ },{
+ dataType: 'tag',
+ label: '璁板綍鐘舵��',
+ prop: 'recordStatus',
+ width: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '鏈紑濮�';
+ } else if (params === 1) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
+ return '宸叉壒鍑�';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return '';
+ } else if (params === 1) {
+ return 'warning';
+ } else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },{
+ dataType: 'tag',
+ label: '鎺у埗鐘舵��',
+ prop: 'accordingStatus',
+ width: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '鏈紑濮�';
+ } else if (params === 1) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
+ return '宸叉壒鍑�';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return '';
+ } else if (params === 1) {
+ return 'warning';
+ } else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },{
+ dataType: 'tag',
+ label: '绾犳鐘舵��',
+ prop: 'correctStatus',
+ width: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '鏈紑濮�';
+ } else if (params === 1) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
+ return '宸叉壒鍑�';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return '';
+ } else if (params === 1) {
+ return 'warning';
+ } else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
}, {
label: '澶囨敞',
prop: 'remark',
- minWidth: '150px'
}, {
dataType: 'action',
- label: '鎿嶄綔',
fixed: 'right',
+ label: '鎿嶄綔',
operation: [
{
name: '缂栬緫',
@@ -353,6 +444,7 @@
size: 20,
total: 0
},
+ currentScrollPosition: 0,
superviseId: '',
formDia: false,
recordsDia: false,
@@ -404,11 +496,6 @@
pagination({ page, limit }) {
this.yearPage.current = page;
this.yearPage.size = limit;
- this.getYearPlanList();
- },
- pagination1({ page, limit }) {
- this.yearDetailPage.current = page;
- this.yearDetailPage.size = limit;
this.getYearPlanList();
},
// 瀵煎叆娴佺▼
@@ -536,6 +623,11 @@
// 骞村害璁″垝琛ㄦ牸锛岀偣鍑昏鏁版嵁鍚庡埛鏂拌鎯�
rowClick(row) {
this.superviseId = row.superviseId
+ this.getYearDetailPlan()
+ },
+ getYearDetailPlan () {
+ this.yearDetailPage.current = 1
+ this.yearDetailPage.size = 20
this.getYearDetailPlanList()
},
// 鑾峰彇骞村害鏄庣粏琛�
@@ -557,12 +649,14 @@
this.yearDetailLoading = false
})
},
+ pagination1(page) {
+ this.yearDetailPage.size = page.limit;
+ this.getYearDetailPlanList();
+ },
// 閲嶇疆鏄庣粏琛�
clearDetail() {
- this.yearDetailForm = {
- supervisePurpose: '',
- superviseProject: ''
- }
+ this.yearDetailForm.supervisePurpose = ''
+ this.yearDetailForm.superviseProject = ''
this.getYearDetailPlanList()
},
// 鎵撳紑骞村害鏄庣粏鏂板銆佷慨鏀瑰脊妗�
diff --git a/src/views/CNAS/process/method/methodVerification/index.vue b/src/views/CNAS/process/method/methodVerification/index.vue
index 8be4cf8..82491db 100644
--- a/src/views/CNAS/process/method/methodVerification/index.vue
+++ b/src/views/CNAS/process/method/methodVerification/index.vue
@@ -1,18 +1,18 @@
<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 style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鏍囧噯鏂规硶</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.methodName"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
</div>
</div>
diff --git a/src/views/CNAS/process/method/standardMethod/index.vue b/src/views/CNAS/process/method/standardMethod/index.vue
index 20ed971..d07803f 100644
--- a/src/views/CNAS/process/method/standardMethod/index.vue
+++ b/src/views/CNAS/process/method/standardMethod/index.vue
@@ -1,66 +1,36 @@
<style scoped>
.search {
- background-color: #fff;
- height: 80px;
+ height: 46px;
display: flex;
- align-items: center;
-}
-
-.search_thing {
- width: 350px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 110px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 110px);
-}
-
-.table {
- margin-top: 10px;
- background-color: #fff;
- width: calc(100% - 40px);
- height: calc(100% - 60px - 80px - 10px - 40px);
- padding: 20px;
+ justify-content: space-between;
}
</style>
<template>
- <div class="standard_method">
+ <div class="capacity-scope">
<div class="search">
- <div class="search_thing">
- <div class="search_label">鏍囧噯缂栧彿锛�</div>
- <div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.code"
- @keyup.enter.native="refreshTable()"></el-input>
- </div>
+ <div>
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="鏍囧噯缂栧彿" prop="code">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.code"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item label="鏍囧噯鍚嶇О" prop="name">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.name"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
- <div class="search_thing">
- <div class="search_label">鏍囧噯鍚嶇О锛�</div>
- <div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.name"
- @keyup.enter.native="refreshTable()"></el-input>
- </div>
- </div>
- <div class="search_thing" style="padding-left: 30px">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- <div class="btn">
- <!-- <el-button size="small" @click="$refs.ValueTable.openUpload()" v-if="inPower">
- <i class="el-icon-upload2" style="color: #3a7bfa"></i>
- <span style="color: #3a7bfa">瀵煎叆</span></el-button> -->
+ <div>
<el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
</div>
</div>
<lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
- :height="'calc(100vh - 250px)'" style="padding: 20px; padding-top: 0" @pagination="pagination"></lims-table>
+ :height="'calc(100vh - 250px)'" @pagination="pagination"></lims-table>
<!-- 鏂板/缂栬緫 -->
<el-dialog :title="title" :visible.sync="addDlog" width="500px">
<el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px">
diff --git a/src/views/CNAS/process/method/standardMethodsChange/index.vue b/src/views/CNAS/process/method/standardMethodsChange/index.vue
index b2e5528..9ecbf74 100644
--- a/src/views/CNAS/process/method/standardMethodsChange/index.vue
+++ b/src/views/CNAS/process/method/standardMethodsChange/index.vue
@@ -1,18 +1,18 @@
<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 style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鏍囧噯鏂规硶</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.methodName"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
</div>
</div>
diff --git a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
index 9263338..955f69f 100644
--- a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
+++ b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
@@ -1,26 +1,28 @@
<template>
<div class="capacity-scope">
- <div class="search">
- <div>
- <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
- <el-form-item label="鏍囧噯鍙�" prop="standardNo" v-if="tabIndex === '0'">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.standardNo"></el-input>
- </el-form-item>
- <el-form-item label="瀛樻。鍚嶇О" prop="archivedName" v-if="tabIndex === '1'">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.archivedName"></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 style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;" v-if="tabIndex === '0'">
+ <span style="width: 68px;font-size: 14px;font-weight: 700;color: #606266;">鏍囧噯鍙�</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.standardNo"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;" v-if="tabIndex === '1'">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">瀛樻。鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.archivedName"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="openApprovalDialog1">寤� 妗�</el-button>
<el-upload ref='upload' :action="action" :before-upload="beforeUpload" :headers="uploadHeader" :on-error="onError"
- :on-success="handleSuccessUp" :show-file-list="false"
- accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
- style="display: inline-block; margin-left: 10px;">
+ :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="small" type="primary">瀵煎叆</el-button>
</el-upload>
<el-button size="small" style="margin-left: 10px;" type="primary" @click="openFormDia">鏂� 澧�</el-button>
diff --git a/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue b/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue
index 626fe9d..c1caccd 100644
--- a/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue
+++ b/src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue
@@ -4,11 +4,19 @@
<div>
<el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
<el-form-item label="骞翠唤" prop="laboratoryName">
- <el-input v-model="searchForm.distributionYear" clearable size="small"></el-input>
+ <el-date-picker
+ v-model="searchForm.distributionYear"
+ value-format="yyyy"
+ format="yyyy"
+ clearable
+ @change="searchList"
+ type="year"
+ placeholder="閫夋嫨骞�">
+ </el-date-picker>
</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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue b/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue
index 89c7d20..1f6ffc5 100644
--- a/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue
+++ b/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue
@@ -1,15 +1,17 @@
<template>
<div class="capacity-scope">
- <div>
- <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
- <el-form-item label="鍙戠敓閮ㄩ棬" prop="occurrenceDepartment">
- <el-input v-model="searchForm.occurrenceDepartment" clearable size="small"></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 style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鍙戠敓閮ㄩ棬</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.occurrenceDepartment"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
+ </div>
+ </div>
</div>
<div class="table">
<limsTable :column="tableColumn" :height="'calc(100vh - 19em)'" :table-data="tableData"
diff --git a/src/views/CNAS/process/reportResults/index.vue b/src/views/CNAS/process/reportResults/index.vue
index a3415d1..88b1c7c 100644
--- a/src/views/CNAS/process/reportResults/index.vue
+++ b/src/views/CNAS/process/reportResults/index.vue
@@ -1,27 +1,25 @@
<template>
<div class="capacity-scope">
- <div class="search">
- <div>
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
- <el-form-item label="妫�楠屾姤鍛婄紪鍙�" prop="insReportCode">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.insReportCode"
- @keyup.enter.native="refreshTable()"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 128px;font-size: 14px;font-weight: 700;color: #606266;">妫�楠屾姤鍛婄紪鍙�</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.insReportCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower">瀵煎嚭</el-button>
<el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
</div>
</div>
<div class="table">
<lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'"
- :page="page" @pagination="pagination" :isSelection="true"
- :handleSelectionChange="handleSelectionChange"></lims-table>
+ :page="page" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
<el-row>
@@ -84,12 +82,8 @@
<el-col :span="24" style="margin-bottom: 16px;">
<div class="search_thing">
<div class="search_label">绛炬敹浜猴細</div>
- <div class="search_input">
- <el-select v-model="addInfo.signatory" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" multiple>
- <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.signatory"></el-input></div>
</div>
</el-col>
<el-col :span="24" style="margin-bottom: 16px;">
@@ -133,12 +127,11 @@
personList: [],
title: '鏂板',
addDialogVisible: false,
- addInfo: {
- signatory: []
- },
+ addInfo: {},
addLoading: false,
- mutilSelect: [],
- queryParams: {},
+ queryParams: {
+ insReportCode: ''
+ },
tableData: [],
column: [
{ label: "妫�楠屾姤鍛婄紪鍙�", prop: "insReportCode" },
@@ -151,7 +144,7 @@
{ label: "鍙戦�佹柟寮�", prop: "method" },
{ label: "鍙戦�佹棩鏈�", prop: "sendTime" },
{ label: "鍙戦�佷汉", prop: "sendUserName" },
- { label: "绛炬敹浜�", prop: "signatoryName" },
+ { label: "绛炬敹浜�", prop: "signatory" },
{ label: "澶囨敞", prop: "remark" },
{
dataType: "action",
@@ -177,7 +170,7 @@
],
page: {
total: 0,
- size: 10,
+ size: 20,
current: 0,
},
tableLoading: false,
@@ -190,21 +183,16 @@
},
methods: {
handleDown() {
- if (this.mutilSelect.length == 0) {
- this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑鏁版嵁')
- return
- }
this.outLoading = true
- exportProcessReport({ ids: this.mutilSelect.map(m => m.id) }).then(res => {
+ exportProcessReport(this.queryParams).then(res => {
this.outLoading = false
- this.$download.saveAs(res.data, "鎶ュ憡缁撴灉");
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '鎶ュ憡缁撴灉' + '.docx');
})
},
openAdd() {
this.title = '鏂板'
- this.addInfo = {
- signatory: []
- }
+ this.addInfo = {}
this.addDialogVisible = true;
},
getList() {
@@ -237,9 +225,6 @@
this.page.current = 1;
this.getList();
},
- handleSelectionChange(val) {
- this.mutilSelect = val
- },
getAuthorizedPerson() {
selectUserCondition().then(res => {
let data = []
@@ -257,13 +242,10 @@
delete this.addInfo.createTime
delete this.addInfo.createUser
delete this.addInfo.updateTime
- delete this.addInfo.signatoryUrl
delete this.addInfo.updateUserer
delete this.addInfo.sendUserName
- let addInfo = this.HaveJson(this.addInfo)
- addInfo.signatory = addInfo.signatory.join(',')
if (this.title == '鏂板') {
- addProcessReport(addInfo).then(res => {
+ addProcessReport(this.addInfo).then(res => {
this.addLoading = false
this.addDialogVisible = false
this.$message({
@@ -273,7 +255,7 @@
this.refreshTable()
}).catch(err => { })
} else {
- doProcessReport(addInfo).then(res => {
+ doProcessReport(this.addInfo).then(res => {
this.addLoading = false
this.addDialogVisible = false
this.$message({
@@ -288,11 +270,7 @@
this.title = '淇敼'
this.addInfo = row
console.log(this.addInfo)
- this.addInfo.signatory = this.addInfo.signatory ? this.addInfo.signatory.split(',').map(m => Number(m)) : []
this.addDialogVisible = true;
- },
- handleChangeTask(list) {
- this.mutilSelect = list
},
handleDelete(row) {
this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
diff --git a/src/views/CNAS/process/sampleDisposal/index.vue b/src/views/CNAS/process/sampleDisposal/index.vue
deleted file mode 100644
index 6ad90f6..0000000
--- a/src/views/CNAS/process/sampleDisposal/index.vue
+++ /dev/null
@@ -1,521 +0,0 @@
-<template>
- <div class="capacity-scope">
- <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="queryParams.totaldealId = ''">
- <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;" :key="1">
- <el-button size="small" type="primary" @click="handleAdd0" style="margin-bottom: 10px">鏂板</el-button>
- <div class="table" style="height: calc(100% - 200px)" v-if="activeName == '濉啓'">
- <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading"
- key="tableData" :height="'calc(100vh - 290px)'" :page="page" @pagination="pagination"></lims-table>
- </div>
- </el-tab-pane>
- <el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;" :key="2">
- <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true">
- <el-form-item label="骞存湀" prop="month">
- <el-date-picker v-model="queryParams0.month" type="month" placeholder="閫夋嫨鏈�" format="yyyy-MM"
- value-format="yyyy-MM" size="small" @change="refreshTable()">
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
- <div class="table">
- <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading"
- key="tableData0"
- :height="'calc(100vh - 300px)'" :page="page0" @pagination="pagination0"></lims-table>
- </div>
- </el-tab-pane>
- </el-tabs>
- <!-- 鏂板鏍峰搧 -->
- <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px">
- <el-row>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏍峰搧鍚嶇О锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.sampleName"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏍峰搧缂栧彿锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.sampleCode"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">渚涙牱鍗曚綅锛�</div>
- <div class="search_input">
- <el-select v-model="addInfo.sampleSupplier" size="small">
- <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList"
- :key="item.id"></el-option>
- </el-select>
- </div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏁伴噺锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.num"></el-input>
- </div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">澶勭悊鏂瑰紡锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.dealMethod"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鏃堕棿锛�</div>
- <div class="search_input">
- <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" style="width: 100%;">
- </el-date-picker>
- </div>
- </div>
- </el-col>
- </el-row>
- <span slot="footer" class="dialog-footer">
- <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="submitAdd" :loading="addLoading">纭� 瀹�</el-button>
- </span>
- </el-dialog>
- <!-- 璇︽儏/涓嬭浇/瀹℃牳/鎵瑰噯 -->
- <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == '涓嬭浇' }"
- :modal="title0 != '涓嬭浇'" top="5vh">
- <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
- style="max-height: 70vh;overflow-y: auto;" />
- <span slot="footer" class="dialog-footer" v-if="title0 == '瀹℃牳' || title0 == '鎵瑰噯'">
- <el-button @click="submitCheck('涓嶉�氳繃')" :loading="noCheckLoading">涓嶉�氳繃</el-button>
- <el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
- </span>
- </el-dialog>
- </div>
-</template>
-
-<script>
-import limsTable from "@/components/Table/lims-table.vue";
-import filePreview from "@/components/Preview/filePreview.vue";
-import { selectCustomPageList } from "@/api/system/customer";
-import {
- doProcessDeal,
- addProcessDeal,
- submitProcessTotaldeal,
- pageProcessDeal,
- checkProcessTotaldeal,
- ratifyProcessTotaldeal,
- delProcessDeal,
- pageProcessTotaldeal,
-} from "@/api/cnas/process/sampleDisposal";
-export default {
- name: 'SampleDisposal',
- components: {
- limsTable,
- filePreview,
- },
- data() {
- return {
- activeName: '濉啓',
- title: '鏂板',
- addDialogVisible: false,
- addLoading: false,
- outLoading: false,
- editDialogVisible: false,
- lookDialogVisible: false,
- title0: '鏌ョ湅',
- noCheckLoading: false,
- checkLoading: false,
- // 鍘嗗彶鍒楄〃
- addInfo: {},//鏂板鏍峰搧
- customPageList: [],
- currentInfo: {
- arr: []
- },//鏌ョ湅鐨勮鎯�
- outPower: false,
- addPower: false,
- queryParams: {},
- tableData: [],
- column: [
- { label: "鏍峰搧鍚嶇О", prop: "sampleName" },
- { label: "鏍峰搧缂栧彿", prop: "sampleCode" },
- { label: "渚涙牱鍗曚綅", prop: "sampleSupplier" },
- { label: "鏁伴噺", prop: "num" },
- { label: "澶勭悊鏂瑰紡", prop: "dealMethod" },
- { label: "鏃堕棿", prop: "dealTime" },
- {
- dataType: "action",
- fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "缂栬緫",
- type: "text",
- clickFun: (row) => {
- this.handleAdd0(row);
- },
- },
- {
- name: "鍒犻櫎",
- type: "text",
- clickFun: (row) => {
- this.handleDelete(row);
- },
- },
- ],
- },
- ],
- page: {
- total: 0,
- size: 10,
- current: 0,
- },
- tableLoading: false,
- queryParams0: {},
- tableData0: [],
- column0: [
- { label: "鏈堜唤", prop: "month" },
- { label: "鎬绘暟閲�", prop: "totalNum" },
- { label: "鎻愪氦浜�", prop: "submitUserName" },
- { label: "瀹℃牳浜�", prop: "examineUserName" },
- { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
- {
- dataType: "action",
- fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "鏌ョ湅",
- type: "text",
- clickFun: (row) => {
- this.handleLook(row);
- },
- },
- {
- name: "涓嬭浇",
- type: "text",
- clickFun: (row) => {
- this.handleDown0(row);
- },
- disabled: (row) => {
- return !row.url
- }
- },
- {
- name: "鎻愪氦",
- type: "text",
- clickFun: (row) => {
- this.handleSubmit(row);
- },
- disabled: (row) => {
- return !!row.submitState && row.submitState != '寰呮彁浜�'
- }
- },
- {
- name: "瀹℃牳",
- type: "text",
- clickFun: (row) => {
- this.handleCheck(row);
- },
- disabled: (row) => {
- return row.examineState == '閫氳繃' || row.submitState == '寰呮彁浜�'
- }
- },
- {
- name: "鎵瑰噯",
- type: "text",
- clickFun: (row) => {
- this.handleApproval(row);
- },
- disabled: (row) => {
- return row.ratifyState == '閫氳繃' || row.submitState == '寰呮彁浜�'
- }
- },
- ],
- },
- ],
- page0: {
- total: 0,
- size: 10,
- current: 0,
- },
- };
- },
- mounted() {
- this.getCustomPageList()
- this.getList()
- this.getList0()
- },
- methods: {
- // 鑾峰彇閫佹牱鍗曚綅鍒楄〃
- getCustomPageList() {
- selectCustomPageList({
- current: -1,
- size: -1
- }).then(res => {
- this.customPageList = res.data.records
- }).catch(err => { });
- },
- handleDown() { },
- getList() {
- this.tableLoading = true;
- let param = { ...this.queryParams, ...this.page };
- delete param.total;
- pageProcessDeal({ ...param })
- .then((res) => {
- this.tableLoading = false;
- if (res.code === 200) {
- this.tableData = res.data.records;
- this.page.total = res.data.total;
- }
- })
- .catch((err) => {
- this.tableLoading = false;
- });
- },
- pagination({ page, limit }) {
- this.page.current = page;
- this.page.size = limit;
- this.getList();
- },
- refresh() {
- this.queryParams0 = {};
- this.page0.current = 1;
- this.getList0();
- },
- refreshTable() {
- this.page0.current = 1;
- this.getList0();
- },
- getList0() {
- this.tableLoading = true;
- let param = { ...this.queryParams0, ...this.page };
- delete param.total;
- pageProcessTotaldeal({ ...param })
- .then((res) => {
- this.tableLoading = false;
- if (res.code === 200) {
- this.tableData0 = res.data.records;
- this.page0.total = res.data.total;
- }
- })
- .catch((err) => {
- this.tableLoading = false;
- });
- },
- pagination0({ page, limit }) {
- this.page0.current = page;
- this.page0.size = limit;
- this.getList0();
- },
- // 濉啓
- // handleAdd(row){
- // this.componentData0.entity.totaldealId = row.id
- // this.editDialogVisible = true
- // },
- // 鎵撳紑鏂板鐣岄潰
- handleAdd0(row) {
- if (row) {
- this.addInfo = this.HaveJson(row)
- this.title = '缂栬緫'
- } else {
- this.title = '鏂板'
- this.addInfo = {}
- }
- this.addDialogVisible = true
- },
- // 鎻愪氦鏂板
- submitAdd() {
- if (this.addInfo.id) {
- // 缂栬緫
- this.addLoading = true
- doProcessDeal({
- totaldealId: this.queryParams.totaldealId,
- ...this.addInfo
- }).then(res => {
- this.addLoading = false
- this.addDialogVisible = false
- this.$message({
- type: 'success',
- message: '缂栬緫鎴愬姛!'
- });
- this.page.current = 0;
- this.getList();
- }).catch(err => { });
- } else {
- // 鏂板
- this.addLoading = true
- addProcessDeal({
- totaldealId: this.queryParams.totaldealId,
- ...this.addInfo
- }).then(res => {
- this.addLoading = false
- this.addDialogVisible = false
- this.$message({
- type: 'success',
- message: '鏂板鎴愬姛!'
- });
- this.page.current = 0;
- this.getList();
- }).catch(err => { });
- }
- },
- // 鎻愪氦
- handleSubmit(row) {
- this.$confirm('鏄惁鎻愪氦 ' + row.month + ' 鏈堜唤鐨勬暟鎹�', '鎻愪氦', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- submitProcessTotaldeal({
- id: row.id
- }).then(res => {
- this.$message({
- type: 'success',
- message: '鎻愪氦鎴愬姛!'
- });
- this.refreshTable()
- }).catch(err => { });
- })
- },
- // 鏌ョ湅
- handleLook(row) {
- this.activeName = '濉啓'
- this.queryParams.totaldealId = row.id
- this.$nextTick(() => {
- this.page.current = 1;
- this.getList();
- })
- },
- commonFun(row, callbanck) {
- this.currentInfo = row
- this.queryParams.totaldealId = row.id
- pageProcessDeal({
- current: -1,
- size: -1, ...this.queryParams
- }).then(res => {
- this.lookDialogVisible = true
- this.currentInfo.arr = res.data.records
- if (callbanck) {
- callbanck()
- }
- }).catch(err => { });
- },
- // 瀹℃牳
- handleCheck(row) {
- this.title0 = '瀹℃牳'
- this.commonFun(row)
- },
- // 鎵瑰噯
- handleApproval(row) {
- this.title0 = '鎵瑰噯'
- this.commonFun(row)
- },
- // 鎻愪氦瀹℃牳/鎵瑰噯
- submitCheck(state) {
- if (state == '閫氳繃') {
- this.checkLoading = true
- } else {
- this.noCheckLoading = true
- }
- if (this.title0 == '瀹℃牳') {
- checkProcessTotaldeal({
- id: this.currentInfo.id,
- state: state
- }).then(res => {
- this.checkLoading = false
- this.noCheckLoading = false
- this.$message({
- type: 'success',
- message: '鎿嶄綔鎴愬姛!'
- });
- this.refreshTable()
- this.lookDialogVisible = false
- }).catch(err => { });
- } else if (this.title0 == '鎵瑰噯') {
- ratifyProcessTotaldeal({
- id: this.currentInfo.id,
- state: state
- }).then(res => {
- this.checkLoading = false
- this.noCheckLoading = false
- this.$message({
- type: 'success',
- message: '鎿嶄綔鎴愬姛!'
- });
- this.refreshTable()
- this.lookDialogVisible = false
- }).catch(err => { });
- }
- },
- // 瀵煎嚭璇︽儏
- handleDown0(row) {
- if (!row.url) {
- this.$message.warning('鏆傛棤鏂囦欢')
- return
- }
- // 鍚庣涓嬭浇
- this.$download.saveAs(row.url, row.month + ' 鏍峰搧澶勭悊鐢宠琛�');
- },
- handleDelete(row) {
- this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- delProcessDeal({ id: row.id }).then((res) => {
- this.$message.success("鍒犻櫎鎴愬姛");
- this.page.current = 0;
- this.getList();
- });
- })
- .catch(() => { });
- },
- },
-}
-</script>
-
-<style scoped>
-.search_thing {
- width: 350px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 110px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 110px);
-}
-
-.downPdf {
- opacity: 0 !important;
-}
-
-.tables td {
- height: 40px;
- width: 100px;
- text-align: center;
- font-size: 14px;
- word-wrap: break-word;
- white-space: normal;
-}
-
-.user-info .el-button {
- margin: 0;
-}
-
->>>.el-tabs__content {
- height: 100%;
-}
-</style>
diff --git a/src/views/CNAS/process/uncertainty/index.vue b/src/views/CNAS/process/uncertainty/index.vue
index 1583364..f09d6ac 100644
--- a/src/views/CNAS/process/uncertainty/index.vue
+++ b/src/views/CNAS/process/uncertainty/index.vue
@@ -1,22 +1,21 @@
<template>
<div class="capacity-scope">
- <div class="search">
- <div>
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
- <el-form-item label="鎶ュ憡鍚嶇О" prop="reportName">
- <el-input v-model="queryParams.reportName" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鎶ュ憡鍚嶇О</span>
+ <el-input v-model="queryParams.reportName" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
</div>
- <div style="display: flex;align-items: center;">
+ <div style="line-height: 30px;">
<el-button :loading="outLoading" size="small" type="primary" style="margin-right: 10px" @click="handleDown0">瀵煎嚭</el-button>
<el-upload ref='upload' :action="action" :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError"
- :on-success="handleSuccessUp" :show-file-list="false"
+ :on-success="handleSuccessUp" :show-file-list="false" style="display: inline-block;"
accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
<el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button></el-upload>
</div>
diff --git a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
index 38a545c..1bbe52c 100644
--- a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
+++ b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
@@ -5,6 +5,7 @@
<el-col :span="6" style="padding-left: 20px;text-align: left;">鏁伴噰閰嶇疆</el-col>
<el-col :span="18" style="text-align: right;">
<el-button size="small" type="primary" @click="fileConfiguration">鏂囦欢閰嶇疆</el-button>
+ <el-button size="small" type="primary" @click="addItem">妫�楠岄」鏂板</el-button>
<el-button size="small" @click="$parent.closeDataVue()">
<span style="color: #3A7BFA;">杩斿洖</span>
</el-button>
@@ -14,15 +15,9 @@
<div class="table">
<el-table :data="tableList.slice((page.current - 1) * page.size,page.current * page.size)"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- tooltip-effect="dark" height="100%" :span-method="spanMethod">
+ tooltip-effect="dark" height="100%">
<el-table-column type="index" label="搴忓彿" align="center" width="65"></el-table-column>
<el-table-column prop="deviceName" align="center" min-width="100" label="璁惧鍚嶇О"></el-table-column>
- <el-table-column prop="fileType" align="center" label="鏂囦欢鍚庣紑"></el-table-column>
- <el-table-column prop="collectUrl" align="center" min-width="100" show-overflow-tooltip
- label="閲囬泦鍦板潃"></el-table-column>
- <el-table-column prop="storageUrl" align="center" min-width="100" show-overflow-tooltip
- label="瀛樺偍鍦板潃"></el-table-column>
- <el-table-column prop="ip" align="center" label="IP鍦板潃" min-width="100"></el-table-column>
<el-table-column prop="sample" align="center" label="妫�楠屽璞�" show-overflow-tooltip
min-width="150"></el-table-column>
<el-table-column prop="inspectionItemClass" align="center" label="妫�楠岄」鍒嗙被" min-width="120"></el-table-column>
@@ -117,7 +112,7 @@
</el-row>
</span>
</el-dialog>
- <el-dialog title="鏁伴噰閰嶇疆" :visible.sync="dialogVisible4" width="400px">
+ <el-dialog title="鏂囦欢閰嶇疆" :visible.sync="dialogVisible4" width="400px">
<div class="search_thing" style="margin-bottom: 14px;">
<div class="search_label">
<span style="color:red;margin-right: 4px;">*</span>IP锛�
@@ -162,6 +157,16 @@
</el-row>
</span>
</el-dialog>
+ <el-dialog title="娣诲姞妫�楠岄」" :visible.sync="dialogVisible5" width="1000px">
+ <lims-table :tableData="tableData5" :column="column5"
+ :isSelection="true" :handleSelectionChange="selectMethod"
+ height="540" :page="page5" :tableLoading="tableLoading5"
+ @pagination="pagination5"></lims-table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogVisible5 = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm5" :loading="loading5">淇� 瀛�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -170,19 +175,21 @@
queryDataAcquisitionConfiguration,
saveDataAcquisitionConfiguration,
deleteDataAcquisitionConfiguration,
+ getDeviceById,
+ saveDeviceFileConfiguration,
+ queryProductConfiguration,
+ getNoConfigProduct,
} from '@/api/cnas/resourceDemand/device.js'
+import limsTable from "@/components/Table/lims-table.vue";
export default {
name: "dataAcquisitionConfig",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: {},
+ components: {limsTable},
props: {
deviceId: {
type: Number,
default: () => []
}
- },
- mounted() {
- this.init();
},
data() {
// 杩欓噷瀛樻斁鏁版嵁
@@ -295,110 +302,33 @@
]
}
},
- deleteList: []
+ deleteList: [],
+ tableData5: [],
+ column5: [
+ {label: '鏍峰搧鍚嶇О', prop: 'sample'},
+ {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'},
+ {label: '妫�楠岄」', prop: 'inspectionItem'},
+ {label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass'},
+ ],
+ page5: {
+ total:0,
+ size:20,
+ current:1
+ },
+ tableLoading5: false,
+ dialogVisible5: false,
+ loading5: false,
+ multipleSelection: []
};
+ },
+ mounted() {
+ this.init();
},
// 鏂规硶闆嗗悎
methods: {
- getIndexWithAlphabet(index) {
- const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
- const letterIndex = index % 26;
- return alphabet.charAt(letterIndex) + (index + 1);
- },
- rowspan(spanArr, position, spanName) {
- this.tableList.forEach((item, index) => {
- if (index === 0) {
- spanArr.push(1);
- position = 0;
- } else {
- if (
- this.tableList[index][spanName] ===
- this.tableList[index - 1][spanName]
- ) {
- spanArr[position] += 1;
- spanArr.push(0);
- } else {
- spanArr.push(1);
- position = index;
- }
- }
- });
- },
- spanMethod({ row, column, rowIndex, columnIndex }) {
- // 涓�鑸殑鍚堝苟琛�
- if (
- this.spanConfig != undefined &&
- this.spanConfig.rows &&
- this.spanConfig.rows.length > 0
- ) {
- let i = null;
- let obj = this.spanConfig.rows.find((item, index) => {
- i = index;
- return item.index == columnIndex;
- });
- if (obj) {
- const _row = this.spanList[i].arr[rowIndex];
- const _col = _row > 0 ? 1 : 0;
- return {
- rowspan: _row,
- colspan: _col
- };
- }
- }
- // 鐗规畩鐨勫悎骞惰
- if (
- this.spanConfig != undefined &&
- this.spanConfig.special &&
- this.spanConfig.special.main &&
- this.spanConfig.special.rows &&
- this.spanConfig.special.rows.length > 0
- ) {
- let i = null;
- let obj = this.spanConfig.special.rows.find((item, index) => {
- i = index;
- return item.index == columnIndex;
- });
- if (obj) {
- const _row = this.specialSpanList[i].arr[rowIndex];
- const _col = _row > 0 ? 1 : 0;
- return {
- rowspan: _row,
- colspan: _col
- };
- }
- }
- },
- fileConfiguration() {
- this.dialogVisible4 = true;
- if (this.tableList[0]) {
- this.$set(this.configForm, "fileType", this.tableList[0].fileType);
- this.$set(this.configForm, "collectUrl", this.tableList[0].collectUrl);
- this.$set(this.configForm, "storageUrl", this.tableList[0].storageUrl);
- this.$set(this.configForm, "ip", this.tableList[0].ip);
- this.$set(
- this.configForm,
- "entrustCode",
- this.tableList[0].entrustCode
- );
- this.$set(
- this.configForm,
- "sampleCode",
- this.tableList[0].sampleCode
- );
- this.$set(
- this.configForm,
- "dbFileName",
- this.tableList[0].dbFileName
- );
- this.$set(
- this.configForm,
- "fiberOpticRibbon",
- this.tableList[0].fiberOpticRibbon
- )
- }
- },
+ // 鏌ヨ鍒楄〃
init() {
- queryDataAcquisitionConfiguration({ deviceId: this.deviceId, isDevice: false }).then(res => {
+ queryDataAcquisitionConfiguration({ deviceId: this.deviceId }).then(res => {
this.tableList = res.data;
this.tableList.forEach(i => {
let isIncludes = false
@@ -412,88 +342,72 @@
if (!isIncludes && i.formula) {
i.formula = i.formula.slice(1, -1)
}
- i.sample = i.sample
- .replace(/"/g, "")
- .replace(/],/g, "锛�")
- .replace(/\[/g, "")
- .replace(/]/g, "");
});
- if (this.tableList[0]) {
- this.$set(this.configForm, "fileType", this.tableList[0].fileType);
- this.$set(
- this.configForm,
- "collectUrl",
- this.tableList[0].collectUrl
- );
- this.$set(
- this.configForm,
- "storageUrl",
- this.tableList[0].storageUrl
- );
- this.$set(this.configForm, "ip", this.tableList[0].ip);
- this.$set(
- this.configForm,
- "entrustCode",
- this.tableList[0].entrustCode
- );
- this.$set(
- this.configForm,
- "sampleCode",
- this.tableList[0].sampleCode
- );
- this.$set(
- this.configForm,
- "dbFileName",
- this.tableList[0].dbFileName
- );
- this.$set(
- this.configForm,
- "fiberOpticRibbon",
- this.tableList[0].fiberOpticRibbon
- )
- }
- // 涓�鑸殑鍚堝苟琛�
- if (
- this.spanConfig != undefined &&
- this.spanConfig.rows &&
- this.spanConfig.rows.length > 0
- ) {
- this.spanList = [];
- this.spanConfig.rows.forEach((item, index) => {
- this.spanList.push({
- arr: [],
- position: 0
- });
- this.rowspan(
- this.spanList[index].arr,
- this.spanList[index].position,
- item.name
- );
- });
- }
- // 鐗规畩鐨勫悎骞惰
- if (
- this.spanConfig != undefined &&
- this.spanConfig.special &&
- this.spanConfig.special.main &&
- this.spanConfig.special.rows &&
- this.spanConfig.special.rows.length > 0
- ) {
- this.specialSpanList = [];
- this.spanConfig.special.rows.forEach((item, index) => {
- this.specialSpanList.push({
- arr: [],
- position: 0
- });
- this.rowspan(
- this.specialSpanList[index].arr,
- this.specialSpanList[index].position,
- this.spanConfig.special.main
- );
- });
- }
+
});
},
+ getIndexWithAlphabet(index) {
+ const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ const letterIndex = index % 26;
+ return alphabet.charAt(letterIndex) + (index + 1);
+ },
+ // 鎵撳紑鏂板妫�楠岄」寮规
+ addItem () {
+ this.dialogVisible5 = true;
+ this.getList5()
+ },
+ getList5() {
+ this.tableLoading5 = true;
+ getNoConfigProduct({deviceId: this.deviceId, ...this.page5 }).then(res => {
+ this.tableLoading5 = false;
+ this.tableData5 = res.data.records
+ this.page5.total = res.data.total
+ }).catch(err => {
+ this.tableLoading5 = false;
+ })
+ },
+ pagination5 (page) {
+ this.page5.size = page.limit
+ this.getList5()
+ },
+ // 琛ㄦ牸閫夋嫨鏂规硶
+ selectMethod(val) {
+ this.multipleSelection = val
+ },
+ // 鎻愪氦鏂板妫�楠岄」
+ submitForm5 () {
+ this.loading5 = true;
+ saveDataAcquisitionConfiguration({
+ deviceId: this.deviceId,
+ dataConfigList: this.multipleSelection,
+ }).then(res => {
+ this.loading5 = false;
+ this.dialogVisible5 = false;
+ this.init();
+ this.$message.success("娣诲姞鎴愬姛");
+ }).catch(err => {
+ this.loading5 = false;
+ })
+ },
+ // 鎵撳紑鏂囦欢閰嶇疆寮规
+ fileConfiguration() {
+ this.dialogVisible4 = true;
+ this.getInfo()
+ },
+ // 鏌ヨ鏂囦欢閰嶇疆淇℃伅
+ getInfo() {
+ getDeviceById({deviceId: this.deviceId}).then(res => {
+ this.$set(this.configForm, "fileType", res.data.fileType);
+ this.$set(this.configForm, "collectUrl", res.data.collectUrl);
+ this.$set(this.configForm, "storageUrl", res.data.storageUrl);
+ this.$set(this.configForm, "ip", res.data.ip);
+ this.$set(this.configForm, "entrustCode", res.data.entrustCode);
+ this.$set(this.configForm, "sampleCode", res.data.sampleCode);
+ this.$set(this.configForm, "dbFileName", res.data.dbFileName);
+ this.$set(this.configForm, "fiberOpticRibbon", res.data.fiberOpticRibbon)
+ })
+ },
+ // 鎻愪氦鏂囦欢閰嶇疆
submitForm4() {
const obj = Object.assign({
deviceId: this.deviceId,
@@ -501,16 +415,14 @@
collectUrl: this.configForm.collectUrl,
storageUrl: this.configForm.storageUrl,
ip: this.configForm.ip,
- isDevice: true,
entrustCode: this.configForm.entrustCode,
sampleCode: this.configForm.sampleCode,
dbFileName: this.configForm.dbFileName,
fiberOpticRibbon: this.configForm.fiberOpticRibbon
});
this.upLoad4 = true;
- saveDataAcquisitionConfiguration({ deviceId: this.deviceId, ...obj }).then(res => {
+ saveDeviceFileConfiguration({ deviceId: this.deviceId, ...obj }).then(res => {
if (res.code == 200) {
- // this.tableList = res.data;
this.dialogVisible4 = false;
this.init();
this.$message.success("鎿嶄綔鎴愬姛");
@@ -521,6 +433,7 @@
this.upLoad4 = false;
});
},
+ // 鎵撳紑鏁伴噰閰嶇疆寮规
dataConfig(row) {
this.configForm = {
deviceId: row.deviceId,
@@ -530,7 +443,7 @@
inspectionItemClass: row.inspectionItemClass,
};
this.dialogVisible3 = true;
- queryDataAcquisitionConfiguration({
+ queryProductConfiguration({
deviceId: this.deviceId,
inspectionItem: row.inspectionItem.trim(),
isDevice: true,
@@ -570,6 +483,7 @@
}
});
},
+ // 鎻愪氦鏁伴噰閰嶇疆
submitForm3() {
this.$refs.configForm.validate(valid => {
// 琛ㄥ崟鏍¢獙
diff --git a/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue b/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
index 91d52a4..894b4ad 100644
--- a/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
+++ b/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
@@ -13,7 +13,8 @@
</div>
<div style="margin: 10px 0">
<el-table ref="yearTable" :data="examinePlanDetailsList" id="templateParamTable" row-key="deviceId"
- :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border height="500px" style="width: 100% ;">
+ v-loading="yearTableLoading"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border height="560px">
<el-table-column label="璁惧鍚嶇О" min-width="190" prop="deviceName">
<template slot-scope="scope">
<el-input v-model="scope.row.deviceName" clearable size="small"></el-input>
@@ -118,7 +119,8 @@
planId: '',
examinePlanDetailsList: [],
},
- operationType: ''
+ operationType: '',
+ yearTableLoading: false
}
},
mounted() {
@@ -134,6 +136,7 @@
planYear: '',
examinePlanDetailsList: [],
}
+ this.examinePlanDetailsList = []
} else {
this.getRowInfo(row)
}
@@ -141,13 +144,17 @@
this.getUserList()
},
getRowInfo(row) {
+ this.yearTableLoading = true
getDeviceExaminePlan({ planId: row.planId }).then(res => {
+ this.yearTableLoading = false
if (res.code == 200) {
this.examinePlanDetailsList = res.data.examinePlanDetailsList
this.form.planName = res.data.planName
this.form.planYear = res.data.planYear
this.form.planId = res.data.planId
}
+ }).catch(error => {
+ this.yearTableLoading = false
})
},
// 娣诲姞璁惧
diff --git a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
index 3b8db3d..d750d8e 100644
--- a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
+++ b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
@@ -12,7 +12,8 @@
</el-date-picker>
</div>
<div style="margin: 10px 0">
- <el-table id="templateParamTable" ref="yearTable" :data="calibrationPlanDetailList" height="300px"
+ <el-table id="templateParamTable" ref="yearTable" :data="calibrationPlanDetailList" height="560px"
+ v-loading="yearTableLoading"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
row-key="deviceId" style="width: 100% ;">
<el-table-column label="璁惧鍚嶇О鍙婂瀷鍙�" min-width="190" prop="deviceName">
@@ -115,7 +116,8 @@
planId: '',
calibrationPlanDetailList: [],
},
- operationType: ''
+ operationType: '',
+ yearTableLoading: false
}
},
mounted() {
@@ -129,21 +131,26 @@
this.form = {
planName: '',
planYear: '',
- examinePlanDetailsList: [],
+ calibrationPlanDetailList: [],
}
+ this.calibrationPlanDetailList = []
} else {
this.getRowInfo(row)
}
this.applicationForm = true
},
getRowInfo(row) {
+ this.yearTableLoading = true
getDeviceCalibrationPlan({ planId: row.planId }).then(res => {
+ this.yearTableLoading = false
if (res.code == 200) {
this.calibrationPlanDetailList = res.data.calibrationPlanDetailList
this.form.planName = res.data.planName
this.form.planYear = res.data.planYear
this.form.planId = res.data.planId
}
+ }).catch(err => {
+ this.yearTableLoading = false
})
},
// 娣诲姞璁惧
@@ -156,9 +163,19 @@
},
changeMachineName() {
this.selectionRows.map(val => {
+ // 灏� val.nextCalibrationDate 杞崲涓� Date 瀵硅薄骞跺噺鍘� 5 澶�
+ let nextCalibrationDate = val.nextCalibrationDate ? new Date(val.nextCalibrationDate) : null;
+ if (nextCalibrationDate) {
+ nextCalibrationDate.setDate(nextCalibrationDate.getDate() - 5); // 鍑忓幓 5 澶�
+ }
this.calibrationPlanDetailList.push({
deviceId: val.id, deviceName: val.label, deviceNumber: val.value,
- specificationModel: val.specificationModel, verificationCycles: val.calibrationDate, lastDate: val.lastCalibrationDate.substring(0, 10), planDate: val.nextCalibrationDate.substring(0, 10)
+ specificationModel: val.specificationModel,
+ verificationCycles: val.calibrationDate,
+ lastDate: val.lastCalibrationDate && val.lastCalibrationDate.substring(0, 10),
+ planDate: nextCalibrationDate ? formatDate(nextCalibrationDate) : null,
+ verificationUnit: val.calibrationServices,
+ deviceAmount: 1
})
})
this.addEquipDia = false
@@ -238,6 +255,13 @@
},
},
}
+// 鏍煎紡鍖栨棩鏈熶负 YYYY-MM-DD 鏍煎紡
+function formatDate(date) {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 鏈堜唤浠�0寮�濮嬶紝闇�瑕�+1
+ const day = String(date.getDate()).padStart(2, '0');
+ return `${year}-${month}-${day}`;
+}
</script>
<style scoped></style>
diff --git a/src/views/CNAS/resourceDemand/device/component/borrow.vue b/src/views/CNAS/resourceDemand/device/component/borrow.vue
index 9b21be1..4898f5f 100644
--- a/src/views/CNAS/resourceDemand/device/component/borrow.vue
+++ b/src/views/CNAS/resourceDemand/device/component/borrow.vue
@@ -2,25 +2,24 @@
<template>
<div>
<div class="search">
- <div class="search_thing">
- <div class="search_label">娴佺▼缂栧彿锛�</div>
- <div><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.processNumber"
- @keyup.enter.native="refreshTable()"></el-input></div>
- </div>
- <div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- <div class="btns">
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="娴佺▼缂栧彿">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.processNumber"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ <div>
<el-button size="small" type="primary" @click="add">鏂板</el-button>
<!-- <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>-->
</div>
</div>
- <div class="tables" style="margin-top: 10px;">
+ <div class="tables">
<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>
@@ -118,7 +117,6 @@
<el-col :span="12">
<el-form-item label="褰掕繕浜猴細" prop="rebackUser"
:rules="[{ required: currentStep === 1, message: '璇疯緭鍏ュ綊杩樹汉', trigger: 'change' }]">
- <!-- <el-input v-model="form.rebackUser" size="small" :disabled="currentStep !== 1"></el-input> -->
<el-select v-model="form.rebackUser" filterable placeholder="璇烽�夋嫨" clearable size="small"
style="width: 50%;" :disabled="currentStep !== 1">
<el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name">
@@ -147,7 +145,6 @@
<el-col :span="12">
<el-form-item label="璁惧璐熻矗浜猴細" prop="deviceUser"
:rules="[{ required: currentStep === 1, message: '璇烽�夋嫨璁惧璐熻矗浜�', trigger: 'change' }]">
- <!-- <el-input v-model="form.deviceUser" size="small" :disabled="currentStep !== 1"></el-input> -->
<el-select v-model="form.deviceUser" filterable placeholder="璇烽�夋嫨" clearable size="small"
style="width: 50%;" :disabled="currentStep !== 1">
<el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name">
@@ -160,7 +157,6 @@
<el-input type="textarea" v-model="form.note" :disabled="currentStep !== 1" size="small"></el-input>
</el-form-item>
</el-col>
-
</el-row>
</el-card>
<el-row style="margin-top: 1em;">
@@ -576,76 +572,10 @@
</script>
<style scoped>
-h4 {
- font-weight: 400;
- font-size: 16px;
+.search {
+ height: 46px;
display: flex;
justify-content: space-between;
- margin: 10px 0;
-}
-
-h4 .line {
- display: inline-block;
- width: 3px;
- height: 16px;
- background: #3A7BFA;
- margin-right: 4px;
-}
-
-.tables {
- width: 100%;
- height: calc(100vh - 15em);
-}
-
-.search {
- background-color: #fff;
- display: flex;
- align-items: center;
- position: relative;
margin-top: 10px;
-}
-
-.search_thing {
- display: flex;
- align-items: center;
- height: 40px;
-}
-
-.search_label {
- width: 70px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 120px);
-}
-
-.btns {
- position: absolute;
- right: 0px;
- top: 50%;
- transform: translate(0, -50%);
-}
-
-.btns_thing {
- position: absolute;
- right: 230px;
- top: 50%;
- transform: translate(0, -50%);
-}
-
-.form .search_label {
- width: 120px;
-}
-
-.el-radio {
- margin-right: 10px;
-}
-
-.el-radio-group {
- width: 100%;
- display: flex;
- margin-top: 12px;
}
</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/calibration.vue b/src/views/CNAS/resourceDemand/device/component/calibration.vue
index 72f9359..b0fcdfa 100644
--- a/src/views/CNAS/resourceDemand/device/component/calibration.vue
+++ b/src/views/CNAS/resourceDemand/device/component/calibration.vue
@@ -36,8 +36,8 @@
</el-table-column>
</el-table>
<el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
- :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" style="margin-right: 5%;"
- @size-change="handleSizeChange" @current-change="handleCurrentChange">
+ :total="search.total" layout="->,total, sizes, prev, pager, next, jumper"
+ @size-change="handleSizeChange" @current-change="handleCurrentChange" background>
</el-pagination>
</div>
<!-- 鏍″噯椤圭洰缁存姢 -->
diff --git a/src/views/CNAS/resourceDemand/device/component/checkRecord.vue b/src/views/CNAS/resourceDemand/device/component/checkRecord.vue
index 34bf99e..d84fea0 100644
--- a/src/views/CNAS/resourceDemand/device/component/checkRecord.vue
+++ b/src/views/CNAS/resourceDemand/device/component/checkRecord.vue
@@ -210,10 +210,10 @@
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="resetForm">鍙� 娑�</el-button>
- <el-button v-if="currentStep === 0" :loading="submitFormLoading" type="primary" @click="submitCheck">纭�
+ <el-button v-if="currentStep === 0 && checkChargerUserId == userId" :loading="submitFormLoading" type="primary" @click="submitCheck">纭�
瀹�</el-button>
- <el-button v-if="currentStep === 1" :loading="submitFormLoading" @click="examine(0)">涓嶉�氳繃</el-button>
- <el-button v-if="currentStep === 1" :loading="submitFormLoading" type="primary" @click="examine(1)">閫�
+ <el-button v-if="currentStep === 1 && userId == reviewUserId" :loading="submitFormLoading" @click="examine(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == reviewUserId" :loading="submitFormLoading" type="primary" @click="examine(1)">閫�
杩�</el-button>
</span>
</el-dialog>
@@ -228,6 +228,7 @@
deviceScopeSearch,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/performance/class";
+import {mapGetters} from "vuex";
export default {
name: "check-record",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -272,7 +273,7 @@
determine: '',
remark: '',
planDetailsId: '',
- checkerUserId: '',
+ reviewUserId: '',
},
currentStep: 0,
distributionDetailList: [
@@ -282,16 +283,22 @@
equipOptions: [],
submitFormLoading: false,
userList: [],
+ reviewUserId: '',
+ checkChargerUserId: '',
}
},
mounted() {
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
openDialog(row) {
this.dialogVisible = true
this.form.planDetailsId = row.planDetailsId
+ this.checkChargerUserId = row.checkChargerUserId
this.getEquipOptions()
this.getUserList()
this.searchInfo()
@@ -303,7 +310,7 @@
this.form = { ...res.data }
this.form.planDetailsId = planDetailsId
this.recordDetailList = this.form.recordDetailList || []
- if (!this.form.checkerUserId) {
+ if (!this.form.reviewUserId) {
this.currentStep = 0
} else {
this.currentStep = 1
@@ -311,6 +318,7 @@
if (this.form.reviewStatus === 1) {
this.currentStep = 2
}
+ this.reviewUserId = this.form.reviewUserId
}
}).catch(error => {
console.error(error)
diff --git a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
index 48dcb89..edae3ac 100644
--- a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
+++ b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
@@ -1,175 +1,27 @@
<!-- 璁惧鎬昏 -->
-<style scoped>
-.title {
- height: 60px;
- line-height: 60px;
-}
-
-.search {
- background-color: #fff;
- height: 50px;
- display: flex;
- align-items: center;
-}
-
-.search_thing {
- width: 350px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 110px;
- font-size: 14px;
- text-align: left;
-}
-
-.search_input {
- width: calc(100% - 110px);
-}
-
-.table {
- background-color: #fff;
- height: calc(100vh - 17em);
- /* padding: 10px; */
- overflow-y: auto;
-}
-
-.card {
- list-style-type: none;
- display: grid;
- grid-template-columns: repeat(auto-fit, 330px);
- justify-content: start;
- grid-gap: 16px;
- min-height: 300px;
- padding-left: 0;
-}
-
-.card li {
- width: 330px;
- height: 165px;
- border-radius: 8px 8px 8px 8px;
- border: 1px solid #EEEEEE;
- margin: 0 !important;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 16px;
- font-size: 14px;
- color: #666666;
- position: relative;
- overflow: hidden;
-}
-
-.card li .img {
- width: 90px;
- height: 90px;
- border-radius: 16px;
- margin-right: 10px;
-}
-
-.list-left .list-left-info {
- line-height: 36px;
- display: flex;
-}
-
-.text-truncate {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap
-}
-
-.circles {
- position: absolute;
- width: 70px;
- height: 70px;
- right: 0;
- top: 0;
- z-index: 0;
-}
-
-.circles .circle {
- border-radius: 50%;
- opacity: 0.2;
-}
-
-.circle0,
-.circle1,
-.circle2 {
- width: 60px;
- height: 60px;
- position: absolute;
-}
-
-.circle3 {
- width: 16px;
- height: 16px;
- position: absolute;
-}
-
-.circle0 {
- bottom: 6px;
- left: 0;
-}
-
-.circle1 {
- bottom: 0;
- right: -30px;
-}
-
-.circle2 {
- left: 0;
- top: -30px;
-}
-
-.circle3 {
- top: 0;
- right: 0;
-}
-
-.success .circle {
- background: #34BD66;
-}
-
-.danger .circle {
- background: #FF3838;
-}
-
-.warning .circle {
- background: #FBB247;
-}
-
-.info .circle {
- background: #909399;
-}
-
-.el-form-item {
- margin-top: 11px;
- margin-bottom: 11px;
-}
-</style>
-
<template>
<div class="role_manage">
- <div>
- <el-form :model="entity" inline label-position="right" label-width="80px">
- <el-form-item label="鐘舵��:">
- <el-select v-model="entity.deviceStatus" placeholder="鍏ㄩ儴" size="small" clearable>
+ <div style="display: flex;justify-content: space-between;margin-top: 10px;">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">鐘舵��</span>
+ <el-select v-model="entity.deviceStatus" placeholder="鍏ㄩ儴"
+ @change="currentPage = 1, keyMap = {}, list = [], finishLoding = false, refreshTable()"
+ size="small" clearable>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
- </el-form-item>
- <el-form-item label="璁惧鍚嶇О:">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.deviceName"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary"
- @click="currentPage = 1, keyMap = {}, list = [], finishLoding = false, refreshTable()">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
+ </div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">璁惧鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.deviceName"
+ @keyup.enter.native="currentPage = 1, keyMap = {}, list = [], finishLoding = false, refreshTable()"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button size="mini" type="primary" @click="currentPage = 1, keyMap = {}, list = [], finishLoding = false, refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
+ </div>
+ </div>
</div>
<div class="table" v-loading="loading">
<scroll-pagination @load="refreshTable()" :finishLoding="finishLoding" :list="list"
@@ -390,3 +242,124 @@
}
}
</script>
+<style scoped>
+.table {
+ background-color: #fff;
+ height: calc(100vh - 17em);
+ /* padding: 10px; */
+ overflow-y: auto;
+}
+
+.card {
+ list-style-type: none;
+ display: grid;
+ grid-template-columns: repeat(auto-fit, 330px);
+ justify-content: start;
+ grid-gap: 16px;
+ min-height: 300px;
+ padding-left: 0;
+}
+
+.card li {
+ width: 330px;
+ height: 165px;
+ border-radius: 8px 8px 8px 8px;
+ border: 1px solid #EEEEEE;
+ margin: 0 !important;
+ display: flex;
+ align-items: center;
+ box-sizing: border-box;
+ padding: 16px;
+ font-size: 14px;
+ color: #666666;
+ position: relative;
+ overflow: hidden;
+}
+
+.card li .img {
+ width: 90px;
+ height: 90px;
+ border-radius: 16px;
+ margin-right: 10px;
+}
+
+.list-left .list-left-info {
+ line-height: 36px;
+ display: flex;
+}
+
+.text-truncate {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap
+}
+
+.circles {
+ position: absolute;
+ width: 70px;
+ height: 70px;
+ right: 0;
+ top: 0;
+ z-index: 0;
+}
+
+.circles .circle {
+ border-radius: 50%;
+ opacity: 0.2;
+}
+
+.circle0,
+.circle1,
+.circle2 {
+ width: 60px;
+ height: 60px;
+ position: absolute;
+}
+
+.circle3 {
+ width: 16px;
+ height: 16px;
+ position: absolute;
+}
+
+.circle0 {
+ bottom: 6px;
+ left: 0;
+}
+
+.circle1 {
+ bottom: 0;
+ right: -30px;
+}
+
+.circle2 {
+ left: 0;
+ top: -30px;
+}
+
+.circle3 {
+ top: 0;
+ right: 0;
+}
+
+.success .circle {
+ background: #34BD66;
+}
+
+.danger .circle {
+ background: #FF3838;
+}
+
+.warning .circle {
+ background: #FBB247;
+}
+
+.info .circle {
+ background: #909399;
+}
+
+.el-form-item {
+ margin-top: 11px;
+ margin-bottom: 11px;
+}
+</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
index f837ef1..64e4de1 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
@@ -27,7 +27,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue b/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue
index 675f00f..121a297 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue
@@ -30,7 +30,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
index 4f2b061..de3f07b 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
@@ -3,24 +3,27 @@
<div>
<div>
<div style="margin: 10px 0;display: flex;align-items: center;justify-content: space-between;">
- <span>骞村害璁″垝琛�</span>
+ <div class="title">
+ <span style="font-weight: bold">骞村害璁″垝琛�</span>
+ </div>
<div>
<el-button size="small" type="primary" @click="getYearTableData">鍒锋柊</el-button>
- <el-button style="margin-right: 10px" size="small" type="primary" @click="addYearPlan('add')">鏂板</el-button>
+ <el-button size="small" type="primary" @click="addYearPlan('add')">鏂板</el-button>
<!-- <el-button size="small" type="primary" @click="record">瀵煎叆</el-button>-->
</div>
</div>
<div>
- <el-table ref="yearTable" v-loading="yearTableDataLoading" :data="yearTableData" height="calc(60vh - 20em)"
+ <el-table ref="yearTable" v-loading="yearTableDataLoading"
+ :data="yearTableData" height="calc(60vh - 16em)"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- highlight-current-row style="width: 100% ;" @current-change="currentChange">
+ highlight-current-row @current-change="currentChange">
<!-- 琛ㄦ牸鍒� -->
<el-table-column align="center" header-align="center" label="搴忓彿" prop="prop" type="index"
width="70"></el-table-column>
<el-table-column label="骞翠唤" min-width="80" prop="planYear"></el-table-column>
- <el-table-column label="璁″垝鍚嶇О" min-width="180" prop="planName"></el-table-column>
+ <el-table-column label="璁″垝鍚嶇О" min-width="180" prop="planName" show-overflow-tooltip></el-table-column>
<el-table-column label="缂栧埗浜�" min-width="100" prop="writeName"></el-table-column>
- <el-table-column label="缂栧埗鏃ユ湡" min-width="150" prop="writeTime"></el-table-column>
+ <el-table-column label="缂栧埗鏃ユ湡" min-width="160" prop="writeTime"></el-table-column>
<el-table-column label="鎵瑰噯鐘舵��" min-width="100" prop="ratifyStatus">
<template slot-scope="scope">
<el-tag v-if="scope.row.ratifyStatus === 1" type="success">鎵瑰噯</el-tag>
@@ -46,23 +49,31 @@
</el-table-column>
</el-table>
<el-pagination :current-page="1" :page-size="pagination.size" :page-sizes="[10, 20, 30, 50, 100]"
- :total="pagination.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
- @current-change="handleCurrentChange">
+ background :total="pagination.total" layout="->,total, sizes, prev, pager, next, jumper"
+ @size-change="handleSizeChange" @current-change="handleCurrentChange">
</el-pagination>
</div>
</div>
<div>
- <span>骞村害璁″垝鏄庣粏琛�</span>
<div class="title">
- <div class="title-search">
- <span style="width: 120px;font-size: 14px">璁惧鍚嶇О鍙婂瀷鍙凤細</span>
- <el-input v-model="searchForm.deviceName" clearable size="small"
- style="margin-right: 10px;width: 220px"></el-input>
- <span style="width: 80px;font-size: 14px">浠櫒缂栧彿锛�</span>
- <el-input v-model="searchForm.deviceNumber" clearable size="small"
- style="margin-right: 10px;width: 220px"></el-input>
- <el-button size="small" type="primary" @click="getYearTableDetailData(currentRow)">鏌� 璇�</el-button>
- <el-button size="small" @click="reset">閲� 缃�</el-button>
+ <span style="font-weight: bold">骞村害璁″垝鏄庣粏琛�</span>
+ </div>
+ <div class="search">
+ <div>
+ <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
+ <el-form-item label="璁惧鍚嶇О鍙婂瀷鍙�" prop="deviceName">
+ <el-input v-model="searchForm.deviceName" clearable
+ @keyup.enter.native="getYearTableDetailData(currentRow)" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="浠櫒缂栧彿" prop="deviceNumber">
+ <el-input v-model="searchForm.deviceNumber"
+ @keyup.enter.native="getYearTableDetailData(currentRow)" clearable size="small"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="getYearTableDetailData(currentRow)">鏌ヨ</el-button>
+ <el-button size="mini" @click="reset">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
<div>
<el-button size="small" type="primary" @click="handleForm('add')">鏂板</el-button>
@@ -71,11 +82,11 @@
<div>
<el-table ref="yearTableDetailData" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- height="calc(60vh - 20em)" style="width: 100% ;">
+ :height="'calc(100vh - 34em)'" 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="180" prop="deviceName"></el-table-column>
+ <el-table-column label="璁惧鍚嶇О鍙婂瀷鍙�" min-width="180" prop="deviceName" show-overflow-tooltip></el-table-column>
<el-table-column label="璁惧鏁伴噺" min-width="180" prop="deviceAmount"></el-table-column>
<el-table-column label="浠櫒缂栧彿" min-width="150" prop="deviceNumber"></el-table-column>
<el-table-column label="妫�瀹氬崟浣�" min-width="150" prop="verificationUnit"> </el-table-column>
@@ -94,8 +105,8 @@
</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">
+ background :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper"
+ @size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
</div>
@@ -597,14 +608,27 @@
<style scoped>
.title {
- display: flex;
- justify-content: space-between;
- align-items: center;
+ position: relative;
+ font-size: 16px;
+ color: #333;
+ font-weight: 400;
+ padding-left: 10px;
+ margin-bottom: 10px;
}
-.title-search {
+.title::before {
+ position: absolute;
+ left: 0;
+ top: 4px;
+ content: '';
+ width: 4px;
+ height: 16px;
+ background-color: #3A7BFA;
+ border-radius: 2px;
+}
+.search {
+ height: 46px;
display: flex;
- align-items: center;
- margin: 10px 0;
+ justify-content: space-between;
}
</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentCheck.vue b/src/views/CNAS/resourceDemand/device/component/equipmentCheck.vue
index a7d2476..a0d5d32 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentCheck.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentCheck.vue
@@ -128,10 +128,10 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="resetForm">鍙� 娑�</el-button>
- <el-button v-if="currentStep === 0" :loading="submitFormLoading" type="primary" @click="submitCheck">纭�
+ <el-button v-if="currentStep === 0 && userId == checkChargerUserId" :loading="submitFormLoading" type="primary" @click="submitCheck">纭�
瀹�</el-button>
- <el-button v-if="currentStep === 1" :loading="submitFormLoading" @click="examine(0)">涓嶉�氳繃</el-button>
- <el-button v-if="currentStep === 1" :loading="submitFormLoading" type="primary" @click="examine(1)">閫�
+ <el-button v-if="currentStep === 1 && userId == reviewUserId" :loading="submitFormLoading" @click="examine(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == reviewUserId" :loading="submitFormLoading" type="primary" @click="examine(1)">閫�
杩�</el-button>
</span>
</el-dialog>
@@ -146,6 +146,7 @@
addExamineRecordContrast,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
export default {
name: "equipment-check",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -178,16 +179,22 @@
equipOptions: [],
recordContrastDetailsList: [],
userList: [],
+ checkChargerUserId: '',
+ reviewUserId: ''
}
},
mounted() {
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
openDialog(row) {
this.dialogVisible = true
this.form.planDetailsId = row.planDetailsId
+ this.checkChargerUserId = row.checkChargerUserId
this.getEquipOptions()
this.getUserList()
this.searchInfo()
@@ -205,6 +212,7 @@
if (this.form.reviewStatus === 1) {
this.currentStep = 2
}
+ this.reviewUserId = this.form.reviewUserId
}
}).catch(error => {
console.error(error)
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue b/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue
index 8c24324..a07bb06 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue
@@ -28,7 +28,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
new file mode 100644
index 0000000..add36e0
--- /dev/null
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
@@ -0,0 +1,297 @@
+<template>
+ <div>
+ <div class="search">
+ <el-button size="small" type="primary" @click="refreshTableList">鍒锋柊</el-button>
+ <el-button size="small" type="primary" @click="openDia('add')">鏂� 寤�</el-button>
+ <el-button :loading="outLoading" size="small" type="primary" @click="openHandleOut">瀵� 鍑�</el-button>
+ </div>
+ <div>
+ <lims-table :tableData="tableData" :column="column"
+ height="calc(100vh - 20em)" @pagination="pagination"
+ :page="page" :tableLoading="tableLoading"></lims-table>
+ </div>
+ <el-dialog :visible.sync="dialogVisible" title="浠櫒璁惧浣跨敤缁存姢淇濆吇琛�" width="55%">
+ <el-form ref="form" :model="form" label-width="130px" :rules="rules">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="缁存姢鏃ユ湡:" prop="maintenanceDate">
+ <el-date-picker v-model="form.maintenanceDate" :disabled="operationType === 'view'"
+ format="yyyy-MM-dd" size="small" placeholder="閫夋嫨鏃ユ湡" style="width:100%"
+ type="date" value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="缁存姢鍐呭:" prop="maintenanceContentArr">
+ <el-checkbox-group v-model="form.maintenanceContentArr" :disabled="operationType === 'view'">
+ <el-checkbox v-for="city in qualificationList" :key="city.label" :label="city.label"
+ :value="city.label"></el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="缁存姢浜�:" prop="maintenanceUserId">
+ <el-select v-model="form.maintenanceUserId"
+ clearable filterable
+ placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+ <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="澶囨敞:" prop="remark">
+ <el-input v-model="form.remark" :disabled="operationType === 'view'" size="small"
+ style="width: 100%;"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeDia">鍙� 娑�</el-button>
+ <el-button v-if="operationType !== 'view'" type="primary" @click="saveRecord" :loading="buttonLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import {
+ addDeviceMaintenance,
+ deleteDeviceMaintenance, exportDeviceMaintenance,
+ selectDeviceMaintenancePage
+} from "@/api/cnas/resourceDemand/device";
+import limsTable from "@/components/Table/lims-table.vue";
+import {selectUserCondition} from "@/api/system/user";
+
+export default {
+ name: '',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: {limsTable},
+ props: {
+ clickNodeVal: {
+ type: Object,
+ default: () => {
+ return {};
+ }
+ },
+ },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ search: {
+ maintenanceDate: '',
+ },
+ outLoading: false,
+ tableData: [],
+ tableLoading: false,
+ page: {
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ column: [
+ { label: '缁存姢鏃ユ湡', prop: 'maintenanceDate' },
+ { label: '缁存姢鍐呭', prop: 'maintenanceContent' },
+ { label: '缁存姢浜�', prop: 'maintenanceUserName' },
+ { label: '澶囨敞', prop: 'remark' },
+ {
+ dataType: 'action',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '缂栬緫',
+ type: 'text',
+ clickFun: (row) => {
+ this.openDia('edit', row);
+ },
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDeleteClick(row);
+ },
+ },
+ ]
+ }
+ ],
+ dialogVisible: false,
+ form: {
+ id: '',
+ deviceId: '',
+ maintenanceDate: '',
+ maintenanceContentArr: [],
+ maintenanceContent: '',
+ maintenanceUserId: '',
+ remark: '',
+ },
+ operationType: '',
+ buttonLoading: false,
+ qualificationList: [],
+ rules: {
+ maintenanceDate: [{ required: true, message: '璇烽�夋嫨缁存姢鏃ユ湡', trigger: 'change' }],
+ maintenanceContentArr: [{ required: true, message: '璇烽�夋嫨缁存姢鍐呭', trigger: 'change' }],
+ maintenanceUserId: [{ required: true, message: '璇烽�夋嫨缁存姢浜�', trigger: 'change' }],
+ },
+ responsibleOptions: [],
+ };
+ },
+ mounted() {
+ this.refreshTableList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鐐瑰嚮鍒锋柊
+ refreshTableList () {
+ this.page.current = 1;
+ this.getTableList()
+ },
+ // 鍒嗛〉鍒囨崲
+ pagination(page) {
+ this.page.size = page.limit
+ this.getTableList()
+ },
+ getTableList () {
+ this.tableLoading = true
+ selectDeviceMaintenancePage({
+ deviceId: this.clickNodeVal.value,
+ ...this.page
+ }).then(res => {
+ this.tableLoading = false
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }).catch(err => {
+ this.tableLoading = false
+ })
+ },
+ // 鎵撳紑鎿嶄綔寮规
+ openDia (type, row) {
+ this.operationType = type
+ this.dialogVisible = true
+ this.$nextTick(() => {
+ this.$refs['form'].resetFields()
+ this.form.id = ''
+ if (this.operationType === 'edit') {
+ this.form = {...row}
+ this.$set(this.form, 'maintenanceContentArr', this.form.maintenanceContent.split(','))
+ }
+ })
+ this.getDictS()
+ this.getUserList()
+ },
+ // 鏌ヨ缁存姢鍐呭閫夋嫨妗嗗唴瀹�
+ getDictS () {
+ // 瀹氫箟瀹為獙瀹ゅ悕绉颁笌缁存姢鍐呭绫诲瀷鐨勬槧灏勫叧绯�
+ const labTypeMapping = {
+ '鑰佸寲瀹�': 'aging_maintenance_content',
+ '鑰佸寲瀹為獙瀹�': 'aging_maintenance_content',
+ '鐢垫�ц兘瀹為獙瀹�': 'electrical_maintenance_content',
+ '鐜瀹為獙瀹�': 'environmental_maintenance_content',
+ '鐕冪儳瀹為獙瀹�': 'burn_maintenance_content',
+ '娣风偧瀹為獙瀹�': 'mixing_maintenance_content',
+ '妫�娴嬩腑蹇冪數鎬ц兘瀹為獙瀹�': 'center_electrical_maintenance_content',
+ '鎭掓俯浜�': 'temperature2_maintenance_content',
+ '鎭掓俯涓�': 'temperature1_maintenance_content',
+ '鍖栧瀹為獙瀹�': 'chemistry_maintenance_content',
+ '鍒舵牱瀹�': 'sample_maintenance_content',
+ '浣庢俯瀹為獙瀹�': 'hypothermia_maintenance_content',
+ };
+ // 鑾峰彇褰撳墠鑺傜偣鐨勫疄楠屽鍚嶇О
+ const name = this.clickNodeVal.parent.label;
+ // 鏍规嵁鏄犲皠鍏崇郴鑾峰彇瀵瑰簲鐨勭被鍨�
+ const type = labTypeMapping[name];
+ this.getDicts(type).then((response) => {
+ this.qualificationList = response.data.map((m) => {
+ return {
+ label: m.dictLabel,
+ value: m.dictValue,
+ };
+ });
+ });
+ },
+ openHandleOut () {
+ this.outLoading = true
+ exportDeviceMaintenance({
+ deviceId: this.clickNodeVal.value
+ }).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res], { type: 'application/octet-stream' });
+ this.$download.saveAs(blob, '璁惧缁存姢淇濆吇.doc')
+ })
+
+ },
+ handleDeleteClick(row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deleteDeviceMaintenance({ id: row.id }).then(res => {
+ this.$message({
+ type: 'success',
+ message: '鍒犻櫎鎴愬姛!'
+ });
+ this.refreshTableList()
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ // 鎻愪氦鏂板鍜屼繚瀛�
+ saveRecord () {
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.buttonLoading = true;
+ this.form.maintenanceContent = this.form.maintenanceContentArr.join(',')
+ this.form.deviceId = this.clickNodeVal.value
+ addDeviceMaintenance(this.form).then(res => {
+ this.buttonLoading = false;
+ this.$message.success('鏂板鎴愬姛')
+ this.closeDia()
+ this.getTableList()
+ }).catch(err => {
+ this.buttonLoading = false;
+ })
+ }
+ })
+ },
+ closeDia () {
+ this.$refs['form'].resetFields();
+ this.dialogVisible = false
+ this.refreshTableList()
+ },
+ // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
+ getUserList() {
+ selectUserCondition({type: 2}).then(res => {
+ if (res.code == 200) {
+ this.responsibleOptions = res.data
+ }
+ })
+ },
+ },
+ watch: {
+ // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
+ clickNodeVal(newVal) {
+ if (newVal.value) {
+ this.refreshTableList();
+ }
+ },
+ }
+};
+</script>
+
+<style scoped>
+.search {
+ height: 46px;
+ text-align: right;
+ margin-top: 10px;
+}
+</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
index 7726223..1809fa2 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
@@ -14,7 +14,7 @@
width="70"></el-table-column>
<el-table-column label="骞翠唤" min-width="80" prop="planYear"></el-table-column>
<el-table-column label="缂栧埗浜�" min-width="120" prop="compiler"></el-table-column>
- <el-table-column label="缂栧埗鏃堕棿" min-width="150" prop="datePreparation"></el-table-column>
+ <el-table-column label="缂栧埗鏃堕棿" min-width="160" prop="datePreparation"></el-table-column>
<el-table-column label="瀹℃牳浜�" min-width="150" prop="audit"></el-table-column>
<el-table-column label="瀹℃牳鏃堕棿" min-width="180" prop="auditDate"></el-table-column>
<el-table-column label="瀹℃牳鐘舵��" min-width="180" prop="status">
@@ -24,10 +24,11 @@
</template>
</el-table-column>
<!-- 鎿嶄綔鎸夐挳 -->
- <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="240">
+ <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="260">
<template slot-scope="scope">
<el-button :disabled="scope.row.status === 1" size="small" type="text"
@click="handleForm('edit', scope.row)">缂栬緫</el-button>
+ <el-button size="small" type="text" @click="handleForm('view', scope.row)">鏌ョ湅</el-button>
<el-button :disabled="scope.row.status === 1" size="small" type="text"
@click="tellApprove(scope.row.maintenancePlanId)">瀹℃牳閫氱煡</el-button>
<el-button :disabled="scope.row.status === 1 || userId != scope.row.auditId" size="small" type="text"
@@ -39,7 +40,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
@@ -47,54 +48,54 @@
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="applicationForm"
title="璁惧淇濆吇璁″垝琛�" width="80%" @close="closeDialog">
<div style="display: flex;align-items: center;">
- <el-button v-if="operationType !== 'check'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
- <span style="width: 60px">骞翠唤锛�</span>
+ <el-button v-if="operationType === 'edit' || operationType === 'add'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
+ <span style="width: 60px;margin-left: 10px">骞翠唤锛�</span>
<el-date-picker v-model="form.planYear" type="year" value-format="yyyy" clearable size="small" format="yyyy"
- placeholder="閫夋嫨骞�">
+ placeholder="閫夋嫨骞�" :disabled="operationType !== 'edit' && operationType !== 'add'">
</el-date-picker>
</div>
<div style="margin: 10px 0">
<el-table ref="yearTable" :data="deviceMaintenancePlanDetails" id="templateParamTable" row-key="deviceId"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- height="300px" border style="width: 100% ;">
+ height="560px" style="width: 100% ;">
<el-table-column align="center" header-align="center" label="搴忓彿" type="index" width="60"></el-table-column>
<el-table-column label="璁惧鍚嶇О" min-width="170" prop="deviceName">
<template slot-scope="scope">
- <el-input v-model="scope.row.deviceName" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.deviceName" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small"></el-input>
</template>
</el-table-column>
<el-table-column label="璁惧缂栧彿" min-width="140" prop="deviceNumber">
<template slot-scope="scope">
- <el-input v-model="scope.row.deviceNumber" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.deviceNumber" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small"></el-input>
</template>
</el-table-column>
<el-table-column label="褰掑睘瀹為獙瀹�" min-width="120" prop="storagePoint">
<template slot-scope="scope">
- <el-input v-model="scope.row.storagePoint" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.storagePoint" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small"></el-input>
</template>
</el-table-column>
<el-table-column label="淇濆吇鍏抽敭閮ㄤ綅" min-width="120" prop="maintenanceSite">
<template slot-scope="scope">
- <el-input v-model="scope.row.maintenanceSite" :disabled="operationType === 'check'" clearable size="small"
+ <el-input v-model="scope.row.maintenanceSite" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable size="small"
type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="淇濆吇鍐呭" min-width="120" prop="maintenanceContent">
<template slot-scope="scope">
- <el-input v-model="scope.row.maintenanceContent" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.maintenanceContent" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="淇濆吇鍛ㄦ湡" min-width="90" prop="maintenanceIntervals">
<template slot-scope="scope">
- <el-input v-model="scope.row.maintenanceIntervals" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.maintenanceIntervals" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small"></el-input>
</template>
</el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center" v-if="operationType !== 'check'">
+ <el-table-column label="鎿嶄綔" width="80" align="center" v-if="operationType === 'edit' || operationType === 'add'">
<template slot-scope="scope">
<el-button style="color: #f56c6c" type="text" @click="deleteRow(scope.$index)">鍒犻櫎</el-button>
</template>
@@ -103,7 +104,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">鍙� 娑�</el-button>
- <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
+ <el-button v-if="operationType === 'edit' || operationType === 'add'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
璁�</el-button>
<el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
@click="checkStatus(0)">涓嶉�氳繃</el-button>
@@ -124,7 +125,7 @@
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="addEquipDia = false">鍙� 娑�</el-button>
- <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary"
+ <el-button v-if="operationType === 'edit' || operationType === 'add'" :loading="submitFormLoading" type="primary"
@click="changeMachineName">纭�
璁�</el-button>
</span>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue b/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue
index b407017..ec8b334 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue
@@ -30,7 +30,7 @@
</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">
+ @size-change="handleSizeChange1" @current-change="handleCurrentChange1" background>
</el-pagination>
</div>
</div>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
index 1595bd4..06dc2ad 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
@@ -3,10 +3,12 @@
<div>
<div>
<div style="margin: 10px 0;display: flex;align-items: center;justify-content: space-between;">
- <span>骞村害璁″垝琛�</span>
+ <div class="title">
+ <span style="font-weight: bold">骞村害璁″垝琛�</span>
+ </div>
<div style="display: flex;align-items: center;">
- <el-button style="margin-right: 10px" size="small" type="primary" @click="getYearTableData">鍒锋柊</el-button>
- <el-button style="margin-right: 10px" size="small" type="primary" @click="addYearPlan('add')">鏂板</el-button>
+ <el-button size="small" type="primary" @click="getYearTableData">鍒锋柊</el-button>
+ <el-button size="small" type="primary" @click="addYearPlan('add')">鏂板</el-button>
<!-- <el-upload ref="upload" :action="action"-->
<!-- :before-upload="beforeUpload" :headers="uploadHeader" :on-error="onError"-->
<!-- :on-success="handleSuccessUp" :show-file-list="false" accept='.xls,.xlsx'>-->
@@ -15,16 +17,17 @@
</div>
</div>
<div>
- <el-table ref="yearTable" v-loading="yearTableDataLoading" :data="yearTableData" height="calc(60vh - 20em)"
+ <el-table ref="yearTable" v-loading="yearTableDataLoading" :data="yearTableData"
+ height="calc(60vh - 16em)"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- highlight-current-row style="width: 100% ;" @current-change="currentChange">
+ highlight-current-row @current-change="currentChange">
<!-- 琛ㄦ牸鍒� -->
<el-table-column align="center" header-align="center" label="搴忓彿" prop="prop" type="index"
width="70"></el-table-column>
<el-table-column label="骞翠唤" min-width="80" prop="planYear"></el-table-column>
- <el-table-column label="璁″垝鍚嶇О" min-width="180" prop="planName"></el-table-column>
+ <el-table-column label="璁″垝鍚嶇О" min-width="180" prop="planName" show-overflow-tooltip></el-table-column>
<el-table-column label="缂栧埗浜�" min-width="100" prop="writeName"></el-table-column>
- <el-table-column label="缂栧埗鏃ユ湡" min-width="150" prop="writeTime"></el-table-column>
+ <el-table-column label="缂栧埗鏃ユ湡" min-width="160" prop="writeTime"></el-table-column>
<el-table-column label="鎵瑰噯鐘舵��" min-width="100" prop="ratifyStatus">
<template slot-scope="scope">
<el-tag v-if="scope.row.ratifyStatus === 1" type="success">鎵瑰噯</el-tag>
@@ -50,23 +53,31 @@
</el-table-column>
</el-table>
<el-pagination :current-page="1" :page-size="pagination.size" :page-sizes="[10, 20, 30, 50, 100]"
- :total="pagination.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
- @current-change="handleCurrentChange">
+ background :total="pagination.total" layout="->,total, sizes, prev, pager, next, jumper"
+ @size-change="handleSizeChange" @current-change="handleCurrentChange">
</el-pagination>
</div>
</div>
<div>
- <span>骞村害璁″垝鏄庣粏琛�</span>
<div class="title">
- <div class="title-search">
- <span style="width: 120px;font-size: 14px">璁惧缂栧彿锛�</span>
- <el-input v-model="searchForm.deviceNumber" clearable size="small"
- style="margin-right: 10px;width: 220px"></el-input>
- <span style="width: 80px;font-size: 14px">璁惧鍚嶇О锛�</span>
- <el-input v-model="searchForm.deviceName" clearable size="small"
- style="margin-right: 10px;width: 220px"></el-input>
- <el-button size="small" type="primary" @click="getYearTableDetailData(currentRow)">鏌� 璇�</el-button>
- <el-button size="small" @click="reset">閲� 缃�</el-button>
+ <span style="font-weight: bold">骞村害璁″垝鏄庣粏琛�</span>
+ </div>
+ <div class="search">
+ <div>
+ <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
+ <el-form-item label="璁惧缂栧彿" prop="deviceNumber">
+ <el-input v-model="searchForm.deviceNumber" clearable size="small"
+ @keyup.enter.native="getYearTableDetailData(currentRow)"></el-input>
+ </el-form-item>
+ <el-form-item label="璁惧鍚嶇О" prop="deviceName">
+ <el-input v-model="searchForm.deviceName" clearable size="small"
+ @keyup.enter.native="getYearTableDetailData(currentRow)"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="getYearTableDetailData(currentRow)">鏌ヨ</el-button>
+ <el-button size="mini" @click="reset">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
<div>
<el-button size="small" type="primary" @click="handleForm('add')">鏂板</el-button>
@@ -75,17 +86,33 @@
<div>
<el-table ref="yearTableDetailData" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- height="calc(60vh - 20em)" style="width: 100% ;">
+ :height="'calc(100vh - 34em)'" 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="180" prop="deviceNumber"></el-table-column>
- <el-table-column label="璁惧鍚嶇О" min-width="180" prop="deviceName"></el-table-column>
+ <el-table-column label="璁惧鍚嶇О" min-width="180" prop="deviceName" show-overflow-tooltip></el-table-column>
<el-table-column label="鏍告煡鏃堕棿" min-width="150" prop="checkTime"></el-table-column>
<el-table-column label="鏍告煡鎸囨爣" min-width="150" prop="checkIndex"> </el-table-column>
<el-table-column label="鏍告煡鏂规硶" min-width="150" prop="checkMethod"></el-table-column>
<el-table-column label="缁撴灉濡備綍鍒ゅ畾" min-width="150" prop="howResults"></el-table-column>
<el-table-column label="鏍告煡璐熻矗浜�" min-width="150" prop="checkChargerUser"></el-table-column>
+ <el-table-column label="璁板綍鐘舵��" min-width="100" prop="recordStatus">
+ <template slot-scope="scope">
+ <el-tag type="" v-if="scope.row.recordStatus === 0" disable-transitions>鏈紑濮�</el-tag>
+ <el-tag type="warning" v-if="scope.row.recordStatus === 1" disable-transitions>寰呮壒鍑�</el-tag>
+ <el-tag type="success" v-if="scope.row.recordStatus === 2" disable-transitions>閫氳繃</el-tag>
+ <el-tag type="danger" v-if="scope.row.recordStatus === 3" disable-transitions>涓嶉�氳繃</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="瀵规瘮鐘舵��" min-width="100" prop="recordContrastStatus">
+ <template slot-scope="scope">
+ <el-tag type="" v-if="scope.row.recordContrastStatus === 0" disable-transitions>鏈紑濮�</el-tag>
+ <el-tag type="warning" v-if="scope.row.recordContrastStatus === 1" disable-transitions>寰呮壒鍑�</el-tag>
+ <el-tag type="success" v-if="scope.row.recordContrastStatus === 2" disable-transitions>閫氳繃</el-tag>
+ <el-tag type="danger" v-if="scope.row.recordContrastStatus === 3" disable-transitions>涓嶉�氳繃</el-tag>
+ </template>
+ </el-table-column>
<el-table-column label="澶囨敞" min-width="150" prop="remark"></el-table-column>
<!-- 鎿嶄綔鎸夐挳 -->
<el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="260">
@@ -101,7 +128,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
@@ -642,15 +669,28 @@
</script>
<style scoped>
-.title {
+.search {
+ height: 46px;
display: flex;
justify-content: space-between;
- align-items: center;
+}
+.title {
+ position: relative;
+ font-size: 16px;
+ color: #333;
+ font-weight: 400;
+ padding-left: 10px;
+ margin-bottom: 10px;
}
-.title-search {
- display: flex;
- align-items: center;
- margin: 10px 0;
+.title::before {
+ position: absolute;
+ left: 0;
+ top: 4px;
+ content: '';
+ width: 4px;
+ height: 16px;
+ background-color: #3A7BFA;
+ border-radius: 2px;
}
</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/fault.vue b/src/views/CNAS/resourceDemand/device/component/fault.vue
index a9eb5d5..743d7f0 100644
--- a/src/views/CNAS/resourceDemand/device/component/fault.vue
+++ b/src/views/CNAS/resourceDemand/device/component/fault.vue
@@ -11,8 +11,8 @@
</div>
</div>
<div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="resetSearch">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="getTableList(clickNodeVal.value)">鏌� 璇�</el-button>
+ <el-button size="mini" type="primary" @click="getTableList(clickNodeVal.value)">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearch">閲嶇疆</el-button>
</div>
<div class="btns">
<el-button size="small" type="primary" @click="dialogVisible = true, addRecode()">鏂板缓</el-button>
diff --git a/src/views/CNAS/resourceDemand/device/component/files.vue b/src/views/CNAS/resourceDemand/device/component/files.vue
index de19de7..3a96e5a 100644
--- a/src/views/CNAS/resourceDemand/device/component/files.vue
+++ b/src/views/CNAS/resourceDemand/device/component/files.vue
@@ -25,7 +25,7 @@
<el-col :span="8">
<div class="form-item">
<label>璁惧鍚嶇О</label>
- <!-- <p>{{ Mdata.deviceName }}</p> -->
+<!-- <p>{{ Mdata.deviceName }}</p> -->
<el-tooltip class="item" :content="Mdata.deviceName">
<span class="text-ellipsis">{{ Mdata.deviceName }}</span>
</el-tooltip>
@@ -170,9 +170,9 @@
<el-table-column prop="quantity" label="浠芥暟" min-width="80" />
<el-table-column prop="pageCount" label="椤电爜" min-width="80" />
<el-table-column prop="provider" label="鎻愪緵鑰�" min-width="150" />
- <el-table-column prop="provideDate" label="褰掓。鏃ユ湡" min-width="150" />
+ <el-table-column prop="provideDate" label="褰掓。鏃ユ湡" min-width="170" />
<el-table-column prop="comments" label="澶囨敞" min-width="150" />
- <el-table-column fixed="right" label="鎿嶄綔" min-width="180">
+ <el-table-column fixed="right" label="鎿嶄綔" min-width="180" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleAttachmentClick(scope.row)">涓嬭浇闄勪欢</el-button>
<el-button type="text" size="small" @click="handleViewClick(scope.row)">缂栬緫</el-button>
@@ -914,7 +914,6 @@
.page-header {
display: flex;
justify-content: space-between;
- margin-top: 10px;
}
h4 {
diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue b/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue
index dd0b3e8..924e81d 100644
--- a/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue
+++ b/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue
@@ -38,7 +38,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
diff --git a/src/views/CNAS/resourceDemand/device/component/maintenance.vue b/src/views/CNAS/resourceDemand/device/component/maintenance.vue
deleted file mode 100644
index 87d2588..0000000
--- a/src/views/CNAS/resourceDemand/device/component/maintenance.vue
+++ /dev/null
@@ -1,341 +0,0 @@
-<!-- 璁惧缁存姢 -->
-<template>
- <div>
- <div class="search">
- <div class="search_thing">
- <div class="search_label">娴佺▼缂栧彿锛�</div>
- <div class="search_input"><el-input v-model="search.deviceNumber" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="getAllMessage(clickNodeVal.value)"></el-input></div>
- </div>
- <div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="resetSearch">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="getAllMessage(clickNodeVal.value)">鏌� 璇�</el-button>
- </div>
- <div class="btns">
- <el-button size="small" type="primary" @click="dialogVisible = true; add()">娣诲姞缁存姢璁板綍</el-button>
- <el-button :loading="outLoading" size="small" type="primary" @click="handleDownOne">瀵煎嚭</el-button>
- </div>
- </div>
- <div class="tables" style="margin-top: 10px;">
- <el-table ref="table" :data="MaintainParam" height="calc(100vh - 20em)"
- :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
- <el-table-column label="搴忓彿" type="index" width="120">
- <template v-slot="scope">
- <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column label="娴佺▼缂栧彿" min-width="180" prop="deviceNumber" />
- <el-table-column label="璁惧鍚嶇О" min-width="150" prop="deviceName" />
- <el-table-column label="绠$悊缂栧彿" min-width="150" prop="managementNumber" />
- <el-table-column label="缁存姢鍐呭" min-width="150" prop="content" />
- <el-table-column label="缁存姢鏃堕棿" min-width="150" prop="date" />
- <el-table-column label="鎻愪氦浜�" min-width="150" prop="name" />
- <el-table-column label="鎻愪氦鏃ユ湡" min-width="150" prop="date">
- </el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" width="110">
- <template slot-scope="scope">
- <el-button size="small" type="text" @click="handleViewClick(scope.row)">鏌ョ湅</el-button>
- <el-button size="small" type="text" @click="handleDeleteClick(scope.$index, scope.row)">鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
- :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
- @current-change="handleCurrentChange">
- </el-pagination>
- </div>
- <!-- 鏂板缓缁存姢 -->
- <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" title="娣诲姞缁存姢璁板綍"
- top="5vh" width="60%">
- <el-form ref="form" :model="formData" label-width="130px">
- <el-row>
- <el-col :span="24">
- <el-form-item label="娴佺▼缂栧彿:" prop="deviceNumber">
- <el-input v-model="formData.deviceNumber" clearable disabled size="small"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="璁惧鍚嶇О:" prop="deviceName">
- <el-input v-model="formData.deviceName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="绠$悊缂栧彿:" prop="managementNumber">
- <el-input v-model="formData.managementNumber" clearable disabled placeholder="璇疯緭鍏�"
- size="small"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ョ淮鎶ゅ唴瀹�', trigger: 'blur' }]" label="缁存姢鍐呭:"
- prop="content">
- <el-input v-model="formData.content" placeholder="璇疯緭鍏�" size="small" type="textarea"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ョ淮鎶ゆ椂闂�', trigger: 'blur' }]" label="缁存姢鏃堕棿:" prop="date">
- <el-date-picker v-model="formData.date" 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: 'blur' }]" label="缁存姢绫诲瀷:"
- prop="maintenanceType">
- <el-radio-group v-model="formData.maintenanceType" :disabled="!this.editMode">
- <el-radio :label="0">浣跨敤鍓嶅悗缁存姢</el-radio>
- <el-radio :label="1">璁″垝涓淮鎶�</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item :rules="[{ required: true, message: '璇烽�夋嫨涓嬫缁存姢鏃堕棿', trigger: 'blur' }]" label="涓嬫缁存姢鏃堕棿:"
- prop="nextDate">
- <el-date-picker v-model="formData.nextDate" :picker-options="{ disabledDate: this.disabledDate }"
- 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: 'blur' }]" label="缁存姢浜�:" prop="name">
- <el-input v-model="formData.name" clearable placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="澶囨敞:">
- <el-input v-model="formData.comments" placeholder="璇疯緭鍏�" size="small" type="textarea"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button v-if="editMode" @click="dialogVisible = false">鍙� 娑�</el-button>
- <el-button v-if="editMode" type="primary" @click="addRecord">纭� 瀹�</el-button>
- </span>
- </el-dialog>
- </div>
-</template>
-
-<script>
-import {
- exportMaintenanceRecord,
- deleteDeviceMaintenance,
- selectDeviceByCode,
- addDeviceMaintenance,
- getDeviceMaintenancePage,
-} from '@/api/cnas/resourceDemand/device.js'
-export default {
- props: {
- clickNodeVal: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- data() {
- return {
- search: {
- size: 20,
- current: 1,
- total: 0,
- deviceNumber: ''
- },
- editMode: false,
- dialogVisible: false,
- //琛ㄥ崟缁存姢鍐呭
- formData: {},
- //琛ㄥご鏄剧ず
- MaintainParam: [],
- outLoading: false
- }
- },
- mounted() {
- this.getAllMessage(this.clickNodeVal.value)
- },
- methods: {
- //涓嬫缁存姢鏃ユ湡:绂佺敤鍦ㄧ淮鎶ゆ棩鏈熷墠鐨勬棩鏈�
- disabledDate(time) {
- let selectDate = this.formData.date
- if (selectDate) {
- let oldDate = new Date(selectDate)
- return time <= oldDate.getTime()
- }
- return false
- },
- handleSizeChange(val) {
- this.search.size = val
- this.getAllMessage(this.clickNodeVal.value)
- },
- handleCurrentChange(val) {
- this.search.current = val
- this.getAllMessage(this.clickNodeVal.value)
- },
- //鎿嶄綔璇︽儏鏌ョ湅
- handleViewClick(row) {
- this.editMode = false;
- this.dialogVisible = true;
- this.formData = row;
- },
- // 瀵煎嚭
- handleDownOne() {
- this.outLoading = true
- exportMaintenanceRecord({ deviceId: this.clickNodeVal.value }).then(res => {
- this.outLoading = false
- const blob = new Blob([res], { type: 'application/octet-stream' });
- this.$download.saveAs(blob, '璁惧缁存姢淇濆吇璁板綍.doc')
- })
- },
- //鎿嶄綔璇︽儏鍒犻櫎
- handleDeleteClick(index, row) {
- this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- deleteDeviceMaintenance({ id: row.id }).then(res => {
- })
- // this.MaintainParam.splice(index, 1);
- this.getAllMessage(this.clickNodeVal.value)
- this.$message({
- type: 'success',
- message: '鍒犻櫎鎴愬姛!'
- });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '宸插彇娑堝垹闄�'
- });
- });
- },
- //鐐瑰嚮鍚庡彲缂栬緫
- add() {
- selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => {
- this.formData.deviceName = res.data.deviceName
- this.formData.managementNumber = res.data.managementNumber
- this.$nextTick(() => {
- this.$refs['form'].clearValidate()
- })
- });
- this.editMode = true;
- },
- //娣诲姞缁存姢璁板綍
- addRecord() {
- this.$refs['form'].validate((valid) => {
- if (valid) {
- this.formData.deviceId = this.clickNodeVal.value;
- 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)
- }
- })
- },
- resetSearch() {
- this.search = {
- size: 20,
- current: 1,
- total: 0,
- deviceNumber: '',
- }
- this.getAllMessage(this.clickNodeVal.value);
- },
- //鑾峰彇琛ㄥ崟璁惧缁存姢淇℃伅
- getAllMessage(deviceId) {
- getDeviceMaintenancePage({
- deviceId,
- ...this.search
- }).then(res => {
- if (res.code == 200) {
- this.MaintainParam = res.data.records
- this.search.total = res.data.total
- }
- })
- },
- },
- watch: {
- // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
- clickNodeVal(newVal) {
- if (newVal.value) {
- this.getAllMessage(newVal.value)
- }
- },
- dialogVisible(newVal) {
- if (newVal === false) {
- this.formData = {}
- this.$refs['form'].clearValidate()
- }
- }
- }
-}
-</script>
-
-<style scoped>
-h4 {
- font-weight: 400;
- font-size: 16px;
- display: flex;
- justify-content: space-between;
- margin: 10px 0;
-}
-
-h4 .line {
- display: inline-block;
- width: 3px;
- height: 16px;
- background: #3A7BFA;
- margin-right: 4px;
-}
-
-.tables {
- width: 100%;
- height: calc(100vh - 17em);
-}
-
-.search {
- background-color: #fff;
- display: flex;
- align-items: center;
- position: relative;
- margin-top: 10px;
-}
-
-.search_thing {
- display: flex;
- align-items: center;
- height: 40px;
-}
-
-.search_label {
- width: 80px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: 73%;
-}
-
-.btns {
- position: absolute;
- right: 0px;
- top: 50%;
- transform: translate(0, -50%);
-}
-
-.btns_thing {
- position: absolute;
- right: 230px;
- top: 50%;
- transform: translate(0, -50%);
-}
-
-.form .search_label {
- width: 120px;
-}
-</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/management.vue b/src/views/CNAS/resourceDemand/device/component/management.vue
index 6fb77f5..8d74156 100644
--- a/src/views/CNAS/resourceDemand/device/component/management.vue
+++ b/src/views/CNAS/resourceDemand/device/component/management.vue
@@ -1,37 +1,38 @@
<!-- 璁惧宸ュ叿鏄庣粏 -->
<template>
<div class="role_manage">
- <div class="search" v-show="!showData">
- <div class="search_thing">
- <div class="search_label">鐘舵�侊細</div>
- <el-select v-model="queryParams.deviceStatus" placeholder="鍏ㄩ儴" size="small">
- <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="search_thing">
- <div class="search_label">璁惧鍚嶇О锛�</div>
- <div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.deviceName"
- @keyup.enter.native="refreshTable()">
- </el-input>
- </div>
- </div>
- <div class="search_thing">
- <div class="search_label">瑙勬牸鍨嬪彿锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()"></el-input>
- </div>
- </div>
- <div style="padding-left: 30px;">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- <el-button size="small" type="primary" @click="dialogVisible2 = true">鏂� 澧�</el-button>
- <el-button size="small" type="primary" @click="handleDownOne">瀵� 鍑�</el-button>
- </div>
- </div>
+ <div class="search" v-show="!showData">
+ <div>
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="鐘舵��" prop="deviceStatus" class="form-item">
+ <el-select v-model="queryParams.deviceStatus" clearable
+ placeholder="鍏ㄩ儴" size="small" @change="refreshTable">
+ <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="璁惧鍚嶇О" prop="deviceName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.deviceName"
+ @keyup.enter.native="refreshTable()">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="瑙勬牸鍨嬪彿" prop="specificationModel">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div>
+ <el-button size="small" type="primary" @click="dialogVisible2 = true">鏂板</el-button>
+ <el-button size="small" type="primary" @click="handleDownOne">瀵煎嚭</el-button>
+ </div>
+ </div>
<div class="table" v-show="!showData">
- <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 320px)'"
+ <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 300px)'"
:page="page" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="isUp ? '璁惧璇︽儏' : '妗f淇'" :visible.sync="dialogVisible" width="70%" top="5vh"
@@ -443,11 +444,9 @@
labelPosition: 'right',
dialogVisible: false,
dialogVisible2: false,
- addPower: false,
showData: false, // 鏁伴噰閰嶇疆椤甸潰
tableList: [],
addDia: true,
- addPower: true,
//璁惧绫诲瀷鍒楄〃
equipmentList: [],
// 璐熻矗浜哄垪琛�
@@ -990,20 +989,11 @@
</script>
<style scoped>
-.role_manage {
- width: 100%;
- height: 100%;
-}
-
-.title {
- line-height: 15px;
-}
-
.search {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 10px;
+ height: 46px;
+ display: flex;
+ justify-content: space-between;
+ margin-top: 10px;
}
.search_thing {
@@ -1018,20 +1008,10 @@
text-align: right;
}
-.search_input {
- width: calc(100% - 80px);
-}
-
.table {
- margin-top: 12px;
background-color: #fff;
- height: calc(100vh - 17em);
+ height: calc(100vh - 16em);
}
-
-.el-form-item {
- margin-bottom: 16px;
-}
-
.picName {
overflow: hidden;
text-overflow: ellipsis;
@@ -1039,4 +1019,7 @@
word-break: break-all;
width: 120px;
}
+.form-item >>>.el-form-item__content {
+ width: 120px;
+}
</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
index fe1ab9a..31bcab9 100644
--- a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
+++ b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
@@ -40,7 +40,7 @@
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1"
:page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" layout="->,total, sizes, prev, pager, next, jumper"
- :total="search.total">
+ :total="search.total" background>
</el-pagination>
<el-dialog :visible.sync="dialogVisible" title="鍙楁帶鐢宠" width="60%">
<div style="height: 60vh; overflow-y: auto; overflow-x: hidden;">
diff --git a/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue b/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
index f94c759..c91deac 100644
--- a/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
@@ -15,7 +15,7 @@
<el-table-column label="骞翠唤" min-width="80" prop="planYear"></el-table-column>
<el-table-column label="鏂囦欢鍚嶇О" min-width="120" prop="compiler"></el-table-column>
<el-table-column label="缂栧埗浜�" min-width="150" prop="compiler"></el-table-column>
- <el-table-column label="缂栧埗鏃堕棿" min-width="150" prop="datePreparation"></el-table-column>
+ <el-table-column label="缂栧埗鏃堕棿" min-width="160" prop="datePreparation"></el-table-column>
<el-table-column label="鎵瑰噯浜�" min-width="180" prop="audit"></el-table-column>
<el-table-column label="鎵瑰噯鐘舵��" min-width="180" prop="status">
<template slot-scope="scope">
@@ -25,10 +25,11 @@
</el-table-column>
<el-table-column label="鎵瑰噯鏃堕棿" min-width="180" prop="auditDate"></el-table-column>
<!-- 鎿嶄綔鎸夐挳 -->
- <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="240">
+ <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="270">
<template slot-scope="scope">
<el-button :disabled="scope.row.status === 1" size="small" type="text"
@click="handleForm('edit', scope.row)">缂栬緫</el-button>
+ <el-button size="small" type="text" @click="handleForm('view', scope.row)">鏌ョ湅</el-button>
<el-button :disabled="scope.row.status === 1" size="small" type="text"
@click="tellApprove(scope.row.traceabilityManagementId)">鎵瑰噯閫氱煡</el-button>
<el-button :disabled="scope.row.status === 1 || userId != scope.row.auditId" size="small" type="text"
@@ -41,7 +42,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
@@ -49,66 +50,66 @@
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="applicationForm"
title="浠櫒璁惧閲忓�兼函婧愮鐞嗘�讳綋璁″垝" width="80%" @close="closeDialog">
<div style="display: flex;align-items: center;">
- <el-button v-if="operationType !== 'check'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
- <span style="width: 60px">骞翠唤锛�</span>
+ <el-button v-if="operationType === 'edit' || operationType === 'add'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
+ <span style="width: 60px;margin-left: 10px">骞翠唤锛�</span>
<el-date-picker v-model="form.planYear" type="year" value-format="yyyy" clearable size="small" format="yyyy"
- placeholder="閫夋嫨骞�">
+ placeholder="閫夋嫨骞�" :disabled="operationType !== 'edit' && operationType !== 'add'">
</el-date-picker>
</div>
<div style="margin: 10px 0">
- <el-table ref="yearTable" :data="deviceTraceabilityManagementDetails" height="300px" id="templateParamTable"
+ <el-table ref="yearTable" :data="deviceTraceabilityManagementDetails" height="560px" id="templateParamTable"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
- row-key="deviceId" style="width: 100% ;">
+ row-key="deviceId" v-loading="yearTableLoading">
<el-table-column align="center" header-align="center" label="搴忓彿" type="index" width="60"></el-table-column>
<el-table-column label="璁惧鍚嶇О" min-width="170" prop="deviceId">
<template slot-scope="scope">
- <el-input v-model="scope.row.deviceName" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.deviceName" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small"></el-input>
</template>
</el-table-column>
<el-table-column label="鍨嬪彿" min-width="140" prop="specificationModel">
<template slot-scope="scope">
- <el-input v-model="scope.row.specificationModel" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.specificationModel" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small"></el-input>
</template>
</el-table-column>
<el-table-column label="璁惧缂栧彿" min-width="140" prop="managementNumber">
<template slot-scope="scope">
- <el-input v-model="scope.row.managementNumber" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.managementNumber" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small"></el-input>
</template>
</el-table-column>
<el-table-column label="鎶�鏈寚鏍囧弬鏁�" min-width="150" prop="technicalIndexParameters">
<template slot-scope="scope">
- <el-input v-model="scope.row.technicalIndexParameters" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.technicalIndexParameters" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="鎶�鏈寚鏍囪姹�" min-width="150" prop="technicalRequirements">
<template slot-scope="scope">
- <el-input v-model="scope.row.technicalRequirements" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.technicalRequirements" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="妫�瀹氬懆鏈�" min-width="120" prop="verificationCycle">
<template slot-scope="scope">
- <el-input v-model="scope.row.verificationCycle" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.verificationCycle" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="妫�瀹氬崟浣�" min-width="90" prop="verificationUnit">
<template slot-scope="scope">
- <el-input v-model="scope.row.verificationUnit" :disabled="operationType === 'check'" clearable
+ <el-input v-model="scope.row.verificationUnit" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable
size="small" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="澶囨敞" min-width="90" prop="remark">
<template slot-scope="scope">
- <el-input v-model="scope.row.remark" :disabled="operationType === 'check'" clearable size="small"
+ <el-input v-model="scope.row.remark" :disabled="operationType !== 'edit' && operationType !== 'add'" clearable size="small"
type="textarea"></el-input>
</template>
</el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center" v-if="operationType !== 'check'">
+ <el-table-column label="鎿嶄綔" width="80" align="center" v-if="operationType === 'edit' || operationType === 'add'">
<template slot-scope="scope">
<el-button style="color: #f56c6c" type="text" @click="deleteRow(scope.$index)">鍒犻櫎</el-button>
</template>
@@ -117,7 +118,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog">鍙� 娑�</el-button>
- <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
+ <el-button v-if="operationType === 'edit' || operationType === 'add'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
璁�</el-button>
<el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
@click="checkStatus(0)">涓嶉�氳繃</el-button>
@@ -137,7 +138,7 @@
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="addEquipDia = false">鍙� 娑�</el-button>
- <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary"
+ <el-button v-if="operationType === 'edit' || operationType === 'add'" :loading="submitFormLoading" type="primary"
@click="changeMachineName">纭�
璁�</el-button>
</span>
@@ -211,6 +212,7 @@
notificationLoading: false,
auditId: '',
traceabilityManagementId: '',
+ yearTableLoading: false
}
},
mounted() {
@@ -272,17 +274,20 @@
this.form = {
planYear: '',
deviceTraceabilityManagementDetails: []
- },
- this.deviceTraceabilityManagementDetails = []
+ }
+ this.deviceTraceabilityManagementDetails = []
if (row) {
this.traceabilityManagementId = row.traceabilityManagementId
+ this.yearTableLoading = true
getTraceabilityManagementDetail({ traceabilityManagementId: this.traceabilityManagementId }).then(res => {
+ this.yearTableLoading = false
if (res.code === 200) {
this.form = res.data
this.deviceTraceabilityManagementDetails = this.form.deviceTraceabilityManagementDetails
}
}).catch(error => {
console.error(error)
+ this.yearTableLoading = false
})
}
},
@@ -298,7 +303,14 @@
changeMachineName() {
this.deviceTraceabilityManagementDetails = []
this.selectionRows.map(val => {
- this.deviceTraceabilityManagementDetails.push({ deviceId: val.id, managementNumber: val.value, deviceName: val.label, specificationModel: val.specificationModel })
+ this.deviceTraceabilityManagementDetails.push({
+ deviceId: val.id,
+ managementNumber: val.value,
+ deviceName: val.label,
+ specificationModel: val.specificationModel,
+ verificationUnit: val.calibrationServices,
+ verificationCycle: val.calibrationDate
+ })
})
this.addEquipDia = false
this.rowDrop()
diff --git a/src/views/CNAS/resourceDemand/device/component/record.vue b/src/views/CNAS/resourceDemand/device/component/record.vue
index a11eb29..869410d 100644
--- a/src/views/CNAS/resourceDemand/device/component/record.vue
+++ b/src/views/CNAS/resourceDemand/device/component/record.vue
@@ -2,28 +2,31 @@
<template>
<div>
<div class="search">
- <div class="search_thing">
- <div class="search_label">鏍峰搧缂栧彿锛�</div>
- <el-input v-model="search.sampleCode" clearable placeholder="璇疯緭鍏�" size="small" style="width: 60%;"
- @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
- <div class="search_label">绠$悊缂栧彿锛�</div>
- <el-input v-model="search.managementNumber" clearable placeholder="璇疯緭鍏�" size="small" style="width: 60%;"
- @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
- </div>
- <div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="resetSearch">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="getTableList(clickNodeVal.value)">鏌� 璇�</el-button>
- </div>
- <div class="btns" v-if="isMenuList != 1">
+ <el-form :model="search" ref="search" size="small" :inline="true">
+ <el-form-item label="鏍峰搧缂栧彿">
+ <el-input v-model="search.sampleCode" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
+ </el-form-item>
+ <el-form-item label="绠$悊缂栧彿">
+ <el-input v-model="search.managementNumber" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button size="mini" type="primary" @click="getTableList(clickNodeVal.value)">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearch">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ <div>
<el-button size="small" type="primary" @click="dialogVisible = true, openAdd()">鏂� 寤�</el-button>
<el-button :loading="outLoading" size="small" type="primary" @click="openHandleOut">瀵� 鍑�</el-button>
</div>
</div>
- <div class="tables" style="margin-top: 10px;">
+ <div>
<el-table ref="Recordtable" :data="formParamList" height="calc(100vh - 20em)"
+ v-loading="tableLoading"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<!-- 琛ㄦ牸鍒� -->
- <el-table-column label="搴忓彿" type="index" width="120">
+ <el-table-column label="搴忓彿" type="index" width="70" align="center">
<template v-slot="scope">
<span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
</template>
@@ -42,8 +45,8 @@
</template>
</el-table-column>
<!-- <el-table-column label="寮傚父鎯呭喌" min-width="120" prop="abnormal" />-->
- <el-table-column label="浣跨敤寮�濮嬫棩鏈�" min-width="150" prop="useStartDate" />
- <el-table-column label="浣跨敤缁撴潫鏃ユ湡" min-width="150" prop="useEndDate" />
+ <el-table-column label="浣跨敤寮�濮嬫棩鏈�" min-width="170" prop="useStartDate" />
+ <el-table-column label="浣跨敤缁撴潫鏃ユ湡" min-width="170" prop="useEndDate" />
<el-table-column label="浣跨敤浜�" min-width="120" prop="usePerson" />
<el-table-column label="澶囨敞" min-width="120" prop="remark" />
<!-- 鎿嶄綔鎸夐挳 -->
@@ -57,7 +60,7 @@
</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">
+ @current-change="handleCurrentChange" background>
</el-pagination>
</div>
<el-dialog :visible.sync="dialogVisible" title="浠櫒璁惧浣跨敤璁板綍琛�" top="5vh" width="55%">
@@ -210,6 +213,7 @@
dialogVisible: false,
operationType: '',
formParamList: [],
+ tableLoading: false
}
},
mounted() {
@@ -238,14 +242,18 @@
if (deviceId === undefined) {
deviceId = ''
}
+ this.tableLoading = true
await deviceRecordPage({
deviceId: deviceId,
...this.search
}).then(res => {
+ this.tableLoading = false
if (res.code == 200) {
this.formParamList = res.data.records
this.search.total = res.data.total
}
+ }).catch(err => {
+ this.tableLoading = false
})
},
// 鎵撳紑瀵煎嚭寮规閫夋嫨缂栧埗浜恒�佹壒鍑嗕汉
@@ -394,65 +402,10 @@
</script>
<style scoped>
-.tables {
- width: 100%;
- height: calc(100vh - 15em);
-}
-
-.el-from {
- max-width: 400px;
- margin: 0 auto;
-}
-
-.form-row {
+.search {
+ height: 46px;
display: flex;
justify-content: space-between;
-}
-
-.el-input {
- width: calc(100% - 120px);
- /* 纭繚杈撳叆妗嗗搴︿竴鑷� */
-}
-
-.form-row .el-form-item {
- flex: 1;
- /* 姣忎釜琛ㄥ崟椤瑰崰鎹浉鍚屾瘮渚嬬殑绌洪棿 */
- margin-right: 100px;
- /* 鍙�夛細涓哄彸渚у厓绱犳坊鍔犻棿璺� */
-}
-
-/* 绉婚櫎鏈�鍚庝竴涓厓绱犵殑鍙宠竟璺� */
-.form-row .el-form-item:last-child {
- margin-right: 0;
-
-}
-
-.search {
- background-color: #fff;
margin-top: 10px;
- display: flex;
- align-items: center;
- position: relative;
-}
-
-.search_thing {
- display: flex;
- align-items: center;
- height: 40px;
-
-}
-
-.search_label {
- width: 140px;
- font-size: 14px;
- text-align: right;
- margin-right: 10px;
-}
-
-.btns {
- position: absolute;
- right: 0px;
- top: 50%;
- transform: translate(0, -50%);
}
</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue b/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue
index 30acd40..fd5b5df 100644
--- a/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue
+++ b/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue
@@ -20,7 +20,7 @@
size="mini"
type="date"
value-format="yyyy-MM-dd"/>
- <el-button size="mini" type="primary" @click="ValidateAndQuery">鏌� 璇�</el-button>
+ <el-button size="mini" type="primary" @click="ValidateAndQuery">鏌ヨ</el-button>
</el-col>
</el-row>
</div>
diff --git a/src/views/CNAS/resourceDemand/device/component/state.vue b/src/views/CNAS/resourceDemand/device/component/state.vue
index 6f425f1..da08131 100644
--- a/src/views/CNAS/resourceDemand/device/component/state.vue
+++ b/src/views/CNAS/resourceDemand/device/component/state.vue
@@ -2,27 +2,20 @@
<template>
<div>
<div class="search">
- <el-row :gutter="10" style="width: 100%;">
- <el-col :span="20" style="display: flex;flex-wrap: wrap;">
- <div class="search_thing">
- <div class="search_label">娴佺▼缂栧彿锛�</div>
- <div class="search_input">
- <el-input v-model="search.processNumber" clearable placeholder="璇疯緭鍏�" size="small" style="width: 100%"
- @keyup.enter.native="getDeviceStatePage(clickNodeVal.value)"></el-input>
- </div>
- </div>
- <div class="search_thing" style="padding-left: 20px;">
- <el-button size="small" @click="resetSearch">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="getDeviceStatePage(clickNodeVal.value)">鏌� 璇�</el-button>
- </div>
- </el-col>
- <el-col :span="4">
- <div class="btns">
- <el-button size="small" type="primary" @click="dialogVisible = true">鏂板缓</el-button>
- <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭Excel</el-button>
- </div>
- </el-col>
- </el-row>
+ <el-form :model="search" ref="search" size="small" :inline="true">
+ <el-form-item label="娴佺▼缂栧彿">
+ <el-input v-model="search.processNumber" clearable placeholder="璇疯緭鍏�" size="small" style="width: 100%"
+ @keyup.enter.native="getDeviceStatePage(clickNodeVal.value)"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button size="mini" type="primary" @click="getDeviceStatePage(clickNodeVal.value)">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearch">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ <div>
+ <el-button size="small" type="primary" @click="dialogVisible = true">鏂板缓</el-button>
+ <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭Excel</el-button>
+ </div>
</div>
<div>
<el-table :data="tableDatalist" height="calc(100vh - 20em)" style="width: 100% ;"
@@ -54,7 +47,7 @@
</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">
+ @current-change="handleCurrentChange" background>
</el-pagination>
</div>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" title="璁惧鎯呭喌"
@@ -509,98 +502,10 @@
</script>
<style scoped>
-.dialog-content {
- max-height: 70vh;
- /* 璁剧疆鏈�澶ч珮搴� */
- overflow-y: auto;
- /* 鍚敤鍨傜洿婊氬姩 */
-}
-
-h4 {
- font-weight: 400;
- font-size: 16px;
- margin: 10px 0;
-}
-
-/*
-淇濆瓨鎻愪氦鎸夐挳鏍峰紡
-*/
-h4 .title {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-
-h4 .title .line {
- display: inline-block;
- width: 3px;
- height: 16px;
- background: #3A7BFA;
- margin-right: 4px;
-}
-
-.tables {
- width: 100%;
- height: calc(100vh - 15em);
-}
-
-.el-from {
- max-width: 400px;
- margin: 0 auto;
-}
-
-.form-row {
- display: flex;
- justify-content: space-between;
-}
-
-
-.form-row .el-form-item {
- flex: 1;
- /* 姣忎釜琛ㄥ崟椤瑰崰鎹浉鍚屾瘮渚嬬殑绌洪棿 */
- margin-right: 100px;
- /* 鍙�夛細涓哄彸渚у厓绱犳坊鍔犻棿璺� */
-}
-
-/* 绉婚櫎鏈�鍚庝竴涓厓绱犵殑鍙宠竟璺� */
-.form-row .el-form-item:last-child {
- margin-right: 0;
-
-}
-
.search {
- background-color: #fff;
- margin: 10px 0;
+ height: 46px;
display: flex;
- align-items: center;
- position: relative;
-}
-
-.search_thing {
- display: flex;
- align-items: center;
- height: 40px;
-}
-
-.search_label {
- width: 70px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: 70%;
-}
-
-.btns {
- position: absolute;
- right: 0;
- top: 50%;
- transform: translate(0, -50%);
-}
-
-.form .search_label {
- width: 120px;
+ justify-content: space-between;
+ margin-top: 10px;
}
</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
new file mode 100644
index 0000000..d316543
--- /dev/null
+++ b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
@@ -0,0 +1,478 @@
+<template>
+ <div>
+ <div class="search">
+ <el-button size="small" type="primary" @click="refreshTableList">鍒� 鏂�</el-button>
+ <el-button size="small" type="primary" @click="openDia('add')">鏂� 澧�</el-button>
+ </div>
+ <div>
+ <lims-table :tableData="tableData" :column="column"
+ height="calc(100vh - 20em)" @pagination="pagination"
+ :page="page" :tableLoading="tableLoading"></lims-table>
+ </div>
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="usageTableDia"
+ title="璁惧淇濆吇璁″垝琛�" width="80%" @close="closeDialog">
+ <div style="display: flex;align-items: center;">
+ <el-button size="small" type="primary" @click="addTableRow" v-if="operationType !== 'check'">娣诲姞</el-button>
+ <span style="width: 60px;margin-left: 10px">骞翠唤锛�</span>
+ <el-date-picker v-model="form.impowerYear" type="year" value-format="yyyy" clearable size="small" format="yyyy"
+ placeholder="閫夋嫨骞�" :disabled="operationType === 'check'">
+ </el-date-picker>
+ </div>
+ <div style="margin: 10px 0">
+ <el-table ref="deviceImpowerDetails" :data="deviceImpowerDetails" id="templateParamTable" row-key="deviceId"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+ height="560px" style="width: 100% ;">
+ <el-table-column align="center" header-align="center" label="搴忓彿" type="index" width="60"></el-table-column>
+ <el-table-column label="璁惧鍚嶇О" min-width="170" prop="deviceName">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.deviceName" clearable
+ size="small" :disabled="operationType === 'check'"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column label="璁惧缂栧彿" min-width="140" prop="managementNumber">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.managementNumber" clearable
+ size="small" :disabled="operationType === 'check'"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column label="瑙勬牸鍨嬪彿" min-width="120" prop="specificationModel">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.specificationModel" clearable
+ size="small" :disabled="operationType === 'check'"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column label="妫�娴嬮」鐩�" min-width="120" prop="inspectionItem<">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.inspectionItem" clearable size="small"
+ :disabled="operationType === 'check'"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column label="琚巿鏉冧汉" min-width="160" prop="delegatee">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.delegatedUserArr"
+ clearable filterable multiple
+ :disabled="operationType === 'check'"
+ 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>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="80" align="center" v-if="operationType !== 'check'">
+ <template slot-scope="scope">
+ <el-button style="color: #f56c6c" type="text" @click="deleteRow(scope.$index)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeDialog">鍙� 娑�</el-button>
+ <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary" @click="submitForm">纭</el-button>
+ <el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
+ @click="checkStatus(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
+ @click="checkStatus(1)">閫氳繃</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="addEquipDia" title="娣诲姞璁惧"
+ width="50%">
+ <div style="display: flex;align-items: center;">
+ <span style="width: 90px;margin-left: 10px">琚巿鏉冧汉锛�</span>
+ <el-select v-model="delegatedUser" clearable filterable multiple
+ placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+ <el-option v-for="item in responsibleOptions" :key="item.name" :label="item.name" :value="item.name">
+ </el-option>
+ </el-select>
+ </div>
+ <el-table ref="multipleTable" :data="equipOptions" tooltip-effect="dark" height="500" style="width: 100%"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+ @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="55"></el-table-column>
+ <el-table-column label="璁惧鍚嶇О" prop="label" width="190"></el-table-column>
+ <el-table-column prop="value" label="璁惧缂栧彿" width="130"></el-table-column>
+ <el-table-column prop="storagePoint" label="褰掑睘瀹為獙瀹�"></el-table-column>
+ </el-table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addEquipDia = false">鍙� 娑�</el-button>
+ <el-button :loading="submitFormLoading" type="primary" @click="changeMachineName">纭</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog :visible.sync="notificationDia" title="鎻愪氦瀹℃牳" width="30%" @close="closeNotificationDia">
+ <span style="margin-top: 10px;display: inline-block">
+ 璇烽�夋嫨瀹℃牳浜猴細
+ <el-select v-model="auditId" clearable filterable size="small" style="width: 90%;">
+ <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </span>
+ <span slot="footer" class="dialog-footer">
+ <el-button :loading="notificationLoading" @click="closeNotificationDia">鍙� 娑�</el-button>
+ <el-button :loading="notificationLoading" type="primary" @click="notification">鎻� 浜�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+ addImpower,
+ deleteImpower, deviceScopeSearch, getImpowerDetail, reviewImpowerStatus,
+ selectDeviceImpowerByPage, submitReviewImpowerStatus, updateImpower, exportDeviceImpower
+} from "@/api/cnas/resourceDemand/device";
+import {selectUserCondition} from "@/api/system/user";
+import {mapGetters} from "vuex";
+
+export default {
+ name: '',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: {limsTable},
+ props: {
+ clickNodeVal: {
+ type: Object,
+ default: () => {
+ }
+ }
+ },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ outLoading: false,
+ tableData: [],
+ tableLoading: false,
+ page: {
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ column: [
+ { label: '璁″垝骞翠唤', prop: 'impowerYear' },
+ { label: '缂栧埗浜�', prop: 'compiler' },
+ { label: '缂栧埗鏃堕棿', prop: 'datePreparation' },
+ { label: '鎺堟潈浜�', prop: 'audit' },
+ { label: '鎺堟潈鏃ユ湡', prop: 'auditDate' },
+ {
+ dataType: 'tag',
+ label: '鎺堟潈鐘舵��',
+ prop: 'status',
+ formatData: (params) => {
+ if (params === 1) {
+ return '宸叉巿鏉�'
+ } else if (params == 0) {
+ return '鏈巿鏉�'
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (params == 1) {
+ return 'success'
+ } else if (params === 0) {
+ return 'danger'
+ } else {
+ return null
+ }
+ }
+ },
+ {
+ dataType: 'action',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '缂栬緫',
+ type: 'text',
+ clickFun: (row) => {
+ this.openDia('edit', row);
+ },
+ disabled: (row) => {
+ return row.status === 1;
+ },
+ },
+ {
+ name: '瀹℃牳閫氱煡',
+ type: 'text',
+ clickFun: (row) => {
+ this.tellApprove(row.impowerId);
+ },
+ disabled: (row) => {
+ return row.status === 1;
+ },
+ },
+ {
+ name: '瀹℃牳',
+ type: 'text',
+ clickFun: (row) => {
+ this.openDia('check', row);
+ },
+ disabled: (row) => {
+ return row.status === 1 || this.userId !== row.auditId;
+ },
+ },
+ {
+ name: '瀵煎嚭',
+ type: 'text',
+ clickFun: (row) => {
+ this.openHandleOut(row);
+ }
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDeleteClick(row);
+ },
+ disabled: (row) => {
+ return row.status === 1;
+ },
+ },
+ ]
+ }
+ ],
+ responsibleOptions: [],
+ operationType: '',
+ usageTableDia: false,
+ deviceImpowerDetails: [],
+ submitFormLoading: false,
+ addEquipDia: false,
+ equipOptions: [],
+ selectionRows: [],
+ form: {
+ impowerYear: ''
+ },
+ delegatedUser: [],
+ impowerId: '',
+ notificationDia: false,
+ auditId: '',
+ notificationLoading: false,
+ };
+ },
+ mounted() {
+ this.refreshTableList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鐐瑰嚮鍒锋柊
+ refreshTableList () {
+ this.page.current = 1;
+ this.getTableList()
+ },
+ // 鍒嗛〉鍒囨崲
+ pagination(page) {
+ this.page.size = page.limit
+ this.getTableList()
+ },
+ getTableList () {
+ this.tableLoading = true
+ selectDeviceImpowerByPage({
+ ...this.page
+ }).then(res => {
+ this.tableLoading = false
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }).catch(err => {
+ this.tableLoading = false
+ })
+ },
+ // 鎵撳紑鎻愪氦鎵瑰噯寮规
+ tellApprove(impowerId) {
+ this.getUserList()
+ this.notificationDia = true
+ this.impowerId = impowerId
+ },
+ // 鎻愪氦鎵瑰噯閫氱煡
+ notification() {
+ if (!this.auditId) {
+ this.$message.warning('璇烽�夋嫨瀹℃牳浜�')
+ return
+ }
+ this.notificationLoading = true
+ submitReviewImpowerStatus({
+ auditId: this.auditId,
+ impowerId: this.impowerId,
+ }).then(res => {
+ this.notificationLoading = false
+ if (res.code == 200) {
+ this.closeNotificationDia()
+ this.refreshTableList()
+ }
+ }).catch(err => {
+ this.notificationLoading = false
+ })
+ },
+ // 鍏抽棴鎻愪氦鎵瑰噯寮规
+ closeNotificationDia() {
+ this.notificationDia = false
+ this.auditId = ''
+ },
+ // 鎵撳紑鎿嶄綔寮规
+ openDia (type, row) {
+ this.operationType = type
+ this.usageTableDia = true
+ this.form = {
+ impowerYear: '',
+ deviceImpowerDetails: [],
+ }
+ this.deviceImpowerDetails = []
+ if (row) {
+ this.impowerId = row.impowerId
+ getImpowerDetail({ impowerId: this.impowerId }).then(res => {
+ if (res.code === 200) {
+ this.form = res.data
+ this.deviceImpowerDetails = this.form.deviceImpowerDetails
+ this.deviceImpowerDetails.forEach(item => {
+ this.$set(item, 'delegatedUserArr', item.delegatedUser.split(','))
+ })
+ }
+ }).catch(error => {
+ console.error(error)
+ })
+ }
+ this.getEquipOptions()
+ this.getUserList()
+ },
+ closeDialog () {
+ this.usageTableDia = false
+ this.getTableList()
+ },
+ // 娣诲姞璁惧
+ addTableRow() {
+ this.addEquipDia = true
+ this.delegatedUser = this.responsibleOptions.map((item) => item.name);
+ this.getEquipOptions()
+ },
+ // 鍒犻櫎琛ㄦ牸琛�
+ deleteRow(index) {
+ this.deviceImpowerDetails.splice(index, 1)
+ },
+ // 鎻愪氦鏂板鍜屼慨鏀�
+ submitForm() {
+ this.form.deviceImpowerDetails = this.HaveJson(this.deviceImpowerDetails)
+ this.form.deviceImpowerDetails.forEach((item) => {
+ item.delegatedUser = item.delegatedUserArr.join(',')
+ })
+ this.submitFormLoading = true
+ if (this.operationType === 'add') {
+ addImpower(this.form).then(res => {
+ if (res.code == 200) {
+ this.$message.success('鏂板鎴愬姛')
+ this.usageTableDia = false
+ this.refreshTableList()
+ }
+ this.submitFormLoading = false
+ }).catch(err => {
+ this.submitFormLoading = false
+ })
+ } else {
+ updateImpower(this.form).then(res => {
+ if (res.code == 200) {
+ this.$message.success('淇敼鎴愬姛')
+ this.usageTableDia = false
+ this.refreshTableList()
+ }
+ this.submitFormLoading = false
+ }).catch(err => {
+ this.submitFormLoading = false
+ })
+ }
+ },
+ // 鎻愪氦瀹℃牳
+ checkStatus(status) {
+ const params = {
+ status: status,
+ impowerId: this.impowerId
+ }
+ reviewImpowerStatus(params).then(res => {
+ if (res.code == 200) {
+ this.$message.success('瀹℃牳鎴愬姛')
+ this.usageTableDia = false
+ this.refreshTableList()
+ }
+ this.submitFormLoading = false
+ }).catch(err => {
+ this.submitFormLoading = false
+ })
+ },
+ handleSelectionChange(selection) {
+ this.selectionRows = selection
+ },
+ // 璧嬪�间华鍣ㄧ紪鍙�
+ changeMachineName() {
+ this.deviceMaintenancePlanDetails = []
+ this.selectionRows.map(val => {
+ this.deviceImpowerDetails.push({ deviceId: val.id, deviceName: val.label, managementNumber: val.value, specificationModel: val.specificationModel, delegatedUserArr: this.delegatedUser })
+ })
+ this.addEquipDia = false
+ },
+ // 鑾峰彇鎵�鏈夎澶�
+ getEquipOptions() {
+ this.equipOptions = []
+ deviceScopeSearch({ status: 0 }).then(res => {
+ if (res.code === 200 && res.data) {
+ this.equipOptions = res.data.map(m => {
+ m.value = m.managementNumber
+ m.label = m.deviceName
+ m.storagePoint = m.storagePoint
+ return m
+ })
+ }
+ }).catch(error => {
+ console.error(error)
+ })
+ },
+ openHandleOut (row) {
+ exportDeviceImpower({ impowerId: row.impowerId }).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '璁惧浣跨敤鎺堟潈琛�' + '.docx')
+ })
+ },
+ handleDeleteClick(row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deleteImpower({ impowerId: row.impowerId }).then(res => {
+ this.$message({
+ type: 'success',
+ message: '鍒犻櫎鎴愬姛!'
+ });
+ this.refreshTableList()
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
+ getUserList() {
+ selectUserCondition({type: 2}).then(res => {
+ if (res.code == 200) {
+ this.responsibleOptions = res.data
+ }
+ })
+ },
+ },
+ watch: {
+ // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
+ clickNodeVal(newVal) {
+ if (newVal.value) {
+ this.refreshTableList();
+ }
+ },
+ },
+ computed: {
+ ...mapGetters(["userId"]),
+ },
+};
+</script>
+
+<style scoped>
+.search {
+ height: 46px;
+ text-align: right;
+ margin-top: 10px;
+}
+</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/usingExternalInstruments.vue b/src/views/CNAS/resourceDemand/device/component/usingExternalInstruments.vue
index 93ccea2..0dcf6fb 100644
--- a/src/views/CNAS/resourceDemand/device/component/usingExternalInstruments.vue
+++ b/src/views/CNAS/resourceDemand/device/component/usingExternalInstruments.vue
@@ -1,15 +1,19 @@
<template>
<div>
<div>
- <div class="title">
- <div class="title-search">
- <span style="width: 80px;font-size: 14px">鍗曚綅鍚嶇О锛�</span>
- <el-input v-model="searchForm.unitName" clearable size="small"
- style="margin-right: 10px;width: 220px"></el-input>
- <el-button size="small" type="primary" @click="getYearTableDetailData">鏌� 璇�</el-button>
- <el-button size="small" @click="reset">閲� 缃�</el-button>
+ <div style="display: flex;justify-content: space-between;margin-top: 10px;">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鍗曚綅鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.unitName"
+ @keyup.enter.native="getYearTableDetailData"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="getYearTableDetailData">鏌ヨ</el-button>
+ <el-button size="mini" @click="reset">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="handleForm('')">鏂板</el-button>
</div>
</div>
@@ -41,7 +45,7 @@
</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"
+ :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
@size-change="handleSizeChange1" @current-change="handleCurrentChange1">
</el-pagination>
</div>
@@ -159,14 +163,9 @@
<style scoped>
.title {
+ height: 46px;
display: flex;
justify-content: space-between;
- align-items: center;
-}
-
-.title-search {
- display: flex;
- align-items: center;
- margin: 10px 0;
+ margin-top: 10px;
}
</style>
diff --git a/src/views/CNAS/resourceDemand/device/index.vue b/src/views/CNAS/resourceDemand/device/index.vue
index 3e06c02..063a9b2 100644
--- a/src/views/CNAS/resourceDemand/device/index.vue
+++ b/src/views/CNAS/resourceDemand/device/index.vue
@@ -55,6 +55,10 @@
<quantity-value-traceability-plan v-if="menuListActiveName == '閲忓�兼函婧愯鍒�'"
:clickNodeVal="clickNodeVal"></quantity-value-traceability-plan>
</el-tab-pane>
+ <el-tab-pane label="璁惧浣跨敤鎺堟潈" name="璁惧浣跨敤鎺堟潈">
+ <usage-authorization v-if="menuListActiveName == '璁惧浣跨敤鎺堟潈'"
+ :clickNodeVal="clickNodeVal"></usage-authorization>
+ </el-tab-pane>
<el-tab-pane label="鍒╃敤澶栭儴浠櫒璁惧" name="鍒╃敤澶栭儴浠櫒璁惧">
<using-external-instruments v-if="menuListActiveName == '鍒╃敤澶栭儴浠櫒璁惧'" :clickNodeVal="clickNodeVal"></using-external-instruments>
</el-tab-pane>
@@ -74,8 +78,8 @@
<el-tab-pane label="璁惧鏍″噯" name="璁惧鏍″噯">
<calibration v-if="tabListActiveName == '璁惧鏍″噯'" :clickNodeVal="clickNodeVal" />
</el-tab-pane>
- <el-tab-pane label="璁惧缁存姢" name="璁惧缁存姢">
- <maintenance v-if="tabListActiveName == '璁惧缁存姢'" :clickNodeVal="clickNodeVal" />
+ <el-tab-pane label="璁惧缁存姢淇濆吇" name="璁惧缁存姢淇濆吇">
+ <equipmentMaintenance v-if="tabListActiveName == '璁惧缁存姢淇濆吇'" :clickNodeVal="clickNodeVal" />
</el-tab-pane>
<el-tab-pane label="璁惧鍊熺敤" name="璁惧鍊熺敤">
<borrow v-if="tabListActiveName == '璁惧鍊熺敤'" :clickNodeVal="clickNodeVal" />
@@ -112,7 +116,6 @@
import files from "./component/files.vue";
import calibration from "./component/calibration.vue";
import check from "./component/check.vue";
-import maintenance from "./component/maintenance.vue";
import borrow from "./component/borrow.vue";
import fault from "./component/fault.vue";
import record from "./component/record.vue";
@@ -131,6 +134,8 @@
import EquipmentMaintenancePlan from "./component/equipmentMaintenancePlan.vue";
import EquipmentAcceptance from "./component/equipmentAcceptance.vue";
import QuantityValueTraceabilityPlan from "./component/quantityValueTraceabilityPlan.vue";
+import equipmentMaintenance from "./component/equipmentMaintenance.vue";
+import usageAuthorization from "./component/usageAuthorization.vue";
import {
treeDevice,
} from '@/api/cnas/resourceDemand/device.js'
@@ -151,7 +156,6 @@
files,
calibration,
check,
- maintenance,
borrow,
fault,
record,
@@ -159,7 +163,9 @@
management,
overview,
resourceReservation,
- operationInstruction
+ operationInstruction,
+ equipmentMaintenance,
+ usageAuthorization,
},
data() {
return {
@@ -278,6 +284,8 @@
>>>.el-tabs__content {
padding-top: 0;
+ max-height: 95%; /* 鏍规嵁闇�姹傝皟鏁撮珮搴� */
+ overflow-y: auto; /* 鍨傜洿鏂瑰悜瓒呭嚭鏃舵樉绀烘粴鍔ㄦ潯 */
}
>>>.single-line-ellipsis {
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue
index ec6912c..191c4b3 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue
@@ -77,6 +77,7 @@
addForeignRegister,
updateForeignRegister
} from '@/api/cnas/resourceDemand/foreignRegister/foreignRegister'
+import {mapGetters} from "vuex";
export default {
name: 'Personnel-management-dia',
@@ -117,6 +118,9 @@
mounted() {
},
+ computed: {
+ ...mapGetters(["userId"]),
+ },
// 鏂规硶闆嗗悎
methods: {
// 鎵撳紑寮规
@@ -127,7 +131,12 @@
if (type !== 'add') {
this.searchInfo(row)
} else {
- this.form.accompanyingId = JSON.parse(localStorage.getItem("user")).userId
+ this.form.accompanyingId = this.userId
+ this.form.area = '瑁呭鐢电紗璇曢獙瀹�'
+ this.form.reason = '鍙傝瀹為獙瀹�'
+ this.form.accompanyingId = 64
+ this.form.approveId = 65
+ this.form.confidentiality = '绗﹀悎'
}
},
// 鏌ヨ璇︽儏
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue
index a2b3430..bfa51b8 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue
@@ -5,12 +5,12 @@
<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">
+ @change="searchList" size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
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 2fc53ba..c43c3c2 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
@@ -4,33 +4,34 @@
<el-col :span="12">
<div class="header">
<div>璇曢獙鍖哄煙</div>
- <div>
- 鍚嶇О锛�
- <el-input v-model="search.testAreaName" clearable size="small" style="width: 120px"></el-input>
- <el-button size="small" type="primary" @click="initData">鏌ヨ</el-button>
- <el-button size="small" type="primary" @click="clickAdd">鏂� 澧�</el-button>
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="search.testAreaName"
+ @keyup.enter.native="initData"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button size="mini" type="primary" @click="initData">鏌ヨ</el-button>
+ <el-button size="mini" type="primary" @click="clickAdd">鏂� 澧�</el-button>
+ </div>
</div>
</div>
<el-table :data="tableData" height="calc(100vh - 18em)" highlight-current-row style="width: 100%"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
@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="100" prop="monthDate"></el-table-column>
<el-table-column label="璇曢獙鍖哄煙鍚嶇О" min-width="180" prop="testAreaName"></el-table-column>
- <el-table-column label="纭鐘舵��" min-width="180" prop="isAffirm">
- <template slot-scope="scope">
- <el-tag type="danger" v-if="scope.row.isAffirm == 0">鏈‘璁�</el-tag>
- <el-tag type="success" v-if="scope.row.isAffirm == 1">宸茬‘璁�</el-tag>
- </template>
- </el-table-column>
- <el-table-column label="澧炶ˉ淇℃伅" min-width="180" prop="subjoin"></el-table-column>
+ <el-table-column label="璁板綍鍛�" min-width="120" prop="registrarUserName"></el-table-column>
+ <el-table-column label="娓╁害鍖洪棿" min-width="100" prop="temperatureSection"></el-table-column>
+ <el-table-column label="婀垮害鍖洪棿" min-width="100" prop="humiditySection"></el-table-column>
<el-table-column fixed="right" label="鎿嶄綔" min-width="180" align="center">
<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 size="small" type="text" @click="deleteRowFun(scope.row)">鍒犻櫎</el-button>
+<!-- <el-button size="small" type="text" @click="edit(scope.row)">缂栬緫</el-button>-->
+ <el-button 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>
@@ -47,7 +48,7 @@
澧�</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%" :row-class-name="tableRowClassName">
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<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>
@@ -185,14 +186,19 @@
<el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability1">纭� 瀹�</el-button>
</span>
</el-dialog>
- <el-dialog :visible.sync="approvalDialog" title="纭" width="30%" @close="subjoin = ''">
- <span>
- 澧炶ˉ淇℃伅锛�
- <el-input v-model="subjoin" type="textarea"></el-input>
- </span>
+ <el-dialog :visible.sync="approvalDialog" title="璁板綍鍛樼粦瀹�" width="30%" @open="openDialog">
+ <el-form ref="recordForm" :model="recordForm">
+ <el-form-item label="璁板綍鍛�: ">
+ <el-select v-model="recordForm.registrarUserId" clearable filterable placeholder="璇烽�夋嫨" size="small"
+ style="width: 80%;">
+ <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
<span slot="footer" class="dialog-footer">
- <el-button :loading="approvalLoading" @click="subjoin = '', approvalDialog = false">涓嶇‘璁�</el-button>
- <el-button :loading="approvalLoading" type="primary" @click="handleApproval">纭� 璁�</el-button>
+ <el-button :loading="approvalLoading" @click="approvalDialog = false">鍙栨秷</el-button>
+ <el-button :loading="approvalLoading" type="primary" @click="handleApproval">淇濆瓨</el-button>
</span>
</el-dialog>
</div>
@@ -236,8 +242,10 @@
responsibleOptions: [],
approvalDialog: false,
approvalLoading: false,
- subjoin: '',
approvalRow: {},
+ recordForm: {
+ registrarUserId: ''
+ }
}
},
mounted() {
@@ -261,12 +269,13 @@
openApprovalDialog(row) {
this.approvalDialog = true
this.approvalRow = row
+ this.recordForm.registrarUserId = row.registrarUserId
},
handleApproval() {
this.approvalLoading = true
const params = {
dateId: this.approvalRow.dateId,
- subjoin: this.subjoin,
+ registrarUserId: this.recordForm.registrarUserId
}
affirmFeTempHumDate(params).then(res => {
this.approvalLoading = false
@@ -327,6 +336,7 @@
},
clickRow(row) {
this.saveRow = row
+ this.search1.current = 1
this.initData1(row.dateId)
},
edit(row) {
@@ -397,6 +407,13 @@
}
});
},
+ // 鍒ゆ柇娓╂箍搴﹀尯闂村彉鑹�
+ tableRowClassName({row, rowIndex}) {
+ if (row.isIssue == 1) {
+ return 'warning-row';
+ }
+ return '';
+ },
handleSizeChange(val) {
this.search.size = val;
this.initData();
@@ -407,11 +424,11 @@
},
handleSizeChange1(val) {
this.search1.size = val;
- this.initData1();
+ this.initData1(this.saveRow.dateId);
},
handleCurrentChange1(val) {
this.search1.current = val;
- this.initData1();
+ this.initData1(this.saveRow.dateId);
},
clickAdd() {
this.dialogVisible = true
@@ -427,4 +444,7 @@
display: flex;
justify-content: space-between;
}
+>>>.warning-row {
+ background: #eea7ae;
+}
</style>
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 f2123c6..05d5b6d 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/three-wastes-treatment.vue
@@ -1,22 +1,20 @@
<template>
<div>
- <div class="search">
- <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-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 style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">澶囨敞</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.remark"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
</div>
-
</div>
<div class="table">
<lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination"
diff --git a/src/views/CNAS/resourceDemand/standardMaterailRequistion/index.vue b/src/views/CNAS/resourceDemand/standardMaterailRequistion/index.vue
index a062abf..6937c1f 100644
--- a/src/views/CNAS/resourceDemand/standardMaterailRequistion/index.vue
+++ b/src/views/CNAS/resourceDemand/standardMaterailRequistion/index.vue
@@ -12,8 +12,8 @@
@keyup.enter.native="searchList"></el-input>
</el-form-item>
<el-form-item>
- <el-button size="small" @click="resetSearchForm">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="searchList">鏌� 璇�</el-button>
+ <el-button size="mini" type="primary" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/resourceDemand/standardMaterial/index.vue b/src/views/CNAS/resourceDemand/standardMaterial/index.vue
index 4758f6f..4daf629 100644
--- a/src/views/CNAS/resourceDemand/standardMaterial/index.vue
+++ b/src/views/CNAS/resourceDemand/standardMaterial/index.vue
@@ -12,8 +12,8 @@
@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>
- <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
index 2e2f6be..5028823 100644
--- a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
+++ b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
@@ -1,18 +1,18 @@
<template>
<div class="capacity-scope">
- <div class="search">
- <div>
- <el-form :model="form" ref="form" size="small" :inline="true">
- <el-form-item label="鐗╄川鍚嶇О">
- <el-input v-model="form.name"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button @click="reset">閲� 缃�</el-button>
- <el-button type="primary" @click="getTableData">鏌� 璇�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鐗╄川鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="form.name"
+ @keyup.enter.native="getTableData"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" @click="getTableData" size="mini">鏌ヨ</el-button>
+ <el-button @click="reset" size="mini">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button icon="el-icon-plus" size="small" type="primary" @click="openDialog">娣诲姞楠屾敹</el-button>
<el-button size="small" type="primary" @click="exportExcel">瀵煎嚭</el-button>
</div>
@@ -113,9 +113,13 @@
},
methods: {
getTableData() {
+ this.tableLoading = true
getPageAcceptance({...this.form, ...this.page}).then(res => {
+ this.tableLoading = false
this.tableData = res.data.records;
this.page.total = res.data.total;
+ }).catch(error => {
+ this.tableLoading = false
})
},
openDialog() {
diff --git a/src/views/CNAS/systemManagement/correctiveAction/index.vue b/src/views/CNAS/systemManagement/correctiveAction/index.vue
index f5f6de6..de417ff 100644
--- a/src/views/CNAS/systemManagement/correctiveAction/index.vue
+++ b/src/views/CNAS/systemManagement/correctiveAction/index.vue
@@ -6,8 +6,8 @@
<el-input v-model="searchForm.raiseResult" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
index dcfdb49..005cfc6 100644
--- a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
+++ b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
@@ -11,8 +11,8 @@
<el-input v-model="searchForm1.fileName" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
index 4487da6..5c6b8da 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
@@ -1,20 +1,19 @@
<template>
<!-- 鏂囦欢鍙楁帶鐢宠 -->
<div>
- <div class="search">
- <div>
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
- <el-form-item label="鐢宠鏂囦欢缂栧彿" prop="laboratoryName">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
- @keyup.enter.native="refreshTable()"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 128px;font-size: 14px;font-weight: 700;color: #606266;">鐢宠鏂囦欢缂栧彿</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" icon="el-icon-plus"
@click="addDialogVisible = true, addInfo = {}, file = null">鏂囦欢鍙楁帶鐢宠</el-button>
</div>
@@ -301,7 +300,6 @@
delete param.total;
pageManageDocumentControlled({ ...param })
.then((res) => {
- console.log('res',res)
this.tableLoading = false;
if (res.code === 200) {
this.tableData = res.data.records;
@@ -500,12 +498,6 @@
</script>
<style scoped>
-.search {
- height: 46px;
- display: flex;
- justify-content: space-between;
-}
-
.search_thing {
width: 350px;
display: flex;
diff --git a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
index 522e74a..24b4063 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
@@ -13,8 +13,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue b/src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue
index b03f44c..a3205aa 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue
@@ -1,20 +1,19 @@
<template>
<!-- 鏂囦欢鍙樻洿鐢宠 -->
<div>
- <div class="search">
- <div>
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
- <el-form-item label="鐢宠鏂囦欢缂栧彿" prop="code">
- <el-input v-model="queryParams.code" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 128px;font-size: 14px;font-weight: 700;color: #606266;">鐢宠鏂囦欢缂栧彿</span>
+ <el-input v-model="queryParams.code" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" icon="el-icon-plus"
@click="addDialogVisible = true, addInfo = {}, currentFile = {}, title = '鏂囦欢鍙樻洿鐢宠', file = null">鏂囦欢鍙樻洿鐢宠</el-button>
<el-button :loading="outLoading" size="small" type="primary" @click="handleOut">瀵煎嚭</el-button>
diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
index 7e1fe05..2a79b9a 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
@@ -9,14 +9,14 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item label="鏂囦欢鐘舵��" prop="state">
- <el-select v-model="queryParams.state" size="small" @change="refreshTable()">
+ <el-select v-model="queryParams.state" size="small" @change="refreshTable()" clearable>
<el-option :label="item.label" :value="item.value" v-for="(item, index) in fileState"
:key="index"></el-option>
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue b/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue
index 9d93027..181d5a7 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/FileObsoletionRequest.vue
@@ -1,22 +1,21 @@
<template>
<!-- 鏂囦欢浣滃簾鐢宠 -->
<div>
- <div class="search">
- <div>
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
- <el-form-item label="鏂囦欢缂栧彿" prop="documentCode">
- <el-input v-model="queryParams.documentCode" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鏂囦欢缂栧彿</span>
+ <el-input v-model="queryParams.documentCode" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
</div>
- <div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" icon="el-icon-plus"
- @click="addDialogVisible = true, addInfo = {}, file = null">鏂囦欢浣滃簾鐢宠</el-button>
+ @click="addDialogVisible = true, addInfo = {}">鏂囦欢浣滃簾鐢宠</el-button>
<el-button :loading="outLoading" size="small" type="primary" @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
diff --git a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
index 4e4b5a6..59cadd7 100644
--- a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
@@ -13,8 +13,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -22,10 +22,9 @@
<el-button size="small" type="primary" @click="openAdd('鏂板')">鏂板</el-button>
<el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
:headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
- :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ :on-success="handleSuccessUp" style="display: inline-block;margin: 0 8px">
<el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
- <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
- style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
</div>
</div>
<div class="table">
diff --git a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
index ac88098..b969324 100644
--- a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
@@ -13,8 +13,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -22,10 +22,9 @@
<el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
<el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
:headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
- :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ :on-success="handleSuccessUp" style="display:inline-block;margin: 0 8px;">
<el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
- <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
- style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
</div>
</div>
<div class="table">
diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
index 617c274..aabb2dc 100644
--- a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -13,8 +13,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -22,10 +22,9 @@
<el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
<el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
:headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
- :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ :on-success="handleSuccessUp" style="display:inline-block;margin: 0 8px;">
<el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
- <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
- style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
</div>
</div>
<div class="table">
@@ -249,7 +248,6 @@
methods: {
// 鏂板
openAdd() {
- // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
this.addInfo = {}
this.title = '鏂板'
this.addDialogVisible = true;
diff --git a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
index 4fbcee7..1554a54 100644
--- a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
@@ -22,8 +22,8 @@
</el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
index 4e56e7a..85fc6b4 100644
--- a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -15,8 +15,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -42,8 +42,8 @@
</el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable(1)">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh(1)">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable(1)">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh(1)">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
index d902ac1..63aba6d 100644
--- a/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
@@ -9,8 +9,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue
index 2c393bb..4c84b4c 100644
--- a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.department" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue
index a1c84ad..62ab478 100644
--- a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.meetingDate" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue
index 2142a31..67e155c 100644
--- a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.purposes" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue
index 6b72bee..eed7f2b 100644
--- a/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.raiseResult" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue
index f6698a2..e3c8d88 100644
--- a/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.purpose" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue
index cf2dab2..fb2f065 100644
--- a/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.purpose" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue b/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue
index ddc4721..3c3cd7b 100644
--- a/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue
+++ b/src/views/CNAS/systemManagement/managementReview/components/managementReviewPlan.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.judgingLocation" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/managementReview/components/meetingRecords.vue b/src/views/CNAS/systemManagement/managementReview/components/meetingRecords.vue
index 820a8fd..a664a9a 100644
--- a/src/views/CNAS/systemManagement/managementReview/components/meetingRecords.vue
+++ b/src/views/CNAS/systemManagement/managementReview/components/meetingRecords.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.place" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue b/src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue
index 8adf05e..04b884f 100644
--- a/src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue
+++ b/src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue
@@ -7,8 +7,8 @@
<el-input v-model="searchForm.place" clearable size="small"></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" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/business/costStatistics/components/viewInfoDia.vue b/src/views/business/costStatistics/components/viewInfoDia.vue
index 63269f3..19d5876 100644
--- a/src/views/business/costStatistics/components/viewInfoDia.vue
+++ b/src/views/business/costStatistics/components/viewInfoDia.vue
@@ -25,6 +25,7 @@
{label: '妫�楠岄」', prop: 'inspectionItem', width: 160},
{label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass', width: 160},
{ label: '鏀惰垂鏍囧噯(鍏�/娆�)', prop: 'rates' },
+ { label: '鍒嗙粍绯绘暟', prop: 'manHourGroup' },
],
viewInfoDia: false,
tableLoading: false,
diff --git a/src/views/business/costStatistics/index.vue b/src/views/business/costStatistics/index.vue
index 98cf152..4b34fe2 100644
--- a/src/views/business/costStatistics/index.vue
+++ b/src/views/business/costStatistics/index.vue
@@ -4,6 +4,10 @@
<div class="search">
<div>
<el-form :model="entity" ref="entity" size="small" :inline="true">
+ <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.entrustCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
<el-form-item label="鏍峰搧鍚嶇О" prop="sample">
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.sample"
@keyup.enter.native="refreshTable()"></el-input>
@@ -17,8 +21,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -52,12 +56,34 @@
{ label: '涓嬪崟鏃堕棿', prop: 'createTime', width: 150 },
{ label: '濮旀墭缂栧彿', prop: 'entrustCode', width: 160 },
{ label: '鏍峰搧鍚嶇О', prop: 'sample', width: 160 },
- { label: '鏍峰搧鏁伴噺', prop: 'sampleNum' },
{ label: '濮旀墭鍗曚綅', prop: 'company' },
+ {
+ label: "涓嬪崟绫诲瀷",
+ prop: "typeSource",
+ width: "100px",
+ dataType: "tag",
+ formatData: (params) => {
+ if (params == 0) {
+ return "鎴愬搧涓嬪崟";
+ } else if(params == 1) {
+ return "鍘熸潗鏂欎笅鍗�";
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (params == 0) {
+ return "warning";
+ } else if(params == 1) {
+ return "info";
+ } else {
+ return "null";
+ }
+ },
+ },
{ label: '濮旀墭浜�', prop: 'prepareUser' },
{ label: '鐢熶骇鍗曚綅', prop: 'production' },
- { label: '宸ョ▼鍚嶇О', prop: 'engineering' },
- { label: '宸ユ椂', prop: 'cost' },
+ { label: '鎬讳环', prop: 'totalPrice' },
{
dataType: "action",
fixed: "right",
diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index 98861dd..567885f 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -12,8 +12,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
<div class="page_total">
@@ -315,7 +315,7 @@
case 0:
// 鍘熸潗鏂�
this.$router.push({
- path: "/materialOrder/customsInspection", query: {
+ path: "/materialOrder/customsInspectionView", query: {
customsInspection: row,
active: this.activeFace,
currentId: this.currentId,
@@ -326,7 +326,7 @@
case null:
// 鎴愬搧
this.$router.push({
- path: "/productOrder/add", query: {
+ path: "/productOrder/addView", query: {
examine: this.examine,
active: this.activeFace,
currentId: this.currentId
@@ -336,7 +336,7 @@
case 1:
// 閾滄潗
this.$router.push({
- path: "/materialOrder/copperOrder", query: {
+ path: "/materialOrder/CopperView", query: {
active: this.activeFace,
currentId: this.currentId
}
@@ -384,7 +384,6 @@
// 鏌ョ湅鎶ュ憡
handleIssued(row) {
// todo: 鏌ョ湅鎶ュ憡缁勪欢
- console.log(this.javaApi)
this.currentInfo = row;
let fileName = row.url
let fileType = "docx"
@@ -425,5 +424,11 @@
<style scoped>
.page_total {
margin-bottom: 10px;
+ display: flex;
+}
+.page_total span:last-child {
+ color: #3a7bfa;
+ font-size: 23px;
+ font-weight: 400;
}
</style>
diff --git a/src/views/business/inspectionTask/components/InspectionWord.vue b/src/views/business/inspectionTask/components/InspectionWord.vue
index 7991e24..755730e 100644
--- a/src/views/business/inspectionTask/components/InspectionWord.vue
+++ b/src/views/business/inspectionTask/components/InspectionWord.vue
@@ -17,8 +17,8 @@
</el-radio-group>
</div>
<div style="display: flex;align-items: center;">
- <span v-if="typeSource == '1'"> 澶嶆祴娆℃暟锛�</span>
- <el-select v-if="typeSource == '1'" v-model="retestTag" placeholder="璇烽�夋嫨" size="small"
+ <span> 澶嶆祴娆℃暟锛�</span>
+ <el-select v-model="retestTag" placeholder="璇烽�夋嫨" size="small"
@change="m => handleChangeCableTag(currentSample.id, 4, 'cableTag', m)">
<el-option v-for="item in unPassNumList" :key="item.retestTag" :label="item.retestTag"
:value="item.retestTag">
@@ -253,8 +253,10 @@
verifyPlan
} from "@/api/business/inspectionTask";
import { getUserNow, saveUnqualifiedContext } from "@/api/business/rawMaterialOrder";
+import InspectionWorker from '@/workers/InspectionWorker.worker';
+import DataWorker from '@/workers/DataWorker.worker';
export default {
- props: ['sonLaboratory', 'orderId', 'state', 'inspectorList', 'typeSource', 'unPassCheck', 'rawMaterialTag'],
+ props: ['sonLaboratory', 'orderId', 'state', 'inspectorList', 'typeSource', 'unPassCheck', 'rawMaterialTag','cableTag', 'repetitionTag'],
components: {
AddUnPass,
UnPassDialog
@@ -427,7 +429,7 @@
getDataTypeId: '',
getDataType: null,
unPassDialog: false, // 涓嶅悎鏍煎鐞嗗脊妗�
- retestTag: '', // 澶嶆祴娆℃暟
+ retestTag: '1', // 澶嶆祴娆℃暟
addCheck: false, // 鎸囧畾瀹℃牳浜哄憳寮规
checkUser: '',
type: '',
@@ -514,7 +516,7 @@
}
}
})
- await this.determineWhetherToCollectData()//鏄惁闇�瑕佹暟閲�
+ // await this.determineWhetherToCollectData()//鏄惁闇�瑕佹暟閲�
if (this.currentSample.index == undefined) this.currentSample['index'] = 1
let bushing = this.currentSample.bushing
this.getTableLists();//澶勭悊妯℃澘鍒楄〃淇℃伅
@@ -817,12 +819,12 @@
this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝�
}
// 鍒涘缓 Worker 瀹炰緥
- this.worker = new Worker('/static/js/worker.js');
+ this.worker = new InspectionWorker();
if (this.worker0) {
this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝�
}
// 鍒涘缓 Worker 瀹炰緥
- this.worker0 = new Worker('/static/js/worker0.js');
+ this.worker0 = new DataWorker();
},
// 鍋滄澶氱嚎绋�
stopWorker() {
@@ -846,8 +848,11 @@
laboratory: this.sonLaboratory,
retestTag: this.retestTag,
rawMaterialTag: this.rawMaterialTag,
+ repetitionTag: this.repetitionTag,
+ cableTag: this.cableTag,
}
- let res = getInsProductUnqualifiedRetest(params)
+ let res = await getInsProductUnqualifiedRetest(params)
+ console.log('res---', res)
if (res.code === 200 && res.data.length > 0) {
this.tableLoading = false;
this.scrollInit()
@@ -1281,7 +1286,8 @@
}
})
// 浠ヤ笅鏄牱寮忓鐞嗛�昏緫
- set = Array.sort(set)
+ // set = Array.sort(set)
+ set = [...set]
set.forEach(b => {
let arr = []
a.template.forEach(c => {
@@ -1477,10 +1483,10 @@
}, 200)
},
// 鏄惁闇�瑕佹暟閲�
- async determineWhetherToCollectData() {
- let res = determineWhetherToCollectData({ managementNumber: '' })
- this.isGet = res.data
- },
+ // async determineWhetherToCollectData() {
+ // let res = determineWhetherToCollectData({ managementNumber: '' })
+ // this.isGet = res.data
+ // },
// 鏍规嵁鍚庣浼犲弬鏇存柊椤甸潰鏁版嵁 param => this.tableList[0].insProductResult
getCurrentInsProduct(pId) {
if (!this.tableList[0].insProductResult) {
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 7917484..08301b9 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -1,56 +1,94 @@
<template>
- <div class="ins-order-plan-main">
+ <div class="app-container">
<div style="height: 100%">
<div class="search">
- <div class="search_thing">
- <div class="search_label">濮旀墭缂栧彿锛�</div>
- <div class="search_input">
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
<el-input v-model="queryParams.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
- </div>
- </div>
- <div class="search_thing">
- <div class="search_label">妫�楠岀姸鎬侊細</div>
- <div class="search_input">
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item label="妫�楠岀姸鎬�" prop="insState">
<el-select v-model="queryParams.insState" size="small" style="width: 100%" @change="refreshTable()">
<el-option v-for="(a, i) in dict.type.inspection_task_state" :key="i" :label="a.label"
- :value="a.value"></el-option>
+ :value="a.value"></el-option>
</el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="center" v-loading="tableLoading">
+ <div class="center-options">
+ <div style="display: flex; align-items: center">
+ <span style="font-size: 14px">璇曢獙瀹ょ绫�:</span>
+ <ul class="tab">
+ <li v-for="(m, i) in tabList" :key="i" :class="{ active: i == tabIndex }" @click="handleTab(m, i)">
+ {{ m.label.replace("璇曢獙瀹�", "") }}
+ </li>
+ </ul>
+ <div>
+ <el-checkbox v-model="alone" class="view-self-checkbox"
+ @change="changeCheckBox"><span>鎴戠殑浠诲姟</span></el-checkbox>
+ </div>
+ </div>
+ <div class="center-title">
+ <span>鎬昏浠诲姟鏁伴噺:</span>
+ <span>{{ page.total }}</span>
</div>
</div>
- <div class="search_thing" style="padding-left: 30px">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- </div>
- <div class="center">
- <div class="center-options">
- <el-row>
- <el-col :span="21">
- <div style="display: flex; align-items: center">
- <span style="font-size: 14px">璇曢獙瀹ょ绫�:</span>
- <ul class="tab">
- <li v-for="(m, i) in tabList" :key="i" :class="{ active: i == tabIndex }" @click="handleTab(m, i)">
- {{ m.label.replace("璇曢獙瀹�", "") }}
- </li>
- </ul>
- <div>
- <el-checkbox v-model="alone" class="view-self-checkbox"
- @change="changeCheckBox"><span>鎴戠殑浠诲姟</span></el-checkbox>
- </div>
- </div>
- </el-col>
- <el-col :span="3">
- <div class="center-title">
- <span>鎬昏浠诲姟鏁伴噺:</span>
- <span>{{ page.total }}</span>
- </div>
- </el-col>
- </el-row>
- </div>
- <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ <lims-table :tableData="tableData" :column="column" :page="page"
:rowClassName="rowClassName" :height="'calc(100vh - 300px)'" @pagination="pagination"
- key="tableData0"></lims-table>
+ key="tableData0">
+ <div slot="action" slot-scope="scope">
+ <el-button size="small" type="text" @click="handleDataLook(scope.row)">鏁版嵁鏌ョ湅</el-button>
+ <el-button type="text" size="small"
+ :disabled="(scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5) && checkPermi(['update:product:onPlan'])"
+ @click="editInspection(scope.row)">淇敼妫�楠屽��</el-button>
+ <el-button type="text" size="small" :disabled="(
+ scope.row.userName == null ||
+ scope.row.insState == 3 ||
+ scope.row.insState == 5 ||
+ (scope.row.userName && !scope.row.userName.includes(nickName))
+ )"
+ @click="handleInspection(scope.row)">妫�楠�</el-button>
+ <el-button type="text" size="small" :disabled="(
+ scope.row.userName == null ||
+ scope.row.insState == 5 ||
+ scope.row.insState == 3 ||
+ (scope.row.userName && !scope.row.userName.includes(nickName))
+ )"
+ @click="handleConnect(scope.row)">浜ゆ帴</el-button>
+ <el-button type="text" size="small" @click="viewInspectInfo(scope.row)">鍘熷璁板綍</el-button>
+ <el-popover placement="bottom" trigger="hover" style="margin-left: 6px" :disabled="(scope.row.insState != 3 || scope.row.userName == null ||(scope.row.userName && !scope.row.userName.includes(nickName)))">
+ <template #reference>
+ <el-button link type="text" size="small" :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ (scope.row.userName && !scope.row.userName.includes(nickName)))">鏇村</el-button>
+ </template>
+ <div>
+ <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ (scope.row.userName && !scope.row.userName.includes(nickName)))" style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">涓嬭浇鎶ュ憡</el-button>
+ <el-upload ref='upload'
+ :action="javaApi + '/insReport/inReport'"
+ :before-upload="beforeUpload"
+ :data="{id: scope.row.insReportId}"
+ :headers="uploadHeader" :on-error="onError"
+ :on-success="handleSuccessUp"
+ :show-file-list="false"
+ style="display: inline;margin: 0 6px"
+ accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
+ <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ (scope.row.userName && !scope.row.userName.includes(nickName)))" size="small" type="text">涓婁紶</el-button>
+ </el-upload>
+ <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ (scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small" @click="handleRestore(scope.row)">杩樺師</el-button>
+ <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ (scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small" @click="handleIssued(scope.row)">鏌ョ湅鎶ュ憡</el-button>
+ </div>
+ </el-popover>
+ </div>
+ </lims-table>
</div>
</div>
<el-dialog :visible.sync="claimVisible" title="鎻愮ず" width="400px">
@@ -103,7 +141,7 @@
</el-form>
</div>
<lims-table :tableData="lookTableData" :column="lookColumn" :page="lookPage" :tableLoading="lookTableLoading"
- :height="'60vh'" @pagination="lookPagination" key="tableData1"></lims-table>
+ :height="'60vh'" @pagination="lookPagination" key="tableData1" :key="upIndex"></lims-table>
</div>
</el-dialog>
<el-dialog :visible.sync="bindDialogVisible" title="妫�楠岄」缁戝畾" width="600px">
@@ -161,11 +199,28 @@
<viewManHourDia ref="viewManHourDia"></viewManHourDia>
<!--涓嶅悎鏍煎娴嬫煡鐪嬪脊妗�-->
<un-pass-retest-result v-if="retestVisible" :retestInfo="retestInfo" :retestVisible="retestVisible" @closeRetestLook="closeRetestLook"></un-pass-retest-result>
+ <!--鎶ュ憡鏌ョ湅-->
+ <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
+ :fullscreen="fullscreen">
+ <div class="full-screen">
+ <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;"
+ v-if="!fullscreen"></i>
+ <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;">
+ </div>
+ <div style="height: 80vh;" v-if="issuedVisible">
+ <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
+ </div>
+ </el-dialog>
+ <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen>
+ <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}"
+ style="max-height: 90vh;overflow-y: auto;" />
+ </el-dialog>
</div>
</template>
<script>
import { getYearAndMonthAndDays } from "@/utils/date";
+
import EditInspectionItem from "./components/EditInspectionItem.vue";
import limsTable from "@/components/Table/lims-table.vue";
import viewManHourDia from "./components/viewManHourDia.vue"
@@ -184,9 +239,13 @@
} from "@/api/business/inspectionTask.js";
import { mapGetters } from "vuex";
import {getRetestResult} from "@/api/business/rawMaterialOrder";
+import {upReportUrl} from "@/api/business/insReport";
+import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
+import filePreview from "@/components/Preview/filePreview.vue";
export default {
name: 'InspectionTask',
components: {
+ filePreview, onlyoffice,
EditInspectionItem,
limsTable,
viewManHourDia,
@@ -198,6 +257,10 @@
},
data() {
return {
+ issuedVisible: false,
+ fullscreen: false,
+ lookDialogVisible: false,
+ option: null,
InspectionKey: 1,
bindDialogVisible: false,
bindAddDialogVisible: false,
@@ -363,76 +426,12 @@
{ label: "妫�楠屽紑濮嬫椂闂�", prop: "insTime", width: "140px" },
{ label: "鐞嗙敱", prop: "verifyTell", width: "140px" },
{
- dataType: "action",
fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "鏁版嵁鏌ョ湅",
- type: "text",
- clickFun: (row) => {
- this.handleDataLook(row);
- },
- },
- {
- name: "淇敼妫�楠屽��",
- type: "text",
- clickFun: (row) => {
- this.editInspection(row);
- },
- disabled: (row) => {
- return (row.userName == null || row.insState == 3 || row.insState == 5) && this.checkPermi(['update:product:onPlan'])
- },
- },
- // {
- // name: "鏌ョ湅宸ユ椂",
- // type: "text",
- // clickFun: (row) => {
- // this.viewManHour(row);
- // },
- // showHide: (row) => {
- // return this.checkPermi(['get:working:hours:byOrder'])
- // },
- // },
- {
- name: "妫�楠�",
- type: "text",
- clickFun: (row) => {
- this.handleInspection(row);
- },
- disabled: (row) => {
- return (
- row.userName == null ||
- row.insState == 3 ||
- row.insState == 5 ||
- (row.userName && !row.userName.includes(this.nickName))
- );
- },
- },
- {
- name: "浜ゆ帴",
- type: "text",
- clickFun: (row) => {
- this.handleConnect(row);
- },
- disabled: (row) => {
- return (
- row.userName == null ||
- row.insState == 5 ||
- row.insState == 3 ||
- (row.userName && !row.userName.includes(this.nickName))
- );
- },
- },
- {
- name: "鍘熷璁板綍",
- type: "text",
- clickFun: (row) => {
- this.viewInspectInfo(row);
- },
- },
- ],
- },
+ dataType: "slot",
+ slot: "action",
+ width: '340px',
+ label: "鎿嶄綔"
+ }
],
page: {
total: 0,
@@ -541,6 +540,7 @@
lookTableLoading: false,
// 鏁版嵁鏌ョ湅鐩稿叧瀛楁---缁撴潫
retestVisible: false,
+ upIndex: 0
};
},
mounted() {
@@ -557,7 +557,6 @@
},
activated() {
this.getAuthorizedPerson();
- this.queryParams.userId = this.userId;
this.currentTime = getYearAndMonthAndDays();
this.getDicts("urgency_level").then((response) => {
this.urgencyLevel = this.dictToValue(response.data);
@@ -599,6 +598,7 @@
if (res.code === 200) {
this.lookTableData = res.data.records;
this.lookPage.total = res.data.total;
+ this.upIndex++
this.dataDialogVisible = true;
}
})
@@ -638,6 +638,57 @@
this.page.current = 1;
this.queryParams.typeSource = this.tabIndex;
this.getList();
+ },
+ // 涓嬭浇鎶ュ憡
+ download(row) {
+ let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
+ const link = document.createElement('a');
+ link.href = this.javaApi + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
+ },
+ // 杩樺師鎿嶄綔
+ handleRestore(row) {
+ this.$confirm('鏄惁杩樺師褰撳墠鎶ュ憡?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ upReportUrl({ id: row.insReportId }).then(res => {
+ if (res.code === 200) {
+ this.$message.success('杩樺師鎴愬姛')
+ this.refreshTable()
+ }
+ })
+ }).catch(() => { })
+
+ },
+ // 鏌ョ湅鎶ュ憡
+ handleIssued(row) {
+ console.log('================')
+ // todo: 鏌ョ湅鎶ュ憡缁勪欢
+ this.currentInfo = row;
+ let fileName = row.url
+ let fileType = "docx"
+ if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
+ fileName = row.tempUrlPdf
+ fileType = "pdf"
+ }
+ fileName = fileName.replace('/word/','')
+ const userName = this.nickName
+ this.option = {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: false,
+ fileType: fileType,
+ title: fileName,
+ lang: 'zh-CN',
+ isPrint: false,
+ user_id: 1,
+ user_name: userName,
+ editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
+ }
+ this.issuedVisible = true;
},
// 鏌ョ湅浜т笟閾句俊鎭�
openInfoDialog(row) {
@@ -686,7 +737,7 @@
case 0:
// 鍘熸潗鏂�
this.$router.push({
- path: "/materialOrder/customsInspection", query: {
+ path: "/materialOrder/customsInspectionView", query: {
customsInspection: row,
active: this.activeFace,
currentId: this.currentId,
@@ -697,7 +748,7 @@
case null:
// 鎴愬搧
this.$router.push({
- path: "/productOrder/add", query: {
+ path: "/productOrder/addView", query: {
examine: this.examine,
active: this.activeFace,
currentId: this.currentId
@@ -707,7 +758,7 @@
case 1:
// 閾滄潗
this.$router.push({
- path: "/materialOrder/copperOrder", query: {
+ path: "/materialOrder/CopperView", query: {
active: this.activeFace,
currentId: this.currentId
}
@@ -852,7 +903,6 @@
this.bindCurrentInfo = row;
getBindingProductByProductId({ productId: row.insProductId })
.then((res) => {
- // console.log(res)
this.bindTableData = res.data;
this.bindDialogVisible = true;
})
@@ -865,7 +915,6 @@
productId: this.bindCurrentInfo.insProductId,
})
.then((res) => {
- // console.log(res)
this.bindAddTableData = res.data;
this.bindAddDialogVisible = true;
})
@@ -915,18 +964,34 @@
});
});
},
+ beforeUpload (file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ return true;
+ }
+ },
+ onError(error, file, fileList, index) {
+ this.$message.error('鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯');
+ },
+ onExceed() {
+ this.$message.warning("瓒呭嚭鏂囦欢涓暟");
+ },
+ handleSuccessUp(response) {
+ if (response.code == 200) {
+ this.$refs.upload.clearFiles()
+ this.$message.success("涓婁紶鎴愬姛");
+ this.refreshTable()
+ } else {
+ this.$message.error(response.message);
+ }
+ },
},
};
</script>
<style scoped>
-.search {
- background-color: #fff;
- height: 40px;
- display: flex;
- align-items: center;
- margin-top: 20px;
-}
-
.search_thing {
display: flex;
align-items: center;
@@ -941,20 +1006,6 @@
.search_input {
width: calc(100% - 120px);
-}
-
-.ins-order-plan-main .search {
- width: 100%;
- height: 40px;
- background-color: #fff;
- border-radius: 3px;
-}
-
-.ins-order-plan-main .center {
- background-color: #fff;
- border-radius: 3px;
- padding: 20px;
- padding-top: 0px;
}
.tab {
@@ -984,12 +1035,10 @@
border-color: #3a7bfa;
color: #3a7bfa;
}
-
-.center .center-options .center-title {
- width: 100%;
+.center-options {
display: flex;
align-items: center;
- justify-content: right;
+ justify-content: space-between;
}
.center .center-options .center-title span:last-child {
@@ -1000,10 +1049,5 @@
.view-self-checkbox {
margin-left: 50px;
-}
-</style>
-<style>
-.ins-order-plan-main .el-form-item__label {
- color: #000;
}
</style>
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 820cffe..f648679 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -501,13 +501,18 @@
<el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <!-- 娣诲姞涓嶅悎鏍煎娴嬪脊妗�-->
<add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog"
@resetAddUnPass="resetAddUnPass"></add-un-pass>
+ <!-- 涓嶅悎鏍煎鐞嗗脊妗�-->
<UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog"
@resetForm="resetForm"></UnPassDialog>
+ <!-- 涓嶅悎鏍煎娴嬪脊妗�-->
<InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
+ :cableTag="temCableTag" :repetitionTag="repetitionTag"
:rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource"
:unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" />
+ <!-- 杩涜揣楠岃瘉寮规-->
<purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId"
:purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
<!--鏌ョ湅宸ユ椂寮规-->
@@ -541,8 +546,8 @@
delfile,
inspectionOrderDetailsTaskSwitching
} from "@/api/business/inspectionTask.js";
-import InspectionWorker from '../../../InspectionWorker.worker';
-import DataWorker from '../../../DataWorker.worker';
+import InspectionWorker from '@/workers/InspectionWorker.worker';
+import DataWorker from '../../../workers/DataWorker.worker';
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
@@ -1038,8 +1043,9 @@
id: this.currentSample.id,
type: this.type,
laboratory: this.sonLaboratory,
- cableTag: "",
+ cableTag: this.temCableTag,
rawMaterialTag: this.rawMaterialTag,
+ repetitionTag: this.repetitionTag,
};
this.$nextTick(() => {
this.$refs.addUnPassDialog.getInsOrder(info);
@@ -1133,7 +1139,6 @@
this.dataAcquisitionInfo = {};
this.getData = [];
for (let i in this.objectOrder(data)) {
- console.log("i---", i);
let obj = {};
if (i.includes("@")) {
obj = {
@@ -1476,7 +1481,6 @@
},
// 淇濆瓨婀垮害銆佹俯搴︽暟鎹�
subOtherForm(m, type) {
- console.log("m---", m);
write({
[type]: type === "remark" ? m : Number(m),
id: this.insOrder.id,
@@ -1637,20 +1641,6 @@
this.comparisonList = this.dictToValue(response.data);
});
},
- // 鑾峰彇妫�楠屽�间负涓嬫媺鏃剁殑涓嬫媺鍒楄〃
- // selectEnumByCategoryOfSelect(val) {
- // this.enumList = [];
- // if (val === undefined || val === null) {
- // return;
- // }
- // this.$axios
- // .post(this.$api.enums.selectEnumByCategory, {
- // category: val,
- // })
- // .then((res) => {
- // this.enumList = res.data;
- // });
- // },
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex + 1;
},
diff --git a/src/views/business/inspectionView/index.vue b/src/views/business/inspectionView/index.vue
new file mode 100644
index 0000000..c7f43c5
--- /dev/null
+++ b/src/views/business/inspectionView/index.vue
@@ -0,0 +1,3141 @@
+<template>
+ <div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);">
+ <el-row class="title">
+ <el-col :span="8" style="text-align: left">
+ <el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px"
+ style="text-align: right; padding-top: 0; display: inline">
+ <el-form-item label="娓╁害:" style="margin-bottom: 0">
+ <el-input v-model="otherForm.temperature" :disabled="state > 1" placeholder="" size="small"
+ style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'temperature')"></el-input>
+ <span style="margin-left: 4px">鈩�</span>
+ </el-form-item>
+ <el-form-item label="婀垮害:" style="margin-bottom: 0">
+ <el-input v-model="otherForm.humidity" :disabled="state > 1" placeholder="" size="small"
+ style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'humidity')"></el-input>
+ <span style="margin-left: 4px">%</span>
+ </el-form-item>
+ </el-form>
+ </el-col>
+ <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" size="small" type="primary" @click="addVerifyDia = true">鎻愪氦</el-button>
+ <!-- 澶嶆牳 -->
+ <el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">閫氳繃</el-button>
+ <el-button v-if="state == 2" size="medium" @click="upInsReview(0)">涓嶉�氳繃</el-button>
+ <el-button type="primary" size="small" @click="exportTable('myTable')">涓嬭浇鍘熷璁板綍</el-button>
+ <el-button size="small" @click="goback">杩斿洖</el-button>
+ </el-col>
+ </el-row>
+ <div class="search">
+ <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">
+ <el-form-item label="濮旀墭缂栧彿:">
+ <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="鏍峰搧缂栧彿:">
+ <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">
+ <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-tooltip>
+ </el-form-item>
+ <el-form-item label="鏍峰搧鍚嶇О:">
+ <el-input v-model="currentSample.sample" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="鏍峰搧鏁伴噺:">
+ <el-input v-model="sampleProduct.length" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="鏍峰搧鍨嬪彿:">
+ <el-input v-model="currentSample.model" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="涓嬪彂鏃堕棿:">
+ <el-input v-model="insOrder.sendTime" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="绱ф�ョ▼搴�:">
+ <el-input v-model="insOrder.typeName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="绾﹀畾鏃堕棿:">
+ <el-input v-model="insOrder.appointed" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item v-if="typeSource === 1" label="鎶芥鏁伴噺:">
+ <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:">
+ <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
+ </el-form-item>
+ <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" label-width="120px">
+ <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>
+ </el-form-item>
+ <el-form-item label="澶囨敞:">
+ <!-- <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>-->
+ <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"
+ @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
+ <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="center">
+ <div class="search" style="
+ text-align: left;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ ">
+ <div style="display: flex; align-items: center">
+ <span v-if="tableList.length > 0">妫�楠屾ā鏉匡細</span>
+ <el-radio-group v-model="currentTable" size="small">
+ <el-radio-button v-for="(item, index) in tableLists" :key="index" :label="item.templateId" size="small">{{
+ item.templateName }}</el-radio-button>
+ </el-radio-group>
+ </div>
+ <div style="display: flex; align-items: center">
+ <el-button v-if="state == 1" size="small" type="primary" @click="openAddUnpass">鏂板涓嶅悎鏍煎娴�</el-button>
+ <el-button v-if="state == 1" size="small" type="primary" @click="unpassCheck">涓嶅悎鏍煎娴�</el-button>
+ <el-button v-if="state > 1" size="small" type="primary" @click="viewUnpassCheck">鏌ョ湅涓嶅悎鏍煎娴�</el-button>
+ <span v-if="cableTagList.length > 0"> 鐢电紗閰嶇疆锛�</span>
+ <el-select v-if="cableTagList.length > 0" v-model="currentTab" clearable placeholder="璇烽�夋嫨" size="small"
+ @change="(m) => handleChangeCableTag(currentSample.id, 0, 'cableTag', m)
+ " @focus="getCableTag(currentSample.id)">
+ <el-option v-for="item in cableTagList" :key="item.cableTag" :label="item.cableTag" :value="item.cableTag">
+ <span style="float: left">{{ item.cableTag }}</span>
+ <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
+ type="danger">鏈</el-tag>
+ <el-tag v-if="item.status == 1" size="small" style="float: right; margin-top: 5px"
+ type="warning">妫�楠屼腑</el-tag>
+ <el-tag v-if="item.status == 2" size="small" style="float: right; margin-top: 5px"
+ type="success">宸叉</el-tag>
+ </el-option>
+ </el-select>
+ <span v-if="repetitionTagList.length > 0"> 閲嶅妫�楠岄」锛�</span>
+ <el-select v-if="repetitionTagList.length > 0" v-model="repetitionTag" clearable placeholder="璇烽�夋嫨"
+ size="small" @change="(m) =>
+ handleChangeCableTag(currentSample.id, 0, 'repetitionTag', m)
+ " @focus="getRepetitionTag(currentSample.id)">
+ <el-option v-for="item in repetitionTagList" :key="item.repetitionTag" :label="item.radius"
+ :value="item.repetitionTag">
+ <span style="float: left">{{ item.radius }}</span>
+ <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
+ type="danger">鏈</el-tag>
+ <el-tag v-if="item.status == 1" size="small" style="float: right; margin-top: 5px"
+ type="warning">妫�楠屼腑</el-tag>
+ <el-tag v-if="item.status == 2" size="small" style="float: right; margin-top: 5px"
+ type="success">宸叉</el-tag>
+ </el-option>
+ </el-select>
+ <span v-if="typeSource == '1'"> 寰呮楠屾暟閲忥細</span>
+ <el-select v-if="typeSource == '1'" v-model="rawMaterialTag" placeholder="璇烽�夋嫨" size="small" @change="(m) => handleChangeCableTag(currentSample.id, 4, 'cableTag', m)
+ " @focus="getRawMaterialTag(currentSample.id)">
+ <el-option v-for="item in rawMaterialTagList" :key="item.rawMaterialTag" :label="item.rawMaterialTag"
+ :value="item.rawMaterialTag">
+ <span style="float: left">{{ item.rawMaterialTag }}</span>
+ <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
+ type="danger">鏈</el-tag>
+ <el-tag v-if="item.status == 1" size="small" style="float: right; margin-top: 5px"
+ type="warning">妫�楠屼腑</el-tag>
+ <el-tag v-if="item.status == 2" size="small" style="float: right; margin-top: 5px"
+ type="success">宸叉</el-tag>
+ </el-option>
+ </el-select>
+ <el-button :loading="dataAcquisitionLoading" v-if="state == 1" size="small" type="primary"
+ @click="getDataAcquisitionDevice">鏁版嵁閲囬泦</el-button>
+ <el-button :type="dataAcquisitionEidtAble ? '' : 'primary'" v-if="state == 1" size="small"
+ @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble">{{ dataAcquisitionEidtAble ? "鍏抽棴缂栬緫" : "缂栬緫鏁伴噰"
+ }}</el-button>
+ </div>
+ </div>
+ <!-- 甯歌妫�楠屽師濮嬭褰� -->
+ <div id="nav" v-loading="tableLoading" class="center-box">
+ <template v-if="
+ tableLists.find((m) => m.templateId == currentTable)">
+ <table v-for="(item, index) in tableList" :key="index + currentTable + currentSample.id" border="1"
+ cellpadding="10" class="tables" id="myTable">
+ <tbody>
+ <tr style="white-space: nowrap">
+ 濮旀墭缂栧彿锛歿{
+ insOrder.entrustCode
+ }}
+ </tr>
+ <tr v-for="(m, i) in item.arr" :key="i">
+ <td v-for="(n, j) in m" v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4"
+ :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" :key="j"
+ :colspan="n.v.mc && n.v.mc.cs ? n.v.mc.cs : 1" :rowspan="n.v.mc && n.v.mc.rs ? n.v.mc.rs : 1" :style="`background:${n.v.bg ? n.v.bg : ''};color:${n.v.fc
+ };font-size:${n.v.fs}px;width:${handleWidth(
+ n
+ )}px !important;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl ? 'bold' : ''
+ };`">
+ <div :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]
+ }px;`" class="content">
+ <template v-if="
+ n.v.ps != undefined &&
+ typeof n.v.ps.value === 'string' &&
+ n.v.ps.value.includes('妫�楠屽��') &&
+ state == 1
+ ">
+ <el-input v-if="getInspectionValueType(n.i) == 1"
+ :key="'abc-' + '000' + index + '000' + i + '000' + j" v-model="n.v.v" :disabled="(getInspectionItemType(n.i) == 1 &&
+ !dataAcquisitionEidtAble) ||
+ (n.u != userId && n.u != undefined && n.u != '')
+ " class="table_input" @change="(m) =>
+ changeInput(
+ m,
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType'
+ )
+ " @input="handleInput(n)" @mousewheel.native.prevent @keydown.enter="
+ changeInput(
+ '',
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType'
+ )
+ ">
+ </el-input>
+ <el-input v-else-if="getInspectionValueType(n.i) == 2" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 ||
+ (n.u != userId && n.u != undefined && n.u != '')
+ " class="table_input" type="textarea" @change="(m) =>
+ changeInput(
+ m,
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType'
+ )
+ " />
+ <!-- <el-select v-else-if="getInspectionValueType(n.i) == 5" v-model="n.v.v" :disabled="state > 1 ||
+ getInspectionItemType(n.i) == 1 ||
+ (n.u != userId && n.u != undefined && n.u != '')
+ " class="table_input" @change="(m) =>
+ changeInput(
+ m,
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType'
+ )
+ " @visible-change="(e) => getDic(e, n.i)">
+ <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option>
+ </el-select> -->
+ <span v-else-if="getInspectionValueType(n.i) == 4"
+ :style="`font-family:${n.v.ff} !important;`">/</span>
+ </template>
+ <template v-else-if="n.v.ps != undefined && n.v.ps.value === '缁撹'">
+ <el-select v-if="
+ (getInspectionValueType(n.i) == 2 ||
+ getInspectionValueType(n.i) == 5) &&
+ state == 1
+ " v-model="n.v.v" class="table_input" @change="(m) =>
+ changeInput(
+ m,
+ `${item.templateId}-${n.r}-${n.c}-${n.i}`,
+ n,
+ 'getDataType',
+ 'changeSelect'
+ )
+ ">
+ <el-option :value="1" label="鍚堟牸"></el-option>
+ <el-option :value="0" label="涓嶅悎鏍�"></el-option>
+ <el-option :value="3" label="涓嶅垽瀹�"></el-option>
+ <el-option :value="2" label="寰呭畾"></el-option>
+ </el-select>
+ <template v-if="state > 1">
+ <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">鍚堟牸</span>
+ <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span>
+ <span v-else-if="n.v.v === 3"
+ :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">涓嶅垽瀹�</span>
+ <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span>
+ </template>
+ <template v-if="getInspectionValueType(n.i) != 2 &&
+ state == 1">
+ <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">鍚堟牸</span>
+ <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span>
+ <span v-else-if="n.v.v === 3"
+ :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">涓嶅垽瀹�</span>
+ <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span>
+ </template>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '璁惧缂栫爜' &&
+ state == 1
+ ">
+ <span>{{ n.v.v }}</span>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined && n.v.ps.value === '璁惧鍚嶇О'
+ ">
+ <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple
+ placeholder="璁惧" remote @change="(val) => changeEquip(val, n)"
+ @visible-change="(e) => getEquipOptions(e, n.i)">
+ <el-option v-for="item in equipOptions" :key="item.value" :label="item.label"
+ :value="item.value">
+ {{ item.label + "--" + item.value }}
+ </el-option>
+ </el-select>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '瑕佹眰鍊�' &&
+ state == 1
+ ">
+ <span :style="`font-family:${n.v.ff} !important;`">{{
+ getTell(n.i)
+ }}</span>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '璁$畻鍊�' &&
+ state == 1
+ "><span :style="`font-family:${n.v.ff} !important;`">{{
+ toFixed(n.v.v, n.v.ct)
+ }}</span></template>
+ <template v-else-if="
+ n.v.ps != undefined &&
+ n.v.ps.value === '鏈�缁堝��' &&
+ state == 1
+ ">
+ <span :style="`font-family:${n.v.ff} !important;`">{{
+ toFixed(n.v.v, n.v.ct)
+ }}</span>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined && n.v.ps.value === '鏍峰搧缂栧彿'
+ ">
+ <div :title="currentSample.sampleCode" style="
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ width: 100%;
+ ">
+ <i class="el-icon-caret-left table_caret" style="width: 16px" @click="caretSample(-1)"></i>
+ <div
+ :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">
+ {{ currentSample.sampleCode }}
+ </div>
+ <i class="el-icon-caret-right table_caret" style="width: 16px" @click="caretSample(1)"></i>
+ </div>
+ </template>
+ <template v-else-if="
+ n.v.ps != undefined && n.v.ps.value === '鏍峰搧鍨嬪彿'
+ ">
+ <div v-if="
+ currentSample.model !== undefined &&
+ currentSample.model !== null
+ " :style="`font-family:${n.v.ff} !important;`">
+ {{ currentSample.model }}
+ </div>
+ </template>
+ <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </template>
+ </div>
+ <el-upload v-if="state == 1" ref="upload" :action="action" :before-upload="beforeUpload" :data="{
+ orderId: id,
+ }" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
+ accept=".jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar"
+ style="width: 80px !important;margin-top: 10px;">
+ <el-button v-if="state == 1" size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload>
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 290px)'" @pagination="pagination" style="height: 100%; margin-top: 16px"></lims-table>
+ </div>
+ <el-drawer :size="550" :visible.sync="sampleVisible" title="鏍峰搧鍒囨崲">
+ <el-table v-if="sampleVisible" ref="productTable" :current-row-key="currentKey" :data="sampleProduct"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+ :row-class-name="tableRowClassName" :row-key="(record) => record.index" border class="el-table" height="100%"
+ highlight-current-row tooltip-effect="dark" @row-click="handleChangeSample">
+ <el-table-column :key="Math.random()" align="center" label="搴忓彿" type="index" width="70px">
+ </el-table-column>
+ <el-table-column label="鏍峰搧缂栧彿" min-width="100px" prop="sampleCode" show-overflow-tooltip></el-table-column>
+ <el-table-column label="鏍峰搧鍨嬪彿" min-width="100px" prop="model" show-overflow-tooltip></el-table-column>
+ <el-table-column label="妫�娴嬬姸鎬�" prop="insState" show-overflow-tooltip width="100px">
+ <template slot-scope="scope">
+ <el-tag v-for="(item, i) in typeList" v-if="item.value == scope.row.insState" :key="i" :type="item.type"
+ size="medium" style="margin-right: 5px">{{ item.label }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鏄惁鐣欐牱" prop="isLeave" show-overflow-tooltip width="95px">
+ <template slot-scope="scope">
+ <span>{{ scope.row.isLeave == 0 ? "鍚�" : "鏄�" }}</span>
+ </template>
+ </el-table-column>
+ <!-- 妫�楠屽崟浼氭湁涓�涓槸鍚︽湁閰嶅鏍峰搧瀛楁鎺у埗鏄剧ず -->
+ <el-table-column v-if="insOrder.mating > 0" label="閰嶅鏍峰搧鍨嬪彿" min-width="130px" prop="joinModel"
+ show-overflow-tooltip></el-table-column>
+ <el-table-column v-if="insOrder.mating > 0" label="閰嶅鏍峰搧鍚嶇О" min-width="130px" prop="joinName"
+ show-overflow-tooltip></el-table-column>
+ <el-table-column v-if="insOrder.mating > 0" label="閰嶅鏍峰搧鏁伴噺" min-width="130px" prop="joinNum"
+ show-overflow-tooltip></el-table-column>
+ </el-table>
+ </el-drawer>
+ <el-drawer :size="500" :visible.sync="taskVisible" title="浠诲姟鍒囨崲">
+ <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
+ :height="'calc(100vh - 90px)'" :currentChange="handleChangeTask"></lims-table>
+ </el-drawer>
+ <el-dialog :visible.sync="reviewDia" title="妫�楠屽鏍�" width="500px">
+ <div v-if="reviewDia" class="body" style="display: flex; padding: 10px">
+ <div class="search_label" style="width: 150px">
+ <span class="required-span">* </span>涓嶉�氳繃鐨勭悊鐢憋細
+ </div>
+ <div class="search_input" style="width: 100%">
+ <el-input v-model="noReason" :autosize="{ minRows: 4 }" clearable size="small" type="textarea"></el-input>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="reviewDia = false">鍙� 娑�</el-button>
+ <el-button :loading="reviewLoading" type="primary" @click="handleReviewDia">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog :visible.sync="addVerifyDia" title="鎸囧畾澶嶆牳浜哄憳" width="400px">
+ <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 personList" :key="i" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addVerifyDia = false">鍙� 娑�</el-button>
+ <el-button :loading="submitLoading" type="primary" @click="submit()">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
+ :visible.sync="dataGetDia" title="鏁版嵁閲囬泦" width="80%">
+ <div>
+ <table border="1" cellpadding="10" class="thermal-table">
+ <tr>
+ <td style="width: 120px">妫�楠岄」鍒嗙被</td>
+ <td style="width: 120px">妫�楠岄」</td>
+ <td style="width: 120px">妫�楠屽瓙椤�</td>
+ <td>鏁伴噰鏁版嵁</td>
+ </tr>
+ <template v-for="(item, index) in getData">
+ <tr>
+ <td :rowspan="item.child.length">{{ item.sortName }}</td>
+ <td :rowspan="item.child.length">{{ item.faName }}</td>
+ <td>{{ item.child[0].name }}</td>
+ <td style="text-align: left">
+ <el-select v-if="item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
+ :multiple-limit="item.child[0].maxNum" clearable filterable multiple placeholder="璇烽�夋嫨"
+ @change="setData(item)">
+ <el-option v-for="(item, index) in item.child[0].arr" :key="index" :filter-method="filterMethod"
+ :label="index + 1 + '^' + item.result" :value="index + '^' + item.result">
+ <span>{{
+ "搴忓彿锛�" +
+ (index + 1) +
+ "锛�" +
+ "缁撴灉锛�" +
+ item.result +
+ "锛�" +
+ "鍘氬害锛�" +
+ item.thickness +
+ "锛�" +
+ "鏃堕棿锛�" +
+ item.mergedDateTime
+ }}</span>
+ </el-option>
+ </el-select>
+ <el-checkbox-group v-if="!item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
+ :max="item.child[0].maxNum">
+ <el-checkbox v-for="(n, j) in item.child[0].arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox>
+ </el-checkbox-group>
+ </td>
+ </tr>
+ <tr v-for="(m, i) in item.child" v-show="i > 0" :key="i + 'bbbbbbbbbbbbbb'">
+ <td>{{ m.name }}</td>
+ <td style="text-align: left">
+ <el-select v-if="m.isShowSelect" v-model="m.getDataIndex1" :multiple-limit="m.maxNum" clearable
+ filterable multiple placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index1) in m.arr" :key="index1" :label="index + 1 + '^' + item.result"
+ :value="index1 + '^' + item.result">
+ <span>{{
+ "搴忓彿锛�" +
+ (index1 + 1) +
+ "锛�" +
+ "缁撴灉锛�" +
+ item.result +
+ "锛�" +
+ "鍘氬害锛�" +
+ item.thickness +
+ "锛�" +
+ "鏃堕棿锛�" +
+ item.mergedDateTime
+ }}</span>
+ </el-option>
+ </el-select>
+ <el-checkbox-group v-if="!m.isShowSelect" v-model="m.getDataIndex1" :max="m.maxNum">
+ <el-checkbox v-for="(n, j) in m.arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox>
+ </el-checkbox-group>
+ </td>
+ </tr>
+ </template>
+ </table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dataGetDia = false">鍙� 娑�</el-button>
+ <el-button :loading="getDataIndexLoading" type="primary" @click="submitDataGet()">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog :close-on-click-modal="false" :visible.sync="addCheck" 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="checkUser" clearable filterable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
+ <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeAddVerifyDia">鍙� 娑�</el-button>
+ <el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!-- 娣诲姞涓嶅悎鏍煎娴嬪脊妗�-->
+ <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog"
+ @resetAddUnPass="resetAddUnPass"></add-un-pass>
+ <!-- 涓嶅悎鏍煎鐞嗗脊妗�-->
+ <UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog"
+ @resetForm="resetForm"></UnPassDialog>
+ <!-- 涓嶅悎鏍煎娴嬪脊妗�-->
+ <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
+ :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource"
+ :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" />
+ <!-- 杩涜揣楠岃瘉寮规-->
+ <purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId"
+ :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
+ <!--鏌ョ湅宸ユ椂寮规-->
+ <viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia>
+ </div>
+</template>
+
+<script>
+import excelFunction from "@/utils/excelFountion";
+import limsTable from "@/components/Table/lims-table.vue";
+import UnPassDialog from "../unpass/components/unPassDialog.vue";
+import AddUnPass from "../unpass/components/addUnPass.vue";
+import InspectionWord from "../inspectionTask/components/InspectionWord.vue";
+import PurchaseVerification from "../unpass/components/PurchaseVerification.vue";
+import {
+ doInsOrder,
+ getCableTag,
+ getRepetitionTag,
+ getRawMaterialTag,
+ dataCollection,
+ write,
+ getInsProduct,
+ search,
+ verifyPlan,
+ checkSubmitPlan,
+ submitPlan,
+ saveInsContext,
+ selectUserCondition,
+ downFile,
+ getFileList,
+ delfile,
+ inspectionOrderDetailsTaskSwitching
+} from "@/api/business/inspectionTask.js";
+import InspectionWorker from '@/workers/InspectionWorker.worker';
+import DataWorker from '../../../workers/DataWorker.worker';
+import html2canvas from "html2canvas";
+import { mapGetters } from "vuex";
+import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
+export default {
+ name: 'InspectionView',
+ components: {
+ viewManHourDia,
+ PurchaseVerification,
+ AddUnPass,
+ limsTable,
+ UnPassDialog,
+ InspectionWord,
+ },
+ data() {
+ return {
+ sonLaboratory: null,
+ orderId: null,
+ state: null,
+ inspectorList: null,
+ typeSource: null,
+ sagData: [],
+ sagForm: {
+ sampleCode: null,
+ model: null,
+ inspection: null,
+ methodName: null,
+ tensileForce: null,
+ spanLength: null,
+ load: null,
+ },
+ dataGetDia: false,
+ fileAdd: false,
+ sampleVisible: false,
+ taskVisible: false,
+ submitLoading: false,
+ searchForm: {
+ sampleName: null,
+ state: null,
+ },
+ id: null,
+ changeType: null,
+ insOrder: {},
+ sampleProduct: [],
+ supplierDensity: "", // 鍘傚瀵嗗害
+ typeList: [],
+ urgentList: [],
+ currentSample: {}, //褰撳墠鏍峰搧淇℃伅
+ tableList: [],
+ loading: false,
+ ps: {},
+ param: {},
+ currentKey: 1,
+ currentKey0: 1,
+ currentKey1: 1,
+ currentKey2: 1,
+ comparisonList: [],
+ excelMethodList: [],
+ equipOptions: [],
+ reviewLoading: false,
+ reviewDia: false,
+ noReason: "",
+ tableWidth: 1000,
+ currentTable: null,
+ tableLists: [],
+ widthList: [],
+ addVerifyDia: false,
+ verifyUser: null,
+ personList: [],
+ enumList: [],
+ tableLoading: false,
+ upLoading: false,
+ temptList: null,
+ currentTab: null,
+ wareForm: {
+ inspectionItem: 1,
+ inspectionItemSubclass: "20(甯告俯)",
+ },
+ otherForm: {
+ humidity: null,
+ temperature: null,
+ },
+ equipForm: {
+ value0: null,
+ code0: null,
+ value1: null,
+ code1: null,
+ },
+ result: null,
+ worker: null,
+ worker0: null,
+ wareLength: [],
+ dataAcquisitionInfo: {},
+ dataAcquisitionInfoNew: {},
+ dataAcquisitionEidtAble: false,
+ dataAcquisitionLoading: false,
+ collected: false,
+ temDataAcquisition: false,
+ getData: [
+ {
+ faName: "娉㈤暱闄勫姞琛板噺",
+ child: [
+ {
+ name: "1285nm~1330nm",
+ arr: [12, 13, 14, 15],
+ },
+ {
+ name: "1525nm~1575nm",
+ arr: [12, 13, 14, 15],
+ },
+ ],
+ },
+ {
+ faName: "鎴嚦娉㈤暱",
+ child: [
+ {
+ name: "鎴嚦娉㈤暱",
+ arr: [12, 13, 14, 15],
+ },
+ ],
+ },
+ ],
+ getDataIndex: [],
+ getDataIndexLoading: false,
+ getDataTypeId: "",
+ getDataType: null,
+ unPassDialog: false, // 涓嶅悎鏍煎鐞嗗脊妗�
+ cableTagList: [],
+ rawMaterialTag: "", // 鎵规
+ rawMaterialTagList: [], // 鎵规閫夐」
+ addCheck: false, // 鎸囧畾瀹℃牳浜哄憳寮规
+ checkUser: "",
+ addUnPassDialog: false,
+ type: "",
+ retestTag: "",
+ unPassCheck: false,
+ unPassTableList: [],
+ unPassTableLoading: false,
+ purchaseDialog: false, // 杩涜揣楠岃瘉鍘熷璁板綍寮规
+ temCableTag: "",
+ repetitionTagList: [],
+ repetitionTag: "",
+ // 鏂囦欢鍒楄〃鐩稿叧--寮�濮�
+ tableData: [],
+ column: [
+ {
+ label: "绫诲瀷", prop: "type", dataType: "tag",
+ formatData: (params) => {
+ if (params == 1) {
+ return '鍥剧墖'
+ } else {
+ return '鏂囦欢'
+ }
+ }
+ },
+ { label: "闄勪欢鍚嶇О", prop: "fileName" },
+ { label: "涓婁紶浜�", prop: "name" },
+ { label: "涓婁紶鏃堕棿", prop: "createTime" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDown(row);
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return this.state != 1;
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ // 鏂囦欢鍒楄〃鐩稿叧--缁撴潫
+ // 浠诲姟鍒囨崲鍒楄〃--寮�濮�
+ tableData0: [],
+ column0: [
+ { label: "濮旀墭缂栧彿", prop: "entrustCode", width: '160px' },
+ { label: "妫�楠屽璞�", prop: "sampleType", width: '140px' },
+ {
+ label: "绱ф�ョ▼搴�", prop: "type", dataType: "tag",
+ formatData: (params) => {
+ return this.urgentList.find(m => m.value == params).label
+ },
+ formatType: (params) => {
+ return this.urgentList.find(m => m.value == params).type
+ }
+ },
+ {
+ label: "鐘舵��", prop: "insState", dataType: "tag",
+ formatData: (params) => {
+ return this.typeList.find(m => m.value == params).label
+ },
+ formatType: (params) => {
+ return this.typeList.find(m => m.value == params).type
+ }
+ },
+ { label: "绾﹀畾鏃堕棿", prop: "appointed", width: '140px' },
+ { label: "涓嬪彂鏃堕棿", prop: "sendTime", width: '140px' },
+ ],
+ page0: {
+ total: 0,
+ size: -1,
+ current: -1,
+ },
+ tableLoading0: false,
+ // 浠诲姟鍒囨崲鍒楄〃--缁撴潫
+ };
+ },
+ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+ computed: {
+ ...mapGetters(["userId"]),
+ action() {
+ return this.javaApi + "/insOrderPlan/uploadFile";
+ },
+ },
+ created() {
+ let { sonLaboratory, orderId, state, inspectorList, typeSource } =
+ this.$route.query;
+ this.sonLaboratory = sonLaboratory;
+ this.orderId = orderId;
+ this.id = this.orderId;
+ this.state = state;
+ this.inspectorList = inspectorList;
+ this.typeSource = typeSource;
+ },
+ mounted() {
+ this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
+ this.getInsStateDicts();
+ this.getComparisonList();
+ this.getAuthorizedPerson();
+ this.startWorker();
+ // this.getList0() // 浠诲姟鍒囨崲
+ this.scrollInit();
+ },
+ activated() {
+ this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
+ this.getInsStateDicts();
+ this.getComparisonList();
+ this.getAuthorizedPerson();
+ this.startWorker();
+ // this.getList0() // 浠诲姟鍒囨崲
+ this.scrollInit();
+ },
+ watch: {
+ // 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭�
+ id(val) {
+ this.refreshView()
+ },
+ // 鐩戝惉褰撳墠妯℃澘鍙樺寲
+ currentTable(val1, val0) {
+ if (val0 != null && val1 != val0) {
+ if (this.changeType && this.changeType > 0) {
+ // 濡傛灉鏄厜绾ゃ�佸厜绾ゅ甫锛屽垯涓嶆墽琛屼笅闈㈡搷浣�
+ return;
+ }
+ this.tableLists.forEach(async (m, i) => {
+ if (m.templateId == val1) {
+ let list = await this.getCurrentProduct(this.currentSample.id, 0);
+ this.currentSample.insProduct = this.HaveJson(list); //璧嬪�煎綋鍓嶆牱鍝佺殑妫�楠岄」
+ this.param = {}; //鍒濆鍖栦紶鍒板悗绔殑鍙傛暟
+ this.currentSample.insProduct.forEach((a, j) => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
+ });
+ // 鍘婚噸妯℃澘锛岃繑鍥炴湁鍑犱釜妯℃澘
+ const mySet1 = new Set();
+ this.tableLists = this.currentSample.insProduct.filter((m) => {
+ let num0 = mySet1.size;
+ if (m.templateId != null && m.template != null) {
+ try {
+ mySet1.add(
+ JSON.stringify({
+ template: m.template,
+ templateId: m.templateId,
+ })
+ );
+ } catch (error) {
+ console.log(222, error);
+ }
+ }
+ let num1 = mySet1.size;
+ if (num1 > num0) {
+ return m;
+ }
+ });
+ if (this.tableLists && this.tableLists.length > 0) {
+ this.tableList = null;
+ this.tableList = this.tableLists.filter(
+ (m) => m.templateId == val1
+ );
+ // 瀵规ā鏉胯繘琛屽鐞�
+ this.handleTableData();
+ }
+ }
+ });
+ }
+ },
+ // 鐗规畩妫�楠岄」--鐩戝惉璁惧淇℃伅鏀瑰彉
+ equipForm: {
+ deep: true,
+ handler(val) { },
+ },
+ },
+ beforeDestroy() {
+ // 鍦ㄧ粍浠堕攢姣佸墠纭繚鍋滄 Worker锛岄伩鍏嶅唴瀛樻硠婕�
+ this.stopWorker();
+ },
+ methods: {
+ // 鏂囦欢绠$悊--寮�濮�
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.page };
+ delete param.total;
+ getFileList({ insOrderId: this.id, ...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();
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(() => {
+ delfile({ id: row.id }).then((res) => {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.getList();
+ });
+ }).catch(() => { });
+ },
+ // 鏂囦欢绠$悊--缁撴潫
+
+ // 浠诲姟鍒囨崲--寮�濮�
+ getList0() {
+ this.tableLoading0 = true;
+ let param = { userId: this.userId, sonLaboratory: this.sonLaboratory, ...this.page0 };
+ delete param.total;
+ inspectionOrderDetailsTaskSwitching({ ...param })
+ .then((res) => {
+ this.tableLoading0 = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading0 = false;
+ });
+ },
+ // 浠诲姟鍒囨崲--缁撴潫
+
+ closeAddVerifyDia() {
+ this.addCheck = false;
+ this.checkUser = "";
+ },
+ // 鍒锋柊椤甸潰
+ refreshView() {
+ this.loading = true;
+ doInsOrder({
+ id: this.id,
+ laboratory: this.sonLaboratory,
+ }).then(async (res) => {
+ this.insOrder = res.data.insOrder;
+ this.supplierDensity = res.data.supplierDensity;
+ this.getList()
+ this.urgentList.forEach((m) => {
+ if (m.value == this.insOrder.type) {
+ this.insOrder.typeName = m.label;
+ }
+ });
+ this.loading = false;
+ if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) {
+ this.goback();
+ return this.$message.error("璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�");
+ }
+ // 璧嬪�煎綋鍓嶆牱鍝佸垪琛�
+ this.sampleProduct = res.data.sampleProduct;
+ this.currentSample = this.HaveJson(this.sampleProduct[0]);
+ let insProduct = this.HaveJson(this.currentSample.insProduct);
+ // 娓╁害銆佹箍搴﹁祴鍊�
+ this.otherForm = {
+ temperature: this.insOrder.temperature
+ ? this.insOrder.temperature
+ : null,
+ humidity: this.insOrder.humidity ? this.insOrder.humidity : null,
+ };
+ if (this.typeSource == "1") {
+ this.getRawMaterialTag(this.currentSample.id); // 鍘熸潗鏂欑殑妫�楠屼换鍔℃煡璇㈡壒鏁�
+ this.rawMaterialTag = "1";
+ }
+ this.getEquipOptions(1);
+ // 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」
+ let list = await this.getCurrentProduct(this.currentSample.id, 0);
+ this.currentSample.insProduct = this.HaveJson(list);
+ // 鍒濆鍖栦紶閫掑埌鍚庣鐨勫弬鏁�
+ this.param = {};
+ this.changeType = 0;
+ this.currentSample.insProduct.forEach((a) => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
+ });
+ if (this.currentSample.index == undefined)
+ this.currentSample["index"] = 1;
+ let bushing = this.currentSample.bushing;
+ this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅
+
+ this.currentKey = 1;
+ this.getCableTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎澶氭妫�楠岀殑鐢电紗閰嶇疆
+ this.getRepetitionTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎閲嶅妫�楠岄」
+ });
+ },
+ closeUnPassCheckDialog() {
+ this.unPassCheck = false;
+ },
+ // 鏌ヨ鏄惁鏈夎澶氭妫�楠岀殑鐢电紗閰嶇疆
+ getCableTag() {
+ getCableTag({
+ id: this.currentSample.id,
+ laboratory: this.sonLaboratory,
+ }).then((res) => {
+ if (res.code === 200 && res.data.length > 0) {
+ this.cableTagList = res.data;
+ }
+ });
+ },
+ // 鏌ヨ鏄惁鏈夎閲嶅妫�楠岄」
+ getRepetitionTag() {
+ getRepetitionTag({
+ id: this.currentSample.id,
+ laboratory: this.sonLaboratory,
+ cableTag: this.temCableTag,
+ }).then((res) => {
+ if (res.code === 200) {
+ this.repetitionTagList = res.data;
+ }
+ });
+ },
+ getRawMaterialTag() {
+ getRawMaterialTag({
+ id: this.currentSample.id,
+ laboratory: this.sonLaboratory,
+ }).then((res) => {
+ if (res.code === 200) {
+ res.data.forEach((item) => {
+ this.rawMaterialTagList = res.data;
+ });
+ }
+ });
+ },
+ // 娣诲姞闇�瑕佸娴嬬殑涓嶅悎鏍兼楠岄」
+ openAddUnpass() {
+ this.addUnPassDialog = true;
+ const info = {
+ id: this.currentSample.id,
+ type: this.type,
+ laboratory: this.sonLaboratory,
+ cableTag: "",
+ rawMaterialTag: this.rawMaterialTag,
+ };
+ this.$nextTick(() => {
+ this.$refs.addUnPassDialog.getInsOrder(info);
+ });
+ },
+ resetAddUnPass() {
+ this.addUnPassDialog = false;
+ },
+ // 杩涜涓嶅悎鏍煎娴�
+ unpassCheck() {
+ this.unPassCheck = true;
+ this.retestTag = "1";
+ },
+ viewUnpassCheck() {
+ this.unPassCheck = true;
+ this.retestTag = "1";
+ },
+ // 鎵撳紑涓嶅悎鏍煎鐞嗗脊妗�
+ openUnPassDialog(type) {
+ this.unPassDialog = true;
+ this.$nextTick(() => {
+ this.$refs.unPassDialog.getInsOrder(type);
+ });
+ },
+ // 鍏抽棴涓嶅悎鏍煎鐞嗗脊妗�
+ resetForm() {
+ this.$refs.unPassDialog.$refs["unPassForm"].resetFields();
+ this.unPassDialog = false;
+ },
+ // 鎵撳紑杩涜揣楠岃瘉寮规
+ openPurchase() {
+ const operationType = this.state == 1 ? "add" : "view";
+ this.purchaseDialog = true;
+ const item = {
+ id: this.currentSample.id,
+ sonLaboratory: this.sonLaboratory,
+ cableTag: this.temCableTag,
+ rawMaterialTag: this.rawMaterialTag,
+ typeSource: this.typeSource,
+ };
+ this.$nextTick(() => {
+ this.$refs.purchaseDialog.getInsOrder(operationType, item);
+ });
+ },
+ resetPurchaseDialog() {
+ this.$refs.purchaseDialog.$refs["purchaseForm"].resetFields();
+ this.purchaseDialog = false;
+ },
+ // 鏁版嵁閲囬泦
+ getDataAcquisitionDevice() {
+ let itemIds = [];
+ this.currentSample.insProduct.forEach((item) => {
+ if (item.inspectionItemType === "1") {
+ itemIds.push(item.id);
+ }
+ });
+ const params = {
+ entrustCode: this.insOrder.entrustCode,
+ sampleCode: this.currentSample.sampleCode,
+ id: this.currentSample.id,
+ itemIds: itemIds,
+ };
+ this.dataAcquisitionLoading = true;
+ dataCollection(params).then((res) => {
+ this.dataAcquisitionLoading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.dataAcquisitionInfoNew = this.HaveJson(res.data);
+ // 瀵规暟閲囧洖鏉ョ殑鍊艰繘琛屽鐞�
+ this.handleDataAcquisition(res.data);
+ }).catch(err => {
+ this.dataAcquisitionLoading = false;
+ });
+ },
+ objectOrder(obj) {
+ let newkey = Object.keys(obj).sort();
+ let newObj = {};
+ for (let i = 0; i < newkey.length; i++) {
+ newObj[newkey[i]] = obj[newkey[i]];
+ }
+ return newObj;
+ },
+ handleDataAcquisition(data, noDialog) {
+ // 鏄惁鍙互缂栬緫鏁伴噰鏁版嵁
+ if (this.dataAcquisitionEidtAble) {
+ this.getDataType = 1;
+ } else {
+ this.getDataType = 2;
+ }
+ this.dataAcquisitionInfo = {};
+ this.getData = [];
+ for (let i in this.objectOrder(data)) {
+ let obj = {};
+ if (i.includes("@")) {
+ obj = {
+ faName: i.split("@")[0],
+ sortName: i.split("@")[1],
+ child: [],
+ };
+ } else {
+ obj = {
+ faName: i,
+ child: [],
+ };
+ }
+ // 寰幆鏁伴噰鏁版嵁
+ for (let j in data[i]) {
+ // 鎷兼帴瀛楃涓� 妫�楠岄」鍒嗙被+妫�楠岄」+妫�楠屽瓙椤�
+ let str0 = "";
+ if (i.includes("@")) {
+ if (i.split("@")[0] == j) {
+ str0 = i.split("@")[0] + ",";
+ } else {
+ str0 = i.split("@")[1] + "," + i.split("@")[0] + "," + j;
+ }
+ } else {
+ if (i == j) {
+ str0 = i + ",";
+ } else {
+ str0 = i + "," + j;
+ }
+ }
+ if (
+ j != "frequency" &&
+ data[i][j] &&
+ (!data[i][j].result || typeof data[i][j].result == "string")
+ ) {
+ // 澶勭悊鏁伴噰淇℃伅鏍煎紡
+ if (data[i][j].result) {
+ this.dataAcquisitionInfo[str0] = {
+ value: data[i][j].result,
+ frequency: data[i].frequency,
+ };
+ }
+ let list = this.tableList[0].arr;
+ // 寰幆椤甸潰鍒楄〃淇℃伅锛屽垽鏂暟閲囨暟鎹搴旈〉闈㈠垪琛ㄤ俊鎭殑妫�楠岄」鏄摢涓紝骞剁粰褰撳墠妫�楠岄」缁戝畾璁惧淇℃伅
+ list.forEach((item, index) => {
+ let num0 = 0;
+ let str = "";
+ item.forEach((m) => {
+ if (
+ m.v.ps &&
+ (m.v.ps.value == "妫�楠屽瓙椤�" ||
+ m.v.ps.value == "妫�楠岄」" ||
+ m.v.ps.value == "妫�楠岄」鍒嗙被")
+ ) {
+ if (m.v.ps && m.v.ps.value == "妫�楠岄」鍒嗙被") {
+ if (num0 == 0) {
+ num0++;
+ str = m.v.v + ",";
+ }
+ }
+ if (m.v.ps && m.v.ps.value == "妫�楠岄」") {
+ if (num0 == 1) {
+ str = str + m.v.v + ",";
+ num0++;
+ } else {
+ str = m.v.v + ",";
+ num0++;
+ }
+ }
+ if (m.v.ps && m.v.ps.value == "妫�楠屽瓙椤�") {
+ str = str + m.v.v;
+ }
+ }
+ // 缁戝畾璁惧淇℃伅
+ if (
+ data[i][j].equipName &&
+ data[i][j].equipValue &&
+ m.v &&
+ m.v.ps &&
+ m.v.ps.value == "璁惧鍚嶇О" &&
+ str0 == str
+ ) {
+ if (!m.v.v) {
+ // this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
+ }
+ }
+ });
+ });
+ } else if (
+ j != "frequency" &&
+ data[i][j] &&
+ Array.isArray(data[i][j].result)
+ ) {
+ // 濡傛灉杩斿洖鐨勬暟閲囨暟鎹槸鏁扮粍锛屽垯澶勭悊鏁扮粍
+ // 浠ヤ笅閫昏緫涓鸿幏鍙栨瘡涓楠岄」鍙緭鍏ョ殑妫�楠屽�肩殑鏈�澶т釜鏁�
+ let str0 = "";
+ if (i.includes("@")) {
+ if (i.split("@")[0] == j) {
+ str0 = i.split("@")[0] + ",";
+ } else {
+ str0 = i.split("@")[1] + "," + i.split("@")[0] + "," + j;
+ }
+ } else {
+ if (i == j) {
+ str0 = i + ",";
+ } else {
+ str0 = i + "," + j;
+ }
+ }
+ let list = this.tableList[0].arr;
+ let maxNum = 0;
+ list.forEach((item, index) => {
+ let num0 = 0;
+ let str = "";
+ item.forEach((m) => {
+ if (
+ m.v.ps &&
+ (m.v.ps.value == "妫�楠屽瓙椤�" ||
+ m.v.ps.value == "妫�楠岄」" ||
+ m.v.ps.value == "妫�楠岄」鍒嗙被")
+ ) {
+ if (m.v.ps && m.v.ps.value == "妫�楠岄」鍒嗙被") {
+ if (num0 == 0) {
+ num0++;
+ str = m.v.v + ",";
+ }
+ }
+ if (m.v.ps && m.v.ps.value == "妫�楠岄」") {
+ if (num0 == 1) {
+ str = str + m.v.v + ",";
+ num0++;
+ } else {
+ str = m.v.v + ",";
+ num0++;
+ }
+ }
+ if (m.v.ps && m.v.ps.value == "妫�楠屽瓙椤�") {
+ str = str + m.v.v;
+ }
+ let num = 0;
+ list[index].forEach((n) => {
+ if (
+ n.v.ps &&
+ n.v.ps.value &&
+ typeof n.v.ps.value == "string" &&
+ n.v.ps.value.includes("妫�楠屽��")
+ ) {
+ num++;
+ if (str0 == str) {
+ maxNum = num;
+ }
+ }
+ });
+ }
+ // 缁戝畾璁惧
+ if (
+ data[i][j].equipName &&
+ data[i][j].equipValue &&
+ m.v &&
+ m.v.ps &&
+ m.v.ps.value == "璁惧鍚嶇О" &&
+ str0 == str
+ ) {
+ if (!m.v.v) {
+ // this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
+ }
+ }
+ });
+ });
+ // 鑾峰彇鍒版渶澶ф楠屽�艰緭鍏ヤ釜鏁板悗閲嶇粍鏁版嵁
+ let obj0 = {
+ name: j,
+ arr: data[i][j].result,
+ maxNum: maxNum,
+ equipValue: data[i][j].equipValue,
+ value: [],
+ };
+ // 濡傛灉鏁伴噰杩斿洖鐨勬暟缁勯暱搴﹀ぇ浜庢渶澶ц緭鍏ヤ釜鏁帮紝鍒欏皢鏁伴噰鏁版嵁鍦ㄥ脊妗嗕腑灞曠ず锛岀敤鎴烽�夋嫨闇�瑕佹墜鍔ㄩ�夋嫨鏁伴噰鐨勪俊鎭�
+ if (
+ (data[i][j].result &&
+ Array.isArray(data[i][j].result) &&
+ data[i][j].result.length > maxNum &&
+ noDialog !== "noDialog") ||
+ (obj0.equipValue === "JCZX-ZB-FF01014" && noDialog !== "noDialog")
+ ) {
+ obj.child.push(obj0);
+ } else {
+ this.dataAcquisitionInfo[str0] = {
+ value: data[i][j].result,
+ };
+ }
+ }
+ }
+ // 寰幆鏁伴噰鏁版嵁
+ if (obj.child.length > 0) {
+ obj.child.forEach((m) => {
+ this.$set(m, "getDataIndex1", []);
+ // 璁惧閫夋嫨涓烘媺鍔涙満锛屽氨鏄剧ず澶氶�変笅鎷夋
+ if (m.equipValue === "JCZX-ZB-FF01014") {
+ this.$set(m, "isShowSelect", true);
+ } else {
+ this.$set(m, "isShowSelect", false);
+ }
+ });
+ this.getData.push(obj);
+ }
+ }
+ // 濡傛灉瀛樺湪鏁伴噰杩斿洖鐨勬暟缁勯暱搴﹀ぇ浜庢渶澶ц緭鍏ヤ釜鏁帮紝鍒欏脊鍑哄脊妗嗛�夋嫨
+ if (this.getData.length > 0) {
+ this.dataGetDia = true;
+ } else {
+ // 濡傛灉閮戒笉瀛樺湪锛屽垯锛岃繘鍏ュ鐞嗘暟閲囩嚎绋嬮噷鍘诲鐞嗘暟鎹�
+ try {
+ // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
+ this.getDataIndexLoading = false;
+ this.dataGetDia = false;
+ this.getDataTypeId = "";
+ this.worker0.postMessage(
+ JSON.stringify({
+ dataAcquisitionInfo: this.dataAcquisitionInfo,
+ list: this.tableList[0].arr,
+ })
+ );
+ } catch (error) {
+ console.log(1111, error);
+ }
+ }
+ // 鐩戝惉 Worker 杩斿洖鐨勭粨鏋�
+ this.worker0.onmessage = (event) => {
+ let result = JSON.parse(event.data);
+ if (result.method == "changeInput") {
+ // 閲囬泦鍚庣殑鏁版嵁锛岄渶瑕佽繘琛岃绠楃殑绾跨▼杩涜璁$畻
+ let { list, n } = result.value;
+ this.$set(this.tableList[0], "arr", list);
+ this.changeInput(
+ "",
+ `${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,
+ n
+ );
+ } else if (result.getDataTypeId) {
+ // 鑾峰彇鍒版暟閲囨渶鍚庝竴椤癸紝妫�楠岄」鐨処D
+ this.getDataTypeId = result.getDataTypeId;
+ }
+ };
+ this.dataAcquisitionLoading = false;
+ },
+ setData(item) {
+ if (item.child.length > 1) {
+ let arr1 = [];
+ // 澶氫釜妫�楠屽瓙椤圭殑璇濓紝绗竴涓楠屽瓙椤归�夌殑绗嚑涓笅闈㈢殑灏辫祴鍊肩鍑犱釜
+ for (let j = 0; j < item.child.length; j++) {
+ let arr = [];
+ if (j === 0) {
+ for (let k = 0; k < item.child[j].getDataIndex1.length; k++) {
+ let val1 = item.child[j].getDataIndex1[k];
+ const index = val1.indexOf("^");
+ if (index > -1) {
+ val1 = val1.substring(0, index);
+ arr.push(val1);
+ }
+ }
+ arr1 = arr;
+ } else {
+ this.$set(item.child[j], "getDataIndex1", []);
+ arr1.map((a) => {
+ const value1 = a + "^" + item.child[j].arr[Number(a)].result;
+ item.child[j].getDataIndex1.push(value1);
+ });
+ }
+ }
+ }
+ },
+ // 鎷夊姏鏈烘暟閲�
+ filterMethod(val) {
+ console.log("val---", val);
+ },
+ // 濡傛灉瀛樺湪鏁伴噰杩斿洖鐨勬暟缁勯暱搴﹀ぇ浜庢渶澶ц緭鍏ヤ釜鏁帮紝鍒欏脊鍑哄脊妗嗛�夋嫨锛岃繖閲屾槸寮规鐨勬彁浜�
+ submitDataGet() {
+ for (let i = 0; i < this.getData.length; i++) {
+ for (let j = 0; j < this.getData[i].child.length; j++) {
+ // 瀵圭敤鎴烽�夋嫨鐨勬暟閲囦俊鎭繘琛屽鐞嗭紝璧嬪��
+ let arr = [];
+ for (
+ let k = 0;
+ k < this.getData[i].child[j].getDataIndex1.length;
+ k++
+ ) {
+ if (this.getData[i].child[j].getDataIndex1[k].includes("^")) {
+ const index =
+ this.getData[i].child[j].getDataIndex1[k].indexOf("^");
+ if (index > -1) {
+ this.getData[i].child[j].getDataIndex1[k] = this.getData[
+ i
+ ].child[j].getDataIndex1[k].slice(
+ index + 1,
+ this.getData[i].child[j].getDataIndex1[k].length
+ );
+ }
+ }
+ arr.push(this.getData[i].child[j].getDataIndex1[k]);
+ }
+ if (this.getData[i].sortName) {
+ this.dataAcquisitionInfoNew[
+ this.getData[i].faName + "@" + this.getData[i].sortName
+ ][this.getData[i].child[j].name].result = arr;
+ } else {
+ this.dataAcquisitionInfoNew[this.getData[i].faName][
+ this.getData[i].child[j].name
+ ].result = arr;
+ }
+ }
+ }
+ this.getDataIndexLoading = true;
+ // 璧嬪�煎畬鎴愬悗闇�瑕佸啀娆¤繘鍏ュ鐞嗘暟閲囩嚎绋嬮噷鍘诲鐞嗘暟鎹�
+ this.handleDataAcquisition(this.dataAcquisitionInfoNew, "noDialog");
+ },
+ // 澶氱嚎绋�
+ startWorker() {
+ if (this.worker) {
+ this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝�
+ }
+ // 鍒涘缓 Worker 瀹炰緥
+ this.worker = new InspectionWorker();
+ if (this.worker0) {
+ this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝�
+ }
+ // 鍒涘缓 Worker 瀹炰緥
+ this.worker0 = new DataWorker();
+ },
+ // 鍋滄澶氱嚎绋�
+ stopWorker() {
+ if (this.worker) {
+ this.worker.terminate();
+ this.worker = null;
+ }
+ if (this.worker0) {
+ this.worker0.terminate();
+ this.worker0 = null;
+ }
+ },
+ // 淇濆瓨婀垮害銆佹俯搴︽暟鎹�
+ subOtherForm(m, type) {
+ write({
+ [type]: type === "remark" ? m : Number(m),
+ id: this.insOrder.id,
+ }).then((res) => {
+ this.$message.success("淇濆瓨鎴愬姛");
+ });
+ },
+ exportTable(tableId) {
+ // 鑾峰彇table鍏冪礌
+ var table = document.getElementById(tableId);
+
+ // 浣跨敤html2canvas搴撶敓鎴恈anvas
+ html2canvas(table).then(function (canvas) {
+ // 鍒涘缓涓�涓浘鐗囧厓绱�
+ var img = canvas.toDataURL("image/png");
+
+ // 鍒涘缓涓�涓猘鏍囩妯℃嫙鐐瑰嚮杩涜涓嬭浇
+ var a = document.createElement("a");
+ a.href = img;
+ a.download = "table.png";
+ a.click();
+ });
+ },
+ uploadSample() {
+ doInsOrder({
+ id: this.id,
+ laboratory: this.sonLaboratory,
+ }).then(async (res) => {
+ this.sampleProduct = res.data.sampleProduct;
+ });
+ },
+ // 鏍规嵁绫诲瀷銆佷换鍔d銆佸疄楠屽鏉ヨ幏鍙栨牱鍝佺殑妫�楠岄」淇℃伅
+ async getCurrentProduct(id, type, cableTag) {
+ if (cableTag === undefined) {
+ cableTag = "";
+ }
+ this.tableLoading = true;
+ type = this.typeSource == "1" ? 5 : type;
+ this.type = type;
+ let res = await getInsProduct({
+ id: id,
+ type: type,
+ laboratory: this.sonLaboratory,
+ cableTag: (cableTag ? cableTag : this.temCableTag),
+ rawMaterialTag: this.rawMaterialTag,
+ repetitionTag: this.repetitionTag
+ });
+ this.tableLoading = false;
+ if (res.data.length > 0) {
+ return res.data;
+ }
+ },
+ // 鍒囨崲鏍峰搧
+ async handleChangeSample(row, column, event) {
+ // 鍒濆鍖栨暟鎹�
+ this.param = {};
+ this.sampleVisible = false;
+ // 璧嬪�兼牱鍝�
+ this.currentSample = this.HaveJson(row);
+ let list = await this.getCurrentProduct(row.id, 0);
+ // 璧嬪�兼牱鍝佹楠岄」
+ this.currentSample.insProduct = this.HaveJson(list);
+ // 鍒濆鍖栧悗绔紶鍙�
+ this.param = {};
+ this.changeType = 0;
+ this.currentSample.insProduct.forEach((a, j) => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
+ });
+ // 澶勭悊椤甸潰鍒楄〃鏁版嵁
+ this.getTableLists();
+ this.currentKey = row.index;
+ this.currentTab = null;
+ // 鍚戝绾跨▼鍘讳繚瀛橀〉闈㈠垪琛ㄦ暟鎹�,鍚庣浼犲弬,褰撳墠妯℃澘淇℃伅
+ this.worker.postMessage(
+ JSON.stringify({
+ modelType: this.sampleProduct[0].model,
+ type: "saveData",
+ tableList: this.tableList,
+ param: this.param,
+ currentTable: this.currentTable,
+ })
+ );
+ },
+ async handleChangeCableTag(m, type, num, m2) {
+ let cableTag = "";
+ let repetitionTag = "";
+ if (num === "cableTag") {
+ cableTag = m2;
+ this.temCableTag = cableTag;
+ this.getRepetitionTag();
+ }
+ if (num === "repetitionTag") {
+ repetitionTag = m2;
+ this.repetitionTag = repetitionTag;
+ }
+ if (!m2) {
+ type = 0;
+ }
+ this.changeType = type;
+ if (m) {
+ let list = await this.getCurrentProduct(m, type, cableTag);
+ if (list && list.length > 0) {
+ this.param = {};
+ list.forEach((a) => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
+ });
+ this.getTableLists0(list);
+ this.worker.postMessage(
+ JSON.stringify({
+ type: "saveData",
+ tableList: this.tableList,
+ param: this.param,
+ currentTable: this.currentTable,
+ bushing: m,
+ })
+ );
+ } else {
+ this.tableLists = [];
+ this.tableList = [];
+ this.$message.error("妫�楠岄」涓虹┖");
+ }
+ }
+ },
+ // 鏀瑰彉浠诲姟
+ handleChangeTask(row) {
+ if (row) this.id = row.id;
+ this.taskVisible = false;
+ },
+ // 瀛楀吀鑾峰彇淇℃伅
+ getTypeDicts() {
+ this.getDicts("urgency_level").then((response) => {
+ this.urgentList = this.dictToValue(response.data);
+ });
+ },
+ // 瀛楀吀鑾峰彇淇℃伅
+ getInsStateDicts() {
+ this.getDicts("inspection_task_state").then((response) => {
+ this.typeList = this.dictToValue(response.data);
+ });
+ },
+ // 瀛楀吀鑾峰彇淇℃伅
+ getComparisonList() {
+ this.getDicts("coordinate_transformation").then((response) => {
+ this.comparisonList = this.dictToValue(response.data);
+ });
+ },
+ tableRowClassName({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ // 澶勭悊椤甸潰鍒楄〃鏁版嵁--鍘婚噸,鐢熸垚妫�楠屾ā鏉垮垏鎹㈠垪琛�
+ getTableLists() {
+ const mySet1 = new Set();
+ this.tableLists = this.currentSample.insProduct.filter((m) => {
+ let num0 = mySet1.size;
+ if (m.templateId != null && m.template != null) {
+ try {
+ mySet1.add(
+ JSON.stringify({
+ template: m.template,
+ templateId: m.templateId,
+ })
+ );
+ } catch (error) {
+ console.log(222, error);
+ }
+ }
+ let num1 = mySet1.size;
+ if (num1 > num0) {
+ return m;
+ }
+ });
+ if (this.tableLists && this.tableLists.length > 0) {
+ this.tableList = null;
+ this.tableList = [this.tableLists[0]];
+ this.currentTable = this.tableLists[0].templateId;
+ // 澶勭悊椤甸潰鍒楄〃鏁版嵁
+ this.handleTableData();
+ }
+ },
+ // 鍏夌氦閰嶇疆鐩稿叧妯℃澘table鍒楄〃
+ getTableLists0(list) {
+ const mySet1 = new Set();
+ this.tableLists = list.filter((m) => {
+ let num0 = mySet1.size;
+ if (m.templateId != null && m.template != null) {
+ try {
+ mySet1.add(
+ JSON.stringify({
+ template: m.template,
+ templateId: m.templateId,
+ })
+ );
+ } catch (error) {
+ console.log(333, error);
+ }
+ }
+ let num1 = mySet1.size;
+ if (num1 > num0) {
+ return m;
+ }
+ });
+ if (this.tableLists && this.tableLists.length > 0) {
+ this.tableList = null;
+ this.tableList = [this.tableLists[0]];
+ this.currentTable = this.tableLists[0].templateId;
+ this.currentSample.insProduct = this.HaveJson(list);
+ // 澶勭悊椤甸潰鍒楄〃鏁版嵁
+ this.handleTableData();
+ }
+ },
+ // 澶勭悊椤甸潰鍒楄〃鏁版嵁
+ handleTableData() {
+ this.excelMethodList = []; //excel鍑芥暟鍒楄〃
+ this.widthList = this.tableList[0].style.columnlen; //椤甸潰瀹藉害--鏍规嵁妯℃澘鏉ョ殑
+ // 鏈寰幆涓昏鍋氶〉闈㈡覆鏌撳眰闈㈢殑澶勭悊--鍗曞厓鏍煎悎骞堕澶勭悊
+ this.tableList.forEach((a) => {
+ let mcList = a.template.filter(
+ (b) =>
+ b.v.mc != undefined &&
+ b.v.mc.cs != undefined &&
+ b.v.mc.rs != undefined
+ );
+ let count = 0;
+ // 灏� a.template 杞崲涓� Map 浠ュ姞閫熸煡鎵�
+ let templateMap = new Map();
+ a.template.forEach((item) => {
+ templateMap.set(`${item.c}-${item.r}`, item);
+ });
+ mcList.forEach((b) => {
+ let cs = b.v.mc.cs;
+ let rs = b.v.mc.rs;
+ for (let i = 0; i < cs; i++) {
+ for (let i2 = 0; i2 < rs; i2++) {
+ let key = `${b.c + i}-${b.r + i2}`;
+ let item = templateMap.get(key);
+ if (item) {
+ let bb = this.HaveJson(b);
+ item.v.v = bb.v.v;
+ item.v.ps = bb.v.ps;
+ item.v.fc = bb.v.fc;
+ item.v.fs = bb.v.fs;
+ item.v.ht = bb.v.ht;
+ item.mc = count;
+ }
+ }
+ }
+ count++;
+ });
+ });
+ // 鏈寰幆涓昏鏄帶鍒跺悎骞�,浠ュ強鎺у埗妫�楠岄」淇℃伅鏄惁灞曠ず鍑烘潵,浠ヤ究鍚庣画妫�楠�
+ this.tableList.forEach((a) => {
+ let dels = new Set(); //闇�瑕佸垹闄ょ殑琛�
+ let ids = []; //鎵�鏈夋楠岄」鐨刬d
+ let set3 = new Set();
+ a.template.forEach((b) => {
+ let size1 = set3.size;
+ let size2 = set3.add(b.r).size;
+ if (size1 < size2) {
+ let str = "";
+ let str2 = "";
+ let unit2 = "";
+ let count4 = 0;
+ let isThree = 0;
+ a.template.forEach((c) => {
+ // 鑾峰彇鍒� 妫�楠岄」鍒嗙被+妫�楠岄」+妫�楠屽瓙椤圭殑鎷兼帴,濡傛灉妯℃澘閲岀殑淇℃伅璺熸帴鍙h繑鍥炵殑妫�楠岄」淇℃伅鑳藉鍖归厤鍒欏睍绀哄嚭鏉�
+ if (b.r === c.r) {
+ if (
+ c.v.ps != undefined &&
+ c.v.ps.value === "妫�楠岄」鍒嗙被" &&
+ count4 === 0
+ ) {
+ // 涓夌骇鍒嗙被
+ isThree = 1;
+ } else if (
+ c.v.ps != undefined &&
+ c.v.ps.value === "妫�楠岄」" &&
+ count4 === 0
+ ) {
+ // 浜岀骇鍒嗙被
+ isThree = 0;
+ }
+ if (isThree == 0) {
+ if (c.v.ps != undefined && c.v.ps.value === "妫�楠岄」") {
+ if (count4 === 0) {
+ if (c.v.v) {
+ c.v.v = c.v.v.replace(/\s*/g, "");
+ }
+ str += c.v.v;
+ count4 += 1;
+ }
+ } else if (
+ c.v.ps != undefined &&
+ c.v.ps.value === "妫�楠屽瓙椤�"
+ ) {
+ if (count4 === 1) {
+ if (c.v.v) {
+ c.v.v = c.v.v.replace(/\s*/g, "");
+ }
+ str += c.v.v;
+ count4 += 1;
+ }
+ }
+ } else if (isThree == 1) {
+ if (c.v.ps != undefined && c.v.ps.value === "妫�楠岄」鍒嗙被") {
+ if (count4 === 0) {
+ if (c.v.v) {
+ c.v.v = c.v.v.replace(/\s*/g, "");
+ }
+ str += c.v.v;
+ count4 += 1;
+ }
+ } else if (c.v.ps != undefined && c.v.ps.value === "妫�楠岄」") {
+ if (count4 === 1) {
+ if (c.v.v) {
+ c.v.v = c.v.v.replace(/\s*/g, "");
+ }
+ str += c.v.v;
+ count4 += 1;
+ }
+ } else if (
+ c.v.ps != undefined &&
+ c.v.ps.value === "妫�楠屽瓙椤�"
+ ) {
+ if (count4 === 2) {
+ if (c.v.v) {
+ c.v.v = c.v.v.replace(/\s*/g, "");
+ }
+ str += c.v.v;
+ count4 += 1;
+ }
+ }
+ }
+ if (str === "鏈烘鎬ц兘骞叉�佹媺浼稿己搴�(绾靛悜)") {
+ if (c.v.ps != undefined && c.v.ps.value === "鍗曚綅") {
+ if (c.v.v) {
+ c.v.v = c.v.v.replace(/\s*/g, "");
+ }
+ str2 = str + c.v.v;
+ unit2 = c.v.v;
+ }
+ }
+ }
+ });
+ if (str != "") {
+ let count2 = 0;
+ for (let i in this.currentSample.insProduct) {
+ let inspectionItemClass =
+ this.currentSample.insProduct[i].inspectionItemClass ==
+ null ||
+ this.currentSample.insProduct[i].inspectionItemClass ==
+ undefined
+ ? ""
+ : this.currentSample.insProduct[i].inspectionItemClass;
+ inspectionItemClass = inspectionItemClass.replace(/\s*/g, "");
+ let inspectionItem =
+ this.currentSample.insProduct[i].inspectionItem == null ||
+ this.currentSample.insProduct[i].inspectionItem == undefined
+ ? ""
+ : this.currentSample.insProduct[i].inspectionItem;
+ inspectionItem = inspectionItem.replace(/\s*/g, "");
+ let inspectionItemSubclass =
+ this.currentSample.insProduct[i].inspectionItemSubclass ==
+ null ||
+ this.currentSample.insProduct[i].inspectionItemSubclass ==
+ undefined
+ ? ""
+ : this.currentSample.insProduct[i].inspectionItemSubclass;
+ inspectionItemSubclass = inspectionItemSubclass.replace(
+ /\s*/g,
+ ""
+ );
+ if (inspectionItemSubclass === "骞叉�佹媺浼稿己搴�(绾靛悜)") {
+ // 妫�楠屽瓙椤逛负'骞叉�佹媺浼稿己搴�(绾靛悜)'鏃讹紝妯$増閲屾槸涓や釜璁$畻鍊煎搴旂浉鍚岀殑妫�楠屽�煎苟涓旇绠楁柟寮忎笉鍚岋紝瑕佹牴鎹浉鍚岀殑'鍗曚綅'鍋氱壒娈婄殑娓叉煋
+ const unit = this.currentSample.insProduct[i].unit;
+ if (
+ (this.currentSample.insProduct[i].templateId ===
+ a.templateId &&
+ inspectionItemClass +
+ inspectionItem +
+ inspectionItemSubclass +
+ unit ===
+ str2) ||
+ (this.currentSample.insProduct[i].templateId ===
+ a.templateId &&
+ !unit2.includes("/") &&
+ inspectionItemClass +
+ inspectionItem +
+ inspectionItemSubclass ===
+ str)
+ ) {
+ ids.push({
+ r: b.r,
+ id: this.currentSample.insProduct[i].id,
+ product: this.currentSample.insProduct[i],
+ });
+ break;
+ }
+ } else {
+ // 濡傛灉鐩哥瓑,閭d箞璇存槑鎵惧埌浜�,骞朵笖鎶奿d瀛樿捣鏉�,鍚庣画妫�楠岄」涔熶細鍦ㄩ〉闈腑鏄剧ず鍑烘潵
+ if (
+ this.currentSample.insProduct[i].templateId ===
+ a.templateId &&
+ inspectionItemClass +
+ inspectionItem +
+ inspectionItemSubclass ===
+ str
+ ) {
+ ids.push({
+ r: b.r,
+ id: this.currentSample.insProduct[i].id,
+ product: this.currentSample.insProduct[i],
+ });
+ break;
+ }
+ }
+ count2++;
+ }
+ if (count2 == this.currentSample.insProduct.length) {
+ dels.add(b.r);
+ }
+ }
+ }
+ });
+ // 鎿嶄綔鍒犻櫎
+ dels.forEach((del) => {
+ for (let b = 0; b < a.template.length; b++) {
+ if (a.template[b].r === del) {
+ a.template.splice(b, 1);
+ b -= 1;
+ }
+ }
+ });
+ // 鎿嶄綔璧嬪��--涓昏璧嬪�煎崟浣�,璇曢獙鏂规硶绛変俊鎭�
+ ids.forEach((id) => {
+ for (let b = 0; b < a.template.length; b++) {
+ if (a.template[b].r === id.r) {
+ a.template[b].i = id.id;
+ if (
+ a.template[b].v.ps != undefined &&
+ a.template[b].v.ps.value === "鍗曚綅"
+ ) {
+ a.template[b].v.v = id.product.unit;
+ }
+ if (
+ a.template[b].v.ps != undefined &&
+ (a.template[b].v.ps.value === "璇曢獙鏂规硶" ||
+ a.template[b].v.ps.value === "妫�娴嬫柟娉�")
+ ) {
+ a.template[b].v.v = id.product.methodS;
+ }
+ }
+ }
+ });
+ let set2 = new Set();
+ // 鍚堝苟鐨勬暟鎹鐞�,cs rs 浠h〃鍚堝苟鐨勬暟閲�
+ a.template.forEach((b) => {
+ let size1 = set2.size;
+ let size2 = set2.add(b.mc).size;
+ if (b.mc != undefined && size1 < size2) {
+ b.v.mc.rs = 0;
+ b.v.mc.cs = 0;
+ a.template.forEach((c) => {
+ if (b.mc === c.mc) {
+ if (b.r === c.r) {
+ b.v.mc.cs += 1;
+ }
+ if (b.c === c.c) {
+ b.v.mc.rs += 1;
+ }
+ }
+ });
+ }
+ });
+ });
+ // 鏈寰幆涓昏鏄鍚庣浼犲弬杩涜鍒濆鍖�,鏍峰紡閫昏緫淇敼
+ this.tableList.forEach((a) => {
+ let arrs = [];
+ let set = new Set();
+ let count1 = 0;
+ let conclusionList = []; //缁撹鍒楄〃
+ let finalList = []; //鏈�缁堝�煎垪琛�
+ // 缁撹涓庢渶缁堝�煎湪杩欓噷涓�涓�瀵瑰簲,浠ヤ笅涓や釜鍒楄〃闀垮害鑲畾鏄竴鏍风殑,濡傛灉鏈変笉涓�鏍�,閭d箞澶氬崐鏄ā鏉块厤缃緱闂
+ conclusionList = a.template.filter(
+ (n) => n.v.ps != undefined && n.v.ps.value === "缁撹"
+ ); //缁撹鍒楄〃
+ finalList = a.template.filter(
+ (n) => n.v.ps != undefined && n.v.ps.value === "鏈�缁堝��"
+ ); //鏈�缁堝�煎垪琛�
+ a.template.forEach((b) => {
+ if (
+ b.v.ps != undefined &&
+ b.v.ps.value === "搴忓彿" &&
+ (b.v.mc == undefined || Object.keys(b.v.mc).length === 4)
+ ) {
+ // 瀵瑰簭鍙疯繘琛岃祴鍊�
+ count1++;
+ b.v.v = count1;
+ }
+ if (b.v.ps != undefined && b.v.ps.value === "瑕佹眰鍊�") {
+ // 瀵硅姹傚�艰繘琛岃祴鍊�
+ b.v.v = this.getAsk(b.i);
+ }
+ // 瀵归〉闈㈢殑鍜岀粰鍚庣浼犲弬鐨勬楠屽��,璁$畻鍊�,璁惧缂栫爜,璁惧鍚嶇О,鏈�缁堝��,缁撹杩涜鍒濆鍖�
+ if (
+ b.v.ps != undefined &&
+ typeof b.v.ps.value === "string" &&
+ b.v.ps.value.includes("妫�楠屽��")
+ ) {
+ this.$set(b.v, "v", "");
+ // b.v.v = ''
+ b.u = "";
+ b.i && this.param[b.i] && this.param[b.i].insValue.push(b);
+ }
+ if (b.v.ps != undefined && b.v.ps.value === "璁$畻鍊�") {
+ this.$set(b.v, "v", "");
+ // b.v.v = ''
+ b.i && this.param[b.i] && this.param[b.i].comValue.push(b);
+ }
+ if (b.v.ps != undefined && b.v.ps.value === "璁惧缂栫爜") {
+ // b.v.v = ''
+ this.$set(b.v, "v", "");
+ b.i && this.param[b.i] && this.param[b.i].equipValue.push(b);
+ }
+ if (b.v.ps != undefined && b.v.ps.value === "璁惧鍚嶇О") {
+ this.$set(b.v, "v", "");
+ // b.v.v = ''
+ b.i && this.param[b.i] && this.param[b.i].equipName.push(b);
+ }
+ if (b.v.ps != undefined && b.v.ps.value === "鏈�缁堝��") {
+ // b.v.v = ''
+ this.$set(b.v, "v", "");
+ if (
+ b.i !== undefined &&
+ this.param[b.i] &&
+ !this.param[b.i].resValue
+ ) {
+ this.param[b.i].resValue = b;
+ }
+ }
+ if (b.v.ps != undefined && b.v.ps.value === "缁撹") {
+ if (
+ b.i !== undefined &&
+ this.param[b.i] &&
+ !this.param[b.i].insResult
+ ) {
+ this.param[b.i].insResult = b;
+ conclusionList.forEach((n, i) => {
+ if (n.r == b.r && n.c == b.c) {
+ b.v.f = `(${this.comparisonList.find((j) => j.value == finalList[i].c)
+ .label
+ }${finalList[i].r + 1})`;
+ }
+ });
+ }
+ }
+ set.add(b.r);
+ // 濡傛灉妯℃澘鍒楄〃鐨勫嚱鏁板瓨鍦�,閭d箞鍔犲叆鍒癳xcel鍑芥暟鍒楄〃閲岄潰
+ if (b.v.f) {
+ this.excelMethodList.push(b);
+ }
+ });
+ // 浠ヤ笅鏄牱寮忓鐞嗛�昏緫
+ set = [...set]
+ // set = set.sort();
+ set.forEach((b) => {
+ let arr = [];
+ a.template.forEach((c) => {
+ if (c.r === b) {
+ arr.push(c);
+ }
+ });
+ arrs.push(arr);
+ });
+ a.arr = arrs;
+ this.tableWidth = 0;
+ for (let i = 0; i < arrs[0].length; i++) {
+ this.tableWidth +=
+ a.style.columnlen[i] === undefined ? 100 : a.style.columnlen[i];
+ }
+ });
+ // 鏈寰幆涓昏鏄椤甸潰鍙婂悗绔紶鍙傝繘琛屽垵濮嬪寲璧嬪��
+ this.currentSample.insProduct.forEach(async (a) => {
+ try {
+ // 璁$畻鍊艰祴鍊�
+ let comValue = JSON.parse(a.insProductResult.comValue);
+ for (var i = 0; i < comValue.length; i++) {
+ if (
+ this.param[a.id].comValue.find(
+ (m) => m.c == comValue[i].c && m.r == comValue[i].r
+ )
+ ) {
+ this.param[a.id].comValue.find(
+ (m) => m.c == comValue[i].c && m.r == comValue[i].r
+ ).v.v = this.toFixed(
+ comValue[i].v,
+ this.param[a.id].comValue.find(
+ (m) => m.c == comValue[i].c && m.r == comValue[i].r
+ ).v.ct
+ );
+ } else if (!comValue[i].c || !comValue[i].r) {
+ this.param[a.id].comValue[i].v.v = this.toFixed(
+ comValue[i].v,
+ this.param[a.id].comValue[i].v.ct
+ );
+ }
+ }
+ } catch (e) { }
+ try {
+ // 妫�楠屽�艰祴鍊�
+ let insValue = JSON.parse(a.insProductResult.insValue);
+ for (let i = 0; i < insValue.length; i++) {
+ if (
+ this.param[a.id].insValue.find(
+ (m) => m.c == insValue[i].c && m.r == insValue[i].r
+ )
+ ) {
+ this.param[a.id].insValue.find(
+ (m) => m.c == insValue[i].c && m.r == insValue[i].r
+ ).v.v = this.toFixed(
+ insValue[i].v,
+ this.param[a.id].insValue.find(
+ (m) => m.c == insValue[i].c && m.r == insValue[i].r
+ ).v.ct
+ );
+ this.param[a.id].insValue.find(
+ (m) => m.c == insValue[i].c && m.r == insValue[i].r
+ ).u = insValue[i].u;
+ // this.param[a.id].insValue[i].v.v = insValue[i].v
+ // this.param[a.id].insValue[i].u = insValue[i].u
+ }
+ }
+ } catch (e) { }
+ try {
+ // 璁惧缂栧彿璧嬪��
+ let equipValue = JSON.parse(a.insProductResult.equipValue);
+ for (let i = 0; i < equipValue.length; i++) {
+ // 鏅�氳澶囪祴鍊�
+ this.param[a.id].equipValue[i].v.v = equipValue[i].v;
+ }
+ } catch (e) { }
+ try {
+ // 璁惧鍚嶇О璧嬪��
+ let equipName = JSON.parse(a.insProductResult.equipName);
+ for (let i = 0; i < equipName.length; i++) {
+ equipName[i].v !== "" &&
+ equipName[i].v.map((val) => {
+ const index = this.equipOptions.findIndex(
+ (item) => item.value === val
+ );
+ if (index > -1) {
+ // 鏍规嵁璁惧缂栫爜杞崲涓虹浉搴旂殑璁惧鍚嶇О
+ val = this.equipOptions[index].deviceName;
+ }
+ });
+ }
+ for (let i = 0; i < equipName.length; i++) {
+ // 鏅�氳澶囧悕绉拌祴鍊�
+ this.param[a.id].equipName[i].v.v = equipName[i].v;
+ }
+ } catch (e) {
+ console.log("璁惧鍚嶇О璧嬪��----", e);
+ }
+ try {
+ // 鏈�缁堝�艰祴鍊�
+ this.param[a.id].resValue.v.v = this.toFixed(
+ a.lastValue,
+ this.param[a.id].resValue.v.ct
+ );
+ // 缁撹璧嬪��
+ this.param[a.id].insResult.v.v = a.insResult;
+ } catch (e) { }
+ });
+ // 瀵筫xcel鍑芥暟杩涜澶勭悊
+ this.handleExcelMethod();
+ },
+ // 妫�楠屽�艰緭鍏ュ悗瑙﹀彂鐨勫嚱鏁�
+ changeInput(m, code, n, getDataType, changeSelect) {
+ // 涓烘暟閲囧畾涔変竴涓�昏緫鍙傛暟
+ if (getDataType == "getDataType") {
+ this.getDataType = 2;
+ }
+ let currentInsItemId = null; //褰撳墠妫�楠岄」id
+ if (n) {
+ currentInsItemId = JSON.parse(JSON.stringify(n.i));
+ // 瀹氫箟涓�涓嚱鏁版潵楠岃瘉鍒嗘暟鏄惁鏈夋晥
+ if (typeof n.v.v == "string") {
+ function isValidFraction(fraction) {
+ const [numerator, denominator] = fraction.split("/"); // 鍒嗗瓙鍜屽垎姣�
+ return !(!denominator || !numerator);
+ }
+ const isTrue = isValidFraction(n.v.v);
+ if (!isTrue) {
+ n.v.v = n.v.v.replace("/", "");
+ }
+ }
+ }
+ try {
+ // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
+ this.worker.postMessage(
+ JSON.stringify({
+ code: code,
+ tableList: this.tableList,
+ excelMethodList: this.excelMethodList,
+ comparisonList: this.comparisonList,
+ currentSample: this.currentSample,
+ PROJECT: this.PROJECT,
+ param: this.param,
+ currentTable: this.currentTable,
+ getDataTypeId: this.getDataTypeId,
+ modelType: this.sampleProduct[0].model,
+ currentInsItem: n,
+ })
+ );
+ } catch (error) {
+ console.log(444, error);
+ }
+
+ // 鐩戝惉 Worker 杩斿洖鐨勭粨鏋�
+ this.worker.onmessage = (event) => {
+ this.result = JSON.parse(event.data);
+ switch (this.result.method) {
+ case "saveInsContext":
+ this.$nextTick(() => {
+ // this.$delete(this.tableList[0],'arr')
+ this.$set(
+ this.tableList[0],
+ "arr",
+ this.result.value.tableList[0].arr
+ );
+ this.param = this.result.value.param;
+ if (this.result.value.currentInsItemId) {
+ currentInsItemId = this.result.value.currentInsItemId;
+ }
+ // 鐗规畩澶勭悊涓�涓嬬粨璁�,浼氭湁杩欑鐗规畩鎯呭喌
+ for (var i in this.param) {
+ if (
+ this.param[i].insResult &&
+ this.param[i].insResult.v &&
+ this.param[i].insResult.v.v
+ ) {
+ if (this.param[i].insResult.v.v == "鍚堟牸") {
+ this.$set(this.param[i].insResult.v, "v", 1);
+ } else if (this.param[i].insResult.v.v == "涓嶅悎鏍�") {
+ this.$set(this.param[i].insResult.v, "v", 0);
+ }
+ }
+ }
+ this.saveInsContext(currentInsItemId);
+ });
+ break;
+ case "tableList":
+ this.$nextTick(() => {
+ // 鏇存柊鏁版嵁
+ this.$delete(this.tableList[0], "arr");
+ this.$set(this.tableList[0], "arr", this.result.value[0].arr);
+ // this.param = this.result.value.param
+ if (this.result.value.currentInsItem) {
+ currentInsItemId = this.result.value.currentInsItem.i;
+ }
+ });
+ break;
+ case "getCurrentInsProduct":
+ // 鏇存柊椤甸潰鏁版嵁
+ this.getCurrentInsProduct(this.result.value);
+ break;
+ }
+ };
+ // 淇濆瓨鏁版嵁
+ setTimeout(() => {
+ if (changeSelect) {
+ this.saveInsContext(currentInsItemId);
+ }
+ }, 200);
+ },
+ // 鏍规嵁鍚庣浼犲弬鏇存柊椤甸潰鏁版嵁 param => this.tableList[0].insProductResult
+ getCurrentInsProduct(pId) {
+ if (!this.tableList[0].insProductResult) {
+ this.tableList[0].insProductResult = {};
+ }
+ for (let m in this.param[pId]) {
+ let value = this.param[pId][m];
+ switch (m) {
+ case "comValue":
+ // 璧嬪�艰绠楀��
+ if (value && value.length > 0) {
+ this.tableList[0].insProductResult[m] = [];
+ value.forEach((a, i) => {
+ let obj = {
+ v: a.v.v,
+ };
+ this.tableList[0].insProductResult[m].push(obj);
+ });
+ try {
+ this.tableList[0].insProductResult[m] = JSON.stringify(
+ this.tableList[0].insProductResult[m]
+ );
+ } catch (error) {
+ console.log(555, error);
+ }
+ }
+ break;
+ // 璧嬪�兼楠屽��
+ case "insValue":
+ if (value && value.length > 0) {
+ this.tableList[0].insProductResult[m] = [];
+ value.forEach((a, i) => {
+ let obj = {
+ v: a.v.v,
+ u: a.u,
+ };
+ this.tableList[0].insProductResult[m].push(obj);
+ });
+ try {
+ this.tableList[0].insProductResult[m] = JSON.stringify(
+ this.tableList[0].insProductResult[m]
+ );
+ } catch (error) {
+ console.log(666, error);
+ }
+ }
+ break;
+ // 璧嬪�艰澶囩紪鍙�
+ case "equipValue":
+ if (value && value.length > 0) {
+ this.tableList[0].insProductResult[m] = [];
+ value.forEach((a, i) => {
+ let obj = {
+ v: a.v.v,
+ };
+ this.tableList[0].insProductResult[m].push(obj);
+ });
+ try {
+ this.tableList[0].insProductResult[m] = JSON.stringify(
+ this.tableList[0].insProductResult[m]
+ );
+ } catch (error) {
+ console.log(777, error);
+ }
+ }
+ break;
+ // 璧嬪�艰澶囧悕绉�
+ case "equipName":
+ if (value && value.length > 0) {
+ this.tableList[0].insProductResult[m] = [];
+ value.forEach((a, i) => {
+ let obj = {
+ v: a.v.v,
+ };
+ this.tableList[0].insProductResult[m].push(obj);
+ });
+ try {
+ this.tableList[0].insProductResult[m] = JSON.stringify(
+ this.tableList[0].insProductResult[m]
+ );
+ } catch (error) {
+ console.log(888, error);
+ }
+ }
+ break;
+ // 璧嬪�兼渶缁堝��
+ case "resValue":
+ this.tableList[0].lastValue = value ? value.v.v : "";
+ break;
+ // 璧嬪�肩粨璁�
+ case "insResult":
+ this.tableList[0].insResult = value ? value.v.v : "";
+ break;
+ }
+ }
+ },
+ // 瀵笶XCEL鍑芥暟杩涜澶勭悊
+ handleExcelMethod() {
+ if (this.excelMethodList.length > 0) {
+ this.excelMethodList.map((item) => {
+ // 寰楀埌姣忎釜鍑芥暟鐨勫弬鏁板垪琛�
+ item.valueList = excelFunction.changeParameter(item.v.f);
+ return item;
+ });
+ }
+ },
+ getValue(v) {
+ // 瀵归〉闈㈠睍绀烘暟鎹繘琛屽鐞�,@,浠h〃鎹㈣
+ let str = v.v
+ ? v.v
+ : v.v === 0
+ ? v.v
+ : v.ct && v.ct.s
+ ? v.ct.s.length > 0 &&
+ v.ct.s[0].v
+ .replace(new RegExp("\n", "g"), "<br/>")
+ .replace(new RegExp("@", "g"), "<br/>")
+ : "";
+ // 瀵规暟鎹繚鐣欏皬鏁扮偣杩涜澶勭悊
+ if (v.ct && v.ct.fa && v.ct.fa.includes(".") && str) {
+ let num = 0;
+ let str0 = v.ct.fa.split(".")[1];
+ num = str0.length;
+ str = Number(str).toFixed(num);
+ }
+ if (v.v && typeof v.v == "string" && v.v.includes("@")) {
+ str = v.v.replace(new RegExp("@", "g"), "<br/>");
+ }
+ return str;
+ },
+ // 鑾峰彇褰撳墠杈撳叆妗嗙被鍨�
+ getInspectionValueType(id) {
+ for (var a in this.currentSample.insProduct) {
+ if (this.currentSample.insProduct[a].id == id) {
+ return this.currentSample.insProduct[a].inspectionValueType;
+ }
+ }
+ },
+ // 鑾峰彇瑕佹眰鎻忚堪
+ getTell(id) {
+ for (var a in this.currentSample.insProduct) {
+ if (this.currentSample.insProduct[a].id == id) {
+ return this.currentSample.insProduct[a].tell;
+ }
+ }
+ },
+ // 鍔ㄦ�佽幏鍙栧崟鍏冩牸瀹藉害
+ handleWidth(n) {
+ let sum = 0;
+ if (n.v.mc && n.v.mc.cs && n.v.mc.c != undefined) {
+ for (let i = 0; i < n.v.mc.cs; i++) {
+ let num = this.widthList[i + n.v.mc.c]
+ ? this.widthList[i + n.v.mc.c]
+ : 100;
+ sum += num;
+ }
+ } else {
+ sum = this.widthList[n.c] ? this.widthList[n.c] : 100;
+ }
+ return sum;
+ },
+ // 瀵硅緭鍏ュ�艰繘琛屾牸寮忔牎楠�
+ handleInput(n) {
+ try {
+ n.v.v = n.v.v.replace(/[^\d.^e>锛炩墺鈮�<锛滄柇瑁傝剢鍖朶-/+]/g, "");
+ n.v.v = n.v.v.replace(/\.{2,}/g, "."); //鍙繚鐣欑涓�涓�. 娓呴櫎澶氫綑鐨�
+ n.v.v = n.v.v
+ .replace(".", "$#$")
+ .replace(/\./g, "")
+ .replace("$#$", ".");
+ n.v.v = n.v.v.replace(/\/{2,}/g, "/"); //鍙繚鐣欑涓�涓�/娓呴櫎澶氫綑鐨�
+ n.v.v = n.v.v
+ .replace("/", "$#$")
+ .replace(/\//g, "")
+ .replace("$#$", "/");
+ } catch (error) {
+ console.log(error);
+ }
+ },
+ getInspectionItemType(id) {
+ for (var a in this.currentSample.insProduct) {
+ if (this.currentSample.insProduct[a].id == id) {
+ return this.currentSample.insProduct[a].inspectionItemType;
+ }
+ }
+ },
+ // 鑾峰彇瑕佹眰鍊�
+ getAsk(id) {
+ for (var a in this.currentSample.insProduct) {
+ if (this.currentSample.insProduct[a].id == id) {
+ return this.currentSample.insProduct[a].ask;
+ }
+ }
+ },
+ // 鑾峰彇鎵�鏈夎澶�
+ getEquipOptions(e, id) {
+ if (e) {
+ this.equipOptions = [];
+ search({ status: 0 }).then((res) => {
+ if (res.code === 200 && res.data) {
+ this.equipOptions = res.data.map((m) => {
+ m.value = m.managementNumber;
+ m.label = m.deviceName;
+ return m;
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ }
+ },
+ // getDic(e, id) {
+ // if (e) {
+ // for (var a in this.currentSample.insProduct) {
+ // if (this.currentSample.insProduct[a].id == id) {
+ // let str = this.currentSample.insProduct[a].dic;
+ // this.selectEnumByCategoryOfSelect(str);
+ // return str;
+ // }
+ // }
+ // }
+ // },
+ openAddCheck() {
+ this.addCheck = true;
+ },
+ // 澶嶆牳
+ upInsReview(e) {
+ if (e == 1) {
+ // 閫氳繃
+ this.reviewLoading = true;
+ verifyPlan({
+ orderId: this.orderId,
+ type: 1,
+ laboratory: this.sonLaboratory,
+ tell: null,
+ userId: this.checkUser,
+ }).then((res) => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.goback();
+ this.addCheck = false;
+ }
+ this.reviewLoading = false;
+ })
+ .catch((error) => {
+ console.error(error);
+ this.reviewLoading = false;
+ });
+ } else {
+ // 涓嶉�氳繃
+ this.reviewDia = true;
+ }
+ },
+ handleReviewDia() {
+ if (this.noReason) {
+ this.reviewLoading = true;
+ verifyPlan({
+ orderId: this.orderId,
+ type: 0,
+ laboratory: this.sonLaboratory,
+ tell: this.noReason,
+ }).then((res) => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.goback();
+ }
+ this.reviewLoading = false;
+ })
+ .catch((error) => {
+ console.error(error);
+ this.reviewLoading = false;
+ });
+ } else {
+ this.$message.error("鏈緭鍏ヤ笉閫氳繃鍘熷洜");
+ }
+ },
+ // 鏌ョ湅宸ユ椂
+ viewManHour() {
+ this.$refs.viewManHourDia.showDialog(this.id, 99);
+ },
+ openAddVerifyDia() {
+ this.addVerifyDia = true;
+ },
+ submit() {
+ if (this.verifyUser === null || this.verifyUser === "") {
+ this.$message.error("璇锋寚瀹氬鏍镐汉鍛�");
+ return;
+ }
+ if (!this.otherForm.humidity) {
+ this.$message.error("璇疯緭鍏ユ箍搴�");
+ return;
+ }
+ if (!this.otherForm.temperature) {
+ this.$message.error("璇疯緭鍏ユ俯搴�");
+ return;
+ }
+ this.submitLoading = true;
+ checkSubmitPlan({
+ orderId: this.orderId,
+ laboratory: this.sonLaboratory,
+ }).then((res) => {
+ if (res.code === 200) {
+ if (!res.data || res.data.length == 0) {
+ this.submitLoading = true;
+ submitPlan({
+ orderId: this.orderId,
+ laboratory: this.sonLaboratory,
+ verifyUser: this.verifyUser,
+ entrustCode: this.insOrder.entrustCode,
+ }).then((res) => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.goback();
+ this.submitLoading = false;
+ this.addVerifyDia = false;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ this.submitLoading = false;
+ });
+ } else {
+ let newData = [];
+ const h = this.$createElement;
+ for (let i in res.data) {
+ const lastChar = res.data[i].slice(-1);
+ if (lastChar == "-") {
+ res.data[i] = res.data[i].slice(0, -1);
+ }
+ newData.push(
+ h(
+ "p",
+ { style: "font-size: 14px;color: red;" },
+ Number(i) + 1 + "銆�" + res.data[i]
+ )
+ );
+ }
+ newData.push(
+ h(
+ "p",
+ {
+ style:
+ "font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh",
+ },
+ "浠ヤ笂椤圭洰涓嶅悎鏍硷紝纭畾鎻愪氦锛�"
+ )
+ );
+ this.$confirm("鎻愮ず", {
+ title: "鎻愮ず",
+ message: h("div", null, newData),
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "",
+ })
+ .then(() => {
+ this.submitLoading = true;
+ submitPlan({
+ orderId: this.orderId,
+ laboratory: this.sonLaboratory,
+ verifyUser: this.verifyUser,
+ }).then((res) => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.addVerifyDia = false;
+ this.goback();
+ }
+ this.submitLoading = false;
+ })
+ .catch((error) => {
+ console.error(error);
+ this.submitLoading = false;
+ });
+ })
+ .catch(() => { });
+ }
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ this.submitLoading = false;
+ });
+ return;
+ },
+ // 缁熶竴鍦ㄨ繖閲屼繚瀛樻暟鎹�
+ saveInsContext(currentInsItemId) {
+ try {
+ if (this.param) {
+ let param = null;
+ if (currentInsItemId) {
+ param = { [currentInsItemId]: this.param[currentInsItemId] };
+ } else {
+ param = this.param;
+ }
+ saveInsContext({
+ param: JSON.stringify(param),
+ currentTable: this.currentTable,
+ sampleId: this.currentSample.id,
+ orderId: this.orderId,
+ sonLaboratory: this.sonLaboratory
+ }).then((res) => {
+ this.$message.success("宸蹭繚瀛�");
+ });
+ // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
+ this.worker.postMessage(
+ JSON.stringify({
+ modelType: this.sampleProduct[0].model,
+ type: "saveData",
+ tableList: this.tableList,
+ param: this.param,
+ currentTable: this.currentTable,
+ })
+ );
+ }
+ } catch (error) {
+ console.log(999, error);
+ }
+ },
+ // 璁惧鏀瑰彉
+ changeEquip(val, n, v) {
+ try {
+ // this.$set(n.v,'v',val)
+ this.tableList[0].arr.forEach((item, index) => {
+ item.forEach((m, i) => {
+ if (this.param[m.i]) {
+ this.param[m.i].state = 1;
+ }
+ // if(m.i==n.i&&m.v.ps&&m.v.ps.value=='璁惧鍚嶇О'&&v){
+ // this.$set(m.v,'v',v)
+ // }
+ });
+ });
+ for (let i in this.param) {
+ if (this.param[i].state != 1) {
+ delete this.param[i];
+ }
+ }
+ // this.equipOptions涓鸿澶囧悕绉颁笅鎷夋閫夐」鏁版嵁
+ for (let i1 in this.param[n.i].equipName) {
+ if (
+ this.param[n.i].equipName[i1].i === n.i &&
+ this.param[n.i].equipName[i1].r === n.r
+ ) {
+ this.$delete(this.param[n.i].equipValue[i1].v, "v");
+ // 灏嗘暟缁勮祴鍊肩粰璁惧缂栫爜
+ this.$set(this.param[n.i].equipValue[i1].v, "v", val.join("锛�"));
+ this.$delete(this.param[n.i].equipName[i1].v, "v");
+ // 灏嗘暟缁勮祴鍊肩粰璁惧缂栫爜
+ this.$set(this.param[n.i].equipName[i1].v, "v", val);
+ this.tableList[0].arr.forEach((item, index) => {
+ item.forEach((m) => {
+ if (m.i == n.i && m.v.ps && m.v.ps.value == "璁惧缂栫爜") {
+ this.$set(m.v, "v", val.join("锛�"));
+ }
+ if (m.i == n.i && m.v.ps && m.v.ps.value == "璁惧鍚嶇О") {
+ this.$set(m.v, "v", val);
+ }
+ });
+ });
+ }
+ }
+ // 淇濆瓨鏁版嵁
+ this.saveInsContext(n.i);
+ } catch (e) {
+ console.log("changeEquip----", e);
+ }
+ },
+ getAuthorizedPerson() {
+ selectUserCondition({ type: 1 }).then((res) => {
+ let data = [];
+ res.data.forEach((a) => {
+ data.push({
+ label: a.name,
+ value: a.id,
+ });
+ });
+ this.personList = data;
+ });
+ },
+ scrollInit() {
+ // 鑾峰彇瑕佺粦瀹氫簨浠剁殑鍏冪礌
+ const nav = document.getElementById("nav");
+ var flag; // 榧犳爣鎸変笅
+ var downX; // 榧犳爣鐐瑰嚮鐨剎涓嬫爣
+ var scrollLeft; // 褰撳墠鍏冪礌婊氬姩鏉$殑鍋忕Щ閲�
+ nav.addEventListener("mousedown", function (event) {
+ flag = true;
+ downX = event.clientX; // 鑾峰彇鍒扮偣鍑荤殑x涓嬫爣
+ scrollLeft = this.scrollLeft; // 鑾峰彇褰撳墠鍏冪礌婊氬姩鏉$殑鍋忕Щ閲�
+ });
+ nav.addEventListener("mousemove", function (event) {
+ if (flag) {
+ // 鍒ゆ柇鏄惁鏄紶鏍囨寜涓嬫粴鍔ㄥ厓绱犲尯鍩�
+ var moveX = event.clientX; // 鑾峰彇绉诲姩鐨剎杞�
+ var scrollX = moveX - downX; // 褰撳墠绉诲姩鐨剎杞翠笅鏍囧噺鍘诲垰鐐瑰嚮涓嬪幓鐨剎杞翠笅鏍囧緱鍒伴紶鏍囨粦鍔ㄨ窛绂�
+ this.scrollLeft = scrollLeft - scrollX; // 榧犳爣鎸変笅鐨勬粴鍔ㄦ潯鍋忕Щ閲忓噺鍘诲綋鍓嶉紶鏍囩殑婊戝姩璺濈
+ }
+ });
+ // 榧犳爣鎶捣鍋滄鎷栧姩
+ nav.addEventListener("mouseup", function () {
+ flag = false;
+ });
+ // 榧犳爣绂诲紑鍏冪礌鍋滄鎷栧姩
+ nav.addEventListener("mouseleave", function (event) {
+ flag = false;
+ });
+ },
+ // 椤甸潰閲岄潰鍒囨崲鏍峰搧
+ async caretSample(num) {
+ let index = this.currentKey + num;
+ if (index < 1) {
+ this.$message.error("褰撳墠鏄涓�涓牱鍝�");
+ return;
+ } else if (index > this.sampleProduct.length) {
+ this.$message.error("褰撳墠鏄渶鍚庝竴涓牱鍝�");
+ return;
+ }
+ this.currentKey = index;
+ this.currentSample = this.HaveJson(this.sampleProduct[index - 1]);
+ // 鑾峰彇妫�楠岄」
+ let list = await this.getCurrentProduct(this.currentSample.id, 0);
+ this.currentSample.insProduct = this.HaveJson(list);
+ // 鍒濆鍖栧悗绔紶鍙�
+ this.param = {};
+ this.changeType = 0;
+ this.currentSample.insProduct.forEach((a, j) => {
+ this.param[a.id] = {
+ insValue: [],
+ comValue: [],
+ resValue: null,
+ equipValue: [],
+ equipName: [],
+ insResult: null,
+ };
+ });
+ // 椤甸潰鏁版嵁澶勭悊
+ this.getTableLists();
+ // 鏇存柊鍒板绾跨▼
+ this.worker.postMessage(
+ JSON.stringify({
+ modelType: this.sampleProduct[0].model,
+ type: "saveData",
+ tableList: this.tableList,
+ param: this.param,
+ currentTable: this.currentTable,
+ })
+ );
+ },
+ handleSuccessUp(response) {
+ this.upLoading = false;
+ if (response.code == 200) {
+ this.$message.success("涓婁紶鎴愬姛");
+ this.getList();
+ }
+ },
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error("涓婁紶鏂囦欢涓嶈秴杩�10M");
+ this.$refs.upload.clearFiles();
+ return false;
+ } else {
+ this.upLoading = true;
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error("涓婁紶澶辫触");
+ this.$refs.upload.clearFiles();
+ },
+ handleDown(row) {
+ downFile({ id: row.id }).then((res) => {
+ this.$download.saveAs(res.data.fileUrl, row.fileName)
+ })
+ .catch((error) => { });
+ },
+ /**
+ * 灏嗘暟鍊紇淇濈暀ct.fa涓�'##'鍚庣殑鎸囧畾灏忔暟浣嶆暟锛屽苟杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆�
+ *
+ * @param v 瑕佹牸寮忓寲鐨勬暟鍊�
+ * @param ct 鍖呭惈鏍煎紡鍖栭厤缃殑瀵硅薄
+ * @param ct.fa 鏍煎紡鍖栭厤缃瓧绗︿覆锛岃嫢鍖呭惈'##'鍒欐寜鐓у叾鍚庣殑鍐呭纭畾灏忔暟浣嶆暟
+ * @returns 鏍煎紡鍖栧悗鐨勫瓧绗︿覆鎴栧師濮嬫暟鍊硷紙鑻ラ厤缃笉绗﹀悎瑕佹眰锛�
+ */
+ toFixed(v, ct) {
+ if (v && ct && ct.fa) {
+ if (ct.fa.includes(".")) {
+ let num = ct.fa.slice(4).length;
+ return Number(v).toFixed(num);
+ } else {
+ return v;
+ }
+ } else {
+ return v;
+ }
+ },
+ goback() {
+ this.$router.go(-1)
+ }
+ },
+};
+</script>
+<style scoped>
+.custom-table .el-table__header-wrapper th {
+ background-color: #87ceeb;
+ /* 鍙甯︽湁my-custom-table绫荤殑琛ㄦ牸鐢熸晥 */
+ color: #fff;
+}
+
+.container {
+ overflow: auto;
+ /* 纭繚瀹瑰櫒鑳藉寘瑁规诞鍔ㄥ厓绱� */
+ margin-bottom: 10px;
+}
+
+.right-button {
+ float: right;
+}
+
+.inspection {
+ height: 100%;
+ overflow-y: auto;
+}
+
+.inspection::-webkit-scrollbar {
+ width: 0;
+}
+
+.title {
+ height: 60px;
+ line-height: 60px;
+ padding: 0 16px;
+}
+
+.search {
+ width: 100%;
+ background-color: #fff;
+ border-radius: 3px;
+ margin-bottom: 10px;
+}
+
+.search .form-inline {
+ padding-top: 20px;
+ padding-left: 0px;
+ text-align: left;
+}
+
+.center {
+ width: 100%;
+ /* max-height: 580px; */
+ background-color: #fff;
+ border-radius: 3px;
+ padding: 20px;
+ overflow: auto;
+}
+
+.center-box {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ flex-wrap: wrap;
+ width: 100%;
+ overflow-x: auto;
+ /* overflow-x: scroll; */
+ cursor: grab;
+}
+
+.center-box:active {
+ cursor: grabbing;
+}
+
+.tables {
+ table-layout: fixed;
+ margin: 5px 5px 16px;
+ border-collapse: collapse;
+}
+
+.tables td {
+ height: 40px;
+ width: 100px;
+ text-align: center;
+ font-size: 14px;
+ word-wrap: break-word;
+ white-space: normal;
+}
+
+.thermal-table {
+ min-width: calc(100% - 10px);
+ margin: 5px 5px 0;
+ table-layout: fixed;
+}
+
+.thermal-table td {
+ min-width: 70px;
+ text-align: center;
+ font-size: 14px;
+ word-wrap: break-word;
+ white-space: normal;
+ padding: 5px;
+}
+
+.table-container {
+ overflow-x: auto;
+ /* 浣垮鍣ㄦ敮鎸佹í鍚戞粴鍔� */
+ max-width: 100%;
+ /* 闄愬埗瀹瑰櫒鐨勬渶澶у搴� */
+ margin-bottom: 16px;
+}
+
+.content {
+ display: flex;
+ height: 100%;
+ align-items: center;
+ justify-content: left;
+ padding: 5px;
+ box-sizing: border-box;
+ overflow: hidden;
+ user-select: none;
+}
+
+.content * {
+ user-select: none;
+}
+
+.content-h-0 {
+ justify-content: center;
+}
+
+.content-h-1 {
+ justify-content: start;
+}
+
+.content-h-2 {
+ justify-content: flex-end;
+}
+
+.content-v-0 {
+ align-items: center;
+}
+
+.content-v-1 {
+ align-items: start;
+}
+
+.content-v-2 {
+ align-items: end;
+}
+
+.table_input {
+ width: 100%;
+ height: 100%;
+}
+
+.table_input>>>.el-input__inner {
+ border-color: rgba(0, 0, 0, 0.5) !important;
+}
+
+.collection {
+ width: 50px;
+ height: 100%;
+ margin-left: 5px;
+ border-color: transparent;
+ background-color: #409eff;
+ color: #fff;
+ border-radius: 4px;
+ font-size: 12px;
+}
+
+.collection:active {
+ opacity: 0.7;
+}
+
+.table_caret {
+ font-size: 16px;
+ margin: 0 5px;
+ color: rgba(0, 0, 0, 0.5);
+}
+
+.table_caret:hover {
+ color: #409eff;
+ cursor: pointer;
+}
+
+.table_caret:active {
+ opacity: 0.8;
+}
+
+>>>input::-webkit-inner-spin-button {
+ -webkit-appearance: none !important;
+ /* 闅愯棌寰皟鎸夐挳 */
+ margin: 0 !important;
+ /* 绉婚櫎寰皟鎸夐挳鐨勮竟璺� */
+}
+
+>>>input[type="number"] {
+ -moz-appearance: textfield !important;
+ /* 閽堝 Firefox */
+}
+
+>>>.el-form-item__content {
+ display: inline-flex;
+ align-items: center;
+}
+</style>
+<style scoped>
+/* .inspection .el-form-item__label {
+ color: #000;
+} */
+
+.inspection .el-drawer__header::before {
+ content: "";
+ display: inline-block;
+ width: 4px;
+ height: 30.24px;
+ background: #3a7bfa;
+ border-radius: 10px;
+ margin-left: 32px;
+ margin-right: 8.5px;
+}
+
+.inspection .el-drawer__header {
+ color: #303133;
+ text-align: left;
+}
+
+.inspection .el-input-group__append {
+ padding: 0 14px;
+ color: #3a7bfa;
+ background-color: #fff;
+ height: 100%;
+ display: flex;
+ align-items: center;
+}
+
+.inspection .center-box .el-input__inner {
+ font-size: 12px;
+ padding: 0 6px;
+ text-align: center;
+}
+
+.inspection .el-textarea__inner {
+ padding: 2px;
+}
+
+.inspection .el-textarea__inner::-webkit-scrollbar {
+ width: 0;
+}
+
+.inspection .el-select {
+ display: flex;
+ align-items: center;
+}
+
+.inspection .el-textarea__inner {
+ min-height: 100% !important;
+}
+
+.inspection .tables .el-input {
+ display: flex;
+ align-items: center;
+}
+
+.thermal-table .el-input {
+ display: flex;
+ align-items: center;
+}
+
+.custom-dialog .el-dialog__body {
+ max-width: 1000px;
+ /* 璁剧疆鏈�澶у搴� */
+}
+</style>
diff --git a/src/views/business/materialOrder/copperOrder.vue b/src/views/business/materialOrder/copperOrder.vue
index d837345..fd8bbdd 100644
--- a/src/views/business/materialOrder/copperOrder.vue
+++ b/src/views/business/materialOrder/copperOrder.vue
@@ -129,7 +129,7 @@
</el-form>
</div>
<div style="margin-bottom: 6px;margin-top: 6px">
- <el-button v-show="active==1" :disabled="sampleList.length === 2" size="small" type="primary" @click="handleSplitCountNum">鎷嗗垎</el-button>
+ <el-button v-show="active==1" :disabled="sampleList.length === 3" size="small" type="primary" @click="handleSplitCountNum">鎷嗗垎</el-button>
</div>
</div>
<div style="height: auto;">
@@ -193,7 +193,7 @@
size="small" style="width: 80%;"></el-input-number>
</template>
</el-table-column>
- <el-table-column align="center" label="寰呮椤规暟閲�" prop="proNum" width="105"></el-table-column>
+ <el-table-column align="center" label="寰呮椤规暟閲�" prop="quantity" width="105"></el-table-column>
</el-table>
<el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" class="el-table"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
@@ -439,15 +439,16 @@
custom: null,
company: null,
userId: null,
+ companyId: '',
type: '0', // 绱ф�ョ▼搴�
code: null,
remark: null, // 澶囨敞
mating: 0,
sample: null, // 鏍峰搧鍚嶇О
appointed: '', // 绾﹀畾鏃堕棿
- buyUnitMeas: '', // 鍗曚綅
- updateBatchNo: '', // 鎵规鍙�
- partDetail: '', // 瑙勬牸鍨嬪彿
+ buyUnitMeas: null, // 鍗曚綅
+ updateBatchNo: null, // 鎵规鍙�
+ partDetail: null, // 瑙勬牸鍨嬪彿
declareDate: '', // 鍒拌揣鏃堕棿
factory: null,
laboratory: null,
@@ -460,8 +461,8 @@
processing: 1,
isLeave: 0,
orderType: '杩涘巶妫�楠�', // 妫�楠岀被鍨�
- supplierName: '', // 鏉愭枡鍘傚
- qtyArrived: '', // 鍒拌揣鏁伴噺
+ supplierName: null, // 鏉愭枡鍘傚
+ qtyArrived: null, // 鍒拌揣鏁伴噺
},
sample: {
sampleCode: null,
@@ -555,7 +556,7 @@
{ required: true, message: '璇峰~鍐欒鏍煎瀷鍙�', trigger: 'blur' }
],
declareDate: [
- { required: true, message: '璇峰~鍐欏埌璐ф椂闂�', trigger: 'blur' }
+ { required: true, message: '璇峰~鍐欏埌璐ф椂闂�', trigger: 'change' }
]
},
noNeedCheckDia: false,
@@ -580,23 +581,6 @@
}
})
this.filters = arr
- }
- }
- },
- productListSelected: {
- deep: true,
- handler(val) {
- if(val.length>0){
- for(let i =0 ; i< val.length; i++){
- if(val[i].inspectionItem.includes('鏉惧绠�')){
- this.inspectionItemST = 1
- break;
- }else{
- this.inspectionItemST = 0
- }
- }
- }else{
- this.inspectionItemST = 0
}
}
},
@@ -747,10 +731,11 @@
this.addObj = {
...res.data.insOrder
}
- this.addObj.qtyArrived = res.data.insOrderTemplate.qtyArrived
- this.addObj.buyUnitMeas = res.data.insOrderTemplate.buyUnitMeas
- this.addObj.updateBatchNo = res.data.insOrderTemplate.updateBatchNo
- this.addObj.supplierName = res.data.insOrderTemplate.supplierName
+ this.$set(this.addObj, 'qtyArrived', res.data.insOrderTemplate.qtyArrived)
+ this.$set(this.addObj, 'buyUnitMeas', res.data.insOrderTemplate.buyUnitMeas)
+ this.$set(this.addObj, 'updateBatchNo', res.data.insOrderTemplate.updateBatchNo)
+ this.$set(this.addObj, 'supplierName', res.data.insOrderTemplate.supplierName)
+ this.$set(this.addObj, 'declareDate', res.data.insOrderTemplate.declareDate)
this.addObj.type = String(this.addObj.type)
this.sampleList = this.HaveJson(res.data.sampleProduct);
this.getProNum()
@@ -1188,15 +1173,12 @@
this.addObj.code = selects.code
this.addObj.phone = selects.phone
this.addObj.companyId = selects.departId
- if(this.active==1){
- this.selectInsOrderTemplateInfo()
- }
+ // if(this.active==1){
+ // this.selectInsOrderTemplateInfo()
+ // }
})
},
getProNum() {
- this.sampleSelectionList.forEach((m, i) => {
- Vue.set(this.sampleSelectionList[i], 'proNum', 1)
- })
this.$refs.sampleTable.doLayout()
},
searchFilter() {
@@ -1468,11 +1450,11 @@
}
return 'warning-row';
},
- selectInsOrderTemplateInfo() {
- selectInsOrderTemplate({company: this.addObj.company}).then(res => {
- this.templates = res.data
- })
- },
+ // selectInsOrderTemplateInfo() {
+ // selectInsOrderTemplate({company: this.addObj.company}).then(res => {
+ // this.templates = res.data
+ // })
+ // },
methodChange(val, row) {
if (val === null || val === '') return
if (this.sampleList.length > 1) {
@@ -1514,19 +1496,6 @@
})
// this.searchTemList()
},
- // searchTemList () {
- // this.temperatureList = []
- // this.$axios.post(this.$api.enums.selectEnumByCategory, {
- // category: "鐢靛姏娓╁害寰幆妫�楠�"
- // }).then(res => {
- // if (res.data.length > 0) {
- // this.temperatureEngList = res.data
- // res.data.forEach(item => {
- // this.temperatureList.push(item.label)
- // })
- // }
- // })
- // },
changeModel() {
this.sampleList.forEach(a => {
let obj = this.sampleIds.find(b => b == a.id)
@@ -1811,4 +1780,8 @@
>>>.warning-row {
color: #1890FF;
}
+.node_i {
+ color: orange;
+ font-size: 18px;
+}
</style>
diff --git a/src/views/business/materialOrder/copperView.vue b/src/views/business/materialOrder/copperView.vue
new file mode 100644
index 0000000..9d0595b
--- /dev/null
+++ b/src/views/business/materialOrder/copperView.vue
@@ -0,0 +1,1786 @@
+<!--閾滃崟涓濅笅鍗�-->
+<template>
+ <div class="app-container">
+ <div class="header">
+ <div>
+ <span>閾滃崟涓濅笅鍗�</span>
+ </div>
+ <div>
+ <el-button v-show="active==1 && addObj.orderType === '杩涘巶妫�楠�'" :loading="noNeedCheckLoad" size="small" type="primary" @click="noNeedCheck">鍏嶆</el-button>
+ <el-button v-show="active==1" :loading="saveLoad" size="small" type="primary" @click="save">鎻愪氦</el-button>
+ <el-button size="small" @click="goBack">
+ <span style="color: #3A7BFA;">杩斿洖</span>
+ </el-button>
+ </div>
+ </div>
+ <div class="container">
+ <div class="search">
+ <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px">
+ <el-row>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="鏍峰搧鍚嶇О:" prop="sample">
+ <el-input v-model="addObj.sample" readonly size="small" style="width: 208px">
+ <template slot="append"><el-button slot="append" :disabled="active>1" icon="el-icon-search"
+ @click="selectStandardTree = true"></el-button></template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="鍒拌揣鏁伴噺:" prop="qtyArrived" required>
+ <el-input v-model="addObj.qtyArrived" :disabled="active > 1" class="addObj-info"
+ clearable placeholder="" size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="鍗曚綅:" prop="buyUnitMeas">
+ <el-input v-model="addObj.buyUnitMeas" :disabled="active > 1" clearable class="addObj-info" size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="鎵规鍙�:" prop="updateBatchNo">
+ <el-input v-model="addObj.updateBatchNo" :disabled="active > 1" class="addObj-info" clearable size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="妫�楠岀被鍨�:">
+ <el-select v-model="addObj.orderType" clearable disabled size="small" style="width: 100%">
+ <el-option v-for="(a, ai) in dict.type.check_type" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="绾﹀畾鏃堕棿:" prop="appointed">
+ <el-date-picker
+ v-model="addObj.appointed"
+ :disabled="active > 1"
+ 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="6">
+ <el-form-item class="addObj-form-item" label="鏉愭枡鍘傚:" prop="supplierName">
+ <el-input v-model="addObj.supplierName" :disabled="active > 1" class="addObj-info" clearable placeholder="" size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="鎶芥鏁伴噺:" prop="testQuantity">
+ <el-input v-model="addObj.testQuantity" :disabled="active > 1" class="addObj-info" clearable placeholder="" size="small"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="瑙勬牸鍨嬪彿:" placeholder="璇峰~鍐�" prop="partDetail">
+ <el-tooltip :content="addObj.partDetail" :disabled="!addObj.partDetail">
+ <el-input v-model="addObj.partDetail" :disabled="active > 1" clearable class="addObj-info" size="small"></el-input>
+ </el-tooltip>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="鍒拌揣鏃堕棿:" prop="declareDate">
+ <el-date-picker
+ v-model="addObj.declareDate"
+ :disabled="active > 1"
+ 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-col>
+ <el-col :span="6">
+ <el-form-item class="addObj-form-item" label="澶囨敞:">
+ <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :placeholder="active>1 ? '' : '璇疯緭鍏�'" :disabled="active>1" clearable
+ size="small" type="textarea"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px">
+ <div v-if="active==1">
+ <el-form :inline="true" :model="addObj1" label-width="90px">
+ <el-form-item label="鏍峰搧鍨嬪彿:" style="margin-bottom: 6px;margin-top: 6px">
+ <el-select v-model="model" :placeholder="active>1 ? '' : '璇疯緭鍏�'"
+ allow-create clearable default-first-option filterable
+ size="small"
+ @change="changeModel">
+ <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="妫�楠屾爣鍑�:" style="margin-bottom: 6px;margin-top: 6px">
+ <el-select v-model="standardMethodListId" :loading="methodLoad"
+ :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"
+ @change="changeStandardMethodListId" @focus="methodFocus">
+ <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div style="margin-bottom: 6px;margin-top: 6px">
+ <el-button v-show="active==1" :disabled="sampleList.length === 3" size="small" type="primary" @click="handleSplitCountNum">鎷嗗垎</el-button>
+ </div>
+ </div>
+ <div style="height: auto;">
+ <el-table ref="sampleTable" :data="sampleList" class="el-table sampleTable" highlight-current-row
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+ max-height="400px" tooltip-effect="dark" @selection-change="selectSample" @row-click="rowClick">
+ <el-table-column v-if="active==1" :selectable="selectable" type="selection" width="60"></el-table-column>
+ <el-table-column align="center" label="搴忓彿" type="index" width="65"></el-table-column>
+ <el-table-column align="center" label="鏍峰搧鍚嶇О" min-width="100" prop="sample">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.sample" :readonly="active>1" clearable size="small"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鏍峰搧缂栧彿" min-width="140" prop="sampleCode">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.sampleCode" :readonly="active>1" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
+ size="small"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鏍峰搧鍨嬪彿" min-width="100" prop="model">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.model" :disabled="active>1" allow-create default-first-option filterable
+ placeholder="鏍峰搧鍨嬪彿" size="small" style="width: 100%;" @change="handleChangeModel">
+ <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column v-if="!(active>1)" align="center" label="鍨嬪彿鍙傛暟" prop="modelNum" width="130">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.modelNum" :disabled="active>1|| scope.$index !== 0" clearable placeholder="闈炲繀濉�"
+ size="small"
+ @input="methodChange(scope.row.standardMethodListId, scope.row)"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodListId">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1 || scope.$index !== 0"
+ :loading="methodLoad" :readonly="active>1" clearable placeholder="妫�楠屾爣鍑�"
+ size="small" style="width: 100%;" @change="(value)=>methodChange(value, scope.row)" @clear="productList = []" @focus="methodFocus">
+ <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
+ </el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column v-if="addObj.mating==1" align="center" label="閰嶅鏍峰搧鍚嶇О" prop="joinName" width="140">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.joinName" :autosize="{ minRows: 1, maxRows: 1}" size="small"
+ type="textarea"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column v-if="addObj.mating==1" align="center" label="閰嶅鏍峰搧鍨嬪彿" prop="joinModel" width="140">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.joinModel" :autosize="{ minRows: 1, maxRows: 1}" size="small"
+ type="textarea"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column v-if="addObj.mating==1" align="center" label="閰嶅鏍峰搧鏁伴噺" prop="joinNum" width="140">
+ <template slot-scope="scope">
+ <el-input-number v-model="scope.row.joinNum" :controls="false" :max="100" :min="1" :precision="0"
+ size="small" style="width: 80%;"></el-input-number>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="寰呮椤规暟閲�" prop="quantity" width="105"></el-table-column>
+ </el-table>
+ <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" class="el-table"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+ max-height="400px" style="margin-bottom: 10px;" tooltip-effect="dark"
+ @select="selectOne" @selection-change="selectProduct" @select-all="handleAll">
+ <el-table-column v-if="active==1" :selectable="selectable" type="selection" width="65"></el-table-column>
+ <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column>
+ <el-table-column label="妫�楠岄」" min-width="140" prop="inspectionItem" show-overflow-tooltip>
+ <template slot="header" slot-scope="scope">
+ <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
+ <span>妫�楠岄」</span>
+ <el-input
+ v-if="active==1"
+ v-model="inspectionItem"
+ placeholder="璇疯緭鍏�"
+ size="mini"
+ @input="searchFilterList"/>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="妫�楠岄」瀛愰」" min-width="140" prop="inspectionItemSubclass"
+ show-overflow-tooltip>
+ <template slot="header" slot-scope="scope">
+ <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
+ <span>妫�楠岄」瀛愰」</span>
+ <el-input
+ v-if="active==1"
+ v-model="inspectionItemSubclass"
+ placeholder="璇疯緭鍏�"
+ size="mini"
+ @input="searchFilterList"/>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="瑕佹眰鍊�" min-width="220px" prop="ask">
+ <template slot-scope="scope">
+ <el-input v-if="active==1&&isAskOnlyRead&&scope.row.inspectionValueType!='5'" v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鍊�"
+ size="small" type="textarea"
+ @change="e=>requestChange(e,scope.row,'ask')"></el-input>
+ <span v-else>
+ <!-- <template v-if="(scope.row.ask.indexOf('D')>-1
+ ||scope.row.ask.indexOf('W')>-1
+ ||scope.row.ask.indexOf('X')>-1
+ ||scope.row.ask.indexOf('RTS')>-1
+ ||scope.row.ask.indexOf('H')>-1
+ ||scope.row.ask.indexOf('L')>-1)&&active==1">
+ <input class="askRts" v-model="scope.row.rts" /><br />{{ scope.row.ask }}
+ </template>
+ <template v-else>{{ scope.row.ask }}</template> -->
+ <template >{{ scope.row.ask }}</template>
+ </span>
+ </template>
+ </el-table-column>
+ <el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell">
+ <template slot-scope="scope">
+ <el-input v-if="active==1&&isAskOnlyRead" v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鎻忚堪"
+ size="small" type="textarea"
+ @change="e=>requestChange(e,scope.row,'tell')"></el-input>
+ <span v-else>
+ <template >{{ scope.row.tell }}</template>
+ </span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏉′欢" min-width="140" prop="radius" show-overflow-tooltip></el-table-column>
+ <el-table-column label="璇曢獙鏂规硶" min-width="120" prop="methodS" show-overflow-tooltip>
+ <template slot="header" slot-scope="scope">
+ <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
+ <span>璇曢獙鏂规硶</span>
+ <el-input
+ v-if="active==1"
+ v-model="methodS"
+ placeholder="璇疯緭鍏�"
+ size="mini"
+ @input="searchFilterList"/>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="璁¢噺鍗曚綅" prop="unit" show-overflow-tooltip width="100"></el-table-column>
+ <el-table-column label="鍗曚环" prop="price" show-overflow-tooltip width="100"></el-table-column>
+ <!-- <el-table-column prop="manDay" label="棰勮鏃堕棿(澶�)" width="120" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="manHour" label="宸ユ椂绯绘暟" width="100" show-overflow-tooltip></el-table-column> -->
+ <!-- <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> -->
+ <el-table-column label="鍖洪棿" min-width="120" prop="section" show-overflow-tooltip></el-table-column>
+ <el-table-column :filter-method="filterHandler" :filters="filters" label="瀛愬疄楠屽" min-width="130" prop="sonLaboratory"
+ show-overflow-tooltip></el-table-column>
+ </el-table>
+ </div>
+ </div>
+ <el-dialog :visible.sync="selectStandardTree" title="閫夋嫨鏍峰搧" width="500px">
+ <div v-if="selectStandardTree" v-loading="selectStandardTreeLoading" class="body" style="height: 60vh;overflow-y: auto;user-select: none;">
+ <el-row>
+ <el-col :span="24">
+ <el-input v-model="search" clearable placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" size="small"
+ style="margin-bottom: 5px;" suffix-icon="el-icon-search" @blur="searchFilter" @clear="searchFilter"
+ @keyup.enter.native="searchFilter"></el-input>
+ </el-col>
+ </el-row>
+ <el-tree ref="tree" :data="list" :default-expanded-keys="expandedKeys" :filter-node-method="filterNode"
+ :props="{ children: 'children', label: 'label' }" highlight-current node-key="label" @node-click="handleNodeClick"
+ @node-expand="nodeOpen" @node-collapse="nodeClose" @dblclick.native="activeStandardTree">
+ <div slot-scope="{ node, data }" class="custom-tree-node">
+ <el-row>
+ <el-col :span="24">
+ <span><i
+ :class="`node_i ${data.children != undefined ? (data.code==='[1]'?'el-icon-folder-opened':'el-icon-folder') : 'el-icon-tickets'}`"></i>
+ {{ data.code }} {{ data.label }}</span>
+ </el-col>
+ </el-row>
+ </div>
+ </el-tree>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="selectStandardTree = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="activeStandardTree">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!--鐗规畩鍊煎鐞嗘-->
+ <el-dialog :before-close="beforeClose" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
+ :visible.sync="bsm1DiaAll"
+ min-width="400px"
+ title="妫�娴嬪埌鐗规畩椤癸紝璇蜂綔鍑轰互涓嬮�夋嫨">
+ <div v-for="(item, index) in bsm1DiaList" :key="item.id" class="body" style="max-height: 60vh;">
+ <span>{{item.inspectionItem}}</span>
+ <el-row v-if="item.bsm1">
+ <el-col :span="24" class="search_thing" style="height: initial;margin: 5px 0;">
+ <div class="search_label" style="width: 80px;"><span class="required-span">* </span>閫夐」锛�</div>
+ <div class="search_input">
+ <el-radio-group v-model="item.bsm1Val" v-removeAriaHidden @input="upBsmAll(item)">
+ <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai" :label="a" style="margin-bottom: 2px;margin-top: 2px;"></el-radio>
+ </el-radio-group>
+ </div>
+ </el-col>
+ <el-col :span="24" class="search_thing" style="height: initial;margin: 5px 0;">
+ <div class="search_label" style="width: 80px;">瑕佹眰鍊硷細</div>
+ <div class="search_input">
+ <el-radio-group v-model="item.bsm1Val" v-removeAriaHidden @input="upBsmAll(item)">
+ <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai"
+ :label="a">{{JSON.parse(item.bsmRow.askCopy)[ai]}}</el-radio>
+ </el-radio-group>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button :loading="saveLoad" type="primary" @click="save1">纭� 瀹�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
+ :show-close="false" :visible.sync="bsm3Dia"
+ title="鍖洪棿鍊煎~鍐�" width="800px">
+ <el-table
+ :data="editTable"
+ height="80vh" style="width: 100%">
+ <!-- inspectionItemList -->
+ <el-table-column
+ label="妫�楠岄」"
+ prop="inspectionItemList"
+ width="180">
+ </el-table-column>
+ <el-table-column
+ label="鏍峰搧缂栧彿"
+ prop="sampleCode"
+ width="180">
+ </el-table-column>
+ <el-table-column
+ label="鏍峰搧鍨嬪彿"
+ prop="model"
+ width="180">
+ </el-table-column>
+ <el-table-column
+ label="璇嗗埆绗﹀彿"
+ prop="symbolItem">
+ </el-table-column>
+ <el-table-column
+ label="璇嗗埆绗﹀��"
+ prop="value">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.value" placeholder="璇疯緭鍏�" size="small" @input="inputValueHandler(scope.row,scope.$index)"></el-input>
+ </template>
+ </el-table-column>
+ </el-table>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="bsm3Dia=false">鍙� 娑�</el-button>
+ <el-button :loading="saveLoad" type="primary" @click="save0">纭� 瀹�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
+ <el-dialog
+ :visible.sync="noNeedCheckDia"
+ title="鍏嶆鎻愮ず"
+ width="32%">
+ <span>纭鍏嶆褰撳墠妫�楠屽崟锛�</span>
+ <span slot="footer" class="dialog-footer">
+ <el-button :loading="noNeedCheckLoad" @click="noNeedCheckDia = false">鍙� 娑�</el-button>
+ <el-button :loading="noNeedCheckLoad" type="primary" @click="handleNoNeedCheck">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import Vue from 'vue'
+import {
+ addRawCopperOrder,
+ getInsOrder,
+ getUserNow,
+ addRawCopperOrderExemptionOrder,
+ selectStandardTreeList2,
+ selectsStandardMethodByFLSSM,
+ selectInsOrderTemplate,
+ selectStandardProductList,
+ selectStandardMethodEnum
+} from "@/api/business/rawMaterialOrder";
+
+var validateSixDecimalPositives = (rule, value, callback) => {
+ if (value == 0 || value == null) {
+ callback(new Error('璇疯緭鍏ユ纭殑鏁板瓧鎴栧皬鏁�'))
+ } else if (!/^[0-9]+.?[0-9]*$/.test(value)) {
+ callback(new Error('璇疯緭鍏ユ暟瀛楁垨灏忔暟'))
+ } else {
+ callback()
+ }
+}
+
+export default {
+ name: 'CopperView',
+ components: {},
+ dicts: ['check_type', 'urgency_level'],
+ data() {
+ return {
+ active: '',
+ currentId: '',
+ sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁
+ editTable:[],
+ noNeedCheckLoad: false, // 鍏嶆鎸夐挳loading
+ template: null,
+ templates: [],
+ addObj: {
+ testQuantity: null, // 鎶芥鏁伴噺
+ custom: null,
+ company: null,
+ userId: null,
+ companyId: '',
+ type: '0', // 绱ф�ョ▼搴�
+ code: null,
+ remark: null, // 澶囨敞
+ mating: 0,
+ sample: null, // 鏍峰搧鍚嶇О
+ appointed: '', // 绾﹀畾鏃堕棿
+ buyUnitMeas: null, // 鍗曚綅
+ updateBatchNo: null, // 鎵规鍙�
+ partDetail: null, // 瑙勬牸鍨嬪彿
+ declareDate: '', // 鍒拌揣鏃堕棿
+ factory: null,
+ laboratory: null,
+ sampleType: null,
+ sampleNum: 1,
+ unit: null,
+ model: null,
+ method: null,
+ phone: null,
+ processing: 1,
+ isLeave: 0,
+ orderType: '杩涘巶妫�楠�', // 妫�楠岀被鍨�
+ supplierName: null, // 鏉愭枡鍘傚
+ qtyArrived: null, // 鍒拌揣鏁伴噺
+ },
+ sample: {
+ sampleCode: null,
+ laboratory: null,
+ factory: null,
+ sampleType: null,
+ sample: null,
+ model: null,
+ modelNum: null,
+ sampleNum: 1,
+ isLeave: 0,
+ unit: null
+ },
+ selectStandardTree: false,
+ search: null,
+ list: [],
+ selectStandardTreeLoading: false,
+ selectTree: null,
+ expandedKeys: [],
+ sampleList: [],
+ sampleIds: [],
+ methodList: [],
+ addSampleDia: false,
+ count: 1,
+ productList: [],
+ productList0: [],
+ bsm1DiaList: [],
+ productIds: [],
+ productListSelected: [],
+ getProductLoad: false,
+ saveLoad: false,
+ templateDia: false,
+ templateLoading: false,
+ templateName: '',
+ upLoad: false,
+ units: [],
+ models: [],
+ methods: [],
+ methodLoad: false,
+ filters: [],
+ currentMethod: null,
+ isAskOnlyRead: false,
+ sampleId: null,
+ bsmRow: null,
+ bsm1: false,
+ bsm1Val: null,
+ bsm1DiaAll: false,
+ bsm2: false,
+ bsm2Val: null,
+ bsm2Dia: false,
+ bsmRow3: null,
+ bsm3Val: null,
+ bsm3Dia: false,
+ // total: 0,
+ RTS: '',
+ totalArr: [],
+ addObj1: {},
+ model: null,
+ standardMethodListId: null,
+ symbolList:['RTS'],
+ inspectionItem:null,
+ inspectionItemSubclass:null,
+ methodS:null,
+ isBsm2Val2:false,
+ isShowInput: false,
+ temId: '',
+ selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃
+ addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯
+ sample: [
+ { required: true, message: '璇烽�夋嫨鏍峰搧', trigger: 'change' }
+ ],
+ qtyArrived: [
+ { validator: validateSixDecimalPositives, trigger: 'blur' }
+ ],
+ testQuantity: [
+ { required: true, message: '璇峰~鍐欐娊妫�鏁伴噺', trigger: 'blur' }
+ ],
+ supplierName: [
+ { required: true, message: '璇峰~鍐欐潗鏂欏巶瀹�', trigger: 'blur' }
+ ],
+ appointed: [
+ { required: true, message: '璇烽�夋嫨绾﹀畾鏃堕棿', trigger: 'change' }
+ ],
+ buyUnitMeas: [
+ { required: true, message: '璇峰~鍐欏崟浣�', trigger: 'blur' }
+ ],
+ updateBatchNo: [
+ { required: true, message: '璇峰~鍐欐壒娆″彿', trigger: 'blur' }
+ ],
+ partDetail: [
+ { required: true, message: '璇峰~鍐欒鏍煎瀷鍙�', trigger: 'blur' }
+ ],
+ declareDate: [
+ { required: true, message: '璇峰~鍐欏埌璐ф椂闂�', trigger: 'change' }
+ ]
+ },
+ noNeedCheckDia: false,
+ }
+ },
+ 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
+ }
+ },
+ mounted() {
+ this.active = this.$route.query.active
+ this.currentId = this.$route.query.currentId
+ this.getInfoRow();
+ },
+ activated() {
+ this.active = this.$route.query.active
+ this.currentId = this.$route.query.currentId
+ this.getInfoRow();
+ },
+ methods: {
+ getInfoRow() {
+ this.getUserNowInfo()
+ this.selectStandardTreeList()
+ this.selectStandardMethods()
+ this.getInfo() // 鑾峰彇鏁版嵁
+ },
+ // 鎷嗗垎
+ handleSplitCountNum () {
+ this.sample.joinName = null
+ this.sample.joinModel = null
+ this.sample.joinNum = 1
+ // 涓ゆ潯鏁版嵁淇濇寔涓�鑷�
+ this.sample.sample = this.sampleList[0].sample
+ this.sample.model = this.sampleList[0].model
+ this.sample.unit = this.sampleList[0].unit
+ this.sample.modelNum = this.sampleList[0].modelNum
+ this.sample.standardMethodListId = this.sampleList[0].standardMethodListId
+ this.sample.insProduct = []
+ this.sample.id = this.count
+ this.sample.childSampleList = []
+ this.sample.insulating = null
+ this.sample.sheath = null
+ this.sampleList.push(this.HaveJson(this.sample))
+ this.sampleList.forEach(item => {
+ item.quantity = 1
+ })
+ this.count++
+ },
+ noNeedCheck () {
+ this.$refs['addObj'].validate((valid) => {
+ if (valid) {
+ if (!this.sampleList.every(m => m.standardMethodListId)) {
+ this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�')
+ return
+ }
+ // 妫�楠岀被鍨嬩负杩涘巶妫�楠屾椂鍙�夋嫨鍏嶆锛屼絾涓嶈兘閫夋嫨妫�楠岄」
+ const sampleList = this.HaveJson(this.sampleList)
+ sampleList.forEach(item => {
+ item.insProduct = this.productList
+ })
+ this.getTotal(sampleList)
+ let projectNum = this.totalArr.filter(a => a.state == 1).length
+ if (projectNum!=0){
+ this.$message.error('鍏嶆涓嶅彲閫夋嫨妫�楠岄」')
+ return
+ }
+ this.noNeedCheckDia = true
+ } else {
+ console.log('error submit!!');
+ return false;
+ }
+ });
+ },
+ handleNoNeedCheck () {
+ const sampleList = this.HaveJson(this.sampleList)
+ sampleList.forEach(item => {
+ item.insProduct = this.productList
+ })
+ this.getTotal(sampleList)
+ let projectNum = this.totalArr.filter(a => a.state == 1).length
+ if (projectNum!=0){
+ this.$message.error('鍏嶆涓嶅彲閫夋嫨妫�楠岄」')
+ } else {
+ let trees = this.selectTree.split(" - ")
+ if (trees.length < 3) {
+ this.$message.error('鏈�夋嫨瀵硅薄')
+ return
+ }
+ this.addObj.factory = trees[0]
+ this.addObj.laboratory = trees[1]
+ this.addObj.sampleType = trees[2]
+ if (trees[3] === undefined || trees[3] === '') {
+ this.addObj.sample = trees[2]
+ } else {
+ this.addObj.sample = trees[3]
+ }
+ this.addObj.model = (trees[4] == undefined ? null : trees[4])
+ this.noNeedCheckLoad = true
+ addRawCopperOrderExemptionOrder({
+ copperInsOrder: this.addObj,
+ sampleList: sampleList.map(a => {
+ if (a.insProduct.length > 0) {
+ a.insProduct.forEach(c => {
+ delete c.id
+ })
+ }
+ if (a.modelNum) {
+ // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃�
+ // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML
+ const index = a.modelNum.indexOf('脳')
+ if (index === 0) {
+ a.model = a.model + a.modelNum
+ } else if (index === -1) {
+ a.model = a.model + '-' + a.modelNum
+ } else {
+ a.model = a.modelNum + a.model
+ }
+ } else {
+ a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
+ }
+ a.insProduct = a.insProduct.filter(b=>b.state === 1)
+ return a
+ })
+ }).then(res => {
+ this.noNeedCheckLoad = false
+ this.$message.success('宸叉彁浜�')
+ this.closeOpenPage()
+ }).catch(e=>{
+ this.noNeedCheckLoad = false
+ })
+ }
+ },
+ // 鑾峰彇鏁版嵁
+ getInfo () {
+ if (this.active != 1) {
+ // 鏌ョ湅娴佺▼
+ // 璇锋眰鎺ュ彛锛屽洖鏄炬暟鎹�
+ getInsOrder({orderId: this.currentId}).then(res => {
+ this.addObj = {
+ ...res.data.insOrder
+ }
+ this.$set(this.addObj, 'qtyArrived', res.data.insOrderTemplate.qtyArrived)
+ this.$set(this.addObj, 'buyUnitMeas', res.data.insOrderTemplate.buyUnitMeas)
+ this.$set(this.addObj, 'updateBatchNo', res.data.insOrderTemplate.updateBatchNo)
+ this.$set(this.addObj, 'supplierName', res.data.insOrderTemplate.supplierName)
+ this.addObj.type = String(this.addObj.type)
+ this.sampleList = this.HaveJson(res.data.sampleProduct);
+ this.getProNum()
+ this.addObj.sampleNum = this.sampleList.length
+ this.$nextTick(() => {
+ this.$refs.sampleTable.doLayout()
+ if (this.sampleList.length > 0) { // 鏌ョ湅鏃跺鏋滄湁鏍峰搧榛樿閫変腑绗竴鏉�
+ this.productList = this.sampleList[0].insProduct
+ this.$refs.sampleTable.setCurrentRow(this.sampleList[0], true)
+ this.rowClick(this.sampleList[0])
+ }
+ })
+ })
+ }
+ },
+ //鐗规畩鍊煎~鍐欏鐞�
+ inputValueHandler(row,index){
+ if(row){
+ const nextIndex = index+1
+ for (let i = nextIndex; i < this.editTable.length; i++) {
+ const element = this.editTable[i];
+ if(element.model==row.model&&row.symbolItem==element.symbolItem){
+ this.editTable[i].value = row.value
+ }
+ }
+ }
+ },
+ changeProductList0(){
+ this.productList0.forEach(a=>{
+ let obj = this.productList.find(m => m.id == a.id)
+ if(obj){
+ a.state = obj.state
+ a.section = obj.section
+ a.ask = obj.ask
+ a.manHour = obj.manHour
+ a.price = obj.price
+ a.tell = obj.tell
+ }
+ if(a.state == 0&&a.bsmRow){
+ a = this.HaveJson(a.bsmRow)
+ }
+ })
+ },
+ searchFilterList () {
+ const vtw = {
+ inspectionItem: this.inspectionItem, // 妫�楠岄」
+ inspectionItemSubclass: this.inspectionItemSubclass, // 妫�楠岄」瀛愰」
+ methodS: this.methodS, // 璇曢獙鏂规硶
+ }
+ const isHaveValue = Object.values(vtw).some(item => {
+ return item
+ })
+ this.changeProductList0()
+ if (isHaveValue) {
+ for(let i in vtw) {
+ if (vtw[i]) {
+ this.productList = this.productList0.filter((item) => {
+ return item[i] && item[i].includes(vtw[i])
+ })
+ }
+ }
+ this.$nextTick(()=>{
+ this.productList.forEach(a => {
+ if (a.state == 1) this.toggleSelection(a)
+ })
+ })
+ } else {
+ // 娌℃湁鏌ヨ鏉′欢鏃舵覆鏌撴墍鏈夋暟鎹�
+ this.productList = this.productList0
+ this.$nextTick(()=>{
+ this.productList.forEach(a => {
+ if (a.state == 1) this.toggleSelection(a)
+ })
+ })
+ }
+ },
+ containsValue(str) {
+ if(str){
+ let symbolItem = ''
+ this.symbolList.some(value =>{
+ if(str.includes(value)){
+ symbolItem = value
+ return true
+ }
+ })
+ return symbolItem
+ }
+ },
+ handleAsk(ask,symbolItem, value) {
+ try{
+ let code = [">", "<", "=", "锛�", "锛�", "鈮�", "鈮�", "卤"];
+ let code2 = ['+', '*', '/', '-']
+ if (ask.includes('&')) {
+ // 澶氫釜鏉′欢
+ let arr0 = ask.split('&')
+ let arr1 = []
+ arr0.forEach(m => {
+ let index = code.findIndex(b => m.includes(b))
+ if (index > -1) {
+ let arr = m.split(code[index]).filter(b => !!b)
+ let num = eval(this.replaceAll(arr[0], symbolItem, value))
+ m = code[index] + '' + num
+ arr1.push(m)
+ }
+ })
+ return arr1.join('&')
+ } else if (ask.includes('锝�') || ask.includes('~')) {
+ let arr0 = []
+ if (ask.includes('锝�')) {
+ arr0 = ask.split('锝�')
+ } else {
+ arr0 = ask.split('~')
+ }
+ // 澶氫釜鏉′欢
+ let arr1 = []
+ arr0.forEach(m => {
+ m = m.replace(symbolItem, value)
+ const index = code2.findIndex(b => m.includes(b))
+ if (index > -1) {
+ m = eval(m)
+ }
+ arr1.push(m)
+ })
+ return arr1.join('锝�')
+ } else {
+ // 鍗曚釜鏉′欢
+ let index = code.findIndex(b => ask.includes(b))
+ if (index > -1) {
+ let arr = ask.split(code[index]).filter(b => !!b)
+ let num = eval(this.replaceAll(arr[0], symbolItem, value))
+ return code[index] + '' + num
+ }
+ }
+ }catch(e){}
+ },
+ handleTell(tell,symbolItem, value){
+ try{
+ let num = this.replaceAll(tell, symbolItem, value)
+ return num
+ }catch(e){}
+ },
+ replaceAll(str,find,value) {
+ if (str === undefined) {
+ return str
+ }
+ return str.replaceAll(find, value);
+ },
+ save() {
+ this.$refs['addObj'].validate((valid) => {
+ if (valid) {
+ if (!this.sampleList.every(m => m.standardMethodListId)) {
+ this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�')
+ return
+ }
+ const sampleList = this.HaveJson(this.sampleList)
+ sampleList.forEach(item => {
+ item.quantity = 1
+ item.insProduct = this.productList
+ })
+ this.getTotal(sampleList)
+ let projectNum = this.totalArr.filter(a => a.state == 1).length
+ if(projectNum==0){
+ this.$confirm('妫�楠岄」鐩负绌猴紝鏄惁纭鎻愪氦?', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.saveMethod(sampleList)
+ }).catch(() => {})
+ }else{
+ let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask.includes(b)) && a.state == 1)
+ if (isRTS) {
+ this.editTable = this.handleData(sampleList,this.containsValue, 0)
+ this.editTable.forEach(item => {
+ item.value = item.modelNum
+ })
+ this.bsm3Dia = true;
+ return
+ }
+ this.saveMethod(sampleList)
+ }
+ } else {
+ console.log('error submit!!');
+ return false;
+ }
+ });
+ },
+ save0(){
+ if(this.editTable.every(m=>m.value)){
+ this.sampleList.forEach(item => {
+ item.quantity = 1
+ item.insProduct = this.productList
+ })
+ let sampleList = this.handleData(this.HaveJson(this.sampleList),this.handleAsk,1)
+ sampleList.forEach(a => {
+ a.insProduct = a.insProduct.filter(b=>b.state === 1)
+ })
+ this.saveMethod(sampleList)
+ }else{
+ this.$message.error('璇峰~鍐欒瘑鍒鍊�')
+ }
+ },
+ handleData(sampleList,calBack,type){
+ let editTable = []
+ sampleList.forEach(item => {
+ let obj = {
+ sampleCode:item.sampleCode,
+ model:item.model,
+ symbolList:[],
+ sampleId:item.id,
+ modelNum:item.modelNum,
+ }
+ if (item.insProduct && item.insProduct.length > 0) {
+ item.insProduct.forEach(a => {
+ if (a.state == 1) {
+ if(type==0){
+ let str = calBack(a.ask)
+ str&&obj.symbolList.push({
+ symbolItem:str,
+ inspectionItem:a.inspectionItem,
+ })
+ }else if(type==1){
+ let arr = this.editTable.filter(b => b.sampleId == item.id)
+ for (var i=0;i<arr.length;i++){
+ if(a.ask){
+ if(a.ask.includes(arr[i].symbolItem)){
+ let ask = calBack(a.ask, arr[i].symbolItem,arr[i].value)
+ if (ask) {
+ a.ask = ask
+ }
+ let tell = this.handleAsk(a.tell, arr[i].symbolItem,arr[i].value)
+ if (tell) {
+ a.tell = tell
+ }
+ }
+ }else{
+ this.$message.error('瑕佹眰鍊间负绌猴紝闇�瑕佸幓鏍囧噯搴撶淮鎶わ紒')
+ }
+ }
+ }
+ }
+ })
+ }
+ // 鍏夌氦甯﹂」鐩�
+ if (item.bushing && item.bushing.length > 0) {
+ item.bushing.forEach(a => {
+ if (a.fiber && a.fiber.length > 0) {
+ a.fiber.forEach(b => {
+ if (b.productList && b.productList.length > 0) {
+ b.productList.forEach(c => {
+ if (c.state == 1) {
+ if(type==0){
+ let str = calBack(c.ask)
+ str&&obj.symbolList.push({
+ symbolItem:str,
+ inspectionItem:c.inspectionItem,
+ })
+ }else if(type==1){
+ let arr = this.editTable.filter(b => b.sampleId == item.id)
+ arr.forEach(f => {
+ if(c.ask.includes(f.symbolItem)){
+ let ask = calBack(c.ask, f.symbolItem,f.value)
+ if (ask) {
+ c.ask = ask
+ }
+ let tell = this.handleTell(c.tell, f.symbolItem,f.value)
+ if (tell) {
+ c.tell = tell
+ }
+ }
+ })
+ }
+ }
+ })
+ }
+ })
+ }
+ if (a.fibers && a.fibers.length > 0) {
+ a.fibers.forEach(b => {
+ if (b.productList && b.productList.length > 0) {
+ b.productList.forEach(c => {
+ if (c.state == 1) {
+ if(type==0){
+ let str = calBack(c.ask)
+ str&&obj.symbolList.push({
+ symbolItem:str,
+ inspectionItem:c.inspectionItem,
+ })
+ }else if(type==1){
+ // let ask = calBack(c.ask, c.rts)
+ // if (ask && c.state == 1) {
+ // c.ask = csk
+ // }
+ let arr = this.editTable.filter(b => b.sampleId == item.id)
+ arr.forEach(f => {
+ if(c.ask.includes(f.symbolItem)){
+ let ask = calBack(c.ask, f.symbolItem,f.value)
+ if (ask) {
+ c.ask = ask
+ }
+ let tell = this.handleTell(c.tell, f.symbolItem,f.value)
+ if (tell) {
+ c.tell = tell
+ }
+ }
+ })
+ }
+ }
+ })
+ }
+ if (b.fiber && b.fiber.length > 0) {
+ b.fiber.forEach(c => {
+ if (c.productList && c.productList.length > 0) {
+ c.productList.forEach(d => {
+ if (d.state == 1) {
+ if(type==0){
+ let str = calBack(d.ask)
+ str&&obj.symbolList.push({
+ symbolItem:str,
+ inspectionItem:d.inspectionItem,
+ })
+ }else if(type==1){
+ // let ask = calBack(d.ask, d.rts)
+ // if (ask && d.state == 1) {
+ // d.ask = ask
+ // }
+ let arr = this.editTable.filter(b => b.sampleId == item.id)
+ arr.forEach(f => {
+ if(d.ask.includes(f.symbolItem)){
+ let ask = calBack(d.ask, f.symbolItem,f.value)
+ if (ask) {
+ d.ask = ask
+ }
+ let tell = this.handleTell(d.tell, f.symbolItem,f.value)
+ if (tell) {
+ d.tell = tell
+ }
+ }
+ })
+ }
+ }
+ })
+ }
+ })
+ }
+ })
+ }
+ })
+ }
+ if(type==0){
+ editTable.push(obj)
+ }
+ })
+ if(type==0){
+ editTable.forEach(a => {
+ a.symbolList.forEach(b => {
+ let arr = a.symbolList.filter(c => c.symbolItem == b.symbolItem);
+ b.inspectionItemList = arr.map(c => c.inspectionItem).join(',')
+ })
+ })
+ editTable.forEach(a => {
+ let mySet = new Set();
+ a.symbolList = a.symbolList.filter(b =>{
+ let num0 = mySet.size;
+ mySet.add(b.symbolItem);
+ let num1 = mySet.size;
+ if(num0!=num1){
+ return true;
+ }else{
+ return false
+ }
+ })
+ })
+ let editTableNew = []
+ editTable.forEach(a => {
+ a.symbolList.forEach(b => {
+ let obj = {
+ sampleCode:a.sampleCode,
+ model:a.model,
+ symbolItem:b.symbolItem,
+ sampleId:a.sampleId,
+ value:null,
+ inspectionItemList:b.inspectionItemList,
+ modelNum:a.modelNum,
+ }
+ editTableNew.push(obj)
+ })
+ })
+ return editTableNew
+ }else{
+ return sampleList
+ }
+ },
+ saveMethod(sampleList){
+ this.saveLoad = true
+ addRawCopperOrder({
+ copperInsOrder: this.addObj,
+ sampleList: sampleList.map(a => {
+ if (a.insProduct.length > 0) {
+ a.insProduct.forEach(c => {
+ delete c.id
+ })
+ }
+ if (a.modelNum) {
+ const index = a.modelNum.indexOf('脳')
+ if (index === 0) {
+ a.model = a.model + a.modelNum
+ } else if (index === -1) {
+ a.model = a.model + '-' + a.modelNum
+ } else {
+ a.model = a.modelNum + a.model
+ }
+ } else {
+ a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
+ }
+ a.insProduct = a.insProduct.filter(b=>b.state === 1)
+ return a
+ })
+ }).then(res => {
+ this.saveLoad = false
+ this.$message.success('宸叉彁浜�')
+ this.bsm3Dia = false;
+ this.closeOpenPage()
+ }).catch(e=>{
+ this.saveLoad = false
+ })
+ },
+ getUserNowInfo() {
+ getUserNow().then(res => {
+ let selects = res.data
+ if (selects == null) return
+ this.addObj.userId = selects.id
+ this.addObj.company = selects.company
+ this.addObj.custom = selects.name
+ this.addObj.code = selects.code
+ this.addObj.phone = selects.phone
+ this.addObj.companyId = selects.departId
+ // if(this.active==1){
+ // this.selectInsOrderTemplateInfo()
+ // }
+ })
+ },
+ getProNum() {
+ this.$refs.sampleTable.doLayout()
+ },
+ searchFilter() {
+ this.$refs.tree.filter(this.search)
+ },
+ 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')
+ },
+ handleNodeClick(val, node, el) {
+ this.selectTree = ''
+ this.models = val.children
+ this.getNodeParent(node)
+ let flag = false
+ if (node.level == 3) {
+ if(node.data.children.length>0){
+ node.data.children.forEach(a => {
+ let key = Object.keys(a)
+ if(!key.includes('level')) {
+ flag = true
+ }
+ })
+
+ }
+ }
+ this.selectTree = this.selectTree.replace(' - ', '')
+ if(flag) {
+ this.selectTree = ' - - ' + this.selectTree
+ }
+ let data = this.selectTree.split(' - ')
+ let data2 = ''
+ for (let index = data.length - 1; index >= 0; index--) {
+ data2 += " - " + data[index]
+ }
+ this.selectTree = data2.replace(' - ', '')
+ },
+ getNodeParent(val) {
+ if (val.parent != null) {
+ if (val.data.children === null) {
+ this.selectTree += ' - ' + val.label + ' - ' + ''
+ } else {
+ this.selectTree += ' - ' + val.label
+ }
+ this.getNodeParent(val.parent)
+ }
+ },
+ selectStandardTreeList() {
+ this.selectStandardTreeLoading = true
+ selectStandardTreeList2().then(res => {
+ this.list = res.data
+ this.list.forEach(a => {
+ this.expandedKeys.push(a.label)
+ })
+ this.selectStandardTreeLoading=false
+ })
+ },
+ filterNode(value, data) {
+ if (!value) return true;
+ return data.label.indexOf(value) !== -1;
+ },
+ activeStandardTree() {
+ let trees = this.selectTree.split(" - ")
+ if (trees.length < 3) {
+ this.$message.error('鏈�夋嫨瀵硅薄')
+ return
+ }
+ this.addObj.factory = trees[0]
+ this.addObj.laboratory = trees[1]
+ this.addObj.sampleType = trees[2]
+ if (trees[3] === undefined || trees[3] === '' || trees[3] === '- ') {
+ this.addObj.sample = trees[2]
+ } else {
+ this.addObj.sample = trees[3]
+ }
+ this.addObj.model = (trees[4] == undefined ? null : trees[4])
+ this.selectStandardTree = false
+ this.sampleList = []
+ for (var i = 0; i < this.addObj.sampleNum; i++) {
+ this.sample.joinName = null
+ this.sample.joinModel = null
+ this.sample.joinNum = 1
+ this.sample.sample = this.addObj.sample
+ this.sample.model = this.addObj.model
+ this.sample.unit = this.addObj.unit
+ this.sample.standardMethodListId = null
+ this.sample.insProduct = []
+ this.sample.id = this.count
+ this.sample.childSampleList = []
+ this.sample.insulating = null
+ this.sample.sheath = null
+ this.sampleList.push(this.HaveJson(this.sample))
+ this.count++
+ }
+ this.$refs.sampleTable.doLayout()
+ // this.selectsStandardMethodByFLSSM()
+ },
+ selectsStandardMethodByFLSSM() {
+ this.methodLoad = true
+ selectsStandardMethodByFLSSM({tree: this.selectTree}).then(res => {
+ this.methodLoad = false
+ try {
+ if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) {
+ let arr = this.selectTree.split('-')
+ let arr0 = arr.slice(0, arr.length - 1)
+ let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
+ selectsStandardMethodByFLSSM({tree: selectTree}).then(ress => {
+ this.methods = ress.data.standardMethodList
+ })
+ } else {
+ this.methods = res.data.standardMethodList
+ }
+ } catch (e) {}
+ })
+ },
+ addStandardTree() {
+ if (this.selectTree == null) return
+ this.sampleList = []
+ this.productList = []
+ for (var i = 0; i < this.addObj.sampleNum; i++) {
+ this.sample.joinName = null
+ this.sample.joinModel = null
+ this.sample.joinNum = 1
+ this.sample.sample = this.addObj.sample
+ this.sample.model = this.addObj.model
+ this.sample.unit = this.addObj.unit
+ this.sample.standardMethodListId = null
+ this.sample.insProduct = []
+ this.sample.id = parseInt(i+1)
+ this.sample.childSampleList = []
+ this.sample.insulating = null
+ this.sample.sheath = null
+ this.sampleList.push(this.HaveJson(this.sample))
+ // this.count++
+ }
+ },
+ selectSample(val) {
+ this.sampleIds = []
+ val.forEach(a => {
+ this.sampleIds.push(a.id)
+ })
+ this.sampleSelectionList = val
+ },
+ selectProduct(val) {
+ this.productListSelected = val
+ this.productIds = []
+ val.forEach(a => {
+ this.productIds.push(a.id)
+ })
+ },
+ rowClick(row, column, event) {
+ this.currentMethod = row
+ let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId)
+ if (obj && obj.code == '鎶�鏈姹�') {
+ this.isAskOnlyRead = true
+ } else {
+ this.isAskOnlyRead = false
+ }
+ this.sampleId = row.id
+ if (this.active !== 1) {
+ this.sampleIds = []
+ this.sampleSelectionList.forEach(ele=>{
+ if(ele.id == row.id){
+ this.sampleIds.push(row.id)
+ }
+ })
+ }
+ // this.productList = row.insProduct
+ if (this.productList !== null) {
+ setTimeout(() => {
+ this.productList.forEach(a => {
+ if (a.state == 1) this.toggleSelection(a)
+ })
+ }, 200)
+ }
+ },
+ toggleSelection(row) {
+ this.$refs.productTable.toggleRowSelection(row, true);
+ },
+ selectOne(selection, row) {
+ this.bsm1DiaList = []
+ row.state = row.state == 1 ? 0 : 1
+ if(row.section === null) {
+ row.section = ""
+ }
+ if (row.sectionCopy === undefined && row.section) {
+ if (row.section.indexOf('[') > -1) {
+ this.$set(row, 'sectionCopy', row.section)
+ }
+ }
+ if (row.ask.includes('[')) {
+ this.$set(row, 'askCopy', row.ask)
+ }
+ if (row.tell.includes('[')) {
+ this.$set(row, 'tellCopy', row.tell)
+ }
+ // if (row.manHour.includes('[')) {
+ // this.$set(row, 'manHourCopy', row.manHour)
+ // }
+ // if (row.price.includes('[')) {
+ // this.$set(row, 'priceCopy', row.price)
+ // }
+ let arr = this.productList.filter(m=>m.state==1&&row.sectionCopy&&row.sectionCopy.includes(m.sectionCopy)&&m.ask&&m.sectionCopy.indexOf('[')==-1)
+ if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.sectionCopy !== undefined && row.state === 1&&arr.length==0) {
+ if (row.sectionCopy.indexOf('[') > -1) {
+ row.bsmRow = this.HaveJson(row)
+ }
+ row.bsm1 = true
+ this.bsm1DiaList.push(row)
+ this.bsm1DiaAll = true
+ } else if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.state === 0&&arr.length==0) {
+ row.bsm1 = false
+ }else if(arr.length>0){
+ try{
+ row.bsmRow = this.HaveJson(row)
+ let sectionCopy = arr[0].sectionCopy
+ let arr0 = JSON.parse(row.sectionCopy)
+ let arr1 = JSON.parse(row.ask)
+ // let arr2 = JSON.parse(row.manHour)
+ // let arr3 = JSON.parse(row.price)
+ let arr4 = JSON.parse(row.tell)
+ let index = arr0.indexOf(sectionCopy)
+ row.sectionCopy = sectionCopy
+ row.ask = arr1[index]
+ // row.manHour = arr2[index]
+ // row.price = arr3[index]
+ row.tell = arr4[index]
+ } catch(e) {}
+ }
+ this.sampleList.map(item => {
+ if (this.sampleIds.indexOf(item.id) > -1) {
+ item.insProduct.map(m => {
+ if (m.id == row.id) {
+ m.state = row.state;
+ }
+ return m;
+ })
+ }
+ return item
+ })
+ this.changeProductList0()
+ this.currentMethod.insProduct = this.productList0
+ this.getProNum()
+ },
+ permute(nums) {
+ const result = [];
+
+ function backtrack(temp, nums) {
+ if (temp.length === 2) {
+ result.push([...temp]);
+ return;
+ }
+ for (let i = 0; i < nums.length; i++) {
+ if (temp.includes(nums[i])) continue;
+ // 閬垮厤閲嶅鏁板瓧
+ if (temp.length > 0 && nums[i] < temp[temp.length - 1]) continue; // 瑙勫畾椤哄簭锛岄伩鍏嶉噸澶嶇粍鍚�
+ temp.push(nums[i]);
+ backtrack(temp, nums);
+ temp.pop();
+ }
+ }
+ backtrack([], nums);
+ return result;
+ },
+ tableRowClassName({row, rowIndex}) {
+ if (row.state === 0) {
+ return '';
+ }
+ return 'warning-row';
+ },
+ // selectInsOrderTemplateInfo() {
+ // selectInsOrderTemplate({company: this.addObj.company}).then(res => {
+ // this.templates = res.data
+ // })
+ // },
+ methodChange(val, row) {
+ if (val === null || val === '') return
+ if (this.sampleList.length > 1) {
+ // 鏈変袱鏉℃牱鍝佹椂锛岀浜屾潯鏍峰搧淇℃伅鍜岀涓�鏉′繚鎸佷竴鑷�
+ this.sampleList.forEach(item => {
+ item.standardMethodListId = val
+ item.modelNum = row.modelNum
+ })
+ }
+ this.currentMethod = row
+ let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId)
+ if (obj && obj.code == '鎶�鏈姹�') {
+ this.isAskOnlyRead = true
+ } else {
+ this.isAskOnlyRead = false
+ }
+ this.getProductLoad = true
+ let selectTreeList = this.selectTree.split(" - ")
+ this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model)
+ selectStandardProductList({
+ model: this.addObj.model?this.addObj.model:row.model,
+ modelNum: row.modelNum,
+ standardMethodListId: val,
+ factory: selectTreeList.join(" - "),
+ }).then(res => {
+ res.data.forEach(a => {
+ a.state = 0
+ })
+ row.insProduct = this.HaveJson(res.data)
+ this.getProductLoad = false
+ this.productList = row.insProduct
+ this.productList0 = JSON.parse(JSON.stringify(this.productList))
+ this.$refs.sampleTable.setCurrentRow(row)
+ setTimeout(() => {
+ this.productList.forEach(a => {
+ if (a.state == 1) this.toggleSelection(a)
+ })
+ }, 200)
+ })
+ // this.searchTemList()
+ },
+ changeModel() {
+ this.sampleList.forEach(a => {
+ let obj = this.sampleIds.find(b => b == a.id)
+ if (obj) {
+ a.model = this.model
+ }
+ })
+ },
+ changeStandardMethodListId() {
+ this.sampleList.forEach(a => {
+ let obj = this.sampleIds.find(b => b == a.id)
+ if (obj) {
+ a.standardMethodListId = this.standardMethodListId
+ this.methodChange(this.standardMethodListId, a)
+ }
+ })
+ },
+ methodFocus() {
+ this.selectsStandardMethodByFLSSM()
+ },
+ handleChangeModel(e) {
+ this.productList = []
+ let num = this.selectTree.split('-').length;
+ if (num != 5) {
+ this.selectTree = this.selectTree + ' - ' + e
+ } else {
+ let arr = this.selectTree.split('-')
+ let arr0 = arr.slice(0, arr.length - 1)
+ this.selectTree = arr0.join('-') + '- ' + e
+ }
+ },
+ // 瑕佹眰鍊煎彉鍖栨椂
+ requestChange(e, row,type) {
+ //this.currentMethod 褰撳墠鏍峰搧id
+ this.sampleList.forEach(item=>{
+ if(item.id == this.currentMethod.id){
+ item.insProduct.forEach(i=>{
+ if(i.id == row.id){
+ i[type] = e
+ }
+ })
+ }
+ })
+ },
+ selectStandardMethods() {
+ selectStandardMethodEnum().then(res => {
+ this.methods = res.data
+ })
+ },
+ selectable() {
+ if (this.active > 1) {
+ return false
+ } else {
+ return true
+ }
+ },
+ handleAll(e) {
+ if (e.length > 0) {
+ this.productList.map(m => {
+ if(e.find(a=>a.id == m.id)){
+ m.state = 1
+ }
+ return m
+ })
+ } else {
+ this.productList.map(m => {
+ m.state = 0
+ return m
+ })
+ }
+ this.bsmRow3 = [];
+ this.bsm1DiaList = []
+ this.productList.forEach(p => {
+ if (p.sectionCopy === undefined && p.section) {
+ if (p.section.indexOf('[') > -1) {
+ this.$set(p, 'sectionCopy', p.section)
+ }
+ }
+ if (p.ask.includes('[')) {
+ this.$set(p, 'askCopy', p.ask)
+ }
+ if (p.tell.includes('[')) {
+ this.$set(p, 'tellCopy', p.tell)
+ }
+ // if (p.manHour.includes('[')) {
+ // this.$set(p, 'manHourCopy', p.manHour)
+ // }
+ // if (p.price.includes('[')) {
+ // this.$set(p, 'priceCopy', p.price)
+ // }
+ if (p.bsm === '1' && p.sectionCopy !== '' && p.sectionCopy !== null && p.sectionCopy !== undefined && p.state === 1) {
+ if (p.sectionCopy.indexOf('[') > -1) {
+ p.bsmRow = this.HaveJson(p)
+ }
+ p.bsm1 = true
+ this.bsm1DiaList.push(p)
+ this.bsm1DiaAll = true
+ } else if (p.bsm === '1' && p.sectionCopy !== '' && p.sectionCopy !== null && p.state === 0) {
+ p.bsm1 = false
+ }
+ })
+ if (e.length > 0) {
+ this.sampleList.map(item => {
+ if (this.sampleIds.indexOf(item.id) > -1) {
+ item.insProduct.map(m => {
+ m.state = 1
+ return m;
+ })
+ }
+ return item
+ })
+ } else {
+ this.sampleList.map(item => {
+ if (this.sampleIds.indexOf(item.id) > -1) {
+ item.insProduct.map(m => {
+ m.state = 0
+ return m;
+ })
+ }
+ return item
+ })
+ }
+ this.changeProductList0()
+ this.currentMethod.insProduct = this.productList0
+ this.getProNum()
+ this.$nextTick(() => {
+ this.$refs.productTable.doLayout()
+ })
+ },
+ filterHandler(value, row, column) {
+ const property = column['property'];
+ return row[property] === value;
+ },
+ // 鍏ㄩ�夌壒娈婂�煎鐞嗘閫夋嫨瑕佹眰鍊肩殑鍥炶皟
+ upBsmAll (item) {
+ const i = this.bsm1DiaList.findIndex(obj => obj.id === item.id)
+ if (i > -1) {
+ // 鎵惧埌鐩稿簲鐨勬楠岄」璧嬪��
+ this.bsm1DiaList[i].bsm1Val = item.bsm1Val
+ let sections = this.bsm1DiaList[i].bsmRow.sectionCopy && JSON.parse(this.bsm1DiaList[i].bsmRow.sectionCopy);
+ let asks = this.bsm1DiaList[i].bsmRow.askCopy && JSON.parse(this.bsm1DiaList[i].bsmRow.askCopy);
+ let tells = this.bsm1DiaList[i].bsmRow.tellCopy && JSON.parse(this.bsm1DiaList[i].bsmRow.tellCopy);
+ // let manHours = this.bsm1DiaList[i].bsmRow.manHourCopy && JSON.parse(this.bsm1DiaList[i].bsmRow.manHourCopy);
+ // let prices = this.bsm1DiaList[i].bsmRow.priceCopy && JSON.parse(this.bsm1DiaList[i].bsmRow.priceCopy);
+ for (var a in sections) {
+ if (this.bsm1DiaList[i].bsm1Val === sections[a]) {
+ this.productList.forEach(p => {
+ // 灏嗛�夋嫨濂界殑瑕佹眰鍊艰祴鍊煎埌鍒楄〃閲�
+ if (p.id === this.bsm1DiaList[i].bsmRow.id) {
+ p.section = sections[a]
+ p.ask = asks[a]
+ p.tell = tells[a]
+ // p.manHour = manHours[a]
+ // p.price = prices[a]
+ }
+ })
+ break
+ }
+ }
+ }
+ this.changeProductList0()
+ this.currentMethod.insProduct = this.productList0
+ },
+ save1 () {
+ if (this.bsm1DiaList.length > 0) {
+ this.bsm1DiaList.forEach(item => {
+ if (!item.bsm1Val) {
+ throw this.$message.error('鐗规畩椤圭洰蹇呴』澶勭悊')
+ }
+ })
+ }
+ this.bsm1DiaAll = false
+ },
+ beforeClose(done) {
+ if (this.bsm1DiaList.length > 0) {
+ this.bsm1DiaList.forEach(item => {
+ if (!item.bsm1Val) {
+ throw this.$message.error('鐗规畩椤圭洰蹇呴』澶勭悊')
+ }
+ })
+ }
+ done()
+ },
+ beforeClose0(done) {
+ if (!this.bsm3Val) {
+ this.$message.error('RST蹇呴』濉啓')
+ return
+ } else {
+ if (Array.isArray(this.bsmRow3)) {
+ this.bsmRow3.forEach(item => {
+ item.rts = this.bsm3Val
+ })
+ } else {
+ this.bsmRow3.rts = this.bsm3Val
+ }
+ }
+ done()
+ },
+ getTotal() {
+ this.totalArr = []
+ // this.total = 0;
+ this.sampleList.forEach(item => {
+ if (item.insProduct && item.insProduct.length > 0) {
+ item.insProduct.forEach(a => {
+ this.totalArr.push(a)
+ })
+ }
+ if (item.bushing && item.bushing.length > 0) {
+ item.bushing.forEach(a => {
+ if (a.fiber && a.fiber.length > 0) {
+ a.fiber.forEach(b => {
+ if (b.productList && b.productList.length > 0) {
+ b.productList.forEach(c => {
+ this.totalArr.push(c)
+ })
+ }
+ })
+ }
+ if (a.fibers && a.fibers.length > 0) {
+ a.fibers.forEach(b => {
+ if (b.productList && b.productList.length > 0) {
+ b.productList.forEach(c => {
+ this.totalArr.push(c)
+ })
+ }
+ if (b.fiber && b.fiber.length > 0) {
+ b.fiber.forEach(c => {
+ if (c.productList && c.productList.length > 0) {
+ c.productList.forEach(d => {
+ this.totalArr.push(d)
+ })
+ }
+ })
+ }
+ })
+ }
+ })
+ }
+ })
+ let mySet = new Set();
+ let arr0 = this.totalArr.filter(item => {
+ if (item.state == 1) {
+ let num1 = mySet.size
+ if (item.manHourGroup === '' || !item.manHourGroup) {
+ return true
+ } else {
+ mySet.add(item.manHourGroup)
+ let num2 = mySet.size
+ if (num2 > num1) {
+ return true
+ } else {
+ return false
+ }
+ }
+ }
+ })
+ // arr0.forEach(item => {
+ // this.total += Number(item.price)
+ // })
+
+ },
+ goBack () {
+ if (this.active == 1) {
+ this.$router.go(-1)
+ } else {
+ this.closeOpenPage()
+ }
+ },
+ closeOpenPage() {
+ this.$router.go(-1)
+ this.$tab.closeOpenPage()
+ },
+ }
+}
+</script>
+<style scoped>
+.header {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 10px;
+}
+>>>.warning-row {
+ color: #1890FF;
+}
+.node_i {
+ color: orange;
+ font-size: 18px;
+}
+</style>
diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspectionOrder.vue
similarity index 98%
rename from src/views/business/materialOrder/customsInspection.vue
rename to src/views/business/materialOrder/customsInspectionOrder.vue
index e9a28fa..cfb2675 100644
--- a/src/views/business/materialOrder/customsInspection.vue
+++ b/src/views/business/materialOrder/customsInspectionOrder.vue
@@ -12,9 +12,13 @@
<el-select v-show="active==1" v-model="template" placeholder="涓嬪崟妯℃澘" size="small" style="margin-right: 10px;"
@change="selectInsOrderTemplateByIdList">
<el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id">
- <span style="float: left">{{ a.name }}</span>
- <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px"
- @click.stop="handleDelete(a)"></i>
+ <div style="display: flex; align-items: center; justify-content: space-between;">
+ <span>{{ a.name }}</span>
+ <i class="el-icon-delete"
+ style="color: #66b1ff; font-size: 16px; cursor: pointer;"
+ @click.stop="handleDelete(a)">
+ </i>
+ </div>
</el-option>
</el-select>
<el-button v-show="active==1" size="small" @click="templateDia=true">
@@ -32,17 +36,17 @@
<el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px">
<el-row>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="閲囪喘璁㈠崟鍙�:">
+ <el-form-item class="addObj-form-item" label="閲囪喘璁㈠崟鍙�:" prop="orderNo">
<el-input v-model="addObj.orderNo" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="濮旀墭鍗曚綅:">
+ <el-form-item class="addObj-form-item" label="濮旀墭鍗曚綅:" prop="company">
<el-input v-model="addObj.company" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鎺ユ敹鏃堕棿:">
+ <el-form-item class="addObj-form-item" label="鎺ユ敹鏃堕棿:" prop="receiverDate">
<el-date-picker
v-model="addObj.receiverDate"
disabled
@@ -55,29 +59,29 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="闆朵欢鍙�:">
+ <el-form-item class="addObj-form-item" label="闆朵欢鍙�:" prop="partNo">
<el-input v-model="addObj.partNo" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鏍峰搧鍚嶇О:">
+ <el-form-item class="addObj-form-item" label="鏍峰搧鍚嶇О:" prop="sample">
<el-input v-model="addObj.sample" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鏍峰搧鎬绘暟:">
+ <el-form-item class="addObj-form-item" label="鏍峰搧鎬绘暟:" prop="qtyArrived">
<el-input v-model="addObj.qtyArrived" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鎶ユ浜�:">
+ <el-form-item class="addObj-form-item" label="鎶ユ浜�:" prop="declareUser">
<el-input v-model="addObj.declareUser" class="addObj-info" clearable disabled size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鎵规鍙�:">
+ <el-form-item class="addObj-form-item" label="鎵规鍙�:" prop="updateBatchNo">
<el-input v-model="addObj.updateBatchNo" class="addObj-info" clearable disabled size="small"></el-input>
</el-form-item>
</el-col>
@@ -133,7 +137,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="澶囨敞:">
+ <el-form-item class="addObj-form-item" label="澶囨敞:" prop="remark">
<el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small" type="textarea"></el-input>
</el-form-item>
@@ -356,10 +360,9 @@
</span>
</el-dialog>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
- :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
:show-close="false" :visible.sync="bsm3Dia"
title="鍖洪棿鍊煎~鍐�" width="800px">
- <el-table :data="editTable" height="80vh" style="width: 100%">
+ <el-table :data="editTable" height="80vh" style="width: 100%" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<!-- inspectionItemList -->
<el-table-column label="妫�楠岄」" prop="inspectionItemList" width="180">
</el-table-column>
@@ -450,7 +453,7 @@
} from "@/api/business/rawMaterialOrder";
export default {
- name: "CustomsInspection",
+ name: "CustomsInspectionOrder",
dicts: ['check_type', 'urgency_level'],
components: {},
props: {
@@ -607,9 +610,10 @@
}
},
watch: {
- sampleList() {
- this.addObj.method = null
- },
+ // sampleList() {
+ // this.addObj.method = null
+ // this.productList = []
+ // },
productList: {
deep: true,
handler(val) {
@@ -652,11 +656,9 @@
this.customsInspection = this.$route.query.customsInspection
this.getInfo();
},
- getInfo() {
- this.getUserNowList() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅
- this.selectStandardMethods() // 鑾峰彇妫�楠屾爣鍑嗕笅鎷夋鏁版嵁
- this.getInfo() // 鑾峰彇鏁版嵁
- },
+ // getInfo() {
+ // this.getInfo() // 鑾峰彇鏁版嵁
+ // },
methods: {
save1 () {
if (this.bsm1DiaList.length > 0) {
@@ -697,6 +699,8 @@
},
// 鑾峰彇鏁版嵁
getInfo () {
+ this.getUserNowList() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅
+ this.selectStandardMethods() // 鑾峰彇妫�楠屾爣鍑嗕笅鎷夋鏁版嵁
if (this.active == 2) {
let orderId = ''
if (!this.customsInspection.enterOrderId && this.customsInspection.quarterOrderId) {
diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspectionView.vue
similarity index 98%
copy from src/views/business/materialOrder/customsInspection.vue
copy to src/views/business/materialOrder/customsInspectionView.vue
index e9a28fa..33b7687 100644
--- a/src/views/business/materialOrder/customsInspection.vue
+++ b/src/views/business/materialOrder/customsInspectionView.vue
@@ -32,17 +32,17 @@
<el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px">
<el-row>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="閲囪喘璁㈠崟鍙�:">
+ <el-form-item class="addObj-form-item" label="閲囪喘璁㈠崟鍙�:" prop="orderNo">
<el-input v-model="addObj.orderNo" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="濮旀墭鍗曚綅:">
+ <el-form-item class="addObj-form-item" label="濮旀墭鍗曚綅:" prop="company">
<el-input v-model="addObj.company" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鎺ユ敹鏃堕棿:">
+ <el-form-item class="addObj-form-item" label="鎺ユ敹鏃堕棿:" prop="receiverDate">
<el-date-picker
v-model="addObj.receiverDate"
disabled
@@ -55,29 +55,29 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="闆朵欢鍙�:">
+ <el-form-item class="addObj-form-item" label="闆朵欢鍙�:" prop="partNo">
<el-input v-model="addObj.partNo" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鏍峰搧鍚嶇О:">
+ <el-form-item class="addObj-form-item" label="鏍峰搧鍚嶇О:" prop="sample">
<el-input v-model="addObj.sample" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鏍峰搧鎬绘暟:">
+ <el-form-item class="addObj-form-item" label="鏍峰搧鎬绘暟:" prop="qtyArrived">
<el-input v-model="addObj.qtyArrived" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鎶ユ浜�:">
+ <el-form-item class="addObj-form-item" label="鎶ユ浜�:" prop="declareUser">
<el-input v-model="addObj.declareUser" class="addObj-info" clearable disabled size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="鎵规鍙�:">
+ <el-form-item class="addObj-form-item" label="鎵规鍙�:" prop="updateBatchNo">
<el-input v-model="addObj.updateBatchNo" class="addObj-info" clearable disabled size="small"></el-input>
</el-form-item>
</el-col>
@@ -133,7 +133,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item class="addObj-form-item" label="澶囨敞:">
+ <el-form-item class="addObj-form-item" label="澶囨敞:" prop="remark">
<el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small" type="textarea"></el-input>
</el-form-item>
@@ -356,10 +356,9 @@
</span>
</el-dialog>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
- :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
:show-close="false" :visible.sync="bsm3Dia"
title="鍖洪棿鍊煎~鍐�" width="800px">
- <el-table :data="editTable" height="80vh" style="width: 100%">
+ <el-table :data="editTable" height="80vh" style="width: 100%" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<!-- inspectionItemList -->
<el-table-column label="妫�楠岄」" prop="inspectionItemList" width="180">
</el-table-column>
@@ -450,7 +449,7 @@
} from "@/api/business/rawMaterialOrder";
export default {
- name: "CustomsInspection",
+ name: "CustomsInspectionView",
dicts: ['check_type', 'urgency_level'],
components: {},
props: {
@@ -609,6 +608,7 @@
watch: {
sampleList() {
this.addObj.method = null
+ this.productList = []
},
productList: {
deep: true,
@@ -652,11 +652,9 @@
this.customsInspection = this.$route.query.customsInspection
this.getInfo();
},
- getInfo() {
- this.getUserNowList() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅
- this.selectStandardMethods() // 鑾峰彇妫�楠屾爣鍑嗕笅鎷夋鏁版嵁
- this.getInfo() // 鑾峰彇鏁版嵁
- },
+ // getInfo() {
+ // this.getInfo() // 鑾峰彇鏁版嵁
+ // },
methods: {
save1 () {
if (this.bsm1DiaList.length > 0) {
@@ -697,6 +695,8 @@
},
// 鑾峰彇鏁版嵁
getInfo () {
+ this.getUserNowList() // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅
+ this.selectStandardMethods() // 鑾峰彇妫�楠屾爣鍑嗕笅鎷夋鏁版嵁
if (this.active == 2) {
let orderId = ''
if (!this.customsInspection.enterOrderId && this.customsInspection.quarterOrderId) {
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index a263e75..770931d 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -49,7 +49,7 @@
</el-select>
</el-form-item>
<el-form-item label="涓嬪彂鏃堕棿" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
- <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+ <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" @change="goSearch"
range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="daterange" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
@@ -59,15 +59,15 @@
<div class="table-tab">
<div>
<ul class="tab">
- <li :class="{ active: tabIndex === 0 }" @click="handleTab(0)">寰呬笅鍗�</li>
- <li :class="{ active: tabIndex === 1 }" @click="handleTab(1)">妫�楠屼腑</li>
- <li :class="{ active: tabIndex === 2 }" @click="handleTab(2)">宸叉楠�</li>
- <li :class="{ active: tabIndex === 4 }" @click="handleTab(4)">瀛e害妫�楠�</li>
+ <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:raw:await'])" @click="handleTab(0)">寰呬笅鍗�</li>
+ <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:raw:testing'])" @click="handleTab(1)">妫�楠屼腑</li>
+ <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:raw:check'])" @click="handleTab(2)">宸叉楠�</li>
+ <li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:raw:quarterCheck'])" @click="handleTab(4)">瀛e害妫�楠�</li>
<li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:Ifs:ByAll'])" @click="handleTab(3)">鍏ㄩ儴</li>
</ul>
</div>
<div>
- <el-button v-show="tabIndex === 3 || tabIndex === 2" :loading="outLoading" size="small" type="primary"
+ <el-button v-show="tabIndex === 3" :loading="outLoading" size="small" type="primary"
@click="handleOut">瀵煎嚭</el-button>
<el-button v-if="tabIndex === 0" size="small" type="primary" @click="copper">閾滄潗鏂欎笅鍗�</el-button>
<el-button v-if="tabIndex !== 0" size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
@@ -76,9 +76,8 @@
<!--寰呬笅鍗�-->
<div class="table">
<lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
- ref="tableData"
- :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'" key="tableData" :page="page"
- :tableLoading="tableLoading"></lims-table>
+ ref="tableData" :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'"
+ key="tableData" :page="page" :tableLoading="tableLoading"></lims-table>
</div>
<!--妫�楠屼腑-->
<div class="table">
@@ -476,6 +475,11 @@
disabled: (row) => {
return row.isQuarter == 0
},
+ showHide: (row) => {
+ return this.checkPermi([
+ "get:raw:check:operation",
+ ]);
+ },
},
{
name: '鏁版嵁鏌ョ湅',
@@ -489,14 +493,14 @@
type: 'text',
clickFun: (row) => {
this.handleFileLook(row);
- },
+ }
},
{
name: '鎶ュ憡涓嬭浇',
type: 'text',
clickFun: (row) => {
this.download(row);
- },
+ }
},
{
name: '鍘熷璁板綍',
@@ -517,6 +521,11 @@
disabled: (row) => {
return row.inspectStatus != 2
},
+ showHide: (row) => {
+ return this.checkPermi([
+ "get:raw:check:operation",
+ ]);
+ },
},
{
name: '瀛e害鎾ら攢',
@@ -526,6 +535,11 @@
},
disabled: (row) => {
return row.quarterOrderId == null || row.quarterReportId != null
+ },
+ showHide: (row) => {
+ return this.checkPermi([
+ "get:raw:check:operation",
+ ]);
},
},
]
@@ -836,7 +850,7 @@
}
],
more: false,
- tabIndex: 0,
+ tabIndex: '',
multipleSelection: [],
active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪�
orderType: 0, //0锛氬師鏉愭枡涓嬪崟锛�1锛氬搴︽楠屼笅鍗�
@@ -881,6 +895,11 @@
...mapGetters(['nickName'])
},
mounted() {
+ if (this.checkPermi(['get:raw:await'])) {
+ this.tabIndex = 0
+ } else {
+ this.tabIndex = 2
+ }
this.refreshTable()
},
activated () {
@@ -1089,31 +1108,57 @@
let inspectorList = []
inspectorList.push(this.nickName)
this.InspectInfoDialog = false
- this.$router.push({
- path: "/inspectionTask/inspection",
- query: {
- sonLaboratory: '鍘熸潗鏂�',
- state: 3,
- typeSource: this.insInfo.typeSource,
- orderId: this.insInfo.enterOrderId,
- inspectorList: inspectorList,
- },
- })
+ if (this.checkPermi(['business:inspectionView'])) {
+ this.$router.push({
+ name: "InspectionView",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.enterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ } else {
+ this.$router.push({
+ path: "/inspectionTask/inspection",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.enterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ }
},
viewInsInfo1() {
let inspectorList = []
inspectorList.push(this.nickName)
this.InspectInfoDialog = false
- this.$router.push({
- path: "/inspectionTask/inspection",
- query: {
- sonLaboratory: '鍘熸潗鏂�',
- state: 3,
- typeSource: this.insInfo.typeSource,
- orderId: this.insInfo.quarterOrderId,
- inspectorList: inspectorList,
- },
- })
+ if (this.checkPermi(['business:inspectionView'])) {
+ this.$router.push({
+ name: "InspectionView",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.quarterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ } else {
+ this.$router.push({
+ path: "/inspectionTask/inspection",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.quarterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ }
},
goback() {
this.state = 0
@@ -1125,7 +1170,6 @@
},
// 閾滄潗鏂欎笅鍗�
copper() {
- this.$router.push("/materialOrder/copperOrder");
this.$router.push({ path: "/materialOrder/copperOrder", query: { active: 1 } });
},
// 鎵撳紑鏍囩鎵撳嵃寮规
@@ -1146,20 +1190,20 @@
},
// 涓嬪崟
playOrder(row) {
- this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 0, customsInspection: row, active: 1 } });
+ this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 0, customsInspection: row, active: 1 } });
},
// 瀛e害妫�楠屼笅鍗�
playOrderSec(row) {
- this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 1, customsInspection: row, active: 1 } });
+ this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 1, customsInspection: row, active: 1 } });
},
// 鐐瑰嚮鏍峰搧鍚嶇О鏌ョ湅璇︽儏
selectAllByOne(row) {
if (row.isCopper == 1) {
this.currentId = row.enterOrderId
- this.$router.push({ path: "/materialOrder/copperOrder", query: { customsInspection: row, active: 2, currentId: this.currentId } });
+ this.$router.push({ path: "/materialOrder/CopperView", query: { customsInspection: row, active: 2, currentId: this.currentId } });
} else {
this.currentId = row.insOrderId
- this.$router.push({ path: "/materialOrder/customsInspection", query: { customsInspection: row, active: 2, currentId: this.currentId } });
+ this.$router.push({ path: "/materialOrder/customsInspectionView", query: { customsInspection: row, active: 2, currentId: this.currentId } });
}
},
// 鎵撳紑鍏嶆寮规
@@ -1306,10 +1350,14 @@
},
// 瀵煎嚭
handleOut() {
- 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 => {
+ let params = {}
+ if (this.multipleSelection.length > 0) {
+ params.ids = this.multipleSelection.map(item => item.id).join(',');
+ } else {
+ params = {...this.entity}
+ }
+ rawAllExport(params).then(res => {
this.outLoading = false
const blob = new Blob([res], { type: 'application/octet-stream' });
this.$download.saveAs(blob, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx');
@@ -1337,6 +1385,7 @@
// 鍒囨崲涓嬪崟tab琛ㄦ牸
handleTab(m) {
this.tabIndex = m;
+ this.multipleSelection = []
this.refreshTable()
},
// 琛ㄦ牸閫夋嫨鏂规硶
diff --git a/src/views/business/materialOrderComponents/materialOrder/showInfo.vue b/src/views/business/materialOrderComponents/materialOrder/showInfo.vue
index 1a902e7..4dab747 100644
--- a/src/views/business/materialOrderComponents/materialOrder/showInfo.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/showInfo.vue
@@ -34,12 +34,6 @@
methods: {
getInfo (id) {
console.log('id----', id)
- this.$axios.get(this.$api.rawMaterialOrder.getIndustryChain + '?id=' + id).then(res => {
- if (res.code === 200 && res.data !== null) {
- this.infoLIst = JSON.parse(res.data)
- console.log('this.infoLIst----', this.infoLIst)
- }
- })
}
},
}
diff --git a/src/views/business/productOrder/components/addInspectionDia.vue b/src/views/business/productOrder/components/addInspectionDia.vue
index ae76551..b689ac4 100644
--- a/src/views/business/productOrder/components/addInspectionDia.vue
+++ b/src/views/business/productOrder/components/addInspectionDia.vue
@@ -27,9 +27,9 @@
size="small"></el-input>
</template>
</el-table-column>
- <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodListId">
+ <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodName">
<template slot-scope="scope">
- <el-input v-model="scope.row.standardMethodListId" clearable disabled placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
+ <el-input v-model="scope.row.standardMethodName" clearable disabled placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
size="small"></el-input>
</template>
</el-table-column>
diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/addOrder.vue
similarity index 96%
copy from src/views/business/productOrder/components/add.vue
copy to src/views/business/productOrder/components/addOrder.vue
index a8d1468..7ec4513 100644
--- a/src/views/business/productOrder/components/add.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -14,9 +14,13 @@
<el-select v-show="active==1" v-model="template" placeholder="涓嬪崟妯℃澘" size="small"
@change="selectInsOrderTemplateById">
<el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id">
- <span style="float: left">{{ a.name }}</span>
- <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px"
- @click.stop="handleDelete(a)"></i>
+ <div style="display: flex; align-items: center; justify-content: space-between;">
+ <span>{{ a.name }}</span>
+ <i class="el-icon-delete"
+ style="color: #66b1ff; font-size: 16px; cursor: pointer;"
+ @click.stop="handleDelete(a)">
+ </i>
+ </div>
</el-option>
</el-select>
<el-button v-show="active==1" size="small" @click="templateDia=true">
@@ -41,7 +45,7 @@
<el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right">
<el-row>
<el-col :span="6">
- <el-form-item label="濮旀墭缂栧彿:">
+ <el-form-item label="濮旀墭缂栧彿:" prop="entrustCode">
<el-input v-model="addObj.entrustCode" clearable disabled placeholder="绯荤粺鐢熸垚" size="small"></el-input>
</el-form-item>
</el-col>
@@ -53,7 +57,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鍒跺崟浜�:">
+ <el-form-item label="鍒跺崟浜�:" prop="custom">
<el-input v-model="addObj.custom" disabled size="small" clearable></el-input>
</el-form-item>
</el-col>
@@ -117,7 +121,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:">
+ <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:" prop="send">
<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>
@@ -127,7 +131,7 @@
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:">
+ <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:" prop="processing">
<el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini" style="display: flex; flex-direction: column;">
<el-radio :label="0" border style="margin-right: 0">濮旀墭鍗曚綅鍙栧洖</el-radio>
<el-radio :label="1" border>瀹為獙瀹ゅ鐞�</el-radio>
@@ -147,7 +151,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鏄惁鐣欐牱:">
+ <el-form-item label="鏄惁鐣欐牱:" prop="isLeave">
<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>
@@ -157,23 +161,23 @@
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item label="濮旀墭浜�:">
+ <el-form-item label="濮旀墭浜�:" prop="prepareUser">
<el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="濮旀墭浜鸿嫳鏂�:">
+ <el-form-item label="濮旀墭浜鸿嫳鏂�:" prop="prepareUserEn">
<el-input v-model="addObj.prepareUserEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="澶囨敞:">
+ <el-form-item label="澶囨敞:" prop="remark">
<el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small" style="width: 100%" type="textarea"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="澶囨敞鑻辨枃:">
+ <el-form-item label="澶囨敞鑻辨枃:" prop="remarkEn">
<el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small" type="textarea"></el-input>
</el-form-item>
@@ -181,19 +185,19 @@
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item label="鏍峰搧鍚嶇О:">
+ <el-form-item label="鏍峰搧鍚嶇О:" prop="sampleView">
<el-input v-model="addObj.sampleView" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鏍峰搧鍚嶇О鑻辨枃:">
+ <el-form-item label="鏍峰搧鍚嶇О鑻辨枃:" prop="sampleViewEn">
<el-input v-model="addObj.sampleViewEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="濮旀墭浜哄伐鍙�:">
+ <el-form-item label="濮旀墭浜哄伐鍙�:" prop="prepareCode">
<el-input v-model="addObj.prepareCode" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small"></el-input>
</el-form-item>
@@ -356,11 +360,6 @@
size="small" type="textarea"
@change="e=>requestChange(e,scope.row,'radius')">
</el-input>
-<!-- <el-select v-else-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙') && (active==1||tabIndex==4)" v-model="scope.row.radius" clearable-->
-<!-- placeholder="鏉′欢"-->
-<!-- size="small" @change="e=>requestChange(e,scope.row,'radius')">-->
-<!-- <el-option v-for="(a,i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>-->
-<!-- </el-select>-->
<span v-else>{{scope.row.radius}}</span>
</template>
</el-table-column>
@@ -379,16 +378,10 @@
</el-table-column>
<el-table-column label="璁¢噺鍗曚綅" prop="unit" show-overflow-tooltip width="100"></el-table-column>
<el-table-column label="鍗曚环" prop="price" show-overflow-tooltip width="100"></el-table-column>
- <!-- <el-table-column prop="manDay" label="棰勮鏃堕棿(澶�)" width="120" show-overflow-tooltip></el-table-column>
- <el-table-column prop="manHour" label="宸ユ椂绯绘暟" width="100" show-overflow-tooltip></el-table-column> -->
- <!-- <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> -->
<el-table-column label="鍖洪棿" min-width="120" prop="section" show-overflow-tooltip></el-table-column>
<el-table-column :filter-method="filterHandler" :filters="filters" label="瀛愬疄楠屽" min-width="130" prop="sonLaboratory"
show-overflow-tooltip></el-table-column>
- <el-table-column v-if="isSpecial&&active==1"
- fixed="right"
- label="鎿嶄綔"
- width="100">
+ <el-table-column v-if="isSpecial&&active==1" label="鎿嶄綔" width="100">
<template slot-scope="scope">
<el-button v-if="!scope.row.repetitionTag" size="small" type="text" @click="addProductList(productList,scope.row,scope.$index)">鎻掑叆琛�</el-button>
<el-button v-if="!!scope.row.repetitionTag&&scope.row.delete" size="small" type="text" @click="deleteProductList(scope.$index,productList)">鍒犻櫎</el-button>
@@ -611,14 +604,14 @@
import {mapGetters} from "vuex";
export default {
- name: 'Add',
+ name: 'AddOrder',
components: {
limsTable,
cableConfig,
AuxiliaryWireCore
},
computed:{
- ...mapGetters(["nickName"]),
+ ...mapGetters(["nickName", 'nameEn', 'userName']),
},
dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'],
data() {
@@ -804,10 +797,10 @@
}
},
watch: {
- sampleList() {
- this.addObj.method = null
- this.productList = []
- },
+ // sampleList() {
+ // this.addObj.method = null
+ // this.productList = []
+ // },
productList: {
deep: true,
handler(val) {
@@ -851,7 +844,13 @@
this.active = this.$route.query.active
this.tabIndex = this.$route.query.tabIndex
this.currentId = this.$route.query.currentId
+ this.getUserNowData()
this.getInfo()
+ if(this.tabIndex==4&&this.active==2){
+ this.isSpecial = true
+ }else{
+ this.isSpecial = false
+ }
},
activated() {
this.active = this.$route.query.active
@@ -861,11 +860,9 @@
},
methods: {
getInfo() {
- this.getUserNowData()
this.selectStandardTreeList()
this.getAuthorizedPerson();
this.selectStandardMethods()
- this.getPrepareUser() // 澶嶅埗褰撳墠璐﹀彿浜轰负濮旀墭浜�
if (this.active != 1) {
// 鏌ョ湅/瀹℃牳娴佺▼
// 璇锋眰鎺ュ彛锛屽洖鏄炬暟鎹�
@@ -889,16 +886,7 @@
})
})
}
- if(this.tabIndex==4&&this.active==2){
- this.isSpecial = true
- }else{
- this.isSpecial = false
- }
- },
- 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 () {
@@ -1130,7 +1118,9 @@
sampleList.forEach(a => {
if (a.insProduct.length > 0) {
a.insProduct.forEach(c => {
- delete c.id
+ if (this.tabIndex != 4) {
+ delete c.id
+ }
})
}
if (a.endModels) {
@@ -1168,7 +1158,9 @@
sampleList.forEach(a => {
if (a.insProduct.length > 0) {
a.insProduct.forEach(c => {
- delete c.id
+ if (this.tabIndex != 4) {
+ delete c.id
+ }
})
}
if (a.endModels) {
@@ -1267,14 +1259,16 @@
}
},
saveMethod(sampleList){
- console.log('sampleList----', sampleList)
this.saveLoad = true
if (this.addObj.quarterItemId) {
this.addObj.quarterItemId = this.addObj.quarterItemId[1]
}
if(this.tabIndex==4&&this.active==2){
+ if (this.addObj.createTime) {
+ delete this.addObj.createTime
+ }
// 閫�鍥炲悗鎻愪氦
- updateInsOrder({insOrder: this.addObj, sampleList: sampleList}).then(res => {
+ updateInsOrder({insOrder: this.addObj, sampleProduct: sampleList}).then(res => {
this.saveLoad = false
this.$message.success('宸叉彁浜�')
this.bsm3Dia = false;
@@ -1353,6 +1347,9 @@
})
},
getUserNowData() {
+ this.addObj.prepareUser = this.nickName
+ this.addObj.prepareUserEn = this.nameEn
+ this.addObj.prepareCode = this.userName
getUserNow().then(res => {
let selects = res.data
if (selects == null) return
@@ -1408,7 +1405,6 @@
if (node.data.code === '[3]') {
this.sampleViewEn = val.sampleTypeEn
} else if (node.data.code === '[4]') {
- console.log('node.data---', node.data)
if (node.data.children!==null && node.data.children.length>0) {
this.sampleViewEn = val.sampleEn
}
@@ -1654,7 +1650,6 @@
},
tableRowClassName({row, rowIndex}) {
if (row.state == 1) {
- console.log('row.state---', row.state)
return 'warning-row';
} else {
return '';
@@ -2221,4 +2216,8 @@
>>>.warning-row {
color: #1890FF;
}
+.node_i {
+ color: orange;
+ font-size: 18px;
+}
</style>
diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/addView.vue
similarity index 97%
rename from src/views/business/productOrder/components/add.vue
rename to src/views/business/productOrder/components/addView.vue
index a8d1468..b5ba69f 100644
--- a/src/views/business/productOrder/components/add.vue
+++ b/src/views/business/productOrder/components/addView.vue
@@ -41,7 +41,7 @@
<el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right">
<el-row>
<el-col :span="6">
- <el-form-item label="濮旀墭缂栧彿:">
+ <el-form-item label="濮旀墭缂栧彿:" prop="entrustCode">
<el-input v-model="addObj.entrustCode" clearable disabled placeholder="绯荤粺鐢熸垚" size="small"></el-input>
</el-form-item>
</el-col>
@@ -53,7 +53,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鍒跺崟浜�:">
+ <el-form-item label="鍒跺崟浜�:" prop="custom">
<el-input v-model="addObj.custom" disabled size="small" clearable></el-input>
</el-form-item>
</el-col>
@@ -117,7 +117,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:">
+ <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:" prop="send">
<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>
@@ -127,7 +127,7 @@
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:">
+ <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:" prop="processing">
<el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini" style="display: flex; flex-direction: column;">
<el-radio :label="0" border style="margin-right: 0">濮旀墭鍗曚綅鍙栧洖</el-radio>
<el-radio :label="1" border>瀹為獙瀹ゅ鐞�</el-radio>
@@ -147,7 +147,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鏄惁鐣欐牱:">
+ <el-form-item label="鏄惁鐣欐牱:" prop="isLeave">
<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>
@@ -157,23 +157,23 @@
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item label="濮旀墭浜�:">
+ <el-form-item label="濮旀墭浜�:" prop="prepareUser">
<el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="濮旀墭浜鸿嫳鏂�:">
+ <el-form-item label="濮旀墭浜鸿嫳鏂�:" prop="prepareUserEn">
<el-input v-model="addObj.prepareUserEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="澶囨敞:">
+ <el-form-item label="澶囨敞:" prop="remark">
<el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small" style="width: 100%" type="textarea"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="澶囨敞鑻辨枃:">
+ <el-form-item label="澶囨敞鑻辨枃:" prop="remarkEn">
<el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small" type="textarea"></el-input>
</el-form-item>
@@ -181,19 +181,19 @@
</el-row>
<el-row>
<el-col :span="6">
- <el-form-item label="鏍峰搧鍚嶇О:">
+ <el-form-item label="鏍峰搧鍚嶇О:" prop="sampleView">
<el-input v-model="addObj.sampleView" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="鏍峰搧鍚嶇О鑻辨枃:">
+ <el-form-item label="鏍峰搧鍚嶇О鑻辨枃:" prop="sampleViewEn">
<el-input v-model="addObj.sampleViewEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="濮旀墭浜哄伐鍙�:">
+ <el-form-item label="濮旀墭浜哄伐鍙�:" prop="prepareCode">
<el-input v-model="addObj.prepareCode" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
size="small"></el-input>
</el-form-item>
@@ -356,11 +356,6 @@
size="small" type="textarea"
@change="e=>requestChange(e,scope.row,'radius')">
</el-input>
-<!-- <el-select v-else-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙') && (active==1||tabIndex==4)" v-model="scope.row.radius" clearable-->
-<!-- placeholder="鏉′欢"-->
-<!-- size="small" @change="e=>requestChange(e,scope.row,'radius')">-->
-<!-- <el-option v-for="(a,i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>-->
-<!-- </el-select>-->
<span v-else>{{scope.row.radius}}</span>
</template>
</el-table-column>
@@ -379,16 +374,10 @@
</el-table-column>
<el-table-column label="璁¢噺鍗曚綅" prop="unit" show-overflow-tooltip width="100"></el-table-column>
<el-table-column label="鍗曚环" prop="price" show-overflow-tooltip width="100"></el-table-column>
- <!-- <el-table-column prop="manDay" label="棰勮鏃堕棿(澶�)" width="120" show-overflow-tooltip></el-table-column>
- <el-table-column prop="manHour" label="宸ユ椂绯绘暟" width="100" show-overflow-tooltip></el-table-column> -->
- <!-- <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> -->
<el-table-column label="鍖洪棿" min-width="120" prop="section" show-overflow-tooltip></el-table-column>
<el-table-column :filter-method="filterHandler" :filters="filters" label="瀛愬疄楠屽" min-width="130" prop="sonLaboratory"
show-overflow-tooltip></el-table-column>
- <el-table-column v-if="isSpecial&&active==1"
- fixed="right"
- label="鎿嶄綔"
- width="100">
+ <el-table-column v-if="isSpecial&&active==1" label="鎿嶄綔" width="100">
<template slot-scope="scope">
<el-button v-if="!scope.row.repetitionTag" size="small" type="text" @click="addProductList(productList,scope.row,scope.$index)">鎻掑叆琛�</el-button>
<el-button v-if="!!scope.row.repetitionTag&&scope.row.delete" size="small" type="text" @click="deleteProductList(scope.$index,productList)">鍒犻櫎</el-button>
@@ -611,7 +600,7 @@
import {mapGetters} from "vuex";
export default {
- name: 'Add',
+ name: 'AddView',
components: {
limsTable,
cableConfig,
@@ -861,7 +850,6 @@
},
methods: {
getInfo() {
- this.getUserNowData()
this.selectStandardTreeList()
this.getAuthorizedPerson();
this.selectStandardMethods()
@@ -1130,7 +1118,9 @@
sampleList.forEach(a => {
if (a.insProduct.length > 0) {
a.insProduct.forEach(c => {
- delete c.id
+ if (this.tabIndex != 4) {
+ delete c.id
+ }
})
}
if (a.endModels) {
@@ -1168,7 +1158,9 @@
sampleList.forEach(a => {
if (a.insProduct.length > 0) {
a.insProduct.forEach(c => {
- delete c.id
+ if (this.tabIndex != 4) {
+ delete c.id
+ }
})
}
if (a.endModels) {
@@ -1267,14 +1259,16 @@
}
},
saveMethod(sampleList){
- console.log('sampleList----', sampleList)
this.saveLoad = true
if (this.addObj.quarterItemId) {
this.addObj.quarterItemId = this.addObj.quarterItemId[1]
}
if(this.tabIndex==4&&this.active==2){
+ if (this.addObj.createTime) {
+ delete this.addObj.createTime
+ }
// 閫�鍥炲悗鎻愪氦
- updateInsOrder({insOrder: this.addObj, sampleList: sampleList}).then(res => {
+ updateInsOrder({insOrder: this.addObj, sampleProduct: sampleList}).then(res => {
this.saveLoad = false
this.$message.success('宸叉彁浜�')
this.bsm3Dia = false;
@@ -1408,7 +1402,6 @@
if (node.data.code === '[3]') {
this.sampleViewEn = val.sampleTypeEn
} else if (node.data.code === '[4]') {
- console.log('node.data---', node.data)
if (node.data.children!==null && node.data.children.length>0) {
this.sampleViewEn = val.sampleEn
}
@@ -1654,7 +1647,6 @@
},
tableRowClassName({row, rowIndex}) {
if (row.state == 1) {
- console.log('row.state---', row.state)
return 'warning-row';
} else {
return '';
@@ -2221,4 +2213,8 @@
>>>.warning-row {
color: #1890FF;
}
+.node_i {
+ color: orange;
+ font-size: 18px;
+}
</style>
diff --git a/src/views/business/productOrder/components/cable-config.vue b/src/views/business/productOrder/components/cable-config.vue
index 46c3e9e..3e04ae7 100644
--- a/src/views/business/productOrder/components/cable-config.vue
+++ b/src/views/business/productOrder/components/cable-config.vue
@@ -1,7 +1,7 @@
<template>
<div>
<div class="search_form">
- <div v-if="currentTab=='缁濈紭'">
+ <div v-if="currentTab=='缁濈紭'" style="display: flex">
<el-radio-group v-model="currentTab" size="small" style="margin-right: 20px;" @input="changeTab">
<el-radio-button label="缁濈紭">缁� 缂�</el-radio-button>
</el-radio-group>
diff --git a/src/views/business/productOrder/components/printDialog.vue b/src/views/business/productOrder/components/printDialog.vue
index 589d674..77a921f 100644
--- a/src/views/business/productOrder/components/printDialog.vue
+++ b/src/views/business/productOrder/components/printDialog.vue
@@ -163,7 +163,6 @@
}).then(res => {
if (res.code === 200 && res.data.length > 0) {
res.data.forEach(item => {
- console.log('item---', item)
item.sendTime = item.sendTime && item.sendTime.substring(0, 10)
item.sampleNumber = item.qtyArrived + item.buyUnitMeas
this.$set(item, 'barcode', item.entrustCode)
diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index cf46550..b602274 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -8,7 +8,7 @@
</el-input>
</el-form-item>
<el-form-item label="鏍峰搧鍚嶇О" prop="sampleName">
- <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small"
+ <el-input v-model="entity.sampleName" clearable placeholder="璇疯緭鍏�" size="small"
@keyup.enter.native="refreshTable"></el-input>
</el-form-item>
<el-form-item label="鏍峰搧鍨嬪彿" prop="sampleModel">
@@ -17,6 +17,7 @@
</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"
+ @change="refreshTable"
style="width:100%" type="date" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
@@ -33,35 +34,37 @@
<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 size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ <el-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
- <div class="table-tab">
- <div>
- <ul class="tab">
- <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">寰呭鏍�</li>
- <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:insOrder:checkout'])" @click="handleTab(1)">妫�楠屼腑</li>
- <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">濮旀墭宸叉</li>
- <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:insOrder:spotCheck'])" @click="handleTab(3)">鎶芥牱宸叉</li>
- <li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:insOrder:sendBack'])" @click="handleTab(4)">閫�鍥�</li>
- <li :class="{ active: tabIndex === 5 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(5)">鎾ら攢</li>
- <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(6)">鍏ㄩ儴</li>
- </ul>
+ <div class="container" v-loading="isLoading">
+ <div class="table-tab">
+ <div>
+ <ul class="tab">
+ <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">寰呭鏍�</li>
+ <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:insOrder:checkout'])" @click="handleTab(1)">妫�楠屼腑</li>
+ <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">濮旀墭宸叉</li>
+ <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:insOrder:spotCheck'])" @click="handleTab(3)">鎶芥牱宸叉</li>
+ <li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:insOrder:sendBack'])" @click="handleTab(4)">閫�鍥�</li>
+ <li :class="{ active: tabIndex === 5 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(5)">鎾ら攢</li>
+ <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(6)">鍏ㄩ儴</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 === 1" size="small" type="primary" @click="openAddIns">娣诲姞妫�楠岄」</el-button>
+ <el-button size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
+ <el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
+ </div>
</div>
- <div>
- <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 v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
+ <div class="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>
- <div class="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>
<!-- 瀹℃牳 -->
@@ -293,9 +296,28 @@
@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"/>-->
+ <!--淇敼鏍峰搧鍨嬪彿寮规-->
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
+ :visible.sync="dialogVisible" title="淇敼鏍峰搧鍨嬪彿" width="80%">
+ <el-table ref="sampleTable" :data="sampleList" border highlight-current-row
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
+ max-height="400px" tooltip-effect="dark">
+ <el-table-column align="center" label="搴忓彿" type="index" width="65"></el-table-column>
+ <el-table-column align="center" label="鏍峰搧鍚嶇О" min-width="100" prop="sample"> </el-table-column>
+ <el-table-column align="center" label="鏍峰搧缂栧彿" min-width="100" prop="sampleCode"></el-table-column>
+ <el-table-column align="center" label="鏍峰搧鍨嬪彿" min-width="60" prop="model">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.model" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
+ size="small"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodName"></el-table-column>
+ </el-table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+ <el-button :loading="submitListLoad" type="primary" @click="submitList">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -306,11 +328,11 @@
import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {
- checkUpdate, delInsOrder,
+ checkUpdate, delInsOrder, getSampleByOrderId,
rawAllInsOrderExport,
selectInsOrderParameter, selectNoProducts, selectOrderManDay,
updateInspected,
- updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2
+ updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder, upPlanUser2
} from "@/api/business/productOrder";
import { selectUserCondition } from "@/api/performance/class";
import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
@@ -325,6 +347,7 @@
},
data() {
return {
+ isLoading: false, // 鎺у埗鍔犺浇鐘舵��
entity: {
orderType: '',
state: '',
@@ -348,7 +371,13 @@
dataType: "link",
linkMethod: "selectAllByOne",
},
- { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+ {
+ label: "鏍峰搧鍨嬪彿",
+ prop: "sampleModel",
+ width: "160px",
+ dataType: "link",
+ linkMethod: "editSampleModel",
+ },
{ label: '鏍峰搧鏁伴噺', prop: 'sampleNum' },
{ label: '妫�楠屼汉', prop: 'testingName' },
{
@@ -735,7 +764,10 @@
multipleSelection: [],
sonLaboratoryList: [],
printDialog: false,
- addInspectionDia: false
+ addInspectionDia: false,
+ dialogVisible: false,
+ submitListLoad: false,
+ sampleList: []
}
},
watch: {
@@ -752,6 +784,11 @@
...mapGetters(["nickName"]),
},
mounted() {
+ if (this.checkPermi(['get:raw:await'])) {
+ this.tabIndex = 0
+ } else {
+ this.tabIndex = 2
+ }
this.refreshTable()
this.getAuthorizedPerson()
},
@@ -771,8 +808,9 @@
}
}
const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
- this.tableLoading = true
+ this.isLoading = true; // 寮�濮嬪姞杞�
selectInsOrderParameter({...this.page,...params}).then(res => {
+ this.isLoading = false; // 缁撴潫鍔犺浇
this.upIndex++
this.tableLoading = false
if (res.code === 200) {
@@ -780,7 +818,7 @@
this.page.total = res.data.total
}
}).catch(err => {
- this.tableLoading = false
+ this.isLoading = false; // 缁撴潫鍔犺浇
})
},
refresh() {
@@ -889,7 +927,12 @@
},
// 瀵煎嚭璁板綍
downLoad() {
- const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
+ let params = {}
+ if (this.multipleSelection.length > 0) {
+ params.ids = this.multipleSelection.map(item => item.id).join(',');
+ } else {
+ params = { ...this.entity, state: this.tabList[this.tabIndex].value }
+ }
rawAllInsOrderExport({ ...params }).then(res => {
const blob = new Blob([res], { type: 'application/octet-stream' });
this.$download.saveAs(blob, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx');
@@ -940,15 +983,42 @@
this.dataDialogVisible = false;
this.upLoad = false;
},
- // 璇︽儏
+ // 鐐瑰嚮鏍峰搧鍚嶇О
selectAllByOne(row) {
this.$router.push({
- path: "/productOrder/add", query: {
+ path: "/productOrder/addView", query: {
examine: 1,
active: 2,
- currentId: row.id
+ currentId: row.id,
+ tabIndex: this.tabIndex,
}
});
+ },
+ // 淇敼鏍峰搧鍨嬪彿
+ editSampleModel (row) {
+ if (this.tabIndex !== 1) {
+ return
+ }
+ this.dialogVisible = true
+ this.getDataList(row)
+ },
+ getDataList(row) {
+ this.dialogVisible = true
+ getSampleByOrderId({insOrderId: row.id}).then(res => {
+ this.sampleList = res.data
+ })
+ },
+ // 鎻愪氦鏍峰搧鍨嬪彿淇敼
+ submitList () {
+ this.submitListLoad = true
+ updateSampleModel(this.sampleList).then(res => {
+ this.submitListLoad = false
+ this.dialogVisible = false
+ this.$message.success('淇敼鎴愬姛')
+ this.refreshTable()
+ }).catch(err => {
+ this.submitListLoad = false
+ })
},
// 鏁版嵁鏌ョ湅
handleDataLook(row) {
@@ -1039,7 +1109,7 @@
},
getDeleteList() {
this.tableLoadingDelete = true
- selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds }).then(res => {
+ selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds, ...this.pageDelete }).then(res => {
this.tableLoadingDelete = false
this.componentDataDelete = res.data.records
this.pageDelete.total = res.data.total
@@ -1187,14 +1257,15 @@
},
// 涓嬪崟
playOrder(num) {
- this.$router.push({ path: "/productOrder/add", query: { examine: 0, active: num, tabIndex: this.tabIndex } });
+ this.$router.push({ path: "/productOrder/addOrder", 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/addView", query: { examine: 1, active: 3, currentId: row.id } });
},
handleTab(i) {
this.tabIndex = i;
+ this.multipleSelection = []
this.refreshTable()
},
// 鏌ョ湅妫�楠屾暟鎹�
@@ -1205,16 +1276,29 @@
inspectorList = row.userName.split(',')
}
inspectorList.push(this.nickName)
- this.$router.push({
- path: "/inspectionTask/inspection",
- query: {
- sonLaboratory: row.sonLaboratory,
- state: 3,
- typeSource: row.typeSource,
- orderId: row.id,
- inspectorList: inspectorList,
- },
- })
+ if (this.checkPermi(['business:inspectionView'])) {
+ this.$router.push({
+ name: "InspectionView",
+ query: {
+ sonLaboratory: row.sonLaboratory,
+ state: 3,
+ typeSource: row.typeSource,
+ orderId: row.id,
+ inspectorList: inspectorList,
+ },
+ })
+ } else {
+ this.$router.push({
+ path: "/inspectionTask/inspection",
+ query: {
+ sonLaboratory: row.sonLaboratory,
+ state: 3,
+ typeSource: row.typeSource,
+ orderId: row.id,
+ inspectorList: inspectorList,
+ },
+ })
+ }
},
goback() {
this.state = 0
diff --git a/src/views/business/productSamplingInfo/index.vue b/src/views/business/productSamplingInfo/index.vue
index 82c9d40..9cf3667 100644
--- a/src/views/business/productSamplingInfo/index.vue
+++ b/src/views/business/productSamplingInfo/index.vue
@@ -1,17 +1,18 @@
<template>
<div class="capacity-scope">
<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">
+ <div class="search_box">
+ <div class="search_item">
+ <span class="search_label">缂栧彿</span>
<el-input v-model="entity.quarterNo" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable">
+ @keyup.enter.native="refreshTable()">
</el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
+ </div>
+ <div class="search_button">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
+ </div>
<div>
<el-button v-if="tabIndex === 1" size="small" type="primary" @click="yearSample('add')">骞村害鎶芥牱</el-button>
</div>
@@ -390,7 +391,7 @@
// 鏂规硶闆嗗悎
methods: {
// 鏌ヨ鍥炶皟
- refreshTable(e) {
+ refreshTable() {
if (this.tabIndex === 0) {
this.getQuarterPageList()
} else if (this.tabIndex === 1) {
@@ -593,9 +594,6 @@
// 鍒囨崲涓嬪崟tab琛ㄦ牸
handleTab(m, i) {
this.tabIndex = i;
- if (this.tabIndex === 0) {
- this.componentData.entity.quarterNo = this.entity.quarterNo
- }
this.refreshTable()
},
closeYearSampleDia() {
@@ -648,4 +646,23 @@
border-color: #3A7BFA;
color: #3A7BFA;
}
+.search_box {
+ display: flex;
+}
+.search_item {
+ margin-bottom: 18px;
+ margin-right: 10px;
+ display: flex;
+ align-items: center;
+ line-height: 32px;
+}
+.search_label {
+ width: 52px;
+ font-size: 14px;
+ font-weight: 700;
+ color: #606266;
+}
+.search_button {
+ line-height: 30px;
+}
</style>
diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index bf3e4be..3bb5510 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -25,8 +25,8 @@
<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 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-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()" >閲嶇疆</el-button>
</el-form-item>
</el-row>
<el-row>
@@ -38,7 +38,7 @@
</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"
+ range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" style="width: 100%;" type="daterange" @change="refreshTable()"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
@@ -265,6 +265,7 @@
{ label: '鎶ユ鏃堕棿', prop: 'declareDate' },
{
dataType: 'action',
+ fixed: 'right',
label: '鎿嶄綔',
operation: [
{
@@ -308,7 +309,6 @@
tableData1: [],
tableLoading1: false,
column1: [
- { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: '160px' },
{
dataType: 'tag',
label: '妫�楠岀姸鎬�',
@@ -346,7 +346,7 @@
},
{ label: '璁㈠崟鍙�', prop: 'orderNo' },
{ label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' },
- { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
+ { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
{ label: '鎵瑰彿', prop: 'updateBatchNo' },
{ label: '闆朵欢鍙�', prop: 'partNo' },
{ label: '闆朵欢鎻忚堪', prop: 'partDesc' },
@@ -371,6 +371,7 @@
}
}
},
+ { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: '160px' },
{ label: '鏍峰搧鍚嶇О', prop: 'sampleName' },
{ label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
{ label: '妫�楠屼汉', prop: 'userName' },
@@ -395,7 +396,7 @@
},
{ label: '鍗曚綅', prop: 'buyUnitMeas' },
{ label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
- { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+ { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
{
dataType: 'action',
fixed: 'right',
@@ -821,11 +822,9 @@
},
// 鍏ㄩ儴瀵煎嚭
handleDown() {
- let entity = { ...this.componentData }
- delete entity.orderBy
this.outLoading = true
rawAllExport({
- entity: entity
+ ...this.componentData
}).then(res => {
this.outLoading = false
const blob = new Blob([res], { type: 'application/octet-stream' });
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index 61584a6..785e9f1 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -22,11 +22,14 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
<el-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
- <el-button :loading="outLoading" size="mini" type="primary" @click="handleDowns">鎵归噺涓嬭浇</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
</el-form-item>
</el-form>
+ </div>
+ <div style="text-align: right;margin-bottom: 10px">
+ <el-button :loading="outLoading" size="mini" type="primary" @click="handleDowns">鎵归噺涓嬭浇</el-button>
+ <el-button :loading="outExportLoading" size="mini" type="primary" @click="handleExport">鎶ヨ〃瀵煎嚭</el-button>
</div>
<div>
<lims-table :tableData="valueTableData" :column="column" :page="page" :tableLoading="tableLoading"
@@ -184,7 +187,7 @@
<el-button size="small" style="height: 38px" type="primary">闄勪欢涓婁紶</el-button>
</el-upload>
</div>
- <lims-table :tableData="tableDataFile" :column="columnFile" height="500px"
+ <lims-table :tableData="tableDataFile" :column="columnFile" height="600px"
key="tableDataFile" :tableLoading="tableLoadingFile"></lims-table>
</el-dialog>
</div>
@@ -200,7 +203,8 @@
ratifyReport,
sendBackTask,
upReportUrl,
- writeReport
+ writeReport,
+ reportAllExport
} from "@/api/business/insReport";
import { mapGetters } from "vuex";
import { selectUserCondition } from "@/api/business/inspectionTask";
@@ -215,6 +219,7 @@
queryStatus: null,
code: null,
typeSource: null,
+ orderType: null,
},
page: {
current: 1,
@@ -239,6 +244,7 @@
option: null,
mutiList: [],
outLoading: false,
+ outExportLoading: false,
inLoading: false,
addApproverDia: false, // 鎸囧畾瀹℃壒浜哄憳寮规
approver: '', // 瀹℃壒浜哄憳
@@ -519,7 +525,7 @@
// 鏌ヨ闄勪欢鏌ョ湅鍒楄〃鍥炶皟
getFileList() {
this.tableLoadingFile = true
- getFileList({ insOrderId: this.filesLookInfo.insOrderId }).then(res => {
+ getFileList({ insOrderId: this.filesLookInfo.insOrderId,current: -1, size: -1 }).then(res => {
this.tableLoadingFile = false
if (res.code === 200) {
this.tableDataFile = res.data.records
@@ -598,6 +604,17 @@
})
},
+ // 鎶ヨ〃瀵煎嚭
+ handleExport() {
+ this.outExportLoading = true
+ reportAllExport({
+ ...this.entity
+ }).then(res => {
+ this.outExportLoading = false
+ const blob = new Blob([res], { type: 'application/octet-stream' });
+ this.$download.saveAs(blob, "鎶ュ憡鎶ヨ〃瀵煎嚭.xlsx");
+ })
+ },
beforeUpload(file) {
const isZip = file.type === 'application/zip' || file.name.endsWith('.zip');
if (!isZip) {
@@ -662,7 +679,7 @@
case 0:
// 鍘熸潗鏂�
this.$router.push({
- path: "/materialOrder/customsInspection", query: {
+ path: "/materialOrder/customsInspectionView", query: {
customsInspection: row,
active: this.activeFace,
currentId: row.insOrderId,
@@ -673,7 +690,7 @@
case null:
// 鎴愬搧
this.$router.push({
- path: "/productOrder/add", query: {
+ path: "/productOrder/addView", query: {
examine: this.examine,
active: this.activeFace,
currentId: row.insOrderId
@@ -683,7 +700,7 @@
case 1:
// 閾滄潗
this.$router.push({
- path: "/materialOrder/copperOrder", query: {
+ path: "/materialOrder/CopperView", query: {
active: this.activeFace,
currentId: row.insOrderId
}
diff --git a/src/views/business/unpass/components/PurchaseVerification.vue b/src/views/business/unpass/components/PurchaseVerification.vue
index 6594480..ae4619d 100644
--- a/src/views/business/unpass/components/PurchaseVerification.vue
+++ b/src/views/business/unpass/components/PurchaseVerification.vue
@@ -246,7 +246,6 @@
// 鏂规硶闆嗗悎
methods: {
async getInsOrder(operationType, item) {
- console.log('operationType----', operationType)
this.operationType = operationType
this.info = item
// 鏌ヨ宸叉彁浜ょ殑鏁版嵁
diff --git a/src/views/business/unpass/components/addUnPass.vue b/src/views/business/unpass/components/addUnPass.vue
index 59c1e8e..f706a98 100644
--- a/src/views/business/unpass/components/addUnPass.vue
+++ b/src/views/business/unpass/components/addUnPass.vue
@@ -7,8 +7,15 @@
v-loading="tableLoading" @selection-change="selectProduct" style="margin-bottom: 10px;"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border @select-all="handleAll">
<el-table-column type="selection" width="65"></el-table-column>
- <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" min-width="140"
- show-overflow-tooltip></el-table-column>
+ <el-table-column prop="isBinding" label="绫诲瀷" min-width="140" show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.isBinding" clearable size="small">
+ <el-option :value="1" label="缁戝畾鍊�"></el-option>
+ <el-option :value="0" label="涓嶅悎鏍煎��"></el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140"
show-overflow-tooltip></el-table-column>
@@ -16,8 +23,10 @@
<el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px"></el-table-column>
<el-table-column prop="lastValue" label="妫�楠岀粨鏋�" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="insResult" label="缁撴灉鍒ゅ畾" min-width="140" show-overflow-tooltip>
- <template>
- <el-tag type="danger">涓嶅悎鏍�</el-tag>
+ <template slot-scope="scope">
+ <el-tag type="success" v-if="scope.row.insResult === 1">鍚堟牸</el-tag>
+ <el-tag type="danger" v-if="scope.row.insResult === 0">涓嶅悎鏍�</el-tag>
+ <el-tag type="info" v-if="scope.row.insResult === 3">涓嶅垽瀹�</el-tag>
</template>
</el-table-column>
</el-table>
@@ -32,6 +41,7 @@
<script>
import {addUnqualifiedRetest, getInsProductUnqualified} from '@/api/business/unpass.js'
+import {getInsProduct} from "@/api/business/inspectionTask";
export default {
name: "addUnPass",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -61,7 +71,7 @@
getInsOrder(info) {
this.tableLoading = true
try {
- getInsProductUnqualified({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag }).then(res => {
+ getInsProduct({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag,repetitionTag: info.repetitionTag,cableTag: info.cableTag }).then(res => {
if (res.code === 200) {
this.productList = res.data
}
@@ -77,6 +87,15 @@
this.$message.warning('璇烽�夋嫨闇�瑕佸娴嬬殑妫�楠岄」')
return
}
+ // 妫�鏌ユ槸鍚︽墍鏈夐�変腑鐨勮閮介�夋嫨浜� isBinding
+ const hasUnselectedBinding = this.productListSelected.some(
+ (row) => row.isBinding === null || row.isBinding === undefined
+ );
+
+ if (hasUnselectedBinding) {
+ this.$message.error("璇风‘淇濋�変腑鐨勬暟鎹兘閫夋嫨浜嗙被鍨嬶紒");
+ return;
+ }
this.$confirm('纭鎻愪氦涓嶅悎鏍煎娴�?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -88,16 +107,20 @@
});
},
handlePass() {
+ const ids = this.productListSelected.map(item => ({
+ id: item.id,
+ isBinding: item.isBinding
+ }));
this.handlePassLoading = true
try {
- addUnqualifiedRetest({
- ids: this.productIds
- }).then(res => {
+ addUnqualifiedRetest(ids).then(res => {
if (res.code === 200) {
this.$message.success('鎻愪氦鎴愬姛')
this.$emit('resetAddUnPass')
}
this.handlePassLoading = false
+ }).catch(e => {
+ this.handlePassLoading = false
})
} catch (e) {
this.handlePassLoading = false
diff --git a/src/views/business/unpass/index-manage.vue b/src/views/business/unpass/index-manage.vue
index e478a36..fc767bf 100644
--- a/src/views/business/unpass/index-manage.vue
+++ b/src/views/business/unpass/index-manage.vue
@@ -3,6 +3,10 @@
<div class="search">
<div>
<el-form :model="entity" ref="entity" size="small" :inline="true">
+ <el-form-item label="璁㈠崟缂栧彿" prop="no">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.no"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
<el-form-item label="瑙勬牸鍨嬪彿" prop="model">
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.model"
@keyup.enter.native="refreshTable()"></el-input>
@@ -12,8 +16,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -82,35 +86,35 @@
tableData: [],
tableLoading: false,
column: [
- { label: '缂栧彿', prop: 'no' },
- {
- label: "OA瀹℃牳鐘舵��",
- prop: "oaState",
- width: "100px",
- dataType: "tag",
- formatData: (params) => {
- if (params == 1) {
- return "寰呭鏍�";
- } else if(params == 2) {
- return "瀹℃牳涓�";
- } else if(params == 3) {
- return "閫氳繃";
- } else {
- return "椹冲洖";
- }
- },
- formatType: (params) => {
- if (params == 1) {
- return "warning";
- } else if(params == 2) {
- return "info";
- } else if(params == 3) {
- return "success";
- } else {
- return "danger";
- }
- },
- },
+ { label: '缂栧彿', prop: 'no', width: "160px", },
+ // {
+ // label: "OA瀹℃牳鐘舵��",
+ // prop: "oaState",
+ // width: "100px",
+ // dataType: "tag",
+ // formatData: (params) => {
+ // if (params == 1) {
+ // return "寰呭鏍�";
+ // } else if(params == 2) {
+ // return "瀹℃牳涓�";
+ // } else if(params == 3) {
+ // return "閫氳繃";
+ // } else {
+ // return "椹冲洖";
+ // }
+ // },
+ // formatType: (params) => {
+ // if (params == 1) {
+ // return "warning";
+ // } else if(params == 2) {
+ // return "info";
+ // } else if(params == 3) {
+ // return "success";
+ // } else {
+ // return "danger";
+ // }
+ // },
+ // },
{ label: '璁㈠崟鍙�', prop: 'orderNo' },
{
label: "闆朵欢鍙�",
diff --git a/src/views/business/unpass/index.vue b/src/views/business/unpass/index.vue
index e52f63b..347357d 100644
--- a/src/views/business/unpass/index.vue
+++ b/src/views/business/unpass/index.vue
@@ -12,8 +12,8 @@
@keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -43,26 +43,26 @@
tableLoading: false,
column: [
{ label: '缂栧彿', prop: 'no' },
- {
- label: "OA瀹℃牳鐘舵��",
- prop: "oaState",
- width: "100px",
- dataType: "tag",
- formatData: (params) => {
- if (params == 0) {
- return "鍚�";
- } else {
- return "鏄�";
- }
- },
- formatType: (params) => {
- if (params == 0) {
- return "danger";
- } else {
- return "primary";
- }
- },
- },
+ // {
+ // label: "OA瀹℃牳鐘舵��",
+ // prop: "oaState",
+ // width: "100px",
+ // dataType: "tag",
+ // formatData: (params) => {
+ // if (params == 0) {
+ // return "鍚�";
+ // } else {
+ // return "鏄�";
+ // }
+ // },
+ // formatType: (params) => {
+ // if (params == 0) {
+ // return "danger";
+ // } else {
+ // return "primary";
+ // }
+ // },
+ // },
{
dataType: 'action',
fixed: 'right',
diff --git a/src/views/index.vue b/src/views/index.vue
index 26471bc..b9dcf90 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -94,7 +94,13 @@
<script>
import ScrollPagination from '@/components/index/scroll-paging.vue'
-import {calendarWorkByWeek, currentUserWorkHourCount, msgRoll, page} from "@/api/index/report";
+import {
+ calendarWorkByWeek,
+ currentUserWorkHourCount,
+ msgRoll,
+ page,
+ triggerModificationStatusToRead
+} from "@/api/index/report";
import Echarts from "@/components/echarts/echarts.vue";
import {mapGetters} from "vuex";
export default {
@@ -195,6 +201,12 @@
// 璺宠浆椤甸潰
goAddList(m) {
this.$router.push({name: m.jumpPath, query: { activeName: m.jumpId }})
+ this.changeStatus(m)
+ },
+ changeStatus (m) {
+ triggerModificationStatusToRead({id: m.id}).then(res => {
+ console.log(res.data)
+ })
},
getList(){
const key = `_${this.currentPage}`
@@ -353,7 +365,6 @@
month: month,
}
currentUserWorkHourCount(params).then(res => {
- console.log(res)
this.totalHour = res.data.totalHour
this.materialPieSeries[0].data[0].value = res.data.subsidiaryHour
this.materialPieSeries[0].data[1].value = res.data.yieldHour
diff --git a/src/views/login.vue b/src/views/login.vue
index 00dd1ea..ad52f89 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -5,7 +5,7 @@
</div>
<div class="rightForm">
<div class="title_big">娆㈣繋鎮ㄧ櫥褰曪紒</div>
- <div class="title_small">LIMS瀹為獙瀹ょ鐞嗙郴缁�</div>
+ <div class="title_small">瑁呭LIMS瀹為獙瀹ょ鐞嗙郴缁�</div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="璐﹀彿">
@@ -18,16 +18,16 @@
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
- <el-form-item prop="code" v-if="captchaEnabled">
- <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%"
- @keyup.enter.native="handleLogin">
- <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
- </el-input>
- <div class="login-code">
- <img :src="codeUrl" @click="getCode" class="login-code-img" />
- </div>
- </el-form-item>
- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">璁颁綇瀵嗙爜</el-checkbox>
+<!-- <el-form-item prop="code" v-if="captchaEnabled">-->
+<!-- <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%"-->
+<!-- @keyup.enter.native="handleLogin">-->
+<!-- <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />-->
+<!-- </el-input>-->
+<!-- <div class="login-code">-->
+<!-- <img :src="codeUrl" @click="getCode" class="login-code-img" />-->
+<!-- </div>-->
+<!-- </el-form-item>-->
+<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">璁颁綇瀵嗙爜</el-checkbox>-->
<el-form-item style="width:100%;">
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
@click.native.prevent="handleLogin">
@@ -38,7 +38,7 @@
<router-link class="link-type" :to="'/register'">绔嬪嵆娉ㄥ唽</router-link>
</div>
</el-form-item>
- <el-button v-if="false" type="primary" plain @click="goLogin">闆嗗洟闆嗘垚鐧诲綍</el-button>
+ <el-button v-if="true" type="primary" plain @click="goLogin">闆嗗洟闆嗘垚鐧诲綍</el-button>
</el-form>
</div>
<!-- 搴曢儴 -->
@@ -50,7 +50,6 @@
<script>
import { getCodeImg, getSsoAuthUrl } from "@/api/login";
-import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt'
export default {
@@ -91,8 +90,8 @@
}
},
created() {
- this.getCode();
- this.getCookie();
+ // this.getCode();
+ // this.getCookie();
},
methods: {
async goLogin() {
@@ -110,9 +109,9 @@
});
},
getCookie() {
- const username = Cookies.get("username");
- const password = Cookies.get("password");
- const rememberMe = Cookies.get('rememberMe')
+ const username = localStorage.getItem("username");
+ const password = localStorage.getItem("password");
+ const rememberMe = localStorage.getItem('rememberMe')
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : decrypt(password),
@@ -123,22 +122,22 @@
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true;
- if (this.loginForm.rememberMe) {
- Cookies.set("username", this.loginForm.username, { expires: 30 });
- Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
- Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
- } else {
- Cookies.remove("username");
- Cookies.remove("password");
- Cookies.remove('rememberMe');
- }
+ // if (this.loginForm.rememberMe) {
+ // localStorage.setItem("username", this.loginForm.username, { expires: 30 });
+ // localStorage.setItem("password", encrypt(this.loginForm.password), { expires: 30 });
+ // localStorage.setItem('rememberMe', this.loginForm.rememberMe, { expires: 30 });
+ // } else {
+ // localStorage.removeItem("username");
+ // localStorage.removeItem("password");
+ // localStorage.removeItem('rememberMe');
+ // }
this.$store.dispatch("Login", this.loginForm).then(() => {
- this.$router.push({ path: this.redirect || "/" }).catch(() => { });
+ this.$router.push({ path: "/" }).catch(() => { });
}).catch(() => {
this.loading = false;
- if (this.captchaEnabled) {
- this.getCode();
- }
+ // if (this.captchaEnabled) {
+ // this.getCode();
+ // }
});
}
});
@@ -148,14 +147,14 @@
</script>
<style rel="stylesheet/scss" lang="scss">
-//.login {
-// display: flex;
-// justify-content: center;
-// align-items: center;
-// height: 100%;
-// background-image: url("../assets/images/login-background.jpg");
-// background-size: cover;
-//}
+.login {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ background-image: url("../assets/images/login-background.jpg");
+ background-size: cover;
+}
.login {
width: 100vw;
height: 100vh;
diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue
index 2d42fad..14efb77 100644
--- a/src/views/monitor/logininfor/index.vue
+++ b/src/views/monitor/logininfor/index.vue
@@ -47,8 +47,8 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue
index 8de2963..cac3e74 100644
--- a/src/views/monitor/online/index.vue
+++ b/src/views/monitor/online/index.vue
@@ -18,8 +18,8 @@
/>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue
index 3756c95..5f4b175 100644
--- a/src/views/monitor/operlog/index.vue
+++ b/src/views/monitor/operlog/index.vue
@@ -71,8 +71,8 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/performance/class/index.vue b/src/views/performance/class/index.vue
index 0934b6f..ff3a4f1 100644
--- a/src/views/performance/class/index.vue
+++ b/src/views/performance/class/index.vue
@@ -22,8 +22,8 @@
</div>
</div>
<div class="search_thing" style="padding-left: 30px">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ <el-button size="mini" type="primary" @click="refreshTable()"> 璇�</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
</div>
<div class="search_thing btns" style="padding-left: 30px">
<el-button size="small" type="primary" v-if="checkPermi(['performance:class:time'])"
diff --git a/src/views/performance/manHour/workTimeConfig.vue b/src/views/performance/manHour/workTimeConfig.vue
index bcee42c..d02ceba 100644
--- a/src/views/performance/manHour/workTimeConfig.vue
+++ b/src/views/performance/manHour/workTimeConfig.vue
@@ -1,33 +1,32 @@
<template>
- <div class="work-time-config">
+ <div class="capacity-scope">
<div class="search">
- <div class="search_thing">
- <div class="search_label">缂栧彿锛�</div>
- <div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.number"
- @keyup.enter.native="refreshTable()"></el-input>
- </div>
+ <div>
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="缂栧彿" prop="number">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.number"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item label="瀹為獙瀹�" prop="laboratory">
+ <el-select v-model="queryParams.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()" clearable>
+ <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="閮ㄩ棬" prop="department">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.department"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
- <div class="search_thing">
- <div class="search_label">瀹為獙瀹わ細</div>
- <el-select v-model="queryParams.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()" clearable>
- <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
+ <div>
+ <el-button size="small" type="primary" @click="openAdd('鏂板')"
+ v-if="checkPermi(['performance:manHour:workTimeConfig:add'])">鏂� 澧�</el-button>
</div>
- <div class="search_thing">
- <div class="search_label">閮ㄩ棬锛�</div>
- <div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.department"
- @keyup.enter.native="refreshTable()"></el-input>
- </div>
- </div>
- <div class="search_thing" style="padding-left: 30px">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- <el-button size="small" type="primary" style="position: absolute; right: 50px" @click="openAdd('鏂板')"
- v-if="checkPermi(['performance:manHour:workTimeConfig:add'])">鏂� 澧�</el-button>
</div>
<div class="table">
<lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'"
@@ -112,7 +111,6 @@
{ label: "澶囨敞", prop: "remarks" },
{
dataType: "action",
- fixed: "right",
label: "鎿嶄綔",
operation: [
{
@@ -144,7 +142,7 @@
],
page: {
total: 0,
- size: 10,
+ size: 20,
current: 0,
},
tableLoading: false,
@@ -277,7 +275,6 @@
})
.then(() => {
deleteAuxiliaryWorkingHours({ id: row.id }).then((res) => {
- console.log('res',res)
if (res.code == 200){
this.$message.success("鍒犻櫎鎴愬姛");
this.refresh();
@@ -291,35 +288,9 @@
</script>
<style scoped>
-.work-time-config {
- height: 100%;
-}
-
.search {
- background-color: #fff;
- height: 80px;
+ height: 46px;
display: flex;
- align-items: center;
-}
-
-.search_thing {
- width: 250px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 70px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 70px);
-}
-
-.table {
- padding: 10px;
- padding-top: 0;
+ justify-content: space-between;
}
</style>
diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue
index f5b7942..f709c4f 100644
--- a/src/views/performance/manHour/workTimeManagement.vue
+++ b/src/views/performance/manHour/workTimeManagement.vue
@@ -1,69 +1,47 @@
<template>
<!--鏃ュ伐鏃剁鐞�-->
- <div class="work-time-management">
- <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-option>
- </el-select>
- </div>
- <div class="search_thing" style="width: 390px">
- <div class="search_label" style="width: 90px">鏃堕棿鑼冨洿锛�</div>
- <div class="search_input">
+ <div class="capacity-scope">
+ <div>
+ <el-form :model="entity" ref="entity" size="small" :inline="true">
+ <el-form-item label="鏄熸湡" prop="weekDay" class="form-item">
+ <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>
+ </el-form-item>
+ <el-form-item label="鏃堕棿鑼冨洿" prop="dateTime" class="dateTime">
<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()">
+ range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="daterange"
+ style="width: 100%"
+ 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>
- </div>
- <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>
- </div>
- <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-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>
- </div>
+ </el-form-item>
+ <el-form-item label="鍚嶅瓧" prop="name">
+ <el-input v-model="entity.name" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item label="鐘舵��" prop="state" v-if="currentTable == 'ValueTable0'">
+ <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>
+ </el-form-item>
+ <el-form-item label="鏍峰搧缂栧彿" prop="sample" v-if="currentTable == 'ValueTable1'">
+ <el-input v-model="entity.sample" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
- <div style="display: flex; align-items: center; justify-content: space-between">
+ <div style="display: flex; align-items: center; justify-content: space-between;margin-bottom: 10px">
<el-radio-group :key="'111'" v-model="currentTable" size="small" @change="searchList">
<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">{{-->
-<!-- totalInfo["浜ч噺宸ユ椂姹囨��"]-->
-<!-- ? Number(totalInfo["浜ч噺宸ユ椂姹囨��"]).tofixed(4)-->
-<!-- : 0-->
-<!-- }}</span> 杈呭姪宸ユ椂姹囨�伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{-->
-<!-- totalInfo["杈呭姪宸ユ椂姹囨��"]-->
-<!-- ? Number(totalInfo["杈呭姪宸ユ椂姹囨��"]).tofixed(4)-->
-<!-- : 0-->
-<!-- }}</span>-->
-<!-- </p>-->
<el-button v-show="currentTable == 'ValueTable0' &&
checkPermi(['performance:manHour:workTimeManagement:add'])
" size="small" type="primary" @click="openAdd">褰曞叆鏁版嵁</el-button>
@@ -78,12 +56,12 @@
</div>
<div class="table">
<lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
- key="tableData"
- :height="'calc(100vh - 350px)'" :isSelection="true" v-if="currentTable == 'ValueTable0'"
- @pagination="pagination" :handleSelectionChange="handleSelectionChange"></lims-table>
+ key="tableData" :height="'calc(100vh - 330px)'"
+ :isSelection="true" v-if="currentTable == 'ValueTable0'"
+ @pagination="pagination" :handleSelectionChange="handleSelectionChange"></lims-table>
<lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading"
- key="tableData0"
- :height="'calc(100vh - 350px)'" v-if="currentTable == 'ValueTable1'" @pagination="pagination0"></lims-table>
+ key="tableData0" :height="'calc(100vh - 330px)'"
+ v-if="currentTable == 'ValueTable1'" @pagination="pagination0"></lims-table>
</div>
<el-dialog :before-close="handleClose" :title="formData.id ? '缂栬緫' : '褰曞叆鏁版嵁'" :visible.sync="addVisible"
width="600px">
@@ -106,7 +84,6 @@
<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-option>
@@ -428,7 +405,7 @@
],
page: {
total: 0,
- size: 10,
+ size: 20,
current: 1,
},
tableLoading: false,
@@ -450,7 +427,7 @@
],
page0: {
total: 0,
- size: 10,
+ size: 20,
current: 1,
},
shifList: [],
@@ -915,37 +892,10 @@
</script>
<style scoped>
-.work-time-management {
- height: 100%;
- overflow-y: scroll;
- padding: 20px;
- padding-top: 0;
- /* scrollbar-width: none; */
+.form-item >>>.el-form-item__content {
+ width: 120px;
}
-
-/* .work-time-management::-webkit-scrollbar {
- display: none;
-} */
-.search {
- background-color: #fff;
- height: 80px;
- display: flex;
- align-items: center;
-}
-
-.search_thing {
- width: 300px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 70px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 70px);
+.dateTime >>>.el-form-item__content {
+ width: 260px;
}
</style>
diff --git a/src/views/performance/manHour/workTimeStatistics.vue b/src/views/performance/manHour/workTimeStatistics.vue
index 8f7dc37..422aa61 100644
--- a/src/views/performance/manHour/workTimeStatistics.vue
+++ b/src/views/performance/manHour/workTimeStatistics.vue
@@ -1,59 +1,54 @@
<template>
- <div>
+ <div class="capacity-scope">
<div>
<div class="search">
- <div class="search_thing">
- <div class="search_label">鏃ユ湡锛�</div>
- <div class="search_input" style="display: flex; align-items: center">
- <el-date-picker
- v-model="queryParams.month"
- :clearable="false"
- format="yyyy-MM"
- placeholder="閫夋嫨鏈�"
- size="small"
- style="width: 100%"
- type="month"
- value-format="yyyy-MM"
- @change="refreshTable()"
- >
- </el-date-picker>
- </div>
- </div>
- <div class="search_thing">
- <div class="search_label">鍛樺伐锛�</div>
- <el-input
- v-model="queryParams.name"
- clearable
- placeholder="璇疯緭鍏�"
- size="small"
- @keyup.enter.native="refreshTable()"
- ></el-input>
- </div>
- <div class="search_thing" style="padding-left: 30px">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()"
- >鏌� 璇�</el-button
- >
+ <div>
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="鏃ユ湡" prop="month">
+ <el-date-picker
+ v-model="queryParams.month"
+ :clearable="false"
+ format="yyyy-MM"
+ placeholder="閫夋嫨鏈�"
+ size="small"
+ style="width: 100%"
+ type="month"
+ value-format="yyyy-MM"
+ @change="refreshTable()"
+ >
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="鍛樺伐" prop="name">
+ <el-input
+ v-model="queryParams.name"
+ clearable
+ placeholder="璇疯緭鍏�"
+ size="small"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
</div>
- <div class="table">
- <limsTable
- :column="tableColumn"
- :table-data="tableData"
- :table-loading="tableLoading"
- :page="page"
- style="padding: 0 15px"
- :height="'calc(100vh - 290px)'"
- @pagination="pagination"
- >
- </limsTable>
- </div>
+ <limsTable
+ :column="tableColumn"
+ :table-data="tableData"
+ :table-loading="tableLoading"
+ :page="page"
+ :height="'calc(100vh - 290px)'"
+ @pagination="pagination"
+ >
+ </limsTable>
</div>
</div>
</template>
<script>
-import { getYearAndMonthAndDays } from "@/utils/date";
+import { getYearAndMonthAndDays, getYearAndMonthAndDaysZTZB } from "@/utils/date";
import limsTable from "@/components/Table/lims-table.vue";
import { selectAuxiliaryAllByMonth } from "@/api/performance/manHour";
export default {
@@ -63,7 +58,7 @@
data() {
return {
queryParams: {
- month: getYearAndMonthAndDays().slice(0, 7),
+ month: getYearAndMonthAndDaysZTZB().slice(0, 7),
name: "",
departLims: "",
},
@@ -98,7 +93,7 @@
tableLoading: false,
page: {
total: 0,
- size: 10,
+ size: 20,
current: 0,
},
};
@@ -120,7 +115,7 @@
},
refresh() {
this.queryParams = {
- month: getYearAndMonthAndDays().slice(0, 7),
+ month: getYearAndMonthAndDaysZTZB().slice(0, 7),
name: "",
departLims: "",
};
@@ -137,32 +132,5 @@
</script>
<style scoped>
-.work-time-statistics {
- height: 100%;
-}
-.search {
- background-color: #fff;
- height: 80px;
- display: flex;
- align-items: center;
-}
-.search_thing {
- width: 270px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 60px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 60px);
-}
-.table {
- height: calc(100% - 60px - 80px - 10px - 40px - 25px);
-}
</style>
diff --git a/src/views/standard/model/index.vue b/src/views/standard/model/index.vue
index 418c55b..6d3ce8f 100644
--- a/src/views/standard/model/index.vue
+++ b/src/views/standard/model/index.vue
@@ -1,29 +1,23 @@
<template>
- <div class="standard-template">
+ <div class="capacity-scope">
<div class="search">
- <div class="search_thing">
- <div class="search_label">妯℃澘鍚嶇О锛�</div>
- <div class="search_input">
+ <div class="search_box">
+ <div class="search_item">
+ <span class="search_label">妯℃澘鍚嶇О</span>
<el-input v-model="queryParams.name" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ <div class="search_button">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</div>
</div>
- <div class="search_thing" style="padding-left: 30px">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- <div class="btn">
+ <div>
<el-button v-if="checkPermi(['standard:model:add'])" size="small" type="primary" @click="openAdd">鏂板</el-button>
- <!-- <el-button
- v-if="checkPermi(['standard:model:copy'])"
- size="small"
- @click="copyTemplate"
- >澶嶅埗妯$増</el-button
- > -->
</div>
</div>
<lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
- :height="'calc(100vh - 250px)'" style="padding: 20px; padding-top: 0" @pagination="pagination"></lims-table>
+ :height="'calc(100vh - 250px)'" @pagination="pagination"></lims-table>
<el-dialog :before-close="isClose" :close-on-click-modal="false" :close-on-press-escape="false"
:visible.sync="isShow" title="妯℃澘缂栧埗" width="85%">
<div v-if="isShow" style="width: 100%; height: 82vh; overflow: auto">
@@ -99,12 +93,11 @@
{ label: "妯℃澘鍚嶇О", prop: "name" },
{ label: "澶囨敞", prop: "remark" },
{ label: "鍒涘缓鐢ㄦ埛", prop: "createUserName" },
- { label: "鍒涘缓鏃堕棿", prop: "createTime" },
+ { label: "鍒涘缓鏃堕棿", prop: "createTime", width: "160" },
{ label: "鏇存柊鐢ㄦ埛", prop: "updateUserName" },
- { label: "淇敼鏃堕棿", prop: "updateTime" },
+ { label: "淇敼鏃堕棿", prop: "updateTime", width: "160" },
{
dataType: "action",
- fixed: "right",
label: "鎿嶄綔",
operation: [
{
@@ -190,7 +183,10 @@
this.page.size = limit;
this.getList();
},
- refreshTable(e) {
+ refreshTable(event) {
+ if (event && typeof event.preventDefault === 'function') {
+ event.preventDefault(); // 闃绘榛樿琛屼负
+ }
this.page.current = 1;
this.getList();
},
@@ -379,37 +375,28 @@
</script>
<style scoped>
-/* >>>.el-dialog__wrapper {
- z-index: 100 !important;
-} */
-
.search {
- background-color: #fff;
- height: 80px;
+ height: 46px;
+ display: flex;
+ justify-content: space-between;
+}
+.search_box {
+ display: flex;
+}
+.search_item {
+ margin-bottom: 18px;
+ margin-right: 10px;
display: flex;
align-items: center;
- position: relative;
+ line-height: 32px;
}
-
-.search_thing {
- width: 350px;
- display: flex;
- align-items: center;
-}
-
.search_label {
- width: 90px;
+ width: 88px;
font-size: 14px;
- text-align: right;
+ font-weight: 700;
+ color: #606266;
}
-
-.search_input {
- width: calc(100% - 110px);
-}
-
-.btn {
- position: absolute;
- right: 14px;
- top: 20px;
+.search_button {
+ line-height: 26px;
}
</style>
diff --git a/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue b/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue
index bcace15..f73d856 100644
--- a/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue
+++ b/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue
@@ -162,7 +162,6 @@
};
},
mounted() {
- console.log(22222, this.currentRow);
this.entity.productListId = this.currentRow.id;
this.searchTableData();
},
diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue
index e36597d..d9855a5 100644
--- a/src/views/standard/standardLibrary/index.vue
+++ b/src/views/standard/standardLibrary/index.vue
@@ -1337,11 +1337,6 @@
>>>.is-disabled .el-textarea__inner {
background: rgba(0, 0, 0, 0.05) !important;
}
-
->>>.el-table__body-wrapper::-webkit-scrollbar {
- height: 14px;
- /* 璁剧疆婊氬姩鏉″搴� */
-}
</style>
<style scoped>
.standard .el-tree-node__content {
diff --git a/src/views/statisticalCharts/inspectionItemWarning/index.vue b/src/views/statisticalCharts/inspectionItemWarning/index.vue
new file mode 100644
index 0000000..448aa29
--- /dev/null
+++ b/src/views/statisticalCharts/inspectionItemWarning/index.vue
@@ -0,0 +1,290 @@
+<template>
+ <div class="app-container">
+ <div>
+ <lims-table :tableData="tableData" :column="column"
+ :height="'calc(100vh - 500px)'" @pagination="pagination"
+ :rowClick="rowClick"
+ :page="page" :tableLoading="tableLoading"></lims-table>
+ </div>
+ <div>
+ <el-row>
+ <el-col :span="24">
+ <div class="inspection-card">
+ <div class="title">妫�楠岄」鍋忓樊棰勮鏁版嵁璇︽儏</div>
+ <Echarts ref="chart"
+ :chartStyle="chartStyle"
+ :grid="grid"
+ :options="echartsOptions"
+ :series="echartsSeries"
+ :tooltip="tooltip"
+ :xAxis="xAxis"
+ :yAxis="yAxis"
+ style="height: 40vh;"></Echarts>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <el-dialog :visible.sync="viewDia" title="鏌ョ湅璇︽儏" width="1100px">
+ <lims-table :tableData="tableData1" :column="column1"
+ height="570"
+ :tableLoading="tableLoading1"></lims-table>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import {selectDeviationWarning, selectDeviationWarningPage} from "@/api/statisticalCharts/dataAnalysis";
+import Echarts from "@/components/echarts/echarts.vue";
+
+export default {
+ name: '',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: {Echarts, limsTable},
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ viewDia: false,
+ queryParams: {},
+ tableData: [],
+ tableLoading: false,
+ column: [
+ { label: '鏍峰搧缂栧彿', prop: 'sampleCode',width: 150 },
+ { label: '鏍峰搧鍚嶇О', prop: 'sampleName'},
+ { label: '鍨嬪彿', prop: 'sampleModel',width: 150 },
+ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width: 150 },
+ { label: '妫�楠岄」鍚嶇О', prop: 'inspectionItemName'},
+ {
+ label: "鍋忓樊鍊�%",
+ prop: "deviationValue",
+ width: 150,
+ dataType: "tag",
+ formatType: (params) => {
+ return 'danger'
+ },
+ },
+ { label: '妫�娴嬫椂闂�', prop: 'detectionTime',width: 160 },
+ {
+ dataType: 'action',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.openDia(row);
+ },
+ }
+ ]
+ }
+ ],
+ page: {
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ tableData1: [],
+ tableLoading1: false,
+ column1: [
+ { label: '鏍峰搧缂栧彿', prop: 'sampleCode'},
+ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'},
+ {
+ label: "妫�娴嬪��",
+ prop: "testValue",
+ width: 150,
+ dataType: "tag",
+ formatType: (params) => {
+ if (this.tableData1.find((m) => m.testValue == params).isIssue == 1) {
+ return 'danger'
+ } else {
+ return 'success'
+ }
+ },
+ },
+ { label: '妫�娴嬫椂闂�', prop: 'detectionTime',width: 160 },
+ ],
+ chartStyle: {
+ width: '100%',
+ height: '96%' // 璁剧疆鍥捐〃瀹瑰櫒鐨勯珮搴�
+ },
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ tooltip: {},
+ echartsOptions: {},
+ echartsSeries: [
+ {
+ name: '妫�娴嬪��',
+ type: 'line',
+ smooth: true,
+ tooltip: {
+ valueFormatter: function (value) {
+ return value;
+ }
+ },
+ label: {
+ show: true,
+ position: 'top',
+ formatter: function (value) {
+ return value.value;
+ },
+ distance: 14
+ },
+ data: [],
+ markArea: {},
+ markPoint: {}
+ },
+ ],
+ xAxis: [
+ {
+ type: 'category',
+ data: [],
+ boundaryGap: false,
+ axisLabel: {
+ interval: 0, // 寮哄埗鏄剧ず鎵�鏈夋爣绛�
+ rotate: 0, // 涓嶆棆杞紙鍙互鏍规嵁闇�瑕佽皟鏁达級
+ formatter: function (value) {
+ // 姣忛殧涓�瀹氶暱搴︽坊鍔犳崲琛岀
+ const maxLength = 9; // 姣忔鏈�澶у瓧绗︽暟
+ let result = '';
+ for (let i = 0; i < value.length; i += maxLength) {
+ result += value.substring(i, i + maxLength) + '\n';
+ }
+ return result.trim(); // 鍘绘帀鏈熬澶氫綑鐨勬崲琛岀
+ },
+ margin: 10, // 鏍囩涓庤酱绾跨殑璺濈
+ },
+ }
+ ],
+ yAxis: [{
+ type: 'value',
+ axisLabel: {
+ formatter: '{value}'
+ }
+ }],
+ };
+ },
+ mounted() {
+ this.refreshTable()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鏌ヨ鍒楄〃淇℃伅
+ refreshTable() {
+ this.tableLoading = true
+ selectDeviationWarningPage({ ...this.page}).then(res => {
+ this.tableLoading = false
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }).catch(err => {
+ this.tableLoading = false
+ })
+ },
+ // 鏌ヨ鎶樼嚎鍥句俊鎭�
+ rowClick (row) {
+ selectDeviationWarning({deviationWarningId: row.deviationWarningId}).then(res => {
+ console.log('res---', res)
+ if (res.data === null) {
+ this.$message.warning('鏆傛棤鏁版嵁')
+ return
+ }
+ let lineData = []
+ let xAxis = []
+ let markAreas = []; // 瀛樺偍 markArea 鐨勬暟缁�
+ let markPoints = [];
+ const sampleCodeCount = {};
+ res.data.forEach((item, index) => {
+ lineData.push(item.testValue)
+ // 娣诲姞绱㈠紩浠ョ‘淇濆敮涓�鎬�
+ // 妫�鏌ユ槸鍚﹂渶瑕佸尯鍒� sampleCode
+ if (!sampleCodeCount[item.sampleCode]) {
+ sampleCodeCount[item.sampleCode] = 1; // 绗竴娆″嚭鐜�
+ xAxis.push(item.sampleCode); // 鐩存帴浣跨敤鍘熷 sampleCode
+ } else {
+ sampleCodeCount[item.sampleCode]++; // 澧炲姞璁℃暟
+ const uniqueSampleCode = `${item.sampleCode}-${sampleCodeCount[item.sampleCode]}`;
+ xAxis.push(uniqueSampleCode); // 娣诲姞鍚庣紑浠ュ尯鍒�
+ }
+
+ // 濡傛灉 isIssue 涓� 1锛屽垯鍦ㄦ绱㈠紩澶勬坊鍔犱竴涓� markArea
+ if (item.isIssue == 1) {
+ const startColumn = index > 0 ? xAxis[index - 1] : xAxis[index]; // 璧风偣锛氬墠涓�鍒楁垨褰撳墠鍒�
+ const endColumn = xAxis[index]; // 缁堢偣锛氬綋鍓嶅垪
+
+ markAreas.push([
+ {
+ xAxis: startColumn, // 浠庡墠涓�鍒楀紑濮�
+ },
+ {
+ xAxis: endColumn, // 鍒板綋鍓嶅垪缁撴潫
+ }
+ ]);
+ markPoints.push({
+ name: '闂鐐�',
+ coord: [item.sampleCode, item.testValue],
+ value: item.testValue,
+ itemStyle: {
+ color: 'rgba(255, 173, 177, 0.8)'
+ },
+ label: {
+ show: true,
+ formatter: function(params) {
+ return params.value; // 鑷畾涔夋爣绛惧唴瀹�
+ },
+ color: 'black', // 鏍囩鏂囧瓧棰滆壊
+ fontSize: 12,
+ distance: 5, // 璋冩暣鏍囩涓庢皵娉$殑璺濈
+ padding: [0,0],
+ backgroundColor: 'rgba(255, 173, 177, 0.8)', // 鏍囩鑳屾櫙鑹插強閫忔槑搴�
+ borderRadius: 4
+ }
+ });
+ }
+ })
+ this.xAxis[0].data = xAxis
+ this.echartsSeries[0].data = lineData
+ // 鏇存柊 markArea 閰嶇疆
+ this.echartsSeries[0].markArea = {
+ itemStyle: {
+ color: 'rgba(255, 173, 177, 0.4)' // 璁剧疆鑳屾櫙棰滆壊
+ },
+ data: markAreas // 鍔ㄦ�佺敓鎴愮殑 markArea 鏁版嵁
+ };
+ this.echartsSeries[0].markPoint = {
+ data: markPoints
+ };
+ })
+ },
+ // 閲嶇疆
+ refresh() {
+ // this.resetForm('entity')
+ this.refreshTable()
+ },
+ // 鍒嗛〉鍒囨崲
+ pagination(page) {
+ this.page.size = page.limit
+ this.refreshTable()
+ },
+ openDia (row) {
+ this.viewDia = true
+ this.tableLoading1 = true
+ selectDeviationWarning({deviationWarningId: row.deviationWarningId}).then(res => {
+ this.tableLoading1 = false
+ this.tableData1 = res.data
+ }).catch(() => {
+ this.tableLoading1 = false
+ })
+ },
+ }
+};
+</script>
+
+<style scoped>
+.inspection-card{
+ width: 100%;
+ margin-top: 10px;
+}
+</style>
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index 72cb9b8..19f9318 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -33,14 +33,24 @@
v-model="itemParameterForm.inspectionItemSubclass" @keyup.enter.native="refreshTable()">
</el-input>
</el-form-item>
- <el-form-item label="妫�楠屽璞�" prop="sample">
+ <el-form-item label="妫�楠屽璞�" prop="sample" v-if="radio===0">
<el-input size="small" placeholder="璇疯緭鍏�" clearable
v-model="itemParameterForm.sample" @keyup.enter.native="refreshTable()">
</el-input>
</el-form-item>
+ <el-form-item label="妫�楠屽璞�" prop="specimenName" v-if="radio===1">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="itemParameterForm.specimenName" @keyup.enter.native="refreshTable()">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="闆朵欢鍙�" prop="partNo" v-if="radio===1">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="itemParameterForm.partNo" @keyup.enter.native="refreshTable()">
+ </el-input>
+ </el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
<!-- 妫�楠岄」鐩弬鏁拌〃鏍�-->
@@ -298,7 +308,9 @@
itemParameterForm: {
inspectionItem: null,
inspectionItemSubclass: null,
- sample: null
+ sample: null,
+ specimenName: null,
+ partNo: null
},
radio: 0,
productLoad: false,
@@ -346,6 +358,7 @@
total:0,
size:10,
current:1,
+ partNo: null,
layout: 'total, prev, pager, next'
},
productableLoading: false,
@@ -541,6 +554,7 @@
this.diaProduct = true
this.objectId = row.id
this.productPage.current = 1
+ this.productPage.partNo = this.itemParameterForm.partNo
this.getProductList(row)
},
// 鏌ヨ浜у搧缁存姢鍒楄〃鏁版嵁
diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue
index 4755b92..bb55b02 100644
--- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue
@@ -103,6 +103,18 @@
</el-select>
</el-form-item>
</el-col>
+ <el-col :span="12" v-if="editForm.inspectionItemType == 1">
+ <el-form-item label="璁惧缁戝畾锛�" prop="deviceId">
+ <el-select v-model="editForm.deviceId" clearable placeholder="璇烽�夋嫨"
+ size="small" style="width: 100%" multiple filterable>
+ <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value">
+ {{item.label + ' - ' + item.managementNumber}}
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
<el-col :span="12">
<el-form-item label="妫�楠屽�肩被鍨嬶細" prop="inspectionValueType">
<el-select v-model="editForm.inspectionValueType" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
@@ -110,8 +122,6 @@
</el-select>
</el-form-item>
</el-col>
- </el-row>
- <el-row>
<el-col :span="12">
<el-form-item label="鐗规畩鏍囪瘑锛�" prop="bsm">
<el-select v-model="editForm.bsm" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
@@ -119,6 +129,8 @@
</el-select>
</el-form-item>
</el-col>
+ </el-row>
+ <el-row>
<el-col :span="12">
<el-form-item label="鍘熷璁板綍妯℃澘锛�" prop="templateId">
<el-select v-model="editForm.templateId" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
@@ -126,20 +138,18 @@
</el-select>
</el-form-item>
</el-col>
- </el-row>
- <el-row>
<el-col :span="12">
<el-form-item label="妫�楠岄」鍒嗙被锛�" prop="inspectionItemClass">
<el-input v-model="editForm.inspectionItemClass" clearable size="small"></el-input>
</el-form-item>
</el-col>
+ </el-row>
+ <el-row>
<el-col :span="12">
<el-form-item label="妫�楠岄」鍒嗙被EN锛�" prop="inspectionItemClassEn">
<el-input v-model="editForm.inspectionItemClassEn" clearable size="small"></el-input>
</el-form-item>
</el-col>
- </el-row>
- <el-row>
<el-col :span="12">
<el-form-item label="璇曢獙鏂规硶锛�" prop="method">
<el-select v-model="editForm.method" clearable multiple placeholder="璇烽�夋嫨" size="small" style="width: 100%">
@@ -147,6 +157,8 @@
</el-select>
</el-form-item>
</el-col>
+ </el-row>
+ <el-row>
<el-col :span="12">
<el-form-item label="鏉′欢锛�" prop="radiusList">
<el-select v-model="editForm.radiusList" allow-create default-first-option filterable multiple
@@ -157,8 +169,6 @@
</el-select>
</el-form-item>
</el-col>
- </el-row>
- <el-row>
<el-col :span="12">
<el-form-item label="鏀惰垂鏍囧噯(鍏�/娆�)锛�" prop="rates">
<el-input v-model="editForm.rates" clearable size="small"></el-input>
@@ -191,6 +201,7 @@
upItemParameter
} from "@/api/structural/capability";
import {selectStandardMethods} from "@/api/structural/standardMethod";
+import {search} from "@/api/business/inspectionTask";
export default {
name: "EditForm",
@@ -227,6 +238,7 @@
method: '', // 璇曢獙鏂规硶
radiusList: [], // 鏉′欢
rates: '', // 鏉′欢
+ deviceId: [], // 璁惧
},
sampleList: [], // 妫�楠屽璞′笅鎷夋
laboratoryList: [], // 鍦烘墍涓嬫媺妗�
@@ -262,7 +274,8 @@
{ required: true, message: '璇烽�夋嫨鍘熷璁板綍妯℃澘', trigger: 'change' }
]
},
- operationType: ''
+ operationType: '',
+ equipOptions: []
}
},
// 鏂规硶闆嗗悎
@@ -270,6 +283,7 @@
openDia (type, row) {
this.operationType = type
this.editFormDia = true
+ this.getEquipOptions() // 鑾峰彇鎵�鏈夎澶�
this.obtainItemParameterList() // 鍦烘墍绫诲瀷
this.getStandardTemplate() // 鍘熷璁板綍妯℃澘涓嬫媺妗�
this.getSelectStandardMethods() // 璇曢獙鏂规硶
@@ -305,8 +319,11 @@
} else {
this.editForm = this.HaveJson(row)
this.editForm.sample = JSON.parse(this.editForm.sample)
- this.editForm.radiusList = JSON.parse(this.editForm.radiusList)
+ this.editForm.radiusList = this.editForm.radiusList && JSON.parse(this.editForm.radiusList)
this.editForm.method = JSON.parse(this.editForm.method)
+ const ids = this.editForm.deviceIds && this.editForm.deviceIds.split(",") || [];
+ const numericIds = ids.map(Number);
+ this.$set(this.editForm, 'deviceId', numericIds);
}
},
// 鎻愪氦缂栬緫
@@ -321,6 +338,11 @@
obj.radiusList = JSON.stringify(obj.radiusList)
} else {
obj.radiusList = null
+ }
+ if (obj.deviceId?.length > 0) {
+ obj.deviceIds = obj.deviceId.join(',')
+ } else {
+ obj.deviceIds = null
}
if(obj.id){
// 淇敼
@@ -425,6 +447,22 @@
this.templateIdList = data
})
},
+ // 鑾峰彇鎵�鏈夎澶�
+ getEquipOptions() {
+ this.equipOptions = [];
+ search({ status: 0 }).then((res) => {
+ if (res.code === 200 && res.data) {
+ this.equipOptions = res.data.map((m) => {
+ m.value = m.id;
+ m.label = m.deviceName;
+ m.managementNumber = m.managementNumber;
+ return m;
+ });
+ }
+ }).catch((error) => {
+ console.error(error);
+ });
+ },
},
}
</script>
diff --git a/src/views/structural/capabilityAndLaboratory/laboratory/index.vue b/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
index ef5109e..9a14304 100644
--- a/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
@@ -11,8 +11,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -174,7 +174,6 @@
{ label: "鍒版湡棰佸彂鏃堕棿", prop: "expireTime" },
{
dataType: "action",
- fixed: "right",
label: "鎿嶄綔",
operation: [
{
diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue
index d7e6395..2b9b750 100644
--- a/src/views/structural/premises/index.vue
+++ b/src/views/structural/premises/index.vue
@@ -12,8 +12,8 @@
@keyup.enter.native="refreshTable"></el-input>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -123,9 +123,7 @@
{ label: '鍒涘缓鏃堕棿', prop: 'createTime' },
{
dataType: 'action',
- fixed: 'right',
label: '鎿嶄綔',
- width: '180px',
operation: [
{
name: '缂栬緫',
diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue
index c4e6cdd..4f81104 100644
--- a/src/views/system/config/index.vue
+++ b/src/views/system/config/index.vue
@@ -41,8 +41,8 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/customer/index.vue b/src/views/system/customer/index.vue
index 767cdc9..28f4d95 100644
--- a/src/views/system/customer/index.vue
+++ b/src/views/system/customer/index.vue
@@ -1,17 +1,16 @@
<template>
<div class="app-container">
- <div class="search">
- <div>
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
- <el-form-item label="瀹㈡埛鍚嶇О" prop="company">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.company"
- @keyup.enter.native="getList"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- </el-form-item>
- </el-form>
+ <div style="display: flex;justify-content: space-between">
+ <div class="search_box">
+ <div class="search_item">
+ <span class="search_label">瀹㈡埛鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.company"
+ @keyup.enter.native="getList"></el-input>
+ </div>
+ <div class="search_button">
+ <el-button type="primary" size="mini" @click="getList">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
</div>
<div>
<el-button size="small" type="primary" @click="openFormDia('add')" icon="el-icon-plus">鏂板</el-button>
@@ -107,7 +106,7 @@
page: {
total:0,
size:20,
- current:0
+ current:1
},
tableLoading: false,
// 缂栬緫瀹㈡埛寮规
@@ -220,9 +219,23 @@
</script>
<style scoped>
-.search {
- height: 46px;
+.search_box {
display: flex;
- justify-content: space-between;
+}
+.search_item {
+ margin-bottom: 18px;
+ margin-right: 10px;
+ display: flex;
+ align-items: center;
+ line-height: 32px;
+}
+.search_label {
+ width: 88px;
+ font-size: 14px;
+ font-weight: 700;
+ color: #606266;
+}
+.search_button {
+ line-height: 30px;
}
</style>
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index b7c3bdc..c670240 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -11,8 +11,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue
index 836d881..b79d7fd 100644
--- a/src/views/system/dict/data.vue
+++ b/src/views/system/dict/data.vue
@@ -30,8 +30,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 60769cc..f337f95 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -46,8 +46,8 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index 108aa2a..79062be 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -11,8 +11,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index a3d3569..1d26294 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -28,8 +28,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue
index 42f1a5d..6086eb8 100644
--- a/src/views/system/post/index.vue
+++ b/src/views/system/post/index.vue
@@ -28,8 +28,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/role/authUser.vue b/src/views/system/role/authUser.vue
index 27e3120..c6cfef1 100644
--- a/src/views/system/role/authUser.vue
+++ b/src/views/system/role/authUser.vue
@@ -20,8 +20,8 @@
/>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 36921cb..d2e8231 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -22,8 +22,8 @@
range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
diff --git a/src/views/system/role/selectUser.vue b/src/views/system/role/selectUser.vue
index 0bea730..a6ec7d8 100644
--- a/src/views/system/role/selectUser.vue
+++ b/src/views/system/role/selectUser.vue
@@ -19,8 +19,8 @@
/>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
<el-row>
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 90909b3..0fb4722 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -28,14 +28,14 @@
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="鐘舵��" prop="status">
- <el-select v-model="queryParams.status" placeholder="鐢ㄦ埛鐘舵��" clearable>
+ <el-select v-model="queryParams.status" placeholder="鐢ㄦ埛鐘舵��" clearable @change="handleQuery">
<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>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" size="mini" @click="handleQuery">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
@@ -213,7 +213,7 @@
<el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length != 1">
<el-input v-model="search2" placeholder="杈撳叆鍏抽敭瀛楁悳绱�" clearable size="small" @clear="searchFilter2"
@keyup.enter.native="searchFilter2" prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%" />
- <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps" @node-click="nodeClick2"
+ <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps1" @node-click="nodeClick2"
style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2"
highlight-current>
</el-tree>
@@ -231,7 +231,7 @@
</el-table-column>
<el-table-column prop="employeeID" label="鍛樺伐鍙�">
</el-table-column>
- <el-table-column prop="nickName" label="鍛樺伐濮撳悕">
+ <el-table-column prop="name" label="鍛樺伐濮撳悕">
</el-table-column>
<el-table-column prop="department" label="閮ㄩ棬" min-width="200">
</el-table-column>
@@ -294,6 +294,7 @@
return {
// 閬僵灞�
loading: true,
+ multipleSelection: [],
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
@@ -329,6 +330,10 @@
defaultProps: {
children: "children",
label: "label"
+ },
+ defaultProps1: {
+ children: "children",
+ label: "companyName"
},
// 鐢ㄦ埛瀵煎叆鍙傛暟
upload: {
@@ -542,6 +547,7 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
+ this.multipleSelection = selection;
this.ids = selection.map(item => item.userId);
this.single = selection.length != 1;
this.multiple = !selection.length;
@@ -560,30 +566,31 @@
}
},
// 鑾峰彇涓夋柟浜哄憳
- openthirdParty() {
- this.addthirdParty = true;
- this.thirdPartyLoading = true;
- selectCompaniesList().then(res => {
- this.companiesList = this.HaveJson(res.data);
- if (this.companiesList.length == 1) {
- selectSimpleList({ companyId: this.companiesList[0].companyId }).then(res => {
- this.thirdPartyLoading = false;
- this.personListCopy = JSON.parse(JSON.stringify(res.data))
- this.personList = res.data
- this.$refs.personTable.doLayout()
- })
- } else {
- this.thirdPartyLoading = false;
+ async openthirdParty() {
+ try {
+ this.addthirdParty = true;
+ this.thirdPartyLoading = true;
+
+ const companiesResponse = await selectCompaniesList();
+ this.companiesList = this.HaveJson(companiesResponse.data);
+
+ if (this.companiesList.length === 1) {
+ const personResponse = await selectSimpleList({ companyId: this.companiesList[0].companyId });
+ this.personListCopy = JSON.parse(JSON.stringify(personResponse.data));
+ this.personList = personResponse.data;
+ this.$refs.personTable.doLayout();
}
- this.datathirdParty = this.tranListToTreeData(res.data, "ROOT");
- }).catch(() => {
+
+ this.datathirdParty = this.tranListToTreeData(this.companiesList, "ROOT");
+ console.log(' this.datathirdParty---', this.datathirdParty)
+ } catch (error) {
+ console.error("Error fetching third party data:", error);
+ } finally {
this.thirdPartyLoading = false;
- })
- if (this.componentData.entity.roleId > 10000) this.$message.warning('鐢变簬鏈�変腑鍏蜂綋瑙掕壊锛屾柊澧炵敤鎴峰皢鎴愪负榛樿瑙掕壊')
+ }
},
tranListToTreeData(list, rootValue) {
- const arr = [];
- list.forEach((item) => {
+ return list.reduce((arr, item) => {
if (item.parentCompanyId === rootValue) {
const children = this.tranListToTreeData(list, item.companyId);
if (children.length) {
@@ -591,8 +598,8 @@
}
arr.push(item);
}
- });
- return arr;
+ return arr;
+ }, []);
},
searchPerson() {
let arr = JSON.parse(JSON.stringify(this.personListCopy))
@@ -624,7 +631,7 @@
}
},
nodeOpen0(data, node, el) {
- this.currentCompaniesList[node.level - nodeOpen01] = data.id
+ // this.currentCompaniesList[node.level - nodeOpen01] = data.id
},
filterNode2(value, data) {
if (!value) return true;
@@ -652,12 +659,13 @@
addPersonUser({
company: arr,
person: this.multipleSelection,
- roleId: this.componentData.entity.roleId
+ // roleId: this.componentData.entity.roleId
}).then(res => {
this.$message.success('鎿嶄綔鎴愬姛')
this.multipleSelection = []
this.$refs.personTable.clearSelection()
this.addLoad = false
+ this.addthirdParty = false
this.userSearch2 = ''
this.getList()
}).catch(e => {
diff --git a/src/views/thirdpartylogin.vue b/src/views/thirdpartylogin.vue
index 692ce99..1fe70ea 100644
--- a/src/views/thirdpartylogin.vue
+++ b/src/views/thirdpartylogin.vue
@@ -5,25 +5,18 @@
export default {
data() {
return {
- SSO: window.location.hash
- }
+ };
},
created() {
- this.initLogin()
- console.log(this.SSO)
+ this.initLogin();
},
methods: {
initLogin() {
- const code = this.SSO.split('&')[0].split('=')[1]
- console.log(code)
-
- if (code) {
- this.$store.dispatch('LoginBySSO', code).then(() => {
- this.$router.push({ path: '/' })
- })
- }
+ this.$store.dispatch('LoginBySSO', {code: this.$route.query.code}).then(() => {
+ this.$router.push({path: '/'});
+ });
}
}
-}
+};
</script>
-<style scoped></style>
+<style scoped></style>
\ No newline at end of file
diff --git a/src/DataWorker.worker.js b/src/workers/DataWorker.worker.js
similarity index 84%
rename from src/DataWorker.worker.js
rename to src/workers/DataWorker.worker.js
index b2e99c1..218ed78 100644
--- a/src/DataWorker.worker.js
+++ b/src/workers/DataWorker.worker.js
@@ -65,27 +65,25 @@
if(i+1==arr[1]){
// 璧嬪�兼暟閲囦紭鍖栨楠岄」鍒楄〃
arrSpecial.push(n.i)
- setTimeout(()=>{
- let num0 = 0
- if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
- // 淇濈暀妯℃澘閰嶇疆鐨勫皬鏁扮偣浣嶆暟
- let str0 = n.v.ct.fa.split('.')[1]
- num0 = str0.length
- n.v.v = dataAcquisitionInfo[str].value[i]?Number(dataAcquisitionInfo[str].value[i]).toFixed(num0):dataAcquisitionInfo[str].value[i]
- }else{
- // 鐩存帴璧嬪��
- n.v.v = dataAcquisitionInfo[str].value[i]
+ let num0 = 0
+ if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
+ // 淇濈暀妯℃澘閰嶇疆鐨勫皬鏁扮偣浣嶆暟
+ let str0 = n.v.ct.fa.split('.')[1]
+ num0 = str0.length
+ n.v.v = dataAcquisitionInfo[str].value[i]?Number(dataAcquisitionInfo[str].value[i]).toFixed(num0):dataAcquisitionInfo[str].value[i]
+ }else{
+ // 鐩存帴璧嬪��
+ n.v.v = dataAcquisitionInfo[str].value[i]
+ }
+ // 浼犻�掔粰涓荤嚎绋�
+ result = {
+ method:'changeInput',
+ value:{
+ list:list,
+ n:n
}
- // 浼犻�掔粰涓荤嚎绋�
- result = {
- method:'changeInput',
- value:{
- list:list,
- n:n
- }
- }
- self.postMessage(JSON.stringify(result))
- },2000)
+ }
+ self.postMessage(JSON.stringify(result))
}
}
}else{
diff --git a/src/InspectionWorker.worker.js b/src/workers/InspectionWorker.worker.js
similarity index 68%
rename from src/InspectionWorker.worker.js
rename to src/workers/InspectionWorker.worker.js
index 59ac692..5736162 100644
--- a/src/InspectionWorker.worker.js
+++ b/src/workers/InspectionWorker.worker.js
@@ -1,4 +1,6 @@
// 澶氱嚎绋嬮噷闈㈤渶瑕佷繚瀛樼殑鏁版嵁
+import Big from "big.js";
+
let code = "";
// 琛ㄦ牸鏁版嵁锛堟覆鏌擄級
let tableList = null;
@@ -1439,913 +1441,3 @@
console.log("error", error);
}
}
-
-/*
- * big.js v5.2.2
- * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.
- * Copyright (c) 2018 Michael Mclaughlin <M8ch88l@gmail.com>
- * https://github.com/MikeMcl/big.js/LICENCE
- */
-(function (GLOBAL) {
- "use strict";
- var Big,
- /************************************** EDITABLE DEFAULTS *****************************************/
-
- // The default values below must be integers within the stated ranges.
-
- /*
- * The maximum number of decimal places (DP) of the results of operations involving division:
- * div and sqrt, and pow with negative exponents.
- */
- DP = 20, // 0 to MAX_DP
- /*
- * The rounding mode (RM) used when rounding to the above decimal places.
- *
- * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)
- * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)
- * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)
- * 3 Away from zero. (ROUND_UP)
- */
- RM = 1, // 0, 1, 2 or 3
- // The maximum value of DP and Big.DP.
- MAX_DP = 1e6, // 0 to 1000000
- // The maximum magnitude of the exponent argument to the pow method.
- MAX_POWER = 1e6, // 1 to 1000000
- /*
- * The negative exponent (NE) at and beneath which toString returns exponential notation.
- * (JavaScript numbers: -7)
- * -1000000 is the minimum recommended exponent value of a Big.
- */
- NE = -7, // 0 to -1000000
- /*
- * The positive exponent (PE) at and above which toString returns exponential notation.
- * (JavaScript numbers: 21)
- * 1000000 is the maximum recommended exponent value of a Big.
- * (This limit is not enforced or checked.)
- */
- PE = 21, // 0 to 1000000
- /**************************************************************************************************/
-
- // Error messages.
- NAME = "[big.js] ",
- INVALID = NAME + "Invalid ",
- INVALID_DP = INVALID + "decimal places",
- INVALID_RM = INVALID + "rounding mode",
- DIV_BY_ZERO = NAME + "Division by zero",
- // The shared prototype object.
- P = {},
- UNDEFINED = void 0,
- NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
-
- /*
- * Create and return a Big constructor.
- *
- */
- function _Big_() {
- /*
- * The Big constructor and exported function.
- * Create and return a new instance of a Big number object.
- *
- * n {number|string|Big} A numeric value.
- */
- function Big(n) {
- var x = this;
-
- // Enable constructor usage without new.
- if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);
-
- // Duplicate.
- if (n instanceof Big) {
- x.s = n.s;
- x.e = n.e;
- x.c = n.c.slice();
- } else {
- parse(x, n);
- }
-
- /*
- * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which
- * points to Object.
- */
- x.constructor = Big;
- }
-
- Big.prototype = P;
- Big.DP = DP;
- Big.RM = RM;
- Big.NE = NE;
- Big.PE = PE;
- Big.version = "5.2.2";
-
- return Big;
- }
-
- /*
- * Parse the number or string value passed to a Big constructor.
- *
- * x {Big} A Big number instance.
- * n {number|string} A numeric value.
- */
- function parse(x, n) {
- var e, i, nl;
-
- // Minus zero?
- if (n === 0 && 1 / n < 0) n = "-0";
- else if (!NUMERIC.test((n += ""))) throw Error(INVALID + "number");
-
- // Determine sign.
- x.s = n.charAt(0) == "-" ? ((n = n.slice(1)), -1) : 1;
-
- // Decimal point?
- if ((e = n.indexOf(".")) > -1) n = n.replace(".", "");
-
- // Exponential form?
- if ((i = n.search(/e/i)) > 0) {
- // Determine exponent.
- if (e < 0) e = i;
- e += +n.slice(i + 1);
- n = n.substring(0, i);
- } else if (e < 0) {
- // Integer.
- e = n.length;
- }
-
- nl = n.length;
-
- // Determine leading zeros.
- for (i = 0; i < nl && n.charAt(i) == "0"; ) ++i;
-
- if (i == nl) {
- // Zero.
- x.c = [(x.e = 0)];
- } else {
- // Determine trailing zeros.
- for (; nl > 0 && n.charAt(--nl) == "0"; );
- x.e = e - i - 1;
- x.c = [];
-
- // Convert string to array of digits without leading/trailing zeros.
- for (e = 0; i <= nl; ) x.c[e++] = +n.charAt(i++);
- }
-
- return x;
- }
-
- /*
- * Round Big x to a maximum of dp decimal places using rounding mode rm.
- * Called by stringify, P.div, P.round and P.sqrt.
- *
- * x {Big} The Big to round.
- * dp {number} Integer, 0 to MAX_DP inclusive.
- * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP)
- * [more] {boolean} Whether the result of division was truncated.
- */
- function round(x, dp, rm, more) {
- var xc = x.c,
- i = x.e + dp + 1;
-
- if (i < xc.length) {
- if (rm === 1) {
- // xc[i] is the digit after the digit that may be rounded up.
- more = xc[i] >= 5;
- } else if (rm === 2) {
- more =
- xc[i] > 5 ||
- (xc[i] == 5 &&
- (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1));
- } else if (rm === 3) {
- more = more || !!xc[0];
- } else {
- more = false;
- if (rm !== 0) throw Error(INVALID_RM);
- }
-
- if (i < 1) {
- xc.length = 1;
-
- if (more) {
- // 1, 0.1, 0.01, 0.001, 0.0001 etc.
- x.e = -dp;
- xc[0] = 1;
- } else {
- // Zero.
- xc[0] = x.e = 0;
- }
- } else {
- // Remove any digits after the required decimal places.
- xc.length = i--;
-
- // Round up?
- if (more) {
- // Rounding up may mean the previous digit has to be rounded up.
- for (; ++xc[i] > 9; ) {
- xc[i] = 0;
- if (!i--) {
- ++x.e;
- xc.unshift(1);
- }
- }
- }
-
- // Remove trailing zeros.
- for (i = xc.length; !xc[--i]; ) xc.pop();
- }
- } else if (rm < 0 || rm > 3 || rm !== ~~rm) {
- throw Error(INVALID_RM);
- }
-
- return x;
- }
-
- /*
- * Return a string representing the value of Big x in normal or exponential notation.
- * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.
- *
- * x {Big}
- * id? {number} Caller id.
- * 1 toExponential
- * 2 toFixed
- * 3 toPrecision
- * 4 valueOf
- * n? {number|undefined} Caller's argument.
- * k? {number|undefined}
- */
- function stringify(x, id, n, k) {
- var e,
- s,
- Big = x.constructor,
- z = !x.c[0];
-
- if (n !== UNDEFINED) {
- if (n !== ~~n || n < (id == 3) || n > MAX_DP) {
- throw Error(id == 3 ? INVALID + "precision" : INVALID_DP);
- }
-
- x = new Big(x);
-
- // The index of the digit that may be rounded up.
- n = k - x.e;
-
- // Round?
- if (x.c.length > ++k) round(x, n, Big.RM);
-
- // toFixed: recalculate k as x.e may have changed if value rounded up.
- if (id == 2) k = x.e + n + 1;
-
- // Append zeros?
- for (; x.c.length < k; ) x.c.push(0);
- }
-
- e = x.e;
- s = x.c.join("");
- n = s.length;
-
- // Exponential notation?
- if (
- id != 2 &&
- (id == 1 || (id == 3 && k <= e) || e <= Big.NE || e >= Big.PE)
- ) {
- s =
- s.charAt(0) +
- (n > 1 ? "." + s.slice(1) : "") +
- (e < 0 ? "e" : "e+") +
- e;
-
- // Normal notation.
- } else if (e < 0) {
- for (; ++e; ) s = "0" + s;
- s = "0." + s;
- } else if (e > 0) {
- if (++e > n) for (e -= n; e--; ) s += "0";
- else if (e < n) s = s.slice(0, e) + "." + s.slice(e);
- } else if (n > 1) {
- s = s.charAt(0) + "." + s.slice(1);
- }
-
- return x.s < 0 && (!z || id == 4) ? "-" + s : s;
- }
-
- // Prototype/instance methods
-
- /*
- * Return a new Big whose value is the absolute value of this Big.
- */
- P.abs = function () {
- var x = new this.constructor(this);
- x.s = 1;
- return x;
- };
-
- /*
- * Return 1 if the value of this Big is greater than the value of Big y,
- * -1 if the value of this Big is less than the value of Big y, or
- * 0 if they have the same value.
- */
- P.cmp = function (y) {
- var isneg,
- x = this,
- xc = x.c,
- yc = (y = new x.constructor(y)).c,
- i = x.s,
- j = y.s,
- k = x.e,
- l = y.e;
-
- // Either zero?
- if (!xc[0] || !yc[0]) return !xc[0] ? (!yc[0] ? 0 : -j) : i;
-
- // Signs differ?
- if (i != j) return i;
-
- isneg = i < 0;
-
- // Compare exponents.
- if (k != l) return (k > l) ^ isneg ? 1 : -1;
-
- j = (k = xc.length) < (l = yc.length) ? k : l;
-
- // Compare digit by digit.
- for (i = -1; ++i < j; ) {
- if (xc[i] != yc[i]) return (xc[i] > yc[i]) ^ isneg ? 1 : -1;
- }
-
- // Compare lengths.
- return k == l ? 0 : (k > l) ^ isneg ? 1 : -1;
- };
-
- /*
- * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,
- * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
- */
- P.div = function (y) {
- var x = this,
- Big = x.constructor,
- a = x.c, // dividend
- b = (y = new Big(y)).c, // divisor
- k = x.s == y.s ? 1 : -1,
- dp = Big.DP;
-
- if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP);
-
- // Divisor is zero?
- if (!b[0]) throw Error(DIV_BY_ZERO);
-
- // Dividend is 0? Return +-0.
- if (!a[0]) return new Big(k * 0);
-
- var bl,
- bt,
- n,
- cmp,
- ri,
- bz = b.slice(),
- ai = (bl = b.length),
- al = a.length,
- r = a.slice(0, bl), // remainder
- rl = r.length,
- q = y, // quotient
- qc = (q.c = []),
- qi = 0,
- d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result
-
- q.s = k;
- k = d < 0 ? 0 : d;
-
- // Create version of divisor with leading zero.
- bz.unshift(0);
-
- // CommunicateAdd zeros to make remainder as long as divisor.
- for (; rl++ < bl; ) r.push(0);
-
- do {
- // n is how many times the divisor goes into current remainder.
- for (n = 0; n < 10; n++) {
- // Compare divisor and remainder.
- if (bl != (rl = r.length)) {
- cmp = bl > rl ? 1 : -1;
- } else {
- for (ri = -1, cmp = 0; ++ri < bl; ) {
- if (b[ri] != r[ri]) {
- cmp = b[ri] > r[ri] ? 1 : -1;
- break;
- }
- }
- }
-
- // If divisor < remainder, subtract divisor from remainder.
- if (cmp < 0) {
- // Remainder can't be more than 1 digit longer than divisor.
- // Equalise lengths using divisor with extra leading zero?
- for (bt = rl == bl ? b : bz; rl; ) {
- if (r[--rl] < bt[rl]) {
- ri = rl;
- for (; ri && !r[--ri]; ) r[ri] = 9;
- --r[ri];
- r[rl] += 10;
- }
- r[rl] -= bt[rl];
- }
-
- for (; !r[0]; ) r.shift();
- } else {
- break;
- }
- }
-
- // CommunicateAdd the digit n to the result array.
- qc[qi++] = cmp ? n : ++n;
-
- // Update the remainder.
- if (r[0] && cmp) r[rl] = a[ai] || 0;
- else r = [a[ai]];
- } while ((ai++ < al || r[0] !== UNDEFINED) && k--);
-
- // Leading zero? Do not remove if result is simply zero (qi == 1).
- if (!qc[0] && qi != 1) {
- // There can't be more than one zero.
- qc.shift();
- q.e--;
- }
-
- // Round?
- if (qi > d) round(q, dp, Big.RM, r[0] !== UNDEFINED);
-
- return q;
- };
-
- /*
- * Return true if the value of this Big is equal to the value of Big y, otherwise return false.
- */
- P.eq = function (y) {
- return !this.cmp(y);
- };
-
- /*
- * Return true if the value of this Big is greater than the value of Big y, otherwise return
- * false.
- */
- P.gt = function (y) {
- return this.cmp(y) > 0;
- };
-
- /*
- * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise
- * return false.
- */
- P.gte = function (y) {
- return this.cmp(y) > -1;
- };
-
- /*
- * Return true if the value of this Big is less than the value of Big y, otherwise return false.
- */
- P.lt = function (y) {
- return this.cmp(y) < 0;
- };
-
- /*
- * Return true if the value of this Big is less than or equal to the value of Big y, otherwise
- * return false.
- */
- P.lte = function (y) {
- return this.cmp(y) < 1;
- };
-
- /*
- * Return a new Big whose value is the value of this Big minus the value of Big y.
- */
- P.minus = P.sub = function (y) {
- var i,
- j,
- t,
- xlty,
- x = this,
- Big = x.constructor,
- a = x.s,
- b = (y = new Big(y)).s;
-
- // Signs differ?
- if (a != b) {
- y.s = -b;
- return x.plus(y);
- }
-
- var xc = x.c.slice(),
- xe = x.e,
- yc = y.c,
- ye = y.e;
-
- // Either zero?
- if (!xc[0] || !yc[0]) {
- // y is non-zero? x is non-zero? Or both are zero.
- return yc[0] ? ((y.s = -b), y) : new Big(xc[0] ? x : 0);
- }
-
- // Determine which is the bigger number. Prepend zeros to equalise exponents.
- if ((a = xe - ye)) {
- if ((xlty = a < 0)) {
- a = -a;
- t = xc;
- } else {
- ye = xe;
- t = yc;
- }
-
- t.reverse();
- for (b = a; b--; ) t.push(0);
- t.reverse();
- } else {
- // Exponents equal. Check digit by digit.
- j = ((xlty = xc.length < yc.length) ? xc : yc).length;
-
- for (a = b = 0; b < j; b++) {
- if (xc[b] != yc[b]) {
- xlty = xc[b] < yc[b];
- break;
- }
- }
- }
-
- // x < y? Point xc to the array of the bigger number.
- if (xlty) {
- t = xc;
- xc = yc;
- yc = t;
- y.s = -y.s;
- }
-
- /*
- * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only
- * needs to start at yc.length.
- */
- if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--; ) xc[i++] = 0;
-
- // Subtract yc from xc.
- for (b = i; j > a; ) {
- if (xc[--j] < yc[j]) {
- for (i = j; i && !xc[--i]; ) xc[i] = 9;
- --xc[i];
- xc[j] += 10;
- }
-
- xc[j] -= yc[j];
- }
-
- // Remove trailing zeros.
- for (; xc[--b] === 0; ) xc.pop();
-
- // Remove leading zeros and adjust exponent accordingly.
- for (; xc[0] === 0; ) {
- xc.shift();
- --ye;
- }
-
- if (!xc[0]) {
- // n - n = +0
- y.s = 1;
-
- // Result must be zero.
- xc = [(ye = 0)];
- }
-
- y.c = xc;
- y.e = ye;
-
- return y;
- };
-
- /*
- * Return a new Big whose value is the value of this Big modulo the value of Big y.
- */
- P.mod = function (y) {
- var ygtx,
- x = this,
- Big = x.constructor,
- a = x.s,
- b = (y = new Big(y)).s;
-
- if (!y.c[0]) throw Error(DIV_BY_ZERO);
-
- x.s = y.s = 1;
- ygtx = y.cmp(x) == 1;
- x.s = a;
- y.s = b;
-
- if (ygtx) return new Big(x);
-
- a = Big.DP;
- b = Big.RM;
- Big.DP = Big.RM = 0;
- x = x.div(y);
- Big.DP = a;
- Big.RM = b;
-
- return this.minus(x.times(y));
- };
-
- /*
- * Return a new Big whose value is the value of this Big plus the value of Big y.
- */
- P.plus = P.add = function (y) {
- var t,
- x = this,
- Big = x.constructor,
- a = x.s,
- b = (y = new Big(y)).s;
-
- // Signs differ?
- if (a != b) {
- y.s = -b;
- return x.minus(y);
- }
-
- var xe = x.e,
- xc = x.c,
- ye = y.e,
- yc = y.c;
-
- // Either zero? y is non-zero? x is non-zero? Or both are zero.
- if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0);
-
- xc = xc.slice();
-
- // Prepend zeros to equalise exponents.
- // Note: reverse faster than unshifts.
- if ((a = xe - ye)) {
- if (a > 0) {
- ye = xe;
- t = yc;
- } else {
- a = -a;
- t = xc;
- }
-
- t.reverse();
- for (; a--; ) t.push(0);
- t.reverse();
- }
-
- // Point xc to the longer array.
- if (xc.length - yc.length < 0) {
- t = yc;
- yc = xc;
- xc = t;
- }
-
- a = yc.length;
-
- // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.
- for (b = 0; a; xc[a] %= 10) b = ((xc[--a] = xc[a] + yc[a] + b) / 10) | 0;
-
- // No need to check for zero, as +x + +y != 0 && -x + -y != 0
-
- if (b) {
- xc.unshift(b);
- ++ye;
- }
-
- // Remove trailing zeros.
- for (a = xc.length; xc[--a] === 0; ) xc.pop();
-
- y.c = xc;
- y.e = ye;
-
- return y;
- };
-
- /*
- * Return a Big whose value is the value of this Big raised to the power n.
- * If n is negative, round to a maximum of Big.DP decimal places using rounding
- * mode Big.RM.
- *
- * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.
- */
- P.pow = function (n) {
- var x = this,
- one = new x.constructor(1),
- y = one,
- isneg = n < 0;
-
- if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER)
- throw Error(INVALID + "exponent");
- if (isneg) n = -n;
-
- for (;;) {
- if (n & 1) y = y.times(x);
- n >>= 1;
- if (!n) break;
- x = x.times(x);
- }
-
- return isneg ? one.div(y) : y;
- };
-
- /*
- * Return a new Big whose value is the value of this Big rounded using rounding mode rm
- * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a
- * multiple of 10**-dp.
- * If dp is not specified, round to 0 decimal places.
- * If rm is not specified, use Big.RM.
- *
- * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.
- * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP)
- */
- P.round = function (dp, rm) {
- var Big = this.constructor;
- if (dp === UNDEFINED) dp = 0;
- else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP)
- throw Error(INVALID_DP);
- return round(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm);
- };
-
- /*
- * Return a new Big whose value is the square root of the value of this Big, rounded, if
- * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
- */
- P.sqrt = function () {
- var r,
- c,
- t,
- x = this,
- Big = x.constructor,
- s = x.s,
- e = x.e,
- half = new Big(0.5);
-
- // Zero?
- if (!x.c[0]) return new Big(x);
-
- // Negative?
- if (s < 0) throw Error(NAME + "No square root");
-
- // Estimate.
- s = Math.sqrt(x + "");
-
- // Math.sqrt underflow/overflow?
- // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.
- if (s === 0 || s === 1 / 0) {
- c = x.c.join("");
- if (!((c.length + e) & 1)) c += "0";
- s = Math.sqrt(c);
- e = (((e + 1) / 2) | 0) - (e < 0 || e & 1);
- r = new Big(
- (s == 1 / 0
- ? "1e"
- : (s = s.toExponential()).slice(0, s.indexOf("e") + 1)) + e
- );
- } else {
- r = new Big(s);
- }
-
- e = r.e + (Big.DP += 4);
-
- // Newton-Raphson iteration.
- do {
- t = r;
- r = half.times(t.plus(x.div(t)));
- } while (t.c.slice(0, e).join("") !== r.c.slice(0, e).join(""));
-
- return round(r, (Big.DP -= 4), Big.RM);
- };
-
- /*
- * Return a new Big whose value is the value of this Big times the value of Big y.
- */
- P.times = P.mul = function (y) {
- var c,
- x = this,
- Big = x.constructor,
- xc = x.c,
- yc = (y = new Big(y)).c,
- a = xc.length,
- b = yc.length,
- i = x.e,
- j = y.e;
-
- // Determine sign of result.
- y.s = x.s == y.s ? 1 : -1;
-
- // Return signed 0 if either 0.
- if (!xc[0] || !yc[0]) return new Big(y.s * 0);
-
- // Initialise exponent of result as x.e + y.e.
- y.e = i + j;
-
- // If array xc has fewer digits than yc, swap xc and yc, and lengths.
- if (a < b) {
- c = xc;
- xc = yc;
- yc = c;
- j = a;
- a = b;
- b = j;
- }
-
- // Initialise coefficient array of result with zeros.
- for (c = new Array((j = a + b)); j--; ) c[j] = 0;
-
- // Multiply.
-
- // i is initially xc.length.
- for (i = b; i--; ) {
- b = 0;
-
- // a is yc.length.
- for (j = a + i; j > i; ) {
- // Current sum of products at this digit position, plus carry.
- b = c[j] + yc[i] * xc[j - i - 1] + b;
- c[j--] = b % 10;
-
- // carry
- b = (b / 10) | 0;
- }
-
- c[j] = (c[j] + b) % 10;
- }
-
- // Increment result exponent if there is a final carry, otherwise remove leading zero.
- if (b) ++y.e;
- else c.shift();
-
- // Remove trailing zeros.
- for (i = c.length; !c[--i]; ) c.pop();
- y.c = c;
-
- return y;
- };
-
- /*
- * Return a string representing the value of this Big in exponential notation to dp fixed decimal
- * places and rounded using Big.RM.
- *
- * dp? {number} Integer, 0 to MAX_DP inclusive.
- */
- P.toExponential = function (dp) {
- return stringify(this, 1, dp, dp);
- };
-
- /*
- * Return a string representing the value of this Big in normal notation to dp fixed decimal
- * places and rounded using Big.RM.
- *
- * dp? {number} Integer, 0 to MAX_DP inclusive.
- *
- * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.
- * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.
- */
- P.toFixed = function (dp) {
- return stringify(this, 2, dp, this.e + dp);
- };
-
- /*
- * Return a string representing the value of this Big rounded to sd significant digits using
- * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent
- * the integer part of the value in normal notation.
- *
- * sd {number} Integer, 1 to MAX_DP inclusive.
- */
- P.toPrecision = function (sd) {
- return stringify(this, 3, sd, sd - 1);
- };
-
- /*
- * Return a string representing the value of this Big.
- * Return exponential notation if this Big has a positive exponent equal to or greater than
- * Big.PE, or a negative exponent equal to or less than Big.NE.
- * Omit the sign for negative zero.
- */
- P.toString = function () {
- return stringify(this);
- };
-
- /*
- * Return a string representing the value of this Big.
- * Return exponential notation if this Big has a positive exponent equal to or greater than
- * Big.PE, or a negative exponent equal to or less than Big.NE.
- * Include the sign for negative zero.
- */
- P.valueOf = P.toJSON = function () {
- return stringify(this, 4);
- };
-
- // Export
-
- Big = _Big_();
-
- Big["default"] = Big.Big = Big;
-
- //AMD.
- if (typeof define === "function" && define.amd) {
- define(function () {
- return Big;
- });
-
- // Node and other CommonJS-like environments that support module.exports.
- } else if (typeof module !== "undefined" && module.exports) {
- module.exports = Big;
-
- //Browser.
- } else {
- GLOBAL.Big = Big;
- }
-})(this);
diff --git a/vue.config.js b/vue.config.js
index 172f3c9..26e5a99 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -66,6 +66,7 @@
use: {
loader: "worker-loader",
options: {
+ filename: "[name].[contenthash].worker.js", // 娣诲姞鍐呭鍝堝笇鍒版枃浠跺悕
inline: "fallback",
},
},
--
Gitblit v1.9.3