From 1ea00927eadc5fca0adb6657aa17c47c86abdaa5 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 04 三月 2025 13:54:54 +0800
Subject: [PATCH] 记录的控制搬迁
---
src/api/cnas/systemManagement/documentControl.js | 276 +++
src/utils/downHtmlToPDF.js | 22
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue | 522 ++++++
src/api/cnas/systemManagement/documentRecords.js | 364 ++++
src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue | 513 ++++++
src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue | 867 ++++++++++
package.json | 2
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue | 478 ++++++
src/views/CNAS/systemManagement/customerManagement/customerSatisfaction.vue | 402 +++++
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue | 743 +++++++++
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue | 540 ++++++
11 files changed, 4,729 insertions(+), 0 deletions(-)
diff --git a/package.json b/package.json
index 0d89465..4de8ad7 100644
--- a/package.json
+++ b/package.json
@@ -48,9 +48,11 @@
"file-saver": "2.0.5",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
+ "html2canvas": "^1.4.1",
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",
+ "jspdf": "^3.0.0",
"mammoth": "^1.9.0",
"moment": "^2.30.1",
"nprogress": "0.2.0",
diff --git a/src/api/cnas/systemManagement/documentControl.js b/src/api/cnas/systemManagement/documentControl.js
new file mode 100644
index 0000000..9a322b4
--- /dev/null
+++ b/src/api/cnas/systemManagement/documentControl.js
@@ -0,0 +1,276 @@
+// 浣撶郴鏂囦欢鎺у埗鐩稿叧鎺ュ彛
+import request from "@/utils/request";
+
+// 鏂囦欢娓呭崟-闄勪欢涓婁紶
+export function uploadFileManageDocumentList(data) {
+ return request({
+ url: "/manageDocumentList/uploadFileManageDocumentList",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+//鏂囦欢娓呭崟-鍒楄〃
+export function pageManageDocumentList(query) {
+ return request({
+ url: "/manageDocumentList/pageManageDocumentList",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢娓呭崟-鍒犻櫎
+export function delManageDocumentList(query) {
+ return request({
+ url: "/manageDocumentList/delManageDocumentList",
+ method: "delete",
+ params: query,
+ });
+}
+
+// 鏂囦欢娓呭崟-缂栬緫
+export function doManageDocumentList(data) {
+ return request({
+ url: "/manageDocumentList/doManageDocumentList",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙楁帶-鏂板
+export function addManageDocumentControlled(data) {
+ return request({
+ url: "/manageDocumentControlled/addManageDocumentControlled",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙楁帶-淇敼
+export function doManageDocumentControlled(data) {
+ return request({
+ url: "/manageDocumentControlled/doManageDocumentControlled",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+//鏂囦欢鍙楁帶-鑾峰彇pdf鏂囦欢娴�
+export function checkManageDocumentControlledPdf(query) {
+ return request({
+ url: "/manageDocumentControlled/checkManageDocumentControlledPdf",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙楁帶-瀹℃牳
+export function checkManageDocumentControlled(data) {
+ return request({
+ url: "/manageDocumentControlled/checkManageDocumentControlled",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+//鏂囦欢鍙楁帶-鍒犻櫎
+export function delManageDocumentControlled(query) {
+ return request({
+ url: "/manageDocumentControlled/delManageDocumentControlled",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢鍙楁帶-鍒楄〃
+export function pageManageDocumentControlled(query) {
+ return request({
+ url: "/manageDocumentControlled/pageManageDocumentControlled",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢浣滃簾-鍒楄〃
+export function pageManageDocumentCancel(query) {
+ return request({
+ url: "/manageDocumentCancel/pageManageDocumentCancel",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹-瀵煎嚭
+export function exportManageDocumentIssueRecycle(query) {
+ return request({
+ url: "/manageDocumentIssueRecycle/exportManageDocumentIssueRecycle",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹-鏂板
+export function addManageDocumentIssueRecycle(data) {
+ return request({
+ url: "/manageDocumentIssueRecycle/addManageDocumentIssueRecycle",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹-缂栬緫
+export function doManageDocumentIssueRecycle(data) {
+ return request({
+ url: "/manageDocumentIssueRecycle/doManageDocumentIssueRecycle",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹-瀹℃牳
+export function checkManageDocumentIssueRecycle(data) {
+ return request({
+ url: "/manageDocumentIssueRecycle/checkManageDocumentIssueRecycle",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹-鍒楄〃
+export function pageManageDocumentIssueRecycle(query) {
+ return request({
+ url: "/manageDocumentIssueRecycle/pageManageDocumentIssueRecycle",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢鍙戞斁鍥炴敹-鍒楄〃
+export function delManageDocumentIssueRecycle(query) {
+ return request({
+ url: "/manageDocumentIssueRecycle/delManageDocumentIssueRecycle",
+ method: "delete",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙樻洿-瀵煎嚭
+export function exportManageDocumentAlter(query) {
+ return request({
+ url: "/manageDocumentAlter/exportManageDocumentAlter",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙樻洿-鏂板
+export function addManageDocumentAlter(data) {
+ return request({
+ url: "/manageDocumentAlter/addManageDocumentAlter",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙樻洿-缂栬緫
+export function doManageDocumentAlter(data) {
+ return request({
+ url: "/manageDocumentAlter/doManageDocumentAlter",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙樻洿-杞崲娴�
+export function checkManageDocumentAlterPdf(query) {
+ return request({
+ url: "/manageDocumentAlter/checkManageDocumentAlterPdf",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙樻洿-瀹℃牳
+export function checkManageDocumentAlter(data) {
+ return request({
+ url: "/manageDocumentAlter/checkManageDocumentAlter",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+//鏂囦欢鍙樻洿-鍒犻櫎
+export function delManageDocumentAlter(query) {
+ return request({
+ url: "/manageDocumentAlter/delManageDocumentAlter",
+ method: "delete",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙樻洿-鍒楄〃
+export function pageManageDocumentAlter(query) {
+ return request({
+ url: "/manageDocumentAlter/pageManageDocumentAlter",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢浣滃簾-鏂板
+export function addManageDocumentCancel(data) {
+ return request({
+ url: "/manageDocumentCancel/addManageDocumentCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢浣滃簾-缂栬緫
+export function doManageDocumentCancel(data) {
+ return request({
+ url: "/manageDocumentCancel/doManageDocumentCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢浣滃簾-瀹℃牳
+export function checkManageDocumentCancel(data) {
+ return request({
+ url: "/manageDocumentCancel/checkManageDocumentCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢浣滃簾-瀵煎嚭
+export function exportManageDocumentCancel(query) {
+ return request({
+ url: "/manageDocumentCancel/exportManageDocumentCancel",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+
+//鏂囦欢浣滃簾-鍒犻櫎
+export function delManageDocumentCancel(query) {
+ return request({
+ url: "/manageDocumentCancel/delManageDocumentCancel",
+ method: "delete",
+ params: query,
+ });
+}
diff --git a/src/api/cnas/systemManagement/documentRecords.js b/src/api/cnas/systemManagement/documentRecords.js
new file mode 100644
index 0000000..1b084f2
--- /dev/null
+++ b/src/api/cnas/systemManagement/documentRecords.js
@@ -0,0 +1,364 @@
+// 浣撶郴鏂囦欢璁板綍鐩稿叧鎺ュ彛
+import request from "@/utils/request";
+
+// 鏂囦欢瀹℃壒璁板綍-鏂板
+export function addManageRecordCheck(data) {
+ return request({
+ url: "/manageRecordCheck/addManageRecordCheck",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹℃壒璁板綍-淇敼
+export function doManageRecordCheck(data) {
+ return request({
+ url: "/manageRecordCheck/doManageRecordCheck",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢瀹℃壒璁板綍-瀵煎嚭
+export function exportOutManageRecordCheck(query) {
+ return request({
+ url: "/manageRecordCheck/exportOutManageRecordCheck",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢瀹℃壒璁板綍-瀹℃牳
+export function checkManageRecordCheck(data) {
+ return request({
+ url: "/manageRecordCheck/checkManageRecordCheck",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹℃壒璁板綍-鎵瑰噯
+export function ratifyManageRecordCheck(data) {
+ return request({
+ url: "/manageRecordCheck/ratifyManageRecordCheck",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢瀹℃壒璁板綍-鍒犻櫎
+export function delManageRecordCheck(query) {
+ return request({
+ url: "/manageRecordCheck/delManageRecordCheck",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢瀹℃壒璁板綍-鍒楄〃
+export function pageManageRecordCheck(query) {
+ return request({
+ url: "/manageRecordCheck/pageManageRecordCheck",
+ method: "get",
+ params: query,
+ });
+}
+
+// 澶栨潵鏂囦欢纭璁板綍-鏂板
+export function addManageRecordVerify(data) {
+ return request({
+ url: "/manageRecordVerify/addManageRecordVerify",
+ method: "post",
+ data: data,
+ });
+}
+
+//澶栨潵鏂囦欢纭璁板綍-濉啓--鍒楄〃
+export function pageManageRecordVerify(query) {
+ return request({
+ url: "/manageRecordVerify/pageManageRecordVerify",
+ method: "get",
+ params: query,
+ });
+}
+
+// 澶栨潵鏂囦欢纭璁板綍-鍘嗗彶--鎻愪氦
+export function submitManageRecordTotal(data) {
+ return request({
+ url: "/manageRecordTotal/submitManageRecordTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+// 澶栨潵鏂囦欢纭璁板綍-鍘嗗彶--瀹℃牳
+export function ratifyManageRecordTotal(data) {
+ return request({
+ url: "/manageRecordTotal/ratifyManageRecordTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+//澶栨潵鏂囦欢纭璁板綍-濉啓--鍒犻櫎
+export function delManageRecordVerify(query) {
+ return request({
+ url: "/manageRecordVerify/delManageRecordVerify",
+ method: "delete",
+ params: query,
+ });
+}
+
+//澶栨潵鏂囦欢纭璁板綍-鍘嗗彶--鍒楄〃
+export function pageManageRecordTotal(query) {
+ return request({
+ url: "/manageRecordTotal/pageManageRecordTotal",
+ method: "get",
+ params: query,
+ });
+}
+
+// 澶栨潵鏂囦欢纭璁板綍-濉啓--淇敼
+export function doManageRecordVerify(data) {
+ return request({
+ url: "/manageRecordVerify/doManageRecordVerify",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢鍙戞斁鍥炴敹璁板綍-瀵煎嚭
+export function exportOutManageRecordIssueRecycle(query) {
+ return request({
+ url: "/manageRecordIssueRecycle/exportOutManageRecordIssueRecycle",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹璁板綍-鏂板
+export function addManageRecordIssueRecycle(data) {
+ return request({
+ url: "/manageRecordIssueRecycle/addManageRecordIssueRecycle",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹璁板綍-缂栬緫
+export function doManageRecordIssueRecycle(data) {
+ return request({
+ url: "/manageRecordIssueRecycle/doManageRecordIssueRecycle",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏌ヨCNAS浜哄憳渚ц竟鏍�
+export function selectCNSAPersonTree(query) {
+ return request({
+ url: "/personBasicInfo/selectCNSAPersonTree",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢鍙戞斁鍥炴敹璁板綍-鍒楄〃
+export function pageManageRecordIssueRecycle(query) {
+ return request({
+ url: "/manageRecordIssueRecycle/pageManageRecordIssueRecycle",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢鍙戞斁鍥炴敹璁板綍-鍒犻櫎
+export function delManageRecordIssueRecycle(query) {
+ return request({
+ url: "/manageRecordIssueRecycle/delManageRecordIssueRecycle",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢淇-瀵煎嚭鍒楄〃
+export function exportOutManageRecordAudit(query) {
+ return request({
+ url: "/manageRecordAudit/exportOutManageRecordAudit",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢淇-鏂板
+export function addManageRecordAudit(data) {
+ return request({
+ url: "/manageRecordAudit/addManageRecordAudit",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢淇-缂栬緫
+export function doManageRecordAudit(data) {
+ return request({
+ url: "/manageRecordAudit/doManageRecordAudit",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢淇-鎵瑰噯
+export function ratifyManageRecordAudit(data) {
+ return request({
+ url: "/manageRecordAudit/ratifyManageRecordAudit",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢淇-鍒楄〃
+export function pageManageRecordAudit(query) {
+ return request({
+ url: "/manageRecordAudit/pageManageRecordAudit",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢淇-鍒犻櫎
+export function delManageRecordAudit(query) {
+ return request({
+ url: "/manageRecordAudit/delManageRecordAudit",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-瀵煎嚭
+export function exportOutManageRecordIntervals(query) {
+ return request({
+ url: "/manageRecordIntervals/exportOutManageRecordIntervals",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-鏂板
+export function addManageRecordIntervals(data) {
+ return request({
+ url: "/manageRecordIntervals/addManageRecordIntervals",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-缂栬緫
+export function doManageRecordIntervals(data) {
+ return request({
+ url: "/manageRecordIntervals/doManageRecordIntervals",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-鍘嗗彶璁板綍-鎵瑰噯
+export function ratifyManageRecordIntervalsTotal(data) {
+ return request({
+ url: "/manageRecordIntervalsTotal/ratifyManageRecordIntervalsTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-鍘嗗彶璁板綍-鎻愪氦
+export function submitManageRecordIntervalsTotal(data) {
+ return request({
+ url: "/manageRecordIntervalsTotal/submitManageRecordIntervalsTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-鍒楄〃
+export function pageManageRecordIntervals(query) {
+ return request({
+ url: "/manageRecordIntervals/pageManageRecordIntervals",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-鍘嗗彶璁板綍-鍒楄〃
+export function pageManageRecordIntervalsTotal(query) {
+ return request({
+ url: "/manageRecordIntervalsTotal/pageManageRecordIntervalsTotal",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-鍒犻櫎
+export function delManageRecordIntervals(query) {
+ return request({
+ url: "/manageRecordIntervals/delManageRecordIntervals",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢浣滃簾璁板綍-瀵煎嚭
+export function exportOutManageRecordCancel(query) {
+ return request({
+ url: "/manageRecordCancel/exportOutManageRecordCancel",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢浣滃簾璁板綍-鏂板
+export function addManageRecordCancel(data) {
+ return request({
+ url: "/manageRecordCancel/addManageRecordCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢浣滃簾璁板綍-缂栬緫
+export function doManageRecordCancel(data) {
+ return request({
+ url: "/manageRecordCancel/doManageRecordCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢浣滃簾璁板綍-鎵瑰噯
+export function ratifyManageRecordCancel(data) {
+ return request({
+ url: "/manageRecordCancel/ratifyManageRecordCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢浣滃簾璁板綍-鍒犻櫎
+export function delManageRecordCancel(query) {
+ return request({
+ url: "/manageRecordCancel/delManageRecordCancel",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢浣滃簾璁板綍-鍒楄〃
+export function pageManageRecordCancel(query) {
+ return request({
+ url: "/manageRecordCancel/pageManageRecordCancel",
+ method: "get",
+ params: query,
+ });
+}
diff --git a/src/utils/downHtmlToPDF.js b/src/utils/downHtmlToPDF.js
new file mode 100644
index 0000000..3e83e09
--- /dev/null
+++ b/src/utils/downHtmlToPDF.js
@@ -0,0 +1,22 @@
+import html2canvas from "html2canvas";
+import jsPDF from "jspdf";
+
+export async function exportHtmlToPDF(element, name = "exported") {
+ try {
+ // 灏� HTML 鍏冪礌杞崲涓� canvas
+ console.log("姝e湪灏� HTML 杞崲涓� canvas...", element);
+ const canvas = await html2canvas(element, { useCORS: true });
+ const imgData = canvas.toDataURL("image/png");
+
+ // 鍒涘缓 PDF
+ const pdf = new jsPDF("p", "mm", "a4");
+ const pdfWidth = pdf.internal.pageSize.getWidth();
+ const pdfHeight = (canvas.height * pdfWidth) / canvas.width;
+
+ pdf.addImage(imgData, "PNG", 10, 10, pdfWidth - 20, pdfHeight - 20);
+ pdf.save(name + ".pdf");
+ console.log("PDF 瀵煎嚭鎴愬姛锛�");
+ } catch (error) {
+ console.error("瀵煎嚭 PDF 澶辫触锛�", error);
+ }
+}
diff --git a/src/views/CNAS/systemManagement/customerManagement/customerSatisfaction.vue b/src/views/CNAS/systemManagement/customerManagement/customerSatisfaction.vue
index e69de29..4a1900c 100644
--- a/src/views/CNAS/systemManagement/customerManagement/customerSatisfaction.vue
+++ b/src/views/CNAS/systemManagement/customerManagement/customerSatisfaction.vue
@@ -0,0 +1,402 @@
+<template>
+ <div>
+ <div>
+ <div class="search-background">
+ <span v-if="tabIndex === '0'" class="search-group">
+ <span style="width: 150px">鍗曚綅鍚嶇О锛�</span>
+ <el-input v-model="searchForm.unitName" clearable size="small"></el-input>
+ </span>
+ <span v-if="tabIndex === '1'" class="search-group">
+ <span style="width: 150px">鏂囦欢鍚嶇О锛�</span>
+ <el-input v-model="searchForm1.fileName" clearable size="small"></el-input>
+ </span>
+ <span class="search-group">
+ <el-button size="small" @click="resetSearchForm">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="searchList">鏌� 璇�</el-button>
+ </span>
+ <div class="btn">
+ <el-button v-if="tabIndex === '0'" size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
+ <el-upload v-if="tabIndex === '1'" ref='upload' :action="action" :before-upload="beforeUpload"
+ :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
+ accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
+ <el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button>
+ </el-upload>
+ </div>
+ </div>
+ <div class="table">
+ <div class="table-tab">
+ <el-radio-group v-model="tabIndex" @change="searchList" size="small">
+ <el-radio-button label="0">瀹㈡埛婊℃剰搴�</el-radio-button>
+ <el-radio-button label="1">缁煎悎鍒嗘瀽</el-radio-button>
+ </el-radio-group>
+ </div>
+ <div v-if="tabIndex === '0'">
+ <TableCard :showForm="false" :showTitle="false">
+ <template v-slot:table>
+ <limsTable :column="tableColumn" :height="'calc(100vh - 22em)'" :table-data="tableData"
+ :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination"
+ :page="page">
+ </limsTable>
+ </template>
+ </TableCard>
+ </div>
+ <div v-if="tabIndex === '1'">
+ <TableCard :showForm="false" :showTitle="false">
+ <template v-slot:table>
+ <limsTable :column="tableColumn1" :height="'calc(100vh - 22em)'" :table-data="tableData1"
+ :table-loading="tableLoading1" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination0">
+ </limsTable>
+ </template>
+ </TableCard>
+ </div>
+ </div>
+ </div>
+ <el-dialog :visible.sync="lookDialogVisible" fullscreen title="鏌ョ湅闄勪欢" top="5vh" width="800px">
+ <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.fileUrl"
+ style="height: 90vh;overflow-y: auto;" />
+ </el-dialog>
+ <FormDialog v-if="formDialog" ref="formDialog" @closeFormDia="closeFormDia"></FormDialog>
+ </div>
+</template>
+
+<script>
+import TableCard from '@/components/TableCard/index.vue';
+import limsTable from "@/components/Table/lims-table.vue";
+import FormDialog from './components/formDialog.vue';
+import filePreview from '@/components/Preview/filePreview.vue'
+import {
+ pageClientSatisfaction,
+ pageAnalyseFile,
+ delClientSatisfaction,
+ delAnalyseFile,
+} from '@/api/cnas/systemManagement/customerSatisfaction.js'
+
+export default {
+ name: 'a8-customer-satisfaction',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { filePreview, FormDialog, limsTable, TableCard },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ searchForm: {
+ unitName: '',
+ },
+ searchForm1: {
+ fileName: '',
+ },
+ tabIndex: '0',
+ tableColumn: [
+ {
+ label: '鍗曚綅鍚嶇О',
+ prop: 'unitName',
+ minWidth: '100'
+ },
+ {
+ label: '鏃ユ湡',
+ prop: 'fillDate',
+ minWidth: '100'
+ },
+ {
+ label: '濮撳悕',
+ prop: 'userName',
+ minWidth: '100'
+ },
+ {
+ label: '閮ㄩ棬',
+ prop: 'department',
+ minWidth: '100'
+ },
+ {
+ label: '鑱旂郴鐢佃瘽',
+ prop: 'contactNumber',
+ minWidth: '100'
+ },
+ {
+ label: '鍒涘缓鏃ユ湡',
+ prop: 'createTime',
+ minWidth: '100',
+ },
+ {
+ dataType: 'action',
+ minWidth: '80',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '缂栬緫',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('edit', row);
+ },
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ color: '#f56c6c',
+ clickFun: (row) => {
+ this.delPlan(row)
+ }
+ }
+ ]
+ }
+ ],
+ tableData: [],
+ tableLoading: false,
+ page: {
+ size: 20,
+ current: 1,
+ total: 0,
+ },
+ tableColumn1: [
+ {
+ label: '闄勪欢鍚嶇О',
+ prop: 'fileName',
+ minWidth: '100'
+ },
+ {
+ label: '鍒涘缓浜�',
+ prop: 'userName',
+ minWidth: '100'
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
+ minWidth: '100'
+ },
+ {
+ dataType: 'action',
+ minWidth: '50',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '棰勮',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleLook(row)
+ }
+ },
+ {
+ name: '涓嬭浇',
+ type: 'text',
+ clickFun: (row) => {
+ this.upload(row);
+ },
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ color: '#f56c6c',
+ clickFun: (row) => {
+ this.delFile(row)
+ }
+ }
+ ]
+ }
+ ],
+ tableData1: [],
+ tableLoading1: false,
+ page1: {
+ size: 20,
+ current: 1,
+ total: 0,
+ },
+ formDialog: false,
+ upLoading: false,
+ currentInfo: {},
+ lookDialogVisible: false,
+ };
+ },
+ mounted() {
+ this.searchList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鏌ヨ鍒楄〃
+ searchList() {
+ const entity = this.tabIndex === '0' ? this.searchForm : this.searchForm1
+ const page = this.tabIndex === '0' ? this.page : this.page1
+ if (this.tabIndex === '0') {
+ this.tableLoading = true
+ pageClientSatisfaction({ ...entity, ...page }).then(res => {
+ this.tableLoading = false
+ if (res.code === 201) return
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }).catch(err => {
+ console.log('err---', err);
+ this.tableLoading = false
+ })
+ } else {
+ this.tableLoading1 = true
+ pageAnalyseFile({ ...entity, ...page }).then(res => {
+ this.tableLoading1 = false
+ if (res.code === 201) return
+ this.tableData1 = res.data.records
+ this.page1.total = res.data.total
+ }).catch(err => {
+ console.log('err---', err);
+ this.tableLoading1 = false
+ })
+ }
+ },
+ openFormDia(type, row) {
+ this.formDialog = true
+ this.$nextTick(() => {
+ this.$refs.formDialog.openDia(type, row);
+ })
+ },
+ closeFormDia() {
+ this.formDialog = false
+ this.searchList()
+ },
+ // 閲嶇疆鏌ヨ鏉′欢
+ resetSearchForm() {
+ this.searchForm.unitName = '';
+ this.searchForm1.fileName = '';
+ this.searchList()
+ },
+ // 瀵煎叆娴佺▼
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ this.upLoading = true;
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ handleSuccessUp(response) {
+ this.upLoading = false;
+ if (response.code == 200) {
+ this.$message.success('涓婁紶鎴愬姛');
+ this.searchList()
+ }
+ },
+ // 鍒犻櫎瀹㈡埛婊℃剰搴�
+ delPlan(row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.tableLoading = true
+ delClientSatisfaction({ clientSatisfactionId: row.clientSatisfactionId }).then(res => {
+ this.tableLoading = false
+ if (res.code === 201) return
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.searchList()
+ }).catch(err => {
+ this.tableLoading = false
+ console.log('err---', err);
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ // 鏌ョ湅鏂囦欢
+ handleLook(row) {
+ this.currentInfo = row
+ this.lookDialogVisible = true
+ },
+ // 涓嬭浇瀹㈡埛绂忓缓
+ upload(row) {
+ let url = '';
+ if (row.type == 1) {
+ url = this.javaApi + '/img/' + row.fileUrl
+ this.$download.saveAs(url, row.fileName);
+ } else {
+ url = this.javaApi + '/word/' + row.fileUrl
+ this.$download.saveAs(url, row.fileName);
+ }
+ },
+ // 鍒犻櫎瀹㈡埛鍒嗘瀽闄勪欢
+ delFile(row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.tableLoading = true
+ delAnalyseFile({ analyseFileId: row.analyseFileId }).then(res => {
+ this.tableLoading = false
+ if (res.code === 201) return
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.searchList()
+ }).catch(err => {
+ this.tableLoading = false
+ console.log('err---', err);
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ // 鍒嗛〉
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.searchList();
+ },
+ // 鍒嗛〉
+ pagination0({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.searchList();
+ },
+ },
+ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+ computed: {
+ action() {
+ return this.javaApi + '/clientSatisfaction/uploadAnalyseFile'
+ }
+ },
+};
+</script>
+
+<style scoped>
+.view-title {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 60px;
+ padding-left: 20px;
+}
+
+.search-background {
+ width: 100%;
+ height: 80px;
+ line-height: 80px;
+ background-color: #ffffff;
+ display: flex;
+ position: relative;
+}
+
+.search-group {
+ display: flex;
+ align-items: center;
+ margin: 0 20px;
+}
+
+.table {
+ background-color: #ffffff;
+}
+
+.table-tab {
+ margin: 0 20px 20px 20px;
+}
+
+.btn {
+ position: absolute;
+ top: 16px;
+ right: 20px;
+}
+</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
new file mode 100644
index 0000000..b695edd
--- /dev/null
+++ b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
@@ -0,0 +1,513 @@
+<template>
+ <!-- 鏂囦欢瀹℃壒璁板綍 -->
+ <div class="DocumentApprovalRecords">
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentName"
+ @keyup.enter.native="refreshTable()"></el-input></div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ <div class="btn">
+ <el-button size="small" type="primary" @click="openAdd('鏂板')">鏂板</el-button>
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
+ :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
+ :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
+ style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
+ </div>
+ <!-- 鏂板/缂栬緫 -->
+ <el-dialog :title="title" :visible.sync="addDia" width="500px">
+ <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px">
+ <el-form-item label="鏂囦欢鍚嶇О" prop="documentName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentName"></el-input>
+ </el-form-item>
+ <el-form-item label="鏂囦欢缂栧彿" prop="documentCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentCode">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鐗�/娆�" prop="documentVersion">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentVersion">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="缂栧埗" prop="writeUser">
+ <el-select v-model="addForm.writeUser" size="small" clearable placeholder="璇烽�夋嫨" style="width: 100%">
+ <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="瀹℃牳" prop="checkUser">
+ <el-select v-model="addForm.checkUser" size="small" clearable placeholder="璇烽�夋嫨" style="width: 100%">
+ <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎵瑰噯" prop="ratifyUser">
+ <el-select v-model="addForm.ratifyUser" size="small" clearable placeholder="璇烽�夋嫨" style="width: 100%">
+ <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎵瑰噯鏃ユ湡" prop="ratifyDate">
+ <el-date-picker v-model="addForm.ratifyDate" style="width: 100%" value-format="yyyy-MM-dd" ormat="yyyy-MM-dd"
+ type="date" size="small"></el-date-picker>
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input size="small" placeholder="璇疯緭鍏�" type="textarea" :rows="2" clearable v-model="addForm.remarks">
+ </el-input>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDia = false">鍙� 娑�</el-button>
+ <el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">纭� 璁�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+ selectUserCondition,
+} from "@/api/system/user.js";
+import {
+ addManageRecordCheck,
+ doManageRecordCheck,
+ exportOutManageRecordCheck,
+ checkManageRecordCheck,
+ ratifyManageRecordCheck,
+ delManageRecordCheck,
+ pageManageRecordCheck
+} from '@/api/cnas/systemManagement/documentRecords.js'
+export default {
+ components: {
+ limsTable
+ },
+ data() {
+ return {
+ addPower: true,
+ outPower: true,
+ upPower: true,
+ outLoading: false,
+ personList: [],
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢鍚嶇О", prop: "documentName" },
+ { label: "鏂囦欢缂栧彿", prop: "documentCode", width: "120px" },
+ {
+ label: "鐗�/娆�",
+ prop: "documentVersion",
+ },
+ { label: "缂栧埗", prop: "writeUser" },
+ { label: "瀹℃牳", prop: "checkUser" },
+ { label: "鎵瑰噯", prop: "ratifyUser" },
+ { label: "鎵瑰噯鏃ユ湡", prop: "ratifyDate" },
+ { label: "澶囨敞", prop: "remark" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.openAdd("缂栬緫", row);
+ },
+ disabled: (row) => {
+ return row.checkState == '閫氳繃' || row.ratifyState == '閫氳繃'
+ },
+ },
+ {
+ name: "瀹℃牳",
+ type: "text",
+ clickFun: (row) => {
+ this.handleCheck(row);
+ },
+ disabled: (row) => {
+ return row.checkState == '閫氳繃' || row.ratifyState == '閫氳繃'
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleApproval(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃'
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return row.checkState == '閫氳繃' || row.ratifyState == '閫氳繃'
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ title: "鏂板",
+ addDia: false,
+ addForm: {},
+ addRules: {
+ documentName: [{ required: true, message: "璇疯緭鍏ユ枃浠跺悕绉�", trigger: "blur" }],
+ },
+ uploading: false,
+ }
+ },
+ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+ computed: {
+ action() {
+ return this.javaApi + '/manageRecordCheck/exportInManageRecordCheck'
+ }
+ },
+ mounted() {
+ this.getAuthorizedPerson()
+ },
+ methods: {
+ getPower() {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let add = false
+ let del = false
+ let up = false;
+ let out = false;
+ let check = false
+ let ratify = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'addManageRecordCheck') {
+ add = true
+ }
+ if (power[i].menuMethod == 'delManageRecordCheck') {
+ del = true
+ }
+ if (power[i].menuMethod == 'exportInManageRecordCheck') {
+ up = true
+ }
+ if (power[i].menuMethod == 'checkManageRecordCheck') {
+ check = true
+ }
+ if (power[i].menuMethod == 'ratifyManageRecordCheck') {
+ ratify = true
+ }
+ if (power[i].menuMethod == 'exportOutManageRecordCheck') {
+ out = true
+ }
+ }
+ if (!ratify) {
+ this.componentData.do.splice(3, 1)
+ }
+ if (!check) {
+ this.componentData.do.splice(2, 1)
+ }
+ if (!add) {
+ this.componentData.do.splice(1, 1)
+ }
+ if (!del) {
+ this.componentData.do.splice(0, 1)
+ }
+ this.addPower = add
+ this.outPower = out
+ this.upPower = up
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordCheck({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ refresh() {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
+ },
+ // 鏂板/缂栬緫
+ openAdd(title, row) {
+ this.title = title
+ if (row) {
+ this.addForm = row
+ } else {
+ this.addForm = {}
+ }
+ this.addDia = true;
+ },
+ // 瀵煎嚭
+ handleDown() {
+ this.outLoading = true
+ // queryParams
+ exportOutManageRecordCheck(this.queryParams).then(res => {
+ this.outLoading = false
+ if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
+ let url = this.javaApi + '/word/' + res.message
+ this.$download.saveAs(url, '鏂囦欢瀹℃壒璁板綍')
+ })
+ },
+ getAuthorizedPerson() {
+ selectUserCondition().then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.personList = data
+ this.refreshTable()()
+ })
+ },
+ // 瀹℃牳
+ handleCheck(row) {
+ this.$confirm('鏄惁瀹℃牳閫氳繃?', '鎻愮ず', {
+ confirmButtonText: '閫氳繃',
+ cancelButtonText: '涓嶉�氳繃',
+ type: 'warning',
+ closeOnClickModal: false, // 绂佹鐐瑰嚮閬僵灞傚叧闂�
+ distinguishCancelAndClose: true,
+ beforeClose: (action, instance, done) => {
+ if (action === 'confirm') {
+ // 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴
+ checkManageRecordCheck({ id: row.id, checkState: '閫氳繃' }).then(res => {
+ if (res.code === 201) return
+ this.refreshTable()
+ done();
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛'
+ })
+ })
+ .catch(err => {
+
+ })
+ } else if (action === 'cancel') {
+ // 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂�
+ checkManageRecordCheck({ id: row.id, checkState: '涓嶉�氳繃' }).then(res => {
+ if (res.code === 201) return
+ this.refreshTable()
+ done();
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛'
+ })
+ })
+ .catch(err => {
+
+ })
+ console.log("鍙栨秷鎸夐挳鐐瑰嚮浜嬩欢锛屼笉鍏抽棴寮规");
+ } else if (action === 'close') {
+ // 鐐瑰嚮鈥溍椻�濇寜閽紝涓嶅厑璁稿叧闂�
+ done();
+ console.log("脳鎸夐挳鐐瑰嚮浜嬩欢锛屼笉鍏抽棴寮规");
+ }
+ }
+ })
+ },
+ // 鎵瑰噯
+ handleApproval(row) {
+ this.$confirm('鏄惁鎵瑰噯閫氳繃?', '鎻愮ず', {
+ confirmButtonText: '閫氳繃',
+ cancelButtonText: '涓嶉�氳繃',
+ type: 'warning',
+ closeOnClickModal: false, // 绂佹鐐瑰嚮閬僵灞傚叧闂�
+ distinguishCancelAndClose: true,
+ beforeClose: (action, instance, done) => {
+ if (action === 'confirm') {
+ // 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴
+ ratifyManageRecordCheck({ id: row.id, ratifyState: '閫氳繃' }).then(res => {
+ if (res.code === 201) return
+ this.refreshTable()
+ done();
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛'
+ })
+ })
+ .catch(err => {
+
+ })
+ } else if (action === 'cancel') {
+ // 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂�
+ ratifyManageRecordCheck({ id: row.id, ratifyState: '涓嶉�氳繃' }).then(res => {
+ if (res.code === 201) return
+ this.refreshTable()
+ done();
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛'
+ })
+ })
+ .catch(err => {
+
+ })
+ } else if (action === 'close') {
+ // 鐐瑰嚮鈥溍椻�濇寜閽紝涓嶅厑璁稿叧闂�
+ done();
+ console.log("脳鎸夐挳鐐瑰嚮浜嬩欢锛屼笉鍏抽棴寮规");
+ }
+ }
+ })
+ },
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ // this.upLoading = true;
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ handleSuccessUp(response) {
+ this.upLoading = false;
+ if (response.code == 200) {
+ this.$message.success('涓婁紶鎴愬姛');
+ this.refreshTable()()
+ } else {
+ this.$message.error('涓婁紶澶辫触');
+ }
+ },
+ // 鏂板/淇敼
+ submitProduct(formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ this.uploading = true;
+ if (this.title == "鏂板") {
+ addManageRecordCheck(this.addForm)
+ .then((res) => {
+ this.uploading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.refresh();
+ this.addDia = false;
+ })
+ .catch((err) => {
+ this.uploading = false;
+ });
+ } else {
+ doManageRecordCheck(this.addForm)
+ .then((res) => {
+ this.uploading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.refresh();
+ this.addDia = false;
+ })
+ .catch((err) => {
+ this.uploading = false;
+ });
+ }
+ } else {
+ return false;
+ }
+ });
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordCheck({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ });
+ })
+ .catch(() => { });
+ },
+ }
+}
+</script>
+
+<style scoped>
+.search {
+ background-color: #fff;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ position: relative;
+}
+
+.search_thing {
+ width: 350px;
+ display: flex;
+ align-items: center;
+}
+
+.search_label {
+ width: 110px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 110px);
+}
+
+.btn {
+ position: absolute;
+ right: 16px;
+ top: 20px;
+}
+
+.table {
+ margin-top: 10px;
+ background-color: #fff;
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ padding: 20px;
+}
+</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
new file mode 100644
index 0000000..f01da6e
--- /dev/null
+++ b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
@@ -0,0 +1,478 @@
+<template>
+ <!-- 浣滃簾鏂囦欢閿�姣佽褰� -->
+ <div class="ObsoleteDocumentDestructionRecords">
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentName"
+ @keyup.enter.native="refreshTable()"></el-input></div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ <div class="btn">
+ <el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
+ :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
+ :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
+ style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
+ </div>
+ <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
+ <el-row>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile"
+ allow-create clearable filterable>
+ <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title"
+ :value="item.documentCode">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.documentName"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏁伴噺锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.qty"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">閿�姣佸師鍥狅細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.reason"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">澶囨敞锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.remark"
+ type="textarea" :rows="2"></el-input></div>
+ </div>
+ </el-col>
+ </el-row>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+ selectUserCondition,
+} from "@/api/system/user.js";
+import {
+ exportOutManageRecordCancel,
+ addManageRecordCancel,
+ doManageRecordCancel,
+ ratifyManageRecordCancel,
+ delManageRecordCancel,
+ pageManageRecordCancel
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
+export default {
+ components: {
+ limsTable
+ },
+ data() {
+ return {
+ addPower: true,
+ outPower: true,
+ upPower: true,
+ outLoading: false,
+ addLoading: false,
+ addInfo: {},
+ title: '鏂板',
+ addInfo: {},
+ addDialogVisible: false,
+ fileList: [],
+ personList: [],
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢缂栧彿", prop: "documentCode" },
+ { label: "鏂囦欢鍚嶇О", prop: "documentName", width: "120px" },
+ {
+ label: "鏁伴噺",
+ prop: "qty",
+ },
+ { label: "閿�姣佸師鍥�", prop: "reason" },
+ { label: "鐢宠浜�", prop: "createUserName" },
+ { label: "鐢宠鏃ユ湡", prop: "createTime" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鎵瑰噯鏃ユ湡", prop: "ratifyTime" },
+ { label: "澶囨敞", prop: "remark" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit0(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃'
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleRatify(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃'
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃'
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ }
+ },
+ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+ computed: {
+ action() {
+ return this.javaApi + '/manageRecordCancel/exportInManageRecordCancel'
+ }
+ },
+ mounted() {
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ this.getList()
+ this.getAuthorizedPerson()
+ this.getFileList()
+ },
+ methods: {
+ getPower() {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let add = false
+ let del = false
+ let up = false;
+ let out = false;
+ let ratify = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'addManageRecordCancel') {
+ add = true
+ }
+ if (power[i].menuMethod == 'delManageRecordCancel') {
+ del = true
+ }
+ if (power[i].menuMethod == 'exportInManageRecordCancel') {
+ up = true
+ }
+ if (power[i].menuMethod == 'ratifyManageRecordCancel') {
+ ratify = true
+ }
+ if (power[i].menuMethod == 'exportOutManageRecordCancel') {
+ out = true
+ }
+ }
+ if (!ratify) {
+ this.componentData.do.splice(2, 1)
+ }
+ if (!add) {
+ this.componentData.do.splice(1, 1)
+ }
+ if (!del) {
+ this.componentData.do.splice(0, 1)
+ }
+ this.addPower = add
+ this.outPower = out
+ this.upPower = up
+ },
+ openAdd() {
+ this.addInfo = {}
+ this.title = '鏂板'
+ this.addDialogVisible = true;
+ },
+ handleEdit0(row) {
+ this.addInfo = row
+ this.title = '淇敼'
+ this.addDialogVisible = true;
+ },
+ // 瀵煎嚭
+ handleDown() {
+ this.outLoading = true
+ exportOutManageRecordCancel(this.queryParams).then(res => {
+ this.outLoading = false
+ if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, "浣滃簾鏂囦欢閿�姣佽褰�");
+ })
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordCancel({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ refresh() {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
+ },
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ // this.upLoading = true;
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ handleSuccessUp(response) {
+ this.upLoading = false;
+ if (response.code == 200) {
+ this.$message.success('涓婁紶鎴愬姛');
+ this.refreshTable()()
+ } else {
+ this.$message.error('涓婁紶澶辫触');
+ }
+ },
+ // 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
+ getFileList() {
+ pageManageDocumentList({
+ current: -1,
+ size: -1
+ }).then(res => {
+ this.fileList = res.data.records.map(m => {
+ m.title = m.documentCode
+ return m
+ })
+ }).catch(err => { })
+ },
+ handleAdd() {
+ if (!this.addInfo.documentCode) return this.$message.error('璇疯緭鍏ユ枃浠剁紪鍙�')
+ this.addLoading = true
+ let obj = {}
+ if (this.title == '鏂板') {
+ obj = this.HaveJson(this.addInfo)
+ } else {
+ let { id, documentCode, documentName, qty, reason, remark } = this.addInfo
+ obj = { id, documentCode, documentName, qty, reason, remark }
+ }
+ if (this.title == '鏂板') {
+ addManageRecordCancel(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ } else {
+ doManageRecordCancel(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ }
+ },
+ getCurrentFile(e) {
+ let obj = this.fileList.find(m => m.documentCode == e)
+ if (obj) {
+ this.$set(this.addInfo, 'documentName', obj.name)
+ }
+ },
+ getAuthorizedPerson() {
+ selectUserCondition().then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.personList = data
+ })
+ },
+ handleRatify(row) {
+ this.$confirm('鏄惁鎵瑰噯閫氳繃?', '鎻愮ず', {
+ confirmButtonText: '閫氳繃',
+ cancelButtonText: '涓嶉�氳繃',
+ type: 'warning',
+ closeOnClickModal: false, // 绂佹鐐瑰嚮閬僵灞傚叧闂�
+ distinguishCancelAndClose: true,
+ beforeClose: (action, instance, done) => {
+ if (action === 'confirm') {
+ // 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴
+ ratifyManageRecordCancel({ id: row.id, ratifyState: '閫氳繃' }).then(res => {
+ if (res.code === 201) return
+ this.refreshTable()
+ done();
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛'
+ })
+ })
+ .catch(err => {
+
+ })
+ } else if (action === 'cancel') {
+ // 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂�
+ ratifyManageRecordCancel({ id: row.id, ratifyState: '涓嶉�氳繃' }).then(res => {
+ if (res.code === 201) return
+ this.refreshTable()
+ done();
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛'
+ })
+ })
+ .catch(err => {
+
+ })
+ console.log("鍙栨秷鎸夐挳鐐瑰嚮浜嬩欢锛屼笉鍏抽棴寮规");
+ } else if (action === 'close') {
+ // 鐐瑰嚮鈥溍椻�濇寜閽紝涓嶅厑璁稿叧闂�
+ done();
+ console.log("脳鎸夐挳鐐瑰嚮浜嬩欢锛屼笉鍏抽棴寮规");
+ }
+ }
+ })
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordCancel({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ });
+ })
+ .catch(() => { });
+ },
+ }
+}
+</script>
+
+<style scoped>
+.title {
+ height: 60px;
+ line-height: 60px;
+}
+
+.search {
+ background-color: #fff;
+ height: 80px;
+ display: flex;
+ align-items: center;
+}
+
+.search_thing {
+ width: 350px;
+ display: flex;
+ align-items: center;
+}
+
+.search_label {
+ width: 110px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 110px);
+}
+
+.table {
+ margin-top: 10px;
+ background-color: #fff;
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ padding: 20px;
+ padding-top: 0;
+}
+
+.btn {
+ position: absolute;
+ right: 20px;
+ top: 16px;
+}
+</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
new file mode 100644
index 0000000..943f143
--- /dev/null
+++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -0,0 +1,522 @@
+<template>
+ <!-- 鎵�鏈夋枃浠讹紙鍐呫�佸閮ㄦ枃浠讹級鐨勫彂鏀句笌鍥炴敹璁板綍 -->
+ <div class="DistributionRetrievalRecordsAllDocuments">
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentName"
+ @keyup.enter.native="refreshTable()"></el-input></div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ <div class="btn">
+ <el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
+ :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
+ :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
+ style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
+ </div>
+ <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
+ <el-row>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile"
+ allow-create clearable filterable>
+ <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title"
+ :value="item.documentCode">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.documentName"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鐗堝彿锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.documentVersion"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">浠芥暟锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.pages"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢绫诲埆锛�</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.documentType" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+ <el-option v-for="item in fileType" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鍒嗗彂鍙凤細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.number"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鎺ュ彈浜猴細</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.receiveUser" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"
+ filterable="">
+ <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鎺ユ敹閮ㄩ棬锛�</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.departLims" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+ <el-option v-for="item in list" :key="item.name" :label="item.name" :value="item.name">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鎺ュ彈鏃ユ湡锛�</div>
+ <div class="search_input">
+ <el-date-picker v-model="addInfo.receiveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡"
+ format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+ getYearAndMonthAndDays
+} from '@/utils/date'
+import {
+ selectUserCondition,
+} from "@/api/system/user.js";
+import {
+ exportOutManageRecordIssueRecycle,
+ doManageRecordIssueRecycle,
+ addManageRecordIssueRecycle,
+ selectCNSAPersonTree,
+ pageManageRecordIssueRecycle,
+ delManageRecordIssueRecycle,
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
+import { mapGetters } from "vuex";
+export default {
+ components: {
+ limsTable
+ },
+ data() {
+ return {
+ addPower: true,
+ outPower: true,
+ upPower: true,
+ outLoading: false,
+ addLoading: false,
+ title: '鏂板',
+ addDialogVisible: false,
+ addInfo: {},
+ personList: [],
+ fileType: [],
+ fileList: [],
+ list: [],
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢缂栧彿", prop: "documentCode" },
+ { label: "鏂囦欢鍚嶇О", prop: "documentName", width: "120px" },
+ {
+ label: "鐗堝彿",
+ prop: "documentVersion",
+ },
+ { label: "浠芥暟", prop: "pages" },
+ { label: "鏂囦欢绫诲埆", prop: "documentType" },
+ { label: "鍒嗗彂鍙�", prop: "number" },
+ { label: "鎺ュ彈浜�", prop: "receiveUserName" },
+ { label: "鎺ユ敹閮ㄩ棬", prop: "departLims" },
+ { label: "鎺ュ彈鏃ユ湡", prop: "receiveDate" },
+ { label: "绛炬敹浜�", prop: "signedUserName" },
+ { label: "绛炬敹鏃ユ湡", prop: "signedDate" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit(row);
+ },
+ disabled: (row) => {
+ return !!row.signedUser
+ },
+ },
+ {
+ name: "鍥炴敹",
+ type: "text",
+ clickFun: (row) => {
+ this.handleBack(row);
+ },
+ disabled: (row) => {
+ return !!row.signedUser
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return !!row.signedUser
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ }
+ },
+ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+ computed: {
+ action() {
+ return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle'
+ },
+ ...mapGetters(["userId"]),
+ },
+ mounted() {
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ this.getList()
+ this.getAuthorizedPerson()
+ this.selectEnumByCategory()
+ this.getFileList()
+ // TODO 閮ㄩ棬鎺ュ彛闇�瑕侀噸鍐�
+ // this.selectTreeList()
+ },
+ methods: {
+ getPower() {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let add = false
+ let del = false
+ let up = false;
+ let out = false;
+ let edit = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'addManageRecordIssueRecycle') {
+ add = true
+ }
+ if (power[i].menuMethod == 'delManageRecordIssueRecycle') {
+ del = true
+ }
+ if (power[i].menuMethod == 'exportInManageRecordIssueRecycle') {
+ up = true
+ }
+ if (power[i].menuMethod == 'doManageRecordIssueRecycle') {
+ edit = true
+ }
+ if (power[i].menuMethod == 'exportOutManageRecordIssueRecycle') {
+ out = true
+ }
+ }
+ if (!add) {
+ this.componentData.do.splice(2, 1)
+ }
+ if (!add) {
+ this.componentData.do.splice(1, 1)
+ }
+ if (!del) {
+ this.componentData.do.splice(0, 1)
+ }
+ this.addPower = add
+ this.outPower = out
+ this.upPower = up
+ },
+ // 鏂板
+ openAdd() {
+ // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
+ this.addInfo = {}
+ this.title = '鏂板'
+ this.addDialogVisible = true;
+ },
+ handleEdit(row) {
+ this.addInfo = row
+ this.title = '缂栬緫'
+ this.addDialogVisible = true;
+ },
+ // 瀵煎嚭
+ handleDown() {
+ this.outLoading = true
+ exportOutManageRecordIssueRecycle(this.queryParams).then(res => {
+ this.outLoading = false
+ if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, '鏂囦欢鍙戞斁涓庡洖鏀惰褰�')
+ })
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordIssueRecycle({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ refresh() {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
+ },
+ getAuthorizedPerson() {
+ selectUserCondition().then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.personList = data
+ })
+ },
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ // this.upLoading = true;
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ handleSuccessUp(response) {
+ this.upLoading = false;
+ if (response.code == 200) {
+ this.$message.success('涓婁紶鎴愬姛');
+ this.refreshTable()()
+ } else {
+ this.$message.error('涓婁紶澶辫触');
+ }
+ },
+ selectEnumByCategory() {
+ // 鏂囦欢绫诲埆
+ this.getDicts("document_type").then((response) => {
+ this.fileType = this.dictToValue(response.data);
+ });
+ },
+ // 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
+ getFileList() {
+ pageManageDocumentList({
+ current: -1,
+ size: -1
+ }).then(res => {
+ this.fileList = res.data.records.map(m => {
+ m.title = m.documentCode
+ return m
+ })
+ }).catch(err => { })
+ },
+ getCurrentFile(e) {
+ let obj = this.fileList.find(m => m.documentCode == e)
+ if (obj) {
+ this.$set(this.addInfo, 'documentName', obj.name)
+ this.$set(this.addInfo, 'documentVersion', obj.version)
+ this.$set(this.addInfo, 'documentType', obj.type)
+ }
+ },
+ handleAdd() {
+ if (!this.addInfo.documentCode) return this.$message.error('璇疯緭鍏ユ枃浠剁紪鍙�')
+ this.addLoading = true
+ let obj = {}
+ if (this.title == '鏂板') {
+ obj = this.HaveJson(this.addInfo)
+ } else {
+ let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = this.addInfo
+ obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims }
+ }
+ if (this.title == '鏂板') {
+ addManageRecordIssueRecycle(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ } else {
+ doManageRecordIssueRecycle(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ }
+ },
+ // 鍥炴敹
+ handleBack(row) {
+ this.$confirm('鏄惁纭鍥炴敹?', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ let obj = {}
+ let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = row
+ obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: this.userId }
+ doManageRecordIssueRecycle(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ }).catch(() => { })
+ },
+ // 鏌ヨ鏍戝舰鍒楄〃
+ selectTreeList() {
+ selectCNSAPersonTree().then((res) => {
+ this.list = res.data[0].children;
+ });
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordIssueRecycle({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ });
+ })
+ .catch(() => { });
+ },
+ }
+}
+</script>
+
+<style scoped>
+.title {
+ height: 60px;
+ line-height: 60px;
+}
+
+.search {
+ background-color: #fff;
+ height: 80px;
+ display: flex;
+ align-items: center;
+}
+
+.search_thing {
+ width: 350px;
+ display: flex;
+ align-items: center;
+}
+
+.search_label {
+ width: 110px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 110px);
+}
+
+.table {
+ margin-top: 10px;
+ background-color: #fff;
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ padding: 20px;
+ padding-top: 0;
+}
+</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
new file mode 100644
index 0000000..f323f0d
--- /dev/null
+++ b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
@@ -0,0 +1,540 @@
+<template>
+ <!-- 澶栨潵鏂囦欢纭璁板綍 -->
+ <div class="ExternalDocumentConfirmationRecords">
+ <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
+ <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
+ <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;">
+ <el-button size="small" type="primary" @click="openAdd('鏂板')" style="margin-left: 20px;">鏂板</el-button>
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
+ :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
+ :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ <el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload>
+ </div>
+ <div class="table" style="height: calc(100% - 200px)">
+ <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
+ :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify"
+ :upUrl="$api.manageRecordTotal.doManageRecordVerify" /> -->
+ <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
+ :height="'calc(100vh - 270px)'" @pagination="pagination0"></lims-table>
+ </div>
+ </el-tab-pane>
+ <el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;">
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">骞达細</div>
+ <div class="search_input">
+ <el-date-picker v-model="queryParams.year" type="year" placeholder="閫夋嫨骞�" format="yyyy" value-format="yyyy"
+ size="small" @change="refreshTable()">
+ </el-date-picker>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 280px)'" @pagination="pagination"></lims-table>
+ </div>
+ </el-tab-pane>
+ </el-tabs>
+ <!-- 璇︽儏/涓嬭浇/瀹℃牳 -->
+ <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == '涓嬭浇' }"
+ :modal="title0 != '涓嬭浇'" top="5vh">
+ <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
+ style="max-height: 70vh;overflow-y: auto;" />
+ <span slot="footer" class="dialog-footer" v-if="title0 == '瀹℃牳' || title0 == '鎵瑰噯'">
+ <el-button @click="submitCheck('涓嶉�氳繃')" :loading="noCheckLoading">涓嶉�氳繃</el-button>
+ <el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
+ </span>
+ </el-dialog>
+ <!-- 鏂板/缂栬緫 -->
+ <el-dialog :title="title" :visible.sync="addDia" width="500px">
+ <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px">
+ <el-form-item label="澶栨潵鏂囦欢鍚嶇О" prop="documentName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentName"></el-input>
+ </el-form-item>
+ <el-form-item label="鏂囦欢缂栧彿" prop="documentCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentCode">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鏍囧噯瑙勮寖鍚嶇О" prop="standardName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.standardName">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鏍囧噯鍙�" prop="standardCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.standardCode">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鐢熸晥鏃ユ湡" prop="effectiveDate">
+ <el-date-picker v-model="addForm.effectiveDate" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
+ style="width: 100%" type="date" value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="浣滃簾鏃ユ湡" prop="cancelDate">
+ <el-date-picker v-model="addForm.cancelDate" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
+ style="width: 100%" type="date" value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="note">
+ <el-input size="small" placeholder="璇疯緭鍏�" type="textarea" :rows="2" clearable v-model="addForm.note">
+ </el-input>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDia = false">鍙� 娑�</el-button>
+ <el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">纭� 璁�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import filePreview from '@/components/Preview/filePreview.vue'
+import {
+ addManageRecordVerify,
+ pageManageRecordVerify,
+ submitManageRecordTotal,
+ ratifyManageRecordTotal,
+ delManageRecordVerify,
+ pageManageRecordTotal,
+ doManageRecordVerify
+} from '@/api/cnas/systemManagement/documentRecords.js'
+export default {
+ components: {
+ filePreview,
+ limsTable,
+ },
+ data() {
+ return {
+ title0: '鏌ョ湅',
+ activeName: '濉啓',
+ lookDialogVisible: false,
+ noCheckLoading: false,
+ checkLoading: false,
+ addPower: true,
+ upPower: true,
+ currentInfo: {},
+ upLoading: false,
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "骞翠唤", prop: "year" },
+ { label: "鎬绘暟閲�", prop: "totalNum", width: "120px" },
+ {
+ label: "鎷熷埗浜�",
+ prop: "submitUserName",
+ },
+ { label: "鎷熷埗鏃ユ湡", prop: "submitDate" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鎵瑰噯鏃ユ湡", prop: "ratifyDate" },
+ { label: "鎵瑰噯缁撴灉", prop: "ratifyState" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDown0(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "鎻愪氦",
+ type: "text",
+ clickFun: (row) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return !!row.submitUserName
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (handleApproval) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return !row.submitUserName || !!row.ratifyUserName
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ tableData0: [],
+ column0: [
+ { label: "澶栨潵鏂囦欢鍚嶇О", prop: "documentName" },
+ { label: "鏂囦欢缂栧彿", prop: "documentCode", width: "120px" },
+ {
+ label: "鏍囧噯瑙勮寖鍚嶇О",
+ prop: "standardName",
+ },
+ { label: "鏍囧噯鍙�", prop: "standardCode" },
+ { label: "鐢熸晥鏃ユ湡", prop: "effectiveDate" },
+ { label: "浣滃簾鏃ユ湡", prop: "cancelDate" },
+ { label: "澶囨敞", prop: "note" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.openAdd("缂栬緫", row);
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ },
+ ],
+ },
+ ],
+ page0: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading0: false,
+ title: '鏂板',
+ addForm: {},
+ addDia: false,
+ addRules: {
+ documentName: [{ required: true, message: "璇疯緭鍏ュ鏉ユ枃浠跺悕绉�", trigger: "blur" }],
+ documentCode: [
+ { required: true, message: "璇疯緭鍏ユ枃浠剁紪鍙�", trigger: "blur" },
+ ],
+ },
+ uploading: false,
+ }
+ },
+ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+ computed: {
+ action() {
+ return this.javaApi + '/manageRecordVerify/exportManageRecordVerify'
+ }
+ },
+ mounted() {
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ this.getList()
+ this.getList0()
+ },
+ methods: {
+ getPower() {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let add = false
+ let del = false
+ let up = false;
+ let sub = false
+ let ratify = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'addManageRecordVerify') {
+ add = true
+ }
+ if (power[i].menuMethod == 'delManageRecordVerify') {
+ del = true
+ }
+ if (power[i].menuMethod == 'exportManageRecordVerify') {
+ up = true
+ }
+ if (power[i].menuMethod == 'submitManageRecordTotal') {
+ sub = true
+ }
+ if (power[i].menuMethod == 'ratifyManageRecordTotal') {
+ ratify = true
+ }
+ }
+ if (!ratify) {
+ this.componentData.do.splice(3, 1)
+ }
+ if (!sub) {
+ this.componentData.do.splice(2, 1)
+ }
+ if (!del) {
+ this.componentData0.do.splice(1, 1)
+ }
+ if (!add) {
+ this.componentData0.do.splice(0, 1)
+ }
+ this.addPower = add
+ this.upPower = up
+ },
+ openAdd(title, row) {
+ this.title = title;
+ if (row) {
+ this.addForm = row;
+ } else {
+ this.addForm = {};
+ }
+ this.addDia = true;
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordTotal({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ getList0() {
+ this.tableLoading0 = true;
+ let param = { ...this.page0 };
+ delete param.total;
+ pageManageRecordVerify({ ...param })
+ .then((res) => {
+ this.tableLoading0 = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ this.page0.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading0 = false;
+ });
+ },
+ pagination0({ page, limit }) {
+ this.pag0.current = page;
+ this.page0.size = limit;
+ this.getList0();
+ },
+ refresh() {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
+ },
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ // this.upLoading = true;
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ handleSuccessUp(response) {
+ this.upLoading = false;
+ if (response.code == 200) {
+ this.$message.success('涓婁紶鎴愬姛');
+ this.getList0();
+ } else {
+ this.$message.error('涓婁紶澶辫触');
+ }
+ },
+ submitCheck(type) { },
+ // 鏌ョ湅
+ handleLook(row) {
+ this.title0 = '鏌ョ湅'
+ this.commonFun(row)
+ },
+ // 鍏敤鏂规硶
+ commonFun(row, callbanck) {
+ this.currentInfo = row
+ pageManageRecordVerify({
+ current: -1,
+ size: -1,
+ manageRecordTotalId: row.id
+ }).then(res => {
+ this.currentInfo.arr = res.data.records
+ this.lookDialogVisible = true
+ if (callbanck) {
+ callbanck()
+ }
+ }).catch(err => { });
+ },
+ handleDown0(row) {
+ let url = this.javaApi + '/word/' + row.url
+ this.$download.saveAs(url, '澶栨潵鏂囦欢纭璁板綍')
+ },
+ // 鎻愪氦
+ handleSubmit(row) {
+ this.$confirm('鏄惁鎻愪氦 ' + row.year + ' 骞寸殑鏁版嵁', '鎻愪氦', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ submitManageRecordTotal({
+ id: row.id
+ }).then(res => {
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛!'
+ });
+ this.refreshTable()()
+ }).catch(err => { });
+ })
+ },
+ // 鎵瑰噯
+ handleApproval(row) {
+ this.title0 = '鎵瑰噯'
+ this.commonFun(row)
+ },
+ // 鎻愪氦瀹℃牳/鎵瑰噯
+ submitCheck(state) {
+ if (state == '閫氳繃') {
+ this.checkLoading = true
+ } else {
+ this.noCheckLoading = true
+ }
+ ratifyManageRecordTotal({
+ id: this.currentInfo.id,
+ ratifyState: state
+ }).then(res => {
+ this.checkLoading = false
+ this.noCheckLoading = false
+ if (res.code === 201) return
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()()
+ this.lookDialogVisible = false
+ }).catch(err => { });
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordVerify({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.getList0()
+ });
+ })
+ .catch(() => { });
+ },
+ submitProduct(formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ this.uploading = true;
+ if (this.title == "鏂板") {
+ addManageRecordVerify(this.addForm)
+ .then((res) => {
+ this.uploading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.getList0()
+ this.addDia = false;
+ })
+ .catch((err) => {
+ this.uploading = false;
+ });
+ } else {
+ doManageRecordVerify(this.addForm)
+ .then((res) => {
+ this.uploading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.getList0()
+ this.addDia = false;
+ })
+ .catch((err) => {
+ this.uploading = false;
+ });
+ }
+ } else {
+ return false;
+ }
+ });
+ },
+ }
+}
+</script>
+
+<style scoped>
+.title {
+ height: 60px;
+ line-height: 60px;
+}
+
+.search {
+ background-color: #fff;
+ height: 40px;
+ display: flex;
+ align-items: center;
+ position: relative;
+}
+
+.search_thing {
+ width: 350px;
+ display: flex;
+ align-items: center;
+}
+
+.search_label {
+ width: 30px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 110px);
+}
+
+.table {
+ background-color: #fff;
+ height: 100%;
+ margin-top: 10px;
+}
+
+>>>.el-tabs__content {
+ height: 100%;
+}
+</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
new file mode 100644
index 0000000..53f1e11
--- /dev/null
+++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -0,0 +1,743 @@
+<template>
+ <!-- 鏂囦欢瀹氭湡瀹℃煡璁板綍 -->
+ <div class="PeriodicDocumentReviewRecords">
+ <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
+ <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="queryParams.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ <div class="btns">
+ <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
+ :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower"
+ :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+ <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
+ </div>
+ </el-tab-pane>
+ <el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;">
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">骞达細</div>
+ <div class="search_input">
+ <el-date-picker v-model="queryParams0.year" type="year" placeholder="閫夋嫨骞�" format="yyyy"
+ value-format="yyyy" size="small" @change="refreshTable(1)">
+ </el-date-picker>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh(1)">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable(1)">鏌� 璇�</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading"
+ :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
+ </div>
+ </el-tab-pane>
+ </el-tabs>
+ <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
+ <el-row>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile"
+ allow-create clearable filterable>
+ <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title"
+ :value="item.documentCode">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.documentName"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鐗堟湰鍙凤細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.documentVersion"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">淇鍙凤細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.revision"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">閫傚疁鎬э細</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.suitability" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+ <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">澶囨敞锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.remark"
+ type="textarea" :rows="2"></el-input></div>
+ </div>
+ </el-col>
+ </el-row>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!-- 璇︽儏/瀹℃牳 -->
+ <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" top="5vh">
+ <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
+ style="max-height: 70vh;overflow-y: auto;" />
+ <span slot="footer" class="dialog-footer" v-if="title0 == '瀹℃牳' || title0 == '鎵瑰噯'">
+ <el-button @click="submitCheck('涓嶉�氳繃')" :loading="noCheckLoading">涓嶉�氳繃</el-button>
+ <el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import filePreview from '@/components/Preview/filePreview.vue'
+import {
+ exportOutManageRecordIntervals,
+ addManageRecordIntervals,
+ doManageRecordIntervals,
+ ratifyManageRecordIntervalsTotal,
+ submitManageRecordIntervalsTotal,
+ pageManageRecordIntervals,
+ pageManageRecordIntervalsTotal,
+ delManageRecordIntervals,
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
+export default {
+ components: {
+ limsTable,
+ filePreview
+ },
+ data() {
+ return {
+ activeName: '濉啓',
+ title0: '鏂板',
+ addPower: true,
+ outPower: true,
+ upPower: true,
+ outLoading: false,
+ addLoading: false,
+ lookDialogVisible: false,
+ noCheckLoading: false,
+ checkLoading: false,
+ componentData: {
+ entity: {
+ documentName: null,
+ documentCode: null,
+ orderBy: {
+ field: 'id',
+ order: 'desc'
+ }
+ },
+ isIndex: true,
+ showSelect: false,
+ select: false,
+ // selectMethod: 'handleChangeTask',
+ do: [{
+ id: 'handleEdit',
+ font: '淇敼',
+ type: 'text',
+ method: 'handleEdit',
+ field: [],
+ }, {
+ id: 'delete',
+ font: '鍒犻櫎',
+ type: 'text',
+ method: 'doDiy',
+ }],
+ tagField: {
+ // documentType:{
+ // select: []
+ // },
+ // receiveUserName:{
+ // select: []
+ // },
+ },
+ selectField: {
+ // documentType:{
+ // select: []
+ // },
+ // receiveUserName:{
+ // select: []
+ // },
+ },
+ addUpload: ['signatoryUrl'],
+ requiredAdd: [],
+ requiredUp: [],
+ datePicker: ['receiveDate'],
+ noHead: ['signedUserName', 'signedDate', 'departLims'],//涓嶅弬涓庢柊澧炵紪杈戠殑瀛楁
+ needSort: [],
+ inputType: ''
+ },
+ componentData0: {
+ entity: {
+ year: null,
+ orderBy: {
+ field: 'id',
+ order: 'desc'
+ }
+ },
+ isIndex: true,
+ showSelect: false,
+ select: false,
+ do: [{
+ id: 'handleLook',
+ font: '鏌ョ湅',
+ type: 'text',
+ method: 'handleLook',
+ disabFun: (row, index) => {
+ return !row.url
+ }
+ }, {
+ id: 'handleDown0',
+ font: '涓嬭浇',
+ type: 'text',
+ method: 'handleDown0',
+ disabFun: (row, index) => {
+ return !row.url
+ }
+ },
+ {
+ id: 'handleSubmit',
+ font: '鎻愪氦',
+ type: 'text',
+ method: 'handleSubmit',
+ disabFun: (row, index) => {
+ return !!row.submitUserName
+ }
+ }, {
+ id: 'handleApproval',
+ font: '鎵瑰噯',
+ type: 'text',
+ method: 'handleApproval',
+ disabFun: (row, index) => {
+ return !row.submitUserName || !!row.ratifyUserName
+ }
+ }],
+ tagField: {},
+ selectField: {},
+ requiredAdd: [],
+ requiredUp: [],
+ needSort: [],
+ inputType: ''
+ },
+ entityCopy: {},
+ entityCopy0: {},
+ upIndex: 0,
+ addInfo: {},
+ title: '鏂板',
+ addInfo: {},
+ addDialogVisible: false,
+ fileList: [],
+ typeList: [],
+ currentInfo: {},
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢鍚嶇О", prop: "documentName" },
+ { label: "鏂囦欢缂栧彿", prop: "documentCode", width: "120px" },
+ {
+ label: "鐗堟湰鍙�",
+ prop: "documentVersion",
+ },
+ { label: "淇鍙�", prop: "revision" },
+ { label: "閫傚疁鎬�", prop: "suitability" },
+ { label: "澶囨敞", prop: "remark" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit(row);
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ queryParams0: {},
+ tableData0: [],
+ column0: [
+ { label: "骞翠唤", prop: "year" },
+ { label: "鎬绘暟閲�", prop: "totalNum", width: "120px" },
+ {
+ label: "鎷熷埗浜�",
+ prop: "submitUserName",
+ },
+ { label: "鎷熷埗鏃ユ湡", prop: "submitDate" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鎵瑰噯鏃ユ湡", prop: "ratifyDate" },
+ { label: "鎵瑰噯缁撴灉", prop: "ratifyState" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDown0(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "鎻愪氦",
+ type: "text",
+ clickFun: (row) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return !!row.submitUserName && row.ratifyState != '涓嶉�氳繃'
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleApproval(row);
+ },
+ disabled: (row) => {
+ return (!row.submitUserName || !!row.ratifyUserName) && row.ratifyState != '涓嶉�氳繃'
+ },
+ },
+ ],
+ },
+ ],
+ page0: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ }
+ },
+ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+ computed: {
+ action() {
+ return this.javaApi + '/manageRecordIntervals/exportInManageRecordIntervals'
+ }
+ },
+ mounted() {
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ // this.entityCopy0 = this.HaveJson(this.componentData0.entity);
+ this.getList()
+ this.getList0()
+ this.getFileList()
+ this.selectEnumByCategory()
+ },
+ methods: {
+ getPower() {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let add = false
+ let del = false
+ let up = false;
+ let out = false;
+ let submit = false
+ let ratify = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'addManageRecordIntervals') {
+ add = true
+ }
+ if (power[i].menuMethod == 'delManageRecordIntervals') {
+ del = true
+ }
+ if (power[i].menuMethod == 'exportInManageRecordIntervals') {
+ up = true
+ }
+ if (power[i].menuMethod == 'exportOutManageRecordIntervals') {
+ out = true
+ }
+ if (power[i].menuMethod == 'submitManageRecordIntervalsTotal') {
+ submit = true
+ }
+ if (power[i].menuMethod == 'ratifyManageRecordIntervalsTotal') {
+ ratify = true
+ }
+ }
+ if (!ratify) {
+ this.componentData0.do.splice(3, 1)
+ }
+ if (!submit) {
+ this.componentData0.do.splice(2, 1)
+ }
+ if (!add) {
+ this.componentData.do.splice(1, 1)
+ }
+ if (!del) {
+ this.componentData.do.splice(0, 1)
+ }
+ this.addPower = add
+ this.outPower = out
+ this.upPower = up
+ },
+ // 鏂板
+ openAdd() {
+ // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
+ this.addInfo = {}
+ this.title = '鏂板'
+ this.addDialogVisible = true;
+ },
+ // 瀵煎嚭
+ handleDown() {
+ this.outLoading = true
+ exportOutManageRecordIntervals(this.queryParams).then(res => {
+ this.outLoading = false
+ if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
+ let url = this.javaApi + 'word/' + res.message
+ this.$download.saveAs(url, "鏂囦欢瀹氭湡瀹℃煡璁板綍");
+ })
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordIntervals({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ getList0() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams0, ...this.page0 };
+ delete param.total;
+ pageManageRecordIntervalsTotal({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ this.page0.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination0({ page, limit }) {
+ this.page0.current = page;
+ this.page0.size = limit;
+ this.getList0();
+ },
+ refreshTable(num) {
+ if (num) {
+ this.page0.current = 1;
+ this.getList0();
+ } else {
+ this.page.current = 1;
+ this.getList();
+ }
+ },
+ refresh(num) {
+ if (num) {
+ this.queryParams0 = {};
+ this.page0.current = 1;
+ this.getList0();
+ } else {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ }
+ },
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ // this.upLoading = true;
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ handleSuccessUp(response) {
+ this.upLoading = false;
+ if (response.code == 200) {
+ this.$message.success('涓婁紶鎴愬姛');
+ this.refreshTable()()
+ } else {
+ this.$message.error('涓婁紶澶辫触');
+ }
+ },
+ getCurrentFile(e) {
+ let obj = this.fileList.find(m => m.documentCode == e)
+ if (obj) {
+ this.$set(this.addInfo, 'documentName', obj.name)
+ this.$set(this.addInfo, 'documentVersion', obj.version)
+ // this.addInfo.documentName = obj.name
+ // this.addInfo.documentVersion = obj.version
+ }
+ },
+ // 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
+ getFileList() {
+ pageManageDocumentList({
+ current: -1,
+ size: -1
+ }).then(res => {
+ this.fileList = res.data.records.map(m => {
+ m.title = m.documentCode
+ return m
+ })
+ }).catch(err => { })
+ },
+ selectEnumByCategory() {
+ // 鏂囦欢绫诲埆
+ this.getDicts("suitability").then((response) => {
+ this.typeList = this.dictToValue(response.data);
+ });
+ },
+ // 鎻愪氦
+ handleAdd() {
+ if (!this.addInfo.documentCode) return this.$message.error('璇疯緭鍏ユ枃浠剁紪鍙�')
+ this.addLoading = true
+ let obj = {}
+ if (this.title == '鏂板') {
+ obj = this.HaveJson(this.addInfo)
+ } else {
+ let { id, documentCode, documentName, documentVersion, revision, suitability, remark } = this.addInfo
+ obj = { id, documentCode, documentName, documentVersion, revision, suitability, remark }
+ }
+ if (this.title == '鏂板') {
+ addManageRecordIntervals(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ } else {
+ doManageRecordIntervals(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ }
+ },
+ // 淇敼
+ handleEdit(row) {
+ this.addInfo = row
+ this.title = '缂栬緫'
+ this.addDialogVisible = true;
+ },
+ submitCheck(state) {
+ if (state == '閫氳繃') {
+ this.checkLoading = true
+ } else {
+ this.noCheckLoading = true
+ }
+ ratifyManageRecordIntervalsTotal({
+ id: this.currentInfo.id,
+ ratifyState: state
+ }).then(res => {
+ this.checkLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.noCheckLoading = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable(1);
+ this.lookDialogVisible = false
+ }).catch(err => { });
+ },
+ // 鏌ョ湅
+ handleLook(row) {
+ this.title0 = '鏌ョ湅'
+ this.commonFun(row)
+ },
+ commonFun(row, callbanck) {
+ this.currentInfo = row
+ this.lookDialogVisible = true
+ if (callbanck) {
+ callbanck()
+ }
+ },
+ handleDown0(row) {
+ let url = this.javaApi + '/word/' + row.url
+ this.$download.saveAs(url, "鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�");
+ },
+ // 鎻愪氦
+ handleSubmit(row) {
+ this.$confirm('鏄惁鎻愪氦 ' + row.year + ' 骞寸殑鏁版嵁', '鎻愪氦', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ submitManageRecordIntervalsTotal({
+ id: row.id
+ }).then(res => {
+ if (res.code === 201) return
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛!'
+ });
+ this.refreshTable(1);
+ }).catch(err => { });
+ })
+ },
+ // 鎵瑰噯
+ handleApproval(row) {
+ this.title0 = '鎵瑰噯'
+ this.commonFun(row)
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordIntervals({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refreshTable();
+ });
+ })
+ .catch(() => { });
+ },
+ }
+}
+</script>
+
+<style scoped>
+.title {
+ height: 60px;
+ line-height: 60px;
+}
+
+.search {
+ background-color: #fff;
+ height: 40px;
+ display: flex;
+ align-items: center;
+ position: relative;
+}
+
+.search_thing {
+ width: 350px;
+ display: flex;
+ align-items: center;
+}
+
+.search_label {
+ width: 110px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 110px);
+}
+
+.table {
+ margin-top: 10px;
+ background-color: #fff;
+ height: calc(100% - 60px - 140px);
+ padding: 20px;
+ padding-top: 0;
+}
+
+>>>.el-tabs__content {
+ height: 100%;
+}
+
+.btns {
+ position: absolute;
+ right: 20px;
+ top: 5px;
+}
+</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
new file mode 100644
index 0000000..d18ebfb
--- /dev/null
+++ b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
@@ -0,0 +1,867 @@
+<template>
+ <!-- 鏂囦欢淇鐢宠瀹℃壒璁板綍 -->
+ <div class="DocumentRevisionRequestApprovalRecords">
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ <div class="btn">
+ <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
+ style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
+ </div>
+ <el-dialog :title="title" :visible.sync="addDialogVisible" width="800px" top="6vh">
+ <el-row>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鐢宠绫诲瀷锛�</div>
+ <div class="search_input">
+ <el-radio-group v-model="addInfo.method" size="small" :disabled="title.includes('鎰忚')">
+ <el-radio label="淇">淇</el-radio>
+ <el-radio label="浣滃簾">浣滃簾</el-radio>
+ </el-radio-group>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>鏂囦欢缂栧彿锛�</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile"
+ allow-create clearable filterable :disabled="title.includes('鎰忚')">
+ <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title"
+ :value="item.documentCode">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.documentName"
+ :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">绔犺妭鍙凤細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.capter"
+ :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">椤电爜锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.pages"
+ :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">淇敼娆℃暟锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.number"
+ :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">淇敼鍓嶇増鏈彿锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.beforeVersion"
+ :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">淇敼鍚庣増鏈彿锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.afterVersion"
+ :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">淇浜猴細</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.alterUser" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" filterable
+ :disabled="title.includes('鎰忚')">
+ <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鍘熷垎鍙戦儴闂細</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.beforeDepart" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"
+ :disabled="title.includes('鎰忚')">
+ <el-option v-for="item in list" :key="item.name" :label="item.name" :value="item.name">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">淇鍚庡垎鍙戦儴闂細</div>
+ <div class="search_input">
+ <el-select v-model="addInfo.afterDepart" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"
+ :disabled="title.includes('鎰忚')">
+ <el-option v-for="item in list" :key="item.name" :label="item.name" :value="item.name">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-col><el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">鏃ユ湡锛�</div>
+ <div class="search_input">
+ <el-date-picker v-model="addInfo.date" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing" style="width: 90%;">
+ <div class="search_label">淇敼鍐呭锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.alterThing"
+ type="textarea" :rows="2" :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing" style="width: 90%;">
+ <div class="search_label">鍙樺寲鍘熷洜锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.reason"
+ type="textarea" :rows="2" :disabled="title.includes('鎰忚')"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">涓婁紶闄勪欢锛�</div>
+ <div class="search_input"><el-upload style="margin: 8px 0 0px 50px;" action="#" :auto-upload="false"
+ :multiple="false" accept='.pdf' :on-change="handleChangeUpload"
+ v-if="addDialogVisible && !title.includes('鎰忚')">
+ <el-button size="small" type="primary">涓婁紶闄勪欢</el-button>
+ </el-upload></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('鎰忚')">
+ <div class="search_thing">
+ <div class="search_label">鐢宠閮ㄩ棬涓荤鎰忚锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.applicant"
+ type="textarea" :rows="2" :disabled="title != '鐢宠閮ㄩ棬涓荤鎰忚'"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('鎰忚')">
+ <div class="search_thing">
+ <div class="search_label">鍘熷畾鍒堕儴闂ㄦ剰瑙侊細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.formulation"
+ type="textarea" :rows="2" :disabled="title != '鍘熷畾鍒堕儴闂ㄦ剰瑙�'"></el-input></div>
+ </div>
+ </el-col>
+ <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('鎰忚')">
+ <div class="search_thing">
+ <div class="search_label">鍘熷鏍搁儴闂ㄦ剰瑙侊細</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.audit"
+ type="textarea" :rows="2" :disabled="title != '鍘熷鏍搁儴闂ㄦ剰瑙�'"></el-input></div>
+ </div>
+ </el-col>
+ </el-row>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog :title="title0" :visible.sync="detailDialogVisible" width="900px" top="20px"
+ :class="{ downPdf: title0 == '涓嬭浇' }" :modal="title0 != '涓嬭浇'">
+ <div style="max-height: 75vh;overflow-y: auto;">
+ <div id="dialogBody">
+ <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;">
+ <span style="font-size: 20px;">鏂囦欢鏇存敼/浣滃簾鐢宠琛�</span>
+ <span>Application for alteration/cancellation of Document</span>
+ </h4>
+ <p style="display: flex;justify-content: space-between;margin-top: 16px;">
+ <span>{{ currentInfo.documentCode }}</span>
+ <span>{{ currentInfo.method }}</span>
+ </p>
+ <table border="1" class="tables" cellpadding="10">
+ <tr>
+ <td>
+ <p>鐢宠閮ㄩ棬</p>
+ <p class="en">Application department</p>
+ </td>
+ <td>{{ currentInfo.createUserDepart }}</td>
+ <td>
+ <p>鐢宠浜�</p>
+ <p>Proposer</p>
+ </td>
+ <td>{{ currentInfo.createUserName }}</td>
+ <td>
+ <p>鐢宠鏃堕棿</p>
+ <p class="en">Application date</p>
+ </td>
+ <td>{{ currentInfo.createTime }}</td>
+ </tr>
+ <tr>
+ <td>
+ <p>鏂囦欢鍚嶇О</p>
+ <p class="en">File name</p>
+ </td>
+ <td colspan="3">{{ currentInfo.documentName }}</td>
+ <td>
+ <p>鏂囦欢缂栧彿</p>
+ <p class="en">Document number</p>
+ </td>
+ <td>{{ currentInfo.documentCode }}</td>
+ </tr>
+ <tr>
+ <td>
+ <p>淇敼鍓嶇増娆�</p>
+ <p class="en">Modify previous editions</p>
+ </td>
+ <td colspan="2">{{ currentInfo.beforeVersion }}</td>
+ <td>
+ <p>淇敼鍚庣増娆�</p>
+ <p class="en">Revised edition</p>
+ </td>
+ <td colspan="2">{{ currentInfo.afterVersion }}</td>
+ </tr>
+ <tr>
+ <td>
+ <p>鍙樺寲鍘熷洜</p>
+ <p class="en">Changing reason</p>
+ </td>
+ <td colspan="5">
+ <div class="user-content">
+ <p style="text-align: left;line-height: 26px;">{{ currentInfo.reason }}</p>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>鍘熸枃鍐呭</p>
+ <p class="en">Original content</p>
+ </td>
+ <td colspan="2">瑙侀檮浠�</td>
+ <td>
+ <p>鎷熶慨璁㈠唴瀹�</p>
+ <p class="en">Content be revised</p>
+ </td>
+ <td colspan="2">{{ currentInfo.alterThing }}</td>
+ </tr>
+ <tr>
+ <td>
+ <p>淇鍚庡垎鍙戦儴闂�</p>
+ <p class="en">Distribute to the department after revision</p>
+ </td>
+ <td colspan="2">{{ currentInfo.afterDepart }}</td>
+ <td>
+ <p>鍘熷垎鏀鹃儴闂�</p>
+ <p class="en">The original distribution department</p>
+ </td>
+ <td colspan="2">{{ currentInfo.beforeDepart }}</td>
+ </tr>
+ <tr>
+ <td>
+ <p>鐢宠閮ㄩ棬涓荤鎰忚</p>
+ <p class="en">Opinion of the head of the applicant department</p>
+ </td>
+ <td colspan="2">
+ <p>鍘熷埗瀹氶儴闂ㄦ剰瑙�</p>
+ <p class="en">Original formulation of the department's opinion</p>
+ </td>
+ <td colspan="2">
+ <p>鍘熷鏍搁儴闂ㄦ剰瑙�</p>
+ <p class="en">Opinion of the original audit department</p>
+ </td>
+ <td>
+ <p>鎵瑰噯</p>
+ <p class="en">Ratify</p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {{ currentInfo.applicant }}
+ </td>
+ <td colspan="2">
+ {{ currentInfo.formulation }}
+ </td>
+ <td colspan="2">
+ {{ currentInfo.audit }}
+ </td>
+ <td>
+ <img :src="javaApi + 'img/' + currentInfo.ratifyUserUrl" style="width: 100%;" alt="鎵瑰噯浜虹鍚�">
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </el-dialog>
+ <el-dialog title="鏂囦欢棰勮" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen>
+ <h4>淇鍐呭</h4>
+ <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.afterUrl" :currentFile="{}" />
+ <h4>鍘熷唴瀹�</h4>
+ <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.beforeUrl" :currentFile="{}" />
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import { exportHtmlToPDF } from '@/utils/downHtmlToPDF'
+import filePreview from '@/components/Preview/filePreview.vue'
+import {
+ exportOutManageRecordAudit,
+ addManageRecordAudit,
+ doManageRecordAudit,
+ selectCNSAPersonTree,
+ ratifyManageRecordAudit,
+ pageManageRecordAudit,
+ delManageRecordAudit,
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
+import {
+ selectUserCondition,
+} from "@/api/system/user.js";
+export default {
+ components: {
+ filePreview,
+ limsTable
+ },
+ data() {
+ return {
+ addPower: true,
+ outPower: true,
+ outLoading: false,
+ lookDialogVisible: false,
+ addLoading: false,
+ title: '鏂板',
+ addInfo: {
+ method: '淇',
+ },
+ addDialogVisible: false,
+ detailDialogVisible: false,
+ fileList: [],
+ personList: [],
+ list: [],
+ file: null,
+ title0: '鏌ョ湅',
+ currentInfo: {},
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢缂栧彿", prop: "documentCode" },
+ { label: "绔犺妭鍙�", prop: "capter", width: "120px" },
+ {
+ label: "椤电爜",
+ prop: "pages",
+ },
+ { label: "淇娆℃暟", prop: "number" },
+ { label: "淇敼鍓嶇増鏈彿", prop: "beforeVersion" },
+ { label: "淇敼鍚庣増鏈彿", prop: "afterVersion" },
+ { label: "淇敼鍐呭", prop: "alterThing" },
+ { label: "淇浜�", prop: "alterUserName" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鏃ユ湡", prop: "date" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook(row);
+ },
+ },
+ {
+ name: "鏂囦欢棰勮",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook0(row);
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleOut(row);
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleRatify(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鐢宠鎰忚",
+ type: "text",
+ clickFun: (row) => {
+ this.handlework0(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鍘熷畾鍒舵剰瑙�",
+ type: "text",
+ clickFun: (row) => {
+ this.handlework1(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鍘熷鏍告剰瑙�",
+ type: "text",
+ clickFun: (row) => {
+ this.handlework2(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ }
+ },
+ mounted() {
+ this.getList()
+ this.getFileList()
+ this.getAuthorizedPerson()
+ this.selectTreeList()
+ },
+ methods: {
+ getPower() {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let add = false
+ let del = false
+ let out = false;
+ let ratify = false
+ let audit1 = false
+ let audit2 = false
+ let audit3 = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'addManageRecordAudit') {
+ add = true
+ }
+ if (power[i].menuMethod == 'delManageRecordAudit') {
+ del = true
+ }
+ if (power[i].menuMethod == 'ratifyManageRecordAudit') {
+ ratify = true
+ }
+ if (power[i].menuMethod == 'exportOutManageRecordAudit') {
+ out = true
+ }
+ if (power[i].menuMethod == 'manageRecordAudit1') {
+ audit1 = true
+ }
+ if (power[i].menuMethod == 'manageRecordAudit2') {
+ audit2 = true
+ }
+ if (power[i].menuMethod == 'manageRecordAudit3') {
+ audit3 = true
+ }
+ }
+ if (!audit3) {
+ this.componentData.do.splice(8, 1)
+ }
+ if (!audit2) {
+ this.componentData.do.splice(7, 1)
+ }
+ if (!audit1) {
+ this.componentData.do.splice(6, 1)
+ }
+ if (!ratify) {
+ this.componentData.do.splice(5, 1)
+ }
+ if (!add) {
+ this.componentData.do.splice(4, 1)
+ }
+ if (!del) {
+ this.componentData.do.splice(3, 1)
+ }
+ this.addPower = add
+ this.outPower = out
+ },
+ openAdd() {
+ this.addInfo = {
+ method: '淇',
+ }
+ this.title = '鏂板'
+ this.addDialogVisible = true;
+ },
+ // 瀵煎嚭
+ handleDown() {
+ this.outLoading = true
+ exportOutManageRecordAudit(this.queryParams).then(res => {
+ this.outLoading = false
+ if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, "鏂囦欢淇琛�");
+ })
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordAudit({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ refresh() {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
+ },
+ // 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
+ getFileList() {
+ pageManageDocumentList({
+ current: -1,
+ size: -1
+ }).then(res => {
+ this.fileList = res.data.records.map(m => {
+ m.title = m.documentCode
+ return m
+ })
+ }).catch(err => { })
+ },
+ getCurrentFile(e) { },
+ handleAdd() {
+ if (!this.addInfo.documentCode) return this.$message({ type: 'error', message: "璇疯緭鍏ユ枃浠剁紪鍙�" })
+ if (!this.addInfo.id) {
+ // 鏂板
+ let fd = new FormData();
+ //鏂囦欢淇℃伅涓璻aw鎵嶆槸鐪熺殑鏂囦欢
+ if (this.file) {
+ fd.append("file", this.file.raw);
+ }
+ for (let m in this.addInfo) {
+ fd.append(m, this.addInfo[m])
+ }
+ this.addLoading = true
+ addManageRecordAudit(fd).then(res => {
+ this.addLoading = false
+ if (res.code == 200) {
+ this.$message({
+ type: 'success',
+ message: '娣诲姞鎴愬姛'
+ })
+ this.refreshTable()
+ this.addDialogVisible = false
+ } else {
+ this.$message({
+ type: 'error',
+ message: '娣诲姞澶辫触'
+ })
+ }
+ })
+ } else {
+ // 淇敼
+ let { id, method, documentCode, documentName, capter, pages, beforeVersion, afterVersion, alterUser, alterThing, reason, beforeDepart, afterDepart, number, applicant, formulation, audit, date } = this.addInfo
+ let fd = new FormData();
+ //鏂囦欢淇℃伅涓璻aw鎵嶆槸鐪熺殑鏂囦欢
+ if (this.file) {
+ fd.append("file", this.file.raw);
+ }
+ let obj = { id, method, documentCode, documentName, capter, pages, beforeVersion, afterVersion, alterUser, alterThing, reason, beforeDepart, afterDepart, number, applicant, formulation, audit, date }
+ for (let m in obj) {
+ if (this.addInfo[m]) {
+ fd.append(m, this.addInfo[m])
+ }
+ }
+ this.addLoading = true
+ doManageRecordAudit(fd).then(res => {
+ this.addLoading = false
+ if (res.code == 200) {
+ this.refreshTable()
+ this.addDialogVisible = false
+ } else {
+ this.$message({
+ type: 'error',
+ message: '娣诲姞澶辫触'
+ })
+ }
+ })
+ }
+ },
+ getAuthorizedPerson() {
+ selectUserCondition().then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.personList = data
+ })
+ },
+ // 鏌ヨ鏍戝舰鍒楄〃
+ selectTreeList() {
+ selectCNSAPersonTree().then((res) => {
+ this.list = res.data[0].children;
+ });
+ },
+ handleChangeUpload(file, fileLists) {
+ this.file = file
+ // this.$set(this.addInfo,'name',file.name)
+ },
+ handleEdit(row) {
+ this.addInfo = row
+ this.title = '淇敼'
+ this.addDialogVisible = true;
+ },
+ // 瀹℃壒
+ handleRatify(row) {
+ this.$confirm('鏄惁鎵瑰噯閫氳繃?', '鎵瑰噯', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ })
+ .then(() => {
+ ratifyManageRecordAudit({ id: row.id }).then(res => {
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success('鎿嶄綔鎴愬姛');
+ this.refreshTable();
+ })
+ .catch(e => {
+ this.$message.error('鎿嶄綔澶辫触');
+ });
+ })
+ .catch(() => {
+ });
+ },
+ handlework0(row) {
+ this.addInfo = row
+ this.title = '鐢宠閮ㄩ棬涓荤鎰忚'
+ this.addDialogVisible = true;
+ },
+ handlework1(row) {
+ this.addInfo = row
+ this.title = '鍘熷畾鍒堕儴闂ㄦ剰瑙�'
+ this.addDialogVisible = true;
+ },
+ handlework2(row) {
+ this.addInfo = row
+ this.title = '鍘熷鏍搁儴闂ㄦ剰瑙�'
+ this.addDialogVisible = true;
+ },
+ handleLook(row) {
+ this.title0 = '鏌ョ湅'
+ this.currentInfo = row
+ this.detailDialogVisible = true;
+ },
+ handleOut(row) {
+ this.currentInfo = row
+ this.title0 = '涓嬭浇'
+ this.detailDialogVisible = true;
+ setTimeout(() => {
+ this.$nextTick(() => {
+ const element = document.getElementById("dialogBody");
+ exportHtmlToPDF(element, '鏂囦欢' + row.method + '鐢宠琛�').then(res => {
+ this.detailDialogVisible = false;
+ })
+ })
+ }, 500);
+ },
+ handleLook0(row) {
+ this.currentInfo = row;
+ this.lookDialogVisible = true
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordAudit({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ });
+ })
+ .catch(() => { });
+ },
+ }
+}
+</script>
+
+<style scoped>
+.title {
+ height: 60px;
+ line-height: 60px;
+}
+
+.search {
+ background-color: #fff;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ position: relative;
+}
+
+.search_thing {
+ width: 350px;
+ display: flex;
+ align-items: center;
+}
+
+.search_label {
+ width: 110px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 110px);
+}
+
+.table {
+ margin-top: 10px;
+ background-color: #fff;
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ padding: 20px;
+ padding-top: 0;
+}
+
+.tables {
+ table-layout: fixed;
+ width: 100%;
+ margin-top: 10px;
+ border-collapse: collapse;
+}
+
+.tables td {
+ height: 40px;
+ width: 100px;
+ text-align: center;
+ font-size: 14px;
+ word-wrap: break-word;
+ white-space: normal;
+}
+
+.en {
+ font-size: 12px;
+ word-break: break-word;
+ /* 鑷姩鏂 */
+ overflow-wrap: break-word;
+ /* 闃叉婧㈠嚭 */
+ white-space: normal;
+ /* 榛樿鎹㈣ */
+}
+
+.heads td {
+ border: 1px dashed black;
+ /* 鍗曞厓鏍肩殑铏氱嚎 */
+ padding: 8px;
+ text-align: left;
+}
+
+.downPdf {
+ opacity: 0 !important;
+}
+
+h4.title {
+ position: relative;
+ height: 30px;
+ line-height: 30px;
+ box-sizing: border-box;
+ padding-left: 16px;
+ margin-left: 10px;
+ margin-bottom: 10px;
+}
+
+h4.title::after {
+ content: '';
+ width: 4px;
+ height: 20px;
+ background: #3A7BFA;
+ position: absolute;
+ top: 5px;
+ left: 0;
+}
+
+>>>.el-dialog__body {
+ height: auto;
+}
+
+.btn {
+ position: absolute;
+ right: 20px;
+ top: 16px;
+}
+</style>
--
Gitblit v1.9.3