From 60322c503d201e4d1000e62d8ecf17db4f628e4c Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 12 三月 2025 15:49:23 +0800
Subject: [PATCH] 合并冲突
---
src/api/business/reportPreparation.js | 156 ++
src/components/Table/lims-table.vue | 69
src/api/cnas/resourceDemand/device.js | 611 -------
src/views/CNAS/resourceDemand/device/component/check-and-accept.vue | 35
src/main.js | 2
src/views/CNAS/resourceDemand/device/component/check.vue | 61
src/views/business/reportPreparation/index.vue | 1919 +++++++++++++++++++++++++++
src/views/business/inspectionOrder/index.vue | 1029 +++++---------
src/views/CNAS/resourceDemand/device/component/calibration.vue | 66
src/views/business/reportPreparation/onlyoffice.vue | 207 ++
10 files changed, 2,868 insertions(+), 1,287 deletions(-)
diff --git a/src/api/business/reportPreparation.js b/src/api/business/reportPreparation.js
new file mode 100644
index 0000000..4bef502
--- /dev/null
+++ b/src/api/business/reportPreparation.js
@@ -0,0 +1,156 @@
+import resquest from '@/utils/request'
+
+
+export function pageInsReport(params) {
+ return resquest({
+ url: '/insReport/pageInsReport',
+ method: 'get',
+ params: params
+ })
+}
+
+export function inReport(data) {
+ return resquest({
+ url: '/insReport/inReport',
+ method: 'post',
+ data: data
+ })
+}
+
+export function upAll(data) {
+ return resquest({
+ url: '/insReport/upAll',
+ method: 'post',
+ data: data
+ })
+}
+
+export function getLaboratoryByReportId(params) {
+ return resquest({
+ url: '/insReport/getLaboratoryByReportId',
+ method: 'get',
+ params: params
+ })
+}
+
+export function withdraw(data) {
+ return resquest({
+ url: '/insReport/withdraw',
+ method: 'post',
+ data: data
+ })
+}
+
+export function updateApproveConfig(data) {
+ return resquest({
+ url: '/approveConfig/updateApproveConfig',
+ method: 'post',
+ data: data
+ })
+}
+
+export function getUserList(params) {
+ return resquest({
+ url: '/approveConfig/getUserList',
+ method: 'get',
+ params: params
+ })
+}
+
+export function getApproveConfigList(params) {
+ return resquest({
+ url: '/approveConfig/getApproveConfigList',
+ method: 'get',
+ params: params
+ })
+}
+
+export function batchApprovalReport(data) {
+ return resquest({
+ url: '/insReport/batchApprovalReport',
+ method: 'post',
+ data: data
+ })
+}
+
+export function downAll(params) {
+ return resquest({
+ url: '/insReport/downAll',
+ method: 'get',
+ params: params
+ })
+}
+
+export function getBatchApprovalProgress(params) {
+ return resquest({
+ url: '/insReport/getBatchApprovalProgress',
+ method: 'get',
+ params: params
+ })
+}
+
+export function getReportCountInfo(params) {
+ return resquest({
+ url: '/insReport/getReportCountInfo',
+ method: 'get',
+ params: params
+ })
+}
+
+export function downReport(params) {
+ return resquest({
+ url: '/insReport/downReport',
+ method: 'get',
+ params: params
+ })
+}
+
+export function upReportUrl(data) {
+ return resquest({
+ url: '/insReport/upReportUrl',
+ method: 'post',
+ params: data
+ })
+}
+
+export function examineReport(data) {
+ return resquest({
+ url: '/insReport/examineReport',
+ method: 'post',
+ data: data
+ })
+}
+
+export function ratifyReport(data) {
+ return resquest({
+ url: '/insReport/ratifyReport',
+ method: 'post',
+ data: data
+ })
+}
+
+export function writeReport(data) {
+ return resquest({
+ url: '/insReport/writeReport',
+ method: 'post',
+ params: data
+ })
+}
+
+
+export function downLoad(params) {
+ return resquest({
+ url: '/file/attachmentType/downLoad',
+ method: 'get',
+ params: params,
+ responseType: 'blob'
+ })
+}
+
+export function getReportInfo(params) {
+ return resquest({
+ url: '/file/attachmentType/getMIME',
+ method: 'get',
+ params: params
+ })
+}
\ No newline at end of file
diff --git a/src/api/cnas/resourceDemand/device.js b/src/api/cnas/resourceDemand/device.js
index 08b9d6d..b82cf37 100644
--- a/src/api/cnas/resourceDemand/device.js
+++ b/src/api/cnas/resourceDemand/device.js
@@ -119,499 +119,6 @@
});
}
-//璁惧鏍″噯璁″垝鍒楄〃鏌ヨ
-export function pageDeviceCalibrationPlan(query) {
- return request({
- url: "/deviceCalibrationPlan/pageDeviceCalibrationPlan",
- method: "get",
- params: query,
- });
-}
-
-// 鎻愪氦鎵瑰噯閫氱煡
-export function submiatRatifyDeviceCalibrationPlan(data) {
- return request({
- url: "/deviceCalibrationPlan/submiatRatifyDeviceCalibrationPlan",
- method: "post",
- data: data,
- });
-}
-
-//璁惧鏍″噯璁″垝瀵煎嚭
-export function exportDeviceCalibrationPlanDetail(query) {
- return request({
- url: "/deviceCalibrationPlan/exportDeviceCalibrationPlanDetail",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-// 璁惧鏍″噯 鏂板 鏇存柊
-export function addOrUpdateDeviceMetricRecord(data) {
- return request({
- url: "/deviceMetricRecord/addOrUpdateDeviceMetricRecord",
- method: "post",
- data: data,
- });
-}
-
-//璁惧鏍″噯璁″垝鍒犻櫎
-export function delDeviceCalibrationPlan(query) {
- return request({
- url: "/deviceCalibrationPlan/delDeviceCalibrationPlan",
- method: "delete",
- params: query,
- });
-}
-
-//璁惧鏍″噯璁″垝璇︽儏鍒犻櫎
-export function delDeviceCalibrationPlanDetail(query) {
- return request({
- url: "/deviceCalibrationPlan/delDeviceCalibrationPlanDetail",
- method: "delete",
- params: query,
- });
-}
-
-//璁惧鏍″噯璁″垝璇︽儏鍒楄〃
-export function pageDeviceCalibrationPlanDetail(query) {
- return request({
- url: "/deviceCalibrationPlan/pageDeviceCalibrationPlanDetail",
- method: "get",
- params: query,
- });
-}
-
-// 鏂板璁惧鏍″噯璁″垝璇︽儏
-export function addDeviceCalibrationPlanDetail(data) {
- return request({
- url: "/deviceCalibrationPlan/addDeviceCalibrationPlanDetail",
- method: "post",
- data: data,
- });
-}
-
-// 淇敼璁惧鏍″噯璁″垝璇︽儏
-export function updateDeviceCalibrationPlanDetail(data) {
- return request({
- url: "/deviceCalibrationPlan/updateDeviceCalibrationPlanDetail",
- method: "post",
- data: data,
- });
-}
-
-// 璁惧鏍″噯璁″垝鎵瑰噯
-export function ratifyDeviceCalibrationPlan(data) {
- return request({
- url: "/deviceCalibrationPlan/ratifyDeviceCalibrationPlan",
- method: "post",
- data: data,
- });
-}
-
-//鏌ヨ璁惧鏍″噯璁″垝璇︽儏
-export function getDeviceCalibrationPlan(query) {
- return request({
- url: "/deviceCalibrationPlan/getDeviceCalibrationPlan",
- method: "get",
- params: query,
- });
-}
-
-// 鏂板璁惧鏍″噯璁″垝
-export function addDeviceCalibrationPlan(data) {
- return request({
- url: "/deviceCalibrationPlan/addDeviceCalibrationPlan",
- method: "post",
- data: data,
- });
-}
-
-// 淇敼璁惧鏍″噯璁″垝
-export function updateDeviceCalibrationPlan(data) {
- return request({
- url: "/deviceCalibrationPlan/updateDeviceCalibrationPlan",
- method: "post",
- data: data,
- });
-}
-
-//閫氳繃璁惧鍒嗙被鑾峰彇璁惧鍒楄〃
-export function deviceScopeSearch(query) {
- return request({
- url: "/deviceScope/search",
- method: "get",
- params: query,
- });
-}
-
-//鏌ヨ璁惧鏍告煡璁″垝璇︽儏
-export function getDeviceExaminePlan(query) {
- return request({
- url: "/deviceExaminePlan/getDeviceExaminePlan",
- method: "get",
- params: query,
- });
-}
-
-// 娣诲姞璁惧鏍告煡璁″垝
-export function addDeviceExaminePlan(data) {
- return request({
- url: "/deviceExaminePlan/addDeviceExaminePlan",
- method: "post",
- data: data,
- });
-}
-
-// 璁惧鏍告煡璁″垝鎵归噺缂栬緫
-export function updateDeviceExaminePlan(data) {
- return request({
- url: "/deviceExaminePlan/updateDeviceExaminePlan",
- method: "post",
- data: data,
- });
-}
-
-//璁惧鏍告煡璁″垝鍒犻櫎
-export function delDeviceExaminePlan(query) {
- return request({
- url: "/deviceExaminePlan/delDeviceExaminePlan",
- method: "delete",
- params: query,
- });
-}
-
-//璁惧鏍告煡璁″垝鍒楄〃
-export function pageDeviceExaminePlan(query) {
- return request({
- url: "/deviceExaminePlan/pageDeviceExaminePlan",
- method: "get",
- params: query,
- });
-}
-
-// 璁惧鏍告煡璁″垝鎻愪氦鎵瑰噯閫氱煡
-export function submitRatifyDeviceExaminePlan(data) {
- return request({
- url: "/deviceExaminePlan/submitRatifyDeviceExaminePlan",
- method: "post",
- data: data,
- });
-}
-
-//瀵煎嚭璁惧鏍告煡璁″垝
-export function exportDeviceExaminePlanDetail(query) {
- return request({
- url: "/deviceExaminePlan/exportDeviceExaminePlanDetail",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-//鍒犻櫎璁惧鏍告煡璁″垝璇︽儏
-export function delDeviceExaminePlanDetail(query) {
- return request({
- url: "/deviceExaminePlan/delDeviceExaminePlanDetail",
- method: "delete",
- params: query,
- });
-}
-
-//璁惧鏍告煡璁″垝璇︽儏鍒楄〃
-export function pageDeviceExaminePlanDetail(query) {
- return request({
- url: "/deviceExaminePlan/pageDeviceExaminePlanDetail",
- method: "get",
- params: query,
- });
-}
-
-// 鏂板璁惧鏍告煡璁″垝璇︽儏
-export function addDeviceExaminePlanDetail(data) {
- return request({
- url: "/deviceExaminePlan/addDeviceExaminePlanDetail",
- method: "post",
- data: data,
- });
-}
-
-// 淇敼璁惧鏍告煡璁″垝璇︽儏
-export function updateDeviceExaminePlanDetail(data) {
- return request({
- url: "/deviceExaminePlan/updateDeviceExaminePlanDetail",
- method: "post",
- data: data,
- });
-}
-
-// 璁惧鏍告煡璁″垝鎵瑰噯
-export function ratifyDeviceExaminePlan(data) {
- return request({
- url: "/deviceExaminePlan/ratifyDeviceExaminePlan",
- method: "post",
- data: data,
- });
-}
-
-//鏍告煡璁板綍瀵煎嚭
-export function exportReviewExamineRecordDetail(query) {
- return request({
- url: "/deviceExaminePlan/exportReviewExamineRecordDetail",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-//鏍告煡瀵规瘮瀵煎嚭
-export function exportReviewExamineRecordContrast(query) {
- return request({
- url: "/deviceExaminePlan/exportReviewExamineRecordContrast",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-//鏌ヨ鏍告煡瀵规瘮璁板綍
-export function getExamineRecordContrast(query) {
- return request({
- url: "/deviceExaminePlan/getExamineRecordContrast",
- method: "get",
- params: query,
- });
-}
-
-// 瀹℃牳鏍告煡瀵规瘮璁板綍
-export function reviewExamineRecordContrast(data) {
- return request({
- url: "/deviceExaminePlan/reviewExamineRecordContrast",
- method: "post",
- data: data,
- });
-}
-
-// 鏂板鏍告煡瀵规瘮璁板綍
-export function addExamineRecordContrast(data) {
- return request({
- url: "/deviceExaminePlan/addExamineRecordContrast",
- method: "post",
- data: data,
- });
-}
-
-//鏌ヨ鏍告煡璁板綍
-export function getExamineRecord(query) {
- return request({
- url: "/deviceExaminePlan/getExamineRecord",
- method: "get",
- params: query,
- });
-}
-
-// 鏂板鏍告煡璁板綍
-export function addExamineRecord(data) {
- return request({
- url: "/deviceExaminePlan/addExamineRecord",
- method: "post",
- data: data,
- });
-}
-
-// 澶嶆牳鏍告煡璁板綍
-export function reviewExamineRecord(data) {
- return request({
- url: "/deviceExaminePlan/reviewExamineRecord",
- method: "post",
- data: data,
- });
-}
-
-//鍒嗛〉鏌ヨ璁惧淇濆吇璁″垝
-export function selectDeviceMaintenancePlanByPage(query) {
- return request({
- url: "/deviceMaintenancePlan/selectDeviceMaintenancePlanByPage",
- method: "get",
- params: query,
- });
-}
-
-// 璁惧淇濆吇璁″垝鎻愪氦瀹℃牳
-export function submitReviewMaintenancePlanStatus(data) {
- return request({
- url: "/deviceMaintenancePlan/submitReviewMaintenancePlanStatus",
- method: "post",
- data: data,
- });
-}
-
-//鏌ヨ璁惧淇濆吇璁″垝璇︽儏
-export function getMaintenancePlanDetail(query) {
- return request({
- url: "/deviceMaintenancePlan/getMaintenancePlanDetail",
- method: "get",
- params: query,
- });
-}
-
-// 鏂板璁惧淇濆吇璁″垝
-export function addMaintenancePlan(data) {
- return request({
- url: "/deviceMaintenancePlan/addMaintenancePlan",
- method: "post",
- data: data,
- });
-}
-
-// 淇敼璁惧淇濆吇璁″垝
-export function updateMaintenancePlan(data) {
- return request({
- url: "/deviceMaintenancePlan/updateMaintenancePlan",
- method: "post",
- data: data,
- });
-}
-
-//瀵煎嚭璁惧淇濆吇璁″垝
-export function exportDeviceMaintenancePlan(query) {
- return request({
- url: "/deviceMaintenancePlan/exportDeviceMaintenancePlan",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-//鍒犻櫎璁惧淇濆吇璁″垝
-export function deleteMaintenancePlan(query) {
- return request({
- url: "/deviceMaintenancePlan/deleteMaintenancePlan",
- method: "delete",
- params: query,
- });
-}
-
-//鍒嗛〉鏌ヨ閲忓�兼函婧愯鍒�
-export function selectDeviceTraceabilityManagementByPage(query) {
- return request({
- url: "/deviceTraceabilityManagement/selectDeviceTraceabilityManagementByPage",
- method: "get",
- params: query,
- });
-}
-
-// 閲忓�兼函婧愯鍒掓彁浜ゆ壒鍑�
-export function submitReviewTraceabilityManagementStatus(data) {
- return request({
- url: "/deviceTraceabilityManagement/submitReviewTraceabilityManagementStatus",
- method: "post",
- data: data,
- });
-}
-
-//鏌ヨ閲忓�兼函婧愯鍒掕鎯�
-export function getTraceabilityManagementDetail(query) {
- return request({
- url: "/deviceTraceabilityManagement/getTraceabilityManagementDetail",
- method: "get",
- params: query,
- });
-}
-
-// 鏂板閲忓�兼函婧愯鍒�
-export function addTraceabilityManagement(data) {
- return request({
- url: "/deviceTraceabilityManagement/addTraceabilityManagement",
- method: "post",
- data: data,
- });
-}
-
-// 淇敼閲忓�兼函婧愯鍒�
-export function updateTraceabilityManagement(data) {
- return request({
- url: "/deviceTraceabilityManagement/updateTraceabilityManagement",
- method: "post",
- data: data,
- });
-}
-
-// 閲忓�兼函婧愯鍒掑鏍哥姸鎬佷慨鏀�
-export function reviewTraceabilityManagementStatus(data) {
- return request({
- url: "/deviceTraceabilityManagement/reviewTraceabilityManagementStatus",
- method: "post",
- data: data,
- });
-}
-
-//瀵煎嚭閲忓�兼函婧愯鍒�
-export function exportDeviceTraceabilityManagement(query) {
- return request({
- url: "/deviceTraceabilityManagement/exportDeviceTraceabilityManagement",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-//鍒犻櫎閲忓�兼函婧愯鍒�
-export function deleteTraceabilityManagement(query) {
- return request({
- url: "/deviceTraceabilityManagement/deleteTraceabilityManagement",
- method: "delete",
- params: query,
- });
-}
-
-//鍒╃敤澶栭儴璁惧鐢宠鍒楄〃
-export function pageDeviceExternalApply(query) {
- return request({
- url: "/deviceExternalApply/pageDeviceExternalApply",
- method: "get",
- params: query,
- });
-}
-
-//鍊熺敤澶栭儴浠櫒-瀵煎嚭
-export function exportDeviceExternalApply(query) {
- return request({
- url: "/deviceExternalApply/exportDeviceExternalApply",
- method: "get",
- responseType: "blob",
- params: query,
- });
-}
-
-//鍒犻櫎鍒╃敤澶栭儴璁惧鐢宠
-export function delDeviceExternalApply(query) {
- return request({
- url: "/deviceExternalApply/delDeviceExternalApply",
- method: "delete",
- params: query,
- });
-}
-
-//鏌ヨ鍒╃敤澶栭儴璁惧鐢宠
-export function getDeviceExternalApply(query) {
- return request({
- url: "/deviceExternalApply/getDeviceExternalApply",
- method: "get",
- params: query,
- });
-}
-
-// 鏂板鍒╃敤澶栭儴璁惧鐢宠
-export function addDeviceExternalApply(data) {
- return request({
- url: "/deviceExternalApply/addDeviceExternalApply",
- method: "post",
- data: data,
- });
-}
-
//cnas璁惧浣跨敤璁板綍鍒嗛〉鏌ヨ
export function deviceRecordPage(query) {
return request({
@@ -766,8 +273,15 @@
params: query,
});
}
-
-//璁惧鏍″噯 鏂板 鏇存柊
+// 璁惧鏍″噯 鏂板 鏇存柊-鏍″噯璁板綍
+export function addOrUpdateDeviceMetricRecord(data) {
+ return request({
+ url: "/deviceMetricRecord/addOrUpdateDeviceMetricRecord",
+ method: "post",
+ data: data,
+ });
+}
+//璁惧鏍″噯 鏂板 鏇存柊-鎻愪氦椤圭洰鏍″噯缁存姢
export function saveOrUpdateDeviceMetric(data) {
return request({
url: "/deviceMetrics/saveOrUpdateDeviceMetric",
@@ -793,7 +307,6 @@
params: query,
});
}
-
//璁惧鏍″噯 瀵煎嚭
export function deviceMetricRecordExport(query) {
return request({
@@ -801,6 +314,49 @@
method: "get",
responseType: "blob",
params: query,
+ });
+}
+
+//璁惧鏍″噯 璁惧缁存姢琛� 鏌ヨ
+export function selectDeviceMetric(query) {
+ return request({
+ url: "/deviceMetrics/selectDeviceMetric",
+ method: "get",
+ params: query,
+ });
+}
+
+//璁惧鏍″噯 鍒犻櫎
+export function deleteDeviceMetrics(query) {
+ return request({
+ url: "/deviceMetrics/deleteDeviceMetrics",
+ method: "delete",
+ params: query,
+ });
+}
+//鍒犻櫎 璁惧鏍″噯-闄勪欢
+export function delDeviceCalibrationFile(query) {
+ return request({
+ url: "/personBasicInfo/delDeviceCalibrationFile",
+ method: "delete",
+ params: query,
+ });
+}
+//璁惧鏍″噯鏌ヨ-闄勪欢
+export function getDeviceCalibrationFile(query) {
+ return request({
+ url: "/personBasicInfo/getDeviceCalibrationFile",
+ method: "get",
+ params: query,
+ });
+}
+//璁惧鏍″噯瀵煎嚭-闄勪欢
+export function downLoadDeviceCalibrationFile(query) {
+ return request({
+ url: "/personBasicInfo/downLoadDeviceCalibrationFile",
+ method: "get",
+ params: query,
+ responseType: "blob"
});
}
@@ -828,24 +384,6 @@
url: "/deviceScope/exportDeviceFile",
method: "get",
responseType: "blob",
- params: query,
- });
-}
-
-//璁惧鏍″噯 璁惧缁存姢琛� 鏌ヨ
-export function selectDeviceMetric(query) {
- return request({
- url: "/deviceMetrics/selectDeviceMetric",
- method: "get",
- params: query,
- });
-}
-
-//璁惧鏍″噯 鍒犻櫎
-export function deleteDeviceMetrics(query) {
- return request({
- url: "/deviceMetrics/deleteDeviceMetrics",
- method: "delete",
params: query,
});
}
@@ -1294,7 +832,15 @@
//璁惧楠屾敹涓洓涓猼able琛ㄦ牸鐨勫垹闄ゅ姛鑳�
export function deleteIncidentReportAll(query) {
return request({
- url: "/incident-report/deleteIncidentReportAll",
+ url: "/incidentReport/deleteIncidentReportAll",
+ method: "delete",
+ params: query,
+ });
+}
+//璁惧楠屾敹涓洓涓猼able琛ㄦ牸鐨勫垹闄ゅ姛鑳�
+export function deleteIncidentReport(query) {
+ return request({
+ url: "/incidentReport/deleteIncidentReport",
method: "delete",
params: query,
});
@@ -1303,7 +849,7 @@
//璁惧楠屾敹 淇濆瓨锛屾彁浜わ紝椹冲洖锛岄�氳繃鎺ュ彛
export function saveIncidentReportData(query) {
return request({
- url: "/incident-report/saveIncidentReportData",
+ url: "/incidentReport/saveIncidentReportData",
method: "post",
data: query,
});
@@ -1311,7 +857,7 @@
//璁惧楠屾敹 淇濆瓨锛屾彁浜わ紝椹冲洖锛岄�氳繃鎺ュ彛
export function incidentReportPage(query) {
return request({
- url: "/incident-report/incidentReportPage",
+ url: "/incidentReport/incidentReportPage",
method: "get",
params: query,
});
@@ -1319,7 +865,7 @@
//璁惧楠屾敹 淇濆瓨锛屾彁浜わ紝椹冲洖锛岄�氳繃鎺ュ彛
export function getShowIncidentReport(query) {
return request({
- url: "/incident-report/getShowIncidentReport",
+ url: "/incidentReport/getShowIncidentReport",
method: "get",
params: query,
});
@@ -1327,7 +873,7 @@
//璁惧楠屾敹瀵煎嚭
export function incidentReportExport(query) {
return request({
- url: "/incident-report/incidentReportExport",
+ url: "/incidentReport/incidentReportExport",
method: "get",
params: query,
responseType: "blob"
@@ -1358,15 +904,7 @@
responseType: "blob"
});
}
-//璁惧鏍″噯瀵煎嚭
-export function downLoadDeviceCalibrationFile(query) {
- return request({
- url: "/personBasicInfo/downLoadDeviceCalibrationFile",
- method: "get",
- params: query,
- responseType: "blob"
- });
-}
+
//鍒犻櫎 璁惧鏁呴殰
export function deleteDeviceFaultOne(query) {
return request({
@@ -1375,19 +913,4 @@
params: query,
});
}
-//鍒犻櫎 璁惧鏍″噯
-export function delDeviceCalibrationFile(query) {
- return request({
- url: "/personBasicInfo/delDeviceCalibrationFile",
- method: "delete",
- params: query,
- });
-}
-//璁惧鏍″噯鏌ヨ
-export function getDeviceCalibrationFile(query) {
- return request({
- url: "/personBasicInfo/getDeviceCalibrationFile",
- method: "get",
- params: query,
- });
-}
+
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 3f88767..07953d4 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -115,6 +115,54 @@
</div>
</template>
</el-table-column>
+ <!-- 鎿嶄綔鍒� -->
+ <el-table-column v-if="table.operator" :label="(table.operatorConfig && table.operatorConfig.label) || '鎿嶄綔'"
+ :width="table.operatorConfig &&
+ (table.operatorConfig.width
+ ? table.operatorConfig.width
+ : calcOperationWidth())
+ " :min-width="(table.operatorConfig && table.operatorConfig.width) ||
+ table.operatorConfig.minWidth ||
+ 100
+ " align="center" :fixed="table.operatorConfig ? table.operatorConfig.fixed : 'right'"
+ :show-overflow-tooltip="true">
+ <template slot-scope="scope">
+ <template v-for="(o, index) in table.operator">
+ <el-button :key="index" v-if="o.type != 'upload'" @click.stop="o.clickFun(scope.row)"
+ :type="o.type || 'text'" :icon="o.icon" :size="o.size || 'small'"
+ :disabled="o.disabled ? o.disabled(scope.row) : false" v-show="o.showFun ? o.showFun(scope.row) : true"
+ :class="[
+ 'commonButton',
+ {
+ del: o.name === '鍒犻櫎' || o.name === '浣滃簾',
+ },
+ ]">{{ o.name }}
+ </el-button>
+ <el-upload :action="javaApi + o.url" size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false"
+ :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept
+ ? o.accept
+ : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+ " v-if="o.type == 'upload' && o.url" style="display: inline-block; width: 50px"
+ v-show="o.showHide ? o.showHide(scope.row) : true" :data="o.data ? o.data(scope.row) : {}" :before-upload="o.beforeUpload ? o.beforeUpload(scope.row) : () => true
+ " :headers="uploadHeader" :on-error="onError" :on-exceed="onExceed" :on-success="handleSuccessUp"
+ :show-file-list="false" :key="index">
+ <el-button :size="o.size ? o.size : 'small'" type="text"
+ :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
+ </el-upload>
+ <el-upload action="#" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList)
+ " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1"
+ :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept
+ ? o.accept
+ : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+ " v-if="o.type == 'upload' && !o.url" style="display: inline-block; width: 50px"
+ v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed"
+ :show-file-list="false" :key="index">
+ <el-button :size="o.size ? o.size : 'small'" type="text"
+ :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
+ </el-upload>
+ </template>
+ </template>
+ </el-table-column>
</el-table>
<pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current"
:limit.sync="page.size" @pagination="pagination" style="background-color: #fff" />
@@ -239,11 +287,18 @@
return {};
},
},
- column: {
- type: Array,
+ // column: {
+ // type: Array,
+ // default() {
+ // return [];
+ // },
+ // },
+ table: {
+ type: Object,
default() {
- return [];
+ return {};
},
+ required: true,
},
rowClassName: {
type: Function,
@@ -281,13 +336,18 @@
btnWidth: '120px'
};
},
+ watch: {
+ table(val) {
+ this.doLayout();
+ },
+ },
mounted() {
this.calculateSpanInfo();
+ this.column = this.table.column;
},
methods: {
getWidth(row, row0) {
let count = 0;
- console.log(2222, row)
row.forEach((a) => {
if (a.showHide !== undefined && a.showHide(row0)) {
count += a.name.length;
@@ -335,6 +395,7 @@
this.$message.success("涓婁紶鎴愬姛");
}
}
+ this.$refs.upload.clearFiles();
},
onError(err, file, fileList) {
this.$message.error("涓婁紶澶辫触");
diff --git a/src/main.js b/src/main.js
index f6ae7f3..59caa2b 100644
--- a/src/main.js
+++ b/src/main.js
@@ -67,7 +67,7 @@
};
Vue.prototype.javaApi = process.env.VUE_APP_BASE_API
? process.env.VUE_APP_BASE_API
- : "http://192.168.0.104:8002";
+ : "http://127.0.0.1:8002";
Vue.prototype.checkPermi = checkPermi;
Vue.prototype.uploadHeader = {
Authorization: "Bearer " + getToken(),
diff --git a/src/views/CNAS/resourceDemand/device/component/calibration.vue b/src/views/CNAS/resourceDemand/device/component/calibration.vue
index c522343..5f4fd0e 100644
--- a/src/views/CNAS/resourceDemand/device/component/calibration.vue
+++ b/src/views/CNAS/resourceDemand/device/component/calibration.vue
@@ -233,23 +233,6 @@
</el-date-picker>
</el-form-item>
</el-col>
- <!-- <el-col :span="17">
- <el-form-item label="闄勪欢锛�" prop="fileName">
- <el-input v-model="calibrationRecord.fileName" :style="`width: ${operationType === 'add' ? '85%' : '100%'};}`" disabled
- size="small">
- <el-button v-if="operationType === 'add'" slot="append" icon="el-icon-delete-solid"
- @click="deleteFile"></el-button>
- </el-input>
- <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" :headers="headers"
- :limit="1" :on-error="onError" :on-success="handleSuccessUp"
- :show-file-list="false"
- style="float: right;">
- <el-button :loading="upLoading" size="small" style="position: relative; top: -4px;"
- type="primary">闄勪欢涓婁紶
- </el-button>
- </el-upload>
- </el-form-item>
- </el-col> -->
<el-col :span="24">
<el-form-item label="澶囨敞:">
<el-input v-model="calibrationRecord.remark" :disabled="operationType === 'view'" :rows="3" size="small" style="width: 96%"
@@ -299,20 +282,6 @@
</template>
</el-table-column>
</el-table>
- <!-- 鎿嶄綔鏃ュ織 -->
- <!-- <h4>-->
- <!-- <div style="display: flex;-->
- <!-- align-items: center;">-->
- <!-- <span class="line"></span><span>鏈褰曠姸鎬佸拰鎿嶄綔鏃ュ織</span>-->
- <!-- </div>-->
- <!-- </h4>-->
- <!-- <el-table :data="tableDataOperate" style="width: 100%">-->
- <!-- <el-table-column type="index" label="搴忓彿" width="100"></el-table-column>-->
- <!-- <el-table-column prop="operator" label="鎿嶄綔浜�" width="120"></el-table-column>-->
- <!-- <el-table-column prop="operationTime" label="鎿嶄綔鏃堕棿" width="180"></el-table-column>-->
- <!-- <el-table-column prop="operationType" label="鎿嶄綔绫诲瀷" width="120"></el-table-column>-->
- <!-- <el-table-column prop="operationContent" label="鎿嶄綔鍐呭"></el-table-column>-->
- <!-- </el-table>-->
</div>
<span slot="footer" class="dialog-footer">
<el-button v-if="operationType === 'add'" @click="dialogVisible1 = false">鍙� 娑�</el-button>
@@ -423,7 +392,7 @@
computed: {
...mapGetters(["nickName"]),
action() {
- return this.javaApi + '/personBasicInfo/saveCNASFile'
+ return this.javaApi + '/personBasicInfo/saveDeviceCalibrationFile'
}
},
mounted() {
@@ -530,7 +499,7 @@
this.dialogVisible1 = true
this.getXmsg()
},
- // 鏌ョ湅璇︽儏
+ // 鏌ョ湅缂栬緫璇︽儏
handleViewClick(type, row) {
showDeviceMetricsCopy({ id: row.id, type: 'calibrate' }).then(res => {
this.calibrateParams = res.data
@@ -569,27 +538,6 @@
this.$download.saveAs(blob, '璁惧鏍″噯.xlsx')
})
},
- deleteFile() {
- this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎鏂囦欢, 鏄惁缁х画?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- deleteCNASFile({ fileName: this.calibrationRecord.systemFileName }).then(res => {
- this.calibrationRecord.fileName = ''
- this.$refs.upload.clearFiles()
- if (res.code == 200) {
- this.$message.success('鍒犻櫎鎴愬姛锛�')
- }
- })
- }).catch((err) => {
- console.log('err----', err)
- this.$message({
- type: 'info',
- message: '宸插彇娑堝垹闄�'
- });
- });
- },
// 鏍″噯椤圭洰缁存姢
calibrationMaintenance() {
this.dialogVisible0 = true
@@ -627,6 +575,7 @@
this.$message.info('宸插彇娑堝垹闄�');
})
},
+ // 鎻愪氦椤圭洰鏍″噯缁存姢
addCalibrate() {
this.$refs['form0'].validate((valid) => {
if (valid) {
@@ -644,6 +593,8 @@
}
this.calibrateParamsLoading = false
this.addCalibrateLoading = false
+ }).catch(() => {
+ this.addCalibrateLoading = false
})
} else {
this.addCalibrateLoading = false
@@ -651,6 +602,7 @@
}
})
},
+ // 鎻愪氦鏍″噯璁板綍
addRecord() {
this.$refs['calibrationRecord'].validate((valid) => {
if (valid) {
@@ -668,6 +620,10 @@
this.calibrationRecord.createUser = this.nickName
this.calibrationRecord.type = 'calibrate'
this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams
+ this.calibrationRecord.deviceMetricsCopyList.forEach(m => {
+ delete m.creationTime
+ })
+ delete this.calibrationRecord.createTime
addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => {
if (res.code == 200) {
this.$message.success('娣诲姞鎴愬姛')
@@ -675,6 +631,8 @@
this.getTableList(this.clickNodeVal.value)
}
this.addRecordLoading = false
+ }).catch((err) => {
+ this.addRecordLoading = false
})
} catch (e) {
console.log('addRecord---', e)
diff --git a/src/views/CNAS/resourceDemand/device/component/check-and-accept.vue b/src/views/CNAS/resourceDemand/device/component/check-and-accept.vue
index e940152..26680b7 100644
--- a/src/views/CNAS/resourceDemand/device/component/check-and-accept.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check-and-accept.vue
@@ -17,7 +17,7 @@
</div>
</div>
<div class="tables" style="margin-top: 10px;">
- <el-table ref="table" :data="tableDataAlist" height="100%">
+ <el-table ref="table" :data="tableDataAlist" height="100%" v-loading="tableLoading">
<el-table-column label="搴忓彿" type="index" width="60">
<template v-slot="scope">
<span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
@@ -468,12 +468,13 @@
import { dateFormat } from '@/utils/date'
import file from "@/utils/file";
import {
- deleteCNASFile,
+ deleteCNASFile, deleteIncidentReport,
deleteIncidentReportAll, getShowIncidentReport, incidentReportExport, incidentReportPage,
saveIncidentReportData,
selectDeviceByCode
} from "@/api/cnas/resourceDemand/device";
import {selectUserCondition} from "@/api/system/user";
+import {mapGetters} from "vuex";
export default {
props: {
@@ -488,6 +489,7 @@
return {
//浜嬫晠璁惧淇℃伅
tableDataAlist: [], // 鏇存敼鍙橀噺鍚嶇О
+ tableLoading: false,
dialogVisible: false,
rules: {
quantity: [{ required: true, message: '璇疯緭鍏ユ暟閲�', trigger: 'blur' }],
@@ -517,7 +519,8 @@
computed: {
action() {
return this.javaApi + '/personBasicInfo/saveCNASFile'
- }
+ },
+ ...mapGetters(["nickName"]),
},
mounted() {
// 鑾峰彇璁惧浜嬫晠淇℃伅
@@ -661,32 +664,31 @@
this.$refs.form.validate((valid) => {
if (valid === true || saveState !== '1submit') {
// 缁欏綋鍓嶇幆鑺傝缃垱寤轰汉涓庢椂闂�
- let user = JSON.parse(localStorage.getItem('user'))
const dateTime = dateFormat(new Date())
// 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡
switch (this.currentStep) {
case 0:
- this.form.submitOperatingPersonnel = user.name
+ this.form.submitOperatingPersonnel = this.nickName
this.form.submitDate = dateTime
break
case 1:
- this.form.unpackingOperatingPersonnel = user.name
+ this.form.unpackingOperatingPersonnel = this.nickName
this.form.unpackingDate = dateTime
break
case 2:
- this.form.installOperatingPersonnel = user.name
+ this.form.installOperatingPersonnel = this.nickName
this.form.installDate = dateTime
break
case 3:
- this.form.installationAcceptanceOperatingPersonnel = user.name
+ this.form.installationAcceptanceOperatingPersonnel = this.nickName
this.form.installationAcceptanceDate = dateTime
break
case 4:
- this.form.acceptanceCheckOperatingPersonnel = user.name
+ this.form.acceptanceCheckOperatingPersonnel = this.nickName
this.form.acceptanceCheckDate = dateTime
break
case 5:
- this.form.acceptanceAuditOperatingPersonnel = user.name
+ this.form.acceptanceAuditOperatingPersonnel = this.nickName
this.form.acceptanceAuditDate = dateTime
break
default:
@@ -765,19 +767,21 @@
},
// 鑾峰彇璁惧浜嬫晠淇℃伅(鏍规嵁浠巚uex涓幏鍙栧埌鐨勮澶囧悕绉癷d杩涜鏁版嵁鏌ヨ)
getDeviceAList(deviceId) {
+ this.tableLoading = true
incidentReportPage({deviceId: deviceId, size:this.search.size, current:this.search.current, processNumber: this.search.processNumber}).then(res => {
+ this.tableLoading = false
if (res.code == 200) {
this.tableDataAlist = res.data.records
this.search.total = res.data.total
}
+ }).catch(err => {
+ this.tableLoading = false
})
},
//table 浜嬩欢澶勭悊寮�濮嬪
+ // 涓嬭浇闄勪欢
handleAttachmentClick(row) {
- // 妯℃嫙涓嬭浇闄勪欢
- const imageUrl = this.javaApi+'/img/'+row.systemFileName; // 鍥剧墖 URL
- // downloadImage(imageUrl);
- file.downloadIamge(imageUrl,row.fileName)
+ this.$download.saveAs(row.systemFileName, row.fileName)
},
handleViewClick(row) {
getShowIncidentReport({id: row.id}).then(res => {
@@ -797,7 +801,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- deleteIncidentReportAll({id: row.id}).then(res => {
+ deleteIncidentReport({id: row.id}).then(res => {
if (res.code == 200) {
this.$message.success('鍒犻櫎鎴愬姛')
this.getDeviceAList(this.clickNodeVal.value);
@@ -870,6 +874,7 @@
}
.search {
+ margin-top: 10px;
background-color: #fff;
height: 40px;
display: flex;
diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue
index 40e0de3..2097352 100644
--- a/src/views/CNAS/resourceDemand/device/component/check.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check.vue
@@ -181,7 +181,7 @@
<el-button v-if="operationType === 'add'" slot="append" icon="el-icon-delete-solid"
@click="deleteFile"></el-button>
</el-input>
- <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" :headers="headers"
+ <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" :headers="uploadHeader"
:limit="1" :on-error="onError" :on-success="handleSuccessUp"
:show-file-list="false"
style="float: right;">
@@ -252,7 +252,13 @@
<script>
import file from '@/utils/file';
import { mapGetters } from "vuex";
-import {deviceMetricRecordExport} from "@/api/cnas/resourceDemand/device";
+import {
+ addOrUpdateDeviceMetricRecord, deleteCNASFile, deleteDeviceMetricRecord, deleteDeviceMetrics,
+ deviceMetricRecordExport,
+ deviceMetricRecordPage,
+ saveOrUpdateDeviceMetric,
+ selectDeviceMetric, showDeviceMetricsCopy
+} from "@/api/cnas/resourceDemand/device";
export default {
components: {},
props: {
@@ -336,7 +342,7 @@
computed: {
...mapGetters(["nickName"]),
action() {
- return this.javaApi + this.$api.personnel.saveCNASFile
+ return this.javaApi + '/personBasicInfo/saveCNASFile'
}
},
mounted() {
@@ -375,7 +381,7 @@
async getXmsg() {
this.calibrateParamsLoading = true
try {
- await this.$axios.get(this.$api.deviceCheck.selectDeviceMetric + "?deviceId=" + this.clickNodeVal.value + "&type=examine").then(res => {
+ await selectDeviceMetric({deviceId: this.clickNodeVal.value, type: 'examine'}).then(res => {
if (res.code == 200) {
this.calibrateParams = res.data
}
@@ -399,11 +405,7 @@
this.form0.deviceId = this.clickNodeVal.value;
this.form0.createdBy = this.nickName;
this.form0.type = 'examine'
- this.$axios.post(this.$api.deviceCheck.saveOrUpdateDeviceMetric, this.form0, {
- headers: {
- 'Content-Type': 'application/json'
- }
- }).then(res => {
+ saveOrUpdateDeviceMetric(this.form0).then(res => {
if (res.code == 200) {
this.$message.success('淇濆瓨鎴愬姛')
this.$refs['form0'].resetFields()
@@ -420,7 +422,7 @@
},
// 鏌ヨ璁惧鏍告煡鍒楄〃
getTableList(deviceId) {
- this.$axios.get(this.$api.deviceCheck.deviceMetricRecordPage + '?deviceId=' + deviceId + "&size=" + this.search.size + "¤t=" + this.search.current + "&type=examine").then(res => {
+ deviceMetricRecordPage({deviceId: deviceId, size: this.search.size, current: this.search.current, type: 'examine'}).then(res => {
this.tableData = res.data.records
this.search.total = res.data.total
})
@@ -442,12 +444,11 @@
this.calibrationRecord.deviceId = this.clickNodeVal.value;
this.calibrationRecord.createUser = this.nickName
this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams
+ this.calibrationRecord.deviceMetricsCopyList.forEach(ele => {
+ delete ele.creationTime
+ })
this.calibrationRecord.type = 'examine'
- this.$axios.post(this.$api.deviceCheck.addOrUpdateDeviceMetricRecord, this.calibrationRecord, {
- headers: {
- 'Content-Type': 'application/json'
- }
- }).then(res => {
+ addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => {
if (res.code == 200) {
this.$message.success('娣诲姞鎴愬姛')
this.dialogVisible1 = false
@@ -463,6 +464,22 @@
this.$message.warning('鏈夊繀濉」鏈~');
}
})
+ },
+ handleClose(done) {
+ this. calibrationRecord = {
+ unitOfMeasure: '', // 鏍告煡浜�
+ calibrationDate: '', // 鏍告煡鏃ユ湡
+ nextCalibrationDate: '', // 涓嬫鏍告煡鏃ユ湡
+ calculatingApparatus: '', // 鏍告煡鍣ㄥ叿
+ standardRange: '', // 鏍告煡鏍囧噯閲忕▼
+ calibrationStandardUncertainty: '', // 鏍告煡鏍囧噯涓嶇‘瀹氬害
+ byDocument: '', // 鏍告煡鎸囧涔�
+ certificateSerialNumber: '', // 妫�鏌ユ姤鍛婃寚瀵间功
+ fileName: '', // 闄勪欢
+ status: '', // 鏍告煡鎬荤粨璁�
+ remark: '', // 澶囨敞
+ }
+ this.dialogVisible1 = false
},
resetcalibrationRecord() {
this.$refs.calibrationRecord.resetFields()
@@ -498,7 +515,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + this.form.systemFileName).then(res => {
+ deleteCNASFile({fileName: this.form.systemFileName}).then(res => {
if (res.code == 200) {
this.$message.success('鍒犻櫎鎴愬姛锛�')
}
@@ -512,10 +529,7 @@
},
// end
handleAttachmentClick(row) {
- // 妯℃嫙涓嬭浇闄勪欢
- const imageUrl = this.javaApi + '/img/' + row.systemFileName; // 鍥剧墖 URL
- file.downloadIamge(imageUrl, row.fileName)
- // downloadImage(imageUrl, row.fileName);
+ this.$download.saveAs(row.systemFileName, row.fileName)
},
// 娣诲姞鏍告煡璁板綍
add(type) {
@@ -525,7 +539,7 @@
},
// 鏌ョ湅璇︽儏
handleViewClick(type, row) {
- this.$axios.get(this.$api.deviceCheck.showDeviceMetricsCopy + "?id=" + row.id + "&type=examine").then(res => {
+ showDeviceMetricsCopy({id: row.id, type: 'examine'}).then(res => {
this.calibrateParams = res.data
})
this.calibrationRecord = { ...row }
@@ -540,7 +554,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- this.$axios.delete(this.$api.deviceCheck.deleteDeviceMetricRecord + "?id=" + row.id).then(res => {
+ deleteDeviceMetricRecord({id: row.id}).then(res => {
this.getTableList(this.clickNodeVal.value) // 鑾峰彇璁惧鏍″噯鍒楄〃鏁版嵁
this.$message.success('鍒犻櫎鎴愬姛锛�')
})
@@ -557,7 +571,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- this.$axios.delete(this.$api.deviceCheck.deleteDeviceMetrics + "?id=" + row.id).then(res => {
+ deleteDeviceMetrics({id: row.id}).then(res => {
this.getXmsg();
this.$message.success('鍒犻櫎鎴愬姛锛�')
})
@@ -636,6 +650,7 @@
.btns {
text-align: right;
+ margin-top: 10px;
}
h4 {
diff --git a/src/views/business/inspectionOrder/index.vue b/src/views/business/inspectionOrder/index.vue
index 01efcc4..59d5def 100644
--- a/src/views/business/inspectionOrder/index.vue
+++ b/src/views/business/inspectionOrder/index.vue
@@ -183,7 +183,7 @@
:height="tableHeight + ''"
@pagination="pagination"
:handleSelectionChange="selectionChange"
- :column="column"
+ :table="table"
:page="page"
:tableLoading="tableLoading"
></lims-table>
@@ -376,9 +376,9 @@
>
<lims-table
highlightCurrentRow
- :heigt="'80vh'"
+ :height="'80vh'"
:tableData="dataLooktableData"
- :column="dataLookcolumn"
+ :table="dataLookTable"
:tableLoading="dataLookTableLoading"
></lims-table>
</el-dialog>
@@ -868,351 +868,407 @@
current: 1,
},
tableLoading: false,
- column: [
- {
- label: "濮旀墭缂栧彿",
- prop: "entrustCode",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "澶栭儴濮旀墭缂栧彿",
- prop: "outEntrustCode",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "濮旀墭鍗曚綅",
- prop: "company",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鍚嶇О",
- prop: "sampleName",
- minWidth: "160px",
- width: "160px",
- dataType: "link",
- linkEvent: {
- method: "showDetails",
- vueComponent: this,
+ table: {
+ // 鏍囬
+ column: [
+ {
+ label: "濮旀墭缂栧彿",
+ prop: "entrustCode",
+ minWidth: "160px",
+ width: "160px",
},
- },
- {
- label: "鏍峰搧缂栧彿",
- prop: "sampleCode",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鍨嬪彿",
- prop: "sampleModel",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鏁伴噺",
- prop: "sampleNum",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠岃繘搴�%",
- prop: "insProgress",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "绱ф�ョ▼搴�",
- prop: "type",
- minWidth: "100px",
- width: "100px",
- dataType: "tag",
- formatData: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].dictLabel;
- } else {
- return null;
- }
+ {
+ label: "澶栭儴濮旀墭缂栧彿",
+ prop: "outEntrustCode",
+ minWidth: "160px",
+ width: "160px",
},
- formatType: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].listClass;
- } else {
- return null;
- }
+ {
+ label: "濮旀墭鍗曚綅",
+ prop: "company",
+ minWidth: "160px",
+ width: "160px",
},
- },
- {
- label: "澶囨敞",
- prop: "remark",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "鍒跺崟浜�",
- prop: "custom",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "绾﹀畾鏃堕棿",
- prop: "appointed",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "涓嬪崟鏃堕棿",
- prop: "createTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "涓嬪彂鏃堕棿",
- prop: "sendTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "閫�鍥炵悊鐢�",
- prop: "tell",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "濮旀墭浜�",
- prop: "prepareUser",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "鎾ら攢鏃ユ湡",
- prop: "revocationTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- dataType: "action",
+ {
+ label: "鏍峰搧鍚嶇О",
+ prop: "sampleName",
+ minWidth: "160px",
+ width: "160px",
+ dataType: "link",
+ linkEvent: {
+ method: "showDetails",
+ vueComponent: this,
+ },
+ },
+ {
+ label: "鏍峰搧缂栧彿",
+ prop: "sampleCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鍨嬪彿",
+ prop: "sampleModel",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鏁伴噺",
+ prop: "sampleNum",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠岃繘搴�%",
+ prop: "insProgress",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "绱ф�ョ▼搴�",
+ prop: "type",
+ minWidth: "100px",
+ width: "100px",
+ dataType: "tag",
+ formatData: (params) => {
+ let index = this.urgencyDictList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.urgencyDictList[index].dictLabel;
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ let index = this.urgencyDictList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.urgencyDictList[index].listClass;
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "澶囨敞",
+ prop: "remark",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鍒跺崟浜�",
+ prop: "custom",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "绾﹀畾鏃堕棿",
+ prop: "appointed",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "涓嬪崟鏃堕棿",
+ prop: "createTime",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "涓嬪彂鏃堕棿",
+ prop: "sendTime",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "閫�鍥炵悊鐢�",
+ prop: "tell",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "濮旀墭浜�",
+ prop: "prepareUser",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鎾ら攢鏃ユ湡",
+ prop: "revocationTime",
+ minWidth: "120px",
+ width: "120px",
+ },
+ ],
+ operatorConfig: {
fixed: "right",
label: "鎿嶄綔",
- operation: [
- {
- name: "鏁版嵁鏌ョ湅",
- type: "text",
- clickFun: (row) => {},
- disabled: (row) => {
- return row.state != 1 && row.state != 4;
- },
- clickFun: (row) => {
- this.handleDataLook(row);
- },
- },
- {
- name: "鎶ュ憡涓嬭浇",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return row.state != 4 || row.isRatify != 1;
- },
- },
- {
- name: "瀹℃牳",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return row.state != 0;
- },
- },
- {
- name: "鎾ら攢",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return row.state != 1 && row.state != 0;
- },
- },
- {
- name: "鎾ら攢瀹℃牳",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return (
- (row.state != 1 && row.state != 0) ||
- this.tabIndex != 1 ||
- row.isRevocation != 1
- );
- },
- },
- {
- name: "鍒嗛厤",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return (
- row.state != 1 ||
- (row.entrustCode != null &&
- Number(row.assign) > 0 &&
- row.inspectId != null)
- );
- },
- },
- ],
+ minWidth: 100,
},
- ],
+ operator: [
+ {
+ name: "鏁版嵁鏌ョ湅",
+ type: "text",
+ disabled: (row) => {
+ return row.state != 1 && row.state != 4;
+ },
+ clickFun: (row) => {
+ this.handleDataLook(row);
+ },
+ showFun: () => {
+ return true;
+ },
+ },
+ {
+ name: "鎶ュ憡涓嬭浇",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return row.state != 4 || row.isRatify != 1;
+ },
+ },
+ {
+ name: "瀹℃牳",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return row.state != 0;
+ },
+ },
+ {
+ name: "鎾ら攢",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return row.state != 1 && row.state != 0;
+ },
+ },
+ {
+ name: "鎾ら攢瀹℃牳",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return (
+ (row.state != 1 && row.state != 0) ||
+ this.tabIndex != 1 ||
+ row.isRevocation != 1
+ );
+ },
+ },
+ {
+ name: "鍒嗛厤",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return (
+ row.state != 1 ||
+ (row.entrustCode != null &&
+ Number(row.assign) > 0 &&
+ row.inspectId != null)
+ );
+ },
+ },
+ ],
+ },
+ dataLookTable: {
+ column: [
+ {
+ label: "濮旀墭缂栧彿",
+ prop: "entrustCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧缂栧彿",
+ prop: "sampleCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "绠″鑹叉爣",
+ prop: "bushColor",
+ minWidth: "100px",
+ width: "100px",
+ },
+ {
+ label: "鍏夌氦甯︾紪鍙�",
+ prop: "code",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鍏夌氦鑹叉爣",
+ prop: "color",
+ minWidth: "100px",
+ width: "100px",
+ },
+ {
+ label: "妫�楠岄」",
+ prop: "inspectionItem",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屽瓙椤�",
+ prop: "inspectionItemSubclass",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠岀粨鏋�",
+ prop: "lastValue",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "缁撴灉鍒ゅ畾",
+ prop: "insResult",
+ minWidth: "100px",
+ width: "100px",
+ dataType: "tag",
+ formatData: (params) => {
+ let index = this.insResultList.findIndex(
+ (item) => item.value == params
+ );
+ if (index > -1) {
+ return this.insResultList[index].label;
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ let index = this.insResultList.findIndex(
+ (item) => item.value == params
+ );
+ if (index > -1) {
+ return this.insResultList[index].type;
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "鍗曚綅",
+ prop: "unit",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "璇曢獙瑕佹眰",
+ prop: "tell",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屼汉",
+ prop: "checkName",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屾棩鏈�",
+ prop: "checkTime",
+ minWidth: "140px",
+ width: "140px",
+ },
+ {
+ label: "鏍峰搧鍚嶇О",
+ prop: "sample",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鍨嬪彿",
+ prop: "model",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "璇曢獙瀹�",
+ prop: "sonLaboratory",
+ minWidth: "120px",
+ width: "120px",
+ },
+ ],
+ operatorConfig: {
+ fixed: "right",
+ label: "鎿嶄綔",
+ width: 80,
+ minWidth: 100,
+ },
+ operator: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {},
+ showFun: (row) => {
+ console.log(row);
+ console.log(row.inspectionItem);
+ return (
+ row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
+ row.inspectionItem.includes("鏉惧绠�") ||
+ row.inspectionItemSubclass.includes("鏉惧绠�") ||
+ (row.inspectionItem == "鎶楁媺寮哄害" &&
+ (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
+ (row.inspectionItem == "鏂浼搁暱鐜�" &&
+ (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
+ );
+ },
+ },
+ ],
+ },
dataLookTableLoading: false,
- dataLookcolumn: [
+ dataLooktableData: [],
+ qrData: [],
+ multipleSelection: [],
+ sonLaboratoryList: [],
+ urgencyDictList: [],
+ tableHeight: 0,
+ tabList: [
{
- label: "濮旀墭缂栧彿",
- prop: "entrustCode",
- minWidth: "160px",
- width: "160px",
+ label: "寰呭鏍�",
+ value: 0,
},
{
- label: "鏍峰搧缂栧彿",
- prop: "sampleCode",
- minWidth: "160px",
- width: "160px",
+ label: "寰呮楠�",
+ value: 1,
},
{
- label: "绠″鑹叉爣",
- prop: "bushColor",
- minWidth: "160px",
- width: "160px",
+ label: "宸叉楠�",
+ value: 4,
},
{
- label: "鍏夌氦甯︾紪鍙�",
- prop: "code",
- minWidth: "160px",
- width: "160px",
+ label: "閫�鍥�",
+ value: 2,
},
{
- label: "鍏夌氦鑹叉爣",
- prop: "color",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "妫�楠岄」",
- prop: "inspectionItem",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠屽瓙椤�",
- prop: "inspectionItemSubclass",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠岀粨鏋�",
- prop: "lastValue",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "缁撴灉鍒ゅ畾",
- prop: "insResult",
- minWidth: "100px",
- width: "100px",
- dataType: "tag",
- formatData: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].dictLabel;
- } else {
- return null;
- }
- },
- formatType: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].listClass;
- } else {
- return null;
- }
- },
- },
- {
- label: "鍗曚綅",
- prop: "unit",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "璇曢獙瑕佹眰",
- prop: "tell",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠屼汉",
- prop: "checkName",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠屾棩鏈�",
- prop: "checkTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "鏍峰搧鍚嶇О",
- prop: "sample",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鍨嬪彿",
- prop: "model",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "璇曢獙瀹�",
- prop: "sonLaboratory",
- minWidth: "120px",
- width: "120px",
- },
- {
- dataType: "action",
- fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "鏌ョ湅",
- type: "text",
- clickFun: (row) => {},
- showHide: (row) => {
- console.log(row);
- console.log(row.inspectionItem);
- return (
- row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
- row.inspectionItem.includes("鏉惧绠�") ||
- row.inspectionItemSubclass.includes("鏉惧绠�") ||
- (row.inspectionItem == "鎶楁媺寮哄害" &&
- (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
- (row.inspectionItem == "鏂浼搁暱鐜�" &&
- (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
- );
- },
- },
- ],
+ label: "鎾ら攢",
+ value: 3,
},
],
- dataLooktableData: [],
+ insResultList: [
+ {
+ value: 1,
+ label: "鍚堟牸",
+ type: "success",
+ },
+ {
+ value: 0,
+ label: "涓嶅悎鏍�",
+ type: "danger",
+ },
+ {
+ value: 3,
+ label: "涓嶅垽瀹�",
+ type: "",
+ },
+ ],
+ tabIndex: 0,
+ active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0
+ currentId: null,
+ more: false,
//old
tableHeader: [],
@@ -1255,292 +1311,11 @@
// 浜哄憳鍒楄〃
personList: [],
currentTableData: [],
- // componentData: {
- // entity: {
- // entrustCode: null,
- // sample: null,
- // sampleName: null,
- // sampleModel: null,
- // sampleCode: null,
- // outEntrustCode: null,
- // state: 0,
- // name: null,
- // engineering: null,
- // production: null,
- // startAndEndTime: [],
- // // orderBy: {
- // // field: '',
- // // order: ''
- // // }
- // },
- // isIndex: true,
- // showSelect: true,
- // select: true,
- // selectMethod: "selectMethod",
- // do: [
- // {
- // id: "dataLook",
- // font: "鏁版嵁鏌ョ湅",
- // type: "text",
- // method: "handleDataLook",
- // disabFun: (row, index) => {
- // return row.state != 1 && row.state != 4;
- // },
- // },
- // {
- // id: "download",
- // font: "鎶ュ憡涓嬭浇",
- // type: "text",
- // method: "download",
- // disabFun: (row, index) => {
- // return row.state != 4 || row.isRatify != 1;
- // },
- // },
- // {
- // id: "verify",
- // font: "瀹℃牳",
- // type: "text",
- // method: "handleVerify",
- // disabFun: (row, index) => {
- // return row.state != 0;
- // },
- // },
- // {
- // id: "quash",
- // font: "鎾ら攢",
- // type: "text",
- // method: "handlEquash",
- // disabFun: (row, index) => {
- // return row.state != 1 && row.state != 0;
- // },
- // },
- // {
- // id: "quashCheck",
- // font: "鎾ら攢瀹℃牳",
- // type: "text",
- // method: "handlEquashCheck",
- // disabFun: (row, index) => {
- // return (
- // (row.state != 1 && row.state != 0) ||
- // this.tabIndex != 1 ||
- // row.isRevocation != 1
- // );
- // },
- // },
- // {
- // font: "鍒嗛厤",
- // type: "text",
- // method: "handleIssued",
- // disabFun: (row, index) => {
- // return (
- // row.state != 1 ||
- // (row.entrustCode != null &&
- // Number(row.assign) > 0 &&
- // row.inspectId != null)
- // );
- // },
- // },
- // ],
- // linkEvent: {
- // sampleName: {
- // method: "selectAllByOne",
- // },
- // },
- // tagField: {
- // type: {
- // select: [],
- // },
- // createUser: {
- // select: [],
- // },
- // orderType: {
- // select: [],
- // },
- // processing: {
- // select: [
- // {
- // value: 1,
- // label: "瀹為獙瀹ゅ鐞�",
- // },
- // {
- // value: 0,
- // label: "濮旀墭鍗曚綅鍙栧洖",
- // },
- // ],
- // },
- // isLeave: {
- // select: [
- // {
- // value: 1,
- // label: "鐣欐牱",
- // },
- // {
- // value: 0,
- // label: "涓嶇暀鏍�",
- // },
- // ],
- // },
- // send: {
- // select: [
- // {
- // value: 1,
- // label: "鑷彇",
- // },
- // {
- // value: 0,
- // label: "鍏朵粬",
- // },
- // ],
- // },
- // },
- // selectField: {},
- // requiredAdd: [],
- // requiredUp: [],
- // needSort: ["createTime", "sendTime", "type", "appointed"],
- // },
orderId: "",
revocationInsProductIds: "",
- // componentDataDataLook: {
- // isPage: false,
- // entity: {
- // id: 0,
- // orderBy: {
- // field: "sampleCode",
- // order: "asc",
- // },
- // },
- // isIndex: false,
- // showSelect: false,
- // select: false,
- // do: [
- // {
- // id: "",
- // font: "鏌ョ湅",
- // type: "text",
- // method: "viewDetails",
- // showFun: (row, index) => {
- // return (
- // row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
- // row.inspectionItem.includes("鏉惧绠�") ||
- // row.inspectionItemSubclass.includes("鏉惧绠�") ||
- // (row.inspectionItem == "鎶楁媺寮哄害" &&
- // (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- // row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
- // (row.inspectionItem == "鏂浼搁暱鐜�" &&
- // (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- // row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
- // );
- // },
- // },
- // ],
- // tagField: {
- // insState: {
- // select: [],
- // },
- // insResult: {
- // select: [
- // {
- // value: 1,
- // label: "鍚堟牸",
- // type: "success",
- // },
- // {
- // value: 0,
- // label: "涓嶅悎鏍�",
- // type: "danger",
- // },
- // {
- // value: 3,
- // label: "涓嶅垽瀹�",
- // type: "",
- // },
- // ],
- // },
- // },
- // selectField: {},
- // spanConfig: {
- // rows: [
- // // {
- // // name: "entrustCode",
- // // index: 0,
- // // },
- // // {
- // // name: "sampleCode",
- // // index: 1,
- // // },
- // ],
- // },
- // requiredAdd: [],
- // requiredUp: [],
- // },
- // componentDataDelete: {
- // entity: {
- // // orderId: '',
- // // orderBy: {
- // // field: 'sampleCode',
- // // order: 'asc'
- // // }
- // },
- // isPage: false,
- // isIndex: false,
- // showSelect: true,
- // select: true,
- // selectMethod: "selectDelete",
- // do: [],
- // tagField: {
- // insState: {
- // select: [],
- // },
- // insResult: {
- // select: [
- // {
- // value: 1,
- // label: "鍚堟牸",
- // type: "success",
- // },
- // {
- // value: 0,
- // label: "涓嶅悎鏍�",
- // type: "danger",
- // },
- // ],
- // },
- // },
- // selectField: {},
- // spanConfig: {},
- // requiredAdd: [],
- // requiredUp: [],
- // },
deleteDialogVisible: false,
- entityCopy: {},
- upIndex: 0,
upLoad: false,
- tabList: [
- {
- label: "寰呭鏍�",
- value: 0,
- },
- {
- label: "寰呮楠�",
- value: 1,
- },
- {
- label: "宸叉楠�",
- value: 4,
- },
- {
- label: "閫�鍥�",
- value: 2,
- },
- {
- label: "鎾ら攢",
- value: 3,
- },
- ],
- tabIndex: 0,
- active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0
- currentId: null,
- more: false,
+
insOrderRow: {},
checkIndexList: [],
checkDataList: [
@@ -1548,12 +1323,6 @@
sampleCode: "",
},
],
- qrData: [],
- multipleSelection: [],
- sonLaboratoryList: [],
- queryCount: 0,
- urgencyDictList: [],
- tableHeight: 0,
};
},
created() {
@@ -1820,32 +1589,8 @@
this.getLabelPrinting(selection);
this.printDialogVisible = true;
},
- // 閫夋嫨妫�楠屽垎閰嶄汉鍛�
- getAuthorizedPerson() {
- this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => {
- // let data = [];
- // res.data.forEach((a) => {
- // data.push({
- // label: a.name,
- // value: a.id,
- // });
- // });
- this.personList = res.data;
- });
- },
refreshTable() {
this.getList();
- },
- getTableData(newData) {
- if (newData && newData.length == 1) {
- const insState = newData[0].state;
- this.tabList.forEach((ele, index) => {
- if (ele.value == insState && this.queryCount == 0) {
- this.handleTab(ele, index);
- this.queryCount = 1;
- }
- });
- }
},
refresh() {
this.queryParams = {
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index dc7e6a8..c5df9d9 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -1,9 +1,1920 @@
+<style scoped>
+.title {
+ height: 60px;
+ line-height: 60px;
+}
+
+.search {
+ background-color: #fff;
+ height: 80px;
+ display: flex;
+ align-items: center;
+}
+
+.search_thing {
+ display: flex;
+ align-items: center;
+ height: 50px;
+ width: 230px;
+}
+
+.search_label {
+ width: 90px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 90px);
+}
+
+.table {
+ margin-top: 10px;
+ background-color: #fff;
+ width: calc(100% - 40px);
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ padding: 20px;
+}
+
+.el-form-item {
+ margin-bottom: 16px;
+}
+
+.full-screen {
+ position: absolute;
+ right: 52px;
+ top: 22px;
+}
+
+.btns {
+ position: absolute;
+ right: 40px;
+ top: 50%;
+ transform: translate(0, -50%);
+ display: flex;
+ align-items: center;
+}
+
+.fullscreen {
+ height: 82vh;
+}
+.custom-upload >>> .el-upload-list--text {
+ max-height: 20vh;
+ overflow-y: scroll;
+}
+</style>
+
<template>
- <div>鎶ュ憡缂栧埗</div>
+ <div class="inspection_order">
+ <div style="width: 100%; height: 100%">
+ <div>
+ <el-row class="title">
+ <el-col :span="12" style="padding-left: 20px; text-align: left"
+ >鎶ュ憡缂栧埗</el-col
+ >
+ </el-row>
+ </div>
+ <div class="search" :style="`height: ${more ? 130 : 80}px;`">
+ <el-row :gutter="10" style="width: 100%">
+ <el-col :span="16" style="display: flex; flex-wrap: wrap">
+ <div class="search_thing" v-if="maxNum >= 1">
+ <div class="search_label">鎶ュ憡缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="entity.code"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 2">
+ <div class="search_label">涓婁紶鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.isUpload"
+ >
+ <el-option
+ v-for="(item, index) in tagField.isUpload.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 3">
+ <div class="search_label">鎻愪氦鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.state"
+ >
+ <el-option
+ v-for="(item, index) in tagField.state.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div
+ class="search_thing"
+ v-if="maxNum >= 4 || (maxNum < 4 && more)"
+ >
+ <div class="search_label">瀹℃牳鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.isExamine"
+ >
+ <el-option
+ v-for="(item, index) in tagField.isExamine.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 5 || more">
+ <div class="search_label">鎵瑰噯鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.isRatify"
+ >
+ <el-option
+ v-for="(item, index) in tagField.isRatify.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 6 || more">
+ <div class="search_label">鍒涘缓鏃堕棿锛�</div>
+ <div class="search_input">
+ <el-date-picker
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.createTimeRange"
+ type="daterange"
+ value-format="yyyy-MM-dd[T]HH:mm:ss"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ :default-time="['00:00:00', '23:59:59']"
+ >
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="search_thing">
+ <el-button
+ v-if="maxNum < 5"
+ type="text"
+ :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
+ style="color: #3a7bfa"
+ @click="more = !more"
+ >{{ !more ? "鏇村" : "鏀惰捣" }}</el-button
+ >
+ <div class="search_thing" style="padding-left: 20px">
+ <el-button
+ size="small"
+ @click="refresh()"
+ style="margin-right: 6px"
+ >閲� 缃�</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="refreshTable()"
+ style="margin-right: 6px"
+ >鏌� 璇�</el-button
+ >
+ <template>
+ <el-dropdown
+ @command="handleCommand"
+ style="margin-left: 10px"
+ >
+ <el-button type="primary" size="small">
+ 鏇村鎿嶄綔<i class="el-icon-arrow-down el-icon--right"></i>
+ </el-button>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item
+ icon="el-icon-download"
+ command="batchDownload"
+ >鎵归噺涓嬭浇</el-dropdown-item
+ >
+ <el-dropdown-item
+ icon="el-icon-upload"
+ command="batchUpload"
+ >鎵归噺涓婁紶</el-dropdown-item
+ >
+ <el-dropdown-item
+ icon="el-icon-s-check"
+ command="oneClickApproval"
+ >涓�閿鎵�</el-dropdown-item
+ >
+ <el-dropdown-item
+ icon="el-icon-setting"
+ command="approvalConfig"
+ >瀹℃壒绛惧悕閰嶇疆</el-dropdown-item
+ >
+ </el-dropdown-menu>
+ </el-dropdown>
+ </template>
+ <template>
+ <el-button
+ size="small"
+ type="primary"
+ @click="handleDowns"
+ :loading="outLoading"
+ style="margin-right: 6px"
+ >鎵归噺涓嬭浇</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="openBatchUploadDia()"
+ :loading="inLoading"
+ >鎵归噺涓婁紶</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="oneClickApproval()"
+ :loading="approvalLoading"
+ >涓�閿鎵�</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="openApprovalConfig()"
+ :loading="approvalConfigLoading"
+ >瀹℃壒绛惧悕閰嶇疆</el-button
+ >
+ </template>
+ </div>
+ <!-- <div class="btns">
+ <el-button size="small" type="primary" @click="handleDowns" :loading="outLoading" style="margin-right: 16px;">鎵归噺涓嬭浇</el-button>
+ <el-button size="small" type="primary" @click="openBatchUploadDia()" :loading="inLoading">鎵归噺涓婁紶</el-button>
+ </div> -->
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <div class="table">
+ <div
+ style="
+ width: 100%;
+ display: flex;
+ flex-wrap: nowrap;
+ font-size: 13px;
+ flex-direction: row;
+ justify-content: flex-end;
+ align-items: center;
+ "
+ >
+ <p style="margin-left: 15px">
+ 寰呮彁浜ゆ暟閲�: <span
+ style="font-size: 16px; color: rgb(58, 123, 250)"
+ >{{ unSubmitCount }}</span
+ >
+ </p>
+ <p style="margin-left: 15px">
+ 寰呭鏍告暟閲�: <span
+ style="font-size: 16px; color: rgb(58, 123, 250)"
+ >{{ unExamineCount }}</span
+ >
+ </p>
+ <p style="margin-left: 15px">
+ 寰呮壒鍑嗘暟閲�: <span
+ style="font-size: 16px; color: rgb(58, 123, 250)"
+ >{{ unRatifyCount }}</span
+ >
+ </p>
+ </div>
+ <lims-table
+ :tableData="tableData"
+ :column="column"
+ :tableLoading="tableLoading"
+ :height="'calc(100vh - 270px)'"
+ :page="page"
+ @pagination="pagination"
+ ></lims-table>
+ </div>
+ </div>
+ <!--鎶ュ憡鏌ョ湅-->
+ <el-dialog
+ :fullscreen="fullscreen"
+ top="5vh"
+ :modal-append-to-body="false"
+ :visible.sync="viewIssuedVisible"
+ title="鎶ュ憡鏌ョ湅"
+ width="80vw"
+ >
+ <div class="full-screen">
+ <i
+ v-if="!fullscreen"
+ class="el-icon-full-screen"
+ style="cursor: pointer; font-size: 18px"
+ @click="fullscreen = true"
+ ></i>
+ <!-- <img
+ v-else
+ alt=""
+ src="../../../static/img/no-full.svg"
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <div v-if="viewIssuedVisible" style="height: 80vh">
+ <onlyoffice
+ ref="onlyoffice"
+ :options="option"
+ style="width: 100%; height: 100%"
+ />
+ </div>
+ </el-dialog>
+ <el-dialog
+ title="鍦ㄧ嚎缂栧埗"
+ :visible.sync="claimVisible"
+ width="22cm"
+ :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="../../../static/img/no-full.svg"
+ alt=""
+ v-else
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <Word
+ style="height: 70vh"
+ :class="{ fullscreen: fullscreen }"
+ v-if="claimVisible"
+ ref="Word"
+ :value="value"
+ />
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="claimVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="鎶ュ憡瀹℃牳"
+ top="5vh"
+ :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="../../../static/img/no-full.svg"
+ alt=""
+ v-else
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <div style="height: 75vh" v-if="issuedVisible">
+ <onlyoffice
+ ref="onlyoffice"
+ :options="option"
+ style="width: 100%; height: 100%"
+ />
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="issuedReasonVisible = true" :disabled="loadingIssued"
+ >涓嶉�氳繃</el-button
+ >
+ <el-button type="primary" @click="subIssued" :loading="loadingIssued"
+ >閫� 杩�</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="涓嶉�氳繃鍘熷洜"
+ top="5vh"
+ :visible.sync="issuedReasonVisible"
+ width="400px"
+ :modal-append-to-body="false"
+ >
+ <div class="search_thing">
+ <div class="search_label">涓嶉�氳繃鍘熷洜锛�</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="reason"
+ ></el-input>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button
+ @click="issuedReasonVisible = false"
+ :disabled="loadingIssuedReason"
+ >鍙栨秷</el-button
+ >
+ <el-button
+ type="primary"
+ @click="handleIssuedReason"
+ :loading="loadingIssuedReason"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="鎶ュ憡鎵瑰噯"
+ top="5vh"
+ :visible.sync="approveVisible"
+ 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="../../../static/img/no-full.svg"
+ alt=""
+ v-else
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <div style="height: 75vh" v-if="approveVisible">
+ <onlyoffice
+ ref="onlyoffice"
+ :options="option"
+ style="width: 100%; height: 100%"
+ />
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button
+ @click="approveReasonVisible = true"
+ :disabled="loadingApprove"
+ >涓嶆壒鍑�</el-button
+ >
+ <el-button type="primary" @click="subApprove" :loading="loadingApprove"
+ >鎵� 鍑�</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="涓嶆壒鍑嗗師鍥�"
+ :visible.sync="approveReasonVisible"
+ width="400px"
+ :modal-append-to-body="false"
+ >
+ <div class="search_thing">
+ <div class="search_label">涓嶆壒鍑嗗師鍥狅細</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="reason"
+ ></el-input>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button
+ @click="approveReasonVisible = false"
+ :disabled="loadingApproveReason"
+ >鍙栨秷</el-button
+ >
+ <el-button
+ type="primary"
+ @click="handleApproveReason"
+ :loading="loadingApproveReason"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ :visible.sync="batchUploadDia"
+ title="鎶ュ憡鎵归噺涓婁紶"
+ width="30%"
+ :close-on-click-modal="false"
+ top="5vh"
+ >
+ <div>
+ <!-- <el-upload
+ class="upload-demo"
+ :action="action"
+ :headers="headers"
+ :show-file-list="false"
+ accept=".doc,.docx"
+ :limit="1"
+ :before-upload="beforeUpload"
+ :on-success="handleSuccess"
+ ref="upload"
+ :on-error="onError">
+ </el-upload> -->
+ <el-upload
+ ref="upload"
+ class="upload-demo custom-upload"
+ drag
+ show-file-list
+ accept=".doc,.docx"
+ :action="action"
+ :headers="headers"
+ :on-error="onError"
+ :before-upload="beforeUpload"
+ :file-list="fileList"
+ :auto-upload="false"
+ :limit="100"
+ :on-exceed="uploadExceed"
+ :on-success="handleSuccess"
+ multiple
+ >
+ <i class="el-icon-upload"></i>
+ <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+ <div class="el-upload__tip" slot="tip">
+ 鍙兘涓婁紶.doc/.docx鏂囦欢锛屼笖鍗曚釜鏂囦欢涓嶈秴杩�10MB
+ </div>
+ </el-upload>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" type="primary" @click="submitUpload"
+ >纭涓婁紶</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 鎶ュ憡鎵归噺瀹℃壒寮规 -->
+ <el-dialog
+ :visible.sync="oneClickApprovalDialog"
+ title="鎶ュ憡鎵归噺瀹℃壒"
+ width="40%"
+ :close-on-click-modal="false"
+ top="5vh"
+ >
+ <div>
+ <el-result
+ icon="error"
+ v-show="progressData.hasException != null"
+ title="閿欒淇℃伅"
+ :subTitle="progressData.hasException"
+ ></el-result>
+ <el-result
+ icon="success"
+ v-show="isSuccess && progressData.hasException == null"
+ title="鎴愬姛淇℃伅"
+ subTitle="鎶ュ憡瀹℃壒瀹屾垚"
+ ></el-result>
+ <el-progress
+ :percentage="progressData.hasNum"
+ :color="customColors"
+ ></el-progress>
+ <el-statistic title="鍓╀綑鎶ュ憡鏁伴噺">
+ <template slot="formatter">
+ {{ progressData.surplus }}/{{ progressData.hasCount }}
+ </template>
+ </el-statistic>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <!-- <el-button size="small" type="primary" @click="confirmApproval"
+ >纭</el-button
+ > -->
+ </span>
+ </el-dialog>
+ <!-- 鎾ゅ洖寮规 -->
+ <el-dialog
+ title="璇烽�夋嫨闇�瑕佹挙鍥炵殑璇曢獙瀹�"
+ :visible.sync="withdrawDialogVisible"
+ width="30%"
+ :before-close="handleClose"
+ >
+ <el-select
+ v-model="laboratory"
+ multiple
+ clearable
+ style="width: 100%; margin-bottom: 20px"
+ placeholder="璇烽�夋嫨璇曢獙瀹�"
+ >
+ <el-option
+ v-for="(item, i) in laboratorys"
+ :key="i"
+ :label="item.label"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="handleClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="withdrawOperation">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 瀹℃壒绛惧悕閰嶇疆寮规 -->
+ <el-dialog
+ :visible.sync="approvalConfigDialog"
+ title="瀹℃壒绛惧悕閰嶇疆"
+ width="55%"
+ :close-on-click-modal="false"
+ top="5vh"
+ >
+ <div v-if="approvalConfigListTX.editor != null">
+ <el-divider content-position="left">閫氫俊浜у搧瀹為獙瀹�</el-divider>
+ <el-form
+ size="mini"
+ :model="approvalConfigListTX"
+ inline
+ label-position="right"
+ >
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="缂栧埗浜�:" prop="editor">
+ <el-select
+ v-model="approvalConfigListTX.editor"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="瀹℃牳浜�:" prop="examiner">
+ <el-select
+ v-model="approvalConfigListTX.examiner"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵瑰噯浜�:" prop="approver">
+ <el-select
+ v-model="approvalConfigListTX.approver"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ <br />
+ <div v-if="approvalConfigListDL.editor != null">
+ <el-divider content-position="left">鐢靛姏浜у搧瀹為獙瀹�</el-divider>
+ <el-form
+ size="mini"
+ :model="approvalConfigListDL"
+ inline
+ label-position="right"
+ >
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="缂栧埗浜�:" prop="editor">
+ <el-select
+ v-model="approvalConfigListDL.editor"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="瀹℃牳浜�:" prop="examiner">
+ <el-select
+ v-model="approvalConfigListDL.examiner"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵瑰噯浜�:" prop="approver">
+ <el-select
+ v-model="approvalConfigListDL.approver"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" type="primary" @click="confirmApprovalConfig"
+ >纭</el-button
+ >
+ </span>
+ </el-dialog>
+ </div>
</template>
<script>
-export default {};
-</script>
+import limsTable from "@/components/Table/lims-table.vue";
+import onlyoffice from "../reportPreparation/onlyoffice.vue";
+import {
+ pageInsReport,
+ inReport,
+ upAll,
+ getLaboratoryByReportId,
+ withdraw,
+ updateApproveConfig,
+ getUserList,
+ getApproveConfigList,
+ downAll,
+ getBatchApprovalProgress,
+ getReportCountInfo,
+ downReport,
+ upReportUrl,
+ ratifyReport,
+ writeReport,
+ examineReport,
+ downLoad,
+ getReportInfo,
+} from "../../../api/business/reportPreparation";
-<style></style>
+export default {
+ components: {
+ limsTable,
+ onlyoffice,
+ },
+ data() {
+ return {
+ tagField: {
+ isUpload: {
+ select: [
+ {
+ value: 0,
+ type: "danger",
+ label: "鏈笂浼�",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "宸蹭笂浼�",
+ },
+ ],
+ },
+ isRatify: {
+ select: [
+ {
+ value: -9,
+ type: "info",
+ label: "鏈壒鍑�",
+ },
+ {
+ value: 0,
+ type: "danger",
+ label: "涓嶆壒鍑�",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "鎵瑰噯",
+ },
+ ],
+ },
+ isExamine: {
+ select: [
+ {
+ value: -9,
+ type: "info",
+ label: "鏈鏍�",
+ },
+ {
+ value: 0,
+ type: "danger",
+ label: "涓嶉�氳繃",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "閫氳繃",
+ },
+ ],
+ },
+ state: {
+ select: [
+ {
+ value: 0,
+ type: "danger",
+ label: "寰呮彁浜�",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "宸叉彁浜�",
+ },
+ ],
+ },
+ },
+ entity: {
+ isUpload: null,
+ entrustCode: null,
+ state: null,
+ isExamine: null,
+ isRatify: null,
+ code: null,
+ createTimeRange: [],
+ },
+ withdrawDialogVisible: false,
+ laboratory: [],
+ laboratorys: [],
+ isSuccess: false,
+ time: null,
+ //瀹℃壒杩涘害瀵硅薄
+ progressData: {
+ hasProgress: false,
+ hasNum: 0,
+ hasCount: 0,
+ hasException: null,
+ surplus: 0,
+ },
+ personList: [],
+ approvalConfigListTX: {
+ editor: null,
+ examiner: null,
+ approver: null,
+ }, //瀹℃壒绛惧悕閰嶇疆鍒楄〃
+ approvalConfigListDL: {
+ editor: null,
+ examiner: null,
+ approver: null,
+ }, //瀹℃壒绛惧悕閰嶇疆鍒楄〃
+ approvalConfigDialog: false,
+ approvalConfigLoading: false,
+ surplusReportNum: 0,
+ percentage: 0,
+ customColors: [
+ { color: "#f56c6c", percentage: 20 },
+ { color: "#e6a23c", percentage: 40 },
+ { color: "#5cb87a", percentage: 60 },
+ { color: "#1989fa", percentage: 80 },
+ { color: "#6f7ad3", percentage: 100 },
+ ],
+ oneClickApprovalDialog: false,
+ approvalLoading: false,
+ isShowMore: false,
+ more: false,
+ fileList: [],
+ batchUploadDia: false,
+ viewIssuedVisible: false,
+ tableData: [],
+ column: [
+ {
+ label: "鎶ュ憡缂栧彿",
+ prop: "code",
+ },
+ {
+ label: "涓婁紶鐘舵��",
+ prop: "isUpload",
+ dataType: "tag",
+ formatData: (params) => {
+ return params == 1 ? "宸蹭笂浼�" : "鏈笂浼�";
+ },
+ formatType: (params) => {
+ return params == 1 ? "success" : "danger";
+ },
+ },
+ {
+ label: "鍒涘缓鏃堕棿",
+ prop: "createTime",
+ },
+ {
+ label: "鎻愪氦浜�",
+ prop: "writeUserName",
+ },
+ {
+ label: "鎻愪氦鐘舵��",
+ prop: "state",
+ dataType: "tag",
+ formatData: (params) => {
+ return params == 1 ? "宸叉彁浜�" : "寰呮彁浜�";
+ },
+ formatType: (params) => {
+ return params == 1 ? "success" : "danger";
+ },
+ },
+ {
+ label: "鎻愪氦鏃堕棿",
+ prop: "writeTime",
+ },
+ {
+ label: "瀹℃牳浜�",
+ prop: "examineUser",
+ },
+ {
+ label: "瀹℃牳鐘舵��",
+ prop: "isExamine",
+ dataType: "tag",
+ formatData: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "涓嶉�氳繃";
+ } else if (params == 1) {
+ farmat = "閫氳繃";
+ } else {
+ farmat = "鏈鏍�";
+ }
+ return farmat;
+ },
+ formatType: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "danger";
+ } else if (params == 1) {
+ farmat = "success";
+ } else {
+ farmat = "info";
+ }
+ return farmat;
+ },
+ },
+ {
+ label: "瀹℃牳澶囨敞",
+ prop: "examineTell",
+ },
+ {
+ label: "瀹℃牳鏃堕棿",
+ prop: "examineTime",
+ },
+ {
+ label: "鎵瑰噯浜�",
+ prop: "ratifyUser",
+ },
+ {
+ label: "鎵瑰噯鐘舵��",
+ prop: "isRatify",
+ dataType: "tag",
+ formatData: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "涓嶆壒鍑�";
+ } else if (params == 1) {
+ farmat = "鎵瑰噯";
+ } else {
+ farmat = "鏈壒鍑�";
+ }
+ return farmat;
+ },
+ formatType: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "danger";
+ } else if (params == 1) {
+ farmat = "sucess";
+ } else {
+ farmat = "info";
+ }
+ return farmat;
+ },
+ },
+ {
+ label: "鎵瑰噯澶囨敞",
+ prop: "ratifyTell",
+ },
+ {
+ label: "鎵瑰噯鏃堕棿",
+ prop: "ratifyTime",
+ },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栧埗",
+ type: "text",
+ clickFun: (row) => {
+ this.handleWeave(row);
+ },
+ disabled: (row) => {
+ return row.isExamine != -9;
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.download(row);
+ },
+ },
+ {
+ name: "涓婁紶",
+ type: "upload",
+ url: "/file/attachmentType/upload",
+ data: (row) => {
+ return {
+ id: row.id,
+ type: 1,
+ };
+ },
+ uploadIdFun: (row) => {
+ return row.id;
+ },
+ disabled: (row) => {
+ return row.isExamine != -9;
+ },
+ },
+ {
+ name: "杩樺師",
+ type: "text",
+ clickFun: (row) => {
+ this.handleRestore(row);
+ },
+ disabled: (row) => {
+ return row.isExamine != -9;
+ },
+ },
+ {
+ name: "鎻愪氦",
+ type: "text",
+ clickFun: (row) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return row.state != 0;
+ },
+ },
+ {
+ name: "瀹℃牳",
+ type: "text",
+ clickFun: (row) => {
+ this.handleIssued(row);
+ },
+ disabled: (row) => {
+ return (
+ row.state == null || row.state == 0 || row.isExamine == 1
+ );
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleApprove(row);
+ },
+ disabled: (row) => {
+ return (
+ row.state == null ||
+ row.state == 0 ||
+ row.isExamine == 0 ||
+ row.isExamine == -9 ||
+ row.isRatify == 1
+ );
+ },
+ },
+ {
+ name: "鎾ゅ洖",
+ type: "text",
+ clickFun: (row) => {
+ this.withdraw(row);
+ },
+ disabled: (row) => {
+ return row.state == 1;
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 1,
+ },
+ tableLoading: false,
+ entityCopy: {},
+ upIndex: 0,
+ statusList: [],
+ claimVisible: false,
+ issuedVisible: false,
+ issuedReasonVisible: false,
+ approveVisible: false,
+ approveReasonVisible: false,
+ fullscreen: false,
+ loadingApproveReason: false,
+ loadingApprove: false,
+ loadingIssuedReason: false,
+ loadingIssued: false,
+ value: ``,
+ reason: "",
+ currentInfo: null,
+ option: null,
+ mutiList: [],
+ outLoading: false,
+ inLoading: false,
+ maxNum: 1,
+ unSubmitCount: 0,
+ unRatifyCount: 0,
+ unExamineCount: 0,
+ };
+ },
+ computed: {
+ headers() {
+ return {
+ token: sessionStorage.getItem("token"),
+ };
+ },
+ action() {
+ return "";
+ },
+ },
+ created() {
+ this.getAuthorizedPerson();
+ this.handleResize();
+ // 鐩戝惉绐楀彛澶у皬鏀瑰彉浜嬩欢
+ window.addEventListener("resize", this.handleResize);
+ },
+ beforeDestroy() {
+ if (this.time != null) {
+ clearInterval(this.time);
+ this.time = null;
+ }
+ this.progressData = {
+ hasProgress: false,
+ hasNum: 0,
+ hasCount: 0,
+ hasException: null,
+ surplus: 0,
+ };
+ window.removeEventListener("resize", this.handleResize);
+ },
+ mounted() {
+ this.entityCopy = this.HaveJson(this.entity);
+ this.getList();
+ this.getReportCountInfo();
+ },
+ watch: {
+ batchUploadDia(newVal) {
+ if (!newVal) {
+ this.$refs.upload.clearFiles();
+ this.fileList = [];
+ }
+ },
+ progressData(newVal) {
+ if (newVal && newVal.hasNum == 100) {
+ clearInterval(this.time);
+ this.$message.success("鎶ュ憡瀹℃壒瀹屾垚");
+ this.isSuccess = true;
+ this.mutiList = [];
+ this.refresh();
+ } else if (
+ newVal &&
+ newVal.hasException != null &&
+ newVal.hasException != ""
+ ) {
+ clearInterval(this.time);
+ }
+ },
+ oneClickApprovalDialog(newVal) {
+ if (!newVal) {
+ this.isSuccess = false;
+ this.progressData = {
+ hasProgress: false,
+ hasNum: 0,
+ hasCount: 0,
+ hasException: null,
+ surplus: 0,
+ };
+ }
+ },
+ },
+ methods: {
+ // 杩斿洖鍒嗛〉鍊�
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ getList() {
+ this.tableLoading = true;
+ if (!this.entity.createTimeRange) {
+ this.entity.createTimeRange = [];
+ }
+ const data = { ...this.page, ...this.entity };
+ pageInsReport(data)
+ .then((res) => {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ this.tableLoading = false;
+ })
+ .catch((error) => {
+ console.error(error);
+ this.tableLoading = false;
+ });
+ },
+ // 鎾ゅ洖 寮规
+ withdraw(row) {
+ getLaboratoryByReportId(row.id).then((res) => {
+ this.laboratorys = res.data;
+ this.reportId = row.id;
+ this.withdrawDialogVisible = true;
+ });
+ },
+ withdrawOperation() {
+ if (this.laboratory.length == 0) {
+ this.$message.error("璇烽�夋嫨闇�瑕佹挙鍥炵殑璇曢獙瀹�");
+ return;
+ }
+ let data = {
+ laboratory: JSON.stringify(this.laboratory),
+ id: this.reportId,
+ };
+ withdraw(data).then((res) => {
+ if (res.code == 200) {
+ this.$message.success("鎾ゅ洖鎴愬姛");
+ this.withdrawDialogVisible = false;
+ this.refresh();
+ }
+ });
+ },
+
+ handleCommand(command) {
+ switch (command) {
+ case "batchDownload":
+ //鎵归噺涓嬭浇
+ this.handleDowns();
+ break;
+ case "batchUpload":
+ //鎵归噺涓婁紶
+ this.openBatchUploadDia();
+ break;
+ case "oneClickApproval":
+ //涓�閿鎵�
+ this.oneClickApproval();
+ break;
+ case "approvalConfig":
+ //瀹℃壒绛惧悕閰嶇疆
+ this.openApprovalConfig();
+ break;
+ }
+ },
+ //纭鏇存柊瀹℃壒绛惧悕閰嶇疆
+ confirmApprovalConfig() {
+ let data = [];
+ if (this.approvalConfigListTX.id) {
+ data.push(this.approvalConfigListTX);
+ }
+ if (this.approvalConfigListDL.id) {
+ data.push(this.approvalConfigListDL);
+ }
+ updateApproveConfig({ configList: data })
+ .then((res) => {
+ if (res.code == 200) {
+ this.$message.success("鏇存柊鎴愬姛");
+ this.approvalConfigDialog = false;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ //鑾峰彇浜哄憳淇℃伅
+ getAuthorizedPerson() {
+ getUserList()
+ .then((res) => {
+ this.personList = res.data;
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ //鎵撳紑瀹℃壒绛惧悕閰嶇疆寮规
+ openApprovalConfig() {
+ getApproveConfigList()
+ .then((res) => {
+ if (res.code !== 201) {
+ res.data.forEach((ele) => {
+ if (ele.laboratory == "閫氫俊浜у搧瀹為獙瀹�") {
+ this.approvalConfigListTX = { ...ele };
+ }
+ if (ele.laboratory == "鐢靛姏浜у搧瀹為獙瀹�") {
+ this.approvalConfigListDL = { ...ele };
+ }
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ this.$nextTick(() => {
+ this.approvalConfigDialog = true;
+ });
+ },
+ //纭瀹℃壒
+ confirmApproval() {},
+ //涓�閿鎵规寜閽�
+ oneClickApproval() {
+ if (this.mutiList.length == 0) {
+ this.$message.error("璇烽�夋嫨瑕佸鎵圭殑鎶ュ憡");
+ return;
+ }
+ //鎵ц瀹℃壒
+ if (!this.progressData.hasProgress) {
+ //鏈鎵圭殑鎶ュ憡
+ let unApprovalList = this.mutiList.filter(
+ (ele) => ele.isExamine == -9 || ele.isRatify == -9
+ );
+ let entity = this.entity;
+ //鏍规嵁鏌ヨ鏉′欢杩囨护宸查�夋嫨鐨勬暟鎹�
+ let ids = unApprovalList
+ .filter((f) =>
+ entity.isExamine != null && entity.isExamine !== ""
+ ? f.isExamine === entity.isExamine
+ : true
+ )
+ .filter((f) =>
+ entity.isRatify != null && entity.isRatify !== ""
+ ? f.isRatify === entity.isRatify
+ : true
+ )
+ .filter((f) =>
+ entity.isUpload != null && entity.isUpload !== ""
+ ? f.isUpload === entity.isUpload
+ : true
+ )
+ .filter((f) =>
+ entity.code != null && entity.code !== ""
+ ? f.code.indexOf(entity.code) >= 0
+ : true
+ )
+ .filter((f) =>
+ entity.state != null && entity.state !== ""
+ ? f.state === entity.state
+ : true
+ )
+ .map((ele) => ele.id);
+ batchApprovalReport({ ids: ids })
+ .then((res) => {
+ if (res.code != 201) {
+ //鏌ヨ瀹℃壒杩涘害
+ this.time = setInterval(() => {
+ this.getProgress();
+ }, 500);
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ clearInterval(this.time);
+ });
+ }
+ // this.getProgress();
+ this.$nextTick(() => {
+ this.oneClickApprovalDialog = true;
+ });
+ },
+ getProgress() {
+ getBatchApprovalProgress().then((res) => {
+ this.progressData = res.data;
+ });
+ },
+ // 瀹氫箟涓�涓嚱鏁版潵澶勭悊瑙嗗彛瀹藉害鍙樺寲
+ handleResize() {
+ //瑙嗗彛瀹藉害
+ let windowWidth = window.innerWidth;
+ //鍑忓幓宸﹁竟鑿滃崟鏍忓搴�92锛岄〉杈硅窛40,鍙宠竟鐨勬搷浣滄寜閽搴iewportWidth*33.33333%
+ let viewportWidth = windowWidth - 92 - 40;
+ //鎼滅储琛ㄥ崟鏈�澶у搴�
+ let formMaxWidth = viewportWidth - viewportWidth * 0.3333333;
+ //鍗曚釜鎼滅储妗嗗搴︿负230
+ this.maxNum = formMaxWidth / 230;
+ },
+ //鎵归噺涓婁紶鎶ュ憡
+ openBatchUploadDia() {
+ this.batchUploadDia = true;
+ },
+ // 鏌ョ湅鎶ュ憡
+ viewIssued(row) {
+ this.currentInfo = row;
+ console.log(`output->row`, row);
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ let fileType = "docx";
+ if (row.tempUrlPdf != null || row.tempUrlPdf === "") {
+ fileName = row.tempUrlPdf;
+ fileType = "pdf";
+ }
+ fileName = fileName.replace("/word/", "");
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ 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,
+ };
+ console.log(this.javaApi + "/word/" + fileName);
+ this.viewIssuedVisible = true;
+ },
+ handleChange(arr) {
+ this.mutiList = arr;
+ },
+ handleDowns() {
+ if (this.mutiList.length == 0) {
+ this.$message.error("璇烽�夋嫨鎶ュ憡");
+ return;
+ }
+ let entity = this.entity;
+ //鏍规嵁鏌ヨ鏉′欢杩囨护宸查�夋嫨鐨勬暟鎹�
+ let str = this.mutiList
+ .filter((f) =>
+ entity.isExamine != null && entity.isExamine !== ""
+ ? f.isExamine === entity.isExamine
+ : true
+ )
+ .filter((f) =>
+ entity.isRatify != null && entity.isRatify !== ""
+ ? f.isRatify === entity.isRatify
+ : true
+ )
+ .filter((f) =>
+ entity.isUpload != null && entity.isUpload !== ""
+ ? f.isUpload === entity.isUpload
+ : true
+ )
+ .filter((f) =>
+ entity.code != null && entity.code !== ""
+ ? f.code.indexOf(entity.code) >= 0
+ : true
+ )
+ .filter((f) =>
+ entity.state != null && entity.state !== ""
+ ? f.state === entity.state
+ : true
+ )
+ .map((m) => m.id)
+ .join(",");
+ if (str === "" || str == null) {
+ this.$message.error("娌℃湁绗﹀悎鏉′欢鐨勬暟鎹�!");
+ return;
+ }
+ this.outLoading = true;
+ downAll({ ids: str }).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 = '鎶ュ憡.zip';
+ // link.click();
+ const link = document.createElement("a");
+ link.href = this.javaApi + res.message;
+ link.target = "_blank";
+ document.body.appendChild(link);
+ link.click();
+ //涓嬭浇瀹屾垚锛岄噸缃〃鏍�
+ this.$nextTick(() => {
+ this.refresh();
+ });
+ });
+ },
+ uploadExceed(file, fileList) {
+ this.$message.error("鍚屾椂涓婁紶鏂囦欢鏁扮洰鏈�澶т负100锛岃閲嶈瘯");
+ },
+ submitUpload() {
+ this.$refs.upload.submit();
+ },
+ beforeUpload(file) {
+ const docxType = [
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ "application/msword",
+ ];
+ if (!docxType.includes(file.type)) {
+ this.$message.error("鍙兘涓婁紶绫诲瀷涓�.doc/.docx鐨勬枃浠�");
+ return false;
+ }
+ const maxSize = 10 * 1024 * 1024; //鍗曚釜鏂囦欢鏈�澶т笂浼犲ぇ灏�10MB
+ if (file.size > maxSize) {
+ this.$message.error("鏂囦欢" + file.name + "澶у皬瓒呰繃10MB");
+ return false;
+ }
+ return true;
+ // const isZip = file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' || file.name.endsWith('.zip');
+ // if (!isZip) {
+ // this.$message.error('涓婁紶鏂囦欢鍙兘鏄� ZIP 鏍煎紡!');
+ // }
+ // if(isZip){
+ // this.inLoading = true;
+ // }
+ // return isZip;
+ },
+ handleSuccess(response) {
+ this.inLoading = false;
+ if (response.code == 200) {
+ this.$message.success("瀵煎叆鎴愬姛");
+ this.refreshTable();
+ this.$refs.upload.clearFiles();
+ this.fileList = [];
+ } else {
+ this.$message.error(response.message);
+ }
+ },
+ onError(err, file, fileList, type) {
+ this.$message.error("涓婁紶澶辫触");
+ this.$refs.upload.clearFiles();
+ this.fileList = [];
+ },
+ refreshTable(e) {
+ if (!this.entity.createTimeRange) {
+ this.entity.createTimeRange = [];
+ }
+ this.getList();
+ this.getReportCountInfo();
+ },
+ getReportCountInfo() {
+ if (!this.entity.createTimeRange) {
+ this.entity.createTimeRange = [];
+ }
+ console.log("entity", this.entity);
+ getReportCountInfo(this.entity)
+ .then((res) => {
+ this.unSubmitCount = res.data.unSubmitCount;
+ this.unRatifyCount = res.data.unRatifyCount;
+ this.unExamineCount = res.data.unExamineCount;
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ refresh() {
+ this.entity = this.HaveJson(this.entityCopy);
+ this.upIndex++;
+ this.mutiList = [];
+ this.getReportCountInfo();
+ },
+ async handleWeave(row) {
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ fileName = fileName.replace("/word/", "");
+ const userName = this.$store.state.user.name;
+ //鍙傝�僾abOnlyOffice缁勪欢鍙傛暟閰嶇疆
+ const { href } = this.$router.resolve({
+ path: `/wordEdit`,
+ query: {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: true,
+ fileType: "docx",
+ title: fileName,
+ lang: "zh-CN",
+ isPrint: true,
+ user_id: 1,
+ user_name: userName,
+ editUrl:
+ this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName,
+ },
+ });
+ window.open(href, "_blank");
+ },
+ confirmClaim() {
+ // console.log(this.$refs.Word.getValue())
+ },
+ async selectAllByOne(row) {
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ //鍙傝�僾abOnlyOffice缁勪欢鍙傛暟閰嶇疆
+ const { href } = this.$router.resolve({
+ path: `/wordEdit`,
+ query: {
+ url: this.javaApi + "/word/" + row.entrustCode + ".docx",
+ isEdit: "false",
+ fileType: "docx",
+ title: row.entrustCode + ".docx",
+ lang: "zh-CN",
+ isPrint: true,
+ user_id: 1,
+ user_name: userName,
+ },
+ });
+ window.open(href, "_blank");
+ console.log(`output->row`, row);
+ },
+ download(row) {
+ getReportInfo({ id: row.id, type: 1,suffix:'.docx' }).then((response) => {
+ if (response.data && response.data.contentType) {
+ downLoad({ id: row.id, type: 1, code: row.code,suffix: '.docx' })
+ .then((res) => {
+ // 鑾峰彇鏂囦欢鍚�
+ const blob = new Blob([res], { type: response.data.contentType });
+ const url = URL.createObjectURL(blob);
+ let link = document.createElement("a");
+ link.href = url;
+ link.download = row.code;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ URL.revokeObjectURL(url);
+ })
+ .catch((error) => {
+ this.$message.error(error);
+ });
+ } else {
+ this.$message.error("鏈壘鍒版枃浠�");
+ }
+ });
+ },
+ // 杩樺師鎿嶄綔
+ handleRestore(row) {
+ this.$confirm("鏄惁杩樺師褰撳墠鎶ュ憡?", "杩樺師", {
+ confirmButtonText: "杩樺師",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ upReportUrl({ id: row.id,type:1 }).then((res) => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.refreshTable("page");
+ }
+ });
+ })
+ .catch({}());
+ },
+ handleIssued(row) {
+ this.currentInfo = row;
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ fileName = fileName.replace("/word/", "");
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ this.option = {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: false,
+ fileType: "docx",
+ title: fileName,
+ lang: "zh-CN",
+ isPrint: false,
+ user_id: 1,
+ user_name: userName,
+ editUrl:
+ this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName,
+ };
+ this.issuedVisible = true;
+ },
+ // 瀹℃牳閫氳繃
+ subIssued() {
+ this.loadingIssued = true;
+ examineReport({ id: this.currentInfo.id, isExamine: 1 })
+ .then((res) => {
+ this.loadingIssued = false;
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.issuedVisible = false;
+ })
+ .catch((e) => {
+ this.$message.error("鎻愪氦澶辫触");
+ this.loadingIssued = false;
+ });
+ },
+ handleApprove(row) {
+ this.currentInfo = row;
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ fileName = fileName.replace("/word/", "");
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ this.option = {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: false,
+ fileType: "docx",
+ title: fileName,
+ lang: "zh-CN",
+ isPrint: false,
+ user_id: 1,
+ user_name: userName,
+ editUrl:
+ this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName,
+ };
+ this.approveVisible = true;
+ },
+ // 鎵瑰噯閫氳繃
+ subApprove() {
+ this.loadingApprove = true;
+ ratifyReport({ id: this.currentInfo.id, isRatify: 1 }).then((res) => {
+ this.loadingApprove = false;
+ if (res.code == 201) {
+ this.$message.error("鎵瑰噯澶辫触");
+ return;
+ }
+ this.$message.success("宸叉壒鍑�");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.approveVisible = false;
+ });
+ },
+ // 鎻愪氦鎿嶄綔
+ handleSubmit(row) {
+ this.$confirm("鏄惁鎻愪氦褰撳墠鎶ュ憡?", "鎻愪氦", {
+ confirmButtonText: "鎻愪氦",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ writeReport({ id: row.id })
+ .then((res) => {
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.refreshTable("page");
+ })
+ .catch((e) => {
+ this.$message.error("鎻愪氦澶辫触");
+ });
+ })
+ .catch(() => {});
+ },
+ // 瀹℃牳涓嶉�氳繃鍘熷洜鎻愪氦
+ handleIssuedReason() {
+ if (!this.reason) {
+ return this.$message.error("璇疯緭鍏ュ師鍥�");
+ }
+ this.loadingIssuedReason = true;
+ examineReport({
+ id: this.currentInfo.id,
+ isExamine: 0,
+ examineTell: this.reason,
+ })
+ .then((res) => {
+ this.loadingIssuedReason = false;
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.reason = "";
+ this.issuedVisible = false;
+ this.issuedReasonVisible = false;
+ })
+ .catch((e) => {
+ this.$message.error("鎿嶄綔澶辫触");
+ this.loadingIssuedReason = false;
+ });
+ },
+ // 涓嶆壒鍑嗗師鍥犳彁浜�
+ handleApproveReason() {
+ if (!this.reason) {
+ return this.$message.error("璇疯緭鍏ュ師鍥�");
+ }
+ this.loadingApproveReason = true;
+ examineReport({
+ id: this.currentInfo.id,
+ isRatify: 0,
+ ratifyTell: this.reason,
+ })
+ .then((res) => {
+ this.loadingApproveReason = false;
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.reason = "";
+ this.issuedVisible = false;
+ this.issuedReasonVisible = false;
+ })
+ .catch((e) => {
+ this.$message.error("鎿嶄綔澶辫触");
+ this.loadingIssuedReason = false;
+ });
+ },
+ handleClose() {
+ this.withdrawDialogVisible = false;
+ this.laboratory = [];
+ },
+ getStyle() {
+ return "height: calc(100% - " + (this.more ? "94" : "44") + "px)";
+ },
+ },
+};
+</script>
diff --git a/src/views/business/reportPreparation/onlyoffice.vue b/src/views/business/reportPreparation/onlyoffice.vue
new file mode 100644
index 0000000..c9a6e33
--- /dev/null
+++ b/src/views/business/reportPreparation/onlyoffice.vue
@@ -0,0 +1,207 @@
+<!--onlyoffice 缂栬緫鍣�-->
+<template>
+ <div id="vabOnlyOffice"></div>
+ </template>
+
+ <script>
+ export default {
+ name: "VabOnlyOffice",
+ props: ['options'],
+ data() {
+ return {
+ doctype: "",
+ docEditor: null,
+ //鍙傝�僾abOnlyOffice缁勪欢鍙傛暟閰嶇疆
+ option: {
+ url: "",
+ isEdit: false,
+ fileType: "",
+ title: "",
+ lang: "zh-CN",
+ isPrint: true,
+ user: {},
+ editUrl: ""
+ }
+ };
+ },
+ created() {
+ if(this.options){
+ const option = this.options
+ this.option.url = option.url
+ this.option.isEdit = option.isEdit === "true" ? true : false
+ this.option.fileType = option.fileType
+ this.option.title = option.title
+ this.option.lang = option.lang
+ this.option.isPrint = option.isPrint
+ this.option.user.id = option.user_id
+ this.option.user.name = option.user_name
+ this.option.editUrl = option.editUrl
+ }else{
+ const option = this.$route.query
+ this.option.url = option.url
+ this.option.isEdit = option.isEdit === "true" ? true : false
+ this.option.fileType = option.fileType
+ this.option.title = option.title
+ this.option.lang = option.lang
+ this.option.isPrint = option.isPrint
+ this.option.user.id = option.user_id
+ this.option.user.name = option.user_name
+ this.option.editUrl = option.editUrl
+ }
+ },
+ beforeDestroy() {
+ if (this.docEditor !== null) {
+ this.docEditor.destroyEditor();
+ this.docEditor = null;
+ }
+ },
+ watch: {
+ option: {
+ handler: function(n) {
+ this.setEditor(n);
+ this.doctype = this.getFileType(n.fileType);
+ },
+ deep: true
+ }
+ },
+ mounted() {
+ if (this.option.url) {
+ this.setEditor(this.option);
+ }
+ },
+ methods: {
+ async setEditor(option) {
+ if (this.docEditor !== null) {
+ this.docEditor.destroyEditor();
+ this.docEditor = null;
+ }
+ this.doctype = this.getFileType(option.fileType);
+ let config = {
+ document: {
+ //鍚庣紑
+ fileType: option.fileType,
+ key: option.key || "",
+ title: option.title,
+ permissions: {
+ edit: option.isEdit, //鏄惁鍙互缂栬緫: 鍙兘鏌ョ湅锛屼紶false
+ print: option.isPrint,
+ download: false
+ // "fillForms": true,//鏄惁鍙互濉啓琛ㄦ牸锛屽鏋滃皢mode鍙傛暟璁剧疆涓篹dit锛屽垯濉啓琛ㄥ崟浠呭鏂囨。缂栬緫鍣ㄥ彲鐢ㄣ�� 榛樿鍊间笌edit鎴杛eview鍙傛暟鐨勫�间竴鑷淬��
+ // "review": true //璺熻釜鍙樺寲
+ },
+ url: option.url
+ },
+ documentType: this.doctype,
+ editorConfig: {
+ callbackUrl: option.editUrl, //"缂栬緫word鍚庝繚瀛樻椂鍥炶皟鐨勫湴鍧�锛岃繖涓猘pi闇�瑕佽嚜宸卞啓浜嗭紝灏嗙紪杈戝悗鐨勬枃浠堕�氳繃杩欎釜api淇濆瓨鍒拌嚜宸辨兂瑕佺殑浣嶇疆
+ lang: option.lang, //璇█璁剧疆
+ //瀹氬埗
+ customization: {
+ autosave: true, //鏄惁鑷姩淇濆瓨
+ chat: true,
+ comments: false,
+ help: false,
+ "hideRightMenu": false,//瀹氫箟鍦ㄧ涓�娆″姞杞芥椂鏄樉绀鸿繕鏄殣钘忓彸渚ц彍鍗曘�� 榛樿鍊间负false
+ //鏄惁鏄剧ず鎻掍欢
+ plugins: false
+ },
+ user: {
+ id: option.user.id,
+ name: option.user.name
+ },
+ mode: option.model ? option.model : "edit"
+ },
+ width: "100%",
+ height: "100%",
+ token: option.token || ""
+ };
+
+ // eslint-disable-next-line no-undef,no-unused-vars
+ this.docEditor = new DocsAPI.DocEditor("vabOnlyOffice", config);
+ },
+ getFileType(fileType) {
+ let docType = "";
+ let fileTypesDoc = [
+ "doc",
+ "docm",
+ "docx",
+ "dot",
+ "dotm",
+ "dotx",
+ "epub",
+ "fodt",
+ "htm",
+ "html",
+ "mht",
+ "odt",
+ "ott",
+ "pdf",
+ "rtf",
+ "txt",
+ "djvu",
+ "xps"
+ ];
+ let fileTypesCsv = [
+ "csv",
+ "fods",
+ "ods",
+ "ots",
+ "xls",
+ "xlsm",
+ "xlsx",
+ "xlt",
+ "xltm",
+ "xltx"
+ ];
+ let fileTypesPPt = [
+ "fodp",
+ "odp",
+ "otp",
+ "pot",
+ "potm",
+ "potx",
+ "pps",
+ "ppsm",
+ "ppsx",
+ "ppt",
+ "pptm",
+ "pptx"
+ ];
+ if (fileTypesDoc.includes(fileType)) {
+ docType = "text";
+ }
+ if (fileTypesCsv.includes(fileType)) {
+ docType = "spreadsheet";
+ }
+ if (fileTypesPPt.includes(fileType)) {
+ docType = "presentation";
+ }
+ return docType;
+ }
+ }
+ };
+ </script>
+
+ <style>
+ html,
+ body {
+ height: 100%;
+ }
+ #app {
+ font-family: Avenir, Helvetica, Arial, sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ text-align: center;
+ color: #2c3e50;
+ height: 100%;
+ }
+ .qualityManual-container {
+ padding: 0 !important;
+ height: 100%;
+ }
+ .qualityManual-container-office {
+ width: 100%;
+ height: calc(100% - 55px);
+ }
+ </style>
+
\ No newline at end of file
--
Gitblit v1.9.3