소스 검색

Merge branch 'master' into referMaster

# Conflicts:
#	src/api/config.js
zhouna 4 년 전
부모
커밋
ff46748f98
29개의 변경된 파일3089개의 추가작업 그리고 1637개의 파일을 삭제
  1. 9 0
      src/api/cdss.js
  2. 132 125
      src/api/config.js
  3. 11 5
      src/components/autoTest/AutoKnowledgeMapRuleTest.vue
  4. 779 79
      src/components/base/LtModal.vue
  5. 91 31
      src/components/cdssManage/dept/DeptManage.vue
  6. 78 20
      src/components/cdssManage/disease/Disease.vue
  7. 85 26
      src/components/cdssManage/drug/DrugManage.vue
  8. 85 26
      src/components/cdssManage/fusion/Fusion.vue
  9. 2 2
      src/components/cdssManage/knowledge/AddKnowledge.vue
  10. 85 26
      src/components/cdssManage/lis/Lis.vue
  11. 85 26
      src/components/cdssManage/nursing/nursing.vue
  12. 96 26
      src/components/cdssManage/operation/Operation.vue
  13. 85 26
      src/components/cdssManage/pacs/Pacs.vue
  14. 6 7
      src/components/cdssManage/plan/AddPlan.vue
  15. 85 26
      src/components/cdssManage/scale/ScaleManage.vue
  16. 87 28
      src/components/cdssManage/tcmdisease/tcmdisease.vue
  17. 87 27
      src/components/cdssManage/tcmdrome/tcmdrome.vue
  18. 12 12
      src/components/knowledgeExtra/AddAssess/ScoreResultsTable.vue
  19. 44 13
      src/components/knowledgeExtra/AddAssess/index.vue
  20. 25 24
      src/components/knowledgeExtra/AddAssess/scale-table.vue
  21. 21 7
      src/components/knowledgeExtra/AddAssess/util.js
  22. 180 206
      src/components/knowledgeExtra/AddDevKnow.vue
  23. 192 204
      src/components/knowledgeExtra/AddNewRule.vue
  24. 147 115
      src/components/knowledgeExtra/AddNewRuleTable.vue
  25. 90 110
      src/components/knowledgeExtra/DevInfo.vue
  26. 1 0
      src/components/knowledgeExtra/KnowledgeAll.vue
  27. 468 434
      src/components/knowledgeExtra/RuleManager.vue
  28. 18 5
      src/components/knowledgeExtra/rules.js
  29. 3 1
      src/components/testManager/staticKnowledgeMap/StaticKnowledgeMapTest.vue

+ 9 - 0
src/api/cdss.js

@@ -714,4 +714,13 @@ export default {
   updateRunningStatus(param) {
     return axios.post(urls.updateRunningStatus, param);
   },
+
+  getRelatedMapping(param) {
+    //查询已映射关系
+    return axios.post(urls.getRelatedMapping, param);
+  },
+  getTermMatching(param) {
+    //推荐匹配
+    return axios.post(urls.getTermMatching, param);
+  },
 };

+ 132 - 125
src/api/config.js

@@ -1,9 +1,12 @@
 // const testUrl = 'http://223.93.170.82:23650'
 const testUrl = ''
