曹睿
2025-02-25 83be7ca0c138b64b3447cc207b63c7933690f6ec
Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
已修改34个文件
已添加50个文件
16724 ■■■■■ 文件已修改
public/index.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/insReport.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/inspectionTask.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/rawMaterialOrder.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/sample.js 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/unpass.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/unqualifiedHandler.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/standardMaterailRequistion/standardMaterailRequistion.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/standardMaterial/standardMaterial.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/systemManagement/correctiveAction.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/systemManagement/customerSatisfaction.js 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/systemManagement/documentRecords.js 299 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/systemManagement/internalAuditManagement.js 398 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/systemManagement/measuresDealRisks.js 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standard/standardLibrary.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/no-full.svg 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/styles/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Onlyoffice/onlyoffice.vue 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Preview/filePreview.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/lims-table.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/value-table.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/method/standardMethod/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterailRequistion/index.vue 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterial/component/borrowDia.vue 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterial/component/formDia.vue 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterial/component/returnDia.vue 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterial/index.vue 313 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/correctiveAction/components/ViewTestRecord.vue 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/correctiveAction/components/correctiveInfo.vue 258 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/correctiveAction/index.vue 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/customerSatisfaction/components/formDialog.vue 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/customerSatisfaction/index.vue 405 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentControl/components/FileList.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue 321 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue 335 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue 448 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue 343 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue 396 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/ViewTestRecord.vue 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspectionDia.vue 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSignDia.vue 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue 312 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/auditReportDia.vue 333 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveActionDIa.vue 409 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/implementPlanDia.vue 307 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue 292 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue 314 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlanDia.vue 342 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/internalAuditManagement/index.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue 332 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue 299 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/measuresDealRisks/index.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionReview/index.vue 434 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/components/InspectionWord.vue 2330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/index.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/customsInspection.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/add.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/auxiliaryWireCore.vue 154 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/cable-config.vue 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue 1016 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/sample/components/detail.vue 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/sample/index.vue 704 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/OAProcess.vue 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/PurchaseVerification.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/addUnPass.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/index-manage.vue 324 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/index.vue 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standard/standardLibrary/index.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/structural/premises/index.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/index.vue 211 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html
@@ -225,6 +225,7 @@
      </div>
    </div>
  </body>
  <script type='text/javascript' src='http://192.168.21.53:9001/web-apps/apps/api/documents/api.js'></script>
  <script src="<%= BASE_URL %>luckysheet/plugins/js/plugin.js"></script>
  <script src="<%= BASE_URL %>luckysheet/luckysheet.umd.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.min.js"></script>
src/api/business/insReport.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
// æŠ¥å‘Šç¼–制页面相关接口
import request from '@/utils/request'
// æŠ¥å‘Šè¿˜åŽŸ
export function upReportUrl(query) {
  return request({
    url: '/insReport/upReportUrl',
    method: 'post',
    data: query
  })
}
// æŸ¥è¯¢æ£€éªŒæŠ¥å‘Šæ•°æ®
export function pageInsReport(query) {
  return request({
    url: '/insReport/pageInsReport',
    method: 'get',
    params: query
  })
}
// æŠ¥å‘Šæ‰¹é‡ä¸‹è½½
export function downAll(query) {
  return request({
    url: '/insReport/downAll',
    method: 'get',
    params: query
  })
}
// æŠ¥å‘Šé€€å›žåˆ°æ£€éªŒä»»åŠ¡
export function sendBackTask(query) {
  return request({
    url: '/insReport/sendBackTask',
    method: 'post',
    data: query
  })
}
// æŠ¥å‘Šå®¡æ ¸
export function examineReport(query) {
  return request({
    url: '/insReport/examineReport',
    method: 'post',
    data: query
  })
}
// æŠ¥å‘Šæäº¤
export function writeReport(query) {
  return request({
    url: '/insReport/writeReport',
    method: 'post',
    data: query
  })
}
// æŠ¥å‘Šæ‰¹å‡†
export function ratifyReport(query) {
  return request({
    url: '/insReport/ratifyReport',
    method: 'post',
    data: query
  })
}
src/api/business/inspectionTask.js
@@ -51,7 +51,7 @@
  return request({
    url: "/insOrderPlan/upPlanUser",
    method: "post",
    data: data,
    params: data,
  });
}
@@ -213,7 +213,7 @@
  return request({
    url: "/insOrderPlan/verifyPlan",
    method: "post",
    data: data,
    params: data,
  });
}
@@ -222,7 +222,7 @@
  return request({
    url: "/insOrderPlan/checkSubmitPlan",
    method: "post",
    data: data,
    params: data,
  });
}
@@ -231,7 +231,7 @@
  return request({
    url: "/insOrderPlan/submitPlan",
    method: "post",
    data: data,
    params: data,
  });
}
@@ -279,3 +279,11 @@
    params: query,
  });
}
// æŸ¥è¯¢å¤æµ‹æ¨¡ç‰ˆ
export function getInsProductUnqualifiedRetest(query) {
  return request({
    url: "/insOrderPlan/getInsProductUnqualifiedRetest",
    method: "get",
    params: query,
  });
}
src/api/business/rawMaterialOrder.js
@@ -286,3 +286,11 @@
    params: query
  })
}
// ä¿å­˜ä¸åˆæ ¼å¤æµ‹æ•°æ®
export function saveUnqualifiedContext(query) {
  return request({
    url: '/insOrderPlan/saveUnqualifiedContext',
    method: 'delete',
    params: query
  })
}
src/api/business/sample.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
// æ ·å“ç®¡ç†é¡µé¢ç›¸å…³æŽ¥å£
import request from '@/utils/request'
// æŸ¥è¯¢ä»“库
export function selectWarehouse() {
  return request({
    url: '/warehouse/selectWarehouse',
    method: 'get'
  })
}
// æ ·å“å…¥åº“
export function inWarehouse(query) {
  return request({
    url: '/warehouse/inWarehouse',
    method: 'post',
    data: query
  })
}
// æ ·å“å‡ºåº“
export function outWarehouse(query) {
  return request({
    url: '/warehouse/outWarehouse',
    method: 'post',
    data: query
  })
}
// ä¿®æ”¹ä»“库
export function upWarehouse(query) {
  return request({
    url: '/warehouse/upWarehouse',
    method: 'post',
    data: query
  })
}
// æ·»åŠ ä»“åº“
export function addWarehouse(query) {
  return request({
    url: '/warehouse/addWarehouse',
    method: 'post',
    data: query
  })
}
// ä¿®æ”¹è´§æž¶
export function upShelf(query) {
  return request({
    url: '/warehouse/upShelf',
    method: 'post',
    data: query
  })
}
// æ·»åŠ è´§æž¶
export function addShelf(query) {
  return request({
    url: '/warehouse/addShelf',
    method: 'post',
    data: query
  })
}
// åˆ é™¤ä»“库
export function delWarehouse(query) {
  return request({
    url: '/warehouse/delWarehouse',
    method: 'delete',
    params: query
  })
}
// åˆ é™¤è´§æž¶
export function delShelf(query) {
  return request({
    url: '/warehouse/delShelf',
    method: 'delete',
    params: query
  })
}
// æŸ¥è¯¢è´§æž¶ä¸‹çš„存放信息
export function getWarehouse(query) {
  return request({
    url: '/warehouse/getWarehouse',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢è´§æž¶ä¸‹çš„存放信息
export function searchSampleId(query) {
  return request({
    url: '/warehouse/searchSampleId',
    method: 'post',
    data: query
  })
}
src/api/business/unpass.js
@@ -1,5 +1,4 @@
// ä¸åˆæ ¼ç®¡ç†ç›¸å…³æŽ¥å£
import request from "@/utils/request";
//查询进货验证信息
@@ -73,3 +72,11 @@
    data: data,
  });
}
// æŸ¥è¯¢ä¸åˆæ ¼æ ·å“æ•°æ®
export function pageInsUnPass(data) {
  return request({
    url: "/unPass/pageInsUnPass",
    method: "post",
    data: data,
  });
}
src/api/business/unqualifiedHandler.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
// ä¸åˆæ ¼å¤„理相关接口
import request from "@/utils/request";
//查询不合格处理
export function page(query) {
  return request({
    url: "/unqualifiedHandler/page",
    method: "get",
    params: query,
  });
}
//删除不合格处理
export function deleteUnqualifiedHandler(query) {
  return request({
    url: "/unqualifiedHandler/deleteUnqualifiedHandler",
    method: "delete",
    params: query,
  });
}
//删除不合格处理
export function pushOA(query) {
  return request({
    url: "/unqualifiedHandler/pushOA",
    method: "delete",
    params: query,
  });
}
src/api/cnas/resourceDemand/standardMaterailRequistion/standardMaterailRequistion.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
import request from '@/utils/request'
// åˆ†é¡µæŸ¥è¯¢
export function getPageSubstanceRecord(query) {
  return request({
    url: '/feStandardSubstanceRecord/getPageSubstanceRecord',
    method: 'get',
    params: query
  })
}
src/api/cnas/resourceDemand/standardMaterial/standardMaterial.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
import request from '@/utils/request'
// èŽ·å–å®žéªŒå®¤åç§°
export function getPageStandardSubstance(query) {
  return request({
    url: '/feStandardSubstance/getPageStandardSubstance',
    method: 'get',
    params: query
  })
}
//标准物质清单新增编辑
export function addStandardSubstance(query) {
  return request({
    url: '/feStandardSubstance/addStandardSubstance',
    method: 'post',
    data: query
  })
}
//删除标准物质清单
export function removeStandardSubstance(query) {
  return request({
    url: '/feStandardSubstance/removeStandardSubstance',
    method: 'delete',
    params: query
  })
}
// æ–‡ä»¶å˜æ›´-导出
export function exportOfStandardSubstanceList(query) {
  return request({
    url: "/feStandardSubstance/exportOfStandardSubstanceList",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//标准物质清单借用
export function borrowSubstance(query) {
  return request({
    url: '/feStandardSubstanceRecord/borrowSubstance',
    method: 'post',
    data: query
  })
}
//标准物质清单归还
export function returnSubstance(query) {
  return request({
    url: '/feStandardSubstanceRecord/returnSubstance',
    method: 'post',
    data: query
  })
}
src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
import request from '@/utils/request'
export function getPageAcceptance(query) {
  return request({
    url: '/feStandardSubstanceAcceptance/getPageAcceptance',
    method: 'get',
    params: query
  })
}
export function updateAcceptanc(query) {
  return request({
    url: '/feStandardSubstanceAcceptance/updateAcceptanc',
    method: 'post',
    data: query
  })
}
export function addAcceptance(query) {
  return request({
    url: '/feStandardSubstanceAcceptance/addAcceptance',
    method: 'post',
    data: query
  })
}
src/api/cnas/systemManagement/correctiveAction.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
// çº æ­£æŽªæ–½ç›¸å…³æŽ¥å£
import request from "@/utils/request";
//查询监督纠正措施列表
export function pageSuperviseDetailCorrect(query) {
  return request({
    url: "/qualitySupervise/pageSuperviseDetailCorrect",
    method: "get",
    params: query,
  });
}
//导出监督纠正措施
export function exportSuperviseDetaillCorrect(query) {
  return request({
    url: "/qualitySupervise/exportSuperviseDetaillCorrect",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//查询监督纠正措施附件
export function getSuperviseDetailCorrectFileList(query) {
  return request({
    url: "/qualitySupervise/getSuperviseDetailCorrectFileList",
    method: "get",
    params: query,
  });
}
//删除监督纠正措施附件
export function delSuperviseDetailCorrectFile(query) {
  return request({
    url: "/qualitySupervise/delSuperviseDetailCorrectFile",
    method: "delete",
    params: query,
  });
}
//查询监督纠正处理
export function getSuperviseDetailCorrect(query) {
  return request({
    url: "/qualitySupervise/getSuperviseDetailCorrect",
    method: "get",
    params: query,
  });
}
//查询今年人员培训信息
export function getThisYearTrainingDetailed(query) {
  return request({
    url: "/personTraining/getThisYearTrainingDetailed",
    method: "get",
    params: query,
  });
}
src/api/cnas/systemManagement/customerSatisfaction.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
// å®¢æˆ·æ»¡æ„åº¦ç›¸å…³æŽ¥å£
import request from "@/utils/request";
//客户满意度调查列表
export function pageClientSatisfaction(query) {
  return request({
    url: "/clientSatisfaction/pageClientSatisfaction",
    method: "get",
    params: query,
  });
}
//查询客户分析附件
export function pageAnalyseFile(query) {
  return request({
    url: "/clientSatisfaction/pageAnalyseFile",
    method: "get",
    params: query,
  });
}
//删除新增客户满意度调查
export function delClientSatisfaction(query) {
  return request({
    url: "/clientSatisfaction/delClientSatisfaction",
    method: "delete",
    params: query,
  });
}
//删除客户分析附件
export function delAnalyseFile(query) {
  return request({
    url: "/clientSatisfaction/delAnalyseFile",
    method: "delete",
    params: query,
  });
}
// æ–°å¢žå®¢æˆ·æ»¡æ„åº¦è°ƒæŸ¥
export function addClientSatisfaction(data) {
  return request({
    url: "/clientSatisfaction/addClientSatisfaction",
    method: "post",
    data: data,
  });
}
// ä¿®æ”¹æ–°å¢žå®¢æˆ·æ»¡æ„åº¦è°ƒæŸ¥
export function updateClientSatisfaction(data) {
  return request({
    url: "/clientSatisfaction/updateClientSatisfaction",
    method: "post",
    data: data,
  });
}
src/api/cnas/systemManagement/documentRecords.js
@@ -63,3 +63,302 @@
    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,
  });
}
src/api/cnas/systemManagement/internalAuditManagement.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,398 @@
// å†…审管理相关接口
import request from "@/utils/request";
//年度计划-分页
export function pageInternalPlan(query) {
  return request({
    url: "/internalPlan/pageInternalPlan",
    method: "get",
    params: query,
  });
}
//年度计划-删除
export function delInternalPlan(query) {
  return request({
    url: "/internalPlan/delInternalPlan",
    method: "delete",
    params: query,
  });
}
//年度计划-导出
export function exportInternalPlan(query) {
  return request({
    url: "/internalPlan/exportInternalPlan",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//年度计划详情
export function getInternalPlanOne(query) {
  return request({
    url: "/internalPlan/getInternalPlanOne",
    method: "get",
    params: query,
  });
}
// å¹´åº¦è®¡åˆ’-新增
export function addInternalPlan(data) {
  return request({
    url: "/internalPlan/addInternalPlan",
    method: "post",
    data: data,
  });
}
// å¹´åº¦è®¡åˆ’-修改
export function updateInternalPlan(data) {
  return request({
    url: "/internalPlan/updateInternalPlan",
    method: "post",
    data: data,
  });
}
// å¹´åº¦è®¡åˆ’-审核
export function examineInternalPlan(data) {
  return request({
    url: "/internalPlan/examineInternalPlan",
    method: "post",
    data: data,
  });
}
// å¹´åº¦è®¡åˆ’-批准
export function ratifyInternalPlan(data) {
  return request({
    url: "/internalPlan/ratifyInternalPlan",
    method: "post",
    data: data,
  });
}
//内审实施计划分页查询
export function pageInternalImplement(query) {
  return request({
    url: "/internalImplement/pageInternalImplement",
    method: "get",
    params: query,
  });
}
//内审实施计划删除
export function delInternalImplement(query) {
  return request({
    url: "/internalImplement/delInternalImplement",
    method: "delete",
    params: query,
  });
}
//导出内审实施计划
export function exportInternalImplement(query) {
  return request({
    url: "/internalImplement/exportInternalImplement",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//内审实施计划详情
export function getInternalImplementOne(query) {
  return request({
    url: "/internalImplement/getInternalImplementOne",
    method: "get",
    params: query,
  });
}
// å†…审实施计划新增
export function addInternalImplement(data) {
  return request({
    url: "/internalImplement/addInternalImplement",
    method: "post",
    data: data,
  });
}
// å†…审实施计划修改
export function updateInternalImplement(data) {
  return request({
    url: "/internalImplement/updateInternalImplement",
    method: "post",
    data: data,
  });
}
// å†…审实施计划修改
export function ratifyInternalImplement(data) {
  return request({
    url: "/internalImplement/ratifyInternalImplement",
    method: "post",
    data: data,
  });
}
//会议签到查询
export function pageInternalMeeting(query) {
  return request({
    url: "/internalMeeting/pageInternalMeeting",
    method: "get",
    params: query,
  });
}
// ä¼šè®®ç­¾åˆ°åˆ é™¤
export function delInternalMeeting(query) {
  return request({
    url: "/internalMeeting/delInternalMeeting",
    method: "delete",
    params: query,
  });
}
//导出内审会议
export function exportInternalMeeting(query) {
  return request({
    url: "/internalMeeting/exportInternalMeeting",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//会议签到查询详情
export function getInternalMeetingOne(query) {
  return request({
    url: "/internalMeeting/getInternalMeetingOne",
    method: "get",
    params: query,
  });
}
// æ–°å¢žä¼šè®®ç­¾åˆ°
export function addInternalMeeting(data) {
  return request({
    url: "/internalMeeting/addInternalMeeting",
    method: "post",
    data: data,
  });
}
// ä¼šè®®ç­¾åˆ°ä¿®æ”¹
export function updateInternalMeeting(data) {
  return request({
    url: "/internalMeeting/updateInternalMeeting",
    method: "post",
    data: data,
  });
}
//内审检查分页查询
export function pageInternalCheck(query) {
  return request({
    url: "/internalCheck/pageInternalCheck",
    method: "get",
    params: query,
  });
}
//内审检查删除
export function delInternalCheck(query) {
  return request({
    url: "/internalCheck/delInternalCheck",
    method: "delete",
    params: query,
  });
}
//导出内审检查
export function exportInternalCheck(query) {
  return request({
    url: "/internalCheck/exportInternalCheck",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//内审检查详情
export function getInternalCheckOne(query) {
  return request({
    url: "/internalCheck/getInternalCheckOne",
    method: "get",
    params: query,
  });
}
// å†…审检查新增
export function addInternalCheck(data) {
  return request({
    url: "/internalCheck/addInternalCheck",
    method: "post",
    data: data,
  });
}
// å†…审检查修改
export function updateInternalCheck(data) {
  return request({
    url: "/internalCheck/updateInternalCheck",
    method: "post",
    data: data,
  });
}
// å†…审检查批准
export function ratifyInternalCheck(data) {
  return request({
    url: "/internalCheck/ratifyInternalCheck",
    method: "post",
    data: data,
  });
}
//查询内审管理纠正措施列表
export function pageInternalCorrect(query) {
  return request({
    url: "/internalCorrect/pageInternalCorrect",
    method: "get",
    params: query,
  });
}
//导出内审管理纠正措施附件
export function exportInternalCorrect(query) {
  return request({
    url: "/internalCorrect/exportInternalCorrect",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//查询内审管理纠正处理详情
export function getInternalCorrect(query) {
  return request({
    url: "/internalCorrect/getInternalCorrect",
    method: "get",
    params: query,
  });
}
// æäº¤å†…审管理纠正措施列表
export function addInternalCorrect(data) {
  return request({
    url: "/internalCorrect/addInternalCorrect",
    method: "post",
    data: data,
  });
}
//内审报告删除
export function delInternalReport(query) {
  return request({
    url: "/internalReport/delInternalReport",
    method: "delete",
    params: query,
  });
}
//内审报告分页查询
export function pageInternalReport(query) {
  return request({
    url: "/internalReport/pageInternalReport",
    method: "get",
    params: query,
  });
}
//导出内审报告
export function exportInternalReport(query) {
  return request({
    url: "/internalReport/exportInternalReport",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//内审报告详情
export function getInternalReportOne(query) {
  return request({
    url: "/internalReport/getInternalReportOne",
    method: "get",
    params: query,
  });
}
// å†…审报告新增
export function addInternalReport(data) {
  return request({
    url: "/internalReport/addInternalReport",
    method: "post",
    data: data,
  });
}
// å†…审报告修改
export function updateInternalReport(data) {
  return request({
    url: "/internalReport/updateInternalReport",
    method: "post",
    data: data,
  });
}
// å†…审报告审核
export function examineInternalReport(data) {
  return request({
    url: "/internalReport/examineInternalReport",
    method: "post",
    data: data,
  });
}
// å†…审报告负责人填写
export function qualityInternalReport(data) {
  return request({
    url: "/internalReport/qualityInternalReport",
    method: "post",
    data: data,
  });
}
//查询内审管理纠正措施附件
export function getInternalCorrectFileList(query) {
  return request({
    url: "/internalCorrect/getInternalCorrectFileList",
    method: "get",
    params: query,
  });
}
//删除内审管理纠正措施附件
export function delInternalCorrectFile(query) {
  return request({
    url: "/internalCorrect/delInternalCorrectFile",
    method: "delete",
    params: query,
  });
}
src/api/cnas/systemManagement/measuresDealRisks.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,116 @@
// åº”对风险的措施相关接口
import request from "@/utils/request";
//危险因素辨识与风险评价结果一览 åˆ†é¡µ
export function getPageResults(query) {
  return request({
    url: "/manageRiskAssessmentResults/getPageResults",
    method: "get",
    params: query,
  });
}
// å±é™©å› ç´ è¾¨è¯†ä¸Žé£Žé™©è¯„价结果一览 å®¡æ‰¹
export function dangerousRiskApproval(data) {
  return request({
    url: "/manageRiskAssessmentResults/dangerousRiskApproval",
    method: "post",
    data: data,
  });
}
// å±é™©å› ç´ è¾¨è¯†ä¸Žé£Žé™©è¯„价结果一览 æ‰¹å‡†
export function hazardIdentificationAndRiskApproval(data) {
  return request({
    url: "/manageRiskAssessmentResults/hazardIdentificationAndRiskApproval",
    method: "post",
    data: data,
  });
}
//危险因素辨识与风险评价结果一览 åˆ é™¤
export function removeRiskFactors(query) {
  return request({
    url: "/manageRiskAssessmentResults/removeRiskFactors",
    method: "delete",
    params: query,
  });
}
// å±é™©å› ç´ è¾¨è¯†ä¸Žé£Žé™©è¯„价结果一览 æ–°å¢ž
export function addNewRiskFactors(data) {
  return request({
    url: "/manageRiskAssessmentResults/addNewRiskFactors",
    method: "post",
    data: data,
  });
}
//危险因素辨识与风险评价结果一览 å¯¼å‡º
export function exportHazardFactorIdentification(query) {
  return request({
    url: "/manageRiskAssessmentResults/exportHazardFactorIdentification",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
//重大风险因素分析及控制计划清单 åˆ†é¡µ
export function getPageList(query) {
  return request({
    url: "/manageControlPlanList/getPageList",
    method: "get",
    params: query,
  });
}
// é‡å¤§é£Žé™©å› ç´ åˆ†æžåŠæŽ§åˆ¶è®¡åˆ’清单 å®¡æ ¸
export function riskAnalysisApprovalOfControlPlanChecklist(data) {
  return request({
    url: "/manageControlPlanList/riskAnalysisApprovalOfControlPlanChecklist",
    method: "post",
    data: data,
  });
}
// é‡å¤§é£Žé™©å› ç´ åˆ†æžåŠæŽ§åˆ¶è®¡åˆ’清单 æ‰¹å‡†
export function approvalOfControlPlanChecklist(data) {
  return request({
    url: "/manageControlPlanList/approvalOfControlPlanChecklist",
    method: "post",
    data: data,
  });
}
//重大风险因素分析及控制计划清单 åˆ é™¤
export function deleteSignificantRiskFactorAnalysis(query) {
  return request({
    url: "/manageControlPlanList/deleteSignificantRiskFactorAnalysis",
    method: "delete",
    params: query,
  });
}
// é‡å¤§é£Žé™©å› ç´ åˆ†æžåŠæŽ§åˆ¶è®¡åˆ’清单 æ–°å¢ž
export function analysisOfMajorRiskFactorsAdded(data) {
  return request({
    url: "/manageControlPlanList/analysisOfMajorRiskFactorsAdded",
    method: "post",
    data: data,
  });
}
//重大风险因素分析及控制计划清单 å¯¼å‡º
export function exportSignificantRiskFactors(query) {
  return request({
    url: "/manageControlPlanList/exportSignificantRiskFactors",
    method: "get",
    headers: {
      responseType: "blob",
    },
    params: query,
  });
}
src/api/standard/standardLibrary.js
@@ -56,15 +56,6 @@
  });
}
// ç»™æ ‡å‡†æ ‘添加检验标准
export function addStandardMethodList(data) {
  return request({
    url: "/standardTree/addStandardMethodList",
    method: "post",
    data: data,
  });
}
// æ·»åŠ æ ‡å‡†æ ‘
export function addStandardTree(data) {
  return request({
@@ -101,32 +92,6 @@
  });
}
// åˆ é™¤æ ‡å‡†æ ‘下的检验标准
export function delStandardMethodByFLSSM(data) {
  return request({
    url: "/standardTree/delStandardMethodByFLSSM",
    method: "post",
    data: data,
  });
}
// åˆ é™¤æ ‡å‡†æ ‘下的检验标准
export function delStandardProductByIds(data) {
  return request({
    url: "/standardTree/delStandardProductByIds",
    method: "post",
    data: data,
  });
}
// æ–°å¢žæ ‡å‡†æ ‘下的检验项目
export function addStandardProduct(data) {
  return request({
    url: "/standardTree/addStandardProduct",
    method: "post",
    data: data,
  });
}
// é€šè¿‡æ£€éªŒæ ‡å‡†æŸ¥è¯¢æ£€éªŒé¡¹ç›®
export function selectStandardProductListByMethodId(query) {
src/assets/images/no-full.svg
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712111454775" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5950" width="18" height="18" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M354.133333 682.666667H256v-42.666667h170.666667v170.666667H384v-98.133334L243.2 853.333333l-29.866667-29.866666L354.133333 682.666667z m358.4 0l140.8 140.8-29.866666 29.866666-140.8-140.8V810.666667h-42.666667v-170.666667h170.666667v42.666667h-98.133334zM354.133333 384L213.333333 243.2l29.866667-29.866667L384 354.133333V256h42.666667v170.666667H256V384h98.133333z m358.4 0H810.666667v42.666667h-170.666667V256h42.666667v98.133333L823.466667 213.333333l29.866666 29.866667L712.533333 384z" fill="#606266" p-id="5951"></path></svg>
src/assets/styles/index.scss
@@ -195,3 +195,6 @@
.required-span {
  color: red;
}
table {
  border-collapse: collapse; /* å…³é”®å±žæ€§ï¼šåˆå¹¶è¾¹æ¡† */
}
src/components/Onlyoffice/onlyoffice.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,206 @@
<!--onlyoffice ç¼–辑器-->
<template>
  <div id="vabOnlyOffice"></div>
</template>
<script>
export default {
  name: "VabOnlyOffice",
  props: ['options'],
  data() {
    return {
      doctype: "",
      docEditor: null,
      //参考vabOnlyOffice组件参数配置
      option: {
        url: "",
        isEdit: false,
        fileType: "",
        title: "",
        lang: "zh-CN",
        isPrint: true,
        user: {},
        editUrl: ""
      }
    };
  },
  created() {
    if(this.options){
      const option = this.options
      this.option.url = option.url
      this.option.isEdit = option.isEdit === "true" ? true : false
      this.option.fileType = option.fileType
      this.option.title = option.title
      this.option.lang = option.lang
      this.option.isPrint = option.isPrint
      this.option.user.id = option.user_id
      this.option.user.name = option.user_name
      this.option.editUrl = option.editUrl
    }else{
      const option = this.$route.query
      this.option.url = option.url
      this.option.isEdit = option.isEdit === "true" ? true : false
      this.option.fileType = option.fileType
      this.option.title = option.title
      this.option.lang = option.lang
      this.option.isPrint = option.isPrint
      this.option.user.id = option.user_id
      this.option.user.name = option.user_name
      this.option.editUrl = option.editUrl
    }
  },
  beforeDestroy() {
    if (this.docEditor !== null) {
      this.docEditor.destroyEditor();
      this.docEditor = null;
    }
  },
  watch: {
    option: {
      handler: function(n) {
        this.setEditor(n);
        this.doctype = this.getFileType(n.fileType);
      },
      deep: true
    }
  },
  mounted() {
    if (this.option.url) {
      this.setEditor(this.option);
    }
  },
  methods: {
    async setEditor(option) {
      if (this.docEditor !== null) {
        this.docEditor.destroyEditor();
        this.docEditor = null;
      }
      this.doctype = this.getFileType(option.fileType);
      let config = {
        document: {
          //后缀
          fileType: option.fileType,
          key: option.key || "",
          title: option.title,
          permissions: {
            edit: option.isEdit, //是否可以编辑: åªèƒ½æŸ¥çœ‹ï¼Œä¼ false
            print: option.isPrint,
            download: false
            // "fillForms": true,//是否可以填写表格,如果将mode参数设置为edit,则填写表单仅对文档编辑器可用。 é»˜è®¤å€¼ä¸Žedit或review参数的值一致。
            // "review": true //跟踪变化
          },
          url: option.url
        },
        documentType: this.doctype,
        editorConfig: {
          callbackUrl: option.editUrl, //"编辑word后保存时回调的地址,这个api需要自己写了,将编辑后的文件通过这个api保存到自己想要的位置
          lang: option.lang, //语言设置
          //定制
          customization: {
            autosave: true, //是否自动保存
            chat: true,
            comments: false,
            help: false,
            "hideRightMenu": false,//定义在第一次加载时是显示还是隐藏右侧菜单。 é»˜è®¤å€¼ä¸ºfalse
            //是否显示插件
            plugins: false
          },
          user: {
            id: option.user.id,
            name: option.user.name
          },
          mode: option.model ? option.model : "edit"
        },
        width: "100%",
        height: "100%",
        token: option.token || ""
      };
      // eslint-disable-next-line no-undef,no-unused-vars
      this.docEditor = new DocsAPI.DocEditor("vabOnlyOffice", config);
    },
    getFileType(fileType) {
      let docType = "";
      let fileTypesDoc = [
        "doc",
        "docm",
        "docx",
        "dot",
        "dotm",
        "dotx",
        "epub",
        "fodt",
        "htm",
        "html",
        "mht",
        "odt",
        "ott",
        "pdf",
        "rtf",
        "txt",
        "djvu",
        "xps"
      ];
      let fileTypesCsv = [
        "csv",
        "fods",
        "ods",
        "ots",
        "xls",
        "xlsm",
        "xlsx",
        "xlt",
        "xltm",
        "xltx"
      ];
      let fileTypesPPt = [
        "fodp",
        "odp",
        "otp",
        "pot",
        "potm",
        "potx",
        "pps",
        "ppsm",
        "ppsx",
        "ppt",
        "pptm",
        "pptx"
      ];
      if (fileTypesDoc.includes(fileType)) {
        docType = "text";
      }
      if (fileTypesCsv.includes(fileType)) {
        docType = "spreadsheet";
      }
      if (fileTypesPPt.includes(fileType)) {
        docType = "presentation";
      }
      return docType;
    }
  }
};
</script>
<style scoped>
html,
body {
  height: 100%;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100%;
}
.qualityManual-container {
  padding: 0 !important;
  height: 100%;
}
.qualityManual-container-office {
  width: 100%;
  height: calc(100% - 55px);
}
</style>
src/components/Preview/filePreview.vue
@@ -5,7 +5,7 @@
    </div>
    <div v-if="isPdf">
      <object :data="fileUrl" type="application/pdf" width="100%" height="750px">
        <p>您的浏览器不支持 PDF é¢„览。<a :href="fileUrl">下载 PDF æ–‡ä»¶</a></p>
        <p>您的浏览器不支持 PDF é¢„览。<a :href="fileUrl" style="color: #3a7bfa;">下载 PDF æ–‡ä»¶</a></p>
      </object>
    </div>
    <div v-if="isDoc">
src/components/Table/lims-table.vue
@@ -12,7 +12,7 @@
      <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey"
        :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue"
        :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop"
        :show-overflow-tooltip="item.dataType === 'action' ? false : true" :sortable="item.sortable ? true : false"
        :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" :sortable="item.sortable ? true : false"
        :type="item.type" :width="item.dataType === 'action' ? getWidth(item.operation) : item.width
          " align="center">
        <!-- <div class="123" v-if="item.type == ''"> -->
@@ -70,13 +70,21 @@
                @click="o.clickFun(scope.row)" :key="key">
                {{ o.name }}
              </el-button>
              <el-upload action="#" size="mini" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList)
                " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1"
              <el-upload
                :action="javaApi + o.url +'?id=' +(o.uploadIdFun ? o.uploadIdFun(scope.row): scope.row.id) "
                size="mini"
                ref="upload"
                :multiple="o.multiple ? o.multiple : false"
                :limit="1"
                :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept
                  ? o.accept
                  : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
                  " v-if="o.type == 'upload'" style="display: inline-block; width: 50px"
                v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed"
                v-show="o.showHide ? o.showHide(scope.row) : true"
                :headers="uploadHeader"
                :on-error="onError"
                :on-exceed="onExceed"
                :on-success="handleSuccessUp"
                :show-file-list="false" :key="key">
                <el-button :size="o.size ? o.size : 'small'" type="text"
                  :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
@@ -268,7 +276,7 @@
      row.forEach((a) => {
        count += a.name.length;
      });
      return count * 15 + 60 + "px";
      return count * 15 + 70 + "px";
    },
    iconFn(row) {
      if (row.name === "编辑" || row.name === "修改") {
@@ -297,6 +305,22 @@
    setCurrent(row) {
      this.$refs.multipleTable.setCurrentRow();
    },
    handleSuccessUp(response, label) {
      if (typeof label === "string") {
        if (response.code == 200) {
          this.upData[label] = response.data.url;
        }
      } else {
        if (response.code == 200) {
          this.$message.success("上传成功");
        }
      }
    },
    onError(err, file, fileList) {
      this.$message.error("上传失败");
      this.$refs.upload.clearFiles();
      this.uploading = false;
    },
    onExceed() {
      this.$message.warning("超出文件个数");
    },
src/components/Table/value-table.vue
@@ -243,14 +243,7 @@
                v-else
                ref="upload"
                :accept="a.uploadConfig.accept"
                :action="
                  javaApi +
                  a.uploadConfig.url +
                  '?id=' +
                  (a.uploadConfig.uploadIdFun
                    ? a.uploadConfig.uploadIdFun(scope.row)
                    : scope.row.id)
                "
                :action="javaApi + a.uploadConfig.url +'?id=' +(a.uploadConfig.uploadIdFun ? a.uploadConfig.uploadIdFun(scope.row): scope.row.id)"
                :disabled="
                  a.disabFun ? a.disabFun(scope.row, scope.$index) : false
                "
src/main.js
@@ -48,6 +48,7 @@
// å­—典数据组件
import DictData from "@/components/DictData";
import { checkPermi } from "@/utils/permission"; // æƒé™åˆ¤æ–­å‡½æ•°
import { getToken } from "@/utils/auth";
// å…¨å±€æ–¹æ³•挂载
Vue.prototype.getDicts = getDicts;
@@ -65,8 +66,11 @@
};
Vue.prototype.javaApi = process.env.VUE_APP_BASE_API
  ? process.env.VUE_APP_BASE_API
  : "http://192.168.1.36:8002";
  : "http://192.168.0.170:8002";
Vue.prototype.checkPermi = checkPermi;
Vue.prototype.uploadHeader = {
  Authorization: "Bearer " + getToken(),
};
// å…¨å±€ç»„件挂载
Vue.component("DictTag", DictTag);
src/views/CNAS/process/method/standardMethod/index.vue
@@ -53,9 +53,9 @@
        <el-button size="small" type="primary" @click="refreshTable()">查 è¯¢</el-button>
      </div>
      <div class="btn">
        <el-button size="small" @click="$refs.ValueTable.openUpload()" v-if="inPower">
        <!-- <el-button size="small" @click="$refs.ValueTable.openUpload()" v-if="inPower">
          <i class="el-icon-upload2" style="color: #3a7bfa"></i>
          <span style="color: #3a7bfa">导入</span></el-button>
          <span style="color: #3a7bfa">导入</span></el-button> -->
        <el-button size="small" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
      </div>
    </div>
src/views/CNAS/resourceDemand/standardMaterailRequistion/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,146 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
          <el-form-item label="标准物质名称" prop="name">
            <el-input size="small" placeholder="请输入" clearable v-model="searchForm.name"
                      @keyup.enter.native="searchList"></el-input>
          </el-form-item>
          <el-form-item label="规格型号" prop="factoryManufacturer">
            <el-input size="small" placeholder="请输入" clearable v-model="searchForm.model"
                      @keyup.enter.native="searchList"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button size="medium"  @click="resetSearchForm">重 ç½®</el-button>
            <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
  </div>
</template>
<script>
import limsTable from '@/components/Table/lims-table.vue'
import {
  getPageSubstanceRecord
} from '@/api/cnas/resourceDemand/standardMaterailRequistion/standardMaterailRequistion'
export default {
  components: {
    limsTable
    // TableCard,
    // ZTTable,
  },
  data() {
    return {
      searchForm: {
        name: '',
        factoryManufacturer: '',
      },
      tableColumn: [
        {
          label: '标准物质名称',
          prop: 'name',
          minWidth: '120'
        },
        {
          label: '规格型号',
          prop: 'model',
          minWidth: '100'
        },
        {
          label: '出厂编号',
          prop: 'factoryNum',
          minWidth: '100'
        },
        {
          label: '数量',
          prop: 'factoryNum',
          minWidth: '100'
        },
        {
          label: '领用人',
          prop: 'borrowUser',
          minWidth: '100'
        },
        {
          label: '领用日期',
          prop: 'borrowDate',
          minWidth: '100'
        },
        {
          label: '归还人',
          prop: 'returnIntegrity',
          minWidth: '100'
        },
        {
          label: '归还日期',
          prop: 'returnDate',
          minWidth: '100'
        },
        {
          label: '归还时状态',
          prop: 'returnIntegrity',
          minWidth: '100'
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        total: 0,
        size: 10,
        current: 1
      },
      total: 0,
      formDia: false,
      borrowDia: false,
      returnDia: false,
    }
  },
  mounted() {
    this.searchList()
  },
  methods :{
    // æŸ¥è¯¢åˆ—表
    searchList () {
      this.tableLoading = true
      getPageSubstanceRecord({
        ...this.page,
        ...this.searchForm
      }).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
      })
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm () {
      this.searchForm.name = '';
      this.searchForm.model = '';
      this.searchList()
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.searchList();
    },
  }
}
</script>
<style scoped>
.search {
  height: 46px;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/CNAS/resourceDemand/standardMaterial/component/borrowDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,148 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false"
               :close-on-press-escape="false"
               :visible.sync="formDia"
               title="标准物质借用"
               width="80%" @close="closeBorrowDia">
      <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="标准物质名称">
              <el-input v-model="form.name" disabled size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="型号">
              <el-input v-model="form.model" disabled size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="完好性" prop="integrity">
              <el-input v-model="form.integrity" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="借用人" prop="borrowUser">
              <el-input v-model="form.borrowUser" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系方式" prop="phone">
              <el-input v-model="form.phone" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="借出日期" prop="borrowDate">
              <el-date-picker
                v-model="form.borrowDate"
                clearable
                format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"
                size="small" style="width: 100%"
                type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="约定归还日期" prop="borrowReturnDate">
              <el-date-picker
                v-model="form.borrowReturnDate"
                clearable
                format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"
                size="small" style="width: 100%"
                type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="借出人" prop="lender">
              <el-input v-model="form.lender" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeBorrowDia">取 æ¶ˆ</el-button>
        <el-button :loading="loading" type="primary" @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  borrowSubstance
} from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial";
export default {
  name: 'borrowDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        name: '',
        model: '',
        integrity: '',
        borrowUser: '',
        phone: '',
        borrowDate: '',
        borrowReturnDate: '',
        lender: '',
        substanceId: ''
      },
      rules: {
        integrity: [{required: true, message: '请填写完好性',trigger: 'blur'}],
        borrowUser: [{required: true, message: '请填写借用人',trigger: 'blur'}],
        phone: [{required: true, message: '请填写联系方式',trigger: 'blur'}],
        borrowDate: [{required: true, message: '请选择借出日期',trigger: 'change'}],
        borrowReturnDate: [{required: true, message: '请选择约定归还日期',trigger: 'change'}],
        lender: [{required: true, message: '请选择lender',trigger: 'blur'}],
      },
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia (row) {
      this.formDia = true
      this.form.name = row.name
      this.form.model = row.model
      this.form.substanceId = row.id
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit () {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.loading = true
          this.form.status = '0';
          borrowSubstance(this.form).then(res =>{
            this.loading = false
            if (res.code === 200) {
              this.$message.success('操作成功')
              this.closeBorrowDia()
            }
          })
        } else {
          return false;
        }
      });
    },
    closeBorrowDia () {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeBorrowDia')
    },
  }
};
</script>
<style scoped>
</style>
src/views/CNAS/resourceDemand/standardMaterial/component/formDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,182 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false"
               :close-on-press-escape="false"
               :visible.sync="formDia"
               title="标准物质"
               width="80%" @close="closeYearDia">
      <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="标准物质名称" prop="name">
              <el-input v-model="form.name" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="规格型号" prop="model">
              <el-input v-model="form.model" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="生产厂家" prop="factoryManufacturer">
              <el-input v-model="form.factoryManufacturer" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出厂编号" prop="factoryNum">
              <el-input v-model="form.factoryNum" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="管理编号" prop="manageNum">
              <el-input v-model="form.manageNum" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="不确定度" prop="uncertainty">
              <el-input v-model="form.uncertainty" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="数量" prop="quantity">
              <el-input v-model="form.quantity" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="购置日期" prop="acquisitionDate">
              <el-date-picker
                v-model="form.acquisitionDate"
                clearable
                format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"
                size="small" style="width: 100%"
                type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="有效期" prop="effectiveDate">
              <el-date-picker
                v-model="form.effectiveDate"
                clearable
                format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"
                size="small" style="width: 100%"
                type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="档案编号" prop="fileNum">
              <el-input v-model="form.fileNum" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="存放位置" prop="position">
              <el-input v-model="form.position" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注" prop="remark">
              <el-input v-model="form.remark" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeYearDia">取 æ¶ˆ</el-button>
        <el-button :loading="loading" type="primary" @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  addStandardSubstance
} from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial";
export default {
  name: 'formDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        name: '',
        model: '',
        factoryManufacturer: '',
        factoryNum: '',
        manageNum: '',
        uncertainty: '',
        quantity: '',
        acquisitionDate: '',
        effectiveDate: '',
        fileNum: '',
        position: '',
        remark: '',
        id: '',
      },
      rules: {
        name: [{required: true, message: '请填写标准物质名称',trigger: 'blur'}],
        model: [{required: true, message: '请填写规格型号',trigger: 'blur'}],
        factoryManufacturer: [{required: true, message: '请填写生产厂家',trigger: 'blur'}],
        factoryNum: [{required: true, message: '请填写出厂编号',trigger: 'blur'}],
        manageNum: [{required: true, message: '请填写管理编号',trigger: 'blur'}],
        uncertainty: [{required: true, message: '请填写不确定度',trigger: 'blur'}],
        quantity: [{required: true, message: '请填写数量',trigger: 'blur'}],
        acquisitionDate: [{required: true, message: '请选择购置日期',trigger: 'change'}],
        effectiveDate: [{required: true, message: '请选择有效期',trigger: 'change'}],
        fileNum: [{required: true, message: '请填写档案编号',trigger: 'blur'}],
        position: [{required: true, message: '请填写存放位置',trigger: 'blur'}],
      },
      operationType: '',
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia (type, row) {
      this.formDia = true
      this.operationType = type
      if (type !== 'add') {
        this.form = row
      }
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit () {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.loading = true
          addStandardSubstance(this.form).then(res => {
            this.loading = false
            if (res.code === 201) return
            this.$message.success('操作成功')
            this.closeYearDia()
          }).catch(err => {
            console.log('err---', err);
            this.loading = false
          })
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    closeYearDia () {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeYearDia')
    },
  }
};
</script>
<style scoped>
</style>
src/views/CNAS/resourceDemand/standardMaterial/component/returnDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,125 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false"
               :close-on-press-escape="false"
               :visible.sync="formDia"
               title="标准物质归还"
               width="80%" @close="closeReturnDia">
      <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="标准物质名称" prop="name">
              <el-input v-model="form.name" disabled size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="型号" prop="model">
              <el-input v-model="form.model" disabled size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="归还日期" prop="returnDate">
              <el-date-picker
                v-model="form.returnDate"
                clearable
                format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"
                size="small" style="width: 100%"
                type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="归还人" prop="returnedPerson">
              <el-input v-model="form.returnedPerson" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="完好性" prop="returnIntegrity">
              <el-input v-model="form.returnIntegrity" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="检查人" prop="rummager">
              <el-input v-model="form.rummager" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeReturnDia">取 æ¶ˆ</el-button>
        <el-button :loading="loading" type="primary" @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  returnSubstance
} from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial";
export default {
  name: 'returnDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        name: '',
        model: '',
        returnedPerson: '',
        returnDate: '',
        returnIntegrity: '',
        rummager: '',
      },
      rules: {
      },
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia (row) {
      this.formDia = true
      this.form.name = row.name
      this.form.model = row.model
      this.form.substanceId = row.id
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit () {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.loading = true
          this.form.status = '1';
          returnSubstance(this.form).then(res => {
            this.loading = false
            if (res.code === 200) {
              this.$message.success('操作成功')
              this.closeReturnDia()
            }
          })
          let internalReport = this.HaveJson(this.form)
        } else {
          return false;
        }
      });
    },
    closeReturnDia () {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeReturnDia')
    },
  }
};
</script>
<style scoped>
</style>
src/views/CNAS/resourceDemand/standardMaterial/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,313 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
          <el-form-item label="标准物质名称" prop="name">
            <el-input size="small" placeholder="请输入" clearable v-model="searchForm.name"
                      @keyup.enter.native="searchList"></el-input>
          </el-form-item>
          <el-form-item label="生产厂家" prop="factoryManufacturer">
            <el-input size="small" placeholder="请输入" clearable v-model="searchForm.factoryManufacturer"
                      @keyup.enter.native="searchList"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">查 è¯¢</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">重 ç½®</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div>
        <el-button size="medium" @click="exportFun">导 å‡º</el-button>
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <form-dia v-if="formDia" ref="formDia" @closeYearDia="closeYearDia"></form-dia>
    <borrow-dia v-if="borrowDia" ref="borrowDia" @closeYearDia="closeBorrowDia"></borrow-dia>
    <return-dia v-if="returnDia" ref="returnDia" @closeYearDia="closeReturnDia"></return-dia>
  </div>
</template>
<script>
// import FormDia from '../do/a6-standard-material-list/formDia.vue';
// import BorrowDia from '../do/a6-standard-material-list/borrowDia.vue';
// import ReturnDia from '../do/a6-standard-material-list/returnDia.vue';
import limsTable from '@/components/Table/lims-table.vue'
import {
  getPageStandardSubstance,
  removeStandardSubstance,
  exportOfStandardSubstanceList
} from '@/api/cnas/resourceDemand/standardMaterial/standardMaterial'
import FormDia from '../standardMaterial/component/formDia.vue';
import BorrowDia from '../standardMaterial/component/borrowDia.vue';
import ReturnDia from '../standardMaterial/component/returnDia.vue';
export default {
  components: {
    limsTable,
    FormDia,
    BorrowDia,
    ReturnDia
  },
  data() {
    return {
      searchForm: {
        name: '',
        factoryManufacturer: '',
      },
      tableColumn: [
        {
          label: '标准物质名称',
          prop: 'name',
          minWidth: '120'
        },
        {
          label: '规格型号',
          prop: 'model',
          minWidth: '100'
        },
        {
          label: '生产厂家',
          prop: 'factoryManufacturer',
          minWidth: '100'
        },
        {
          label: '出厂编号',
          prop: 'factoryNum',
          minWidth: '100'
        },
        {
          label: '管理编号',
          prop: 'manageNum',
          minWidth: '100'
        },
        {
          label: '不确定度',
          prop: 'uncertainty',
          minWidth: '100'
        },
        {
          label: '数量',
          prop: 'quantity',
          minWidth: '100'
        },
        {
          label: '购置日期',
          prop: 'acquisitionDate',
          minWidth: '150'
        },
        {
          label: '有效期',
          prop: 'effectiveDate',
          minWidth: '150'
        },
        {
          label: '档案编号',
          prop: 'fileNum',
          minWidth: '100'
        },
        {
          label: '存放位置',
          prop: 'position',
          minWidth: '100'
        },
        {
          label: '备注',
          prop: 'remark',
          minWidth: '100'
        },
        // {
        //   label: '创建人',
        //   prop: 'createUser',
        //   minWidth: '100'
        // },
        {
          label: '创建时间',
          prop: 'createTime',
          minWidth: '150'
        },
        {
          dataType: 'action',
          fixed: 'right',
          minWidth: '180',
          label: '操作',
          operation: [
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('edit', row);
              },
            },
            {
              name: '借用',
              type: 'text',
              clickFun: (row) => {
                this.borrow(row);
              },
            },
            {
              name: '归还',
              type: 'text',
              clickFun: (row) => {
                this.return(row);
              }
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delPlan(row)
              },
            }
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        total: 0,
        size: 10,
        current: 1
      },
      total: 0,
      formDia: false,
      borrowDia: false,
      returnDia: false,
    }
  },
  mounted() {
    this.searchList()
  },
  methods :{
    exportFun() {
      this.outLoading = true
      exportOfStandardSubstanceList(this.searchForm).then(res =>{
        this.outLoading = false
        const blob = new Blob([res], {type: 'application/octet-stream'},false);
        let reader = new FileReader();
        reader.readAsText(blob, 'utf-8');
        reader.onload = () => {
          try {
            let result = JSON.parse(reader.result);
            if (result.message) {
              this.$message.error(result.message);
            } else {
              const url = URL.createObjectURL(blob);
              const link = document.createElement('a');
              link.href = url;
              link.download = '标准物质清单.xlsx';
              link.click();
              this.$message.success('导出成功')
            }
          } catch (err) {
            console.log(err);
            const url = URL.createObjectURL(blob);
            const link = document.createElement('a');
            link.href = url;
            link.download = '标准物质清单.xlsx';
            link.click();
            this.$message.success('导出成功')
          }
        }
      })
    },
    // æŸ¥è¯¢åˆ—表
    searchList () {
      this.tableLoading = true
      getPageStandardSubstance({
        ...this.page,
        ...this.searchForm
      }).then(res => {
        this.tableLoading = false
        if (res.code === 200){
          this.tableData = res.data.records
          this.page.total = res.data.total
        }
      })
    },
    // åˆ é™¤
    delPlan (row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        removeStandardSubstance({id:row.id}).then(res => {
          this.tableLoading = false
          if (res.code === 200) {
            this.$message.success('删除成功')
            this.searchList()
          }
        }).catch(err => {
          this.tableLoading = false
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // æ–°å¢žï¼Œç¼–辑,批准弹框
    openFormDia (type, row) {
      this.formDia = true
      this.$nextTick(() => {
        this.$refs.formDia.openDia(type, row)
      })
    },
    closeYearDia () {
      this.formDia = false
      this.searchList()
    },
    // å€Ÿç”¨
    borrow (row) {
      this.borrowDia = true
      this.$nextTick(() => {
        this.$refs.borrowDia.openDia(row)
      })
    },
    closeBorrowDia () {
      this.borrowDia = false
      this.searchList()
    },
    // å½’还
    return (row) {
      this.returnDia = true
      this.$nextTick(() => {
        this.$refs.returnDia.openDia(row)
      })
    },
    closeReturnDia () {
      this.returnDia = false
      this.searchList()
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm () {
      this.searchForm.name = '';
      this.searchForm.factoryManufacturer = '';
      this.searchList()
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.searchList();
    },
    // åˆ†é¡µ
  }
}
</script>
<style scoped>
.search {
  height: 46px;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,103 @@
<template>
    <el-dialog :visible.sync="dialogVisible" title="标准物质验收记录" width="70%">
        <!-- <el-steps :active="currentStep" finish-status="success">
            <el-step class="cursor-pointer" v-for="(item, index) in steps" :key="index" :title="item">
            </el-step>
        </el-steps> -->
<!--        <el-form :model="model" label-width="140px" size="small">-->
<!--            <Step1 :model.sync="model"></Step1>-->
<!--        </el-form>-->
        <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
            <el-button type="primary" @click="submit">保 å­˜</el-button>
        </span>
    </el-dialog>
</template>
<script>
// import Step1 from './Step/Step1.vue'
export default {
    components: {
        // Step1
    },
    data() {
        return {
            dialogVisible: false,
            currentStep: 0, // æ­¥éª¤æ¡æ˜¾ç¤ºç¬¬å‡ æ­¥
            // steps: ['提交', '开箱验收复核', '安装验收检查', '安装验收复核', '验收核查', '验收核查审核'],
            model: {
                acceptance: {
                    id: undefined,
                    producer: undefined, // åŽ‚å®¶ä»£è¡¨
                    file: undefined,   // ç›¸å…³é™„ä»¶
                    recipient: undefined,   // æŽ¥æ”¶äºº
                    signature: undefined,   // æŽ¥å—签字
                    situation: undefined,   // éªŒæ”¶æƒ…况
                    installation: undefined,    // å®‰è£…调试情况
                    substanceId: undefined, // æ¸…单
                    arriveDate: undefined,   // åˆ°è´§æ—¥æœŸ
                    maintenanceUnit: undefined,   // ç»´ä¿®å•位
                },
                list: []
            }
        }
    },
    watch: {
        model(newVal) {
            this.model = newVal
        }
    },
    methods: {
        clearForm() {
            this.model.acceptance.id = undefined
            this.model.acceptance.producer = undefined
            this.model.acceptance.file = undefined
            this.model.acceptance.recipient = undefined
            this.model.acceptance.signature = undefined
            this.model.acceptance.situation = undefined
            this.model.acceptance.installation = undefined
            this.model.acceptance.substanceId = undefined
            this.model.acceptance.arriveDate = undefined
            this.model.acceptance.maintenanceUnit = undefined
            this.model.list = []
        },
        openDialog(form) {
            console.log(form)
            if(form) {
                this.model.acceptance.id = form.acceptance.id
                this.model.acceptance.producer = form.acceptance.producer
                this.model.acceptance.file = form.acceptance.file
                this.model.acceptance.recipient = form.acceptance.recipient
                this.model.acceptance.signature = form.acceptance.signature
                this.model.acceptance.situation = form.acceptance.situation
                this.model.acceptance.installation = form.acceptance.installation
                this.model.acceptance.substanceId = form.acceptance.substanceId
                this.model.acceptance.arriveDate = form.acceptance.arriveDate
                this.model.acceptance.maintenanceUnit = form.acceptance.maintenanceUnit
                this.model.list = form.list
            } else {
                this.clearForm()
            }
            this.dialogVisible = true
        },
        closeDialog() {
            this.dialogVisible = false
        },
        submit() {
          if (!this.model.acceptance.substanceId) {
            this.$message.warning('请选择清单')
            return
          }
            this.$emit('submit', this.model)
            this.closeDialog()
        }
    }
}
</script>
<style scoped>
.cursor-pointer {
    cursor: pointer;
}
</style>
src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,201 @@
<!--<template>-->
<!--    <el-card class="card">-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="厂家代表">-->
<!--                <el-input v-model="model.acceptance.producer"></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="相关附件">-->
<!--                <div class="table-between">-->
<!--                    <el-input v-model="model.acceptance.file" style="width: 82%;"></el-input>-->
<!--                    <el-upload-->
<!--                        ref="upload"-->
<!--                        style="float: left; margin: 0 12px 0 20px;"-->
<!--                        :action="action"-->
<!--                        :show-file-list="false"-->
<!--                        :on-success="onSuccess"-->
<!--                    >-->
<!--                        <el-button type="primary">-->
<!--                            é™„件上传-->
<!--                        </el-button>-->
<!--                    </el-upload>-->
<!--                </div>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="接收人">-->
<!--                <el-input v-model="model.acceptance.recipient"></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="接受签字">-->
<!--                <el-input v-model="model.acceptance.signature"></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="验收情况">-->
<!--                <el-input v-model="model.acceptance.situation"></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="安装调试情况">-->
<!--                <el-input v-model="model.acceptance.installation"></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="清单" prop="substanceId" required>-->
<!--                <el-select v-model="model.acceptance.substanceId" placeholder="请选择" style="width: 100%">-->
<!--                    <el-option-->
<!--                        v-for="item in options"-->
<!--                        :key="item.value"-->
<!--                        :label="item.name"-->
<!--                        :value="item.id">-->
<!--                    </el-option>-->
<!--                </el-select>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="到货日期">-->
<!--                <el-date-picker-->
<!--                    v-model="model.acceptance.arriveDate"-->
<!--                    align="right"-->
<!--                    type="date"-->
<!--                    placeholder="选择日期"-->
<!--                    style="width: 100%"-->
<!--                    value-format="yyyy-MM-dd"-->
<!--                >-->
<!--                </el-date-picker>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="12">-->
<!--            <el-form-item label="维修单位">-->
<!--                <el-input v-model="model.acceptance.maintenanceUnit"></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="24">-->
<!--            <el-form-item label="备件确认">-->
<!--                <el-button type="primary" style="float: right;" @click="addSpareTable">增加行</el-button>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :span="24">-->
<!--            <el-form-item>-->
<!--                <ZTTable-->
<!--                    style="margin-bottom: 20px;"-->
<!--                    :column="spareColumns"-->
<!--                    :table-data="model.list"-->
<!--                >-->
<!--                    <template slot="name" slot-scope="{ row, index }">-->
<!--                        <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input>-->
<!--                        <span v-else>{{ row.name }}</span>-->
<!--                    </template>-->
<!--                    <template slot="number" slot-scope="{ row, index }">-->
<!--                        <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input>-->
<!--                        <span v-else>{{ row.number }}</span>-->
<!--                    </template>-->
<!--                    <template slot="action" slot-scope="{ row, index }">-->
<!--                        <div v-if="row.isEdit">-->
<!--                            <el-button type="text" @click="save(index)">保存</el-button>-->
<!--                            <el-button type="text">取消</el-button>-->
<!--                        </div>-->
<!--                        <div v-else>-->
<!--                            <el-button type="text" @click="edit(index)">修改</el-button>-->
<!--                        </div>-->
<!--                    </template>-->
<!--                </ZTTable>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--    </el-card>-->
<!--</template>-->
<!--<script>-->
<!--import ZTTable from '@/components/caorui/ZTTable/index.vue';-->
<!--import { getStandardSubstanceAll } from "@/assets/api/api";-->
<!--import axios from 'axios';-->
<!--export default {-->
<!--    components: {-->
<!--        ZTTable-->
<!--    },-->
<!--    props: {-->
<!--        model: {-->
<!--            type: Object,-->
<!--            default: () => {}-->
<!--        }-->
<!--    },-->
<!--    data() {-->
<!--        return {-->
<!--            spareColumns: [-->
<!--                {-->
<!--                    label: "名称",-->
<!--                    prop: "name",-->
<!--                    align: "center",-->
<!--                    dataType: "slot",-->
<!--                    slot: "name",-->
<!--                }, {-->
<!--                    label: "数量",-->
<!--                    prop: "number",-->
<!--                    align: "center",-->
<!--                    dataType: "slot",-->
<!--                    slot: "number",-->
<!--                }, {-->
<!--                    label: "操作",-->
<!--                    align: "center",-->
<!--                    dataType: "slot",-->
<!--                    slot: "action",-->
<!--                    width: 150-->
<!--                }-->
<!--            ],-->
<!--            options: []-->
<!--        }-->
<!--    },-->
<!--    computed: {-->
<!--        action() {-->
<!--            return `${this.javaApi}/${this.$api.personnel.saveCNASFile}`-->
<!--        }-->
<!--    },-->
<!--    mounted() {-->
<!--        this.getStand()-->
<!--    },-->
<!--    methods: {-->
<!--        async getStand() {-->
<!--            const { code, data } = await axios({-->
<!--                url: getStandardSubstanceAll,-->
<!--                method: 'get'-->
<!--            })-->
<!--            this.options = data-->
<!--        },-->
<!--        addSpareTable() {-->
<!--            this.model.list.push({-->
<!--                acceptanceId: this.model.acceptance.id,-->
<!--                name: '',-->
<!--                number: '',-->
<!--                isEdit: true-->
<!--            })-->
<!--        },-->
<!--        onSuccess(response) {-->
<!--            this.model.acceptance.file = response.data-->
<!--            this.$emit('update:model', this.model)-->
<!--        },-->
<!--        save(index) {-->
<!--            this.model.list[index].isEdit = false-->
<!--            this.$emit('update:model', this.model)-->
<!--        },-->
<!--        edit(index) {-->
<!--            this.model.list[index].isEdit = true-->
<!--        }-->
<!--    }-->
<!--}-->
<!--</script>-->
<!--<style scoped>-->
<!--.card {-->
<!--    margin-top: 1em;-->
<!--    height: 56vh;-->
<!--    overflow-y: scroll;-->
<!--}-->
<!--.table-between {-->
<!--    display: flex;-->
<!--    justify-content: space-between;-->
<!--}-->
<!--</style>-->
src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,230 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="form" ref="form" size="small" :inline="true">
          <el-form-item label="物质名称">
            <el-input v-model="form.search"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button @click="reset">重 ç½®</el-button>
            <el-button type="primary" @click="getTableData">查 è¯¢</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div>
        <el-button icon="el-icon-plus" size="small" type="primary" @click="openDialog">添加验收</el-button>
        <el-button size="small" type="primary" @click="exportExcel">导出</el-button>
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="columns" :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <AddRecord ref="addRecordRef" @submit="submit"></AddRecord>
  </div>
<!--    <div class="tables">-->
<!--      <ZTTable-->
<!--        :column="columns"-->
<!--        :table-data="tableData"-->
<!--      >-->
<!--        <template slot="action" slot-scope="{ row }">-->
<!--          <el-button type="text" @click="edit(row)">编辑</el-button>-->
<!--        </template>-->
<!--      </ZTTable>-->
<!--      <div class="pagination">-->
<!--        <div></div>-->
<!--        <el-pagination-->
<!--          :page-size="pagination.pageSize"-->
<!--          :page-sizes="[10, 20, 30, 40]"-->
<!--          :total="pagination.total"-->
<!--          layout="total, sizes, prev, pager, next, jumper"-->
<!--          @current-change="handleCurrent"-->
<!--          @size-change="handleSize"-->
<!--        >-->
<!--        </el-pagination>-->
<!--      </div>-->
<!--    </div>-->
<!--    <AddRecord ref="addRecordRef" @submit="submit"></AddRecord>-->
</template>
<script>
// import axios from "axios";
// import { getPageAcceptance, addAcceptance, updateAcceptance, getAcceptanceDetails, exportAcceptance } from "@/assets/api/api";
// import ZTTable from '@/components/caorui/ZTTable/index.vue';
// import AddRecord from './components/AddRecord.vue';
import limsTable from '@/components/Table/lims-table.vue'
import {
  getPageAcceptance,
  updateAcceptanc,
  addAcceptance
} from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept'
export default {
  components: {
    limsTable
  },
  data() {
    return {
      form: {
        search: undefined
      },
      columns: [
        {
          label: "出场编号",
          prop: "factoryNum"
        },
        {
          label: "有效期",
          prop: "effectiveDate"
        },
        {
          label: "生产厂家",
          prop: "factoryManufacturer"
        },
        {
          label: "文档编号",
          prop: "fileNum"
        },
        {
          label: "标准物质名称",
          prop: "name"
        },
        {
          label: "规格型号",
          prop: "model"
        },
        {
          label: "管理编号",
          prop: "manageNum"
        },
        {
          label: "存放位置",
          prop: "position"
        },
        // {
        //     label: "序列号",
        //     prop: "manageNum"
        // },
        {
          label: "提交日期",
          prop: "acquisitionDate"
        },
        {
          label: "数量",
          prop: "quantity"
        },
        {
          fixed: "right",
          label: "操作",
          align: "center",
          dataType: "slot",
          slot: "action",
        },
      ],
      tableData: [],
      page: {
        total: 0,
        size: 10,
        current: 1
      },
      tableLoading: false,
    }
  },
  mounted() {
    this.getTableData()
  },
  methods: {
    async getTableData() {
      const res = await  getPageAcceptance(this.form);
      if(res.code === 200){
        this.tableData = res.data.records;
        this.page.total = res.data.total;
      }
    },
    openDialog() {
      this.$refs.addRecordRef.openDialog()
    },
    async submit(form) {
      const {code} = await form.acceptance.id ? updateAcceptanc(this.form):addAcceptance((this.form));
      if(code == 200) {
        this.$message.success(`${form.acceptance.id ? '编辑':'添加'}成功`)
        this.getTableData()
      }
    },
    async edit(row) {
      const res = await this.getDetail(row.id)
      this.$refs.addRecordRef.openDialog({
        acceptance: res.acceptance,
        list: res.list
      })
    },
    async getDetail(id) {
      const { code, data } = await axios({
        method: 'get',
        url: getAcceptanceDetails,
        params: { id }
      })
      if(code == 200) {
        return data;
      }
    },
    reset() {
      this.form.search = undefined
      this.getTableData()
    },
    async exportExcel() {
      const res = await axios({
        method: "get",
        url: `${exportAcceptance}`,
        responseType: "blob"
      })
      const blob = new Blob([res], {type: 'application/octet-stream'});
      //将Blob å¯¹è±¡è½¬æ¢æˆå­—符串
      let reader = new FileReader();
      reader.readAsText(blob, 'utf-8');
      reader.onload = () => {
        try {
          let result = JSON.parse(reader.result);
          if (result.message) {
            this.$message.error(result.message);
          } else {
            const url = URL.createObjectURL(blob);
            const link = document.createElement('a');
            link.href = url;
            link.download = '标准物质验收.xlsx';
            link.click();
            this.$message.success('导出成功')
          }
        } catch (err) {
          console.log(err);
          const url = URL.createObjectURL(blob);
          const link = document.createElement('a');
          link.href = url;
          link.download = '标准物质验收.xlsx';
          link.click();
          this.$message.success('导出成功')
        }
      }
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.getTableData()
    },
  }
}
</script>
<style scoped>
.search {
  height: 46px;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/CNAS/systemManagement/correctiveAction/components/ViewTestRecord.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,169 @@
<template>
  <div>
    <el-dialog :visible.sync="filesDialogVisible" title="附件" width="80%" @closed="closeFilesLook">
      <div style="display: flex;justify-content: space-between;">
        <el-upload ref='upload' :action="fileAction" :auto-upload="true" :before-upload="fileBeforeUpload"
          :data="{ superviseDetailsCorrectId: info.superviseDetailsCorrectId }" :headers="uploadHeader"
          :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
          accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;">
          <el-button size="small" style="height: 38px" type="primary">附件上传</el-button>
        </el-upload>
      </div>
      <div>
        <limsTable ref="yearTable" :column="columnData" :height="'calc(100vh - 30em)'" :highlightCurrentRow="true"
          :table-data="tableData" :table-loading="tableLoading" style="margin-top: 0.5em;">
        </limsTable>
      </div>
    </el-dialog>
    <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>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
import {
  getSuperviseDetailCorrectFileList,
  delSuperviseDetailCorrectFile,
} from '@/api/cnas/systemManagement/correctiveAction.js'
export default {
  name: 'ViewTestRecord',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { filePreview, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      filesDialogVisible: false,
      tableLoading: false,
      filesLookInfo: {},
      columnData: [
        {
          label: '文件名称',
          prop: 'fileName',
          minWidth: '150px'
        },
        {
          dataType: 'action',
          minWidth: '100',
          label: '操作',
          fixed: 'right',
          operation: [
            {
              name: '预览',
              type: 'text',
              clickFun: (row) => {
                this.handleLook(row)
              }
            },
            {
              name: '下载',
              type: 'text',
              clickFun: (row) => {
                this.upload(row)
              }
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delete(row)
              }
            }
          ]
        }
      ],
      tableData: [],
      info: {},
      currentInfo: {},
      lookDialogVisible: false,
    };
  },
  // æ–¹æ³•集合
  methods: {
    openDia(row) {
      this.filesDialogVisible = true
      this.info = row
      this.searchTableList()
    },
    // æŸ¥è¯¢é™„件列表
    searchTableList() {
      this.tableLoading = true
      getSuperviseDetailCorrectFileList({ superviseDetailsCorrectId: this.info.superviseDetailsCorrectId }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data
      }).catch(err => {
        this.tableLoading = false
        console.log('err---', err);
      })
    },
    closeFilesLook() {
      this.filesDialogVisible = false
    },
    // æŸ¥çœ‹æ–‡ä»¶
    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);
      }
    },
    // åˆ é™¤
    delete(row) {
      this.tableLoading = true
      delSuperviseDetailCorrectFile({ superviseDetailsCorrectFileId: row.superviseDetailsCorrectFileId }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.$message.success('删除成功')
        this.searchTableList()
      }).catch(err => {
        this.tableLoading = false
        console.log('err---', err);
      })
    },
    // ä¸Šä¼ éªŒè¯
    fileBeforeUpload(file) {
      let flag = true
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        flag = false
      }
      if (!flag) {
        return Promise.reject(flag); //正确的终止
      }
    },
    onError(err, file, fileList, type) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    handleSuccessUp(response,) {
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.searchTableList()
      }
    },
  },
  computed: {
    fileAction() {
      return this.javaApi + '/qualitySupervise/uploadSuperviseDetailCorrectFile'
    }
  },
};
</script>
<style scoped></style>
src/views/CNAS/systemManagement/correctiveAction/components/correctiveInfo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,258 @@
<template>
  <div>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="纠正措施处理单"
      width="60%" @close="closeProcessingDia">
      <div style="height: 660px; overflow-y: auto">
        <table border="1" cellspacing="10" class="tables">
          <tr>
            <td class="td-title">
              <p>培训计划:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-select v-model="form.personTrainingDetailedId" clearable filterable style="width: 100%" disabled
                placeholder="请选择" size="small">
                <el-option v-for="item in yearTrainingDetailed" :key="item.id" :label="item.trainingObjectives"
                  :value="item.id">
                </el-option>
              </el-select>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>不合格或偏离事实的描述:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.raiseResult }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>提出人:</p>
            </td>
            <td class="td-info">
              {{ form.raiseUserName }}
            </td>
            <td class="td-title">
              <p>提出部门:</p>
            </td>
            <td class="td-info">
              {{ form.raiseDepartment }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.raiseTime }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>原因分析:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.causeResult }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>原因分析人:</p>
            </td>
            <td class="td-info">
              {{ form.causeUserName }}
            </td>
            <td class="td-title">
              <p>责任部门:</p>
            </td>
            <td class="td-info">
              {{ form.causeDepartment }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>原因分析日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.causeTime }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>纠正措施:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.correctResult }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>提出要求部门确认:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.raiseDepartmentAffirm }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>纠正人:</p>
            </td>
            <td class="td-info">
              {{ form.correctUserName }}
            </td>
            <td class="td-title">
              <p>责任部门:</p>
            </td>
            <td class="td-info">
              {{ form.correctDepartment }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>纠正日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.correctTime }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>实施验证结果:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.validationResult }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>验证人:</p>
            </td>
            <td class="td-info">
              {{ form.validationUserName }}
            </td>
            <td class="td-title">
              <p>责任部门:</p>
            </td>
            <td class="td-info">
              {{ form.validationDepartment }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>验证日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.validationTime }}
            </td>
          </tr>
        </table>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getSuperviseDetailCorrect,
  getThisYearTrainingDetailed,
} from '@/api/cnas/systemManagement/correctiveAction.js'
export default {
  name: 'correctiveInfo',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      yearTrainingDetailed: [],
      form: {
        superviseDetailsId: '',
        raiseResult: '',
        vdeRaiseResult: '',
        causeUserId: '',
        raiseUserName: '',
        raiseDepartment: '',
        raiseTime: '',
        causeResult: '',
        causeUserName: '',
        causeDepartment: '',
        causeTime: '',
        correctUserId: '',
        correctResult: '',
        raiseDepartmentAffirm: '',
        correctUserName: '',
        correctDepartment: '',
        correctTime: '',
        validationUserId: '',
        validationResult: '',
        validationUserName: '',
        validationDepartment: '',
        validationTime: '',
      },
    };
  },
  // æ–¹æ³•集合
  methods: {
    openDia(row) {
      this.formDia = true
      this.searchInfo(row)
      this.form.superviseDetailsId = row.superviseDetailsId
      this.getYearTrainingDetailed() // èŽ·å–åŸ¹è®­è®¡åˆ’
    },
    // æŸ¥è¯¢ç›‘控计划详情实施信息
    searchInfo(row) {
      this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
      getSuperviseDetailCorrect({ superviseDetailsId: row.superviseDetailsId }).then(res => {
        if (res.code === 201) return
        this.form = res.data
      }).catch(err => {
        console.log('err---', err);
      })
    },
    getYearTrainingDetailed() {
      getThisYearTrainingDetailed().then(res => {
        this.yearTrainingDetailed = res.data
      })
    },
    // å…³é—­å¼¹æ¡†
    closeProcessingDia() {
      this.formDia = false
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 5vh auto 50px !important;
}
.tables {
  table-layout: fixed;
  width: 100%;
  margin-top: 10px;
}
.td-title {
  height: 40px;
  width: 170px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
  padding: 6px;
}
.td-info {
  padding: 6px;
}
.td-info1 {
  display: inline-block;
  width: 100%;
  text-align: left;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
}
</style>
src/views/CNAS/systemManagement/correctiveAction/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,203 @@
<template>
  <div>
    <div class="search-background">
      <span class="search-group">
        <span style="width: 150px">不合格描述:</span>
        <el-input v-model="searchForm.raiseResult" 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>
    <div class="table">
      <div>
        <TableCard :showForm="false" :showTitle="false">
          <template v-slot:table>
            <limsTable :column="tableColumn" :height="'calc(100vh - 17em)'" :table-data="tableData"
              :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination"
              :page="page">
            </limsTable>
          </template>
        </TableCard>
      </div>
    </div>
    <corrective-info v-if="correctiveInfo" ref="correctiveInfo"></corrective-info>
    <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord>
  </div>
</template>
<script>
import TableCard from '@/components/TableCard/index.vue';
import limsTable from "@/components/Table/lims-table.vue";
import CorrectiveInfo from './components/correctiveInfo.vue';
// import QualityInfo from '../do/a7-nonconforming-item/qualityInfo.vue';
import ViewTestRecord from './components/ViewTestRecord.vue';
import {
  pageSuperviseDetailCorrect,
  exportSuperviseDetaillCorrect,
} from '@/api/cnas/systemManagement/correctiveAction.js'
export default {
  name: 'a8-corrective-action',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {
    // QualityInfo,
    CorrectiveInfo,
    limsTable,
    TableCard,
    ViewTestRecord
  },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        raiseResult: '',
      },
      tableColumn: [
        {
          label: '不合格或偏离事实的描述',
          prop: 'raiseResult',
          minWidth: '100'
        },
        {
          label: '原因分析',
          prop: 'causeResult',
          minWidth: '100'
        },
        {
          label: '纠正措施',
          prop: 'correctResult',
          minWidth: '100'
        },
        {
          label: '实施验证结果',
          prop: 'validationResult',
          minWidth: '100'
        },
        {
          dataType: 'action',
          minWidth: '60',
          label: '操作',
          operation: [
            {
              name: '查看',
              type: 'text',
              clickFun: (row) => {
                this.viewInfo(row);
              },
            },
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            },
            {
              name: '查看附件',
              type: 'text',
              clickFun: (row) => {
                this.viewFiles(row);
              },
            },
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
      },
      total: 0,
      correctiveInfo: false,
      viewTestRecordDialog: false,
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = {
        raiseResult: this.searchForm.raiseResult,
      }
      const page = this.page
      this.tableLoading = true
      pageSuperviseDetailCorrect({ ...entity, ...page }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data.records
        this.total = res.data.total
      }).catch(err => {
        console.log('err---', err);
        this.tableLoading = false
      })
    },
    // å¯¼å‡º
    handleDown(row) {
      exportSuperviseDetaillCorrect({ superviseDetailsCorrectId: row.superviseDetailsCorrectId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '监督纠正措施' + '.docx');
      })
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.raiseResult = '';
      this.searchList()
    },
    // æŸ¥çœ‹è¯¦æƒ…
    viewInfo(row) {
      this.correctiveInfo = true
      this.$nextTick(() => {
        this.$refs.correctiveInfo.openDia(row)
      })
    },
    // æŸ¥çœ‹é™„ä»¶
    viewFiles(row) {
      this.viewTestRecordDialog = true
      this.$nextTick(() => {
        this.$refs.viewTestRecordDialog.openDia(row)
      })
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.view-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding-left: 20px;
}
.search-background {
  width: 100%;
  height: 80px;
  line-height: 80px;
  background-color: #ffffff;
  display: flex;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
.table {
  background-color: #ffffff;
}
</style>
src/views/CNAS/systemManagement/customerSatisfaction/components/formDialog.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,256 @@
<template>
  <div>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="客户满意度调查表"
      width="70%" @close="closeFormDia">
      <table border="1" cellspacing="10" class="tables">
        <tr>
          <td class="td-title">
            <p>单位名称:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-input v-model="form.unitName" placeholder="请输入内容" size="small">
            </el-input>
          </td>
          <td class="td-title">
            <p>日期:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-date-picker v-model="form.fillDate" format="yyyy-MM-dd" placeholder="选择日期" size="small" type="date"
              value-format="yyyy-MM-dd">
            </el-date-picker>
          </td>
        </tr>
        <tr>
          <td class="td-title">
            <p>姓名:</p>
          </td>
          <td class="td-info">
            <el-input v-model="form.userName" placeholder="请输入内容" size="small">
            </el-input>
          </td>
          <td class="td-title">
            <p>部门:</p>
          </td>
          <td class="td-info">
            <el-input v-model="form.department" placeholder="请输入内容" size="small">
            </el-input>
          </td>
          <td class="td-title">
            <p>联系电话:</p>
          </td>
          <td class="td-info">
            <el-input v-model="form.contactNumber" placeholder="请输入内容" size="small">
            </el-input>
          </td>
        </tr>
        <tr>
          <td class="td-title">
            <p>服务态度:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-radio-group v-model="form.serviceAttitude" v-removeAriaHidden>
              <el-radio :label="0">满意</el-radio>
              <el-radio :label="1">一般</el-radio>
              <el-radio :label="2">不满意</el-radio>
            </el-radio-group>
          </td>
          <td class="td-title">
            <p>建议:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-input v-model="form.serviceAttitudeSuggestion" placeholder="请输入内容" size="small">
            </el-input>
          </td>
        </tr>
        <tr>
          <td class="td-title">
            <p>技术能力:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-radio-group v-model="form.technicalCompetence" v-removeAriaHidden>
              <el-radio :label="0">满意</el-radio>
              <el-radio :label="1">一般</el-radio>
              <el-radio :label="2">不满意</el-radio>
            </el-radio-group>
          </td>
          <td class="td-title">
            <p>建议:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-input v-model="form.technicalCompetenceSuggestion" placeholder="请输入内容" size="small">
            </el-input>
          </td>
        </tr>
        <tr>
          <td class="td-title">
            <p>检测工作:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-radio-group v-model="form.inspectionWork" v-removeAriaHidden>
              <el-radio :label="0">满意</el-radio>
              <el-radio :label="1">一般</el-radio>
              <el-radio :label="2">不满意</el-radio>
            </el-radio-group>
          </td>
          <td class="td-title">
            <p>建议:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-input v-model="form.inspectionWorkSuggestion" placeholder="请输入内容" size="small">
            </el-input>
          </td>
        </tr>
        <tr>
          <td class="td-title">
            <p>收费合理性:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-radio-group v-model="form.reasonableFees" v-removeAriaHidden>
              <el-radio :label="0">满意</el-radio>
              <el-radio :label="1">一般</el-radio>
              <el-radio :label="2">不满意</el-radio>
            </el-radio-group>
          </td>
          <td class="td-title">
            <p>建议:</p>
          </td>
          <td class="td-info" colspan="2">
            <el-input v-model="form.reasonableFeesSuggestion" placeholder="请输入内容" size="small">
            </el-input>
          </td>
        </tr>
        <tr>
          <td class="td-title">
            <p>您对我们的希望:</p>
          </td>
          <td class="td-info" colspan="5">
            <el-input v-model="form.remark" :rows="4" placeholder="请输入内容" size="small" type="textarea">
            </el-input>
          </td>
        </tr>
      </table>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeFormDia">取 æ¶ˆ</el-button>
        <el-button :loading="editLoad" type="primary" @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  addClientSatisfaction,
  updateClientSatisfaction
} from '@/api/cnas/systemManagement/customerSatisfaction.js'
export default {
  name: 'formDialog',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      form: {
        unitName: '',
        fillDate: '',
        userName: '',
        department: '',
        contactNumber: '',
        serviceAttitude: '',
        technicalCompetence: '',
        technicalCompetenceSuggestion: '',
        inspectionWork: '',
        inspectionWorkSuggestion: '',
        reasonableFees: '',
        reasonableFeesSuggestion: '',
        remark: '',
        clientSatisfactionId: '',
      },
      operationType: '',
      editLoad: false,
    };
  },
  // æ–¹æ³•集合
  methods: {
    openDia(type, row) {
      this.formDia = true;
      this.operationType = type
      if (this.operationType === 'edit') {
        this.form = { ...row }
      }
    },
    handleEdit() {
      if (!this.form.unitName) {
        this.$message.warning('请填写单位名称')
        return
      }
      if (!this.form.department) {
        this.$message.warning('请填写部门')
        return
      }
      this.editLoad = true
      if (this.operationType === 'add') {
        addClientSatisfaction(this.form).then(res => {
          this.editLoad = false
          if (res.code === 201) return
          this.$message.success('提交成功')
          this.closeFormDia()
        }).catch(err => {
          console.log('err---', err);
          this.editLoad = false
        })
      } else {
        updateClientSatisfaction(this.form).then(res => {
          this.editLoad = false
          if (res.code === 201) return
          this.$message.success('提交成功')
          this.closeFormDia()
        }).catch(err => {
          console.log('err---', err);
          this.editLoad = false
        })
      }
    },
    closeFormDia() {
      this.formDia = false;
      this.$emit('closeFormDia')
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 10vh auto 50px !important;
}
.tables {
  table-layout: fixed;
  width: 100%;
  margin-top: 10px;
}
.td-title {
  height: 40px;
  width: 170px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
  padding: 6px;
}
.td-info {
  padding: 6px;
}
.td-info1 {
  display: inline-block;
  width: 100%;
  text-align: left;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
}
</style>
src/views/CNAS/systemManagement/customerSatisfaction/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,405 @@
<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,
      },
      total1: 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.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.total1 = 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
        file.downloadIamge(url, row.fileName)
      } else {
        url = this.javaApi + '/word/' + row.fileUrl
        const link = document.createElement('a');
        link.href = url;
        link.download = row.fileName;
        link.click();
      }
    },
    // åˆ é™¤å®¢æˆ·åˆ†æžé™„ä»¶
    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>
src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
@@ -27,7 +27,7 @@
        :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
    </div>
    <el-dialog :title="'添加' + radio + '记录'" :visible.sync="addDialogVisible" top="10vh" width="800px">
      <el-row>
      <el-row v-if="addDialogVisible">
        <el-col :span="12" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>申请编号:</div>
@@ -152,7 +152,7 @@
          <div class="search_thing">
            <div class="search_label">上传附件:</div>
            <div class="search_input"><el-upload :auto-upload="false" :multiple="false" :on-change="handleChangeUpload"
                accept='.pdf,.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
                accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
                <el-button size="small" type="primary">上传附件</el-button>
              </el-upload></div>
          </div>
src/views/CNAS/systemManagement/documentControl/components/FileList.vue
@@ -21,8 +21,9 @@
        <el-button size="small" type="primary" @click="refreshTable()">查 è¯¢</el-button>
      </div>
      <div class="btns" style="padding-left: 30px;">
        <el-upload :action="action" :multiple="false" accept='.xls,.xlsx' :headers="headers" :on-change="beforeUpload"
          :on-error="onError" ref='upload' :on-success="handleSuccessUp" :show-file-list="false">
        <el-upload :action="action" :multiple="false" accept='.xls,.xlsx' :headers="uploadHeader"
          :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
          :show-file-list="false">
          <el-button size="small" type="primary" :loading="upLoading">导入</el-button></el-upload>
      </div>
    </div>
@@ -96,7 +97,6 @@
  delManageDocumentList,
  doManageDocumentList,
} from '@/api/cnas/systemManagement/documentControl.js'
import { getToken } from "@/utils/auth";
export default {
  components: {
    UpPdfStamp,
@@ -201,11 +201,6 @@
  },
  // ç”¨äºŽä¸Šä¼ æ–‡ä»¶çš„信息
  computed: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + '/manageDocumentList/exportManageDocumentList'
    }
src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
@@ -20,9 +20,9 @@
      </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="headers"
          :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
          style="display:inline-block;margin-left: 20px;">
        <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>
@@ -83,7 +83,6 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
import { getToken } from "@/utils/auth";
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.js";
@@ -186,11 +185,6 @@
  },
  // ç”¨äºŽä¸Šä¼ æ–‡ä»¶çš„信息
  computed: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + '/manageRecordCheck/exportInManageRecordCheck'
    }
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
@@ -1,28 +1,16 @@
<template>
  <!-- ä½œåºŸæ–‡ä»¶é”€æ¯è®°å½• -->
  <div class="ObsoleteDocumentDestructionRecords">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">作废文件销毁记录</el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
          :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="medium">导入</el-button></el-upload>
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col>
    </el-row>
    <div class="search">
      <div class="search_thing">
        <div class="search_label">文件名称:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable
            v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></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="componentData.entity.documentCode"
          <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
            @keyup.enter.native="refreshTable()"></el-input>
        </div>
      </div>
@@ -30,11 +18,19 @@
        <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">
      <ValueTable ref="ValueTable" :url="$api.manageRecordCancel.pageManageRecordCancel"
        :delUrl="$api.manageRecordCancel.delManageRecordCancel" :componentData="componentData"
        :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
      <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>
@@ -89,11 +85,24 @@
</template>
<script>
import ValueTable from '@/components/Table//value-table.vue'
import { getToken } from "@/utils/auth";
import limsTable from "@/components/Table/lims-table.vue";
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.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: {
    ValueTable
    limsTable
  },
  data() {
    return {
@@ -102,94 +111,82 @@
      upPower: true,
      outLoading: false,
      addLoading: false,
      componentData: {
        entity: {
          documentName: null,
          documentCode: null,
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        // selectMethod: 'handleChangeTask',
        do: [{
          id: 'handleEdit0',
          font: '修改',
          type: 'text',
          method: 'handleEdit0',
          field: [],
          disabFun: (row, index) => {
            return row.ratifyState == '通过'
          }
        }, {
          id: 'handleRatify',
          font: '批准',
          type: 'text',
          method: 'handleRatify',
          field: [],
          disabFun: (row, index) => {
            return row.ratifyState == '通过'
          }
        }, {
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy',
          disabFun: (row, index) => {
            return row.ratifyState == '通过'
          }
        },],
        tagField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        selectField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        addUpload: ['signatoryUrl'],
        requiredAdd: [],
        requiredUp: [],
        datePicker: ['receiveDate'],
        noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段
        needSort: [],
        inputType: ''
      },
      entityCopy: {},
      upIndex: 0,
      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: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordCancel.exportInManageRecordCancel
      return this.javaApi + '/manageRecordCancel/exportInManageRecordCancel'
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getList()
    this.getAuthorizedPerson()
    this.getFileList()
  },
@@ -232,7 +229,6 @@
      this.upPower = up
    },
    openAdd() {
      // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
      this.addInfo = {}
      this.title = '新增'
      this.addDialogVisible = true;
@@ -245,24 +241,43 @@
    // å¯¼å‡º
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordCancel.exportOutManageRecordCancel, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordCancel(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '作废文件销毁记录';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, "作废文件销毁记录");
      })
    },
    refreshTable() {
      this.refreshTable()()
    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.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
      this.queryParams = {};
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.page.current = 1;
      this.getList();
    },
    beforeUpload(file) {
      if (file.size > 1024 * 1024 * 10) {
@@ -289,23 +304,11 @@
    },
    // èŽ·å–æ–‡ä»¶åˆ—è¡¨--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
@@ -321,18 +324,33 @@
        let { id, documentCode, documentName, qty, reason, remark } = this.addInfo
        obj = { id, documentCode, documentName, qty, reason, remark }
      }
      this.$axios.post(this.$api.manageRecordCancel[this.title == '新增' ? 'addManageRecordCancel' : 'doManageRecordCancel'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        this.addLoading = false
        if (res.code == 201) {
          return
        }
        this.addDialogVisible = false
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
        this.refreshTable()
      }).catch(err => { })
      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)
@@ -341,7 +359,7 @@
      }
    },
    getAuthorizedPerson() {
      this.$axios.get(this.$api.user.getUserMenu).then(res => {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
@@ -349,8 +367,6 @@
            value: a.id
          })
        })
        // this.componentData.tagField.receiveUserName.select = data
        // this.componentData.selectField.receiveUserName.select = data
        this.personList = data
      })
    },
@@ -364,7 +380,7 @@
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            // ç‚¹å‡»â€œç¡®å®šâ€æŒ‰é’®ï¼Œå…è®¸å…³é—­
            this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, { id: row.id, ratifyState: '通过' }).then(res => {
            ratifyManageRecordCancel({ id: row.id, ratifyState: '通过' }).then(res => {
              if (res.code === 201) return
              this.refreshTable()
              done();
@@ -378,7 +394,7 @@
              })
          } else if (action === 'cancel') {
            // ç‚¹å‡»â€œå–消”按钮,不允许关闭
            this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, { id: row.id, ratifyState: '不通过' }).then(res => {
            ratifyManageRecordCancel({ id: row.id, ratifyState: '不通过' }).then(res => {
              if (res.code === 201) return
              this.refreshTable()
              done();
@@ -398,7 +414,22 @@
          }
        }
      })
    }
    },
    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>
@@ -435,8 +466,14 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
  padding-top: 0;
}
.btn {
  position: absolute;
  right: 20px;
  top: 16px;
}
</style>
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -1,28 +1,16 @@
<template>
  <!-- æ‰€æœ‰æ–‡ä»¶ï¼ˆå†…、外部文件)的发放与回收记录 -->
  <div class="DistributionRetrievalRecordsAllDocuments">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">所有文件(内、外部文件)的发放与回收记录</el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
          :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="medium">导入</el-button></el-upload>
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col>
    </el-row>
    <div class="search">
      <div class="search_thing">
        <div class="search_label">文件名称:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable
            v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></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="componentData.entity.documentCode"
          <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
            @keyup.enter.native="refreshTable()"></el-input>
        </div>
      </div>
@@ -30,11 +18,19 @@
        <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">
      <ValueTable ref="ValueTable" :url="$api.manageRecordIssueRecycle.pageManageRecordIssueRecycle"
        :delUrl="$api.manageRecordIssueRecycle.delManageRecordIssueRecycle" :componentData="componentData"
        :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
      <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>
@@ -133,14 +129,28 @@
</template>
<script>
import ValueTable from '@/components/Table/value-table.vue'
import limsTable from "@/components/Table/lims-table.vue";
import {
  getYearAndMonthAndDays
} from '@/utils/date'
import { getToken } from "@/utils/auth";
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.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: {
    ValueTable
    limsTable
  },
  data() {
    return {
@@ -149,98 +159,91 @@
      upPower: true,
      outLoading: false,
      addLoading: false,
      componentData: {
        entity: {
          documentName: null,
          documentCode: null,
          orderBy: {
            field: 'id',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        // selectMethod: 'handleChangeTask',
        do: [{
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy',
          disabFun: (row, index) => {
            return !!row.signedUser
          }
        }, {
          id: 'handleEdit',
          font: '修改',
          type: 'text',
          method: 'handleEdit',
          field: [],
          disabFun: (row, index) => {
            return !!row.signedUser
          }
        }, {
          id: 'handleBack',
          font: '回收',
          type: 'text',
          method: 'handleBack',
          disabFun: (row, index) => {
            return !!row.signedUser
          }
        }],
        tagField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        selectField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        addUpload: ['signatoryUrl'],
        requiredAdd: [],
        requiredUp: [],
        datePicker: ['receiveDate'],
        noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段
        needSort: [],
        inputType: ''
      },
      entityCopy: {},
      upIndex: 0,
      title: '新增',
      addDialogVisible: false,
      addInfo: {},
      personList: [],
      fileType: [],
      fileList: [],
      list: []
      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: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordIssueRecycle.exportInManageRecordIssueRecycle
    }
      return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle'
    },
    ...mapGetters(["userId"]),
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getList()
    this.getAuthorizedPerson()
    this.selectEnumByCategory()
    this.getFileList()
    this.selectTreeList()
    // TODO éƒ¨é—¨æŽ¥å£éœ€è¦é‡å†™
    // this.selectTreeList()
  },
  methods: {
    getPower() {
@@ -295,27 +298,46 @@
    // å¯¼å‡º
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordIssueRecycle.exportOutManageRecordIssueRecycle, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordIssueRecycle(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '文件发放与回收记录';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, '文件发放与回收记录')
      })
    },
    refreshTable() {
      this.refreshTable()()
    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.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
      this.queryParams = {};
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.page.current = 1;
      this.getList();
    },
    getAuthorizedPerson() {
      this.$axios.get(this.$api.user.getUserMenu).then(res => {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
@@ -323,8 +345,6 @@
            value: a.id
          })
        })
        // this.componentData.tagField.receiveUserName.select = data
        // this.componentData.selectField.receiveUserName.select = data
        this.personList = data
      })
    },
@@ -352,33 +372,18 @@
      }
    },
    selectEnumByCategory() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: "文件类别"
      }).then(res => {
        // this.componentData.tagField.documentType.select = res.data
        // this.componentData.selectField.documentType.select = res.data
        this.fileType = res.data
      })
      // æ–‡ä»¶ç±»åˆ«
      this.getDicts("document_type").then((response) => {
        this.fileType = this.dictToValue(response.data);
      });
    },
    // èŽ·å–æ–‡ä»¶åˆ—è¡¨--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
@@ -402,18 +407,33 @@
        let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = this.addInfo
        obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims }
      }
      this.$axios.post(this.$api.manageRecordIssueRecycle[this.title == '新增' ? 'addManageRecordIssueRecycle' : 'doManageRecordIssueRecycle'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        this.addLoading = false
        if (res.code == 201) {
          return
        }
        this.addDialogVisible = false
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
        this.refreshTable()
      }).catch(err => { })
      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) {
@@ -424,8 +444,8 @@
      }).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: JSON.parse(localStorage.getItem("user")).userId }
        this.$axios.post(this.$api.manageRecordIssueRecycle.doManageRecordIssueRecycle, obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        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
@@ -441,9 +461,24 @@
    },
    // æŸ¥è¯¢æ ‘形列表
    selectTreeList() {
      this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => {
      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(() => { });
    },
  }
}
@@ -481,8 +516,8 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
  padding-top: 0;
}
</style>
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
@@ -1,23 +1,21 @@
<template>
  <!-- å¤–来文件确认记录 -->
  <div class="ExternalDocumentConfirmationRecords">
    <el-row class="title">
      <el-col :span="20" style="padding-left: 20px;text-align: left;">外来文件确认记录</el-col>
    </el-row>
    <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="handleAdd0" style="margin-left: 20px;"
            v-if="addPower">新增</el-button>
          <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
            :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
            style="display:inline-block;margin-left: 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"
          <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
            :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify"
            :upUrl="$api.manageRecordTotal.doManageRecordVerify" />
            :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%;">
@@ -25,8 +23,8 @@
          <div class="search_thing">
            <div class="search_label">年:</div>
            <div class="search_input">
              <el-date-picker v-model="componentData.entity.year" type="year" placeholder="选择年" format="yyyy"
                value-format="yyyy" size="small" @change="refreshTable()">
              <el-date-picker v-model="queryParams.year" type="year" placeholder="选择年" format="yyyy" value-format="yyyy"
                size="small" @change="refreshTable()">
              </el-date-picker>
            </div>
          </div>
@@ -36,8 +34,10 @@
          </div>
        </div>
        <div class="table">
          <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
            :componentData="componentData" :key="upIndex" />
          <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
            :componentData="componentData" :key="upIndex" /> -->
          <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
            :height="'calc(100vh - 280px)'" @pagination="pagination"></lims-table>
        </div>
      </el-tab-pane>
    </el-tabs>
@@ -51,17 +51,65 @@
        <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 ValueTable from '@/components/Table/value-table.vue'
import { getToken } from "@/utils/auth";
import {
  addManageRecordVerify,
  pageManageRecordVerify,
  submitManageRecordTotal,
  ratifyManageRecordTotal,
  delManageRecordVerify,
  pageManageRecordTotal,
  doManageRecordVerify
} from '@/api/cnas/systemManagement/documentRecords.js'
export default {
  components: {
    ValueTable,
    filePreview,
    limsTable,
  },
  data() {
    return {
@@ -70,112 +118,139 @@
      lookDialogVisible: false,
      noCheckLoading: false,
      checkLoading: false,
      componentData: {
        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: ''
      },
      // æ ·å“åˆ—表
      componentData0: {
        entity: {
          manageRecordTotalId: null,
          orderBy: {
            field: 'id',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        do: [{
          id: 'update',
          font: '修改',
          type: 'text',
          method: 'doDiy'
        }, {
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy'
        }],
        tagField: {},
        selectField: {},
        requiredAdd: ['documentName', 'documentCode'],
        requiredUp: ['documentName', 'documentCode'],
        datePicker: ['effectiveDate', 'cancelDate'],
        needSort: [],
        inputType: ''
      },
      upIndex0: 100,
      entityCopy: {},
      upIndex: 0,
      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: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordTotal.exportManageRecordVerify
      return this.javaApi + '/manageRecordVerify/exportManageRecordVerify'
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getList()
    this.getList0()
  },
  methods: {
    getPower() {
@@ -217,11 +292,65 @@
      this.addPower = add
      this.upPower = up
    },
    handleAdd0() {
      this.$refs.ValueTable0.openAddDia(this.$api.manageRecordTotal.addManageRecordVerify);
    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.refreshTable()()
      this.page.current = 1;
      this.getList();
    },
    beforeUpload(file) {
      if (file.size > 1024 * 1024 * 10) {
@@ -241,15 +370,10 @@
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.$refs['ValueTable0'].selectList()
        this.getList0();
      } else {
        this.$message.error('上传失败');
      }
    },
    refresh() {
      this.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
    },
    submitCheck(type) { },
    // æŸ¥çœ‹
@@ -260,19 +384,12 @@
    // å…¬ç”¨æ–¹æ³•
    commonFun(row, callbanck) {
      this.currentInfo = row
      this.componentData0.entity.manageRecordTotalId = row.id
      this.$axios.post(this.$api.manageRecordTotal.pageManageRecordVerify, {
        entity: this.componentData0.entity,
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }, noQs: true
      pageManageRecordVerify({
        current: -1,
        size: -1,
        manageRecordTotalId: row.id
      }).then(res => {
        this.currentInfo.arr = res.data.body.records
        this.currentInfo.arr = res.data.records
        this.lookDialogVisible = true
        if (callbanck) {
          callbanck()
@@ -280,11 +397,8 @@
      }).catch(err => { });
    },
    handleDown0(row) {
      let url = this.javaApi + 'word/' + row.url
      const link = document.createElement('a');
      link.href = url;
      link.download = row.month + ' å¤–来文件确认记录';
      link.click();
      let url = this.javaApi + '/word/' + row.url
      this.$download.saveAs(url, '外来文件确认记录')
    },
    // æäº¤
    handleSubmit(row) {
@@ -293,7 +407,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.post(this.$api.manageRecordTotal.submitManageRecordTotal, {
        submitManageRecordTotal({
          id: row.id
        }).then(res => {
          this.$message({
@@ -316,7 +430,7 @@
      } else {
        this.noCheckLoading = true
      }
      this.$axios.post(this.$api.manageRecordTotal.ratifyManageRecordTotal, {
      ratifyManageRecordTotal({
        id: this.currentInfo.id,
        ratifyState: state
      }).then(res => {
@@ -330,6 +444,59 @@
        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;
        }
      });
    },
  }
}
@@ -356,7 +523,7 @@
}
.search_label {
  width: 110px;
  width: 30px;
  font-size: 14px;
  text-align: right;
}
@@ -367,9 +534,8 @@
.table {
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 140px);
  padding: 20px;
  height: 100%;
  margin-top: 10px;
}
>>>.el-tabs__content {
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -1,29 +1,18 @@
<template>
  <!-- æ–‡ä»¶å®šæœŸå®¡æŸ¥è®°å½• -->
  <div class="PeriodicDocumentReviewRecords">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">文件定期审查记录</el-col>
      <!-- <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <el-upload :action="action" :show-file-list="false"
          accept='.doc,.docx' :headers="headers" :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="medium">导入</el-button></el-upload>
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col> -->
    </el-row>
    <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="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
                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="componentData.entity.documentCode"
              <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
                @keyup.enter.native="refreshTable()"></el-input>
            </div>
          </div>
@@ -32,17 +21,19 @@
            <el-button size="small" type="primary" @click="refreshTable()">查 è¯¢</el-button>
          </div>
          <div class="btns">
            <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
            <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
              :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="medium">导入</el-button></el-upload>
            <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">
          <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
          <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
            :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
          <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
            :delUrl="$api.manageRecordIntervals.delManageRecordIntervals" :componentData="componentData"
            :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
            :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" /> -->
        </div>
      </el-tab-pane>
      <el-tab-pane label="历史记录" name="历史记录" style="height: 100%;">
@@ -50,8 +41,8 @@
          <div class="search_thing">
            <div class="search_label">年:</div>
            <div class="search_input">
              <el-date-picker v-model="componentData0.entity.year" type="year" placeholder="选择年" format="yyyy"
                value-format="yyyy" size="small" @change="refreshTable()">
              <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>
@@ -61,8 +52,10 @@
          </div>
        </div>
        <div class="table">
          <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
            :componentData="componentData0" :key="upIndex" />
          <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading"
            :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
          <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
            :componentData="componentData0" :key="upIndex" /> -->
        </div>
      </el-tab-pane>
    </el-tabs>
@@ -139,12 +132,25 @@
</template>
<script>
import ValueTable from '@/components/Table/value-table.vue'
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
import { getToken } from "@/utils/auth";
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: {
    ValueTable,
    limsTable,
    filePreview
  },
  data() {
@@ -270,23 +276,125 @@
      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: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordIntervals.exportInManageRecordIntervals
      return this.javaApi + '/manageRecordIntervals/exportInManageRecordIntervals'
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.entityCopy0 = this.HaveJson(this.componentData0.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    // this.entityCopy0 = this.HaveJson(this.componentData0.entity);
    this.getList()
    this.getList0()
    this.getFileList()
    this.selectEnumByCategory()
  },
@@ -345,31 +453,74 @@
    // å¯¼å‡º
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordIntervals.exportOutManageRecordIntervals, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordIntervals(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '文件定期审查记录';
        link.click();
        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.$refs['ValueTable0'].selectList()
        this.page0.current = 1;
        this.getList0();
      } else {
        this.refreshTable()()
        this.page.current = 1;
        this.getList();
      }
    },
    refresh(num) {
      if (num) {
        this.componentData0.entity = this.HaveJson(this.entityCopy0)
        this.upIndex++
        this.queryParams0 = {};
        this.page0.current = 1;
        this.getList0();
      } else {
        this.componentData.entity = this.HaveJson(this.entityCopy)
        this.upIndex++
        this.queryParams = {};
        this.page.current = 1;
        this.getList();
      }
    },
    beforeUpload(file) {
@@ -406,34 +557,21 @@
    },
    // èŽ·å–æ–‡ä»¶åˆ—è¡¨--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'id',
            order: 'asc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
      }).catch(err => { })
    },
    selectEnumByCategory() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: "适宜性"
      }).then(res => {
        this.typeList = res.data
      })
      // æ–‡ä»¶ç±»åˆ«
      this.getDicts("suitability").then((response) => {
        this.typeList = this.dictToValue(response.data);
      });
    },
    // æäº¤
    handleAdd() {
@@ -446,18 +584,33 @@
        let { id, documentCode, documentName, documentVersion, revision, suitability, remark } = this.addInfo
        obj = { id, documentCode, documentName, documentVersion, revision, suitability, remark }
      }
      this.$axios.post(this.$api.manageRecordIntervals[this.title == '新增' ? 'addManageRecordIntervals' : 'doManageRecordIntervals'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        this.addLoading = false
        if (res.code == 201) {
          return
        }
        this.addDialogVisible = false
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
        this.refreshTable()
      }).catch(err => { })
      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) {
@@ -471,7 +624,7 @@
      } else {
        this.noCheckLoading = true
      }
      this.$axios.post(this.$api.manageRecordIntervals.ratifyManageRecordIntervalsTotal, {
      ratifyManageRecordIntervalsTotal({
        id: this.currentInfo.id,
        ratifyState: state
      }).then(res => {
@@ -484,7 +637,7 @@
          type: 'success',
          message: '操作成功!'
        });
        this.$refs['ValueTable0'].selectList()
        this.refreshTable(1);
        this.lookDialogVisible = false
      }).catch(err => { });
    },
@@ -501,11 +654,8 @@
      }
    },
    handleDown0(row) {
      let url = this.javaApi + 'word/' + row.url
      const link = document.createElement('a');
      link.href = url;
      link.download = row.month + ' æ‰€æœ‰æ–‡ä»¶å®šæœŸæ£€æŸ¥è®°å½•';
      link.click();
      let url = this.javaApi + '/word/' + row.url
      this.$download.saveAs(url, "所有文件定期检查记录");
    },
    // æäº¤
    handleSubmit(row) {
@@ -514,7 +664,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.post(this.$api.manageRecordIntervals.submitManageRecordIntervalsTotal, {
        submitManageRecordIntervalsTotal({
          id: row.id
        }).then(res => {
          if (res.code === 201) return
@@ -522,7 +672,7 @@
            type: 'success',
            message: '提交成功!'
          });
          this.$refs['ValueTable0'].selectList()
          this.refreshTable(1);
        }).catch(err => { });
      })
    },
@@ -530,6 +680,21 @@
    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(() => { });
    },
  }
}
@@ -568,9 +733,9 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 140px);
  padding: 20px;
  padding-top: 0;
}
>>>.el-tabs__content {
src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
@@ -1,28 +1,11 @@
<template>
  <!-- æ–‡ä»¶ä¿®è®¢ç”³è¯·å®¡æ‰¹è®°å½• -->
  <div class="DocumentRevisionRequestApprovalRecords">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">文件修订申请审批记录</el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <!-- <el-upload :action="action" :show-file-list="false"
          accept='.doc,.docx' :headers="headers" :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="medium">导入</el-button></el-upload> -->
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col>
    </el-row>
    <div class="search">
      <!-- <div class="search_thing">
        <div class="search_label">文件名称:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.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="componentData.entity.documentCode"
          <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
            @keyup.enter.native="refreshTable()"></el-input>
        </div>
      </div>
@@ -30,11 +13,15 @@
        <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">
      <ValueTable ref="ValueTable" :url="$api.manageRecordAudit.pageManageRecordAudit"
        :delUrl="$api.manageRecordAudit.delManageRecordAudit" :componentData="componentData"
        :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
      <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>
@@ -335,13 +322,28 @@
</template>
<script>
import ValueTable from '@/components/Table/value-table.vue'
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/business/inspectionTask.js";
export default {
  components: {
    ValueTable,
    filePreview
    filePreview,
    limsTable
  },
  data() {
    return {
@@ -350,114 +352,6 @@
      outLoading: false,
      lookDialogVisible: false,
      addLoading: false,
      componentData: {
        entity: {
          // documentName: null,
          documentCode: null,
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        // selectMethod: 'handleChangeTask',
        do: [{
          id: 'handleLook',
          font: '查看',
          type: 'text',
          method: 'handleLook'
        }, {
          id: 'handleLook0',
          font: '文件预览',
          type: 'text',
          method: 'handleLook0'
        }, {
          id: 'handleOut',
          font: '下载',
          type: 'text',
          method: 'handleOut'
        }, {
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy',
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handleEdit',
          font: '修改',
          type: 'text',
          method: 'handleEdit',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handleRatify',
          font: '批准',
          type: 'text',
          method: 'handleRatify',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handlework0',
          font: '申请意见',
          type: 'text',
          method: 'handlework0',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handlework1',
          font: '原定制意见',
          type: 'text',
          method: 'handlework1',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handlework2',
          font: '原审核意见',
          type: 'text',
          method: 'handlework2',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }],
        tagField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        selectField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        addUpload: ['signatoryUrl'],
        requiredAdd: [],
        requiredUp: [],
        datePicker: ['receiveDate'],
        noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段
        needSort: [],
        inputType: ''
      },
      entityCopy: {},
      upIndex: 0,
      title: '新增',
      addInfo: {
        method: '修订',
@@ -470,11 +364,121 @@
      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.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    this.getList()
    this.getFileList()
    this.getAuthorizedPerson()
    this.selectTreeList()
@@ -543,44 +547,51 @@
    // å¯¼å‡º
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordAudit.exportOutManageRecordAudit, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordAudit(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '文件修订表';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, "文件修订表");
      })
    },
    refreshTable() {
      this.refreshTable()()
    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.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
      this.queryParams = {};
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.page.current = 1;
      this.getList();
    },
    // èŽ·å–æ–‡ä»¶åˆ—è¡¨--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
@@ -600,12 +611,7 @@
          fd.append(m, this.addInfo[m])
        }
        this.addLoading = true
        this.$axios.post(this.$api.manageRecordAudit.addManageRecordAudit, fd, {
          headers: {
            'Content-Type': 'multipart/form-data'
          },
          noQs: true
        }).then(res => {
        addManageRecordAudit(fd).then(res => {
          this.addLoading = false
          if (res.code == 200) {
            this.$message({
@@ -636,12 +642,7 @@
          }
        }
        this.addLoading = true
        this.$axios.post(this.$api.manageRecordAudit.doManageRecordAudit, fd, {
          headers: {
            'Content-Type': 'multipart/form-data'
          },
          noQs: true
        }).then(res => {
        doManageRecordAudit(fd).then(res => {
          this.addLoading = false
          if (res.code == 200) {
            this.refreshTable()
@@ -656,7 +657,7 @@
      }
    },
    getAuthorizedPerson() {
      this.$axios.get(this.$api.user.getUserMenu).then(res => {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
@@ -664,14 +665,12 @@
            value: a.id
          })
        })
        // this.componentData.tagField.receiveUserName.select = data
        // this.componentData.selectField.receiveUserName.select = data
        this.personList = data
      })
    },
    // æŸ¥è¯¢æ ‘形列表
    selectTreeList() {
      this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => {
      selectCNSAPersonTree().then((res) => {
        this.list = res.data[0].children;
      });
    },
@@ -692,15 +691,13 @@
        type: 'warning'
      })
        .then(() => {
          this.$axios
            .post(this.$api.manageRecordAudit.ratifyManageRecordAudit, { id: row.id })
            .then(res => {
              if (res.code === 201) {
                return;
              }
              this.$message.success('操作成功');
              this.refreshTable();
            })
          ratifyManageRecordAudit({ id: row.id }).then(res => {
            if (res.code === 201) {
              return;
            }
            this.$message.success('操作成功');
            this.refreshTable();
          })
            .catch(e => {
              this.$message.error('操作失败');
            });
@@ -744,7 +741,22 @@
    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>
@@ -760,6 +772,7 @@
  height: 80px;
  display: flex;
  align-items: center;
  position: relative;
}
.search_thing {
@@ -781,15 +794,16 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  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 {
@@ -845,4 +859,10 @@
>>>.el-dialog__body {
  height: auto;
}
.btn {
  position: absolute;
  right: 20px;
  top: 16px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/ViewTestRecord.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,176 @@
<template>
  <div>
    <el-dialog :visible.sync="filesDialogVisible" title="附件" width="80%" @closed="closeFilesLook">
      <div style="display: flex;justify-content: space-between;">
        <el-upload ref='upload' :action="fileAction" :auto-upload="true" :before-upload="fileBeforeUpload"
          :data="{ correctId: info.correctId }" :headers="uploadHeader" :on-error="onError"
          :on-success="handleSuccessUp" :show-file-list="false"
          accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;">
          <el-button size="small" style="height: 38px" type="primary">附件上传</el-button>
        </el-upload>
      </div>
      <div>
        <limsTable ref="yearTable" :column="columnData" :height="'calc(100vh - 30em)'" :highlightCurrentRow="true"
          :table-data="tableData" :table-loading="tableLoading" style="margin-top: 0.5em;" :page="page">
        </limsTable>
      </div>
    </el-dialog>
    <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>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
import {
  getInternalCorrectFileList,
  delInternalCorrectFile,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'ViewTestRecord',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { filePreview, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      filesDialogVisible: false,
      tableLoading: false,
      filesLookInfo: {},
      columnData: [
        {
          label: '文件名称',
          prop: 'fileName',
          minWidth: '150px'
        },
        {
          dataType: 'action',
          minWidth: '100',
          label: '操作',
          fixed: 'right',
          operation: [
            {
              name: '预览',
              type: 'text',
              clickFun: (row) => {
                this.handleLook(row)
              }
            },
            {
              name: '下载',
              type: 'text',
              clickFun: (row) => {
                this.upload(row)
              }
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delete(row)
              }
            }
          ]
        }
      ],
      tableData: [],
      info: {},
      currentInfo: {},
      lookDialogVisible: false,
      page: {
        total: 0,
        size: -1,
        current: -1,
      },
    };
  },
  // æ–¹æ³•集合
  methods: {
    openDia(row) {
      this.filesDialogVisible = true
      this.info = row
      this.searchTableList()
    },
    // æŸ¥è¯¢é™„件列表
    searchTableList() {
      this.tableLoading = true
      getInternalCorrectFileList({ correctId: this.info.correctId }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data
      }).catch(err => {
        this.tableLoading = false
        console.log('err---', err);
      })
    },
    closeFilesLook() {
      this.filesDialogVisible = false
    },
    // æŸ¥çœ‹æ–‡ä»¶
    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)
      }
    },
    // åˆ é™¤
    delete(row) {
      this.tableLoading = true
      delInternalCorrectFile({ correctFileId: row.correctFileId }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.$message.success('删除成功')
        this.searchTableList()
      }).catch(err => {
        this.tableLoading = false
        console.log('err---', err);
      })
    },
    // ä¸Šä¼ éªŒè¯
    fileBeforeUpload(file) {
      let flag = true
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        flag = false
      }
      if (!flag) {
        return Promise.reject(flag); //正确的终止
      }
    },
    onError(err, file, fileList, type) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    handleSuccessUp(response,) {
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.searchTableList()
      } else {
        this.$message.error(response.message);
      }
    },
  },
  computed: {
    fileAction() {
      return this.javaApi + '/internalCorrect/uploadInternalCorrectFile'
    }
  },
};
</script>
<style scoped></style>
src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,254 @@
<template>
  <div>
    <div class="search-background">
      <span class="search-group">
        <span style="width: 160px">受审部门:</span>
        <el-input v-model="searchForm.department" clearable size="small"></el-input>
        <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">重 ç½®</el-button>
        <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
      </span>
      <span class="search-group">
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
      </span>
    </div>
    <div class="table">
      <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
        :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination">
      </limsTable>
    </div>
    <audit-inspection-dia v-if="auditInspectionDia" ref="auditInspectionDia"
      @closeImplementDia="closeImplementDia"></audit-inspection-dia>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import AuditInspectionDia from './auditInspectionDia.vue';
import {
  pageInternalCheck,
  delInternalCheck,
  exportInternalCheck
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'auditInspection',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { AuditInspectionDia, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        department: '',
      },
      tableColumn: [
        {
          label: '受审部门',
          prop: 'department',
        },
        {
          label: '部门负责人',
          prop: 'departmentHead',
        },
        {
          label: '审核员',
          prop: 'auditor',
        },
        {
          label: '审核日期',
          prop: 'reviewDate',
        }, {
          dataType: 'tag',
          label: '批准状态',
          prop: 'ratifyStatus',
          minWidth: '100',
          formatData: (params) => {
            if (params === 0) {
              return '不批准';
            } else if (params === 1) {
              return '批准';
            } else {
              return null;
            }
          },
          formatType: (params) => {
            if (params === 0) {
              return 'danger';
            } else if (params === 1) {
              return 'success';
            } else {
              return null;
            }
          }
        }, {
          label: '批准内容',
          prop: 'ratifyRemark',
          minWidth: '140'
        },
        {
          dataType: 'action',
          minWidth: '220',
          label: '操作',
          operation: [
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return false
                } else {
                  return true
                }
              },
            },
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('edit', row);
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '批准',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('ratify', row);
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delPlan(row)
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            }
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
        total: 0,
      },
      auditInspectionDia: false
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = this.searchForm
      const page = this.page
      this.tableLoading = true
      pageInternalCheck({ ...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
      })
    },
    // æ–°å¢žï¼Œç¼–辑,批准弹框
    openFormDia(type, row) {
      this.auditInspectionDia = true
      this.$nextTick(() => {
        this.$refs.auditInspectionDia.openDia(type, row)
      })
    },
    closeImplementDia() {
      this.auditInspectionDia = false
      this.searchList()
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.department = '';
      this.searchList()
    },
    // åˆ é™¤
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delInternalCheck({ checkId: row.checkId }).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: '已取消删除'
        });
      });
    },
    // å¯¼å‡º
    handleDown(row) {
      exportInternalCheck({ checkId: row.checkId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '内审检查' + '.docx');
      })
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.search-background {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: space-between;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspectionDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,231 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false"
      :visible.sync="formDia" title="内部审核实施计划" width="80%" @close="closeImplementDia">
      <el-form ref="form" :model="form" :rules="rules" label-width="auto">
        <el-col :span="12">
          <el-form-item label="受审部门" prop="department">
            <el-input v-model="form.department" :disabled="operationType === 'ratify'" clearable
              size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="部门负责人" prop="departmentHead">
            <el-input v-model="form.departmentHead" :disabled="operationType === 'ratify'" clearable
              size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="审核员" prop="auditor">
            <el-input v-model="form.auditor" :disabled="operationType === 'ratify'" clearable size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="审核日期" prop="reviewDate">
            <el-date-picker v-model="form.reviewDate" :disabled="operationType === 'ratify'" clearable
              format="yyyy-MM-dd" placeholder="选择日期" size="small" style="width: 100%" type="date"
              value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-form>
      <div v-if="operationType !== 'ratify'" style="text-align: right;margin-bottom: 10px">
        <el-button size="small" type="primary" @click="addRow">添加</el-button>
        <el-button size="small" type="danger" @click="clearTable">清空</el-button>
      </div>
      <el-table :data="checkDetailList" border height="300" style="width: 100%">
        <el-table-column align="center" label="序号" type="index" width="60" />
        <el-table-column header-align="center" label="涉及要素和质量体系文件条款" prop="element">
          <template slot-scope="{row}">
            <el-input v-model="row.element" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="审核内容" prop="content">
          <template slot-scope="{row}">
            <el-input v-model="row.content" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="审核方式" prop="method">
          <template slot-scope="{row}">
            <el-input v-model="row.method" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="审核结果记录" prop="resultRecords" width="180">
          <template slot-scope="{row}">
            <el-input v-model="row.resultRecords" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="不符合性质" prop="nonNature" width="180">
          <template slot-scope="{row}">
            <el-input v-model="row.nonNature" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-button v-if="operationType === 'ratify'" :loading="loading" @click="ratify(0)">不批准</el-button>
        <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="ratify(1)">批
          å‡†</el-button>
        <el-button v-if="operationType !== 'ratify'" @click="closeImplementDia">取 æ¶ˆ</el-button>
        <el-button v-if="operationType !== 'ratify'" :loading="loading" type="primary" @click="handleEdit">提
          äº¤</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="approvalDialog" title="批准" width="30%" @close="approvalDialog = false">
      <span>
        æ‰¹å‡†å¤‡æ³¨ï¼š
        <el-input v-model="ratifyRemark" type="textarea"></el-input>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="approvalLoading" @click="approvalDialog = false">取 æ¶ˆ</el-button>
        <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  getInternalCheckOne,
  addInternalCheck,
  updateInternalCheck,
  ratifyInternalCheck,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'auditInspectionDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        department: '',
        departmentHead: '',
        auditor: '',
        reviewDate: '',
      },
      rules: {
        department: [{ required: true, message: '请填写受审部门', trigger: 'blur' }],
        departmentHead: [{ required: true, message: '请填写部门负责人', trigger: 'blur' }],
        auditor: [{ required: true, message: '请填写审核员', trigger: 'blur' }],
        reviewDate: [{ required: true, message: '请填写审核日期', trigger: 'blur' }],
      },
      checkDetailList: [],
      operationType: '',
      approvalDialog: false,
      approvalLoading: false,
      ratifyRemark: '',
    };
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia(type, row) {
      this.formDia = true
      this.operationType = type
      if (type !== 'add') {
        this.searchInfo(row)
      }
    },
    // æŸ¥è¯¢è¯¦æƒ…
    searchInfo(row) {
      this.diaLoading = true
      getInternalCheckOne({ checkId: row.checkId }).then(res => {
        this.diaLoading = false
        if (res.code === 201) return
        this.form = res.data
        this.checkDetailList = this.form.checkDetailList
      }).catch(err => {
        console.log(err)
        this.diaLoading = false
      })
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          if (this.checkDetailList.length === 0) {
            this.$message.warning('请添加表格数据')
            return
          }
          this.loading = true
          const internalCheckDto = this.HaveJson(this.form)
          internalCheckDto.checkDetailList = this.HaveJson(this.checkDetailList)
          if (this.operationType === 'add') {
            addInternalCheck(internalCheckDto).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeImplementDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          } else if (this.operationType === 'edit') {
            updateInternalCheck(internalCheckDto).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeImplementDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          }
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    ratify(ratifyStatus) {
      // ä¸æ‰¹å‡†éœ€è¦å¡«å†™æ‰¹å‡†å†…容
      if (ratifyStatus === 0) {
        this.approvalDialog = true
      } else {
        this.handleApproval(ratifyStatus)
      }
    },
    // æäº¤æ‰¹å‡†ä¿¡æ¯
    handleApproval(ratifyStatus) {
      this.approvalLoading = true
      const internalCheckDto = this.HaveJson(this.form)
      internalCheckDto.ratifyStatus = ratifyStatus
      internalCheckDto.ratifyRemark = ratifyStatus === 0 ? this.ratifyRemark : ''
      ratifyInternalCheck(internalCheckDto).then(res => {
        if (res.code === 200) {
          this.$message.success('提交成功!');
          this.approvalDialog = false
          this.closeImplementDia(this.departId);
        }
        this.approvalLoading = false
      }).catch(() => {
        this.approvalLoading = false
      })
    },
    // å¢žåŠ è¡¨æ ¼è¡Œæ•°æ®
    addRow() {
      this.checkDetailList.push({
        element: '',
        content: '',
        method: '',
        resultRecords: '',
        nonNature: '',
      })
    },
    // æ¸…空表格数据
    clearTable() {
      this.checkDetailList = []
    },
    closeImplementDia() {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeImplementDia')
    },
  }
};
</script>
<style scoped></style>
src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSign.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,202 @@
<template>
  <div>
    <div class="search-background">
      <span class="search-group">
        <span style="width: 160px">时间:</span>
        <el-input v-model="searchForm.meetingDate" clearable size="small"></el-input>
        <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">重 ç½®</el-button>
        <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
      </span>
      <span class="search-group">
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
      </span>
    </div>
    <div class="table">
      <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
        :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination">
      </limsTable>
    </div>
    <audit-meeting-sign-dia v-if="auditMeetingSignDia" ref="auditMeetingSignDia"
      @closeYearDia="closeYearDia"></audit-meeting-sign-dia>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import AuditMeetingSignDia from './auditMeetingSignDia.vue';
import {
  pageInternalMeeting,
  delInternalMeeting,
  exportInternalMeeting,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'auditMeetingSign',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { AuditMeetingSignDia, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        meetingDate: '',
      },
      tableColumn: [
        {
          label: '时间',
          prop: 'meetingDate',
          minWidth: '100'
        },
        {
          label: '主持人',
          prop: 'compere',
          minWidth: '100'
        },
        {
          label: '地点',
          prop: 'place',
          minWidth: '100'
        },
        {
          label: '会议主题',
          prop: 'subject',
          minWidth: '100'
        },
        {
          label: '参会人员',
          prop: 'participantName',
          minWidth: '120'
        },
        {
          dataType: 'action',
          fixed: 'right',
          minWidth: '220',
          label: '操作',
          operation: [
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            },
            {
              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,
      },
      auditMeetingSignDia: false,
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = this.searchForm
      const page = this.page
      this.tableLoading = true
      pageInternalMeeting({ ...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
      })
    },
    // æ–°å¢žï¼Œç¼–辑弹框
    openFormDia(type, row) {
      this.auditMeetingSignDia = true
      this.$nextTick(() => {
        this.$refs.auditMeetingSignDia.openDia(type, row)
      })
    },
    closeYearDia() {
      this.auditMeetingSignDia = false
      this.searchList()
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.meetingDate = '';
      this.searchList()
    },
    // åˆ é™¤
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delInternalMeeting({ meetingId: row.meetingId }).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: '已取消删除'
        });
      });
    },
    // å¯¼å‡º
    handleDown(row) {
      exportInternalMeeting({ meetingId: row.meetingId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '内审会议签到' + '.docx');
      })
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.search-background {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: space-between;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/auditMeetingSignDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,183 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false"
      :visible.sync="formDia" title="内审会议签到表" width="1000px" @close="closeYearDia">
      <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="时间" prop="meetingDate">
              <el-date-picker v-model="form.meetingDate" clearable format="yyyy-MM-dd HH:mm:ss" placeholder="请选择"
                size="small" style="width: 100%" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="主持人" prop="compere">
              <el-input v-model="form.compere" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="地点" prop="place">
              <el-input v-model="form.place" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="会议主题" prop="subject">
              <el-input v-model="form.subject" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="参会人员" prop="participant">
              <el-select v-model="form.participant" clearable filterable multiple placeholder="请选择" size="small"
                style="width: 100%;">
                <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeYearDia">取 æ¶ˆ</el-button>
        <el-button :loading="loading" type="primary" @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.js";
import {
  getInternalMeetingOne,
  addInternalMeeting,
  updateInternalMeeting,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'auditMeetingSignDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        meetingDate: '',
        compere: '',
        place: '',
        subject: '',
        participant: [],
      },
      rules: {
        meetingDate: [{ required: true, message: '请填写会议时间', trigger: 'blur' }],
        compere: [{ required: true, message: '请填写主持人', trigger: 'blur' }],
        place: [{ required: true, message: '请填写地点', trigger: 'blur' }],
        subject: [{ required: true, message: '请填写会议主题', trigger: 'blur' }],
        participant: [{ required: true, message: '请选择参加人员', trigger: 'change' }],
      },
      operationType: '',
      personList: []
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia(type, row) {
      this.formDia = true
      this.operationType = type
      this.getAuthorizedPerson()
      if (type !== 'add') {
        this.searchInfo(row)
      }
    },
    // æŸ¥è¯¢è¯¦æƒ…
    searchInfo(row) {
      this.diaLoading = true
      getInternalMeetingOne({ meetingId: row.meetingId }).then(res => {
        this.diaLoading = false
        if (res.code === 201) return
        this.form = res.data
        this.form.participant = this.form.participant.split(',').map(Number)
      }).catch(err => {
        console.log(err)
        this.diaLoading = false
      })
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.loading = true
          const internalMeeting = this.HaveJson(this.form)
          internalMeeting.participant = internalMeeting.participant.join(',')
          if (this.operationType === 'add') {
            addInternalMeeting(internalMeeting).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeYearDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          } else if (this.operationType === 'edit') {
            updateInternalMeeting(internalMeeting).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeYearDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          }
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    closeYearDia() {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeYearDia')
    },
    getAuthorizedPerson() {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
            label: a.name,
            value: a.id
          })
        })
        this.personList = data
      })
    },
  }
};
</script>
<style scoped>
.table {
  table-layout: fixed;
  width: 100%;
  margin-top: 10px;
}
.table td {
  height: 34px;
  width: 100px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
  padding: 4px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,312 @@
<template>
  <div>
    <div class="search-background">
      <span class="search-group">
        <span style="width: 160px">审核目的:</span>
        <el-input v-model="searchForm.purposes" clearable size="small"></el-input>
        <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">重 ç½®</el-button>
        <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
      </span>
      <span class="search-group">
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
      </span>
    </div>
    <div class="table">
      <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
        :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination">
      </limsTable>
    </div>
    <audit-report-dia v-if="auditReportDia" ref="auditReportDia"
      @closeImplementDia="closeImplementDia"></audit-report-dia>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import AuditReportDia from './auditReportDia.vue';
import {
  delInternalReport,
  pageInternalReport,
  exportInternalReport,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'auditReport',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { AuditReportDia, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        purposes: '',
      },
      tableColumn: [
        {
          label: '审核目的',
          prop: 'purposes',
        },
        {
          label: '审核依据',
          prop: 'basis',
        },
        {
          label: '审核日期',
          prop: 'reviewDate',
        },
        {
          label: '审核方法',
          prop: 'method',
        },
        {
          label: '审核范围',
          prop: 'scope',
        },
        {
          label: '审核责任者',
          prop: 'responsible',
        },
        {
          label: '审核组长',
          prop: 'leader',
        },
        {
          label: '审核员',
          prop: 'auditor',
        },
        {
          label: '审核组分工情况',
          prop: 'division',
        },
        {
          dataType: 'tag',
          label: '审核状态',
          prop: 'examineStatus',
          minWidth: '100',
          formatData: (params) => {
            if (params === 0) {
              return '不通过';
            } else if (params === 1) {
              return '通过';
            } else {
              return null;
            }
          },
          formatType: (params) => {
            if (params === 0) {
              return 'danger';
            } else if (params === 1) {
              return 'success';
            } else {
              return null;
            }
          }
        },
        {
          label: '审核内容',
          prop: 'examineRemark',
          minWidth: '140'
        },
        {
          dataType: 'tag',
          label: '质量负责人状态',
          prop: 'qualityStatus',
          minWidth: '100',
          formatData: (params) => {
            if (params === 0) {
              return '不通过';
            } else if (params === 1) {
              return '通过';
            } else {
              return null;
            }
          },
          formatType: (params) => {
            if (params === 0) {
              return 'danger';
            } else if (params === 1) {
              return 'success';
            } else {
              return null;
            }
          }
        },
        {
          label: '质量负责人意见',
          prop: 'qualityRemark',
          minWidth: '140'
        },
        {
          dataType: 'action',
          minWidth: '220',
          fixed: 'right',
          label: '操作',
          operation: [
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            },
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('edit', row);
              },
              disabled: (row) => {
                if (row.examineStatus === 1 || row.examineStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '审核',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('examine', row);
              },
              disabled: (row) => {
                if (row.examineStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '意见',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('ratify', row);
              },
              disabled: (row) => {
                if (row.qualityStatus === 1 || row.examineStatus === 0 || row.examineStatus === null) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delPlan(row)
              },
              disabled: (row) => {
                if (row.qualityStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            }
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
        total: 0,
      },
      auditReportDia: false
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = this.searchForm
      const page = this.page
      this.tableLoading = true
      pageInternalReport({ ...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
      })
    },
    // æ–°å¢žï¼Œç¼–辑,批准弹框
    openFormDia(type, row) {
      this.auditReportDia = true
      this.$nextTick(() => {
        this.$refs.auditReportDia.openDia(type, row)
      })
    },
    closeImplementDia() {
      this.auditReportDia = false
      this.searchList()
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.purposes = '';
      this.searchList()
    },
    // åˆ é™¤
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delInternalReport({ reportId: row.reportId }).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: '已取消删除'
        });
      });
    },
    // å¯¼å‡º
    handleDown(row) {
      exportInternalReport({ reportId: row.reportId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '内审报告' + '.docx');
      })
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.search-background {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: space-between;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/auditReportDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,333 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false"
      :visible.sync="formDia" title="内部审核报告" width="80%" @close="closeImplementDia">
      <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto">
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="审核目的" prop="purposes">
              <el-input v-model="form.purposes" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核依据" prop="basis">
              <el-input v-model="form.basis" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核日期" prop="reviewDate">
              <el-date-picker v-model="form.reviewDate"
                :disabled="operationType === 'examine' || operationType === 'ratify'" clearable format="yyyy-MM-dd"
                placeholder="选择日期" size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="审核方法" prop="method">
              <el-input v-model="form.method" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="审核范围" prop="scope">
              <el-input v-model="form.scope" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核责任者" prop="responsible">
              <el-input v-model="form.responsible" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核组长" prop="leader">
              <el-input v-model="form.leader" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="审核员" prop="auditor">
              <el-input v-model="form.auditor" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="审核组分工情况" prop="division">
              <el-input v-model="form.division" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="审核概况" prop="overview">
              <el-input v-model="form.overview" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="内审组对中心管理体系的结论性评价" prop="conclusion">
              <el-input v-model="form.conclusion" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="改进意见" prop="suggest">
              <el-input v-model="form.suggest" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="预计受审核部门完成纠正措施所需时间" prop="actionDate">
              <el-input v-model="form.actionDate" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="不符合情况整改总体跟进确认人" prop="followUser">
              <el-input v-model="form.followUser" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="不符合情况整改总体跟进确认记录" prop="followRecord">
              <el-input v-model="form.followRecord"
                :disabled="operationType === 'examine' || operationType === 'ratify'" :rows="3" clearable size="small"
                type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="本报告发放范围" prop="reportScope">
              <el-input v-model="form.reportScope" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col v-if="operationType === 'ratify'" :span="24">
            <el-form-item label="质量负责人意见" prop="qualityRemark">
              <el-input v-model="form.qualityRemark" :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button v-if="operationType === 'examine'" :loading="loading" @click="examine(0)">不通过</el-button>
        <el-button v-if="operationType === 'examine'" :loading="loading" type="primary" @click="examine(1)">通
          è¿‡</el-button>
        <el-button v-if="operationType === 'ratify'" :loading="loading" @click="handleApproval(0)">不批准</el-button>
        <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="handleApproval(1)">批
          å‡†</el-button>
        <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" @click="closeImplementDia">取
          æ¶ˆ</el-button>
        <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" :loading="loading" type="primary"
          @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="examineDialog" title="审核" width="30%" @close="examineDialog = false">
      <span>
        å®¡æ ¸å¤‡æ³¨ï¼š
        <el-input v-model="examineRemark" type="textarea"></el-input>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="examineLoading" @click="examineDialog = false">取 æ¶ˆ</el-button>
        <el-button :loading="examineLoading" type="primary" @click="handleExamine(0)">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="approvalDialog" title="批准" width="30%" @close="approvalDialog = false">
      <span>
        æ‰¹å‡†å¤‡æ³¨ï¼š
        <el-input v-model="qualityRemark" type="textarea"></el-input>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="approvalLoading" @click="approvalDialog = false">取 æ¶ˆ</el-button>
        <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  getInternalReportOne,
  addInternalReport,
  updateInternalReport,
  examineInternalReport,
  qualityInternalReport,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'auditReportDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        purposes: '',
        basis: '',
        reviewDate: '',
        method: '',
        scope: '',
        responsible: '',
        leader: '',
        auditor: '',
        division: '',
        overview: '',
        conclusion: '',
        suggest: '',
        actionDate: '',
        followUser: '',
        followRecord: '',
        reportScope: '',
        qualityRemark: '',
      },
      rules: {
        purposes: [{ required: true, message: '请填写审核目的', trigger: 'blur' }],
        basis: [{ required: true, message: '请填写审核依据', trigger: 'blur' }],
        reviewDate: [{ required: true, message: '请填写审核日期', trigger: 'change' }],
        method: [{ required: true, message: '请填写审核方法', trigger: 'blur' }],
        scope: [{ required: true, message: '请填写审核范围', trigger: 'blur' }],
        responsible: [{ required: true, message: '请填写审核责任者', trigger: 'blur' }],
        leader: [{ required: true, message: '请填写审核组长', trigger: 'blur' }],
        auditor: [{ required: true, message: '请填写审核员', trigger: 'blur' }],
        division: [{ required: true, message: '请填写审核组分工情况', trigger: 'blur' }],
        overview: [{ required: true, message: '请填写审核概况', trigger: 'blur' }],
        conclusion: [{ required: true, message: '请填写', trigger: 'blur' }],
        suggest: [{ required: true, message: '请填写', trigger: 'blur' }],
        actionDate: [{ required: true, message: '请填写', trigger: 'blur' }],
        followUser: [{ required: true, message: '请填写', trigger: 'blur' }],
        followRecord: [{ required: true, message: '请填写', trigger: 'blur' }],
        reportScope: [{ required: true, message: '请填写', trigger: 'blur' }],
        qualityRemark: [{ required: true, message: '请填写', trigger: 'blur' }],
      },
      operationType: '',
      approvalDialog: false,
      approvalLoading: false,
      examineDialog: false,
      examineLoading: false,
      qualityRemark: '',
      examineRemark: '',
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia(type, row) {
      this.formDia = true
      this.operationType = type
      if (type !== 'add') {
        this.searchInfo(row)
      }
    },
    // æŸ¥è¯¢è¯¦æƒ…
    searchInfo(row) {
      this.diaLoading = true
      getInternalReportOne({ reportId: row.reportId }).then(res => {
        this.diaLoading = false
        if (res.code === 201) return
        this.form = res.data
      }).catch(err => {
        console.log(err)
        this.diaLoading = false
      })
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.loading = true
          const internalReport = this.HaveJson(this.form)
          if (this.operationType === 'add') {
            addInternalReport(internalReport).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeImplementDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          } else if (this.operationType === 'edit') {
            updateInternalReport(internalReport).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeImplementDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          }
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    // å®¡æ ¸æµç¨‹
    examine(examineStatus) {
      if (examineStatus === 0) {
        this.examineDialog = true
      } else {
        this.handleExamine(examineStatus)
      }
    },
    handleExamine(examineStatus) {
      this.examineLoading = true
      const internalReport = this.HaveJson(this.form)
      internalReport.examineStatus = examineStatus
      examineInternalReport(internalReport).then(res => {
        if (res.code === 200) {
          this.$message.success('提交成功!');
          this.approvalDialog = false
          this.closeImplementDia(this.departId);
        }
        this.examineLoading = false
      }).catch(() => {
        this.examineLoading = false
      })
    },
    // æäº¤å®¡æ ¸ä¿¡æ¯
    handleApproval(qualityStatus) {
      this.approvalLoading = true
      const internalReport = this.HaveJson(this.form)
      internalReport.qualityStatus = qualityStatus
      qualityInternalReport(internalReport).then(res => {
        if (res.code === 200) {
          this.$message.success('提交成功!');
          this.approvalDialog = false
          this.closeImplementDia(this.departId);
        }
        this.approvalLoading = false
      }).catch(() => {
        this.approvalLoading = false
      })
    },
    closeImplementDia() {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeImplementDia')
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 6vh auto 50px !important;
}
>>>.el-dialog__body {
  max-height: 42em;
  overflow-y: auto;
}
>>>.is-required {
  margin-bottom: 6px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,182 @@
<template>
  <div>
    <div class="search-background">
      <span class="search-group">
        <span style="width: 200px">不合格描述:</span>
        <el-input v-model="searchForm.raiseResult" clearable size="small"></el-input>
        <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">重 ç½®</el-button>
        <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
      </span>
      <span class="search-group">
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
      </span>
    </div>
    <div class="table">
      <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
        :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination">
      </limsTable>
    </div>
    <corrective-action-d-ia v-if="correctiveActionDIa" ref="correctiveActionDIa"
      @closeRectifyDia="closeRectifyDia"></corrective-action-d-ia>
    <view-test-record v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></view-test-record>
  </div>
</template>
<script>
import TableCard from '@/components/TableCard/index.vue';
import limsTable from "@/components/Table/lims-table.vue";
import CorrectiveActionDIa from './correctiveActionDIa.vue';
import ViewTestRecord from './ViewTestRecord.vue';
import {
  pageInternalCorrect,
  exportInternalCorrect,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'correctiveAction',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { CorrectiveActionDIa, limsTable, TableCard, ViewTestRecord },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        raiseResult: '',
      },
      tableColumn: [
        {
          label: '不合格或偏离事实的描述',
          prop: 'raiseResult',
          minWidth: '100'
        },
        {
          label: '原因分析',
          prop: 'causeResult',
          minWidth: '100'
        },
        {
          label: '纠正措施',
          prop: 'correctResult',
          minWidth: '100'
        },
        {
          label: '实施验证结果',
          prop: 'validationResult',
          minWidth: '100'
        },
        {
          dataType: 'action',
          minWidth: '220',
          label: '操作',
          operation: [
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            },
            {
              name: '纠正',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('rectify', row);
              },
            },
            {
              name: '查看附件',
              type: 'text',
              clickFun: (row) => {
                this.viewFiles(row);
              },
            },
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
        total: 0,
      },
      correctiveActionDIa: false,
      viewTestRecordDialog: false,
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = {
        raiseResult: this.searchForm.raiseResult,
      }
      const page = this.page
      this.tableLoading = true
      pageInternalCorrect({ ...entity, ...page }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        console.log('err---', err);
        this.tableLoading = false
      })
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.raiseResult = '';
      this.searchList()
    },
    // æŸ¥çœ‹é™„ä»¶
    viewFiles(row) {
      this.viewTestRecordDialog = true
      this.$nextTick(() => {
        this.$refs.viewTestRecordDialog.openDia(row)
      })
    },
    openFormDia(type, row) {
      this.correctiveActionDIa = true
      this.$nextTick(() => {
        this.$refs.correctiveActionDIa.openDia(type, row)
      })
    },
    // å¯¼å‡º
    handleDown(row) {
      exportInternalCorrect({ correctId: row.correctId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '内审纠正措施' + '.docx');
      })
    },
    closeRectifyDia() {
      this.correctiveActionDIa = false
      this.searchList()
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.search-background {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: space-between;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveActionDIa.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,409 @@
<template>
  <div>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="纠正措施处理单"
      width="60%" @close="closeRectifyDia">
      <el-steps :active="currentStep" align-center finish-status="success">
        <el-step title="不合格或偏离事实的描述" @click.native="setStep(0)"></el-step>
        <el-step title="原因分析" @click.native="setStep(1)"></el-step>
        <el-step title="纠正措施" @click.native="setStep(2)"></el-step>
        <el-step title="实施验证结果" @click.native="setStep(3)"></el-step>
      </el-steps>
      <div>
        <table border="1" cellspacing="10" class="tables">
          <tr v-if="showStep === 0">
            <td class="td-title">
              <p><span class="required-span">* </span>不合格或偏离事实的描述:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.raiseResult" :rows="4"
                placeholder="请输入内容" size="small" type="textarea">
              </el-input>
              <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.raiseResult }}</span>
            </td>
          </tr>
          <tr v-if="showStep === 0">
            <td v-if="currentStep === 0" class="td-title">
              <p><span class="required-span">* </span>请选择下一步负责人:</p>
            </td>
            <td v-if="currentStep === 0" class="td-info" colspan="3">
              <el-select v-model="form.causeUserId" clearable filterable placeholder="请选择" size="small">
                <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </td>
          </tr>
          <tr v-if="showStep === 0 && currentStep !== 0">
            <td class="td-title">
              <p>提出人:</p>
            </td>
            <td class="td-info">
              {{ form.raiseUserName }}
            </td>
            <td class="td-title">
              <p>提出部门:</p>
            </td>
            <td class="td-info">
              {{ form.raiseDepartment }}
            </td>
          </tr>
          <tr v-if="showStep === 0 && currentStep !== 0">
            <td class="td-title">
              <p>日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.raiseTime }}
            </td>
          </tr>
          <tr v-if="showStep === 1">
            <td class="td-title">
              <p><span class="required-span">* </span>原因分析:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-input v-if="showStep === 1 && currentStep === 1" v-model="form.causeResult" :rows="5"
                placeholder="请输入内容" size="small" type="textarea">
              </el-input>
              <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.causeResult }}</span>
            </td>
          </tr>
          <tr v-if="showStep === 1 && currentStep !== 1">
            <td class="td-title">
              <p>原因分析人:</p>
            </td>
            <td class="td-info">
              {{ form.causeUserName }}
            </td>
            <td class="td-title">
              <p>责任部门:</p>
            </td>
            <td class="td-info">
              {{ form.causeDepartment }}
            </td>
          </tr>
          <tr v-if="showStep === 1 && currentStep !== 1">
            <td class="td-title">
              <p>原因分析日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.causeTime }}
            </td>
          </tr>
          <tr v-if="showStep === 1">
            <td v-if="currentStep === 1" class="td-title">
              <p><span class="required-span">* </span>请选择下一步负责人:</p>
            </td>
            <td v-if="currentStep === 1" class="td-info" colspan="3">
              <el-select v-model="form.correctUserId" clearable filterable placeholder="请选择" size="small">
                <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </td>
          </tr>
          <tr v-if="showStep === 2">
            <td class="td-title">
              <p><span class="required-span">* </span>纠正措施:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.correctResult" :rows="5"
                placeholder="请输入内容" size="small" type="textarea">
              </el-input>
              <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.correctResult }}</span>
            </td>
          </tr>
          <tr v-if="showStep === 2">
            <td class="td-title">
              <p>提出要求部门确认:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.raiseDepartmentAffirm" :rows="5"
                placeholder="请输入内容" size="small" type="textarea">
              </el-input>
              <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.raiseDepartmentAffirm }}</span>
            </td>
          </tr>
          <tr v-if="showStep === 2 && currentStep !== 2">
            <td class="td-title">
              <p>纠正人:</p>
            </td>
            <td class="td-info">
              {{ form.correctUserName }}
            </td>
            <td class="td-title">
              <p>责任部门:</p>
            </td>
            <td class="td-info">
              {{ form.correctDepartment }}
            </td>
          </tr>
          <tr v-if="showStep === 2 && currentStep !== 2">
            <td class="td-title">
              <p>纠正日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.correctTime }}
            </td>
          </tr>
          <tr v-if="showStep === 2">
            <td v-if="currentStep === 2" class="td-title">
              <p><span class="required-span">* </span>请选择下一步负责人:</p>
            </td>
            <td v-if="currentStep === 2" class="td-info" colspan="3">
              <el-select v-model="form.validationUserId" clearable filterable placeholder="请选择" size="small">
                <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </td>
          </tr>
          <tr v-if="showStep === 3">
            <td class="td-title">
              <p><span class="required-span">* </span>实施验证结果:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-input v-if="showStep === 3 && currentStep === 3" v-model="form.validationResult" :rows="5"
                placeholder="请输入内容" size="small" type="textarea">
              </el-input>
              <span v-if="showStep === 3 && currentStep !== 3" class="td-info1"> {{ form.validationResult }}</span>
            </td>
          </tr>
          <tr v-if="showStep === 3 && currentStep !== 3">
            <td class="td-title">
              <p>验证人:</p>
            </td>
            <td class="td-info">
              {{ form.validationUserName }}
            </td>
            <td class="td-title">
              <p>责任部门:</p>
            </td>
            <td class="td-info">
              {{ form.validationDepartment }}
            </td>
          </tr>
          <tr v-if="showStep === 3 && currentStep !== 3">
            <td class="td-title">
              <p>验证日期:</p>
            </td>
            <td class="td-info" colspan="3">
              {{ form.validationTime }}
            </td>
          </tr>
        </table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeRectifyDia">取 æ¶ˆ</el-button>
        <el-button v-if="currentStep !== 4" :loading="editLoad" type="primary" @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  getInternalCorrect,
  addInternalCorrect,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.js";
export default {
  name: 'correctiveActionDIa',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      currentStep: 0,
      showStep: 0,
      form: {
        superviseDetailsId: '',
        raiseResult: '',
        vdeRaiseResult: '',
        causeUserId: '',
        raiseUserName: '',
        raiseDepartment: '',
        raiseTime: '',
        causeResult: '',
        causeUserName: '',
        causeDepartment: '',
        causeTime: '',
        correctUserId: '',
        correctResult: '',
        raiseDepartmentAffirm: '',
        correctUserName: '',
        correctDepartment: '',
        correctTime: '',
        validationUserId: '',
        validationResult: '',
        validationUserName: '',
        validationDepartment: '',
        validationTime: '',
      },
      editLoad: false,
      personList: [],
      supervisedUserList: [],
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    openDia(type, row) {
      this.formDia = true
      if (type !== 'add') {
        this.searchInfo(row)
        this.form.superviseDetailsId = row.superviseDetailsId
      }
      this.getAuthorizedPerson() // èŽ·å–äººå‘˜åˆ—è¡¨
      this.getSupervisedUserList() // èŽ·å–å½“å‰éƒ¨é—¨äººå‘˜
    },
    // æŸ¥è¯¢ç›‘控计划详情实施信息
    searchInfo(row) {
      this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
      getInternalCorrect({ correctId: row.correctId }).then(res => {
        if (res.code === 201) return
        if (res.data.superviseDetailsCorrectId === null) {
          this.showStep = 0
          this.currentStep = 0
        } else {
          this.form = res.data
          if (res.data.isFinish === 0) {
            if (res.data.causeUserId) {
              this.showStep = 1
              this.currentStep = 1
            }
            if (res.data.correctUserId) {
              this.showStep = 2
              this.currentStep = 2
            }
            if (res.data.validationUserId) {
              this.showStep = 3
              this.currentStep = 3
            }
          } else {
            this.currentStep = 4
            this.showStep = 3
          }
        }
      }).catch(err => {
        console.log('err---', err);
      })
    },
    // æäº¤
    handleEdit() {
      if (this.currentStep === 0) {
        if (!this.form.raiseResult) {
          this.$message.warning('请填写不合格描述')
          return
        }
        if (!this.form.causeUserId) {
          this.$message.warning('请选择下一步负责人')
          return
        }
      } else if (this.currentStep === 1) {
        if (!this.form.causeResult) {
          this.$message.warning('请填写原因分析')
          return
        }
        if (!this.form.correctUserId) {
          this.$message.warning('请选择下一步负责人')
          return
        }
      } else if (this.currentStep === 2) {
        if (!this.form.correctResult) {
          this.$message.warning('请填写纠正措施')
          return
        }
        if (!this.form.validationUserId) {
          this.$message.warning('请选择下一步负责人')
          return
        }
      } else if (this.currentStep === 3) {
        if (!this.form.validationResult) {
          this.$message.warning('请填写实施验证结果')
          return
        }
      }
      this.editLoad = true
      this.form.supervisedTime = ''
      this.form.flowType = this.currentStep
      addInternalCorrect(this.form).then(res => {
        this.editLoad = false
        if (res.code === 201) return
        this.$message.success('提交成功')
        this.closeRectifyDia()
      }).catch(err => {
        console.log('err---', err);
        this.editLoad = false
      })
    },
    // å…³é—­å¼¹æ¡†
    closeRectifyDia() {
      this.formDia = false
      this.$emit('closeRectifyDia')
    },
    setStep(step) {
      this.showStep = step
    },
    getAuthorizedPerson() {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
            label: a.name,
            value: a.id
          })
        })
        this.personList = data
      })
    },
    getSupervisedUserList() {
      selectUserCondition({ type: 2 }).then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
            label: a.name,
            value: a.id
          })
        })
        this.supervisedUserList = data
      })
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 10vh auto 50px !important;
}
.tables {
  table-layout: fixed;
  width: 100%;
  margin-top: 10px;
}
.td-title {
  height: 40px;
  width: 170px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
  padding: 6px;
}
.td-info {
  padding: 6px;
}
.td-info1 {
  display: inline-block;
  width: 100%;
  text-align: left;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/implementPlanDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,307 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false"
      :visible.sync="formDia" title="内部审核实施计划" width="80%" @close="closeImplementDia">
      <el-form ref="form" :model="form" :rules="rules" label-width="auto">
        <el-col :span="24">
          <el-form-item label="审核目的" prop="purposes">
            <el-input v-model="form.purposes" :disabled="operationType === 'ratify'" clearable size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="审核性质" prop="nature">
            <el-input v-model="form.nature" :disabled="operationType === 'ratify'" clearable size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="审核范围" prop="scope">
            <el-input v-model="form.scope" :disabled="operationType === 'ratify'" clearable size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="审核依据" prop="basis">
            <el-input v-model="form.basis" :disabled="operationType === 'ratify'" clearable size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="审核组长" prop="teamLeader">
            <el-input v-model="form.teamLeader" :disabled="operationType === 'ratify'" clearable
              size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="内审员" prop="internalAuditor">
            <el-input v-model="form.internalAuditor" :disabled="operationType === 'ratify'" clearable
              size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="审核日期" prop="reviewDate">
            <el-date-picker v-model="form.reviewDate" :disabled="operationType === 'ratify'" clearable
              format="yyyy-MM-dd" placeholder="选择日期" size="small" style="width: 100%" type="date"
              value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="审核方法" prop="auditMethod">
            <el-input v-model="form.auditMethod" :disabled="operationType === 'ratify'" clearable
              size="small"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="首次会议时间" prop="firstMeetingTime">
            <el-date-picker v-model="form.firstMeetingTime" :disabled="operationType === 'ratify'" clearable
              format="yyyy-MM-dd" placeholder="选择日期" size="small" style="width: 100%" type="date"
              value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="末次会议时间" prop="lastMeetingTime">
            <el-date-picker v-model="form.lastMeetingTime" :disabled="operationType === 'ratify'" clearable
              format="yyyy-MM-dd" placeholder="选择日期" size="small" style="width: 100%" type="date"
              value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="审核报告提交日期" prop="submitTime">
            <el-date-picker v-model="form.submitTime" :disabled="operationType === 'ratify'" clearable
              format="yyyy-MM-dd" placeholder="选择日期" size="small" style="width: 100%" type="date"
              value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="审核报告发放范围" prop="submitScope">
            <el-input v-model="form.submitScope" :disabled="operationType === 'ratify'" clearable
              size="small"></el-input>
          </el-form-item>
        </el-col>
      </el-form>
      <div v-if="operationType !== 'ratify'" style="text-align: right;margin-bottom: 10px">
        <el-button size="small" type="primary" @click="addRow">添加</el-button>
        <el-button size="small" type="danger" @click="clearTable">清空</el-button>
      </div>
      <el-table :data="implementDetailList" border height="300" style="width: 100%">
        <el-table-column align="center" label="序号" type="index" width="60" />
        <el-table-column header-align="center" label="时间" prop="implement">
          <template slot-scope="{row}">
            <el-input v-model="row.implement" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="受审核部门" prop="department">
          <template slot-scope="{row}">
            <el-input v-model="row.department" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="责任人" prop="responsible">
          <template slot-scope="{row}">
            <el-input v-model="row.responsible" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="审核员" prop="auditor" width="180">
          <template slot-scope="{row}">
            <el-input v-model="row.auditor" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
        <el-table-column header-align="center" label="审核内容" prop="reviewContent" width="180">
          <template slot-scope="{row}">
            <el-input v-model="row.reviewContent" :disabled="operationType === 'ratify'" size="small" />
          </template>
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-button v-if="operationType === 'ratify'" :loading="loading" @click="ratify(0)">不批准</el-button>
        <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="ratify(1)">批
          å‡†</el-button>
        <el-button v-if="operationType !== 'ratify'" @click="closeImplementDia">取 æ¶ˆ</el-button>
        <el-button v-if="operationType !== 'ratify'" :loading="loading" type="primary" @click="handleEdit">提
          äº¤</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="approvalDialog" title="批准" width="30%" @close="approvalDialog = false">
      <span>
        æ‰¹å‡†å¤‡æ³¨ï¼š
        <el-input v-model="ratifyRemark" type="textarea"></el-input>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="approvalLoading" @click="approvalDialog = false">取 æ¶ˆ</el-button>
        <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  getInternalImplementOne,
  addInternalImplement,
  updateInternalImplement,
  ratifyInternalImplement,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'implementPlanDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        purposes: '',
        nature: '',
        scope: '',
        basis: '',
        teamLeader: '',
        internalAuditor: '',
        reviewDate: '',
        auditMethod: '',
        firstMeetingTime: '',
        lastMeetingTime: '',
        submitTime: '',
        submitScope: '',
      },
      rules: {
        purposes: [{ required: true, message: '请填写审核目的', trigger: 'blur' }],
        nature: [{ required: true, message: '请填写审核性质', trigger: 'blur' }],
        scope: [{ required: true, message: '请填写审核范围', trigger: 'blur' }],
        basis: [{ required: true, message: '请填写审核依据', trigger: 'blur' }],
        teamLeader: [{ required: true, message: '请填写审核组长', trigger: 'blur' }],
        internalAuditor: [{ required: true, message: '请填写内审员', trigger: 'blur' }],
        reviewDate: [{ required: true, message: '请填写审核时间', trigger: 'blur' }],
        auditMethod: [{ required: true, message: '请填写审核方法', trigger: 'blur' }],
        firstMeetingTime: [{ required: true, message: '请填写首次会议时间', trigger: 'blur' }],
        lastMeetingTime: [{ required: true, message: '请填写末次会议时间', trigger: 'blur' }],
        submitTime: [{ required: true, message: '请填写审核报告提交日期', trigger: 'blur' }],
        submitScope: [{ required: true, message: '请填写审核报告发放范围', trigger: 'blur' }],
      },
      implementDetailList: [],
      operationType: '',
      approvalDialog: false,
      approvalLoading: false,
      ratifyRemark: '',
    };
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia(type, row) {
      this.formDia = true
      this.operationType = type
      if (type !== 'add') {
        this.searchInfo(row)
      }
    },
    // æŸ¥è¯¢è¯¦æƒ…
    searchInfo(row) {
      this.diaLoading = true
      getInternalImplementOne({ implementId: row.implementId }).then(res => {
        this.diaLoading = false
        if (res.code === 201) return
        this.form = res.data
        this.implementDetailList = this.form.implementDetailList
      }).catch(err => {
        console.log(err)
        this.diaLoading = false
      })
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          if (this.implementDetailList.length === 0) {
            this.$message.warning('请添加表格数据')
            return
          }
          this.loading = true
          const internalImplementDto = this.HaveJson(this.form)
          internalImplementDto.implementDetailList = this.HaveJson(this.implementDetailList)
          if (this.operationType === 'add') {
            addInternalImplement(internalImplementDto).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeImplementDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          } else if (this.operationType === 'edit') {
            updateInternalImplement(internalImplementDto).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeImplementDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          }
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    ratify(ratifyStatus) {
      // ä¸æ‰¹å‡†éœ€è¦å¡«å†™æ‰¹å‡†å†…容
      if (ratifyStatus === 0) {
        this.approvalDialog = true
      } else {
        this.handleApproval(ratifyStatus)
      }
    },
    // æäº¤æ‰¹å‡†ä¿¡æ¯
    handleApproval(ratifyStatus) {
      this.approvalLoading = true
      const internalImplementDto = this.HaveJson(this.form)
      internalImplementDto.ratifyStatus = ratifyStatus
      internalImplementDto.ratifyRemark = ratifyStatus === 0 ? this.ratifyRemark : ''
      ratifyInternalImplement(internalImplementDto).then(res => {
        if (res.code === 200) {
          this.$message.success('提交成功!');
          this.approvalDialog = false
          this.closeImplementDia(this.departId);
        }
        this.approvalLoading = false
      }).catch(() => {
        this.approvalLoading = false
      })
    },
    // å¢žåŠ è¡¨æ ¼è¡Œæ•°æ®
    addRow() {
      this.implementDetailList.push({
        implement: '',
        department: '',
        responsible: '',
        auditor: '',
        reviewContent: '',
      })
    },
    // æ¸…空表格数据
    clearTable() {
      this.implementDetailList = []
    },
    closeImplementDia() {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeImplementDia')
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 10vh auto 50px !important;
}
>>>.el-dialog__body {
  max-height: 38em;
  overflow-y: auto;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/implementationPlan.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,292 @@
<template>
  <div>
    <div class="search-background">
      <span class="search-group">
        <span style="width: 160px">审核目的:</span>
        <el-input v-model="searchForm.purposes" clearable size="small"></el-input>
        <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">重 ç½®</el-button>
        <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
      </span>
      <span class="search-group">
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
      </span>
    </div>
    <div class="table">
      <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
        :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" @pagination="pagination" :page="page">
      </limsTable>
    </div>
    <implement-plan-dia v-if="implementPlanDia" ref="implementPlanDia"
      @closeImplementDia="closeImplementDia"></implement-plan-dia>
  </div>
</template>
<script>
import {
  pageInternalImplement,
  delInternalImplement,
  exportInternalImplement,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
import limsTable from "@/components/Table/lims-table.vue";
import ImplementPlanDia from './implementPlanDia.vue';
export default {
  name: 'implementationPlan',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { ImplementPlanDia, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        purposes: '',
      },
      tableColumn: [
        {
          label: '审核目的',
          prop: 'purposes',
          minWidth: '100'
        },
        {
          label: '审核性质',
          prop: 'nature',
          minWidth: '100'
        },
        {
          label: '审核范围',
          prop: 'scope',
          minWidth: '100'
        },
        {
          label: '审核依据',
          prop: 'basis',
          minWidth: '100'
        },
        {
          label: '审核组长',
          prop: 'teamLeader',
          minWidth: '100'
        },
        {
          label: '内审员',
          prop: 'internalAuditor',
          minWidth: '100',
        },
        {
          label: '审核日期',
          prop: 'reviewDate',
          minWidth: '100',
        },
        {
          label: '审核方法',
          prop: 'auditMethod',
          minWidth: '100',
        },
        {
          label: '首次会议时间',
          prop: 'firstMeetingTime',
          minWidth: '100',
        },
        {
          label: '末次会议时间',
          prop: 'lastMeetingTime',
          minWidth: '100',
        },
        {
          label: '审核报告提交日期',
          prop: 'submitTime',
          minWidth: '100',
        },
        {
          label: '审核报告发放范围',
          prop: 'submitScope',
          minWidth: '100',
        }, {
          dataType: 'tag',
          label: '批准状态',
          prop: 'ratifyStatus',
          minWidth: '100',
          formatData: (params) => {
            if (params === 0) {
              return '不批准';
            } else if (params === 1) {
              return '批准';
            } else {
              return null;
            }
          },
          formatType: (params) => {
            if (params === 0) {
              return 'danger';
            } else if (params === 1) {
              return 'success';
            } else {
              return null;
            }
          }
        }, {
          label: '批准内容',
          prop: 'ratifyRemark',
          minWidth: '100'
        },
        {
          dataType: 'action',
          minWidth: '220',
          fixed: 'right',
          label: '操作',
          operation: [
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            },
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('edit', row);
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '批准',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('ratify', row);
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delPlan(row)
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            }
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
        total: 0,
      },
      implementPlanDia: false,
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = this.searchForm
      const page = this.page
      this.tableLoading = true
      pageInternalImplement({ ...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
      })
    },
    // æ–°å¢žï¼Œç¼–辑,批准弹框
    openFormDia(type, row) {
      this.implementPlanDia = true
      this.$nextTick(() => {
        this.$refs.implementPlanDia.openDia(type, row)
      })
    },
    closeImplementDia() {
      this.implementPlanDia = false
      this.searchList()
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.purposes = '';
      this.searchList()
    },
    // åˆ é™¤
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delInternalImplement({ implementId: row.implementId }).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: '已取消删除'
        });
      });
    },
    // å¯¼å‡º
    handleDown(row) {
      exportInternalImplement({ implementId: row.implementId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '内审实施计划' + '.docx');
      })
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.search-background {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: space-between;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlan.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,314 @@
<template>
  <div>
    <div class="search-background">
      <span class="search-group">
        <span style="width: 160px">内审目的:</span>
        <el-input v-model="searchForm.purpose" clearable size="small"></el-input>
        <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">重 ç½®</el-button>
        <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
      </span>
      <span class="search-group">
        <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
      </span>
    </div>
    <div class="table">
      <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
        :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" @pagination="pagination" :page="page">
      </limsTable>
    </div>
    <year-plan-dia v-if="yearPlanDia" ref="yearPlanDia" @closeYearDia="closeYearDia"></year-plan-dia>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import YearPlanDia from './yearPlanDia.vue';
import {
  pageInternalPlan,
  delInternalPlan,
  exportInternalPlan,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'yearPlan',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { YearPlanDia, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        purpose: '',
      },
      tableColumn: [
        {
          label: '内审目的',
          prop: 'purpose',
          minWidth: '100'
        },
        {
          label: '内审范围',
          prop: 'scope',
          minWidth: '100'
        },
        {
          label: '内审依据',
          prop: 'basis',
          minWidth: '100'
        },
        {
          label: '组长',
          prop: 'leader',
          minWidth: '100'
        },
        {
          label: '组员',
          prop: 'crew',
          minWidth: '100'
        },
        {
          dataType: 'tag',
          label: '审核状态',
          prop: 'examineStatus',
          minWidth: '100',
          formatData: (params) => {
            if (params === 0) {
              return '不通过';
            } else if (params === 1) {
              return '通过';
            } else {
              return null;
            }
          },
          formatType: (params) => {
            if (params === 0) {
              return 'danger';
            } else if (params === 1) {
              return 'success';
            } else {
              return null;
            }
          }
        }, {
          label: '审核内容',
          prop: 'examineRemark',
          minWidth: '100'
        }, {
          label: '审核人',
          prop: 'examineUserName',
          minWidth: '100'
        }, {
          label: '审核日期',
          prop: 'examineTime',
          minWidth: '160'
        }, {
          dataType: 'tag',
          label: '批准状态',
          prop: 'ratifyStatus',
          minWidth: '100',
          formatData: (params) => {
            if (params === 0) {
              return '不批准';
            } else if (params === 1) {
              return '批准';
            } else {
              return null;
            }
          },
          formatType: (params) => {
            if (params === 0) {
              return 'danger';
            } else if (params === 1) {
              return 'success';
            } else {
              return null;
            }
          }
        }, {
          label: '批准内容',
          prop: 'ratifyRemark',
          minWidth: '100'
        }, {
          label: '批准人',
          prop: 'ratifyUserName',
          minWidth: '100'
        }, {
          label: '批准日期',
          prop: 'ratifyTime',
          minWidth: '160'
        },
        {
          dataType: 'action',
          fixed: 'right',
          minWidth: '220',
          label: '操作',
          operation: [
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            },
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('edit', row);
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '审核',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('examine', row);
              },
              disabled: (row) => {
                if (row.examineStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '批准',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('ratify', row);
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1 || row.examineStatus === 0 || row.examineStatus === null) {
                  return true
                } else {
                  return false
                }
              },
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delPlan(row)
              },
              disabled: (row) => {
                if (row.ratifyStatus === 1) {
                  return true
                } else {
                  return false
                }
              },
            }
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
        total: 0,
      },
      yearPlanDia: false,
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = this.searchForm
      const page = this.page
      this.tableLoading = true
      pageInternalPlan({ ...entity, ...page }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        console.log('err---', err);
        this.tableLoading = false
      })
    },
    // åˆ é™¤
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delInternalPlan({ planId: row.planId }).then(res => {
          this.tableLoading = false
          if (res.code === 201) return
          this.$message.success('删除成功')
          this.searchList()
        }).catch(err => {
          this.tableLoading = false
          console.log('err---', err);
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // æ–°å¢žï¼Œç¼–辑,批准弹框
    openFormDia(type, row) {
      this.yearPlanDia = true
      this.$nextTick(() => {
        this.$refs.yearPlanDia.openDia(type, row)
      })
    },
    // å¯¼å‡º
    handleDown(row) {
      exportInternalPlan({ planId: row.planId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '内审年度计划' + '.docx');
      })
    },
    closeYearDia() {
      this.yearPlanDia = false
      this.searchList()
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.purpose = '';
      this.searchList()
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.search-background {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: space-between;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/components/yearPlanDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,342 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false"
      :visible.sync="formDia" title="内部审核年度计划" width="1000px" @close="closeYearDia">
      <el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="auto">
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="内审目的" prop="purpose">
              <el-input v-model="form.purpose" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="内审范围" prop="scope">
              <el-input v-model="form.scope" :disabled="operationType === 'examine' || operationType === 'ratify'"
                :rows="3" clearable size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="内审依据" prop="basis">
              <el-input v-model="form.basis" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="组长" prop="leader">
              <el-input v-model="form.leader" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="组员" prop="crew">
              <el-input v-model="form.crew" :disabled="operationType === 'examine' || operationType === 'ratify'"
                clearable size="small"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <table border="1" cellspacing="10" class="table">
        <tr>
          <td class="div-with-line">
            <span style="float: left;">部门</span>
            <span style="float: right;">月份</span>
          </td>
          <th v-for="(item, index) in dic1" :key="index">{{ item }}</th>
        </tr>
        <tr v-for="(item, index) in planDetailList" :key="index">
          <td>{{ item.department }}</td>
          <th>
            <el-input v-model="item.january" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.february" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.march" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.april" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.may" :disabled="operationType === 'examine' || operationType === 'ratify'" clearable
              size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.june" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.july" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.august" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.september" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.october" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.november" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
          <th>
            <el-input v-model="item.december" :disabled="operationType === 'examine' || operationType === 'ratify'"
              clearable size="small"></el-input>
          </th>
        </tr>
      </table>
      <span slot="footer" class="dialog-footer">
        <el-button v-if="operationType === 'examine'" :loading="loading" @click="examine(0)">不通过</el-button>
        <el-button v-if="operationType === 'examine'" :loading="loading" type="primary" @click="examine(1)">通
          è¿‡</el-button>
        <el-button v-if="operationType === 'ratify'" :loading="loading" @click="approval(0)">不批准</el-button>
        <el-button v-if="operationType === 'ratify'" :loading="loading" type="primary" @click="handleApproval(1)">批
          å‡†</el-button>
        <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" @click="closeYearDia">取
          æ¶ˆ</el-button>
        <el-button v-if="operationType !== 'ratify' && operationType !== 'examine'" :loading="loading" type="primary"
          @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="examineDialog" title="审核" width="30%" @close="examineDialog = false">
      <span>
        å®¡æ ¸å¤‡æ³¨ï¼š
        <el-input v-model="examineRemark" type="textarea"></el-input>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="examineLoading" @click="examineDialog = false">取 æ¶ˆ</el-button>
        <el-button :loading="examineLoading" type="primary" @click="handleExamine(0)">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :visible.sync="approvalDialog" title="批准" width="30%" @close="approvalDialog = false">
      <span>
        æ‰¹å‡†å¤‡æ³¨ï¼š
        <el-input v-model="ratifyRemark" type="textarea"></el-input>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="approvalLoading" @click="approvalDialog = false">取 æ¶ˆ</el-button>
        <el-button :loading="approvalLoading" type="primary" @click="handleApproval(0)">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  getInternalPlanOne,
  addInternalPlan,
  updateInternalPlan,
  examineInternalPlan,
  ratifyInternalPlan,
} from '@/api/cnas/systemManagement/internalAuditManagement.js'
export default {
  name: 'yearPlanDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      form: {
        purpose: '',
        scope: '',
        basis: '',
        leader: '',
        crew: '',
      },
      rules: {
        purpose: [{ required: true, message: '请填写内审目的', trigger: 'blur' }],
        scope: [{ required: true, message: '请填写内审范围', trigger: 'blur' }],
        basis: [{ required: true, message: '请填写内审依据', trigger: 'blur' }],
        leader: [{ required: true, message: '请填写组长', trigger: 'blur' }],
        crew: [{ required: true, message: '请填写组员', trigger: 'blur' }],
      },
      operationType: '',
      approvalDialog: false,
      approvalLoading: false,
      examineDialog: false,
      examineLoading: false,
      ratifyRemark: '',
      examineRemark: '',
      dic1: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
      planDetailList: [{ department: '装备电缆实验室' }, { department: '通信产品实验室' }, { department: '电力产品实验室' }, { department: '储能产品实验室' }, { department: '射频线缆实验室' }],
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia(type, row) {
      this.formDia = true
      this.operationType = type
      if (type !== 'add') {
        this.searchInfo(row)
      }
    },
    // æŸ¥è¯¢è¯¦æƒ…
    searchInfo(row) {
      this.diaLoading = true
      getInternalPlanOne({ planId: row.planId }).then(res => {
        this.diaLoading = false
        if (res.code === 201) return
        this.form = res.data
        this.planDetailList = this.form.planDetailList
      }).catch(err => {
        console.log(err)
        this.diaLoading = false
      })
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.loading = true
          const internalPlan = this.HaveJson(this.form)
          internalPlan.planDetailList = this.HaveJson(this.planDetailList)
          if (this.operationType === 'add') {
            addInternalPlan(internalPlan).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeYearDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          } else if (this.operationType === 'edit') {
            updateInternalPlan(internalPlan).then(res => {
              this.loading = false
              if (res.code === 201) return
              this.$message.success('操作成功')
              this.closeYearDia()
            }).catch(err => {
              console.log('err---', err);
              this.loading = false
            })
          }
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    // å®¡æ ¸æµç¨‹
    examine(examineStatus) {
      if (examineStatus === 0) {
        this.examineDialog = true
      } else {
        this.handleExamine(examineStatus)
      }
    },
    handleExamine(examineStatus) {
      this.examineLoading = true
      const internalReport = this.HaveJson(this.form)
      internalReport.examineStatus = examineStatus
      internalReport.examineRemark = this.examineRemark
      examineInternalPlan(internalReport).then(res => {
        if (res.code === 200) {
          this.$message.success('提交成功!');
          this.approvalDialog = false
          this.closeYearDia(this.departId);
        }
        this.examineLoading = false
      }).catch(() => {
        this.examineLoading = false
      })
    },
    // æäº¤æ‰¹å‡†ä¿¡æ¯
    approval(ratifyStatus) {
      if (ratifyStatus === 0) {
        this.approvalDialog = true
      } else {
        this.handleApproval(ratifyStatus)
      }
    },
    handleApproval(ratifyStatus) {
      this.approvalLoading = true
      const internalReport = this.HaveJson(this.form)
      internalReport.ratifyStatus = ratifyStatus
      internalReport.ratifyRemark = this.ratifyRemark
      ratifyInternalPlan(internalReport).then(res => {
        if (res.code === 200) {
          this.$message.success('提交成功!');
          this.approvalDialog = false
          this.closeYearDia(this.departId);
        }
        this.approvalLoading = false
      }).catch(() => {
        this.approvalLoading = false
      })
    },
    closeYearDia() {
      this.$refs.form.resetFields();
      this.formDia = false
      this.$emit('closeYearDia')
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 6vh auto 50px !important;
}
>>>.el-dialog__body {
  max-height: 42em;
  overflow-y: auto;
}
>>>.is-required {
  margin-bottom: 6px;
}
.table {
  width: 100%;
  margin-top: 20px;
}
.table th {
  width: 70px;
}
.table td {
  width: 70px;
  height: 70px;
  text-align: center;
}
.div-with-line {
  width: 70px;
  height: 70px;
  position: relative;
  /*overflow: hidden; /* éšè—æº¢å‡ºå†…容 */
}
.div-with-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  height: 1px;
  background-color: #000000;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  transform-origin: center 50%;
  top: 50%;
  width: 100px;
}
</style>
src/views/CNAS/systemManagement/internalAuditManagement/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
<template>
  <div class="main">
    <el-tabs v-model="activeName" class="tab-panel" type="border-card">
      <el-tab-pane label="年度计划" name="yearPlan">
        <year-plan></year-plan>
      </el-tab-pane>
      <el-tab-pane label="内部实施计划" name="implementationPlan">
        <implementation-plan></implementation-plan>
      </el-tab-pane>
      <el-tab-pane label="内审会议签到" name="meetingSignIn">
        <audit-meeting-sign></audit-meeting-sign>
      </el-tab-pane>
      <el-tab-pane label="内审检查" name="auditInspection">
        <audit-inspection></audit-inspection>
      </el-tab-pane>
      <el-tab-pane label="纠正措施" name="correctiveAction">
        <corrective-action></corrective-action>
      </el-tab-pane>
      <el-tab-pane label="内审报告" name="auditReport">
        <audit-report></audit-report>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import YearPlan from './components/yearPlan.vue';
import implementationPlan from './components/implementationPlan.vue';
import AuditInspection from './components/auditInspection.vue';
import AuditReport from './components/auditReport.vue';
import AuditMeetingSign from './components/auditMeetingSign.vue';
import CorrectiveAction from './components/correctiveAction.vue';
export default {
  name: 'InternalAuditManagement',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { CorrectiveAction, AuditMeetingSign, AuditReport, AuditInspection, YearPlan, implementationPlan },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      activeName: 'yearPlan',
    };
  },
  // æ–¹æ³•集合
  methods: {}
};
</script>
<style scoped>
.main {
  padding: 15px 0;
}
.tab-panel {
  background: #fff;
}
</style>
src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,332 @@
<template>
  <div style="padding: 10px">
    <div class="header">
      <span></span>
      <div style="min-width: 200px">
        <el-button type="primary" size="small" @click="addFun">新 å¢ž</el-button>
        <el-button type="primary" size="small" @click="approvalFun">审 æ‰¹</el-button>
        <el-button type="primary" size="small" @click="approveFun">批 å‡†</el-button>
        <el-upload style="display: inline-block; padding: 0 6px" :headers="uploadHeader" :action="action"
          :on-error="onError" :show-file-list="false" :on-success="onSuccess">
          <el-button size="small" type="primary">导 å…¥</el-button>
        </el-upload>
        <el-button size="small" @click="openDownloadDia">导出</el-button>
      </div>
    </div>
    <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)">
      <el-table-column type="index" label="序号" width="120">
        <template v-slot="scope">
          <span>{{ (page.current - 1) * page.size + scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="venue" label="地点/活动" min-width="180"></el-table-column>
      <el-table-column prop="hazard" label="危险因素" width="testDate" min-width="180"></el-table-column>
      <el-table-column prop="accidents" label="可能导致的事故" min-width="180"></el-table-column>
      <el-table-column prop="injury" label="对人可能造成的危害" min-width="180"></el-table-column>
      <el-table-column label="风险评价" align="center" min-width="180">
        <template>
          <el-table-column prop="riskL" label="L" min-width="80"></el-table-column>
          <el-table-column prop="riskE" label="E" min-width="80"></el-table-column>
          <el-table-column prop="riskC" label="C" min-width="80"></el-table-column>
          <el-table-column prop="riskD" label="D" min-width="80"></el-table-column>
        </template>
      </el-table-column>
      <el-table-column prop="level" label="风险等级" min-width="180"></el-table-column>
      <el-table-column prop="measures" label="控制措施" min-width="180"></el-table-column>
      <el-table-column prop="editorName" label="编制人姓名" min-width="180"></el-table-column>
      <el-table-column prop="editorDate" label="编制日期" min-width="180"></el-table-column>
      <el-table-column prop="approvalName" label="审批人姓名" min-width="180"></el-table-column>
      <el-table-column prop="approvalDate" label="审批日期" min-width="180"></el-table-column>
      <el-table-column prop="approvalStatus" label="审批状态" min-width="180">
        <template #default="{ row }">
          {{ row.approvalStatus === 1 ? '通过' : row.approvalStatus === 2 ? '不通过' : '' }}
        </template>
      </el-table-column>
      <el-table-column prop="approveName" label="批准人姓名" min-width="180"></el-table-column>
      <el-table-column prop="approveStatus" label="批准状态" min-width="180">
        <template #default="{ row }">
          {{ row.approveStatus === 1 ? '通过' : row.approveStatus === 2 ? '不通过' : '' }}
        </template>
      </el-table-column>
      <el-table-column prop="approveDate" label="批准日期" min-width="180"></el-table-column>
      <el-table-column fixed="right" label="操作" width="100">
        <template v-slot="scope">
          <el-button type="text" size="small" @click="editClick(scope.row)">编辑</el-button>
          <el-button @click="deleteClick(scope.row)" type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" :total="page.total"
      layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
      @current-change="handleCurrentChange">
    </el-pagination>
    <el-dialog title="提示" :visible.sync="dialogVisible" width="50%">
      <el-form ref="form" :model="form" label-width="120px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="地点/活动">
              <el-input v-model="form.venue" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="危险因素">
              <el-input v-model="form.hazard" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="可能导致的事故">
              <el-input v-model="form.accidents" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="对人可能造成的危害" label-width="140px">
              <el-input v-model="form.injury" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="风险评价/L">
              <el-input v-model="form.riskL" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="风险评价/E">
              <el-input v-model="form.riskE" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="风险评价/C">
              <el-input v-model="form.riskC" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="风险评价/D">
              <el-input v-model="form.riskD" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="风险等级">
              <el-input v-model="form.level" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="控制措施">
              <el-input v-model="form.measures" size="small"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="addApi" :loading="loading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { getToken } from "@/utils/auth";
import {
  getPageResults,
  dangerousRiskApproval,
  hazardIdentificationAndRiskApproval,
  removeRiskFactors,
  addNewRiskFactors,
  exportHazardFactorIdentification,
} from '@/api/cnas/systemManagement/measuresDealRisks.js'
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      dialogVisible: false,
      form: {},
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableData: [],
      loading: false
    }
  },
  computed: {
    action() {
      return this.javaApi + '/manageRiskAssessmentResults/riskAssessmentImport'
    },
    ...mapGetters(["userId"]),
  },
  methods: {
    handleSizeChange(val) {
      this.page.size = val;
      this.initData();
    },
    handleCurrentChange(val) {
      this.page.current = val;
      this.initData();
    },
    // åˆ†é¡µè¡¨æ ¼åˆå§‹åŒ–
    initData() {
      this.tableData = []
      getPageResults(this.page).then(res => {
        if (res.code === 201) return;
        this.tableData = res.data.records;
        this.page.total = res.data.total;
      });
    },
    // å®¡æ‰¹
    approvalFun() {
      this.$confirm('是否审批通过?', '提示', {
        confirmButtonText: '通过',
        cancelButtonText: '不通过',
        type: 'warning',
        closeOnClickModal: false, // ç¦æ­¢ç‚¹å‡»é®ç½©å±‚关闭
        distinguishCancelAndClose: true,
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            this.approvalApi(this.userId, 1)
            done();
          } else if (action === 'cancel') {
            this.approvalApi(this.userId, 2)
            done();
          } else if (action === 'close') {
            // ç‚¹å‡»â€œÃ—”按钮,不允许关闭
            done();
          }
        }
      })
    },
    // å®¡æ‰¹æŽ¥å£
    approvalApi(userId, status) {
      dangerousRiskApproval({ approval: userId, status: status }).then(res => {
        if (res.code === 201) return;
        this.initData()
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
      });
    },
    // æ‰¹å‡†
    approveFun() {
      this.$confirm('是否批准通过?', '提示', {
        confirmButtonText: '通过',
        cancelButtonText: '不通过',
        type: 'warning',
        closeOnClickModal: false, // ç¦æ­¢ç‚¹å‡»é®ç½©å±‚关闭
        distinguishCancelAndClose: true,
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            this.approveApi(this.userId, 1)
            done();
          } else if (action === 'cancel') {
            this.approveApi(this.userId, 2)
            done();
          } else if (action === 'close') {
            // ç‚¹å‡»â€œÃ—”按钮,不允许关闭
            done();
          }
        }
      })
    },
    // æ‰¹å‡†æŽ¥å£
    approveApi(userId, status) {
      hazardIdentificationAndRiskApproval({ approve: userId, status: status }).then(res => {
        if (res.code === 201) return;
        this.initData()
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
      });
    },
    // æ–‡ä»¶ä¸Šä¼ å¤±è´¥
    onError() {
      this.$message({
        type: 'error',
        message: '操作失败!'
      });
    },
    // æ–‡ä»¶ä¸Šä¼ æˆåŠŸ
    onSuccess(response) {
      if (response.code == 201) {
        this.$message({
          type: 'error',
          message: response.message,
        });
        return
      }
      this.initData()
      this.$message({
        type: 'success',
        message: '操作成功!'
      });
    },
    addFun() {
      this.form = {}
      this.dialogVisible = true
    },
    // åˆ é™¤
    deleteClick(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        removeRiskFactors({ id: row.id }).then(res => {
          if (res.code === 201) return;
          this.initData()
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    addApi() {
      this.loading = true
      addNewRiskFactors(this.form).then(res => {
        if (res.code === 201) return;
        this.dialogVisible = false
        this.loading = false
        this.initData()
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
      }).catch(err => {
        this.loading = false
      });
    },
    // ç¼–辑
    editClick(row) {
      this.form = { ...row }
      this.dialogVisible = true
    },
    // å¯¼å‡º
    openDownloadDia() {
      exportHazardFactorIdentification().then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '危险因素辨识与风险评价结果一览' + '.docx');
      })
    },
  },
  mounted() {
    this.initData()
  },
}
</script>
<style scoped>
.header {
  height: 3em;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,299 @@
<template>
  <div style="padding: 10px">
    <div class="header">
      <div></div>
      <div style="min-width: 200px">
        <el-button type="primary" size="small" @click="addFun">新 å¢ž</el-button>
        <el-button type="primary" size="small" @click="approvalFun">审 æ‰¹</el-button>
        <el-button type="primary" size="small" @click="approveFun">批 å‡†</el-button>
        <el-upload style="display: inline-block; padding: 0 6px" :action="action" :headers="uploadHeader"
          :on-error="onError" :show-file-list="false" :on-success="onSuccess">
          <el-button size="small" type="primary">导 å…¥</el-button>
        </el-upload>
        <el-button size="small" @click="openDownloadDia">导出</el-button>
      </div>
    </div>
    <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)">
      <el-table-column type="index" label="序号" width="120">
        <template v-slot="scope">
          <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="jobActivity" label="作业活动" min-width="180"></el-table-column>
      <el-table-column prop="category" label="风险因素类别" width="testDate" min-width="180"></el-table-column>
      <el-table-column prop="description" label="风险因素描述" min-width="180"></el-table-column>
      <el-table-column prop="result" label="可导致的事故" min-width="180"></el-table-column>
      <el-table-column prop="intolerable" label="是否不可承受风险" min-width="180"></el-table-column>
      <el-table-column prop="plan" label="控制计划" min-width="180"></el-table-column>
      <el-table-column prop="editorName" label="编制人姓名" min-width="180"></el-table-column>
      <el-table-column prop="editorDate" label="编制日期" min-width="180"></el-table-column>
      <el-table-column prop="approvalName" label="审批姓名" min-width="180"></el-table-column>
      <el-table-column prop="approvalDate" label="审批日期" min-width="180"></el-table-column>
      <el-table-column prop="approvalStatus" label="审批状态" min-width="180">
        <template #default="{ row }">
          {{ row.approvalStatus === 1 ? '通过' : row.approvalStatus === 2 ? '不通过' : '' }}
        </template>
      </el-table-column>
      <el-table-column prop="approveName" label="批准姓名" min-width="180"></el-table-column>
      <el-table-column prop="approveStatus" label="批准状态" min-width="180">
        <template #default="{ row }">
          {{ row.approveStatus === 1 ? '通过' : row.approveStatus === 2 ? '不通过' : '' }}
        </template>
      </el-table-column>
      <el-table-column prop="approveDate" label="批准人日期" min-width="180"></el-table-column>
      <el-table-column fixed="right" label="操作" width="100">
        <template v-slot="scope">
          <el-button type="text" size="small" @click="editClick(scope.row)">编辑</el-button>
          <el-button @click="deleteClick(scope.row)" type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" :total="search.total"
      layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
      @current-change="handleCurrentChange">
    </el-pagination>
    <el-dialog title="提示" :visible.sync="dialogVisible" width="50%">
      <el-form ref="form" :model="form" label-width="120px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="作业活动">
              <el-input v-model="form.jobActivity" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="风险因素类别">
              <el-input v-model="form.category" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="风险因素描述">
              <el-input v-model="form.description" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="可导致的事故">
              <el-input v-model="form.result" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否不可承受风险" label-width="130px">
              <el-input v-model="form.intolerable" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="控制计划">
              <el-input v-model="form.plan" size="small"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="addApi" :loading="loading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  getPageList,
  riskAnalysisApprovalOfControlPlanChecklist,
  approvalOfControlPlanChecklist,
  deleteSignificantRiskFactorAnalysis,
  analysisOfMajorRiskFactorsAdded,
  exportSignificantRiskFactors,
} from '@/api/cnas/systemManagement/measuresDealRisks.js'
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      dialogVisible: false,
      form: {},
      loading: false,
      search: {
        size: 20,
        current: 1,
        total: 0
      },
      tableData: [],
    }
  },
  computed: {
    action() {
      return this.javaApi + '/manageControlPlanList/importControlPlanList'
    },
    ...mapGetters(["userId"]),
  },
  methods: {
    handleSizeChange(val) {
      this.search.size = val;
      this.initData();
    },
    handleCurrentChange(val) {
      this.search.current = val;
      this.initData();
    },
    initData() {
      getPageList(this.search).then(res => {
        if (res.code === 201) return;
        this.tableData = res.data.records;
        this.search.total = res.data.total;
      });
    },
    // å®¡æ‰¹
    approvalFun() {
      this.$confirm('是否审批通过?', '提示', {
        confirmButtonText: '通过',
        cancelButtonText: '不通过',
        type: 'warning',
        closeOnClickModal: false, // ç¦æ­¢ç‚¹å‡»é®ç½©å±‚关闭
        distinguishCancelAndClose: true,
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            this.approvalApi(this.userId, 1)
            done();
          } else if (action === 'cancel') {
            this.approvalApi(this.userId, 2)
            done();
          } else if (action === 'close') {
            // ç‚¹å‡»â€œÃ—”按钮,不允许关闭
            done();
          }
        }
      })
    },
    // å®¡æ‰¹æŽ¥å£
    approvalApi(userId, status) {
      riskAnalysisApprovalOfControlPlanChecklist({ approval: userId, status }).then(res => {
        if (res.code === 201) return;
        this.initData()
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
      });
    },
    // æ‰¹å‡†
    approveFun() {
      this.$confirm('是否批准通过?', '提示', {
        confirmButtonText: '通过',
        cancelButtonText: '不通过',
        type: 'warning',
        closeOnClickModal: false, // ç¦æ­¢ç‚¹å‡»é®ç½©å±‚关闭
        distinguishCancelAndClose: true,
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            this.approveApi(this.userId, 1)
            done();
          } else if (action === 'cancel') {
            this.approveApi(this.userId, 2)
            done();
          } else if (action === 'close') {
            // ç‚¹å‡»â€œÃ—”按钮,不允许关闭
            done();
          }
        }
      })
    },
    // æ‰¹å‡†æŽ¥å£
    approveApi(userId, status) {
      approvalOfControlPlanChecklist({ approve: userId, status }).then(res => {
        if (res.code === 201) return;
        this.initData()
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
      });
    },
    onError() {
      this.$message({
        type: 'error',
        message: '操作失败!'
      });
    },
    onSuccess(response) {
      if (response.code == 201) {
        this.$message({
          type: 'error',
          message: response.message,
        });
        return
      }
      this.initData()
      this.$message({
        type: 'success',
        message: '操作成功!'
      });
    },
    addFun() {
      this.form = {}
      this.dialogVisible = true
    },
    // åˆ é™¤
    deleteClick(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteSignificantRiskFactorAnalysis({ id: row.id }).then(res => {
          if (res.code === 201) return;
          this.initData()
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    addApi() {
      this.loading = true
      analysisOfMajorRiskFactorsAdded(this.form).then(res => {
        if (res.code === 201) return;
        this.dialogVisible = false
        this.loading = false
        this.initData()
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
      }).catch(err => {
        this.loading = false
      });
    },
    // ç¼–辑
    editClick(row) {
      this.form = { ...row }
      this.dialogVisible = true
    },
    // å¯¼å‡º
    openDownloadDia() {
      exportSignificantRiskFactors().then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '重大风险因素分析及控制计划清单' + '.docx');
      })
    },
  },
  mounted() {
    this.initData()
  },
}
</script>
<style scoped>
.header {
  height: 3em;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/CNAS/systemManagement/measuresDealRisks/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
<template>
  <div class="main">
    <el-tabs v-model="activeName" type="border-card" :lazy="true">
      <el-tab-pane label="危险因素辨识与风险评价结果一览" name="危险因素辨识与风险评价结果一览">
        <HazardIdentificationRiskAssessment v-if="activeName === '危险因素辨识与风险评价结果一览'" />
      </el-tab-pane>
      <el-tab-pane label="重大风险因素分析及控制计划清单" name="重大风险因素分析及控制计划清单">
        <listRiskAnalysisControlPlans v-if="activeName === '重大风险因素分析及控制计划清单'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import HazardIdentificationRiskAssessment
  from "./components/hazardIdentificationRiskAssessment.vue";
import listRiskAnalysisControlPlans
  from "./components//listRiskAnalysisControlPlans.vue";
export default {
  components: { HazardIdentificationRiskAssessment, listRiskAnalysisControlPlans },
  data() {
    return {
      activeName: '危险因素辨识与风险评价结果一览',
    }
  }
}
</script>
<style scoped>
.main {
  width: 100%;
}
/deep/ .el-tabs--border-card>.el-tabs__content {
  height: calc(100vh - 9em);
  padding: 0;
}
</style>
src/views/business/inspectionReview/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,434 @@
<template>
  <div class="app-container">
    <div>
      <el-form :model="entity" ref="entity" size="small" :inline="true">
        <el-form-item label="委托编号" prop="entrustCode">
          <el-input size="small" placeholder="请输入" clearable
                    v-model="entity.entrustCode"
                    @keyup.enter.native="refreshTable()"></el-input>
        </el-form-item>
        <el-form-item label="下单类别" prop="entrustCode">
          <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()">
            <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 ç½®</el-button>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 è¯¢</el-button>
        </el-form-item>
      </el-form>
      <div class="page_total">
        <span>总计任务数量:</span>
        <span>{{page.total}}</span>
      </div>
    </div>
    <div>
      <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
                  :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination"
                  key="tableData0"></lims-table>
    </div>
<!--    <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == null">-->
<!--      <Add :active="activeFace" :currentId="currentId"/>-->
<!--    </div>-->
<!--    <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 0">-->
<!--      <CustomsInspection :active="activeFace" :customsInspection="customsInspection" :currentId="currentId"/>-->
<!--    </div>-->
<!--    <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 1">-->
<!--      <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder>-->
<!--    </div>-->
<!--    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :typeSource="typeSource" :state="state"/>-->
<!--    &lt;!&ndash;产业链信息查看&ndash;&gt;-->
<!--    <ShowInfo v-if="showInfoDialog" :showInfoDialog="showInfoDialog" ref="showInfoDialog"></ShowInfo>-->
    <!--报告查看-->
    <el-dialog title="报告查看" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
               :fullscreen="fullscreen">
      <div class="full-screen">
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i>
        <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" >
      </div>
      <div style="height: 80vh;" v-if="issuedVisible">
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
      </div>
    </el-dialog>
    <el-dialog title="查看附件" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen>
      <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}"
                   style="max-height: 90vh;overflow-y: auto;" />
    </el-dialog>
  </div>
</template>
<script>
import { getYearAndMonthAndDays } from "@/utils/date";
// import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {selectInsOrderPlanList, selectUserCondition} from "@/api/business/inspectionTask";
import {mapGetters} from "vuex";
import {upReportUrl} from "@/api/business/insReport";
import {delfile} from "@/api/business/rawMaterialOrder";
import filePreview from "@/components/Preview/filePreview.vue";
export default {
  components: {
    filePreview,
    onlyoffice,
    limsTable,
    // ShowInfo,
  },
  dicts: ["urgency_level", "inspection_task_state"],
  computed: {
    ...mapGetters(["nickName", "userId"]),
  },
  data() {
    return {
      lookDialogVisible: false,
      alone: false,
      tabList: [],
      active: 1,
      tabIndex: 0,
      entity: {
        sonLaboratory: null,
        insState: '3',
        userId: 0,
        typeSource: null,
        isCheck: 1
      },
      tableData: [],
      column: [
        {
          label: "委托编号",
          prop: "entrustCode",
          width: "160px",
          dataType: "link",
          linkMethod: "selectAllByOne",
        },
        { label: "样品名称", prop: "sample", width: "160px" },
        {
          label: "下单类别",
          prop: "typeSource",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "成品下单";
            } else {
              return "原材料下单";
            }
          },
        },
        { label: "样品型号", prop: "sampleModel", width: "120px" },
        {
          label: "紧急程度",
          prop: "type",
          dataType: "tag",
          formatData: (params) => {
            return this.urgencyLevel.find((m) => m.value == params).label;
          },
        },
        {
          label: "检验类型",
          prop: "orderType",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            return this.orderTypeList.find((m) => m.value == params).label;
          },
          formatType: (params) => {
            return this.orderTypeList.find((m) => m.value == params).type;
          },
        },
        {
          label: "状态",
          prop: "insState",
          dataType: "tag",
          formatData: (params) => {
            return this.inspectionTaskState.find((m) => m.value == params)
              .label;
          },
          formatType: (params) => {
            return this.inspectionTaskState.find((m) => m.value == params).type;
          },
        },
        { label: "检验人", prop: "userName" },
        { label: "复核人", prop: "checkName" },
        { label: "约定时间", prop: "appointed" },
        { label: "下发时间", prop: "sendTime", width: "140px" },
        { label: "检验开始时间", prop: "insTime", width: "140px" },
        { label: "理由", prop: "verifyTell", width: "140px" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "复核",
              type: "text",
              clickFun: (row) => {
                this.handleReview(row);
              },
              disabled: (row) => {
                return row.userName == null || row.userName && !row.userName.includes(this.nickName)
              }
            },
            {
              name: "下载报告",
              type: "text",
              clickFun: (row) => {
                this.download(row);
              },
            },
            {
              name: "上传",
              type: "upload",
              accept: '.doc,.docx',
              url: '/insReport/inReport',
              uploadIdFun: (row) => {
                return row.insReportId
              }
            },
            {
              name: "还原",
              type: "text",
              clickFun: (row) => {
                this.handleRestore(row);
              },
            },
            {
              name: "查看报告",
              type: "text",
              clickFun: (row) => {
                this.handleIssued(row);
              }
            },
            // {
            //   name: "产业链",
            //   type: "text",
            //   clickFun: (row) => {
            //     this.openInfoDialog(row);
            //   },
            //   disabled: (row) => {
            //     return row.typeSource !== 1
            //   },
            // }
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading: false,
      upIndex: 0,
      planTotal: 0,
      insStateList: [],
      state:0,//0:台账页,1:检验页面,2检验页面(复核),默认为0
      activeFace: 0, //1:下单,2:查看,3:审核,默认为0
      examine: null,
      isReport: 0,
      currentId: null,
      orderId: 0,
      personList:[],
      currentTime: null,
      sonLaboratoryList:[],
      typeSourceList: [
        {label: '成品下单', value: 0},
        {label: '原材料下单', value: 1},
      ],
      isCopper: null,
      customsInspection: {},
      typeSource: null,// 0:成品下单,1:原材料下单
      showInfoDialog: false, // äº§ä¸šé“¾ä¿¡æ¯æŸ¥çœ‹
      issuedVisible: false,
      fullscreen: false,
      option:null,
      orderTypeList: [
        {label: '委托试验', value: 'Customer-ordered test'},
        {label: '抽检', value: '抽检'},
        {label: '进厂检验', value: '进厂检验'},
        {label: '季度检验', value: 'Quarterly inspection'},
      ],
      urgencyLevel: [],
      inspectionTaskState: [],
    }
  },
  created() {
    this.getDicts("urgency_level").then((response) => {
      this.urgencyLevel = this.dictToValue(response.data);
    });
    this.getDicts("inspection_task_state").then((response) => {
      this.inspectionTaskState = this.dictToValue(response.data);
    });
    this.getAuthorizedPerson()
    this.currentTime = getYearAndMonthAndDays()
  },
  mounted() {
    this.refreshTable()
  },
  methods: {
    refreshTable() {
      this.tableLoading = true;
      let param = { ...this.entity, ...this.page };
      delete param.total;
      selectInsOrderPlanList({ ...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.refreshTable();
    },
    refresh() {
      this.resetForm('entity')
      this.refreshTable()
    },
    rowClassName({ row, rowIndex }) {
      if (this.currentTime == row.appointed) {
        return "highlight-warning-row-border";
      } else if (this.currentTime > row.appointed) {
        return "highlight-danger-row-border";
      }
      return "";
    },
    // æŸ¥çœ‹äº§ä¸šé“¾ä¿¡æ¯
    // openInfoDialog (row) {
    //   this.showInfoDialog = true
    //   this.$nextTick(() => {
    //     this.$refs.showInfoDialog.getInfo(row.ifsInventoryId)
    //   })
    // },
    selectAllByOne(row) {
      this.isCopper = row.isCopper
      this.customsInspection = row
      this.activeFace = 2;
      this.examine = 1;
      this.isReport = 0;
      this.currentId = parseInt(row.id)
      switch (row.isCopper) {
        case 0:
          // åŽŸææ–™
          this.$router.push({
            path: "/materialOrder/customsInspection", query: {
              customsInspection: row,
              active: this.activeFace,
              currentId: this.currentId,
              isReport: this.isReport
            }
          });
          break;
        case null:
          // æˆå“
          this.$router.push({
            path: "/productOrder/add", query: {
              examine: this.examine,
              active: this.activeFace,
              currentId: this.currentId
            }
          });
          break;
        case 1:
          // é“œæ
          this.$router.push({
            path: "/materialOrder/copperOrder", query: {
              active: this.activeFace,
              currentId: this.currentId
            }
          });
          break;
      }
    },
    // å¤æ ¸å›žè°ƒ
    handleReview(row){
      this.$router.push({
        path: "/inspectionTask/inspection",
        query: {
          sonLaboratory: row.sonLaboratory,
          state: 2,
          typeSource: row.typeSource,
          orderId: row.id,
        },
      })
    },
    // ä¸Šä¼ æŠ¥å‘Š
    handleUpload (row) {
    },
    // ä¸‹è½½æŠ¥å‘Š
    download(row) {
      let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
      const link = document.createElement('a');
      link.href = this.javaApi + url;
      link.target = '_blank';
      document.body.appendChild(link);
      link.click();
    },
    // è¿˜åŽŸæ“ä½œ
    handleRestore(row) {
      this.$confirm('是否还原当前报告?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        upReportUrl({id: row.insReportId}).then(res => {
          if (res.code === 200) {
            this.$message.success('还原成功')
            this.refreshTable()
          }
        })
      }).catch(() => { })
    },
    // æŸ¥çœ‹æŠ¥å‘Š
    handleIssued(row) {
      if (!row.tempUrlPdf) return this.$message.warning('文件未上传')
      this.currentInfo = row
      this.lookDialogVisible = true
      // this.currentInfo = row;
      // let fileName = row.url
      // let fileType = "docx"
      // if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
      //   fileName = row.tempUrlPdf
      //   fileType = "pdf"
      // }
      // fileName = fileName.replace('/word/','')
      // const userName = this.nickName
      // this.option = {
      //   url: this.javaApi + "/word/" + fileName,
      //   isEdit: false,
      //   fileType: fileType,
      //   title: fileName,
      //   lang: 'zh-CN',
      //   isPrint: false,
      //   user_id: 1,
      //   user_name: userName,
      //   editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
      // }
      // this.issuedVisible = true;
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
            label: a.name,
            value: a.id,
          });
        });
        this.personList = data;
      });
    },
  }
}
</script>
<style scoped>
.page_total {
  margin-bottom: 10px;
}
</style>
src/views/business/inspectionTask/components/InspectionWord.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,2330 @@
<template>
  <el-dialog :close-on-press-escape="false"
             :visible.sync="isShow"
             custom-class="unPassCheck"
             title="不合格复测"
             width="90%"
             @close="$emit('closeUnPassCheckDialog')">
    <div v-loading="loading" class="inspection">
<!--      <el-row class="title">-->
<!--        <el-col :span="24" style="text-align: right;">-->
<!--          <el-button size="small" type="primary" @click="addVerifyDia = true" v-if="state==1">提交</el-button>-->
<!--        </el-col>-->
<!--      </el-row>-->
      <div class="center">
        <div class="search" style="text-align: left;display: flex;align-items: center;justify-content: space-between;">
          <div style="display: flex;align-items: center;">
            <span v-if="tableList.length>0">检验模板:</span>
            <el-radio-group v-model="currentTable" size="small">
              <el-radio-button v-for="(item,index) in tableLists" :key="index" :label="item.templateId"
                               size="small">{{ item.templateName }}</el-radio-button>
            </el-radio-group>
          </div>
          <div style="display: flex;align-items: center;">
            <span v-if="typeSource == '1'">&nbsp;&nbsp;复测次数:</span>
            <el-select v-if="typeSource == '1'" v-model="retestTag"
                       placeholder="请选择"
                       size="small" @change="m=>handleChangeCableTag(currentSample.id,4, 'cableTag', m)">
              <el-option
                v-for="item in unPassNumList"
                :key="item.retestTag"
                :label="item.retestTag"
                :value="item.retestTag">
              </el-option>
            </el-select>
          </div>
        </div>
        <!-- å¸¸è§„检验原始记录 -->
        <div id="tableBox" v-loading="tableLoading" class="center-box">
          <table v-for="(item,index) in tableList" :key="index+currentTable+currentSample.id" border="1" cellpadding="10" class="tables">
            <tbody>
            <tr v-for="(m,i) in item.arr" :key="i">
              <td v-for="(n,j) in m" v-if="n.v.mc==undefined || Object.keys(n.v.mc).length === 4" :id='item.templateId+"-"+n.i+"-"+n.r+"-"+n.c'
                  :key="j" :colspan="n.v.mc&&n.v.mc.cs?n.v.mc.cs:1"
                  :rowspan="n.v.mc&&n.v.mc.rs?n.v.mc.rs:1"
                  :style="`background:${n.v.bg?n.v.bg:''};color:${n.v.fc};font-size:${n.v.fs}px;width:${handleWidth(n)}px !important;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl?'bold':''};`">
                <div :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]}px;`"
                     class="content">
                  <template v-if="n.v.ps!=undefined && typeof n.v.ps.value ==='string'&& n.v.ps.value.includes('检验值') && state==1">
                    <el-input v-if="getInspectionValueType(n.i) == 1" :key="'abc-'+'000'+index+'000'+i+'000'+j" v-model="n.v.v"
                              :disabled="(getInspectionItemType(n.i) == 1 && !dataAcquisitionEidtAble )|| (n.u != userId && n.u != undefined && n.u != '')"
                              class="table_input"
                              @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`, n,'getDataType')" @input="handleInput(n)" @mousewheel.native.prevent
                              @keydown.enter="changeInput('',`${item.templateId}-${n.r}-${n.c}-${n.i}`, n, 'getDataType')">
                    </el-input>
                    <el-input v-else-if="getInspectionValueType(n.i) == 2" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"
                              class="table_input"
                              type="textarea"
                              @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`,n,'getDataType')" />
<!--                    <el-select v-else-if="getInspectionValueType(n.i) == 5" v-model="n.v.v" :disabled="state>1||getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"-->
<!--                               class="table_input" @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`,n,'getDataType')"-->
<!--                               @visible-change="e=>getDic(e,n.i)">-->
<!--                      <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option>-->
<!--                    </el-select>-->
                    <span v-else-if="getInspectionValueType(n.i) == 4"
                          :style="`font-family:${n.v.ff} !important;`">/</span>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='结论'">
                    <el-select v-if="(getInspectionValueType(n.i) == 2 || getInspectionValueType(n.i) == 5) && state==1&&PROJECT=='装备电缆'"
                               v-model="n.v.v" class="table_input" @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`, n,'getDataType')">
                      <el-option :value="1" label="合格"></el-option>
                      <el-option :value="0" label="不合格"></el-option>
                      <el-option :value="3" label="不判定"></el-option>
                      <el-option :value="2" label="待定"></el-option>
                    </el-select>
                    <template v-if="state > 1">
                      <span v-if="n.v.v===1" :style="`font-family:${n.v.ff} !important;color: green;`">合格</span>
                      <span v-else-if="n.v.v===0" :style="`font-family:${n.v.ff} !important;color: red;`">不合格</span>
                      <span v-else-if="n.v.v===3" :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">不判定</span>
                      <span v-else :style="`font-family:${n.v.ff} !important;`">待定</span>
                    </template>
                    <template v-if="getInspectionValueType(n.i) != 2 && state==1">
                      <span v-if="n.v.v===1" :style="`font-family:${n.v.ff} !important;color: green;`">合格</span>
                      <span v-else-if="n.v.v===0" :style="`font-family:${n.v.ff} !important;color: red;`">不合格</span>
                      <span v-else-if="n.v.v===3" :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">不判定</span>
                      <span v-else :style="`font-family:${n.v.ff} !important;`">待定</span>
                    </template>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='设备编码' && state==1">
                    <span>{{ n.v.v }}</span>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='设备名称'">
                    <el-select v-model="n.v.v" :disabled="state>1"
                               class="table_input" filterable
                               multiple
                               placeholder="设备" remote @change="(val)=>changeEquip(val, n)"
                               @visible-change="e=>getEquipOptions(e,n.i)">
                      <el-option v-for="item in equipOptions" :key="item.value"  :label="item.label" :value="item.value">
                        {{item.label + '--' +item.value}}
                      </el-option>
                    </el-select>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='要求值' && state==1">
                    <span :style="`font-family:${n.v.ff} !important;`">{{getTell(n.i)}}</span>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='计算值' && state==1"><span :style="`font-family:${n.v.ff} !important;`">{{ toFixed(n.v.v,n.v.ct) }}</span></template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='最终值' && state==1">
                    <span :style="`font-family:${n.v.ff} !important;`">{{ toFixed(n.v.v,n.v.ct) }}</span>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='样品编号'">
                    <div :title="currentSample.sampleCode" style="display: flex;flex-wrap: nowrap;align-items: center;width: 100%">
                      <i v-if="!currentFiberOpticTape&&!currentFiberOptic" class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)"></i>
                      <div :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">{{currentSample.sampleCode}}</div>
                      <i v-if="!currentFiberOpticTape&&!currentFiberOptic" class="el-icon-caret-right table_caret"
                         style="width: 16px;" @click="caretSample(1)"></i>
                    </div>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='样品型号'">
                    <div v-if="currentSample.model!==undefined&&currentSample.model!==null" :style="`font-family:${n.v.ff} !important;`">{{currentSample.model}}</div>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='套管'">
                    <div style="display: flex;flex-wrap: nowrap;align-items: center;">
                      <div :style="`font-family:${n.v.ff} !important;`">{{currentBushing?currentBushing.color:''}}</div>
                    </div>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='光纤带'">
                    <div style="display: flex;flex-wrap: nowrap;align-items: center;">
                      <i v-if="currentFiberOpticTape" class="el-icon-caret-left table_caret" @click="caretTape(-1)
                      "></i>
                      <div :style="`font-family:${n.v.ff} !important;`">{{currentFiberOpticTape?currentFiberOpticTape.code:''}}</div>
                      <i v-if="currentFiberOpticTape"
                         class="el-icon-caret-right table_caret"
                         @click="caretTape(1)"></i>
                    </div>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='光纤'">
                    <div style="display: flex;flex-wrap: nowrap;align-items: center;">
                      <i v-if="currentFiberOptic" class="el-icon-caret-left table_caret"
                         @click="caretOptic(-1)"></i>
                      <div :style="`font-family:${n.v.ff} !important;`">{{currentFiberOptic?currentFiberOptic.color:''}}
                      </div>
                      <i
                        v-if="currentFiberOptic" class="el-icon-caret-right table_caret" @click="caretOptic(1)"></i>
                    </div>
                  </template>
                  <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)" ></span>
                </div>
              </td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>
      <el-dialog :visible.sync="reviewDia" title="检验复核" width="500px">
        <div v-if="reviewDia" class="body" style="display: flex;padding: 10px;">
          <div class="search_label" style="width: 150px;"><span class="required-span">* </span>不通过的理由:</div>
          <div class="search_input" style="width: 100%;">
            <el-input v-model="noReason" :autosize="{ minRows: 4}" clearable size="small" type="textarea"></el-input>
          </div>
        </div>
        <span slot="footer" class="dialog-footer">
        <el-button @click="reviewDia = false">取 æ¶ˆ</el-button>
        <el-button :loading="reviewLoading" type="primary" @click="handleReviewDia">ç¡® å®š</el-button>
      </span>
      </el-dialog>
      <el-dialog :visible.sync="addVerifyDia" title="指定复核人员" width="400px">
        <div class="body" style="display: flex;padding: 10px;align-items: center;">
          <div class="search_label" style="width: 150px;"><span class="required-span">*</span>复核人</div>
          <div class="search_input" style="width: 100%;">
            <el-select v-model="verifyUser" clearable filterable placeholder="请选择" size="small" style="width: 100%;">
              <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </div>
        </div>
        <span slot="footer" class="dialog-footer">
        <el-button @click="addVerifyDia = false">取 æ¶ˆ</el-button>
        <el-button :loading="submitLoading" type="primary" @click="submit()">ç¡® å®š</el-button>
      </span>
      </el-dialog>
      <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" :visible.sync="dataGetDia" custom-class="custom-dialog" title="数据采集">
        <div>
          <table border="1" cellpadding="10" class="thermal-table">
            <tr>
              <td style="width: 120px;">检验项</td>
              <td style="width: 120px;">检验子项</td>
              <td>数采数据</td>
            </tr>
            <template v-for="(item,index) in getData">
              <tr>
                <td :rowspan="item.child.length">{{item.faName}}</td>
                <td>{{ item.child[0].name }}</td>
                <td style="text-align: left;">
                  <el-checkbox-group
                    v-model="getDataIndex" :max="item.child[0].maxNum">
                    <el-checkbox v-for="(n,j) in item.child[0].arr" :key="j" :label="j">{{n}}</el-checkbox>
                  </el-checkbox-group>
                </td>
              </tr>
              <tr v-for="(m,i) in item.child" v-show="i>0" :key="i+'bbbbbbbbbbbbbb'">
                <td>{{ m.name }}</td>
                <td style="text-align: left;">
                  <el-checkbox-group
                    v-model="getDataIndex" :max="m.maxNum">
                    <el-checkbox v-for="(n,j) in m.arr" :key="j" :label="j">{{n}}</el-checkbox>
                  </el-checkbox-group>
                </td>
              </tr>
            </template>
          </table>
        </div>
        <span slot="footer" class="dialog-footer">
        <el-button :loading="getDataIndexLoading" type="primary" @click="submitDataGet()">ç¡® å®š</el-button>
      </span>
      </el-dialog>
      <UnPassDialog v-if="unPassDialog" ref="unPassDialog"
                    :orderId="orderId"
                    :unPassDialog="unPassDialog"
                    @resetForm="resetForm"></UnPassDialog>
      <el-dialog :close-on-click-modal="false" :visible.sync="addCheck"
                 title="指定报告审核人员"
                 width="400px"
                 @close="closeAddVerifyDia">
        <div class="body" style="display: flex;padding: 10px;align-items: center;">
          <div class="search_label" style="width: 150px;"><span class="required-span">*</span>审核人:</div>
          <div class="search_input" style="width: 100%;">
            <el-select v-model="checkUser" clearable filterable placeholder="请选择" size="small" style="width: 100%;">
              <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </div>
        </div>
        <span slot="footer" class="dialog-footer">
        <el-button @click="closeAddVerifyDia">取 æ¶ˆ</el-button>
        <el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">ç¡® å®š</el-button>
      </span>
      </el-dialog>
    </div>
  </el-dialog>
</template>
<script>
// import ValueTable from '../../tool/value-table.vue'
import file from '@/utils/file'
import excelFunction from '@/utils/excelFountion'
import UnPassDialog from "@/views/business/unpass/components/unPassDialog.vue";
import AddUnPass from "@/views/business/unpass/components/addUnPass.vue";
import {
  checkSubmitPlan,
  doInsOrder,
  getInsProductUnqualifiedRetest,
  search, selectUserCondition,
  submitPlan,
  verifyPlan
} from "@/api/business/inspectionTask";
import {getUserNow, saveUnqualifiedContext} from "@/api/business/rawMaterialOrder";
export default {
  props: ['sonLaboratory', 'orderId', 'state','inspectorList','typeSource', 'unPassCheck', 'rawMaterialTag'],
  components: {
    AddUnPass,
    UnPassDialog
  },
  data() {
    return {
      isShow: this.unPassCheck,
      sagData: [],
      sagForm: {
        sampleCode: null,
        model: null,
        inspection: null,
        methodName: null,
        tensileForce: null,
        spanLength: null,
        load: null
      },
      dataGetDia:false,
      wareTableDataLoading:false,
      fileAdd:false,
      submitLoading: false,
      searchForm: {
        sampleName: null,
        state: null
      },
      id: 0,
      componentData0: {
        entity: {
          insOrderId:''
        },
        isIndex: true,
        showSelect: false,
        select: false,
        sort: false,
        init:false,
        do: [
          {
            id: 'handleDown',
            font: '下载',
            type: 'text',
            method: 'handleDown'
          },{
            id: 'delete',
            font: '删除',
            type: 'text',
            method: 'doDiy',
            disabFun: (row, index) => {
              return this.state!=1
            }
          }
        ],
        isPage: false,
        linkEvent: {},
        tagField: {
          type:{
            select:[
              {
                value: 1,
                label: '图片'
              },
              {
                value: 2,
                label: '文件'
              }
            ]
          }
        },
        currentId: '',
        selectField: {},
        requiredAdd: [],
        requiredUp: []
      },
      changeType:null,
      getReportModelLoading:false,
      insOrder: {},
      sampleProduct: [],
      typeList: [],
      urgentList: [],
      currentSample: {}, //当前样品信息
      tableList: [],
      loading: false,
      ps: {},
      param: {},
      currentKey0: 1,
      currentKey1: 1,
      currentKey2: 1,
      comparisonList: [],
      excelMethodList: [],
      equipOptions: [],
      userId: 0,
      reviewLoading: false,
      reviewDia: false,
      noReason: '',
      tableWidth: 1000,
      currentTable: null,
      tableLists: [],
      widthList: [],
      addVerifyDia: false,
      verifyUser: null,
      personList: [],
      enumList: [],
      tableLoading:false,
      upLoading:false,
      temptList:null,
      currentTab:null,
      wareForm:{
        inspectionItem:1,
        inspectionItemSubclass:'20(常温)',
      },
      wareForm0:{},
      numOptions:[],
      temperatureOptions:[],
      wareTableData:[],
      otherForm:{
        humidity:null,
        temperature:null,
      },
      equipForm:{
        value0:null,
        code0:null,
        value1:null,
        code1:null,
      },
      result: null,
      worker: null,
      worker0: null,
      wareLength:[],
      dataAcquisitionInfo:{},
      dataAcquisitionInfoNew:{},
      dataAcquisitionEidtAble:false,
      isGet:false,
      dataAcquisitionLoading:false,
      collected:false,
      // çƒ­å¾ªçޝ---开始
      thermalCyclingInfo:{
        max:0,
        inspectionItem:1,
        arr:[],
        length:1,
        inspectionItemClass:null,
      },
      thermalCyclingLoading:false,
      temDataAcquisition:false,
      getData:[
        {
          faName:'波长附加衰减',
          child:[
            {
              name:'1285nm~1330nm',
              arr:[12,13,14,15],
            },
            {
              name:'1525nm~1575nm',
              arr:[12,13,14,15],
            },
          ]
        },
        {
          faName:'截至波长',
          child:[
            {
              name:'截至波长',
              arr:[12,13,14,15],
            }
          ]
        }
      ],
      getDataIndex:[],
      getDataIndexLoading:false,
      getDataTypeId:'',
      getDataType:null,
      unPassDialog: false, // ä¸åˆæ ¼å¤„理弹框
      retestTag: '', // å¤æµ‹æ¬¡æ•°
      addCheck: false, // æŒ‡å®šå®¡æ ¸äººå‘˜å¼¹æ¡†
      checkUser: '',
      type: '',
      unPassNumList: [
        {retestTag: '1'},
        {retestTag: '2'},
      ],
    }
  },
  // ç”¨äºŽä¸Šä¼ æ–‡ä»¶çš„信息
  computed: {
    headers() {
      return {
        'token': sessionStorage.getItem('token')
      }
    },
    action() {
      return this.javaApi + "/insOrderPlan/uploadFile";
    }
  },
  created() {
    this.id = this.orderId;
    this.getUserInfo()
  },
  mounted() {
    this.getTypeDicts() // èŽ·å–ç´§æ€¥ç¨‹åº¦ä¸‹æ‹‰æ¡†é€‰é¡¹
    this.getInsStateDicts()
    this.getComparisonList()
    this.getAuthorizedPerson()
    this.startWorker()
  },
  watch: {
    // ç›‘听任务id,获取任务信息
    id(val) {
      this.loading = true
      doInsOrder({
        id: val,
        laboratory: this.sonLaboratory
      }).then(async res => {
        this.insOrder = res.data.insOrder;
        this.componentData0.entity.insOrderId = val;
        this.urgentList.forEach(m => {
          if (m.value == this.insOrder.type) {
            this.insOrder.typeName = m.label
          }
        })
        if(!res.data.sampleProduct||res.data.sampleProduct.length==0){
          return this.$message.error('该任务没有样品信息')
        }
        // èµ‹å€¼å½“前样品列表
        this.sampleProduct = res.data.sampleProduct
        this.currentSample = this.HaveJson(this.sampleProduct[0])
        let insProduct = this.HaveJson(this.currentSample.insProduct)
        // æ¸©åº¦ã€æ¹¿åº¦èµ‹å€¼
        this.otherForm = {
          temperature:this.insOrder.temperature?this.insOrder.temperature:null,
          humidity:this.insOrder.humidity?this.insOrder.humidity:null,
        }
        if (this.typeSource == '1') {
          this.retestTag = '1'
        }
        this.getEquipOptions(1)
        // èŽ·å–å½“å‰æ ·å“çš„æ£€éªŒé¡¹
        let list = await this.getCurrentProduct(this.currentSample.id,0)
        if (list === undefined) {
          this.$message.warning('暂无不合格复测数据')
          this.$emit('closeUnPassCheckDialog')
          return
        }
        this.currentSample.insProduct = this.HaveJson(list)
        // åˆå§‹åŒ–传递到后端的参数
        this.param = {}
        this.changeType = 0;
        this.currentSample.insProduct.forEach(a => {
          // æ˜¯å¦ä¸ºæˆå“ç”µç¼†ä¸‹çš„æ¾å¥—管项目,不是则执行初始化
          if(this.handleCasing(a.inspectionItem)){
            this.param[a.id] = {
              insValue: [],
              comValue: [],
              resValue: null,
              equipValue: [],
              equipName: [],
              insResult: null
            }
          }
        })
        await this.determineWhetherToCollectData()//是否需要数采
        if (this.currentSample.index == undefined) this.currentSample['index'] = 1
        let bushing = this.currentSample.bushing
        this.getTableLists();//处理模板列表信息
        this.loading = false
      })
    },
    // ç›‘听当前模板变化
    currentTable(val1, val0) {
      if (val0 != null && val1 != val0) {
        if(this.changeType&&this.changeType>0){
          // å¦‚果是光纤、光纤带,则不执行下面操作
          return
        }
        this.tableLists.forEach(async (m, i) => {
          if (m.templateId == val1) {
            let list = await this.getCurrentProduct(this.currentSample.id,0)
            this.currentSample.insProduct = this.HaveJson(list)//赋值当前样品的检验项
            this.param = {}//初始化传到后端的参数
            this.currentSample.insProduct.forEach((a, j) => {
              if(this.handleCasing(a.inspectionItem)){
                this.param[a.id] = {
                  insValue: [],
                  comValue: [],
                  resValue: null,
                  equipValue: [],
                  equipName: [],
                  insResult: null
                }
              }
            })
            // åŽ»é‡æ¨¡æ¿ï¼Œè¿”å›žæœ‰å‡ ä¸ªæ¨¡æ¿
            const mySet1 = new Set();
            this.tableLists = this.currentSample.insProduct.filter(m => {
              let num0 = mySet1.size;
              if (m.templateId != null&&m.template != null) {
                try {
                  mySet1.add(JSON.stringify({
                    template: m.template,
                    templateId: m.templateId
                  }))
                } catch (error) {
                  console.log(222,error);
                }
              }
              let num1 = mySet1.size;
              if (num1 > num0) {
                return m
              }
            });
            if (this.tableLists && this.tableLists.length > 0) {
              this.tableList = null;
              this.tableList = this.tableLists.filter(m => m.templateId == val1)
              // å¯¹æ¨¡æ¿è¿›è¡Œå¤„理
              this.handleTableData()
            }
          }
        })
      }
    },
    // ç‰¹æ®Šæ£€éªŒé¡¹--监听设备信息改变
    equipForm:{
      deep:true,
      handler(val){
        if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))&&this.equipOptions&&this.equipOptions.length>0){
          // åˆå§‹åŒ–设备信息
          this.param[this.currentSample.insProduct[0].id].equipValue = []
          this.param[this.currentSample.insProduct[0].id].equipName = []
          if(this.equipForm.code0){
            // èµ‹å€¼ç¬¬ä¸€ä¸ªè®¾å¤‡çš„信息
            this.equipForm.value0 = this.equipOptions.find(m=>m.value==this.equipForm.code0).label
            this.param[this.currentSample.insProduct[0].id].equipValue.push({
              i:this.currentSample.insProduct[0].id,
              v:{
                v:this.equipForm.code0
              }
            })
            this.param[this.currentSample.insProduct[0].id].equipName.push({
              i:this.currentSample.insProduct[0].id,
              v:{
                v:this.equipForm.value0
              }
            })
          }
          if(this.equipForm.code1){
            // èµ‹å€¼ç¬¬äºŒä¸ªè®¾å¤‡çš„信息
            this.equipForm.value1 = this.equipOptions.find(m=>m.value==this.equipForm.code1).label
            this.param[this.currentSample.insProduct[0].id].equipValue.push({
              i:this.currentSample.insProduct[0].id,
              v:{
                v:this.equipForm.code1
              }
            })
            this.param[this.currentSample.insProduct[0].id].equipName.push({
              i:this.currentSample.insProduct[0].id,
              v:{
                v:this.equipForm.value1
              }
            })
          }
          // ä¿å­˜æ•°æ®
          this.saveInsContext()
        }
      }
    },
  },
  beforeDestroy() {
    // åœ¨ç»„件销毁前确保停止 Worker,避免内存泄漏
    this.stopWorker();
  },
  methods: {
    closeAddVerifyDia () {
      this.addCheck = false
      this.checkUser = ''
    },
    // å…³é—­ä¸åˆæ ¼å¤„理弹框
    resetForm () {
      this.$refs.unPassDialog.$refs['unPassForm'].resetFields();
      this.unPassDialog = false
    },
    handleDataAcquisition(data){
      // æ˜¯å¦å¯ä»¥ç¼–辑数采数据
      if(this.dataAcquisitionEidtAble){
        this.getDataType = 1;
      }else{
        this.getDataType = 2;
      }
      this.dataAcquisitionInfo = {}
      this.getData = []
      for (let i in data){
        let obj = {
          faName:i,
          child:[]
        }
        // å¾ªçŽ¯æ•°é‡‡æ•°æ®
        for(let j in data[i]){
          // æ‹¼æŽ¥å­—符串  æ£€éªŒé¡¹+检验子项
          let str0 = ''
          if(i==j){
            str0 = i+','
          }else{
            str0 = i+','+j
          }
          if(j!='frequency'&&data[i][j]&&(!data[i][j].result||typeof data[i][j].result == 'string')){
            // å¤„理数采信息格式
            this.dataAcquisitionInfo[str0] = {
              value:data[i][j].result,
              frequency:data[i].frequency
            }
            let list = this.tableList[0].arr
            // å¾ªçŽ¯é¡µé¢åˆ—è¡¨ä¿¡æ¯ï¼Œåˆ¤æ–­æ•°é‡‡æ•°æ®å¯¹åº”é¡µé¢åˆ—è¡¨ä¿¡æ¯çš„æ£€éªŒé¡¹æ˜¯å“ªä¸ªï¼Œå¹¶ç»™å½“å‰æ£€éªŒé¡¹ç»‘å®šè®¾å¤‡ä¿¡æ¯
            list.forEach((item,index)=>{
              let num0 = 0;
              let str = ''
              item.forEach(m=>{
                if(m.v.ps&&(m.v.ps.value=='检验子项'||m.v.ps.value=='检验项')){
                  if(m.v.ps&&m.v.ps.value=='检验项'){
                    if(num0==0){
                      str = m.v.v+','
                      num0++
                    }
                  }
                  if(m.v.ps&&m.v.ps.value=='检验子项'){
                    if(num0==1){
                      str = str+m.v.v
                    }
                  }
                }
                // ç»‘定设备信息
                if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='设备名称'&&str0==str){
                  if(!m.v.v){
                    this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
                  }
                }
              })
            })
          }else if(j!='frequency'&&data[i][j]&&Array.isArray(data[i][j].result)){
            // å¦‚果返回的数采数据是数组,则处理数组
            // ä»¥ä¸‹é€»è¾‘为获取每个检验项可输入的检验值的最大个数
            let str0 = ''
            if(i==j){
              str0 = i+','
            }else{
              str0 = i+','+j
            }
            let list = this.tableList[0].arr
            let maxNum = 0
            list.forEach((item,index)=>{
              let num0 = 0;
              let str = ''
              item.forEach(m=>{
                if(m.v.ps&&(m.v.ps.value=='检验子项'||m.v.ps.value=='检验项')){
                  if(m.v.ps&&m.v.ps.value=='检验项'){
                    if(num0==0){
                      str = m.v.v+','
                      num0++
                    }
                  }
                  if(m.v.ps&&m.v.ps.value=='检验子项'){
                    if(num0==1){
                      str = str+m.v.v
                    }
                  }
                  let num = 0;
                  list[index].forEach(n=>{
                    if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('检验值')){
                      num++
                    }
                  })
                  if(str0==str){
                    maxNum = num
                  }
                }
                // ç»‘定设备
                if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='设备名称'&&str0==str){
                  if(!m.v.v){
                    this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
                  }
                }
              })
            })
            // èŽ·å–åˆ°æœ€å¤§æ£€éªŒå€¼è¾“å…¥ä¸ªæ•°åŽé‡ç»„æ•°æ®
            let obj0 = {
              name:j,
              arr:data[i][j].result,
              maxNum:maxNum,
              value:[]
            }
            // å¦‚果数采返回的数组长度大于最大输入个数,则将数采数据在弹框中展示,用户选择需要手动选择数采的信息
            if(data[i][j].result&&Array.isArray(data[i][j].result)&&data[i][j].result.length>maxNum){
              obj.child.push(obj0)
            }else{
              this.dataAcquisitionInfo[str0] = {
                value:data[i][j].result
              }
            }
          }
        }
        if(obj.child.length>0){
          this.getData.push(obj)
        }
      }
      // å¦‚果存在数采返回的数组长度大于最大输入个数,则弹出弹框选择
      if(this.getData.length>0){
        this.dataGetDia = true
        this.getDataIndex = []
      }else{
        // å¦‚果都不存在,则,进入处理数采线程里去处理数据
        try {
          // å‘ Worker å‘送消息,开始处理逻辑
          this.getDataIndexLoading = false
          this.dataGetDia = false
          this.getDataTypeId = ''
          this.worker0.postMessage(JSON.stringify({
            dataAcquisitionInfo: this.dataAcquisitionInfo,
            list:this.tableList[0].arr
          }));
        } catch (error) {
          console.log(1111,error);
        }
      }
      // ç›‘听 Worker è¿”回的结果
      this.worker0.onmessage = (event) => {
        let result = JSON.parse(event.data);
        if(result.method=='changeInput'){
          // é‡‡é›†åŽçš„æ•°æ®ï¼Œéœ€è¦è¿›è¡Œè®¡ç®—的线程进行计算
          let {list,n} = result.value
          this.$set(this.tableList[0],'arr',list)
          this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n)
        }else if(result.getDataTypeId){
          // èŽ·å–åˆ°æ•°é‡‡æœ€åŽä¸€é¡¹ï¼Œæ£€éªŒé¡¹çš„ID
          this.getDataTypeId = result.getDataTypeId
        }
      };
    },
    // å¦‚果存在数采返回的数组长度大于最大输入个数,则弹出弹框选择,这里是弹框的提交
    submitDataGet(){
      if(this.getDataIndex.length==0){
        this.$message.error('请选择需要采集的数据')
        return
      }
      this.getDataIndex.sort((a, b) => a - b);
      for (let i=0;i<this.getData.length;i++){
        for(let j=0;j<this.getData[i].child.length;j++){
          // å¯¹ç”¨æˆ·é€‰æ‹©çš„æ•°é‡‡ä¿¡æ¯è¿›è¡Œå¤„理,赋值
          let arr = []
          for(let k=0;k<this.getDataIndex.length;k++){
            arr.push( this.dataAcquisitionInfoNew[this.getData[i].faName][this.getData[i].child[j].name].result[this.getDataIndex[k]])
          }
          this.dataAcquisitionInfoNew[this.getData[i].faName][this.getData[i].child[j].name].result = arr
        }
      }
      this.getDataIndexLoading = true
      // èµ‹å€¼å®ŒæˆåŽéœ€è¦å†æ¬¡è¿›å…¥å¤„理数采线程里去处理数据
      this.handleDataAcquisition(this.dataAcquisitionInfoNew)
    },
    // å¤šçº¿ç¨‹
    startWorker() {
      if (this.worker) {
        this.stopWorker(); // ç¡®ä¿ä¹‹å‰çš„ Worker å·²åœæ­¢
      }
      // åˆ›å»º Worker å®žä¾‹
      this.worker = new Worker('/static/js/worker.js');
      if (this.worker0) {
        this.stopWorker(); // ç¡®ä¿ä¹‹å‰çš„ Worker å·²åœæ­¢
      }
      // åˆ›å»º Worker å®žä¾‹
      this.worker0 = new Worker('/static/js/worker0.js');
    },
    // åœæ­¢å¤šçº¿ç¨‹
    stopWorker() {
      if (this.worker) {
        this.worker.terminate();
        this.worker = null;
      }
      if (this.worker0) {
        this.worker0.terminate();
        this.worker0 = null;
      }
    },
    // æ ¹æ®ç±»åž‹ã€ä»»åŠ¡id、实验室来获取样品的检验项信息
    async getCurrentProduct(id,type,cableTag){
      this.tableLoading = true;
      type = this.typeSource == '1' ? 5 : type
      this.type = type
      const params = {
        id: id,
        type: type,
        laboratory: this.sonLaboratory,
        retestTag: this.retestTag,
        rawMaterialTag: this.rawMaterialTag,
      }
      let res = getInsProductUnqualifiedRetest(params)
      if (res.code === 200 && res.data.length > 0) {
        this.tableLoading = false;
        this.scrollInit()
        return res.data
      }
    },
    // æ¾å¥—管的判断\如果changeType不等于3那么页面不展示松套管检验项
    handleCasing(inspectionItem){
      if(this.changeType!=3){
        if(inspectionItem.includes('松套管')){
          return false
        }else{
          return true
        }
      }else{
        return true
      }
    },
    async handleChangeCableTag(m,type, num, m2){
      let cableTag = ''
      if (num === 'cableTag') {
        cableTag = m2
      }
      if (!m2) {
        type = 0
      }
      this.changeType = type
      if(m){
        let list = await this.getCurrentProduct(m,type, cableTag)
        if(list.length>0){
          this.param = {}
          list.forEach(a => {
            this.param[a.id] = {
              insValue: [],
              comValue: [],
              resValue: null,
              equipValue: [],
              equipName: [],
              insResult: null
            }
          })
          this.getTableLists0(list)
          this.worker.postMessage(JSON.stringify({
            type: 'saveData',
            tableList:this.tableList,
            param:this.param,
            currentTable:this.currentTable,
            bushing:m
          }));
        }else{
          this.tableLists = []
          this.tableList = []
          this.$message.error('检验项为空')
        }
      }
    },
    // å­—典获取信息
    getTypeDicts() {
      this.getDicts("urgency_level").then((response) => {
        this.urgentList = this.dictToValue(response.data);
      });
    },
    // å­—典获取信息
    getInsStateDicts() {
      this.getDicts("inspection_task_state").then((response) => {
        this.typeList = this.dictToValue(response.data);
      })
    },
    // å­—典获取信息
    getComparisonList() {
      this.getDicts("coordinate_transformation").then((response) => {
        this.comparisonList = this.dictToValue(response.data);
      });
    },
    // å¤„理页面列表数据--去重,生成检验模板切换列表
    getTableLists() {
      const mySet1 = new Set();
      this.tableLists = this.currentSample.insProduct.filter(m => {
        let num0 = mySet1.size;
        if (m.templateId != null&&m.template != null) {
          try {
            mySet1.add(JSON.stringify({
              template: m.template,
              templateId: m.templateId
            }))
          } catch (error) {
            console.log(222,error);
          }
        }
        let num1 = mySet1.size;
        if (num1 > num0) {
          return m
        }
      });
      if (this.tableLists && this.tableLists.length > 0) {
        this.tableList = null;
        this.tableList = [this.tableLists[0]]
        this.currentTable = this.tableLists[0].templateId;
        // å¤„理页面列表数据
        this.handleTableData()
      }
    },
    // å…‰çº¤é…ç½®ç›¸å…³æ¨¡æ¿table列表
    getTableLists0(list){
      const mySet1 = new Set();
      this.tableLists = list.filter(m => {
        let num0 = mySet1.size;
        if (m.templateId != null&&m.template != null) {
          try {
            mySet1.add(JSON.stringify({
              template: m.template,
              templateId: m.templateId
            }))
          } catch (error) {
            console.log(333,error);
          }
        }
        let num1 = mySet1.size;
        if (num1 > num0) {
          return m
        }
      });
      if (this.tableLists && this.tableLists.length > 0) {
        this.tableList = null;
        this.tableList = [this.tableLists[0]]
        this.currentTable = this.tableLists[0].templateId;
        this.currentSample.insProduct = this.HaveJson(list)
        // å¤„理页面列表数据
        this.handleTableData()
      }
    },
    // å¤„理页面列表数据
    handleTableData() {
      console.log("ttt-------->>>>",this.tableList);
      this.excelMethodList = []//excel函数列表
      this.widthList = this.tableList[0].style.columnlen;//页面宽度--根据模板来的
      // æ¸©åº¦å¾ªçŽ¯æ£€éªŒåŽŸå§‹è®°å½•--开始
      if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'){
        // å¯¹è¦æ±‚值进行拆分处理,进而得出页面内容
        let ask = this.currentSample.insProduct[0].ask
        let askList = ask.split(';')
        // èŽ·å–å¾ªçŽ¯æ¬¡æ•°
        this.numOptions = []
        for (let i = 1; i <= askList[askList.length-1]; i++) {
          this.numOptions.push({
            value:i,
            label:i
          })
        }
        let mySet1 = new Set();
        askList.forEach((m,i) => {
          if(i<askList.length-1){
            mySet1.add(m.split(',')[0].replace('℃',''))
          }
        })
        // èŽ·å–æ¸©åº¦ç‚¹åˆ—è¡¨
        this.temperatureOptions = []
        mySet1.forEach(m => {
          this.temperatureOptions.push({
            value:String(m),
            label:m
          })
        })
      }
      // æ¸©åº¦å¾ªçŽ¯æ£€éªŒåŽŸå§‹è®°å½•---结束
      // çƒ­å¾ªçŽ¯æ£€éªŒåŽŸå§‹è®°å½•---开始
      if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))){
        // æ ¹æ®è¦æ±‚值拆分数据,得到页面渲染的信息
        let ask = this.currentSample.insProduct[0].ask
        let askList = ask.split(';')
        this.thermalCyclingInfo.max = Number(askList[askList.length-1])
        let arr = []
        for (let i = 0; i < askList.length-1; i++) {
          arr.push(askList[i].split(',')[0])
        }
        arr = arr.map(item=>{
          let obj = {}
          obj.name = item;
          if(obj.insResult==null||obj.insResult==undefined){
            obj.arr = [
              {
                value0:'',
                value1:'',
              }
            ]
            obj.insResult = null;
          }
          return obj
        })
        this.thermalCyclingInfo.arr = arr;
      }
      // çƒ­å¾ªçŽ¯æ£€éªŒåŽŸå§‹è®°å½•---结束
      // æœ¬æ¬¡å¾ªçŽ¯ä¸»è¦åšé¡µé¢æ¸²æŸ“å±‚é¢çš„å¤„ç†--单元格合并预处理
      this.tableList.forEach(a => {
        let mcList = []
        a.template.forEach(b => {
          if (b.v.mc != undefined && b.v.mc.cs != undefined && b.v.mc.rs != undefined) {
            mcList.push(b)
          }
        })
        let count = 0
        mcList.forEach(b => {
          for (var c in a.template) {
            for (var i = 0; i < b.v.mc.cs; i++) {
              for (var i2 = 0; i2 < b.v.mc.rs; i2++) {
                if (a.template[c].c === b.c + i && a.template[c].r === b.r + i2) {
                  let bb = this.HaveJson(b)
                  a.template[c].v.v = bb.v.v
                  a.template[c].v.ps = bb.v.ps
                  a.template[c].v.fc = bb.v.fc
                  a.template[c].v.fs = bb.v.fs
                  a.template[c].v.ht = bb.v.ht
                  a.template[c].mc = count
                  break
                }
              }
            }
          }
          count++
        })
      })
      // æœ¬æ¬¡å¾ªçŽ¯ä¸»è¦æ˜¯æŽ§åˆ¶åˆå¹¶,以及控制检验项信息是否展示出来,以便后续检验
      this.tableList.forEach(a => {
        let dels = new Set()//需要删除的行
        let ids = []//所有检验项的id
        let set3 = new Set()
        a.template.forEach(b => {
          let size1 = set3.size
          let size2 = set3.add(b.r).size
          if (size1 < size2) {
            let str = ''
            let str2 = ''
            let unit2 = ''
            let count4 = 0
            let isThree = 0
            a.template.forEach(c => {
              // èŽ·å–åˆ° æ£€éªŒé¡¹åˆ†ç±»+检验项+检验子项的拼接,如果模板里的信息跟接口返回的检验项信息能够匹配则展示出来
              if (b.r === c.r) {
                if(c.v.ps != undefined && c.v.ps.value === '检验项分类'&&count4 === 0){
                  // ä¸‰çº§åˆ†ç±»
                  isThree = 1
                }else if(c.v.ps != undefined && c.v.ps.value === '检验项'&&count4 === 0){
                  // äºŒçº§åˆ†ç±»
                  isThree = 0
                }
                if(isThree==0){
                  if (c.v.ps != undefined && c.v.ps.value === '检验项') {
                    if (count4 === 0) {
                      str += c.v.v
                      count4 += 1
                    }
                  } else if (c.v.ps != undefined && c.v.ps.value === '检验子项') {
                    if (count4 === 1) {
                      str += c.v.v
                      count4 += 1
                    }
                  }
                }else if(isThree==1){
                  if (c.v.ps != undefined && c.v.ps.value === '检验项分类') {
                    if (count4 === 0) {
                      str += c.v.v
                      count4 += 1
                    }
                  }else if (c.v.ps != undefined && c.v.ps.value === '检验项') {
                    if (count4 === 1) {
                      str += c.v.v
                      count4 += 1
                    }
                  } else if (c.v.ps != undefined && c.v.ps.value === '检验子项') {
                    if (count4 === 2) {
                      str += c.v.v
                      count4 += 1
                    }
                  }
                }
                if (str === '机械性能干态拉伸强度(纵向)') {
                  if (c.v.ps != undefined && c.v.ps.value === '单位') {
                    str2 = str + c.v.v
                    unit2 = c.v.v
                  }
                }
              }
            })
            if (str != '') {
              let count2 = 0
              for (let i in this.currentSample.insProduct) {
                let inspectionItemClass = this.currentSample.insProduct[i].inspectionItemClass==null||this.currentSample.insProduct[i].inspectionItemClass==undefined?'':this.currentSample.insProduct[i].inspectionItemClass
                let inspectionItem = this.currentSample.insProduct[i].inspectionItem==null||this.currentSample.insProduct[i].inspectionItem==undefined?'':this.currentSample.insProduct[i].inspectionItem
                let inspectionItemSubclass = this.currentSample.insProduct[i].inspectionItemSubclass==null||this.currentSample.insProduct[i].inspectionItemSubclass==undefined?'':this.currentSample.insProduct[i].inspectionItemSubclass
                if(inspectionItemSubclass === '干态拉伸强度(纵向)') {
                  // æ£€éªŒå­é¡¹ä¸º'干态拉伸强度(纵向)'时,模版里是两个计算值对应相同的检验值并且计算方式不同,要根据相同的'单位'做特殊的渲染
                  const unit = this.currentSample.insProduct[i].unit
                  if ((this.currentSample.insProduct[i].templateId === a.templateId && inspectionItemClass +inspectionItem+inspectionItemSubclass+unit === str2) || (this.currentSample.insProduct[i].templateId === a.templateId && !unit2.includes('/')&& inspectionItemClass +inspectionItem+inspectionItemSubclass === str)) {
                    ids.push({
                      r: b.r,
                      id: this.currentSample.insProduct[i].id,
                      product: this.currentSample.insProduct[i]
                    })
                    break
                  }
                } else {
                  // å¦‚果相等,那么说明找到了,并且把id存起来,后续检验项也会在页面中显示出来
                  if (this.currentSample.insProduct[i].templateId === a.templateId && inspectionItemClass +inspectionItem+inspectionItemSubclass === str) {
                    ids.push({
                      r: b.r,
                      id: this.currentSample.insProduct[i].id,
                      product: this.currentSample.insProduct[i]
                    })
                    break
                  }
                }
                count2++
              }
              if (count2 == this.currentSample.insProduct.length) {
                dels.add(b.r)
              }
            }
          }
        })
        // æ“ä½œåˆ é™¤
        dels.forEach(del => {
          for (let b = 0; b < a.template.length; b++) {
            if (a.template[b].r === del) {
              a.template.splice(b, 1)
              b -= 1
            }
          }
        })
        // æ“ä½œèµ‹å€¼--主要赋值单位,试验方法等信息
        ids.forEach(id => {
          for (let b = 0; b < a.template.length; b++) {
            if (a.template[b].r === id.r) {
              a.template[b].i = id.id
              if (a.template[b].v.ps != undefined && a.template[b].v.ps.value === '单位') {
                a.template[b].v.v = id.product.unit
              }
              if (a.template[b].v.ps != undefined && (a.template[b].v.ps.value === '试验方法' || a.template[b].v
                .ps.value === '检测方法')) {
                a.template[b].v.v = id.product.methodS
              }
            }
          }
        })
        let set2 = new Set()
        // åˆå¹¶çš„æ•°æ®å¤„理,cs  rs  ä»£è¡¨åˆå¹¶çš„æ•°é‡
        a.template.forEach(b => {
          let size1 = set2.size
          let size2 = set2.add(b.mc).size
          if (b.mc != undefined && size1 < size2) {
            b.v.mc.rs = 0
            b.v.mc.cs = 0
            a.template.forEach(c => {
              if (b.mc === c.mc) {
                if (b.r === c.r) {
                  b.v.mc.cs += 1
                }
                if (b.c === c.c) {
                  b.v.mc.rs += 1
                }
              }
            })
          }
        })
      })
      // æœ¬æ¬¡å¾ªçŽ¯ä¸»è¦æ˜¯å¯¹åŽç«¯ä¼ å‚è¿›è¡Œåˆå§‹åŒ–,样式逻辑修改
      this.tableList.forEach(a => {
        let arrs = []
        let set = new Set()
        let count1 = 0
        let conclusionList = []; //结论列表
        let finalList = []; //最终值列表
        // ç»“论与最终值在这里一一对应,以下两个列表长度肯定是一样的,如果有不一样,那么多半是模板配置得问题
        conclusionList = a.template.filter(n => n.v.ps != undefined && n.v.ps.value === '结论')//结论列表
        finalList = a.template.filter(n => n.v.ps != undefined && n.v.ps.value === '最终值')//最终值列表
        a.template.forEach( b => {
          if (b.v.ps != undefined && b.v.ps.value === '序号' && (b.v.mc == undefined || Object.keys(b.v.mc).length === 4)) {
            // å¯¹åºå·è¿›è¡Œèµ‹å€¼
            count1++
            b.v.v = count1
          }
          if (b.v.ps != undefined && b.v.ps.value === '要求值') {
            // å¯¹è¦æ±‚值进行赋值
            b.v.v = this.getAsk(b.i)
          }
          // å¯¹é¡µé¢çš„和给后端传参的检验值,计算值,设备编码,设备名称,最终值,结论进行初始化
          if (b.v.ps != undefined && typeof b.v.ps.value ==='string'&&b.v.ps.value.includes('检验值')) {
            this.$set(b.v, 'v','' )
            // b.v.v = ''
            b.u = ''
            b.i && this.param[b.i]&&this.param[b.i].insValue.push(b)
          }
          if (b.v.ps != undefined && b.v.ps.value === '计算值') {
            this.$set(b.v, 'v','' )
            // b.v.v = ''
            b.i && this.param[b.i]&&this.param[b.i].comValue.push(b)
          }
          if (b.v.ps != undefined && b.v.ps.value === '设备编码') {
            // b.v.v = ''
            this.$set(b.v, 'v', '' )
            b.i && this.param[b.i]&&this.param[b.i].equipValue.push(b)
          }
          if (b.v.ps != undefined && b.v.ps.value === '设备名称') {
            this.$set(b.v, 'v', '' )
            // b.v.v = ''
            b.i && this.param[b.i]&&this.param[b.i].equipName.push(b)
          }
          if (b.v.ps != undefined && b.v.ps.value === '最终值') {
            // b.v.v = ''
            this.$set(b.v, 'v', '' )
            if (b.i !== undefined&&this.param[b.i]&&!this.param[b.i].resValue) {
              this.param[b.i].resValue = b
            }
          }
          if (b.v.ps != undefined && b.v.ps.value === '结论') {
            if (b.i !== undefined&&this.param[b.i]&&!this.param[b.i].insResult) {
              this.param[b.i].insResult = b
              conclusionList.forEach((n, i) => {
                if (n.r == b.r && n.c == b.c) {
                  b.v.f =
                    `(${this.comparisonList.find(j=>j.value==(finalList[i].c)).label}${finalList[i].r+1})`
                }
              })
            }
          }
          set.add(b.r)
          // å¦‚果模板列表的函数存在,那么加入到excel函数列表里面
          if (b.v.f) {
            this.excelMethodList.push(b)
          }
        })
        // ä»¥ä¸‹æ˜¯æ ·å¼å¤„理逻辑
        set = Array.sort(set)
        set.forEach(b => {
          let arr = []
          a.template.forEach(c => {
            if (c.r === b) {
              arr.push(c)
            }
          })
          arrs.push(arr)
        })
        a.arr = arrs
        this.tableWidth = 0
        for (let i = 0; i < arrs[0].length; i++) {
          this.tableWidth += (a.style.columnlen[i] === undefined ? 100 : a.style.columnlen[i])
        }
      })
      // æœ¬æ¬¡å¾ªçŽ¯ä¸»è¦æ˜¯å¯¹é¡µé¢åŠåŽç«¯ä¼ å‚è¿›è¡Œåˆå§‹åŒ–èµ‹å€¼
      this.currentSample.insProduct.forEach(async a => {
        try {
          // è®¡ç®—值赋值
          let comValue = JSON.parse(a.insProductResult.comValue)
          for (var i = 0; i < comValue.length; i++) {
            this.param[a.id].comValue[i].v.v = this.toFixed(comValue[i].v,this.param[a.id].comValue[i].v.ct)
          }
        } catch (e) {}
        try {
          // æ£€éªŒå€¼èµ‹å€¼
          let insValue = JSON.parse(a.insProductResult.insValue)
          for (let i = 0; i < insValue.length; i++) {
            if(this.param[a.id].insValue.find(m=>m.c==insValue[i].c&&m.r==insValue[i].r)){
              this.param[a.id].insValue.find(m=>m.c==insValue[i].c&&m.r==insValue[i].r).v.v = this.toFixed(insValue[i].v,this.param[a.id].insValue.find(m=>m.c==insValue[i].c&&m.r==insValue[i].r).v.ct)
              this.param[a.id].insValue.find(m=>m.c==insValue[i].c&&m.r==insValue[i].r).u = insValue[i].u
              // this.param[a.id].insValue[i].v.v = insValue[i].v
              // this.param[a.id].insValue[i].u = insValue[i].u
            }
          }
        } catch (e) {}
        try {
          // è®¾å¤‡ç¼–号赋值
          let equipValue = JSON.parse(a.insProductResult.equipValue)
          if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))){
            // ç‰¹æ®Šé¡¹ç›®åˆå§‹åŒ–
            this.param[a.id].equipValue = []
            for (let i = 0; i < equipValue.length; i++) {
              this.param[a.id].equipValue.push({
                v:{
                  v:''
                }
              })
            }
          }
          for (let i = 0; i < equipValue.length; i++) {
            if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))){
              // æ¸©åº¦å¾ªçŽ¯è®¾å¤‡èµ‹å€¼
              this.$set(this.equipForm,`code`+i,equipValue[i].v)
              this.param[a.id].equipValue[i].v.v = equipValue[i].v
            }else{
              // æ™®é€šè®¾å¤‡èµ‹å€¼
              this.param[a.id].equipValue[i].v.v = equipValue[i].v
            }
          }
        } catch (e) {}
        try {
          // è®¾å¤‡åç§°èµ‹å€¼
          let equipName = JSON.parse(a.insProductResult.equipName)
          for (let i = 0; i < equipName.length; i++) {
            equipName[i].v !== '' && equipName[i].v.map(val => {
              const index = this.equipOptions.findIndex(item => item.value === val)
              if (index > -1) {
                // æ ¹æ®è®¾å¤‡ç¼–码转换为相应的设备名称
                val = this.equipOptions[index].deviceName
              }
            })
          }
          if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))){
            // è®¾å¤‡åç§°åˆå§‹åŒ–
            this.param[a.id].equipName = []
            for (let i = 0; i < equipName.length; i++) {
              this.param[a.id].equipName.push({
                v:{
                  v:''
                }
              })
            }
          }
          for (let i = 0; i < equipName.length; i++) {
            if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))){
              // æ¸©åº¦å¾ªçŽ¯èµ‹å€¼
              this.$set(this.equipForm,`value`+i,equipName[i].v)
              this.param[a.id].equipName[i].v.v = equipName[i].v
            }else{
              // æ™®é€šè®¾å¤‡åç§°èµ‹å€¼
              this.param[a.id].equipName[i].v.v = equipName[i].v
            }
          }
        } catch (e) {
          console.log('设备名称赋值----', e)
        }
        try {
          // æœ€ç»ˆå€¼èµ‹å€¼
          this.param[a.id].resValue.v.v = this.toFixed(a.lastValue,this.param[a.id].resValue.v.ct)
          // ç»“论赋值
          this.param[a.id].insResult.v.v = a.insResult
        } catch (e) {}
      })
      // å¯¹excel函数进行处理
      this.handleExcelMethod()
    },
    // æ£€éªŒå€¼è¾“入后触发的函数
    changeInput(m, code, n,getDataType) {
      // ä¸ºæ•°é‡‡å®šä¹‰ä¸€ä¸ªé€»è¾‘参数
      if(getDataType=='getDataType'){
        this.getDataType = 2;
      }
      let currentInsItemId = null//当前检验项id
      if (n) {
        currentInsItemId = JSON.parse(JSON.stringify(n.i))
        // å®šä¹‰ä¸€ä¸ªå‡½æ•°æ¥éªŒè¯åˆ†æ•°æ˜¯å¦æœ‰æ•ˆ
        if (typeof n.v.v == 'string') {
          function isValidFraction(fraction) {
            const [numerator, denominator] = fraction.split('/'); // åˆ†å­å’Œåˆ†æ¯
            return !(!denominator || !numerator);
          }
          const isTrue = isValidFraction(n.v.v)
          if (!isTrue) {
            n.v.v = n.v.v.replace('/', '')
          }
        }
      }
      try {
        // å‘ Worker å‘送消息,开始处理逻辑
        this.worker.postMessage(JSON.stringify({
          code: code,
          tableList:this.tableList,
          excelMethodList:this.excelMethodList,
          comparisonList:this.comparisonList,
          currentSample:this.currentSample,
          PROJECT:this.PROJECT,
          param:this.param,
          currentTable:this.currentTable,
          getDataTypeId:this.getDataTypeId,
          modelType: this.sampleProduct[0].model,
          currentInsItem: n
        }));
      } catch (error) {
        console.log(444,error);
      }
      // ç›‘听 Worker è¿”回的结果
      this.worker.onmessage = (event) => {
        this.result = JSON.parse(event.data);
        switch (this.result.method){
          case 'saveInsContext':
            console.log(`output->`,11111111111111)
            this.$nextTick(()=>{
              // this.$delete(this.tableList[0],'arr')
              this.$set(this.tableList[0],'arr',this.result.value.tableList[0].arr)
              this.param = this.result.value.param
              if(this.result.value.currentInsItem){
                currentInsItemId = this.result.value.currentInsItem.i
              }
              // ç‰¹æ®Šå¤„理一下结论,会有这种特殊情况
              for (var i in this.param){
                if(this.param[i].insResult&&this.param[i].insResult.v&&this.param[i].insResult.v.v){
                  if(this.param[i].insResult.v.v=='合格'){
                    this.$set(this.param[i].insResult.v,'v',1)
                  }else if(this.param[i].insResult.v.v=='不合格'){
                    this.$set(this.param[i].insResult.v,'v',0)
                  }
                }
              }
            })
            break;
          case 'tableList':
            this.$nextTick(()=>{
              // æ›´æ–°æ•°æ®
              this.$delete(this.tableList[0],'arr')
              this.$set(this.tableList[0],'arr',this.result.value[0].arr)
              // this.param = this.result.value.param
              if(this.result.value.currentInsItem){
                currentInsItemId = this.result.value.currentInsItem.i
              }
            })
            break;
          case 'getCurrentInsProduct':
            // æ›´æ–°é¡µé¢æ•°æ®
            this.getCurrentInsProduct(this.result.value)
            break;
        }
      };
      // ä¿å­˜æ•°æ®
      setTimeout(()=>{
        this.saveInsContext(currentInsItemId)
      },200)
    },
    // æ˜¯å¦éœ€è¦æ•°é‡‡
    async determineWhetherToCollectData(){
      let res = determineWhetherToCollectData({managementNumber: ''})
      this.isGet =  res.data
    },
    // æ ¹æ®åŽç«¯ä¼ å‚更新页面数据   param => this.tableList[0].insProductResult
    getCurrentInsProduct(pId) {
      if (!this.tableList[0].insProductResult) {
        this.tableList[0].insProductResult = {}
      }
      for (let m in this.param[pId]) {
        let value = this.param[pId][m]
        switch (m) {
          case 'comValue':
            // èµ‹å€¼è®¡ç®—值
            if (value && value.length > 0) {
              this.tableList[0].insProductResult[m] = [];
              value.forEach((a, i) => {
                let obj = {
                  v: a.v.v,
                }
                this.tableList[0].insProductResult[m].push(obj);
              })
              try {
                this.tableList[0].insProductResult[m] = JSON.stringify(this.tableList[0].insProductResult[m])
              } catch (error) {
                console.log(555,error);
              }
            }
            break;
          // èµ‹å€¼æ£€éªŒå€¼
          case 'insValue':
            if (value && value.length > 0) {
              this.tableList[0].insProductResult[m] = [];
              value.forEach((a, i) => {
                let obj = {
                  v: a.v.v,
                  u: a.u,
                }
                this.tableList[0].insProductResult[m].push(obj);
              })
              try {
                this.tableList[0].insProductResult[m] = JSON.stringify(this.tableList[0].insProductResult[m])
              } catch (error) {
                console.log(666,error);
              }
            }
            break;
          // èµ‹å€¼è®¾å¤‡ç¼–号
          case 'equipValue':
            if (value && value.length > 0) {
              this.tableList[0].insProductResult[m] = [];
              value.forEach((a, i) => {
                let obj = {
                  v: a.v.v,
                }
                this.tableList[0].insProductResult[m].push(obj);
              })
              try {
                this.tableList[0].insProductResult[m] = JSON.stringify(this.tableList[0].insProductResult[m])
              } catch (error) {
                console.log(777,error);
              }
            }
            break;
          // èµ‹å€¼è®¾å¤‡åç§°
          case 'equipName':
            if (value && value.length > 0) {
              this.tableList[0].insProductResult[m] = [];
              value.forEach((a, i) => {
                let obj = {
                  v: a.v.v,
                }
                this.tableList[0].insProductResult[m].push(obj);
              })
              try {
                this.tableList[0].insProductResult[m] = JSON.stringify(this.tableList[0].insProductResult[m])
              } catch (error) {
                console.log(888,error);
              }
            }
            break;
          // èµ‹å€¼æœ€ç»ˆå€¼
          case 'resValue':
            this.tableList[0].lastValue = value?value.v.v:''
            break;
          // èµ‹å€¼ç»“论
          case 'insResult':
            this.tableList[0].insResult = value?value.v.v:''
            break;
        }
      }
    },
    // å¯¹EXCEL函数进行处理
    handleExcelMethod() {
      if (this.excelMethodList.length > 0) {
        this.excelMethodList.map(item => {
          // å¾—到每个函数的参数列表
          item.valueList = excelFunction.changeParameter(item.v.f);
          return item;
        })
      }
    },
    getValue(v){
      // å¯¹é¡µé¢å±•示数据进行处理,@,代表换行
      let str = v.v?v.v:(v.v===0?v.v:(v.ct&&v.ct.s?v.ct.s.length>0&&v.ct.s[0].v.replace(new RegExp('\n', 'g'), '<br/>').replace(new RegExp('@', 'g'), '<br/>'):''))
      // å¯¹æ•°æ®ä¿ç•™å°æ•°ç‚¹è¿›è¡Œå¤„理
      if(v.ct&&v.ct.fa&&v.ct.fa.includes('.')&&str){
        let num = 0
        let str0 = v.ct.fa.split('.')[1]
        num = str0.length
        str = Number(str).toFixed(num)
      }
      if(v.v&&typeof v.v == 'string'&&v.v.includes('@')){
        str = v.v.replace(new RegExp('@', 'g'), '<br/>')
      }
      return str
    },
    // èŽ·å–å½“å‰è¾“å…¥æ¡†ç±»åž‹
    getInspectionValueType(id) {
      for (var a in this.currentSample.insProduct) {
        if (this.currentSample.insProduct[a].id == id) {
          return this.currentSample.insProduct[a].inspectionValueType
        }
      }
    },
    // èŽ·å–è¦æ±‚æè¿°
    getTell(id) {
      for (var a in this.currentSample.insProduct) {
        if (this.currentSample.insProduct[a].id == id) {
          return this.currentSample.insProduct[a].tell
        }
      }
    },
    // åŠ¨æ€èŽ·å–å•å…ƒæ ¼å®½åº¦
    handleWidth(n) {
      let sum = 0;
      if (n.v.mc && n.v.mc.cs && n.v.mc.c != undefined) {
        for (let i = 0; i < n.v.mc.cs; i++) {
          let num = this.widthList[i + n.v.mc.c] ? this.widthList[i + n.v.mc.c] : 100
          sum += num;
        }
      } else {
        sum = this.widthList[n.c] ? this.widthList[n.c] : 100
      }
      return sum
    },
    // å¯¹è¾“入值进行格式校验
    handleInput (n) {
      try {
        n.v.v = n.v.v.replace(/[^\d.^e>\-/+]/g, '');
        n.v.v = n.v.v.replace(/\.{2,}/g,"."); //只保留第一个. æ¸…除多余的
        n.v.v = n.v.v.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
        n.v.v = n.v.v.replace(/\/{2,}/g,"/"); //只保留第一个/清除多余的
        n.v.v = n.v.v.replace("/","$#$").replace(/\//g,"").replace("$#$","/");
      } catch (error) {
        console.log(error);
      }
    },
    getInspectionItemType(id) {
      for (var a in this.currentSample.insProduct) {
        if (this.currentSample.insProduct[a].id == id) {
          return this.currentSample.insProduct[a].inspectionItemType
        }
      }
    },
    // èŽ·å–è¦æ±‚å€¼
    getAsk(id) {
      for (var a in this.currentSample.insProduct) {
        if (this.currentSample.insProduct[a].id == id) {
          return this.currentSample.insProduct[a].ask
        }
      }
    },
    getSystemValue(n) {
      let code = null
      try {
        this.param[n.i].equipValue.forEach(a=>{
          if(a.r === n.r){
            if (a.v.v == null || a.v.v == '') {
              this.$message.error('请先选择采集的设备')
              return
            }else{
              code = a.v.v
            }
          }
        })
      } catch (e) {
        // console.log(e);
        this.$message.error('找不到设备内容')
      }
      // console.log(n, code);
      fetch('http://localhost:82/微信图片_20240518100811.png').then(res=>res.blob()).then(blob=>{
        // console.log(blob);
        const url = URL.createObjectURL(blob)
        // console.log(url);
      })
      /* this.$message.error('采集失败【已开放手动方式】')
        for (var a in this.currentSample.insProduct) {
          if (this.currentSample.insProduct[a].id == n.i) {
            this.currentSample.insProduct[a].inspectionItemType = 0
          }
        } */
    },
    // èŽ·å–æ‰€æœ‰è®¾å¤‡
    getEquipOptions(e, id) {
      if (e) {
        this.equipOptions = []
        search({ status: 0 }).then(res => {
          if (res.code === 200 && res.data) {
            this.equipOptions = res.data.map(m => {
              m.value = m.managementNumber
              m.label = m.deviceName
              return m
            })
          }
        }).catch(error => {
          console.error(error)
        })
      }
    },
    getUserInfo() {
      getUserNow().then(res => {
        this.userId = res.data.id
      })
    },
    // å¤æ ¸
    upInsReview(e) {
      if (e == 1) {
        // é€šè¿‡
        this.reviewLoading = true;
        verifyPlan({
          orderId: this.orderId,
          type: 1,
          laboratory: this.sonLaboratory,
          tell: null,
          userId: this.checkUser
        }).then(res => {
          if (res.code === 200) {
            this.$message.success("操作成功")
            this.$emit('goback')
            this.addCheck = false
          }
          this.reviewLoading = false;
        }).catch(error => {
          console.error(error)
          this.reviewLoading = false;
        })
      } else {
        // ä¸é€šè¿‡
        this.reviewDia = true;
      }
    },
    handleReviewDia() {
      if (this.noReason) {
        this.reviewLoading = true;
        verifyPlan({
          orderId: this.orderId,
          type: 0,
          laboratory: this.sonLaboratory,
          tell: this.noReason
        }).then(res => {
          if (res.code === 200) {
            this.$message.success("操作成功")
            this.$emit('goback')
          }
          this.reviewLoading = false;
        }).catch(error => {
          console.error(error)
          this.reviewLoading = false;
        })
      } else {
        this.$message.error('未输入不通过原因')
      }
    },
    submit() {
      if (this.verifyUser === null || this.verifyUser === '') {
        this.$message.error("请指定复核人员")
        return
      }
      if(!this.otherForm.humidity){
        this.$message.error("请输入湿度")
        return
      }
      if(!this.otherForm.temperature){
        this.$message.error("请输入温度")
        return
      }
      this.submitLoading = true;
      checkSubmitPlan({
        orderId: this.orderId,
        laboratory: this.sonLaboratory,
      }).then(res => {
        if (res.code === 200) {
          if(!res.data||res.data.length==0){
            this.submitLoading = true;
            submitPlan({
              orderId: this.orderId,
              laboratory: this.sonLaboratory,
              verifyUser: this.verifyUser,
              entrustCode: this.insOrder.entrustCode
            }).then(res => {
              if (res.code === 200) {
                this.$message.success("操作成功")
                this.$emit('goback')
                this.submitLoading = false;
                this.addVerifyDia = false
              }
            }).catch(error => {
              console.error(error)
              this.submitLoading = false;
            })
          }else{
            let newData = []
            const h = this.$createElement
            for (let i in res.data) {
              const lastChar = res.data[i].slice(-1);
              if(lastChar=='-'){
                res.data[i] = res.data[i].slice(0, -1);
              }
              newData.push(h('p', {style: 'font-size: 14px;color: red;'}, (Number(i)+1)+'、'+res.data[i]))
            }
            newData.push(h('p',  { style: 'font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh' },'以上项目不合格,确定提交?'))
            this.$confirm('提示',{
              title:'提示',
              message: h('div', null, newData),
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: ""
            }).then(() => {
              this.submitLoading = true;
              submitPlan({
                orderId: this.orderId,
                laboratory: this.sonLaboratory,
                verifyUser: this.verifyUser
              }).then(res => {
                if (res.code === 200) {
                  this.$message.success("操作成功")
                  this.addVerifyDia = false
                  this.$emit('goback')
                }
                this.submitLoading = false;
              }).catch(error => {
                console.error(error)
                this.submitLoading = false;
              })
            }).catch(() => {})
          }
        }
      }).catch(error => {
        console.error(error)
        this.submitLoading = false;
      })
      return
    },
    // ç»Ÿä¸€åœ¨è¿™é‡Œä¿å­˜æ•°æ®
    saveInsContext(currentInsItemId) {
      try {
        if(this.param){
          let param = null
          if(currentInsItemId){
            param = {[currentInsItemId] : this.param[currentInsItemId]}
          }else{
            param = this.param
          }
          saveUnqualifiedContext({
            param: JSON.stringify(param),
            currentTable:this.currentTable,
            sampleId:this.currentSample.id
          }).then(res => {
            if (res.code == 201) {
              this.$message.error('保存失败')
              return
            }
            this.$message.success('已保存')
          })
          // å‘ Worker å‘送消息,开始处理逻辑
          this.worker.postMessage(JSON.stringify({
            modelType: this.sampleProduct[0].model,
            type: 'saveData',
            tableList:this.tableList,
            param:this.param,
            currentTable:this.currentTable
          }));
        }
      }catch (error) {
        console.log(999,error);
      }
    },
    // è®¾å¤‡æ”¹å˜
    changeEquip(val, n, v) {
      try {
        // this.$set(n.v,'v',val)
        this.tableList[0].arr.forEach((item,index)=>{
          item.forEach((m,i)=>{
            if(this.param[m.i]){
              this.param[m.i].state = 1
            }
            // if(m.i==n.i&&m.v.ps&&m.v.ps.value=='设备名称'&&v){
            //   this.$set(m.v,'v',v)
            // }
          })
        })
        for (let i in this.param) {
          if(this.param[i].state!=1){
            delete this.param[i]
          }
        }
        // if(val&&v){
        //   for (let i1 in this.param[n.i].equipName) {
        //     if (this.param[n.i].equipName[i1].i === n.i && this.param[n.i].equipName[i1].r === n.r) {
        //       this.$delete(this.param[n.i].equipValue[i1].v,'v')
        //       this.$set(this.param[n.i].equipValue[i1].v,'v',val)
        //       this.$delete(this.param[n.i].equipName[i1].v,'v')
        //       this.$set(this.param[n.i].equipName[i1].v,'v',v)
        //     }
        //   }
        // }
        // this.equipOptions为设备名称下拉框选项数据
        for (let i1 in this.param[n.i].equipName) {
          if (this.param[n.i].equipName[i1].i === n.i && this.param[n.i].equipName[i1].r === n.r) {
            this.$delete(this.param[n.i].equipValue[i1].v,'v')
            // å°†æ•°ç»„赋值给设备编码
            this.$set(this.param[n.i].equipValue[i1].v,'v',val.join(','))
            this.$delete(this.param[n.i].equipName[i1].v,'v')
            // å°†æ•°ç»„赋值给设备编码
            this.$set(this.param[n.i].equipName[i1].v,'v',val)
            this.tableList[0].arr.forEach((item,index)=>{
              item.forEach((m)=>{
                if(m.i==n.i&&m.v.ps&&m.v.ps.value=='设备编码'){
                  this.$set(m.v,'v',val.join(','))
                }
                if(m.i==n.i&&m.v.ps&&m.v.ps.value=='设备名称'){
                  this.$set(m.v,'v',val)
                }
              })
            })
          }
        }
        // ä¿å­˜æ•°æ®
        this.saveInsContext(n.i)
      } catch (e) {
        console.log('changeEquip----', e)
      }
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 0 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
            label: a.name,
            value: a.id,
          });
        });
        this.personList = data;
      });
    },
    scrollInit() {
      // èŽ·å–è¦ç»‘å®šäº‹ä»¶çš„å…ƒç´ 
      const nav = document.getElementById("tableBox")
      let flag; // é¼ æ ‡æŒ‰ä¸‹
      let downX; // é¼ æ ‡ç‚¹å‡»çš„x下标
      let scrollLeft; // å½“前元素滚动条的偏移量
      nav.addEventListener("mousedown", function(event) {
        flag = true;
        downX = event.clientX; // èŽ·å–åˆ°ç‚¹å‡»çš„x下标
        scrollLeft = this.scrollLeft; // èŽ·å–å½“å‰å…ƒç´ æ»šåŠ¨æ¡çš„åç§»é‡
      });
      nav.addEventListener("mousemove", function(event) {
        if (flag) { // åˆ¤æ–­æ˜¯å¦æ˜¯é¼ æ ‡æŒ‰ä¸‹æ»šåŠ¨å…ƒç´ åŒºåŸŸ
          let moveX = event.clientX; // èŽ·å–ç§»åŠ¨çš„xè½´
          let scrollX = moveX - downX; // å½“前移动的x轴下标减去刚点击下去的x轴下标得到鼠标滑动距离
          this.scrollLeft = scrollLeft - scrollX // é¼ æ ‡æŒ‰ä¸‹çš„æ»šåŠ¨æ¡åç§»é‡å‡åŽ»å½“å‰é¼ æ ‡çš„æ»‘åŠ¨è·ç¦»
        }
      });
      // é¼ æ ‡æŠ¬èµ·åœæ­¢æ‹–动
      nav.addEventListener("mouseup", function() {
        flag = false;
      });
      // é¼ æ ‡ç¦»å¼€å…ƒç´ åœæ­¢æ‹–动
      nav.addEventListener("mouseleave", function(event) {
        flag = false;
      });
    },
    async caretTape(num){
      let index = this.currentKey1 + num
      if(index < 1){
        this.$message.error('当前是第一个光纤带')
        return
      } else if(index > this.fiberOpticTape.length){
        this.$message.error('当前是最后一个光纤带')
        return
      }
      this.currentKey1 = index
      this.currentFiberOpticTape = this.HaveJson(this.fiberOpticTape[index - 1])
      this.param = {}
      this.fiberOptic = []
      this.currentFiberOptic = null;
      this.currentFiberOpticTape.productList.forEach(a => {
        this.param[a.id] = {
          insValue: [],
          comValue: [],
          resValue: null,
          equipValue: [],
          equipName: [],
          insResult: null
        }
      })
      this.fiberOpticTapeVisible = false;
      let list = await this.getCurrentProduct(this.currentFiberOpticTape.id,1)
      this.getTableLists0(list)
      if(this.currentFiberOpticTape.fiber&&this.currentFiberOpticTape.fiber.length>0){
        // é…ç½®å…‰çº¤
        this.fiberOptic = this.currentFiberOpticTape.fiber;
      }
    },
    async caretOptic(num){
      let index = this.currentKey2 + num
      if(index < 1){
        this.$message.error('当前是第一个光纤')
        return
      } else if(index > this.fiberOptic.length){
        this.$message.error('当前是最后一个光纤')
        return
      }
      this.currentKey2 = index
      this.currentFiberOptic = this.HaveJson(this.fiberOptic[index - 1])
      this.currentFiberOptic.productList.forEach(a => {
        this.param[a.id] = {
          insValue: [],
          comValue: [],
          resValue: null,
          equipValue: [],
          equipName: [],
          insResult: null
        }
      })
      let list = await this.getCurrentProduct(this.currentFiberOptic.id,2)
      this.getTableLists0(list)
    },
    beforeUpload(file) {
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        return false;
      } else {
        this.upLoading = true;
        return true;
      }
    },
    onError(err, file, fileList) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    handleDown(row){
      downFile({
        id: row.id,
      }).then(res => {
        if (res.code === 200) {
          let url = '';
          if(res.data.type==1){
            url = this.javaApi+'/img/'+res.data.fileUrl
            file.downloadIamge(url,row.fileName)
          }else{
            url = this.javaApi+'/word/'+res.data.fileUrl
            const link = document.createElement('a');
            link.href = url;
            link.download = row.fileName;
            link.click();
          }
        }
      }).catch(error => {
      })
    },
    /**
     * å°†æ•°å€¼v保留ct.fa中'##'后的指定小数位数,并返回格式化后的字符串。
     *
     * @param v è¦æ ¼å¼åŒ–的数值
     * @param ct åŒ…含格式化配置的对象
     * @param ct.fa æ ¼å¼åŒ–配置字符串,若包含'##'则按照其后的内容确定小数位数
     * @returns æ ¼å¼åŒ–后的字符串或原始数值(若配置不符合要求)
     */
    toFixed(v,ct){
      if(v&&ct&&ct.fa){
        if(ct.fa.includes('.')){
          let num = ct.fa.slice(4).length
          return Number(v).toFixed(num)
        }else{
          return v
        }
      }else{
        return v
      }
    }
  }
}
</script>
<style scoped>
.custom-table .el-table__header-wrapper th {
  background-color: #87CEEB; /* åªå¯¹å¸¦æœ‰my-custom-table类的表格生效 */
  color: #fff;
}
.container {
  overflow: auto; /* ç¡®ä¿å®¹å™¨èƒ½åŒ…裹浮动元素 */
  margin-bottom: 10px;
}
.right-button {
  float: right;
}
.inspection {
  height: 100%;
  overflow-y: auto;
}
.inspection::-webkit-scrollbar {
  width: 0;
}
.title {
  height: 60px;
  line-height: 60px;
}
.search {
  width: 100%;
  margin-bottom: 10px;
  background-color: #fff;
  border-radius: 3px;
}
.search .form-inline {
  padding-top: 20px;
  padding-left: 0px;
  text-align: left;
}
.center {
  width: calc(100% - 40px);
  /* max-height: 580px; */
  background-color: #fff;
  border-radius: 3px;
  padding: 20px;
  overflow: auto;
}
.center-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex-wrap: wrap;
  width: 100%;
  overflow-x: auto;
  /* overflow-x: scroll; */
  cursor: grab;
}
.center-box:active{
  cursor: grabbing;
}
.tables {
  table-layout: fixed;
  margin: 5px 5px 16px;
}
.tables td {
  height: 40px;
  width: 100px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
}
.thermal-table{
  min-width: calc(100% - 10px);
  margin: 5px 5px 0;
  table-layout: fixed;
}
.thermal-table td {
  min-width: 70px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
  padding: 5px;
}
.table-container {
  overflow-x: auto; /* ä½¿å®¹å™¨æ”¯æŒæ¨ªå‘滚动 */
  max-width: 100%;  /* é™åˆ¶å®¹å™¨çš„æœ€å¤§å®½åº¦ */
  margin-bottom: 16px;
}
.content {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: left;
  padding: 5px;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
}
.content *{
  user-select: none;
}
.content-h-0 {
  justify-content: center;
}
.content-h-1 {
  justify-content: start;
}
.content-h-2 {
  justify-content: end;
}
.content-v-0 {
  align-items: center;
}
.content-v-1 {
  align-items: start;
}
.content-v-2 {
  align-items: end;
}
.table_input {
  width: 100%;
  height: 100%;
}
.table_input >>>.el-input__inner{
  border-color: rgba(0, 0, 0, 0.5) !important;
}
.collection {
  width: 50px;
  height: 100%;
  margin-left: 5px;
  border-color: transparent;
  background-color: #409eff;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
}
.collection:active {
  opacity: .7;
}
.table_caret{
  font-size: 16px;
  margin: 0 5px;
  color: rgba(0, 0, 0, 0.5);
}
.table_caret:hover{
  color: #409eff;
  cursor: pointer;
}
.table_caret:active{
  opacity: .8;
}
>>>input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;  /* éšè—å¾®è°ƒæŒ‰é’® */
  margin: 0 !important;  /* ç§»é™¤å¾®è°ƒæŒ‰é’®çš„边距 */
}
>>>input[type=number] {
  -moz-appearance: textfield !important;  /* é’ˆå¯¹ Firefox */
}
>>>.el-form-item__content{
  display: inline-flex;
  align-items: center;
}
</style>
<style>
.inspection .el-form-item__label {
  color: #000;
}
.inspection .el-drawer__header::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 30.24px;
  background: #3A7BFA;
  border-radius: 10px;
  margin-left: 32px;
  margin-right: 8.5px;
}
.inspection .el-drawer__header {
  color: #303133;
  text-align: left;
}
.inspection .el-input-group__append {
  padding: 0 14px;
  color: #3A7BFA;
  background-color: #fff;
  height: 100%;
  display: flex;
  align-items: center;
}
.inspection .center-box .el-input__inner {
  font-size: 12px;
  padding: 0 6px;
  text-align: center;
}
.inspection .el-textarea__inner {
  padding: 2px;
}
.inspection .el-textarea__inner::-webkit-scrollbar {
  width: 0;
}
.inspection .el-select {
  display: flex;
  align-items: center;
}
.inspection .el-textarea__inner {
  min-height: 100% !important;
}
.inspection .tables .el-input{
  display: flex;
  align-items: center;
}
.thermal-table .el-input{
  display: flex;
  align-items: center;
}
.custom-dialog .el-dialog__body {
  max-width: 1000px; /* è®¾ç½®æœ€å¤§å®½åº¦ */
}
.unPassCheck .el-dialog__body {
  overflow: auto;
  max-height: 800px; /* è®¾ç½®æœ€å¤§å®½åº¦ */
}
</style>
src/views/business/inspectionTask/index.vue
@@ -567,7 +567,6 @@
  },
  mounted() {
    this.queryParams.userId = this.userId;
    // this.getPower();
    this.refreshTable();
  },
  methods: {
@@ -626,40 +625,6 @@
    handleDataLook(row) {
      this.lookInfo = row;
      this.getLookList();
    },
    // æƒé™åˆ†é…
    getPower(radio) {
      let power = JSON.parse(sessionStorage.getItem("power"));
      let inspection = false;
      let connect = false;
      let review = false;
      let claim = false;
      for (var i = 0; i < power.length; i++) {
        if (power[i].menuMethod == "doInsOrder") {
          inspection = true;
        }
        if (power[i].menuMethod == "upPlanUser") {
          connect = true;
        }
        if (power[i].menuMethod == "verifyPlan") {
          review = true;
        }
        if (power[i].menuMethod == "claimInsOrderPlan") {
          claim = true;
        }
      }
      if (!claim) {
        this.componentData.do.splice(3, 1);
      }
      if (!review) {
        this.componentData.do.splice(2, 1);
      }
      if (!connect) {
        this.componentData.do.splice(1, 1);
      }
      if (!inspection) {
        this.componentData.do.splice(0, 1);
      }
    },
    changeCheckBox(val) {
      this.queryParams.userId = val ? 0 : null;
src/views/business/inspectionTask/inspection.vue
@@ -18,13 +18,9 @@
      </el-col>
      <el-col :span="16" style="text-align: right">
        <el-button size="small" type="primary" @click="refreshView">刷新</el-button>
        <el-button v-if="typeSource === 1" size="small" type="primary" @click="openPurchase">进货验证</el-button>
        <el-button v-if="state === 1 && typeSource === 1" size="small" type="primary"
          @click="openUnPassDialog('add')">不合格处理</el-button>
        <el-button size="small" type="primary" @click="
          sampleVisible = true;
        uploadSample();
        ">样品切换</el-button>
        <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">进货验证</el-button>
        <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary" @click="openUnPassDialog('add')">不合格处理</el-button>
        <el-button size="small" type="primary" @click="sampleVisible = true;uploadSample();">样品切换</el-button>
        <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">任务切换</el-button>
        <el-button v-if="state == 1" size="small" type="primary" @click="addVerifyDia = true">提交</el-button>
        <!-- å¤æ ¸ -->
@@ -73,7 +69,7 @@
        </el-form-item>
        <el-form-item label="备注:">
          <!--          <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>-->
          <el-input v-model="insOrder.remark" :disabled="state !== 1" clearable placeholder="请输入" size="small"
          <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="请输入" size="small"
            @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
          <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
        </el-form-item>
@@ -94,8 +90,8 @@
          </el-radio-group>
        </div>
        <div style="display: flex; align-items: center">
          <el-button v-if="state === 1" size="small" type="primary" @click="openAddUnpass">新增不合格复测</el-button>
          <el-button v-if="state === 1" size="small" type="primary" @click="unpassCheck">不合格复测</el-button>
          <el-button v-if="state == 1" size="small" type="primary" @click="openAddUnpass">新增不合格复测</el-button>
          <el-button v-if="state == 1" size="small" type="primary" @click="unpassCheck">不合格复测</el-button>
          <el-button v-if="state > 1" size="small" type="primary" @click="viewUnpassCheck">查看不合格复测</el-button>
          <span v-if="cableTagList.length > 0">&nbsp;&nbsp;电缆配置:</span>
          <el-select v-if="cableTagList.length > 0" v-model="currentTab" clearable placeholder="请选择" size="small"
@@ -291,7 +287,7 @@
                      state == 1
                    "><span :style="`font-family:${n.v.ff} !important;`">{{
                      toFixed(n.v.v, n.v.ct)
                    }}</span></template>
                        }}</span></template>
                    <template v-else-if="
                      n.v.ps != undefined &&
                      n.v.ps.value === '最终值' &&
@@ -338,7 +334,7 @@
      </div>
      <el-upload v-if="state == 1" ref="upload" :action="action" :before-upload="beforeUpload" :data="{
        orderId: id,
      }" :headers="headers" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
      }" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
        accept=".jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar"
        style="width: 80px !important;margin-top: 10px;">
        <el-button v-if="state == 1" size="small" type="primary">附件上传</el-button></el-upload>
@@ -508,9 +504,9 @@
      @resetAddUnPass="resetAddUnPass"></add-un-pass>
    <UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog"
      @resetForm="resetForm"></UnPassDialog>
    <!-- <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
    <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
      :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource"
      :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" /> -->
      :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" />
    <purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId"
      :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
  </div>
@@ -521,7 +517,7 @@
import limsTable from "@/components/Table/lims-table.vue";
import UnPassDialog from "../unpass/components/addUnPass.vue";
import AddUnPass from "../unpass/components/addUnPass.vue";
// import InspectionWord from "./components/InspectionWord.vue";
import InspectionWord from "./components/InspectionWord.vue";
import PurchaseVerification from "../unpass/components/PurchaseVerification.vue";
import {
  doInsOrder,
@@ -546,7 +542,6 @@
import DataWorker from '../../../DataWorker.worker';
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
import { getToken } from "@/utils/auth";
export default {
  name: 'inspection',
  components: {
@@ -554,7 +549,7 @@
    AddUnPass,
    limsTable,
    UnPassDialog,
    // InspectionWord,
    InspectionWord,
  },
  data() {
    return {
@@ -770,11 +765,6 @@
  // ç”¨äºŽä¸Šä¼ æ–‡ä»¶çš„信息
  computed: {
    ...mapGetters(["userId"]),
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      };
    },
    action() {
      return this.javaApi + "/insOrderPlan/uploadFile";
    },
@@ -1071,7 +1061,7 @@
    },
    // æ‰“开进货验证弹框
    openPurchase() {
      const operationType = this.state === 1 ? "add" : "view";
      const operationType = this.state == 1 ? "add" : "view";
      this.purchaseDialog = true;
      const item = {
        id: this.currentSample.id,
@@ -3118,7 +3108,7 @@
  align-items: center;
}
</style>
<style>
<style scoped>
/* .inspection .el-form-item__label {
  color: #000;
} */
src/views/business/materialOrder/customsInspection.vue
@@ -451,10 +451,6 @@
  dicts: ['check_type', 'urgency_level'],
  components: {},
  props: {
    isReport: {
      type: Number,
      default: () => null
    }
  },
  data() {
    return {
@@ -462,6 +458,7 @@
      orderType: '',
      active: 0,
      currentId: 0,
      isReport: '',
      editTable:[], // åŒºé—´ç‰¹æ®Šå€¼å¡«å†™
      template: null,
      saveLoad: false, // ä¿å­˜æŒ‰é’®loading
@@ -640,6 +637,7 @@
    this.active = this.$route.query.active
    this.orderType = this.$route.query.orderType
    this.currentId = this.$route.query.currentId
    this.isReport = this.$route.query.isReport
    this.customsInspection = this.$route.query.customsInspection
    this.getUserNowList() // èŽ·å–å½“å‰ç”¨æˆ·ä¿¡æ¯
    this.selectStandardMethods() // èŽ·å–æ£€éªŒæ ‡å‡†ä¸‹æ‹‰æ¡†æ•°æ®
@@ -698,7 +696,7 @@
          orderId = this.dataIndex === 0 ? this.customsInspection.enterOrderId : this.customsInspection.quarterOrderId
        } else if (!this.customsInspection.enterOrderId && !this.customsInspection.quarterOrderId) {
          this.isShowTab = false
          orderId = this.isReport === 1 ? this.customsInspection.insOrderId : this.customsInspection.id
          orderId = this.isReport == 1 ? this.customsInspection.insOrderId : this.customsInspection.id
        }
        // æŸ¥çœ‹
        // è¯·æ±‚接口,回显数据
@@ -756,7 +754,6 @@
          this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas)
          this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo)
          this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc)
          console.log('this.orderType----', this.orderType)
          if (this.orderType == 1) {
            this.$set(this.addObj, 'orderType', 'Quarterly inspection')
          }
src/views/business/materialOrder/index.vue
@@ -2,19 +2,23 @@
  <div class="app-container">
    <div>
      <div class="search">
        <el-form :model="entity" ref="entity" size="small" :inline="true"><el-form-item label="批号" prop="updateBatchNo">
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="批号" prop="updateBatchNo">
            <el-input v-model="entity.updateBatchNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="委托编号" prop="entrustCode">
          </el-form-item>
          <el-form-item label="委托编号" prop="entrustCode">
            <el-input v-model="entity.entrustCode" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="零件号" prop="partNo">
          </el-form-item>
          <el-form-item label="零件号" prop="partNo">
            <el-input v-model="entity.partNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
          </el-form-item><el-form-item label="零件描述" prop="partDesc">
          </el-form-item>
          <el-form-item label="零件描述" prop="partDesc">
            <el-input v-model="entity.partDesc" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
            </el-input>
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
@@ -9,7 +9,7 @@
        <el-upload :action="action" :auto-upload="true"
          :data="{ orderId: dataVisibleIndex === 0 ? filesLookInfo.enterOrderId : filesLookInfo.quarterOrderId }"
          :on-success="handleSuccessUp" :show-file-list="false"
          accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers"
          accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="uploadHeader"
          :before-upload="beforeUpload" style="width: 80px !important;" :on-error="onError" ref='upload'>
          <el-button size="small" type="primary" style="height: 38px">附件上传</el-button>
        </el-upload>
@@ -27,7 +27,6 @@
import file from "@/utils/file";
import limsTable from "@/components/Table/lims-table.vue";
import { delfile, downFile, getFileList } from "@/api/business/rawMaterialOrder";
import { getToken } from "@/utils/auth";
export default {
  name: "filesLookVisible",
  // import å¼•入的组件需要注入到对象中才能使用
@@ -176,7 +175,7 @@
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.$refs.fileList.selectList()
        this.getFileList()
      }
    },
    beforeUpload(file) {
@@ -221,11 +220,6 @@
    }
  },
  computed: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + '/insOrderPlan/uploadFile'
    }
src/views/business/productOrder/components/add.vue
@@ -2151,43 +2151,7 @@
</script>
<style scoped>
.ins_order_add .el-input-group__append,
.el-input-group__prepend {
  padding: 0 10px;
}
.ins_order_add .el-tree-node__content {
  height: 32px;
  font-size: 14px;
  border-radius: 2px;
}
.ins_order_add .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
.el-table .warning-row .cell {
  color: #3A7BFA;
}
.ins_order_add .has-gutter .el-table__cell .cell {
  line-height: 30px;
  background-color: #fafafa;
}
.ins_order_add .has-gutter .el-table__cell {
  background-color: #fafafa !important;
}
.ins_order_add .el-table__row .cell {
  font-size: 12px;
}
.ins_order_add .el-table .warning-row .cell {
  color: #3A7BFA;
}
.ins_order_add .el-select .is-disabled {
  background: transparent !important;
}
.ins_order_add .el-select .is-disabled .el-input__inner {
  background: transparent !important;
}
</style>
src/views/business/productOrder/components/auxiliaryWireCore.vue
@@ -1,60 +1,42 @@
<template>
  <div class="ins_order_config">
    <div>
      <el-row class="title">
        <el-col :span="6" style="padding-left: 20px;text-align: left;">辅助线芯配置</el-col>
        <el-col :span="18" style="text-align: right;">
          <el-button size="medium" @click="outConfig">
            <span style="color: #3A7BFA;">返 å›ž</span>
          </el-button>
          <el-button size="medium" type="primary" @click="save">保 å­˜</el-button>
        </el-col>
      </el-row>
    </div>
    <div class="search">
      <el-radio-group v-model="currentTab" size="small" style="margin-left: 20px;" @input="changeTab">
        <el-radio-button label="绝缘">绝 ç¼˜</el-radio-button>
        <!--        <el-radio-button label="护套">护 å¥—</el-radio-button>-->
      </el-radio-group>
      <div v-if="currentTab=='绝缘'" class="search_thing">
        <div class="search_label">芯数:</div>
        <el-select v-model="auxiliaryWireCore.num" allow-create
                   clearable
                   default-first-option
                   filterable
                   multiple
                   size="small">
          <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
        </el-select>
    <div class="search_form">
      <div class="search_input">
        <el-radio-group v-model="currentTab" size="small" style="margin-right: 20px;" @input="changeTab">
          <el-radio-button label="绝缘">绝 ç¼˜</el-radio-button>
        </el-radio-group>
        <el-form :model="auxiliaryWireCore" ref="entity" size="small" :inline="true">
          <el-form-item label="芯数" prop="num">
            <el-select v-model="auxiliaryWireCore.num" allow-create
                       clearable
                       default-first-option
                       filterable
                       multiple
                       size="small">
              <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="检验标准" prop="standardMethodListId">
            <el-select v-model="auxiliaryWireCore.standardMethodListId" allow-create
                       clearable
                       default-first-option
                       filterable
                       multiple
                       size="small">
              <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-form>
      </div>
<!--      <div v-if="currentTab=='绝缘'" class="search_thing">-->
<!--        <div class="search_label">型号参数:</div>-->
<!--        <el-input v-model="auxiliaryWireCore.modelNum" clearable size="small"-->
<!--                  @input="methodChange(auxiliaryWireCore.standardMethodListId)"></el-input>-->
<!--      </div>-->
      <div v-if="currentTab=='绝缘'" class="search_thing">
        <div class="search_label">检验标准:</div>
        <el-select v-model="auxiliaryWireCore.standardMethodListId" disabled placeholder="请选择检验标准"
                   size="small"
                   @change="(value)=>methodChange(value)">
          <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
          </el-option>
        </el-select>
      <div>
        <el-button size="small" @click="outConfig">返 å›ž</el-button>
        <el-button size="small" type="primary" @click="save">保 å­˜</el-button>
      </div>
      <!--      <div class="search_thing" v-if="currentTab=='护套'">-->
      <!--        <div class="search_label">检验标准:</div>-->
      <!--        <el-select v-model="sheath.standardMethodListId" placeholder="请选择检验标准" size="small"-->
      <!--                   disabled-->
      <!--        @change="(value)=>methodChange(value)">-->
      <!--          <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">-->
      <!--          </el-option>-->
      <!--        </el-select>-->
      <!--      </div>-->
    </div>
    <div class="table">
      <el-table ref="productTable" v-loading="getProductLoad" :data="productList"
                :row-class-name="tableRowClassName" border class="el-table" height="100%"
                style="margin-bottom: 10px;" tooltip-effect="dark" @select="upProductSelect"
                :row-class-name="tableRowClassName" border class="el-table" :height="'calc(100vh - 200px)'"
                tooltip-effect="dark" @select="upProductSelect"
                @selection-change="selectProduct" @select-all="handleAll">
        <el-table-column :selectable="selectable" type="selection" width="65"></el-table-column>
        <el-table-column label="检验项分类" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column>
@@ -132,11 +114,12 @@
<script>
import { Tree } from 'element-ui'
import {selectsStandardMethodByFLSSM, selectStandardProductList} from "@/api/business/rawMaterialOrder";
export default {
  props: {
    active: {
      type: Number,
      default: () => 0
      type: String,
      default: () => '0'
    },
    sampleSelectionList: {
      type: Array,
@@ -286,7 +269,7 @@
    },
    selectsStandardMethodByFLSSM2() {
      this.standards = []
      this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
      selectsStandardMethodByFLSSM({
        tree: this.$parent.selectTree
      }).then(res => {
        try {
@@ -294,7 +277,7 @@
            let arr = this.selectTree.split('-')
            let arr0 = arr.slice(0, arr.length - 1)
            let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
            this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
            selectsStandardMethodByFLSSM({
              tree: selectTree
            }).then(ress => {
              this.standards = ress.data.standardMethodList
@@ -330,7 +313,7 @@
      const conductorMaterial = this.sampleSelectionList[0].conductorMaterial
      const conductorType = this.sampleSelectionList[0].conductorType
      const modelNum = this.sampleSelectionList[0].modelNum
      this.$axios.post(this.$api.standardTree.selectStandardProductList, {
      selectStandardProductList({
        model: this.$parent.addObj.model ? this.$parent.addObj.model : model,
        modelNum: modelNum,
        standardMethodListId: val,
@@ -357,21 +340,16 @@
      this.$refs.productTable.toggleRowSelection(row, true);
    },
    save() {
      // if(this.auxiliaryWireCore.insProduct.length === 0 && this.sheath.insProduct.length === 0){
      //   this.$message.error('缺少配置无法保存')
      //   return
      // }
      if (this.auxiliaryWireCore.insProduct.length !== 0) {
        if (this.auxiliaryWireCore.num.length === 0) {
          this.$message.error('缺少芯数无法保存')
          return
        }
      }
      // this.sample.forEach(a=>{
      //   a.auxiliaryWireCore = this.auxiliaryWireCore
      //   a.sheath = this.sheath
      // })
      this.auxiliaryWireCore.insProduct = this.productList
      this.auxiliaryWireCore.insProduct = this.HaveJson(this.productList)
      this.auxiliaryWireCore.insProduct.forEach(a => {
        delete a.id
      })
      if (this.currentTab === '绝缘') {
        this.sample.forEach(a => {
          a.auxiliaryWireCore = this.auxiliaryWireCore
@@ -399,54 +377,14 @@
</script>
<style scoped>
.ins_order_config {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.ins_order_config::-webkit-scrollbar {
  width: 0;
}
.title {
  height: 60px;
  line-height: 60px;
}
.search {
  background-color: #fff;
  height: 80px;
.search_form {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search_thing {
  width: 300px;
  display: flex;
  align-items: center;
}
.search_label {
  width: 100px;
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 70px);
  display: flex;
  justify-content: space-between;
}
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 26px - 24px);
  padding: 20px;
}
</style>
<style>
.ins_order_config .has-gutter .el-table__cell .cell {
  line-height: 30px;
  background-color: #fafafa;
src/views/business/productOrder/components/cable-config.vue
@@ -1,56 +1,40 @@
<template>
  <div class="ins_order_config">
    <div>
      <el-row class="title">
        <el-col :span="6" style="padding-left: 20px;text-align: left;">电缆配置</el-col>
        <el-col :span="18" style="text-align: right;">
          <el-button size="medium" @click="outConfig">
            <span style="color: #3A7BFA;">返 å›ž</span>
          </el-button>
          <el-button size="medium" type="primary" @click="save">保 å­˜</el-button>
        </el-col>
      </el-row>
    </div>
    <div class="search">
      <el-radio-group v-model="currentTab" size="small" style="margin-left: 20px;" @input="changeTab">
        <el-radio-button label="绝缘">绝 ç¼˜</el-radio-button>
<!--        <el-radio-button label="护套">护 å¥—</el-radio-button>-->
      </el-radio-group>
      <div v-if="currentTab=='绝缘'" class="search_thing">
        <div class="search_label">芯数:</div>
        <el-select v-model="insulating.num" allow-create
                   clearable
                   default-first-option
                   filterable
                   multiple
                   size="small">
          <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
        </el-select>
  <div>
    <div class="search_form">
      <div v-if="currentTab=='绝缘'">
        <el-radio-group v-model="currentTab" size="small" style="margin-right: 20px;" @input="changeTab">
          <el-radio-button label="绝缘">绝 ç¼˜</el-radio-button>
        </el-radio-group>
        <el-form :model="insulating" ref="entity" size="small" :inline="true">
          <el-form-item label="芯数" prop="num">
            <el-select v-model="insulating.num" allow-create
                       clearable
                       default-first-option
                       filterable
                       multiple
                       size="small">
              <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="检验标准" prop="standardMethodListId">
            <el-select v-model="insulating.standardMethodListId" disabled placeholder="请选择检验标准"
                       size="small"
                       @change="(value)=>methodChange(value)">
              <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
              </el-option>
            </el-select>
          </el-form-item>
        </el-form>
      </div>
      <div v-if="currentTab=='绝缘'" class="search_thing">
        <div class="search_label">检验标准:</div>
        <el-select v-model="insulating.standardMethodListId" disabled placeholder="请选择检验标准"
                   size="small"
        @change="(value)=>methodChange(value)">
          <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
          </el-option>
        </el-select>
      <div>
        <el-button size="small" @click="outConfig">返 å›ž</el-button>
        <el-button size="small" type="primary" @click="save">保 å­˜</el-button>
      </div>
<!--      <div class="search_thing" v-if="currentTab=='护套'">-->
<!--        <div class="search_label">检验标准:</div>-->
<!--        <el-select v-model="sheath.standardMethodListId" placeholder="请选择检验标准" size="small"-->
<!--                   disabled-->
<!--        @change="(value)=>methodChange(value)">-->
<!--          <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">-->
<!--          </el-option>-->
<!--        </el-select>-->
<!--      </div>-->
    </div>
    <div class="table">
      <el-table ref="productTable" :data="productList" :row-class-name="tableRowClassName"
                border class="el-table" height="100%"
        style="margin-bottom: 10px;" tooltip-effect="dark" @select="upProductSelect"
        @selection-change="selectProduct" @select-all="handleAll">
      <el-table ref="productTable" :data="productList" :row-class-name="tableRowClassName" border
                class="el-table" :height="'calc(100vh - 200px)'" tooltip-effect="dark" @select="upProductSelect"
                @selection-change="selectProduct" @select-all="handleAll">
        <el-table-column :selectable="selectable" type="selection" width="65"></el-table-column>
        <el-table-column label="检验项分类" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column>
        <el-table-column label="检验项" min-width="140" prop="inspectionItem" show-overflow-tooltip>
@@ -142,12 +126,13 @@
</template>
<script>
import { Tree } from 'element-ui'
import {selectsStandardMethodByFLSSM, selectStandardProductList} from "@/api/business/rawMaterialOrder";
export default {
  props: {
    active: {
      type: Number,
      default: () => 0
      type: String,
      default: () => '0'
    },
    sampleSelectionList: {
      type: Array,
@@ -174,10 +159,6 @@
          insProduct: [],
          num: []
        },
        // sheath: {
        //   standardMethodListId: null,
        //   insProduct: []
        // },
        isAskOnlyRead: false,
        inspectionItem:null,
        inspectionItemSubclass:null,
@@ -194,9 +175,6 @@
          if(this.$parent.sampleList[i].insulating !== undefined && this.$parent.sampleList[i].insulating !== null){
            this.insulating = this.$parent.sampleList[i].insulating
          }
          // if(this.$parent.sampleList[i].sheath !== undefined && this.$parent.sampleList[i].sheath !== null){
          //   this.sheath = this.$parent.sampleList[i].sheath
          // }
          break
        }
      }
@@ -227,28 +205,6 @@
        this.productList = this.productList0
      }
    },
    // è¦æ±‚值变化时
    requestChange(e, row,type) {
      this.sampleList.map(item => {
        if (this.sampleIds.indexOf(item.id) > -1) {
          item.insProduct.map(i => {
            if(i.id == row.id){
              if(row.repetitionTag){
                if(row.repetitionTag==i.repetitionTag){
                  i[type] = e
                }
              }else{
                if(!i.repetitionTag){
                  i[type] = e
                }
              }
            }
            return i
          })
        }
        return item
      })
    },
    outConfig() {
      this.$parent.cableConfigShow = false
    },
@@ -277,10 +233,7 @@
        this.$refs.productTable.doLayout()
      })
    },
    tableRowClassName({
      row,
      rowIndex
    }) {
    tableRowClassName({row, rowIndex}) {
      if (row.state === 0) {
        return '';
      }
@@ -295,7 +248,7 @@
    },
    selectsStandardMethodByFLSSM2() {
      this.standards = []
      this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
      selectsStandardMethodByFLSSM({
        tree: this.$parent.selectTree
      }).then(res => {
        try {
@@ -303,7 +256,7 @@
            let arr = this.selectTree.split('-')
            let arr0 = arr.slice(0, arr.length - 1)
            let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
            this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
            selectsStandardMethodByFLSSM({
              tree: selectTree
            }).then(ress => {
              this.standards = ress.data.standardMethodList
@@ -341,7 +294,7 @@
      const cores = this.sampleSelectionList[0].cores
      const conductorMaterial = this.sampleSelectionList[0].conductorMaterial
      const conductorType = this.sampleSelectionList[0].conductorType
      this.$axios.post(this.$api.standardTree.selectStandardProductList, {
      selectStandardProductList({
        model: this.$parent.addObj.model?this.$parent.addObj.model:model,
        modelNum: modelNum,
        cores: cores,
@@ -358,8 +311,6 @@
        res.data.forEach(a => {
          a.state = 0
        })
        // this.insulating.insProduct = res.data
        // this.sheath.insProduct = res.data
        this.productList = res.data
      })
    },
@@ -367,21 +318,16 @@
      this.$refs.productTable.toggleRowSelection(row, true);
    },
    save(){
      // if(this.insulating.insProduct.length === 0 && this.sheath.insProduct.length === 0){
      //   this.$message.error('缺少配置无法保存')
      //   return
      // }
      this.insulating.insProduct = this.productList
      this.insulating.insProduct = this.HaveJson(this.productList)
      if(this.insulating.insProduct.length !== 0){
        if(this.insulating.num.length === 0){
          this.$message.error('缺少芯数无法保存')
          return
        }
      }
      // this.sample.forEach(a=>{
      //   a.insulating = this.insulating
      //   a.sheath = this.sheath
      // })
      this.insulating.insProduct.forEach(a => {
        delete a.id
      })
      if (this.currentTab === '绝缘') {
        this.sample.forEach(a => {
          a.insulating = this.insulating
@@ -429,67 +375,15 @@
</script>
<style scoped>
.ins_order_config {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .ins_order_config::-webkit-scrollbar {
    width: 0;
  }
  .title {
    height: 60px;
    line-height: 60px;
  }
  .search {
        background-color: #fff;
        height: 80px;
        display: flex;
        align-items: center;
    }
    .search_thing {
        width: 300px;
        display: flex;
        align-items: center;
    }
    .search_label {
        width: 100px;
        font-size: 14px;
        text-align: right;
    }
    .search_input {
        width: calc(100% - 70px);
    }
  .table {
        margin-top: 10px;
        background-color: #fff;
        width: calc(100% - 40px);
        height: calc(100% - 60px - 80px - 26px - 24px);
        padding: 20px;
    }
</style>
<style>
  .ins_order_config .has-gutter .el-table__cell .cell {
    line-height: 30px;
    background-color: #fafafa;
  }
  .ins_order_config .has-gutter .el-table__cell {
    background-color: #fafafa !important;
  }
  .ins_order_config .el-table__row .cell {
    font-size: 12px;
  }
  .ins_order_config .el-table .warning-row .cell {
    color: #3A7BFA;
  }
.search_form {
  display: flex;
  justify-content: space-between;
}
.search_input {
  display: flex;
  justify-content: space-between;
}
.el-table .warning-row .cell {
  color: #3A7BFA;
}
</style>
src/views/business/reportPreparation/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1016 @@
<template>
  <div class="app-container">
    <div>
      <el-form :model="entity" ref="entity" size="small" :inline="true">
        <el-form-item label="报告编号" prop="code">
          <el-input v-model="entity.code" clearable placeholder="请输入"
                    size="small" @keyup.enter.native="refreshTable()"></el-input>
        </el-form-item>
        <el-form-item label="状态" prop="queryStatus">
          <el-select v-model="entity.queryStatus" clearable size="small" @change="refreshTable()">
            <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="下单类别" prop="typeSource">
          <el-select v-model="entity.typeSource" clearable size="small" @change="refreshTable()">
            <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="检验类别" prop="orderType">
          <el-select v-model="entity.orderType" clearable size="small" @change="refreshTable()">
            <el-option v-for="(a, i) in orderTypeList" :key="i" :label="a.label" :value="a.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button size="mini" @click="refresh()">重置</el-button>
          <el-button size="mini" type="primary" @click="refreshTable()">查询</el-button>
          <el-button :loading="outLoading" size="mini" type="primary" @click="handleDowns">批量下载</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div>
      <lims-table :tableData="valueTableData" :column="column" :page="page" :tableLoading="tableLoading"
                  :isSelection="true" :handleSelectionChange="handleChange"
                  :height="'calc(100vh - 290px)'" @pagination="pagination" key="valueTableData">
        <div slot="action" slot-scope="scope">
          <el-button size="small" type="text" @click="viewIssued(scope.row)">查看报告</el-button>
          <el-upload ref='upload1'
                     style="display: inline;margin: 0 6px"
                     :action="fileAction1 +'?id='+ scope.row.id"
                     :auto-upload="true"
                     :before-upload="fileBeforeUpload1"
                     :headers="uploadHeader" :on-error="onError1"
                     :on-success="handleSuccessUp1"
                     :show-file-list="false"
                     accept='.doc,.docx'>
            <el-button size="small" type="text" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName">上传</el-button>
          </el-upload>
          <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handleRestore(scope.row)">还原</el-button>
          <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">退回任务</el-button>
          <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handle(scope.row)">提交</el-button>
          <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || userName !== scope.row.examineUser" @click="handleIssued(scope.row)">审核</el-button>
          <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || userName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">批准</el-button>
          <el-popover placement="bottom" trigger="hover" style="margin-left: 6px">
            <template #reference>
              <el-button link type="text" size="small">更多</el-button>
            </template>
            <div>
              <el-button style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">下载</el-button>
              <el-button type="text" size="small" @click="viewInspectInfo(scope.row)">原始记录</el-button>
              <el-button type="text" size="small" @click="handleFileLook(scope.row)">附件上传</el-button>
            </div>
          </el-popover>
        </div>
      </lims-table>
    </div>
    <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="claimVisible" title="在线编制"
               width="22cm">
      <div class="full-screen">
        <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px"
           @click="fullscreen=true;"></i>
        <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;">
      </div>
      <Word v-if="claimVisible" ref="Word" :class="{fullscreen:fullscreen}" :value="value" style="height:70vh" />
      <span slot="footer" class="dialog-footer">
        <el-button @click="claimVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmClaim">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="issuedVisible" title="报告审核"
               width="80vw">
      <div class="full-screen">
        <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i>
        <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" >
      </div>
      <div v-if="issuedVisible" style="height: 80vh;">
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
      </div>
      <span slot="footer" class="dialog-footer">
                <el-button :disabled="loadingIssued" @click="issuedReasonVisible=true">不通过</el-button>
                <el-button type="primary" @click="subIssued">通 è¿‡</el-button>
            </span>
    </el-dialog>
    <el-dialog :modal-append-to-body="false" :visible.sync="issuedReasonVisible" title="不通过原因" width="400px">
      <div class="search_thing">
        <div class="search_label">不通过原因:</div>
        <div class="search_input"><el-input v-model="reason" clearable placeholder="请输入" size="small"></el-input></div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button :disabled="loadingIssuedReason" @click="issuedReasonVisible=false">取消</el-button>
                <el-button :loading="loadingIssuedReason" type="primary" @click="handleIssuedReason">确定</el-button>
            </span>
    </el-dialog>
    <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="approveVisible" title="报告批准" width="80vw">
      <div class="full-screen">
        <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i>
        <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" >
      </div>
      <div v-if="approveVisible" style="height: 80vh;">
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
      </div>
      <span slot="footer" class="dialog-footer">
                <el-button :disabled="loadingApprove" @click="approveReasonVisible=true">不批准</el-button>
                <el-button :loading="loadingApprove" type="primary" @click="subApprove">批 å‡†</el-button>
            </span>
    </el-dialog>
    <el-dialog :modal-append-to-body="false" :visible.sync="approveReasonVisible" title="不批准原因" width="400px">
      <div class="search_thing">
        <div class="search_label">不批准原因:</div>
        <div class="search_input"><el-input v-model="reason" clearable placeholder="请输入" size="small"></el-input></div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button :disabled="loadingApproveReason" @click="approveReasonVisible=false">取消</el-button>
                <el-button :loading="loadingApproveReason" type="primary" @click="handleApproveReason">确定</el-button>
            </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :visible.sync="addApproverDia" title="指定批准人员"
               width="400px"
               @close="closeAddApproverDia">
      <div class="body" style="display: flex;padding: 10px;align-items: center;">
        <div class="search_label" style="width: 150px;"><span class="required-span">*</span>批准人:</div>
        <div class="search_input" style="width: 100%;">
          <el-select v-model="approver" clearable filterable placeholder="请选择" size="small" style="width: 100%;">
            <el-option v-for="(item,i) in approverList" :key="i" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeAddApproverDia">取 æ¶ˆ</el-button>
        <el-button :loading="loadingIssued" type="primary" @click="submitAddApprover">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :visible.sync="addVerifyDia"
               title="指定审核人员"
               width="400px"
               @close="closeAddVerifyDia">
      <div class="body" style="display: flex;padding: 10px;align-items: center;">
        <div class="search_label" style="width: 150px;"><span class="required-span">*</span>审核人:</div>
        <div class="search_input" style="width: 100%;">
          <el-select v-model="verifyUser" clearable filterable placeholder="请选择" size="small" style="width: 100%;">
            <el-option v-for="(item,i) in approverList" :key="i" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeAddVerifyDia">取 æ¶ˆ</el-button>
        <el-button :loading="loadingVerify" type="primary" @click="handleSubmit">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <!--产业链信息查看-->
<!--    <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo>-->
    <!--报告查看-->
    <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="viewIssuedVisible" title="报告查看"
               width="80vw">
      <div class="full-screen">
        <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i>
        <img v-else alt="" src="@/assets/images/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" >
      </div>
      <div v-if="viewIssuedVisible" style="height: 80vh;">
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
      </div>
    </el-dialog>
    <!--附件查看-->
    <el-dialog :visible.sync="filesDialogVisible" title="附件查看" width="80%" @closed="closeFilesLook">
      <div style="margin-bottom: 10px">
        <el-upload ref='upload'
                   :action="fileAction"
                   :auto-upload="true"
                   :before-upload="fileBeforeUpload" :data="{orderId: filesLookInfo.insOrderId}"
                   :headers="uploadHeader" :on-error="onError"
                   :on-success="handleSuccessUp"
                   :show-file-list="false"
                   accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;">
          <el-button size="small" style="height: 38px" type="primary">附件上传</el-button>
        </el-upload>
      </div>
      <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px"
                  key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
    </el-dialog>
  </div>
</template>
<script>
import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
// import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
import file from "@/utils/file";
import {
  downAll,
  examineReport,
  pageInsReport,
  ratifyReport,
  sendBackTask,
  upReportUrl,
  writeReport
} from "@/api/business/insReport";
import {mapGetters} from "vuex";
import {selectUserCondition} from "@/api/business/inspectionTask";
import limsTable from "@/components/Table/lims-table.vue";
import {delfile, downFile, getFileList} from "@/api/business/rawMaterialOrder";
export default {
  components: {limsTable, onlyoffice},
  data() {
    return {
      entity: {
        queryStatus: null,
        code: null,
        typeSource: null,
      },
      page: {
        current: 1,
        size: 20,
        total: 0
      },
      upIndex: 0,
      statusList: [],
      claimVisible: false,
      issuedVisible: false,
      issuedReasonVisible: false,
      approveVisible: false,
      approveReasonVisible: false,
      fullscreen: false,
      loadingApproveReason: false,
      loadingApprove: false,
      loadingIssuedReason: false,
      loadingIssued: false,
      value: ``,
      reason: '',
      currentInfo: null,
      option:null,
      mutiList:[],
      outLoading:false,
      inLoading:false,
      addApproverDia: false, // æŒ‡å®šå®¡æ‰¹äººå‘˜å¼¹æ¡†
      approver: '', // å®¡æ‰¹äººå‘˜
      approverId: '', // å®¡æ‰¹äººå‘˜
      approverList: [],
      addVerifyDia: false, // æŒ‡å®šå®¡æ ¸äººå‘˜å¼¹æ¡†
      verifyUser: null, // å®¡æ ¸äººå‘˜
      loadingVerify: false, // å®¡æ ¸äººå‘˜
      typeSourceList: [
        {label: '成品下单', value: 0},
        {label: '原材料下单', value: 1},
      ],
      orderTypeList: [
        {label: '委托试验', value: 'Customer-ordered test'},
        {label: '抽检', value: '抽检'},
        {label: '进厂检验', value: '进厂检验'},
        {label: '季度检验', value: 'Quarterly inspection'},
      ],
      showInfoDialog: false, // äº§ä¸šé“¾ä¿¡æ¯æŸ¥çœ‹
      isReport: 1,
      activeFace: 0, // 1:下单,2:查看,3:审核,默认为0
      customsInspection: {},
      currentId: null,
      examine: null,
      viewIssuedVisible: false,
      queryStatusList: [
        {label: '待提交', value: 0},
        {label: '待审核', value: 1},
        {label: '待批准', value: 2},
      ],
      state: 0,
      orderId: 0,
      inspectorList: [],//检验人员列表
      InspectionKey: 1,
      typeSource: null,// 0:成品下单,1:原材料下单
      sonLaboratory: '', // è¯•验室
      filesDialogVisible: false,
      filesLookInfo: {},
      tableDataFile: [],
      tableLoadingFile: false,
      columnFile: [
        {
          dataType: 'tag',
          label: '类型',
          prop: 'type',
          formatData: (params) => {
            if (params == 1) {
              return '图片'
            } else if (params == 2) {
              return '文件'
            } else {
              return ''
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else if (params == 2) {
              return 'warning'
            } else {
              return ''
            }
          }
        },
        { label: '附件名称', prop: 'fileName' },
        { label: '上传人', prop: 'name' },
        { label: '上传时间', prop: 'createTime' },
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '170px',
          operation: [
            {
              name: '下载',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row);
              }
            },
            {
              name: '删除',
              type: 'text',
              clickFun: (row) => {
                this.delete(row);
              }
            },
          ]
        }
      ],
      pageFile: {
        total: 0,
        size: 10,
        current: 1
      },
      isCopper: null,
      tableLoading: false,
      valueTableData: [],
      column: [
        {
          label: "报告编号",
          prop: "code",
          width: "160px",
          dataType: "link",
          linkMethod: "selectAllByOne",
        },
        {
          label: "下单类别",
          prop: "typeSource",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "成品下单";
            } else {
              return "原材料下单";
            }
          },
        },
        {
          label: "检验类型",
          prop: "orderType",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            return this.orderTypeList.find((m) => m.value == params).label;
          },
          formatType: (params) => {
            return this.orderTypeList.find((m) => m.value == params).type;
          },
        },
        { label: "创建时间", prop: "createTime" },
        { label: "提交人", prop: "writeUserName" },
        { label: "提交时间", prop: "writeTime" },
        {
          label: "提交状态",
          prop: "state",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "待提交";
            } else {
              return "已提交";
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "danger";
            } else {
              return "success";
            }
          },
        },
        { label: "审核人", prop: "examineUser" },
        { label: "审核时间", prop: "examineTime" },
        {
          label: "审核状态",
          prop: "isExamine",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "不通过";
            } else {
              return "通过";
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "danger";
            } else {
              return "success";
            }
          },
        },
        { label: "审核备注", prop: "examineTell" },
        { label: "批准人", prop: "ratifyUser" },
        { label: "批准时间", prop: "ratifyTime" },
        {
          label: "批准状态",
          prop: "isRatify",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "不批准";
            } else {
              return "批准";
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "danger";
            } else {
              return "success";
            }
          },
        },
        { label: "批准备注", prop: "ratifyTell" },
        {
          fixed: "right",
          dataType: "slot",
          slot: "action",
          width: '360px',
          label: "操作"
        }
      ],
      userName: '',
    }
  },
  computed: {
    ...mapGetters(["nickName", "userId"]),
    action() {
      return this.javaApi + '/insReport/upAll'
    },
    fileAction() {
      return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified'
    },
    fileAction1() {
      return this.javaApi + '/insReport/inReport'
    }
  },
  mounted() {
    this.refreshTable()
  },
  methods: {
    refreshTable() {
      this.tableLoading = true
      pageInsReport({
        ...this.page,...this.entity
      }).then(res => {
        this.tableLoading = false
        this.page.total = res.data.body.total
        this.valueTableData = res.data.body.records
      })
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.refreshTable();
    },
    refresh() {
      this.resetForm('entity')
      this.refreshTable();
    },
    handleChange(arr){
      this.mutiList = arr
    },
    // æŸ¥çœ‹æ£€éªŒæ•°æ®
    viewInspectInfo (row) {
      //当前检验任务的检验人列表
      let inspectorList = []
      if(row.userName){
        inspectorList = row.userName.split(',')
      }
      inspectorList.push(this.nickName)
      this.$router.push({
        path: "/inspectionTask/inspection",
        query: {
          sonLaboratory: row.sonLaboratory,
          state: 3,
          typeSource: row.typeSource,
          orderId: row.insOrderId,
          inspectorList: inspectorList,
        },
      })
    },
    // æ‰“开查看附件弹框
    handleFileLook (row) {
      this.filesLookInfo = row
      this.filesDialogVisible = true
      this.getFileList()
    },
    // æŸ¥è¯¢é™„件查看列表回调
    getFileList() {
      this.tableLoadingFile = true
      getFileList({insOrderId: this.filesLookInfo.insOrderId}).then(res => {
        this.tableLoadingFile = false
        if (res.code === 200) {
          this.tableDataFile = res.data.records
          this.pageFile.total = res.data.total
        }
      }).catch(err => {
        this.tableLoadingFile = false
      })
    },
    paginationFile(page) {
      this.pageFile.size = page.limit
      this.getFileList()
    },
    closeFilesLook () {
      this.filesDialogVisible = false
    },
    handleSuccessUp(response, ) {
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.getFileList()
      }
    },
    handleSuccessUp1(response, ) {
      if (response.code == 200) {
        this.$message.success('上传成功');
      }
    },
    // ä¸‹è½½é™„件的文件
    handleDown(row){
      downFile({
        id: row.id,
      }).then(res => {
        if (res.code === 200) {
          let url = '';
          if(res.data.type==1){
            url = this.javaApi+'/img/'+res.data.fileUrl
            file.downloadIamge(url,row.fileName)
          }else{
            url = this.javaApi+'/word/'+res.data.fileUrl
            const link = document.createElement('a');
            link.href = url;
            link.download = row.fileName;
            link.click();
          }
        }
      }).catch(error => {
      })
    },
    // åˆ é™¤é™„件文件
    delete(row) {
      this.$confirm('是否删除当前数据?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        delfile({ id: row.id }).then(res => {
          if (res.code === 500) {
            return
          }
          this.$message.success('删除成功')
          this.getList()
        }).catch(e => {
          this.$message.error('删除失败')
        })
      }).catch(() => { })
    },
    // æŸ¥çœ‹äº§ä¸šé“¾ä¿¡æ¯
    openInfoDialog (row) {
      this.showInfoDialog = true
      this.$nextTick(() => {
        this.$refs.showInfoDialog.getInfo(row.ifsInventoryId)
      })
    },
    handleDowns(){
      if(this.mutiList.length==0){
        this.$message.error('请选择报告')
        return
      }
      let str = this.mutiList.map(m=>m.id).join(',')
      this.outLoading = true
      downAll({ids: str}).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        // const blob = new Blob([res],{ type: 'application/octet-stream' });
        // const url = URL.createObjectURL(blob);
        // const link = document.createElement('a');
        // link.href = url;
        // link.download = '报告.zip';
        // link.click();
        const link = document.createElement('a');
        link.href = this.javaApi + res.message;
        link.target = '_blank';
        document.body.appendChild(link);
        link.click();
      })
    },
    beforeUpload(file){
      const isZip = file.type === 'application/zip' || file.name.endsWith('.zip');
      if (!isZip) {
        this.$message.error('上传文件只能是 ZIP æ ¼å¼!');
      }
      if(isZip){
        this.inLoading = true;
      }
      return isZip;
    },
    fileBeforeUpload(file) {
      let flag = true
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        flag = false
      }
      if (!flag) {
        return Promise.reject(flag); //正确的终止
      }
    },
    fileBeforeUpload1(file) {
      let flag = true
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload1.clearFiles()
        flag = false
      }
      if (!flag) {
        return Promise.reject(flag); //正确的终止
      }
    },
    handleSuccess(response,){
      this.inLoading = false;
      if (response.code == 200) {
        this.$message.success('导入成功')
        this.refreshTable()
      }else{
        this.$message.error(response.message)
      }
    },
    onError(err, file, fileList,type) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    onError1(err, file, fileList,type) {
      this.$message.error('上传失败')
      this.$refs.upload1.clearFiles()
    },
    confirmClaim() {
      // console.log(this.$refs.Word.getValue())
    },
    selectAllByOne(row) {
      this.isCopper = row.isCopper
      this.customsInspection = row
      this.activeFace = 2;
      this.examine = 1;
      this.isReport = 1
      this.currentId = parseInt(row.insOrderId)
      switch (row.isCopper) {
        case 0:
          // åŽŸææ–™
          this.$router.push({
            path: "/materialOrder/customsInspection", query: {
              customsInspection: row,
              active: this.activeFace,
              currentId: row.insOrderId,
              isReport: this.isReport
            }
          });
          break;
        case null:
          // æˆå“
          this.$router.push({
            path: "/productOrder/add", query: {
              examine: this.examine,
              active: this.activeFace,
              currentId: row.insOrderId
            }
          });
          break;
        case 1:
          // é“œæ
          this.$router.push({
            path: "/materialOrder/copperOrder", query: {
              active: this.activeFace,
              currentId: row.insOrderId
            }
          });
          break;
      }
    },
    download(row) {
      let url = row.urlS ? row.urlS : row.url;
      const link = document.createElement('a');
      link.href = this.javaApi + url;
      link.target = '_blank';
      document.body.appendChild(link);
      link.click();
    },
    // è¿˜åŽŸæ“ä½œ
    handleRestore(row) {
      upReportUrl({
        id: row.id
      }).then(res => {
        if (res.code === 200) {
          this.$message.success('操作成功')
          this.refreshTable('page')
        }
      })
    },
    // å®¡æ ¸æŒ‰é’®
    handleIssued(row) {
      this.currentInfo = row;
      let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
      let fileType = "docx"
      if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
        fileName = row.tempUrlPdf
        fileType = "pdf"
      }
      fileName = fileName.replace('/word/','')
      const userName = this.nickName
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: fileType,
        title: fileName,
        lang: 'zh-CN',
        isPrint: false,
        user_id: 1,
        user_name: userName,
        editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
      }
      this.issuedVisible = true;
    },
    // æŸ¥çœ‹æŠ¥å‘Š
    viewIssued(row) {
      this.currentInfo = row;
      let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
      let fileType = "docx"
      if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
        fileName = row.tempUrlPdf
        fileType = "pdf"
      }
      fileName = fileName.replace('/word/','')
      const userName = this.nickName
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: fileType,
        title: fileName,
        lang: 'zh-CN',
        isPrint: false,
        user_id: 1,
        user_name: userName,
        editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
      }
      this.viewIssuedVisible = true;
    },
    // é€€å›žåˆ°ä»»åŠ¡
    sendBackTask(row) {
      this.$confirm('确认退回到检验任务?退回后需重新提交复核', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.upLoad = true
        sendBackTask({id: row.id}).then(res => {
          this.upLoad = false
          this.$message.success('退回成功!')
          this.refreshTable('page')
        }).catch(err => {
          this.upLoad = false
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // å®¡æ ¸é€šè¿‡
    submitAddApprover () {
      if (!this.approver) {
        this.$message.error('请选择审批人')
        return
      }
      this.loadingIssued = true;
      examineReport({
        id: this.currentInfo.id,
        userId: this.approver,
        isExamine: 1
      }).then(res => {
        this.loadingIssued = false;
        this.$message.success('提交成功')
        this.refreshTable('page')
        this.currentInfo = null;
        this.addApproverDia = false
        this.issuedVisible = false;
      }).catch(e => {
        this.$message.error('提交失败')
        this.loadingIssued = false;
      })
    },
    closeAddApproverDia () {
      this.addApproverDia = false
      this.approver = ''
    },
    // ç‚¹å‡»é€šè¿‡ï¼Œéœ€è¦é€‰æ‹©æ‰¹å‡†äººå‘˜
    subIssued() {
      this.getAuthorizedPerson()
      this.addApproverDia = true
    },
    // èŽ·å–äººå‘˜åˆ—è¡¨
    getAuthorizedPerson() {
      selectUserCondition({ type: 0 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
            label: a.name,
            value: a.id,
          });
        });
        this.approverList = data;
      })
    },
    // æ‰¹å‡†æŒ‰é’®
    handleApprove(row) {
      this.currentInfo = row;
      let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
      let fileType = "docx"
      if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
        fileName = row.tempUrlPdf
        fileType = "pdf"
      }
      fileName = fileName.replace('/word/','')
      const userName = this.nickName
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: fileType,
        title: fileName,
        lang: 'zh-CN',
        isPrint: false,
        user_id: 1,
        user_name: userName,
        editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
      }
      this.approveVisible = true;
    },
    // æ‰¹å‡†é€šè¿‡
    subApprove() {
      this.loadingApprove = true;
      ratifyReport({
        id: this.currentInfo.id,
        isRatify: 1
      }).then(res => {
        this.loadingApprove = false;
        this.$message.success('已批准')
        this.refreshTable('page')
        this.currentInfo = null;
        this.approveVisible = false;
      })
    },
    handle (row) {
      this.getAuthorizedPerson()
      this.currentInfo = row;
      this.addVerifyDia = true
    },
    // æäº¤å®¡æ ¸äººæ“ä½œ
    handleSubmit(row) {
      this.loadingVerify = true
      writeReport({
        id: this.currentInfo.id,
        userId: this.verifyUser,
      }).then(res => {
        this.loadingVerify = false
        this.addVerifyDia = false
        this.$message.success('提交成功')
        this.refreshTable('page')
      }).catch(e => {
        this.loadingVerify = false
        this.$message.error('提交失败')
      })
    },
    closeAddVerifyDia () {
      this.addVerifyDia = false
      this.verifyUser = ''
    },
    // å®¡æ ¸ä¸é€šè¿‡åŽŸå› æäº¤
    handleIssuedReason() {
      if (!this.reason) {
        return this.$message.error('请输入原因')
      }
      this.loadingIssuedReason = true;
      examineReport({
        id: this.currentInfo.id,
        isExamine: 0,
        examineTell: this.reason
      }).then(res => {
        this.loadingIssuedReason = false;
        this.$message.success('操作成功')
        this.refreshTable('page')
        this.currentInfo = null;
        this.reason = '';
        this.issuedVisible = false;
        this.issuedReasonVisible = false;
      }).catch(e => {
        this.$message.error('操作失败')
        this.loadingIssuedReason = false;
      })
    },
    // ä¸æ‰¹å‡†åŽŸå› æäº¤
    handleApproveReason() {
      if (!this.reason) {
        return this.$message.error('请输入原因')
      }
      this.loadingApproveReason = true
      ratifyReport({
        id: this.currentInfo.id,
        isRatify: 0,
        examineTell: this.reason
      }).then(res => {
        this.loadingApproveReason = false
        this.$message.success('操作成功')
        this.refreshTable('page')
        this.currentInfo = null;
        this.reason = '';
        this.approveVisible = false;
        this.approveReasonVisible = false;
      }).catch(e => {
        this.$message.error('操作失败')
        this.loadingIssuedReason = false;
      })
    }
  }
}
</script>
<style scoped>
.title {
  height: 60px;
  line-height: 60px;
}
.search {
  background-color: #fff;
  height: 80px;
  display: flex;
  align-items: center;
}
.search_thing {
  display: flex;
  align-items: center;
  height: 50px;
}
.search_label {
  width: 120px;
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 120px);
}
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
}
.el-form-item {
  margin-bottom: 16px;
}
.full-screen {
  position: absolute;
  right: 52px;
  top: 22px;
}
.btns {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translate(0, -50%);
  display: flex;
  align-items: center;
}
.fullscreen {
  height: 82vh
}
</style>
src/views/business/sample/components/detail.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,197 @@
<template>
  <div style="width: 100%;height: 100%;overflow-y: auto;" class="detail">
    <div>
      <el-row class="title">
        <el-col :span="12" style="padding-left: 20px;text-align: left;">样品详情</el-col>
        <el-col :span="12" style="text-align: right;">
          <el-button size="small" @click="hanldeBack">返回</el-button>
        </el-col>
      </el-row>
    </div>
    <div class="search">
      <div class="search_thing">
        <div class="search_label">样品编号:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                            v-model="entity.sampleCode" disabled></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="entity.sample" disabled></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="entity.num" disabled></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="entity.unit" disabled></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="entity.date" disabled></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="entity.user" disabled></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="entity.code" disabled style="min-width: 230px;"></el-input>
        </div>
      </div>
    </div>
    <h4>检验项目</h4>
    <div class="table">
      <el-table class="el-table" ref="productTable" :data="products" height="380px" tooltip-effect="dark" border>
                <el-table-column type="index" align="center" label="序号" width="70" :key="Math.random()">
                </el-table-column>
                <el-table-column prop="inspectionItem" label="检验项" min-width="100"
                    show-overflow-tooltip></el-table-column>
                <el-table-column prop="inspectionItemSubclass" label="检验项分类" min-width="100" show-overflow-tooltip v-if="PROJECT=='装备电缆'"></el-table-column>
                <el-table-column prop="laboratory" label="实验室" min-min-width="100" show-overflow-tooltip></el-table-column>
                <el-table-column prop="unit" label="单位" min-width="100" show-overflow-tooltip></el-table-column>
                <el-table-column prop="equipValue" label="设备" min-width="100" show-overflow-tooltip>
          <template slot-scope="scope">
            {{handleData(scope.row.equipValue)}}
          </template>
        </el-table-column>
                <el-table-column prop="entrustCode" label="委托编号" min-width="100" show-overflow-tooltip></el-table-column>
                <el-table-column prop="updateUserName" label="检验人" min-width="100" show-overflow-tooltip></el-table-column>
                <el-table-column prop="updateTime" label="检验时间" min-width="100" show-overflow-tooltip></el-table-column>
                <el-table-column prop="insResult" label="结论" min-width="100">
                    <template slot-scope="scope">
            <el-tag
              :type="scope.row.insResult==1?'success':'danger'" size="medium">{{scope.row.insResult==1?'合格':'不合格'}}</el-tag>
                    </template>
                </el-table-column>
            </el-table>
    </div>
    <h4>出入库历史</h4>
    <div class="table" style="margin-bottom: 20px;">
      <el-table class="el-table" ref="productTable" :data="histories" height="380px" tooltip-effect="dark" border>
                <el-table-column type="index" align="center" label="序号" width="70" :key="Math.random()">
                </el-table-column>
                <el-table-column prop="state" label="类型"
                    show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag :type="scope.row.state==1?'success':'danger'">{{ scope.row.state==1?'入库':'出库' }}</el-tag>
          </template>
        </el-table-column>
                <el-table-column prop="createUserName" label="操作人"  show-overflow-tooltip></el-table-column>
                <el-table-column prop="createTime" label="操作时间"  show-overflow-tooltip></el-table-column>
                <el-table-column prop="warehouseCode" label="库位号" show-overflow-tooltip></el-table-column>
                <!-- <el-table-column prop="price" label="存放周期(h)" show-overflow-tooltip></el-table-column> -->
            </el-table>
    </div>
  </div>
</template>
<script>
export default {
  props:['id'],
  data(vm) {
      return{
        entity:{
          num:1,
        },
        products:[],
        histories:[]
      }
  },
  mounted(){
    this.getInfo()
  },
  methods:{
    hanldeBack(){
      this.$emit('hanldeBack')
    },
    getInfo(){
      this.$axios.post(this.$api.warehouse.getSampleRecord, {
        id: this.id
      }).then(res => {
        let {histories,insSample,sampleHistory,products} = res.data;
        this.entity = {num:1,...insSample,...sampleHistory};
        this.histories = histories;
        this.products = products;
      })
    },
    handleData(e){
      let info = ''
      if(e){
        info = JSON.parse(e).map(item => {
        return item.v;
      }).join(',')
      }
      return info
    }
  }
}
</script>
<style scoped>
    .detail::-webkit-scrollbar{
        width: 0;
    }
    .title {
        height: 60px;
        line-height: 60px;
    }
    .search {
        background-color: #fff;
        height: 120px;
        display: flex;
        align-items: center;
    flex-wrap: wrap;
    }
    .search_thing {
        display: flex;
        align-items: center;
        height: 40px;
    }
    .search_label {
        width: 120px;
        font-size: 14px;
        text-align: right;
    }
    .search_input {
        width: calc(100% - 120px);
    }
    .table {
        margin-top: 10px;
        background-color: #fff;
        width: calc(100% - 40px);
        padding: 20px;
    }
  h4{
    font-size: 16px;
    font-weight: normal;
    margin-top: 10px;
    margin-left: 20px;
  }
</style>
src/views/business/sample/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,704 @@
<template>
  <div class="capacity-scope">
    <div v-if="!isDetail">
      <div style="display: flex;justify-content: space-between">
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="仓库名称" prop="warehouseId">
            <el-select v-model="entity.warehouseId" placeholder="选择仓库" size="small" @change="warehouseChange">
              <el-option v-for="item in warehouse" :key="item.id" :label="item.name" :value="item.id">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="货架" prop="shelfId">
            <el-select v-model="entity.shelfId" placeholder="选择货架" size="small" @change="handleShelf">
              <el-option v-for="item in shelf" :key="item.id" :label="item.name" :value="item.id">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="样品编号" prop="searchSampleCode">
            <el-input placeholder="请输入样品编号" v-model="searchSampleCode" size="small">
              <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button>
            </el-input>
          </el-form-item>
          <el-form-item>
            <el-button size="small" style="color:#3A7BFA" @click="keepVisible=true">维护</el-button>
            <el-button size="small" style="color:#3A7BFA" @click="warehouseVisible=true,isEdit=false">添加仓库</el-button>
            <el-button size="small" style="color:#3A7BFA" @click="shelvesVisible=true,isEdit=false"
                       :disabled="entity.warehouseId==null">添加货架</el-button>
          </el-form-item>
        </el-form>
        <div>
          <el-button size="small" type="primary" @click="storageVisible=true">入库</el-button>
          <el-button size="small" type="primary" @click="exportVisible=true">出库</el-button>
        </div>
      </div>
      <div class="table" v-loading="tableLoading">
        <table border="1" class="tables" cellpadding="10" style="table-layout:fixed;" v-if="tableList.length>0">
          <tbody>
          <tr v-for="(item,index) in tableList" :key="index">
            <td v-for="(m,i) in item" :key="i" class="content">
              <h4 v-if="m.row!=undefined">{{ m.row }} - {{ m.col }}</h4>
              <ul>
                <el-tooltip
                  effect="dark"
                  placement="top"
                  v-for="(n,j) in m.samples"
                  :key="j" :disabled="`${n.sample}${n.model}`.length<10">
                  <div slot="content"><span>{{ n.sample }}</span>
                    <span>&nbsp;({{ n.model }})&nbsp;[{{ n.sampleCode }}]</span></div>
                  <li class="green"
                      @click="handelDetail(n)">
                    <i></i>
                    <span>{{ n.sample }}</span>
                    <span>&nbsp;({{ n.model }})&nbsp;[{{ n.sampleCode }}]</span>
                    <!-- <span class="num">&nbsp;x{{ n.num }}</span> -->
                  </li>
                </el-tooltip>
              </ul>
            </td>
          </tr>
          <tr>
            <td v-for="(item,index) in rowList" :key="index" style="background: ghostwhite;height: 20px;">{{ item }}
            </td>
          </tr>
          </tbody>
        </table>
        <span v-else style="color: rgb(144, 147, 153);display: inline-block;position: absolute;top: 60%;left: 50%;transform: translate(-50%,-50%);">暂无数据</span>
      </div>
    </div>
    <Detail v-else @hanldeBack="isDetail=false" :id="currentId" />
    <el-dialog title="样品入库" :visible.sync="storageVisible" width="350px">
      <el-row>
        <el-col class="search_thing" :span="24">
          <div class="search_label"><span class="required-span">* </span>样品编号:</div>
          <div class="search_input">
            <el-input v-model="sampleCode" size="small"></el-input>
          </div>
        </el-col>
      </el-row>
      <el-tree :data="storageList" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id"
               :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
               @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" v-if="storageVisible"
               empty-text="暂无数据">
        <div class="custom-tree-node" slot-scope="{ node, data }">
          <el-row>
            <el-col :span="24">
              <span><i
                :class="`node_i ${data.warehouseShelfList != undefined ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
                {{ data.name }}</span>
            </el-col>
          </el-row>
        </div>
      </el-tree>
      <span slot="footer" class="dialog-footer">
        <el-button @click="storageVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmStorage" :loading="upLoadStorage">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog title="样品出库" :visible.sync="exportVisible" width="350px">
      <!-- <div class="shaoma">
        <img src="../../../static/img/扫码.svg" alt="" style="margin-right: 5px;">
        <span>扫码出库</span>
      </div> -->
      <el-row>
        <el-col class="search_thing" :span="24">
          <div class="search_label"><span class="required-span">* </span>样品编号:</div>
          <div class="search_input">
            <el-input v-model="sampleCode" size="small"></el-input>
          </div>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmExport" :loading="upLoadExport">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog title="库位维护" :visible.sync="keepVisible" width="350px" :append-to-body="true">
      <el-tree :data="warehouse" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id"
               :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
               @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" v-if="keepVisible"
               empty-text="暂无数据">
        <div class="custom-tree-node" style="width: 100%;" slot-scope="{ node, data }">
          <el-row style="width: 100%;display: flex;align-items: center;">
            <el-col :span="20">
              <span><i
                :class="`node_i ${node.level<2 ? 'el-icon-folder-opened': 'el-icon-tickets'}`"></i>
                {{ data.name }}</span>
            </el-col>
            <el-col :span="4" v-if="node.level<3">
              <el-button type="text" size="mini" icon="el-icon-edit" @click.stop="handleEdit(data,node.level)">
              </el-button>
              <el-button type="text" size="mini" icon="el-icon-delete" @click.stop="handleDelete(data,node.level)">
              </el-button>
            </el-col>
          </el-row>
        </div>
      </el-tree>
      <span slot="footer" class="dialog-footer">
        <el-button @click="keepVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="keepVisible = false" >ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :title="isEdit?'仓库修改':'仓库新增'" :visible.sync="warehouseVisible" width="350px">
      <el-row>
        <el-col class="search_thing" :span="24">
          <div class="search_label"><span class="required-span">* </span>仓库名称:</div>
          <div class="search_input">
            <el-input v-model="name" size="small" @keyup.enter.native="confirmWarehouse"></el-input>
          </div>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="warehouseVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmWarehouse" :loading="upLoadWarehouse">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :title="isEdit?'货架修改':'货架新增'" :visible.sync="shelvesVisible" width="350px">
      <el-row>
        <el-col class="search_thing" :span="24">
          <div class="search_label"><span class="required-span">* </span>货架名称:</div>
          <div class="search_input">
            <el-input v-model="shelves.name" size="small"></el-input>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col class="search_thing" :span="24">
          <div class="search_label"><span class="required-span">* </span>货架层数:</div>
          <div class="search_input">
            <el-input v-model="shelves.row" size="small"></el-input>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col class="search_thing" :span="24">
          <div class="search_label"><span class="required-span">* </span>货架列数:</div>
          <div class="search_input">
            <el-input v-model="shelves.col" size="small"></el-input>
          </div>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="shelvesVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmShelves" :loading="upLoadShelves">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import Detail from './components/detail.vue'
import {
  addShelf,
  addWarehouse, delShelf, delWarehouse, getWarehouse,
  inWarehouse,
  outWarehouse, searchSampleId,
  selectWarehouse,
  upShelf,
  upWarehouse
} from "@/api/business/sample";
export default {
  components: {
    Detail
  },
  data() {
    return {
      entity: {
        warehouseId: null,
        shelfId: null
      },
      warehouse: [],
      shelf: [],
      storageList:[],
      storageVisible: false,
      exportVisible: false,
      keepVisible: false,
      warehouseVisible: false,
      shelvesVisible: false,
      upLoadStorage: false,
      upLoadExport: false,
      upLoadWarehouse: false,
      upLoadShelves: false,
      tableList: [],
      rowList: [],
      value: '',
      name:'',
      shelves:{},
      selectTree: [],
      expandedKeys: [],
      isEdit: false, //弹框--是否是修改,默认为false
      isDetail: false, //详情--是否展示为详情页面,默认为false
      currentEdit:null,//当前要维护的信息
      tableLoading:false,
      sampleCode:'',
      currentId:null,
      searchSampleCode:''
    }
  },
  mounted() {
    this.selectList()
  },
  methods: {
    selectList() {
      selectWarehouse().then(res => {
        this.warehouse = res.data
        if(res.data.length==0){
          this.entity.warehouseId = '';
          this.entity.shelfId = '';
          this.tableList = []
        }
        this.storageList = this.HaveJson(res.data).map(item=>{
          item.warehouseShelfList&&item.warehouseShelfList.length>0&&item.warehouseShelfList.map(m=>{
            let warehouseShelfList = [];
            for (let i=1;i<m.row+1;i++){
              let warehouseShelfList0 = []
              for (let j=1;j<m.col+1;j++){
                warehouseShelfList0.push({
                  name:j+' åˆ—',
                  id:j,
                })
              }
              warehouseShelfList.push({
                name:i+' å±‚',
                id:i,
                warehouseShelfList:warehouseShelfList0
              })
            }
            m.warehouseShelfList = warehouseShelfList;
            return m;
          })
          return item;
        })
        if(!this.entity.warehouseId&&this.warehouse.length>0){
          this.entity.warehouseId = this.warehouse[0].id
          this.warehouseChange(this.entity.warehouseId)
          if(this.shelf.length>0){
            this.entity.shelfId = this.shelf[0].id
            this.handleShelf(this.entity.shelfId)
          }else{
            this.tableList = []
          }
        }else if(this.warehouse.length>0){
          this.warehouseChange(this.entity.warehouseId)
          if(this.shelf.length>0){
            this.entity.shelfId = this.shelf[0].id
            this.handleShelf(this.entity.shelfId)
          }else{
            this.tableList = []
          }
        }
      })
    },
    // å…¥åº“
    confirmStorage() {
      if (!this.sampleCode) {
        this.$message.error('请填写样品编号')
        return
      }
      if (this.selectTree.length < 4) {
        this.$message.error('请选择样品入库位置')
        return
      }
      this.upLoadStorage = true;
      inWarehouse({
        trees: this.selectTree.join('-'),
        sampleCode:this.sampleCode
      }).then(res => {
        this.upLoadStorage = false;
        this.storageVisible = false
        this.sampleCode = '';
        this.selectTree = []
        this.$message.success('入库成功')
        this.handleShelf(this.entity.shelfId)
      }).catch(err => {
        this.upLoadStorage = false;
      })
    },
    // å‡ºåº“
    confirmExport() {
      if (!this.sampleCode) {
        this.$message.error('请填写样品编号')
        return
      }
      this.upLoadExport = true;
      outWarehouse({
        sampleCode:this.sampleCode
      }).then(res => {
        this.upLoadExport = false;
        this.exportVisible = false
        this.sampleCode = '';
        this.$message.success('出库成功')
        this.handleShelf(this.entity.shelfId)
      }).catch(err => {
        this.upLoadExport = false;
      })
    },
    // æ·»åŠ /修改仓库
    confirmWarehouse() {
      if (!this.name) {
        this.$message.error('请填写仓库名称')
        return
      }
      this.upLoadWarehouse = true;
      if(this.currentEdit&&this.currentEdit.id){
        // ä¿®æ”¹ä»“库
        upWarehouse({
          name: this.name,
          id:this.currentEdit.id
        }).then(res => {
          this.upLoadWarehouse = false;
          this.warehouseVisible = false
          // this.keepVisible = false
          this.currentEdit = null;
          this.$message.success('修改成功')
          this.selectList()
          this.name = ''
          this.warehouseChange(this.entity.warehouseId)
        }).catch(err => {
          this.upLoadWarehouse = false;
        })
      }else{
        // æ–°å¢žä»“库
        addWarehouse({
          name: this.name
        }).then(res => {
          this.upLoadWarehouse = false;
          this.warehouseVisible = false
          this.$message.success('添加成功')
          this.selectList()
          this.name = ''
          this.warehouseChange(this.entity.warehouseId)
        }).catch(err => {
          this.upLoadWarehouse = false;
        })
      }
    },
    // æ·»åŠ /修改货架
    confirmShelves() {
      if (!this.shelves.name) {
        this.$message.error('请填写货架名称')
        return
      }
      if (!this.shelves.row) {
        this.$message.error('请填写货架层数')
        return
      }
      if (!this.shelves.col) {
        this.$message.error('请填写货架列数')
        return
      }
      this.upLoadShelves = true;
      if(this.currentEdit&&this.currentEdit.id){
        // ä¿®æ”¹
        upShelf({
          id:this.currentEdit.id,...this.shelves
        }).then(res => {
          this.upLoadShelves = false;
          this.shelvesVisible = false
          this.$message.success('修改成功')
          this.selectList()
          this.currentEdit ={};
        }).catch(err => {
          this.upLoadShelves = false;
        })
      }else{
        // æ–°å¢ž
        addShelf({
          warehouseId: this.entity.warehouseId,...this.shelves
        }).then(res => {
          this.upLoadShelves = false;
          this.shelvesVisible = false
          this.$message.success('添加成功')
          this.selectList()
          this.shelves = {}
        }).catch(err => {
          this.upLoadShelves = false;
        })
      }
      this.warehouseChange(this.entity.warehouseId)
    },
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    handleNodeClick(val, node, el) { //树的值
      this.selectTree[node.level-1] = val.id;
    },
    nodeOpen(data, node, el) {
      $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened')
      this.selectTree[node.level-1] = data.id;
    },
    nodeClose(data, node, el) {
      $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder')
    },
    handleDelete(row, level) {
      this.$confirm('是否当前数据?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        if (level == 1) {
          // åˆ é™¤ä»“库
          delWarehouse({
            id: row.id
          }).then(res => {
            this.$message.success('成功')
            this.selectList()
          }).catch(e => {
            this.$message.error('失败')
          })
        }else{
          // åˆ é™¤è´§æž¶
          delShelf({
            id: row.id
          }).then(res => {
            this.$message.success('成功')
            this.selectList()
          }).catch(e => {
            this.$message.error('失败')
          })
        }
        this.warehouseChange(this.entity.warehouseId)
      }).catch(() => {})
    },
    handleEdit(data, level) {
      this.isEdit = true;
      // åˆ¤æ–­æ˜¯ç¬¬å‡ å±‚级,第一层级,修改仓库,第二层级修改货架
      if (level == 1) {
        this.warehouseVisible = true;
        this.currentEdit = data;
        this.name = data.name
      } else {
        this.shelvesVisible = true;
        this.currentEdit = data;
        this.shelves = {
          name:data.name,
          row:data.row,
          col:data.col,
          warehouseId:data.warehouseId
        }
      }
    },
    // æŸ¥çœ‹è¯¦æƒ…
    handelDetail(row) {
      this.currentId = row.id;
      this.isDetail = true;
    },
    warehouseChange(val) {
      this.tableList = []
      let map = this.warehouse.find(a => {
        return a.id === val ? a : null
      })
      this.shelf = map.warehouseShelfList;
      this.entity.shelfId = '';
    },
    handleShelf(e){
      if(e){
        this.tableLoading = true;
        getWarehouse({shelfId: e}).then(res => {
          this.tableLoading = false;
          let data = res.data;
          let set =new Set()
          this.tableList = [];
          let arr = []
          data.forEach(m=>{
            set.add(m.col)
            if(arr.length>0){
              if(arr.find(n=>n.row==m.row)){
                arr.push(m)
              }else{
                this.tableList.push(arr)
                arr = []
                arr.push(m)
              }
            }else{
              arr.push(m)
            }
          })
          this.tableList.push(arr)
          this.rowList = [];
          for(let i=0;i<set.size;i++){
            this.rowList.push(`${i+1} åˆ—`)
          }
        }).catch(e=>{
          this.tableLoading = false;
        })
      }
    },
    handleSearch(){
      if(!this.searchSampleCode){
        this.$message.error('请输入样品编号')
        return;
      }
      searchSampleId({sampleCode: this.searchSampleCode}).then(res => {
        if(res.code==200){
          this.currentId = res.data;
          this.isDetail = true;
        }
      })
    }
  }
}
</script>
<style scoped>
.title {
  height: 60px;
  line-height: 60px;
}
.search {
  background-color: #fff;
  height: 80px;
  display: flex;
  align-items: center;
  position: relative;
}
.search_thing {
  display: flex;
  align-items: center;
  height: 50px;
}
.search_label {
  width: 90px;
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 120px);
}
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
  overflow-y: auto;
}
.el-form-item {
  margin-bottom: 16px;
}
.btns {
  position: absolute;
  right: 10px;
  top: 25px;
  display: flex;
  align-items: center;
  z-index: 9;
}
.tables {
  width: 100%;
  height: 100%;
  border-bottom: none;
}
.tables th {
  font-size: 14px;
}
.tables td {
  font-size: 12px;
  text-align: center;
  vertical-align: top;
  border-color: rgb(192, 191, 191) !important;
  padding: 5px;
  box-sizing: border-box;
  height: 120px;
}
.tables ul {
  list-style-type: none;
}
.tables ul li {
  border-radius: 3px;
  padding: 4px 10px;
  box-sizing: border-box;
  margin-bottom: 5px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: start;
  color: #333333;
  cursor: pointer;
  overflow: hidden; /*超出部分隐藏*/
  white-space: nowrap; /*禁止换行*/
  text-overflow: ellipsis; /*省略号*/
}
.tables h4 {
  color: #999999;
  font-size: 14px;
  font-weight: 400;
  padding: 6px 0;
}
.tables i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
}
li:hover {
  background: rgba(58, 123, 250, 0.18);
}
li:hover i {
  background: #3A7BFA;
}
li:hover .num {
  color: #3A7BFA;
}
.green {
  background: #E0F6EA;
}
.green i {
  background: #34BD66;
}
.green .num {
  color: #34BD66;
}
.el-dialog {
  position: relative;
}
.shaoma {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #3A7BFA;
  position: absolute;
  top: 23px;
  right: 54px;
  cursor: pointer;
}
.node_i {
  color: orange;
  font-size: 18px;
}
.custom-tree-node .el-button {
  opacity: 0;
}
.custom-tree-node:hover .el-button {
  opacity: 1;
}
>>>.el-loading-mask {
  z-index: 10;
}
</style>
src/views/business/unpass/components/OAProcess.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,250 @@
<template>
  <div>
    <el-dialog :close-on-press-escape="false" :visible.sync="isShow" title="不合格处理"
               width="1040px"
               @close="$emit('closeOAProcess')">
      <table :border='true' class="table">
        <tr>
          <th class="th-title">1检验员</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{oneOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{oneInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{oneName}}<span v-if="oneName">:</span>{{oneTime}}</th>
        </tr>
        <tr>
          <th class="th-title">2检测主管确认</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{twoOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{twoInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{twoName}}<span v-if="twoName">:</span>{{twoTime}}</th>
        </tr>
        <tr>
          <th class="th-title">3物流部确认</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{threeOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{threeInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{threeName}}<span v-if="threeName">:</span>{{threeTime}}</th>
        </tr>
        <tr>
          <th class="th-title">4产品工程师处理意见</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{fourOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{fourInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{fourName}}<span v-if="fourName">:</span>{{fourTime}}</th>
        </tr>
        <tr>
          <th class="th-title">5.总工或者副经理的处理意见</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{fiveOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{fiveInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{fiveName}}<span v-if="fiveName">:</span>{{fiveTime}}</th>
        </tr>
        <tr>
          <th class="th-title">6质量部</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{sixOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{sixInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{sixName}}<span v-if="sixName">:</span>{{sixTime}}</th>
        </tr>
        <tr>
          <th class="th-title">7质量部经理</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{sevenOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{sevenInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{sevenName}}<span v-if="sevenName">:</span>{{sevenTime}}</th>
        </tr>
        <tr>
          <th class="th-title">8核算员</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{eightOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{eightInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{eightName}}<span v-if="eightName">:</span>{{eightTime}}</th>
        </tr>
        <tr>
          <th class="th-title">9物流部索赔结果</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{nineOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{nineInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{nineName}}<span v-if="nineName">:</span>{{nineTime}}</th>
        </tr>
      </table>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: "OAProcess",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  props: {
    OAProcess: {
      type: Boolean,
      default: () => false
    },
  },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      isShow: this.OAProcess,
      oneInfo: '',
      twoInfo: '',
      threeInfo: '',
      fourInfo: '',
      fiveInfo: '',
      sixInfo: '',
      sevenInfo: '',
      eightInfo: '',
      nineInfo: '',
      oneTime: '',
      twoTime: '',
      threeTime: '',
      fourTime: '',
      fiveTime: '',
      sixTime: '',
      sevenTime: '',
      eightTime: '',
      nineTime: '',
      oneName: '',
      twoName: '',
      threeName: '',
      fourName: '',
      fiveName: '',
      sixName: '',
      sevenName: '',
      eightName: '',
      nineName: '',
      oneOperation: '',
      twoOperation: '',
      threeOperation: '',
      fourOperation: '',
      fiveOperation: '',
      sixOperation: '',
      sevenOperation: '',
      eightOperation: '',
      nineOperation: '',
    }
  },
  // æ–¹æ³•集合
  methods: {
    getInfo (id) {
      this.$axios.post(this.$api.unqualifiedHandler.getOaFlow, {
        id: id
      }).then(res => {
        if (res.code === 200) {
          const data = res.data
          if (data.length > 0) {
            data.forEach(item => {
              if (item.nodeName === '1检验员') {
                this.oneInfo = item.approvalOpinion
                this.oneTime = item.approvalDate
                this.oneName = item.approver
                this.oneOperation = item.operation
              } else if (item.nodeName === '2检测主管确认') {
                this.twoInfo = item.approvalOpinion
                this.twoTime = item.approvalDate
                this.twoName = item.approver
                this.twoOperation = item.operation
              } else if (item.nodeName === '3物流部确认') {
                this.threeInfo = item.approvalOpinion
                this.threeTime = item.approvalDate
                this.threeName = item.approver
                this.threeOperation = item.operation
              } else if (item.nodeName === '4产品工程师处理意见') {
                this.fourInfo = item.approvalOpinion
                this.fourTime = item.approvalDate
                this.fourName = item.approver
                this.fourOperation = item.operation
              } else if (item.nodeName === '5.总工或者副经理的处理意见') {
                this.fiveInfo = item.approvalOpinion
                this.fiveTime = item.approvalDate
                this.fiveName = item.approver
                this.fiveOperation = item.operation
              } else if (item.nodeName === '6质量部') {
                this.sixInfo = item.approvalOpinion
                this.sixTime = item.approvalDate
                this.sixName = item.approver
                this.sixOperation = item.operation
              } else if (item.nodeName === '7质量部经理') {
                this.sevenInfo = item.approvalOpinion
                this.sevenTime = item.approvalDate
                this.sevenName = item.approver
                this.sevenOperation = item.operation
              } else if (item.nodeName === '8核算员') {
                this.eightInfo = item.approvalOpinion
                this.eightTime = item.approvalDate
                this.eightName = item.approver
                this.eightOperation = item.operation
              } else if (item.nodeName === '9物流部索赔结果') {
                this.nineInfo = item.approvalOpinion
                this.nineTime = item.approvalDate
                this.nineName = item.approver
                this.nineOperation = item.operation
              }
            })
          }
        }
      }).catch(err => {
        this.submitDeclareLoading = false
        console.log(err)
      })
    }
  },
}
</script>
<style scoped>
.table {
  width: 100%;
  height: 500px;
}
.th-title {
  width: 160px;
  text-align: left;
  background-color: #e0eaf5;
  font-size: 16px;
}
.th-titleSec {
  width: 70px;
  background-color: #e0eaf5;
  font-size: 16px;
}
.th-info {
  width: 210px;
  text-align: left;
  font-size: 16px;
}
.th-info1 {
  width: 100px;
  text-align: center;
  font-size: 16px;
}
</style>
src/views/business/unpass/components/PurchaseVerification.vue
@@ -1,10 +1,10 @@
<template>
  <div>
    <el-dialog title="进货验证原始记录" :visible.sync="isShow" width="1000px" :show-close="false" :close-on-click-modal="false"
      style="max-height: 96vh; margin-top: 2vh" :modal-append-to-body="false" :close-on-press-escape="false">
    <el-dialog title="进货验证原始记录" :visible.sync="isShow" width="70%" :show-close="false" :close-on-click-modal="false"
               :modal-append-to-body="false" :close-on-press-escape="false">
      <div class="search">
        <el-form :inline="true" :model="purchaseForm" label-position="right" :rules="purchaseFormRules"
          ref="purchaseForm" class="form-inline" label-width="130px">
          ref="purchaseForm" class="form-inline" label-width="120px">
          <el-row>
            <el-col :span="8">
              <el-form-item label="检验编号:">
@@ -55,50 +55,49 @@
          </h4>
          <div class="title">一、供方产品检测报告的基本信息确认</div>
          <el-form-item label="材料名称:" prop="basicName">
            <el-radio-group v-model="purchaseForm.basicName" :disabled="operationType === 'view'" v-removeAriaHidden>
            <el-radio-group v-model="purchaseForm.basicName" :disabled="operationType === 'view'">
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="规格型号:" prop="basicModel">
            <el-radio-group v-model="purchaseForm.basicModel" :disabled="operationType === 'view'" v-removeAriaHidden>
            <el-radio-group v-model="purchaseForm.basicModel" :disabled="operationType === 'view'">
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="材料批号:" prop="basicBatchNo">
            <el-radio-group v-model="purchaseForm.basicBatchNo" :disabled="operationType === 'view'" v-removeAriaHidden>
            <el-radio-group v-model="purchaseForm.basicBatchNo" :disabled="operationType === 'view'">
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="执行标准:" prop="basicStandard">
            <el-radio-group v-model="purchaseForm.basicStandard" :disabled="operationType === 'view'"
              v-removeAriaHidden>
            <el-radio-group v-model="purchaseForm.basicStandard" :disabled="operationType === 'view'">
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="生产日期:" prop="basicDate">
            <el-radio-group v-model="purchaseForm.basicDate" :disabled="operationType === 'view'" v-removeAriaHidden>
            <el-radio-group v-model="purchaseForm.basicDate" :disabled="operationType === 'view'">
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="供货数量:" prop="basicNumber">
            <el-radio-group v-model="purchaseForm.basicNumber" :disabled="operationType === 'view'" v-removeAriaHidden>
            <el-radio-group v-model="purchaseForm.basicNumber" :disabled="operationType === 'view'">
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="材料颜色:" prop="basicColor">
            <el-radio-group v-model="purchaseForm.basicColor" :disabled="operationType === 'view'" v-removeAriaHidden>
            <el-radio-group v-model="purchaseForm.basicColor" :disabled="operationType === 'view'">
              <el-radio label="1">符合</el-radio>
              <el-radio label="2">不符合</el-radio>
              <el-radio label="3">不适用</el-radio>
@@ -130,7 +129,7 @@
                <el-table-column prop="inspectionItem" label="验证项目" width="300"></el-table-column>
                <el-table-column prop="result" label="验证结果">
                  <template slot-scope="scope">
                    <el-radio-group v-model="scope.row.result" v-removeAriaHidden :disabled="operationType === 'view'">
                    <el-radio-group v-model="scope.row.result" :disabled="operationType === 'view'">
                      <el-radio label="1">符合</el-radio>
                      <el-radio label="2">不符合</el-radio>
                      <el-radio label="3">不适用</el-radio>
@@ -149,9 +148,7 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('resetPurchaseDialog')">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="handlePurchase" :loading="handlePurchaseLoading"
          v-if="operationType === 'add'">ç¡®
          å®š</el-button>
        <el-button type="primary" @click="handlePurchase" :loading="handlePurchaseLoading" v-if="operationType === 'add'">确定</el-button>
      </span>
    </el-dialog>
    <el-dialog title="待验证项目" :visible.sync="factoryVerifyItemDia" width="1000px"
@@ -247,6 +244,7 @@
  // æ–¹æ³•集合
  methods: {
    async getInsOrder(operationType, item) {
      console.log('operationType----', operationType)
      this.operationType = operationType
      this.info = item
      // æŸ¥è¯¢å·²æäº¤çš„æ•°æ®
@@ -346,7 +344,6 @@
.headLine>>>.el-form-item__content {
  width: 68%;
}
>>>.el-form-item__content {
  display: inline-block;
}
@@ -370,7 +367,7 @@
}
>>>.el-dialog__body {
  max-height: 700px;
  max-height: 600px;
  overflow-y: auto;
}
</style>
src/views/business/unpass/components/addUnPass.vue
@@ -31,7 +31,7 @@
</template>
<script>
import { getInsProductUnqualified } from '@/api/business/unpass.js'
import {addUnqualifiedRetest, getInsProductUnqualified} from '@/api/business/unpass.js'
export default {
  name: "addUnPass",
  // import å¼•入的组件需要注入到对象中才能使用
src/views/business/unpass/index-manage.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,324 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="规格型号" prop="model">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.model"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item label="样品名称" prop="sample">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.sample"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 è¯¢</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 ç½®</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <div>
      <lims-table :tableData="tableData" :column="column"
                  :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <el-dialog
      title="提交"
      :show-close="false"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      :visible.sync="dialogVisible"
      width="30%">
      <span>是否确认提交OA?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="submitOA" :loading="submitOALoading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="删除"
      :show-close="false"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      :visible.sync="deleteVisible"
      width="30%">
      <span>是否确认<span style="color: #FF4902">删除</span>OA?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="deleteVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="cancelOA" :loading="cancelOALoading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <UnPassDialog ref="unPassDialog" v-if="unPassDialog"
                  :orderId="orderId"
                  @resetForm="resetForm1"
                  :unPassDialog="unPassDialog"></UnPassDialog>
    <OAProcess ref="OAProcess"
               :OAProcess="OAProcess"
               @closeOAProcess="closeOAProcess"
               v-if="OAProcess"></OAProcess>
  </div>
</template>
<script>
import UnPassDialog from "./components/unPassDialog.vue";
import OAProcess from "./components/OAProcess.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {deleteUnqualifiedHandler, page, pushOA} from "@/api/business/unqualifiedHandler";
import ValueTable from "@/components/Table/value-table.vue";
export default {
  components: {
    limsTable,
    OAProcess,
    UnPassDialog,
    ValueTable
  },
  data() {
    return {
      handlerId: null,
      entity: {
        sample: null,
        model: null,
      },
      tableData: [],
      tableLoading: false,
      column: [
        { label: '编号', prop: 'no' },
        {
          label: "OA审核状态",
          prop: "oaState",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 1) {
              return "待审核";
            } else if(params == 2) {
              return "审核中";
            }  else if(params == 3) {
              return "通过";
            } else {
              return "驳回";
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return "warning";
            } else if(params == 2) {
              return "info";
            }  else if(params == 3) {
              return "success";
            } else {
              return "danger";
            }
          },
        },
        { label: '订单号', prop: 'orderNo' },
        {
          label: "零件号",
          prop: "partNo",
          width: "160px",
          dataType: "link",
          linkMethod: "openUnPassDialog",
        },
        { label: '零件描述', prop: 'partDesc' },
        { label: '物料名称', prop: 'materialName' },
        { label: '生产批次', prop: 'productionBatch' },
        { label: '到货数量', prop: 'cargoQuantity' },
        { label: '规格型号', prop: 'specsModels' },
        { label: '报检日期', prop: 'inspectTime' },
        { label: '状态', prop: 'statusDB' },
        { label: '反馈人', prop: 'feedbackUser' },
        { label: '要检验的采购数量', prop: 'qtyToInspect' },
        { label: '反馈日期', prop: 'feedbackTime' },
        {
          label: "分类",
          prop: "classification",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "一类不合格";
            } else if(params == 1) {
              return "二类不合格";
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "warning";
            } else if(params == 1) {
              return "info";
            } else {
              return "null";
            }
          },
        },
        { label: '供应商名称', prop: 'supplierName' },
        {
          label: "不合格归属",
          prop: "offGradeAscription",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "生产反馈不合格";
            } else if(params == 1) {
              return "检测不合格";
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "warning";
            } else if(params == 1) {
              return "info";
            } else {
              return "null";
            }
          },
        },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '180px',
          operation: [
            {
              name: '提交OA',
              type: 'text',
              clickFun: (row) => {
                this.openOA(row);
              },
              disabled: (row, index) => {
                return row.requestId !== null  // æœ‰requestId说明已经提交过OA,不可再次提交
              }
            },
            {
              name: '查看OA流程',
              type: 'text',
              clickFun: (row) => {
                this.OAView(row);
              },
            },
            {
              name: '删除',
              type: 'text',
              clickFun: (row) => {
                this.deleteOA(row);
              },
              disabled: (row, index) => {
                return row.requestId !== null  // æœ‰requestId说明已经提交过OA,不可再次提交
              }
            },
          ]
        }
      ],
      page: {
        total: 0,
        size: 10,
        current: 1
      },
      statusList: [],
      dialogVisible: false, // ç¡®è®¤æäº¤OA弹框
      unPassDialog: false, // ä¸åˆæ ¼å¤„理弹框
      orderId: '',
      OAProcess: false, // OA流程弹框
      submitOALoading: false, // OA流程弹框提交按钮loading
      deleteVisible: false, // OA流程删除弹框
      cancelOALoading: false, // OA流程删除弹框提交按钮loading
    };
  },
  mounted() {
    this.refreshTable()
  },
  methods: {
    refreshTable() {
      this.tableLoading = true
      page({ ...this.page, ...this.entity }).then(res => {
        this.tableLoading = false
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        this.tableLoading = false
      })
    },
    // é‡ç½®
    refresh() {
      this.resetForm('entity')
      this.refreshTable()
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.refreshTable()
    },
    // æ‰“开不合格处理弹框
    openUnPassDialog (row) {
      this.unPassDialog = true
      this.$nextTick(() => {
        this.$refs.unPassDialog.getInsOrder('view', row)
      })
    },
    // å…³é—­ä¸åˆæ ¼å¤„理弹框
    resetForm1 () {
      this.$refs.unPassDialog.$refs['unPassForm'].resetFields();
      this.unPassDialog = false
    },
    // æ‰“开删除OA确认弹框
    deleteOA (row) {
      this.handlerId = row.handlerId
      this.deleteVisible = true
    },
    // æäº¤åˆ é™¤ç”³è¯·
    cancelOA () {
      this.de = true
      deleteUnqualifiedHandler({id: this.handlerId,}).then(res => {
        this.cancelOALoading = false
        if (res.code === 200) {
          this.deleteVisible = false
          this.$message.success('删除成功')
          this.refreshTable('page')
        }
      }).catch(error => {
        this.cancelOALoading = false
        console.error(error);
      });
    },
    // æŸ¥çœ‹æäº¤OA的数据
    openOA (row) {
      this.handlerId = row.handlerId
      this.dialogVisible = true
    },
    // æŸ¥çœ‹OA流程
    OAView (row) {
      this.OAProcess = true
      this.$nextTick(() => {
        this.$refs.OAProcess.getInfo(row.handlerId)
      })
    },
    // å…³é—­æŸ¥çœ‹OA流程的弹框
    closeOAProcess () {
      this.OAProcess = false
    },
    //提交OA
    submitOA(row) {
      // æäº¤OA
      this.submitOALoading = true
      pushOA({handlerId: this.handlerId,}).then(res => {
        this.submitOALoading = false
        if (res.code === 200) {
          this.dialogVisible = false
          this.$message.success('提交成功')
          this.refreshTable('page')
        }
      }).catch(error => {
        this.submitOALoading = false
        console.error(error);
      });
    }
  }
};
</script>
src/views/business/unpass/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,135 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="规格型号" prop="model">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.model"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item label="样品名称" prop="sample">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.sample"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 è¯¢</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 ç½®</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <div>
      <lims-table :tableData="tableData" :column="column"
                  :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import {pageInsUnPass} from "@/api/business/unpass";
export default {
  components: {limsTable},
  data() {
    return {
      entity: {
        sample: null,
        model: null,
      },
      tableData: [],
      tableLoading: false,
      column: [
        { label: '编号', prop: 'no' },
        {
          label: "OA审核状态",
          prop: "oaState",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "否";
            } else {
              return "是";
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "danger";
            } else {
              return "primary";
            }
          },
        },
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '180px',
          operation: [
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openAdd('edit', row);
              },
            },
            {
              name: '删除',
              type: 'text',
              clickFun: (row) => {
                this.delete(row);
              },
            },
            {
              name: '印章管理',
              type: 'text',
              clickFun: (row) => {
                this.fileManagement(row);
              },
            },
          ]
        }
      ],
      page: {
        total: 0,
        size: 10,
        current: 1
      },
    }
  },
  mounted() {
    this.refreshTable()
  },
  methods :{
    refreshTable() {
      this.tableLoading = true
      pageInsUnPass({ ...this.page, ...this.entity }).then(res => {
        this.tableLoading = false
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        this.tableLoading = false
      })
    },
    // é‡ç½®
    refresh() {
      this.resetForm('entity')
      this.refreshTable()
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.refreshTable()
    },
  }
}
</script>
<style scoped>
.search {
  height: 46px;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/login.vue
@@ -8,49 +8,29 @@
      <div class="title_small">LIMS实验室管理系统</div>
      <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
        <el-form-item prop="username">
          <el-input
            v-model="loginForm.username"
            type="text"
            auto-complete="off"
            placeholder="账号"
          >
          <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
            <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
          </el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input
            v-model="loginForm.password"
            type="password"
            auto-complete="off"
            placeholder="密码"
            @keyup.enter.native="handleLogin"
          >
          <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
            @keyup.enter.native="handleLogin" show-password>
            <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
          </el-input>
        </el-form-item>
        <el-form-item prop="code" v-if="captchaEnabled">
          <el-input
            v-model="loginForm.code"
            auto-complete="off"
            placeholder="验证码"
            style="width: 63%"
            @keyup.enter.native="handleLogin"
          >
          <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
            @keyup.enter.native="handleLogin">
            <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
          </el-input>
          <div class="login-code">
            <img :src="codeUrl" @click="getCode" class="login-code-img"/>
            <img :src="codeUrl" @click="getCode" class="login-code-img" />
          </div>
        </el-form-item>
        <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
        <el-form-item style="width:100%;">
          <el-button
            :loading="loading"
            size="medium"
            type="primary"
            style="width:100%;"
            @click.native.prevent="handleLogin"
          >
          <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
            @click.native.prevent="handleLogin">
            <span v-if="!loading">登 å½•</span>
            <span v-else>登 å½• ä¸­...</span>
          </el-button>
@@ -61,9 +41,9 @@
      </el-form>
    </div>
    <!--  åº•部  -->
<!--    <div class="el-login-footer">-->
<!--      <span>Copyright Â© 2018-2025 ruoyi.vip All Rights Reserved.</span>-->
<!--    </div>-->
    <!--    <div class="el-login-footer">-->
    <!--      <span>Copyright Â© 2018-2025 ruoyi.vip All Rights Reserved.</span>-->
    <!--    </div>-->
  </div>
</template>
@@ -103,7 +83,7 @@
  },
  watch: {
    $route: {
      handler: function(route) {
      handler: function (route) {
        this.redirect = route.query && route.query.redirect;
      },
      immediate: true
@@ -147,7 +127,7 @@
            Cookies.remove('rememberMe');
          }
          this.$store.dispatch("Login", this.loginForm).then(() => {
            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
            this.$router.push({ path: this.redirect || "/" }).catch(() => { });
          }).catch(() => {
            this.loading = false;
            if (this.captchaEnabled) {
@@ -176,10 +156,12 @@
  display: flex;
  background-image: url("~@/assets/images/login.png");
  background-size: 100% 100%;
  .leftImg {
    width: calc(100% - 500px);
    height: 100%;
    overflow: hidden;
    img {
      width: 100%;
      min-height: 100%;
@@ -193,6 +175,7 @@
    align-items: center;
    flex-direction: column;
    justify-content: center;
    .title_big {
      color: #004EA2;
      font-size: 40px;
@@ -203,30 +186,37 @@
      color: #004EA2;
      font-size: 24px;
    }
    .login-form {
      border-radius: 6px;
      background: #ffffff;
      width: 400px;
      padding: 25px 25px 5px 25px;
      .el-input {
        height: 38px;
        input {
          height: 38px;
        }
      }
      .input-icon {
        height: 39px;
        width: 14px;
        margin-left: 2px;
      }
      .login-code {
        width: 33%;
        height: 38px;
        float: right;
        img {
          cursor: pointer;
          vertical-align: middle;
        }
        .login-code-img {
          height: 38px;
        }
@@ -234,6 +224,7 @@
    }
  }
}
.el-login-footer {
  height: 40px;
  line-height: 40px;
src/views/standard/standardLibrary/index.vue
@@ -488,14 +488,10 @@
  obtainItemParameterList,
  selectTestObjectByName,
  selectStandardMethods,
  addStandardMethodList,
  addStandardTree,
  updateStandardTree,
  selectsStandardMethodByFLSSM,
  upStandardProductList,
  delStandardMethodByFLSSM,
  delStandardProductByIds,
  addStandardProduct,
  selectStandardProductListByMethodId,
  updateSection,
  upStandardProducts,
@@ -592,6 +588,7 @@
    this.selectTestObjectByName();
    this.selectStandardMethods();
    this.selectEnumByCategoryForSonLaboratory();
    this.selectEnumByCategoryForsampleType();
    this.getStandardTemplate();
    this.selectStandardMethodsSec();
    this.token = {
@@ -845,22 +842,6 @@
        this.standardEnum = data;
      });
    },
    addStandardMethodList() {
      if (this.standardId == null || this.standardId == "") {
        this.$message.error("标准方法未选择");
        return;
      }
      this.addLoad2 = true;
      addStandardMethodList({
        standardId: this.standardId,
        tree: this.selectTree,
      }).then((res) => {
        this.addLoad2 = false;
        this.addStandardDia = false;
        this.$message.success("添加成功");
        this.selectsStandardMethodByFLSSM();
      });
    },
    // æäº¤åˆ†ç±»æ·»åŠ 
    addStandardTree() {
      if (this.addOb.sampleType == null || this.addOb.sampleType == "") {
@@ -1040,81 +1021,13 @@
        this.$message.success("已保存");
      });
    },
    delStandardMethodByFLSSM(id) {
      this.$confirm("是否删除当前数据?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.tableLoad = true;
          delStandardMethodByFLSSM({ id: id }).then((res) => {
            if (res.code == 201) {
              return;
            }
            this.$message.success("已删除");
            this.selectsStandardMethodByFLSSM();
          });
        })
        .catch(() => { });
    },
    handleSelectionChange(val) {
      this.selects = [];
      val.forEach((a) => {
        this.selects.push(a.id);
      });
    },
    delStandardProductByIds() {
      if (this.selects.length == 0) {
        this.$message.error("未选中数据");
        return;
      }
      this.$confirm(
        "是否删除当前选中 " + this.selects.length + " æ¡æ•°æ®?",
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(() => {
          this.tableLoad = true;
          delStandardProductByIds({
            ids: JSON.stringify(this.selects),
          }).then((res) => {
            if (res.code == 201) {
              return;
            }
            this.$message.success("已删除");
            this.selectsStandardMethodByFLSSM();
          });
        })
        .catch(() => { });
    },
    addStandardProductDo() {
      let selects = this.$refs.ValueTable.multipleSelection;
      if (selects.length == 0) {
        this.$message.error("未选择数据");
        return;
      }
      let select = [];
      selects.forEach((a) => {
        select.push(a.id);
      });
      this.tableLoad = true;
      addStandardProduct({
        ids: JSON.stringify(select),
        tree: this.selectTree,
      }).then((res) => {
        if (res.code == 201) {
          return;
        }
        this.$message.success("添加成功");
        this.selectsStandardMethodByFLSSM();
      });
      this.addProductDia = false;
    },
    refreshList() {
      this.batchCopyDia = false;
      const index = this.standardList.findIndex(
src/views/structural/premises/index.vue
@@ -22,8 +22,9 @@
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination"
        :page="page" :tableLoading="tableLoading"></lims-table>
      <lims-table :tableData="tableData" :column="column"
                  :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <!--    æ–°å¢žå®žéªŒå®¤-->
    <el-dialog :title="formTitle" :visible.sync="addDia" width="450px">
@@ -67,9 +68,9 @@
            placeholder="请选择" size="small" style="width:100%" collapse-tags clearable></el-cascader>
        </el-form-item>
        <el-form-item label="印章图片" prop="address">
          <el-upload class="avatar-uploader" :action="action" :headers="headers" accept='image/jpg,image/jpeg,image/png'
            :show-file-list="false" :on-success="handleSuccess" :on-change="beforeUpload" ref="upload"
            :on-error="onError">
          <el-upload class="avatar-uploader" :action="action" :headers="uploadHeader"
            accept='image/jpg,image/jpeg,image/png' :show-file-list="false" :on-success="handleSuccess"
            :on-change="beforeUpload" ref="upload" :on-error="onError">
            <img v-if="dataForm.address" :src="javaApi + '/img/' + dataForm.address" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
@@ -94,18 +95,12 @@
  upParameter
} from "@/api/structural/laboratoryScope";
import { getCertificationDetail } from "@/api/structural/laboratory";
import { getToken } from "@/utils/auth";
export default {
  components: {
    limsTable
  },
  computed: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi
    }
src/views/system/user/index.vue
@@ -6,11 +6,15 @@
        <pane size="12">
          <el-col>
            <div class="head-container addButton">
              <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
              <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle @click="addSchema"></el-button>
              <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search"
                style="margin-bottom: 20px" />
              <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle
                @click="addSchema"></el-button>
            </div>
            <div class="head-container">
              <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" />
              <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
                :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
                @node-click="handleNodeClick" />
            </div>
          </el-col>
        </pane>
@@ -20,11 +24,13 @@
            <div>
              <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
                <el-form-item label="用户名称" prop="nickName">
                  <el-input v-model="queryParams.nickName" placeholder="请输入用户名称" clearable @keyup.enter.native="handleQuery" />
                  <el-input v-model="queryParams.nickName" placeholder="请输入用户名称" clearable
                    @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item label="状态" prop="status">
                  <el-select v-model="queryParams.status" placeholder="用户状态" clearable>
                    <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
                    <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
                      :value="dict.value" />
                  </el-select>
                </el-form-item>
                <el-form-item>
@@ -34,8 +40,10 @@
              </el-form>
            </div>
            <div class="options_button">
              <el-button type="primary" size="mini" @click="openthirdParty" v-hasPermi="['system:user:add']">获取三方人员</el-button>
              <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:user:add']">新增用户</el-button>
              <el-button type="primary" size="mini" @click="openthirdParty"
                v-hasPermi="['system:user:add']">获取三方人员</el-button>
              <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
                v-hasPermi="['system:user:add']">新增用户</el-button>
            </div>
          </div>
          <el-col>
@@ -45,25 +53,28 @@
              <el-table-column label="账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
              <el-table-column label="状态" align="center" key="status">
                <template slot-scope="scope">
                  <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
                  <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
                    @change="handleStatusChange(scope.row)"></el-switch>
                </template>
              </el-table-column>
              <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" width="120" />
              <el-table-column label="操作" align="center" width="160" class-nickName="small-padding fixed-width">
                <template slot-scope="scope">
                  <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']">修改</el-button>
<!--                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">删除</el-button>-->
<!--                  <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
<!--                    <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
<!--                    <el-dropdown-menu slot="dropdown">-->
<!--                      <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>-->
<!--                      <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>-->
<!--                    </el-dropdown-menu>-->
<!--                  </el-dropdown>-->
                  <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']">修改</el-button>
                  <!--                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">删除</el-button>-->
                  <!--                  <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
                  <!--                    <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
                  <!--                    <el-dropdown-menu slot="dropdown">-->
                  <!--                      <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>-->
                  <!--                      <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>-->
                  <!--                    </el-dropdown-menu>-->
                  <!--                  </el-dropdown>-->
                </template>
              </el-table-column>
            </el-table>
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
              :limit.sync="queryParams.pageSize" @pagination="getList" />
          </el-col>
        </pane>
      </splitpanes>
@@ -88,7 +99,9 @@
          <el-col :span="12">
            <el-form-item label="状态" prop="status">
              <el-radio-group v-model="form.status">
                <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
                <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{
                  dict.label
                }}</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
@@ -102,7 +115,8 @@
          <el-col :span="12">
            <el-form-item label="角色" prop="roleIds">
              <el-select v-model="form.roleIds" multiple placeholder="请选择角色" clearable>
                <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId" :disabled="item.status == 1"></el-option>
                <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId"
                  :disabled="item.status == 1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
@@ -128,7 +142,8 @@
          <el-col :span="12">
            <el-form-item label="单位" prop="company">
              <el-select v-model="form.company" placeholder="请选择单位" style="width: 100%" clearable>
                <el-option v-for="item in postOptions" :key="item.id" :label="item.company" :value="item.id"></el-option>
                <el-option v-for="item in postOptions" :key="item.id" :label="item.company"
                  :value="item.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
@@ -136,30 +151,20 @@
        <el-row>
          <el-col :span="12">
            <el-form-item label="签名">
              <el-upload
                class="avatar-uploader"
                :action="uploadAction"
                :show-file-list="false"
                accept=".png, .jpg, .jpeg, .gif"
                :on-error="handleUploadError"
                :on-success="handleUploadSuccess"
                :before-upload="handleBeforeUpload">
                <img v-if="signatureUrl" :src="signatureUrl" class="avatar" alt="">
              <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false"
                :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError"
                :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
                <img v-if="form.signatureUrl" :src="javaApi + '/img/' + form.signatureUrl" class="avatar" alt="">
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="个人照片">
              <el-upload
                class="avatar-uploader"
                :action="uploadAction"
                :show-file-list="false"
                accept=".png, .jpg, .jpeg, .gif"
                :on-error="handleUploadError1"
                :on-success="handleUploadSuccess1"
                :before-upload="handleBeforeUpload1">
                <img v-if="pictureUrl" :src="pictureUrl" class="avatar" alt="">
              <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false"
                :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError1"
                :on-success="handleUploadSuccess1" :before-upload="handleBeforeUpload1">
                <img v-if="form.pictureUrl" :src="javaApi + '/img/' + form.pictureUrl" class="avatar" alt="">
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
            </el-form-item>
@@ -174,7 +179,9 @@
    <!-- ç”¨æˆ·å¯¼å…¥å¯¹è¯æ¡† -->
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
        :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
        :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
@@ -182,7 +189,8 @@
            <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
          </div>
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link>
          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
            @click="importTemplate">下载模板</el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
@@ -195,24 +203,22 @@
    <el-dialog title="获取人事系统人员信息" :visible.sync="addthirdParty" width="70%">
      <div class="body" v-loading="thirdPartyLoading">
        <el-row>
          <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length!=1">
            <el-input v-model="search2" placeholder="输入关键字搜索" clearable size="small"
                      @clear="searchFilter2" @keyup.enter.native="searchFilter2"
                      prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%"/>
          <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length != 1">
            <el-input v-model="search2" placeholder="输入关键字搜索" clearable size="small" @clear="searchFilter2"
              @keyup.enter.native="searchFilter2" prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%" />
            <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps" @node-click="nodeClick2"
                     style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2"
                     highlight-current>
              style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2"
              highlight-current>
            </el-tree>
          </el-col>
          <el-col :span="companiesList.length==1?24:16" style="height: 70vh;padding-left: 8px;">
          <el-col :span="companiesList.length == 1 ? 24 : 16" style="height: 70vh;padding-left: 8px;">
            <div style="display: flex;align-items: center;margin-bottom: 10px">
              <span style="width: 140px">员工号/员工姓名:</span>
              <el-input size="small" placeholder="请输入员工号/员工姓名" @clear="searchPerson" clearable v-model="userSearch2"
                        style="width: 50%"
                        @keyup.enter.native="searchPerson()"></el-input>
                style="width: 50%" @keyup.enter.native="searchPerson()"></el-input>
            </div>
            <el-table height="67vh" stripe :data="personList" v-loading="personLoad" ref="personTable"
                      @selection-change="handleSelectionChange">
              @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="50">
              </el-table-column>
              <el-table-column prop="employeeID" label="员工号">
@@ -332,8 +338,6 @@
        url: process.env.VUE_APP_BASE_API + "/system/user/importData"
      },
      uploadAction: process.env.VUE_APP_BASE_API + '/deviceScope/uploadFile',
      signatureUrl: '',
      pictureUrl: '',
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
@@ -361,18 +365,18 @@
        userName: [
          { required: true, message: "请填写账号", trigger: "blur" }
        ],
        nameEn: [
          { required: true, message: "请输入姓名EN", trigger: "blur" }
        ],
        // nameEn: [
        //   { required: true, message: "请输入姓名EN", trigger: "blur" }
        // ],
        status: [
          { required: true, message: "请选择状态", trigger: "change" }
        ],
        roleIds: [
          { required: true, message: "请选择角色", trigger: "change" }
        ],
        password: [
          { required: true, message: "密码不能为空", trigger: "blur" },
        ],
        // password: [
        //   { required: true, message: "密码不能为空", trigger: "blur" },
        // ],
        phonenumber: [
          {
            required: true,
@@ -384,7 +388,7 @@
      },
      // èŽ·å–ä¸‰æ–¹äººå‘˜å¼¹æ¡†
      addthirdParty: false,
      thirdPartyLoading:false,
      thirdPartyLoading: false,
      companiesList: [],
      search2: '',
      datathirdParty: [],
@@ -420,18 +424,18 @@
    getList() {
      this.loading = true;
      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
          this.userList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
        this.userList = response.rows;
        this.total = response.total;
        this.loading = false;
      }
      );
    },
    // æ‰“开添加架构弹框
    addSchema () {
    addSchema() {
      this.addDia = true
    },
    // æäº¤æž¶æž„
    addStandardTree () {
    addStandardTree() {
      if (this.addOb.nickName == null || this.addOb.factory == '') {
        this.$message.error('构架名称是必填项')
        return
@@ -484,11 +488,11 @@
    // ç”¨æˆ·çŠ¶æ€ä¿®æ”¹
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal.confirm('确认要"' + text + '""' + row.nickName + '"用户吗?').then(function() {
      this.$modal.confirm('确认要"' + text + '""' + row.nickName + '"用户吗?').then(function () {
        return changeUserStatus(row.userId, row.status);
      }).then(() => {
        this.$modal.msgSuccess(text + "成功");
      }).catch(function() {
      }).catch(function () {
        row.status = row.status === "0" ? "1" : "0";
      });
    },
@@ -511,8 +515,12 @@
        sex: undefined,
        status: "0",
        company: '',
        roleIds: []
        roleIds: [],
        signatureUrl: '',
        pictureUrl: ''
      };
      // this.signatureUrl = '';
      // this.pictureUrl = ''
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
@@ -553,21 +561,21 @@
      this.thirdPartyLoading = true;
      selectCompaniesList().then(res => {
        this.companiesList = this.HaveJson(res.data);
        if(this.companiesList.length ==1){
          selectSimpleList({companyId: this.companiesList[0].companyId}).then(res => {
        if (this.companiesList.length == 1) {
          selectSimpleList({ companyId: this.companiesList[0].companyId }).then(res => {
            this.thirdPartyLoading = false;
            this.personListCopy = JSON.parse(JSON.stringify(res.data))
            this.personList = res.data
            this.$refs.personTable.doLayout()
          })
        }else{
        } else {
          this.thirdPartyLoading = false;
        }
        this.datathirdParty = this.tranListToTreeData(res.data, "ROOT");
      }).catch(() => {
        this.thirdPartyLoading = false;
      })
      if(this.componentData.entity.roleId > 10000)this.$message.warning('由于未选中具体角色,新增用户将成为默认角色')
      if (this.componentData.entity.roleId > 10000) this.$message.warning('由于未选中具体角色,新增用户将成为默认角色')
    },
    tranListToTreeData(list, rootValue) {
      const arr = [];
@@ -597,7 +605,7 @@
      this.getNodeParent(node)
      if (ob.companyId !== 'SC21') {
        this.personLoad = true
        selectSimpleList({companyId: ob.companyId}).then(res => {
        selectSimpleList({ companyId: ob.companyId }).then(res => {
          this.personListCopy = JSON.parse(JSON.stringify(res.data))
          this.personList = res.data
          this.personLoad = false
@@ -677,6 +685,7 @@
      const userId = row.userId || this.ids;
      getUser(userId).then(response => {
        this.form = response.data;
        this.form.password = ''
        this.roleOptions = response.roles;
        this.$set(this.form, "roleIds", response.roleIds);
        this.open = true;
@@ -697,18 +706,18 @@
          }
        },
      }).then(({ value }) => {
          resetUserPwd(row.userId, value).then(response => {
            this.$modal.msgSuccess("修改成功,新密码是:" + value);
          });
        }).catch(() => {});
        resetUserPwd(row.userId, value).then(response => {
          this.$modal.msgSuccess("修改成功,新密码是:" + value);
        });
      }).catch(() => { });
    },
    /** åˆ†é…è§’色操作 */
    handleAuthRole: function(row) {
    handleAuthRole: function (row) {
      const userId = row.userId;
      this.$router.push("/system/user-auth/role/" + userId);
    },
    /** æäº¤æŒ‰é’® */
    submitForm: function() {
    submitForm: function () {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.userId != undefined) {
@@ -730,12 +739,12 @@
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () {
        return delUser(userIds);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
      }).catch(() => { });
    },
    /** ä¸‹è½½æ¨¡æ¿æ“ä½œ */
    importTemplate() {
@@ -781,14 +790,14 @@
      // å¦‚果上传成功
      if (res.code == 200) {
        // èŽ·å–å¯Œæ–‡æœ¬ç»„ä»¶å®žä¾‹
        let quill = this.Quill;
        // èŽ·å–å…‰æ ‡æ‰€åœ¨ä½ç½®
        let length = quill.getSelection().index;
        // æ’入图片  res.url为服务器返回的图片地址
        quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // è°ƒæ•´å…‰æ ‡åˆ°æœ€åŽ
        quill.setSelection(length + 1);
        this.signatureUrl = res.data.url
        // let quill = this.Quill;
        // // èŽ·å–å…‰æ ‡æ‰€åœ¨ä½ç½®
        // let length = quill.getSelection().index;
        // // æ’入图片  res.url为服务器返回的图片地址
        // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // // è°ƒæ•´å…‰æ ‡åˆ°æœ€åŽ
        // quill.setSelection(length + 1);
        this.form.signatureUrl = res.data.url
      } else {
        this.$message.error("图片插入失败");
      }
@@ -819,14 +828,14 @@
      // å¦‚果上传成功
      if (res.code == 200) {
        // èŽ·å–å¯Œæ–‡æœ¬ç»„ä»¶å®žä¾‹
        let quill = this.Quill;
        // èŽ·å–å…‰æ ‡æ‰€åœ¨ä½ç½®
        let length = quill.getSelection().index;
        // æ’入图片  res.url为服务器返回的图片地址
        quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // è°ƒæ•´å…‰æ ‡åˆ°æœ€åŽ
        quill.setSelection(length + 1);
        this.pictureUrl = res.data.url
        // let quill = this.Quill;
        // // èŽ·å–å…‰æ ‡æ‰€åœ¨ä½ç½®
        // let length = quill.getSelection().index;
        // // æ’入图片  res.url为服务器返回的图片地址
        // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // // è°ƒæ•´å…‰æ ‡åˆ°æœ€åŽ
        // quill.setSelection(length + 1);
        this.form.pictureUrl = res.data.url
      } else {
        this.$message.error("图片插入失败");
      }
@@ -842,10 +851,12 @@
.search_form {
  display: flex;
  justify-content: space-between;
  .options_button {
    margin-top: 3px;
  }
}
.avatar-uploader ::v-deep .el-upload {
  border: 1px dashed #666666;
  border-radius: 6px;
@@ -853,9 +864,11 @@
  position: relative;
  overflow: hidden;
}
.avatar-uploader ::v-deep .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 20px;
  color: #8c939d;
@@ -864,11 +877,13 @@
  line-height: 90px;
  text-align: center;
}
.avatar {
  width: 90px;
  height: 90px;
  display: block;
}
.addButton {
  display: flex;
  align-items: flex-start;