-
+const host = window.location.hostname;
+const imgHost = host.indexOf("localhost")>-1?'http://192.168.2.241:82':('http://'+host+':82');
 export default {
-  host:'http://192.168.2.241:5050',
-  imgHost:'http://192.168.2.122:82',      //富文本编辑器图片回传地址
+    //imgHost: 'http://192.168.2.236:82',      //富文本编辑器图片回传地址
+    // imgHost: 'http://192.168.2.121:82',      //富文本编辑器图片回传地址
+    imgHost:imgHost,      //富文本编辑器图片回传地址
+  delayTime: 500,
   urls: {
     /* 登录注册相关接口 */
     'getImgVerification': '/api/user/userver/getImgVerification',
@@ -363,116 +366,120 @@ export default {
     'getMappingListPageCDSS': '/api/cdssman/hospitalInfo/getMappingListPage',  //获取术语映射统计列表
 
     'retrievalSearchCDSS': '/api/cdssman/demo/retrieval/index',   //术语检索
-    'getLisMappingPageCDSS': '/api/cdssman/tran/diseaseConfig/getPage', //诊断列表
-    'diseaseIsExistRecordCDSS': '/api/cdssman/tran/diseaseConfig/isExistRecord',   //诊断-映射关系是否已存在
-    'saveOrUpdateDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/saveOrUpdateRecord',   //诊断-保存或修改映射关系
-    'deleteDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/deleteRecord',   //诊断-删除映射关系
-    'exportDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/exportExcel',   //诊断-数据导出
-    'importDiseaseRecordCDSS': '/api/cdssman/tran/diseaseConfig/importExcel',   //诊断-数据导入
-    'exportDiseaseModuleCDSS': '/api/cdssman/tran/diseaseConfig/exportExcelModule',
-    'precDiseaseDataMatch': '/api/cdssman/tran/diseaseConfig/precDataMatch',
-    'dataDiseaseVerify': '/api/cdssman/tran/diseaseConfig/dataVerify',
-
-    'getLisPageCDSS': '/api/cdssman/tran/lisConfig/getPage',   //检验列表
-    'lisIsExistRecordCDSS': '/api/cdssman/tran/lisConfig/isExistRecord',   //检验-映射关系是否已存在
-    'saveOrUpdateLisRecordCDSS': '/api/cdssman/tran/lisConfig/saveOrUpdateRecord',   //检验-保存或修改映射关系
-    'deleteLisRecordCDSS': '/api/cdssman/tran/lisConfig/deleteRecord',   //检验-删除映射关系
-    'exportLisRecordCDSS': '/api/cdssman/tran/lisConfig/exportExcel',   //检验-数据导出
-    'importLisRecordCDSS': '/api/cdssman/tran/lisConfig/importExcel',   //检验-数据导入
-    'exportLisModuleCDSS': '/api/cdssman/tran/lisConfig/exportExcelModule',
-    'precLisDataMatch': '/api/cdssman/tran/lisConfig/precDataMatch',
-    'dataLisVerify': '/api/cdssman/tran/lisConfig/dataVerify',
-
-    'getpacsPageCDSS': '/api/cdssman/tran/pacsConfig/getPage',   //检查列表
-    'pacsIsExistRecordCDSS': '/api/cdssman/tran/pacsConfig/isExistRecord',   //检查-映射关系是否已存在
-    'saveOrUpdatePacsRecordCDSS': '/api/cdssman/tran/pacsConfig/saveOrUpdateRecord',   //检查-保存或修改映射关系
-    'deletePacsRecordCDSS': '/api/cdssman/tran/pacsConfig/deleteRecord',   //检查-删除映射关系
-    'exportPacsRecordCDSS': '/api/cdssman/tran/pacsConfig/exportExcel',   //检查-数据导出
-    'importPacsRecordCDSS': '/api/cdssman/tran/pacsConfig/importExcel',   //检查-数据导入
-    'exportPacsModuleCDSS': '/api/cdssman/tran/pacsConfig/exportExcelModule',
-    'precPacsDataMatch': '/api/cdssman/tran/pacsConfig/precDataMatch',
-    'dataPacsVerify': '/api/cdssman/tran/pacsConfig/dataVerify',
-
-    'getDrugPageCDSS': '/api/cdssman/tran/drugConfig/getPage',   //药品列表
-    'drugIsExistRecordCDSS': '/api/cdssman/tran/drugConfig/isExistRecord',   //药品-映射关系是否已存在
-    'saveOrUpdateDrugRecordCDSS': '/api/cdssman/tran/drugConfig/saveOrUpdateRecord',   //药品-保存或修改映射关系
-    'deleteDrugRecordCDSS': '/api/cdssman/tran/drugConfig/deleteRecord',   //药品-删除映射关系
-    'exportDrugRecordCDSS': '/api/cdssman/tran/drugConfig/exportExcel',   //药品-数据导出
-    'importDrugRecordCDSS': '/api/cdssman/tran/drugConfig/importExcel',   //药品-数据导入
-    'exportDrugModuleCDSS': '/api/cdssman/tran/drugConfig/exportExcelModule',
-    'precDrugDataMatch': '/api/cdssman/tran/drugConfig/precDataMatch',
-    'dataDrugVerify': '/api/cdssman/tran/drugConfig/dataVerify',
-
-      'getScalePageCDSS': '/api/cdssman/tran/scaleConfig/getPage',   //量表列表
-      'scaleIsExistRecordCDSS': '/api/cdssman/tran/scaleConfig/isExistRecord',   //量表-映射关系是否已存在
-      'saveOrUpdateScaleRecordCDSS': '/api/cdssman/tran/scaleConfig/saveOrUpdateRecord',   //量表-保存或修改映射关系
-      'deleteScaleRecordCDSS': '/api/cdssman/tran/scaleConfig/deleteRecord',   //量表-删除映射关系
-      'exportScaleRecordCDSS': '/api/cdssman/tran/scaleConfig/exportExcel',   //量表-数据导出
-      'importScaleRecordCDSS': '/api/cdssman/tran/scaleConfig/importExcel',   //量表-数据导入
-      'exportScaleModuleCDSS': '/api/cdssman/tran/scaleConfig/exportExcelModule',
-      'precScaleDataMatch': '/api/cdssman/tran/scaleConfig/precDataMatch',
-      'dataScaleVerify': '/api/cdssman/tran/scaleConfig/dataVerify',
-
-    'getOperationPageCDSS': '/api/cdssman/tran/operationConfig/getPage',   //手术/操作列表
-    'operationIsExistRecordCDSS': '/api/cdssman/tran/operationConfig/isExistRecord',   //手术/操作-映射关系是否已存在
-    'saveOrUpdateOperationRecordCDSS': '/api/cdssman/tran/operationConfig/saveOrUpdateRecord',   //手术/操作-保存或修改映射关系
-    'deleteOperationRecordCDSS': '/api/cdssman/tran/operationConfig/deleteRecord',   //手术/操作-删除映射关系
-    'exportOperationRecordCDSS': '/api/cdssman/tran/operationConfig/exportExcel',   //手术/操作-数据导出
-    'importOperationRecordCDSS': '/api/cdssman/tran/operationConfig/importExcel',   //手术/操作-数据导入
-    'exportOperationModuleCDSS': '/api/cdssman/tran/operationConfig/exportExcelModule',
-    'precOperationDataMatch': '/api/cdssman/tran/operationConfig/precDataMatch',
-    'dataOperationVerify': '/api/cdssman/tran/operationConfig/dataVerify',
-
-    'getFusionPageCDSS': '/api/cdssman/tran/transfusionConfig/getPage',   //输血列表
-    'fusionIsExistRecordCDSS': '/api/cdssman/tran/transfusionConfig/isExistRecord',   //输血-映射关系是否已存在
-    'saveOrUpdateFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/saveOrUpdateRecord',   //输血-保存或修改映射关系
-    'deleteFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/deleteRecord',   //输血-删除映射关系
-    'exportFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/exportExcel',   //输血-数据导出
-    'importFusionRecordCDSS': '/api/cdssman/tran/transfusionConfig/importExcel',   //输血-数据导入
-    'exportFusionModuleCDSS': '/api/cdssman/tran/transfusionConfig/exportExcelModule',
-    'precFusionDataMatch': '/api/cdssman/tran/transfusionConfig/precDataMatch',
-    'dataFusionVerify': '/api/cdssman/tran/transfusionConfig/dataVerify',
-
-    'getDeptPageCDSS': '/api/cdssman/tran/deptConfig/getPage',   //科室列表
-    'deptIsExistRecordCDSS': '/api/cdssman/tran/deptConfig/isExistRecord',   //科室-映射关系是否已存在
-    'saveOrUpdateDeptRecordCDSS': '/api/cdssman/tran/deptConfig/saveOrUpdateRecord',   //科室-保存或修改映射关系
-    'deleteDeptRecordCDSS': '/api/cdssman/tran/deptConfig/deleteRecord',   //科室-删除映射关系
-    'exportDeptRecordCDSS': '/api/cdssman/tran/deptConfig/exportExcel',   //科室-数据导出
-    'importDeptRecordCDSS': '/api/cdssman/tran/deptConfig/importExcel',   //科室-数据导入
-    'exportDeptModuleCDSS': '/api/cdssman/tran/deptConfig/exportExcelModule',   //科室-数据导入模板导出
-    'precDeptDataMatch': '/api/cdssman/tran/deptConfig/precDataMatch',
-    'dataDeptVerify': '/api/cdssman/tran/deptConfig/dataVerify',
+    'getLisMappingPageCDSS': '/api/cdssman/tran/mappingConfig/getPage', //诊断列表
+    'diseaseIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //诊断-映射关系是否已存在
+    'saveOrUpdateDiseaseRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //诊断-保存或修改映射关系
+    'deleteDiseaseRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //诊断-删除映射关系
+    'exportDiseaseRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //诊断-数据导出
+    'importDiseaseRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //诊断-数据导入
+    'exportDiseaseModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
+    'precDiseaseDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataDiseaseVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getLisPageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //检验列表
+    'lisIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //检验-映射关系是否已存在
+    'saveOrUpdateLisRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //检验-保存或修改映射关系
+    'deleteLisRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //检验-删除映射关系
+    'exportLisRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //检验-数据导出
+    'importLisRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //检验-数据导入
+    'exportLisModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
+    'precLisDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataLisVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getpacsPageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //检查列表
+    'pacsIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //检查-映射关系是否已存在
+    'saveOrUpdatePacsRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //检查-保存或修改映射关系
+    'deletePacsRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //检查-删除映射关系
+    'exportPacsRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //检查-数据导出
+    'importPacsRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //检查-数据导入
+    'exportPacsModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
+    'precPacsDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataPacsVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
     
-    'getNursePage': '/api/cdssman/tran/nurseConfig/getPage',   //护理列表
-    'nurseIsExistRecord': '/api/cdssman/tran/nurseConfig/isExistRecord',   //护理-映射关系是否已存在
-    'saveOrUpdateRecord': '/api/cdssman/tran/nurseConfig/saveOrUpdateRecord',   //护理列表添加
-    'deleteNurseRecord': '/api/cdssman/tran/nurseConfig/deleteRecord',   //护理-删除映射关系
-    'exportNurseRecord': '/api/cdssman/tran/nurseConfig/exportExcel',   //护理-数据导出
-    'importNurseRecord': '/api/cdssman/tran/nurseConfig/importExcel',   //检验-数据导入
-    'exportNurseModule': '/api/cdssman/tran/nurseConfig/exportExcelModule',   //护理-数据导入模板导出
-    'precNurseDataMatch': '/api/cdssman/tran/nurseConfig/precDataMatch',
-    'dataNurseVerify': '/api/cdssman/tran/nurseConfig/dataVerify',
-
-
-    'getTcmdiseasePage': '/api/cdssman/tran/tcmdiseaseConfig/getPage',   //中医疾病列表
-    'tcmIsExistRecord': '/api/cdssman/tran/tcmdiseaseConfig/isExistRecord',   //中医疾病-映射关系是否已存在
-    'saveOrUpdateRecordTcm': '/api/cdssman//tran/tcmdiseaseConfig/saveOrUpdateRecord',   //护理列表添加
-    'deleteTcmRecord': '/api/cdssman/tran/tcmdiseaseConfig/deleteRecord',   //中医疾病-删除映射关系
-    'exportTcmRecord': '/api/cdssman/tran/tcmdiseaseConfig/exportExcel',   //中医疾病-数据导出
-    'importTcmRecord': '/api/cdssman/tran/tcmdiseaseConfig/importExcel',   //检验-数据导入
-    'exportTcmModule': '/api/cdssman/tran/tcmdiseaseConfig/exportExcelModule',   //护理-数据导入模板导出
-    'precTcmDataMatch': '/api/cdssman/tran/tcmdiseaseConfig/precDataMatch',
-    'dataTcmVerify': '/api/cdssman/tran/tcmdiseaseConfig/dataVerify',
-
-    'getTcmsyndromePage': '/api/cdssman/tran/tcmsyndromeConfig/getPage',   //中医证候列表
-    'tcmdromeIsExistRecord': '/api/cdssman/tran/tcmsyndromeConfig/isExistRecord',   //中医证候-映射关系是否已存在
-    'saveOrUpdateRecordTcmdrome': '/api/cdssman//tran/tcmsyndromeConfig/saveOrUpdateRecord',   //中医证候列表添加
-    'deleteTcmdromeRecord': '/api/cdssman/tran/tcmsyndromeConfig/deleteRecord',
-    'exportTcmdromeRecord': '/api/cdssman/tran/tcmsyndromeConfig/exportExcel',   //中医证候-数据导出
-    'importTcmdromeRecord': '/api/cdssman/tran/tcmsyndromeConfig/importExcel',   //中医证候-数据导入
-    'exportTcmdromeModule': '/api/cdssman/tran/tcmsyndromeConfig/exportExcelModule',   //中医证候-数据导入模板导出
-    'precTcmdromeDataMatch': '/api/cdssman/tran/tcmsyndromeConfig/precDataMatch',
-    'dataTcmdromeVerify': '/api/cdssman/tran/tcmsyndromeConfig/dataVerify',
+
+    'getDrugPageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //药品列表
+    'drugIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //药品-映射关系是否已存在
+    'saveOrUpdateDrugRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //药品-保存或修改映射关系
+    'deleteDrugRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //药品-删除映射关系
+    'exportDrugRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //药品-数据导出
+    'importDrugRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //药品-数据导入
+    'exportDrugModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
+    'precDrugDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataDrugVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getScalePageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //量表列表
+    'scaleIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //量表-映射关系是否已存在
+    'saveOrUpdateScaleRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //量表-保存或修改映射关系
+    'deleteScaleRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //量表-删除映射关系
+    'exportScaleRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //量表-数据导出
+    'importScaleRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //量表-数据导入
+    'exportScaleModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
+    'precScaleDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataScaleVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getOperationPageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //手术/操作列表
+    'operationIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //手术/操作-映射关系是否已存在
+    'saveOrUpdateOperationRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //手术/操作-保存或修改映射关系
+    'deleteOperationRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //手术/操作-删除映射关系
+    'exportOperationRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //手术/操作-数据导出
+    'importOperationRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //手术/操作-数据导入
+    'exportOperationModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
+    'precOperationDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataOperationVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getFusionPageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //输血列表
+    'fusionIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //输血-映射关系是否已存在
+    'saveOrUpdateFusionRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //输血-保存或修改映射关系
+    'deleteFusionRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //输血-删除映射关系
+    'exportFusionRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //输血-数据导出
+    'importFusionRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //输血-数据导入
+    'exportFusionModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',
+    'precFusionDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataFusionVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getDeptPageCDSS': '/api/cdssman/tran/mappingConfig/getPage',   //科室列表
+    'deptIsExistRecordCDSS': '/api/cdssman/tran/mappingConfig/isExistRecord',   //科室-映射关系是否已存在
+    'saveOrUpdateDeptRecordCDSS': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //科室-保存或修改映射关系
+    'deleteDeptRecordCDSS': '/api/cdssman/tran/mappingConfig/deleteRecord',   //科室-删除映射关系
+    'exportDeptRecordCDSS': '/api/cdssman/tran/mappingConfig/exportExcel',   //科室-数据导出
+    'importDeptRecordCDSS': '/api/cdssman/tran/mappingConfig/importExcel',   //科室-数据导入
+    'exportDeptModuleCDSS': '/api/cdssman/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
+    'precDeptDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataDeptVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getNursePage': '/api/cdssman/tran/mappingConfig/getPage',   //护理列表
+    'nurseIsExistRecord': '/api/cdssman/tran/mappingConfig/isExistRecord',   //护理-映射关系是否已存在
+    'saveOrUpdateRecord': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //护理列表添加
+    'deleteNurseRecord': '/api/cdssman/tran/mappingConfig/deleteRecord',   //护理-删除映射关系
+    'exportNurseRecord': '/api/cdssman/tran/mappingConfig/exportExcel',   //护理-数据导出
+    'importNurseRecord': '/api/cdssman/tran/mappingConfig/importExcel',   //检验-数据导入
+    'exportNurseModule': '/api/cdssman/tran/mappingConfig/exportExcelModule',   //护理-数据导入模板导出
+    'precNurseDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataNurseVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+
+    'getTcmdiseasePage': '/api/cdssman/tran/mappingConfig/getPage',   //中医疾病列表
+    'tcmIsExistRecord': '/api/cdssman/tran/mappingConfig/isExistRecord',   //中医疾病-映射关系是否已存在
+    'saveOrUpdateRecordTcm': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //护理列表添加
+    'deleteTcmRecord': '/api/cdssman/tran/mappingConfig/deleteRecord',   //中医疾病-删除映射关系
+    'exportTcmRecord': '/api/cdssman/tran/mappingConfig/exportExcel',   //中医疾病-数据导出
+    'importTcmRecord': '/api/cdssman/tran/mappingConfig/importExcel',   //检验-数据导入
+    'exportTcmModule': '/api/cdssman/tran/mappingConfig/exportExcelModule',   //护理-数据导入模板导出
+    'precTcmDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataTcmVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getTcmsyndromePage': '/api/cdssman/tran/mappingConfig/getPage',   //中医证候列表
+    'tcmdromeIsExistRecord': '/api/cdssman/tran/mappingConfig/isExistRecord',   //中医证候-映射关系是否已存在
+    'saveOrUpdateRecordTcmdrome': '/api/cdssman/tran/mappingConfig/saveOrUpdateRecord',   //中医证候列表添加
+    'deleteTcmdromeRecord': '/api/cdssman/tran/mappingConfig/deleteRecord',
+    'exportTcmdromeRecord': '/api/cdssman/tran/mappingConfig/exportExcel',   //中医证候-数据导出
+    'importTcmdromeRecord': '/api/cdssman/tran/mappingConfig/importExcel',   //中医证候-数据导入
+    'exportTcmdromeModule': '/api/cdssman/tran/mappingConfig/exportExcelModule',   //中医证候-数据导入模板导出
+    'precTcmdromeDataMatch': '/api/cdssman/tran/mappingConfig/precDataMatch',
+    'dataTcmdromeVerify': '/api/cdssman/tran/mappingConfig/dataVerify',
+
+    'getRelatedMapping': '/api/cdssman/tran/mappingConfig/getRelatedMapping',//查询映射关联
+    'getTermMatching': '/api/cdssman/term/termMatching',//查询推荐匹配
 
 
     // 'saveHospitalInfoRecordCDSS': '/api/cdssman/tran/hospitalInfo/saveRecord',   //医院信息——修改医院信息
@@ -526,11 +533,11 @@ export default {
     'getKlmEnumsDataCDSS': '/api/cdssman/getKlmEnumsData',   //枚举数据获取
 
 
-    'getCaseResultList': '/api/cdssman/test/rule/getCaseResultList', 
-    'billRuleTest': '/api/cdssman/test/rule/billRuleTest',   
-    'getResultBillPage': '/api/cdssman/test/rule/getResultBillPage', 
-    'exportRuleExcel': '/api/cdssman/test/rule/exportExcel', 
-    'ruleAllTest': '/api/cdssman/test/rule/ruleTest', 
+    'getCaseResultList': '/api/cdssman/test/rule/getCaseResultList',
+    'billRuleTest': '/api/cdssman/test/rule/billRuleTest',
+    'getResultBillPage': '/api/cdssman/test/rule/getResultBillPage',
+    'exportRuleExcel': '/api/cdssman/test/rule/exportExcel',
+    'ruleAllTest': '/api/cdssman/test/rule/ruleTest',
     'getResultCriticalPage': '/api/cdssman/test/rule/getResultCriticalPage',   //危急值测试列表
     'criticalRuleTest': '/api/cdssman/test/rule/criticalRuleTest',   //危急值规则测试
     'getResultHighriskDrugPage': '/api/cdssman/test/rule/getResultHighriskDrugPage',   //高危药品测试列表
@@ -540,7 +547,7 @@ export default {
     'getResultOtherPacsPage': '/api/cdssman/test/rule/getResultOtherPacsPage',   //其他值提醒(辅检)测试列表
     'getResultOtherTransfusionPage': '/api/cdssman/test/rule/getResultOtherTransfusionPage',   //其他值提醒(输血)测试列表
     'otherRuleTest': '/api/cdssman/test/rule/otherRuleTest',   //其他值提醒规则测试
-    
+
     'billExportExcel': '/api/cdssman/test/rule/billExportExcel',   //开单合理性规则测试结果导出
     'criticalExportExcel': '/api/cdssman/test/rule/criticalExportExcel',   //危急值规则测试结果导出
     'highriskDrugExportExcel': '/api/cdssman/test/rule/highriskDrugExportExcel',   //高危药品规则测试结果导出
@@ -601,13 +608,13 @@ export default {
     'saveBaseOrUpdateRecord': '/api/cdssman/kl/conceptInfo/saveOrUpdateRecord',
     'staticKnowledgeBaseInfo': '/api/cdssman/kl/conceptInfo/staticKnowledgeIndexWithoutInfo',
     //规则测试相关
-    'allRuleTest':'/api/cdssman/test/rule/allRuleTest',
-    'autoGetCaseResultList':'/api/cdssman/test/rule/getCaseResultList',
-    'getDroplistData':'/api/cdssman/test/rule/getDroplistData',
-    'getResultRulePage':'/api/cdssman/test/rule/getResultRulePage',
-    'ruleExportExcel':'/api/cdssman/test/rule/ruleExportExcel',
-    'autoRuleTest':'/api/cdssman/test/rule/ruleTest',
-    'clearDrug':'/api/cdssman/cache/clearDrug',
+    'allRuleTest': '/api/cdssman/test/rule/allRuleTest',
+    'autoGetCaseResultList': '/api/cdssman/test/rule/getCaseResultList',
+    'getDroplistData': '/api/cdssman/test/rule/getDroplistData',
+    'getResultRulePage': '/api/cdssman/test/rule/getResultRulePage',
+    'ruleExportExcel': '/api/cdssman/test/rule/ruleExportExcel',
+    'autoRuleTest': '/api/cdssman/test/rule/ruleTest',
+    'clearDrug': '/api/cdssman/cache/clearDrug',
     //药品维护
     'getPageList': '/api/cdssman/klDrugRegister/getPage',
     'getsearchDrug': '/api/cdssman/klDrugRegister/searchDrug',

+ 11 - 5
src/components/autoTest/AutoKnowledgeMapRuleTest.vue

@@ -16,7 +16,11 @@
           <el-button size="mini" @click="exportData">导出规则中未涉及到的医院术语</el-button>
         </el-form-item>
         <el-form-item style="marginbottom: 0px">
-          <el-button size="mini" @click="handleAllTest" :disabled="!runningStatus || implement">所有规则测试</el-button>
+          <el-button
+            size="mini"
+            @click="handleAllTest"
+            :disabled="!runningStatus || implement"
+          >所有规则测试</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
@@ -56,8 +60,9 @@
               :disabled="!runningStatus || implement"
             >
               {{
-              runningStatusArr[scope.row.caseId-1] === 1 || implement
+              runningStatusArr[scope.row.caseId-1] === 1
               ? '执行测试中'
+              :implement?'执行测试'
               : '执行测试'
               }}
             </el-button>
@@ -102,6 +107,7 @@ export default {
     this.zskgetDict();
     // this._getRunningStatus()   // 进入页面立即确认状态
     this.timer = setInterval(this._getRunningStatus, 20 * 1000);
+    this.timer = setInterval(this.getRunningState, 20 * 1000);
   },
   beforeDestroy() {
     clearInterval(this.timer);
@@ -121,7 +127,7 @@ export default {
         .getRunningState({ caseGroup: 1 })
         .then(res => {
           if (res.data.code == '0') {
-            this.implement = res.data.data
+            this.implement = res.data.data;
           }
         })
         .catch(error => {
@@ -170,11 +176,11 @@ export default {
               type: 'success'
             });
             this.getDataList(this.hospitalId); // 重新获取列表
-            this.getRunningState()
+            this.getRunningState();
           } else {
             this.$message.error(res.data.msg || '重置失败');
             this.getDataList(this.hospitalId); // 重新获取列表
-            this.getRunningState()
+            this.getRunningState();
           }
           this.runningStatusArr = statusTempArr;
         });

+ 779 - 79
src/components/base/LtModal.vue

@@ -1,98 +1,798 @@
-<!----通用弹窗组件---->
 <template>
-    <div class="modal-container">
-        <div class="cover"></div>
-        <div class="modal-box">
-            <div class="modal-title">
-                <a class="close" @click="close()">×</a>
+  <div class="modal-container">
+    <div class="cover"></div>
+    <div class="modal-box">
+      <div class="modal-title">
+        <span class="title-l">{{title}}{{tip}}</span>
+        <a class="close" @click="closeModal()">×</a>
+      </div>
+      <div class="modal-body">
+        <el-form
+          :model="form"
+          :rules="rules"
+          label-position="right"
+          label-width="145px"
+          ref="relationForm"
+        >
+          <div class="AddChemicalAndCommonMappingBox clearfix">
+            <div class="titleBox clearfix">
+              <p class="title">医院术语</p>
+              <p class="title">标准术语</p>
             </div>
-            <div class="modal-body">
-                <slot></slot>
+            <div class="leftBox clearfix">
+              <el-row>
+                <el-col :span="16">
+                  <el-form-item :label="meal+':'" prop="hisName">
+                    <el-input
+                      v-model.trim="form.hisName"
+                      clearable
+                      style="minWidth: 240px"
+                      @input="onchange"
+                      @blur="onblur"
+                    ></el-input>
+                  </el-form-item>
+                  <el-form-item :label="meal+'预览:'">
+                    <span class="previewInfo" style="minWidth: 240px">{{form.hisName}}</span>
+                  </el-form-item>
+                  <el-form-item label="科室编码:" prop="hisCode" v-if="type==7">
+                    <el-input v-model.trim="form.hisCode" clearable style="minWidth: 240px"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="16" v-if="type == 1 || type == 2">
+                  <el-form-item :label="detail+':'" prop="hisDetailName">
+                    <el-input
+                      v-model.trim="form.hisDetailName"
+                      clearable
+                      style="minWidth: 240px"
+                      @input="onchange"
+                      @blur="onblur"
+                      @clear="clear"
+                    ></el-input>
+                  </el-form-item>
+                  <el-form-item :label="detail+'预览:'">
+                    <span class="previewInfo" style="minWidth: 240px">{{form.hisDetailName}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </div>
-            <div class="modal-footer">
-                <a class="confirm btn" @click="confirm()">确定</a>
-                <a class="cancel btn" @click="close()">取消</a>
+            <div class="midBox">
+              <img class="midLogo" src="../../images/relation.png" alt />
+              <p class="midTitle">相互关联</p>
             </div>
-        </div>
+            <div class="rightBox">
+              <el-row>
+                <el-col :span="16">
+                  <el-form-item :label="standard+':'" prop="searchText">
+                    <el-select
+                      style="width:100%;minWidth: 240px"
+                      v-model="form.searchText"
+                      filterable
+                      remote
+                      clearable
+                      :loading="showDrop"
+                      loading-text="加载中..."
+                      @change="changeWord"
+                      @focus="handleFocus"
+                      @visible-change="handleVisible"
+                      placeholder="搜索"
+                      :remote-method="searchTerms"
+                      reserve-keyword
+                    >
+                      <el-option
+                        v-for="item in uniqueNameList"
+                        :key="item.icd10Code"
+                        :label="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
+                        :value="searchType == 2 ? `${item.uniqueName}` : item"
+                        :title="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
+                        @click.native="handleChoose(searchType == 2 ? `${item.uniqueName}` : item.name,item.id)"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                  <el-form-item v-if="tableData.length >0">
+                    <el-table
+                      :header-row-style="{height:'40px'}"
+                      :header-cell-style="{height:'40px',padding:'0'}"
+                      :row-class-name="tableRowClassName"
+                      :row-style="selectedstyle"
+                      :data="tableData"
+                      @row-click="btn"
+                      class="tab"
+                      border
+                    >
+                      <el-table-column prop="name" :show-overflow-tooltip="true" label="词名"></el-table-column>
+                      <el-table-column prop="address" :show-overflow-tooltip="true" label="来源">
+                        <template slot-scope="scope">
+                          <p>{{scope.row.source == 1?'标准词匹配':scope.row.source == 2?'同义词匹配':scope.row.source == 5?'相似词匹配':''}}</p>
+                        </template>
+                      </el-table-column>
+                    </el-table>
+                  </el-form-item>
+
+                  <el-form-item :label="standard+'预览:'">
+                    <!-- <span class="previewInfo">{{!isEdit ? form.searchText.name : form.searchText}}</span> -->
+                    <span class="previewInfo" style="minWidth: 240px">{{form.searchText}}</span>
+                  </el-form-item>
+                  <el-form-item label="ICD编码:" v-if="type == 4">
+                    <span class="previewInfo" style="minWidth: 240px">{{form.icdCode}}</span>
+                  </el-form-item>
+                  <el-form-item :label="detail+':'" v-if="type == 12 || type == 13 || type == 6">
+                    <span class="previewInfo" style="minWidth: 240px">{{form.icdCode}}</span>
+                  </el-form-item>
+                  <el-form-item label="药品剂型:" v-if="type == 5">
+                    <el-select
+                      style="width:100%;minWidth: 240px"
+                      v-model="form.form"
+                      filterable
+                      remote
+                      clearable
+                      :loading="showDrop"
+                      loading-text="加载中..."
+                      @change="drugchangeWord"
+                      @focus="handleFocus"
+                      @visible-change="handleVisible"
+                      placeholder="搜索"
+                      :remote-method="searchDrug"
+                      reserve-keyword
+                    >
+                      <el-option
+                        v-for="item in drugList"
+                        :key="item.icd10Code"
+                        :label="item.name"
+                        :value="item"
+                        :title="item.name"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+          </div>
+        </el-form>
+      </div>
+      <div class="mapList">
+        已关联标准术语:
+        <span
+          v-for="item in mapList"
+          :key="item.id"
+        >{{item.uniqueName}}&nbsp;&nbsp;{{item.form}}{{item.hisCode}};</span>
+      </div>
+      <div class="modal-footer">
+        <button class="confirm btns" :disabled="saveDisable" @click="submitForm">确定</button>
+        <button class="cancel btns" @click="closeModal">取消</button>
+      </div>
     </div>
+  </div>
 </template>
 <script>
-    export default {
-        name:'lt-modal',
-        data:function(){
-            return{
+import api from '@api/cdss.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
+export default {
+  name: 'lt-modal',
+  props: [
+    'modalVisiable',
+    'meal',
+    'detail',
+    'standard',
+    'type',
+    'data',
+    'hospitalId',
+    'tip'
+  ],
+  data() {
+    return {
+      form: {
+        searchText: '', //搜索字段
+        hisName: '',
+        icdCode: '',
+        hisDetailName: '',
+        formConceptId: '',
+        conceptId: '',
+        form: '',
+        hisCode: '',
+        source: ''
+      },
+      showDrop: false, //下拉框显示文字
+      saveDisable: false, //保存按钮禁止点击
+      uniqueNameList: [],
+      rules: {
+        hisName: [
+          { required: true, message: '请输入' + this.meal, trigger: 'change' },
+          { max: 80, message: this.meal + '最多80字', trigger: 'change' }
+        ],
+        searchText: [
+          { required: true, message: '请选择' + this.meal, trigger: 'change' }
+        ]
+      },
+      isEdit: false,
+      editId: '',
+      drugList: [],
+      tableData: [],
+      mapList: [],
+      getIndex: 6,
+      ty: this.type,
+      searchType: '',
+      title: '添加'
+    };
+  },
+  created() {
+    //修改
+    if (this.type == 1) {
+      this.ty = 2; // 1-化验大项、2-化验小项
+    }
+    if (JSON.stringify(this.data) != '{}') {
+      this.title = '修改';
+      this.isEdit = true;
+      this.editId = this.data.id;
+      this.form.hisName = this.data.hisName;
+      this.form.hisDetailName = this.data.hisDetailName;
+      this.form.searchText = this.data.uniqueName;
+      this.form.icdCode = this.data.code;
+      this.form.conceptId = this.data.conceptId;
+      this.form.formConceptId = this.data.formConceptId;
+      this.form.form = this.data.form;
+      this.form.source = this.data.source;
+      this.form.hisCode = this.data.hisCode;
+      let name;
+      if (
+        this.data.hisName !== '' &&
+        this.data.hisDetailName === '' &&
+        this.type == 1
+      ) {
+        this.ty = 1; // 1-化验大项、2-化验小项
+        this.searchType = 1;
+        name = this.data.hisName;
+      } else if (
+        this.data.hisName !== '' &&
+        this.data.hisDetailName !== '' &&
+        this.type == 1
+      ) {
+        this.ty = 2;
+        this.searchType = 2;
+        name = this.data.hisDetailName;
+      }
+      this.getTermMatching(this.ty, name);
+      this.getRelatedMapping();
+    }
+  },
+  methods: {
+    selectedstyle({ row, rowIndex }) {
+      if (this.getIndex === rowIndex) {
+        return {
+          'background-color': '#ECF9FB',
+          color: '#48C5D7'
+        };
+      }
+    },
+    tableRowClassName({ row, rowIndex }) {
+      row.index = rowIndex;
+    },
+    btn(row) {
+      const { hisName, hisDetailName } = this.form;
+      if (hisName !== '' && hisDetailName === '' && this.type == 1) {
+        this.ty = 1;
+      } else if (hisName !== '' && hisDetailName !== '' && this.type == 1) {
+        this.ty = 2;
+      }
+      if (this.getIndex == row.index) {
+        this.getIndex = 6;
+        this.form.searchText = '';
+        this.form.conceptId = '';
+        this.form.icdCode = '';
+        this.form.source = '';
+      } else {
+        this.getIndex = row.index;
+        this.form.searchText = row.name;
+        this.form.conceptId = row.id;
+        this.form.icdCode = row.code;
+        this.form.source = row.source;
+      }
+    },
+    handleChoose(val,id) {
+      this.form.searchTextPre = val;
+      this.form.searchText = val;
+      this.form.conceptId = id
+    },
+    // 搜索列表
+    searchTerms(query) {
+      if (!query) {
+        this.uniqueNameList = [];
+        return;
+      }
+      const { hisName, hisDetailName } = this.form;
+      if (hisName !== '' && hisDetailName === '' && this.type == 1) {
+        this.ty = 1;
+      } else if (hisName !== '' && hisDetailName !== '' && this.type == 1) {
+        this.ty = 2;
+      }
+      this.searchType = this.ty;
+      this.showDrop = true;
+      let params = {
+        type: this.ty ? this.ty : this.type,
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          if (this.ty == 2) {
+            this.uniqueNameList = res.data.data.lisDetailNames;
+          } else {
+            this.uniqueNameList = res.data.data.nameList;
+          }
+        }
+      });
+    },
+    searchDrug(query) {
+      if (!query) {
+        this.drugList = [];
+        return;
+      }
+      this.showDrop = true;
+      let params = {
+        type: 15,
+        inputStr: query,
+        sex: 3,
+        age: 0
+      };
+      api.retrievalSearch(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.drugList = res.data.data.nameList;
+        }
+      });
+    },
+    onchange() {
+      this.getRelatedMapping();
+    },
+    getRelatedMapping() {
+      const { hisName, hisDetailName } = this.form;
+      let params = {
+        type: this.type,
+        hisDetailName: hisDetailName,
+        hisName: hisName,
+        hospitalId: this.hospitalId
+      };
+      api.getRelatedMapping(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.mapList = res.data.data;
+        }
+      });
+    },
+    changeWord(newValue) {
+      this.form.searchText = newValue.name;
+      this.form.icdCode = newValue.code;
+      this.form.conceptId = newValue.id;
+      this.getIndex = 6;
+    },
+    drugchangeWord(newValue) {
+      this.form.formConceptId = newValue.id;
+      this.form.form = newValue.name;
+    },
+    handleVisible(flag) {
+      if (!flag) {
+        this.uniqueNameList = [];
+      }
+    },
+    // 获取焦点
+    handleFocus() {},
+    onblur() {
+      let type, name;
+      const { hisName, hisDetailName } = this.form;
+      if (this.type == 1) {
+        type = 1; // 1-化验大项、2-化验小项
+        name = hisName;
+        if (hisName !== '' && hisDetailName !== '') {
+          type = 2;
+          name = hisDetailName;
+        }
+      }
+      this.getTermMatching(type, name);
+    },
+    clear(){
+      const { hisName, hisDetailName } = this.form;
+      this.getTermMatching(1, hisName);
+    },
+    getTermMatching(type, name) {
+      let params = {
+        type: type ? type : this.type,
+        inputStr: name ? name : this.form.hisName
+      };
+      api.getTermMatching(params).then(res => {
+        this.showDrop = false;
+        if (res.data.code === '0') {
+          this.tableData = res.data.data;
+          this.getIndex = 6;
+        }
+      });
+    },
+    // 建立关联-参数处理
+    submitForm() {
+      this.$refs.relationForm.validate(valid => {
+        if (valid) {
+          const {
+            searchText,
+            hisName,
+            hisDetailName,
+            icdCode,
+            conceptId,
+            formConceptId,
+            hisCode,
+            source
+          } = this.form;
+          // 当标准术语是套餐时,细项必须为空
+          console.log(this.searchType);
+          if (this.searchType === 1 && hisDetailName !== '') {
+            this.warning('医院术语与标准术语类型不匹配,请修改');
+            return;
+          }
+          // 当标准术语是细项时,医院术语套餐和细项均不能为空
+          if (this.searchType === 2) {
+            if (hisName === '') {
+              this.warning('医院术语与标准术语类型不匹配,请修改');
+              return;
+            } else if (hisDetailName === '') {
+              this.warning('医院术语与标准术语类型不匹配,请修改');
+              return;
             }
-        },
-        methods:{
-            close(){
-                this.$emit("close");
-            },
-            confirm(){
-                this.$emit("confirm");
+          }
+          let params = {
+            hisName: hisName,
+            uniqueName: searchText,
+            hisDetailName: hisDetailName,
+            type: this.type,
+            conceptId: conceptId,
+            formConceptId: formConceptId,
+            hospitalId: this.hospitalId,
+            hisCode: hisCode,
+            source: source ? source : 1
+          };
+          this.showSaveDialog(params);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 建立关联-映射关系是否已存在
+    showSaveDialog(params) {
+      this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
+      api
+        .diseaseIsExistRecord(params)
+        .then(res => {
+          if (!res.data.data) {
+            // 不存在,创建新的关联
+            // 如果是编辑时,需要携带id
+            if (this.isEdit) {
+              params = { ...params, id: this.editId };
             }
+            this.saveLisMapping(params, '保存成功', 'success');
+          } else {
+            // 已存在,提示修改
+            this.warning('该条关联已存在,无法添加');
+            this.saveDisable = false;
+          }
+        })
+        .catch(err => {
+          if (err.code === '900010001') {
+            return false;
+          }
+          this.warning(err);
+        });
+    },
+    // 初始化表单数据
+    initForm() {
+      this.form.hisName = '';
+      this.form.searchText = '';
+      this.form.icdCode = '';
+      this.form.hisDetailName = '';
+      this.form.form = '';
+      this.form.conceptId = '';
+      this.form.source = '';
+    },
+    // 映射关系不存在-建立关联
+    saveLisMapping(params, msg, type) {
+      api.saveOrUpdateDiseaseRecord(params).then(res => {
+        if (res.data.code === '0') {
+          this.warning(res.data.msg || msg, type);
+          this.initForm();
+          this.$emit('func', 'updata');
+        } else {
+          this.warning(res.data.msg);
         }
+        this.saveDisable = false;
+      });
+    },
+    // 关联已存在模态框
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        // customClass: 'confirmRealation',
+        confirmButtonText: '是',
+        // cancelButtonText: '否',
+        // cancelButtonClass: 'cancelButton',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {
+          this.saveDisable = false;
+          this.warning('建立失败', 'error');
+        });
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning',
+        duration: '1000'
+      });
+    },
+    closeModal() {
+      this.$emit('func', 'close');
     }
+  }
+};
 </script>
 <style lang="less" scoped>
-.modal-container{
-    position: fixed;
-    top:0;
-    left: 0;
+.modal-container {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 21;
+  .cover {
+    background: #000;
+    opacity: 0.2;
     width: 100%;
     height: 100%;
-    z-index: 21;
-    .cover{
-        background: #000;
-        opacity: .2;
-        width: 100%;
-        height: 100%;
+  }
+  .modal-box {
+    width: 950px;
+    background: #fff;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    .modal-title {
+      height: 40px;
+      background: #e3eaf4;
+      .close {
+        float: right;
+        margin: 3px 13px 0 0;
+        font-size: 22px;
+        color: #979797;
+        cursor: pointer;
+      }
     }
-    .modal-box{
-        width: 860px;
-        height: 564px;
-        background: #fff;
-        position: absolute;
-        left: 50%;
-        top:50%;
-        margin-left: -430px;
-        margin-top: -282px;
-        .modal-title{
-            height: 40px;
-            background: #E3EAF4;
-            .close{
-                float: right;
-                margin:3px 13px 0 0;
-                font-size: 22px;
-                color: #979797;
-                cursor: pointer;
-            }
-        }
-        .btn{
-            display: inline-block;
-            width: 70px;
-            height: 34px;
-            line-height: 34px;
-            background: #48C5D7;
-            border-radius: 4px;
-            color: #fff;
-            text-align: center;
-            cursor: pointer;
-        }
-        .cancel{
-            background: #fff;
-            color: #48C5D7;
-            border:1px #48C5D7 solid;
-            margin-left: 40px;
-        }
-        .modal-body{
-            padding:20px 22px ;
-        }
-        .modal-footer{
-            /*position: absolute;
-            bottom: 32px;*/
-            width: 100%;
-            text-align: center;
-        }
+    .btns {
+      display: inline-block;
+      width: 70px;
+      height: 34px;
+      line-height: 34px;
+      background: #48c5d7;
+      border-radius: 4px;
+      color: #fff;
+      text-align: center;
+      cursor: pointer;
+      outline: none;
+      border: none;
+    }
+    .cancel {
+      background: #fff;
+      color: #48c5d7;
+      border: 1px #48c5d7 solid;
+      margin-left: 40px;
+    }
+    .modal-body {
+      padding: 34px 22px;
+    }
+    .modal-footer {
+      margin-bottom: 60px;
+      width: 100%;
+      text-align: center;
+    }
+  }
+}
+.tab {
+  max-width: 240px;
+  min-width: 240px;
+  //   position: absolute;
+  //   top: 0;
+  z-index: 999;
+  margin-bottom: 15px;
+  margin-top: -62px;
+}
+// .tabs {
+//   max-width: 240px;
+//   min-width: 240px;
+//   position: absolute;
+//   top: 0;
+//   left: 250px;
+// }
+.mapList {
+  padding: 0 20px 20px;
+  font-size: 14px;
+  line-height: 24px;
+  & span {
+    padding: 0 3px;
+  }
+}
+.el-select-dropdown__list,
+.el-select-dropdown__item {
+  width: 219px;
+  cursor: pointer;
+}
+.el-dropdown-menu__item:focus,
+.el-checkbox__input.is-checked + .el-checkbox__label,
+.el-dropdown-menu__item:not(.is-disabled):hover,
+.el-button--text,
+.el-date-table td.today span,
+.el-radio__input.is-checked + .el-radio__label,
+.el-pagination.is-background .el-pager li:not(.disabled):hover,
+.el-select-dropdown__item.selected {
+  font-size: 14px;
+  padding: 0 20px;
+  position: relative;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  color: #606266;
+  height: 34px;
+  line-height: 34px;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  width: 219px;
+  cursor: pointer;
+}
+/deep/ .el-form-item__error {
+  width: 150px;
+}
+/*********新增编辑***********/
+.topBack {
+  top: 0;
+}
+.titleBox {
+  padding: 0 0 10px 0px;
+}
+/deep/.el-table th {
+  background: #f7f7f7;
+}
+/deep/ .el-table td,
+.el-table th.is-leaf {
+  border-bottom: none;
+}
+.title-l {
+  font-size: 14px;
+  line-height: 40px;
+  margin-left: 10px;
+}
+.title {
+  width: 50%;
+  float: left;
+  font-size: 14px;
+}
+.leftBox,
+.midBox,
+.rightBox {
+  width: 380px;
+  float: left;
+  height: 248px;
+  font-size: 14px;
+}
+.midBox {
+  width: 6%;
+  padding: 50px 0 0 0;
+  text-align: center;
+}
+.midTitle {
+  width: 40px;
+  margin: 0 auto;
+}
+.midLogo {
+  margin: 0 auto;
+}
+.leftBox,
+.rightBox {
+  border: 1px solid #dcdfe6;
+  padding: 20px 10px;
+}
+.rightBox {
+  padding-right: 33px;
+  height: 248px;
+  overflow-y: auto;
+}
+.itemLabel {
+  width: 100%;
+  min-height: 50px;
+  line-height: 50px;
+  position: relative;
+}
+.itemLabelName,
+.searchInput,
+.searchName {
+  float: left;
+  color: #606266;
+}
+.itemLabelName {
+  width: 150px;
+}
+.isRequired::before {
+  content: '*';
+  color: red;
+}
+.searchInput,
+.mealNameItem {
+  padding: 0 5px;
+}
+.searchInput,
+.searchName {
+  display: inline-block;
+  height: 32px;
+  line-height: 32px;
+  border: 1px solid #a9a9a9;
+  margin: 8px 0 0 0;
+}
+
+.searchName {
+  text-align: center;
+  border-left: none;
+  cursor: pointer;
+  padding: 0 12px;
+  font-size: 16px;
+}
+.itemList {
+  position: absolute;
+  background: #fff;
+  width: 162px;
+  max-height: 150px;
+  border: 1px solid #a9a9a9;
+  left: 150px;
+  top: 42px;
+  z-index: 2;
+  overflow-y: auto;
+}
+.itemList {
+  width: calc(100% - 131px);
+}
+.mealNameItem {
+  height: 30px;
+  line-height: 30px;
+  font-size: 14px;
+  cursor: pointer;
+}
+.mealNameItem:hover {
+  background: #f5f7fa;
+}
+.previewInfo {
+  padding-left: 4px;
+  display: inline-block;
+  margin-top: 8px;
+  // width: calc(100% - 160px);s
+  line-height: 24px;
+  overflow: hidden;
+  word-wrap: break-word;
+  word-break: break-all;
+}
+.sumbit {
+  position: absolute;
+  display: inline-block;
+  width: 80px;
+  height: 30px;
+  line-height: 30px;
+  border: 1px solid #a9a9a9;
+  text-align: center;
+  right: 100px;
+}
+.confirmRealation {
+  .cancelButton {
+    border: 1px solid #a9a9a9;
+    span {
+      color: #606266;
     }
+  }
 }
 </style>

+ 91 - 31
src/components/cdssManage/dept/DeptManage.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院科室名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -35,6 +45,11 @@
         <el-table-column :resizable="false" prop="hisCode" label="医院科室编码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院科室名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准科室名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -61,6 +76,16 @@
         ></el-pagination>
       </div>
     </div>
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'科室名称'"
+      :standard="'科室名称'"
+      :tip="'科室关联'"
+      :type="7"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -68,7 +93,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'DeptManage',
   data: function() {
@@ -77,8 +102,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match: ''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -90,9 +122,14 @@ export default {
       uploadInfo: '导入',
       title: '科室关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -134,6 +171,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 7);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -146,7 +184,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataDeptVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -219,7 +257,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 7,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -236,14 +276,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDept',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddDept',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = {};
+      this.showModal();
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -255,14 +297,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDept',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddDept',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -366,19 +410,21 @@ export default {
         // }
       })
         .then(() => {
-          api.exportDeptRecord({ hospitalId: this.hospitalId }).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '科室关联数据.xls');
-            }
-          });
+          api
+            .exportDeptRecord({ hospitalId: this.hospitalId, type: 7,isMatch:this.filter.match })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '科室关联数据.xls');
+              }
+            });
         })
         .catch(() => {});
     },
 
     // 导入模板
     exportModule() {
-      api.exportDeptModule().then(res => {
+      api.exportDeptModule({type:7}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '科室导入模板.xls');
@@ -400,6 +446,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 7);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -418,7 +466,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             type: 'success'
@@ -445,6 +493,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 78 - 20
src/components/cdssManage/disease/Disease.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch"  @change="uploadFileMatch($event)" />
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院诊断名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -33,8 +43,13 @@
         <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院诊断名称" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="icdCode" label="ICD-10编码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="code" label="ICD-10编码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准诊断名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -61,6 +76,16 @@
         ></el-pagination>
       </div>
     </div>
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'诊断名称'"
+      :standard="'诊断名称'"
+      :tip="'诊断关联'"
+      :type="4"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -68,16 +93,23 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Disease', //化验大小项和公表维护
   data: function() {
     return {
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       list: [],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '',//标准诊断名称
+        match: ''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -87,9 +119,16 @@ export default {
       uploadInfo: '导入',
       title: '诊断关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      isEdit: false,
+      editId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -131,6 +170,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 4);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -143,7 +183,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataDiseaseVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -215,7 +255,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         icdCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 4,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -232,14 +274,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
+        this.data={}
+      this.showModal();
+      /*this.$router.push({
         name: 'AddDisease',
         params: Object.assign(pam, {
           isEdit: false,
           data: { hospitalId: this.hospitalId },
           hospitaiName: this.hospitaiName
         })
-      });
+      });*/
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -251,14 +295,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
+      /*this.$router.push({
         name: 'AddDisease',
         params: Object.assign(pam, {
           isEdit: true,
           data: { ...item, hospitalId: this.hospitalId },
           hospitaiName: this.hospitaiName
         })
-      });
+      });*/
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -346,7 +392,7 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          api.exportDiseaseRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportDiseaseRecord({ hospitalId: this.hospitalId,type:4,isMatch:this.filter.match }).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '诊断关联数据.xls');
@@ -360,7 +406,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDiseaseModule().then(res => {
+      api.exportDiseaseModule({type:4}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '诊断导入模板.xls');
@@ -381,6 +427,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 4);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -403,7 +451,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -438,16 +486,26 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-    }
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
+    },
   }
 };
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
 @import '../../../less/admin.less';
-</style>
 
-<style lang="less" scoped>
 .delete {
   color: red;
 }

+ 85 - 26
src/components/cdssManage/drug/DrugManage.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData" >预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院药品名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -35,6 +45,11 @@
         <el-table-column :resizable="false" prop="hisName" label="医院药品名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准药品名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="form" label="药品剂型" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -61,6 +76,17 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'药品名称'"
+      :standard="'药品名称'"
+      :tip="'药品关联'"
+      :type="5"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -68,16 +94,23 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'DrugManage', //化验大小项和公表维护
   data: function() {
     return {
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       list: [],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -87,9 +120,14 @@ export default {
       uploadInfo: '导入',
       title: '药品关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components:{
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -131,6 +169,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 5);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -143,7 +182,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataDrugVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -216,7 +255,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 5,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -233,14 +274,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDrug',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddDrug',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data={}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -252,14 +295,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddDrug',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddDrug',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -362,7 +407,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportDrugRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportDrugRecord({ hospitalId: this.hospitalId,type:5,isMatch:this.filter.match }).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '药品关联数据.xls');
@@ -376,7 +421,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDrugModule().then(res => {
+      api.exportDrugModule({type:5}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '药品导入模板.xls');
@@ -397,6 +442,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 5);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -420,7 +467,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -455,6 +502,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 85 - 26
src/components/cdssManage/fusion/Fusion.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院输血类型:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -34,6 +44,11 @@
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院输血类型" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准输血类型" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -60,6 +75,17 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'输血类型'"
+      :standard="'输血类型'"
+      :tip="'输血关联'"
+      :type="8"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -67,7 +93,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Fusion', //化验大小项和公表维护
   data: function() {
@@ -76,8 +102,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -86,9 +119,14 @@ export default {
       uploadInfo: '导入',
       title: '输血关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -130,6 +168,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 8);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -142,7 +181,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataFusionVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -214,7 +253,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 8,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -231,14 +272,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddFusion',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddFusion',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data={}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -250,14 +293,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddFusion',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddFusion',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -360,7 +405,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportFusionRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportFusionRecord({ hospitalId: this.hospitalId,type:8,isMatch:this.filter.match }).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '输血关联数据.xls');
@@ -373,7 +418,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportFusionModule().then(res => {
+      api.exportFusionModule({type:8}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '输血导入模板.xls');
@@ -394,6 +439,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 8);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -416,7 +463,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -451,6 +498,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 2 - 2
src/components/cdssManage/knowledge/AddKnowledge.vue

@@ -452,7 +452,7 @@ export default {
                         currentPage: numberpage
                       })
                     });
-                  } else if (res.data.code === '00020007') {
+                  } else if ((res.data.code === '00020007' || res.data.code === '00020004')) {
                     this.$message({
                       showClose: true,
                       message: res.data.msg,
@@ -494,7 +494,7 @@ export default {
                     currentPage: numberpage
                   })
                 });
-              } else if (res.data.code === '00020007') {
+              } else if ((res.data.code === '00020007' || res.data.code === '00020004')) {
                 this.$message({
                   showClose: true,
                   message: res.data.msg,

+ 85 - 26
src/components/cdssManage/lis/Lis.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="检验套餐:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -38,6 +48,11 @@
         <el-table-column :resizable="false" prop="hisName" label="检验套餐" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="hisDetailName" label="检验细项" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准检验项" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -64,6 +79,17 @@
         ></el-pagination>
       </div>
     </div>
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'检验套餐'"
+      :detail="'检验细项'"
+      :standard="'检验标准术语'"
+      :tip="'检验关联'"
+      :type="1"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -71,7 +97,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Lis', //化验大小项和公表维护
   data: function() {
@@ -81,8 +107,15 @@ export default {
       filter: {
         hisName: '', // 检验套餐
         hisDetailName: '', //检验细项
-        uniqueName: '' //标准检验项
+        uniqueName: '', //标准检验项
+        match: ''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -91,9 +124,14 @@ export default {
       uploadInfo: '导入',
       title: '检验关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -135,6 +173,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 1);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -147,7 +186,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataLisVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -220,7 +259,9 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         hisDetailName: this.filter.hisDetailName.trim(),
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 1,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -237,14 +278,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddLis',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      this.data = {};
+      this.showModal();
+      // this.$router.push({
+      //   name: 'AddLis',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -256,14 +299,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddLis',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddLis',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -367,7 +412,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportLisRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportLisRecord({ hospitalId: this.hospitalId,type:1,isMatch:this.filter.match }).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '检验数据.xls');
@@ -380,7 +425,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportLisModule().then(res => {
+      api.exportLisModule({type:1}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '检验导入模板.xls');
@@ -401,6 +446,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 1);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -423,7 +470,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -458,6 +505,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 85 - 26
src/components/cdssManage/nursing/nursing.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院护理名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -34,6 +44,11 @@
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院护理名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准护理名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -60,6 +75,17 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'护理名称'"
+      :standard="'护理名称'"
+      :tip="'护理关联'"
+      :type="11"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -67,16 +93,23 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Nursing', //化验大小项和公表维护
   data: function() {
     return {
       list: [],
       searched: false,
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -86,9 +119,14 @@ export default {
       uploadInfo: '导入',
       title: '护理关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -130,6 +168,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 11);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -142,7 +181,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataNurseVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -214,7 +253,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 11,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -231,14 +272,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddNursing',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddNursing',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data={}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -250,14 +293,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddNursing',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddNursing',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -360,7 +405,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportNurseRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportNurseRecord({ hospitalId: this.hospitalId,type:11,isMatch:this.filter.match }).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '护理关联数据.xls');
@@ -373,7 +418,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportNurseModule().then(res => {
+      api.exportNurseModule({type:11}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '护理导入模板.xls');
@@ -394,6 +439,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 11);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -416,7 +463,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -451,6 +498,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 96 - 26
src/components/cdssManage/operation/Operation.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院手术/操作名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -33,12 +43,23 @@
         <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院手术/操作名称" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="code"
+          label="手术/操作代码"
+          show-overflow-tooltip
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="uniqueName"
           label="标准手术/操作名称"
           show-overflow-tooltip
         ></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -65,6 +86,18 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'手术/操作名称'"
+      :standard="'手术/操作名称'"
+      :detail="'手术/操作代码'"
+      :tip="'手术/操作关联'"
+      :type="6"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -72,7 +105,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Operation', //化验大小项和公表维护
   data: function() {
@@ -81,8 +114,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match: ''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -91,9 +131,14 @@ export default {
       uploadInfo: '导入',
       title: '手术/操作关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -135,6 +180,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 6);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -147,7 +193,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataOperationVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -219,7 +265,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 6,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -236,14 +284,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddOperation',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddOperation',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = {};
+      this.showModal();
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -255,14 +305,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddOperation',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddOperation',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -366,7 +418,11 @@ export default {
       })
         .then(() => {
           api
-            .exportOperationRecord({ hospitalId: this.hospitalId })
+            .exportOperationRecord({
+              hospitalId: this.hospitalId,
+              type: 6,
+              isMatch: this.filter.match
+            })
             .then(res => {
               if (res.status === 200) {
                 this.$message({ message: '导出成功', type: 'success' });
@@ -381,7 +437,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportOperationModule().then(res => {
+      api.exportOperationModule({ type: 6 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '手术/操作导入模板.xls');
@@ -402,6 +458,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 6);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -424,7 +482,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -459,6 +517,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 85 - 26
src/components/cdssManage/pacs/Pacs.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院检查项目:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -34,6 +44,11 @@
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院检查项目" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准检查项目" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -60,6 +75,17 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'检查项目'"
+      :standard="'检查项目'"
+      :tip="'检查关联'"
+      :type="3"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -67,7 +93,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Pacs', //化验大小项和公表维护
   data: function() {
@@ -76,8 +102,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match: ''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -86,9 +119,14 @@ export default {
       uploadInfo: '导入',
       title: '检查关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -130,6 +168,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 3);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -142,7 +181,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataPacsVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -214,7 +253,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 3,
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -231,14 +272,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddPacs',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      this.data = {};
+      this.showModal();
+      // this.$router.push({
+      //   name: 'AddPacs',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -250,14 +293,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddPacs',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      this.data = item;
+      this.showModal();
+      // this.$router.push({
+      //   name: 'AddPacs',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
     },
     currentChange(next) {
       this.currentPage = next;
@@ -360,7 +405,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportPacsRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportPacsRecord({ hospitalId: this.hospitalId,type:3 ,isMatch:this.filter.match}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '检查关联数据.xls');
@@ -373,7 +418,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportPacsModule().then(res => {
+      api.exportPacsModule({type:3}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '检查导入模板.xls');
@@ -394,6 +439,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 3);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -417,7 +464,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // // cancelButtonText: '取消',
@@ -452,6 +499,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 6 - 7
src/components/cdssManage/plan/AddPlan.vue

@@ -536,19 +536,20 @@ export default {
       });
     },
     // 初始化
-    fomatArr() {
+    fomatArr(data) {
       let oneArr = JSON.parse(
-        JSON.stringify(this.form.planDetailSub[0].planDetails)
+        JSON.stringify(data[0].planDetails)
       );
-      // const index = this.mixArr.findIndex((item) => item == val);
       let list = oneArr.filter((ite) => {
         const j = this.mixArr.findIndex((itemB) => itemB === ite.name);
         return j !== -1;
       });
+      
       let biglist = oneArr.filter((ite) => {
         const j = this.mixArr.findIndex((itemB) => itemB === ite.name);
         return j === -1;
       });
+      
       let obj = { list };
       list.forEach((child) => {
         if (child.name === "开单合理性") {
@@ -564,7 +565,7 @@ export default {
       api.getDefaultPlans().then((res) => {
         if (res.data.code === "0") {
           this.form.planDetailSub = res.data.data.planDetailDefault;
-          this.fomatArr();
+          this.fomatArr(res.data.data.planDetailDefault);
         }
       });
     },
@@ -596,7 +597,6 @@ export default {
             planDetailSub: obj.sysSetInfo,
             id: data.id
           };
-
           const defaultRes = await api.getDefaultPlans();
           if (defaultRes.data.code === "0") {
             // 合并默认数据
@@ -618,7 +618,6 @@ export default {
           (ite) => ite.name === item.name
         );
         // 第一层数据不存在的话,直接加入进去
-
         if (oneIndex === -1) {
           item.status = 0;
           this.form.planDetailSub.push(item);
@@ -647,7 +646,7 @@ export default {
           this.groupSort(sun.planDetails);
         }
       });
-      this.fomatArr();
+      this.fomatArr(newData);
     }
   },
 

+ 85 - 26
src/components/cdssManage/scale/ScaleManage.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院量表名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -34,6 +44,11 @@
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院量表名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准量表名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -60,6 +75,17 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'量表名称'"
+      :standard="'量表名称'"
+      :tip="'量表关联'"
+      :type="10"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -67,7 +93,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'ScaleManage', //化验大小项和公表维护
   data: function() {
@@ -76,8 +102,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -86,9 +119,14 @@ export default {
       uploadInfo: '导入',
       title: '量表关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components:{
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -130,6 +168,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 10);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -142,7 +181,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataScaleVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -215,7 +254,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 10,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -232,14 +273,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddScale',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddScale',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data={}
+      this.showModal()
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -251,14 +294,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddScale',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddScale',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -342,7 +387,7 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          api.exportScaleRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportScaleRecord({ hospitalId: this.hospitalId,type:10,isMatch:this.filter.match }).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '量表关联数据.xls');
@@ -356,7 +401,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportScaleModule().then(res => {
+      api.exportScaleModule({type:10}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '量表导入模板.xls');
@@ -377,6 +422,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 10);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -400,7 +447,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -435,6 +482,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 87 - 28
src/components/cdssManage/tcmdisease/tcmdisease.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院中医疾病名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -33,8 +43,13 @@
         <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院中医疾病名称" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="uniqueCode" label="中医疾病代码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="code" label="中医疾病代码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准中医疾病名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -61,6 +76,18 @@
         ></el-pagination>
       </div>
     </div>
+
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'中医疾病名称'"
+      :standard="'中医疾病名称'"
+      :detail="'中医疾病代码'"
+      :tip="'中医疾病关联'"
+      :type="12"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -68,7 +95,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Tcmdisease', //化验大小项和公表维护
   data: function() {
@@ -77,8 +104,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -87,9 +121,14 @@ export default {
       uploadInfo: '导入',
       title: '中医疾病关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -131,6 +170,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 12);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -143,7 +183,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataTcmVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -215,7 +255,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 12,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -225,7 +267,6 @@ export default {
       this.getDataList();
     },
     addRelation() {
-      console.log(11)
       const pam = this.searched
         ? {
             currentPage: this.currentPage,
@@ -233,14 +274,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddTcmdisease',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+        this.data={}
+        this.showModal()
+      // this.$router.push({
+      //   name: 'AddTcmdisease',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -252,14 +295,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddTcmdisease',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddTcmdisease',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -362,7 +407,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportTcmRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportTcmRecord({ hospitalId: this.hospitalId,type:12 ,isMatch:this.filter.match}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '中医疾病关联数据.xls');
@@ -375,7 +420,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportTcmModule().then(res => {
+      api.exportTcmModule({type:12}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '中医疾病导入模板.xls');
@@ -396,6 +441,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 12);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -418,7 +465,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -453,6 +500,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 87 - 27
src/components/cdssManage/tcmdrome/tcmdrome.vue

@@ -5,9 +5,9 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -15,6 +15,16 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label class="selectMedicine">
+            <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in matchList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="医院中医证候名称:">
             <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
           </el-form-item>
@@ -33,8 +43,13 @@
         <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院中医证候名称" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="uniqueCode" label="中医证候代码" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="code" label="中医证候代码" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准中医证候名称" show-overflow-tooltip></el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -61,6 +76,17 @@
         ></el-pagination>
       </div>
     </div>
+    <LtModal
+      v-if="modalVisiable"
+      @func="getMsgFormSon"
+      :meal="'中医证候名称'"
+      :standard="'中医证候名称'"
+      :detail="'中医证候代码'"
+      :tip="'中医证候关联'"
+      :type="13"
+      :hospitalId="hospitalId"
+      :data="data"
+    ></LtModal>
   </div>
 </template>
 
@@ -68,7 +94,7 @@
 import api from '@api/cdss.js';
 import config from '@api/config.js';
 import utils from '@api/utils.js';
-
+import LtModal from '@base/LtModal';
 export default {
   name: 'Tcmdrome', //化验大小项和公表维护
   data: function() {
@@ -77,8 +103,15 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '' //标准诊断名称
+        uniqueName: '', //标准诊断名称
+        match:''
       },
+      matchList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '已匹配' },
+        { id: 0, name: '未匹配' },
+        { id: 2, name: '多项匹配' }
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -87,9 +120,14 @@ export default {
       uploadInfo: '导入',
       title: '中医证候关联维护 | ',
       hospitaiName: '',
-      hospitalId: ''
+      hospitalId: '',
+      modalVisiable: false,
+      data: {}
     };
   },
+  components: {
+    LtModal
+  },
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || '';
@@ -131,6 +169,8 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
+      formData.append('type', 13);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -143,7 +183,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataTcmdromeVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -215,7 +255,9 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: data && data.hospitalId
+        hospitalId: data && data.hospitalId,
+        type: 13,
+        isMatch:this.filter.match
       };
       return param;
     },
@@ -233,14 +275,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddTcmdrome',
-        params: Object.assign(pam, {
-          isEdit: false,
-          data: { hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+        this.data={}
+        this.showModal()
+      // this.$router.push({
+      //   name: 'AddTcmdrome',
+      //   params: Object.assign(pam, {
+      //     isEdit: false,
+      //     data: { hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -252,14 +296,16 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-      this.$router.push({
-        name: 'AddTcmdrome',
-        params: Object.assign(pam, {
-          isEdit: true,
-          data: { ...item, hospitalId: this.hospitalId },
-          hospitaiName: this.hospitaiName
-        })
-      });
+      // this.$router.push({
+      //   name: 'AddTcmdrome',
+      //   params: Object.assign(pam, {
+      //     isEdit: true,
+      //     data: { ...item, hospitalId: this.hospitalId },
+      //     hospitaiName: this.hospitaiName
+      //   })
+      // });
+      this.data = item
+      this.showModal()
     },
     currentChange(next) {
       this.currentPage = next;
@@ -362,7 +408,7 @@ export default {
         // }
       })
         .then(() => {
-          api.exportTcmdromeRecord({ hospitalId: this.hospitalId }).then(res => {
+          api.exportTcmdromeRecord({ hospitalId: this.hospitalId,type:13 ,isMatch:this.filter.match}).then(res => {
             if (res.status === 200) {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(res.data, '中医证候关联数据.xls');
@@ -375,7 +421,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportTcmdromeModule().then(res => {
+      api.exportTcmdromeModule({type:13}).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '中医证候导入模板.xls');
@@ -396,6 +442,8 @@ export default {
       let formData = new FormData();
       formData.append('file', fileInfo);
       formData.append('hospitalId', this.hospitalId);
+      formData.append('type', 13);
+      formData.append('uesrId', localStorage.getItem('uesrId'));
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'
@@ -418,7 +466,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if (res.data === '' && res.status === 200) {
+        } else if ((res.data.data === true && res.status === 200)) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -453,6 +501,18 @@ export default {
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
+    },
+    /********新增编辑弹窗**********/
+    showModal() {
+      this.modalVisiable = true;
+    },
+    getMsgFormSon(data) {
+      if (data == 'close') {
+        this.modalVisiable = false;
+      } else {
+        this.modalVisiable = false;
+        this.getDataList();
+      }
     }
   }
 };

+ 12 - 12
src/components/knowledgeExtra/AddAssess/ScoreResultsTable.vue

@@ -101,7 +101,6 @@
     <div class="table_box">
       <el-table
         :data="list"
-        header-row-class-name="header_row_class_name"
         border
         style="width: 100%; margin: 20px 0"
       >
@@ -126,7 +125,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="content" label="得分范围">
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">得分范围</div>
           </template>
           <template slot-scope="scope">
@@ -147,15 +146,16 @@
                   ]"
                 >
                   <el-input
-                    type="number"
+                    type="text"
+                    maxlength="7"
                     :id="`scoreresultsdatas[${scope.$index}].content.min`"
                     @input="
                       handleInput($event, scope.$index);
-                      scope.row.content.min = numInputInput(
+                      scope.row.content.min = numInputChange(
                         scope.row.content.min
                       );
                     "
-                    v-model.number="scope.row.content.min"
+                    v-model="scope.row.content.min"
                     clearable
                     placeholder="请输入"
                   ></el-input>
@@ -176,15 +176,16 @@
                   ]"
                 >
                   <el-input
-                    type="number"
+                    type="text"
+                    maxlength="7"
                     :id="`scoreresultsdatas[${scope.$index}].content.max`"
                     @input="
                       handleInput($event, scope.$index);
-                      scope.row.content.max = numInputInput(
+                      scope.row.content.max = numInputChange(
                         scope.row.content.max
                       );
                     "
-                    v-model.number="scope.row.content.max"
+                    v-model="scope.row.content.max"
                     clearable
                     placeholder="请输入"
                   ></el-input>
@@ -194,7 +195,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="result" label="结果">
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">结果</div>
           </template>
           <template slot-scope="scope">
@@ -220,7 +221,6 @@
           <template slot-scope="scope">
             <el-form-item
               :prop="`scoreresultsdatas[${scope.$index}].pushInfo`"
-              :rules="rules.sourePushInfo"
               class="showScroll"
             >
               <el-input
@@ -243,7 +243,7 @@
 
 <script>
 import rules from "./rules";
-import { numInputInput } from "./util";
+import { numInputChange } from "./util";
 export default {
   data() {
     return {
@@ -251,7 +251,7 @@ export default {
     };
   },
   methods: {
-    numInputInput,
+    numInputChange,
     handleInput(val, i) {
       // `scoreresultsdatas[${scope.$index}].content.min`
       this.$emit("clearValidate", [

+ 44 - 13
src/components/knowledgeExtra/AddAssess/index.vue

@@ -231,10 +231,10 @@ it .ql-editor,
                 >
                   <el-input
                     :id="`klScaleParent[${tableIndex}].factor`"
-                    type="number"
-                    maxlength="6"
-                    v-model.number="table.factor"
-                    @input="table.factor = numInputInput(table.factor)"
+                    type="text"
+                    maxlength="7"
+                    v-model="table.factor"
+                    @input="table.factor = numInputChange(table.factor)"
                   />
                 </el-form-item>
                 <el-form-item
@@ -247,10 +247,10 @@ it .ql-editor,
                   <el-input
                     :ref="`klScaleParent[${tableIndex}].constant`"
                     :id="`klScaleParent[${tableIndex}].constant`"
-                    type="number"
-                    maxlength="6"
-                    v-model.number="table.constant"
-                    @input="table.constant = numInputInput(table.constant)"
+                    type="text"
+                    maxlength="7"
+                    v-model="table.constant"
+                    @input="table.constant = numInputChange(table.constant)"
                   />
                 </el-form-item>
               </div>
@@ -386,7 +386,7 @@ import { container, ImageExtend, QuillWatch } from "quill-image-extend-module";
 Quill.register("modules/ImageExtend", ImageExtend);
 import ScoreResultsTable from "./ScoreResultsTable.vue";
 import rules from "./rules";
-import { numInputInput } from "./util";
+import { numInputChange } from "./util";
 const defaultDate = {
   groupId: new Date().valueOf().toString(),
   issueId: new Date().valueOf().toString() + "-" + new Date().valueOf(),
@@ -479,7 +479,7 @@ export default {
             remark: "string",
             resultType: 1,
             ruleCode: "string",
-            score: "",
+            score: null,
             status: 1,
             textType: 11
           }
@@ -555,7 +555,7 @@ export default {
     };
   },
   methods: {
-    numInputInput,
+    numInputChange,
     clearValidate(data) {
       this.$refs.ScoreResultsRef.clearValidate(data);
     },
@@ -784,14 +784,45 @@ export default {
       }
       // 14  提交数据设置新的orderNo,删除issueId
       params.klScaleParent.forEach((tableItem, tableIndex) => {
-        tableItem.orderNo = tableIndex;
+        // tableItem.orderNo = tableIndex;
+        // console.log(
+        //   "????",
+        //   typeof tableItem.constant + tableItem.constant,
+        //   typeof tableItem.factor + tableItem.factor,
+        //   typeof tableItem.score + tableItem.score
+        // );
+        typeof tableItem.constant == "string" &&
+          (tableItem.constant = parseFloat(tableItem.constant));
+        typeof tableItem.factor == "string" &&
+          (tableItem.factor = parseFloat(tableItem.factor));
+        typeof tableItem.score == "string" &&
+          (tableItem.score = parseFloat(tableItem.score));
         tableItem.klScaleSaveGroup.forEach((groupItem, groupIndex) => {
           groupItem.groupNum = groupIndex;
           groupItem.klScaleSub.forEach((issueItem, issueIndex) => {
             issueItem.orderNo = issueIndex;
             issueItem.issueId && delete issueItem.issueId;
+            // console.log(
+            //   "issueItem",
+            //   typeof issueItem.constant == "string" + issueItem.constant,
+            //   typeof issueItem.factor == "string" + issueItem.factor,
+            //   typeof issueItem.score == "string" + issueItem.score
+            // );
+            typeof issueItem.constant == "string" &&
+              (issueItem.constant = parseFloat(issueItem.constant));
+            typeof issueItem.factor == "string" &&
+              (issueItem.factor = parseFloat(issueItem.factor));
+            typeof issueItem.score == "string" &&
+              (issueItem.score = parseFloat(issueItem.score));
+
             issueItem.klScaleDetail.forEach((optionItem, optionIndex) => {
               optionItem.orderNo = optionIndex;
+              // console.log(
+              //   "optionItem.score",
+              //   typeof optionItem.score == "string" + optionItem.score
+              // );
+              typeof optionItem.score == "string" &&
+                (optionItem.score = parseFloat(optionItem.score));
             });
           });
         });
@@ -1164,7 +1195,7 @@ export default {
   watch: {
     scaleData: {
       handler() {
-        console.log("监听");
+        console.log("监听", this.scaleData);
         this.resizeTable();
       },
       deep: true

+ 25 - 24
src/components/knowledgeExtra/AddAssess/scale-table.vue

@@ -238,7 +238,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="two_content" label="问题内容">
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">问题内容</div>
           </template>
           <template slot-scope="scope">
@@ -266,11 +266,11 @@
         </el-table-column>
         <el-table-column
           prop="two_factor"
-          label="系数"
           width="60px"
           v-if="tableResultType === 1"
+          label="系数"
         >
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">系数</div>
           </template>
           <template slot-scope="scope">
@@ -282,8 +282,9 @@
               >
                 <el-input
                   :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_factor`"
-                  type="number"
-                  v-model.number="scope.row.two_factor"
+                  type="text"
+                  maxlength="7"
+                  v-model="scope.row.two_factor"
                   placeholder="请输入"
                   title=""
                   @input="
@@ -293,7 +294,7 @@
                       scope.$index,
                       'two_factor'
                     );
-                    scope.row.two_factor = numInputInput(scope.row.two_factor);
+                    scope.row.two_factor = numInputChange(scope.row.two_factor);
                   "
                 ></el-input>
               </el-form-item>
@@ -302,11 +303,11 @@
         </el-table-column>
         <el-table-column
           prop="two_constant"
-          label="常数"
           width="60px"
           v-if="tableResultType === 1"
+          label="常数"
         >
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">常数</div>
           </template>
           <template slot-scope="scope">
@@ -317,9 +318,10 @@
                 :show-message="false"
               >
                 <el-input
-                  type="number"
+                  type="text"
+                  maxlength="7"
                   :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].two_constant`"
-                  v-model.number="scope.row.two_constant"
+                  v-model="scope.row.two_constant"
                   placeholder="请输入"
                   style="text-align: center"
                   @input="
@@ -329,7 +331,7 @@
                       scope.$index,
                       'two_constant'
                     );
-                    scope.row.two_constant = numInputInput(
+                    scope.row.two_constant = numInputChange(
                       scope.row.two_constant
                     );
                   "
@@ -386,10 +388,10 @@
         </el-table-column>
         <el-table-column
           prop="content"
-          label="选项内容"
           :width="tableResultType === 1 ? '200px' : ''"
+          label="选项内容"
         >
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">选项内容</div>
           </template>
           <template slot-scope="scope">
@@ -441,11 +443,11 @@
         </el-table-column>
         <el-table-column
           prop="content"
-          label="分值"
           width="90px"
           v-if="tableResultType === 1"
+          label="分值"
         >
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">分值</div>
           </template>
           <template slot-scope="scope">
@@ -455,10 +457,10 @@
             >
               <el-input
                 :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].score`"
-                type="number"
-                maxlength="6"
-                @input="scope.row.score = numInputInput(scope.row.score)"
-                v-model.number="scope.row.score"
+                type="text"
+                maxlength="7"
+                @input="scope.row.score = numInputChange(scope.row.score)"
+                v-model="scope.row.score"
                 clearable
                 placeholder="请输入"
               ></el-input>
@@ -467,11 +469,11 @@
         </el-table-column>
         <el-table-column
           prop="result"
-          label="结果"
           width="200px"
           v-if="tableResultType === 2"
+          label="结果"
         >
-          <template slot="header">
+          <template slot="header" slot-scope="scope">
             <div class="custom_table_header">结果</div>
           </template>
           <template slot-scope="scope">
@@ -501,7 +503,6 @@
           <template slot-scope="scope">
             <el-form-item
               :prop="`klScaleParent[${tableIndex}].klScaleSaveGroup[${scope.$index}].pushInfo`"
-              :rules="rules.pushInfo"
               class="showScroll"
             >
               <el-input
@@ -525,7 +526,7 @@
 <script>
 import rules from "./rules";
 import api from "@api/knowledgeTree.js";
-import { numInputInput } from "./util";
+import { numInputChange } from "./util";
 export default {
   name: "scaleTable",
   data() {
@@ -536,7 +537,7 @@ export default {
     };
   },
   methods: {
-    numInputInput,
+    numInputChange,
     changeDataFun(val, tableIndex, rowIndex, name) {
       this.$emit("CHANGE_ISSUE_CONTENT", {
         value: val,

+ 21 - 7
src/components/knowledgeExtra/AddAssess/util.js

@@ -1,21 +1,35 @@
-export const numInputInput = (value, len = 5, decimals = 1) => {
+export const numInputChange = (value, len = 5, decimals = 1) => {
   // value:修改的数字  len 总长度   decimals:允许小数点后几位
   //todo 5位整数数加一位小数
+  let isMinus = false;
   value += "";
-  if (value.length == 0) return null;
+  if (value[0] == '-') {
+    isMinus = true;
+    len = len - 1;
+  }
+  value = value.replace(/[^\d.]/g, '');
   let index = value.lastIndexOf(".");
+
   if (index != -1) {
     let [int, dec] = value.split(".");
     if (dec.length > decimals) {
       dec = dec.slice(0, dec.length - 1);
     }
+
     if (int.length > len) {
       int = int.slice(0, int.length - 1);
     }
-    return parseFloat(int + "." + dec);
-  }
-  if (value.length > len) {
-    value = value.slice(0, value.length - 1);
+    if (int.length == 0) {
+      int = 0;
+    }
+    value = int + "." + dec;
+  } else {
+    if (value.length > len) {
+      value = value.slice(0, value.length - 1);
+    }
   }
-  return parseFloat(value);
+  let res = value
+  if (isMinus) { res = '-' + res };
+  if (parseFloat(res) == 'NaN') res = 0;
+  return res;
 }

+ 180 - 206
src/components/knowledgeExtra/AddDevKnow.vue

@@ -2,20 +2,14 @@
   <el-scrollbar style="height: 100%" ref="elscrollbar" id="message-container">
     <div class="NoiseTemplateWrapper TemplateWrapper knowledgeWrapper">
       <crumbs
-        :title="'医学术语静态知识维护-' + title"
+        :title="'静态信息维护-' + title"
         class="topBack"
         :param="$route.params"
         linkTo="StaticInfo"
       ></crumbs>
 
       <div class="info-container">
-        <el-form
-          :rules="rules1"
-          :model="form"
-          label-width="160px"
-          ref="groups1"
-          size="mini"
-        >
+        <el-form :rules="rules1" :model="form" label-width="160px" ref="groups1" size="mini">
           <div class="container_top">
             <div v-if="!isEdit" style="margin-right: 40px">
               <el-form-item label="选择标准术语:" prop="selectedTerm">
@@ -51,9 +45,11 @@
               </el-form-item>
             </div>
 
-            <el-form-item label="已选择标准术语:" label-width="160px">{{
+            <el-form-item label="已选择标准术语:" label-width="160px">
+              {{
               form.selectedTermName
-            }}</el-form-item>
+              }}
+            </el-form-item>
           </div>
         </el-form>
         <div class="tabs_box">
@@ -72,14 +68,14 @@
               <img
                 @click.stop="handleStaticTab"
                 src="@/images/tab_add.png"
-                alt=""
+                alt
                 v-if="AssesComSHow && !AssesTabSHow"
               />
               <img
                 v-if="AssesTabSHow && AssesComSHow"
                 @click.stop="closeStaticTab"
                 src="@/images/tab_close.png"
-                alt=""
+                alt
               />
             </div>
             <div
@@ -97,31 +93,21 @@
                 v-if="!staticTabShow"
                 @click.stop="handleAssesTab"
                 src="@/images/tab_add.png"
-                alt=""
+                alt
               />
               <img
                 v-if="staticTabShow"
                 @click.stop="closeAssesTab"
                 src="@/images/tab_close.png"
-                alt=""
+                alt
               />
             </div>
           </div>
         </div>
 
         <p class="line"></p>
-        <div
-          class="tab_box_left"
-          v-show="tabActive == 'one'"
-          v-if="staticTabShow"
-        >
-          <el-form
-            :rules="rules"
-            :model="form"
-            label-width="160px"
-            ref="groups"
-            size="mini"
-          >
+        <div class="tab_box_left" v-show="tabActive == 'one'" v-if="staticTabShow">
+          <el-form :rules="rules" :model="form" label-width="160px" ref="groups" size="mini">
             <div
               v-if="
                 form.selectedTerm &&
@@ -159,11 +145,7 @@
             </div>
 
             <div v-if="upload">
-              <el-form-item
-                label="标题名称搜索:"
-                prop="fileTitle"
-                label-width="160px"
-              >
+              <el-form-item label="标题名称搜索:" prop="fileTitle" label-width="160px">
                 <el-input v-model="form.fileTitle"></el-input>
               </el-form-item>
             </div>
@@ -193,37 +175,29 @@
                   :show-file-list="showFileList"
                   :file-list="form.fileList"
                 >
-                  <el-button size="small" type="primary" v-if="showUpLoad"
-                    >点击上传</el-button
-                  >
+                  <el-button size="small" type="primary" v-if="showUpLoad">点击上传</el-button>
                   <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
                 </el-upload>
-                <span class="tipInfo" v-show="isShowTip">{{
+                <span class="tipInfo" v-show="isShowTip">
+                  {{
                   form.fileList[0] && form.fileList[0].name
-                }}</span>
+                  }}
+                </span>
                 <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
               </el-form-item>
             </div>
             <el-form-item label-width="160px">
-              <div class="uploadInfo" v-if="isSuccessUpload === 1">
-                文件上传中,请稍等...
-              </div>
+              <div class="uploadInfo" v-if="isSuccessUpload === 1">文件上传中,请稍等...</div>
             </el-form-item>
           </el-form>
         </div>
         <div v-if="AssesComSHow && AssesTabSHow" v-show="tabActive == 'two'">
-          <AddAssess
-            @scrollTo="scrollTo"
-            :childScaleData="scaleData"
-            ref="assessRef"
-          />
+          <AddAssess @scrollTo="scrollTo" :childScaleData="scaleData" ref="assessRef" />
         </div>
       </div>
 
       <div class="btn">
-        <el-button type="primary" :disabled="saveDisable" @click="submitForm"
-          >确 定</el-button
-        >
+        <el-button type="primary" :disabled="saveDisable" @click="submitForm">确 定</el-button>
       </div>
     </div>
   </el-scrollbar>
@@ -232,14 +206,14 @@
 /**
  *
  */
-import api from "@api/knowledgeTree.js";
-import DevInfo from "./DevInfo";
-import config from "@api/config";
-import $ from "jquery";
-import AddAssess from "./AddAssess";
+import api from '@api/knowledgeTree.js';
+import DevInfo from './DevInfo';
+import config from '@api/config';
+import $ from 'jquery';
+import AddAssess from './AddAssess';
 
 export default {
-  name: "AddDevKnow",
+  name: 'AddDevKnow',
   components: {
     DevInfo,
     AddAssess
@@ -255,55 +229,55 @@ export default {
       isFixedTop: true,
       isEdit: false,
       isCopy: false,
-      title: "添加",
+      title: '添加',
       termTypes: [],
       terms: [], //术语列表
       form: {
-        conceptId: "", //术语id
+        conceptId: '', //术语id
         isTip: 0, //是否要覆盖,0不覆盖,1覆盖
-        selectedTerm: "", //术语标签
-        termType: "",
-        typeId: "",
-        selectedTermName: "",
-        selectedTermType: "",
+        selectedTerm: '', //术语标签
+        termType: '',
+        typeId: '',
+        selectedTermName: '',
+        selectedTermType: '',
         // titleChange: '',
         fileList: [],
-        name: "",
+        name: '',
         prags: [
           {
             //单个段落相关
-            title: "",
-            content: "",
+            title: '',
+            content: '',
             isReason: 0,
             orderNo: 0,
             position: [],
-            text: ""
+            text: ''
           }
         ],
-        fileTitle: "",
-        titleChange: ""
+        fileTitle: '',
+        titleChange: ''
       },
       rules1: {
         selectedTerm: [
-          { required: true, message: "请选择标准术语", trigger: "change" }
+          { required: true, message: '请选择标准术语', trigger: 'change' }
         ]
       },
       rules: {
         fileTitle: [
-          { required: true, message: "请输入标题名称", trigger: "change" },
+          { required: true, message: '请输入标题名称', trigger: 'change' },
           {
             validator: (rule, value, callback) => {
               if (value.trim().length > 30) {
-                callback(new Error("标题名称不能超过30字"));
+                callback(new Error('标题名称不能超过30字'));
               } else {
                 callback();
               }
             },
-            trigger: "change"
+            trigger: 'change'
           }
         ],
         fileList: [
-          { required: true, message: "请上传文件", trigger: "change" }
+          { required: true, message: '请上传文件', trigger: 'change' }
         ],
         titleChange: [
           // {
@@ -318,7 +292,7 @@ export default {
           //   },
           //   trigger: 'change'
           // },
-          { max: 30, message: "标题最多30字", trigger: "change" }
+          { max: 30, message: '标题最多30字', trigger: 'change' }
         ]
       },
       saveDisable: false, //保存按钮禁止点击
@@ -334,14 +308,14 @@ export default {
       editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
       startCount: -1,
       isSaveSuccess: false, // 是否保存成功
-      tabActive: "one"
+      tabActive: 'one'
     };
   },
   watch: {
     showType: {
       handler(newVal, oldVal) {
         if (newVal !== oldVal) {
-          this.form.prags = this.form.prags.map((item) => {
+          this.form.prags = this.form.prags.map(item => {
             return { ...item, position: [] };
           });
         }
@@ -355,27 +329,27 @@ export default {
       immediate: true
     }
   },
-  created: function () {
+  created: function() {
     const { isEdit, data, isCopy } = this.$route.params;
     if (isEdit || isCopy) {
       const loading = this.$loading({
         lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
       });
       this.showType = data.type; // 编辑页确认显示类型
       this.isEdit = isEdit;
       this.isCopy = isCopy;
-      this.title = isEdit ? "修改" : isCopy ? "复制" : "添加";
+      this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
       (isEdit || isCopy) && this.changeWord(data);
 
       api
         .getBaseRecordById({ id: data.id })
-        .then((res) => {
-          if (res.data.code == "0") {
+        .then(res => {
+          if (res.data.code == '0') {
             const data = res.data.data;
-            console.log("dwadfesvgeosboau13131213h", data.scale);
+            console.log('dwadfesvgeosboau13131213h', data.scale);
             if (data.type === 8) {
               this.AssesComSHow = true;
               if (data.scale) {
@@ -389,7 +363,7 @@ export default {
               // console.log('data',data)
               this.form.fileList =
                 data &&
-                data.map((it) => {
+                data.map(it => {
                   return JSON.parse(it.content);
                 });
               this.showFileList = true;
@@ -406,21 +380,21 @@ export default {
                     data.type == 5 ||
                     data.type == 6
                   ? data.noticeName
-                  : "";
+                  : '';
               this.form.selectedTermName =
-                data.name + (data.typeName ? "(" + data.typeName + ")" : "");
+                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
               this.form.selectedTerm =
-                data.name + (data.typeName ? "(" + data.typeName + ")" : "");
+                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
               if (isCopy) {
                 this.handleClear();
               }
               if (data.details.length) {
                 this.form.prags =
                   data &&
-                  data.details.map((it) => {
+                  data.details.map(it => {
                     return {
                       title: it.title,
-                      position: this.mapStringToNum(it.contentType),
+                      position: it.contentType?it.contentType.split(","):[],
                       content: it.content.replace(
                         /{imageUrlPrefix}/g,
                         config.imgHost
@@ -432,7 +406,7 @@ export default {
                   });
               } else {
                 this.staticTabShow = false;
-                this.tabActiveChange("two");
+                this.tabActiveChange('two');
               }
             }
           }
@@ -440,9 +414,9 @@ export default {
             loading.close();
           }, 200);
         })
-        .catch((error) => {
+        .catch(error => {
           loading.close();
-          if (error.code === "900010001") {
+          if (error.code === '900010001') {
             return false;
           }
           console.log(error);
@@ -482,12 +456,12 @@ export default {
     // }
 
     if (this.startCount !== this.editCount && !this.isSaveSuccess) {
-      this.$alert("还有未保存的内容,确定要退出当前页面吗?", "提示", {
-        confirmButtonText: "确定",
+      this.$alert('还有未保存的内容,确定要退出当前页面吗?', '提示', {
+        confirmButtonText: '确定',
         // cancelButtonText: '取消',
         // cancelButtonClass: 'leaveBtn',
         // customClass: 'leaveBox',
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           next();
@@ -499,7 +473,7 @@ export default {
   },
   methods: {
     scrollTo(dom) {
-      var div = this.$refs["elscrollbar"].$refs["wrap"];
+      var div = this.$refs['elscrollbar'].$refs['wrap'];
       if (dom >= 0) {
         div.scrollTop += dom - 120;
       } else {
@@ -509,64 +483,64 @@ export default {
     handleStaticTab() {
       this.AssesTabSHow = true;
       this.AssesComSHow = true;
-      this.tabActiveChange("two");
+      this.tabActiveChange('two');
     },
     handleAssesTab() {
       this.staticTabShow = true;
       this.form.prags = [
         {
           //单个段落相关
-          title: "",
-          content: "",
+          title: '',
+          content: '',
           isReason: 0,
           orderNo: 0,
           position: [],
-          text: ""
+          text: ''
         }
       ];
-      this.tabActiveChange("one");
+      this.tabActiveChange('one');
     },
     closeStaticTab() {
-      this.$alert("确定要删除该标签?删除后该标签内容将会被清空!", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
+      this.$alert('确定要删除该标签?删除后该标签内容将会被清空!', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
         // cancelButtonClass: 'leaveBtn',
         // customClass: 'leaveBox',
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           this.staticTabShow = false;
-          this.tabActiveChange("two");
+          this.tabActiveChange('two');
         })
         .catch(() => {});
     },
     closeAssesTab() {
-      this.$alert("确定要删除该标签?删除后该标签内容将会被清空!", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
+      this.$alert('确定要删除该标签?删除后该标签内容将会被清空!', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
         // cancelButtonClass: 'leaveBtn',
         // customClass: 'leaveBox',
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           this.AssesTabSHow = false;
           // this.AssesComSHow = false;
-          this.tabActiveChange("one");
+          this.tabActiveChange('one');
         })
         .catch(() => {});
     },
     tabActiveChange(type) {
       this.tabActive = type;
-      if (type == "two") {
+      if (type == 'two') {
         setTimeout(() => {
           this.$refs.assessRef.resizeTable();
         }, 200);
       }
     },
     handleClear() {
-      this.form.selectedTermName = "";
-      this.form.selectedTerm = "";
-      this.form.titleChange = "";
+      this.form.selectedTermName = '';
+      this.form.selectedTerm = '';
+      this.form.titleChange = '';
     },
 
     handleMouseenter() {
@@ -578,12 +552,12 @@ export default {
       this.isShowTip = false;
     },
     changeWord(newVal) {
-      if (newVal.typeName == "量表") {
+      if (newVal.typeName == '量表') {
         this.AssesComSHow = true;
       } else {
         this.staticTabShow = true;
         this.AssesComSHow = false;
-        this.tabActive = "one";
+        this.tabActive = 'one';
       }
       this.toAssesTermId = newVal.id;
       this.showType = newVal.type || -1;
@@ -591,20 +565,20 @@ export default {
       const typeName = newVal.typeName;
       const type = newVal.type;
       this.form.selectedTermName =
-        name + (typeName ? "(" + typeName + ")" : "");
+        name + (typeName ? '(' + typeName + ')' : '');
       // this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
       this.form.name = name;
       this.form.fileList = [];
       this.showFileList = false;
-      this.form.typeId = type || "";
+      this.form.typeId = type || '';
       this.showUpLoad = true;
       this.titleChange =
         type == 1
-          ? "临床路径标题:"
+          ? '临床路径标题:'
           : type == 3 || type == 4 || type == 5 || type == 6
-          ? "注意事项标题:"
-          : "";
-      this.form.fileTitle = "";
+          ? '注意事项标题:'
+          : '';
+      this.form.fileTitle = '';
       if (newVal.typeId === 82 || newVal.typeId === 83) {
         this.upload = true;
         this.form.fileTitle = newVal.title;
@@ -619,12 +593,12 @@ export default {
     },
     reOrder(isUp, i) {
       // isUp: 1 上升    0 下降
-      let div = this.$refs["elscrollbar"].$refs["wrap"];
+      let div = this.$refs['elscrollbar'].$refs['wrap'];
       let temp = {},
         it = {};
       if (isUp === 1) {
         if (i === 0) {
-          this.warning("已经是第一个,不能再升啦!");
+          this.warning('已经是第一个,不能再升啦!');
           return;
         }
         temp = Object.assign(this.form.prags[i - 1]);
@@ -635,7 +609,7 @@ export default {
         });
       } else {
         if (i === this.form.prags.length - 1) {
-          this.warning("已经是最后一个,不能再降啦!");
+          this.warning('已经是最后一个,不能再降啦!');
           return;
         }
         temp = Object.assign(this.form.prags[i + 1]);
@@ -645,25 +619,25 @@ export default {
     },
     addParagraph(i) {
       this.form.prags.splice(i + 1, 0, {
-        title: "",
-        content: "",
+        title: '',
+        content: '',
         isReason: 0,
         position: [],
-        text: ""
+        text: ''
       });
       //添加段落光标自动落到新增的段落中
       setTimeout(() => {
         this.$refs.subForm[i + 1].$el
-          .getElementsByClassName("el-input__inner")[0]
+          .getElementsByClassName('el-input__inner')[0]
           .focus();
       });
     },
     delParagraph(i) {
       if (this.form.prags.length == 1) {
-        this.warning("只剩一个段落,不能再删啦!");
+        this.warning('只剩一个段落,不能再删啦!');
         return;
       }
-      this.showConfirmDialog("确定要删除该段落?", () => {
+      this.showConfirmDialog('确定要删除该段落?', () => {
         this.form.prags.splice(i, 1);
       });
     },
@@ -679,34 +653,33 @@ export default {
       this.showDrop = true;
       api
         .staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] })
-        .then((res) => {
+        .then(res => {
           this.showDrop = false;
-          if (res.data.code === "0") {
+          if (res.data.code === '0') {
             this.terms = res.data.data;
           } else {
-            this.warning("数据获取失败");
+            this.warning('数据获取失败');
           }
         });
     },
     mapStringToNum(str) {
-      return str.split(",").map((it) => {
+      return str.split(',').map(it => {
         return +it;
       });
     },
-
     // 额外的表单检验
     formVal() {
-      let positiontemp = this.form.prags.map((item) => {
+      let positiontemp = this.form.prags.map(item => {
         return [...item.position];
       });
-      let positionArr = positiontemp.reduce(function (a, b) {
+      let positionArr = positiontemp.reduce(function(a, b) {
         return a.concat(b);
       }); // 所有被选中的值集合
-      // console.log(positionArr, "positionArr");
-      // console.log(this.showType, "当前页的显示类型");
-      let isVisFlag = positionArr.some((item) => item === 2);
-      let isDiagFlag = positionArr.some((item) => item === 3);
-      // console.log(isVisFlag, "isVisFlag是否显示");
+      // console.log(positionArr, 'positionArr');
+      // console.log(this.showType, '当前页的显示类型');
+      let isVisFlag = positionArr.some(item => item === '2');
+      let isDiagFlag = positionArr.some(item => item === '3');
+      // console.log(isVisFlag, 'isVisFlag是否显示');
       if (
         (this.showType == 3 ||
           this.showType == 4 ||
@@ -719,18 +692,18 @@ export default {
         this.$refs.groups && this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
-          message: "请输入注意事项标题",
-          trigger: "change"
+          message: '请输入注意事项标题',
+          trigger: 'change'
         });
-        this.$refs.groups && this.$refs.groups.validateField("titleChange");
-        this.$refs.groups && this.$refs.groups.validateField("selectedTerm");
+        this.$refs.groups && this.$refs.groups.validateField('titleChange');
+        this.$refs.groups && this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
-        if (this.form.titleChange.trim() !== "") {
+        if (this.form.titleChange.trim() !== '') {
           // console.log('内容不为空');
           return true;
         } else {
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -742,18 +715,18 @@ export default {
         this.$refs.groups && this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
-          message: "请输入临床路径标题",
-          trigger: "change"
+          message: '请输入临床路径标题',
+          trigger: 'change'
         });
-        this.$refs.groups && this.$refs.groups.validateField("titleChange");
-        this.$refs.groups && this.$refs.groups.validateField("selectedTerm");
+        this.$refs.groups && this.$refs.groups.validateField('titleChange');
+        this.$refs.groups && this.$refs.groups.validateField('selectedTerm');
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
-        if (this.form.titleChange.trim() !== "") {
+        if (this.form.titleChange.trim() !== '') {
           // console.log('内容不为空');
           return true;
         } else {
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -775,7 +748,7 @@ export default {
           if (valid) {
             resolve(true);
           } else {
-            reject("top", object);
+            reject('top', object);
             return false;
           }
         });
@@ -783,7 +756,7 @@ export default {
       all.push(fvalidate1);
       if (this.staticTabShow) {
         if (this.isSuccessUpload === 1) {
-          this.warning("文件上传中,请稍等");
+          this.warning('文件上传中,请稍等');
           return;
         }
         let flagVal = this.formVal(); // 额外的表单校验
@@ -797,7 +770,7 @@ export default {
               if (valid) {
                 resolve(true);
               } else {
-                reject("f", object);
+                reject('f', object);
                 return false;
               }
             });
@@ -815,7 +788,7 @@ export default {
                 // viewHeight += it.$el.getBoundingClientRect().top;
                 it.$refs.form.validate((valid, object) => {
                   if (!valid) {
-                    reject("f", object);
+                    reject('f', object);
                     goOn = false;
                     viewHeightArr.push(it.$el);
                   } else {
@@ -834,20 +807,20 @@ export default {
         all.push(...this.$refs.assessRef.assessCommit());
       }
       // 批量处理Promise返回
-      let transferedPromises = (promises) => {
+      let transferedPromises = promises => {
         // 返回一个处理之后的promise数组
-        return promises.map((promise) => {
-          return promise.then((res) => res).catch((err) => err);
+        return promises.map(promise => {
+          return promise.then(res => res).catch(err => err);
         });
       };
       let promiseArr = transferedPromises(all);
-      await Promise.all(promiseArr).then((resArr) => {
-        let cErrIndex = resArr.findIndex((item) => item.type == "c");
-        let fErrIndex = resArr.findIndex((item) => item == "f");
-        let topErrIndex = resArr.findIndex((item) => item == "top");
+      await Promise.all(promiseArr).then(resArr => {
+        let cErrIndex = resArr.findIndex(item => item.type == 'c');
+        let fErrIndex = resArr.findIndex(item => item == 'f');
+        let topErrIndex = resArr.findIndex(item => item == 'top');
         if (topErrIndex != -1) {
           outIsVia = false;
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -855,20 +828,20 @@ export default {
           if (this.staticTabShow) {
             goOn = false;
           }
-          this.tabActive = "one";
+          this.tabActive = 'one';
           this.$message({
             showClose: true,
             message: `"静态信息"和"评估内容"标签内有未填写项目,请填写完整或者删除该标签!`,
-            type: "warning"
+            type: 'warning'
           });
         } else if (cErrIndex != -1 && fErrIndex == -1) {
-          this.tabActive = "two";
+          this.tabActive = 'two';
           this.$message({
             showClose: true,
             message: `"评估内容"标签内有未填写项目,请填写完整或者删除该标签!`,
-            type: "warning"
+            type: 'warning'
           });
-          let cErrArr = resArr.filter((item) => item.type == "c");
+          let cErrArr = resArr.filter(item => item.type == 'c');
           if (cErrArr) {
             cErrArr = Object.keys(cErrArr[0].object);
           }
@@ -876,7 +849,7 @@ export default {
           this.$nextTick(() => {
             setTimeout(() => {
               let domTop = this.$refs.assessRef.getDom(cErrArr[0]);
-              var div = this.$refs["elscrollbar"].$refs["wrap"];
+              var div = this.$refs['elscrollbar'].$refs['wrap'];
               if (domTop >= 0) {
                 div.scrollTop += domTop - 120;
               } else {
@@ -884,12 +857,12 @@ export default {
               }
             }, 100);
           });
-        } else if (cErrIndex == -1 && fErrIndex != -1) {
-          this.tabActive = "one";
+        } else if (cErrIndex == -1 && fErrIndex != -1&&this.form.typeId=='8') {
+          this.tabActive = 'one';
           this.$message({
             showClose: true,
             message: `"静态信息"标签内有未填写项目,请填写完整或者删除该标签!`,
-            type: "warning"
+            type: 'warning'
           });
         } else {
           assessRule = true;
@@ -897,7 +870,7 @@ export default {
       });
       if (this.staticTabShow && !goOn) {
         setTimeout(() => {
-          var div = this.$refs["elscrollbar"].$refs["wrap"];
+          var div = this.$refs['elscrollbar'].$refs['wrap'];
           if (outIsVia) {
             // 外层校验通过,跳转至下层校验具体位置
             let sTop = viewHeightArr[0].getBoundingClientRect().top;
@@ -928,14 +901,14 @@ export default {
 
       if (this.form.typeId === 82 || this.form.typeId === 83) {
         if (this.form.fileList.length === 0) {
-          this.warning("文件未上传,不存储数据");
+          this.warning('文件未上传,不存储数据');
           return;
         }
         param.push(
           Object.assign(
             {},
             {
-              position: this.form.typeId === 82 ? "8" : "9",
+              position: this.form.typeId === 82 ? '8' : '9',
               conceptId: this.form.conceptId,
               title: this.form.fileTitle,
               orderNo: 0,
@@ -957,16 +930,16 @@ export default {
           obj.conceptId = data[i].conceptId;
           obj.orderNo = i;
           obj.title = data[i].title;
-          obj.contentType = data[i].position.join(",");
+          obj.contentType = data[i].position.join(',');
           tempArr.push(obj);
         }
-        paramsAll.clinicalPathwayName = types == 1 ? this.form.titleChange : "";
+        paramsAll.clinicalPathwayName = types == 1 ? this.form.titleChange : '';
         paramsAll.id = this.conceptId;
         paramsAll.name = this.form.name;
         paramsAll.noticeName =
           types == 3 || types == 4 || types == 5 || types == 6
             ? this.form.titleChange
-            : "";
+            : '';
         paramsAll.type = this.form.typeId;
         if (this.staticTabShow) {
           paramsAll.details = tempArr;
@@ -975,29 +948,29 @@ export default {
         }
         param = paramsAll;
         if (!param.details) param.details = [];
-        param.details.forEach((item) => {
-          let regExp = new RegExp(config.imgHost, "g");
-          item.content = item.content.replace(regExp, "{imageUrlPrefix}");
+        param.details.forEach(item => {
+          let regExp = new RegExp(config.imgHost, 'g');
+          item.content = item.content.replace(regExp, '{imageUrlPrefix}');
         });
         // 评估内容的数据
         param.scale = {};
         console.log(
-          "this.AssesComSHow",
+          'this.AssesComSHow',
           this.AssesComSHow,
-          "AssesTabSHow",
+          'AssesTabSHow',
           this.AssesTabSHow
         );
         if (this.AssesComSHow && this.AssesTabSHow) {
           const assessParam = this.$refs.assessRef.formtParams();
           param.scale = assessParam;
           param.scale.conceptId = this.toAssesTermId;
-          const userInfo = localStorage.getItem("userLoginDTO");
+          const userInfo = localStorage.getItem('userLoginDTO');
           param.scale.modifier = userInfo.linkman;
         }
       }
       // return;
       // this.showSaveDialog(param,'是否'+(this.isEdit?'修改':'保存')+'该静态知识?');
-      console.log("param-------");
+      console.log('param-------');
       console.dir(param);
       // return;
       if (!this.isEdit) {
@@ -1024,14 +997,14 @@ export default {
       param.source = 1; //0:医院端  1:云平台
       api
         .saveBaseOrUpdateRecord(param)
-        .then((res) => {
-          if (res.data.code === "0") {
+        .then(res => {
+          if (res.data.code === '0') {
             this.isSuccessUpload = 0; // 修改文件上传状态为0
-            this.warning(res.data.msg || "保存成功", "success");
+            this.warning(res.data.msg || '保存成功', 'success');
             this.isSaveSuccess = true; // 保存成功,可正常退出
             //返回带搜索条件的首页
             this.$router.push({
-              name: "StaticInfo",
+              name: 'StaticInfo',
               params: Object.assign({}, this.$route.params, {
                 currentPage: 1
               })
@@ -1041,8 +1014,8 @@ export default {
           }
           this.saveDisable = false;
         })
-        .catch((err) => {
-          if (err.code === "900010001") {
+        .catch(err => {
+          if (err.code === '900010001') {
             return false;
           }
           this.saveDisable = false;
@@ -1052,13 +1025,13 @@ export default {
 
     // 弹出窗
     showConfirmDialog(msg, resolve) {
-      this.$alert(msg, "提示", {
-        confirmButtonText: "确定",
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
         // cancelButtonText: '取消',
         // cancelButtonClass: 'cancel',
         // confirmButtonClass: 'confirmBtn',
         dangerouslyUseHTMLString: true,
-        type: "warning"
+        type: 'warning'
       })
         .then(() => {
           resolve();
@@ -1069,7 +1042,8 @@ export default {
       this.$message({
         showClose: true,
         message: msg,
-        type: type || "warning"
+        type: type || 'warning',
+        duration:1000
       });
     },
     handleChange(file, fileList) {
@@ -1083,7 +1057,7 @@ export default {
       // console.log(fileList,this.form.fileList,'aa')
     },
     handleSuccess(response, file, fileList) {
-      if (response.code == "0") {
+      if (response.code == '0') {
         this.showFileList = true;
         this.form.fileList = [];
         this.form.fileList.push({
@@ -1098,7 +1072,7 @@ export default {
         this.isSuccessUpload = 2; // 上传成功状态
         this.$refs.upload && this.$refs.upload.clearValidate(); // 清除校验
       } else {
-        this.warning(response.msg || "上传失败");
+        this.warning(response.msg || '上传失败');
         // this.form.fileList = []
         this.showUpLoad = true;
         this.showFileList = false;
@@ -1118,7 +1092,7 @@ export default {
 
       this.showUpLoad = false;
       if (file.size / 1024 / 1024 >= 500) {
-        this.warning("文件上传失败,超出大小限制500MB");
+        this.warning('文件上传失败,超出大小限制500MB');
         this.form.fileList = [];
         this.showConfirm = false;
         return false;
@@ -1129,8 +1103,8 @@ export default {
     handlePreview(file) {},
     beforeRemove(file, fileList) {
       if (this.showConfirm) {
-        return this.$alert(`确定移除 ${file.name}?`, "", {
-          cancelButtonClass: "cacelBtn"
+        return this.$alert(`确定移除 ${file.name}?`, '', {
+          cancelButtonClass: 'cacelBtn'
         });
       }
     }
@@ -1138,7 +1112,7 @@ export default {
 };
 </script>
 <style lang="less" scoped>
-@import "../../less/common.less";
+@import '../../less/common.less';
 .cell .el-button.delete:focus {
   color: red !important;
 }
@@ -1219,7 +1193,7 @@ export default {
   font-size: 14px;
 }
 .tipInfo:before {
-  content: "";
+  content: '';
   display: block;
   position: absolute;
   // bottom: 9px;

+ 192 - 204
src/components/knowledgeExtra/AddNewRule.vue

@@ -74,11 +74,7 @@
 </style>
 <template>
   <div>
-    <crumbs
-      :title="title"
-      :param="$route.params"
-      linkTo="ZskRuleManager"
-    ></crumbs>
+    <crumbs :title="title" :param="$route.params" linkTo="ZskRuleManager"></crumbs>
     <div id="AddRuleContent">
       <el-form size="mini" :model="form" ref="ruleForm">
         <div class="table_form">
@@ -90,10 +86,7 @@
               :rules="rules.parDescription"
               prop="parDescription"
             >
-              <el-input
-                style="width: 100%"
-                v-model.trim="form.parDescription"
-              />
+              <el-input style="width: 100%" v-model.trim="form.parDescription" />
             </el-form-item>
           </div>
 
@@ -105,18 +98,13 @@
               :rules="rules.parRuleType"
               prop="parRuleType"
             >
-              <el-select
-                v-model="form.parRuleType"
-                placeholder="请选择"
-                @change="ruleTypeChange"
-              >
+              <el-select v-model="form.parRuleType" placeholder="请选择" @change="ruleTypeChange">
                 <el-option
                   v-for="item in ruleTypeList"
                   :key="item.id"
                   :label="item.name"
                   :value="item.id"
-                >
-                </el-option>
+                ></el-option>
               </el-select>
               <template slot="error" slot-scope="scope">
                 <div class="my_error">
@@ -127,13 +115,11 @@
                     placement="top-start"
                     popper-class="popper_class"
                   >
-                    <img src="../../images/exclamationpoint.png" alt="" />
+                    <img src="../../images/exclamationpoint.png" alt />
                   </el-tooltip>
                 </div>
               </template>
-              <div class="tip_text">
-                注:更改规则类型,将会清空已填写的规则内容~
-              </div>
+              <div class="tip_text">注:更改规则类型,将会清空已填写的规则内容~</div>
             </el-form-item>
           </div>
           <div class="table_cell">
@@ -153,26 +139,19 @@
                     placement="top-start"
                     popper-class="popper_class"
                   >
-                    <img src="../../images/exclamationpoint.png" alt="" />
+                    <img src="../../images/exclamationpoint.png" alt />
                   </el-tooltip>
                 </div>
               </template>
-              <el-select
-                v-model="form.parLenCode"
-                placeholder="请选择"
-                @change="ruleTermChange"
-              >
+              <el-select v-model="form.parLenCode" placeholder="请选择" @change="ruleTermChange">
                 <el-option
                   v-for="item in ruleTermTypeList"
                   :key="item.id"
                   :label="item.name"
                   :value="item.code"
-                >
-                </el-option>
+                ></el-option>
               </el-select>
-              <div class="tip_text">
-                注:更改规则术语类型,将会清空已填写的规则内容~
-              </div>
+              <div class="tip_text">注:更改规则术语类型,将会清空已填写的规则内容~</div>
             </el-form-item>
           </div>
           <div class="table_cell">
@@ -196,8 +175,7 @@
                   :key="item.conceptId"
                   :label="item.conceptName"
                   :value="item.conceptId"
-                >
-                </el-option>
+                ></el-option>
               </el-select>
             </el-form-item>
           </div>
@@ -208,21 +186,18 @@
               :rules="rules.parHasSub"
               prop="parHasSub"
             >
-              <el-select
-                v-model="form.parHasSub"
-                placeholder="请选择"
-                @change="hasSubChange"
-              >
+              <el-select v-model="form.parHasSub" placeholder="请选择" @change="hasSubChange">
                 <el-option label="有" :value="1"></el-option>
                 <el-option label="无" :value="0"></el-option>
               </el-select>
             </el-form-item>
           </div>
-          <div
+          <!-- <div
             class="table_cell"
             style="flex: 3; max-width: 50%"
             v-if="showMsg"
           >
+          
             <el-form-item
               label-width="130px"
               label="附加信息:"
@@ -236,7 +211,7 @@
                 v-model.trim="form.parMsg"
               ></el-input>
             </el-form-item>
-          </div>
+          </div>-->
         </div>
         <!-- 表格 -->
         <AddNewRuleTable
@@ -244,6 +219,9 @@
           v-if="form.parHasSub && tableShow"
           :klRuleByIdSub="form.klRuleByIdSub"
           :maxNum="subRuleMaxNum"
+          :showMsg="showMsg"
+          :showMsg2="showMsg2"
+          :ruleTermCodeStr="ruleTermCodeStr"
           @subTypeChange="subTypeChange"
           @searchConcept="searchConcept"
           @addGroup="addGroup"
@@ -259,12 +237,7 @@
         />
         <el-form-item>
           <div class="form_btn">
-            <el-button
-              type="primary"
-              size="medium "
-              @click="submitForm('ruleForm')"
-              >确定</el-button
-            >
+            <el-button type="primary" size="medium " @click="submitForm('ruleForm')">确定</el-button>
           </div>
         </el-form-item>
       </el-form>
@@ -272,14 +245,14 @@
   </div>
 </template>
 <script type="text/javascript">
-import api from "@api/knowledgeLib.js";
-import { formRules } from "./rules";
-import AddNewRuleTable from "./AddNewRuleTable";
+import api from '@api/knowledgeLib.js';
+import { formRules } from './rules';
+import AddNewRuleTable from './AddNewRuleTable';
 export default {
-  name: "AddRule",
+  name: 'AddRule',
   data() {
     return {
-      title: "规则维护-添加规则",
+      title: '规则维护-添加规则',
       ruleTypeList: [], //规则类型列表  1
       ruleTermTypeList: [], //规则术语类型列表  2
       conceptList: [], //医学标准术语列表 3
@@ -288,18 +261,17 @@ export default {
       subRuleMaxNum: null, //规则内容中规则的限制个数
       isCopy: false,
       parId: null,
-      msgDict: "", //显示附加信息的类型
+      msgDict: '', //显示附加信息的类型
       firstPlace: null,
       tableShow: true,
       form: {
-        parDescription: "",
-        parRuleType: "",
-        parConceptId: "",
-        parlibName: "",
-        parLenName: "",
+        parDescription: '',
+        parRuleType: '',
+        parConceptId: '',
+        parlibName: '',
+        parLenName: '',
         parHasSub: undefined,
-        parLenCode: "",
-        parMsg: "",
+        parLenCode: '',
         klRuleByIdSub: []
       },
       rules: formRules
@@ -313,7 +285,7 @@ export default {
     if (info) {
       this.parId = info.parId;
       this.isCopy = param.copy;
-      this.title = "规则维护-" + (this.isCopy ? "复制" : "修改") + "规则";
+      this.title = '规则维护-' + (this.isCopy ? '复制' : '修改') + '规则';
       this.form = JSON.parse(JSON.stringify(info));
       // 编辑初始化选择框
       this.initEdidData();
@@ -327,12 +299,12 @@ export default {
     async initEdidData() {
       // 规则术语类型初始化
       const newruleTermTypeList = await this.ruleTypeList.find(
-        (it) => it.id == this.form.parRuleType
+        it => it.id == this.form.parRuleType
       );
       this.ruleTermTypeList = await newruleTermTypeList.subMenuList;
       // 基础规则类型初始化
       const obj = await this.ruleTermTypeList.find(
-        (it1) => it1.code == this.form.parLenCode
+        it1 => it1.code == this.form.parLenCode
       );
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
@@ -342,10 +314,10 @@ export default {
       ];
       if (this.form.parConceptId && this.checkFirstPlace && this.conceptList) {
         this.firstPlace = this.conceptList.find(
-          (it) => it.conceptId === this.form.parConceptId
+          it => it.conceptId === this.form.parConceptId
         );
         if (this.firstPlace) {
-          this.firstPlace["checkedType"] = this.ruleTermCodeStr;
+          this.firstPlace['checkedType'] = this.ruleTermCodeStrs;
         }
       } else if (!this.form.parConceptId) {
         this.setInitGroupData();
@@ -354,41 +326,40 @@ export default {
         this.firstPlace = null;
       }
       await this.form.klRuleByIdSub.forEach((item, i, arr) => {
-        item.groupId = "groupId" + item.groupType;
-        item.groupChildId = "child" + item.subId;
+        item.groupId = 'groupId' + item.groupType;
+        item.groupChildId = 'child' + item.subId;
         //TODO => 赋值时一定要注意set更新页面
-        this.$set(item, "baseTypes", [...this.baseTypeList]);
+        this.$set(item, 'baseTypes', [...this.baseTypeList]);
         this.$set(
           item,
-          "baseTermTypeList",
-          item.baseTypes.find((it2) => it2.type === item.subType).subMenuList
+          'baseTermTypeList',
+          item.baseTypes.find(it2 => it2.type === item.subType).subMenuList
         );
-        this.$set(item, "conceptList", [
+        this.$set(item, 'conceptList', [
           {
             conceptName: item.subLibName || item.subConceptName,
             conceptId: item.subConceptId
           }
         ]);
         if (item.subMaxOperator || item.subMinOperator) {
-          item.dataType = "1";
+          item.dataType = '1';
         } else if (item.subEqValue) {
-          item.dataType = "2";
+          item.dataType = '2';
         }
 
         // disable
         if (this.form.parHasSub && this.firstPlace) {
           if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
-            this.$set(item, "disabled", false);
+            this.$set(item, 'disabled', false);
           } else {
-            this.$set(item, "disabled", true);
+            this.$set(item, 'disabled', true);
           }
         }
       });
     },
     // 提交
     submitForm(formName) {
-      console.log(this.form);
-      this.$refs[formName].validate((valid) => {
+      this.$refs[formName].validate(valid => {
         if (valid) {
           let params = JSON.parse(JSON.stringify(this.form));
           params.klRuleInfoSaveSub = params.klRuleByIdSub;
@@ -399,12 +370,13 @@ export default {
             } else {
               if (item.groupId == arr[i - 1].groupId) {
                 item.groupType = arr[i - 1].groupType;
+                item.subMsg = arr[i - 1].subMsg;
               } else {
                 item.groupType = arr[i - 1].groupType + 1;
               }
             }
           });
-          params.klRuleInfoSaveSub.forEach((ite) => {
+          params.klRuleInfoSaveSub.forEach(ite => {
             delete ite.groupId;
             delete ite.groupChildId;
             delete ite.rowIndex;
@@ -424,21 +396,19 @@ export default {
     },
     // 子集修改父级的数组
     setFormData(index, data) {
-      this.$set(this.form.klRuleByIdSub[index], "conceptList", data);
+      this.$set(this.form.klRuleByIdSub[index], 'conceptList', data);
     },
     // table_form 规则类型选中
     ruleTypeChange(val) {
-      this.form.parLenCode = "";
-      this.form.parMsg = "";
-      const obj = this.ruleTypeList.find((it) => it.id === val);
+      this.form.parLenCode = '';
+      const obj = this.ruleTypeList.find(it => it.id === val);
       this.ruleTermTypeList = obj.subMenuList;
       this.subRuleMaxNum = undefined;
       this.setInitGroupData();
     },
     // table_form 规则术语类型选中
     ruleTermChange(val) {
-      this.form.parMsg = "";
-      const obj = this.ruleTermTypeList.find((it) => it.code === val);
+      const obj = this.ruleTermTypeList.find(it => it.code === val);
       this.form.parLenName = obj.name;
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
@@ -449,9 +419,9 @@ export default {
     parConceptIdChange(val) {
       this.$nextTick(() => {
         if (val && this.checkFirstPlace && this.conceptList) {
-          this.firstPlace = this.conceptList.find((it) => it.conceptId === val);
+          this.firstPlace = this.conceptList.find(it => it.conceptId === val);
           if (this.firstPlace) {
-            this.firstPlace["checkedType"] = this.ruleTermCodeStr;
+            this.firstPlace['checkedType'] = this.ruleTermCodeStrs;
           }
         } else if (!val) {
           this.setInitGroupData();
@@ -462,29 +432,27 @@ export default {
         if (this.form.parHasSub && this.firstPlace) {
           const dict =
             localStorage
-              .getItem("zskDicts")
-              .match(new RegExp(this.firstPlace.checkedType + "-\\d+", "g")) ||
+              .getItem('zskDicts')
+              .match(new RegExp(this.firstPlace.checkedType + '-\\d+', 'g')) ||
             [];
-          const types = dict[0].split("-");
+          const types = dict[0].split('-');
           let obj = this.form.klRuleByIdSub;
           obj.forEach((item, i, arr) => {
             if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
-              this.$set(item, "disabled", false);
+              this.$set(item, 'disabled', false);
             } else {
-              this.$set(item, "disabled", true);
-              this.$set(item, "subType", parseInt(types[2]));
-              const subobj = this.baseTypeList.find(
-                (it) => it.type == types[2]
-              );
-              this.$set(item, "baseTermTypeList", subobj.subMenuList);
-              this.$set(item, "subLenCode", types[1]);
-              this.$set(item, "subDescription", this.firstPlace.conceptName);
-              this.$set(item, "subConceptId", this.firstPlace.conceptId);
-              this.$set(item, "subConceptName", this.firstPlace.conceptName);
-              this.$set(item, "conceptList", [this.firstPlace]);
+              this.$set(item, 'disabled', true);
+              this.$set(item, 'subType', parseInt(types[2]));
+              const subobj = this.baseTypeList.find(it => it.type == types[2]);
+              this.$set(item, 'baseTermTypeList', subobj.subMenuList);
+              this.$set(item, 'subLenCode', types[1]);
+              this.$set(item, 'subDescription', this.firstPlace.conceptName);
+              this.$set(item, 'subConceptId', this.firstPlace.conceptId);
+              this.$set(item, 'subConceptName', this.firstPlace.conceptName);
+              this.$set(item, 'conceptList', [this.firstPlace]);
             }
           });
-          this.$set(this.form, "klRuleByIdSub", obj);
+          this.$set(this.form, 'klRuleByIdSub', obj);
         }
       });
     },
@@ -494,34 +462,34 @@ export default {
       const date = new Date().valueOf();
       this.$nextTick(() => {
         if (this.form.parHasSub && this.form.parHasSub != 0) {
-          this.$set(this.form, "klRuleByIdSub", [
+          this.$set(this.form, 'klRuleByIdSub', [
             {
               groupId: date,
-              groupChildId: "child" + new Date().valueOf(),
+              groupChildId: 'child' + new Date().valueOf(),
               baseTypes: this.baseTypeList,
               baseTermTypeList: [],
               conceptList: [],
-              subDescription: "",
-              parRuleType: "",
-              subConceptId: "",
-              subType: "",
-              subMaxOperator: "",
-              subMaxUnit: "",
-              subMaxValue: "",
-              subMinOperator: "",
-              subMinUnit: "",
-              subMinValue: "",
-              subEqValue: "",
-              subLenCode: "",
-              dataType: ""
+              subDescription: '',
+              parRuleType: '',
+              subConceptId: '',
+              subType: '',
+              subMaxOperator: '',
+              subMaxUnit: '',
+              subMaxValue: '',
+              subMinOperator: '',
+              subMinUnit: '',
+              subMinValue: '',
+              subEqValue: '',
+              subLenCode: '',
+              dataType: ''
             }
           ]);
         } else {
-          this.$set(this.form, "klRuleByIdSub", []);
+          this.$set(this.form, 'klRuleByIdSub', []);
         }
 
         if (!init) {
-          this.form.parConceptId = ""; //医学标准术语清空
+          this.form.parConceptId = ''; //医学标准术语清空
           this.conceptList = []; //下拉列表清空
           this.firstPlace = null;
         }
@@ -539,35 +507,35 @@ export default {
     // 基础规则类型切换
     subTypeChange(val, index) {
       // index
-      const obj = this.baseTypeList.find((it) => it.type === val);
+      const obj = this.baseTypeList.find(it => it.type === val);
 
       this.$set(
         this.form.klRuleByIdSub[index],
-        "baseTermTypeList",
+        'baseTermTypeList',
         obj.subMenuList
       );
-      this.$set(this.form.klRuleByIdSub[index], "subLenCode", "");
-      this.$set(this.form.klRuleByIdSub[index], "dataType", "");
+      this.$set(this.form.klRuleByIdSub[index], 'subLenCode', '');
+      this.$set(this.form.klRuleByIdSub[index], 'dataType', '');
 
       this.clearConcept(index);
       this.clearNumText(index);
     },
     clearConcept(index) {
-      this.$set(this.form.klRuleByIdSub[index], "subConceptId", "");
+      this.$set(this.form.klRuleByIdSub[index], 'subConceptId', '');
       this.conceptList = [];
     },
     clearNumText(index) {
-      this.$set(this.form.klRuleByIdSub[index], "subMaxOperator", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMaxValue", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMaxUnit", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMinOperator", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMinValue", "");
-      this.$set(this.form.klRuleByIdSub[index], "subMinUnit", "");
-      this.$set(this.form.klRuleByIdSub[index], "subEqValue", "");
-      this.$set(this.form.klRuleByIdSub[index], "subEqOperator", "");
+      this.$set(this.form.klRuleByIdSub[index], 'subMaxOperator', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMaxValue', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMaxUnit', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMinOperator', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMinValue', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subMinUnit', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subEqValue', '');
+      this.$set(this.form.klRuleByIdSub[index], 'subEqOperator', '');
     },
     editKlRuleByIdSub(data) {
-      this.$set(this.form, "klRuleByIdSub", data);
+      this.$set(this.form, 'klRuleByIdSub', data);
       // this.form.klRuleByIdSub = data;
     },
     // 添加分组 || 规则
@@ -580,25 +548,25 @@ export default {
       !date && (date = new Date().valueOf());
       const obj = {
         groupId: date,
-        groupChildId: "child" + new Date().valueOf(),
+        groupChildId: 'child' + new Date().valueOf(),
         baseTypes: this.baseTypeList,
         baseTermTypeList: [],
         conceptList: [],
-        subDescription: "",
-        parRuleType: "",
-        subConceptId: "",
-        subType: "",
-        subMaxOperator: "",
-        subMaxUnit: "",
-        subMaxValue: "",
-        subMinOperator: "",
-        subMinUnit: "",
-        subMinValue: "",
-        subEqValue: "",
-        subLenCode: "",
-        dataType: ""
+        subDescription: '',
+        parRuleType: '',
+        subConceptId: '',
+        subType: '',
+        subMaxOperator: '',
+        subMaxUnit: '',
+        subMaxValue: '',
+        subMinOperator: '',
+        subMinUnit: '',
+        subMinValue: '',
+        subEqValue: '',
+        subLenCode: '',
+        dataType: ''
       };
-      if (typeof arg.index == "number") {
+      if (typeof arg.index == 'number') {
         // 添加规则 直接在当前位置之后添加
         this.form.klRuleByIdSub.splice(arg.index + 1, 0, obj);
       } else {
@@ -609,19 +577,19 @@ export default {
           obj.disabled = true;
           const dict =
             localStorage
-              .getItem("zskDicts")
-              .match(new RegExp(this.firstPlace.checkedType + "-\\d+", "g")) ||
+              .getItem('zskDicts')
+              .match(new RegExp(this.firstPlace.checkedType + '-\\d+', 'g')) ||
             [];
-          const types = dict[0].split("-");
-          this.$set(obj, "disabled", true);
-          this.$set(obj, "subType", parseInt(types[2]));
-          const subobj = this.baseTypeList.find((it) => it.type == types[2]);
-          this.$set(obj, "baseTermTypeList", subobj.subMenuList);
-          this.$set(obj, "subLenCode", types[1]);
-          this.$set(obj, "subDescription", this.firstPlace.conceptName);
-          this.$set(obj, "subConceptId", this.firstPlace.conceptId);
-          this.$set(obj, "subConceptName", this.firstPlace.conceptName);
-          this.$set(obj, "conceptList", [this.firstPlace]);
+          const types = dict[0].split('-');
+          this.$set(obj, 'disabled', true);
+          this.$set(obj, 'subType', parseInt(types[2]));
+          const subobj = this.baseTypeList.find(it => it.type == types[2]);
+          this.$set(obj, 'baseTermTypeList', subobj.subMenuList);
+          this.$set(obj, 'subLenCode', types[1]);
+          this.$set(obj, 'subDescription', this.firstPlace.conceptName);
+          this.$set(obj, 'subConceptId', this.firstPlace.conceptId);
+          this.$set(obj, 'subConceptName', this.firstPlace.conceptName);
+          this.$set(obj, 'conceptList', [this.firstPlace]);
         }
         var i = -1;
         this.form.klRuleByIdSub.forEach((item, inx) => {
@@ -633,32 +601,31 @@ export default {
       }
       this.$nextTick(() => {
         this.$refs.tableView.scrollFun();
-        
       });
     },
     // 删除分组
     delGroup(groupId) {
       const list = this.form.klRuleByIdSub.filter(
-        (item) => item.groupId != groupId
+        item => item.groupId != groupId
       );
       this.form.klRuleByIdSub = list;
     },
     // 删除规则
     delGroupChild(groupChildId) {
       const newGroupList = this.form.klRuleByIdSub.filter(
-        (item) => item.groupChildId != groupChildId
+        item => item.groupChildId != groupChildId
       );
       this.form.klRuleByIdSub = newGroupList;
     },
     setDict() {
-      this.dict = localStorage.getItem("zskDicts");
-      this.msgDict = localStorage.getItem("zskMsgDict");
-      this.subDict = localStorage.getItem("zskSubDict");
+      this.dict = localStorage.getItem('zskDicts');
+      this.msgDict = localStorage.getItem('zskMsgDict');
+      this.subDict = localStorage.getItem('zskSubDict');
     },
     showConfirmDialog(msg, resolve) {
-      this.$alert(msg, "提示", {
-        confirmButtonText: "确定",
-        type: "warning"
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
       })
         .then(() => {
           resolve();
@@ -673,34 +640,34 @@ export default {
       };
       api
         .searchConcept(param)
-        .then((res) => {
-          if (res.data.code == "0") {
+        .then(res => {
+          if (res.data.code == '0') {
             const data = res.data.data;
             this.conceptList = data;
           }
         })
-        .catch((error) => {
+        .catch(error => {
           console.log(error);
         });
     },
     getTypeList() {
-      this.ruleTypeList = JSON.parse(localStorage.getItem("zskTypesList"));
+      this.ruleTypeList = JSON.parse(localStorage.getItem('zskTypesList'));
     },
     saveRule(params) {
-      api.saveRule(params).then((res) => {
+      api.saveRule(params).then(res => {
         if (res.data.code == 0) {
           this.$message({
-            message: "操作成功",
-            type: "success"
+            message: '操作成功',
+            type: 'success'
           });
           this.$router.push({
-            name: "ZskRuleManager",
+            name: 'ZskRuleManager',
             params: Object.assign({}, this.$route.params, { currentPage: 1 })
           });
         } else {
           this.$message({
             message: res.data.msg,
-            type: "warning"
+            type: 'warning'
           });
         }
       });
@@ -709,53 +676,53 @@ export default {
      * 子组件调用方法
      */
     childClearConcept(index) {
-      this.$set(this.form.klRuleByIdSub[index], "subConceptId", "");
-      this.$set(this.form.klRuleByIdSub[index], "conceptList", []);
+      this.$set(this.form.klRuleByIdSub[index], 'subConceptId', '');
+      this.$set(this.form.klRuleByIdSub[index], 'conceptList', []);
     },
     childClearNumText(index) {
       let obj = JSON.parse(JSON.stringify(this.form.klRuleByIdSub));
 
-      obj[index].subMaxOperator = "";
-      obj[index].subMaxValue = "";
-      obj[index].subMaxUnit = "";
-      obj[index].subMinOperator = "";
-      obj[index].subMinValue = "";
-      obj[index].subMinUnit = "";
-      obj[index].subEqValue = "";
+      obj[index].subMaxOperator = '';
+      obj[index].subMaxValue = '';
+      obj[index].subMaxUnit = '';
+      obj[index].subMinOperator = '';
+      obj[index].subMinValue = '';
+      obj[index].subMinUnit = '';
+      obj[index].subEqValue = '';
       // this.$set(obj[index], "subEqValue", "");
-      obj[index].subEqOperator = "";
+      obj[index].subEqOperator = '';
       // this.klRuleByIdSub = obj;
       // this.$emit("editKlRuleByIdSub", obj);
       this.editKlRuleByIdSub(obj);
     },
     ChildDataTypeChange(val, index) {
-      this.form.klRuleByIdSub[index].subEqOperator = val === "2" ? "=" : "";
+      this.form.klRuleByIdSub[index].subEqOperator = val === '2' ? '=' : '';
       this.$set(
         this.form.klRuleByIdSub[index],
-        "subEqOperator",
-        val === "2" ? "=" : ""
+        'subEqOperator',
+        val === '2' ? '=' : ''
       );
 
       this.childClearNumText(index);
       // TODO 新增的内容追踪不到
       this.form.klRuleByIdSub.forEach((item, i) => {
         if (index === i) {
-          this.$set(item, "dataType", val);
+          this.$set(item, 'dataType', val);
         }
       });
     },
     childSubCodeChange(val, index, numTypes) {
-      if ((numTypes + ",").indexOf(val + ",") > -1) {
-        this.$set(this.form.klRuleByIdSub[index], "dataType", "1");
+      if ((numTypes + ',').indexOf(val + ',') > -1) {
+        this.$set(this.form.klRuleByIdSub[index], 'dataType', '1');
       } else {
-        this.$set(this.form.klRuleByIdSub[index], "dataType", "");
+        this.$set(this.form.klRuleByIdSub[index], 'dataType', '');
       }
       this.childClearConcept(index);
       this.childClearNumText(index);
     }
   },
   watch: {
-    "form.klRuleByIdSub": {
+    'form.klRuleByIdSub': {
       handler(val) {
         this.form.klRuleByIdSub.forEach((item, i, arr) => {
           if (i == 0) {
@@ -771,30 +738,51 @@ export default {
     }
   },
   computed: {
-    disable: function () {
+    disable: function() {
       return Object.keys(this.firstPlace || {}).length > 0;
     },
-    ruleTermCodeStr: function () {
-      const str = this.form.parRuleType + "-" + this.form.parLenCode;
+    ruleTermCodeStr: function() {
+      const str = this.form.parRuleType + '-' + this.form.parLenCode + '-' + 1;
+      if (str.length <= 1) {
+        return '';
+      }
+      return str;
+    },
+    ruleTermCodeStr2: function() {
+      const str = this.form.parRuleType + '-' + this.form.parLenCode + '-' + 0;
+      if (str.length <= 1) {
+        return '';
+      }
+      
+      return str;
+    },
+    ruleTermCodeStrs: function() {
+      const str = this.form.parRuleType + '-' + this.form.parLenCode;
       if (str.length <= 1) {
-        return "";
+        return '';
       }
       return str;
     },
-    showMsg: function () {
+    showMsg: function() {
       return (
         this.ruleTermCodeStr.length > 2 &&
         this.msgDict.indexOf(this.ruleTermCodeStr) > -1
       );
     },
+    showMsg2: function() {
+      return (
+        this.ruleTermCodeStr2.length > 2 &&
+        this.msgDict.indexOf(this.ruleTermCodeStr2) > -1
+      );
+    },
     showHasSub() {
-      if (this.ruleTermCodeStr.length > 2) {
-        return this.subDict.indexOf(this.ruleTermCodeStr) != -1;
+      if (this.ruleTermCodeStrs.length > 2) {
+        return this.subDict.indexOf(this.ruleTermCodeStrs) != -1;
       }
       return false;
     },
-    checkFirstPlace: function () {
-      return this.dict.indexOf(this.ruleTermCodeStr) > -1;
+    checkFirstPlace: function() {
+      return this.dict.indexOf(this.ruleTermCodeStrs) > -1;
     }
   },
   components: { AddNewRuleTable }

+ 147 - 115
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -37,6 +37,24 @@
     // position: absolute;
     top: 28px;
   }
+  .form-texarea {
+    /deep/ .el-form-item__error {
+      // position: absolute;
+      top: 54px !important;
+    }
+    /deep/ .el-textarea__inner {
+      resize: none;
+    }
+  }
+  .texarea-form {
+    /deep/ .el-form-item__error {
+      // position: absolute;
+      top: 32px;
+    }
+    /deep/ .el-textarea__inner {
+      resize: none;
+    }
+  }
   .type_content {
     /deep/ .el-form-item--mini.el-form-item,
     .el-form-item--small.el-form-item {
@@ -69,7 +87,7 @@
   .custom_table_header {
     vertical-align: middle;
     &::before {
-      content: "*";
+      content: '*';
       color: red;
       font-size: 12px;
       margin-right: 4px;
@@ -123,46 +141,54 @@
         <template slot-scope="scope">
           <div class="btn_box">
             <div class="btn_div">
-              <img
-                @click="addGroup(scope)"
-                src="../../images/add-new-rule-sub.png"
-                alt=""
-              />
+              <img @click="addGroup(scope)" src="../../images/add-new-rule-sub.png" alt />
             </div>
             <div class="btn_div" v-if="!isLastDate(scope.row.groupId)">
               <img
                 @click="$emit('delGroup', scope.row.groupId)"
                 src="../../images/add-new-rule-del.png"
-                alt=""
+                alt
               />
             </div>
           </div>
         </template>
       </el-table-column>
       <el-table-column
-        width="80px"
-        v-if="maxNum && maxNum > 1"
-        fixed="left"
-        label="基础规则"
-        prop="groupType"
+        width="170px"
+        label="附加信息"
+        v-if="showMsg || showMsg2"
       >
+      
+        <template slot="header" slot-scope="scope">
+          <div :class="showMsg?'custom_table_header':''">附加信息</div>
+        </template>
+        <template slot-scope="scope">
+          <el-form-item
+            :prop="`klRuleByIdSub[${scope.$index}].subMsg`"
+            :rules="showMsg?rules.subMsg:showMsg2?rules.subMsgs:[]"
+            :class="scope.row.subMsg?'form-texarea':''"
+            class="texarea-form"
+          >
+            <el-input
+              type="textarea"
+              :autosize="{minRows: 1,maxRows: 2}"
+              placeholder="请输入附加信息"
+              v-model.trim="scope.row.subMsg"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column width="80px" v-if="maxNum && maxNum > 1" label="基础规则" prop="groupType">
         <template slot-scope="scope">
           <div class="btn_box">
             <div class="btn_div" v-if="!isMax(scope.row.groupId)">
-              <img
-                @click="addChildGroup(scope)"
-                src="../../images/add-new-rule-sub.png"
-                alt=""
-              />
+              <img @click="addChildGroup(scope)" src="../../images/add-new-rule-sub.png" alt />
             </div>
-            <div
-              class="btn_div"
-              v-if="klRuleByIdSub.length > 1 && !scope.row.disabled"
-            >
+            <div class="btn_div" v-if="klRuleByIdSub.length > 1 && !scope.row.disabled">
               <img
                 @click="$emit('delGroupChild', scope.row.groupChildId)"
                 src="../../images/add-new-rule-del.png"
-                alt=""
+                alt
               />
             </div>
           </div>
@@ -181,7 +207,7 @@
             <el-input
               type="text"
               :disabled="scope.row.disabled"
-              v-model="scope.row.subDescription"
+              v-model.trim="scope.row.subDescription"
               clearable
               placeholder="请输入"
             ></el-input>
@@ -213,8 +239,7 @@
                 :key="item.id"
                 :label="item.name"
                 :value="item.type"
-              >
-              </el-option>
+              ></el-option>
             </el-select>
           </el-form-item>
         </template>
@@ -244,8 +269,7 @@
                 :key="item.id"
                 :label="item.name"
                 :value="item.code"
-              >
-              </el-option>
+              ></el-option>
             </el-select>
           </el-form-item>
         </template>
@@ -275,13 +299,12 @@
                 :key="item.conceptId"
                 :label="item.conceptName"
                 :value="item.conceptId"
-              >
-              </el-option>
+              ></el-option>
             </el-select>
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column label="规则具体内容" min-width="900px" prop="">
+      <el-table-column label="规则具体内容" min-width="900px" prop>
         <template slot-scope="scope">
           <div class="type_content">
             <el-form-item
@@ -299,8 +322,8 @@
                 "
                 :ref="`klRuleByIdSub[${scope.$index}].dataType`"
               >
-                <el-option label="数值类型" value="1"> </el-option>
-                <el-option label="文本类型" value="2"> </el-option>
+                <el-option label="数值类型" value="1"></el-option>
+                <el-option label="文本类型" value="2"></el-option>
               </el-select>
             </el-form-item>
             <!-- v-if="klRuleByIdSub[scope.$index].dataType === '1'" -->
@@ -342,8 +365,7 @@
                         :key="item.key"
                         :label="item.name"
                         :value="item.key"
-                      >
-                      </el-option>
+                      ></el-option>
                     </el-select>
                   </el-form-item>
                 </el-col>
@@ -369,9 +391,7 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="6">
-                  <el-form-item
-                    :prop="`klRuleByIdSub[${scope.$index}].subMaxUnit`"
-                  >
+                  <el-form-item :prop="`klRuleByIdSub[${scope.$index}].subMaxUnit`">
                     <el-input
                       type="text"
                       @focus="setScrollRight"
@@ -420,8 +440,7 @@
                         :key="item.name"
                         :label="item.name"
                         :value="item.name"
-                      >
-                      </el-option>
+                      ></el-option>
                     </el-select>
                   </el-form-item>
                 </el-col>
@@ -447,9 +466,7 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="6">
-                  <el-form-item
-                    :prop="`klRuleByIdSub[${scope.$index}].subMinUnit`"
-                  >
+                  <el-form-item :prop="`klRuleByIdSub[${scope.$index}].subMinUnit`">
                     <el-input
                       type="text"
                       @focus="setScrollRight"
@@ -461,10 +478,7 @@
               </el-row>
             </el-form-item>
             <!-- v-if="klRuleByIdSub[scope.$index].subType !== 6 && klRuleByIdSub[scope.$index].dataType === '2'" -->
-            <div
-              style="flex: 2"
-              v-if="scope.row.subType != 6 && scope.row.dataType == '2'"
-            >
+            <div style="flex: 2" v-if="scope.row.subType != 6 && scope.row.dataType == '2'">
               <el-form-item
                 class="type_content_item"
                 style="width: 100%"
@@ -534,21 +548,21 @@
 </template>
 
 <script>
-import api from "@api/knowledgeLib.js";
-import { tableRules } from "./rules";
+import api from '@api/knowledgeLib.js';
+import { tableRules } from './rules';
 export default {
-  name: "AddNewRuleTable",
+  name: 'AddNewRuleTable',
   data() {
     return {
-      numTypes: "",
-      subConceptIdIndex: "",
+      numTypes: '',
+      subConceptIdIndex: '',
       operMaxList: [
-        { name: "<=", key: "<=" },
-        { name: "<", key: "<" }
+        { name: '<=', key: '<=' },
+        { name: '<', key: '<' }
       ],
       operMinList: [
-        { name: ">", key: ">" },
-        { name: ">=", key: ">=" }
+        { name: '>', key: '>' },
+        { name: '>=', key: '>=' }
       ],
       rules: tableRules,
       theRef: null
@@ -562,20 +576,20 @@ export default {
     },
     maxChange(e, val, type) {
       if (
-        type === "i" &&
+        type === 'i' &&
         this.klRuleByIdSub[val].subMaxOperator &&
-        this.klRuleByIdSub[val].subMaxOperator != ""
+        this.klRuleByIdSub[val].subMaxOperator != ''
       ) {
-        this.$emit("clearValidate", [
+        this.$emit('clearValidate', [
           `klRuleByIdSub[${val}].subMinValue`,
           `klRuleByIdSub[${val}].subMinOperator`
         ]);
       } else if (
-        type === "s" &&
+        type === 's' &&
         this.klRuleByIdSub[val].subMaxValue &&
-        this.klRuleByIdSub[val].subMaxValue != ""
+        this.klRuleByIdSub[val].subMaxValue != ''
       ) {
-        this.$emit("clearValidate", [
+        this.$emit('clearValidate', [
           `klRuleByIdSub[${val}].subMinValue`,
           `klRuleByIdSub[${val}].subMinOperator`
         ]);
@@ -584,20 +598,20 @@ export default {
     },
     minChange(e, val, type) {
       if (
-        type === "i" &&
+        type === 'i' &&
         this.klRuleByIdSub[val].subMinOperator &&
-        this.klRuleByIdSub[val].subMinOperator != ""
+        this.klRuleByIdSub[val].subMinOperator != ''
       ) {
-        this.$emit("clearValidate", [
+        this.$emit('clearValidate', [
           `klRuleByIdSub[${val}].subMaxOperator`,
           `klRuleByIdSub[${val}].subMaxValue`
         ]);
       } else if (
-        type === "s" &&
+        type === 's' &&
         this.klRuleByIdSub[val].subMinValue &&
-        this.klRuleByIdSub[val].subMinValue != ""
+        this.klRuleByIdSub[val].subMinValue != ''
       ) {
-        this.$emit("clearValidate", [
+        this.$emit('clearValidate', [
           `klRuleByIdSub[${val}].subMaxOperator`,
           `klRuleByIdSub[${val}].subMaxValue`
         ]);
@@ -605,11 +619,11 @@ export default {
       this.setScrollRight();
     },
     addGroup(scope) {
-      this.$emit("addGroup", null, { groupId: scope.row.groupId });
+      this.$emit('addGroup', null, { groupId: scope.row.groupId });
       this.$refs.table.bodyWrapper.scrollLeft = 0;
     },
     addChildGroup(scope) {
-      this.$emit("addGroup", scope.row.groupId, { index: scope.$index });
+      this.$emit('addGroup', scope.row.groupId, { index: scope.$index });
       this.$refs.table.bodyWrapper.scrollLeft = 0;
     },
     scrollFun() {
@@ -626,15 +640,16 @@ export default {
     // },
     // cellStyle
     cellStyle({ row, column, rowIndex, columnIndex }) {
-      if (column.label == "组" || column.label == "基础规则") return {};
-      return { "vertical-align": "top", "padding-top": "14px" };
+      if (column.label == '组' || column.label == '基础规则') return {};
+      if (column.label == '附加信息') return { 'padding-top': '14px' };
+      return { 'vertical-align': 'top', 'padding-top': '14px' };
     },
     // 最大值 选择rule
     subMaxOperator(scope, rule, value, callback) {
       const { subMaxValue, subMinOperator, subMinValue } = scope.row;
       const val = value + subMinOperator + subMinValue + subMaxValue;
-      if (!val || (!value && subMaxValue !== "")) {
-        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+      if (!val || (!value && subMaxValue !== '')) {
+        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
       } else {
         callback();
       }
@@ -644,10 +659,10 @@ export default {
       const { subMaxOperator, subMinOperator, subMinValue } = scope.row;
       const val = value + subMaxOperator + subMinValue + subMinOperator;
       const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
-      if (!val || (value == "" && subMaxOperator)) {
-        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
-      } else if (value !== "" && !isNum) {
-        callback(new Error("只能输入数字"));
+      if (!val || (value == '' && subMaxOperator)) {
+        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+      } else if (value !== '' && !isNum) {
+        callback(new Error('只能输入数字'));
       } else {
         callback();
       }
@@ -656,8 +671,8 @@ export default {
     subMinOperatorRule(scope, rule, value, callback) {
       const { subMaxValue, subMaxOperator, subMinValue } = scope.row;
       const val = value + subMaxOperator + subMinValue + subMaxValue;
-      if (!val || (!value && subMinValue !== "")) {
-        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
+      if (!val || (!value && subMinValue !== '')) {
+        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
       } else {
         callback();
       }
@@ -667,40 +682,39 @@ export default {
       const { subMaxValue, subMinOperator, subMaxOperator } = scope.row;
       const val = value + subMaxOperator + subMaxValue + subMinOperator;
       const isNum = /^(\-|\+)?\d+(\.\d+)?$/.test(value);
-      if (!val || (value == "" && subMinOperator)) {
-        callback(new Error("最大值和最小值至少完整填写一个,单位不必填"));
-      } else if (value !== "" && !isNum) {
-        callback(new Error("只能输入数字"));
+      if (!val || (value == '' && subMinOperator)) {
+        callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+      } else if (value !== '' && !isNum) {
+        callback(new Error('只能输入数字'));
       } else {
         callback();
       }
     },
     // 医学内容rule
     subEqValue(scope, rule, value, callback) {
-      if (value === "") {
-        callback(new Error("请输入" + this.textName(scope.$index)));
+      if (value === '') {
+        callback(new Error('请输入' + this.textName(scope.$index)));
       } else if (value.length > 200) {
-        callback(new Error(this.textName(scope.$index) + "不能超过200字"));
+        callback(new Error(this.textName(scope.$index) + '不能超过200字'));
       } else {
         callback();
       }
     },
     // 判断是否为最后一条规则
     isLastDate(id) {
-      const tableLength = this.klRuleByIdSub.filter(
-        (item) => item.groupId !== id
-      ).length;
+      const tableLength = this.klRuleByIdSub.filter(item => item.groupId !== id)
+        .length;
       return tableLength === 0;
     },
     // 是否超出最大规则数
     isMax(id) {
-      const typeNum = this.klRuleByIdSub.filter((item) => item.groupId === id)
+      const typeNum = this.klRuleByIdSub.filter(item => item.groupId === id)
         .length;
       return typeNum >= this.maxNum;
     },
     // 基础规则类型选择
     subTypeChange(e, index) {
-      this.$emit("subTypeChange", e, index);
+      this.$emit('subTypeChange', e, index);
     },
     //
     setTheRef(e, val) {
@@ -709,17 +723,17 @@ export default {
     // 规则术语类型
     subCodeChange(val, index) {
       //基础规则术语类型修改
-      this.$emit("childSubCodeChange", val, index, this.numTypes);
+      this.$emit('childSubCodeChange', val, index, this.numTypes);
     },
     clearConcept(index) {
-      this.$emit("childClearConcept", index);
+      this.$emit('childClearConcept', index);
     },
     clearNumText(index) {
-      this.$emit("childClearNumText", index);
+      this.$emit('childClearNumText', index);
     },
     //医学标准术语change
     subConceptIdfocus(index) {
-      this.subConceptIdIndex = "";
+      this.subConceptIdIndex = '';
       this.subConceptIdIndex = index;
       this.setTheRef(1, `klRuleByIdSub[${index}].subConceptId`);
     },
@@ -734,18 +748,18 @@ export default {
       };
       api
         .searchConcept(param)
-        .then((res) => {
-          if (res.data.code == "0") {
+        .then(res => {
+          if (res.data.code == '0') {
             const data = res.data.data;
-            this.$emit("setFormData", this.subConceptIdIndex, data);
+            this.$emit('setFormData', this.subConceptIdIndex, data);
           }
         })
-        .catch((error) => {
+        .catch(error => {
           console.log(error);
         });
     },
     dataTypeChange(val, index) {
-      this.$emit("ChildDataTypeChange", val, index);
+      this.$emit('ChildDataTypeChange', val, index);
     },
     // 处理要合并相同行的列
     getSpanArr(data) {
@@ -778,31 +792,40 @@ export default {
     },
     // 合并单元格
     ObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (columnIndex == 0) {
-        const _row = this.spanArr[rowIndex];
-        const _col = _row > 0 ? 1 : 0;
-        return {
-          rowspan: _row,
-          colspan: _col
-        };
+      if (this.ruleTermCodeStr == '3-108-1' || this.ruleTermCodeStr == '4-108-1') {
+        if (columnIndex == 0) {
+          const _row = this.spanArr[rowIndex];
+          const _col = _row > 0 ? 1 : 0;
+          return {
+            rowspan: _row,
+            colspan: _col
+          };
+        }
+      } else {
+        if (columnIndex == 0 || columnIndex == 1) {
+          const _row = this.spanArr[rowIndex];
+          const _col = _row > 0 ? 1 : 0;
+          return {
+            rowspan: _row,
+            colspan: _col
+          };
+        }
       }
     },
     showDataType(index) {
       return (
-        (this.numTypes + ",").indexOf(
-          this.klRuleByIdSub[index].subLenCode + ","
+        (this.numTypes + ',').indexOf(
+          this.klRuleByIdSub[index].subLenCode + ','
         ) === -1
       );
     },
     textName(index) {
       return this.klRuleByIdSub[index].subType !== 6 &&
-        this.klRuleByIdSub[index].dataType == "2"
-        ? "医学内容"
-        : "正则表达式";
+        this.klRuleByIdSub[index].dataType == '2'
+        ? '医学内容'
+        : '正则表达式';
     },
     blurRef() {
-      console.log("scroll");
-      console.log(this.$refs[this.theRef]);
       if (this.theRef) {
         this.$refs[this.theRef].blur();
         // console.log(document.getElementById(this.theRef).blur,'hehehe');
@@ -823,7 +846,7 @@ export default {
     // );
   },
   created() {
-    this.numTypes = localStorage.getItem("zskNumDict");
+    this.numTypes = localStorage.getItem('zskNumDict');
     this.getSpanArr(this.klRuleByIdSub);
   },
   beforeUpdate() {
@@ -855,6 +878,15 @@ export default {
     },
     maxNum: {
       default: null
+    },
+    showMsg: {
+      default: null
+    },
+    showMsg2:{
+      default: null
+    },
+    ruleTermCodeStr: {
+      default: null
     }
   }
 };

+ 90 - 110
src/components/knowledgeExtra/DevInfo.vue

@@ -14,19 +14,16 @@
                 <el-option label="是" :value="1"></el-option>
             </el-select>
     </el-form-item>-->
-    <el-form-item
-      label="段落标题:"
-      prop="title"
-      label-width="160px"
-      class="is-required"
-    >
+    <el-form-item label="段落标题:" prop="title" label-width="160px" class="is-required">
       <el-input v-model="data.title"></el-input>
     </el-form-item>
     <el-form-item label="内容类型:" prop="position" label-width="160px">
       <el-checkbox-group v-model="data.position">
-        <el-checkbox v-for="it in positions" :key="it.key" :label="it.key">{{
+        <el-checkbox v-for="it in positions" :key="it.val" :label="it.val">
+          {{
           it.name
-        }}</el-checkbox>
+          }}
+        </el-checkbox>
       </el-checkbox-group>
     </el-form-item>
     <el-form-item label="内容" prop="content" label-width="160px" ref="editor">
@@ -50,7 +47,7 @@
         @click="reOrder(0)"
         >下降</a
       >
-    </div> -->
+    </div>-->
     <div class="move_btn">
       <div
         v-if="index !== 0"
@@ -65,7 +62,7 @@
               ? require('@/images/icon_hover_top.png')
               : require('@/images/icon_default_top.png')
           "
-          alt=""
+          alt
         />
       </div>
       <div
@@ -81,7 +78,7 @@
               ? require('@/images/icon_hover_down.png')
               : require('@/images/icon_default_down.png')
           "
-          alt=""
+          alt
         />
       </div>
     </div>
@@ -89,7 +86,7 @@
       <!-- <el-button size="small" @click="addEmit">添加段落</el-button>
       <el-button size="small" @click="delEmit" type="info"
         >删除本段落</el-button
-      > -->
+      >-->
       <div class="change_btns">
         <div @click="addEmit">添加段落</div>
         <div @click="delEmit">删除本段落</div>
@@ -99,17 +96,17 @@
 </template>
 
 <script>
-import api from "@api/knowledgeTree.js";
-import "quill/dist/quill.core.css";
-import "quill/dist/quill.snow.css";
-import "quill/dist/quill.bubble.css";
-import { quillEditor, Quill } from "vue-quill-editor";
-import config from "@api/config";
-import { container, ImageExtend, QuillWatch } from "quill-image-extend-module";
-Quill.register("modules/ImageExtend", ImageExtend);
+import api from '@api/knowledgeTree.js';
+import 'quill/dist/quill.core.css';
+import 'quill/dist/quill.snow.css';
+import 'quill/dist/quill.bubble.css';
+import { quillEditor, Quill } from 'vue-quill-editor';
+import config from '@api/config';
+import { container, ImageExtend, QuillWatch } from 'quill-image-extend-module';
+Quill.register('modules/ImageExtend', ImageExtend);
 export default {
-  props: ["data", "index", "isEdit", "isCopy", "total", "showType"],
-  name: "DevInfo",
+  props: ['data', 'index', 'isEdit', 'isCopy', 'total', 'showType'],
+  name: 'DevInfo',
   components: {
     quillEditor
   },
@@ -119,12 +116,12 @@ export default {
       moveBottomHover: false,
       toolbars: [
         [
-          ["bold", "underline", "strike"],
-          [{ list: "ordered" }, { list: "bullet" }],
-          [{ script: "sub" }, { script: "super" }],
+          ['bold', 'underline', 'strike'],
+          [{ list: 'ordered' }, { list: 'bullet' }],
+          [{ script: 'sub' }, { script: 'super' }],
           [{ color: [] }, { background: [] }],
           [{ align: [] }],
-          ["image"]
+          ['image']
         ]
       ],
       toolbarMode: 0,
@@ -132,24 +129,24 @@ export default {
         modules: {
           ImageExtend: {
             loading: true,
-            name: "upfile",
+            name: 'upfile',
             size: 1,
             sizeError: () => {
               this.$message({
                 showClose: true,
-                message: "请上传 1M 以内的图片!",
-                type: "warning"
+                message: '请上传 1M 以内的图片!',
+                type: 'warning'
               });
             },
             action: config.urls.promptServer,
-            response: (res) => {
-              if (res.code == "0") {
+            response: res => {
+              if (res.code == '0') {
                 return config.imgHost + res.data.url;
               } else {
                 this.$message({
                   showClose: true,
                   message: res.msg,
-                  type: "warning"
+                  type: 'warning'
                 });
               }
             }
@@ -157,7 +154,7 @@ export default {
           toolbar: {
             container: container,
             handlers: {
-              image: function () {
+              image: function() {
                 QuillWatch.emit(this.quill.id);
               }
             }
@@ -173,66 +170,68 @@ export default {
     };
   },
   watch: {
-    "data.content": function () {
-      if (this.data.content !== "") {
+    'data.content': function() {
+      if (this.data.content !== '') {
         this.$refs.editor && this.$refs.editor.clearValidate(); // 清除校验
       }
-      if (this.data.content === "") {
+      if (this.data.content === '') {
         // console.log('内容为空');
-        this.$refs["form"].validateField("content"); // 手动校验
+        this.$refs['form'].validateField('content'); // 手动校验
       }
       this.data.text = this.$refs.quillEditor.quill.root.innerText;
     }
   },
   created() {
     // console.log(this.showType, 'showType','需要显示的类型');
-    this.editorOption.modules.toolbar.container =
-      this.toolbars[this.toolbarMode];
-    this.renderPositions();
+    this.editorOption.modules.toolbar.container = this.toolbars[
+      this.toolbarMode
+    ];
+    this.zskgetDict();
+
     if (this.isEdit || this.isCopy) {
       setTimeout(() => {
         this.rules = {
           position: [
-            { required: true, message: "请选择内容类型", trigger: "change" }
+            { required: true, message: '请选择内容类型', trigger: 'change' }
           ],
           title: [
             {
               validator: (rule, value, callback) => {
                 if (!value.trim()) {
-                  callback(new Error("请输入段落标题"));
+                  callback(new Error('请输入段落标题'));
                 } else {
                   callback();
                 }
               },
-              trigger: "change"
+              trigger: 'change'
             },
-            { max: 30, message: "标题名称不能超过30字", trigger: "change" }
+            { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
           ],
           content: [
-            { required: true, message: "请输入段落内容", trigger: "change" }
+            { required: true, message: '请输入段落内容', trigger: 'change' }
           ]
         };
       }, 100);
     } else {
       this.rules = {
         position: [
-          { required: true, message: "请选择内容类型", trigger: "change" }
+          { required: true, message: '请选择内容类型', trigger: 'change' }
         ],
         title: [
           {
             validator: (rule, value, callback) => {
               if (!value.trim()) {
-                callback(new Error("请输入段落标题"));
+                callback(new Error('请输入段落标题'));
               } else {
                 callback();
               }
             },
-            trigger: "change"
+            trigger: 'change'
           },
-          { max: 30, message: "标题名称不能超过30字", trigger: "change" }
+          { max: 30, message: '标题名称不能超过30字', trigger: 'change' }
         ],
         content: [
-          { required: true, message: "请输入段落内容", trigger: "change" }
+          { required: true, message: '请输入段落内容', trigger: 'change' }
         ]
       };
     }
@@ -242,34 +241,33 @@ export default {
   },
   mounted() {
     let quill = this.$refs.quillEditor.quill;
-    console.log(quill);
     quill.root.addEventListener(
-      "paste",
-      (evt) => {
-        console.log("evt", evt);
+      'paste',
+      evt => {
+        console.log('evt', evt);
         if (
           evt.clipboardData &&
           evt.clipboardData.files &&
           evt.clipboardData.files.length
         ) {
-          console.log("ddadada");
+          console.log('ddadada');
           evt.preventDefault();
-          [].forEach.call(evt.clipboardData.files, (file) => {
-            console.log("file", file);
+          [].forEach.call(evt.clipboardData.files, file => {
+            console.log('file', file);
             if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) return;
             if (file.size > 1024 * 1000) return;
             let formData = new FormData();
-            formData.append("upfile", file);
-            api.uploadFile(formData).then((res) => {
-              console.log("formData", res);
-              if (res.data.code == "0") {
+            formData.append('upfile', file);
+            api.uploadFile(formData).then(res => {
+              console.log('formData', res);
+              if (res.data.code == '0') {
                 let imgUrl = config.imgHost + res.data.data.url;
                 var range = quill.getSelection();
-                console.log("range", range);
+                console.log('range', range);
                 if (range) {
                   // this.uploadAttachment(res, file, null);
                   let length = quill.getSelection().index;
-                  quill.insertEmbed(length, "image", imgUrl);
+                  quill.insertEmbed(length, 'image', imgUrl);
                   quill.setSelection(length + 1);
                   //  将光标移动到图片后面
                   this.$refs.quillEditor.quill.setSelection(range.index + 1);
@@ -278,7 +276,7 @@ export default {
                 this.$message({
                   showClose: true,
                   message: res.msg,
-                  type: "warning"
+                  type: 'warning'
                 });
               }
             });
@@ -289,70 +287,52 @@ export default {
     );
   },
   methods: {
+    zskgetDict() {
+      api
+        .zskgetDict()
+        .then(res => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.positions = data['50'];
+            this.renderPositions(data['50'], data['51']);
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
     reOrder(i) {
-      this.$emit("reOrder", i, this.index);
+      this.$emit('reOrder', i, this.index);
     },
     addEmit() {
-      this.$emit("add");
+      this.$emit('add');
     },
     delEmit() {
-      this.$emit("del", this.index);
+      this.$emit('del', this.index);
     },
     filterHiddenPosition() {
       const pos = this.data.position;
-      const pArr = this.positions.map((it) => {
-        return it.key;
+      const pArr = this.positions.map(it => {
+        return it.val;
       });
-      const pStr = pArr.join(",");
-      const arr = pos.filter((it) => {
+      const pStr = pArr.join(',');
+      const arr = pos.filter(it => {
         return pStr.indexOf(it) > -1;
       });
       this.data.position = arr;
     },
     // 渲染内容类型
-    renderPositions() {
+    renderPositions(data1, data2) {
       //显示位置枚举列表
-      const pos = localStorage.getItem("knowledgeEnumsData");
-      let positions = config.contentTypes;
-      if (this.showType == 1) {
-        // 诊断
-        this.positions = positions.filter((item) => item.key !== 2);
-      } else if (
-        this.showType == 3 ||
-        this.showType == 4 ||
-        this.showType == 5 ||
-        this.showType == 6
-      ) {
-        // 检验/检查
-        this.positions = positions.filter((item) => {
-          return item.key <= 2;
+      if (this.showType>0) {
+        data2 = data2.filter(item => item.name == this.showType);
+        let val = data2[0].val.split(',');
+        this.positions = data1.filter(it => {
+          let arr = val.map(v => v);
+          return arr.includes(it.val);
         });
-      } else if (
-        this.showType == 2 ||
-        this.showType == 7 ||
-        this.showType == 8 ||
-        this.showType == 9
-      ) {
-        // 药品/手术
-        this.positions = positions.filter((item) => item.key === 1);
-      } else {
-        this.positions = positions;
       }
     }
-
-    /*emitVal(){
-        let data = this.form;
-        let pst=this.form.position;
-        const content =  this.form.content.replace(config.imgHost,'{imageUrlPrefix}');
-        const text = this.$refs.quillEditor;console.log(text)
-        pst = typeof pst=='string'?pst:pst.join(',');
-        data =   Object.assign({},data,{
-                                        position:this.form.position?pst:'',
-                                        orderNo:this.index,
-                                        text:'',
-                                        content:content});
-        this.$emit("change",this.index,data);
-      }*/
   }
 };
 </script>

+ 1 - 0
src/components/knowledgeExtra/KnowledgeAll.vue

@@ -120,6 +120,7 @@ export default {
           this.id = id
           this.showSearch = false
         }
+        this.list = []
         const loading = this.$loading({
           lock: true,
           text: 'Loading',

+ 468 - 434
src/components/knowledgeExtra/RuleManager.vue

@@ -1,450 +1,484 @@
 <template>
-    <div>
-        <crumbs title="规则维护" :minWidth="titleWidth" class="knowledgeTitle">
-            <el-form :inline="true" class="demo-form-inline">
-                <el-form-item label="规则名称:">
-                    <el-input size="mini" v-model="filter.parDescription" placeholder="输入规则名称" clearable></el-input>
-                </el-form-item>
-                <el-form-item label="规则类型:">
-                    <el-select v-model="filter.parRuleType" clearable placeholder="请选择" size="mini">
-                        <el-option
-                                v-for="item in ruleTypeList"
-                                :key="item.id"
-                                :label="item.name"
-                                :value="item.id">
-                        </el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="医学标准术语:">
-                    <el-input size="mini" v-model="filter.parConceptName" placeholder="输入医学标准术语"  clearable></el-input>
-                </el-form-item>
-                <el-form-item label="状态:">
-                    <el-select v-model="filter.parStatus" clearable placeholder="请选择" size="mini">
-                        <el-option
-                                v-for="item in stateSelect"
-                                :key="item.id"
-                                :label="item.name"
-                                :value="item.id">
-                        </el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item>
-                    <el-button size="mini" @click="filterDatas">确认</el-button>
-                </el-form-item>
-            </el-form>
-            <el-form class="secLine">
-                <el-form-item>
-                    <el-button size="mini" @click="addRule" type="warning" style="margin:0 10px">+ 新增规则</el-button>
-                    <el-button size="mini" @click="update">更新数据</el-button>
-                </el-form-item>
-            </el-form>
-        </crumbs>
-        <div class="contents knowledgeContents">
-            <el-table :data="list"
-                      border
-                      style="width: 100%">
-                <el-table-column
-                        type="index"
-                        :index="indexMethod"
-                        label="编号"
-                        width="60">
-                </el-table-column>
-                <el-table-column
-                        prop="parDescription"
-                        label="规则名称"
-                        width="160">
-                    <template slot-scope="scope">
-                        <el-tooltip v-if="scope.row.parDescription.length>8" class="item" effect="dark" :content="scope.row.parDescription" placement="top">
-                            <span>{{scope.row.parDescription.slice(0,8)+'...'}}</span>
-                        </el-tooltip>
-                        <span v-if="scope.row.parDescription.length<9">{{scope.row.parDescription}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="parRuleType"
-                        label="规则类型"
-                        width="150">
-                    <template slot-scope="scope">
-                        {{statusTrans(scope.row.parRuleType)}}
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="parConceptName"
-                        label="医学标准术语"
-                        width="160">
-                    <template slot-scope="scope">
-                        <el-tooltip v-if="scope.row.parConceptName.length>8" class="item" effect="dark" :content="scope.row.parConceptName" placement="top">
-                            <span>{{scope.row.parConceptName.slice(0,8)+'...'}}</span>
-                        </el-tooltip>
-                        <span v-if="scope.row.parConceptName.length<9">{{scope.row.parConceptName}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="parLibTypeName"
-                        label="术语类型"
-                        width="150">
-                </el-table-column>
-                <el-table-column
-                        prop="parHasSub"
-                        label="有无子条件"
-                        width="100">
-                    <template slot-scope="scope">
-                        {{scope.row.parHasSub == '0'?'无':'有'}}
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        label="状态">
-                    <template slot-scope="scope">
-                          <span>
-                            {{scope.row.parStatus === 0?'禁用':'启用'}}
-                          </span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="modifierName"
-                        label="操作人">
-                    <template slot-scope="scope">
-                        <el-tooltip v-if="scope.row.modifierName&&scope.row.modifierName.length>8" class="item" effect="dark" :content="scope.row.modifierName" placement="top">
-                            <span>{{(scope.row.modifierName||'').slice(0,8)+'...'}}</span>
-                        </el-tooltip>
-                        <span v-if="scope.row.modifierName&&scope.row.modifierName.length<9">{{scope.row.modifierName}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="gmtModified"
-                        label="操作时间"
-                        width="180">
-                </el-table-column>
-                <el-table-column
-                        label="操作"
-                        width="180" fixed="right">
-                    <template slot-scope="scope">
-                        <el-button type="text" size="small" @click="editData(scope.row.parId)">修改</el-button>
-                        <span style="margin:0 3px;">|</span>
-                        <el-button type="text" size="small" @click="editData(scope.row.parId,true)">复制</el-button>
-                        <span style="margin:0 3px;">|</span>
-                        <el-button type="text" size="small" :class="scope.row.parStatus === 0?'':'unvailable'" @click="showDelDialog(scope.row)">{{scope.row.parStatus === 0?'启用':'禁用'}}</el-button>
-                        <span style="margin:0 3px;">|</span>
-                        <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row,1)">删除</el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <el-pagination :current-page.sync="currentPage"
-                           @current-change="currentChange"
-                           background
-                           :page-size="pageSize"
-                           :page-sizes="pageSizeArr"
-                           @size-change="handleSizeChange"
-                           :layout="pageLayout"
-                           :total="total">
-            </el-pagination>
-        </div>
-
+  <div>
+    <crumbs title="规则维护" :minWidth="titleWidth" class="knowledgeTitle">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="规则名称:">
+          <el-input size="mini" v-model="filter.parDescription" placeholder="输入规则名称" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="规则类型:">
+          <el-select v-model="filter.parRuleType" clearable placeholder="请选择" size="mini">
+            <el-option
+              v-for="item in ruleTypeList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="医学标准术语:">
+          <el-input size="mini" v-model="filter.parConceptName" placeholder="输入医学标准术语" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="状态:">
+          <el-select v-model="filter.parStatus" clearable placeholder="请选择" size="mini">
+            <el-option
+              v-for="item in stateSelect"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">确认</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine">
+        <el-form-item>
+          <el-button size="mini" @click="addRule" type="warning" style="margin:0 10px">+ 新增规则</el-button>
+          <el-button size="mini" @click="update">更新数据</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="contents knowledgeContents">
+      <el-table :data="list" border style="width: 100%">
+        <el-table-column type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
+        <el-table-column prop="parDescription" label="规则名称" width="160">
+          <template slot-scope="scope">
+              <span>{{scope.row.parDescription}}</span>
+            <!-- <el-tooltip
+              v-if="scope.row.parDescription.length>8"
+              class="item"
+              effect="dark"
+              :content="scope.row.parDescription"
+              placement="top"
+            >
+              <span>{{scope.row.parDescription.slice(0,8)+'...'}}</span>
+            </el-tooltip> -->
+            <span v-if="scope.row.parDescription.length<9">{{scope.row.parDescription}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="parRuleType" label="规则类型" width="150">
+          <template slot-scope="scope">{{statusTrans(scope.row.parRuleType)}}</template>
+        </el-table-column>
+        <el-table-column prop="parConceptName" label="医学标准术语" width="160">
+          <template slot-scope="scope">
+            <el-tooltip
+              v-if="scope.row.parConceptName.length>8"
+              class="item"
+              effect="dark"
+              :content="scope.row.parConceptName"
+              placement="top"
+            >
+              <span>{{scope.row.parConceptName.slice(0,8)+'...'}}</span>
+            </el-tooltip>
+            <span v-if="scope.row.parConceptName.length<9">{{scope.row.parConceptName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="parLibTypeName" label="术语类型" width="150"></el-table-column>
+        <el-table-column prop="parHasSub" label="有无子条件" width="100">
+          <template slot-scope="scope">{{scope.row.parHasSub == '0'?'无':'有'}}</template>
+        </el-table-column>
+        <el-table-column label="状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.parStatus === 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="modifierName" label="操作人">
+          <template slot-scope="scope">
+            <el-tooltip
+              v-if="scope.row.modifierName&&scope.row.modifierName.length>8"
+              class="item"
+              effect="dark"
+              :content="scope.row.modifierName"
+              placement="top"
+            >
+              <span>{{(scope.row.modifierName||'').slice(0,8)+'...'}}</span>
+            </el-tooltip>
+            <span
+              v-if="scope.row.modifierName&&scope.row.modifierName.length<9"
+            >{{scope.row.modifierName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="gmtModified" label="操作时间" width="180"></el-table-column>
+        <el-table-column label="操作" width="180" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="editData(scope.row.parId)">修改</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button type="text" size="small" @click="editData(scope.row.parId,true)">复制</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              :class="scope.row.parStatus === 0?'':'unvailable'"
+              @click="showDelDialog(scope.row)"
+            >{{scope.row.parStatus === 0?'启用':'禁用'}}</el-button>
+            <span style="margin:0 3px;">|</span>
+            <el-button
+              type="text"
+              size="small"
+              class="delete"
+              @click="showDelDialog(scope.row,1)"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        :current-page.sync="currentPage"
+        @current-change="currentChange"
+        background
+        :page-size="pageSize"
+        :page-sizes="pageSizeArr"
+        @size-change="handleSizeChange"
+        :layout="pageLayout"
+        :total="total"
+      ></el-pagination>
     </div>
+  </div>
 </template>
 
 <script>
-    import api from '@api/knowledgeLib.js';
-    import config from '@api/config.js';
-    import utils from '@api/utils.js';
+import api from '@api/knowledgeLib.js';
+import config from '@api/config.js';
+import utils from '@api/utils.js';
 
-    export default {
-        name: 'ZskRuleManager',
-        data: function () {
-            return {
-                list: [],
-                stateSelect:[
-                    {id:1,name:'启用'},
-                    {id:0,name:'禁用'},
-                ],
-                ruleTypeList:[],
-                searched: false,
-                filter:{
-                    parStatus:'',
-                    parDescription:'',
-                    parConceptName:'',
-                    parRuleType:'',
-                },
-                cacheData: {},
-                currentPage: 1,
-                pageSize: config.pageSize,
-                pageSizeArr:config.pageSizeArr,
-                pageLayout:config.pageLayout,
-                total: 0,
-                titleWidth:'970px' //头部最小宽度
+export default {
+  name: 'ZskRuleManager',
+  data: function() {
+    return {
+      list: [],
+      stateSelect: [
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' }
+      ],
+      ruleTypeList: [],
+      searched: false,
+      filter: {
+        parStatus: '',
+        parDescription: '',
+        parConceptName: '',
+        parRuleType: ''
+      },
+      cacheData: {},
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      titleWidth: '970px' //头部最小宽度
+    };
+  },
+  created() {
+    const param = this.$route.params;
+    if (param.currentPage) {
+      this.inCurrentPage = param.currentPage;
+      this.filter = param.filter;
+    }
+    this.getTypeList();
+    const that = this;
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function() {
+      that.getDataList();
+    });
+    this.getDict();
+  },
+  watch: {
+    filter: {
+      handler: function() {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  // beforeRouteEnter(to, from, next) {
+  //     next(vm => {
+  //         //const pm = to.param;
+  //         Object.assign(vm, to.params);
+  //         vm.inCurrentPage=to.params.currentPage;
+  //     })
+  // },
+  methods: {
+    getDict() {
+      api
+        .zskgetDict()
+        .then(res => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            const arr = data['20'].map(it => it.val);
+            //this.dict = arr.join(",");
+            //this.msgDict=(data['21'].map((it)=>it.val)||[]).join(",");
+            localStorage.setItem('zskDicts', arr.join(','));
+            localStorage.setItem(
+              'zskMsgDict',
+              (data['21'].map(it => it.val) || []).join(',')
+            );
+            localStorage.setItem('zskNumDict', data['22'][0].val);
+            localStorage.setItem('zskSubDict', data['23'][0].val);
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    statusTrans(type) {
+      const obj = this.ruleTypeList.find(it => it.type === type);
+      return obj && obj.name;
+    },
+    getTypeList() {
+      const typeListData = JSON.parse(localStorage.getItem('zskTypesList'));
+      if (typeListData) {
+        this.ruleTypeList = typeListData;
+        return;
+      }
+      api
+        .getTypesList({ planCode: 'rule' })
+        .then(res => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.ruleTypeList = data;
+            localStorage.setItem('zskTypesList', JSON.stringify(data));
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+    addRule() {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      this.$router.push({ name: 'AddZskRule', params: pam });
+    },
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList(1);
+    },
+    getDataList(flag, isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api
+        .getRulesList(params)
+        .then(res => {
+          loading.close();
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            for (let j = 0; j < data.records.length; j++) {
+              data.records[j].condition =
+                data.records[j].parStatus == '1' ? '启用' : '禁用';
             }
-        },
-        created() {
-            const param = this.$route.params;
-            if(param.currentPage){
-                this.inCurrentPage = param.currentPage
-                this.filter = param.filter
+            this.list = data.records;
+            if (!flag) {
+              //搜索时不缓存
+              this.cacheData[params.current] = data.records;
+            } else {
+              this.cacheData = {};
             }
-            this.getTypeList();
-            const that = this;
-            //返回时避免参数未赋值就获取列表
-            setTimeout(function(){
-                that.getDataList();
-            });
-            this.getDict();
-        },
-        watch: {
-            'filter': {
-                handler: function () {
-                    this.searched = false;
-                },
-                deep: true
+            this.total = data.total;
+            if (this.inCurrentPage !== undefined) {
+              this.currentPage = this.inCurrentPage;
+              this.inCurrentPage = undefined;
             }
-        },
-        // beforeRouteEnter(to, from, next) {
-        //     next(vm => {
-        //         //const pm = to.param;
-        //         Object.assign(vm, to.params);
-        //         vm.inCurrentPage=to.params.currentPage;
-        //     })
-        // },
-        methods: {
-            getDict(){
-                api.zskgetDict().then((res) => {
-                    if (res.data.code == '0') {
-                        const data = res.data.data;
-                        const arr =data['20'].map((it)=>it.val);
-                        //this.dict = arr.join(",");
-                        //this.msgDict=(data['21'].map((it)=>it.val)||[]).join(",");
-                        localStorage.setItem("zskDicts",arr.join(","));
-                        localStorage.setItem("zskMsgDict",(data['21'].map((it)=>it.val)||[]).join(","));
-                        localStorage.setItem("zskNumDict",data['22'][0].val);
-                        localStorage.setItem("zskSubDict",data['23'][0].val);
-                    }
-                }).catch((error) => {
-                    console.log(error);
-                });
-            },
-            statusTrans(type){
-                const obj = this.ruleTypeList.find((it)=>it.type===type);
-                return obj&&obj.name;
-            },
-            getTypeList(){
-                const typeListData = JSON.parse(localStorage.getItem("zskTypesList"));
-                if(typeListData){
-                    this.ruleTypeList = typeListData;
-                    return;
-                }
-                api.getTypesList({planCode:'rule'}).then((res) => {
-                    if (res.data.code == '0') {
-                        const data = res.data.data;
-                        this.ruleTypeList = data;
-                        localStorage.setItem("zskTypesList",JSON.stringify(data));
-                    }
-                }).catch((error) => {
-                    console.log(error);
-                });
-            },
-            handleSizeChange(val){
-                this.pageSize = val;
-                this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
-                this.getDataList();
-            },
-            addRule(){
-                const pam = this.searched ? {
-                    currentPage: this.currentPage,
-                    pageSize:this.pageSize,
-                    filter: this.filter
-                } : {currentPage: this.currentPage,
-                    pageSize:this.pageSize};
-                this.$router.push({name: 'AddZskRule', params: pam});
-            },
-            filterDatas(){
-                this.currentPage = 1;
-                this.getDataList(1);
-            },
-            getDataList(flag,isTurnPage) {
-                const params = this.getFilterItems(isTurnPage);
-                this.searched = true;
-                const loading = this.$loading({
-                    lock: true,
-                    text: 'Loading',
-                    spinner: 'el-icon-loading',
-                    background: 'rgba(0, 0, 0, 0.7)'
-                });
-                api.getRulesList(params).then((res) => {
-                    loading.close();
-                    if (res.data.code == '0') {
-                        const data = res.data.data;
-                        for(let j = 0;j < data.records.length;j++){
-                            data.records[j].condition = (data.records[j].parStatus == '1'?'启用':'禁用')
-                        }
-                        this.list = data.records;
-                        if(!flag){//搜索时不缓存
-                            this.cacheData[params.current] = data.records;
-                        }else{
-                            this.cacheData = {}
-                        }
-                        this.total = data.total;
-                        if(this.inCurrentPage!==undefined){
-                            this.currentPage=this.inCurrentPage;
-                            this.inCurrentPage = undefined;
-                        }
-                    }else{
-                        this.warning(res.data.msg||'获取列表数据失败');
-                    }
-                }).catch((error) => {
-                    loading.close();
-                    console.log(error);
-                });
-            },
-            getFilterItems(isTurnPage) {
-                //翻页时筛选条件没点确定则清空
-                if(isTurnPage&&!this.searched){
-                    this.clearFilter();
-                };
-                const param = {
-                    current: this.inCurrentPage||this.currentPage,
-                    size: this.pageSize,
-                    parRuleType: this.filter.parRuleType,
-                    parDescription: this.filter.parDescription.trim(),
-                    parConceptName: this.filter.parConceptName.trim(),
-                    parStatus:this.filter.parStatus
-                };
-                return param;
-            },
-            indexMethod(index) {
-                return ((this.currentPage - 1) * this.pageSize) + index + 1;
-            },
-            currentChange(next) {
-                this.currentPage = next;
-                /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+          } else {
+            this.warning(res.data.msg || '获取列表数据失败');
+          }
+        })
+        .catch(error => {
+          loading.close();
+          console.log(error);
+        });
+    },
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        parRuleType: this.filter.parRuleType,
+        parDescription: this.filter.parDescription.trim(),
+        parConceptName: this.filter.parConceptName.trim(),
+        parStatus: this.filter.parStatus
+      };
+      return param;
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
                   this.list = this.cacheData[next];
                 } else {*/
-                this.getDataList(1,true);
-                //}
-            },
-            warning(msg,type){
-                this.$message({
-                    showClose: true,
-                    message:msg,
-                    type:type||'warning'
-                })
-            },
-            showConfirmDialog(msg,resolve){
-                this.$alert(msg, '提示', {
-                    confirmButtonText: '确定',
-                    type: 'warning'
-                }).then(() => {
-                    resolve();
-                }).catch(() => {});
-            },
-            editData(id,isCopy){
-                const pam = this.searched ? {
-                    currentPage: this.currentPage,
-                    pageSize:this.pageSize,
-                    filter: this.filter
-                } : {currentPage: this.currentPage,
-                    pageSize:this.pageSize};
-                api.ruleDetail({id}).then((res) => {
-                    if (res.data.code == '0') {
-                        const data = res.data.data;
-                        this.$router.push({name:'AddZskRule',params:{...pam,data,copy:isCopy}});
-                    }
-                }).catch((error) => {
-                    this.warning('获取详情失败,请重试')
-                });
-            },
-            showDelDialog(row,isDelete){
-                const params = {
-                    id:row.parId
-                };
-                const txt=row.parStatus===0?'重新启用':'禁用';
-                const warningTxt = isDelete?'是否删除该规则?可能对现有系统造成影响':'是否'+txt+'该条数据?';
-                const handleFn = isDelete?api.deleteRule:(row.parStatus===0?api.saveRuleApply:api.deleteRuleApply);
-                this.showConfirmDialog(warningTxt,()=>{
-                    handleFn(params).then((res)=>{
-                        if(res.data.code=='0'){
-                            if(!this.searched){
-                                //未点确认时清空搜索条件
-                                this.clearFilter();
-                            }
-                            if(isDelete){       //恢复成功后跳转到筛选条件的首页
-                                this.currentPage = 1;
-                            } else {
-                                if (this.filter.parStatus!==''&&this.list.length === 1){
-                                    //有启用状态筛选条件且当前页只有最后一条数据删除时,删除成功后跳转到前一页
-                                    this.currentPage = this.currentPage===1?1:this.currentPage-1;
-                                }
-                            }
-                            this.warning(res.data.msg||'操作成功','success');
-                            this.getDataList();
-                        }else{
-                            this.warning(res.data.msg);
-                        }
-                    }).catch((error)=>{
-                        this.warning(error);
-                    })
-                });
-            },
-            clearFilter(){
-                this.filter={
-                    parStatus:'',
-                    parConceptName:'',
-                    parDescription:'',
-                    parRuleType:'',
-                };
-            },
-            update(){
-                const loading = this.$loading({
-                    lock: true,
-                    text: 'Loading',
-                    spinner: 'el-icon-loading',
-                    background: 'rgba(0, 0, 0, 0.7)'
-                });
-                api.zskUpdateAll().then((res) => {
-                    loading.close();
-                    if (res.data.code == '0') {
-                        this.warning('更新成功','success');
-                        this.getDataList();
-                    }else{
-                        this.warning(res.data.msg||'更新失败,请重试');
-                    }
-                }).catch((error) => {
-                    loading.close();
-                    this.warning('更新失败,请重试')
-                });
-            },
-        }
+      this.getDataList(1, true);
+      //}
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || 'warning'
+      });
+    },
+    showConfirmDialog(msg, resolve) {
+      this.$alert(msg, '提示', {
+        confirmButtonText: '确定',
+        type: 'warning'
+      })
+        .then(() => {
+          resolve();
+        })
+        .catch(() => {});
+    },
+    editData(id, isCopy) {
+      const pam = this.searched
+        ? {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            filter: this.filter
+          }
+        : { currentPage: this.currentPage, pageSize: this.pageSize };
+      api
+        .ruleDetail({ id })
+        .then(res => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.$router.push({
+              name: 'AddZskRule',
+              params: { ...pam, data, copy: isCopy }
+            });
+          }
+        })
+        .catch(error => {
+          this.warning('获取详情失败,请重试');
+        });
+    },
+    showDelDialog(row, isDelete) {
+      const params = {
+        id: row.parId
+      };
+      const txt = row.parStatus === 0 ? '重新启用' : '禁用';
+      const warningTxt = isDelete
+        ? '是否删除该规则?可能对现有系统造成影响'
+        : '是否' + txt + '该条数据?';
+      const handleFn = isDelete
+        ? api.deleteRule
+        : row.parStatus === 0
+        ? api.saveRuleApply
+        : api.deleteRuleApply;
+      this.showConfirmDialog(warningTxt, () => {
+        handleFn(params)
+          .then(res => {
+            if (res.data.code == '0') {
+              if (!this.searched) {
+                //未点确认时清空搜索条件
+                this.clearFilter();
+              }
+              if (isDelete) {
+                //恢复成功后跳转到筛选条件的首页
+                this.currentPage = 1;
+              } else {
+                if (this.filter.parStatus !== '' && this.list.length === 1) {
+                  //有启用状态筛选条件且当前页只有最后一条数据删除时,删除成功后跳转到前一页
+                  this.currentPage =
+                    this.currentPage === 1 ? 1 : this.currentPage - 1;
+                }
+              }
+              this.warning(res.data.msg || '操作成功', 'success');
+              this.getDataList();
+            } else {
+              this.warning(res.data.msg);
+            }
+          })
+          .catch(error => {
+            this.warning(error);
+          });
+      });
+    },
+    clearFilter() {
+      this.filter = {
+        parStatus: '',
+        parConceptName: '',
+        parDescription: '',
+        parRuleType: ''
+      };
+    },
+    update() {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api
+        .zskUpdateAll()
+        .then(res => {
+          loading.close();
+          if (res.data.code == '0') {
+            this.warning('更新成功', 'success');
+            this.getDataList();
+          } else {
+            this.warning(res.data.msg || '更新失败,请重试');
+          }
+        })
+        .catch(error => {
+          loading.close();
+          this.warning('更新失败,请重试');
+        });
     }
+  }
+};
 </script>
 
 <style lang="less" scoped>
-    @import "../../less/admin.less";
-    /deep/ .container.knowledgeTitle {
-        height: 80px;
-    }
-    /deep/ .contents.knowledgeContents {
-        padding: 104px 20px 0;
-    }
-    /deep/ .secLine.el-form {
-        float: right;
-        display: block;
-        position: relative;
-        top: -5px;
-    }
-    .delete{
-        color: red;
-    }
-    .review{
-        color: #22ccc8;
-    }
-    .el-table .cell{
-        overflow: hidden;
-        white-space: nowrap;
-    }
-    #upFile{
-        display: none !important;
-    }
-    .unvailable{
-        color: #FE7D3D;
-        &:hover{
-            color: #f19061;
-        }
-    }
+@import '../../less/admin.less';
+/deep/ .container.knowledgeTitle {
+  height: 80px;
+}
+/deep/ .contents.knowledgeContents {
+  padding: 104px 20px 0;
+}
+/deep/ .secLine.el-form {
+  float: right;
+  display: block;
+  position: relative;
+  top: -5px;
+}
+.delete {
+  color: red;
+}
+.review {
+  color: #22ccc8;
+}
+.el-table .cell {
+  overflow: hidden;
+  white-space: nowrap;
+}
+#upFile {
+  display: none !important;
+}
+.unvailable {
+  color: #fe7d3d;
+  &:hover {
+    color: #f19061;
+  }
+}
 </style>

+ 18 - 5
src/components/knowledgeExtra/rules.js

@@ -24,7 +24,12 @@ export const formRules = {
   parHasSub: [
     { required: true, message: "请选择有无子条件", trigger: ["change"] }
   ],
-  parMsg: [
+  
+
+}
+
+export const tableRules = {
+  subMsg: [
     { required: true, message: "请输入附加信息", trigger: ["change"] },
     {
       validator: (rule, value, callback) => {
@@ -37,10 +42,18 @@ export const formRules = {
       trigger: "change"
     }
   ],
-
-}
-
-export const tableRules = {
+  subMsgs: [
+    {
+      validator: (rule, value, callback) => {
+        if (value && value.length > 100) {
+          callback(new Error("附加信息不能超过100字"));
+        } else {
+          callback();
+        }
+      },
+      trigger: "change"
+    }
+  ],
   conceptId: [
     { required: true, message: '请输入疾病名称', trigger: ['change'] }
   ],

+ 3 - 1
src/components/testManager/staticKnowledgeMap/StaticKnowledgeMapTest.vue

@@ -86,8 +86,9 @@
               :disabled="!runningStatus || implement"
               @click="handleTest(scope.row, scope.$index)"
               >{{
-                runningStatusArr[scope.$index] === 1 || implement
+                runningStatusArr[scope.$index] === 1
                   ? '执行测试中...'
+                  :implement?'执行测试'
                   : '执行测试'
               }}</el-button
             >
@@ -135,6 +136,7 @@ export default {
   created() {
     this._getHospitalInfoCDSS();
     this.timer = setInterval(this._getRunningStatus, 20 * 1000);
+    this.timer = setInterval(this.getRunningState, 20 * 1000);
   },
   beforeDestroy() {
     clearInterval(this.timer);